@gmb/bitmark-parser-generator 5.39.0 → 5.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +992 -279
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +17 -17
- package/dist/browser/esm/index.d.ts +17 -17
- package/dist/browser/esm/index.js +992 -279
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/cli/main.js +994 -282
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +995 -282
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +995 -282
- package/dist/index.js.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={922(e,t,r){var i,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,l=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),c={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(c,{Ast:()=>et,BitGroup:()=>d,BitType:()=>u,BitmarkGenerator:()=>gr,BitmarkParser:()=>Oi,BitmarkParserGenerator:()=>lo,BitmarkParserType:()=>Br,BitmarkStringGenerator:()=>yr,BitmarkVersion:()=>It,BodyTextFormat:()=>ot,BoundingBoxIndex:()=>ho,Builder:()=>pr,CardSetVersion:()=>hr,HtmlTableGenerator:()=>xr,HtmlTableParser:()=>oo,InfoFormat:()=>Sr,InfoType:()=>Pr,Input:()=>ao,InputFormat:()=>no,JsonGenerator:()=>_r,JsonParser:()=>Lr,JsonStringGenerator:()=>co,NodeType:()=>Xe,Output:()=>so,ResourceBuilder:()=>cr,ResourceGroup:()=>Te,StringWriter:()=>ur,TextMarkType:()=>Qe,TextNodeType:()=>Ze,bitmarkTextParse:()=>Xt}),e.exports=(i=c,((e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of s(t))n.call(e,l)||l===r||o(e,l,{get:()=>t[l],enumerable:!(i=a(t,l))||i.enumerable});return e})(o({},"__esModule",{value:!0}),i));var p=r(722),u=(r(722),{_error:"_error",_comment:"_comment",_standard:"_standard",advertising:"advertising",advertisingAdvertorial:"advertising-advertorial",advertisingAdvertorialPage:"advertising-advertorial-page",advertisingCallToAction:"advertising-call-to-action",advertisingCallToActionMeeting:"advertising-call-to-action-meeting",advertisingBanner:"advertising-banner",advertisingSkyscraper:"advertising-skyscraper",advertisingRectangle:"advertising-rectangle",advertisingFullPage:"advertising-full-page",advertisingHalfPage:"advertising-half-page",advertisingQuarterPage:"advertising-quarter-page",advertisingClassifiedPage:"advertising-classified-page",advertisingLandscape:"advertising-landscape",advertisingPortrait:"advertising-portrait",aiChat:"ai-chat",aiEditor:"ai-editor",aiPrompt:"ai-prompt",aiTutor:"ai-tutor",aiWbt:"ai-wbt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCalculatorLatex:"app-calculator-latex",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",appRag:"app-rag",appSearch:"app-search",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleAuthor:"article-author",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",author:"author",authorContentBitGenerator:"author-content-bit-generator",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",bookAuthor:"book-author",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",brandColor:"brand-color",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",catalogItemBook:"catalog-item-book",catalogItemExternalBook:"catalog-item-external-book",catalogItemProduct:"catalog-item-product",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",clozeAndMultipleChoiceTextConversationLeft1:"cloze-and-multiple-choice-text-conversation-left-1",clozeAndMultipleChoiceTextConversationLeft1Scream:"cloze-and-multiple-choice-text-conversation-left-1-scream",clozeAndMultipleChoiceTextConversationLeft1Thought:"cloze-and-multiple-choice-text-conversation-left-1-thought",clozeAndMultipleChoiceTextConversationRight1:"cloze-and-multiple-choice-text-conversation-right-1",clozeAndMultipleChoiceTextConversationRight1Scream:"cloze-and-multiple-choice-text-conversation-right-1-scream",clozeAndMultipleChoiceTextConversationRight1Thought:"cloze-and-multiple-choice-text-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",definitionListCollapsible:"definition-list-collapsible",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",extractorBlueprint:"extractor-blueprint",extractorBlueprintConfiguration:"extractor-blueprint-configuration",extractorConfiguration:"extractor-configuration",extractorImage:"extractor-image",extractorImageCollapsible:"extractor-image-collapsible",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",extractorReconcile:"extractor-reconcile",extractorRepeatedText:"extractor-repeated-text",extractorRule:"extractor-rule",extractorTheme:"extractor-theme",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formFreeText:"form-free-text",formula:"formula",formulaImage:"formula-image",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",handInFreeText:"hand-in-free-text",handInFreeTextExpert:"hand-in-free-text-expert",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInSystemMedia:"hand-in-system-media",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",leMultiDayEvent:"le-multi-day-event",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",nonProductionPrototypeIframe:"non-production-prototype-iframe",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",printBook:"print-book",openBookChapter:"open-book-chapter",openBookChapterTeaser:"open-book-chapter-teaser",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",pageEnd:"page-end",pageStart:"page-start",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platform:"platform",platformBrandTarget:"platform-brand-target",platformHeader:"platform-header",platformMain:"platform-main",platformMainButton:"platform-main-button",platformMainInput:"platform-main-input",platformPath:"platform-path",platformSection:"platform-section",platformSectionButton:"platform-section-button",platformSectionChat:"platform-section-chat",platformSectionHeader:"platform-section-header",platformSectionInput:"platform-section-input",platformSystemIcon:"platform-system-icon",preparationNote:"preparation-note",printThisBook:"print-this-book",printThisChapter:"print-this-chapter",printPageBreak:"print-page-break",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",reviewError:"review-error",reviewErrorAi:"review-error-ai",reviewErrorTranslation:"review-error-translation",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",sandbox:"sandbox",sandboxOutputJson:"sandbox-output-json",sandboxOutputMarkup:"sandbox-output-markup",sandboxOutputRender:"sandbox-output-render",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",smartStandardDefinitionListNonNormative:"smart-standard-definition-list-non-normative",smartStandardDefinitionListNormative:"smart-standard-definition-list-normative",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",smartStandardRemarkTableExtendedImageNonNormative:"smart-standard-remark-table-extended-image-non-normative",smartStandardRemarkTableExtendedImageNonNormativeCollapsible:"smart-standard-remark-table-extended-image-non-normative-collapsible",smartStandardRemarkTableExtendedImageNormative:"smart-standard-remark-table-extended-image-normative",smartStandardRemarkTableExtendedImageNormativeCollapsible:"smart-standard-remark-table-extended-image-normative-collapsible",smartStandardRemarkTableExtendedNonNormative:"smart-standard-remark-table-extended-non-normative",smartStandardRemarkTableExtendedNonNormativeCollapsible:"smart-standard-remark-table-extended-non-normative-collapsible",smartStandardRemarkTableExtendedNormative:"smart-standard-remark-table-extended-normative",smartStandardRemarkTableExtendedNormativeCollapsible:"smart-standard-remark-table-extended-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",smartStandardTableExtendedImageNonNormative:"smart-standard-table-extended-image-non-normative",smartStandardTableExtendedImageNonNormativeCollapsible:"smart-standard-table-extended-image-non-normative-collapsible",smartStandardTableExtendedImageNormative:"smart-standard-table-extended-image-normative",smartStandardTableExtendedImageNormativeCollapsible:"smart-standard-table-extended-image-normative-collapsible",smartStandardTableExtendedNonNormative:"smart-standard-table-extended-non-normative",smartStandardTableExtendedNonNormativeCollapsible:"smart-standard-table-extended-non-normative-collapsible",smartStandardTableExtendedNormative:"smart-standard-table-extended-normative",smartStandardTableExtendedNormativeCollapsible:"smart-standard-table-extended-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",standardDefinitionListNonNormative:"standard-definition-list-non-normative",standardDefinitionListNormative:"standard-definition-list-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",standardRemarkTableExtendedImageNonNormative:"standard-remark-table-extended-image-non-normative",standardRemarkTableExtendedImageNormative:"standard-remark-table-extended-image-normative",standardRemarkTableExtendedNonNormative:"standard-remark-table-extended-non-normative",standardRemarkTableExtendedNormative:"standard-remark-table-extended-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",standardTableExtendedImageNonNormative:"standard-table-extended-image-non-normative",standardTableExtendedImageNormative:"standard-table-extended-image-normative",standardTableExtendedNonNormative:"standard-table-extended-non-normative",standardTableExtendedNormative:"standard-table-extended-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",tableExtended:"table-extended",tableExtendedImage:"table-extended-image",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",tocResource:"toc-resource",tocContent:"toc-content",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboard:"vendor-datadog-dashboard",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",vendorLearndashEmbed:"vendor-learndash-embed",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",vendorStripePricingTablePrintOnRequest:"vendor-stripe-pricing-table-print-on-request",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"}),d=(r(722),{assignment:"assignment",authors:"authors",botAction:"bot-action",bots:"bots",chat:"chat",cloze:"cloze",conversation:"conversation",cooking:"cooking",correction:"correction",documentUpload:"document-upload",essay:"essay",extractor:"extractor",flashcard:"flashcard",group:"group",highlightText:"highlight-text",interview:"interview",learningPath:"learning-path",mark:"mark",match:"match",message:"message",multipleChoice:"multiple-choice",multipleResponse:"multiple-response",nonProduction:"non-production",other:"other",pages:"pages",preparationNote:"preparation-note",quizzes:"quizzes",rating:"rating",recipes:"recipes",recordAudio:"record-audio",reviewErrors:"review-errors",reviews:"reviews",selfAssessment:"self-assessment",sequence:"sequence",set:"set",static:"static",steps:"steps",survey:"survey",surveyAnonymous:"survey-anonymous",surveys:"surveys",tables:"tables",takePicture:"take-picture",trueFalse:"true-false",vocabulary:"vocabulary",warning:"warning",whiteLabel:"white-label"}),m=(r(722),"infinity"),h=(r(722),"string"),b="boolean",g=(r(722),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 r=0;for(;e.startsWith(t);)r++,e=e.substring(t.length);return r}countOccurrencesAtEnd(e,t){let r=0;for(;e.endsWith(t);)r++,e=e.substring(0,e.length-t.length);return r}splitPlaceholders(e,t){let r=[e];const i=(e,t)=>{const r=[];for(const i of e){const e=i.split(t);for(let i=0,o=e.length;i<o;i++){const a=e[i],s=i===o-1;r.push(a),s||r.push(t)}}return r};for(const e of t)r=i(r,e);return r}firstLine(e,t){const r=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return r;const i=e.split("\n");return i.length>0?i[0].substring(0,t):r}wordWrap(e,t){const r=[];if(t<1||null==e||e.length<=t)return r;const i=e.length,o=i-t;let a,s=0;for(;s<o;){let i;const o=s+t,n=e.indexOf("\n",s);if(n>-1&&n>s&&n<o){i=n-s,a=e.substr(s,i),s=s+i+1,r.push(a);continue}const l=e.lastIndexOf(" ",o);let c=0;l>-1&&l!=s-1?(i=l-s,i>0&&(c=s+i+1)):(i=t,c=s+t),a=e.slice(s,s+i),s=c,r.push(a.trim())}return s<i&&(a=e.slice(s),r.push(a)),r}kebabToCamel(e){return e?e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()):e}camelToKebab(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():e}}),y={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",platformIcon:"platformIcon",platformLogo:"platformLogo",platformBackgroundImage:"platformBackgroundImage",previewImage:"previewImage",previewVideo:"previewVideo",coverImage:"coverImage",backgroundImage:"backgroundImage"};function f(e){return`&${g.kebabToCamel(e)}`}r(722);var k={tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_item:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"},x=k,v=(r(722),"plainText"),T="bitmarkText",_="number",C="boolean",w="invertedBoolean",A="enumeration",B="numberList4",S=(r(722),{plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"}),P=(r(722),"flashcard"),I="flashcard1",E="definitionList",L="definitionListPlain",N="elements",V="statements",R="quiz",G="quizResponses",F="feedback",K="questions",$="matchPairs",O="matchAudioPairs",J="matchImagePairs",D="matchMatrix",z="table",q="tableExtended",j="pronunciationTable",M="botActionResponses",H="exampleBitList",U="pageFooterSections",W="clozeList",Y="ingredients",Q="bookReferenceList",Z=(r(722),"standard"),X="resource",ee="comboResource",te=(r(722),"unknown"),re="tag",ie="property",oe="resource",ae="group",se=class{constructor(e){l(this,"type"),l(this,"configKey"),l(this,"tag"),l(this,"maxCount"),l(this,"minCount"),l(this,"chain"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"deprecated"),this.type=e.type,this.configKey=e.configKey,this.tag=e.tag,this.maxCount=e.maxCount,this.minCount=e.minCount,this.chain=e.chain,this.jsonKey=e.jsonKey,this.exportJsonKey=e.exportJsonKey,this.hasExportJsonKey=e.hasExportJsonKey,this.htmlKey=e.htmlKey,this.hasHtmlKey=e.hasHtmlKey,this.deprecated=e.deprecated}},ne=class extends se{constructor(e){super({type:re,...e}),l(this,"type",re)}toString(e){const t=Object.assign({},e);let r=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},le=class extends se{constructor(e){super({type:ie,...e}),l(this,"type",ie),l(this,"array"),l(this,"format"),l(this,"values"),l(this,"defaultValue"),this.array=e.maxCount===m||e.maxCount>1,this.format=e.format,this.values=e.values,this.defaultValue=e.defaultValue}toString(e){const t=Object.assign({},e);let r=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.array&&(r+=`, arr=${this.array}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.values&&(r+=`, vals=[${this.values.join(",")}]`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},ce=class extends se{constructor(e){super({type:oe,...e}),l(this,"type",oe)}toString(e){const t=Object.assign({},e);let r=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},pe=class{constructor(e,t,r,i,o,a,s=!1,n,c,p=!1){l(this,"tags"),l(this,"bodyAllowed"),l(this,"bodyRequired"),l(this,"repeatCount"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"format"),this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i,this.jsonKey=o,this.exportJsonKey=a,this.hasExportJsonKey=s,this.htmlKey=c,this.hasHtmlKey=p,this.format=n}toString(e){const t=Object.assign({},e);let r="";const i=[];this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),null!=this.repeatCount&&i.push(`repeatCount=${this.repeatCount}`),r+=`[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))r+=`\n${e.toString(t)}`;return r}},ue=class{constructor(e,t,r,i,o,a=!1,s,n=!1){l(this,"name"),l(this,"repeat"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"variants"),this.name=e,this.repeat=t,this.jsonKey=i,this.exportJsonKey=o,this.hasExportJsonKey=a,this.htmlKey=s,this.hasHtmlKey=n,this.variants=r}toString(e){const t=Object.assign({},e);let r="";r+=`[Side: ${this.name}]`,this.repeat&&(r+=" (repeat)");let i=0;for(const e of this.variants)r+=`\n [Variant ${i}]`,r+=`\n ${e.toString(t)}`,i++;return r}},de=class{constructor(e,t,r,i,o,a,s=void 0,n=!1){l(this,"configKey"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"sections"),l(this,"sides"),this.configKey=e,this.jsonKey=t,this.exportJsonKey=r,this.hasExportJsonKey=i,this.htmlKey=s,this.hasHtmlKey=n,this.sections=o,this.sides=a}get variants(){return this.sides.map(e=>e.variants)}toString(e){const t=Object.assign({},e);let r="";r+=`[CardSet: ${this.configKey}]`,r+=`\n jsonKey: ${this.jsonKey}`;for(const e of this.sides)r+=`\n${e.toString(t)}`;return r}},me=class{constructor(e){l(this,"since"),l(this,"bitType"),l(this,"title"),l(this,"bitGroups"),l(this,"inheritedBitTypes"),l(this,"inheritedBitTypesSet"),l(this,"textFormatDefault"),l(this,"tags",{}),l(this,"cardSet"),l(this,"quizBit"),l(this,"deprecated"),l(this,"bodyAllowed"),l(this,"bodyRequired"),l(this,"footerAllowed"),l(this,"footerRequired"),l(this,"resourceAttachmentAllowed"),l(this,"rootExampleType"),l(this,"comboResourceConfigKey");const{since:t,bitType:r,inheritedBitTypes:i,textFormatDefault:o,tags:a,cardSet:s,quizBit:n,deprecated:c,bodyAllowed:p,bodyRequired:u,footerAllowed:d,footerRequired:m,resourceAttachmentAllowed:h,rootExampleType:b,comboResourceConfigKey:g,title:y,bitGroups:f}=e;this.since=t,this.bitType=r,this.title=y,this.bitGroups=f,this.inheritedBitTypes=i,this.inheritedBitTypesSet=new Set(i),this.textFormatDefault=o,this.tags=a,this.cardSet=s,this.quizBit=n,this.deprecated=c,this.bodyAllowed=p??!0,this.bodyRequired=u,this.footerAllowed=d??!0,this.footerRequired=m,this.resourceAttachmentAllowed=h??!0,this.rootExampleType=b,this.comboResourceConfigKey=g}toString(e){const t=Object.assign({},e);let r=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(r+="\n\n[Inheritance]",r+=`\n${this.inheritedBitTypes.join(" => ")}`),r+=`\n\n[Default text format]\n${this.textFormatDefault}`;const i=[];null!=this.since&&i.push(`since=${this.since}`),null!=this.deprecated&&i.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),this.footerAllowed&&i.push("footerAllowed"),this.footerRequired&&i.push("footerRequired"),this.resourceAttachmentAllowed&&i.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&i.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceConfigKey&&i.push(`comboResourceConfigKey=${this.comboResourceConfigKey}`),r+=`\n\n[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===m||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}},he=r(722),be=(r(722),r(722),{property_accessibilityGroupTag:"@accessibilityGroupTag",property_accessibilityTag:"@accessibilityTag",property_action:"@action",property_activityType:"@activityType",property_additionalSolutions:"@additionalSolutions",property_advertisingClickUrl:"@advertisingClickUrl",property_ageRange:"@ageRange",property_aiGenerated:"@aiGenerated",property_allowedBit:"@allowedBit",property_allowPrint:"@allowPrint",property_allowSubtitles:"@allowSubtitles",property_alt:"@alt",property_altLangTag:"@altLangTag",property_analyticsTag:"@analyticsTag",property_author:"@author",property_authorFullName:"@authorFullName",property_authorJobTitle:"@authorJobTitle",property_authorPseudonym:"@authorPseudonym",property_authorTitle:"@authorTitle",property_autoplay:"@autoplay",property_availableClassifications:"@availableClassifications",property_brandColor:"@brandColor",property_brandColorName:"@brandColorName",property_backgroundImage:"@backgroundImage",property_blockId:"@blockId",property_book:"@book",property_bookAlias:"@bookAlias",property_bookDiff:"@bookDiff",property_bot:"@bot",property_bubbleTag:"@bubbleTag",property_extractorTag:"@extractorTag",property_extractorInternal:"@extractorInternal",property_bitFingerprint:"@bitFingerprint",property_buttonCaption:"@buttonCaption",property_callToActionUrl:"@callToActionUrl",property_caption:"@caption",property_categoryTag:"@categoryTag",property_chatWithBook:"@chatWithBook",property_chatWithBookBrainKey:"@chatWithBookBrainKey",property_currency:"@currency",property_bookIsbn:"@bookIsbn",property_bookAuthor:"@bookAuthor",property_bookType:"@bookType",property_bookBindingType:"@bookBindingType",property_bookNumberOfPages:"@bookNumberOfPages",property_bookRating:"@bookRating",property_bookSeriesTitle:"@bookSeriesTitle",property_bookSeriesId:"@bookSeriesId",property_bookSeriesNumber:"@bookSeriesNumber",property_bookLanguage:"@bookLanguage",property_bookPublishingDate:"@bookPublishingDate",property_bookPublisher:"@bookPublisher",property_bookTranslator:"@bookTranslator",property_bookOriginalTitle:"@bookOriginalTitle",property_gmbExternalShop:"@gmbExternalShop",property_gmbExternalShopItems:"@gmbExternalShopItems",property_citationStyle:"@citationStyle",property_classification:"@classification",property_codeLineNumbers:"@codeLineNumbers",property_codeMinimap:"@codeMinimap",property_color:"@color",property_colorTag:"@colorTag",property_computerLanguage:"@computerLanguage",property_content2Buy:"@content2Buy",property_listPrice:"@listPrice",property_customerProductId:"@customerProductId",property_customerProductShopLink:"@customerProductShopLink",property_copyright:"@copyright",property_coverColor:"@coverColor",property_coverImage:"@coverImage",property_customerExternalId:"@customerExternalId",property_customerId:"@customerId",property_date:"@date",property_dateEnd:"@dateEnd",property_decimalPlaces:"@decimalPlaces",property_deeplink:"@deeplink",property_displayName:"@displayName",property_diffContext:"@diffContext",property_diffOp:"@diffOp",property_diffRef:"@diffRef",property_diffTime:"@diffTime",property_diffTo:"@diffTo",property_disableCalculation:"@disableCalculation",property_disableFeedback:"@disableFeedback",property_duration:"@duration",property_isEditable:"@isEditable",property_needsValidation:"@needsValidation",property_validationDate:"@validationDate",property_emphasis:"@emphasis",property_example:"@example",property_externalId:"@externalId",property_externalLink:"@externalLink",property_externalLinkText:"@externalLinkText",property_feedbackEngine:"@feedbackEngine",property_feedbackType:"@feedbackType",property_userFeedbackTranslationUrl:"@userFeedbackTranslationUrl",property_userFeedbackContentUrl:"@userFeedbackContentUrl",property_flashcardSet:"@flashcardSet",property_focusX:"@focusX",property_focusY:"@focusY",property_format:"@format",property_formula:"@formula",property_fullName:"@fullName",property_groupTag:"@groupTag",property_gUri:"@gUri",property_handInAcceptFileType:"@handInAcceptFileType",property_handInInstruction:"@handInInstruction",property_handInRequirement:"@handInRequirement",property_hasBookNavigation:"@hasBookNavigation",property_hasMarkAsDone:"@hasMarkAsDone",property_height:"@height",property_icon:"@icon",property_iconTag:"@iconTag",property_id:"@id",property_iframeSrc:"@iframeSrc",property_iframeName:"@iframeName",property_imageFirst:"@imageFirst",property_imageSource:"@imageSource",property_index:"@index",property_internalComment:"@internalComment",property_internalPrintPdf:"@internalPrintPdf",property_hasPrintRestriction:"@hasPrintRestriction",property_enforceUpdateOverUserInput:"@enforceUpdateOverUserInput",property_extractorExtractionTimestamp:"@extractorExtractionTimestamp",property_isCaseSensitive:"@isCaseSensitive",property_isCollapsible:"@isCollapsible",property_isInfoOnly:"@isInfoOnly",property_isPublic:"@isPublic",property_isTemplate:"@isTemplate",property_isTemplateStripTheme:"@isTemplateStripTheme",property_isTracked:"@isTracked",property_jobTitle:"@jobTitle",property_jupyterExecutionCount:"@jupyterExecutionCount",property_jupyterId:"@jupyterId",property_kind:"@kind",property_label:"@label",property_labelFalse:"@labelFalse",property_labelTrue:"@labelTrue",property_lang:"@lang",property_language:"@language",property_layer:"@layer",property_layerRole:"@layerRole",property_levelACTFL:"@levelACTFL",property_levelCEFR:"@levelCEFR",property_levelCEFRp:"@levelCEFRp",property_levelILR:"@levelILR",property_license:"@license",property_list:"@list",property_listItemIndent:"@listItemIndent",property_location:"@location",property_machineTranslated:"@machineTranslated",property_translationOf:"@translationOf",property_translationOfBook:"@translationOfBook",property_spansPageBreak:"@spansPageBreak",property_mailingList:"@mailingList",property_mark:"@mark",property_maxCreatedBits:"@maxCreatedBits",property_maxDisplayLevel:"@maxDisplayLevel",property_maxTocChapterLevel:"@maxTocChapterLevel",property_mockupId:"@mockupId",property_mute:"@mute",property_padletId:"@padletId",property_page:"@page",property_printParentChapterLevel:"@printParentChapterLevel",property_printOnRequestCustomerId:"@printOnRequestCustomerId",property_printOnRequestProductId:"@printOnRequestProductId",property_pageNo:"@pageNo",property_partialAnswer:"@partialAnswer",property_partner:"@partner",property_path:"@path",property_platformBackgroundColor:"@platformBackgroundColor",property_platformBorderColor:"@platformBorderColor",property_platformBrandTarget:"@platformBrandTarget",property_platformButtonBackgroundColor:"@platformButtonBackgroundColor",property_platformButtonPrimaryColor:"@platformButtonPrimaryColor",property_platformMessageBackgroundColor:"@platformMessageBackgroundColor",property_platformName:"@platformName",property_platformPlaceholderColor:"@platformPlaceholderColor",property_platformPrimaryColor:"@platformPrimaryColor",property_platformScrollbarColor:"@platformScrollbarColor",property_platformSecondaryColor:"@platformSecondaryColor",property_platformSelectionColor:"@platformSelectionColor",property_platformSelectionTextColor:"@platformSelectionTextColor",property_platformBaseLayerColor:"@platformBaseLayerColor",property_platformMargin:"@platformMargin",property_platformBorderRadius:"@platformBorderRadius",property_platformSelectionBorderRadius:"@platformSelectionBorderRadius",property_platformLogoMaxHeight:"@platformLogoMaxHeight",property_platformNeedsShadow:"@platformNeedsShadow",property_platformSeparatorColor:"@platformSeparatorColor",property_platformTextSelectionColor:"@platformTextSelectionColor",property_person:"@person",property_pointerLeft:"@pointerLeft",property_pointerTop:"@pointerTop",property_posterImage:"@posterImage",property_processHandIn:"@processHandIn",property_processHandInLocation:"@processHandInLocation",property_product:"@product",property_productFolder:"@productFolder",property_productId:"@productId",property_productVideo:"@productVideo",property_progress:"@progress",property_pseudonym:"@pseudonym",property_publications:"@publications",property_publisher:"@publisher",property_publisherName:"@publisherName",property_quizCountItems:"@quizCountItems",property_quizStrikethroughSolutions:"@quizStrikethroughSolutions",property_quotedPerson:"@quotedPerson",property_ratingLevelEnd:"@ratingLevelEnd",property_ratingLevelSelected:"@ratingLevelSelected",property_ratingLevelStart:"@ratingLevelStart",property_reaction:"@reaction",property_reasonableNumOfChars:"@reasonableNumOfChars",property_reductionTag:"@reductionTag",property_refAuthor:"@refAuthor",property_refBookTitle:"@refBookTitle",property_reference:"@reference",property_refPublicationYear:"@refPublicationYear",property_refPublisher:"@refPublisher",property_relatedBook:"@relatedBook",property_releaseDate:"@releaseDate",property_releaseKind:"@releaseKind",property_releaseVersion:"@releaseVersion",property_reportTag:"@reportTag",property_resolved:"@resolved",property_resolvedBy:"@resolvedBy",property_resolvedDate:"@resolvedDate",property_revealSolutions:"@revealSolutions",property_reviewTag:"@reviewTag",property_reviewerTag:"@reviewerTag",property_rightsPolicy:"@rightsPolicy",property_sampleSolution:"@sampleSolution",property_scormSource:"@scormSource",property_search:"@search",property_searchIndex:"@searchIndex",property_selected:"@selected",property_servings:"@servings",property_showInIndex:"@showInIndex",property_showSubtitles:"@showSubtitles",property_siteName:"@siteName",property_size:"@size",property_slug:"@slug",property_sourceBB:"@sourceBB",property_sourceDocument:"@sourceDocument",property_sourceRL:"@sourceRL",property_spaceId:"@spaceId",property_src1x:"@src1x",property_src2x:"@src2x",property_src3x:"@src3x",property_src4x:"@src4x",property_srcAlt:"@srcAlt",property_stripePricingTableId:"@stripePricingTableId",property_stripePricingTableDescriptiveName:"@stripePricingTableDescriptiveName",property_stripePublishableKey:"@stripePublishableKey",property_subject:"@subject",property_subtype:"@subtype",property_tableAutoWidth:"@tableAutoWidth",property_tableColWidth:"@tableColWidth",property_tableColumnMinWidth:"@tableColumnMinWidth",property_tableFixedHeader:"@tableFixedHeader",property_tableHeaderWhitespaceNoWrap:"@tableHeaderWhitespaceNoWrap",property_tableHeight:"@tableHeight",property_tablePagination:"@tablePagination",property_tablePaginationLimit:"@tablePaginationLimit",property_tableResizableColumns:"@tableResizableColumns",property_tableSearch:"@tableSearch",property_tableSort:"@tableSort",property_tableWhitespaceNoWrap:"@tableWhitespaceNoWrap",property_tableCellType:"@tableCellType",property_tableRowSpan:"@tableRowSpan",property_tableColSpan:"@tableColSpan",property_tableScope:"@tableScope",property_tag:"@tag",property_target:"@target",property_technicalTerm:"@technicalTerm",property_textReference:"@textReference",property_theme:"@theme",property_rtl:"@rtl",property_thumbImage:"@thumbImage",property_title:"@title",property_toc:"@toc",property_tocContent:"@tocContent",property_tocResource:"@tocResource",property_topicTag:"@topicTag",property_trim:"@trim",property_unit:"@unit",property_unitAbbr:"@unitAbbr",property_unitAbbrPlural:"@unitAbbrPlural",property_unitPlural:"@unitPlural",property_vendorDashboardId:"@vendorDashboardId",property_vendorSurveyId:"@vendorSurveyId",property_vendorUrl:"@vendorUrl",property_videoCallLink:"@videoCallLink",property_width:"@width",property_x:"@x",property_y:"@y",property_zoomDisabled:"@zoomDisabled"}),ge=be,ye=(r(722),{_unknown:"_unknown",...k,resource_image:"&image",resource_imageResponsive:"&imageResponsive",resource_imagePortrait:"&imagePortrait",resource_imageLandscape:"&imageLandscape",resource_imageEmbed:"&imageEmbed",resource_imageLink:"&imageLink",resource_audio:"&audio",resource_audioEmbed:"&audioEmbed",resource_audioLink:"&audioLink",resource_video:"&video",resource_videoEmbed:"&videoEmbed",resource_videoLink:"&videoLink",resource_stillImageFilm:"&stillImageFilm",resource_stillImageFilmEmbed:"&stillImageFilmEmbed",resource_stillImageFilmLink:"&stillImageFilmLink",resource_article:"&article",resource_articleEmbed:"&articleEmbed",resource_articleLink:"&articleLink",resource_document:"&document",resource_documentEmbed:"&documentEmbed",resource_documentLink:"&documentLink",resource_documentDownload:"&documentDownload",resource_appLink:"&appLink",resource_websiteLink:"&websiteLink",resource_icon:"&icon",resource_platformBackgroundImage:"&platformBackgroundImage",resource_platformIcon:"&platformIcon",resource_platformLogo:"&platformLogo",resource_backgroundWallpaper:"&backgroundWallpaper",resource_imagePlaceholder:"&imagePlaceholder",resource_previewImage:"&previewImage",resource_previewVideo:"&previewVideo",resource_coverImage:"&coverImage",resource_backgroundImage:"&backgroundImage",...be,group_accessibilityDecorative:"group_accessibilityDecorative",group_standardAllBits:"group_standardAllBits",group_standardItemLead:"group_standardItemLead",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardInstructionHint:"group_standardInstructionHint",group_standardTags:"group_standardTags",group_standardTagsNoItemLead:"group_standardTagsNoItemLead",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_trueFalseInlineHighlight:"group_trueFalseInlineHighlight",group_trueFalseInlineSelect:"group_trueFalseInlineSelect",group_trueFalseResponses:"group_trueFalseResponses",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_advertisingCommon:"group_advertisingCommon",group_platformStylesCommon:"group_platformStylesCommon",group_quizCommon:"group_quizCommon",group_backgroundWallpaper:"group_backgroundWallpaper",group_imageNoZoom:"group_imageNoZoom",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceImageCommonNoZoom:"group_resourceImageCommonNoZoom",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageNoZoom:"group_resourceImageNoZoom",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",group_previewImages:"group_previewImages",group_previewVideos:"group_previewVideos"});function fe(e){return e?e.startsWith("@")?ie:e.startsWith("&")?oe:e.startsWith("group_")?ae:re:te}function ke(e){return e.replace(/^@/,"")}function xe(e){return(0,he.Enum)(y).fromKey(e.replace(/^&/,""))}var ve=class{constructor(e,t,r,i){l(this,"tags"),l(this,"resourceAttachmentAllowed"),l(this,"resourceAttachmentConfigKey"),l(this,"comboResourceConfigKeysMap"),this.tags=e,this.resourceAttachmentAllowed=t??!1,this.resourceAttachmentConfigKey=r,this.comboResourceConfigKeysMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.configKey,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.configKey,t.maxCount);return e}},Te=(r(722),{app:"app",article:"article",audio:"audio",document:"document",image:"image",stillImageFilm:"still-image-film",video:"video",website:"website"}),_e=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 r=e;for(const e of t){if(null==r)return;r=r[e]}return r}setViaPath(e,t,r,i){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 r=t[e];if(null==o[r]){if(!i)return!1;o[r]={}}o=o[r]}return o[t[t.length-1]]=r,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const r=e,i=t.shift();if(null==i)return r;const o=r[i];return o?Array.isArray(o)?o.flatMap(e=>this.flatMapPath(e,t.slice())):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const r=e,i=Object.assign({},r);for(const e of Object.keys(r))delete r[e];for(const e of t)Object.prototype.hasOwnProperty.call(i,e)&&(r[e]=i[e])}removeUndefinedProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||null==i&&delete r[e]}removeFalseProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||!1===i&&delete r[e]}removeEmptyStringProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||""===i&&delete r[e]}removeEmptyArrayProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||Array.isArray(i)&&0===i.length&&delete r[e]}removeEmptyObjectProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||this.isObject(i)&&0===Object.keys(i).length&&delete r[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 r=e;if(null==r[t])return;let i=r[t];if(Array.isArray(i)){if(0===i.length)return;i=i[i.length-1]}return i}deepMerge(...e){return function e(...t){function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(t,i){for(const[o,a]of Object.entries(i)){const i=r(a);void 0!==t[o]&&r(t[o])===i&&["array","object"].includes(i)?t[o]=e(t[o],a):t[o]=structuredClone(a)}}let o=structuredClone(t.shift());for(const e of t){const t=r(e);r(o)===t?"array"===t?o=[...o,...structuredClone(e)]:"object"===t?i(o,e):o=e:o=structuredClone(e)}return o}(...e)}},Ce=r(722),we={[P]:{jsonKey:"cards",exportJsonKey:{cards:"$"},sides:[{name:"question",variants:[{jsonKey:"question.text",exportJsonKey:[{"@absent":{question:{}}},{question:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"question.icon|resource(type=image, key=image)",exportJsonKey:{question:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard question.",format:T,nullable:!0}]}]},{name:"answer",variants:[{jsonKey:"answer.text",exportJsonKey:[{"@absent":{answer:{}}},{answer:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"answer.icon|resource(type=image, key=image)",exportJsonKey:{answer:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard answer.",format:T,nullable:!0}]},{jsonKey:"alternativeAnswers[].text",exportJsonKey:{alternativeAnswers:[{text:"$"}]},tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"alternativeAnswers[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeAnswers:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[I]:{jsonKey:"cards",exportJsonKey:{cards:"$"},sections:{default:{jsonKey:"cards",exportJsonKey:{cards:"$"},isDefault:!0,maxCount:1}},sides:[{name:"question",variants:[{jsonKey:"question.text",exportJsonKey:[{"@absent":{question:{}}},{question:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"question.icon|resource(type=image, key=image)",exportJsonKey:{question:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard question.",format:T,nullable:!0}]}]},{name:"answer",variants:[{jsonKey:"answer.text",exportJsonKey:[{"@absent":{answer:{}}},{answer:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"answer.icon|resource(type=image, key=image)",exportJsonKey:{answer:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard answer.",format:T,nullable:!0}]},{jsonKey:"alternativeAnswers[].text",exportJsonKey:{alternativeAnswers:[{text:"$"}]},tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"alternativeAnswers[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeAnswers:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[E]:{jsonKey:"definitions",exportJsonKey:{definitions:"$"},mappingKeys:{"xml-niso-iec":[{"@el":"def-item","@children":"$"},{"@el":"tbx:langSet","@children":"$"}]},sides:[{name:"term",mappingKeys:{"xml-niso-iec":[{"@el":"term","@text":"$"},{"@el":"tbx:tig","@children":{"@el":"tbx:term","@text":"$\n"}}]},variants:[{jsonKey:"term.text",exportJsonKey:[{"@absent":{term:{}}},{term:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",format:v,jsonKey:"term.icon|resource(type=image, key=image)",exportJsonKey:{term:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition term.",format:T,nullable:!0}]}]},{name:"definition",mappingKeys:{"xml-niso-iec":[{"@el":"def","@children":"$"},{"@el":"tbx:subjectField","@text":"⟨$⟩ "},{"@el":"tbx:definition","@children":"$"},{"@el":"tbx:example","@children":"BEISPIEL $"},{"@el":"tbx:note","@children":"Anmerkung zu Begriff: $"},{"@el":"tbx:source","@text":"[QUELLE: $]"}]},variants:[{jsonKey:"definition.text",exportJsonKey:[{"@absent":{definition:{}}},{definition:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"definition.icon|resource(type=image, key=image)",exportJsonKey:{definition:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition.",format:T,nullable:!0}]},{jsonKey:"alternativeDefinitions[].text",exportJsonKey:{alternativeDefinitions:[{text:"$"}]},tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the definition."},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"alternativeDefinitions[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeDefinitions:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[L]:{jsonKey:"definitions",exportJsonKey:{definitions:"$"},sides:[{name:"term",variants:[{jsonKey:"term.text",exportJsonKey:[{"@absent":{term:{}}},{term:{text:"$"}}],format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",format:v,jsonKey:"term.icon|resource(type=image, key=image)",exportJsonKey:{term:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition term.",format:T,nullable:!0}]}]},{name:"definition",variants:[{jsonKey:"definition.text",exportJsonKey:[{"@absent":{definition:{}}},{definition:{text:"$"}}],format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"definition.icon|resource(type=image, key=image)",exportJsonKey:{definition:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition.",format:T,nullable:!0}]},{jsonKey:"alternativeDefinitions[].text",exportJsonKey:{alternativeDefinitions:[{text:"$"}]},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the definition."},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"alternativeDefinitions[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeDefinitions:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[$]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the match pair."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{isExample:!0,example:"$cascade","@bit":{isExample:!0}}},{"@absent":{isExample:!0}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker / value on the match pair.",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the match pair.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.property_isCaseSensitive,exportJsonKey:[{predicates:["@absent",{"@variantLacksTag":"@isCaseSensitive"}],rule:{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"Property to indicate if the match is case sensitive.",format:C},{key:ye.resource_audio,description:"Audio resource for the match pair.",jsonKey:"keyAudio",exportJsonKey:{keyAudio:"$"}},{key:ye.resource_image,description:"Image resource for the match pair.",jsonKey:"keyImage",exportJsonKey:{keyImage:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:S.plainText,tags:[{key:ye.group_standardTagsNoItemLead,description:"Standard tags for the match pair (values side, no item/lead)."},{key:ye.property_example,exportJsonKey:[{predicates:["@keyonly"],maxEmits:1,rule:{isExample:!0,example:"$parent","@bit":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{isExample:!0,example:"$cascade","@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent","@bit":{isExample:!0}}},{predicates:[],maxEmits:1,rule:{isExample:!0,example:"$","@bit":{isExample:!0}}}],description:"Example marker / value on the match pair (values side).",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the match pair.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.property_isCaseSensitive,exportJsonKey:[{predicates:["@absent",{"@variantLacksTag":"@isCaseSensitive"}],rule:{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"Property to indicate if the match is case sensitive.",format:C}],repeatCount:m}]}]},[O]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the audio match pair."},{key:ye.tag_title,description:"Title of the audio match pair.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.resource_audio,description:"Audio resource for the match pair.",jsonKey:"keyAudio",exportJsonKey:{keyAudio:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:S.plainText,tags:[{key:ye.group_standardTagsNoItemLead,description:"Standard tags for the audio match pair (values side, no item/lead)."},{key:ye.tag_title,description:"Title of the audio match pair.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.resource_audio,description:"Audio resource for the match pair."}],repeatCount:m}]}]},[J]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the image match pair."},{key:ye.tag_title,description:"Title of the image match pair.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.resource_image,description:"Image resource for the match pair.",jsonKey:"keyImage",exportJsonKey:{keyImage:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:S.plainText,tags:[{key:ye.group_standardTagsNoItemLead,description:"Standard tags for the image match pair (values side, no item/lead)."},{key:ye.tag_title,description:"Title of the image match pair.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.resource_image,description:"Image resource for the match pair."}],repeatCount:m}]}]},[D]:{jsonKey:"matrix",exportJsonKey:{matrix:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}],description:"Example text for the match matrix.",format:v,nullable:!0},{key:ye.tag_title,description:"Title of the match matrix.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"Property to indicate if the match is case sensitive.",format:C}]}]},{name:"cell",repeat:!0,variants:[{jsonKey:"cells[{s}].values[]",exportJsonKey:[{predicates:["@absent",{"@variantHasTag":"#"}],rule:{"@bit":{heading:{forValues:[""]}}}},{cells:{$s:{values:["$"]}}}],format:S.plainText,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{cells:{$s:{isExample:!0,example:"$parent"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{cells:{$s:{isExample:!0,example:"$cascade"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{cells:{$s:{isExample:!0,example:"$parent"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{cells:{$s:{isExample:!0,example:"$"}},"@bit":{isExample:!0},"@card":{isExample:!0}}],description:"Example text for the match matrix.",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the match matrix.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:[{"@keyonly":{"@bit":{heading:{forValues:[""]}}}},{"@bit":{heading:{forValues:["$"]}}}]},{key:ye.property_isCaseSensitive,exportJsonKey:[{"@absent":{cells:{$s:{isCaseSensitive:"$ancestor"}}}},{cells:{$s:{isCaseSensitive:"$"}}}],description:"Property to indicate if the match is case sensitive.",format:C}],repeatCount:m}]}]},[V]:{jsonKey:"statements",exportJsonKey:{statements:"$"},sides:[{name:"statement",variants:[{jsonKey:"statement",exportJsonKey:{statement:"$"},tags:[{key:ye.tag_true,description:"Tag for true statements.",jsonKey:"statement|set(isCorrect=true)",exportJsonKey:{statement:"$",isCorrect:!0},maxCount:1},{key:ye.tag_false,description:"Tag for false statements.",jsonKey:"statement|set(isCorrect=false)",exportJsonKey:{statement:"$",isCorrect:!1},maxCount:1},{key:ye.group_standardTags,description:"Standard tags for the statement."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker on the statement. Bare `[@example]` emits the boolean marker; valued `[@example:true|false]` emits the literal value. Cascade from bit-header fills `example` with the entry’s own `isCorrect`.",format:C,nullable:!0}],bodyAllowed:!1}]}]},[R]:{jsonKey:"quizzes",exportJsonKey:{quizzes:"$"},sides:[{name:"choices",variants:[{jsonKey:null,tags:[{key:ye.group_trueFalse,description:"Group for true/false questions."},{key:ye.group_standardTags,description:"Standard tags for the quiz."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0}}],description:"Example marker on the quiz choice (entry-local only; cascade handled by group_trueFalse chain-children).",format:C,nullable:!0}],bodyAllowed:!1}]}]},[G]:{jsonKey:"quizzes",exportJsonKey:{quizzes:"$"},sides:[{name:"responses",variants:[{jsonKey:null,tags:[{key:ye.group_trueFalseResponses,description:"Group for true/false questions."},{key:ye.group_standardTags,description:"Standard tags for the quiz."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0}}],description:"Example marker on the quiz response; cascade from bit-header fills `example` with the entry’s own `isCorrect`.",format:C,nullable:!0}],bodyAllowed:!1}]}]},[F]:{jsonKey:"feedbacks",exportJsonKey:{feedbacks:"$"},sides:[{name:"choices",variants:[{jsonKey:null,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.tag_true,exportJsonKey:{choices:[{choice:"$",requireReason:!0}]},description:"Reason-required choice for feedback (`[+]`).",maxCount:m,format:v,chain:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"Per-choice example marker for feedback `[+]`.",format:C,maxCount:1,nullable:!0},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint chained onto the feedback choice."}]},{key:ye.tag_false,exportJsonKey:{choices:[{choice:"$",requireReason:!1}]},description:"Reason-not-required choice for feedback (`[-]`).",maxCount:m,format:v,chain:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"Per-choice example marker for feedback `[-]`.",format:C,maxCount:1,nullable:!0},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint chained onto the feedback choice."}]},{key:ye.group_trueFalse,description:"Group for true/false feedback."},{key:ye.tag_title,description:"Title of the feedback.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}}],bodyAllowed:!1}]},{name:"reason",variants:[{jsonKey:"reason.text",exportJsonKey:{reason:{text:"$"}},format:S.plainText,tags:[{key:ye.tag_instruction,exportJsonKey:{reason:{instruction:"$"}},description:"Instruction for the feedback reason.",format:T},{key:ye.property_reasonableNumOfChars,exportJsonKey:[{"@absent":{reason:{reasonableNumOfChars:"$ancestor"}}},{reason:{reasonableNumOfChars:"$"}}],description:"Property for reasonable number of characters.",format:_},{key:ye.property_example,exportJsonKey:[{"@keyonly":{reason:{isExample:!0,example:[{type:"paragraph",content:[{text:"true",type:"text"}]}]},isExample:!0,example:!0,"@bit":{isExample:!0}}},{reason:{isExample:!0,example:"$"},isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the feedback reason (entry-local only; no bit-header cascade).",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the feedback.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}}],bodyAllowed:!0}]}]},[K]:{jsonKey:"questions",exportJsonKey:{questions:"$"},sides:[{name:"question",variants:[{jsonKey:"question",exportJsonKey:{question:"$"},tags:[{key:ye.property_reasonableNumOfChars,exportJsonKey:[{"@absent":{reasonableNumOfChars:"$ancestor"}},{reasonableNumOfChars:"$"}],description:"Property for reasonable number of characters.",format:_},{exportJsonKey:{sampleSolution:"$"},key:ye.tag_sampleSolution,description:"Sample solution for the question.",format:v},{key:ye.property_sampleSolution,description:"Property for sample solution text.",format:v},{key:ye.property_additionalSolutions,description:"Property for additional solutions.",format:v,maxCount:m},{key:ye.property_partialAnswer,description:"Property for partial answer text.",format:v},{key:ye.group_standardTags,description:"Standard tags for the question."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.sampleSolution","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the question (entry-local only; no bit-header cascade).",format:T,nullable:!0}]}]}]},[N]:{jsonKey:null,sides:[{name:"element",repeat:!0,variants:[{jsonKey:"elements[]",exportJsonKey:{elements:["$"]},tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the element (entry-local only; no bit-header cascade).",format:v,nullable:!0}],repeatCount:m}]}]},[z]:{jsonKey:null,exportJsonKey:null,htmlKey:{"@el":"table","@children":"$"},sections:{"table-header":{jsonKey:"table.columns",exportJsonKey:[{predicates:[{"@cardIndex":0},{"@variantHasTag":"#"}],rule:{"@bit":{table:{columns:"$"}}}},{"@cardIndex=0":{"@bit":{table:{columns:"$"}}}},{"@bit":{table:{data:["$"]}}}],htmlKey:{"@el":"thead","@children":{"@el":"tr","@children":"$"}},sideHtmlKey:{"@el":"th","@children":"$"}},"table-body":{jsonKey:"table.data",exportJsonKey:{"@bit":{table:{data:"$"}}},htmlKey:{"@el":"tbody","@children":{"@el":"tr","@children":"$"}},isDefault:!0},"table-footer":{jsonKey:"table.data",exportJsonKey:{"@bit":{table:{data:"$"}}},htmlKey:{"@el":"tfoot","@children":{"@el":"tr","@children":"$"}}}},sides:[{name:"cell",repeat:!0,htmlKey:{"@el":"td","@children":"$"},variants:[{jsonKey:null,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.tag_title,jsonKey:"^table.columns[]",exportJsonKey:{"@bit":{table:{columns:["$"]}}},description:"Title of the table."},{key:ye.property_tableCellType,htmlKey:[{"@value=th":{"@el":"th"}},{"@absent":{"@el":"td"}}],description:"Table cell type (th/td).",format:v},{key:ye.property_tableRowSpan,htmlKey:{"@el":{"@attr":{rowspan:"$"}}},description:"Number of rows the cell spans.",format:_},{key:ye.property_tableColSpan,htmlKey:{"@el":{"@attr":{colspan:"$"}}},description:"Number of columns the cell spans.",format:_},{key:ye.property_tableScope,htmlKey:{"@el":{"@attr":{scope:"$"}}},description:"Scope attribute for header cells.",format:v},{key:ye.property_tableColWidth,jsonKey:"^table.columnWidths[{s}]",exportJsonKey:{"@bit":{table:{columnWidths:{$s:"$"}}}},htmlKey:{"@el":{"@attr":{width:"$"}}},description:"Width for the column.",format:_}],repeatCount:m}]}]},[q]:{jsonKey:null,htmlKey:{"@el":"table","@children":"$"},sections:{"table-header":{jsonKey:"table.header.rows",exportJsonKey:[{predicates:[{"@cardIndex":0},{"@variantHasTag":"#"}],rule:{table:{header:{rows:["$"]}}}},{table:{header:{rows:["$"]}}}],htmlKey:{"@el":"thead","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"thead","@children":{"@el":"tr","@children":"$"}}},sideJsonKey:"cells[{s}]|set(title=true)",sideExportJsonKey:{cells:{$s:{title:!0,$:"$"}}},sideHtmlKey:{"@el":"th","@children":"$"}},"table-body":{jsonKey:"table.body.rows",exportJsonKey:{table:{body:{rows:"$"}}},htmlKey:{"@el":"tbody","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"tbody","@children":{"@el":"tr","@children":"$"}}},isDefault:!0},"table-footer":{jsonKey:"table.footer.rows",exportJsonKey:{table:{footer:{rows:"$"}}},htmlKey:{"@el":"tfoot","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"table-wrap-foot","@children":"$"}},sideJsonKey:"cells[{s}]|set(title=true)",sideExportJsonKey:{cells:{$s:{title:!0,$:"$"}}},sideHtmlKey:{"@el":"th","@children":"$"}}},sides:[{name:"cell",repeat:!0,jsonKey:"cells[{s}]",exportJsonKey:{cells:{$s:"$"}},htmlKey:{"@el":"td","@children":"$"},mappingKeys:{"xml-niso-iec":{"@el":"td","@children":"$"}},variants:[{jsonKey:"content",exportJsonKey:{content:"$"},tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.tag_title,jsonKey:"content",exportJsonKey:{content:"$"},description:"Title text of the table cell (header rows).",mappingKeys:{"xml-niso-iec":{"@el":"th","@children":"$"}}},{key:ye.property_tableCellType,jsonKey:"title|bool(th)",exportJsonKey:[{"@value=th":{title:!0}}],htmlKey:[{"@value=th":{"@el":"th"}},{"@absent":{"@el":"td"}}],description:"Table cell type (th/td).",format:v},{key:ye.property_tableRowSpan,jsonKey:"rowspan",exportJsonKey:{rowspan:"$"},htmlKey:{"@el":{"@attr":{rowspan:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":{"@attr":{rowspan:"$"}}}},description:"Number of rows the cell spans.",format:_},{key:ye.property_tableColSpan,jsonKey:"colspan",exportJsonKey:{colspan:"$"},htmlKey:{"@el":{"@attr":{colspan:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":{"@attr":{colspan:"$"}}}},description:"Number of columns the cell spans.",format:_},{key:ye.property_tableScope,jsonKey:"scope",exportJsonKey:{scope:"$"},htmlKey:{"@el":{"@attr":{scope:"$"}}},description:"Scope attribute for header cells.",format:v},{key:ye.property_tableColWidth,jsonKey:"colwidth",exportJsonKey:{colwidth:"$"},htmlKey:{"@el":{"@attr":{width:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"col","@attr":{width:"$"}}},description:"Width for the column.",format:_}],repeatCount:m}]}]},[j]:{jsonKey:"pronunciationTable.data",exportJsonKey:{pronunciationTable:{data:"$"}},sides:[{name:"cell",repeat:!0,variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the pronunciation table."},{key:ye.resource_audio,description:"Audio resource for the pronunciation table.",jsonKey:"audio",exportJsonKey:{audio:{type:"audio",audio:{src:"$"}}}}],repeatCount:m}]}]},[M]:{jsonKey:"responses",exportJsonKey:{responses:"$"},sides:[{name:"response",variants:[{jsonKey:"feedback",exportJsonKey:{feedback:"$"},format:S.plainText,tags:[{key:ye.property_reaction,description:"Reaction to the bot action.",format:v},{key:ye.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},format:v,description:"The item for the bit",chain:[{key:ye.tag_item,jsonKey:"lead",exportJsonKey:{lead:"$"},description:"The lead for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"pageNumber",exportJsonKey:{pageNumber:"$"},description:"The page number for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"marginNumber",exportJsonKey:{marginNumber:"$"},description:"The margin number for the bit",maxCount:1}]}]}]},{key:ye.tag_instruction,description:"The response label for the bot action.",jsonKey:"response",exportJsonKey:{response:"$"},format:v},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the bot action response (entry-local only; no bit-header cascade).",format:v,nullable:!0}]}]}]},[W]:{jsonKey:"listItems",exportJsonKey:{listItems:"$"},sides:[{name:"content",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardTags,description:"Standard tags for cloze items."},{key:ye.group_gap,description:"Group for gap tags in cloze items."}]}]}]},[H]:{jsonKey:"listItems",exportJsonKey:{listItems:"$"},sides:[{name:"item",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardTags,description:"Standard tags for example bits."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the example bit."}]}]}]},[U]:{jsonKey:"sections",exportJsonKey:{sections:"$"},sides:[{name:"item",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardTags,description:"Standard tags for page-footer section bits."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the page-footer section."}]}]}]},[Y]:{jsonKey:"ingredients",exportJsonKey:{ingredients:"$"},sides:[{name:"ingredient",variants:[{jsonKey:"ingredient",exportJsonKey:{ingredient:"$"},tags:[{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the ingredient."},{key:ye.tag_true,description:"Checked state for the ingredient.",jsonKey:"|set(checked=true)",exportJsonKey:{checked:!0,$:"$"},maxCount:1},{key:ye.tag_false,description:"Unchecked state for the ingredient.",jsonKey:"|set(checked=false)",exportJsonKey:{checked:!1,$:"$"},maxCount:1},{key:ye.group_standardItemLead,description:"Item, lead, page number, and margin number for the ingredient."},{key:ye.tag_instruction,description:"The quantity of the ingredient.",jsonKey:"quantity",exportJsonKey:{quantity:"$"},format:_},{exportJsonKey:{hint:"$"},key:ye.tag_hint,description:"The hint for the ingredient."},{key:ye.property_unit,description:"Unit of measurement for the ingredient (singular).",format:v},{key:ye.property_unitPlural,description:"Unit of measurement for the ingredient (plural).",format:v},{key:ye.property_unitAbbr,description:"Abbreviation for the unit of measurement (singular).",format:v},{key:ye.property_unitAbbrPlural,description:"Abbreviation for the unit of measurement (plural).",format:v},{key:ye.property_decimalPlaces,description:"Number of decimal places for the ingredient quantity.",format:_,defaultValue:"1"},{key:ye.property_disableCalculation,description:"Disable calculation for the ingredient.",format:C}]}]}]},[Q]:{jsonKey:"bookReferences",exportJsonKey:{bookReferences:"$"},sides:[{name:"reference",variants:[{jsonKey:null,tags:[{key:ye.group_standardTags,description:"Standard tags for book references."},{key:ye.property_refAuthor,description:"Author of the book.",format:v,maxCount:m},{key:ye.property_refBookTitle,description:"Title of the book.",format:v},{key:ye.property_refPublisher,description:"Publisher of the book.",format:v,maxCount:m},{key:ye.property_refPublicationYear,description:"Year of publication of the book.",format:v},{key:ye.property_citationStyle,description:"Citation style for the book reference.",format:v}]}]}]}},Ae=["complex","functional","decorative","standard"],Be={[ye.group_standardAllBits]:{name:"Standard",description:"Standard tags which apply to all bits",type:Z,tags:[{key:ye.property_id,description:"The unique identifier(s) for the bit",format:v,maxCount:m},{key:ye.property_gUri,description:"Global URI for the bit",format:v},{key:ye.property_customerId,description:"The customer-specific identifier for the bit",format:v},{key:ye.property_externalId,description:"The external identifier for the bit",format:v,maxCount:m,mappingKeys:{"xml-niso-iec":[{"@el":"std","@children":{"@el":"std-id","@text":"$"}},{"@el":"std-ref","@attr":{type:"dated"},"@text":"$"}]}},{key:ye.property_sourceRL,description:"The original location of the information in the original source material",format:v},{key:ye.property_copyright,description:"The copyright information for the bit",format:v},{key:ye.property_license,description:"The license for the bit",format:v},{key:ye.property_rightsPolicy,description:"The rights policy or policies for the bit",format:v,maxCount:m},{key:ye.property_isTemplate,description:"If true, the bit is a template",format:C,defaultValue:"false"},{key:ye.property_isTemplateStripTheme,description:"If true, the bit is a template strip theme",format:C,defaultValue:"false"},{key:ye.property_needsValidation,description:"If true, the bit needs validation",format:C,defaultValue:"false"},{key:ye.property_validationDate,description:"The date when the bit was validated",format:v},{key:ye.property_aiGenerated,description:"If true, the bit is AI-generated",format:C,nullable:!0},{key:ye.property_machineTranslated,description:"If true, the bit is machine-translated",format:v},{key:ye.property_translationOf,description:"Translation source reference",format:v},{key:ye.property_isCollapsible,description:"If true, the bit is collapsible",format:C,nullable:!0},{key:ye.property_spansPageBreak,description:"If true, the bit spans a page break",format:C,nullable:!0},{key:ye.property_searchIndex,description:"The search index(es) for the bit",format:v,maxCount:m},{key:ye.property_analyticsTag,description:"The analytics tag(s) for the bit",format:v,maxCount:m},{key:ye.property_categoryTag,description:"The category tag(s) for the bit",format:v,maxCount:m},{key:ye.property_topicTag,description:"The topic tag(s) for the bit",format:v,maxCount:m},{key:ye.property_reportTag,description:"The report tag(s) for the bit",format:v,maxCount:m},{key:ye.property_altLangTag,description:"The alternative language tag for the bit",format:v},{key:ye.property_feedbackEngine,description:"The feedback engine for the bit",format:v},{key:ye.property_feedbackType,description:"The feedback type for the bit",format:v},{key:ye.property_disableFeedback,description:"If true, feedback is disabled for the bit",format:C},{key:ye.property_diffTo,description:"The diff to version for the bit",format:v},{key:ye.property_diffOp,description:"The diff operation for the bit",format:v},{key:ye.property_diffRef,description:"The diff reference for the bit",format:v},{key:ye.property_diffContext,description:"The diff context for the bit",format:v},{key:ye.property_diffTime,description:"The diff time for the bit",format:_,nullable:!0},{key:ye.property_ageRange,description:"The age range for the bit",format:v,maxCount:m},{key:ye.property_lang,description:"The language for the bit",format:v,mappingKeys:{"xml-niso-iec":{"@el":"tbx:termEntry","@children":{"@el":"tbx:langSet","@attr":{"xml:lang":"$"}}}}},{key:ye.property_publisher,description:"The publisher(s) of the bit",format:v,maxCount:m},{key:ye.property_publisherName,description:"The name of the publisher of the bit",format:v},{key:ye.property_theme,description:"The theme(s) for the bit",format:v,nullable:!0,maxCount:m},{key:ye.property_rtl,description:"If true, the book is right-to-left",format:C,defaultValue:"false"},{key:ye.property_target,description:"The target(s) for the bit",format:v,maxCount:m},{key:ye.property_tag,description:"The tag(s) for the bit",format:v,nullable:!0,maxCount:m},{key:ye.property_groupTag,jsonKey:"groupTag.name",exportJsonKey:{groupTag:[{"@id":"name",name:"$"}]},description:"The group tag(s) for the bit",format:v,maxCount:m,chain:[{key:ye.property_tag,exportJsonKey:{tags:["$"]},description:"The tag(s) for the group",format:v,nullable:!0,maxCount:m}]},{key:ye.property_accessibilityTag,description:"The accessibility classification(s) for the bit",format:A,values:Ae,nullable:!0,maxCount:m},{key:ye.property_accessibilityGroupTag,jsonKey:"accessibilityGroupTag.name",exportJsonKey:{accessibilityGroupTag:[{"@id":"name",name:"$"}]},description:"The accessibility group tag(s) for the bit",format:v,maxCount:m,chain:[{key:ye.property_accessibilityTag,exportJsonKey:{tags:["$"]},description:"The accessibility classification(s) for the group",format:A,values:Ae,nullable:!0,maxCount:m}]},{key:ye.property_reviewTag,description:"The review tag(s) for the bit",format:v,maxCount:m},{key:ye.property_reviewerTag,description:"The reviewer tag(s) for the bit",format:v,maxCount:m},{key:ye.property_reductionTag,description:"The reduction tag(s) for the bit",format:v,maxCount:m},{key:ye.property_bubbleTag,description:"The bubble tag(s) for the bit",format:v,maxCount:m},{key:ye.property_extractorTag,description:"The extractor tag(s) for the bit",format:v,maxCount:m},{key:ye.property_extractorInternal,description:"Internal metadata used by the extractor for processing purposes",format:v,maxCount:m},{key:ye.property_sourceBB,description:"The source bounding box(es) for the bit (x, y, x1, y1)",format:B,maxCount:m},{key:ye.property_bitFingerprint,description:"Fingerprint(s) used by the AI extractor to identify the bit (font, style, color, pixels, etc.)",format:v,maxCount:m},{key:ye.property_levelCEFRp,description:"The CEFRp level for the bit",format:v},{key:ye.property_levelCEFR,description:"The CEFR level for the bit",format:v},{key:ye.property_levelILR,description:"The ILR level for the bit",format:v},{key:ye.property_levelACTFL,description:"The ACTFL level for the bit",format:v},{key:ye.property_icon,description:"The icon for the bit",format:v},{key:ye.property_iconTag,description:"The icon tag for the bit",format:v},{key:ye.property_colorTag,description:"The color tag(s) for the bit",format:v,maxCount:m},{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,name:"Anchor",format:v,description:"The anchor for the bit"},{key:ye.property_search,description:"The search text for the bit",format:v},{key:ye.property_showInIndex,description:"If true, the bit is shown in the index",format:C,defaultValue:"false"},{key:ye.property_layer,description:"The layer(s) for the bit",format:v,maxCount:m},{key:ye.property_layerRole,description:"The layer role(s) for the bit",format:v,maxCount:m},{key:ye.property_internalComment,description:"Internal comment for the bit.",format:v,maxCount:m,exportJsonKey:{}}]},[ye.group_accessibilityDecorative]:{name:"Accessibility (decorative)",description:"Accessibility tags defaulting to a decorative image, for bits that are decorative by definition",type:Z,tags:[{key:ye.property_accessibilityGroupTag,jsonKey:"accessibilityGroupTag.name",exportJsonKey:{accessibilityGroupTag:[{"@id":"name",name:"$"}]},description:"The accessibility group tag(s) for the bit",format:v,defaultValue:"image",maxCount:m,chain:[{key:ye.property_accessibilityTag,exportJsonKey:{tags:["$"]},description:"The accessibility classification(s) for the group",format:A,values:Ae,defaultValue:"decorative",maxCount:m}]}]},[ye.group_standardItemLead]:{type:Z,description:"Standard group for item, lead, page number, and margin number tags",tags:[{key:ye.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},mappingKeys:{"xml-niso-iec":{"@el":"label","@text":"$"}},description:"The item for the bit",chain:[{key:ye.tag_item,jsonKey:"lead",exportJsonKey:{lead:"$"},description:"The lead for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"pageNumber",exportJsonKey:{pageNumber:"$"},description:"The page number for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"marginNumber",exportJsonKey:{marginNumber:"$"},description:"The margin number for the bit",maxCount:1}]}]}]}]},[ye.group_standardItemLeadInstructionHint]:{type:Z,description:"Standard group for item, lead, page number, margin number, instruction and hint tags",tags:[{key:ye.group_standardItemLead,description:"Item, lead, page number, and margin number tags"},{exportJsonKey:{instruction:"$"},key:ye.tag_instruction,name:"Instruction",description:"The instruction for the bit"},{exportJsonKey:{hint:"$"},key:ye.tag_hint,name:"Hint",description:"The hint for the bit"}]},[ye.group_standardInstructionHint]:{type:Z,description:"Standard group for instruction and hint tags only (no item/lead/pageNumber/marginNumber chain). Used by sides where item/lead are owned by another side (e.g. matchPairs value-side, which BPG strips item/lead from at sideIdx > 0).",tags:[{exportJsonKey:{instruction:"$"},key:ye.tag_instruction,name:"Instruction",description:"The instruction for the bit"},{exportJsonKey:{hint:"$"},key:ye.tag_hint,name:"Hint",description:"The hint for the bit"}]},[ye.group_standardTags]:{type:Z,description:"Standard tags which apply to MOST (but not all) bits",tags:[{key:ye.group_standardAllBits,description:"All standard tags which apply to all bits"},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[ye.group_standardTagsNoItemLead]:{type:Z,description:"Standard tags mirror of group_standardTags but excluding the item/lead/pageNumber/marginNumber chain. Used by sides where item/lead are owned by another side (e.g. matchPairs value-side — BPG `parseMatchPairs` strips tags.item / tags.lead for sideIdx > 0).",tags:[{key:ye.group_standardAllBits,description:"All standard tags which apply to all bits"},{key:ye.group_standardInstructionHint,description:"Instruction and hint tags only (no item/lead chain)."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[ye.group_imageSource]:{type:Z,description:"Image source chain",tags:[{key:ye.property_imageSource,jsonKey:"imageSource.url",exportJsonKey:{imageSource:{url:"$"}},description:"The source of an image",format:v,chain:[{key:ye.property_mockupId,description:"The mockup ID for the image",format:v},{key:ye.property_size,description:"The size of the image",format:_,nullable:!0},{key:ye.property_format,description:"The format of the image",format:v},{key:ye.property_trim,description:"If true, the image is trimmed",format:C}]}]},[ye.group_technicalTerm]:{type:Z,description:"Technical term chain",tags:[{key:ye.property_technicalTerm,jsonKey:"technicalTerm.technicalTerm",exportJsonKey:{technicalTerm:{technicalTerm:"$"}},description:"The technical term",format:v,chain:[{key:ye.property_lang,description:"The language of the technical term",format:v}]}]},[ye.group_person]:{type:Z,description:"Person chain",tags:[{key:ye.property_person,jsonKey:"person.name",exportJsonKey:{person:{name:"$"}},description:"A person",format:v,chain:[{key:ye.property_title,description:"The person's title",format:v},{key:ye.group_resourceImage,jsonKey:"avatarImage|resource(type=image, key=image)",exportJsonKey:{avatarImage:{type:"image",image:{src:"$"}}},description:"The image of the person"}]},{key:ye.property_partner,jsonKey:"person.name",exportJsonKey:{person:{name:"$"}},description:"A partner",format:v,chain:[{key:ye.property_title,description:"The partner's title",format:v},{key:ye.group_resourceImage,jsonKey:"avatarImage|resource(type=image, key=image)",exportJsonKey:{avatarImage:{type:"image",image:{src:"$"}}},description:"The image of the partner"}]}]},[ye.group_gap]:{type:Z,description:"Gap chain",tags:[{exportJsonKey:{"@body-inline":{type:"gap",attrs:{solutions:["$"]}}},key:ye.tag_gap,description:"The value of a gap in the content",maxCount:m,format:v,chain:[{key:ye.tag_gap,jsonKey:"solutions[]",exportJsonKey:{solutions:["$"]},description:"Alternative values for the gaps in the content",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.solutions[-1]","@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.solutions[-1]","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"An example for the gap",format:T,nullable:!0},{key:ye.property_isCaseSensitive,jsonKey:"isCaseSensitive",exportJsonKey:[{"@absent":{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"If true, the gap text is case sensitive",format:C,defaultValue:"true"}]}]},[ye.group_trueFalse]:{type:Z,description:"True/False chain",tags:[{exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},key:ye.tag_true,description:"True value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"choices[]|set(isCorrect=true)",exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"choices[]|set(isCorrect=false)",exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:C,nullable:!0}]},{exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},key:ye.tag_false,description:"False value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"choices[]|set(isCorrect=true)",exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"choices[]|set(isCorrect=false)",exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question (incorrect entry — no cascade decoration: an ancestor bare example leaves incorrect choices untouched, bpg 5.31)",format:C,nullable:!0}]}]},[ye.group_trueFalseResponses]:{type:Z,description:"True/False Responses chain",tags:[{exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},key:ye.tag_true,description:"True value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"responses[]|set(isCorrect=true)",exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"responses[]|set(isCorrect=false)",exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:"$parent.isCorrect",example:"$parent.isCorrect","@bit":{isExample:"$parent.isCorrect"},"@card":{isExample:"$parent.isCorrect"}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:C,nullable:!0}]},{exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},key:ye.tag_false,description:"False value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"responses[]|set(isCorrect=true)",exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"responses[]|set(isCorrect=false)",exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:C,nullable:!0}]}]},[ye.group_trueFalseInlineSelect]:{type:Z,description:"True/False chain composed inline (select body-bit). +/- tags are consume-only at bit level.",tags:[{exportJsonKey:{"@body-inline":{type:"select",attrs:{options:[{text:"$",isCorrect:!0}]}}},key:ye.tag_true,description:"True value for an inline select body bit",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"True values for an inline select body bit",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"False values for an inline select body bit",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the inline select option (first correct only)",format:C,nullable:!0}]},{exportJsonKey:{"@body-inline":{type:"select",attrs:{options:[{text:"$",isCorrect:!1}]}}},key:ye.tag_false,description:"False value for an inline select body bit",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"True values for an inline select body bit",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"False values for an inline select body bit",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the inline select option (first correct only)",format:C,nullable:!0}]}]},[ye.group_trueFalseInlineHighlight]:{type:Z,description:'True/False chain composed inline (highlight body-bit). +/- tags emit `{type:"highlight", attrs:{texts:[{text,isCorrect?}]}}` inline body nodes. Used by highlight-text bit.',tags:[{exportJsonKey:{"@body-inline":{type:"highlight",attrs:{texts:[{text:"$",isCorrect:!0}]}}},key:ye.tag_true,description:"Highlighted span in the body (correct)",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"Highlighted span values (correct)",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"Highlighted span values (incorrect)",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the highlighted span (first correct only)",format:C,nullable:!0}]},{exportJsonKey:{"@body-inline":{type:"highlight",attrs:{texts:[{text:"$",isCorrect:!1}]}}},key:ye.tag_false,description:"Highlighted span in the body (incorrect)",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"Highlighted span values (correct)",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"Highlighted span values (incorrect)",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the highlighted span (first correct only)",format:C,nullable:!0}]}]},[ye.group_markConfig]:{type:Z,description:"Mark configuration chain",tags:[{key:ye.property_mark,jsonKey:"marks.mark",exportJsonKey:{marks:[{mark:"$",emphasis:"underline"}]},description:"The mark configuration",format:v,maxCount:m,chain:[{key:ye.property_color,description:"The color of the mark",format:v},{key:ye.property_emphasis,description:"The emphasis of the mark",format:v}]}]},[ye.group_mark]:{type:Z,description:"Mark chain",tags:[{exportJsonKey:{"@body-inline":{type:"mark",attrs:{solution:"$"}}},key:ye.tag_mark,description:"The marked content",maxCount:m,format:v,chain:[{key:ye.property_mark,jsonKey:"mark",exportJsonKey:{mark:"$"},description:"The mark configuration",format:v},{key:ye.property_example,jsonKey:"example",exportJsonKey:{isExample:!0,example:!0,"@bit":{isExample:!0}},description:"An example for the marked content",format:C,nullable:!0}]}]},[ye.group_bookCommon]:{type:Z,description:"Common book tags",tags:[{key:ye.property_language,description:"The language of the book",format:v,maxCount:m,mappingKeys:{"xml-niso-iec":[{predicates:[],maxEmits:1,rule:{"@el":"content-language","@text":"$"}}]}},{key:ye.property_displayName,description:"The display name of the book",format:v},{key:ye.property_customerExternalId,description:"The customer-specific external identifier for the book",format:v},{key:ye.property_spaceId,description:"The space ID for the book",format:v,maxCount:m},{key:ye.property_kind,description:"The kind of the book",format:v},{key:ye.property_hasMarkAsDone,description:'If true, the book has a "Mark as done" feature',format:C,defaultValue:"false"},{key:ye.property_processHandIn,description:"If true, the book will be processed when upon hand-in",format:C,defaultValue:"false"},{key:ye.property_processHandInLocation,description:"The location where the book was handed-in",format:v},{key:ye.property_isPublic,description:"If true, the book is public",format:C,defaultValue:"false"},{key:ye.property_isTemplate,description:"If true, the book is a template",format:C,defaultValue:"false"},{key:ye.property_isTemplateStripTheme,description:"If true, the book is a template strip theme",format:C,defaultValue:"false"},{key:ye.property_isEditable,description:"If true, the book is editable",format:C,defaultValue:"false"},{key:ye.property_chatWithBook,description:"If true, the user can chat about the book with an AI assistant",format:C,defaultValue:"false"},{key:ye.property_chatWithBookBrainKey,description:"The BookBrain key for the book chat",format:v},{key:ye.tag_title,name:"Title",description:"The title of the book",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],mappingKeys:{"xml-niso-iec":[{predicates:[],maxEmits:1,rule:{"@el":"title-wrap","@children":{"@el":"full","@text":"$"}}}]}},{key:ye.property_subtype,description:"The subtype of the book",format:v},{key:ye.property_coverImage,description:"The cover image(s) of the book",format:v,nullable:!0,maxCount:m},{key:ye.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"The cover image of the book",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:ye.property_backgroundImage,description:"The background image(s) of the book",format:v,maxCount:m},{key:ye.resource_backgroundImage,jsonKey:"backgroundImage|resource(type=image, key=image)",exportJsonKey:{backgroundImage:{type:"image",image:{src:"$"}}},description:"The background image of the book",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the background image resource"}]},{key:ye.property_coverColor,description:"The cover color of the book",format:v},{key:ye.property_subject,description:"The subject(s) of the book",format:v,maxCount:m},{key:ye.property_author,description:"The author(s) of the book",format:v,maxCount:m},{key:ye.property_publications,description:"The publication(s) of the book",format:v,maxCount:m},{key:ye.property_relatedBook,description:"Books related to this book",format:v,maxCount:m},{key:ye.property_translationOfBook,description:"External Id of the translated book",format:v},{key:ye.property_userFeedbackTranslationUrl,description:"URL to an external feedback form for book translation feedback",format:v},{key:ye.property_userFeedbackContentUrl,description:"URL to an external feedback form for book content feedback",format:v},{key:ye.property_duration,description:"The duration of the book",format:v},{key:ye.property_maxTocChapterLevel,description:"The maximum table of contents chapter level",format:_,defaultValue:"-1"},{key:ye.property_sourceDocument,description:"Url of the source document for the book (for example, a PDF file)",format:v},{key:ye.property_internalPrintPdf,description:"Url of the internal print PDF for the book",format:v},{key:ye.property_allowPrint,description:"If true, the book allows printing",format:A,values:["enforceFalse","enforceTrue","useSpaceConfiguration"],defaultValue:"useSpaceConfiguration"},{key:ye.property_hasPrintRestriction,description:"If true, the book has print restrictions",format:C,defaultValue:"true"},{key:ye.property_enforceUpdateOverUserInput,description:"If true, prioritize new content over legacy content from the instance API",format:C,defaultValue:"false"},{key:ye.property_extractorExtractionTimestamp,description:"Extraction timestamps for book conversion",format:v,maxCount:m}]},[ye.group_learningPathCommon]:{type:Z,description:"Common learning path tags",tags:[{key:ye.property_action,description:"The action for the learning path",format:v},{key:ye.property_duration,description:"The duration of the learning path",format:v},{key:ye.property_date,description:"The date of the learning path",format:v},{key:ye.property_dateEnd,description:"The end date of the learning path",format:v},{key:ye.property_location,description:"The location of the learning path",format:v},{key:ye.property_list,description:"The list of items in the learning path",format:v,maxCount:m},{key:ye.property_textReference,description:"The text reference for the learning path",format:v},{key:ye.property_isTracked,description:"If true, the learning path is tracked",format:C,defaultValue:"true"},{key:ye.property_isInfoOnly,description:"If true, the learning path is info only",format:C,defaultValue:"false"},{key:ye.property_deeplink,description:"The deeplink(s) for the learning path",format:v,maxCount:m},{key:ye.property_buttonCaption,description:"The caption for the button of the learning path",format:v},{key:ye.property_book,description:"The book(s) associated with the learning path",format:v,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"The reference for the book(s) in the learning path",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"The referenceEnd for the book(s) in the learning path",maxCount:1}]}]}]},[ye.group_advertisingCommon]:{type:Z,description:"Common advertising tags",tags:[{key:ye.property_advertisingClickUrl,description:"The URL to which the advertisement should link",format:v}]},[ye.group_platformStylesCommon]:{type:Z,description:"Common platform styles",tags:[{key:ye.property_platformPrimaryColor,description:"The platform system primary color",format:v},{key:ye.property_platformSecondaryColor,description:"The platform section secondary color",format:v},{key:ye.property_platformBackgroundColor,description:"The platform system background color",format:v},{key:ye.property_platformButtonPrimaryColor,description:"The platform section header button primary color",format:v},{key:ye.property_platformButtonBackgroundColor,description:"The platform section header button background color",format:v},{key:ye.property_platformScrollbarColor,description:"The platform main scrollbar color",format:v},{key:ye.property_platformSelectionColor,description:"The platform main selection color",format:v},{key:ye.property_platformTextSelectionColor,description:"The platform main input text selection color",format:v},{key:ye.property_platformSeparatorColor,description:"The platform main separator color",format:v},{key:ye.property_platformPlaceholderColor,description:"The platform main input placeholder color",format:v},{key:ye.property_platformMessageBackgroundColor,description:"The platform section chat message background color",format:v},{key:ye.property_platformBorderColor,description:"The platform border color",format:v},{key:ye.property_platformSelectionTextColor,description:"The platform selection text color",format:v},{key:ye.property_platformBaseLayerColor,description:"The platform base layer color",format:v},{key:ye.property_platformMargin,description:"The platform margin",format:_,nullable:!0},{key:ye.property_platformBorderRadius,description:"The platform border radius",format:_,nullable:!0},{key:ye.property_platformSelectionBorderRadius,description:"The platform selection border radius",format:_,nullable:!0},{key:ye.property_platformNeedsShadow,description:"If true, the platform needs shadow",format:C,nullable:!0}]},[ye.group_quizCommon]:{type:Z,description:"Common quiz tags",tags:[{key:ye.property_revealSolutions,description:"If true, the quiz solutions are revealed",format:C,nullable:!0},{key:ye.property_additionalSolutions,description:"Additional solutions",format:v,maxCount:m}]},[ye.group_backgroundWallpaper]:{type:Z,description:"Background wallpaper tags",tags:[{key:ye.resource_backgroundWallpaper,exportJsonKey:{backgroundWallpaper:{type:"image",image:{src:"$"}}},description:"Background wallpaper for the image, used to set a background for the image",chain:[{key:ye.group_resourceImageCommon,description:"Common resource image tags for images"}]}]},[ye.group_imageNoZoom]:{type:Z,description:"Image bit tags",tags:[{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImageNoZoom,description:"Resource image tags for images, used to attach images to the bit",minCount:1}]},[ye.group_resourceBitTags]:{type:Z,description:"Resource bit tags",tags:[{key:ye.resource_imagePlaceholder,jsonKey:"imagePlaceholder|resource(type=image, key=image)",exportJsonKey:{imagePlaceholder:{type:"image",image:{src:"$"}}},description:"Placeholder image for the resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the placeholder image"}],maxCount:1}]},[ye.group_resourceCommon]:{type:Z,description:"Common resource properties",tags:[{key:ye.property_license,description:"The license for the resource",format:v},{key:ye.property_copyright,description:"The copyright information for the resource",format:v},{key:ye.property_caption,description:"The caption for the resource",format:T,mappingKeys:{"xml-niso-iec":{"@el":"caption","@children":{"@el":"title","@text":"$"}}}},{key:ye.property_showInIndex,description:"If true, the resource is shown in the index",format:C,defaultValue:"false"},{key:ye.property_search,description:"The search text for the resource",format:v},{key:ye.property_selected,description:"If true, the resource is selected",format:C,defaultValue:"false"},{key:ye.property_srcAlt,description:"An alternative source for the resource",format:v,maxCount:m}]},[ye.group_resourceImageCommon]:{type:Z,description:"Common properties for image resources",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_src1x,description:"The source URL for the image at 1x resolution",format:v},{key:ye.property_src2x,description:"The source URL for the image at 2x resolution",format:v},{key:ye.property_src3x,description:"The source URL for the image at 3x resolution",format:v},{key:ye.property_src4x,description:"The source URL for the image at 4x resolution",format:v},{key:ye.property_width,description:"The width of the image",format:_,nullable:!0},{key:ye.property_height,description:"The height of the image",format:_,nullable:!0},{key:ye.property_alt,description:"The alternative text for the image",format:v},{key:ye.property_zoomDisabled,description:"If true, zooming is disabled for the image",format:C}]},[ye.group_resourceImageCommonNoZoom]:{type:Z,description:"Common properties for image resources where @zoomDisabled defaults to true",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_src1x,description:"The source URL for the image at 1x resolution",format:v},{key:ye.property_src2x,description:"The source URL for the image at 2x resolution",format:v},{key:ye.property_src3x,description:"The source URL for the image at 3x resolution",format:v},{key:ye.property_src4x,description:"The source URL for the image at 4x resolution",format:v},{key:ye.property_width,description:"The width of the image",format:_,nullable:!0},{key:ye.property_height,description:"The height of the image",format:_,nullable:!0},{key:ye.property_alt,description:"The alternative text for the image",format:v},{key:ye.property_zoomDisabled,description:"If true, zooming is disabled for the image (defaults to true)",format:C,defaultValue:"true"}]},[ye.group_resourceAudioCommon]:{type:Z,description:"Common properties for audio resources",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_duration,description:"The duration of the audio resource",format:v},{key:ye.property_mute,description:"If true, the audio is muted",format:C},{key:ye.property_autoplay,description:"If true, the audio plays automatically",format:C}]},[ye.group_resourceVideoCommon]:{type:Z,description:"Common properties for video resources",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_width,description:"The width of the video",format:_,nullable:!0},{key:ye.property_height,description:"The height of the video",format:_,nullable:!0},{key:ye.property_duration,description:"The duration of the video",format:v},{key:ye.property_mute,description:"If true, the video is muted",format:C},{key:ye.property_autoplay,description:"If true, the video plays automatically",format:C},{key:ye.property_allowSubtitles,description:"If true, subtitles are allowed for the video",format:C},{key:ye.property_showSubtitles,description:"If true, subtitles are shown in the video",format:C},{key:ye.property_alt,description:"The alternative text for the video",format:v},{key:ye.property_posterImage,jsonKey:"posterImage.src",exportJsonKey:{posterImage:{src:"$"}},description:"The poster image for the video",format:v,chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the poster image"}]},{key:ye.property_src1x,description:"The source URL for the video at 1x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:ye.property_src2x,description:"The source URL for the video at 2x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:ye.property_src3x,description:"The source URL for the video at 3x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:ye.property_src4x,description:"The source URL for the video at 4x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}}]},[ye.group_resourceIcon]:{type:Z,description:"Common properties for icon resources",tags:[{key:ye.resource_icon,exportJsonKey:{resource:{type:"icon",icon:{src:"$"}}},description:"The icon resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the icon resource"}]}]},[ye.group_resourceImage]:{type:X,description:"Common properties for image resources",tags:[{key:ye.resource_image,exportJsonKey:{resource:{type:"image",image:{src:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"graphic","@attr":{"xlink:href":"$"}}},description:"The image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]},[ye.group_resourceImageNoZoom]:{type:X,description:"Image resource where @zoomDisabled defaults to true",tags:[{key:ye.resource_image,exportJsonKey:{resource:{type:"image",image:{src:"$"}}},description:"The image resource (no-zoom default)",chain:[{key:ye.group_resourceImageCommonNoZoom,description:"Common image properties with @zoomDisabled defaulting to true"}]}]},[ye.group_resourceImagePortrait]:{type:X,description:"Portrait image resource",tags:[{key:ye.resource_imagePortrait,exportJsonKey:{resource:{type:"image-portrait",imagePortrait:{src:"$"}}},description:"The portrait image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the portrait image resource"}]}]},[ye.group_resourceImageLandscape]:{type:X,description:"Landscape image resource",tags:[{key:ye.resource_imageLandscape,exportJsonKey:{resource:{type:"image-landscape",imageLandscape:{src:"$"}}},description:"The landscape image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the landscape image resource"}]}]},[ye.group_resourceImageEmbed]:{type:X,description:"Embedded image resource",tags:[{key:ye.resource_imageEmbed,exportJsonKey:{resource:{type:"image-embed",imageEmbed:{src:"$"}}},description:"The embedded image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the embedded image resource"}]}]},[ye.group_resourceImageLink]:{type:X,description:"Link to an image resource",tags:[{key:ye.resource_imageLink,exportJsonKey:{resource:{type:"image-link",imageLink:{url:"$"}}},description:"The link to the image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the linked image resource"}]}]},[ye.group_resourceAudio]:{type:X,description:"Audio resource",tags:[{key:ye.resource_audio,exportJsonKey:{resource:{type:"audio",audio:{src:"$"}}},description:"The audio resource",chain:[{key:ye.group_resourceAudioCommon,description:"Common audio properties for the audio resource"}]}]},[ye.group_resourceAudioEmbed]:{type:X,description:"Embedded audio resource",tags:[{key:ye.resource_audioEmbed,exportJsonKey:{resource:{type:"audio-embed",audioEmbed:{src:"$"}}},description:"The embedded audio resource",chain:[{key:ye.group_resourceAudioCommon,description:"Common audio properties for the embedded audio resource"}]}]},[ye.group_resourceAudioLink]:{type:X,description:"Link to an audio resource",tags:[{key:ye.resource_audioLink,exportJsonKey:{resource:{type:"audio-link",audioLink:{url:"$"}}},description:"The link to the audio resource",chain:[{key:ye.group_resourceAudioCommon,description:"Common audio properties for the linked audio resource"}]}]},[ye.group_resourceVideo]:{type:X,description:"Video resource",tags:[{key:ye.resource_video,exportJsonKey:{resource:{type:"video",video:{src:"$"}}},description:"The video resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the video resource"}]}]},[ye.group_resourceVideoEmbed]:{type:X,description:"Embedded video resource",tags:[{key:ye.resource_videoEmbed,exportJsonKey:{resource:{type:"video-embed",videoEmbed:{url:"$"}}},description:"The embedded video resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the embedded video resource"}]}]},[ye.group_resourceVideoLink]:{type:X,description:"Link to a video resource",tags:[{key:ye.resource_videoLink,exportJsonKey:{resource:{type:"video-link",videoLink:{url:"$"}}},description:"The link to the video resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the linked video resource"}]}]},[ye.group_resourceStillImageFilmEmbed]:{type:X,description:"Embedded still image film resource",tags:[{key:ye.resource_stillImageFilmEmbed,exportJsonKey:{resource:{type:"still-image-film-embed",stillImageFilmEmbed:{url:"$"}}},description:"The embedded still image film resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the embedded still image film resource"}]}]},[ye.group_resourceStillImageFilmLink]:{type:X,description:"Link to a still image film resource",tags:[{key:ye.resource_stillImageFilmLink,exportJsonKey:{resource:{type:"still-image-film-link",stillImageFilmLink:{url:"$"}}},description:"The link to the still image film resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the linked still image film resource"}]}]},[ye.group_resourceArticle]:{type:X,description:"Article resource",tags:[{key:ye.resource_article,exportJsonKey:{resource:{type:"article",article:{body:"$"}}},description:"The article resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the article resource"}]}]},[ye.group_resourceArticleEmbed]:{type:X,description:"Embedded article resource",tags:[{key:ye.resource_articleEmbed,exportJsonKey:{resource:{type:"article-embed",articleEmbed:{url:"$"}}},description:"The embedded article resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the embedded article resource"}]}]},[ye.group_resourceArticleLink]:{type:X,description:"Link to an article resource",tags:[{key:ye.resource_articleLink,exportJsonKey:{resource:{type:"article-link",articleLink:{url:"$"}}},description:"The link to the article resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked article resource"}]}]},[ye.group_resourceDocument]:{type:X,description:"Document resource",tags:[{key:ye.resource_document,exportJsonKey:{resource:{type:"document",document:{url:"$"}}},description:"The document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the document resource"}]}]},[ye.group_resourceDocumentEmbed]:{type:X,description:"Embedded document resource",tags:[{key:ye.resource_documentEmbed,exportJsonKey:{resource:{type:"document-embed",documentEmbed:{url:"$"}}},description:"The embedded document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the embedded document resource"}]}]},[ye.group_resourceDocumentLink]:{type:X,description:"Link to a document resource",tags:[{key:ye.resource_documentLink,exportJsonKey:{resource:{type:"document-link",documentLink:{url:"$"}}},description:"The link to the document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked document resource"}]}]},[ye.group_resourceDocumentDownload]:{type:X,description:"Downloadable document resource",tags:[{key:ye.resource_documentDownload,exportJsonKey:{resource:{type:"document-download",documentDownload:{url:"$"}}},description:"The downloadable document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the downloadable document resource"}]}]},[ye.group_resourceAppLink]:{type:X,description:"Link to an app resource",tags:[{key:ye.resource_appLink,exportJsonKey:{resource:{type:"app-link",appLink:{url:"$"}}},description:"The link to the app resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked app resource"}]}]},[ye.group_resourceWebsiteLink]:{type:X,description:"Link to a website resource",tags:[{key:ye.resource_websiteLink,exportJsonKey:{resource:{type:"website-link",websiteLink:{url:"$"}}},description:"The link to the website resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked website resource"}]}]},[ye.group_resourceStillImageFilm]:{type:ee,description:"Resource for still image film",comboResourceConfigKey:ye.resource_stillImageFilm,tags:[{key:ye.group_resourceImage,description:"The image resource for the still image film",maxCount:1,minCount:1},{key:ye.group_resourceAudio,description:"The audio resource for the still image film",maxCount:1,minCount:1}]},[ye.group_resourceImageResponsive]:{type:ee,description:"Responsive image resource",comboResourceConfigKey:ye.resource_imageResponsive,tags:[{key:ye.group_resourceImagePortrait,description:"The portrait image resource",maxCount:1,minCount:1},{key:ye.group_resourceImageLandscape,description:"The landscape image resource",maxCount:1,minCount:1}]},[ye.group_previewImages]:{type:X,description:"Array of preview images for catalog items",tags:[{key:ye.resource_previewImage,jsonKey:"previewImage|resource(type=image, key=image)",exportJsonKey:{previewImage:{type:"image",image:{src:"$"}}},description:"The preview image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]},[ye.group_previewVideos]:{type:X,description:"Array of preview videos for catalog items",tags:[{key:ye.resource_previewVideo,jsonKey:"previewVideo|resource(type=video, key=video)",exportJsonKey:{previewVideo:{type:"video",video:{src:"$"}}},description:"The preview video resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]}},Se=new class{hydrateTagsConfig(e){const t={tags:{}};for(const r of e){let e;switch(fe(r.key)){case re:e=this.hydrateTagConfig(r);break;case ie:e=this.hydratePropertyTagConfig(r);break;case oe:e=this.hydrateResourceTagConfig(r);break;case ae:e=this.hydrateTagGroupConfig(r);break;default:throw new Error(`Unknown tag type for config key '${r.key}'`)}e&&(t.tags={...t.tags,...e.tags},t.info=Object.assign(t.info??{},e.info))}return t}hydrateCardSetConfig(e){if(!e)return;const t=we[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.sides){const t=[];for(const r of e.variants){const e=this.hydrateCardVariantConfig(r);t.push(e)}const i=new ue(e.name,e.repeat??!1,t,e.jsonKey,e.exportJsonKey,Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),e.htmlKey,Object.prototype.hasOwnProperty.call(e,"htmlKey"));r.push(i)}return new de(e,t.jsonKey,t.exportJsonKey,Object.prototype.hasOwnProperty.call(t,"exportJsonKey"),this.hydrateCardSections(t.sections),r,t.htmlKey,Object.prototype.hasOwnProperty.call(t,"htmlKey"))}hydrateCardSections(e){if(!e)return;const t={};for(const[r,i]of Object.entries(e))t[r]={jsonKey:i.jsonKey,exportJsonKey:i.exportJsonKey,hasExportJsonKey:Object.prototype.hasOwnProperty.call(i,"exportJsonKey"),htmlKey:i.htmlKey,hasHtmlKey:Object.prototype.hasOwnProperty.call(i,"htmlKey"),isDefault:i.isDefault,sideJsonKey:i.sideJsonKey,sideExportJsonKey:i.sideExportJsonKey,hasSideExportJsonKey:Object.prototype.hasOwnProperty.call(i,"sideExportJsonKey"),sideHtmlKey:i.sideHtmlKey,hasSideHtmlKey:Object.prototype.hasOwnProperty.call(i,"sideHtmlKey"),minCount:i.minCount,maxCount:i.maxCount};return t}hydrateTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,jsonKey:s,exportJsonKey:n,htmlKey:l}=e,c=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!c)throw new Error(`No tag key found for config key '${c}'`);const p=(0,Ce.Enum)(x).fromValue(c);if(!p)throw new Error(`No tag found for tag config key '${c}'`);let u;o&&(u=this.hydrateTagsConfig(o).tags);const d=new ne({configKey:c,tag:p,maxCount:r??1,minCount:i??0,chain:u,jsonKey:s,exportJsonKey:n,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:l,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),deprecated:a});return{tags:{[c]:d}}}hydratePropertyTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,format:s,values:n,defaultValue:l,jsonKey:c,exportJsonKey:p,htmlKey:u}=e,d=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!d)throw new Error(`No property key found for config key '${d}'`);const m=t.substring(1);let h;o&&(h=this.hydrateTagsConfig(o).tags);const b=new le({configKey:d,tag:m,maxCount:r??1,minCount:i??0,chain:h,jsonKey:c,exportJsonKey:p,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:u,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),format:s,values:n,defaultValue:l,deprecated:a});return{tags:{[d]:b}}}hydrateResourceTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,jsonKey:s,exportJsonKey:n,htmlKey:l}=e,c=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!c)throw new Error(`No resource key found for config key '${c}'`);const p=t.substring(1);let u;o&&(u=this.hydrateTagsConfig(o).tags);const d=new ce({configKey:c,tag:p,maxCount:r??1,minCount:i??0,chain:u,jsonKey:s,exportJsonKey:n,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:l,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),deprecated:a});return{tags:{[c]:d}}}hydrateTagGroupConfig(e){const{key:t}=e,r=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!r)throw new Error(`No group key found for config key '${r}'`);const i=Be[r];if(!i)throw new Error(`No config found for group config key '${t}'`);const{tags:o}=i,a=this.hydrateTagsConfig(o).tags,s=Object.values(a);if(s.length>0){const t=s[0],r=t;r.maxCount=e.maxCount??t.maxCount,r.minCount=e.minCount??t.minCount}return{tags:a,info:{comboResourceConfigKey:i.comboResourceConfigKey}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:o,jsonKey:a,exportJsonKey:s,htmlKey:n,format:l}=e,c=this.hydrateTagsConfig(t);return new pe(c.tags,r,i,o,a,s,Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),l,n,Object.prototype.hasOwnProperty.call(e,"htmlKey"))}},Pe={[d.assignment]:{since:"5.39.0",description:"Assignment bits",title:"Assignment",subgroupOf:d.quizzes},[d.authors]:{since:"5.39.0",description:"Author bits",title:"Authors"},[d.botAction]:{since:"5.39.0",description:"Bot action bits",title:"Bot Action"},[d.bots]:{since:"5.39.0",description:"Bot bits",title:"Bots"},[d.chat]:{since:"5.39.0",description:"Chat bits",title:"Chat"},[d.cloze]:{since:"5.39.0",description:"Cloze (fill-in-the-blank) quiz bits",title:"Cloze",subgroupOf:d.quizzes},[d.conversation]:{since:"5.39.0",description:"Conversation bits",title:"Conversation"},[d.cooking]:{since:"5.39.0",description:"Cooking / recipe content bits",title:"Cooking"},[d.correction]:{since:"5.39.0",description:"Correction quiz bits",title:"Correction",subgroupOf:d.quizzes},[d.documentUpload]:{since:"5.39.0",description:"Document upload task bits",title:"Document Upload",subgroupOf:d.quizzes},[d.essay]:{since:"5.39.0",description:"Essay quiz bits",title:"Essay",subgroupOf:d.quizzes},[d.extractor]:{since:"5.39.0",description:"Extractor bits (PDF / document extraction)",title:"Extractor"},[d.flashcard]:{since:"5.39.0",description:"Flashcard quiz bits",title:"Flashcard",subgroupOf:d.quizzes},[d.group]:{since:"5.39.0",description:"Grouping bits (no current bit type is a member; key kept for consumer compatibility)",title:"Group",allowEmpty:!0},[d.highlightText]:{since:"5.39.0",description:"Highlight text quiz bits",title:"Highlight Text",subgroupOf:d.quizzes},[d.interview]:{since:"5.39.0",description:"Interview quiz bits",title:"Interview",subgroupOf:d.quizzes},[d.learningPath]:{since:"5.39.0",description:"Learning path bits",title:"Learning Path"},[d.mark]:{since:"5.39.0",description:"Mark quiz bits",title:"Mark",subgroupOf:d.quizzes},[d.match]:{since:"5.39.0",description:"Match quiz bits",title:"Match",subgroupOf:d.quizzes},[d.message]:{since:"5.39.0",description:"Message bits",title:"Message"},[d.multipleChoice]:{since:"5.39.0",description:"Multiple choice quiz bits",title:"Multiple Choice",subgroupOf:d.quizzes},[d.multipleResponse]:{since:"5.39.0",description:"Multiple response quiz bits",title:"Multiple Response",subgroupOf:d.quizzes},[d.nonProduction]:{since:"5.39.0",description:"Bits not for production use",title:"Not for Production"},[d.other]:{since:"5.39.0",description:"Other bits (aliases, chapters)",title:"Other"},[d.pages]:{since:"5.39.0",description:"Page bits",title:"Pages"},[d.preparationNote]:{since:"5.39.0",description:"Preparation note task bits",title:"Preparation Note",subgroupOf:d.quizzes},[d.quizzes]:{since:"5.39.0",description:"All quiz / interactive task bits",title:"Quizzes"},[d.rating]:{since:"5.39.0",description:"Rating bits",title:"Rating",subgroupOf:d.surveys},[d.recipes]:{since:"5.39.0",description:"Recipe bits",title:"Recipes"},[d.recordAudio]:{since:"5.39.0",description:"Record audio task bits",title:"Record Audio",subgroupOf:d.quizzes},[d.reviewErrors]:{since:"5.39.0",description:"Review bits indicating review errors",title:"Review Errors",subgroupOf:d.reviews},[d.reviews]:{since:"5.39.0",description:"Review workflow bits",title:"Reviews"},[d.selfAssessment]:{since:"5.39.0",description:"Self-assessment bits",title:"Self Assessment",subgroupOf:d.surveys},[d.sequence]:{since:"5.39.0",description:"Sequence quiz bits",title:"Sequence",subgroupOf:d.quizzes},[d.set]:{since:"5.39.0",description:"Set bits (no current bit type is a member; key kept for consumer compatibility)",title:"Set",allowEmpty:!0},[d.static]:{since:"5.39.0",description:"Static (non-interactive) content bits",title:"Static Content"},[d.steps]:{since:"5.39.0",description:"Step bits",title:"Steps"},[d.survey]:{since:"5.39.0",description:"Simple survey bits",title:"Survey",subgroupOf:d.surveys},[d.surveyAnonymous]:{since:"5.39.0",description:"Anonymous survey bits",title:"Survey Anonymous",subgroupOf:d.surveys},[d.surveys]:{since:"5.39.0",description:"All survey-like bits (surveys, self-assessments, ratings)",title:"Surveys"},[d.tables]:{since:"5.39.0",description:"Table bits",title:"Tables"},[d.takePicture]:{since:"5.39.0",description:"Take picture task bits",title:"Take Picture",subgroupOf:d.quizzes},[d.trueFalse]:{since:"5.39.0",description:"True/false quiz bits",title:"True False",subgroupOf:d.quizzes},[d.vocabulary]:{since:"5.39.0",description:"Vocabulary bits (no current bit type is a member; key kept for consumer compatibility)",title:"Vocabulary",subgroupOf:d.quizzes,allowEmpty:!0},[d.warning]:{since:"5.39.0",description:"Warning-style content bits (warnings, bugs, dangers)",title:"Warning"},[d.whiteLabel]:{since:"5.39.0",description:"White-label / platform branding bits",title:"White-label"}},Ie={[u._error]:{since:"1.3.0",description:"An error bit, rendered when the bit cannot be interpreted"},[u._comment]:{since:"1.4.12",description:"A comment bit, used when a bit is commented out by adding | between the . and the bit name, e.g [.|article]"},[u._standard]:{since:"3.2.0",description:"The standard bit type, used as a base for other bits, should not be used directly",tags:[{key:ye.group_standardTags,description:"Standard tags for (almost) all bits"}]},[u.appFlashcards]:{since:"1.3.0",title:"Flashcards",bitGroups:[d.static],baseBitType:u._standard,description:"App flashcards bit, used for flashcard quizzes in the app",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"The title of the flashcard quiz"},{key:ye.property_flashcardSet,description:"The flashcard set to use for the app flashcards",format:v,maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.appFlashcardsQuiz]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.appFlashcards,description:"App flashcards quiz bit"},[u.appFlashcardsLearn]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.appFlashcards,description:"App flashcards learn bit"},[u.appLink]:{since:"1.3.0",title:"Link",bitGroups:[d.static],baseBitType:u._standard,description:"App link bit, used to link to other bits in the app",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAppLink,description:"Tags for the app link resource",minCount:1}],resourceAttachmentAllowed:!1},[u.appRag]:{since:"5.14.0",bitGroups:[d.static],baseBitType:u.article,description:"App RAG (Retrieval-Augmented Generation) bit, equal to article"},[u.appSearch]:{since:"5.14.0",bitGroups:[d.static],baseBitType:u.article,description:"App search bit, equal to article"},[u.author]:{since:"4.2.0",bitGroups:[d.authors,d.static],baseBitType:u._standard,description:"Represents an author of something",tags:[{key:ye.property_fullName,description:"Full name of the author"},{key:ye.property_pseudonym,description:"A pseudonym of the author, if any"},{key:ye.property_title,description:'The title of the author, e.g. "Dr.", "Prof.", etc.',jsonKey:"title"},{key:ye.property_jobTitle,description:'The job title of the author, e.g. "Software Engineer", "Professor", etc.'}]},[u.bookAuthor]:{since:"4.2.0",title:"Author",bitGroups:[d.authors,d.static],baseBitType:u.author,description:"Represents an author of a book"},[u.articleAuthor]:{since:"4.2.0",title:"Article Author",bitGroups:[d.authors,d.static],baseBitType:u.author,description:"Represents an author of a book"},[u.article]:{since:"1.3.0",title:"Article",bitGroups:[d.static],baseBitType:u._standard,description:"Article bit, used for articles / paragraphs",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}},key:ye.tag_title,description:"The title of the article"}]},[u.articleAlt]:{since:"1.15.0",title:"Article Altnerative",bitGroups:[d.static],baseBitType:u.article,description:"Alternative article bit"},[u.articleResponsive]:{since:"1.21.0",title:"Responsive",bitGroups:[d.static],baseBitType:u.article,description:"Responsive article bit, used for articles that adapt to the screen size",tags:[{key:ye.property_imageFirst,description:"If the image should be displayed first in the responsive article",format:C,defaultValue:"true"}]},[u.articleResponsiveAlt]:{since:"2.0.0",title:"Responsive Alternative",bitGroups:[d.static],baseBitType:u.articleResponsive,description:"Alternative responsive article bit"},[u.standardArticleNormative]:{since:"1.16.0",title:"Standard Article (Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard normative article bit"},[u.standardArticleNonNormative]:{since:"1.16.0",title:"Standard Article (Non Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard non-normative article bit"},[u.smartStandardArticleNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardArticleNormative,description:"Smart standard normative article bit",mappingKeys:{"xml-niso-iec":[{"@el":"p","@attr":{id:"$customerId"},"@children":"$"},{"@el":"sec","@attr":{"sec-type":"numbered-paragraph",id:"$customerId"},"@children":"$","▼":"$anchor"}]}},[u.smartStandardArticleNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardArticleNonNormative,description:"Smart standard non-normative article bit",mappingKeys:{"xml-niso-iec":[{"@el":"p","@attr":{id:"$customerId"},"@ancestor":{"@attr":{"sec-type":"foreword|intro"}},"@children":"$"},{"@el":"p","@attr":{id:"$customerId"},"@ancestor":{"@attr":{"content-type":"informative"}},"@children":"$"}]}},[u.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardArticleNormative,description:"Smart standard normative article bit that is collapsible",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardArticleNonNormative,description:"Smart standard non-normative article bit that is collapsible",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.statement]:{since:"1.3.0",title:"Statement",bitGroups:[d.static],baseBitType:u.article,description:"Statement bit, used for statements in documents"},[u.pageArticle]:{since:"1.15.0",title:"Page Article",bitGroups:[d.static],baseBitType:u.article,description:"Page article bit"},[u.pageArticleAlt]:{since:"1.15.0",title:"Page Article Alternative",bitGroups:[d.static],baseBitType:u.article,description:"Alternative page article bit"},[u.pageArticleResponsive]:{since:"1.21.0",bitGroups:[d.static],baseBitType:u.article,description:"Responsive page article bit, used for articles that adapt to the screen size",tags:[{key:ye.property_imageFirst,description:"If the image should be displayed first in the responsive article",format:C,defaultValue:"true"}]},[u.buttonCopyText]:{since:"1.4.3",title:"Copy Text",bitGroups:[d.static],baseBitType:u.article,description:"Button copy text bit, used to create a button that copies text to the clipboard",tags:[{key:ye.property_buttonCaption,description:"The caption of the button",format:v}]},[u.catalogItemBook]:{since:"4.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Catalog item book bit, used to represent a book product in a catalog with cover and description",tags:[{key:ye.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverImage,description:"Cover image of the catalog item",format:v,nullable:!0},{key:ye.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"Cover image of the catalog item",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:ye.property_content2Buy,description:"Content to buy identifier",format:v},{key:ye.property_listPrice,description:"List price of the catalog item",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button",format:v},{key:ye.property_customerProductId,description:"Customer-specific product identifier",format:v},{key:ye.property_currency,description:"Currency for the catalog item",format:v},{key:ye.property_bookIsbn,description:"ISBN for iBook version",format:v},{key:ye.property_bookAuthor,description:"Author of the book",format:v},{key:ye.property_bookType,description:"Type of the book",format:v},{key:ye.property_bookBindingType,description:"Binding type of the book",format:v},{key:ye.property_bookNumberOfPages,description:"Number of pages in the book",format:v},{key:ye.property_bookRating,description:"Rating of the book",format:v},{key:ye.property_bookSeriesTitle,description:"Title of the book series",format:v},{key:ye.property_bookSeriesId,description:"ID of the book series",format:v},{key:ye.property_bookSeriesNumber,description:"Number in the book series",format:v},{key:ye.property_bookLanguage,description:"Language of the book",format:v},{key:ye.property_bookPublishingDate,description:"Publishing date of the book",format:v},{key:ye.property_bookPublisher,description:"Publisher of the book",format:v},{key:ye.property_bookTranslator,description:"Translator of the book",format:v},{key:ye.property_bookOriginalTitle,description:"Original title of the book",format:v},{key:ye.property_gmbExternalShop,description:"External shop identifier",format:v},{key:ye.property_gmbExternalShopItems,description:"Array of external shop items",format:v,maxCount:m},{key:ye.group_imageSource,description:"Image source chain"},{key:ye.group_previewImages,description:"Array of preview images for the catalog item",maxCount:m},{key:ye.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.catalogItemExternalBook]:{since:"4.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Catalog item external book bit, used to represent an external book product in a catalog with link to external shop",tags:[{key:ye.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverImage,description:"Cover image of the catalog item",format:v,nullable:!0},{key:ye.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"Cover image of the catalog item",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:ye.property_customerProductShopLink,description:"Link to external shop for the product",format:v},{key:ye.property_listPrice,description:"List price of the catalog item",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button",format:v},{key:ye.property_customerProductId,description:"Customer-specific product identifier",format:v},{key:ye.property_currency,description:"Currency for the catalog item",format:v},{key:ye.property_bookIsbn,description:"ISBN for iBook version",format:v},{key:ye.property_bookAuthor,description:"Author of the book",format:v},{key:ye.property_bookType,description:"Type of the book",format:v},{key:ye.property_bookBindingType,description:"Binding type of the book",format:v},{key:ye.property_bookNumberOfPages,description:"Number of pages in the book",format:v},{key:ye.property_bookRating,description:"Rating of the book",format:v},{key:ye.property_bookSeriesTitle,description:"Title of the book series",format:v},{key:ye.property_bookSeriesId,description:"ID of the book series",format:v},{key:ye.property_bookSeriesNumber,description:"Number in the book series",format:v},{key:ye.property_bookLanguage,description:"Language of the book",format:v},{key:ye.property_bookPublishingDate,description:"Publishing date of the book",format:v},{key:ye.property_bookPublisher,description:"Publisher of the book",format:v},{key:ye.property_bookTranslator,description:"Translator of the book",format:v},{key:ye.property_bookOriginalTitle,description:"Original title of the book",format:v},{key:ye.property_gmbExternalShop,description:"External shop identifier",format:v},{key:ye.property_gmbExternalShopItems,description:"Array of external shop items",format:v,maxCount:m},{key:ye.group_imageSource,description:"Image source chain"},{key:ye.group_previewImages,description:"Array of preview images for the catalog item",maxCount:m},{key:ye.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.catalogItemProduct]:{since:"4.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Catalog item product bit, used to represent a general product in a catalog with cover and description",tags:[{key:ye.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverImage,description:"Cover image of the catalog item",format:v,nullable:!0},{key:ye.property_content2Buy,description:"Content to buy identifier",format:v},{key:ye.property_listPrice,description:"List price of the catalog item",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button",format:v},{key:ye.property_customerProductId,description:"Customer-specific product identifier",format:v},{key:ye.property_currency,description:"Currency for the catalog item",format:v},{key:ye.property_bookIsbn,description:"ISBN for iBook version",format:v},{key:ye.property_bookAuthor,description:"Author of the book",format:v},{key:ye.property_bookType,description:"Type of the book",format:v},{key:ye.property_bookBindingType,description:"Binding type of the book",format:v},{key:ye.property_bookNumberOfPages,description:"Number of pages in the book",format:v},{key:ye.property_bookRating,description:"Rating of the book",format:v},{key:ye.property_bookSeriesTitle,description:"Title of the book series",format:v},{key:ye.property_bookSeriesId,description:"ID of the book series",format:v},{key:ye.property_bookSeriesNumber,description:"Number in the book series",format:v},{key:ye.property_bookLanguage,description:"Language of the book",format:v},{key:ye.property_bookPublishingDate,description:"Publishing date of the book",format:v},{key:ye.property_bookPublisher,description:"Publisher of the book",format:v},{key:ye.property_bookTranslator,description:"Translator of the book",format:v},{key:ye.property_bookOriginalTitle,description:"Original title of the book",format:v},{key:ye.property_gmbExternalShop,description:"External shop identifier",format:v},{key:ye.property_gmbExternalShopItems,description:"Array of external shop items",format:v,maxCount:m},{key:ye.group_imageSource,description:"Image source chain"},{key:ye.group_previewImages,description:"Array of preview images for the catalog item",maxCount:m},{key:ye.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.callToAction]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Call to action bit, used to create a call to action button",tags:[{key:ye.property_buttonCaption,description:"The caption of the call to action button",format:v},{key:ye.property_callToActionUrl,description:"The URL to navigate to when the call to action button is clicked",format:v,minCount:1}]},[u.callToActionSubscribe]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action subscribe bit"},[u.callToActionContact]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action contact bit"},[u.callToActionJoin]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action join bit"},[u.callToActionMail]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action mail bit"},[u.callToActionLearnMore]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action learn more bit"},[u.callToActionSeeMore]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action see more bit"},[u.callToActionWatch]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action watch bit"},[u.callToActionStartNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action start now bit"},[u.callToActionGetOffer]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action get offer bit"},[u.callToActionBookNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action book now bit"},[u.callToActionShopNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action shop now bit"},[u.callToActionGetNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action get now bit"},[u.callToActionDownload]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action download bit"},[u.callToActionCreateAccount]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action create account bit"},[u.appBitmarkFromJavascript]:{since:"1.4.5",bitGroups:[d.static],baseBitType:u._standard,description:"App bitmark from JavaScript, used to create bits from JavaScript in the app",tags:[{key:ye.property_maxCreatedBits,description:"The maximum number of bits that can be created from this bit",format:_,nullable:!0}],textFormatDefault:S.plainText},[u.appBitmarkFromEditor]:{since:"1.4.5",bitGroups:[d.static],baseBitType:u.appBitmarkFromJavascript,description:"App bitmark from editor, used to create bits from the editor in the app"},[u.articleEmbed]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Article embed bit, used to embed articles from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceArticleEmbed,description:"Tags for the article embed resource",minCount:1}],resourceAttachmentAllowed:!1},[u.articleLink]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Article link bit, used to link to articles from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceArticleLink,description:"Tags for the article link resource",minCount:1}],resourceAttachmentAllowed:!1},[u.audio]:{since:"1.3.0",title:"Audio",bitGroups:[d.static],baseBitType:u._standard,description:"Audio bit, used for audio files",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAudio,description:"Tags for the audio resource",minCount:1}],resourceAttachmentAllowed:!1},[u.audioEmbed]:{since:"1.3.0",title:"Embed audio",bitGroups:[d.static],baseBitType:u._standard,description:"Audio embed bit, used to embed audio files from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAudioEmbed,description:"Tags for the audio embed resource",minCount:1}],resourceAttachmentAllowed:!1},[u.audioLink]:{since:"1.3.0",title:"Audio Link",bitGroups:[d.static],baseBitType:u._standard,description:"Audio link bit, used to link to audio files from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAudioLink,description:"Tags for the audio link resource",minCount:1}],resourceAttachmentAllowed:!1},[u.bitAlias]:{since:"1.3.0",title:"Bit Alias",bitGroups:[d.other,d.static],baseBitType:u._standard,description:"Bit alias, used to create an alias for a bit",tags:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"The reference to the bit that this alias points to"},{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,format:v,description:"The anchor for the bit alias, used for linking"}]},[u.diff]:{since:"3.13.0",bitGroups:[d.static],baseBitType:u._standard,description:"Diff bit, used to show differences between two bits",tags:[{key:ye.property_diffTo,description:"The reference to the bit that this diff compares to",format:v}]},[u.book]:{since:"1.3.0",title:"Book",bitGroups:[d.static],baseBitType:u._standard,description:"Book bit, used to represent a book",mappingKeys:{"xml-niso-iec":{"@el":"std-meta"}},tags:[{key:ye.group_bookCommon,description:"Common tags for book bits"}]},[u.bookEnd]:{since:"3.27.0",bitGroups:[d.static],baseBitType:u.article,description:"End of book bit"},[u.bookAcknowledgements]:{since:"1.17.0",title:"Book Acknowledgements",bitGroups:[d.static],baseBitType:u.article,description:"Acknowledgements section of a book"},[u.bookAddendum]:{since:"1.3.0",title:"Book Addendum",bitGroups:[d.static],baseBitType:u.article,description:"Addendum section of a book"},[u.bookAfterword]:{since:"1.3.0",title:"Book Afterword",bitGroups:[d.static],baseBitType:u.article,description:"Afterword section of a book"},[u.bookAppendix]:{since:"1.3.0",title:"Book Appendix",bitGroups:[d.static],baseBitType:u.article,description:"Appendix section of a book"},[u.bookArticle]:{since:"1.3.0",title:"Book Article",bitGroups:[d.static],baseBitType:u.article,description:"Article section of a book"},[u.bookAutherBio]:{since:"1.3.0",title:"Book Author Bio",bitGroups:[d.static],baseBitType:u.article,description:"Author biography section of a book"},[u.bookBibliography]:{since:"1.3.0",title:"Book Bibliography",bitGroups:[d.static],baseBitType:u.article,description:"Bibliography section of a book"},[u.bookComingSoon]:{since:"1.3.0",title:"Book Coming Soon",bitGroups:[d.static],baseBitType:u.article,description:"Coming soon section of a book"},[u.bookConclusion]:{since:"1.3.0",title:"Book Conclusion",bitGroups:[d.static],baseBitType:u.article,description:"Conclusion section of a book"},[u.bookCopyright]:{since:"1.3.0",title:"Book Copyright",bitGroups:[d.static],baseBitType:u.article,description:"Copyright section of a book"},[u.bookCopyrightPermissions]:{since:"1.3.0",title:"Book Copyright Permissions",bitGroups:[d.static],baseBitType:u.article,description:"Copyright permissions section of a book"},[u.bookDedication]:{since:"1.3.0",title:"Book Dedication",bitGroups:[d.static],baseBitType:u.article,description:"Dedication section of a book"},[u.bookEndnotes]:{since:"1.3.0",title:"Book Endnotes",bitGroups:[d.static],baseBitType:u.article,description:"Endnotes section of a book"},[u.bookEpigraph]:{since:"1.3.0",title:"Book Epigraph",bitGroups:[d.static],baseBitType:u.article,description:"Epigraph section of a book"},[u.bookEpilogue]:{since:"1.3.0",title:"Book Epilogue",bitGroups:[d.static],baseBitType:u.article,description:"Epilogue section of a book"},[u.bookForword]:{since:"1.3.0",title:"Book Foreword",bitGroups:[d.static],baseBitType:u.article,description:"Foreword section of a book"},[u.bookFrontispiece]:{since:"1.3.0",title:"Book Frontispiece",bitGroups:[d.static],baseBitType:u.article,description:"Frontispiece section of a book"},[u.bookImprint]:{since:"1.3.0",title:"Book Imprint",bitGroups:[d.static],baseBitType:u.article,description:"Imprint section of a book"},[u.bookIncitingIncident]:{since:"1.3.0",title:"Inciting Incident",bitGroups:[d.static],baseBitType:u.article,description:"Inciting incident section of a book"},[u.bookIntroduction]:{since:"1.3.0",title:"Book Introduction",bitGroups:[d.static],baseBitType:u.article,description:"Introduction section of a book"},[u.bookListOfContributors]:{since:"1.3.0",title:"Book List Of Contributors",bitGroups:[d.static],baseBitType:u.article,description:"List of contributors section of a book"},[u.bookNotes]:{since:"1.3.0",title:"Book Notes",bitGroups:[d.static],baseBitType:u.article,description:"Notes section of a book"},[u.bookPostscript]:{since:"1.3.0",title:"Book Postscript",bitGroups:[d.static],baseBitType:u.article,description:"Postscript section of a book"},[u.bookPreface]:{since:"1.3.0",title:"Book Preface",bitGroups:[d.static],baseBitType:u.article,description:"Preface section of a book"},[u.bookPrologue]:{since:"1.3.0",title:"Book Prologue",bitGroups:[d.static],baseBitType:u.article,description:"Prologue section of a book"},[u.bookReadMore]:{since:"1.3.0",title:"Read More",bitGroups:[d.static],baseBitType:u.article,description:"Read more section of a book"},[u.bookReferenceList]:{since:"3.2.0",title:"Book Reference List",bitGroups:[d.static],baseBitType:u._standard,description:"Book reference list, used to list references in a book",cardSet:Q},[u.bookRequestForABookReview]:{since:"1.3.0",title:"Request For A Book Review",bitGroups:[d.static],baseBitType:u.article,description:"Request for a book review section of a book"},[u.bookSummary]:{since:"1.3.0",title:"Book Summary",bitGroups:[d.static],baseBitType:u.article,description:"Summary section of a book"},[u.bookTeaser]:{since:"1.3.0",title:"Book Teaser",bitGroups:[d.static],baseBitType:u.article,description:"Teaser section of a book"},[u.bookTitle]:{since:"1.3.0",title:"Book Title",bitGroups:[d.static],baseBitType:u.article,description:"Title section of a book"},[u.bookCover]:{since:"3.27.0",bitGroups:[d.static],baseBitType:u.image,description:"Cover image of a book",tags:[{key:ye.tag_title,description:"The title of the book cover",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverColor,description:"The color of the book cover",format:v}]},[u.bookAlias]:{since:"1.4.3",title:"Book Alias",bitGroups:[d.static],baseBitType:u.book,description:"Book alias, used to create an alias for a book",tags:[{key:ye.property_bookAlias,description:"The alias for the book",format:v,maxCount:m}]},[u.bookDiff]:{since:"3.10.0",bitGroups:[d.static],baseBitType:u.book,description:"Book diff, used to show differences between two book versions",tags:[{key:ye.property_bookDiff,description:"The reference to the book that this diff compares to",format:v}]},[u.bookClose]:{since:"1.18.0",title:"Close Book",bitGroups:[d.static],baseBitType:u.article,description:"Close section of a book, used to close the book",tags:[{key:ye.property_buttonCaption,description:"The caption of the close button",format:v}]},[u.bookReference]:{since:"2.2.0",title:"Book Reference",bitGroups:[d.static],baseBitType:u.article,description:"Book reference, used to reference a book in another book",tags:[{key:ye.property_refAuthor,description:"The author of the referenced book",format:v,maxCount:m},{key:ye.property_refBookTitle,description:"The title of the referenced book",format:v},{key:ye.property_refPublisher,description:"The publisher of the referenced book",format:v,maxCount:m},{key:ye.property_refPublicationYear,description:"The publication year of the referenced book",format:v},{key:ye.property_citationStyle,description:"The citation style to use for the book reference",format:v}]},[u.botActionResponse]:{since:"1.3.0",title:"Bot Action Response",bitGroups:[d.bots],baseBitType:u._standard,description:"Bot action response bit, used to define responses for bot actions",cardSet:M},[u.botActionSend]:{since:"1.3.0",title:"Bot Action Send",bitGroups:[d.botAction,d.bots],baseBitType:u._standard,description:"Bot action send bit, used to define actions for sending messages",tags:[{key:ye.property_date,description:"The date when the message should be sent",format:v}]},[u.browserImage]:{since:"1.3.0",title:"Browser Image",bitGroups:[d.static],baseBitType:u.image,description:"Browser image bit, used to display images in the browser",tags:[{key:ye.property_focusX,description:"The X coordinate for focusing the image in the browser",format:_,nullable:!0},{key:ye.property_focusY,description:"The Y coordinate for focusing the image in the browser",format:_,nullable:!0}]},[u.card1]:{since:"1.3.0",title:"Card",bitGroups:[d.static],baseBitType:u._standard,description:"Card bit, used for cards in quizzes",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"}]},[u.question1]:{since:"1.3.0",title:"Question",bitGroups:[d.static],baseBitType:u.card1,description:"Question card bit"},[u.survey1]:{since:"1.3.0",bitGroups:[d.survey,d.surveys],baseBitType:u.card1,description:"Survey card bit"},[u.surveyAnonymous1]:{since:"1.3.0",bitGroups:[d.surveyAnonymous,d.surveys],baseBitType:u.card1,description:"Anonymous survey card bit"},[u.chapter]:{since:"1.3.0",title:"Chapter",bitGroups:[d.other,d.static],baseBitType:u._standard,description:"Chapter bit, used to define chapters in books or articles",mappingKeys:{"xml-niso-iec":{"@el":"sec|app","@attr":{id:"$customerId"},"▼":"$anchor"}},tags:[{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,format:v,description:"The anchor for the chapter, used for linking"},{key:ye.tag_title,description:"The title of the chapter",jsonKey:"title|setMulti(level)",exportJsonKey:{title:"$",level:"$level"},mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}}},{key:ye.property_toc,description:"If the chapter should be included in the table of contents",format:C,defaultValue:"true"},{key:ye.property_progress,description:"The progress of the chapter, used for tracking reading progress",format:C,defaultValue:"true"},{key:ye.property_isCollapsible,description:"If true, the chapter is collapsible (always emitted; defaults false)",format:C,defaultValue:"false",alwaysEmit:!0}]},[u.clozeAndMultipleChoiceText]:{since:"1.3.0",title:"Cloze And Multiple Choice Text",bitGroups:[d.cloze,d.quizzes],baseBitType:u._standard,description:"Cloze and multiple choice text bit, used for quizzes with cloze and multiple choice questions",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.group_gap,description:"Tags for gaps in cloze and multiple choice text bits"},{key:ye.group_trueFalseInlineSelect,description:"Tags for true/false questions in cloze and multiple choice text bits"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:C,defaultValue:"true"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",title:"Coach Call To Action Cloze And Multiple Choice Text",bitGroups:[d.quizzes],baseBitType:u.clozeAndMultipleChoiceText,description:"Coach call to action cloze and multiple choice text bit"},[u.cloze]:{since:"1.3.0",title:"Cloze",bitGroups:[d.cloze,d.quizzes],baseBitType:u._standard,description:"Cloze bit, used for fill-in-the-blank questions in quizzes",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:C,defaultValue:"true"},{key:ye.property_quizCountItems,description:"The number of items in the cloze quiz",format:C,nullable:!0},{key:ye.property_quizStrikethroughSolutions,description:"If the cloze solutions should be strikethrough",format:C,nullable:!0},{key:ye.group_gap,description:"Tags for gaps in cloze bits"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.clozeInstructionGrouped]:{since:"1.3.0",title:"Cloze Instruction Grouped",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Cloze instruction grouped bit, used for cloze questions with grouped instructions",tags:[{key:ye.property_quizCountItems,description:"The number of items in the cloze quiz (instruction-grouped default: true)",format:C,defaultValue:"true"}]},[u.clozeSolutionGrouped]:{since:"1.3.0",title:"Cloze Solution Grouped",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Cloze solution grouped bit, used for cloze questions with grouped solutions",tags:[{key:ye.property_quizCountItems,description:"The number of items in the cloze quiz (solution-grouped default: true)",format:C,defaultValue:"true"},{key:ye.property_quizStrikethroughSolutions,description:"If the cloze solutions should be strikethrough (solution-grouped default: true)",format:C,defaultValue:"true"}]},[u.clozeSeveral]:{since:"3.5.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Cloze several bit, used for cloze questions with multiple answers"},[u.gapText]:{since:"1.5.15",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Gap text bit, used for fill-in-the-blank questions in quizzes with text gaps"},[u.gapTextInstructionGrouped]:{since:"1.5.15",bitGroups:[d.cloze,d.quizzes],baseBitType:u.clozeInstructionGrouped,description:"Gap text instruction grouped bit, used for fill-in-the-blank questions with grouped instructions"},[u.coachSelfReflectionCloze]:{since:"1.3.0",title:"Coach Self Reflection Cloze",bitGroups:[d.quizzes],baseBitType:u.cloze,description:"Coach self-reflection cloze bit, used for self-reflection questions in coaching"},[u.coachCallToActionCloze]:{since:"1.3.0",title:"Coach Call To Action Cloze",bitGroups:[d.quizzes],baseBitType:u.cloze,description:"Coach call to action cloze bit, used for call to action questions in coaching"},[u.clozeList]:{since:"1.4.13",title:"Cloze List",bitGroups:[d.cloze,d.quizzes],baseBitType:u._standard,description:"Cloze list bit, used for lists of cloze questions in quizzes",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:C,defaultValue:"true"}],cardSet:W},[u.code]:{since:"1.3.0",title:"Code",bitGroups:[d.static],baseBitType:u._standard,description:"Code bit, used for code snippets in articles or documents",mappingKeys:{"xml-niso-iec":{"@el":"code","@attr":{id:"$customerId",language:"$computerLanguage"},"▼":"$anchor","@text":"$"}},tags:[{key:ye.property_computerLanguage,description:"The programming language of the code snippet",format:v,mappingKeys:{"xml-niso-iec":[{"@absent":"text"}]}},{key:ye.property_codeLineNumbers,description:"If line numbers should be displayed for the code snippet",format:C},{key:ye.property_codeMinimap,description:"If a minimap should be displayed for the code snippet",format:C}],textFormatDefault:S.plainText},[u.formula]:{since:"1.35.0",title:"Formula",bitGroups:[d.static],baseBitType:u._standard,description:"Formula bit, used for mathematical formulas in articles or documents",textFormatDefault:S.latex},[u.formulaImage]:{since:"5.23.0",bitGroups:[d.static],baseBitType:u.formula,description:"Formula image bit, used for mathematical formulas rendered as images"},[u.smartStandardFormula]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard formula bit, used for mathematical formulas in smart standards"},[u.smartStandardFormulaNonNormative]:{since:"3.11.0",title:"Smart Standard Formula (Non Normative)",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard non-normative formula bit, used for mathematical formulas in smart standards that are non-normative"},[u.smartStandardFormulaNormative]:{since:"3.11.0",title:"Smart Standard Formula (Normative)",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard normative formula bit, used for mathematical formulas in smart standards that are normative",mappingKeys:{"xml-niso-iec":{"@el":"disp-formula","@attr":{id:"$customerId"},"▼":"$anchor","@children":"$"}}},[u.smartStandardRemarkFormula]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard remark formula bit, used for mathematical formulas in smart standards remarks"},[u.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard non-normative remark formula bit, used for mathematical formulas in smart standards remarks that are non-normative"},[u.smartStandardRemarkFormulaNormative]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard normative remark formula bit, used for mathematical formulas in smart standards remarks that are normative"},[u.appCodeCell]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"App code cell, used to create code cells in the app editor"},[u.appCodeEditor]:{since:"1.4.3",title:"Code Editor",bitGroups:[d.static],baseBitType:u.code,description:"App code editor, used to create code editors in the app editor"},[u.appCodeIde]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"App code IDE, used to create code IDEs in the app editor"},[u.codeRuntime]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Code runtime, used to define the runtime environment for code snippets"},[u.consoleLog]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Console log, used to log messages to the console in code snippets"},[u.output]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Output bit, used to display output from code snippets"},[u.stdout]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Standard output bit, used to display standard output from code snippets"},[u.sandbox]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox bit, used to create a sandboxed environment for code execution"},[u.sandboxOutputJson]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox output JSON bit, used to display JSON output from sandboxed code"},[u.sandboxOutputMarkup]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox output markup bit, used to display markup output from sandboxed code"},[u.sandboxOutputRender]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox output render bit, used to display rendered output from sandboxed code"},[u.step]:{since:"1.5.1",title:"Step",bitGroups:[d.static,d.steps],baseBitType:u.article,description:"Step bit, used to define steps in a process or guide"},[u.stepImageScreenshot]:{since:"1.5.1",title:"Step Image Screenshot",bitGroups:[d.static,d.steps],baseBitType:u.image,description:"Step image screenshot bit, used to display screenshots in steps"},[u.stepImageScreenshotWithPointer]:{since:"1.5.1",title:"Step Image Screenshot With Pointer",bitGroups:[d.static,d.steps],baseBitType:u.image,description:"Step image screenshot with pointer bit, used to display screenshots with pointers in steps",tags:[{key:ye.property_pointerTop,description:"The top position of the pointer in the screenshot",format:v,minCount:1,maxCount:1},{key:ye.property_pointerLeft,description:"The left position of the pointer in the screenshot",format:v,minCount:1,maxCount:1}]},[u.milestone]:{since:"1.20.0",bitGroups:[d.static],baseBitType:u.step,description:"Milestone bit, used to define milestones in a process or guide"},[u.conversationLeft1]:{since:"1.3.0",title:"Conversation Left",bitGroups:[d.conversation,d.static],baseBitType:u._standard,description:"Conversation left bit, used to create a conversation on the left side of the screen",tags:[{key:ye.group_person,exportJsonKey:{partner:{name:"$"}},description:"Tags for the person in the conversation"}]},[u.conversationLeft1Scream]:{since:"1.3.0",title:"Conversation Left Scream",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation left scream bit, used to create a conversation with a scream on the left side of the screen"},[u.conversationLeft1Thought]:{since:"1.3.0",title:"Conversation Left Thought",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation left thought bit, used to create a conversation with a thought on the left side of the screen"},[u.conversationRight1]:{since:"1.3.0",title:"Conversation Right",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation right bit, used to create a conversation on the right side of the screen"},[u.conversationRight1Scream]:{since:"1.3.0",title:"Conversation Right Scream",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation right scream bit, used to create a conversation with a scream on the right side of the screen"},[u.conversationRight1Thought]:{since:"1.3.0",title:"Conversation Right Thought",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation right thought bit, used to create a conversation with a thought on the right side of the screen"},[u.clozeAndMultipleChoiceTextConversationLeft1]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation left bit, used for conversations with cloze and multiple choice text on the left side of the screen"},[u.clozeAndMultipleChoiceTextConversationLeft1Scream]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation left scream bit, used for conversations with cloze and multiple choice text and a scream on the left side of the screen"},[u.clozeAndMultipleChoiceTextConversationLeft1Thought]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation left thought bit, used for conversations with cloze and multiple choice text and a thought on the left side of the screen"},[u.clozeAndMultipleChoiceTextConversationRight1]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation right bit, used for conversations with cloze and multiple choice text on the right side of the screen"},[u.clozeAndMultipleChoiceTextConversationRight1Scream]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation right scream bit, used for conversations with cloze and multiple choice text and a scream on the right side of the screen"},[u.clozeAndMultipleChoiceTextConversationRight1Thought]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation right thought bit, used for conversations with cloze and multiple choice text and a thought on the right side of the screen"},[u.advertising]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"General advertising content bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingAdvertorial]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"Advertorial content bit (sponsored article)",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingCallToAction]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call-to-action for advertising",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingCallToActionMeeting]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call-to-action for meeting or appointment",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingBanner]:{since:"4.2.0",title:"Advertising Banner",bitGroups:[d.static],baseBitType:u.image,description:"Banner advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingSkyscraper]:{since:"4.2.0",title:"Advertising Skyscraper",bitGroups:[d.static],baseBitType:u.image,description:"Skyscraper (vertical) advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingRectangle]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Rectangle advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingFullPage]:{since:"4.2.0",title:"Full-page Advertising",bitGroups:[d.static],baseBitType:u.image,description:"Full-page advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingHalfPage]:{since:"4.2.0",title:"Half-Page Advertising",bitGroups:[d.static],baseBitType:u.image,description:"Half-page advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingQuarterPage]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Quarter-page advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingClassifiedPage]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Classifieds advertisement page bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingLandscape]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Landscape format advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingPortrait]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Portrait format advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.cookPreparation]:{since:"1.3.0",title:"Cook Preparation",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook preparation bit"},[u.cookStep]:{since:"1.3.0",title:"Cook Step",bitGroups:[d.cooking,d.static,d.steps],baseBitType:u.article,description:"Cook step bit"},[u.cookIngredients]:{since:"1.5.16",title:"Cook Ingredients",bitGroups:[d.cooking,d.static],baseBitType:u._standard,description:"Cook ingredients bit, used to define ingredients for recipes",tags:[{key:ye.group_technicalTerm,description:"Tags for technical terms related to ingredients"},{key:ye.property_servings,jsonKey:"servings.servings",exportJsonKey:{servings:{servings:"$"}},description:"The number of servings for the ingredients",format:_,chain:[{key:ye.property_unit,description:"The unit of measurement for the ingredients (singular)",format:v},{key:ye.property_unitPlural,description:"The unit of measurement for the ingredients (plural)",format:v},{key:ye.property_unitAbbr,description:"The abbreviation for the unit of measurement (singular)",format:v},{key:ye.property_unitAbbrPlural,description:"The abbreviation for the unit of measurement (plural)",format:v},{key:ye.property_decimalPlaces,description:"The number of decimal places for the ingredient quantity",format:_,defaultValue:"1"},{key:ye.property_disableCalculation,description:"If the ingredient quantity calculation should be disabled",format:C},{exportJsonKey:{hint:"$"},key:ye.tag_hint,description:"Hint for the ingredient, used to provide additional information",format:v}]}],cardSet:Y},[u.recipe]:{since:"1.5.24",title:"Recipe",bitGroups:[d.recipes,d.static],baseBitType:u.cookIngredients,description:"Recipe bit, used to define a recipe"},[u.cookRemark]:{since:"1.3.0",title:"Cook Remark",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook remark bit, used to add remarks to recipes"},[u.cookVariation]:{since:"1.3.0",title:"Cook Variation",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook variation bit, used to define variations of recipes"},[u.cookInsert]:{since:"1.3.0",title:"Cook Insert",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook insert bit, used to insert additional content in recipes"},[u.cookNoteOnQuantity]:{since:"3.27.0",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook note on quantity bit, used to add notes on ingredient quantities in recipes"},[u.cookArrangement]:{since:"1.3.0",title:"Cook Arrangement",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook arrangement bit, used to arrange ingredients or steps in recipes"},[u.cookPracticeAdvise]:{since:"1.3.0",title:"Cook Practice Advise",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook practice advice bit, used to provide practical advice in recipes"},[u.cookPlate]:{since:"1.3.0",title:"Cook Plate",bitGroups:[d.static],baseBitType:u.article,description:"Cook plate bit, used to define the presentation of a dish"},[u.cookRecommendation]:{since:"1.3.0",title:"Cook Recommendation",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook recommendation bit, used to recommend dishes or ingredients"},[u.cookPersonalRecommendation]:{since:"1.3.0",title:"Cook Personal Recommendation",bitGroups:[d.static],baseBitType:u.article,description:"Cook personal recommendation bit, used to provide personal recommendations for dishes or ingredients"},[u.cookSideDrink]:{since:"1.3.0",title:"Cook Side Drink",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook side drink bit, used to define side drinks for dishes"},[u.cookSideDish]:{since:"1.3.0",title:"Cook Side Dish",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook side dish bit, used to define side dishes for main courses"},[u.cookTimer]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Cook timer bit, used to set timers for cooking steps"},[u.document]:{since:"1.3.0",title:"Document",bitGroups:[d.static],baseBitType:u._standard,description:"Document bit, used to define documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize documents"},{key:ye.group_resourceDocument,description:"Tags for document resources, used to define documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.documentDownload]:{since:"1.3.0",title:"Document Download",bitGroups:[d.static],baseBitType:u._standard,description:"Document download bit, used to define downloadable documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize downloadable documents"},{key:ye.group_resourceDocumentDownload,description:"Tags for downloadable document resources, used to define downloadable documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.leDocumentDownload]:{since:"3.18.0",bitGroups:[d.static],baseBitType:u.documentDownload,description:"LE Document download bit, used to define downloadable documents in learning experiences"},[u.documentEmbed]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Document embed bit, used to embed documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize embedded documents"},{key:ye.group_resourceDocumentEmbed,description:"Tags for embedded document resources, used to define embedded documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.documentLink]:{since:"1.3.0",title:"Document Link",bitGroups:[d.static],baseBitType:u._standard,description:"Document link bit, used to link to documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize document links"},{key:ye.group_resourceDocumentLink,description:"Tags for document link resources, used to define links to documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.essay]:{since:"1.3.0",title:"Essay",bitGroups:[d.essay,d.quizzes],baseBitType:u._standard,description:"Essay bit, used to define essays in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.property_reasonableNumOfChars,description:"The reasonable number of characters for the essay",format:_,nullable:!0},{key:ye.property_sampleSolution,description:"Sample solution for the essay, used as a reference answer",format:v},{key:ye.property_partialAnswer,description:"Partial answer for the essay, used to indicate incomplete answers",format:v},{key:ye.property_reference,description:"Reference for the essay, used to link to external resources",format:v,maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the essay bit",format:T,nullable:!0}],rootExampleType:h},[u.coachSelfReflectionEssay]:{since:"1.3.0",title:"Coach Self Reflection Essay",bitGroups:[d.quizzes],baseBitType:u.essay,description:"Coach self-reflection essay bit"},[u.coachCallToActionEssay]:{since:"1.3.0",title:"Coach Call To Action Essay",bitGroups:[d.quizzes],baseBitType:u.essay,description:"Coach call to action essay bit"},[u.example]:{since:"1.3.0",title:"Example",bitGroups:[d.static],baseBitType:u._standard,description:"Example bit, used to provide examples in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"The title of the example"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the example bit",format:v,nullable:!0}],rootExampleType:h},[u.exampleAlt]:{since:"1.16.0",title:"Example Alternative",bitGroups:[d.static],baseBitType:u.example,description:"Alternative example bit, used to provide alternative examples in articles or books"},[u.standardExampleNormative]:{since:"1.16.0",title:"Standard Example (Normative)",bitGroups:[d.static],baseBitType:u.example,description:"Standard normative example bit, used to provide normative examples in articles or books"},[u.standardExampleNonNormative]:{since:"1.16.0",title:"Standard Example (Non Normative)",bitGroups:[d.static],baseBitType:u.example,description:"Standard non-normative example bit, used to provide non-normative examples in articles or books"},[u.smartStandardExampleNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardExampleNormative,description:"Smart standard normative example bit, used to provide normative examples in smart standards"},[u.smartStandardExampleNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardExampleNonNormative,description:"Smart standard non-normative example bit, used to provide non-normative examples in smart standards"},[u.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardExampleNormative,description:"Smart standard normative example collapsible bit, used to provide normative examples in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardExampleNonNormative,description:"Smart standard non-normative example collapsible bit, used to provide non-normative examples in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.authorContentBitGenerator]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"Body contains the content of one or more bits to be created by the bit generator",tags:[{key:ye.property_classification,description:"Classification for the created bits",format:v,maxCount:m}]},[u.appAiPrompt]:{since:"1.3.0",title:"AI Prompt",bitGroups:[d.static],baseBitType:u.article,description:"App AI prompt bit, used to create AI prompts in the app editor"},[u.aiPrompt]:{since:"1.3.0",title:"AI Prompt",bitGroups:[d.static],baseBitType:u.article,description:"AI prompt bit, used to create AI prompts in articles or books"},[u.aiChat]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI chat bit, used to create an AI chat"},[u.aiEditor]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI editor bit, used to create an AI editor"},[u.aiTutor]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI tutor bit, used to create an AI tutor"},[u.aiWbt]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI WBT bit, used to create an AI WBT (Web-Based Training)"},[u.articleAi]:{since:"1.3.0",title:"AI Article",bitGroups:[d.static],baseBitType:u.article,description:"Article AI bit, used to create AI-generated articles",tags:[{key:ye.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:C,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[u.articleAttachment]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Article attachment bit, used to attach files to articles"},[u.assignment]:{since:"1.3.0",title:"Assignment",bitGroups:[d.assignment,d.quizzes],baseBitType:u.essay,description:"Assignment bit, used to define assignments in articles or books"},[u.audioTranscript]:{since:"1.3.0",title:"Audio Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Audio transcript bit, used to provide transcripts for audio files in articles or books"},[u.bitmarkExample]:{since:"1.3.0",title:"bitmark Example",bitGroups:[d.static],baseBitType:u.example,description:"Bitmark example bit, used to provide examples for bitmarks in articles or books"},[u.blogArticle]:{since:"1.3.0",title:"Blog Article",bitGroups:[d.static],baseBitType:u.article,description:"Blog article bit, used to define blog articles in articles or books"},[u.bug]:{since:"1.3.0",title:"Bug",bitGroups:[d.static,d.warning],baseBitType:u.article,description:"Bug bit, used to report bugs in articles or books"},[u.bugAlt]:{since:"1.16.0",title:"Bug Alternative",bitGroups:[d.static],baseBitType:u.bug,description:"Alternative bug bit, used to report bugs in articles or books with alternative styling"},[u.checklist]:{since:"1.3.0",title:"Checklist",bitGroups:[d.static],baseBitType:u.article,description:"Checklist bit, used to create checklists in articles or books"},[u.coachAudioTranscript]:{since:"1.3.0",title:"Coach Audio Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Coach audio transcript bit, used to provide transcripts for audio files in coaching articles or books"},[u.coachCallToActionChecklist]:{since:"1.3.0",title:"Coach Call To Action Checklist",bitGroups:[d.static],baseBitType:u.article,description:"Coach call to action checklist bit, used to create checklists in coaching articles or books"},[u.coachHomeRules]:{since:"1.3.0",title:"Coach Home Rules",bitGroups:[d.static],baseBitType:u.article,description:"Coach home rules bit, used to define home rules in coaching articles or books"},[u.coachVideoTranscript]:{since:"1.3.0",title:"Coach Video Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Coach video transcript bit, used to provide transcripts for video files in coaching articles or books"},[u.correction]:{since:"1.3.0",title:"Correction",bitGroups:[d.correction,d.quizzes,d.static],baseBitType:u.article,description:"Correction bit, used to provide corrections in articles or books"},[u.danger]:{since:"1.3.0",title:"Danger",bitGroups:[d.static,d.warning],baseBitType:u.article,description:"Danger bit, used to highlight dangerous or critical information in articles or books"},[u.dangerAlt]:{since:"1.16.0",title:"Danger Alternative",bitGroups:[d.static],baseBitType:u.article,description:"Alternative danger bit, used to highlight dangerous or critical information in articles or books with alternative styling"},[u.definitionTerm]:{since:"1.34.0",title:"Definition Term",bitGroups:[d.static],baseBitType:u.article,description:"Definition term bit, used to define terms in articles or books"},[u.deleted]:{since:"3.9.0",title:"Deleted Bit",bitGroups:[d.static],baseBitType:u.article,description:"Deleted bit, used to indicate deleted content in articles or books"},[u.details1]:{since:"1.3.0",title:"Details",bitGroups:[d.static],baseBitType:u.article,description:"Details bit, used to provide additional details in articles or books"},[u.details]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Details bit, used to provide additional details in articles or books"},[u.qAndA]:{since:"3.5.0",bitGroups:[d.static],baseBitType:u.article,description:"Q&A bit, used to create question and answer sections in articles or books"},[u.editorial]:{since:"1.3.0",title:"Editorial",bitGroups:[d.static],baseBitType:u.article,description:"Editorial bit, used to provide editorial content in articles or books"},[u.editorNote]:{since:"1.3.0",title:"Editor Note",bitGroups:[d.static],baseBitType:u.article,description:"Editor note bit, used to provide notes from the editor in articles or books"},[u.featured]:{since:"1.3.0",title:"Featured",bitGroups:[d.static],baseBitType:u.article,description:"Featured bit, used to highlight featured content in articles or books"},[u.glossaryTerm]:{since:"1.33.0",title:"Glossary Term",bitGroups:[d.static],baseBitType:u.article,description:"Glossary term bit, used to define glossary terms in articles or books"},[u.help]:{since:"1.3.0",title:"Help",bitGroups:[d.static],baseBitType:u.article,description:"Help bit, used to provide help or support information in articles or books"},[u.helpAlt]:{since:"1.16.0",title:"Help Alt",bitGroups:[d.static],baseBitType:u.help,description:"Alternative help bit, used to provide help or support information in articles or books with alternative styling"},[u.hint]:{since:"1.3.0",title:"Hint",bitGroups:[d.static],baseBitType:u.article,description:"Hint bit, used to provide hints or tips in articles or books"},[u.hintAlt]:{since:"1.16.0",title:"Hint Alternative",bitGroups:[d.static],baseBitType:u.hint,description:"Alternative hint bit, used to provide hints or tips in articles or books with alternative styling"},[u.indexTerm]:{since:"1.33.0",title:"Index Term",bitGroups:[d.static],baseBitType:u.article,description:"Index term bit, used to define index terms in articles or books"},[u.info]:{since:"1.3.0",title:"Info",bitGroups:[d.static],baseBitType:u.article,description:"Info bit, used to provide informational content in articles or books"},[u.infoAlt]:{since:"1.16.0",title:"Info Alternative",bitGroups:[d.static],baseBitType:u.info,description:"Alternative info bit, used to provide informational content in articles or books with alternative styling"},[u.langLearningOutcomes]:{since:"1.3.0",title:"Language Learning Outcomes",bitGroups:[d.static],baseBitType:u.article,description:"Language learning outcomes bit, used to define learning outcomes in language articles or books"},[u.langEnablingLanguageSkills]:{since:"1.3.0",title:"Language Enabling Language Skills",bitGroups:[d.static],baseBitType:u.article,description:"Language enabling skills bit, used to define enabling language skills in language articles or books"},[u.langLifeSkills]:{since:"1.3.0",title:"Language Life Skills",bitGroups:[d.static],baseBitType:u.article,description:"Language life skills bit, used to define life skills in language articles or books"},[u.langEnglishAroundWorld]:{since:"1.3.0",title:"Language English Around World",bitGroups:[d.static],baseBitType:u.article,description:"Language English around the world bit, used to provide information about English usage around the world in language articles or books"},[u.langGoodToKnow]:{since:"1.3.0",title:"Language Good To Know",bitGroups:[d.static],baseBitType:u.article,description:"Language good to know bit, used to provide useful information in language articles or books"},[u.langLearningGoal]:{since:"1.3.0",title:"Language Learning Goal",bitGroups:[d.static],baseBitType:u.article,description:"Language learning goal bit, used to define learning goals in language articles or books"},[u.langLearningStrategy]:{since:"1.3.0",title:"Language Learning Strategy",bitGroups:[d.static],baseBitType:u.article,description:"Language learning strategy bit, used to define learning strategies in language articles or books"},[u.langLikeALocal]:{since:"1.3.0",title:"Language Like A Local",bitGroups:[d.static],baseBitType:u.article,description:"Language like a local bit, used to provide tips for speaking like a local in language articles or books"},[u.langMaterial]:{since:"1.3.0",title:"Language Material",bitGroups:[d.static],baseBitType:u.article,description:"Language material bit, used to provide language learning materials in language articles or books"},[u.langUsefulPhrases]:{since:"1.3.0",title:"Language Useful Phrases",bitGroups:[d.static],baseBitType:u.article,description:"Language useful phrases bit, used to provide useful phrases in language articles or books"},[u.langLevelDown]:{since:"1.3.0",title:"Language Level Down",bitGroups:[d.static],baseBitType:u.article,description:"Language level down bit, used to provide information about lower language levels in language articles or books"},[u.langLevelUp]:{since:"1.3.0",title:"Language Level Up",bitGroups:[d.static],baseBitType:u.article,description:"Language level up bit, used to provide information about higher language levels in language articles or books"},[u.langExtraActivity]:{since:"1.3.0",title:"Language Extra Activity",bitGroups:[d.static],baseBitType:u.article,description:"Language extra activity bit, used to provide additional activities in language articles or books"},[u.langVideoScript]:{since:"1.3.0",title:"Language Video Script",bitGroups:[d.static],baseBitType:u.article,description:"Language video script bit, used to provide scripts for language learning videos in articles or books"},[u.langAudioScript]:{since:"1.3.0",title:"Language Audio Script",bitGroups:[d.static],baseBitType:u.article,description:"Language audio script bit, used to provide scripts for language learning audio files in articles or books"},[u.langVocabulary]:{since:"1.3.0",title:"Language Vocabulary",bitGroups:[d.static],baseBitType:u.article,description:"Language vocabulary bit, used to provide vocabulary lists in language articles or books"},[u.langHomework]:{since:"1.3.0",title:"Language Homework",bitGroups:[d.static],baseBitType:u.article,description:"Language homework bit, used to define homework assignments in language articles or books"},[u.langTeacherNote]:{since:"1.3.0",title:"Language Teacher Note",bitGroups:[d.static],baseBitType:u.article,description:"Language teacher note bit, used to provide notes for teachers in language articles or books"},[u.langTeacherPronunciation]:{since:"1.3.0",title:"Language Teacher Pronunciation",bitGroups:[d.static],baseBitType:u.article,description:"Language teacher pronunciation bit, used to provide pronunciation guidance for teachers in language articles or books"},[u.list]:{since:"1.22.0",title:"List",bitGroups:[d.static],baseBitType:u.article,description:"List bit, used to create lists in articles or books"},[u.standardList]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.article,description:"Standard list bit, used to create standard lists in articles or books"},[u.smartStandardList]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardList,description:"Smart standard list bit, used to create smart standard lists in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"ref-list","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardListCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardList,description:"Smart standard list collapsible bit, used to create collapsible smart standard lists in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.message]:{since:"1.3.0",title:"Message",bitGroups:[d.message,d.static],baseBitType:u.article,description:"Message bit, used to create messages in articles or books"},[u.newspaperArticle]:{since:"1.3.0",title:"Newspaper Article",bitGroups:[d.static],baseBitType:u.article,description:"Newspaper article bit, used to define newspaper articles in articles or books"},[u.note]:{since:"1.3.0",title:"Note",bitGroups:[d.static],baseBitType:u.article,description:"Note bit, used to provide notes in articles or books"},[u.noteAlt]:{since:"1.16.0",title:"Note Alternative",bitGroups:[d.static],baseBitType:u.note,description:"Alternative note bit, used to provide notes in articles or books with alternative styling"},[u.standardNoteNormative]:{since:"1.16.0",title:"Standard Note (Normative)",bitGroups:[d.static],baseBitType:u.note,description:"Standard normative note bit, used to provide normative notes in articles or books"},[u.standardNoteNonNormative]:{since:"1.16.0",title:"Standard Note (Non Normative)",bitGroups:[d.static],baseBitType:u.note,description:"Standard non-normative note bit, used to provide non-normative notes in articles or books"},[u.smartStandardNoteNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardNoteNormative,description:"Smart standard normative note bit, used to provide normative notes in smart standards"},[u.smartStandardNoteNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardNoteNonNormative,description:"Smart standard non-normative note bit, used to provide non-normative notes in smart standards",mappingKeys:{"xml-niso-iec":{"@el":"non-normative-note","@attr":{id:"$customerId"},"@children":"$","▼":"$anchor"}}},[u.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardNoteNormative,description:"Smart standard normative note collapsible bit, used to provide normative notes in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardNoteNonNormative,description:"Smart standard non-normative note collapsible bit, used to provide non-normative notes in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.noteAi]:{since:"1.3.0",title:"Note AI",bitGroups:[d.static],baseBitType:u.note,description:"Note AI bit, used to create AI-generated notes in articles or books",tags:[{key:ye.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:C,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[u.notebookArticle]:{since:"1.3.0",title:"Notebook Article",bitGroups:[d.static],baseBitType:u.article,description:"Notebook article bit, used to define notebook articles in articles or books"},[u.preparationNote]:{since:"1.3.0",title:"Preparation Note",bitGroups:[d.preparationNote,d.quizzes,d.static],baseBitType:u.article,description:"Preparation note bit, used to provide preparation notes in articles or books"},[u.printThisBook]:{since:"5.4.0",bitGroups:[d.static],baseBitType:u._standard,description:"Print this book bit, used to create a button that prints the entire book",tags:[{key:ye.property_buttonCaption,description:"The caption of the print button",format:v}]},[u.printThisChapter]:{since:"5.4.0",bitGroups:[d.static],baseBitType:u._standard,description:"Print this chapter bit, used to create a button that prints the current chapter",tags:[{key:ye.property_buttonCaption,description:"The caption of the print button",format:v},{key:ye.property_printParentChapterLevel,description:"The parent chapter level to print",format:_,defaultValue:"-1"}]},[u.printPageBreak]:{since:"5.4.0",bitGroups:[d.static],baseBitType:u.article,description:"Print page break bit, used to create page breaks for printing in articles or books"},[u.releaseNotesSummary]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Release notes summary bit, used to summarize release notes in articles or books"},[u.remark]:{since:"1.3.0",title:"Remark",bitGroups:[d.static],baseBitType:u.article,description:"Remark bit, used to provide remarks in articles or books"},[u.remarkAlt]:{since:"1.16.0",title:"Remark Alternative",bitGroups:[d.static],baseBitType:u.remark,description:"Alternative remark bit, used to provide remarks in articles or books with alternative styling"},[u.standardRemarkNormative]:{since:"1.16.0",title:"Standard Remark (Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard normative remark bit, used to provide normative remarks in articles or books"},[u.standardRemarkNonNormative]:{since:"1.16.0",title:"Standard Remark (Non Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard non-normative remark bit, used to provide non-normative remarks in articles or books"},[u.smartStandardRemarkNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkNormative,description:"Smart standard normative remark bit, used to provide normative remarks in smart standards"},[u.smartStandardRemarkNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkNonNormative,description:"Smart standard non-normative remark bit, used to provide non-normative remarks in smart standards",mappingKeys:{"xml-niso-iec":{"@el":"non-normative-note","@attr":{"content-type":"warning|caution",id:"$customerId"},"@children":"$","▼":"$anchor"}}},[u.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkNormative,description:"Smart standard normative remark collapsible bit, used to provide normative remarks in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkNonNormative,description:"Smart standard non-normative remark collapsible bit, used to provide non-normative remarks in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.selfAssessment]:{since:"1.3.0",title:"Self Assessment",bitGroups:[d.selfAssessment,d.static,d.surveys],baseBitType:u.article,description:"Self-assessment bit, used to create self-assessment sections in articles or books"},[u.separator]:{since:"1.4.15",title:"Separator",bitGroups:[d.static],baseBitType:u.article,description:"Separator bit, used to create visual separators in articles or books",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.separatorAlt]:{since:"1.16.0",title:"Separator Alternative",bitGroups:[d.static],baseBitType:u.separator,description:"Alternative separator bit, used to create visual separators in articles or books with alternative styling",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.sticker]:{since:"1.5.28",bitGroups:[d.static],baseBitType:u.article,description:"Sticker bit, used to create stickers in articles or books"},[u.sideNote]:{since:"1.3.0",title:"Side Note",bitGroups:[d.static],baseBitType:u.article,description:"Side note bit, used to provide side notes in articles or books"},[u.summary]:{since:"1.3.0",title:"Summary",bitGroups:[d.static],baseBitType:u.article,description:"Summary bit, used to provide summaries in articles or books"},[u.summaryAi]:{since:"1.3.0",title:"Summary AI",bitGroups:[d.static],baseBitType:u.summary,description:"AI-generated summary bit",tags:[{key:ye.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:C,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[u.videoTranscript]:{since:"1.3.0",title:"Video Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Video transcript bit, used to provide transcripts for video files in articles or books"},[u.warning]:{since:"1.3.0",title:"Warning",bitGroups:[d.static,d.warning],baseBitType:u.article,description:"Warning bit, used to highlight warnings in articles or books"},[u.warningAlt]:{since:"1.16.0",title:"Warning Alternative",bitGroups:[d.static],baseBitType:u.warning,description:"Alternative warning bit, used to highlight warnings in articles or books with alternative styling"},[u.workbookArticle]:{since:"1.3.0",title:"Workbook Article",bitGroups:[d.static],baseBitType:u.article,description:"Workbook article bit, used to define workbook articles in articles or books"},[u.collapsible]:{since:"1.21.0",title:"Collapsible",bitGroups:[d.static],deprecated:"5.37.0",baseBitType:u.article,description:"Collapsible bit, used to create collapsible sections in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.sideNoteCollapsible]:{since:"1.21.0",title:"Side Note Collapsible",deprecated:"5.37.0",baseBitType:u.sideNote,description:"Side note collapsible bit, used to create collapsible side notes in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.infoCollapsible]:{since:"1.21.0",title:"Info Collapsible",deprecated:"5.37.0",baseBitType:u.info,description:"Info collapsible bit, used to create collapsible informational sections in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.remarkCollapsible]:{since:"1.21.0",title:"Remark Collapsible",deprecated:"5.37.0",baseBitType:u.remark,description:"Remark collapsible bit, used to create collapsible remarks in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.warningCollapsible]:{since:"1.21.0",title:"Warning Collapsible",deprecated:"5.37.0",baseBitType:u.warning,description:"Warning collapsible bit, used to create collapsible warnings in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.dangerCollapsible]:{since:"1.21.0",title:"Danger Collapsible",deprecated:"5.37.0",baseBitType:u.danger,description:"Danger collapsible bit, used to create collapsible danger sections in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.noteCollapsible]:{since:"1.21.0",title:"Note Collapsible",deprecated:"5.37.0",baseBitType:u.note,description:"Note collapsible bit, used to create collapsible notes in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.exampleCollapsible]:{since:"1.21.0",title:"Example Collapsible",deprecated:"5.37.0",baseBitType:u.example,description:"Example collapsible bit, used to create collapsible examples in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.hintCollapsible]:{since:"1.21.0",title:"Hint Collapsible",deprecated:"5.37.0",baseBitType:u.hint,description:"Hint collapsible bit, used to create collapsible hints in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.bugCollapsible]:{since:"1.21.0",title:"Bug Collapsible",deprecated:"5.37.0",baseBitType:u.bug,description:"Bug collapsible bit, used to create collapsible bug reports in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.platformPath]:{since:"3.14.1",bitGroups:[d.static],baseBitType:u._standard,description:"Platform path bit, used to define paths in the platform",tags:[{key:ye.property_path,description:"The path for the platform, used to define navigation paths",format:v}]},[u.appCalculatorLatex]:{since:"4.10.0",title:"Calculator LaTeX",bitGroups:[d.static],baseBitType:u.article,description:"A LaTeX calculator bit, used to create a calculator that can interpret LaTeX expressions",tags:[{key:ye.property_formula,description:"The LaTeX formula for the calculator, used to define the calculation logic",format:v}]},[u.container]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.article,description:"Container bit, used to group bits together in articles or books",tags:[{key:ye.property_allowedBit,description:"Allowed bits in the container, used to define which bits can be placed inside",format:v,maxCount:m}]},[u.containerWrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container wrap bit, used to wrap content in a container"},[u.containerNowrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container nowrap bit, used to prevent wrapping of content in a container"},[u.containerNowrapStretch]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container nowrap stretch bit, used to stretch content without wrapping in a container"},[u.containerGroup]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container group bit, used to group multiple containers together"},[u.containerFolder]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container folder bit, used to create folders for organizing bits"},[u.containerCarousel]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container carousel bit, used to create carousels for displaying bits"},[u.containerCards]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container cards bit, used to create card layouts for displaying bits"},[u.containerGrid]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container grid bit, used to create grid layouts for displaying bits"},[u.containerStack]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container stack bit, used to create stacked layouts for displaying bits"},[u.containerSlides]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container slides bit, used to create slide presentations for displaying bits"},[u.containerGallery]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container gallery bit, used to create galleries for displaying bits"},[u.containerScroller]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container scroller bit, used to create scrolling sections for displaying bits"},[u.containerTabs]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container tabs bit, used to create tabbed sections for displaying bits"},[u.containerAccordionTabs]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container accordion tabs bit, used to create accordion-style tabbed sections for displaying bits"},[u.containerFolderAll]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container folder all bit, used to create folders that can contain all types of bits"},[u.containerBits2]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container bits 2 bit, used to create a container for bits with additional features"},[u.containerCookRecipe]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container cook recipe bit, used to create recipe containers for displaying cooking recipes"},[u.containerNewsArticle]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container news article bit, used to create containers for news articles"},[u.containerPreview]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container preview bit, used to create preview sections for displaying bits"},[u.pageContainer]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Page container bit, used to create containers for pages in articles or books"},[u.pageContainerWrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container wrap bit, used to wrap content in a page container"},[u.pageContainerNowrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container nowrap bit, used to prevent wrapping of content in a page container"},[u.pageContainerNowrapStretch]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container nowrap stretch bit, used to stretch content without wrapping in a page container"},[u.pageContainerFolder]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container folder bit, used to create folders for organizing bits in a page container"},[u.pageContainerGroup]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container group bit, used to group multiple page containers together"},[u.metalevelExplanation]:{since:"1.10.0",bitGroups:[d.static],baseBitType:u.article,description:"Metalevel explanation bit, used to provide explanations for metalevels in articles or books"},[u.module]:{since:"1.5.26",title:"Module",bitGroups:[d.static],baseBitType:u.article,description:"Module bit, used to define modules in articles or books",tags:[{key:ye.property_hasBookNavigation,description:"Indicates if the module has book navigation",format:C,defaultValue:"true"},{key:ye.property_productId,description:"Product ID for the module, used to link to a specific product",format:v,minCount:1,maxCount:m},{key:ye.property_duration,description:"Duration of the module, used to indicate how long it takes to complete",format:v}]},[u.moduleProduct]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.module,description:"Module product bit, used to define products in modules",tags:[{key:ye.property_productId,description:"Product ID for the module product, used to link to a specific product",format:v,minCount:1,maxCount:1}]},[u.exampleList]:{since:"1.4.13",bitGroups:[d.static],baseBitType:u.example,description:"Example list bit, used to create lists of examples in articles or books",cardSet:H,rootExampleType:h},[u.extractorPage]:{since:"1.5.17",title:"Extractor Page",bitGroups:[d.extractor,d.pages],baseBitType:u.image,description:"Extractor page bit, used to extract pages from images"},[u.extractorPageCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPage,description:"Collapsible extractor page bit, used to extract pages from images with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorPageWithBlocks]:{since:"1.5.21",title:"Extractor Page With Blocks",bitGroups:[d.extractor],baseBitType:u.image,description:"Extractor page with blocks bit, used to extract pages with blocks from images"},[u.extractorPageWithBlocksCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageWithBlocks,description:"Collapsible extractor page with blocks bit, used to extract pages with blocks from images with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorConfiguration]:{since:"1.7.1",title:"Extractor Configuration",bitGroups:[d.extractor],baseBitType:u._standard,description:"Extractor configuration bit, used to configure extractors in articles or books",textFormatDefault:S.plainText},[u.extractorBlueprintConfiguration]:{since:"5.11.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor blueprint configuration bit, used to specify extractor blueprint configuration when extracting from blueprints",textFormatDefault:S.plainText},[u.extractorImage]:{since:"4.3.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor images bit, used for images extracted from PDFs",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for logo grave images, used to define additional properties"},{key:ye.group_resourceImageNoZoom,description:"Resource image tags for logo grave images, used to attach images",exportJsonKey:{images:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:m}],resourceAttachmentAllowed:!1,textFormatDefault:S.plainText},[u.extractorImageCollapsible]:{since:"4.3.0",title:"Extractor Collapsible Image",deprecated:"5.37.0",baseBitType:u.extractorImage,description:"Collapsible extractor images bit, used for images extracted from PDFs",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorBlueprint]:{since:"5.12.0",title:"Extractor Blueprint",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor blueprint bit, used to provide blueprint information about extractors",textFormatDefault:S.json,tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for the blueprint reference image"},{key:ye.group_resourceImage,description:"Optional uncropped reference page image, used so authoring tools can compute crops against the original page dimensions"}],resourceAttachmentAllowed:!1},[u.extractorInformation]:{since:"3.8.0",title:"Extractor Information",bitGroups:[d.extractor],baseBitType:u._standard,description:"Extractor information bit, used to provide information about extractors in articles or books",textFormatDefault:S.json},[u.extractorTheme]:{since:"5.7.0",title:"Theme",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor theme bit, used to store design/theme JSON extracted from documents",textFormatDefault:S.json},[u.extractorReconcile]:{since:"5.35.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor reconcile bit, used to store PDF-compare reconciliation decisions (config and issues) in JSON",textFormatDefault:S.json},[u.extractorAiChat]:{since:"3.19.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor AI chat bit, used to create AI chat interfaces for extractors in articles or books"},[u.extractorBlock]:{since:"1.5.16",title:"Extractor Block",bitGroups:[d.extractor],baseBitType:u._standard,description:"Extractor block bit, used to define blocks within extractor pages",tags:[{key:ye.property_blockId,description:"Unique identifier for the block, used to reference the block in extractor pages",format:v},{key:ye.property_pageNo,description:"Page number for the block, used to indicate the page on which the block appears",format:_,nullable:!0},{key:ye.property_x,description:"X-coordinate for the block, used to position the block on the page",format:_,nullable:!0},{key:ye.property_y,description:"Y-coordinate for the block, used to position the block on the page",format:_,nullable:!0},{key:ye.property_width,description:"Width of the block, used to define the size of the block on the page",format:_,nullable:!0},{key:ye.property_height,description:"Height of the block, used to define the size of the block on the page",format:_,nullable:!0},{key:ye.property_index,description:"Index of the block, used to order blocks within the extractor page",format:_,nullable:!0},{key:ye.property_classification,description:"Classification for the block, used to categorize the block within the extractor",format:v},{key:ye.property_availableClassifications,description:"Available classifications for the block, used to define possible classifications",format:v,maxCount:m},{key:ye.group_resourceImage,description:"Resource image for the block, used to attach images to the block",minCount:1}],resourceAttachmentAllowed:!1},[u.extractorRepeatedText]:{since:"1.5.21",title:"Extractor Repeated Text",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor repeated text bit, used to define repeated text in extractor pages"},[u.extractorRule]:{since:"5.17.0",title:"Extractor Rule",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor rule bit, used to define extraction rules with reference images and instructions",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for extraction rule images"},{key:ye.group_resourceImage,description:"Resource image tags for the rule reference image",minCount:1}],resourceAttachmentAllowed:!1,textFormatDefault:S.plainText},[u.extractorPageNumber]:{since:"1.5.21",title:"Extractor Page Number",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor page number bit, used to define page numbers in extractor pages"},[u.extractorPageNumberCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageNumber,description:"Collapsible extractor page number bit, used to define page numbers in extractor pages with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorPageHeader]:{since:"1.5.21",title:"Extractor Page Header",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor page header bit, used to define headers in extractor pages"},[u.extractorPageHeaderCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageHeader,description:"Collapsible extractor page header bit, used to define headers in extractor pages with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorPageFooter]:{since:"1.5.21",title:"Extractor Page Footer",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor page footer bit, used to define footers in extractor pages"},[u.extractorPageFooterCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageFooter,description:"Collapsible extractor page footer bit, used to define footers in extractor pages with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.pageOpenBook]:{since:"1.5.10",title:"Page Open Book",bitGroups:[d.static],baseBitType:u.article,description:"Page open book bit, used to create pages that open books in articles or books",tags:[{key:ye.property_slug,description:"Slug for the book, used to identify the book in the system",format:v},{key:ye.property_book,description:"Book reference for the page, used to link to a specific book",format:v,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system"},{key:ye.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button"},{key:ye.property_authorFullName,description:"Full name of the author",format:v},{key:ye.property_authorPseudonym,description:"A pseudonym of the author, if any",format:v},{key:ye.property_authorTitle,description:'The title of the author, e.g. "Dr.", "Prof.", etc.',format:v},{key:ye.property_authorJobTitle,description:'The job title of the author, e.g. "Software Engineer", "Professor", etc.',format:v}]},[u.printBook]:{since:"5.5.0",bitGroups:[d.static],baseBitType:u.article,description:"Print book bit, used to create pages that open books without author information in articles or books",tags:[{key:ye.property_slug,description:"Slug for the book, used to identify the book in the system",format:v},{key:ye.property_book,description:"Book reference for the page, used to link to a specific book",format:v,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]},{key:ye.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button"}]},[u.openBookChapter]:{since:"4.16.0",title:"Open Chapter",bitGroups:[d.static],baseBitType:u.pageOpenBook,description:"Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"},[u.openBookChapterTeaser]:{since:"4.16.0",bitGroups:[d.static],baseBitType:u.openBookChapter,description:"Open book chapter teaser bit, equal to open-book-chapter, used to create teaser chapter pages that open books"},[u.pageOpenBookList]:{since:"2.1.0",title:"Page Open Book List",bitGroups:[d.static],baseBitType:u.article,description:"Page open book list bit, used to create pages that open lists of books in articles or books",tags:[{key:ye.property_book,exportJsonKey:{book:[{book:"$"}]},description:"Book reference for the page, used to link to a specific book",maxCount:m,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{key:ye.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button",format:v}]},[u.pageSubscribe]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.article,description:"Page subscribe bit, used to create pages that allow users to subscribe to content",tags:[{key:ye.property_slug,description:"Slug for the subscription page, used to identify the page in the system",format:v},{key:ye.property_buttonCaption,description:"Caption for the subscription button, used to define the text displayed on the button",format:v},{key:ye.property_mailingList,description:"Mailing list for the subscription, used to link to a specific mailing list",format:v}]},[u.assignmentList]:{since:"1.4.13",bitGroups:[d.static],baseBitType:u.exampleList,description:"Assignment list bit, used to create lists of assignments in articles or books"},[u.pageFooter]:{since:"1.4.13",title:"Page Footer",bitGroups:[d.static],baseBitType:u.article,description:"Page footer bit, used to create footers in articles or books",tags:[{key:ye.property_slug,description:"Slug for the footer, used to identify the footer in the system",format:v}],cardSet:U},[u.legend]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Legend bit, used to provide legends in articles or books",cardSet:E},[u.smartStandardLegend]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard legend bit, used to provide smart standard legends in articles or books"},[u.smartStandardLegendNonNormative]:{since:"3.12.0",title:"Smart Standard Legend (Non Normative)",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard non-normative legend bit, used to provide non-normative smart standard legends in articles or books"},[u.smartStandardLegendNormative]:{since:"3.12.0",title:"Smart Standard Legend (Normative)",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard normative legend bit, used to provide normative smart standard legends in articles or books",mappingKeys:{"xml-niso-iec":[{"@el":"legend","@attr":{id:"$customerId"},"▼":"$anchor"},{"@el":"def-list","@attr":{id:"$customerId"},"▼":"$anchor"}]}},[u.smartStandardRemarkLegend]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard remark legend bit, used to provide smart standard remarks in legends"},[u.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard non-normative remark legend bit, used to provide non-normative smart standard remarks in legends"},[u.smartStandardRemarkLegendNormative]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard normative remark legend bit, used to provide normative smart standard remarks in legends"},[u.definitionList]:{since:"1.34.0",title:"Definition List",bitGroups:[d.static],baseBitType:u._standard,description:"Definition list bit, used to create lists of definitions in articles or books",tags:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:E},[u.definitionListCollapsible]:{since:"5.25.0",title:"Collapsible definition list",deprecated:"5.37.0",baseBitType:u.definitionList,description:"Collapsible definition list bit, used to create collapsible lists of definitions in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.standardDefinitionListNormative]:{since:"5.24.0",bitGroups:[d.static],baseBitType:u.definitionList,description:"Standard normative definition list bit, used to create normative standard definition lists in articles or books"},[u.standardDefinitionListNonNormative]:{since:"5.24.0",bitGroups:[d.static],baseBitType:u.definitionList,description:"Standard non-normative definition list bit, used to create non-normative standard definition lists in articles or books"},[u.smartStandardDefinitionListNormative]:{since:"5.24.0",title:"Smart Standard Definition List (Normative)",bitGroups:[d.static],baseBitType:u.standardDefinitionListNormative,description:"Smart standard normative definition list bit, used to create normative smart standard definition lists in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"term-sec","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardDefinitionListNonNormative]:{since:"5.24.0",bitGroups:[d.static],baseBitType:u.standardDefinitionListNonNormative,description:"Smart standard non-normative definition list bit, used to create non-normative smart standard definition lists in articles or books"},[u.metaSearchDefaultTerms]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Meta search default terms bit, used to define default search terms in articles",cardSet:L},[u.metaSearchDefaultTopics]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.metaSearchDefaultTerms,description:"Meta search default topics bit, used to define default search topics in articles"},[u.flashcard]:{since:"1.3.0",title:"Flashcard",bitGroups:[d.flashcard,d.quizzes,d.static],baseBitType:u._standard,description:"Flashcard bit, used to create flashcards in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for flashcards"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:P},[u.flashcard1]:{since:"1.3.0",title:"Flashcard 1",bitGroups:[d.flashcard,d.quizzes,d.static],baseBitType:u.flashcard,description:"Flashcard 1 bit",cardSet:I},[u.qAndACard]:{since:"3.25.0",title:"Q&A Card",bitGroups:[d.quizzes],baseBitType:u.flashcard1,description:"Q&A card bit, used to create question and answer cards in articles or books",cardSet:P},[u.focusImage]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.image,description:"Focus image bit, used to create images with focus points in articles or books",tags:[{key:ye.property_focusX,description:"X-coordinate for the focus point, used to define the focus area in the image",format:_,nullable:!0},{key:ye.property_focusY,description:"Y-coordinate for the focus point, used to define the focus area in the image",format:_,nullable:!0}]},[u.highlightText]:{since:"1.3.0",title:"Highlight Text",bitGroups:[d.highlightText,d.quizzes],baseBitType:u._standard,description:"Highlight text bit, used to create highlighted text in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for highlighted text"},{key:ye.group_trueFalseInlineHighlight,description:"True/False quiz tags for highlighted text (inline body nodes)"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.image]:{since:"1.3.0",title:"Image",bitGroups:[d.static],baseBitType:u._standard,description:"Image bit, used to create images in articles or books",tags:[{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.appCreateBitsFromImage]:{since:"1.3.0",title:"Create Bits From Image",bitGroups:[d.static],baseBitType:u.image,description:"App create bits from image bit, used to create bits from images in the app"},[u.appGetScreenshot]:{since:"1.3.0",title:"Get Screenshot",bitGroups:[d.static],baseBitType:u.image,description:"App get screenshot bit, used to capture screenshots in the app"},[u.detailsImage]:{since:"1.3.0",title:"Details Image",bitGroups:[d.static],baseBitType:u.image,description:"Details image bit, used to create detailed images in articles or books"},[u.figure]:{since:"1.3.0",title:"Figure",bitGroups:[d.static],baseBitType:u.image,description:"Figure bit, used to create figures in articles or books",cardSet:E},[u.imageBanner]:{since:"1.3.0",title:"Banner Image",bitGroups:[d.static],baseBitType:u.image,description:"Image banner bit, used to create banners in articles or books"},[u.imageFigure]:{since:"1.3.0",title:"Figure Image",bitGroups:[d.static],baseBitType:u.image,description:"Image figure bit, used to create figures with images in articles or books",cardSet:E},[u.imageFigureAlt]:{since:"1.16.0",title:"Figure Alternative Image",bitGroups:[d.static],baseBitType:u.imageFigure,description:"Alternative image figure bit, used to create figures with alternative images in articles or books"},[u.standardImageFigureNormative]:{since:"1.16.0",title:"Standard Figure (Normative)",bitGroups:[d.static],baseBitType:u.imageFigure,description:"Standard normative image figure bit, used to create normative image figures in articles or books"},[u.standardImageFigureNonNormative]:{since:"1.16.0",title:"Standard Figure (Non Normative)",bitGroups:[d.static],baseBitType:u.imageFigure,description:"Standard non-normative image figure bit, used to create non-normative image figures in articles or books"},[u.smartStandardImageFigureNormative]:{since:"1.28.0",title:"Smart Standard Image/Figure (Normative)",bitGroups:[d.static],baseBitType:u.standardImageFigureNormative,description:"Smart standard normative image figure bit, used to create smart standard normative image figures in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"fig","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardImageFigureNonNormative]:{since:"1.28.0",title:"Smart Standard Figure (Non Normative)",bitGroups:[d.static],baseBitType:u.standardImageFigureNonNormative,description:"Smart standard non-normative image figure bit, used to create smart standard non-normative image figures in articles or books"},[u.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardImageFigureNormative,description:"Collapsible smart standard normative image figure bit, used to create collapsible smart standard normative image figures in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardImageFigureNonNormative,description:"Collapsible smart standard non-normative image figure bit, used to create collapsible smart standard non-normative image figures in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.imageLandscape]:{since:"1.3.0",title:"Landscape Image",bitGroups:[d.static],baseBitType:u.image,description:"Image landscape bit, used to create landscape images in articles or books"},[u.imageMood]:{since:"1.3.0",title:"Mood Image",bitGroups:[d.static],baseBitType:u.image,description:"Image mood bit, used to create mood images in articles or books",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.imagePortrait]:{since:"1.3.0",title:"Portrait Image",bitGroups:[d.static],baseBitType:u.image,description:"Image portrait bit, used to create portrait images in articles or books"},[u.imagePrototype]:{since:"1.3.0",title:"Prototype Image",bitGroups:[d.static],baseBitType:u.image,description:"Image prototype bit, used to create prototype images in articles or books"},[u.imageSeparator]:{since:"1.4.15",title:"Separator Image",bitGroups:[d.static],baseBitType:u._standard,description:"Image separator bit, used to create separators in articles or books",tags:[{key:ye.group_imageNoZoom,description:"Image no zoom tags for images, used to define whether images should have zoom functionality"},{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}],resourceAttachmentAllowed:!1},[u.imageSeparatorAlt]:{since:"1.16.0",title:"Separator Alternative Image",bitGroups:[d.static],baseBitType:u.imageSeparator,description:"Alternative image separator bit, used to create alternative separators in articles or books",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.imageScreenshot]:{since:"1.3.0",title:"Screenshot",bitGroups:[d.static],baseBitType:u.image,description:"Image screenshot bit, used to create screenshots in articles or books"},[u.imageStyled]:{since:"1.3.0",title:"Styled Image",bitGroups:[d.static],baseBitType:u.image,description:"Image styled bit, used to create styled images in articles or books"},[u.imageSuperWide]:{since:"1.3.0",title:"Super Wide Image",bitGroups:[d.static],baseBitType:u.image,description:"Image super wide bit, used to create super wide images in articles or books"},[u.imageZoom]:{since:"1.3.0",title:"Image Zoom",bitGroups:[d.static],baseBitType:u.image,description:"Image zoom bit, used to create zoomable images in articles or books"},[u.langLifeSkillIcon]:{since:"1.3.0",title:"Language Life Skill Icon",bitGroups:[d.static],baseBitType:u.image,description:"Language life skill icon bit, used to create icons for life skills in articles or books"},[u.lifeSkillSticker]:{since:"1.3.0",title:"Life Skill Sticker",bitGroups:[d.static],baseBitType:u.image,description:"Life skill sticker bit, used to create stickers for life skills in articles or books"},[u.pageBanner]:{since:"1.4.3",title:"Page Banner",bitGroups:[d.static],baseBitType:u._standard,description:"Page banner bit, used to create banners for pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the page banner, used to identify the banner in the system",format:v},{key:ye.group_imageNoZoom,description:"Image no zoom tags for images, used to define whether images should have zoom functionality"}],resourceAttachmentAllowed:!1},[u.pageHero]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.pageBanner,description:"Page hero bit, used to create hero sections in articles or books"},[u.screenshot]:{since:"1.3.0",title:"Screenshot",bitGroups:[d.static],deprecated:"1.4.0",baseBitType:u.image,description:"Screenshot bit, used to create screenshots in articles or books"},[u.tableImage]:{since:"1.5.15",title:"Table Image",bitGroups:[d.static,d.tables],baseBitType:u.tableExtended,description:"Table image bit, used to create images in tables in articles or books",tags:[{key:ye.property_caption,description:"Caption for the table image, used to provide a description for the image",format:T,htmlKey:{"@el":"caption","@children":"$"}},{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.tableImageAlt]:{since:"1.16.0",title:"Table Image Alt",bitGroups:[d.static,d.tables],baseBitType:u.tableImage,description:"Alternative table image bit, used to create alternative images in tables in articles or books"},[u.standardTableImageNormative]:{since:"1.16.0",title:"Standard Table (Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard normative table image bit, used to create normative images in tables in articles or books"},[u.standardTableImageNonNormative]:{since:"1.16.0",title:"Standard Table (Non Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard non-normative table image bit, used to create non-normative images in tables in articles or books"},[u.standardRemarkTableImageNormative]:{since:"1.17.0",title:"Standard Remark on Table (Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard normative remark table image bit, used to create normative remark images in tables in articles or books"},[u.standardRemarkTableImageNonNormative]:{since:"1.17.0",title:"Standard Remark on Table (Non Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard non-normative remark table image bit, used to create non-normative remark images in tables in articles or books"},[u.standardTableExtendedImageNormative]:{since:"1.16.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard normative extended table image bit, used to create normative extended images in tables in articles or books"},[u.standardTableExtendedImageNonNormative]:{since:"1.16.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard non-normative extended table image bit, used to create non-normative extended images in tables in articles or books"},[u.standardRemarkTableExtendedImageNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard normative remark extended table image bit, used to create normative remark extended images in tables in articles or books"},[u.standardRemarkTableExtendedImageNonNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard non-normative remark extended table image bit, used to create non-normative remark extended images in tables in articles or books"},[u.smartStandardTableImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableImageNormative,description:"Smart standard normative table image bit, used to create smart standard normative images in tables in articles or books"},[u.smartStandardTableImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableImageNonNormative,description:"Smart standard non-normative table image bit, used to create smart standard non-normative images in tables in articles or books"},[u.smartStandardRemarkTableImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableImageNormative,description:"Smart standard normative remark table image bit, used to create smart standard normative remark images in tables in articles or books"},[u.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableImageNonNormative,description:"Smart standard non-normative remark table image bit, used to create smart standard non-normative remark images in tables in articles or books"},[u.smartStandardTableExtendedImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedImageNormative,description:"Smart standard normative extended table image bit, used to create smart standard normative extended images in tables in articles or books"},[u.smartStandardTableExtendedImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedImageNonNormative,description:"Smart standard non-normative extended table image bit, used to create smart standard non-normative extended images in tables in articles or books"},[u.smartStandardRemarkTableExtendedImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedImageNormative,description:"Smart standard normative remark extended table image bit, used to create smart standard normative remark extended images in tables in articles or books"},[u.smartStandardRemarkTableExtendedImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedImageNonNormative,description:"Smart standard non-normative remark extended table image bit, used to create smart standard non-normative remark extended images in tables in articles or books"},[u.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableImageNormative,description:"Collapsible smart standard normative table image bit, used to create collapsible smart standard normative images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableImageNonNormative,description:"Collapsible smart standard non-normative table image bit, used to create collapsible smart standard non-normative images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableImageNormative,description:"Collapsible smart standard normative remark table image bit, used to create collapsible smart standard normative remark images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableImageNonNormative,description:"Collapsible smart standard non-normative remark table image bit, used to create collapsible smart standard non-normative remark images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedImageNormative,description:"Collapsible smart standard normative extended table image bit, used to create collapsible smart standard normative extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedImageNonNormative,description:"Collapsible smart standard non-normative extended table image bit, used to create collapsible smart standard non-normative extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedImageNormative,description:"Collapsible smart standard normative remark extended table image bit, used to create collapsible smart standard normative remark extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedImageNonNormative,description:"Collapsible smart standard non-normative remark extended table image bit, used to create collapsible smart standard non-normative remark extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.imageLink]:{since:"1.3.0",title:"Image Link",bitGroups:[d.static],baseBitType:u._standard,description:"Image link bit, used to create links with images in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for image links, used to define additional properties"},{key:ye.group_resourceImageLink,description:"Resource image link tags, used to attach images to the link",minCount:1}],resourceAttachmentAllowed:!1},[u.imageOnDevice]:{since:"1.3.0",title:"Image On Device",bitGroups:[d.static],baseBitType:u._standard,description:"Image on device bit, used to create images stored on the device in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for images on device, used to define additional properties"},{key:ye.group_resourceImage,description:"Resource image tags for images on device, used to attach images"},{key:ye.group_imageSource,description:"Image source tags for images on device, used to define the source of the image"}],resourceAttachmentAllowed:!1},[u.imageResponsive]:{since:"1.3.0",title:"Responsive Image",bitGroups:[d.static],baseBitType:u._standard,description:"Responsive image bit, used to create responsive images in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for responsive images, used to define additional properties"},{key:ye.group_resourceImageResponsive,description:"Resource image responsive tags, used to attach responsive images"}],resourceAttachmentAllowed:!1},[u.imagesLogoGrave]:{since:"1.5.11",title:"Logo Grave Image",bitGroups:[d.static],baseBitType:u._standard,description:"Logo grave images bit, used to create logo grave images in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for logo grave images, used to define additional properties"},{key:ye.group_resourceImageNoZoom,description:"Resource image tags for logo grave images, used to attach images",exportJsonKey:{logos:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:m}],resourceAttachmentAllowed:!1},[u.prototypeImages]:{since:"1.6.1",title:"Prototype Images",bitGroups:[d.static],baseBitType:u.imagesLogoGrave,description:"Prototype images bit, used to create prototype images in articles or books",tags:[{key:ye.group_resourceImageNoZoom,description:"Resource image tags for prototype images",exportJsonKey:{images:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:m}]},[u.internalLink]:{since:"1.3.0",title:"Internal Link",bitGroups:[d.static],baseBitType:u._standard,description:"Internal link bit, used to create links to other bits in articles or books",tags:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the internal link, used to link to the target bit"}]},[u.interview]:{since:"1.3.0",title:"Interview",bitGroups:[d.interview,d.quizzes],baseBitType:u._standard,description:"Interview bit, used to create interviews in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for interviews"},{key:ye.property_reasonableNumOfChars,exportJsonKey:{},description:"Reasonable number of characters for the interview, used to limit input size",format:_},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:K},[u.interviewInstructionGrouped]:{since:"1.3.0",title:"Interview Instruction Grouped",bitGroups:[d.interview,d.quizzes],baseBitType:u.interview,description:"Grouped interview instruction bit"},[u.botInterview]:{since:"1.3.0",title:"Bot Interview",bitGroups:[d.bots],baseBitType:u.interview,description:"Bot interview bit, used to create bot interviews in articles or books"},[u.brandColor]:{since:"4.12.0",title:"Color",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Brand color bit, used to define brand colors",tags:[{key:ye.property_brandColor,description:"The brand color",format:v},{key:ye.property_brandColorName,description:"The brand color name",format:v}]},[u.learningPathBook]:{since:"1.3.0",title:"Learning Path Book",bitGroups:[d.learningPath],baseBitType:u._standard,description:"Learning path book bit, used to create learning paths in articles or books",tags:[{key:ye.group_learningPathCommon,description:"Common tags for learning path books, used to define properties of learning paths"}]},[u.bookLink]:{since:"1.3.0",title:"Book Link",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Book link bit, used to create links to books in learning paths"},[u.bookLinkNext]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Next book link bit, used to create links to the next book in learning paths"},[u.bookLinkPrev]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Previous book link bit, used to create links to the previous book in learning paths"},[u.learningPathClassroomEvent]:{since:"1.3.0",title:"Learning Path Classroom Event",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path classroom event bit, used to create classroom events in learning paths"},[u.learningPathClassroomTraining]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path classroom training bit, used to create classroom training in learning paths"},[u.learningPathClosing]:{since:"1.3.0",title:"Learning Path Closing",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path closing bit, used to close learning paths"},[u.learningPathFeedback]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path feedback bit, used to provide feedback in learning paths"},[u.learningPathLearningGoal]:{since:"1.3.0",title:"Learning Path Learning Goal",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path learning goal bit, used to define learning goals in learning paths"},[u.learningPathLti]:{since:"1.3.0",title:"Learning Path Lti",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path LTI bit, used to integrate LTI tools in learning paths"},[u.learningPathSign]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path sign bit, used to create signs in learning paths"},[u.learningPathStep]:{since:"1.3.0",title:"Learning Path Step",bitGroups:[d.learningPath,d.steps],baseBitType:u.learningPathBook,description:"Learning path step bit, used to create steps in learning paths"},[u.learningPathBotTraining]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path bot training bit, used to create bot training in learning paths",tags:[{key:ye.property_bot,description:"Bot reference for the training, used to link to a specific bot",format:v}]},[u.learningPathExternalLink]:{since:"1.3.0",title:"Learning Path External Link",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path external link bit, used to create external links in learning paths",tags:[{key:ye.property_externalLink,description:"External link for the learning path, used to link to external resources",format:v},{key:ye.property_externalLinkText,description:"Text for the external link, used to define the link text displayed",format:v}]},[u.learningPathVideoCall]:{since:"1.3.0",title:"Learning Path Video Call",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path video call bit, used to create video calls in learning paths",tags:[{key:ye.property_videoCallLink,description:"Video call link for the learning path, used to link to video calls",format:v}]},[u.leLearningObjectives]:{since:"1.25.0",title:"Learning Objectives",bitGroups:[d.static],baseBitType:u.learningPathLearningGoal,description:"Learning objectives bit, used to define learning objectives in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the learning objectives, used to categorize the activity",format:v}]},[u.leVideoCall]:{since:"1.25.0",title:"Video Call",bitGroups:[d.static],baseBitType:u.learningPathVideoCall,description:"Video call bit, used to create video calls in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the video call, used to categorize the activity",format:v}]},[u.leClassroomEvent]:{since:"1.25.0",title:"Classroom Event",bitGroups:[d.static],baseBitType:u.learningPathClassroomEvent,description:"Classroom event bit, used to create classroom events in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the classroom event, used to categorize the activity",format:v}]},[u.leMultiDayEvent]:{since:"3.32.0",title:"Multi-day Event",bitGroups:[d.static],baseBitType:u.leClassroomEvent,description:"Multi-day event bit, used to create multi-day events in learning paths"},[u.leCompletion]:{since:"1.25.0",title:"Completion",bitGroups:[d.static],baseBitType:u.learningPathClosing,description:"Completion bit, used to mark the completion of learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the completion, used to categorize the activity",format:v}]},[u.leExternalLink]:{since:"1.25.0",title:"External Link",bitGroups:[d.static],baseBitType:u.learningPathExternalLink,description:"External link bit, used to create external links in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the external link, used to categorize the activity",format:v}]},[u.leReadBook]:{since:"1.25.0",title:"Read Book",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Read book bit, used to create reading tasks in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the reading task, used to categorize the activity",format:v}]},[u.leLearningStep]:{since:"1.25.0",title:"Learning Step",bitGroups:[d.static],baseBitType:u.learningPathStep,description:"Learning step bit, used to create steps in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the learning step, used to categorize the activity",format:v}]},[u.lePreparationTask]:{since:"1.26.0",title:"Preparation Task",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Preparation task bit, used to create preparation tasks in learning paths",tags:[{key:ye.property_activityType,format:v,description:"Activity type for the preparation task, used to categorize the activity"}]},[u.leRead]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Read task bit, used to create reading tasks in learning paths"},[u.leTask]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Task bit, used to create tasks in learning paths"},[u.leTodo]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Todo bit, used to create todo tasks in learning paths"},[u.leFollowUpTask]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Follow-up task bit, used to create follow-up tasks in learning paths"},[u.leFinishingTask]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Finishing task bit, used to create finishing tasks in learning paths"},[u.leAssignment]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Assignment bit, used to create assignments in learning paths"},[u.leWatchVideoEmbed]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Watch video embed bit, used to embed videos in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the video embed, used to categorize the activity",format:v},{key:ye.group_resourceBitTags,description:"Resource bit tags for video embeds, used to define additional properties"},{key:ye.group_resourceVideoEmbed,description:"Resource video embed tags, used to attach video embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.leListenAudioEmbed]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Listen audio embed bit, used to embed audio in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the audio embed, used to categorize the activity",format:v},{key:ye.group_resourceBitTags,description:"Resource bit tags for audio embeds, used to define additional properties"},{key:ye.group_resourceAudioEmbed,description:"Resource audio embed tags, used to attach audio embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.listItem]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.article,description:"List item bit, used to create list items in articles or books",tags:[{key:ye.property_listItemIndent,description:"Indentation level for the list item, used to define the hierarchy of the list",format:_,defaultValue:"0"}]},[u.standardListItem]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.listItem,description:"Standard list item bit, used to create standard list items in articles or books"},[u.smartStandardListItem]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardListItem,description:"Smart standard list item bit, used to create smart standard list items in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"ref","@attr":{id:"$customerId"},"@children":"$","▼":"$anchor"}}},[u.smartStandardListItemCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardListItem,description:"Collapsible smart standard list item bit, used to create collapsible smart standard list items in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.mark]:{since:"1.3.0",title:"Mark",bitGroups:[d.mark,d.quizzes],baseBitType:u._standard,description:"Mark bit, used to create marks in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for marks"},{key:ye.group_markConfig,description:"Configuration tags for marks, used to define properties of marks"},{key:ye.group_mark,description:"Mark tags, used to define the content of marks"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.match]:{since:"1.3.0",title:"Match",bitGroups:[d.match,d.quizzes],baseBitType:u._standard,description:"Match bit, used to create matching pairs in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for matching pairs"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"Case sensitivity for matching pairs, used to define if matches are case-sensitive",format:C,defaultValue:"true"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:$},[u.matchAll]:{since:"1.3.0",title:"Match All",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match all bit, used to create matching pairs with all options in articles or books"},[u.matchReverse]:{since:"1.3.0",title:"Match Reverse",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match reverse bit, used to create matching pairs with reversed options in articles or books"},[u.matchAllReverse]:{since:"1.3.0",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match all reverse bit, used to create matching pairs with all options and reversed in articles or books"},[u.matchSolutionGrouped]:{since:"1.3.0",title:"Match Solution Grouped",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Grouped match solution bit, used to create grouped matching solutions in articles or books"},[u.matchMatrix]:{since:"1.3.0",title:"Match Matrix",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match matrix bit, used to create matching pairs in a matrix format in articles or books",cardSet:D},[u.matchAudio]:{since:"1.3.0",title:"Match Audio",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match audio bit, used to create matching pairs with audio in articles or books",cardSet:O},[u.matchPicture]:{since:"1.3.0",title:"Match Picture",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match picture bit, used to create matching pairs with pictures in articles or books",cardSet:J},[u.feedback]:{since:"3.13.0",title:"Feedback",bitGroups:[d.static],baseBitType:u._standard,description:"Feedback bit, used to provide feedback in articles or books",tags:[{key:ye.property_reasonableNumOfChars,exportJsonKey:{},description:"Reasonable number of characters for feedback, used to limit input size",format:_}],cardSet:F},[u.learningDocumentationFeedback]:{since:"3.13.0",bitGroups:[d.static],baseBitType:u.feedback,description:"Feedback for learning documentation"},[u.handInFeedbackExpert]:{since:"3.30.0",title:"Expert Feedback",bitGroups:[d.static],baseBitType:u.feedback,description:"Feedback for expert hand-in"},[u.handInFeedbackSelf]:{since:"3.30.0",title:"Hand-In Feedback (Self)",bitGroups:[d.static],baseBitType:u.feedback,description:"Self-feedback for hand-in"},[u.multipleChoice1]:{since:"1.3.0",title:"Multiple Choice 1",bitGroups:[d.multipleChoice,d.quizzes],baseBitType:u._standard,description:"Multiple choice 1 bit, used to create single-choice questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple choice 1 questions"},{key:ye.group_trueFalse,description:"True/False tags for multiple choice 1 questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",title:"Coach Self Reflection Multiple Choice 1",bitGroups:[d.quizzes],baseBitType:u.multipleChoice1,description:"Coach self-reflection multiple choice 1 bit, used for self-reflection in coaching"},[u.multipleChoice]:{since:"1.3.0",title:"Multiple Choice",bitGroups:[d.multipleChoice,d.quizzes],baseBitType:u._standard,description:"Multiple choice bit, used to create multiple-choice questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple choice questions"},{key:ye.group_trueFalse,description:"True/False tags for multiple choice questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:R},[u.coachSelfReflectionMultipleChoice]:{since:"1.3.0",title:"Coach Self Reflection Multiple Choice",bitGroups:[d.quizzes],baseBitType:u.multipleChoice,description:"Coach self-reflection multiple choice bit, used for self-reflection in coaching"},[u.multipleChoiceText]:{since:"1.3.0",title:"Multiple Choice Text",bitGroups:[d.multipleChoice,d.quizzes],baseBitType:u._standard,description:"Multiple choice text bit, used to create multiple-choice questions with text in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple choice text questions"},{key:ye.group_trueFalseInlineSelect,description:"True/False tags for multiple choice text questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachCallToActionMultipleChoiceText]:{since:"1.3.0",title:"Coach Call To Action Multiple Choice Text",bitGroups:[d.quizzes],baseBitType:u.multipleChoiceText,description:"Coach call to action multiple choice text bit, used for self-reflection in coaching"},[u.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",title:"Coach Self Reflection Multiple Choice Text",bitGroups:[d.quizzes],baseBitType:u.multipleChoiceText,description:"Coach self-reflection multiple choice text bit, used for self-reflection in coaching"},[u.multipleResponse1]:{since:"1.3.0",title:"Multiple Response 1",bitGroups:[d.multipleResponse,d.quizzes],baseBitType:u._standard,description:"Multiple response 1 bit, used to create multiple-response questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple response 1 questions"},{key:ye.group_trueFalseResponses,description:"True/False tags for multiple response 1 questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",title:"Coach Self Reflection Multiple Response 1",bitGroups:[d.quizzes],baseBitType:u.multipleResponse1,description:"Coach self-reflection multiple response 1 bit, used for self-reflection in coaching"},[u.multipleResponse]:{since:"1.3.0",title:"Multiple Response",bitGroups:[d.multipleResponse,d.quizzes],baseBitType:u._standard,description:"Multiple response bit, used to create multiple-response questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple response questions"},{key:ye.group_trueFalseResponses,description:"True/False tags for multiple response questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:G},[u.coachSelfReflectionMultipleResponse]:{since:"1.3.0",title:"Coach Self Reflection Multiple Response",bitGroups:[d.quizzes],baseBitType:u.multipleResponse,description:"Coach self-reflection multiple response bit, used for self-reflection in coaching"},[u.page]:{since:"1.3.0",title:"Page",bitGroups:[d.pages,d.static],baseBitType:u._standard,description:"Page bit, used to create pages in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"Title of the page, used to display the page title"},{key:ye.property_thumbImage,description:"Thumbnail image for the page, used to display a small image representation",format:v}]},[u.pageCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.page,description:"Collapsible page bit, used to create collapsible sections in pages",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.pageCoverImage]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.page,description:"Page cover image bit, used to create cover images for pages"},[u.advertisingAdvertorialPage]:{since:"4.5.0",title:"Advertorial",bitGroups:[d.static],baseBitType:u.page,description:"Advertorial Page bit, used to create advertorial pages"},[u.pageBuyButton]:{since:"1.4.3",title:"Page Buy Button",bitGroups:[d.static],baseBitType:u._standard,description:"Page buy button bit, used to create buy buttons on pages",tags:[{key:ye.property_slug,description:"Slug for the page, used to identify the page in URLs",format:v},{key:ye.property_content2Buy,description:"Content to buy for the page, used to define what is being sold",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button, used to define the text displayed on the button",format:v}]},[u.pageBuyButtonAlt]:{since:"1.31.0",title:"Page Buy Button Alternative",bitGroups:[d.static],baseBitType:u.pageBuyButton,description:"Alternative page buy button bit, used to create alternative buy buttons on pages"},[u.pageBuyButtonPromotion]:{since:"1.5.11",title:"Page Buy Button Promotion",bitGroups:[d.static],baseBitType:u.pageBuyButton,description:"Page buy button for promotions, used to create buy buttons on promotional pages"},[u.pageSubpage]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u._standard,description:"Page subpage bit, used to create subpages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the subpage, used to identify the subpage in URLs",format:v},{key:ye.property_page,description:"Page reference for the subpage, used to link to the parent page",format:v}]},[u.pageShopInShop]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page shop-in-shop bit, used to create shop-in-shop pages in articles or books"},[u.pageCategory]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page category bit, used to create category pages in articles or books"},[u.pageAcademy]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page academy bit, used to create academy pages in articles or books"},[u.pagePromotion]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page promotion bit, used to create promotional pages in articles or books"},[u.pageSpecial]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page special bit, used to create special pages in articles or books"},[u.pageEnd]:{since:"5.33.0",bitGroups:[d.pages,d.static],baseBitType:u.article,description:"Page end bit, used to mark the end of a page section in articles or books"},[u.pageStart]:{since:"5.33.0",bitGroups:[d.pages,d.static],baseBitType:u.article,description:"Page start bit, used to mark the start of a page section in articles or books"},[u.pagePerson]:{since:"1.5.16",bitGroups:[d.static],baseBitType:u._standard,description:"Page person bit, used to create person pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the person page, used to identify the person in URLs",format:v},{key:ye.group_person,description:"Person tags, used to define properties of the person"},{key:ye.property_buttonCaption,description:"Caption for the button on the person page, used to define the text displayed",format:v}]},[u.pageProduct]:{since:"1.4.17",title:"Page Product",bitGroups:[d.static],baseBitType:u._standard,description:"Page product bit, used to create product pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product page, used to identify the product in URLs",format:v},{key:ye.property_product,description:"Product reference for the product page, used to link to the product",format:v,nullable:!0}]},[u.pageProductList]:{since:"1.4.17",title:"Page Product List",bitGroups:[d.static],baseBitType:u._standard,description:"Page product list bit, used to create product lists in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product list page, used to identify the product list in URLs",format:v},{key:ye.property_product,description:"Product reference for the product list, used to link to the product",format:v,nullable:!0,maxCount:m}]},[u.pageProductVideo]:{since:"1.4.17",title:"Page Product Video",bitGroups:[d.static],baseBitType:u._standard,description:"Page product video bit, used to create product video pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product video page, used to identify the product video in URLs",format:v},{key:ye.property_productVideo,description:"Product video reference for the product video page, used to link to the video",format:v}]},[u.pageProductVideoList]:{since:"1.4.17",title:"Page Product Video List",bitGroups:[d.static],baseBitType:u._standard,description:"Page product video list bit, used to create product video lists in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product video list page, used to identify the product video list in URLs",format:v},{key:ye.property_productVideo,description:"Product video reference for the product video list, used to link to the video",format:v,maxCount:m}]},[u.pageSectionFolder]:{since:"1.4.17",title:"Page Section Folder",bitGroups:[d.static],baseBitType:u._standard,description:"Page section folder bit, used to create section folders in articles or books",tags:[{key:ye.property_slug,description:"Slug for the section folder page, used to identify the section in URLs",format:v},{key:ye.property_productFolder,description:"Product folder reference for the section folder page, used to link to the folder",format:v}]},[u.photo]:{since:"1.3.0",title:"Photo",bitGroups:[d.static],baseBitType:u.image,description:"Photo bit, used to create photo bits in articles or books"},[u.platform]:{since:"4.12.0",title:"Platform Information",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform bit, used to define platform properties",tags:[{key:ye.property_platformName,description:"The platform name",format:v},{key:ye.resource_platformIcon,jsonKey:"platformIcon|resource(type=image, key=image)",exportJsonKey:{platformIcon:{type:"image",image:{src:"$"}}},description:"The platform icon",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the platform icon resource"}],maxCount:1},{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformBrandTarget]:{since:"4.15.0",title:"Target Mode",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform brand target bit, used to define the brand target for publishing",tags:[{key:ye.property_platformBrandTarget,description:'The platform brand target (typically "light", "dark" or "none")',format:v,defaultValue:"none"}]},[u.platformHeader]:{since:"4.12.0",title:"Header Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform header bit, used to define platform header properties",tags:[{key:ye.resource_platformLogo,jsonKey:"platformLogo|resource(type=image, key=image)",exportJsonKey:{platformLogo:{type:"image",image:{src:"$"}}},description:"The platform logo",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the platform logo resource"}],maxCount:1},{key:ye.property_platformLogoMaxHeight,description:"Maximum height for the platform logo",format:_,defaultValue:"40"},{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformMain]:{since:"4.12.0",title:"Main Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform main bit, used to define platform main properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformMainButton]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform main button bit, used to define platform main button properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformMainInput]:{since:"4.12.0",title:"Main Input Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform main input bit, used to define platform main input properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSection]:{since:"4.12.0",title:"Sections Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform section bit, used to define platform section properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSectionButton]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform section button bit, used to define platform section button properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSectionChat]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform section chat bit, used to define platform section chat properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"},{key:ye.resource_platformBackgroundImage,jsonKey:"platformBackgroundImage|resource(type=image, key=image)",exportJsonKey:{platformBackgroundImage:{type:"image",image:{src:"$"}}},description:"The platform section chat background image",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the platform background image resource"}]}]},[u.platformSectionHeader]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform section header bit, used to define platform section header properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSectionInput]:{since:"4.12.0",title:"Section Input Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform section input bit, used to define platform section input properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSystemIcon]:{since:"4.12.0",title:"System Icon Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform system icon bit, used to define platform system icon properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.quote]:{since:"1.3.0",title:"Quote",bitGroups:[d.static],baseBitType:u._standard,description:"Quote bit, used to create quotes in articles or books",tags:[{key:ye.property_quotedPerson,description:"Quoted person for the quote, used to define who is being quoted",format:v}]},[u.rating]:{since:"1.3.0",title:"Rating",bitGroups:[d.rating,d.surveys],baseBitType:u._standard,description:"Rating bit, used to create rating bits in articles or books"},[u.coachSelfReflectionRating]:{since:"1.3.0",title:"Coach Self Reflection Rating",bitGroups:[d.rating,d.surveys],baseBitType:u.rating,description:"Coach self-reflection rating bit, used for self-reflection in coaching"},[u.releaseNote]:{since:"1.3.0",title:"Release Note",bitGroups:[d.static],baseBitType:u._standard,description:"Release note bit, used to create release notes in articles or books",tags:[{key:ye.property_releaseVersion,description:"Release version for the release note, used to define the version of the release",format:v},{key:ye.property_releaseKind,description:"Release kind for the release note, used to define the type of release",format:v},{key:ye.property_releaseDate,description:"Release date for the release note, used to define when the release was made",format:v}]},[u.reviewNote]:{since:"1.3.0",title:"Review Note",bitGroups:[d.reviews,d.static],baseBitType:u._standard,description:"Review note bit, used to create review notes in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"Title of the review note, used to display the note title"},{key:ye.property_resolved,description:"Resolved status for the review note, used to indicate if the note is resolved",format:C,defaultValue:"false"},{key:ye.property_resolvedDate,description:"Resolved date for the review note, used to define when the note was resolved",format:v},{key:ye.property_resolvedBy,description:"Resolved by for the review note, used to define who resolved the note",format:v},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the review note bit",format:v,nullable:!0}],rootExampleType:h},[u.reviewAuthorNote]:{since:"1.3.0",title:"Review Author Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Author review note bit, used to create author notes in reviews"},[u.reviewCustomerNote]:{since:"3.5.0",title:"Review Customer Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Customer review note bit, used to create customer notes in reviews"},[u.reviewError]:{since:"5.8.0",bitGroups:[d.reviewErrors,d.reviews,d.static],baseBitType:u.reviewNote,description:"Review error note bit, used to create error notes in reviews"},[u.reviewErrorAi]:{since:"5.8.0",bitGroups:[d.reviewErrors,d.reviews,d.static],baseBitType:u.reviewNote,description:"Review error AI note bit, used to create AI error notes in reviews"},[u.reviewErrorTranslation]:{since:"5.8.0",bitGroups:[d.reviewErrors,d.reviews,d.static],baseBitType:u.reviewNote,description:"Review error translation note bit, used to create translation error notes in reviews"},[u.reviewReviewerNote]:{since:"1.3.0",title:"Review Reviewer Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Reviewer review note bit, used to create reviewer notes in reviews"},[u.reviewRequestForReviewNote]:{since:"1.3.0",title:"Review Request For Review Note",bitGroups:[d.reviewErrors,d.reviews],baseBitType:u.reviewNote,description:"Request for review note bit, used to create notes requesting reviews"},[u.reviewApprovedNote]:{since:"1.3.0",title:"Review Approved Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Approved review note bit, used to create notes for approved reviews"},[u.sampleSolution]:{since:"1.3.0",title:"Sample Solution",bitGroups:[d.static],baseBitType:u._standard,description:"Sample solution bit, used to create sample solutions in articles or books",tags:[{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,format:v,description:"Anchor for the sample solution, used to link to the solution"},{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference for the sample solution, used to link to the source of the solution"}]},[u.sequence]:{since:"1.3.0",title:"Sequence",bitGroups:[d.quizzes,d.sequence],baseBitType:u._standard,description:"Sequence bit, used to create sequences in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for sequences"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{"@absent":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"The example flag for the bit (boolean)",format:C,nullable:!0}],cardSet:N,rootExampleType:b},[u.stillImageFilm]:{since:"1.3.0",title:"Still image film",bitGroups:[d.static],baseBitType:u._standard,description:"Still image film bit, used to create still image films in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:ye.group_resourceStillImageFilm,description:"Resource still image film tags, used to attach still image films to the bit"}],resourceAttachmentAllowed:!1},[u.stillImageFilmEmbed]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Still image film embed bit, used to embed still image films in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:ye.group_resourceStillImageFilmEmbed,description:"Resource still image film embed tags, used to attach still image films to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.stillImageFilmLink]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Still image film link bit, used to create still image film links in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:ye.group_resourceStillImageFilmLink,description:"Resource still image film link tags, used to attach still image films to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.surveyAnonymous]:{since:"1.3.0",title:"Survey Anonymous",bitGroups:[d.surveyAnonymous,d.surveys],baseBitType:u._standard,description:"Anonymous survey bit, used to create anonymous surveys in articles or books"},[u.survey]:{since:"1.3.0",title:"Survey",bitGroups:[d.survey,d.surveys],baseBitType:u._standard,description:"Survey bit, used to create surveys in articles or books"},[u.surveyMatrix]:{since:"1.6.2",title:"Survey Matrix",bitGroups:[d.survey,d.surveys],baseBitType:u.image,description:"Survey matrix bit, used to create survey matrices in articles or books",tags:[{key:ye.property_pointerTop,description:"Pointer for the top of the survey matrix, used to define the top label",format:v,minCount:1,maxCount:1},{key:ye.property_pointerLeft,description:"Pointer for the left of the survey matrix, used to define the left label",format:v,minCount:1,maxCount:1},{key:ye.property_buttonCaption,description:"Caption for the button in the survey matrix, used to define the button text",format:v,minCount:1,maxCount:1}]},[u.surveyMatrixMe]:{since:"1.6.2",title:"Survey Matrix Me",bitGroups:[d.survey,d.surveys],baseBitType:u.surveyMatrix,description:"Survey matrix me bit, used to create personal survey matrices in articles or books"},[u.surveyRating]:{since:"1.6.0",title:"Survey Rating",bitGroups:[d.survey,d.surveys],baseBitType:u._standard,description:"Survey rating bit, used to create rating surveys in articles or books",tags:[{key:ye.property_ratingLevelStart,jsonKey:"ratingLevelStart.level",exportJsonKey:{ratingLevelStart:{level:"$"}},description:"Start level for the rating survey, used to define the lowest rating",format:_,chain:[{key:ye.property_label,description:"Label for the start level of the rating survey, used to define the text displayed",format:T}]},{key:ye.property_ratingLevelEnd,jsonKey:"ratingLevelEnd.level",exportJsonKey:{ratingLevelEnd:{level:"$"}},description:"End level for the rating survey, used to define the highest rating",format:_,chain:[{key:ye.property_label,description:"Label for the end level of the rating survey, used to define the text displayed",format:T}]},{key:ye.property_ratingLevelSelected,description:"Selected level for the rating survey, used to define the default rating",format:_,nullable:!0},{key:ye.property_buttonCaption,description:"Caption for the button in the rating survey, used to define the button text",format:v}]},[u.surveyRatingOnce]:{since:"1.6.0",title:"Survey Rating Once",bitGroups:[d.survey,d.surveys],baseBitType:u.surveyRating,description:"Survey rating once bit, used to create one-time rating surveys in articles or books"},[u.surveyRatingDisplay]:{since:"1.6.0",title:"Survey Rating Display",bitGroups:[d.survey,d.surveys],baseBitType:u.surveyRating,description:"Survey rating display bit, used to display rating surveys in articles or books"},[u.scorm]:{since:"1.5.11",title:"Scorm",bitGroups:[d.static],baseBitType:u._standard,description:"SCORM bit, used to embed SCORM content in articles or books",tags:[{key:ye.property_scormSource,description:"Source for the SCORM content, used to define the SCORM package URL",format:v},{key:ye.property_posterImage,description:"Poster image for the SCORM content, used to display a preview image",format:v}]},[u.pronunciationTable]:{since:"3.1.0",title:"Pronunciation Table",bitGroups:[d.static],baseBitType:u._standard,description:"Pronunciation table bit, used to create pronunciation tables in articles or books",cardSet:j},[u.table]:{since:"1.5.19",title:"Table",bitGroups:[d.static,d.tables],baseBitType:u._standard,description:"Table bit, used to create tables in articles or books",tags:[{key:ye.property_caption,description:"Caption for the table, used to define the title of the table",format:T,htmlKey:{"@el":"caption","@children":"$"},mappingKeys:{"xml-niso-iec":{"@el":"caption","@children":{"@el":"title","@text":"$"}}}},{key:ye.property_tableFixedHeader,description:"Fixed header for the table, used to keep the header visible while scrolling",format:C,defaultValue:"false"},{key:ye.property_tableHeaderWhitespaceNoWrap,description:"No wrap for table header whitespace, used to prevent header text wrapping",format:C,defaultValue:"false"},{key:ye.property_tableSearch,description:"Search functionality for the table, used to enable searching within the table",format:C,defaultValue:"false"},{key:ye.property_tableSort,description:"Sorting functionality for the table, used to enable sorting of table columns",format:C,defaultValue:"false"},{key:ye.property_tablePagination,description:"Pagination for the table, used to limit the number of rows displayed at once",format:C,defaultValue:"false"},{key:ye.property_tablePaginationLimit,description:"Pagination limit for the table, used to define the number of rows per page",format:_,defaultValue:"0"},{key:ye.property_tableHeight,description:"Height for the table, used to define the height of the table in pixels",format:_,defaultValue:"0"},{key:ye.property_tableWhitespaceNoWrap,description:"No wrap for table whitespace, used to prevent text wrapping in table cells",format:C,defaultValue:"false"},{key:ye.property_tableAutoWidth,description:"Auto width for table columns, used to automatically adjust column widths",format:C,defaultValue:"true"},{key:ye.property_tableResizableColumns,description:"Resizable columns for the table, used to allow users to resize table columns",format:C,defaultValue:"false"},{key:ye.property_tableColumnMinWidth,description:"Minimum width for table columns, used to define the minimum width of columns",format:_,defaultValue:"0"}],cardSet:z},[u.tableExtended]:{since:"4.14.0",title:"Table",bitGroups:[d.tables],baseBitType:u.table,description:"Extended table bit, used to create complex tables with all HTML table features",cardSet:q},[u.tableExtendedImage]:{since:"5.13.0",bitGroups:[d.static,d.tables],baseBitType:u.tableExtended,description:"Extended table image bit, used to create complex tables with images and all HTML table features",tags:[{key:ye.property_caption,description:"Caption for the table image, used to provide a description for the image",format:T,htmlKey:{"@el":"caption","@children":"$"}},{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.tableAlt]:{since:"1.16.0",title:"Table Alternative",bitGroups:[d.static,d.tables],baseBitType:u.table,description:"Alternative table bit, used to create alternative tables in articles or books"},[u.standardTableNormative]:{since:"1.16.0",title:"Standard Table (Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard normative table bit, used to create standard normative tables in articles or books"},[u.standardTableNonNormative]:{since:"1.16.0",title:"Standard Table (Non Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard non-normative table bit, used to create standard non-normative tables in articles or books"},[u.standardRemarkTableNormative]:{since:"1.17.0",title:"Standard Remark on Table (Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard normative remark table bit, used to create standard normative remark tables in articles or books"},[u.standardRemarkTableNonNormative]:{since:"1.17.0",title:"Standard Remark on Table (Non Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard non-normative remark table bit, used to create standard non-normative remark tables in articles or books"},[u.standardTableExtendedNormative]:{since:"1.16.0",title:"Standard, Extended, Normative",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard normative extended table bit, used to create standard normative extended tables in articles or books"},[u.standardTableExtendedNonNormative]:{since:"1.16.0",title:"Standard Table (Extended Non-Normative)",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard non-normative extended table bit, used to create standard non-normative extended tables in articles or books"},[u.standardRemarkTableExtendedNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard normative remark extended table bit, used to create standard normative remark extended tables in articles or books"},[u.standardRemarkTableExtendedNonNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard non-normative remark extended table bit, used to create standard non-normative remark extended tables in articles or books"},[u.smartStandardTableNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableNormative,description:"Smart standard normative table bit, used to create smart standard normative tables in articles or books"},[u.smartStandardTableNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableNonNormative,description:"Smart standard non-normative table bit, used to create smart standard non-normative tables in articles or books"},[u.smartStandardRemarkTableNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableNormative,description:"Smart standard normative remark table bit, used to create smart standard normative remark tables in articles or books"},[u.smartStandardRemarkTableNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableNonNormative,description:"Smart standard non-normative remark table bit, used to create smart standard non-normative remark tables in articles or books"},[u.smartStandardTableExtendedNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedNormative,description:"Smart standard normative extended table bit, used to create smart standard normative extended tables in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"table-wrap","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardTableExtendedNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedNonNormative,description:"Smart standard non-normative extended table bit, used to create smart standard non-normative extended tables in articles or books"},[u.smartStandardRemarkTableExtendedNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedNormative,description:"Smart standard normative remark extended table bit, used to create smart standard normative remark extended tables in articles or books"},[u.smartStandardRemarkTableExtendedNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedNonNormative,description:"Smart standard non-normative remark extended table bit, used to create smart standard non-normative remark extended tables in articles or books"},[u.smartStandardTableNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableNormative,description:"Collapsible smart standard normative table bit, used to create collapsible smart standard normative tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableNonNormative,description:"Collapsible smart standard non-normative table bit, used to create collapsible smart standard non-normative tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableNormative,description:"Collapsible smart standard normative remark table bit, used to create collapsible smart standard normative remark tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableNonNormative,description:"Collapsible smart standard non-normative remark table bit, used to create collapsible smart standard non-normative remark tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedNormative,description:"Collapsible smart standard normative extended table bit, used to create collapsible smart standard normative extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedNonNormative,description:"Collapsible smart standard non-normative extended table bit, used to create collapsible smart standard non-normative extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedNormative,description:"Collapsible smart standard normative remark extended table bit, used to create collapsible smart standard normative remark extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedNonNormative,description:"Collapsible smart standard non-normative remark extended table bit, used to create collapsible smart standard non-normative remark extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.parameters]:{since:"1.18.0",bitGroups:[d.static],baseBitType:u.table,description:"Parameters bit, used to create parameter tables in articles or books"},[u.toc]:{since:"1.3.0",title:"Toc",bitGroups:[d.static],baseBitType:u._standard,description:"Table of contents bit, used to create a table of contents in articles or books"},[u.tocChapter]:{since:"1.5.5",bitGroups:[d.static],baseBitType:u.toc,description:"Table of contents chapter bit, used to create chapters in the table of contents",tags:[{key:ye.property_maxDisplayLevel,description:"Maximum display level for the chapter in the table of contents",format:_,nullable:!0}]},[u.tocInline]:{since:"3.24.0",bitGroups:[d.static],baseBitType:u.toc,description:"Inline table of contents bit, used to create inline tables of contents in articles or books",tags:[{key:ye.property_maxTocChapterLevel,description:"Maximum chapter level for the inline table of contents",format:_,nullable:!0}]},[u.tocResource]:{since:"3.31.0",bitGroups:[d.static],baseBitType:u.toc,description:"Table of contents resource bit, used to create resources in the table of contents",tags:[{key:ye.property_tocResource,description:"Resource content for the table of contents, used to define the resource",format:v,maxCount:m},{key:ye.property_buttonCaption,description:"Caption for the button in the table of contents resource, used to define the text displayed on the button",format:v}]},[u.tocContent]:{since:"3.31.0",bitGroups:[d.static],baseBitType:u.toc,description:"Table of contents content bit, used to create content sections in the table of contents",tags:[{key:ye.property_tocContent,description:"Content for the table of contents, used to define the content section",format:v,maxCount:m},{key:ye.property_buttonCaption,description:"Caption for the button in the table of contents content, used to define the text displayed on the button",format:v}]},[u.anchor]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Anchor bit, used to create anchors in articles or books"},[u.bitBookEnding]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Bit book ending bit, used to create endings in articles or books"},[u.bitBookSummary]:{since:"1.3.0",title:"Book Summary",bitGroups:[d.static],baseBitType:u._standard,description:"Bit book summary bit, used to create summaries in articles or books"},[u.botActionAnnounce]:{since:"1.3.0",bitGroups:[d.botAction],baseBitType:u._standard,description:"Bot action announce bit, used to create announcements in articles or books"},[u.botActionRatingNumber]:{since:"1.3.0",title:"Bot Rating Number",bitGroups:[d.bots],baseBitType:u._standard,description:"Bot action rating number bit, used to create rating number actions in articles or books"},[u.botActionRemind]:{since:"1.3.0",bitGroups:[d.botAction],baseBitType:u._standard,description:"Bot action remind bit, used to create reminders in articles or books"},[u.botActionSave]:{since:"1.3.0",bitGroups:[d.botAction],baseBitType:u._standard,description:"Bot action save bit, used to create save actions in articles or books"},[u.botActionTrueFalse]:{since:"1.3.0",title:"Bot Action True False",bitGroups:[d.botAction,d.bots],baseBitType:u._standard,description:"Bot action true/false bit, used to create true/false actions in articles or books"},[u.chapterSubjectMatter]:{since:"1.3.0",title:"Chapter Subject Matter",bitGroups:[d.static],baseBitType:u._standard,description:"Chapter subject matter bit, used to create subject matter chapters in articles or books"},[u.chat]:{since:"1.3.0",title:"Chat",bitGroups:[d.chat,d.static],baseBitType:u._standard,description:"Chat bit, used to create chat sections in articles or books"},[u.conclusion]:{since:"1.3.0",title:"Conclusion",bitGroups:[d.static],baseBitType:u._standard,description:"Conclusion bit, used to create conclusions in articles or books"},[u.conclusionAlt]:{since:"1.16.0",title:"Conclusion Altenrative",bitGroups:[d.static],baseBitType:u.conclusion,description:"Alternative conclusion bit, used to create alternative conclusions in articles or books"},[u.documentUpload]:{since:"1.3.0",title:"Document Upload",bitGroups:[d.documentUpload,d.quizzes],baseBitType:u._standard,description:"Document upload bit, used to create document upload sections in articles or books"},[u.footNote]:{since:"1.3.0",title:"Foot Note",bitGroups:[d.static],baseBitType:u._standard,description:"Footnote bit, used to create footnotes in articles or books"},[u.formFreeText]:{since:"5.3.0",bitGroups:[d.interview,d.quizzes],baseBitType:u.interview,description:"Form free text bit, used to create free text forms in articles or books"},[u.groupBorn]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Group born bit, used to create group born sections in articles or books"},[u.groupDied]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Group died bit, used to create group died sections in articles or books"},[u.recordAudio]:{since:"1.3.0",title:"Record Audio",bitGroups:[d.quizzes,d.recordAudio],baseBitType:u._standard,description:"Record audio bit, used to create audio recording sections in articles or books"},[u.recordVideo]:{since:"1.5.24",title:"Record Video",bitGroups:[d.quizzes],baseBitType:u._standard,description:"Record video bit, used to create video recording sections in articles or books"},[u.stickyNote]:{since:"1.3.0",title:"Sticky Note",bitGroups:[d.static],baseBitType:u._standard,description:"Sticky note bit, used to create sticky notes in articles or books"},[u.takePicture]:{since:"1.3.0",title:"Take Picture",bitGroups:[d.quizzes,d.takePicture],baseBitType:u._standard,description:"Take picture bit, used to create picture taking sections in articles or books"},[u.handInAudio]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in audio bit, used to create audio submission sections in articles or books"},[u.handInContact]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in contact bit, used to create contact submission sections in articles or books"},[u.handInDocument]:{since:"1.5.15",title:"Hand in Document",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in document bit, used to create document submission sections in articles or books"},[u.handInFile]:{since:"3.2.0",title:"Hand in File",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in file bit, used to create file submission sections in articles or books",tags:[{key:ye.property_handInAcceptFileType,description:"Accepted file types for the hand-in file, used to define allowed file formats",format:v,maxCount:m}]},[u.handInFreeText]:{since:"5.3.0",bitGroups:[d.quizzes],baseBitType:u.interview,description:"Hand in free text bit, used to create free text submission sections in articles or books"},[u.handInFreeTextExpert]:{since:"5.3.0",bitGroups:[d.quizzes],baseBitType:u.interview,description:"Hand in free text expert bit, used to create free text expert submission sections in articles or books"},[u.handInLocation]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in location bit, used to create location submission sections in articles or books"},[u.handInPhoto]:{since:"1.5.15",title:"Hand in Photo",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in photo bit, used to create photo submission sections in articles or books"},[u.handInScan]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in scan bit, used to create scan submission sections in articles or books"},[u.handInSystemMedia]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in system media bit, used to create system media submission sections in articles or books",tags:[{key:ye.property_handInAcceptFileType,description:"Accepted file types for the hand-in system media, used to define allowed file formats",format:v,maxCount:m}]},[u.handInSubmit]:{since:"3.2.0",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in submit bit, used to create submission sections in articles or books",tags:[{key:ye.property_handInRequirement,description:"Requirement for the hand-in submission, used to define what is needed",format:v,maxCount:m},{key:ye.property_handInInstruction,description:"Instruction for the hand-in submission, used to guide the user",format:v},{key:ye.property_buttonCaption,description:"Caption for the button in the hand-in submission, used to define the button text",format:v}]},[u.handInVideo]:{since:"1.5.15",title:"Hand In Video",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in video bit, used to create video submission sections in articles or books"},[u.handInVoice]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in voice bit, used to create voice submission sections in articles or books"},[u.trueFalse1]:{since:"1.3.0",title:"True False",bitGroups:[d.quizzes,d.trueFalse],baseBitType:u._standard,description:"True/False bit, used to create true/false questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for true/false questions"},{key:ye.property_labelTrue,description:"Label for the true option in the true/false question",format:v},{key:ye.property_labelFalse,description:"Label for the false option in the true/false question",format:v},{exportJsonKey:{statement:"$",isCorrect:!0},key:ye.tag_true,description:"Tag for the true option in the true/false question",format:T},{exportJsonKey:{statement:"$",isCorrect:!1},key:ye.tag_false,description:"Tag for the false option in the true/false question",format:T},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{"@absent":{isExample:!0,example:!0}},{"@value=false":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example flag for the bit (boolean)",format:C,nullable:!0}],rootExampleType:b},[u.trueFalse]:{since:"1.3.0",title:"True False",bitGroups:[d.quizzes,d.trueFalse],baseBitType:u._standard,description:"True/False bit, used to create true/false questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for true/false questions"},{key:ye.property_labelTrue,description:"Label for the true option in the true/false question",format:v},{key:ye.property_labelFalse,description:"Label for the false option in the true/false question",format:v},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:V},[u.vendorAmcharts5Chart]:{since:"1.5.8",title:"Amcharts 5 Chart",bitGroups:[d.static],baseBitType:u.code,description:"AmCharts 5 chart bit, used to embed AmCharts 5 charts in articles or books",textFormatDefault:S.json},[u.vendorDatadogDashboard]:{since:"5.2.0",title:"Datadog Dashboard",bitGroups:[d.static],baseBitType:u.nonProductionPrototypeIframe,description:"A Datadog dashboard bit, used to embed Datadog dashboards"},[u.vendorDatadogDashboardEmbed]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.code,description:"Datadog dashboard embed bit, used to embed Datadog dashboards in articles or books",tags:[{key:ye.property_vendorDashboardId,description:"Dashboard ID for the Datadog dashboard, used to define which dashboard to embed",format:v}],textFormatDefault:S.plainText},[u.vendorFormbricksEmbed]:{since:"3.8.0",bitGroups:[d.static],baseBitType:u.code,description:"Formbricks embed bit, used to embed Formbricks surveys in articles or books",tags:[{key:ye.property_vendorSurveyId,description:"Survey ID for the Formbricks survey, used to define which survey to embed",format:v}],textFormatDefault:S.plainText},[u.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",title:"Formbricks Embed Anonymous",bitGroups:[d.static],baseBitType:u.vendorFormbricksEmbed,description:"Anonymous Formbricks embed bit, used to embed anonymous Formbricks surveys in articles or books"},[u.vendorFormbricksLink]:{since:"3.8.0",bitGroups:[d.static],baseBitType:u.code,description:"Formbricks link bit, used to create links to Formbricks surveys in articles or books",tags:[{key:ye.property_vendorSurveyId,description:"Survey ID for the Formbricks survey, used to define which survey to link to",format:v}],textFormatDefault:S.plainText},[u.vendorFormbricksLinkAnonymous]:{since:"3.9.0",bitGroups:[d.static],baseBitType:u.vendorFormbricksLink,description:"Anonymous Formbricks link bit, used to create links to anonymous Formbricks surveys in articles or books"},[u.vendorHighchartsChart]:{since:"1.5.28",title:"Highcharts Chart",bitGroups:[d.static],baseBitType:u.vendorAmcharts5Chart,description:"Highcharts chart bit, used to embed Highcharts charts in articles or books"},[u.vendorIframelyEmbed]:{since:"1.5.10",title:"Iframely Embed",bitGroups:[d.static],baseBitType:u.code,description:"Iframely embed bit, used to embed content from various sources in articles or books",tags:[{key:ye.property_width,description:"Width for the embedded content, used to define the width in pixels",format:_,nullable:!0},{key:ye.property_height,description:"Height for the embedded content, used to define the height in pixels",format:_,nullable:!0},{key:ye.property_vendorUrl,description:"URL for the content to be embedded, used to define the source URL",format:v}],textFormatDefault:S.plainText},[u.vendorIframelyCard]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.vendorIframelyEmbed,description:"Iframely card bit, used to create cards for embedded content in articles or books"},[u.vendorIframelyPreview]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.vendorIframelyEmbed,description:"Iframely preview bit, used to create previews for embedded content in articles or books"},[u.vendorIframelyPreviewMini]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.vendorIframelyEmbed,description:"Iframely preview mini bit, used to create mini previews for embedded content in articles or books"},[u.vendorJupyterOutput]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Jupyter output bit, used to embed Jupyter notebook outputs in articles or books",tags:[{key:ye.property_jupyterId,description:"Jupyter ID for the notebook, used to define which notebook to embed",format:v},{key:ye.property_jupyterExecutionCount,description:"Execution count for the Jupyter output, used to define the execution order",format:_,nullable:!0}],textFormatDefault:S.plainText},[u.vendorJupyterCellCode]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter cell code bit, used to embed Jupyter notebook cell code in articles or books"},[u.vendorJupyterCellMarkdown]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter cell markdown bit, used to embed Jupyter notebook cell markdown in articles or books"},[u.vendorJupyterCellRaw]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter cell raw bit, used to embed Jupyter notebook cell raw content in articles or books"},[u.vendorJupyterIpynb]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter IPYNB bit, used to embed Jupyter notebook files in articles or books"},[u.vendorPadletEmbed]:{since:"1.3.0",title:"Padlet Embed",bitGroups:[d.static],baseBitType:u.code,description:"Padlet embed bit, used to embed Padlet boards in articles or books",tags:[{key:ye.property_padletId,description:"Padlet ID for the board, used to define which Padlet to embed",format:v}],textFormatDefault:S.plainText},[u.vendorStripePricingTable]:{since:"1.20.0",title:"Stripe Pricing Table",bitGroups:[d.static],baseBitType:u.article,description:"Stripe pricing table bit, used to embed Stripe pricing tables in articles or books",tags:[{key:ye.property_stripePricingTableId,description:"Stripe pricing table ID, used to define which pricing table to embed",format:v,minCount:1},{key:ye.property_stripePublishableKey,description:"Stripe publishable key, used to authenticate the Stripe pricing table",format:v,minCount:1}]},[u.vendorStripePricingTableExternal]:{since:"3.13.0",title:"Stripe Pricing Table External",bitGroups:[d.static],baseBitType:u.vendorStripePricingTable,description:"External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"},[u.vendorStripePricingTablePrintOnRequest]:{since:"5.21.0",title:"Print on Request",bitGroups:[d.static],baseBitType:u.vendorStripePricingTable,description:"Stripe pricing table bit with print-on-request customer/product IDs, used to embed Stripe pricing tables tied to a specific print-on-request customer and product",tags:[{key:ye.property_stripePricingTableDescriptiveName,description:"Descriptive name for the Stripe pricing table",format:v},{key:ye.property_printOnRequestCustomerId,description:"Print-on-request customer ID, used to identify the customer for the print-on-request flow",format:v,minCount:1},{key:ye.property_printOnRequestProductId,description:"Print-on-request product ID, used to identify the product for the print-on-request flow",format:v,minCount:1}]},[u.video]:{since:"1.3.0",title:"Video",bitGroups:[d.static],baseBitType:u._standard,description:"Video bit, used to embed videos in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for videos, used to define additional properties"},{key:ye.group_resourceVideo,description:"Resource video tags, used to attach videos to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.videoLandscape]:{since:"1.3.0",title:"Video (Landscape)",bitGroups:[d.static],baseBitType:u.video,description:"Landscape video bit, used to embed landscape videos in articles or books"},[u.videoPortrait]:{since:"1.3.0",title:"Video Portrait",bitGroups:[d.static],baseBitType:u.video,description:"Portrait video bit, used to embed portrait videos in articles or books"},[u.videoEmbed]:{since:"1.3.0",title:"Video Embed",bitGroups:[d.static],baseBitType:u._standard,description:"Video embed bit, used to embed videos from external sources in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for video embeds, used to define additional properties"},{key:ye.group_resourceVideoEmbed,description:"Resource video embed tags, used to attach video embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.videoEmbedLandscape]:{since:"1.3.0",title:"Video Embed Landscape",bitGroups:[d.static],baseBitType:u.videoEmbed,description:"Landscape video embed bit, used to embed landscape videos from external sources in articles or books"},[u.videoEmbedPortrait]:{since:"1.3.0",title:"Video Embed Portrait",bitGroups:[d.static],baseBitType:u.videoEmbed,description:"Portrait video embed bit, used to embed portrait videos from external sources in articles or books"},[u.videoLink]:{since:"1.3.0",title:"Video Link",bitGroups:[d.static],baseBitType:u._standard,description:"Video link bit, used to create links to videos in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for video links, used to define additional properties"},{key:ye.group_resourceVideoLink,description:"Resource video link tags, used to attach video links to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.videoLinkLandscape]:{since:"1.3.0",title:"Video Link Landscape",bitGroups:[d.static],baseBitType:u.videoLink,description:"Landscape video link bit, used to create links to landscape videos in articles or books"},[u.videoLinkPortrait]:{since:"1.3.0",title:"Video Link Portrait",bitGroups:[d.static],baseBitType:u.videoLink,description:"Portrait video link bit, used to create links to portrait videos in articles or books"},[u.websiteLink]:{since:"1.3.0",title:"Website Link",bitGroups:[d.static],baseBitType:u._standard,description:"Website link bit, used to create links to websites in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for website links, used to define additional properties"},{key:ye.group_resourceWebsiteLink,description:"Resource website link tags, used to attach website links to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.nonProductionPrototypeIframe]:{since:"4.20.0",title:"iFrame (Not for Production)",bitGroups:[d.nonProduction,d.static],baseBitType:u._standard,description:"A non-production prototype iframe bit, used to embed prototype iframes",tags:[{key:ye.property_iframeSrc,description:"Iframe source URL, used to define the source of the iframe",minCount:1},{key:ye.property_iframeName,description:"Iframe name, used to define the name of the iframe"}]},[u.vendorLearndashEmbed]:{since:"5.0.0",title:"Learndash",bitGroups:[d.static],baseBitType:u.nonProductionPrototypeIframe,description:"Learndash embed bit, used to embed Learndash content in an iframe"}},Ee={[Te.app]:{since:"5.39.0",description:"App resources",title:"App",resourceTypes:[y.appLink]},[Te.article]:{since:"5.39.0",description:"Article resources",title:"Article",resourceTypes:[y.article,y.articleEmbed,y.articleLink]},[Te.audio]:{since:"5.39.0",description:"Audio resources",title:"Audio",resourceTypes:[y.audio,y.audioEmbed,y.audioLink]},[Te.document]:{since:"5.39.0",description:"Document resources",title:"Document",resourceTypes:[y.document,y.documentDownload,y.documentEmbed,y.documentLink]},[Te.image]:{since:"5.39.0",description:"Image resources",title:"Image",resourceTypes:[y.image,y.imageEmbed,y.imageLandscape,y.imageLink,y.imagePortrait,y.imageResponsive]},[Te.stillImageFilm]:{since:"5.39.0",description:"Still-image film resources",title:"Still image film",resourceTypes:[y.stillImageFilm,y.stillImageFilmEmbed,y.stillImageFilmLink]},[Te.video]:{since:"5.39.0",description:"Video resources (incl. still-image film variants, per the historical book-service grouping)",title:"Video",resourceTypes:[y.stillImageFilmEmbed,y.stillImageFilmLink,y.video,y.videoEmbed,y.videoLink]},[Te.website]:{since:"5.39.0",description:"Website resources",title:"Website",resourceTypes:[y.websiteLink]}},Le=new class{constructor(){l(this,"bitLevelMin",1),l(this,"bitLevelMax",7),l(this,"bitCache",new Map),l(this,"migratedBitCache",new Map),l(this,"allResourcesCache"),l(this,"comboResourcesCache",new Map),l(this,"bitGroupKeyCache"),l(this,"bitGroupToBitTypesCache"),l(this,"resourceGroupKeyCache"),l(this,"translations")}registerTranslations(e){const t={};for(const[r,i]of Object.entries(e)){const e={};for(const[t,r]of Object.entries(i))e[t.toLowerCase()]=r;t[r]=e}this.translations=t}getBitGroupKey(e){if(null!=e)return this.getBitGroupKeyMap().get(e)}getResourceGroupKey(e){if(null!=e)return this.getResourceGroupKeyMap().get(e)}getBitGroupsForBitType(e){if(null==e)return[];const t=Ie[e];if(!t)return[];if(t.bitGroups)return[...t.bitGroups];const r=this.getMigratedBitType(e);return r?this.getBitGroupsForBitType(r):[]}getBitTypesForBitGroups(e,t){const r=t?.includeDeprecated??!0,i=this.getBitGroupToBitTypesMap(),o=new Set;for(const t of e){const e=this.getBitGroupKey(t);if(e)for(const t of i.get(e)??[])!r&&Ie[t]?.deprecated||o.add(t)}return[...o].sort()}getBitGroupsForBitTypes(e){const t=new Set;for(const r of e)for(const e of this.getBitGroupsForBitType(r))t.add(e);return[...t].sort()}getResourceTypesForResourceGroups(e){const t=new Set;for(const r of e){const e=this.getResourceGroupKey(r);if(e)for(const r of Ee[e].resourceTypes)t.add(r)}return[...t].sort()}getResourceGroupsForResourceTypes(e){const t=new Set(e),r=new Set;for(const[e,i]of Object.entries(Ee))i.resourceTypes.some(e=>t.has(e))&&r.add(e);return[...r].sort()}getBitTitle(e,t){const r=Ie[e]?.title;return this.translate(e,r,t)}getBitGroupTitle(e,t){const r=this.getBitGroupKey(e);return r?this.translate(r,Pe[r].title,t):e}getResourceGroupTitle(e,t){const r=this.getResourceGroupKey(e);return r?this.translate(r,Ee[r].title,t):e}translate(e,t,r){if(r&&this.translations){const t=this.translations[e];if(t){let e=r.toLowerCase();for(;;){const r=t[e];if(r)return r;const i=e.lastIndexOf("-");if(i<0)break;e=e.substring(0,i)}}}return t??e}getBitGroupKeyMap(){if(!this.bitGroupKeyCache){const e=new Map;for(const[t,r]of Object.entries(Pe)){if(e.has(t))throw new Error(`Duplicate bit-group key/alias: ${t}`);e.set(t,t);for(const i of r.aliases??[]){if(e.has(i))throw new Error(`Duplicate bit-group key/alias: ${i}`);e.set(i,t)}}this.bitGroupKeyCache=e}return this.bitGroupKeyCache}getResourceGroupKeyMap(){if(!this.resourceGroupKeyCache){const e=new Map;for(const[t,r]of Object.entries(Ee)){if(e.has(t))throw new Error(`Duplicate resource-group key/alias: ${t}`);e.set(t,t);for(const i of r.aliases??[]){if(e.has(i))throw new Error(`Duplicate resource-group key/alias: ${i}`);e.set(i,t)}}this.resourceGroupKeyCache=e}return this.resourceGroupKeyCache}getBitGroupToBitTypesMap(){if(!this.bitGroupToBitTypesCache){const e=new Map;for(const t of Object.keys(Pe))e.set(t,[]);for(const t of Object.keys(Ie).sort())for(const r of this.getBitGroupsForBitType(t)){const i=e.get(r);if(!i)throw new Error(`Bit '${t}' references unknown bit group '${r}'`);i.push(t)}this.bitGroupToBitTypesCache=e}return this.bitGroupToBitTypesCache}getBitType(e){return e?.startsWith("|")&&(e=e.substring(1)),(0,p.Enum)(u).fromValue(e)??u._error}getMigratedBitType(e){const t=this.migratedBitCache.get(e);if(void 0!==t||this.migratedBitCache.has(e))return t;let r;return e!==u.collapsible&&e.endsWith("-collapsible")&&(r=Ie[e]?.baseBitType),this.migratedBitCache.set(e,r),r}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const r=this.getBitConfig(e);if(!r)return!1;if(Array.isArray(t)){for(const e of t)if(r.inheritedBitTypesSet.has(e))return!0;return!1}return r.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!e?.startsWith("|")}getBitConfig(e){let t=this.bitCache.get(e);if(!t){const r=()=>{throw new Error(`No config found for bit: ${e}`)},i=[],o=[];let a=e;for(;a;){const e=Ie[a];e||r(),i.push(a),o.push(e),a=e.baseBitType}o.reverse();const s=o.reduce((e,t)=>e=_e.deepMerge(e,t),{}),{since:n,textFormatDefault:l,quizBit:c,tags:p,cardSet:u,deprecated:d,bodyAllowed:h,bodyRequired:b,footerAllowed:g,footerRequired:y,resourceAttachmentAllowed:f,rootExampleType:k}=s;p?.push({key:ye.property_internalComment,description:"Internal comment for the bit.",format:v,maxCount:m,minCount:0});const x=this.getAllResourcesTagsWithZeroCounts(),T=Se.hydrateTagsConfig(p??[]),_=Se.hydrateCardSetConfig(u),C=T.info?.comboResourceConfigKey,w={...T.tags};for(const[e,t]of Object.entries(x))w[e]||(w[e]=t);t=new me({since:n,bitType:e,title:Ie[e]?.title,bitGroups:this.getBitGroupsForBitType(e),inheritedBitTypes:i,textFormatDefault:l??S.bitmarkText,tags:w,cardSet:_,quizBit:c,deprecated:d,bodyAllowed:h,bodyRequired:b,footerAllowed:g,footerRequired:y,resourceAttachmentAllowed:f,rootExampleType:k,comboResourceConfigKey:C}),this.bitCache.set(e,t)}return t}getTagConfigForTag(e,t){if(e)return e[t]}getTagsConfigForCardSet(e,t,r){const i=this.getCardSetVariantConfig(e,t,r);if(i)return i.tags}getCardSetVariantConfig(e,t,r){let i;const o=this.getBitConfig(e);if(!o)return;const a=o.cardSet?.variants;if(!a)return;const s=a[Math.min(t,a.length-1)],n=s.length-1;return i=r>n?s[n]:s[r],i}getBitResourcesConfig(e,t){let r={};const i=new Map,o=t?f(t):void 0,a=this.getBitConfig(e),s={};for(const[e,t]of Object.entries(a.tags))t.type===oe&&(s[e]=t);const n=a.comboResourceConfigKey??(a.resourceAttachmentAllowed?o:void 0);if(n){const e=new Map,o=this.getComboResource(n);if(o){const t=Object.values(o).filter(e=>e.type===oe);t.map(e=>e.configKey).forEach(r=>{const i=t.find(e=>e.configKey===r);i&&e.set(r,i)});const r=this.getComboResourceConfigKeys(n);r&&r.length>0&&i.set(n,r)}if(t)for(const[t,i]of Object.entries(s)){const o=n===i.configKey,a=!!e&&e.has(i.configKey);if(o){const e=new ce({configKey:i.configKey,tag:i.tag,minCount:1,maxCount:1,chain:i.chain,jsonKey:i.jsonKey,exportJsonKey:i.exportJsonKey,hasExportJsonKey:i.hasExportJsonKey,htmlKey:i.htmlKey,hasHtmlKey:i.hasHtmlKey,deprecated:i.deprecated});r[t]=e}else if(a){if(e){const o=e.get(i.configKey);o&&(r[t]=o)}}else r[t]=i}else r=s}else r=s;return new ve(r,a.resourceAttachmentAllowed,o,i)}getComboResourceConfigKeys(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter(e=>e.type===oe).map(e=>e.configKey)}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(Be).filter(t=>t.type===ee&&t.comboResourceConfigKey===e).forEach(e=>{t={...t,...Se.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(Be).filter(e=>e.type===X).forEach(t=>{e={...e,...Se.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}},Ne="@gmb/bitmark-parser-generator",Ve="5.39.0",Re="ISC",Ge=(r(722),""),Fe="node",Ke="chrome",$e="safari",Oe="firefox",Je=(r(722),""),De="macos";function ze(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:Ge,os:Je},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce((e,t)=>(t&&e.push(t),e),[]),r={keys:new Set,versions:{}};let i="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let a=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){a=!0;break}a?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),i=t.keys.has("chrome"),o=t.keys.has("chromium"),a=t.keys.has("safari"),s=i,n=r,l=t.keys.has("macintosh");return a&&!i&&!o?(e.browser=$e,e.browserVersion=t.versions.version):s?(e.browser=Ke,e.browserVersion=t.versions.chrome):n&&(e.browser=Oe,e.browserVersion=t.versions.firefox),l&&(e.os=De,e.osVersion=t.versions.x),e}var qe={full:"",major:"",minor:"",patch:"",build:""},je=new class{constructor(){l(this,"bootTimestamp"),l(this,"app"),l(this,"appVersion"),l(this,"environment"),l(this,"environmentVersion"),l(this,"os"),l(this,"osVersion"),l(this,"isBrowser"),l(this,"isNode"),l(this,"isCI"),l(this,"NODE_ENV"),l(this,"userAgentInfo"),Object.defineProperty(this,"userAgentInfo",{value:ze(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=qe,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===Fe,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?Fe:Ge}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):qe}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,Je)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):qe}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 qe;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,s=t.length;e<s;e++){const s=t[e];0===e?r=s:1===e?i=s:2===e?a=s:3===e&&(o=s)}return{full:e,major:r,minor:i,patch:a,build:o}}},Me=je.init.bind(je),He=!1;function Ue(){He||(Me(Ne,Ve),He=!0)}var We=r(722),Ye=(r(722),{text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"}),Qe=(r(722),{bold:"bold",light:"light",italic:"italic",highlight:"highlight",highlightOrange:"highlightOrange",highlightYellow:"highlightYellow",highlightGreen:"highlightGreen",highlightBlue:"highlightBlue",highlightPurple:"highlightPurple",highlightPink:"highlightPink",highlightBrown:"highlightBrown",highlightBlack:"highlightBlack",highlightWhite:"highlightWhite",highlightGray:"highlightGray",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",smallcaps:"smallcaps",circle:"circle",languageEmRed:"languageEmRed",languageEmOrange:"languageEmOrange",languageEmYellow:"languageEmYellow",languageEmGreen:"languageEmGreen",languageEmBlue:"languageEmBlue",languageEmPurple:"languageEmPurple",languageEmPink:"languageEmPink",languageEmBrown:"languageEmBrown",languageEmBlack:"languageEmBlack",languageEmWhite:"languageEmWhite",languageEmGray:"languageEmGray",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",textStyle:"textStyle",colorPicker:"colorPicker",comment:"comment"}),Ze=(r(722),{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"}),Xe=(r(722),{unknown:"unknown",__isDefaultExample:"__isDefaultExample",__typeAlias:"__typeAlias",accessibilityGroupTag:"accessibilityGroupTag",accessibilityGroupTagValue:"accessibilityGroupTagValue",accessibilityTag:"accessibilityTag",accessibilityTagValue:"accessibilityTagValue",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",advertisingClickUrl:"advertisingClickUrl",advertisingClickUrlValue:"advertisingClickUrlValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",allowPrint:"allowPrint",allowPrintValue:"allowPrintValue",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",authorFullName:"authorFullName",authorFullNameValue:"authorFullNameValue",authorJobTitle:"authorJobTitle",authorJobTitleValue:"authorJobTitleValue",authorPseudonym:"authorPseudonym",authorPseudonymValue:"authorPseudonymValue",authorTitle:"authorTitle",authorTitleValue:"authorTitleValue",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",backgroundImage:"backgroundImage",backgroundImageValue:"backgroundImageValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",bitFingerprint:"bitFingerprint",bitFingerprintValue:"bitFingerprintValue",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",bodyValue:"bodyValue",book:"book",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookAuthor:"bookAuthor",bookBindingType:"bookBindingType",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bookIsbn:"bookIsbn",bookLanguage:"bookLanguage",bookNumberOfPages:"bookNumberOfPages",bookOriginalTitle:"bookOriginalTitle",bookPublisher:"bookPublisher",bookPublishingDate:"bookPublishingDate",bookRating:"bookRating",bookSeriesId:"bookSeriesId",bookSeriesNumber:"bookSeriesNumber",bookSeriesTitle:"bookSeriesTitle",bookTranslator:"bookTranslator",bookType:"bookType",bookValue:"bookValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",brandColor:"brandColor",brandColorName:"brandColorName",brandColorNameValue:"brandColorNameValue",brandColorValue:"brandColorValue",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",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",chatWithBookValue:"chatWithBookValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",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",currency:"currency",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",customerProductId:"customerProductId",customerProductShopLink:"customerProductShopLink",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",displayName:"displayName",displayNameValue:"displayNameValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",diffTo:"diffTo",diffToValue:"diffToValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",elementsValueValue:"elementsValueValue",emphasis:"emphasis",end:"end",enforceUpdateOverUserInput:"enforceUpdateOverUserInput",enforceUpdateOverUserInputValue:"enforceUpdateOverUserInputValue",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extractorExtractionTimestamp:"extractorExtractionTimestamp",extractorExtractionTimestampValue:"extractorExtractionTimestampValue",extractorTag:"extractorTag",extractorTagValue:"extractorTagValue",extractorInternal:"extractorInternal",extractorInternalValue:"extractorInternalValue",extraProperties:"extraProperties",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",footerValue:"footerValue",forKeys:"forKeys",format:"format",formula:"formula",formulaValue:"formulaValue",forValues:"forValues",forValuesValue:"forValuesValue",fullName:"fullName",fullNameValue:"fullNameValue",gap:"gap",gmbExternalShop:"gmbExternalShop",gmbExternalShopItems:"gmbExternalShopItems",groupTag:"groupTag",groupTagValue:"groupTagValue",gUri:"gUri",gUriValue:"gUriValue",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",hasPrintRestriction:"hasPrintRestriction",hasPrintRestrictionValue:"hasPrintRestrictionValue",head:"head",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",hintValue:"hintValue",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",iframeName:"iframeName",iframeSrc:"iframeSrc",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",ingredient:"ingredient",ingredientValue:"ingredientValue",instruction:"instruction",instructionValue:"instructionValue",internalComment:"internalComment",internalCommentValue:"internalCommentValue",internalPrintPdf:"internalPrintPdf",internalPrintPdfValue:"internalPrintPdfValue",isCaseSensitive:"isCaseSensitive",isCollapsible:"isCollapsible",isCollapsibleValue:"isCollapsibleValue",isCommented:"isCommented",isCorrect:"isCorrect",isEditable:"isEditable",isEditableValue:"isEditableValue",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTemplate:"isTemplate",isTemplateStripTheme:"isTemplateStripTheme",isTemplateStripThemeValue:"isTemplateStripThemeValue",isTemplateValue:"isTemplateValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",itemValue:"itemValue",jobTitle:"jobTitle",jobTitleValue:"jobTitleValue",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",layerRole:"layerRole",layerRoleValue:"layerRoleValue",layerValue:"layerValue",lead:"lead",leadValue:"leadValue",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",listPrice:"listPrice",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",marginNumberValue:"marginNumberValue",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",needsValidation:"needsValidation",needsValidationValue:"needsValidationValue",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageNumberValue:"pageNumberValue",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",path:"path",pathValue:"pathValue",person:"person",platformBackgroundColor:"platformBackgroundColor",platformBackgroundColorValue:"platformBackgroundColorValue",platformBackgroundImage:"platformBackgroundImage",platformBackgroundImageValue:"platformBackgroundImageValue",platformBaseLayerColor:"platformBaseLayerColor",platformBaseLayerColorValue:"platformBaseLayerColorValue",platformBorderColor:"platformBorderColor",platformBorderColorValue:"platformBorderColorValue",platformBorderRadius:"platformBorderRadius",platformBorderRadiusValue:"platformBorderRadiusValue",platformBrandTarget:"platformBrandTarget",platformBrandTargetValue:"platformBrandTargetValue",platformButtonBackgroundColor:"platformButtonBackgroundColor",platformButtonBackgroundColorValue:"platformButtonBackgroundColorValue",platformButtonPrimaryColor:"platformButtonPrimaryColor",platformButtonPrimaryColorValue:"platformButtonPrimaryColorValue",platformIcon:"platformIcon",platformIconValue:"platformIconValue",platformLogo:"platformLogo",platformLogoMaxHeight:"platformLogoMaxHeight",platformLogoMaxHeightValue:"platformLogoMaxHeightValue",platformLogoValue:"platformLogoValue",platformMargin:"platformMargin",platformMarginValue:"platformMarginValue",platformMessageBackgroundColor:"platformMessageBackgroundColor",platformMessageBackgroundColorValue:"platformMessageBackgroundColorValue",platformName:"platformName",platformNameValue:"platformNameValue",platformNeedsShadow:"platformNeedsShadow",platformNeedsShadowValue:"platformNeedsShadowValue",platformPlaceholderColor:"platformPlaceholderColor",platformPlaceholderColorValue:"platformPlaceholderColorValue",platformPrimaryColor:"platformPrimaryColor",platformPrimaryColorValue:"platformPrimaryColorValue",platformScrollbarColor:"platformScrollbarColor",platformScrollbarColorValue:"platformScrollbarColorValue",platformSecondaryColor:"platformSecondaryColor",platformSecondaryColorValue:"platformSecondaryColorValue",platformSelectionBorderRadius:"platformSelectionBorderRadius",platformSelectionBorderRadiusValue:"platformSelectionBorderRadiusValue",platformSelectionColor:"platformSelectionColor",platformSelectionColorValue:"platformSelectionColorValue",platformSelectionTextColor:"platformSelectionTextColor",platformSelectionTextColorValue:"platformSelectionTextColorValue",platformSeparatorColor:"platformSeparatorColor",platformSeparatorColorValue:"platformSeparatorColorValue",platformTextSelectionColor:"platformTextSelectionColor",platformTextSelectionColorValue:"platformTextSelectionColorValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",previewImage:"previewImage",previewImageValue:"previewImageValue",previewVideo:"previewVideo",previewVideoValue:"previewVideoValue",printParentChapterLevel:"printParentChapterLevel",printParentChapterLevelValue:"printParentChapterLevelValue",printOnRequestCustomerId:"printOnRequestCustomerId",printOnRequestCustomerIdValue:"printOnRequestCustomerIdValue",printOnRequestProductId:"printOnRequestProductId",printOnRequestProductIdValue:"printOnRequestProductIdValue",processHandIn:"processHandIn",processHandInLocation:"processHandInLocation",processHandInLocationValue:"processHandInLocationValue",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",pseudonym:"pseudonym",pseudonymValue:"pseudonymValue",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",questionValue:"questionValue",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",refPublicationYear:"refPublicationYear",refPublisher:"refPublisher",relatedBook:"relatedBook",relatedBookValue:"relatedBookValue",translationOfBook:"translationOfBook",translationOfBookValue:"translationOfBookValue",userFeedbackTranslationUrl:"userFeedbackTranslationUrl",userFeedbackTranslationUrlValue:"userFeedbackTranslationUrlValue",userFeedbackContentUrl:"userFeedbackContentUrl",userFeedbackContentUrlValue:"userFeedbackContentUrlValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",reportTag:"reportTag",reportTagValue:"reportTagValue",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",reviewTag:"reviewTag",reviewTagValue:"reviewTagValue",reviewerTag:"reviewerTag",reviewerTagValue:"reviewerTagValue",rightsPolicy:"rightsPolicy",rightsPolicyValue:"rightsPolicyValue",root:"root",rows:"rows",rowsValue:"rowsValue",rtl:"rtl",rtlValue:"rtlValue",rubric:"rubric",rubricValue:"rubricValue",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",searchValue:"searchValue",section:"section",select:"select",selected:"selected",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",sourceBB:"sourceBB",sourceBBValue:"sourceBBValue",sourceDocument:"sourceDocument",sourceDocumentValue:"sourceDocumentValue",sourceRL:"sourceRL",sourceRLValue:"sourceRLValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",spansPageBreak:"spansPageBreak",spansPageBreakValue:"spansPageBreakValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",srcAlt:"srcAlt",srcAltValue:"srcAltValue",start:"start",statement:"statement",statementValue:"statementValue",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePricingTableDescriptiveName:"stripePricingTableDescriptiveName",stripePricingTableDescriptiveNameValue:"stripePricingTableDescriptiveNameValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtitleValue:"subtitleValue",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableColWidth:"tableColWidth",tableColWidthValue:"tableColWidthValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeaderWhitespaceNoWrapValue:"tableHeaderWhitespaceNoWrapValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",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",titleString:"titleString",titleValue:"titleValue",toc:"toc",tocContent:"tocContent",tocContentValue:"tocContentValue",tocResource:"tocResource",tocResourceValue:"tocResourceValue",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",translationOf:"translationOf",translationOfValue:"translationOfValue",trim:"trim",type:"type",unit:"unit",unitAbbr:"unitAbbr",unitAbbrPlural:"unitAbbrPlural",unitPlural:"unitPlural",url:"url",validationDate:"validationDate",validationDateValue:"validationDateValue",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"}),et=class{constructor(){Ue()}walk(e,t,r,i){this.walkRecursive(e,[{index:0,key:t,value:e}],r,i)}getRouteKey(e){return e.reduce((t,r,i)=>(+r.key!==r.index&&(t+=`${r.key}`,i<e.length-1&&(t+="_")),t),"")}printTree(e,t=Xe.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==Xe.bodyJson),between:(e,t,r,i)=>{console.log("Between: "+this.getRouteKey(i))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(g.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,r,i){const{enter:o,between:a,exit:s,leaf:n}=r,l=t[t.length-1].key,c=!this.isValue(e),p=t[t.length-1];if(c){if(o){if(!1===o(p,t,i))return}}else n&&n(p,t,i);if(c){const o=this.isArray(e),s=Object.keys(e);for(let n=0,c=s.length;n<c;n++){const u=s[n],d=n===c-1,m=e,h=m[u];if(null!=h){const e={key:this.getAstKey(u,l,o),index:n,value:h},c=t.slice();if(c.push(e),this.walkRecursive(h,c,r,i),!d){const r=s[n+1],c=m[r],u={key:this.getAstKey(r,l,o),index:n+1,value:c};if(a){if(!1===a(p,e,u,t,i))break}}}}}c&&s&&s(p,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),(0,We.Enum)(Xe).fromKey(i)||`unknown(${i})`}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)}},tt=r(722),rt=(r(722),"tag"),it="body",ot=(r(722),{plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"}),at=/([*`_!=])(?=\1)/,st=/(\^*])/,nt=/(\^+)/,lt=`${st.source}|${nt.source}`,ct=`${at.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}|${nt.source}`,pt=`${/^(\[)(\^*)(\.)/.source}`,ut=new RegExp(`${at.source}|${st.source}|${nt.source}`,"gm"),dt=new RegExp(lt,"gm"),mt=new RegExp(ct,"gm"),ht=new RegExp(pt,"gm"),bt=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),gt=new RegExp("\\^([\\^]*)","gm"),yt=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),ft=new RegExp("^(\\||•|#)","gm"),kt={format:ot.bitmarkPlusPlus,location:it,v2:!1};function xt(e){return"string"==typeof e||e instanceof String}var vt={format:S.bitmarkText,location:it,inPlaceArray:!1,v2:!1},Tt=new class{constructor(){l(this,"EMPTY_STRING","")}breakscape(e,t={}){if(null==e)return;const r=Object.assign({},kt,t);if(Array.isArray(e))return e.map(e=>this.breakscape(e,r));if(!xt(e))return e;const{regex:i,replacer:o}=function(e,t,r=!1){return t===rt?r||e!==ot.bitmarkPlusPlus?{regex:dt,replacer:"$2^$1"}:{regex:ut,replacer:"$1$3^$2"}:e===ot.bitmarkPlusPlus?r?{regex:bt,replacer:"$1$4^$2$3"}:{regex:mt,replacer:"$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14"}:{regex:ht,replacer:"$1^$2$3"}}(r.format,r.location,r.v2);let a=e;return a=a.replace(i,o),a}unbreakscape(e,t={}){if(null==e)return;const r=Object.assign({},kt,t);if(Array.isArray(e))return e.map(e=>this.unbreakscape(e,r));if(!xt(e))return e;const{regex:i,replacer:o}=function(e,t){const r=e!==ot.bitmarkPlusPlus;return t===it&&r?{regex:yt,replacer:"$1$2$3"}:{regex:gt,replacer:"$1"}}(r.format,r.location);let a=e;return a=a.replace(i,o),a}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},kt,t),i=e=>e?e.replace(ft,"$1^"):e;if(Array.isArray(e)){const t=r.inPlaceArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];xt(r)&&(e[t]=i(r))}e=t}else xt(e)&&(e=i(e));return e}version(){return Ve}license(){return Re}},_t=new class{constructor(){l(this,"EMPTY_STRING","")}breakscape(e,t){const r=Object.assign({},vt,t);return Tt.breakscape(e,{format:r.format,location:r.location,inPlaceArray:r.inPlaceArray,v2:r.v2})}unbreakscape(e,t){const r=Object.assign({},vt,t);return Tt.unbreakscape(e,r)}breakscapeCode(e,t){const r=Object.assign({},vt,t);return Tt.breakscapeCode(e,r)}concatenate(e,t){return e+t}},Ct=(r(722),{bitmarkMinusMinus:"bitmark--"});function wt(e){const t={};if(e.columns&&e.columns.length>0&&(t.header={rows:[{cells:e.columns.map(e=>({content:e,title:!0}))}]}),e.data&&e.data.length>0&&(t.body={rows:e.data.map(e=>({cells:e.map(e=>({content:e}))}))}),Array.isArray(e.columnWidths)&&e.columnWidths.length>0){const r=t.header?.rows[0]?.cells??t.body?.rows[0]?.cells;if(r)for(let t=0;t<e.columnWidths.length;t++){const i=e.columnWidths[t];"number"==typeof i&&i>0&&r[t]&&(r[t].colwidth=i)}}return t}function At(e){const t={},r=e=>e&&Array.isArray(e.cells)?e.cells.map(e=>e?.content).filter(e=>void 0!==e):[],i=[],o=[];let a=!1,s=0;const n=e=>{e&&(e.length>s&&(s=e.length),e.forEach((e,t)=>{e&&"number"==typeof e.colwidth&&e.colwidth>0&&(o[t]=e.colwidth,a=!0)}))},l=e.header?.rows??[];if(l.forEach(e=>n(e?.cells)),(e.body?.rows??[]).forEach(e=>n(e?.cells)),(e.footer?.rows??[]).forEach(e=>n(e?.cells)),l.length>0){const e=r(l[0]);e.length>0&&(t.columns=e);l.slice(1).forEach(e=>{const t=r(e);t.length>0&&i.push(t)})}const c=e=>{e&&Array.isArray(e.rows)&&e.rows.forEach(e=>{const t=r(e);t.length>0&&i.push(t)})};if(c(e.body),c(e.footer),i.length>0&&(t.data=i),a){const e=t.columns?.length??s,r=new Array(e).fill(null);for(let t=0;t<e;t++){const e=o[t];"number"==typeof e&&(r[t]=e)}t.columnWidths=r}return t}function Bt(e,t){if(function(e){const t=e,r=!(!t.columns&&!t.data),i=!!(t.header||t.body||t.footer);return r&&i}(t)){const e=t;delete e.columns,delete e.data}const r=Le.isOfBitType(e,u.tableExtended)||Le.isOfBitType(e,u.tableImage);return r&&function(e){const t=e;return!(!t.columns&&!t.data||t.header||t.body||t.footer)}(t)?wt(t):!r&&function(e){const t=e;return!!(t.header||t.body||t.footer)}(t)?At(t):t}var St=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}removeDuplicates(e,t){const r=new Set;let i=0;for(let o=0;o<e.length;o++){const a=e[o],s=t?t(a):a;r.has(s)||(r.add(s),i!==o&&(e[i]=a),i++)}return i<e.length&&(e.length=i),e}},Pt=r(722),It=(r(722),{v2:2,v3:3}),Et=It.v3,Lt=class{constructor(){l(this,"ast",new et),l(this,"debugGenerationInline",!1),l(this,"printed",!1)}enter(e,t,r){let i;const o=this,a=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[a]&&(i=o[a](e,t,r)),i}between(e,t,r,i,o){let a;const s=this,n=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof s[n]&&(a=s[n](e,t,r,i,o)),a}exit(e,t,r){const i=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof i[o]&&i[o](e,t,r)}leaf(e,t,r){const i=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof i[o]&&i[o](e,t,r),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}getSiblingNodes(e){const t=this.getParentNode(e);if(!t||!t.value||!Array.isArray(t.value))return{};const r=t.value,i=r.findIndex(t=>t===e[e.length-1]?.value);return-1===i?{}:{left:i>0?r[i-1]:void 0,right:i<r.length-1?r[i+1]:void 0}}isEmptyParagraph(e){if(!e)return!1;if(e.type!==Ze.paragraph)return!1;if(!e.content||!Array.isArray(e.content))return!0;for(const t of e.content){if(t.type!==Ze.text)return!1;if(t.text&&""!==t.text.trim())return!1}return!0}},Nt={bodyBitCallback:void 0,debugGenerationInline:!1},Vt="==",Rt=["*","`","_","!","="],Gt={[Qe.bold]:"**",[Qe.light]:"``",[Qe.italic]:"__",[Qe.highlight]:"!!"},Ft=[Qe.bold,Qe.light,Qe.italic,Qe.highlight],Kt=[Qe.highlightOrange,Qe.highlightYellow,Qe.highlightGreen,Qe.highlightBlue,Qe.highlightPurple,Qe.highlightPink,Qe.highlightBrown,Qe.highlightBlack,Qe.highlightWhite,Qe.highlightGray,Qe.strike,Qe.subscript,Qe.superscript,Qe.ins,Qe.del,Qe.underline,Qe.doubleUnderline,Qe.smallcaps,Qe.circle,Qe.languageEmRed,Qe.languageEmOrange,Qe.languageEmYellow,Qe.languageEmGreen,Qe.languageEmBlue,Qe.languageEmPurple,Qe.languageEmPink,Qe.languageEmBrown,Qe.languageEmBlack,Qe.languageEmWhite,Qe.languageEmGray,Qe.languageEm,Qe.userUnderline,Qe.userDoubleUnderline,Qe.userStrike,Qe.userCircle,Qe.userHighlight,Qe.notranslate,Qe.link,Qe.ref,Qe.xref,Qe.extref,Qe.footnote,Qe.footnoteStar,Qe.symbol,Qe.var,Qe.code,Qe.timer,Qe.color,Qe.textStyle,Qe.colorPicker,Qe.comment],$t=["orange","yellow","green","blue","purple","pink","brown","white","black","gray"],Ot=new RegExp(/(\n|\r\n)/,"g"),Jt=new RegExp(/https?:\/\/|mailto:(.*)/,"g"),Dt=new RegExp(/\]/,"g"),zt="enter",qt="between",jt="exit",Mt=class e extends Lt{constructor(t,r){super(),l(this,"ast",new et),l(this,"bitmarkVersion"),l(this,"options"),l(this,"internalTextGenerator",null),l(this,"generateOptions",{}),l(this,"textFormat",S.bitmarkText),l(this,"textLocation",it),l(this,"writerText",""),l(this,"nodeIndex",0),l(this,"currentIndent",0),l(this,"prevIndent",0),l(this,"indentationStringCache",""),l(this,"inParagraph",!1),l(this,"inHeading",!1),l(this,"inCodeBlock",!1),l(this,"inBulletList",!1),l(this,"inInline",!1),l(this,"markDepth",0),l(this,"textDepth",0),l(this,"placeholderIndex",0),l(this,"placeholders",{}),l(this,"rootParagraphNodeContentIndex",0),l(this,"previousRootParagraphContextType",Ze.text),l(this,"inPreText",!1),l(this,"thisNodeIsPreText",!1),l(this,"preTextIndexTemp",-1),l(this,"havePreText",!1),l(this,"preTextIndex",-1),this.bitmarkVersion=(0,Pt.Enum)(It).fromValue(t)??Et,this.options={...Nt,...r},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.bitmarkVersion,It.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),this.options.isInternal||(this.internalTextGenerator=new e(t,{...this.options,writeCallback:void 0,isInternal:!0}))}async generate(e,t,r,i){return this.generateSync(e,t,r,i)}generateSync(e,t,r,i){if(!e||!Array.isArray(e))return"";if(this.generateOptions=Object.assign({},i),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const i=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,r),this.walkAndWrite(e),this.options.writeCallback=i,this.options.bodyBitCallback=o;const a=this.havePreText,s=this.preTextIndex;this.resetState(t,r),this.havePreText=a,this.preTextIndex=s,this.walkAndWrite(e)}else this.resetState(t,r),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=e??S.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.inBulletList=!1,this.inInline=!1,this.markDepth=0,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=Ze.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,Xe.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,r,i){return this.handleBetweenNode(e.value,t,r,i)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,r,i){this.handleBetweenContentValueNode(e,t,r,i)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,r,i){this.handleBetweenNode(e.value,t,r,i)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}enter_marks(e,t){this.markDepth++}exit_marks(e,t){this.markDepth--}handleEnterNode(e,t){if(!(this.markDepth>0))switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case Ze.paragraph:this.inParagraph=!0,this.writeParagraph(e,t);break;case Ze.hardBreak:this.writeHardBreak(e);break;case Ze.text:this.writeMarks(e,zt),this.writeText(e),this.writeMarks(e,qt),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case Ze.heading:this.writeHeading(e),this.inHeading=!0;break;case Ze.section:this.writeSection(e);break;case Ze.listItem:case Ze.taskItem:this.writeBullet(e,t);break;case Ze.image:case Ze.imageInline:this.writeImage(e);break;case Ze.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case Ze.latex:this.writeLatex(e);break;case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.inBulletList=!0;break;case Ze.gap:case Ze.select:case Ze.highlight:case Ze.mark:return this.writeBodyBit(e,t),!1}}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){if(!(this.markDepth>0)){switch(e.type){case Ze.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,jt);break;case Ze.paragraph:this.writeNL(),this.inParagraph=!1;break;case Ze.heading:this.inHeading=!1;case Ze.section:case Ze.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case Ze.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1;break;case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}}handleIndent(e){switch(e.type){case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=Ze.hardBreak)}handleBetweenContentValueNode(e,t,r,i){if(3===i.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===Ze.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===Ze.hardBreak)return;if(e.type===Ze.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===Ze.text&&e.marks){const t=e.marks.reduce((e,t)=>{if(t.type===Qe.link){const e=t,r=e.attrs?.href;if(r)return r}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 r=`[!${this.placeholderIndex}]`;if(this.placeholders[r]=e,this.options.bodyBitCallback){const r=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(r)}else this.write(r);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let r=e.text;const i=this.getLinkText(e);if(i&&(r=i),r=i||this.breakscape(r,{format:this.textFormat,location:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();r=r.replace(Ot,`$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,{format:S.plainText,location:this.textLocation});this.write(t)}else this.write(r);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==r||(this.thisNodeIsPreText=!1)}isSimpleLink(e){if(null==e.text)return!1;if(1!==e.marks?.length)return!1;const t=this.getLinkHref(e);if(t){return t.replace(Jt,"$1")===e.text}return!1}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let r;return r=t.replace(Jt,"$1")===e.text?t:e.text,r=(r??"").replace(Dt,"^]"),r}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===It.v2)return"";if(this.textFormat===S.plainText)return"";const t=this.writerText.slice(-1),r=e.slice(0,1);return t===r&&-1!==Rt.indexOf(t)||this.textLocation===it&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(r)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==Ze.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const r=this.generateOptions.forceInline||!(!this.inInline&&!this.inHeading);this.thisNodeIsPreText=!1;if(0===e.marks.length)return void this.writeMarkTextWrapper(Vt);const i=this.getWritableMarks(e.marks);if(0===i.length)return;const o=1===i.length&&r,a=i.reduce((e,t)=>e||(this.isStandardMark(t)?o?Gt[t.type]:Vt:this.isInlineMark(t)?Vt:e),void 0),s=this.isSimpleLink(e);if(null!=a&&!s){if(t!=zt&&t!=qt||this.writeMarkTextWrapper(a),t==qt)for(const e of i)this.isStandardMark(e)?o||(this.writeInlineMarkStartEnd(),this.writeInlineMark(e)):Qe.comment===e.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(e)):Qe.link===e.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(e)):Qe.ref===e.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(e)):Qe.xref===e.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(e)):Qe.extref===e.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(e)):Qe.footnote===e.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(e)):Qe.footnoteStar===e.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(e)):Qe.symbol===e.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(e)):this.isInlineMark(e)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(e));if(t==jt){let e=!1;for(const t of i)this.isStandardMark(t)?o||(e=!0):(Qe.comment===t.type||Qe.link===t.type||Qe.ref===t.type||Qe.xref===t.type||Qe.footnote===t.type||Qe.footnoteStar===t.type||this.isInlineMark(t))&&(e=!0);e&&this.writeInlineMarkStartEnd()}}}}writeParagraph(e,t){if(this.textFormat===S.bitmarkText){if(this.inBulletList)return;const r=this.getSiblingNodes(t),i=r.left?.type,o=this.textLocation===it,a=this.isEmptyParagraph(e);if(!o||!a&&i!==Ze.codeBlock&&i!==Ze.paragraph)return;this.write("|"),this.writeNL(),i===Ze.codeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){let t="";const r=e.attrs?.level??1;for(let e=0;e<+r;e++)t+="#";t+=" ",this.write(t)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){let r=this.getIndentationString();const i=this.getParentNode(t,2),o=i?.value,a=o?.type,s=o?.attrs?.start??1;if(a===Ze.bulletList)r+="• ";else if(a===Ze.noBulletList)r+="•_ ";else if(a===Ze.orderedList)r+=`•${s} `;else if(a===Ze.orderedListRoman)r+=`•${s}I `;else if(a===Ze.orderedListRomanLower)r+=`•${s}i `;else if(a===Ze.letteredList)r+="•A ";else if(a===Ze.letteredListLower)r+="•a ";else if(a===Ze.taskList){const t=e;r+=t.attrs?.checked??!1?"•+ ":"•- "}r&&this.write(r)}writeImage(e){if(null==e.attrs||!e.attrs.src)return;const t=e.attrs,r=e.type===Ze.imageInline;let i;if(r){i=new Set(["alt","zoomDisabled","title"]);const e=t;"top"===e.alignmentVertical&&i.add("alignmentVertical"),"line-height"===e.size&&i.add("size")}const o=this.getMediaAttrs(r?"imageInline":"image",t,{ignoreAttributes:i});let a="";r&&(a=`==${t.alt??""}==`),a+=o?`|${o}|`:"",this.write(a)}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,r=`==${this.breakscape(t.formula,{format:this.textFormat,location:this.textLocation})}==|latex|`;this.write(r)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){const t=e.attrs??{};let r;switch(e.type){case Qe.textStyle:case Qe.color:r=`color:${t.color??""}`;break;case Qe.timer:r=t.name?`timer:${t.name}`:"timer",r+=`|duration:${t.duration??""}`;break;case Qe.highlight:case Qe.userHighlight:r=t.color?`${e.type}|color:${t.color}`:`${e.type}`;break;default:r=`${e.type}`;for(const[e,i]of Object.entries(t))("language"===e&&"plain text"!==i||"propertyRef"===e||"name"===e)&&(r=`${r}:${i}`)}this.write(r)}getWritableMarks(e){const t=e=>e.attrs??{};let r=[...e];const i=r.find(e=>e.type===Qe.timer),o=r.find(e=>e.type===Qe.duration);i&&o&&!t(i).duration&&(r=r.map(e=>e===i?{...i,attrs:{...t(i),duration:t(o).duration}}:e)),r=r.filter(e=>e.type!==Qe.duration&&(e.type!==Qe.timer||!!t(e).duration));const a=e=>(e.type===Qe.highlight||e.type===Qe.userHighlight)&&!t(e).color,s=e=>(e.type===Qe.textStyle||e.type===Qe.color)&&-1!==$t.indexOf(t(e).color);for(let e=0;e<r.length-1;e++)if(a(r[e])&&s(r[e+1])){const t=r[e];r[e]=r[e+1],r[e+1]=t}return r}isStandardMark(e){return-1!==Ft.indexOf(e.type)&&!(e.attrs&&e.attrs.color)}isInlineMark(e){return-1!==Kt.indexOf(e.type)||e.type===Qe.highlight&&!(!e.attrs||!e.attrs.color)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){const t=`link:${((e.attrs?.href||"")??"").replace(Dt,"^]")}`;this.write(t)}writeRefMark(e){const t=`►${e.attrs?.reference??""}`;this.write(t)}writeXRefMark(e){const t=e.attrs?.xref??"",r=e.attrs?.reference??"";let i=`xref:${t}`;r&&(i+=`|►${r}`),this.write(i)}writeExtRefMark(e){const t=e.attrs?.extref??"",r=e.attrs?.references??[],i=e.attrs?.provider??"";let o=`extref:${t}`;for(const e of r)o+=`|►${e??""}`;o+=`|provider:${i}`,this.write(o)}writeFootnoteMark(e){this.write("footnote:");const t=this.internalTextGenerator?.generateSync(e.attrs?.content,this.textFormat,this.textLocation,{...this.generateOptions,forceInline:!0})??"";this.write(t)}writeFootnoteStarMark(e){this.write("footnote*:");const t=this.internalTextGenerator?.generateSync(e.attrs?.content,this.textFormat,this.textLocation,{...this.generateOptions,forceInline:!0})??"";this.write(t)}writeSymbolMark(e){if(null==e.attrs)return;const t=e.attrs,r=this.getMediaAttrs("symbol",t)??"";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 r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}getMediaAttrs(e,t,r){if(!e)return;const i=Object.assign({},r).ignoreAttributes??new Set;let o=`${e}:${t?.src??""}`;const a=Object.entries(t).filter(([e,t])=>"src"!==e);for(let e=0;e<a.length;e++){const[t,r]=a[e];if(!i.has(t))switch(t){case"textAlign":"left"!==r&&(o+=`|captionAlign:${r}`);break;case"alignment":"center"!==r&&r&&(o+=`|alignment:${r}`);break;case"title":r&&(o+=`|caption:${r}`);break;case"class":"center"!==r&&r&&(o+=`|align:${r}`);break;case"comment":r&&(o+=`|#${r}`);break;case"":g.isString(r)?o+=`|:${r}`:o+="|";break;case"zoomDisabled":r||(o+="|zoomDisabled:false");break;default:t&&r&&(o+=`|${t}:${r}`)}}return o}breakscape(e,t){return this.generateOptions.noBreakscaping?e:_t.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return 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 r of e)this.write(`${r}${t??""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}};function Ht(e){return"string"!=typeof e?null:_t.unbreakscape(e)}function Ut(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach(t=>{Ut(e[t])}))}function Wt(e){const t=e=>e&&"text"===e.type&&!e.text;function r(e){for(let i=e.length-1;i>=0;i--){const o=e[i];t(o)?e.splice(i,1):o&&Array.isArray(o.content)&&r(o.content)}}return Array.isArray(e)?r(e):e&&Array.isArray(e.content)&&r(e.content),e}function Yt(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):Zt(e,{startRule:"bitmarkPlusString"})}var Qt=class extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,i="".padEnd(a.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+a.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function a(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const n={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(((c=t)?'"'+a(c)+'"':"end of input")+" found.");var c}};function Zt(e,t){const r={},i=(t=void 0!==t?t:{}).grammarSource,o={version:la,bitmarkPlusPlus:function(){let e,t;if(ea++,e=[],t=ca(),t!==r)for(;t!==r;)e.push(t),t=ca();else e=r;e===r&&(e=function(){let e,t;return e=Uo,t="",Wo=e,t=[],e=t,e}());ea--,e===r&&(t=r,0===ea&&sa(er));return e},bitmarkPlus:function(){let e,t;return ea++,e=Uo,t=Fa(),Wo=e,t=Mo(t),e=t,ea--,e},bitmarkMinusMinus:function(){let e,t;return ea++,e=Uo,t=Ha(),Wo=e,t=Ho(t),e=t,ea--,e},bitmarkPlusString:function(){let e;return ea++,e=Fa(),ea--,e},bitmarkMinusMinusString:Ha};let a=la;const s="|",n="### ",l="## ",c="# ",p="code",u=":",d="bitmark++",m="bitmark--",h="JavaScript",b="• ",g="•_ ",y="•",f=" ",k="I ",x="i ",v="•A ",T="•a ",_="•+ ",C="•- ",w="\t",A="image",B="#",S="@",P="width",I="height",E="alignment",L="captionAlign",N="left",V="center",R="right",G="alt",F="caption",K="zoomDisabled",$="true",O="false",J="=",D="|latex|",z="|imageInline:",q="srcAlt",j="alignmentVertical",M="size",H="top",U="middle",W="bottom",Y="baseline",Q="sub",Z="super",X="text-bottom",ee="text-top",te="line-height",re="font-height",ie="explicit",oe="link:",ae="extref:",se="provider:",ne="xref:",le="►",ce="symbol:",pe="footnote:",ue="footnote*:",de="var:",me="code:",he="timer",be="duration:",ge="P",ye="timer:",fe="highlight",ke="color:",xe="userHighlight",ve="colorPicker:",Te="|►",_e="bold",Ce="italic",we="light",Ae="highlightOrange",Be="highlightYellow",Se="highlightGreen",Pe="highlightBlue",Ie="highlightPurple",Ee="highlightPink",Le="highlightBrown",Ne="highlightBlack",Ve="highlightWhite",Re="highlightGray",Ge="strike",Fe="subscript",Ke="superscript",$e="ins",Oe="del",Je="underline",De="doubleUnderline",ze="smallcaps",qe="circle",je="languageEmRed",Me="languageEmOrange",He="languageEmYellow",Ue="languageEmGreen",We="languageEmBlue",Ye="languageEmPurple",Qe="languageEmPink",Ze="languageEmBrown",Xe="languageEmBlack",et="languageEmWhite",tt="languageEmGray",rt="languageEm",it="userUnderline",ot="userDoubleUnderline",at="userStrike",st="userCircle",nt="notranslate",lt="aqua",ct="black",pt="blue",ut="brown",dt="fuchsia",mt="lightgrey",ht="gray",bt="darkgray",gt="green",yt="lime",ft="magenta",kt="maroon",xt="navy",vt="olive",Tt="orange",_t="pink",Ct="purple",wt="red",At="silver",Bt="teal",St="violet",Pt="white",It="yellow",Et="*",Lt="_",Nt="`",Vt="!",Rt="[!",Gt="]",Ft="\n",Kt="\r\n",$t="http",Ot="s",Jt="://",Dt="mailto:",zt=/^[ \t]/,qt=/^[0-9]/,jt=/^[\r\u2028-\u2029]/,Mt=/^[^\n\r\u2028\u2029]/,Zt=/^[!#-;=?-[\]-_a-{}-~]/,Xt={type:"any"},er=ia("StyledText"),tr=ta("|",!1),rr=ta("### ",!1),ir=ta("## ",!1),or=ta("# ",!1),ar=ta("code",!1),sr=ra([" ","\t"],!1,!1,!1),nr=ta(":",!1),lr=ta("bitmark++",!1),cr=ta("bitmark--",!1),pr=ta("JavaScript",!1),ur=ta("• ",!1),dr=ta("•_ ",!1),mr=ta("•",!1),hr=ra([["0","9"]],!1,!1,!1),br=ta(" ",!1),gr=ta("I ",!1),yr=ta("i ",!1),fr=ta("•A ",!1),kr=ta("•a ",!1),xr=ta("•+ ",!1),vr=ta("•- ",!1),Tr=ta("\t",!1),_r=ta("image",!1),Cr=ta("#",!1),wr=ta("@",!1),Ar=ta("width",!1),Br=ta("height",!1),Sr=ta("alignment",!1),Pr=ta("captionAlign",!1),Ir=ta("left",!1),Er=ta("center",!1),Lr=ta("right",!1),Nr=ta("alt",!1),Vr=ta("caption",!1),Rr=ta("zoomDisabled",!1),Gr=ta("true",!1),Fr=ta("false",!1),Kr=ta("=",!1),$r=ta("|latex|",!1),Or=ta("|imageInline:",!1),Jr=ta("srcAlt",!1),Dr=ta("alignmentVertical",!1),zr=ta("size",!1),qr=ta("top",!1),jr=ta("middle",!1),Mr=ta("bottom",!1),Hr=ta("baseline",!1),Ur=ta("sub",!1),Wr=ta("super",!1),Yr=ta("text-bottom",!1),Qr=ta("text-top",!1),Zr=ta("line-height",!1),Xr=ta("font-height",!1),ei=ta("explicit",!1),ti=ta("link:",!1),ri=ta("extref:",!1),ii=ta("provider:",!1),oi=ta("xref:",!1),ai=ta("►",!1),si=ta("symbol:",!1),ni=ta("footnote:",!1),li=ta("footnote*:",!1),ci=ta("var:",!1),pi=ta("code:",!1),ui=ta("timer",!1),di=ta("duration:",!1),mi=ta("P",!1),hi=ta("timer:",!1),bi=ta("highlight",!1),gi=ta("color:",!1),yi=ta("userHighlight",!1),fi=ta("colorPicker:",!1),ki=ta("|►",!1),xi=ta("bold",!1),vi=ta("italic",!1),Ti=ta("light",!1),_i=ta("highlightOrange",!1),Ci=ta("highlightYellow",!1),wi=ta("highlightGreen",!1),Ai=ta("highlightBlue",!1),Bi=ta("highlightPurple",!1),Si=ta("highlightPink",!1),Pi=ta("highlightBrown",!1),Ii=ta("highlightBlack",!1),Ei=ta("highlightWhite",!1),Li=ta("highlightGray",!1),Ni=ta("strike",!1),Vi=ta("subscript",!1),Ri=ta("superscript",!1),Gi=ta("ins",!1),Fi=ta("del",!1),Ki=ta("underline",!1),$i=ta("doubleUnderline",!1),Oi=ta("smallcaps",!1),Ji=ta("circle",!1),Di=ta("languageEmRed",!1),zi=ta("languageEmOrange",!1),qi=ta("languageEmYellow",!1),ji=ta("languageEmGreen",!1),Mi=ta("languageEmBlue",!1),Hi=ta("languageEmPurple",!1),Ui=ta("languageEmPink",!1),Wi=ta("languageEmBrown",!1),Yi=ta("languageEmBlack",!1),Qi=ta("languageEmWhite",!1),Zi=ta("languageEmGray",!1),Xi=ta("languageEm",!1),eo=ta("userUnderline",!1),to=ta("userDoubleUnderline",!1),ro=ta("userStrike",!1),io=ta("userCircle",!1),oo=ta("notranslate",!1),ao=ta("aqua",!1),so=ta("black",!1),no=ta("blue",!1),lo=ta("brown",!1),co=ta("fuchsia",!1),po=ta("lightgrey",!1),uo=ta("gray",!1),mo=ta("darkgray",!1),ho=ta("green",!1),bo=ta("lime",!1),go=ta("magenta",!1),yo=ta("maroon",!1),fo=ta("navy",!1),ko=ta("olive",!1),xo=ta("orange",!1),vo=ta("pink",!1),To=ta("purple",!1),_o=ta("red",!1),Co=ta("silver",!1),wo=ta("teal",!1),Ao=ta("violet",!1),Bo=ta("white",!1),So=ta("yellow",!1),Po=ta("*",!1),Io=ta("_",!1),Eo=ta("`",!1),Lo=ta("!",!1),No=ta("[!",!1),Vo=ta("]",!1),Ro=ia("Line Terminator"),Go=ta("\n",!1),Fo=ta("\r\n",!1),Ko=ra(["\r",["\u2028","\u2029"]],!1,!1,!1),$o=ra(["\n","\r","\u2028","\u2029"],!0,!1,!1),Oo=ta("http",!1),Jo=ta("s",!1),Do=ta("://",!1),zo=ta("mailto:",!1),qo=ra(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1,!1);function jo(e){let t={...e};Ut(t);return Wt(t)}function Mo(e){return[{type:"paragraph",content:e,attrs:{}}]}function Ho(e){return[{type:"paragraph",content:e,attrs:{}}]}let Uo=0|t.peg$currPos,Wo=Uo;const Yo=[{line:1,column:1}];let Qo,Zo=Uo,Xo=t.peg$maxFailExpected||[],ea=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function ta(e,t){return{type:"literal",text:e,ignoreCase:t}}function ra(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function ia(e){return{type:"other",description:e}}function oa(t){let r,i=Yo[t];if(i)return i;if(t>=Yo.length)r=Yo.length-1;else for(r=t;!Yo[--r];);for(i=Yo[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Yo[t]=i,i}function aa(e,t,r){const o=oa(e),a=oa(t),s={source:i,start:{offset:e,line:o.line,column:o.column},end:{offset:t,line:a.line,column:a.column}};return r&&i&&"function"==typeof i.offset&&(s.start=i.offset(s.start),s.end=i.offset(s.end)),s}function sa(e){Uo<Zo||(Uo>Zo&&(Zo=Uo,Xo=[]),Xo.push(e))}function na(e,t,r){return new Qt(Qt.buildMessage(e,t),e,t,r)}function la(){let t,i,o;for(t=Uo,i=[],e.length>Uo?(o=e.charAt(Uo),Uo++):(o=r,0===ea&&sa(Xt));o!==r;)i.push(o),e.length>Uo?(o=e.charAt(Uo),Uo++):(o=r,0===ea&&sa(Xt));return Wo=t,i="8.41.1",t=i,t}function ca(){let t,i;var o;return t=Uo,i=function(){let t,i,o,a,s;if(t=Uo,i=da(),i!==r){for(o=Uo,a=[],s=ls();s!==r;)a.push(s),s=ls();o=e.substring(o,Uo),a=cs(),a!==r?(s=ns(),s===r&&(s=null),Wo=t,n=i,t={type:"heading",content:Yt(o),attrs:{level:n.length-1}}):(Uo=t,t=r)}else Uo=t,t=r;var n;return t}(),i!==r&&(Wo=t,o=i,i=Wt({...o})),t=i,t===r&&(t=Uo,i=function(){let e,t,i,o;if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=ga(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"bulletList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,a=t,s=i,e={...a,content:s,attrs:{}}):(Uo=e,e=r)}else Uo=e,e=r;var a,s;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=ya(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"noBulletList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=fa(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"orderedList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=ka(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"orderedListRoman"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=xa(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"orderedListRomanLower"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=va(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"letteredList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=Ta(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"letteredListLower"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r)if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=_a(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"taskList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r}}}}}}return e}(),i!==r&&(Wo=t,i=jo(i)),t=i,t===r&&(t=Uo,i=La(),i!==r&&(Wo=t,i=function(e){return{...e}}(i)),t=i,t===r&&(t=Uo,i=function(){let t,i,o;t=Uo,i=ha(),i!==r?(o=function(){let t,i,o,a;t=Uo,i=Uo,o=[],a=ba();for(;a!==r;)o.push(a),a=ba();return i=e.substring(i,Uo),Wo=t,i=function(e){return[{type:"text",text:Ht(e.trim())}]}(i),t=i,t}(),Wo=t,t=function(e,t){return{...e,content:t}}(i,o)):(Uo=t,t=r);return t}(),i!==r&&(Wo=t,i=function(e){return{...e}}(i)),t=i,t===r&&(t=Uo,i=function(){let e,t,i;e=Uo,t=Uo,ea++,i=pa(),ea--,i===r?t=void 0:(Uo=t,t=r);t!==r?(i=Sa(),i!==r?(Wo=e,e={type:"paragraph",content:Yt(i.trim()),attrs:{}}):(Uo=e,e=r)):(Uo=e,e=r);e===r&&(e=Uo,t=Ia(),t!==r?(i=Sa(),i!==r?(Wo=e,e=function(e){return{type:"paragraph",content:Yt(e.trim()),attrs:{}}}(i)):(Uo=e,e=r)):(Uo=e,e=r),e===r&&(e=Uo,t=Ia(),t!==r?(i="",Wo=e,e=function(e){return{type:"paragraph",content:Yt(e.trim()),attrs:{}}}(i)):(Uo=e,e=r)));return e}(),i!==r&&(Wo=t,i=function(e){return Wt({...e})}(i)),t=i)))),t}function pa(){let e;return e=da(),e===r&&(e=Ca(),e===r&&(e=La(),e===r&&(e=ha(),e===r&&(e=Ia())))),e}function ua(){let t;return 124===e.charCodeAt(Uo)?(t=s,Uo++):(t=r,0===ea&&sa(tr)),t}function da(){let t;return e.substr(Uo,4)===n?(t=n,Uo+=4):(t=r,0===ea&&sa(rr)),t===r&&(e.substr(Uo,3)===l?(t=l,Uo+=3):(t=r,0===ea&&sa(ir)),t===r&&(e.substr(Uo,2)===c?(t=c,Uo+=2):(t=r,0===ea&&sa(or)))),t}function ma(){let t,i,o;return t=Uo,i=ua(),i!==r?(o=function(){let t;return e.substr(Uo,4)===p?(t=p,Uo+=4):(t=r,0===ea&&sa(ar)),t}(),o!==r?(Wo=t,t=o):(Uo=t,t=r)):(Uo=t,t=r),t}function ha(){let t,i,o,a,s,n,l,c;if(t=Uo,i=ma(),i!==r){for(o=Uo,a=Uo,s=[],n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(sr));n!==r;)s.push(n),n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(sr));n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(Wo=t,t={type:"codeBlock",language:""}):(Uo=t,t=r)}else Uo=t,t=r;if(t===r)if(t=Uo,i=ma(),i!==r)if(58===e.charCodeAt(Uo)?(o=u,Uo++):(o=r,0===ea&&sa(nr)),o!==r)if(a=function(){let t,i,o;e.substr(Uo,9)===d?(t=d,Uo+=9):(t=r,0===ea&&sa(lr));if(t===r&&(e.substr(Uo,9)===m?(t=m,Uo+=9):(t=r,0===ea&&sa(cr)),t===r&&(e.substr(Uo,10)===h?(t=h,Uo+=10):(t=r,0===ea&&sa(pr)),t===r))){if(t=Uo,i=[],o=ls(),o!==r)for(;o!==r;)i.push(o),o=ls();else i=r;t=i!==r?e.substring(t,Uo):i,t===r&&(t="")}return t}(),a!==r){for(s=Uo,n=Uo,l=[],c=e.charAt(Uo),zt.test(c)?Uo++:(c=r,0===ea&&sa(sr));c!==r;)l.push(c),c=e.charAt(Uo),zt.test(c)?Uo++:(c=r,0===ea&&sa(sr));c=cs(),c!==r?(l=[l,c],n=l):(Uo=n,n=r),s=n!==r?e.substring(s,Uo):n,s!==r?(Wo=t,t={type:"codeBlock",attrs:{language:a.trim().toLowerCase()}}):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;return t}function ba(){let t,i,o,a,s,n;if(t=Uo,i=Uo,ea++,o=pa(),ea--,o===r?i=void 0:(Uo=i,i=r),i!==r){if(o=Uo,a=Uo,s=[],n=ls(),n!==r)for(;n!==r;)s.push(n),n=ls();else s=r;s!==r?(n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(Wo=t,t=o):(Uo=t,t=r)}else Uo=t,t=r;return t===r&&(t=ns()),t}function ga(){let t;return e.substr(Uo,2)===b?(t=b,Uo+=2):(t=r,0===ea&&sa(ur)),t}function ya(){let t;return e.substr(Uo,3)===g?(t=g,Uo+=3):(t=r,0===ea&&sa(dr)),t}function fa(){let t,i,o,a,s;if(t=Uo,i=Uo,8226===e.charCodeAt(Uo)?(o=y,Uo++):(o=r,0===ea&&sa(mr)),o!==r){if(a=[],s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr));else a=r;a!==r?(32===e.charCodeAt(Uo)?(s=f,Uo++):(s=r,0===ea&&sa(br)),s!==r?(o=[o,a,s],i=o):(Uo=i,i=r)):(Uo=i,i=r)}else Uo=i,i=r;return t=i!==r?e.substring(t,Uo):i,t}function ka(){let t,i,o,a,s;if(t=Uo,i=Uo,8226===e.charCodeAt(Uo)?(o=y,Uo++):(o=r,0===ea&&sa(mr)),o!==r){if(a=[],s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr));else a=r;a!==r?(e.substr(Uo,2)===k?(s=k,Uo+=2):(s=r,0===ea&&sa(gr)),s!==r?(o=[o,a,s],i=o):(Uo=i,i=r)):(Uo=i,i=r)}else Uo=i,i=r;return t=i!==r?e.substring(t,Uo):i,t}function xa(){let t,i,o,a,s;if(t=Uo,i=Uo,8226===e.charCodeAt(Uo)?(o=y,Uo++):(o=r,0===ea&&sa(mr)),o!==r){if(a=[],s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr));else a=r;a!==r?(e.substr(Uo,2)===x?(s=x,Uo+=2):(s=r,0===ea&&sa(yr)),s!==r?(o=[o,a,s],i=o):(Uo=i,i=r)):(Uo=i,i=r)}else Uo=i,i=r;return t=i!==r?e.substring(t,Uo):i,t}function va(){let t;return e.substr(Uo,3)===v?(t=v,Uo+=3):(t=r,0===ea&&sa(fr)),t}function Ta(){let t;return e.substr(Uo,3)===T?(t=T,Uo+=3):(t=r,0===ea&&sa(kr)),t}function _a(){let t;return e.substr(Uo,3)===_?(t=_,Uo+=3):(t=r,0===ea&&sa(xr)),t===r&&(e.substr(Uo,3)===C?(t=C,Uo+=3):(t=r,0===ea&&sa(vr))),t}function Ca(){let e;return e=ga(),e===r&&(e=ya(),e===r&&(e=fa(),e===r&&(e=ka(),e===r&&(e=xa(),e===r&&(e=va(),e===r&&(e=Ta(),e===r&&(e=_a()))))))),e}function wa(){let t,i,o,a,s,n,l,c,p;if(t=Uo,i=Ba(),i!==r)if(o=Ca(),o!==r){for(a=Uo,s=Uo,n=[],l=Uo,c=Uo,ea++,p=ns(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(e.length>Uo?(p=e.charAt(Uo),Uo++):(p=r,0===ea&&sa(Xt)),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);l!==r;)n.push(l),l=Uo,c=Uo,ea++,p=ns(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(e.length>Uo?(p=e.charAt(Uo),Uo++):(p=r,0===ea&&sa(Xt)),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);for(l=ns(),l===r&&(l=null),n=[n,l],s=n,a=e.substring(a,Uo),s=[],n=Aa();n!==r;)s.push(n),n=Aa();if(n=Uo,l=function(){let t,i,o,a;t=Uo,ea++,i=Uo,o=[],9===e.charCodeAt(Uo)?(a=w,Uo++):(a=r,0===ea&&sa(Tr));if(a!==r)for(;a!==r;)o.push(a),9===e.charCodeAt(Uo)?(a=w,Uo++):(a=r,0===ea&&sa(Tr));else o=r;o!==r?(Wo=Uo,a=o.length>ms.length,a=a?void 0:r,a!==r?(Wo=i,i=function(e){ds.push(ms),ms=e.join("")}(o)):(Uo=i,i=r)):(Uo=i,i=r);ea--,i!==r?(Uo=t,t=void 0):t=r;return t}(),l!==r){for(c=[],p=wa();p!==r;)c.push(p),p=wa();p=function(){let e;Wo=Uo,e=function(){return ms=ds.pop(),!0}(),e=e?void 0:r;return e}(),p!==r?(Wo=n,n=c):(Uo=n,n=r)}else Uo=n,n=r;n===r&&(n=null),Wo=t,t=function(e,t,r,i){let o="bulletList";const a=e.match(/•([0-9]+)([Ii]?) /);let s=1;if(a&&(o="orderedList",a.length>1&&(s=Number(a[1])),a.length>2)){let e=a[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 n=[{type:"paragraph",attrs:{},content:Yt((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:s},content:i};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}n.push(e)}let l="listItem",c=null;if("taskList"==o){l="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:l,attrs:c,content:n,_tempParsingParent:o,_tempListStart:s}:{type:l,content:n,_tempParsingParent:o,_tempListStart:s}}(o,a,s,n)}else Uo=t,t=r;else Uo=t,t=r;return t}function Aa(){let t,i,o,a,s,n,l,c,p,u;if(t=Uo,i=Uo,ea++,o=function(){let t,i,o;t=Uo,i=[],o=e.charAt(Uo),zt.test(o)?Uo++:(o=r,0===ea&&sa(sr));for(;o!==r;)i.push(o),o=e.charAt(Uo),zt.test(o)?Uo++:(o=r,0===ea&&sa(sr));o=ns(),o!==r?(i=[i,o],t=i):(Uo=t,t=r);return t}(),ea--,o===r?i=void 0:(Uo=i,i=r),i!==r)if(o=Ba(),o!==r)if(a=Uo,ea++,s=Ca(),ea--,s===r?a=void 0:(Uo=a,a=r),a!==r){if(s=Uo,n=Uo,l=[],c=Uo,p=Uo,ea++,u=ns(),ea--,u===r?p=void 0:(Uo=p,p=r),p!==r?(e.length>Uo?(u=e.charAt(Uo),Uo++):(u=r,0===ea&&sa(Xt)),u!==r?(p=[p,u],c=p):(Uo=c,c=r)):(Uo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Uo,p=Uo,ea++,u=ns(),ea--,u===r?p=void 0:(Uo=p,p=r),p!==r?(e.length>Uo?(u=e.charAt(Uo),Uo++):(u=r,0===ea&&sa(Xt)),u!==r?(p=[p,u],c=p):(Uo=c,c=r)):(Uo=c,c=r);else l=r;l!==r?(c=cs(),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r),s=n!==r?e.substring(s,Uo):n,s!==r?(Wo=t,t=s):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;return t}function Ba(){let t,i,o;for(t=Uo,i=[],9===e.charCodeAt(Uo)?(o=w,Uo++):(o=r,0===ea&&sa(Tr));o!==r;)i.push(o),9===e.charCodeAt(Uo)?(o=w,Uo++):(o=r,0===ea&&sa(Tr));return Wo=Uo,o=i.join("")===ms,o=o?void 0:r,o!==r?(i=[i,o],t=i):(Uo=t,t=r),t}function Sa(){let t,i,o;if(t=Uo,i=[],o=Pa(),o!==r)for(;o!==r;)i.push(o),o=Pa();else i=r;return t=i!==r?e.substring(t,Uo):i,t}function Pa(){let t,i,o,a,s,n;if(t=Uo,i=Uo,ea++,o=pa(),ea--,o===r?i=void 0:(Uo=i,i=r),i!==r){if(o=Uo,a=Uo,s=[],n=ls(),n!==r)for(;n!==r;)s.push(n),n=ls();else s=r;s!==r?(n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(i=[i,o],t=i):(Uo=t,t=r)}else Uo=t,t=r;return t===r&&(t=ns()),t}function Ia(){let t,i,o,a,s,n;if(t=Uo,i=ua(),i!==r){for(o=Uo,a=Uo,s=[],n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(sr));n!==r;)s.push(n),n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(sr));n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(a=ns(),a===r&&(a=null),i=[i,o,a],t=i):(Uo=t,t=r)}else Uo=t,t=r;return t}function Ea(){let t,i,o;return t=Uo,i=ua(),i!==r?(o=function(){let t;return e.substr(Uo,5)===A?(t=A,Uo+=5):(t=r,0===ea&&sa(_r)),t}(),o!==r?(Wo=t,t=o):(Uo=t,t=r)):(Uo=t,t=r),t}function La(){let t,i,o,a,s,n,l,c,p,d,m,h;if(t=Uo,i=Ea(),i!==r)if(58===e.charCodeAt(Uo)?(o=u,Uo++):(o=r,0===ea&&sa(nr)),o!==r)if(32===e.charCodeAt(Uo)?(a=f,Uo++):(a=r,0===ea&&sa(br)),a===r&&(a=null),s=function(){let t,i,o,a,s,n,l,c,p;t=Uo,i=Uo,e.substr(Uo,4)===$t?(o=$t,Uo+=4):(o=r,0===ea&&sa(Oo));if(o!==r)if(115===e.charCodeAt(Uo)?(a=Ot,Uo++):(a=r,0===ea&&sa(Jo)),a===r&&(a=null),e.substr(Uo,3)===Jt?(s=Jt,Uo+=3):(s=r,0===ea&&sa(Do)),s!==r){for(n=[],l=Uo,c=Uo,ea++,p=ua(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(p=us(),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);l!==r;)n.push(l),l=Uo,c=Uo,ea++,p=ua(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(p=us(),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);o=[o,a,s,n],i=o}else Uo=i,i=r;else Uo=i,i=r;t=i!==r?e.substring(t,Uo):i;return t}(),s!==r){for(n=[],32===e.charCodeAt(Uo)?(l=f,Uo++):(l=r,0===ea&&sa(br));l!==r;)n.push(l),32===e.charCodeAt(Uo)?(l=f,Uo++):(l=r,0===ea&&sa(br));if(l=ua(),l!==r){for(c=Na(),p=Uo,d=Uo,m=[],h=e.charAt(Uo),zt.test(h)?Uo++:(h=r,0===ea&&sa(sr));h!==r;)m.push(h),h=e.charAt(Uo),zt.test(h)?Uo++:(h=r,0===ea&&sa(sr));h=cs(),h!==r?(m=[m,h],d=m):(Uo=d,d=r),p=d!==r?e.substring(p,Uo):d,p!==r?(d=ns(),d===r&&(d=null),Wo=t,t=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let a=i.captionAlign||"left";delete i.captionAlign;let s=i.alt||null;delete i.alt;let n=i.caption||null;delete i.caption;let l=i.align||"center";delete i.align;let c=void 0===i.zoomDisabled||("boolean"==typeof i.zoomDisabled?i.zoomDisabled:"true"===String(i.zoomDisabled).toLowerCase());return delete i.zoomDisabled,{type:e,attrs:{alignment:o,textAlign:a,src:t,alt:Ht(s),title:Ht(n),class:l,zoomDisabled:c,...i}}}(i,s,c)):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;return t}function Na(){let e,t,i;for(e=Uo,t=[],i=Va();i!==r;)t.push(i),i=Va();return Wo=e,e=t,e}function Va(){let t,i,o,a,s,n,l,c,p,d;if(t=Uo,35===e.charCodeAt(Uo)?(i=B,Uo++):(i=r,0===ea&&sa(Cr)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={comment:o.trim()}):(Uo=t,t=r)}else Uo=t,t=r;var m,h;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));if(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),qt.test(d)?Uo++:(d=r,0===ea&&sa(hr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),qt.test(d)?Uo++:(d=r,0===ea&&sa(hr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);else l=r;if(n=l!==r?e.substring(n,Uo):l,n!==r){for(l=[],32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(br));c!==r;)l.push(c),32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(br));c=ua(),c!==r?(Wo=t,m=o,h=n,t={[m]:parseInt(h)}):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=function(){let t;e.substr(Uo,3)===G?(t=G,Uo+=3):(t=r,0===ea&&sa(Nr));t===r&&(e.substr(Uo,7)===F?(t=F,Uo+=7):(t=r,0===ea&&sa(Vr)));return t}(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));for(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:t.trim()}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=function(){let t;e.substr(Uo,9)===E?(t=E,Uo+=9):(t=r,0===ea&&sa(Sr));t===r&&(e.substr(Uo,12)===L?(t=L,Uo+=12):(t=r,0===ea&&sa(Pr)));return t}(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));if(n=function(){let t;e.substr(Uo,4)===N?(t=N,Uo+=4):(t=r,0===ea&&sa(Ir));t===r&&(e.substr(Uo,6)===V?(t=V,Uo+=6):(t=r,0===ea&&sa(Er)),t===r&&(e.substr(Uo,5)===R?(t=R,Uo+=5):(t=r,0===ea&&sa(Lr))));return t}(),n!==r){for(l=[],32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(br));c!==r;)l.push(c),32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(br));c=ua(),c!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ga(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));if(n=function(){let t;e.substr(Uo,4)===$?(t=$,Uo+=4):(t=r,0===ea&&sa(Gr));t===r&&(e.substr(Uo,5)===O?(t=O,Uo+=5):(t=r,0===ea&&sa(Fr)));return t}(),n!==r){for(l=[],32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(br));c!==r;)l.push(c),32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(br));c=ua(),c!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ga(),o!==r){for(a=[],32===e.charCodeAt(Uo)?(s=f,Uo++):(s=r,0===ea&&sa(br));s!==r;)a.push(s),32===e.charCodeAt(Uo)?(s=f,Uo++):(s=r,0===ea&&sa(br));s=ua(),s!==r?(Wo=t,t=function(e){return{[e]:!0}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r&&(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=ua(),o!==r?(Wo=t,t=void 0):(Uo=t,t=r),t===r)){for(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{error:"Found unknown property or invalid value: "+e}}(o)):(Uo=t,t=r)}}}}}}return t}function Ra(){let t;return e.substr(Uo,5)===P?(t=P,Uo+=5):(t=r,0===ea&&sa(Ar)),t===r&&(e.substr(Uo,6)===I?(t=I,Uo+=6):(t=r,0===ea&&sa(Br))),t}function Ga(){let t;return e.substr(Uo,12)===K?(t=K,Uo+=12):(t=r,0===ea&&sa(Rr)),t}function Fa(){let e,t,i,o;for(e=Uo,t=Ka(),t===r&&(t=null),i=[],o=Ja(),o===r&&(o=Ka());o!==r;)i.push(o),o=Ja(),o===r&&(o=Ka());var a,s;return Wo=e,s=i,e=Wt((a=t)?[a,...s.flat()]:s.flat()),e}function Ka(){let t,i,o,a,s,n,l;if(t=Uo,i=ns(),i!==r&&(Wo=t,i={type:"hardBreak"}),t=i,t===r){if(t=Uo,i=Uo,o=[],a=Uo,s=Da(),s===r&&(s=null),n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=Da(),s!==r?(n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r)),a!==r)for(;a!==r;)o.push(a),a=Uo,s=Da(),s===r&&(s=null),n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=Da(),s!==r?(n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r));else o=r;i=o!==r?e.substring(i,Uo):o,i!==r&&(Wo=t,i={text:Ht(i),type:"text"}),t=i}return t}function $a(){let t;return 61===e.charCodeAt(Uo)?(t=J,Uo++):(t=r,0===ea&&sa(Kr)),t}function Oa(){let e,t,i;return e=Uo,t=$a(),t!==r?(i=$a(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function Ja(){let t,i,o,a,n,l,c,p;if(t=Uo,i=is(),i!==r){if(o=Uo,a=[],n=e.charAt(Uo),qt.test(n)?Uo++:(n=r,0===ea&&sa(hr)),n!==r)for(;n!==r;)a.push(n),n=e.charAt(Uo),qt.test(n)?Uo++:(n=r,0===ea&&sa(hr));else a=r;o=a!==r?e.substring(o,Uo):a,o!==r?(a=os(),a!==r?(Wo=t,t={index:+o,type:"bit"}):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;var u,d;if(t===r){if(t=Uo,i=Oa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Oa(),a!==r?(e.substr(Uo,7)===D?(n=D,Uo+=7):(n=r,0===ea&&sa($r)),n!==r?(Wo=t,t=function(e){return{attrs:{formula:Ht(e)},type:"latex"}}(o)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Oa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Oa(),a!==r?(e.substr(Uo,13)===z?(n=z,Uo+=13):(n=r,0===ea&&sa(Or)),n!==r?(l=ps(),l!==r?(124===e.charCodeAt(Uo)?(c=s,Uo++):(c=r,0===ea&&sa(tr)),c!==r?(p=function(){let e,t,i;e=Uo,t=[],i=za();for(;i!==r;)t.push(i),i=za();return Wo=e,e=t,e}(),Wo=t,d=p,t={attrs:{alt:o,src:((u=l).pr+u.t).trim(),alignmentVertical:"top",size:"line-height",...Object.assign({},...d),zoomDisabled:!0},type:"imageInline"}):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Oa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Oa(),a!==r?(n=function(){let t,i,o,a;t=Uo,124===e.charCodeAt(Uo)?(i=s,Uo++):(i=r,0===ea&&sa(tr));if(i!==r){if(o=[],a=qa(),a!==r)for(;a!==r;)o.push(a),a=qa();else o=r;o!==r?(Wo=t,t=o):(Uo=t,t=r)}else Uo=t,t=r;return t}(),n!==r?(Wo=t,t=function(e,t){return t||(t=[]),{marks:t,text:Ht(e),type:"text"}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Xa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Xa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Xa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Xa(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"bold"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=es(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=es(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=es(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=es(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"italic"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=ts(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=ts(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=ts(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=ts(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"light"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=rs(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=rs(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=rs(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Xt)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=rs(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"highlight"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;t===r&&(t=Uo,i=ps(),i!==r&&(Wo=t,i=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}}(i)),t=i)}}}}}}}return t}function Da(){let t,i,o,a,s;if(t=Uo,i=Uo,o=Oa(),o!==r){if(a=[],s=$a(),s!==r)for(;s!==r;)a.push(s),s=$a();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;if(t=i!==r?e.substring(t,Uo):i,t===r){if(t=Uo,i=Uo,o=ts(),o!==r){if(a=[],s=Qa(),s!==r)for(;s!==r;)a.push(s),s=Qa();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;if(t=i!==r?e.substring(t,Uo):i,t===r){if(t=Uo,i=Uo,o=rs(),o!==r){if(a=[],s=Za(),s!==r)for(;s!==r;)a.push(s),s=Za();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;t=i!==r?e.substring(t,Uo):i}}return t}function za(){let t,i,o,a,s,n,l,c,p,d;if(t=Uo,35===e.charCodeAt(Uo)?(i=B,Uo++):(i=r,0===ea&&sa(Cr)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={comment:o}):(Uo=t,t=r)}else Uo=t,t=r;var m,h;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),e.substr(Uo,6)===q?(o=q,Uo+=6):(o=r,0===ea&&sa(Jr)),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));for(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,m=o,h=n,t={[m]:h}):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));if(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),qt.test(d)?Uo++:(d=r,0===ea&&sa(hr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),qt.test(d)?Uo++:(d=r,0===ea&&sa(hr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);else l=r;n=l!==r?e.substring(n,Uo):l,n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:parseInt(t)}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));for(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,t=function(e,t){return{type:"error",msg:e+" must be a positive integer.",found:t}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),e.substr(Uo,17)===j?(o=j,Uo+=17):(o=r,0===ea&&sa(Dr)),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n=function(){let t;e.substr(Uo,3)===H?(t=H,Uo+=3):(t=r,0===ea&&sa(qr));t===r&&(e.substr(Uo,6)===U?(t=U,Uo+=6):(t=r,0===ea&&sa(jr)),t===r&&(e.substr(Uo,6)===W?(t=W,Uo+=6):(t=r,0===ea&&sa(Mr)),t===r&&(e.substr(Uo,8)===Y?(t=Y,Uo+=8):(t=r,0===ea&&sa(Hr)),t===r&&(e.substr(Uo,3)===Q?(t=Q,Uo+=3):(t=r,0===ea&&sa(Ur)),t===r&&(e.substr(Uo,5)===Z?(t=Z,Uo+=5):(t=r,0===ea&&sa(Wr)),t===r&&(e.substr(Uo,11)===X?(t=X,Uo+=11):(t=r,0===ea&&sa(Yr)),t===r&&(e.substr(Uo,8)===ee?(t=ee,Uo+=8):(t=r,0===ea&&sa(Qr)))))))));return t}(),n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r)if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(wr)),i===r&&(i=null),e.substr(Uo,4)===M?(o=M,Uo+=4):(o=r,0===ea&&sa(zr)),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(nr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(br));n=function(){let t;e.substr(Uo,11)===te?(t=te,Uo+=11):(t=r,0===ea&&sa(Zr));t===r&&(e.substr(Uo,11)===re?(t=re,Uo+=11):(t=r,0===ea&&sa(Xr)),t===r&&(e.substr(Uo,5)===Z?(t=Z,Uo+=5):(t=r,0===ea&&sa(Wr)),t===r&&(e.substr(Uo,3)===Q?(t=Q,Uo+=3):(t=r,0===ea&&sa(Ur)),t===r&&(e.substr(Uo,8)===ie?(t=ie,Uo+=8):(t=r,0===ea&&sa(ei))))));return t}(),n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}}}}return t}function qa(){let t,i,o,a,s,n,l,c,u,d,m,h,b;if(t=Uo,e.substr(Uo,5)===oe?(i=oe,Uo+=5):(i=r,0===ea&&sa(ti)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={type:"link",attrs:{href:o.trim(),target:"_blank"}}):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,7)===ae?(i=ae,Uo+=7):(i=r,0===ea&&sa(ri)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);if(o=e.substring(o,Uo),a=function(){let e,t;e=[],t=ja();for(;t!==r;)e.push(t),t=ja();return e}(),s=ua(),s!==r)if(e.substr(Uo,9)===se?(n=se,Uo+=9):(n=r,0===ea&&sa(ii)),n!==r){for(l=Uo,c=[],u=Uo,d=Uo,ea++,m=ua(),ea--,m===r?d=void 0:(Uo=d,d=r),d!==r?(m=ls(),m!==r?(d=[d,m],u=d):(Uo=u,u=r)):(Uo=u,u=r);u!==r;)c.push(u),u=Uo,d=Uo,ea++,m=ua(),ea--,m===r?d=void 0:(Uo=d,d=r),d!==r?(m=ls(),m!==r?(d=[d,m],u=d):(Uo=u,u=r)):(Uo=u,u=r);l=e.substring(l,Uo),c=ua(),c!==r?(Wo=t,t=function(e,t,r){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:r.trim()}}}(o,a,l)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,5)===ne?(i=ne,Uo+=5):(i=r,0===ea&&sa(oi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);if(o=e.substring(o,Uo),a=ua(),a!==r)if(9658===e.charCodeAt(Uo)?(s=le,Uo++):(s=r,0===ea&&sa(ai)),s!==r){for(n=Uo,l=[],c=Uo,u=Uo,ea++,d=ua(),ea--,d===r?u=void 0:(Uo=u,u=r),u!==r?(d=ls(),d!==r?(u=[u,d],c=u):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,u=Uo,ea++,d=ua(),ea--,d===r?u=void 0:(Uo=u,u=r),u!==r?(d=ls(),d!==r?(u=[u,d],c=u):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,t=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,5)===ne?(i=ne,Uo+=5):(i=r,0===ea&&sa(oi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,9658===e.charCodeAt(Uo)?(i=le,Uo++):(i=r,0===ea&&sa(ai)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"ref",attrs:{reference:e.trim()}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,7)===ce?(i=ce,Uo+=7):(i=r,0===ea&&sa(si)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(s=Na(),Wo=t,t=function(e,t){const r=Object.assign({},...t);return{type:"symbol",attrs:{src:e.trim(),...r}}}(o,s)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,9)===pe?(i=pe,Uo+=9):(i=r,0===ea&&sa(ni)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"footnote",attrs:{content:Yt(e.trim())}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,10)===ue?(i=ue,Uo+=10):(i=r,0===ea&&sa(li)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"footnote*",attrs:{content:Yt(e.trim())}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,4)===de?(i=de,Uo+=4):(i=r,0===ea&&sa(ci)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"var",attrs:{name:e.trim()}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r&&(t=Uo,e.substr(Uo,4)===p?(i=p,Uo+=4):(i=r,0===ea&&sa(ar)),i!==r?(o=ua(),o!==r?(Wo=t,t={type:"code",attrs:{language:"plain text"}}):(Uo=t,t=r)):(Uo=t,t=r),t===r)){if(t=Uo,e.substr(Uo,5)===me?(i=me,Uo+=5):(i=r,0===ea&&sa(pi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={type:"code",attrs:{language:o.trim().toLowerCase()}}):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,5)===he?(i=he,Uo+=5):(i=r,0===ea&&sa(ui)),i!==r)if(o=ua(),o!==r)if(e.substr(Uo,9)===be?(a=be,Uo+=9):(a=r,0===ea&&sa(di)),a!==r){if(s=Uo,n=Uo,80===e.charCodeAt(Uo)?(l=ge,Uo++):(l=r,0===ea&&sa(mi)),l!==r){for(c=Uo,u=[],d=Uo,m=Uo,ea++,h=ua(),ea--,h===r?m=void 0:(Uo=m,m=r),m!==r?(h=ls(),h!==r?(m=[m,h],d=m):(Uo=d,d=r)):(Uo=d,d=r);d!==r;)u.push(d),d=Uo,m=Uo,ea++,h=ua(),ea--,h===r?m=void 0:(Uo=m,m=r),m!==r?(h=ls(),h!==r?(m=[m,h],d=m):(Uo=d,d=r)):(Uo=d,d=r);c=e.substring(c,Uo),l=[l,c],n=l}else Uo=n,n=r;s=n!==r?e.substring(s,Uo):n,s!==r?(n=ua(),n!==r?(Wo=t,t={type:"timer",attrs:{name:"",duration:s.trim()}}):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,6)===ye?(i=ye,Uo+=6):(i=r,0===ea&&sa(hi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);if(o=e.substring(o,Uo),a=ua(),a!==r)if(e.substr(Uo,9)===be?(s=be,Uo+=9):(s=r,0===ea&&sa(di)),s!==r){if(n=Uo,l=Uo,80===e.charCodeAt(Uo)?(c=ge,Uo++):(c=r,0===ea&&sa(mi)),c!==r){for(u=Uo,d=[],m=Uo,h=Uo,ea++,b=ua(),ea--,b===r?h=void 0:(Uo=h,h=r),h!==r?(b=ls(),b!==r?(h=[h,b],m=h):(Uo=m,m=r)):(Uo=m,m=r);m!==r;)d.push(m),m=Uo,h=Uo,ea++,b=ua(),ea--,b===r?h=void 0:(Uo=h,h=r),h!==r?(b=ls(),b!==r?(h=[h,b],m=h):(Uo=m,m=r)):(Uo=m,m=r);u=e.substring(u,Uo),c=[c,u],l=c}else Uo=l,l=r;n=l!==r?e.substring(n,Uo):l,n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{type:"timer",attrs:{name:e.trim(),duration:t.trim()}}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}else Uo=t,t=r;if(t===r&&(t=Uo,e.substr(Uo,9)===fe?(i=fe,Uo+=9):(i=r,0===ea&&sa(bi)),i!==r?(o=ua(),o!==r?(e.substr(Uo,6)===ke?(a=ke,Uo+=6):(a=r,0===ea&&sa(gi)),a!==r?(s=Ma(),s!==r?(n=ua(),n!==r?(Wo=t,t={type:"highlight",attrs:{color:s}}):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r),t===r&&(t=Uo,e.substr(Uo,13)===xe?(i=xe,Uo+=13):(i=r,0===ea&&sa(yi)),i!==r?(o=ua(),o!==r?(e.substr(Uo,6)===ke?(a=ke,Uo+=6):(a=r,0===ea&&sa(gi)),a!==r?(s=Ma(),s!==r?(n=ua(),n!==r?(Wo=t,t=function(e){return{type:"userHighlight",attrs:{color:e}}}(s)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r),t===r&&(t=Uo,e.substr(Uo,6)===ke?(i=ke,Uo+=6):(i=r,0===ea&&sa(gi)),i!==r?(o=function(){let t;e.substr(Uo,4)===lt?(t=lt,Uo+=4):(t=r,0===ea&&sa(ao));t===r&&(e.substr(Uo,5)===ct?(t=ct,Uo+=5):(t=r,0===ea&&sa(so)),t===r&&(e.substr(Uo,4)===pt?(t=pt,Uo+=4):(t=r,0===ea&&sa(no)),t===r&&(e.substr(Uo,5)===ut?(t=ut,Uo+=5):(t=r,0===ea&&sa(lo)),t===r&&(e.substr(Uo,7)===dt?(t=dt,Uo+=7):(t=r,0===ea&&sa(co)),t===r&&(e.substr(Uo,9)===mt?(t=mt,Uo+=9):(t=r,0===ea&&sa(po)),t===r&&(e.substr(Uo,4)===ht?(t=ht,Uo+=4):(t=r,0===ea&&sa(uo)),t===r&&(e.substr(Uo,8)===bt?(t=bt,Uo+=8):(t=r,0===ea&&sa(mo)),t===r&&(e.substr(Uo,5)===gt?(t=gt,Uo+=5):(t=r,0===ea&&sa(ho)),t===r&&(e.substr(Uo,4)===yt?(t=yt,Uo+=4):(t=r,0===ea&&sa(bo)),t===r&&(e.substr(Uo,7)===ft?(t=ft,Uo+=7):(t=r,0===ea&&sa(go)),t===r&&(e.substr(Uo,6)===kt?(t=kt,Uo+=6):(t=r,0===ea&&sa(yo)),t===r&&(e.substr(Uo,4)===xt?(t=xt,Uo+=4):(t=r,0===ea&&sa(fo)),t===r&&(e.substr(Uo,5)===vt?(t=vt,Uo+=5):(t=r,0===ea&&sa(ko)),t===r&&(e.substr(Uo,6)===Tt?(t=Tt,Uo+=6):(t=r,0===ea&&sa(xo)),t===r&&(e.substr(Uo,4)===_t?(t=_t,Uo+=4):(t=r,0===ea&&sa(vo)),t===r&&(e.substr(Uo,6)===Ct?(t=Ct,Uo+=6):(t=r,0===ea&&sa(To)),t===r&&(e.substr(Uo,3)===wt?(t=wt,Uo+=3):(t=r,0===ea&&sa(_o)),t===r&&(e.substr(Uo,6)===At?(t=At,Uo+=6):(t=r,0===ea&&sa(Co)),t===r&&(e.substr(Uo,4)===Bt?(t=Bt,Uo+=4):(t=r,0===ea&&sa(wo)),t===r&&(e.substr(Uo,6)===St?(t=St,Uo+=6):(t=r,0===ea&&sa(Ao)),t===r&&(e.substr(Uo,5)===Pt?(t=Pt,Uo+=5):(t=r,0===ea&&sa(Bo)),t===r&&(e.substr(Uo,6)===It?(t=It,Uo+=6):(t=r,0===ea&&sa(So))))))))))))))))))))))));return t}(),o!==r?(a=ua(),a!==r?(Wo=t,t=function(e){return{type:"textStyle",attrs:{color:e}}}(o)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r),t===r)))){if(t=Uo,e.substr(Uo,12)===ve?(i=ve,Uo+=12):(i=r,0===ea&&sa(fi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"colorPicker",attrs:{propertyRef:e.trim()}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r&&(t=Uo,i=function(){let t;e.substr(Uo,4)===_e?(t=_e,Uo+=4):(t=r,0===ea&&sa(xi));t===r&&(e.substr(Uo,6)===Ce?(t=Ce,Uo+=6):(t=r,0===ea&&sa(vi)),t===r&&(e.substr(Uo,5)===we?(t=we,Uo+=5):(t=r,0===ea&&sa(Ti)),t===r&&(e.substr(Uo,15)===Ae?(t=Ae,Uo+=15):(t=r,0===ea&&sa(_i)),t===r&&(e.substr(Uo,15)===Be?(t=Be,Uo+=15):(t=r,0===ea&&sa(Ci)),t===r&&(e.substr(Uo,14)===Se?(t=Se,Uo+=14):(t=r,0===ea&&sa(wi)),t===r&&(e.substr(Uo,13)===Pe?(t=Pe,Uo+=13):(t=r,0===ea&&sa(Ai)),t===r&&(e.substr(Uo,15)===Ie?(t=Ie,Uo+=15):(t=r,0===ea&&sa(Bi)),t===r&&(e.substr(Uo,13)===Ee?(t=Ee,Uo+=13):(t=r,0===ea&&sa(Si)),t===r&&(e.substr(Uo,14)===Le?(t=Le,Uo+=14):(t=r,0===ea&&sa(Pi)),t===r&&(e.substr(Uo,14)===Ne?(t=Ne,Uo+=14):(t=r,0===ea&&sa(Ii)),t===r&&(e.substr(Uo,14)===Ve?(t=Ve,Uo+=14):(t=r,0===ea&&sa(Ei)),t===r&&(e.substr(Uo,13)===Re?(t=Re,Uo+=13):(t=r,0===ea&&sa(Li)),t===r&&(e.substr(Uo,9)===fe?(t=fe,Uo+=9):(t=r,0===ea&&sa(bi)),t===r&&(e.substr(Uo,6)===Ge?(t=Ge,Uo+=6):(t=r,0===ea&&sa(Ni)),t===r&&(e.substr(Uo,9)===Fe?(t=Fe,Uo+=9):(t=r,0===ea&&sa(Vi)),t===r&&(e.substr(Uo,11)===Ke?(t=Ke,Uo+=11):(t=r,0===ea&&sa(Ri)),t===r&&(e.substr(Uo,3)===$e?(t=$e,Uo+=3):(t=r,0===ea&&sa(Gi)),t===r&&(e.substr(Uo,3)===Oe?(t=Oe,Uo+=3):(t=r,0===ea&&sa(Fi)),t===r&&(e.substr(Uo,9)===Je?(t=Je,Uo+=9):(t=r,0===ea&&sa(Ki)),t===r&&(e.substr(Uo,15)===De?(t=De,Uo+=15):(t=r,0===ea&&sa($i)),t===r&&(e.substr(Uo,9)===ze?(t=ze,Uo+=9):(t=r,0===ea&&sa(Oi)),t===r&&(e.substr(Uo,6)===qe?(t=qe,Uo+=6):(t=r,0===ea&&sa(Ji)),t===r&&(e.substr(Uo,13)===je?(t=je,Uo+=13):(t=r,0===ea&&sa(Di)),t===r&&(e.substr(Uo,16)===Me?(t=Me,Uo+=16):(t=r,0===ea&&sa(zi)),t===r&&(e.substr(Uo,16)===He?(t=He,Uo+=16):(t=r,0===ea&&sa(qi)),t===r&&(e.substr(Uo,15)===Ue?(t=Ue,Uo+=15):(t=r,0===ea&&sa(ji)),t===r&&(e.substr(Uo,14)===We?(t=We,Uo+=14):(t=r,0===ea&&sa(Mi)),t===r&&(e.substr(Uo,16)===Ye?(t=Ye,Uo+=16):(t=r,0===ea&&sa(Hi)),t===r&&(e.substr(Uo,14)===Qe?(t=Qe,Uo+=14):(t=r,0===ea&&sa(Ui)),t===r&&(e.substr(Uo,15)===Ze?(t=Ze,Uo+=15):(t=r,0===ea&&sa(Wi)),t===r&&(e.substr(Uo,15)===Xe?(t=Xe,Uo+=15):(t=r,0===ea&&sa(Yi)),t===r&&(e.substr(Uo,15)===et?(t=et,Uo+=15):(t=r,0===ea&&sa(Qi)),t===r&&(e.substr(Uo,14)===tt?(t=tt,Uo+=14):(t=r,0===ea&&sa(Zi)),t===r&&(e.substr(Uo,10)===rt?(t=rt,Uo+=10):(t=r,0===ea&&sa(Xi)),t===r&&(e.substr(Uo,13)===it?(t=it,Uo+=13):(t=r,0===ea&&sa(eo)),t===r&&(e.substr(Uo,19)===ot?(t=ot,Uo+=19):(t=r,0===ea&&sa(to)),t===r&&(e.substr(Uo,10)===at?(t=at,Uo+=10):(t=r,0===ea&&sa(ro)),t===r&&(e.substr(Uo,10)===st?(t=st,Uo+=10):(t=r,0===ea&&sa(io)),t===r&&(e.substr(Uo,13)===xe?(t=xe,Uo+=13):(t=r,0===ea&&sa(yi)),t===r&&(e.substr(Uo,11)===nt?(t=nt,Uo+=11):(t=r,0===ea&&sa(oo))))))))))))))))))))))))))))))))))))))))));return t}(),i!==r?(o=ua(),o!==r?(Wo=t,t={type:i}):(Uo=t,t=r)):(Uo=t,t=r),t===r))if(t=Uo,35===e.charCodeAt(Uo)?(i=B,Uo++):(i=r,0===ea&&sa(Cr)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"comment",comment:e}}(o)):(Uo=t,t=r)}else Uo=t,t=r}}}}}}}}}}}}return t}function ja(){let t,i,o,a,s,n,l;if(t=Uo,e.substr(Uo,2)===Te?(i=Te,Uo+=2):(i=r,0===ea&&sa(ki)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),Wo=t,t=o.trim()}else Uo=t,t=r;return t}function Ma(){let t;return e.substr(Uo,6)===Tt?(t=Tt,Uo+=6):(t=r,0===ea&&sa(xo)),t===r&&(e.substr(Uo,6)===It?(t=It,Uo+=6):(t=r,0===ea&&sa(So)),t===r&&(e.substr(Uo,5)===gt?(t=gt,Uo+=5):(t=r,0===ea&&sa(ho)),t===r&&(e.substr(Uo,4)===pt?(t=pt,Uo+=4):(t=r,0===ea&&sa(no)),t===r&&(e.substr(Uo,6)===Ct?(t=Ct,Uo+=6):(t=r,0===ea&&sa(To)),t===r&&(e.substr(Uo,4)===_t?(t=_t,Uo+=4):(t=r,0===ea&&sa(vo)),t===r&&(e.substr(Uo,5)===ut?(t=ut,Uo+=5):(t=r,0===ea&&sa(lo)),t===r&&(e.substr(Uo,5)===Pt?(t=Pt,Uo+=5):(t=r,0===ea&&sa(Bo)),t===r&&(e.substr(Uo,5)===ct?(t=ct,Uo+=5):(t=r,0===ea&&sa(so)),t===r&&(e.substr(Uo,4)===ht?(t=ht,Uo+=4):(t=r,0===ea&&sa(uo))))))))))),t}function Ha(){let e,t,i,o;for(ea++,e=Uo,t=Ua(),t===r&&(t=null),i=[],o=as(),o===r&&(o=Ua());o!==r;)i.push(o),o=as(),o===r&&(o=Ua());var a,s;return Wo=e,s=i,e=Wt((a=t)?[a,...s.flat()]:s.flat()),ea--,e}function Ua(){let t,i,o,a,s,n,l;if(t=Uo,i=ns(),i!==r&&(Wo=t,i={type:"hardBreak"}),t=i,t===r){if(t=Uo,i=Uo,o=[],a=Uo,s=ss(),s===r&&(s=null),n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=ss(),s!==r?(n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r)),a!==r)for(;a!==r;)o.push(a),a=Uo,s=ss(),s===r&&(s=null),n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=ss(),s!==r?(n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r));else o=r;i=o!==r?e.substring(i,Uo):o,i!==r&&(Wo=t,i={text:Ht(i),type:"text"}),t=i}return t}function Wa(){let t;return 42===e.charCodeAt(Uo)?(t=Et,Uo++):(t=r,0===ea&&sa(Po)),t}function Ya(){let t;return 95===e.charCodeAt(Uo)?(t=Lt,Uo++):(t=r,0===ea&&sa(Io)),t}function Qa(){let t;return 96===e.charCodeAt(Uo)?(t=Nt,Uo++):(t=r,0===ea&&sa(Eo)),t}function Za(){let t;return 33===e.charCodeAt(Uo)?(t=Vt,Uo++):(t=r,0===ea&&sa(Lo)),t}function Xa(){let e,t,i;return e=Uo,t=Wa(),t!==r?(i=Wa(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function es(){let e,t,i;return e=Uo,t=Ya(),t!==r?(i=Ya(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function ts(){let e,t,i;return e=Uo,t=Qa(),t!==r?(i=Qa(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function rs(){let e,t,i;return e=Uo,t=Za(),t!==r?(i=Za(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function is(){let t;return e.substr(Uo,2)===Rt?(t=Rt,Uo+=2):(t=r,0===ea&&sa(No)),t}function os(){let t;return 93===e.charCodeAt(Uo)?(t=Gt,Uo++):(t=r,0===ea&&sa(Vo)),t}function as(){let t,i,o,a,s,n,l;if(t=Uo,i=is(),i!==r){if(o=Uo,a=[],s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),qt.test(s)?Uo++:(s=r,0===ea&&sa(hr));else a=r;o=a!==r?e.substring(o,Uo):a,o!==r?(a=os(),a!==r?(Wo=t,t={index:+o,type:"bit"}):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Xa(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=Xa(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=Xa(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=Xa(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"bold"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=es(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=es(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=es(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=es(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"italic"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=ts(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ts(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ts(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ts(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"light"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r)if(t=Uo,i=rs(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=rs(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=rs(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Xt)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=rs(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"highlight"}],text:Ht(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r}}}return t}function ss(){let t,i,o,a,s;if(t=Uo,i=Uo,o=ts(),o!==r){if(a=[],s=Qa(),s!==r)for(;s!==r;)a.push(s),s=Qa();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;if(t=i!==r?e.substring(t,Uo):i,t===r){if(t=Uo,i=Uo,o=rs(),o!==r){if(a=[],s=Za(),s!==r)for(;s!==r;)a.push(s),s=Za();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;t=i!==r?e.substring(t,Uo):i}return t}function ns(){let t,i;return ea++,10===e.charCodeAt(Uo)?(t=Ft,Uo++):(t=r,0===ea&&sa(Go)),t===r&&(e.substr(Uo,2)===Kt?(t=Kt,Uo+=2):(t=r,0===ea&&sa(Fo)),t===r&&(t=e.charAt(Uo),jt.test(t)?Uo++:(t=r,0===ea&&sa(Ko)))),ea--,t===r&&(i=r,0===ea&&sa(Ro)),t}function ls(){let t;return t=e.charAt(Uo),Mt.test(t)?Uo++:(t=r,0===ea&&sa($o)),t}function cs(){let t,i;return t=ns(),t===r&&(t=Uo,ea++,e.length>Uo?(i=e.charAt(Uo),Uo++):(i=r,0===ea&&sa(Xt)),ea--,i===r?t=void 0:(Uo=t,t=r)),t}function ps(){let t,i,o,a,s,n,l;if(t=Uo,i=Uo,o=Uo,e.substr(Uo,4)===$t?(a=$t,Uo+=4):(a=r,0===ea&&sa(Oo)),a!==r?(115===e.charCodeAt(Uo)?(s=Ot,Uo++):(s=r,0===ea&&sa(Jo)),s===r&&(s=null),e.substr(Uo,3)===Jt?(n=Jt,Uo+=3):(n=r,0===ea&&sa(Do)),n!==r?(a=[a,s,n],o=a):(Uo=o,o=r)):(Uo=o,o=r),o===r&&(e.substr(Uo,7)===Dt?(o=Dt,Uo+=7):(o=r,0===ea&&sa(zo))),i=o!==r?e.substring(i,Uo):o,i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=us(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=us(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),Wo=t,t={pr:i,t:o}}else Uo=t,t=r;return t}function us(){let t;return t=e.charAt(Uo),Zt.test(t)?Uo++:(t=r,0===ea&&sa(qo)),t}var ds=[],ms="";e=(e=e.replace(/\s+$/,"")).trimStart(),Qo=a();const hs=Qo!==r&&Uo===e.length;function bs(){throw Qo!==r&&Uo<e.length&&sa({type:"end"}),na(Xo,Zo<e.length?function(t=Uo){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(Zo):null,Zo<e.length?aa(Zo,Zo+1):aa(Zo,Zo))}return t.peg$library?{peg$result:Qo,peg$currPos:Uo,peg$FAILED:r,peg$maxFailExpected:Xo,peg$maxFailPos:Zo,peg$success:hs,peg$throw:hs?void 0:bs}:hs?Qo:void bs()}var Xt=Zt,er=class{version(){return Xt("",{startRule:"version"})}preprocessAst(e){if(g.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){if(Array.isArray(e))return e;let r=e??"";if(!r)return[];let i="bitmarkPlusPlus";return Object.assign({},t).location===rt&&(i="bitmarkPlus"),r=r.trim(),Xt(r,{startRule:i})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],r=e;for(const e of r)switch(e.type){case Ze.gap:case Ze.select:case Ze.highlight:case Ze.mark:t.push(e);break;default:{const r=this.extractBodyBits(e.content);for(const e of r)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const r=e;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case Ze.gap:case Ze.select:case Ze.highlight:case Ze.mark:t(r,e,i);break;default:this.walkBodyBits(i.content,t)}}}},tr=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}},rr=new class{asNumber(e,t){if(null==e)return t??void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?t??void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}},ir=class{constructor(){l(this,"textParser"),l(this,"textGenerator"),this.textParser=new er,this.textGenerator=new Mt}toExample(e,t,r){if(null!=t){let e;return e=tr.isBoolean(r)?tr.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:r??null}}return e?{isExample:!0,example:r??null,__defaultExample:r??null}:{isExample:!1,example:null,__defaultExample:r??null}}toAstProperty(e,t,r,i){if(null==r)return;let o=Le.getBitConfig(e).tags;if(i?.cardSet){const{sideNo:t,variantNo:r}=i.cardSet;o=Le.getTagsConfigForCardSet(e,t,r)??o}const a=Le.getTagConfigForTag(o,t);a?.array&&!Array.isArray(r)?r=[r]:!a?.array&&Array.isArray(r)&&(r=r[r.length-1]);const s=e=>{if(null==e)return;switch(a?.format??v){case v:return null!=rr.asNumber(e)&&(e=`${e}`),g.isString(e)?g.trimmedString(e):void 0;case A:{null!=rr.asNumber(e)&&(e=`${e}`);const t=g.isString(e)?g.trimmedString(e):void 0;return null==t||""===t?a?.defaultValue??"":t}case _:return rr.asNumber(e);case C:return tr.toBoolean(e,!0);case w:return!tr.toBoolean(e,!0)}return e};if(Array.isArray(r)){const e=r;for(let t=0,r=e.length;t<r;t++)e[t]=s(e[t])}else r=s(r);return r}getEmptyTextAst(e){return this.handleJsonText(e,rt," ")}handleJsonText(e,t,r){let i;const{textFormat:o}=e;if(null==r)i=[];else if(this.textParser.isAst(r))i=r;else{if(Array.isArray(r)){const e=[];for(let i=0,a=r.length;i<a;i++){const a=r[i];this.textParser.isAst(a)?e[i]=a:g.isString(a)?(e[i]=this.textParser.toAst(_t.breakscape(a,{format:o,location:t}),{format:o,location:t}),e[i].__tag="text"):e[i]=[]}return e}i=g.isString(r)?this.textParser.toAst(_t.breakscape(r,{format:o,location:t,v2:!0}),{format:o,location:t}):[]}return i.__tag="text",i}},or=new er,ar=new class{fillStringExample(e,t,r,i,o){if(t){Array.isArray(t)||(t=[t]);for(const a of t)if(!a.isExample&&(r?(a.example=a.__defaultExample,a.isExample=!0):a.example=i?or.toAst(i,{format:e,location:rt}):void 0,o))break}}fillBooleanExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!i||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=tr.toBoolean(r),i))break}}},sr=r(722),nr=new class{fileExtensionFromUrl(e){let t;if(e)try{const r=new URL(e).pathname.split(".");r.length>1&&(t=r[r.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}},lr=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;const t=e;let r=!0;switch(e.type){case y.image:{const t=e.image;g.isString(t.src)||(t.src="");break}case y.imageLink:{const t=e.imageLink;g.isString(t.url)||(t.url="");break}case y.audio:{const t=e.audio;g.isString(t.src)||(t.src="");break}case y.audioEmbed:{const t=e.audioEmbed;g.isString(t.src)||(t.src="");break}case y.audioLink:{const t=e.audioLink;g.isString(t.url)||(t.url="");break}case y.video:{const t=e.video;g.isString(t.src)||(t.src="");break}case y.videoEmbed:{const t=e.videoEmbed;g.isString(t.url)||(t.url="");break}case y.videoLink:{const t=e.videoLink;g.isString(t.url)||(t.url="");break}case y.stillImageFilm:{const t=e;g.isString(t.image.src)||(t.image.src=""),g.isString(t.audio.src)||(t.audio.src="");break}case y.stillImageFilmEmbed:{const t=e.stillImageFilmEmbed;g.isString(t.url)||(t.url="");break}case y.stillImageFilmLink:{const t=e.stillImageFilmLink;g.isString(t.url)||(t.url="");break}case y.article:{const t=e.article;g.isString(t.body)||(t.body="");break}case y.document:{const t=e.document;g.isString(t.url)||(t.url="");break}case y.documentEmbed:{const t=e.documentEmbed;g.isString(t.url)||(t.url="");break}case y.documentLink:{const t=e.documentLink;g.isString(t.url)||(t.url="");break}case y.documentDownload:{const t=e.documentDownload;g.isString(t.url)||(t.url="");break}case y.appLink:{const t=e.appLink;g.isString(t.url)||(t.url="");break}case y.websiteLink:{const t=e.websiteLink;g.isString(t.url)||(t.url="");break}default:r=!1}return r||e.type&&(e.__invalid=!0),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(!g.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!g.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!g.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!g.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(!g.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`)}},cr=class extends ir{resourceFromResourceJson(e,t){if(!t)return;const r=[];Array.isArray(t)||(t=[t]);for(const i of t){let t=(0,sr.Enum)(y).fromValue(i.type);if(!t)return;const o=(0,sr.Enum)(y).keyFromValue(t);if(!o)return;let a;if(t=(0,sr.Enum)(y).fromValue(i.__typeAlias)??t,t===y.imageResponsive){const t=i,o=this.resourceFromResourceDataJson(e,y.imagePortrait,t.imagePortrait),a=this.resourceFromResourceDataJson(e,y.imageLandscape,t.imageLandscape);o&&r.push(o),a&&r.push(a)}else if(t===y.stillImageFilm){const t=i,o=this.resourceFromResourceDataJson(e,y.image,t.image),a=this.resourceFromResourceDataJson(e,y.audio,t.audio);o&&r.push(o),a&&r.push(a)}else{if(a=i[o],!a)return;const s=this.resourceFromResourceDataJson(e,t,a);s&&r.push(s)}}return 0!==r.length?1===r.length?r[0]:r:void 0}resourceFromResourceDataJson(e,t,r){if(!r)return;if(!(t=(0,sr.Enum)(y).fromValue(t)))return;const i=g.isString(r)?r:void 0,o=r.url||r.src||r.body||i,a=r.posterImage?this.resourceFromResourceDataJson(e,y.image,r.posterImage)?.image:void 0,s=r.thumbnails?r.thumbnails.map(t=>this.resourceFromResourceDataJson(e,y.image,t)?.image):void 0;return this.resource(e,{type:t,value:o,srcAlt:r.srcAlt,format:r.format,src1x:r.src1x,src2x:r.src2x,src3x:r.src3x,src4x:r.src4x,caption:this.handleJsonText(e,rt,r.caption),width:r.width??void 0,height:r.height??void 0,alt:r.alt,zoomDisabled:r.zoomDisabled,duration:r.duration,mute:r.mute,autoplay:r.autoplay,allowSubtitles:r.allowSubtitles,showSubtitles:r.showSubtitles,posterImage:a,thumbnails:s,siteName:void 0,license:r.license,copyright:r.copyright,showInIndex:r.showInIndex,search:r.search,selected:r.selected})}resource(e,t){let r;const{type:i,value:o,format:a,...s}=t,n={type:i,value:o??_t.EMPTY_STRING,format:a??_t.EMPTY_STRING,...s};switch(i){case y.video:case y.videoEmbed:case y.videoLink:case y.stillImageFilmEmbed:case y.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],i=[];for(const o of r){const r=t[o];if(r){const t=this.resource(e,{type:y.image,value:r});t&&i.push(t.image)}}n.thumbnails=[...n.thumbnails||[],...i]}}switch(i){case y.image:case y.imagePortrait:case y.imageLandscape:case y.backgroundWallpaper:case y.imagePlaceholder:case y.icon:case y.platformIcon:case y.platformLogo:case y.platformBackgroundImage:case y.previewImage:case y.coverImage:case y.backgroundImage:r=this.imageResource(e,n,i);break;case y.imageLink:r=this.imageLinkResource(e,n);break;case y.audio:r=this.audioResource(e,n);break;case y.audioEmbed:r=this.audioEmbedResource(e,n);break;case y.audioLink:r=this.audioLinkResource(e,n);break;case y.video:case y.previewVideo:r=this.videoResource(e,n);break;case y.videoEmbed:r=this.videoEmbedResource(e,n);break;case y.videoLink:r=this.videoLinkResource(e,n);break;case y.stillImageFilmEmbed:r=this.stillImageFilmEmbedResource(e,n);break;case y.stillImageFilmLink:r=this.stillImageFilmLinkResource(e,n);break;case y.article:r=this.articleResource(e,n);break;case y.document:r=this.documentResource(e,n);break;case y.documentEmbed:r=this.documentEmbedResource(e,n);break;case y.documentLink:r=this.documentLinkResource(e,n);break;case y.documentDownload:r=this.documentDownloadResource(e,n);break;case y.appLink:r=this.appLinkResource(e,n);break;case y.websiteLink:r=this.websiteLinkResource(e,n)}return r}imageResource(e,t,r){const{value:i,srcAlt:o,src1x:a,src2x:s,src3x:n,src4x:l,width:c,height:p,alt:d,zoomDisabled:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,{bitType:T}=e;let _=!1;Le.isOfBitType(T,[u.imageSeparator,u.pageBanner,u.imagesLogoGrave,u.prototypeImages,u.extractorImage])&&(_=!0);const C={type:y.image,__typeAlias:r??y.image,__configKey:f(r??y.image),image:{format:nr.fileExtensionFromUrl(i)??void 0,provider:nr.domainFromUrl(i)??void 0,src:i??"",srcAlt:o??void 0,src1x:a??void 0,src2x:s??void 0,src3x:n??void 0,src4x:l??void 0,width:c??null,height:p??null,alt:d??"",zoomDisabled:m??_,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(C.image,{ignoreFalse:["zoomDisabled","showInIndex","selected"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),lr.validateResource(C)}imageLinkResource(e,t){const{value:r,srcAlt:i,src1x:o,src2x:a,src3x:s,src4x:n,width:l,height:c,alt:p,zoomDisabled:u,license:d,copyright:m,showInIndex:h,caption:b,search:g,selected:k}=t,x={type:y.imageLink,__typeAlias:y.imageLink,__configKey:f(y.imageLink),imageLink:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,src1x:o??void 0,src2x:a??void 0,src3x:s??void 0,src4x:n??void 0,width:l??null,height:c??null,alt:p??"",zoomDisabled:u??!1,license:d??"",copyright:m??"",showInIndex:h??!1,caption:this.handleJsonText(e,rt,b),search:g??void 0,selected:k??!1}};return _e.removeUnwantedProperties(x.imageLink,{ignoreFalse:["zoomDisabled","showInIndex","selected"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),lr.validateResource(x)}audioResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:u,selected:d}=t,m={type:y.audio,__typeAlias:y.audio,__configKey:f(y.audio),audio:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,rt,p),search:u??void 0,selected:d??!1}};return _e.removeUnwantedProperties(m.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(m)}audioEmbedResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:u,selected:d}=t,m={type:y.audioEmbed,__typeAlias:y.audioEmbed,__configKey:f(y.audioEmbed),audioEmbed:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,rt,p),search:u??void 0,selected:d??!1}};return _e.removeUnwantedProperties(m.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(m)}audioLinkResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:u,selected:d}=t,m={type:y.audioLink,__typeAlias:y.audioLink,__configKey:f(y.audioLink),audioLink:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,rt,p),search:u??void 0,selected:d??!1}};return _e.removeUnwantedProperties(m.audioLink,{ignoreEmptyString:["url"],ignoreFalse:["selected"]}),lr.validateResource(m)}videoResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.video,__typeAlias:y.video,__configKey:f(y.video),video:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1,posterImage:d??void 0,thumbnails:m??void 0}};return _e.removeUnwantedProperties(T.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(T)}videoEmbedResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.videoEmbed,__typeAlias:y.videoEmbed,__configKey:f(y.videoEmbed),videoEmbed:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(T)}videoLinkResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.videoLink,__typeAlias:y.videoLink,__configKey:f(y.videoLink),videoLink:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(T)}stillImageFilmEmbedResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.stillImageFilmEmbed,__typeAlias:y.stillImageFilmEmbed,__configKey:f(y.stillImageFilmEmbed),stillImageFilmEmbed:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(T)}stillImageFilmLinkResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.stillImageFilmLink,__typeAlias:y.stillImageFilmLink,__configKey:f(y.stillImageFilmLink),stillImageFilmLink:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(T)}articleResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.article,__typeAlias:y.article,__configKey:f(y.article),article:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,body:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"],ignoreFalse:["selected"]}),lr.validateResource(p)}documentResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.document,__typeAlias:y.document,__configKey:f(y.document),document:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(p)}documentEmbedResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.documentEmbed,__typeAlias:y.documentEmbed,__configKey:f(y.documentEmbed),documentEmbed:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(p)}documentLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.documentLink,__typeAlias:y.documentLink,__configKey:f(y.documentLink),documentLink:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(p)}documentDownloadResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.documentDownload,__typeAlias:y.documentDownload,__configKey:f(y.documentDownload),documentDownload:{format:nr.fileExtensionFromUrl(r)??void 0,provider:nr.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(p)}appLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.appLink,__typeAlias:y.appLink,__configKey:f(y.appLink),appLink:{provider:void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(p)}websiteLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.websiteLink,__typeAlias:y.websiteLink,__configKey:f(y.websiteLink),websiteLink:{provider:void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),lr.validateResource(p)}},pr=class extends ir{constructor(){super(...arguments),l(this,"resourceBuilder",new cr)}buildBitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return _e.removeUnwantedProperties(i),i}buildBit(e,t){e=structuredClone(e);const r=Le.getMigratedBitType(e.bitType);r&&(e.bitType=r,e.isCollapsible=e.isCollapsible??!0);const i=e.bitType,o=Le.getBitConfig(i),a="true"===o.tags[ye.property_isCollapsible]?.defaultValue,s=this.resolveAccessibilityGroupTag(o,e.accessibilityGroupTag),n=(0,tt.Enum)(Ct).fromValue(e.textFormat);let l=(0,tt.Enum)(S).fromValue(e.textFormat)??o.textFormatDefault;n===Ct.bitmarkMinusMinus&&(l=S.bitmarkText);const c={bitConfig:o,bitType:i,textFormat:l},p=this.buildCardNode(c,e),d=Le.isOfBitType(e.bitType,u.essay)?this.toAstProperty(i,ye.property_reasonableNumOfChars,e.reasonableNumOfChars,t):void 0,m={...this.toExample(e.__isDefaultExample,e.example)},h={bitType:i,bitLevel:e.bitLevel,textFormat:l,resourceType:(0,tt.Enum)(y).fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(i,ye.property_id,e.id,t),gUri:this.toAstProperty(i,ye.property_gUri,e.gUri,t),internalComment:this.toAstProperty(i,ye.property_internalComment,e.internalComment,t),customerId:this.toAstProperty(i,ye.property_customerId,e.customerId,t),customerExternalId:this.toAstProperty(i,ye.property_customerExternalId,e.customerExternalId,t),externalId:this.toAstProperty(i,ye.property_externalId,e.externalId,t),spaceId:this.toAstProperty(i,ye.property_spaceId,e.spaceId,t),padletId:this.toAstProperty(i,ye.property_padletId,e.padletId,t),jupyterId:this.toAstProperty(i,ye.property_jupyterId,e.jupyterId,t),jupyterExecutionCount:this.toAstProperty(i,ye.property_jupyterExecutionCount,e.jupyterExecutionCount,t),copyright:this.toAstProperty(i,ye.property_copyright,e.copyright,t),license:this.toAstProperty(i,ye.property_license,e.license,t),rightsPolicy:this.toAstProperty(i,ye.property_rightsPolicy,e.rightsPolicy,t),sourceRL:this.toAstProperty(i,ye.property_sourceRL,e.sourceRL,t),isPublic:this.toAstProperty(i,ye.property_isPublic,e.isPublic,t),isTemplate:this.toAstProperty(i,ye.property_isTemplate,e.isTemplate,t),isTemplateStripTheme:this.toAstProperty(i,ye.property_isTemplateStripTheme,e.isTemplateStripTheme,t),isEditable:this.toAstProperty(i,ye.property_isEditable,e.isEditable,t),needsValidation:this.toAstProperty(i,ye.property_needsValidation,e.needsValidation,t),validationDate:this.toAstProperty(i,ye.property_validationDate,e.validationDate,t),aiGenerated:this.toAstProperty(i,ye.property_aiGenerated,e.aiGenerated,t),machineTranslated:this.toAstProperty(i,ye.property_machineTranslated,e.machineTranslated,t),translationOf:this.toAstProperty(i,ye.property_translationOf,e.translationOf,t),spansPageBreak:this.toAstProperty(i,ye.property_spansPageBreak,e.spansPageBreak,t),searchIndex:this.toAstProperty(i,ye.property_searchIndex,e.searchIndex,t),analyticsTag:this.toAstProperty(i,ye.property_analyticsTag,e.analyticsTag,t),categoryTag:this.toAstProperty(i,ye.property_categoryTag,e.categoryTag,t),topicTag:this.toAstProperty(i,ye.property_topicTag,e.topicTag,t),reportTag:this.toAstProperty(i,ye.property_reportTag,e.reportTag,t),altLangTag:this.toAstProperty(i,ye.property_altLangTag,e.altLangTag,t),feedbackEngine:this.toAstProperty(i,ye.property_feedbackEngine,e.feedbackEngine,t),feedbackType:this.toAstProperty(i,ye.property_feedbackType,e.feedbackType,t),disableFeedback:this.toAstProperty(i,ye.property_disableFeedback,e.disableFeedback,t),diffTo:this.toAstProperty(i,ye.property_diffTo,e.diffTo,t),diffOp:this.toAstProperty(i,ye.property_diffOp,e.diffOp,t),diffRef:this.toAstProperty(i,ye.property_diffRef,e.diffRef,t),diffContext:this.toAstProperty(i,ye.property_diffContext,e.diffContext,t),diffTime:this.toAstProperty(i,ye.property_diffTime,e.diffTime,t),path:this.toAstProperty(i,ye.property_path,e.path,t),releaseVersion:this.toAstProperty(i,ye.property_releaseVersion,e.releaseVersion,t),releaseKind:this.toAstProperty(i,ye.property_releaseKind,e.releaseKind,t),releaseDate:this.toAstProperty(i,ye.property_releaseDate,e.releaseDate,t),iframeSrc:this.toAstProperty(i,ye.property_iframeSrc,e.iframeSrc,t),iframeName:this.toAstProperty(i,ye.property_iframeName,e.iframeName,t),book:this.buildBooks(c,e.book),ageRange:this.toAstProperty(i,ye.property_ageRange,e.ageRange,t),lang:this.toAstProperty(i,ye.property_lang,e.lang,t),language:this.toAstProperty(i,ye.property_language,e.language,t),publisher:this.toAstProperty(i,ye.property_publisher,e.publisher,t),publisherName:this.toAstProperty(i,ye.property_publisherName,e.publisherName,t),displayName:this.toAstProperty(i,ye.property_displayName,e.displayName,t),theme:this.toAstProperty(i,ye.property_theme,e.theme,t),rtl:this.toAstProperty(i,ye.property_rtl,e.rtl,t),computerLanguage:this.toAstProperty(i,ye.property_computerLanguage,e.computerLanguage,t),target:this.toAstProperty(i,ye.property_target,e.target,t),slug:this.toAstProperty(i,ye.property_slug,e.slug,t),tag:this.toAstProperty(i,ye.property_tag,e.tag,t),groupTag:this.buildGroupTags(c,e.groupTag),accessibilityTag:this.toAstProperty(i,ye.property_accessibilityTag,e.accessibilityTag,t),accessibilityGroupTag:this.buildGroupTags(c,s),reviewTag:this.toAstProperty(i,ye.property_reviewTag,e.reviewTag,t),reviewerTag:this.toAstProperty(i,ye.property_reviewerTag,e.reviewerTag,t),reductionTag:this.toAstProperty(i,ye.property_reductionTag,e.reductionTag,t),bubbleTag:this.toAstProperty(i,ye.property_bubbleTag,e.bubbleTag,t),extractorTag:this.toAstProperty(i,ye.property_extractorTag,e.extractorTag,t),extractorInternal:this.toAstProperty(i,ye.property_extractorInternal,e.extractorInternal,t),sourceBB:this.normaliseSourceBB(e.sourceBB),bitFingerprint:this.toAstProperty(i,ye.property_bitFingerprint,e.bitFingerprint,t),levelCEFRp:this.toAstProperty(i,ye.property_levelCEFRp,e.levelCEFRp,t),levelCEFR:this.toAstProperty(i,ye.property_levelCEFR,e.levelCEFR,t),levelILR:this.toAstProperty(i,ye.property_levelILR,e.levelILR,t),levelACTFL:this.toAstProperty(i,ye.property_levelACTFL,e.levelACTFL,t),icon:this.toAstProperty(i,ye.property_icon,e.icon,t),iconTag:this.toAstProperty(i,ye.property_iconTag,e.iconTag,t),colorTag:this.toAstProperty(i,ye.property_colorTag,e.colorTag,t),flashcardSet:this.toAstProperty(i,ye.property_flashcardSet,e.flashcardSet,t),subtype:this.toAstProperty(i,ye.property_subtype,e.subtype,t),bookAlias:this.toAstProperty(i,ye.property_bookAlias,e.bookAlias,t),bookDiff:this.toAstProperty(i,ye.property_bookDiff,e.bookDiff,t),coverImage:"string"==typeof e.coverImage||Array.isArray(e.coverImage)?this.toAstProperty(i,ye.property_coverImage,St.asArray(e.coverImage),t):this.toImageResource(c,e.coverImage),coverColor:this.toAstProperty(i,ye.property_coverColor,e.coverColor,t),backgroundImage:"string"==typeof e.backgroundImage||Array.isArray(e.backgroundImage)?this.toAstProperty(i,ye.property_backgroundImage,St.asArray(e.backgroundImage),t):this.toImageResource(c,e.backgroundImage),publications:this.toAstProperty(i,ye.property_publications,e.publications,t),relatedBook:this.toAstProperty(i,ye.property_relatedBook,e.relatedBook,t),translationOfBook:this.toAstProperty(i,ye.property_translationOfBook,e.translationOfBook,t),userFeedbackTranslationUrl:this.toAstProperty(i,ye.property_userFeedbackTranslationUrl,e.userFeedbackTranslationUrl,t),userFeedbackContentUrl:this.toAstProperty(i,ye.property_userFeedbackContentUrl,e.userFeedbackContentUrl,t),author:this.toAstProperty(i,ye.property_author,e.author,t),subject:this.toAstProperty(i,ye.property_subject,e.subject,t),date:this.toAstProperty(i,ye.property_date,e.date,t),dateEnd:this.toAstProperty(i,ye.property_dateEnd,e.dateEnd,t),location:this.toAstProperty(i,ye.property_location,e.location,t),kind:this.toAstProperty(i,ye.property_kind,e.kind,t),hasMarkAsDone:this.toAstProperty(i,ye.property_hasMarkAsDone,e.hasMarkAsDone,t),processHandIn:this.toAstProperty(i,ye.property_processHandIn,e.processHandIn,t),processHandInLocation:this.toAstProperty(i,ye.property_processHandInLocation,e.processHandInLocation,t),chatWithBook:this.toAstProperty(i,ye.property_chatWithBook,e.chatWithBook,t),chatWithBookBrainKey:this.toAstProperty(i,ye.property_chatWithBookBrainKey,e.chatWithBookBrainKey,t),currency:this.toAstProperty(i,ye.property_currency,e.currency,t),bookIsbn:this.toAstProperty(i,ye.property_bookIsbn,e.bookIsbn,t),bookAuthor:this.toAstProperty(i,ye.property_bookAuthor,e.bookAuthor,t),bookType:this.toAstProperty(i,ye.property_bookType,e.bookType,t),bookBindingType:this.toAstProperty(i,ye.property_bookBindingType,e.bookBindingType,t),bookNumberOfPages:this.toAstProperty(i,ye.property_bookNumberOfPages,e.bookNumberOfPages,t),bookRating:this.toAstProperty(i,ye.property_bookRating,e.bookRating,t),bookSeriesTitle:this.toAstProperty(i,ye.property_bookSeriesTitle,e.bookSeriesTitle,t),bookSeriesId:this.toAstProperty(i,ye.property_bookSeriesId,e.bookSeriesId,t),bookSeriesNumber:this.toAstProperty(i,ye.property_bookSeriesNumber,e.bookSeriesNumber,t),bookLanguage:this.toAstProperty(i,ye.property_bookLanguage,e.bookLanguage,t),bookPublishingDate:this.toAstProperty(i,ye.property_bookPublishingDate,e.bookPublishingDate,t),bookPublisher:this.toAstProperty(i,ye.property_bookPublisher,e.bookPublisher,t),bookTranslator:this.toAstProperty(i,ye.property_bookTranslator,e.bookTranslator,t),bookOriginalTitle:this.toAstProperty(i,ye.property_bookOriginalTitle,e.bookOriginalTitle,t),gmbExternalShop:this.toAstProperty(i,ye.property_gmbExternalShop,e.gmbExternalShop,t),gmbExternalShopItems:this.toAstProperty(i,ye.property_gmbExternalShopItems,e.gmbExternalShopItems,t),action:this.toAstProperty(i,ye.property_action,e.action,t),showInIndex:this.toAstProperty(i,ye.property_showInIndex,e.showInIndex,t),refAuthor:this.toAstProperty(i,ye.property_refAuthor,e.refAuthor,t),refBookTitle:this.toAstProperty(i,ye.property_refBookTitle,e.refBookTitle,t),refPublisher:this.toAstProperty(i,ye.property_refPublisher,e.refPublisher,t),refPublicationYear:this.toAstProperty(i,ye.property_refPublicationYear,e.refPublicationYear,t),citationStyle:this.toAstProperty(i,ye.property_citationStyle,e.citationStyle,t),blockId:this.toAstProperty(i,ye.property_blockId,e.blockId,t),pageNo:this.toAstProperty(i,ye.property_pageNo,e.pageNo,t),x:this.toAstProperty(i,ye.property_x,e.x,t),y:this.toAstProperty(i,ye.property_y,e.y,t),width:this.toAstProperty(i,ye.property_width,e.width,t),height:this.toAstProperty(i,ye.property_height,e.height,t),index:this.toAstProperty(i,ye.property_index,e.index,t),classification:this.toAstProperty(i,ye.property_classification,e.classification,t),availableClassifications:this.toAstProperty(i,ye.property_availableClassifications,e.availableClassifications,t),allowedBit:this.toAstProperty(i,ye.property_allowedBit,e.allowedBit,t),authorFullName:this.toAstProperty(i,ye.property_authorFullName,e.authorFullName,t),authorPseudonym:this.toAstProperty(i,ye.property_authorPseudonym,e.authorPseudonym,t),authorTitle:this.toAstProperty(i,ye.property_authorTitle,e.authorTitle,t),authorJobTitle:this.toAstProperty(i,ye.property_authorJobTitle,e.authorJobTitle,t),tableFixedHeader:this.toAstProperty(i,ye.property_tableFixedHeader,e.tableFixedHeader,t),tableHeaderWhitespaceNoWrap:this.toAstProperty(i,ye.property_tableHeaderWhitespaceNoWrap,e.tableHeaderWhitespaceNoWrap,t),tableSearch:this.toAstProperty(i,ye.property_tableSearch,e.tableSearch,t),tableSort:this.toAstProperty(i,ye.property_tableSort,e.tableSort,t),tablePagination:this.toAstProperty(i,ye.property_tablePagination,e.tablePagination,t),tablePaginationLimit:this.toAstProperty(i,ye.property_tablePaginationLimit,e.tablePaginationLimit,t),tableHeight:this.toAstProperty(i,ye.property_tableHeight,e.tableHeight,t),tableWhitespaceNoWrap:this.toAstProperty(i,ye.property_tableWhitespaceNoWrap,e.tableWhitespaceNoWrap,t),tableAutoWidth:this.toAstProperty(i,ye.property_tableAutoWidth,e.tableAutoWidth,t),tableResizableColumns:this.toAstProperty(i,ye.property_tableResizableColumns,e.tableResizableColumns,t),tableColumnMinWidth:this.toAstProperty(i,ye.property_tableColumnMinWidth,e.tableColumnMinWidth,t),quizCountItems:this.toAstProperty(i,ye.property_quizCountItems,e.quizCountItems,t),quizStrikethroughSolutions:this.toAstProperty(i,ye.property_quizStrikethroughSolutions,e.quizStrikethroughSolutions,t),codeLineNumbers:this.toAstProperty(i,ye.property_codeLineNumbers,e.codeLineNumbers,t),codeMinimap:this.toAstProperty(i,ye.property_codeMinimap,e.codeMinimap,t),stripePricingTableId:this.toAstProperty(i,ye.property_stripePricingTableId,e.stripePricingTableId,t),stripePricingTableDescriptiveName:this.toAstProperty(i,ye.property_stripePricingTableDescriptiveName,e.stripePricingTableDescriptiveName,t),stripePublishableKey:this.toAstProperty(i,ye.property_stripePublishableKey,e.stripePublishableKey,t),thumbImage:this.toAstProperty(i,ye.property_thumbImage,e.thumbImage,t),scormSource:this.toAstProperty(i,ye.property_scormSource,e.scormSource,t),posterImage:this.toAstProperty(i,ye.property_posterImage,e.posterImage,t),focusX:this.toAstProperty(i,ye.property_focusX,e.focusX,t),focusY:this.toAstProperty(i,ye.property_focusY,e.focusY,t),pointerLeft:this.toAstProperty(i,ye.property_pointerLeft,e.pointerLeft,t),pointerTop:this.toAstProperty(i,ye.property_pointerTop,e.pointerTop,t),listItemIndent:this.toAstProperty(i,ye.property_listItemIndent,e.listItemIndent,t),backgroundWallpaper:this.toImageResource(c,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(i,ye.property_hasBookNavigation,e.hasBookNavigation,t),duration:this.toAstProperty(i,ye.property_duration,e.duration,t),deeplink:this.toAstProperty(i,ye.property_deeplink,e.deeplink,t),externalLink:this.toAstProperty(i,ye.property_externalLink,e.externalLink,t),externalLinkText:this.toAstProperty(i,ye.property_externalLinkText,e.externalLinkText,t),videoCallLink:this.toAstProperty(i,ye.property_videoCallLink,e.videoCallLink,t),vendorDashboardId:this.toAstProperty(i,ye.property_vendorDashboardId,e.vendorDashboardId,t),vendorSurveyId:this.toAstProperty(i,ye.property_vendorSurveyId,e.vendorSurveyId,t),vendorUrl:this.toAstProperty(i,ye.property_vendorUrl,e.vendorUrl,t),search:this.toAstProperty(i,ye.property_search,e.search,t),list:this.toAstProperty(i,ye.property_list,e.list,t),layer:this.toAstProperty(i,ye.property_layer,e.layer,t),layerRole:this.toAstProperty(i,ye.property_layerRole,e.layerRole,t),textReference:this.toAstProperty(i,ye.property_textReference,e.textReference,t),isTracked:this.toAstProperty(i,ye.property_isTracked,e.isTracked,t),isInfoOnly:this.toAstProperty(i,ye.property_isInfoOnly,e.isInfoOnly,t),imageFirst:this.toAstProperty(i,ye.property_imageFirst,e.imageFirst,t),activityType:this.toAstProperty(i,ye.property_activityType,e.activityType,t),labelTrue:this.toAstProperty(i,ye.property_labelTrue,e.labelTrue,t),labelFalse:this.toAstProperty(i,ye.property_labelFalse,e.labelFalse,t),content2Buy:this.toAstProperty(i,ye.property_content2Buy,e.content2Buy,t),listPrice:this.toAstProperty(i,ye.property_listPrice,e.listPrice,t),customerProductId:this.toAstProperty(i,ye.property_customerProductId,e.customerProductId,t),customerProductShopLink:this.toAstProperty(i,ye.property_customerProductShopLink,e.customerProductShopLink,t),mailingList:this.toAstProperty(i,ye.property_mailingList,e.mailingList,t),buttonCaption:this.toAstProperty(i,ye.property_buttonCaption,e.buttonCaption,t),callToActionUrl:this.toAstProperty(i,ye.property_callToActionUrl,e.callToActionUrl,t),advertisingClickUrl:this.toAstProperty(i,ye.property_advertisingClickUrl,e.advertisingClickUrl,t),brandColor:this.toAstProperty(i,ye.property_brandColor,e.brandColor,t),brandColorName:this.toAstProperty(i,ye.property_brandColorName,e.brandColorName,t),caption:this.handleJsonText(c,rt,e.caption),quotedPerson:this.toAstProperty(i,ye.property_quotedPerson,e.quotedPerson,t),reasonableNumOfChars:d,resolved:this.toAstProperty(i,ye.property_resolved,e.resolved,t),resolvedDate:this.toAstProperty(i,ye.property_resolvedDate,e.resolvedDate,t),resolvedBy:this.toAstProperty(i,ye.property_resolvedBy,e.resolvedBy,t),handInAcceptFileType:this.toAstProperty(i,ye.property_handInAcceptFileType,e.handInAcceptFileType,t),handInRequirement:this.toAstProperty(i,ye.property_handInRequirement,e.handInRequirement,t),handInInstruction:this.toAstProperty(i,ye.property_handInInstruction,e.handInInstruction,t),maxCreatedBits:this.toAstProperty(i,ye.property_maxCreatedBits,e.maxCreatedBits,t),maxDisplayLevel:this.toAstProperty(i,ye.property_maxDisplayLevel,e.maxDisplayLevel,t),maxTocChapterLevel:this.toAstProperty(i,ye.property_maxTocChapterLevel,e.maxTocChapterLevel,t),sourceDocument:this.toAstProperty(i,ye.property_sourceDocument,e.sourceDocument,t),internalPrintPdf:this.toAstProperty(i,ye.property_internalPrintPdf,e.internalPrintPdf,t),hasPrintRestriction:this.toAstProperty(i,ye.property_hasPrintRestriction,e.hasPrintRestriction,t),enforceUpdateOverUserInput:this.toAstProperty(i,ye.property_enforceUpdateOverUserInput,e.enforceUpdateOverUserInput,t),extractorExtractionTimestamp:this.toAstProperty(i,ye.property_extractorExtractionTimestamp,e.extractorExtractionTimestamp,t),tocResource:this.toAstProperty(i,ye.property_tocResource,e.tocResource,t),tocContent:this.toAstProperty(i,ye.property_tocContent,e.tocContent,t),page:this.toAstProperty(i,ye.property_page,e.page,t),allowPrint:this.toAstProperty(i,ye.property_allowPrint,e.allowPrint,t),printParentChapterLevel:this.toAstProperty(i,ye.property_printParentChapterLevel,e.printParentChapterLevel,t),printOnRequestCustomerId:this.toAstProperty(i,ye.property_printOnRequestCustomerId,e.printOnRequestCustomerId,t),printOnRequestProductId:this.toAstProperty(i,ye.property_printOnRequestProductId,e.printOnRequestProductId,t),platformBrandTarget:this.toAstProperty(i,ye.property_platformBrandTarget,e.platformBrandTarget,t),platformName:this.toAstProperty(i,ye.property_platformName,e.platformName,t),platformIcon:this.toImageResource(c,e.platformIcon),platformLogo:this.toImageResource(c,e.platformLogo),platformLogoMaxHeight:this.toAstProperty(i,ye.property_platformLogoMaxHeight,e.platformLogoMaxHeight,t),platformPrimaryColor:this.toAstProperty(i,ye.property_platformPrimaryColor,e.platformPrimaryColor,t),platformSecondaryColor:this.toAstProperty(i,ye.property_platformSecondaryColor,e.platformSecondaryColor,t),platformBackgroundColor:this.toAstProperty(i,ye.property_platformBackgroundColor,e.platformBackgroundColor,t),platformScrollbarColor:this.toAstProperty(i,ye.property_platformScrollbarColor,e.platformScrollbarColor,t),platformSelectionColor:this.toAstProperty(i,ye.property_platformSelectionColor,e.platformSelectionColor,t),platformSeparatorColor:this.toAstProperty(i,ye.property_platformSeparatorColor,e.platformSeparatorColor,t),platformPlaceholderColor:this.toAstProperty(i,ye.property_platformPlaceholderColor,e.platformPlaceholderColor,t),platformTextSelectionColor:this.toAstProperty(i,ye.property_platformTextSelectionColor,e.platformTextSelectionColor,t),platformButtonPrimaryColor:this.toAstProperty(i,ye.property_platformButtonPrimaryColor,e.platformButtonPrimaryColor,t),platformButtonBackgroundColor:this.toAstProperty(i,ye.property_platformButtonBackgroundColor,e.platformButtonBackgroundColor,t),platformMessageBackgroundColor:this.toAstProperty(i,ye.property_platformMessageBackgroundColor,e.platformMessageBackgroundColor,t),platformBackgroundImage:this.toImageResource(c,e.platformBackgroundImage),platformBorderColor:this.toAstProperty(i,ye.property_platformBorderColor,e.platformBorderColor,t),platformSelectionTextColor:this.toAstProperty(i,ye.property_platformSelectionTextColor,e.platformSelectionTextColor,t),platformBaseLayerColor:this.toAstProperty(i,ye.property_platformBaseLayerColor,e.platformBaseLayerColor,t),platformMargin:this.toAstProperty(i,ye.property_platformMargin,e.platformMargin,t),platformBorderRadius:this.toAstProperty(i,ye.property_platformBorderRadius,e.platformBorderRadius,t),platformSelectionBorderRadius:this.toAstProperty(i,ye.property_platformSelectionBorderRadius,e.platformSelectionBorderRadius,t),platformNeedsShadow:this.toAstProperty(i,ye.property_platformNeedsShadow,e.platformNeedsShadow,t),productId:this.toAstProperty(i,ye.property_productId,e.productId,t),product:this.toAstProperty(i,ye.property_product,e.product,t),productVideo:this.toAstProperty(i,ye.property_productVideo,e.productVideo,t),productFolder:this.toAstProperty(i,ye.property_productFolder,e.productFolder,t),technicalTerm:this.buildTechnicalTerm(c,e.technicalTerm),servings:this.buildServings(c,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(c,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(c,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(i,ye.property_ratingLevelSelected,e.ratingLevelSelected,t),formula:this.toAstProperty(i,ye.property_formula,e.formula,t),markConfig:this.buildMarkConfigs(c,e.markConfig),imageSource:this.buildImageSource(c,e.imageSource),person:this.buildPerson(c,e.person),bot:this.toAstProperty(i,ye.property_bot,e.bot,t),referenceProperty:this.toAstProperty(i,ye.property_reference,e.referenceProperty,t),fullName:this.toAstProperty(i,ye.property_fullName,e.fullName,t),pseudonym:this.toAstProperty(i,ye.property_pseudonym,e.pseudonym,t),titleString:this.toAstProperty(i,ye.property_title,e.titleString,t),jobTitle:this.toAstProperty(i,ye.property_jobTitle,e.jobTitle,t),title:this.handleJsonText(c,rt,e.title),subtitle:this.handleJsonText(c,rt,e.subtitle),level:rr.asNumber(e.level),toc:this.toAstProperty(i,ye.property_toc,e.toc,t),progress:this.toAstProperty(i,ye.property_progress,e.progress,t),isCollapsible:this.toAstProperty(i,ye.property_isCollapsible,e.isCollapsible??(!!a||void 0),t),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(i,ye.property_revealSolutions,e.revealSolutions,t),item:this.handleJsonText(c,rt,e.item),lead:this.handleJsonText(c,rt,e.lead),pageNumber:this.handleJsonText(c,rt,e.pageNumber),marginNumber:this.handleJsonText(c,rt,e.marginNumber),hint:this.handleJsonText(c,rt,e.hint),instruction:this.handleJsonText(c,rt,e.instruction),partialAnswer:this.toAstProperty(i,ye.property_partialAnswer,e.partialAnswer,t),sampleSolution:this.toAstProperty(i,ye.property_sampleSolution,e.sampleSolution,t),additionalSolutions:this.toAstProperty(i,ye.property_additionalSolutions,e.additionalSolutions,t),...this.toExample(e.__isDefaultExample,e.example),previewImage:this.toImageResources(c,e.previewImage),previewVideo:this.toVideoResources(c,e.previewVideo),imagePlaceholder:this.toImageResource(c,e.imagePlaceholder),resources:St.asArray(this.resourceBuilder.resourceFromResourceJson(c,e.resources)),body:this.buildBody(c,e.body),cardNode:p,footer:this.buildFooter(c,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:e.__isDefaultExample??!1};return Le.isOfBitType(h.bitType,u.interview)&&this.pushDownTree(c,void 0,void 0,p,"questions","reasonableNumOfChars",e.reasonableNumOfChars),Le.isOfBitType(h.bitType,u.feedback)&&this.pushDownTree(c,void 0,void 0,p,["feedbacks","reason"],"reasonableNumOfChars",e.reasonableNumOfChars),this.pushDownTree(c,[h.body,...p?.cardBits?.map(e=>e.body)||[]],[Ye.gap],void 0,void 0,"isCaseSensitive",e.isCaseSensitive??!0),this.pushDownTree(c,void 0,void 0,p,"pairs","isCaseSensitive",e.isCaseSensitive??!0),this.pushDownTree(c,void 0,void 0,p,["matrix","cells"],"isCaseSensitive",e.isCaseSensitive??!0),this.pushExampleDownTree(c,h.body,p,h.__isDefaultExample,m.example),this.setDefaultBitValues(h),this.setIsExampleFlags(h),this.addVersionToParserInfo(h),_e.removeUnwantedProperties(h,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),lr.validateBit(h)}buildBooks(e,t){if(g.isString(t))return t;if(!Array.isArray(t))return;const r=t.map(t=>this.buildBook(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildBook(e,t){if(!t)return;const r={book:t.book??"",reference:t.reference??"",referenceEnd:t.referenceEnd??void 0};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),r}resolveAccessibilityGroupTag(e,t){if(null!=t&&(!Array.isArray(t)||t.length>0))return t;const r=e.tags[ye.property_accessibilityGroupTag],i=r?.defaultValue;if(null==i)return t;const o=r?.chain?.[ye.property_accessibilityTag]?.defaultValue;return[{name:i,tags:null!=o?[o]:[]}]}buildGroupTags(e,t){if(!t)return;Array.isArray(t)||(t=[t]);let r=t.map(t=>this.buildGroupTag(e,t)).filter(e=>null!=e);const i={};for(const e of r)e&&(i[e.name]?i[e.name].tags=St.removeDuplicates([...i[e.name].tags,...e.tags]):i[e.name]=e);return r=Object.values(i),r.length>0?r:void 0}normaliseSourceBB(e){if(null==e)return;if(!Array.isArray(e)||0===e.length)return;const t=(e.some(Array.isArray)?e:[e]).filter(e=>Array.isArray(e)&&4===e.length&&e.every(e=>"number"==typeof e));return t.length>0?t:void 0}buildGroupTag(e,t){if(!t)return;const r=Array.isArray(t.tags)?t.tags:[];return{name:t.name??"",tags:r.map(e=>e?.trim()??"")??[]}}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFeedbackChoice(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFeedbackChoice(e,t){if(!t)return;const r={choice:t.choice??"",requireReason:!!t.requireReason,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildFeedbackReason(e,t){if(!t)return;const r=this.handleJsonText(e,rt,"true"),i={text:t.text??"",reasonableNumOfChars:t.reasonableNumOfChars??void 0,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,r),__textAst:t.__textAst};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),i}buildChoices(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildChoice(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildChoice(e,t){if(!t)return;const r={choice:t.choice??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildResponses(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildResponse(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildResponse(e,t){if(!t)return;const r={response:t.response??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildBotResponses(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.botResponse(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}botResponse(e,t){if(!t)return;const r={response:t.response??"",reaction:t.reaction??"",feedback:t.feedback??"",item:t.item??"",lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint)};return _e.removeUnwantedProperties(r,{ignoreEmptyString:["response","reaction","feedback","item"],ignoreAllFalse:!0,ignoreEmptyArrays:[],ignoreUndefined:["example"]}),r}buildFeedbacks(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFeedback(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFeedback(e,t){if(!t)return;let r,i;if(!t.choices)return;r=this.buildFeedbackChoices(e,t.choices),t.reason&&(i=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),choices:r,reason:i};return _e.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildQuiz(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildQuiz(e,t){if(!t)return;const r={...this.toExample(t.__isDefaultExample,t.__defaultExample)};let i,o;if(t.choices)i=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!0,i);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!1,o)}const a={item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isExample:!!t.__defaultExample,choices:i,responses:o};return _e.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),a}buildHeading(e,t){if(!t)return;if(null==t.forKeys)return;const r={forKeys:t.forKeys??"",forValues:t.forValues??t.__forValuesDefault??""};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),r}buildPairs(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildPair(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildPair(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),o=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),a={key:t.key??"",keyAudio:i,keyImage:o,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),values:t.values||[],__valuesAst:t.__valuesAst};return _e.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),a}buildMatricies(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildMatrix(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildMatrix(e,t){if(!t)return;let r=!1;for(const e of t.cells||[])e&&(t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),r=!!e.isExample||r);const i={key:t.key??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isExample:r,cells:(t.cells||[]).map(t=>this.buildMatrixCell(e,t)).filter(e=>null!=e)};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),i}buildMatrixCell(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i={values:t.values||[],item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),__valuesAst:t.__valuesAst};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),i}buildPronunciationTable(e,t){if(!t)return;return{data:(t.data||[]).map(t=>(t||[]).map(t=>{const r=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,rt,t.title),body:this.handleJsonText(e,rt,t.body),audio:r}}))}}buildTable(e,t){if(!t)return;const r=Bt(e.bitType,t),i=r,o=r;if(Array.isArray(i.columns)&&i.columns.length>0&&(i.columns=i.columns.map(t=>this.handleJsonText(e,rt,t))),Array.isArray(i.data)&&i.data.length>0&&(i.data=i.data.map(t=>(t||[]).map(t=>this.handleJsonText(e,rt,t)))),Array.isArray(i.columnWidths)){const e=Array.isArray(i.columns)?i.columns.length:void 0,t=(null!=e?i.columnWidths.slice(0,e):i.columnWidths).map(e=>"number"==typeof e&&e>0?e:null);t.some(e=>null!=e)?i.columnWidths=t:delete i.columnWidths}const a=t=>{if(!t||!Array.isArray(t.rows))return;return{rows:t.rows.map(t=>({cells:(t.cells||[]).map(t=>{const r={content:this.handleJsonText(e,rt,t.content)};return null!=t.title&&(r.title=t.title),null!=t.rowspan&&(r.rowspan=t.rowspan),null!=t.colspan&&(r.colspan=t.colspan),t.scope&&(r.scope=t.scope),null!=t.colwidth&&(r.colwidth=t.colwidth),r})}))}},s=a(o.header);s&&s.rows?.length>0&&(o.header=s);const n=a(o.body);n&&n.rows?.length>0&&(o.body=n);const l=a(o.footer);return l&&l.rows?.length>0&&(o.footer=l),r}buildQuestions(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildQuestion(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildQuestion(e,t){if(!t)return;const r=t.__sampleSolutionAst,i={question:this.handleJsonText(e,it,t.question),partialAnswer:t.partialAnswer??"",sampleSolution:t.sampleSolution??"",additionalSolutions:t.additionalSolutions??void 0,reasonableNumOfChars:t.reasonableNumOfChars??void 0,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,r),__sampleSolutionAst:t.__sampleSolutionAst};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["partialAnswer","sampleSolution"]}),i}buildIngredients(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildIngredient(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildIngredient(e,t){if(!t)return;const r={title:this.handleJsonText(e,rt,t.title),checked:t.checked??!1,ingredient:this.handleJsonText(e,rt,t.ingredient),quantity:t.quantity??0,unit:t.unit??"",unitPlural:t.unitPlural??"",unitAbbr:t.unitAbbr??"",unitAbbrPlural:t.unitAbbrPlural??"",decimalPlaces:t.decimalPlaces??1,disableCalculation:t.disableCalculation??!1,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),r}buildBody(e,t){if(!t)return;let r;const i=[],o=t.placeholders,a=t.bodyString,{textFormat:s}=e,n=()=>{let a,n=t.body;const l={};if(g.isString(t.body)?(a=(t.body??"").trim(),n=[]):Array.isArray(t.body)||(n=[]),o)for(const[e,t]of Object.entries(o))l[e]=t;if(a){a=_t.breakscape(a,{format:s,location:it,v2:!0});let e=0;const t=[];for(const[r,i]of Object.entries(l))if(a){const o=`[!${e}]`;a=a.replace(`${r}`,o),t.push(i),e++}n=this.textParser.toAst(a,{format:s,location:it});const r=e=>{for(let i=0,o=e.length;i<o;i++){const o=e[i];if("bit"===o.type){const r=o.index;null!=t[r]&&(e[i]=t[r])}else o.content&&r(o.content)}};r(n)}n=structuredClone(n),this.textParser.walkBodyBits(n,(t,r,o)=>{let a;switch(o.type){case Ye.gap:a=this.buildGap(e,o);break;case Ye.mark:a=this.buildMark(e,o);break;case Ye.select:a=this.buildSelect(e,o);break;case Ye.highlight:a=this.buildHighlight(e,o)}null!=a&&(t[r]=a,i.push(a))}),r=n,r.__tag="text"},l=s===S.bitmarkText;s===S.json?(()=>{if("string"==typeof t.body)try{r=JSON.parse(t.body)}catch(e){r=null}else r=t.body})():l?n():r=t.body;return{body:r,bodyBits:i,bodyString:a}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,it,t.footer)}}buildGap(e,t){if(!t)return;const r=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const i={type:Ye.gap,solutions:t.solutions||[],item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),__solutionsAst:t.__solutionsAst,attrs:{}};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),i}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildMarkConfig(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildMarkConfig(e,t){if(!t)return;const r={mark:t.mark??"unknown",color:t.color??"",emphasis:t.emphasis??""};return _e.removeUnwantedProperties(r,{ignoreAllEmptyString:!0}),r}buildMark(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:Ye.mark,solution:t.solution??"",mark:t.mark??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0),attrs:{}};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),r}buildSelect(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:Ye.select,options:this.buildSelectOptions(e,t.options)||[],prefix:t.prefix??"",postfix:t.postfix??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(!1,void 0,void 0),__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),r}buildSelectOptions(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildSelectOption(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildSelectOption(e,t){if(!t)return;const r={text:t.text??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildHighlight(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:Ye.highlight,texts:this.buildHighlightTexts(e,t.texts)||[],prefix:t.prefix??"",postfix:t.postfix??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(!1,void 0,void 0),attrs:{}};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),r}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildHighlightText(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildHighlightText(e,t){if(!t)return;const r={text:t.text??"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildFlashcards(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFlashcard(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFlashcard(e,t){if(!t)return;const r={question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(t.alternativeAnswers||[]).map(t=>this.buildTextAndIcon(e,t)).filter(e=>null!=e),item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),r}buildDefinitionList(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildDefinitionListItem(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildDefinitionListItem(e,t){if(!t)return;const{bitType:r}=e,i=Le.isOfBitType(r,[u.metaSearchDefaultTerms]),o={term:this.buildTextAndIcon(e,t.term,i),definition:this.buildTextAndIcon(e,t.definition,i),alternativeDefinitions:(t.alternativeDefinitions||[]).map(t=>this.buildTextAndIcon(e,t,i)).filter(e=>null!=e),item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return _e.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),o}buildTextAndIcon(e,t,r=!1){const i=this.resourceBuilder.resourceFromResourceJson(e,t?.icon);let o=this.handleJsonText(e,rt,t?.text||t);r&&(o=this.textGenerator.generateSync(o,S.plainText,it,{noBreakscaping:!0}).trim());const a={text:o,icon:i};return _e.removeUnwantedProperties(a,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),a}buildStatements(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildStatement(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildStatement(e,t){if(!t)return;const r={statement:this.handleJsonText(e,rt,t.statement),isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["statement"],ignoreUndefined:["example"]}),r}buildImageSource(e,t){if(!t)return;const{url:r,mockupId:i,size:o,format:a,trim:s}=t,n={url:r??"",mockupId:i??"",size:o??null,format:a??null,trim:tr.isBoolean(s)?s:null};return _e.removeUnwantedProperties(n,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),n}buildPerson(e,t){if(!t)return;const{name:r,title:i,avatarImage:o}=t,a={name:r??"",title:i??void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return _e.removeUnwantedProperties(a,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),a}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:r,lang:i}=t,o={technicalTerm:r??"",lang:i??""};return _e.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:r,unit:i,unitPlural:o,unitAbbr:a,unitAbbrPlural:s,decimalPlaces:n,disableCalculation:l,hint:c}=t,p={servings:r??0,unit:i??"",unitPlural:o??"",unitAbbr:a??"",unitAbbrPlural:s??"",decimalPlaces:n??1,disableCalculation:l??!1,hint:c??""};return _e.removeUnwantedProperties(p,{ignoreEmptyString:["servings","unit"]}),p}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:r,label:i}=t,o={level:r??0,label:this.handleJsonText(e,rt,i)};return _e.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildCardBit(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildCardBit(e,t){if(!t)return;const{bitType:r,textFormat:i}=e,o=this.buildBit({...t,bitType:r,textFormat:i},{cardSet:{sideNo:0,variantNo:0}});return _e.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),lr.validateCardBit(o)}toImageResource(e,t){return St.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,y.image,t?.image))}toImageResources(e,t){const r=St.asArray(t),i=[];if(r&&r.length>0)for(const t of r){const r=this.resourceBuilder.resourceFromResourceDataJson(e,y.image,t.image);i.push(r)}return i}toVideoResources(e,t){const r=St.asArray(t),i=[];if(r&&r.length>0)for(const t of r){const r=this.resourceBuilder.resourceFromResourceDataJson(e,y.video,t.video);i.push(r)}return i}buildCardNode(e,t){const r={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:this.handleJsonText(e,it,t.elements),flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,t.definitions??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 _e.removeUnwantedProperties(r,{ignoreEmptyObjects:["table"]}),Object.keys(r).length>0?r:void 0}bodyBitCopyFromAttrs(e){const t={...e};if(e.attrs)for(const[r,i]of Object.entries(e.attrs))t[r]=i;return t}pushExampleDownTree(e,t,r,i,o){if(i||null!=o){if(r){if(this.pushExampleDownTreeString(e,i,o,r.pairs),this.pushExampleDownTreeBoolean(e,i,o,!1,r.flashcards),this.pushExampleDownTreeBoolean(e,i,o,!1,r.definitions),this.pushExampleDownTreeBoolean(e,i,o,!0,r.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,r.responses,r.statements,r.statement),r.quizzes)for(const t of r.quizzes)this.pushExampleDownTreeBoolean(e,i,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,t.responses);if(r.matrix)for(const t of r.matrix)this.pushExampleDownTreeString(e,i,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,i,o,t)}}pushExampleDownTreeBoolean(e,t,r,i,...o){if((t||null!=r)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];ar.fillBooleanExample(o,t,r,i)}}pushExampleDownTreeString(e,t,r,...i){if((t||r)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];ar.fillStringExample(e.textFormat,i,t,r,!1)}}pushExampleDownTreeBodyBits(e,t,r,i){if(!t&&!r)return;const o=this.textParser.extractBodyBits(i?.body);for(const i of o)if(i)switch(i.type){case Ye.gap:{const o=i;ar.fillStringExample(e.textFormat,[o],t,r,!1);break}case Ye.mark:{const e=i;ar.fillBooleanExample([e],t,r,!1);break}case Ye.select:{const e=i;ar.fillBooleanExample(e.options,t,r,!0);break}case Ye.highlight:{const e=i;ar.fillBooleanExample(e.texts,t,r,!0);break}}}pushDownTree(e,t,r,i,o,a,s){if(void 0!==s){if(i&&o){Array.isArray(o)||(o=[o]);const e=_e.flatMapPath(i,o);for(const t of e)null==t[a]&&(t[a]=s)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&r){const e=this.textParser.extractBodyBits(t.body);if(r&&e&&e.length>0)for(const t of e)if(t&&-1!==r.indexOf(t.type)){const e=t;null==e[a]&&(e[a]=s)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const r={};for(const[e,i]of t)r[e]=St.asArray(i)||[i];return r}setIsExampleFlags(e){const t=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:r,cardNode:i}=e,o=this.textParser.extractBodyBits(r?.body);for(const e of o)switch(e.type){case Ye.gap:case Ye.mark:t(e);break;case Ye.select:{const r=e;let i=!1;for(const e of r.options)i=!!t(e)||i;r.isExample=i;break}case Ye.highlight:{const r=e;let i=!1;for(const e of r.texts)i=!!t(e)||i;r.isExample=i;break}}if(i){for(const e of i.flashcards||[])t(e);for(const e of i.definitions||[])t(e);for(const e of i.pairs||[])t(e);for(const e of i.matrix||[]){let r=!1;for(const i of e.cells||[])r=!!t(i)||r;e.isExample=r}for(const e of i.quizzes||[]){let r=!1;for(const i of e.responses||[])r=!!t(i)||r;for(const i of e.choices||[])r=!!t(i)||r;e.isExample=r}for(const e of i.responses||[])t(e);for(const e of i.choices||[])t(e);for(const e of i.statements||[])t(e);t(i.statement);for(const e of i.questions||[])t(e)}t(e.statement);for(const r of e.responses||[])t(r);for(const r of e.choices||[])t(r);t(e)}setDefaultBitValues(e){const{bitType:t}=e;switch(t){case u.articleAi:case u.noteAi:case u.summaryAi:e.aiGenerated=this.toAstProperty(t,ye.property_aiGenerated,!0,void 0)}}addVersionToParserInfo(e){const t=e.parser??{};t.version=je.appVersion.full,e.parser=t}},ur=class{constructor(){l(this,"_buffer"),l(this,"_string",""),l(this,"endOfLineString","\n"),l(this,"lastWrite","")}get isSync(){return!0}getString(){return this._string}async open(){return this.openSync(),Promise.resolve()}async close(){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){if(!this._buffer)return this;let t;return t=null!=e?e+this.endOfLineString:this.endOfLineString,this._buffer.push(t),this.lastWrite=t,this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let r="";for(let i=0,o=e.length;i<o;i++){const a=e[i];this._buffer.push(a),r+=a,t&&i<o-1&&(this._buffer.push(t),r+=t),this._buffer.push(this.endOfLineString),r+=this.endOfLineString}return this.lastWrite=r,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}},dr=r(722),mr=r(722),hr=(r(722),{v1:1,v2:2}),br={debugGenerationInline:!1},gr=class extends Lt{constructor(e,t){super(),l(this,"ast",new et),l(this,"textGenerator"),l(this,"bitmarkVersion"),l(this,"options"),l(this,"mainWriter"),l(this,"partWriter"),l(this,"writer"),l(this,"prettifySpace"),l(this,"spacesAroundValues"),l(this,"spacesAroundValuesStr"),l(this,"bitType",u._error),l(this,"textFormat",S.bitmarkText),l(this,"isBodyBitmarkText",!1),l(this,"isCardAllowed",!1),l(this,"firstBit",!0),l(this,"hasCardSet",!1),l(this,"hasFooter",!1),l(this,"inTag",!0),l(this,"skipTableTraversal",!1),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=(0,mr.Enum)(It).fromValue(t?.bitmarkVersion)??Et,this.options={...br,...t?.bitmarkOptions},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.bitmarkVersion===It.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=hr.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=hr.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 Mt(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new ur,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}async generate(e){this.resetState(),await this.writer.open(),this.walkAndWrite(e),this.writeLine(),await this.writer.close()}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=u._error,this.textFormat=S.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,Xe.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){const r=e.value,i=Le.getBitConfig(r.bitType),o=Le.getBitResourcesConfig(r.bitType,r.resourceType);if(this.bitType=r.bitType,this.textFormat=r.textFormat??i.textFormatDefault,this.isBodyBitmarkText=this.textFormat===S.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,i.textFormatDefault)&&(this.writeColon(),this.writeTagKey(r.textFormat))}let a;if(i.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=o.comboResourceConfigKeysMap;if(o.comboResourceConfigKeysMap.size>0)for(const t of e.keys())a=xe(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 r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;for(let e=0;e<r.length;e++){const i=r[e];this.writeNL(),this.writeProperty("internalComment",i,t,{format:v,array:!0})}return!1}enter_groupTag(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;for(const e of r){const{name:r,tags:i}=e;if(this.writeProperty("groupTag",r,t,{format:v,writeEmpty:!0}),i&&i.length>0)for(const e of i)this.writeProperty("tag",e,t,{format:v,writeEmpty:!0,forceChain:!0})}return!1}enter_accessibilityGroupTag(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;for(const e of r){const{name:r,tags:i}=e;if(this.writeProperty("accessibilityGroupTag",r,t,{format:v,writeEmpty:!0}),i&&i.length>0)for(const e of i)this.writeProperty("accessibilityTag",e,t,{format:v,writeEmpty:!0,forceChain:!0})}return!1}leaf_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const o=i?.value;if(o){const e=""!=r,i=o.labelFalse&&""!=o.labelFalse;(e||i)&&this.writeNL(),e&&this.writeProperty("labelTrue",r,t,{format:v,forceChain:!0}),i&&this.writeProperty("labelFalse",o.labelFalse,t,{format:v,forceChain:!0})}return!1}leaf_labelFalse(e,t){return!0}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{url:o,mockupId:a,size:s,format:n,trim:l}=r;return this.writeProperty("imageSource",o,t,{format:v}),o&&(a&&this.writeProperty("mockupId",a,t,{format:v,forceChain:!0}),s&&this.writeProperty("size",s,t,{format:v,forceChain:!0}),n&&this.writeProperty("format",n,t,{format:v,forceChain:!0}),tr.isBoolean(l)&&this.writeProperty("trim",l,t,{format:v,forceChain:!0})),!1}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{technicalTerm:o,lang:a}=r;return this.writeProperty("technicalTerm",o,t,{format:v}),null!=a&&this.writeProperty("lang",a,t,{format:v,forceChain:!0}),!1}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{servings:o,unit:a,unitPlural:s,unitAbbr:n,unitAbbrPlural:l,decimalPlaces:c,disableCalculation:p,hint:u}=r;return this.writeProperty("servings",o,t,{format:v}),null!=a&&this.writeProperty("unit",a,t,{format:v,forceChain:!0}),null!=s&&this.writeProperty("unitPlural",s,t,{format:v,forceChain:!0}),null!=n&&this.writeProperty("unitAbbr",n,t,{format:v,forceChain:!0}),null!=l&&this.writeProperty("unitAbbrPlural",l,t,{format:v,forceChain:!0}),null!=c&&this.writeProperty("decimalPlaces",c,t,{format:v,forceChain:!0}),null!=p&&this.writeProperty("disableCalculation",p,t,{format:v,forceChain:!0}),null!=u&&(this.writeOPQ(),this.writeTextOrValue(u,S.plainText,rt),this.writeCL()),!1}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{name:o,title:a,avatarImage:s}=r;return this.writeProperty("person",o,t,{format:v}),a&&this.writeProperty("title",a,t,{format:v,forceChain:!0}),s&&this.writeResource(y.image,s.image.src),!1}enter_text(e,t){const r=this.getParentNode(t);return!r||r.key!==Xe.term&&r.key!==Xe.definition&&r.key!==Xe.alternativeDefinitionsValue&&r.key!==Xe.question&&r.key!==Xe.answer&&r.key!==Xe.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}leaf_text(e,t){const r=this.getParentNode(t);return!r||r.key!==Xe.term&&r.key!==Xe.definition&&r.key!==Xe.alternativeDefinitionsValue&&r.key!==Xe.question&&r.key!==Xe.answer&&r.key!==Xe.alternativeAnswersValue&&r.key!==Xe.reason||(g.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}enter_icon(e,t){const r=e.value,i=this.getParentNode(t);return!i||(i.key!==Xe.term&&i.key!==Xe.definition&&i.key!==Xe.alternativeDefinitionsValue&&i.key!==Xe.question&&i.key!==Xe.answer&&i.key!==Xe.alternativeAnswersValue||this.writeResource(y.icon,r.image.src),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,t,{format:v}),!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 r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{level:o,label:a}=r,s=e.key===Xe.ratingLevelStart?"ratingLevelStart":"ratingLevelEnd";return this.writeProperty(s,o,t,{format:v}),a&&this.writeProperty("label",a,t,{format:T,forceChain:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.markConfig)return!0;const{mark:o,color:a,emphasis:s}=r;return o&&(this.writeNL(),this.writeProperty("mark",o,t,{format:v}),a&&this.writeProperty("color",a,t,{format:v,forceChain:!0}),s&&this.writeProperty("emphasis",s,t,{format:v,forceChain:!0})),!1}enter_partialAnswer(e,t){return e.value&&this.writeProperty("partialAnswer",e.value,t,{format:v}),!1}leaf_partialAnswer(e,t){return e.value&&this.writeProperty("partialAnswer",e.value,t,{format:v}),!1}enter_sampleSolution(e,t){return e.value&&this.writeProperty("sampleSolution",e.value,t,{format:v}),!1}leaf_sampleSolution(e,t){return e.value&&this.writeProperty("sampleSolution",e.value,t,{format:v}),!1}leaf_reasonableNumOfChars(e,t){this.writeProperty("reasonableNumOfChars",e.value,t,{format:v})}enter_sourceBB(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!1;const i=e.value;return!(!Array.isArray(i)||0===i.length)&&(this.writeProperty("sourceBB",i.map(e=>e.join(", ")),t,{format:v,array:!0}),!1)}leaf_additionalSolutionsValue(e,t){const r=this.getParentNode(t,2);r?.key===Xe.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,t,{format:v,array:!0,writeEmpty:!0}))}enter_item(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.lead)||(!this.isEmptyText(i?.value?.pageNumber)||(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL(),!0))))}enter_lead(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.pageNumber)||(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL(),!0)))}enter_pageNumber(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.lead??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r??"",S.bitmarkText,rt),this.writeCL(),!0))}enter_marginNumber(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.lead??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.pageNumber??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL(),!0)}enter_body(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue&&r?.key!==Xe.cardBitsValue)return!0;this.inTag=!1;const i=e.value;if(this.textFormat===S.json){const e=i.body??null;if(Array.isArray(e)||_e.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,S.plainText,it))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(i.body)?i.body:[];this.writeTextOrValue(t,this.textFormat,it,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=g.isString(i.body)?i.body:"";this.writeTextOrValue(`${e}`,S.plainText,it)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,r){const i=(0,mr.Enum)(Xe).fromValue(e.type)??Xe.bodyBit;return this.ast.walk(e,i,this,void 0),""}enter_gap(e,t){const r=e.value;if(r.solutions&&0===r.solutions.length)this.writeOPU(),this.writeCL();else for(const e of r.solutions)this.writeOPU(),this.writeTextOrValue(e,S.plainText,rt),this.writeCL();return!0}enter_mark(e,t){const r=e.value;return this.writeOPE(),this.writeTextOrValue(r.solution,S.plainText,rt),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value;return this.textFormat===S.json||i.footer&&i.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",S.plainText,it),this.writeNL(),this.writeTextOrValue(i.footer,this.textFormat,it,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value;return i&&0===i.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return;const i=e.value,o=this.getParentNode(t,2)?.value;o?.type===Ye.mark&&i&&(this.writeOPE(),this.writeTextOrValue(i,S.plainText,rt),this.writeCL())}leaf_mark(e,t){const r=t[0];if(r?.key!==Xe.mark)return;const i=e.value;i&&this.writeProperty("mark",i,t,{format:v})}enter_optionsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,S.plainText,rt),this.writeCL(),!0}enter_textsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,S.plainText,rt),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,hr.v1)}enter_elements(e,t){}between_elements(e,t,r,i){this.writeCardSetSideDivider()}between_flashcards(e,t,r,i){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,r,i){this.isCardAllowed&&(r.key===Xe.answer?this.writeCardSetSideDivider():r.key===Xe.alternativeAnswers&&0!==r.value?.length&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(u.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.statement,S.plainText,rt),this.writeCL(),!0}enter_choicesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect||r.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.choice,S.plainText,rt),this.writeCL(),!0}enter_responsesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.response,S.plainText,rt),this.writeCL(),!0}between_feedbacks(e,t,r,i){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const r=e.value;return this.writeNL(),this.writeResource(y.audio,r.audio.src),!1}enter_keyImage(e,t){const r=e.value;return this.writeNL(),this.writeResource(y.image,r.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,r,i){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}enter_table(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.cardNode)return!0;const i=e.value;return!i||!this.writeAdvancedTable(i)}between_table(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}writeAdvancedTable(e){const t=Bt(u.tableExtended,e),r=[{key:"header",qualifier:"table-header",section:t.header},{key:"body",qualifier:void 0,section:t.body},{key:"footer",qualifier:"table-footer",section:t.footer}];let i=0;for(const{key:e,qualifier:t,section:o}of r){const r=o?.rows??[];if(0!==r.length)for(const o of r)this.writeCardSetCardDivider(t),this.writeTableRow(o,e),i++}return i>0}writeTableRow(e,t){const r=e?.cells??[];if(0!==r.length)for(let e=0;e<r.length;e++)e>0&&this.writeCardSetSideDivider(),this.writeNL(),this.writeTableCell(r[e],t)}writeTableCell(e,t){const r="body"===t?"td":"th",i=e.title?"th":"td";i!==r&&(this.writeTableCellProperty("tableCellType",i),this.writeNL()),e.rowspan&&e.rowspan>1&&(this.writeTableCellProperty("tableRowSpan",e.rowspan),this.writeNL()),e.colspan&&e.colspan>1&&(this.writeTableCellProperty("tableColSpan",e.colspan),this.writeNL()),e.scope&&(this.writeTableCellProperty("tableScope",e.scope),this.writeNL()),e.colwidth&&e.colwidth>0&&(this.writeTableCellProperty("tableColWidth",e.colwidth),this.writeNL());const o=e.content??_t.EMPTY_STRING,a=this.options.noBreakscaping?{noBreakscaping:!0}:void 0;this.writeTextOrValue(o,this.textFormat,it,a)}writeTableCellProperty(e,t){this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,S.plainText,rt),this.writeCL()}between_data(e,t,r,i){const o=this.getParentNode(i);o?.key!==Xe.table&&o?.key!==Xe.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,r,i){const o=this.getParentNode(i),a=o?.key;a!==Xe.table&&a!==Xe.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.bitmarkText,rt),this.writeCL()}between_dataValue(e,t,r,i){const o=this.getParentNode(i,2);o?.key!==Xe.table&&o?.key!==Xe.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const r=this.getParentNode(t,3);r?.key===Xe.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}enter_dataValueValue(e,t){const r=this.getParentNode(t,3);if((r?.key===Xe.table||r?.key===Xe.pronunciationTable)&&e.value){if(r?.key===Xe.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,S.bitmarkText,rt),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(y.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,it)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)}}between_captionDefinitionList(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const r=this.getParentNode(t);return r?.key!==Xe.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}leaf_definition(e,t){const r=this.getParentNode(t);return r?.key!==Xe.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}between_definitions(e,t,r,i){const o=this.getParentNode(i);o?.key!==Xe.cardNode&&o?.key!==Xe.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.definitions&&this.isCardAllowed&&(r.key===Xe.definition?this.writeCardSetSideDivider():r.key===Xe.alternativeDefinitions&&r.value?.length>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const r=e.value;return null!=r.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(r.title,S.bitmarkText,rt),this.writeCL()),null!=r.ingredient&&(this.writeNL(),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeTextOrValue(`${r.quantity}`,S.plainText,rt),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,t,{format:v}),null!=r.unitPlural&&this.writeProperty("unitPlural",r.unitPlural,t,{format:v}),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,t,{format:v}),null!=r.unitAbbrPlural&&this.writeProperty("unitAbbrPlural",r.unitAbbrPlural,t,{format:v}),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,t,{format:v}),r.disableCalculation&&this.writeProperty("disableCalculation",!0,t,{format:v}),this.writeNL(),this.writeTextOrValue(r.ingredient,this.textFormat,it)),!0}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeCardSetCardDivider()}leaf_item(e,t){const r=this.getParentNode(t);r?.key===Xe.botResponsesValue&&(this.writeNL(),this.writeOPC(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_response(e,t){const r=this.getParentNode(t);r?.key===Xe.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_reaction(e,t){const r=this.getParentNode(t);r?.key===Xe.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,t,{format:v}))}leaf_feedback(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.botResponsesValue)return;const i=e.value;i&&(this.writeNL(),this.writeTextOrValue(i,this.textFormat,it))}enter_backgroundWallpaper(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_imagePlaceholder(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_previewImageValue(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource("previewImage",r),!0}enter_previewVideoValue(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource("previewVideo",r),!0}enter_platformIcon(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_platformLogo(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_platformBackgroundImage(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_coverImage(e,t){const r=e.value;if(r&&"object"==typeof r&&!Array.isArray(r)&&"type"in r){const t=r;return this.writeNL(),this.writePropertyStyleResource(e.key,t),!0}if(Array.isArray(r)){if(null==r)return!0;const e=this.getParentNode(t);if(e?.key!==Xe.bitsValue)return!0;const i=this.getBitType(t);if(!i)return!0;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_coverImage);if(!a)return!0;this.writeNL_IfNotChain(t),this.writeProperty(a.tag,r,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue})}return!0}leaf_coverImage(e,t){if(null==e.value)return;const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return;const i=this.getBitType(t);if(!i)return;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_coverImage);a&&(this.writeNL_IfNotChain(t),this.writeProperty(a.tag,e.value,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue}))}enter_backgroundImage(e,t){const r=e.value;if(r&&"object"==typeof r&&!Array.isArray(r)&&"type"in r){const t=r;return this.writeNL(),this.writePropertyStyleResource(e.key,t),!0}if(Array.isArray(r)){if(null==r)return!0;const e=this.getParentNode(t);if(e?.key!==Xe.bitsValue)return!0;const i=this.getBitType(t);if(!i)return!0;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_backgroundImage);if(!a)return!0;this.writeNL_IfNotChain(t),this.writeProperty(a.tag,r,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue})}return!0}leaf_backgroundImage(e,t){if(null==e.value)return;const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return;const i=this.getBitType(t);if(!i)return;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_backgroundImage);a&&(this.writeNL_IfNotChain(t),this.writeProperty(a.tag,e.value,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue}))}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const r=this.getParentNode(t);if(r?.key===Xe.bitsValue){const r=e.value;r&&this.writeProperty("posterImage",r,t,{format:v})}else{const r=e.value;r&&r.src&&this.writeProperty("posterImage",r.src,t,{format:v})}return!0}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let i=0;i<r.length&&i!==e.length;i++){const o=r[i],a=e[i];this.writeProperty(a,o.src,t,{format:v})}}return!1}leaf_level(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;if(!Le.isOfBitType(this.bitType,[u.chapter]))return!0;const i=e.value,o=r?.value;if(i>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+i;e++)this.writeHash();this.writeCL()}return!1}leaf_titleString(e,t){const r=this.getParentNode(t);return r?.key!==Xe.bitsValue||(e.value&&(this.writeNL(),this.writeProperty("title",e.value,t,{format:v})),!1)}enter_title(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value,o=r?.value,a=o.level||1;if(a&&i){this.writeNL(),this.writeOP();for(let e=0;e<+a;e++)this.writeHash();this.writeTextOrValue(i,S.bitmarkText,rt),this.writeCL()}return!1}enter_subtitle(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value;if(i){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(i,S.bitmarkText,rt),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const r=e.value;return r&&(this.writeNL(),this.writeProperty("book",r.book,t,{format:v,writeEmpty:!0}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,S.plainText,rt),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,S.plainText,rt),this.writeCL()))),!1}leaf_book(e,t){const r=this.getParentNode(t),i=r?.value;i&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,t,{format:v,writeEmpty:!0}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,S.plainText,rt),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,S.plainText,rt),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=r?.value;i&&e.value&&(i.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()))}enter_hint(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL()),!1}enter_instruction(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL()),!1}leaf_lang(e,t){e.value&&this.writeProperty("lang",e.value,t,{format:C})}enter_refAuthor(e,t){e.value&&this.writeProperty("refAuthor",e.value,t,{format:v,array:!0})}leaf_refBookTitle(e,t){e.value&&this.writeProperty("refBookTitle",e.value,t,{format:v,array:!0})}enter_refPublisher(e,t){e.value&&this.writeProperty("refPublisher",e.value,t,{format:v,array:!0})}leaf_refPublicationYear(e,t){e.value&&this.writeProperty("refPublicationYear",e.value,t,{format:v})}leaf_citationStyle(e,t){e.value&&this.writeProperty("citationStyle",e.value,t,{format:v})}leaf_isExample(e,t){if(!e.value)return;const r=this.getParentNode(t),i=r?.value.example??null;null!=i&&""!==i&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===i?this.writeString(" true "):!1===i?this.writeString(" false "):Array.isArray(i)?this.writeTextOrValue(i,S.bitmarkText,rt):this.writeTextOrValue(i,S.plainText,rt),this.writeCL())}enter_elementsValue(e,t){return e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1}leaf_solutionsValue(e,t){const r=this.getParentNode(t,2);r?.key===Xe.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,t,{format:C,writeEmpty:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}enter_question(e,t){const r=this.getParentNode(t);return r?.key!==Xe.questionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}leaf_question(e,t){const r=this.getParentNode(t);r?.key===Xe.flashcardsValue&&e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}leaf_srcAltValue(e,t){this.writeProperty("srcAlt",e.value,t,{format:v})}leaf_src1x(e,t){this.writeProperty("src1x",e.value,t,{format:v})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,t,{format:v})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,t,{format:v})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,t,{format:v})}leaf_width(e,t){this.writeProperty("width",e.value,t,{format:v})}leaf_height(e,t){this.writeProperty("height",e.value,t,{format:v})}leaf_alt(e,t){this.writeProperty("alt",e.value,t,{format:v})}leaf_zoomDisabled(e,t){Le.isOfBitType(this.bitType,[u.imageSeparator,u.pageBanner,u.imagesLogoGrave,u.prototypeImages,u.extractorImage])?this.writeProperty("zoomDisabled",e.value,t,{format:C,writeEmpty:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,t,{format:C,writeEmpty:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,t,{format:v})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,t,{format:v})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,t,{format:C,ignoreFalse:!0}))}enter_caption(e,t){const r=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",r,t,{format:T}),!1}leaf_search(e,t){const r=e.value;r&&(this.writeNL_IfNotChain(t),this.writeProperty("search",r,t,{format:v}))}leaf_selected(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("selected",e.value,t,{format:C,ignoreFalse:!0}))}leaf_duration(e,t){const r=this.getParentNode(t);r?.key===Xe.bitsValue&&this.writeNL(),this.writeProperty("duration",e.value,t,{format:v})}leaf_mute(e,t){this.writeProperty("mute",e.value,t,{format:C})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,t,{format:C})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,t,{format:C})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,t,{format:C})}generateResourceHandlers(){for(const e of(0,mr.Enum)(y).keys()){if(e===(0,mr.Enum)(y).keyFromValue(y.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const r=e.value;if(null==r)return!1;const i=this.getParentNode(t);if(i?.key!==Xe.resourcesValue)return!0;const o=(0,mr.Enum)(y).fromValue(i?.value.__typeAlias)??(0,mr.Enum)(y).fromValue(i?.value.type);if(!o)return!1;const a=r.url||r.src||r.body||"";return this.writeNL(),this.writeResource(o,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){for(const e of(0,mr.Enum)(ge).values()){const t=ke(e),r=[`enter_${t}`,`leaf_${t}`];for(const i of r)"function"!=typeof this[i]&&"example"!==t&&(this[i]=(t,r)=>{if(null==t.value)return;const i=this.getParentNode(r);if(i?.key!==Xe.bitsValue)return;const o=this.getBitType(r);if(!o)return;const a=Le.getBitConfig(o),s=Le.getTagConfigForTag(a.tags,e);s&&this.writeProperty(s.tag,t.value,r,{format:s.format??v,array:s.array??!1,writeEmpty:!0,ignoreFalse:"false"===s.defaultValue,ignoreTrue:"true"===s.defaultValue})},this[i]=this[i].bind(this))}}getBitType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.bitType}}isChain(e){const t=this.getParentNode(e);return t?.key!==Xe.bitsValue&&(t?.key!==Xe.cardBitsValue&&(t?.key!==Xe.feedbacksValue&&(t?.key!==Xe.quizzesValue&&(t?.key!==Xe.pairsValue&&(t?.key!==Xe.matrixValue&&(t?.key!==Xe.definitionsValue&&(t?.key!==Xe.questionsValue&&t?.key!==Xe.reason)))))))}haveValidCardSet(e){const t=Le.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==S.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(_t.breakscape(`${e}`,{format:S.plainText,location:rt}))}writeTextOrValue(e,t,r,i){const o=r===rt,a="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,n=o?this.spacesAroundValuesStr:"",l=t===S.bitmarkText?t:S.plainText,c=e=>o?`${n}${e}${n}`:e,p=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const r=this.partWriter.getString().trim();return this.writer=t,r};if(null!=a){const e=()=>this.write(_t.breakscape(a,{format:l,location:r}));if(o){const t=p(e);t&&this.write(c(t))}else e();return}if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,r,i);if(o){const t=p(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===hr.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===hr.v1&&this.write("===")}writeCardSetCardDivider(e){this.writeNL();const t=this.getCardDividerMarker();this.write(t),e&&this.appendCardDividerQualifier(e)}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===hr.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===hr.v1?this.write("--"):this.write("++")}getCardDividerMarker(){return this.options.cardSetVersion===hr.v1?"===":"===="}appendCardDividerQualifier(e){const t=this.getCardDividerMarker(),r=_t.breakscape(e,{format:S.plainText,location:rt});this.write(" "),this.write(r),this.write(" "),this.write(t)}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,r=!1){if(e&&t){const i=t[(0,mr.Enum)(y).keyFromValue(t.type)??""],o=i&&(i.src||i.url||i.body)||"";r?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(o,S.plainText,rt),t.type,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,S.plainText,rt),this.writeCL())}writeProperty(e,t,r,i){let o;if(void 0!==t){const a=i.format===T;if(a){if(!i.writeEmpty&&a&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,S.bitmarkText,rt),this.writeCL()}else if(o=Array.isArray(t)?t:[t],o.length>0){i.array||(o=o.slice(o.length-1));let t=0;for(const a of o)if(void 0!==a){if(i.ignoreFalse&&!1===a)continue;if(i.ignoreTrue&&!0===a)continue;if(!i.writeEmpty&&""===a)continue;i.forceChain||0!==t||this.writeNL_IfNotChain(r),this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${a}`,S.plainText,rt),this.writeCL(),t++}}}}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!((0,mr.Enum)(S).fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()&&!this.isTableBitType()}isTableBitType(){return this.isOfBitType([u.table])}isOfBitType1(){return this.isOfBitType([u.trueFalse1,u.multipleChoice1,u.multipleResponse1])}isOfBitType(e){return Le.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}},yr=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new ur,this.generator=new gr(this.writer,e)}async generate(e){return await this.generator.generate(e),this.writer.getString()}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}},fr={bold:"b",italic:"i",superscript:"sup",subscript:"sub",strike:"s",del:"del",ins:"ins",underline:"u",highlight:"mark",code:"code"},kr=/==([^=]*(?:=(?!=)[^=]*)*)==\|imageInline:([^|\s]+)((?:\|(?:@?[A-Za-z][A-Za-z0-9_-]*:[^|\s]+|#[^|\s]*))*)\|?/g,xr=class{constructor(){l(this,"indentUnit"," ")}generate(e){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{return""}const r=this.collectBits(t),i=[];for(const e of r){const t=this.renderTableBit(e);t&&i.push(t)}return i.join("\n\n")}collectBits(e){const t=[],r=e=>{if(null==e||"object"!=typeof e)return;if(Array.isArray(e))return void e.forEach(r);const i=e;"bit"in i&&i.bit&&"object"==typeof i.bit?t.push(i.bit):"type"in i&&t.push(i)};return r(e),t}renderTableBit(e){const t=e.table;if(!t)return"";if("table"!==e.type&&"table-extended"!==e.type)return"";const r=this.toExtended(t),i=[];if(i.push("<table>"),null!=e.caption){const t=this.cellContentToHtml(this.asTextAst(e.caption));t&&i.push(`${this.indentUnit}<caption>${t}</caption>`)}return this.renderSection(i,"thead",r.header,"header"),this.renderSection(i,"tbody",r.body,"body"),this.renderSection(i,"tfoot",r.footer,"footer"),i.push("</table>"),i.join("\n")}toExtended(e){const t=e;return t.header||t.body||t.footer?e:wt(e)}renderSection(e,t,r,i){if(r&&r.rows&&0!==r.rows.length){e.push(`${this.indentUnit}<${t}>`);for(const t of r.rows){e.push(`${this.indentUnit.repeat(2)}<tr>`);for(const r of t.cells??[])e.push(`${this.indentUnit.repeat(3)}${this.renderCell(r,i)}`);e.push(`${this.indentUnit.repeat(2)}</tr>`)}e.push(`${this.indentUnit}</${t}>`)}}renderCell(e,t){const r=!0===e.title?"th":"td",i=[];e.rowspan&&e.rowspan>1&&i.push(`rowspan="${e.rowspan}"`),e.colspan&&e.colspan>1&&i.push(`colspan="${e.colspan}"`),e.scope&&i.push(`scope="${e.scope}"`),e.colwidth&&e.colwidth>0&&i.push(`width="${e.colwidth}"`);return`${i.length>0?`<${r} ${i.join(" ")}>`:`<${r}>`}${this.cellContentToHtml(this.asTextAst(e.content))}</${r}>`}asTextAst(e){return null==e?[]:"string"==typeof e?[{type:"text",text:e}]:e}cellContentToHtml(e){return 0===e.length?"":1===e.length&&"paragraph"===e[0].type?this.inlineToHtml(e[0].content??[]):e.map(e=>this.blockToHtml(e)).join("")}blockToHtml(e){switch(e.type){case"paragraph":return`<p>${this.inlineToHtml(e.content??[])}</p>`;case"bulletList":case"noBulletList":case"orderedList":case"orderedListRoman":case"orderedListRomanLower":case"letteredList":case"letteredListLower":case"taskList":return this.listToHtml(e);case"image":case"imageInline":return this.imageToHtml(e);case"latex":return this.latexToHtml(e);default:return this.inlineToHtml([e])}}inlineToHtml(e){return e.map(e=>this.inlineNodeToHtml(e)).join("")}inlineNodeToHtml(e){return"hardBreak"===e.type?"<br>":"image"===e.type||"imageInline"===e.type?this.imageToHtml(e):"latex"===e.type?this.latexToHtml(e):"text"===e.type?this.wrapMarks(this.textToHtml(e.text??""),e.marks):e.content?this.inlineToHtml(e.content):this.escapeText(e.text??"")}wrapMarks(e,t){if(!t||0===t.length)return e;let r="",i="";for(const e of t)if("link"===e.type){const t=e.attrs?.href??"";r+=`<a href="${this.escapeAttr(t)}">`,i=`</a>${i}`}else{const t=fr[e.type];t&&(r+=`<${t}>`,i=`</${t}>${i}`)}return`${r}${e}${i}`}listToHtml(e){const{tag:t,attrs:r}=this.listTag(e);return`<${t}${r}>${(e.content??[]).map(t=>this.listItemToHtml(t,"taskList"===e.type)).join("")}</${t}>`}listTag(e){const t=e.attrs?.start,r="number"==typeof t&&1!==t?` start="${t}"`:"";switch(e.type){case"orderedList":return{tag:"ol",attrs:r};case"orderedListRoman":return{tag:"ol",attrs:` type="I"${r}`};case"orderedListRomanLower":return{tag:"ol",attrs:` type="i"${r}`};case"letteredList":return{tag:"ol",attrs:` type="A"${r}`};case"letteredListLower":return{tag:"ol",attrs:` type="a"${r}`};case"noBulletList":return{tag:"ul",attrs:' style="list-style:none"'};default:return{tag:"ul",attrs:""}}}listItemToHtml(e,t){const r=(e.content??[]).map(e=>"paragraph"===e.type?this.inlineToHtml(e.content??[]):this.blockToHtml(e)).join("");if(t){return`<li><input type="checkbox"${e.attrs?.checked?" checked":""}>${r}</li>`}return`<li>${r}</li>`}imageToHtml(e){const t=e.attrs??{},r=[],i=t.src;return r.push(`src="${this.escapeAttr("string"==typeof i?i:"")}"`),"string"==typeof t.alt&&r.push(`alt="${this.escapeAttr(t.alt)}"`),"string"==typeof t.title&&r.push(`title="${this.escapeAttr(t.title)}"`),null!=t.width&&r.push(`width="${t.width}"`),null!=t.height&&r.push(`height="${t.height}"`),"string"==typeof t.class&&t.class&&r.push(`class="${this.escapeAttr(t.class)}"`),`<img ${r.join(" ")}>`}textToHtml(e){let t="",r=0;for(const i of e.matchAll(kr)){const o=i.index??0;t+=this.escapeText(e.slice(r,o)),t+=this.inlineImageTokenToHtml(i),r=o+i[0].length}return t+=this.escapeText(e.slice(r)),t}inlineImageTokenToHtml(e){const t={alt:e[1],src:e[2]},r=e[3]??"";for(const e of r.split("|")){if(!e||e.startsWith("#"))continue;const r=e.indexOf(":");if(r<1)continue;const i=e.slice(0,r).replace(/^@/,""),o=e.slice(r+1);if("width"===i||"height"===i){const e=Number.parseInt(o,10);!Number.isNaN(e)&&e>0&&e<=9999&&(t[i]=e)}else"class"!==i&&"title"!==i||(t[i]=o)}return this.imageToHtml({type:"imageInline",attrs:t})}latexToHtml(e){const t=e.attrs?.formula??"";return`<math alttext="${this.escapeAttr(t)}"></math>`}escapeText(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}escapeAttr(e){return this.escapeText(e).replace(/"/g,""")}},vr=r(722),Tr={},_r=class extends Lt{constructor(e,t){super(),l(this,"ast",new et),l(this,"textGenerator"),l(this,"bitmarkVersion"),l(this,"textParserVersion"),l(this,"textParser",new er),l(this,"options"),l(this,"jsonPrettifySpace"),l(this,"writer"),l(this,"json",[]),l(this,"bitWrapperJson",{}),l(this,"bitJson",{}),l(this,"textDefault",_t.EMPTY_STRING),l(this,"bodyDefault",_t.EMPTY_STRING),l(this,"bodyJson",this.bodyDefault),l(this,"listItem"),l(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=(0,vr.Enum)(It).fromValue(t?.bitmarkVersion)??Et,this.textParserVersion=this.textParser.version(),this.options={...Tr,...t?.jsonOptions},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===It.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new Mt(It.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}async generate(e){this.resetState(),await this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),await this.writer.close()}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?_t.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?_t.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,Xe.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){const r=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(r),this.bitWrapperJson.bit=this.bitJson;const i=Le.getBitConfig(r.bitType),o=this.getTextFormat(t),a=!!i.rootExampleType,s=i.rootExampleType===b;if(a){let e;s?(e=!0,Le.isOfBitType(r.bitType,u.trueFalse1)&&void 0!==r.cardNode?.statement?.isCorrect&&(e=r.cardNode.statement.isCorrect)):e="true";const t=this.toExample(r,{defaultExample:e,isBoolean:s,textFormat:o});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else r.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const r=this.bitJson.isExample,i=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=r,this.bitJson.example=i,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_person(e,t){const r=this.getBitType(t);let i="person";return Le.isOfBitType(r,u.conversationLeft1)&&(i="partner"),this.standardHandler(e,t,Xe.bitsValue,{array:!1,keyOverride:i})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_sourceBB(e,t){const r=e.value,i=this.getParentNode(t);return i?.key!==Xe.bitsValue||r&&r.length>0&&(this.bitJson.sourceBB=1===r.length?r[0]:r),!1}enter_productId(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;return this.getBitType(t)===u.module?this.addProperty(this.bitJson,"productId",r,{array:!0}):r.length>0&&this.addProperty(this.bitJson,"productId",r[r.length-1],{array:!1}),!1}leaf_isCollapsible(e,t){const r=this.getParentNode(t);return r?.key!==Xe.bitsValue||null!=e.value&&(this.bitJson.isCollapsible=!0===e.value),!1}enter_isCollapsible(e,t){return this.leaf_isCollapsible(e,t)}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);return i?.key!==Xe.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(r),!1)}enter_item(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}leaf_titleString(e,t){const r=this.getParentNode(t);return r?.key!==Xe.bitsValue||this.standardHandler(e,t,[Xe.bitsValue],{array:!1,keyOverride:"title"})}enter_title(e,t){return this.standardHandler(e,t,[Xe.bitsValue,Xe.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_width(e,t){let r=e.value;const i=this.getBitType(t),o=this.getParentNode(t);return o?.key===Xe.bitsValue&&Le.isOfBitType(i,u.extractorBlock)&&(r=rr.asNumber(r,0)??0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_height(e,t){let r=e.value;const i=this.getBitType(t),o=this.getParentNode(t);return o?.key===Xe.bitsValue&&Le.isOfBitType(i,u.extractorBlock)&&(r=rr.asNumber(r,0)??0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_extraProperties(e,t){const r=e.value;if(!this.options.excludeUnknownProperties&&r)for(const[e,t]of Object.entries(r)){let r=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(r=`_${e}`),this.addProperty(this.bitJson,r,t,{array:!0})}return!1}enter_cardBitsValue(e,t){const r=e.value,i=this.getBitType(t);if(!i)return;let o;if(i===u.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",r.lang,{array:!1}),this.addProperty(e,"refAuthor",r.refAuthor??[],{array:!0}),this.addProperty(e,"refBookTitle",r.refBookTitle??[],{array:!1}),this.addProperty(e,"refPublisher",r.refPublisher??[],{array:!0}),this.addProperty(e,"refPublicationYear",r.refPublicationYear??[],{array:!1}),this.addProperty(e,"citationStyle",r.citationStyle??[],{array:!1}),this.bitJson.bookReferences.push(e)}else i===u.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),o=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),o=this.bitJson.listItems),this.listItem={item:r.item??[],lead:r.lead??[],hint:r.hint??[],instruction:r.instruction??[],body:this.bodyDefault},o.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const r=e.value,i=this.getParentNode(t);if(!i)return!1;const o=this.getTextFormat(t),a=o===S.bitmarkText;if(this.bodyJson=r.body,i.key===Xe.bitsValue){this.bitJson.body=this.bodyJson;const e=a&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,it,{noBreakscaping:!0});this.bitJson.body=(e??"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else i.key===Xe.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,r){const i=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=this.bitJson.placeholders??{},this.bitJson.placeholders[i]=e,i}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=structuredClone(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const r of e)if(r.type!==Ye.text&&(0,vr.Enum)(Ye).values().includes(r.type)){const e=r;e.attrs={};for(const[t,r]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=r,delete e[t])}else Array.isArray(r.content)&&(t++,this.moveBodyBitPropertiesToAttrs(r.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,Xe.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_statement(e,t){const r=e.value,i=this.getParentNode(t);i?.key===Xe.cardNode&&r&&(this.bitJson.statement=r.statement??[],this.bitJson.isCorrect=r.isCorrect??!1,this.bitJson.example=r.example,this.bitJson.isExample=r.isExample)}enter_statements(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,Xe.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,Xe.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_previewImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_previewVideo(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_platformIcon(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_platformLogo(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_platformBackgroundImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_coverImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:Array.isArray(e.value)})}enter_backgroundImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:Array.isArray(e.value)})}enter_resources(e,t){const r=e.value,i=this.getBitType(t),o=this.getResourceType(t);if(!r||!i)return!0;let a;const s=Le.getBitConfig(i),n=Le.getBitResourcesConfig(i,o).comboResourceConfigKeysMap;if(n.size>0)for(const[e,t]of n.entries()){const i=xe(e),o={type:i,__typeAlias:i,__configKey:e};for(const e of t){const t=r.find(t=>t.__configKey===e);if(t){const e=Le.getTagConfigForTag(s.tags,t.__configKey);if(e){const r=e.jsonKey??e.tag,i=e.configKey??t.__configKey,a=t.__configKey===i?t:void 0;if(a)for(const[e,t]of Object.entries(a))"type"!==e&&(o[r]=t)}}}a=o}else if(Le.isOfBitType(i,[u.imagesLogoGrave,u.prototypeImages,u.extractorImage])){const e=[];for(const t of r)t.type===y.image&&e.push(t);i===u.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else r.length>=1&&(a=r[0]);return this.bitJson.resource=a,!1}leaf_level(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_markup(e,t){const r=e.value;return r&&(this.bitWrapperJson.bitmark=r),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const r=e.value,i=this.getBitType(t),o=this.getParentNode(t);if(r&&i){const{version:e,warnings:i,errors:a,...s}=r,n=`${this.bitmarkVersion}`,l=this.textParserVersion,c=this.getInternalComments(t);o?.key===Xe.bitsValue&&(this.bitWrapperJson.parser={version:e,bitmarkVersion:n,textParserVersion:l,internalComments:c,...s,warnings:i,errors:a},this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){for(const e of(0,vr.Enum)(ge).values()){const t=ke(e),r=[`enter_${t}`,`leaf_${t}`];for(const e of r)"function"!=typeof this[e]&&"example"!==t&&(this[e]=(e,r)=>{const i=e.value;if(null==i)return;const o=this.getParentNode(r);o?.key===Xe.bitsValue&&(this.bitJson[t]=i)},this[e]=this[e].bind(this))}}standardHandler(e,t,r,i){if(r){const e=Array.isArray(r)?r:[r],i=this.getParentNode(t);if(!i?.key||!e.includes(i?.key))return!0}return this.addProperty(this.bitJson,i.keyOverride??e.key,i.valueOverride??e.value,i),!1}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]);const a=r;o=!i.array&&a.length>=1?a[a.length-1]:a,(i.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:r,example:i,__isDefaultExample:o}=e,{defaultExample:a,isBoolean:s}=t;if(!r)return{isExample:!1,example:null};let n;return n=o?s?tr.toBoolean(a):this.convertBreakscapedStringToJsonText(a,t.textFormat,rt):s?tr.toBoolean(i):this.convertBreakscapedStringToJsonText(i,t.textFormat,rt),{isExample:!0,example:n}}getBitType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.bitType}}getTextFormat(e){const t=this.getBitType(e);if(t){const r=Le.getBitConfig(t);for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return(0,vr.Enum)(S).fromValue(e?.textFormat)??r.textFormatDefault}}return S.bitmarkText}getResourceType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===Xe.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,r){if(!e)return"";if(!(t===S.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{format:t,location:r})}concatenatePlainTextWithJsonTexts(e,t,r){if(Array.isArray(e)){if(r=r.trim()){const i=r.split("\n"),o=[];for(let e=0;e<t;e++)o.push({type:Ze.hardBreak});for(let e=0;e<i.length;e++){const t=i[e];t&&o.push({text:t,type:Ze.text}),e<i.length-1&&o.push({type:Ze.hardBreak})}const a=e[e.length-1];a&&a.type===Ze.paragraph?a.content=[...a.content??[],...o]:e.push({type:Ze.paragraph,content:o,attrs:{}})}return e}return`${e??""}${"\n".repeat(t)}${r??""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?u._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){const t=Le.getBitType(e.type);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),Le.isOfBitType(t,[u._error,u._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let r=!1,i=!1;Le.isOfBitType(t,[u.page])?(null!=e.item&&0!==e.item?.length||delete e.item,null!=e.lead&&0!==e.lead?.length||delete e.lead,null!=e.pageNumber&&0!==e.pageNumber?.length||delete e.pageNumber,null!=e.marginNumber&&0!==e.marginNumber?.length||delete e.marginNumber,null!=e.hint&&0!==e.hint?.length||delete e.hint,null!=e.instruction&&0!==e.instruction?.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),Le.isOfBitType(t,[u.article]),Le.isOfBitType(t,[u.example])&&(r=!0,i=!0),Le.isOfBitType(t,[u.multipleChoice1,u.multipleResponse1,u.multipleChoiceText,u.highlightText,u.gapText,u.gapTextInstructionGrouped,u.clozeAndMultipleChoiceText,u.sequence,u.mark,u.flashcard,u.definitionList])&&(r=!0,null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,[u.sequence])&&(r=!0,i=!0,null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.cloze)&&(r=!0,Le.isOfBitType(t,u.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):Le.isOfBitType(t,u.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),Le.isOfBitType(t,[u.multipleChoice,u.multipleResponse])&&(r=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),Le.isOfBitType(t,u.essay)&&(r=!0,i=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),Le.isOfBitType(t,u.trueFalse1)&&(r=!0,i=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.trueFalse)&&(r=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.isCollapsible&&(e.isCollapsible=!1),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.interview)&&(r=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),Le.isOfBitType(t,u.sequence)&&null==e.elements&&(e.elements=[]),t===u.matchMatrix&&(r=!0),Le.isOfBitType(t,u.match)&&(r=!0,null==e.heading&&(e.heading={})),Le.isOfBitType(t,u.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1));const o=Le.isOfBitType(t,u.tableImage)&&!this.tableIsEmpty(e.table);(Le.isOfBitType(t,u.table)&&!Le.isOfBitType(t,u.tableImage)||o)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableHeaderWhitespaceNoWrap&&(e.tableHeaderWhitespaceNoWrap=!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)),Le.isOfBitType(t,u.tableImage)&&!o&&delete e.table,Le.isOfBitType(t,u.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),Le.isOfBitType(t,[u.pageBanner,u.pageBuyButton,u.pageBuyButtonAlt,u.pageBuyButtonPromotion,u.pageFooter,u.pageOpenBook,u.pagePerson,u.printBook,u.pageProduct,u.pageProductList,u.pageProductVideo,u.pageProductVideoList,u.pageSectionFolder,u.pageSubscribe,u.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),Le.isOfBitType(t,u.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),Le.isOfBitType(t,u.tocResource)&&null==e.tocResource&&(e.tocResource=[]),Le.isOfBitType(t,u.tocContent)&&null==e.tocContent&&(e.tocContent=[]),Le.isOfBitType(t,u.printThisChapter)&&null==e.printParentChapterLevel&&(e.printParentChapterLevel=-1),Le.isOfBitType(t,u.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.allowPrint&&(e.allowPrint="useSpaceConfiguration"),null==e.hasPrintRestriction&&(e.hasPrintRestriction=!0),null==e.enforceUpdateOverUserInput&&(e.enforceUpdateOverUserInput=!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="")),t!==u.articleAi&&t!==u.noteAi&&t!==u.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),Le.isOfBitType(t,[u.articleResponsive,u.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),Le.isOfBitType(t,u.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),Le.isOfBitType(t,[u.imagesLogoGrave,u.prototypeImages,u.extractorImage])&&(t===u.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),Le.isOfBitType(t,[u.stepImageScreenshotWithPointer,u.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),Le.isOfBitType(t,[u.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),Le.isOfBitType(t,[u.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),Le.isOfBitType(t,u.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),Le.isOfBitType(t,u.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey=""),Le.isOfBitType(t,u.vendorStripePricingTablePrintOnRequest)&&(null==e.printOnRequestCustomerId&&(e.printOnRequestCustomerId=""),null==e.printOnRequestProductId&&(e.printOnRequestProductId=""))),Le.isOfBitType(t,u.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),Le.isOfBitType(t,[u.handInFile,u.handInSystemMedia])&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),Le.isOfBitType(t,u.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),Le.isOfBitType(t,u.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),Le.isOfBitType(t,u.container)&&null==e.allowedBit&&(e.allowedBit=[]),Le.isOfBitType(t,u.platformPath)&&null==e.path&&(e.path=""),Le.isOfBitType(t,u.platformBrandTarget)&&null==e.platformBrandTarget&&(e.platformBrandTarget="none"),Le.isOfBitType(t,u.platformHeader)&&null==e.platformLogoMaxHeight&&(e.platformLogoMaxHeight=40),r?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),i?null==e.example&&(e.example=null):delete e.example}return e}tableIsEmpty(e){if(!e)return!0;if(0===Object.keys(e).length)return!0;const t=e;if(0===t.columns?.length&&t.data?.length)return!0;const r=e;return 0===r.header?.rows.length&&0===r.body?.rows.length&&0===r.footer?.rows.length}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const r=t[e];if(this.isBitmarkText(r)){const i=this.textGenerator.generateSync(r,S.bitmarkText,rt,{noBreakscaping:!0});t[e]=(i??"").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}},Cr=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new ur,this.generator=new _r(this.writer,e)}async generate(e){return await this.generator.generate(e),JSON.parse(this.writer.getString())}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}},wr=r(722),Ar=class{getSupportedBits(e){const t=e?.includeNonDeprecated??!0,r=e?.includeDeprecated??!1,i=[];for(const e of(0,wr.Enum)(u).values()){if(e===u._error||e===u._comment)continue;const o=Le.getBitType(e),a=Le.getBitConfig(o),s=a.inheritedBitTypes.length>0?a.inheritedBitTypes:void 0;(t&&!a.deprecated||r&&a.deprecated)&&i.push({name:e,title:a.title,since:a.since,deprecated:a.deprecated,inheritedBitTypes:s,bitGroups:a.bitGroups.length>0?a.bitGroups:void 0})}return i}getBitGroups(e){const t=null!=e?.subgroupOf?Le.getBitGroupKey(e.subgroupOf):void 0;if(null!=e?.subgroupOf&&null==t)return[];const r=[];for(const[i,o]of Object.entries(Pe))null!=t&&o.subgroupOf!==t||r.push({key:i,aliases:o.aliases?[...o.aliases]:void 0,description:o.description,title:Le.getBitGroupTitle(i,e?.language),subgroupOf:o.subgroupOf,since:o.since,bitTypes:Le.getBitTypesForBitGroups([i],{includeDeprecated:e?.includeDeprecated})});return r}getResourceGroups(e){const t=[];for(const[r,i]of Object.entries(Ee))t.push({key:r,aliases:i.aliases?[...i.aliases]:void 0,description:i.description,title:Le.getResourceGroupTitle(r,e?.language),since:i.since,resourceTypes:Le.getResourceTypesForResourceGroups([r])});return t}getBitGroupsForBitTypes(e,t){const r=new Set(Le.getBitGroupsForBitTypes(e));return this.getBitGroups(t).filter(e=>r.has(e.key))}getSupportedBitConfigs(){const e=[];for(const t of(0,wr.Enum)(u).values()){if(t===u._error||t===u._comment)continue;const r=Le.getBitType(t),i=Le.getBitConfig(r);e.push(i)}return e}},Br=(r(722),{peggy:"peggy"}),Sr=(r(722),{text:"text",json:"json",pojo:"pojo"}),Pr=(r(722),{list:"list",deprecated:"deprecated",all:"all",bit:"bit",bitGroups:"bitGroups",resourceGroups:"resourceGroups"}),Ir=r(722),Er=new pr,Lr=class{toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,i?.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return Er.buildBitmark(i)}preprocessJson(e){const t=[];if(g.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const r=e=>{if(this.isBitWrapper(e)){const r=e;t.push(r)}else if(this.isBit(e)){const r=e;t.push(this.bitToBitWrapper(r))}};if(Array.isArray(e))for(const t of e)r(t);else r(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 Le.getBitType(t.type)!==u._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){const{statement:r,reference:i,...o}=e,a=e.type===u._comment&&void 0!==e.originalType,s=Le.getBitType(a?e.originalType:e.type),n=Le.getBitConfig(s),l=(0,Ir.Enum)(Ct).fromValue(e.format);let c=(0,Ir.Enum)(S).fromValue(e.format)??n.textFormatDefault;l===Ct.bitmarkMinusMinus&&(c=S.bitmarkText);return Er.buildBit({...o,bitType:s,bitLevel:Math.max(Math.min(e.bitLevel??1,Le.bitLevelMax),Le.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:a,internalComment:t,...this.processTitle(s,e.title),...this.processReference(i),...this.parseExample(e.example),person:e.partner??e.person,markConfig:e.marks,resources:this.processResources(s,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(r,e.isCorrect,e.statements,e.example),responses:this.processResponses(s,e.responses),botResponses:this.processBotResponse(s,e.responses),cardBits:this.processListItems(e.listItems??e.sections??e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)})}processStatements(e,t,r,i){const o=[];if(e){const r={statement:e??"",isCorrect:t??!1,...this.parseExample(i)};r&&o.push(r)}if(Array.isArray(r))for(const e of r)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!Le.isOfBitType(e,u.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(Le.isOfBitType(e,u.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const r=[];if(Array.isArray(e))for(const i of e){const e={...i};e.body&&(e.body={body:e.body,placeholders:t}),e&&r.push(e)}if(0!==r.length)return r}getResourceType(e){if(e){return(0,Ir.Enum)(y).fromValue(e.type)}}processResources(e,t,r,i){const o=[];if(t&&o.push(t),Le.isOfBitType(e,[u.prototypeImages,u.extractorImage])&&Array.isArray(r))for(const e of r)e&&o.push(e);if(Le.isOfBitType(e,[u.imagesLogoGrave])&&Array.isArray(i))for(const e of i)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processTitle(e,t){return Le.isOfBitType(e,u.author)?{titleString:t,title:void 0}:{titleString:void 0,title:t}}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=g.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}},Nr=(r(722),class{constructor(e,t){l(this,"source"),l(this,"start"),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}}),Vr={TextFormat:"TextFormat",ResourceType:"ResourceType",Title:x.tag_title,Anchor:x.tag_anchor,Reference:x.tag_reference,ItemLead:x.tag_item,Instruction:x.tag_instruction,Hint:x.tag_hint,True:x.tag_true,False:x.tag_false,Gap:x.tag_gap,Mark:x.tag_mark,SampleSolution:x.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"},Rr="Bit",Gr="Card",Fr="Chain",Kr=r(722),$r=class{constructor(e){l(this,"cardIndex",0),l(this,"cardSideIndex",0),l(this,"cardVariantIndex",0),l(this,"currentCardQualifier"),l(this,"currentSideQualifier"),l(this,"currentVariantQualifier"),l(this,"parse"),l(this,"parserText"),l(this,"parserLocation"),this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){const t=e.trim();if(this.debugPrint("RAW BIT",t),!t)return;const r=this.parserLocation()?.start??{line:1,column:1,offset:0},i=this.parse(e,{startRule:"bit",grammarSource:new Nr("bit",r)});return i.value&&(i.value.markup=t),i}handleTextFormat(e){return{type:Vr.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:Vr.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,key:(0,Kr.Enum)(x).fromValue(e),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:Vr.Property,key:`@${_t.unbreakscape(e,{format:S.plainText,location:rt})}`,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){const r=_t.unbreakscape(e,{format:S.plainText,location:rt}),i=g.kebabToCamel(r);return{type:Vr.Resource,key:`&${i}`,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let r=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),r=[e]}return r}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:Vr.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:Vr.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,r={cards:[]},i={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:i,parser:o}=e;if(!t||t!==Vr.Card)continue;const{cardIndex:a,cardSideIndex:s,cardVariantIndex:n,value:l,cardQualifier:c,cardSideQualifier:p,cardVariantQualifier:u}=i;let d=r.cards[a];d?c&&!d.qualifier&&(d.qualifier=c):(d={sides:[],qualifier:c},r.cards[a]=d);let m=d.sides[s];m?p&&!m.qualifier&&(m.qualifier=p):(m={variants:[],qualifier:p},d.sides[s]=m);const h=m.variants[n];h?(m.variants[n].value+=l,u&&!h.qualifier&&(h.qualifier=u)):m.variants[n]={value:l,parser:o,qualifier:u}}r.cards=r.cards.filter(e=>e.sides.some(e=>e.variants.some(e=>0!==g.trimmedString(e.value).length)));for(const t of r.cards){const r={sides:[],qualifier:t.qualifier};i.cards.push(r);for(const i of t.sides){const t={variants:[],qualifier:i.qualifier};r.sides.push(t);for(const r of i.variants){let i={line:1,column:1,offset:0};if(r.parser.location){i=r.parser.location.start;const e=r.parser.text,t=e?e.length:0,o=1;i.offset+=t,i.line+=o}let o=this.parse(r.value,{startRule:"cardContent",grammarSource:new Nr("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o,qualifier:r.qualifier})}}}}return{type:Vr.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=void 0,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=void 0,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r,i=!1,o=!1,a=!1;if(Array.isArray(e)&&2===e.length){const[t,i]=e;"string"==typeof t?(e=t,"string"==typeof i&&i.trim()===i&&i.length>0&&(r=i)):e=t}else if(Array.isArray(e)&&1===e.length){const[t]=e;e=t}return t===hr.v1?(i="==="===e,o="=="===e,a="--"===e):(i="===="===e,o="--"===e,a="++"===e),i?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=r,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0):o?(this.cardSideIndex++,this.cardVariantIndex=0,this.currentSideQualifier=r,this.currentVariantQualifier=void 0):a&&(this.cardVariantIndex++,this.currentVariantQualifier=r),this.isType(e,Vr.Card)?e:{type:Vr.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:"",cardQualifier:this.currentCardQualifier,cardSideQualifier:this.currentSideQualifier,cardVariantQualifier:this.currentVariantQualifier},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:Vr.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e,cardQualifier:this.currentCardQualifier,cardSideQualifier:this.currentSideQualifier,cardVariantQualifier:this.currentVariantQualifier},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){const t=[];let r,i;for(const o of e)switch(o.type){case Vr.BodyChar:if(r){const e=`${r.value??""}${o.value??""}`;r.value=e}else r={type:Vr.BodyText,value:o.value??"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case Vr.CardChar:if(i){const e=`${i.value??""}${o.value??""}`;i.value=e}else i={type:Vr.CardText,value:o.value??"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:r&&(t.push(r),r=void 0),i&&(t.push(i),i=void 0),t.push(o)}return r&&t.push(r),i&&t.push(i),t}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!(0,Kr.Enum)(Vr).fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce((e,i,o)=>{if(null==i)return e;const{type:a,value:s}=i;if(Array.isArray(i)){const r=this.reduceToArrayOfTypes(i,t);e.push(...r)}else{if(!this.isType(i,t))return e;if(r&&Array.isArray(s)){const r=this.reduceToArrayOfTypes(s,t);e.push(...r)}else a&&e.push(i)}return e},[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce((e,t,r)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e},[])}debugPrint(e,t){}},Or=r(722),Jr=r(722),Dr=["----","\n==\n","\n---\n"],zr=["==\n","--\n"],qr=["\n==","\n--"],jr=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:r,bitType:i,resourceType:o}=e,{tags:a,cardSet:s}=r,n={...a,...Le.getBitResourcesConfig(i,o).tags};return this.validateTagChainsRecursive(e,Rr,i,t,n,s).validated}checkBody(e,t,r,i,o){if(!o)return o;const{bitConfig:a}=e,{bodyAllowed:s}=a;return o.length>0&&!s&&e.addWarning(`Bit '${r}' should not have a body.`),o}checkBodyPart(e,t,r){return r?(this.checkBodyForCommonPotentialMistakes(e,t,r),r):r}checkFooter(e,t,r){if(!r)return r;const{bitConfig:i,bitType:o}=e,{footerAllowed:a}=i;return this.checkBodyForCommonPotentialMistakes(e,t,r),a||e.addWarning(`Bit '${o}' should not have a footer.`),r}checkCardBody(e,t,r,i,o,a,s){if(!i||!i.body)return i;const{bitConfig:n}=e;if(!n.cardSet)return i;const l=Le.getCardSetVariantConfig(r,a,s);if(!l)return i;const{bodyAllowed:c}=l;return i.bodyString.length>0&&!c&&e.addWarning(`Bit '${r}' should not have a card body at card:${o+1}, side:${a+1}, variant:${s+1}.`),i}validateTagChainsRecursive(e,t,r,i,o,a,s){if(!i)return{validated:[]};let n;const l=[...i],c=this.convertTagsToTypeKeyMap(e,t,r,o),p=(e,t,r)=>{c.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};t===Rr?(a&&p(Vr.CardSet,1,0),p(Vr.TextFormat,1,0),p(Vr.BodyText,m,0),p(Vr.BodyTextPlain,m,0),p(Vr.PlainTextDivider,m,0),p(Vr.FooterDivider,m,0)):t===Gr&&p(Vr.CardText,m,0);for(let i=0;i<l.length;i++){const o=l[i];if(!o)continue;const{type:p,key:u}=o;let d=(0,Jr.Enum)(Vr).fromValue(p);if(!d)continue;let m=d;d!==Vr.Property&&d!==Vr.Resource||(m=u);let h=c.get(m);if(!h&&d===Vr.Property){const t=u.replace(/^@/,"&");if((t===ye.resource_backgroundWallpaper||t===ye.resource_imagePlaceholder||t===ye.resource_platformIcon||t===ye.resource_platformLogo||t===ye.resource_platformBackgroundImage||t===ye.resource_coverImage)&&(h=c.get(t),h)){d=Vr.Resource,o.type=Vr.Resource;const r=`Falling back to '[${t}]' from '[${u}]'. Replace '[${u}]' with '[&${u}]' to avoid this warning.`;e.addWarning(r)}}const{validated:b,warning:g}=this.validateSingleTag(e,t,r,o,d,h,a);d===Vr.Resource&&(s=Vr.Resource);let y=!0;if(!b)if(t===Fr&&s!==Vr.Resource){n=o;const e=l.slice(i+1);e.length>0&&(n.chain=e),l.splice(i),y=!1}else l.splice(i,1,null);if(g&&y&&e.addWarning(g.warning??"",g.content,g.previousContent),t===Fr&&h&&h.chain&&b&&!b.chain){const e=l.slice(i+1);e.length>0&&(b.chain=e),l.splice(i+1)}if(b&&Array.isArray(b.chain)&&b.chain.length>0)if(h&&h.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,Fr,r,b.chain,h.chain,void 0,b.type);t&&t.length>0?b.chain=t:b.chain=void 0,o&&l.splice(i+1,0,o)}else if(b.type!==Vr.Resource){const e=b.chain[0];b.chain.length>1&&(e.chain=b.chain.slice(1)),l.splice(i+1,0,e),b.chain=void 0}}for(const t of c.values()){const{minCount:r,_seenCount:i}=t;if(null!=r&&i<r){const i=`${this.getTagSignature(t)} is required at least ${r} time(s)`;e.addWarning(i)}}return{validated:l.filter(e=>null!=e),remaining:n}}validateSingleTag(e,t,r,i,o,a,s){const{type:n,key:l}=i,c=a?this.getTagSignature(a):this.getUnknownTagSignature(n,l),p=" It will be ignored";let u,d,m="";if(a)switch(a._seenCount++,o){case Vr.Property:{const{content:o,warning:s}=this.validatePropertyTag(e,t,r,a,i);u=o,d=s;break}case Vr.Resource:{const{content:o,warning:s}=this.validateResourceTag(e,t,r,a,i);u=o,d=s;break}case Vr.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,r,a,i,s);u=t,d=o;break}default:{const{content:o,warning:s}=this.validateStandardTag(e,t,r,a,i);u=o,d=s}}else switch(o){case Vr.Property:d={extraProperty:!0},t!==Fr&&(u=i);break;case Vr.Resource:d={excessResource:!0},u=i;break;default:d={invalid:!0}}if(d){const e=a?._previous;d.invalid||d.excessResource?m=`${c} is not valid here (incorrectly chained?).${p}`:null!=d.tooMany?(m=`${c} is included more than the required ${d.tooMany} time(s).`,0===d.tooMany&&o===Vr.Resource&&(m+=` Did you forget the '${l}' in the bit header?`),d.tooMany>0&&(m+=" The earlier ones will be ignored")):d.extraProperty?m=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:d.unexpectedCardSet?m=`${c} is not expected here.${p}`:d.unexpectedCardSideVariant&&(m=`${c} has a card / side / variant that is not expected here.${p}`),d.warning=m,d.content=u,d.previousContent=e}return a&&(a._previous=i),{validated:u,warning:d}}validateStandardTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==m&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==m&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==m&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:a}=i,s=a;let n,l=0,c=0;for(const r of s.cards){l=0;for(const i of r.sides){c=0;for(const r of i.variants){const o=r.content;let a;const s=Le.getCardSetVariantConfig(t,l,c);if(s){a=this.validateTagChainsRecursive(e,Gr,t,o,s.tags).validated}else n={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[c]={parser:r.parser,content:a}:i.variants[c]={parser:r.parser,content:[]},c++}l++}}return{content:i,warning:n}}checkBodyForCommonPotentialMistakes(e,t,r){if(!r)return;const{bitType:i}=e;for(const t of Dr)r.includes(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of zr)r.startsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of qr)r.endsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,r,i){const o=new Map;for(const e of Object.values(i)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===re,isProperty:e.type===ie,isResource:e.type===oe,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)o.set(e.configKey,t);else if(t.isResource)o.set(e.configKey,t);else{const r=(0,Jr.Enum)(Vr).fromValue(e.tag);r&&o.set(r,t)}}return o}getTagSignature(e){switch(e._type){case re:case ie:case oe:return`[${e._configKey}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case Vr.Property:case Vr.Resource:return`[${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}},Mr=new class{concatenatePlainTextWithAstTexts(e,t,r){if(Array.isArray(e)){if(r=r&&r.trim()){const i=r.split("\n"),o=[];for(let e=0;e<t;e++)o.push({type:Ze.hardBreak});for(let e=0;e<i.length;e++){const t=i[e];t&&o.push({text:t,type:Ze.text}),e<i.length-1&&o.push({type:Ze.hardBreak})}const a=e[e.length-1];a&&a.type===Ze.paragraph?a.content=[...a.content??[],...o]:e.push({type:Ze.paragraph,content:o,attrs:{}})}return e}return`${e??""}${"\n".repeat(t)}${r??""}`}},Hr=new er,Ur=new class{process(e,t,r,i,o,a,s,n){const l=[];let c,p;const u=s.length>0?this.trimBodyParts(s):void 0,d=n?u:jr.checkBody(e,t,r,i,u);if(i===S.json&&d){c=d.reduce((e,t)=>{if(t.type===Ye.text&&t.data){return e+(t.data.bodyText??"")}return e},"");try{c=JSON.parse(c)}catch(t){c=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",r="",o=0;const a=e=>`[!${e}]`;if(d)for(let i=0;i<d.length;i++){const s=d[i];if(s.type===Ye.text){const i=s,o=i.data.bodyText;i.data.isPlain?t=_t.concatenate(t,o):e=_t.concatenate(e,o),r=_t.concatenate(r,o)}else{const t=a(o);e=_t.concatenate(e,t),l.push(s),o++}}const s=i===S.bitmarkText?Hr.toAst(e,{format:i,location:it}):_t.unbreakscape(e,{format:S.plainText,location:it}),n=_t.unbreakscape(t,{format:S.plainText,location:it}),u=g.countOccurrencesAtEnd(e,"\n")+g.countOccurrencesAtStart(t,"\n");c=Mr.concatenatePlainTextWithAstTexts(s,u,n),p=_t.unbreakscape(r,{format:i,location:it}).trim();const m=Array.isArray(c)?c:void 0;if(m&&d){o=0;for(let e=0;e<d.length;e++){const t=d[e];if(t.type===Ye.text)continue;const r=t;let i;switch(t.type){case Ye.gap:case Ye.mark:case Ye.select:case Ye.highlight:i=r}i&&this.replacePlaceholderWithBodyBit(m,i,o),o++}}}return{body:c,bodyBits:l.length>0?l:void 0,bodyString:p}}buildBodyText(e,t){return{type:Ye.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,a)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const r=e[t];if(i(r,e,t))return!0}else{if("bit"===e.type&&e.index===r)return o[a]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}trimBodyParts(e){let t=!1,r=e.reduce((e,r)=>{const i=r;if(t||i.type!==Ye.text)t=!0,e.push(r);else{const r=i.data.bodyText.trimStart();r&&(t=!0,i.data.bodyText=r,e.push(i))}return e},[]);return t=!1,r=r.reduceRight((e,r)=>{const i=r;if(t||i.type!==Ye.text)t=!0,e.unshift(r);else{const r=i.data.bodyText.trimEnd();r&&(t=!0,i.data.bodyText=r,e.unshift(i))}return e},[]),r}};function Wr(e,t,r,i,o,a,s,n){const{bitConfig:l}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",i);let c={};const p=function(e,t){const r={cards:[],internalComments:[]};if(!t)return r;const{bitType:i}=e;let o=0,a=0,s=0;for(const n of t.cards){const t={no:o++,sides:[],qualifier:n.qualifier};r.cards.push(t);for(const o of n.sides){const n={no:a++,variants:[],qualifier:o.qualifier};t.sides.push(n);for(const l of o.variants){const{parser:o,content:c}=l,p={parser:o,no:s++,qualifier:l.qualifier};n.variants.push(p);const u=Le.getTagsConfigForCardSet(i,a,s),d=e.bitContentProcessor(Gr,u,c);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",d),d.cardBody=jr.checkCardBody(e,Gr,i,d.cardBody,t.no,n.no,p.no),d.cardBodyStr=d.cardBody?.bodyString,p.data=d,d.internalComments&&r.internalComments.push(...d.internalComments)}s=0}a=0}return r}(e,i),d=l.cardSet?.configKey;switch(d){case P:case I:case E:case L:c=function(e,t,r){const i=[],o=[];let a,s,n,l="",c=[],p=0,d={};const m=t===u.flashcard1,h=Yr(r);for(let b=0;b<r.cards.length;b++){const g=r.cards[b];if(!h||0!==b){a=void 0,s=void 0,c=[],p=0,d={};for(const e of g.sides)for(const t of e.variants){const{cardBody:e,resources:r,...i}=t.data;d={...d,...i};const o=r&&r.length>0?r[0]:void 0,u=e?.body;0===p?(n=t,l=e?.bodyString??"",a={text:u,icon:o}):1===p?s={text:u,icon:o}:c.push({text:u,icon:o}),p++}if(0!==b&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${l}'`,n);break}if(Le.isOfBitType(t,[u.flashcard])){const e={question:a,answer:s,alternativeAnswers:c,...d};e&&i.push(e)}else{const e={term:a,definition:s,alternativeDefinitions:c,...d};e&&o.push(e)}}}return{heading:h?.heading,flashcards:i.length>0?i:void 0,definitions:o.length>0?o:void 0}}(e,t,p);break;case N:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=t.cardBody?.body??t.cardBodyStr??_t.EMPTY_STRING;i.push(r)}return{elements:i.length>0?i:void 0}}(0,0,p);break;case V:c=function(e,t,r,i,o){const a=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{statements:t,statement:r,...i}=e.data;if(Array.isArray(t))for(const e of t){const t={statement:e.statement??[],isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example,...i};t&&a.push(t)}}i&&a.push(i);Array.isArray(o)&&o.length>0&&a.push(...o);return{statements:a.length>0?a:void 0}}(0,0,p,o,a);break;case F:c=function(e,t,r){let i;const o=[],a=Yr(r);for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(!a||0!==e){i=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:s,choices:n,...l}=r;if(0===e){const e=[];if(n&&n.length>0)for(const t of n){const{__isDefaultExample:r,example:i,...o}=t,a={choice:o.choice,requireReason:o.isCorrect,item:o.item,lead:o.lead,instruction:o.instruction,__isDefaultExample:r,example:i};e.push(a)}i={...r,choices:e},i&&o.push(i)}else if(1===e){const e={text:s??"",__textAst:a?.body,...l};i&&(i.reason=e)}}}}}return{heading:a?.heading,feedbacks:o.length>0?o:void 0}}(0,0,p);break;case R:case G:c=function(e,t,r,i,o){const a=[],s=Le.isOfBitType(t,u.multipleChoice),n=Le.isOfBitType(t,u.multipleResponse);if(!s&&!n)return{};let l,c=!1;for(const e of r.cards){c=!1,l=void 0;for(const t of e.sides)for(const e of t.variants){const{__isDefaultExample:t,example:r,...i}=e.data;if(c=!0===t||c,l=r||l,i.trueFalse&&i.trueFalse.length>0){const e=[];for(const t of i.trueFalse){const{__isDefaultExample:r,example:i,...o}=t,a=r||c,s=i||l,p={isCorrect:o.isCorrect,__isDefaultExample:a,example:s};n?p.response=o.text:p.choice=o.text,p&&e.push(p)}n?i.responses=e:i.choices=e}const o={...i,choices:i.choices,responses:i.responses,__isDefaultExample:c,__defaultExample:l};o&&a.push(o)}}if(s&&Array.isArray(i)&&i.length>0){const e={choices:i};e&&a.push(e)}if(n&&Array.isArray(o)&&o.length>0){const e={responses:o};e&&a.push(e)}return{quizzes:a.length>0?a:void 0}}(0,t,p,s,n);break;case K:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r={question:t.cardBody?.body??t.cardBodyStr??_t.EMPTY_STRING,...t};r&&i.push(r)}return{questions:i.length>0?i:void 0}}(0,0,p);break;case $:c=function(e,t,r){const i=[];let o,a,s,n,l=[],c=[],p={},d=!1;const m=Le.isOfBitType(t,u.matchMatrix),h=Yr(r,m),b=h?.isDefaultExampleCardSet??!1;let g=h?.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(h&&0===e)continue;o=void 0,l=[],c=[],a=void 0,s=void 0,p={},d=!1,n=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const{cardBody:r,cardBodyStr:i,resources:u,__isDefaultExample:m,example:h,...g}=t.data;if(d=!0===m||d,n=h||n,0===e)if(Array.isArray(u)&&u.length>0){const e=u[0];e.type===y.audio?a=e:e.type===y.image&&(s=e)}else o=i;else{const e=i??"",t=r?.body;l.push(e),c.push(t),!b&&!d||n||(n=t),delete g.item,delete g.lead}p={...p,...g}}}d&&(g=void 0);const u=d||b,m=n||g,f={key:o??"",keyAudio:a,keyImage:s,values:l,__valuesAst:c,...p,__isDefaultExample:u,example:m};f&&i.push(f)}return{heading:h?.heading,pairs:i.length>0?i:void 0}}(0,t,p);break;case D:c=function(e,t,r){let i,o;const a=[];let s,n,l,c,p=[],u=[],d=[],m={},h=!1,b=!1;const g=Yr(r,!0),y=g?.isDefaultExampleCardSet??!1;let f=g?.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(g&&0===e)continue;i=void 0,o=void 0,p=[],u=[],d=[],h=!1,s=void 0,l=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];u=[],d=[],m={},b=!1,n=void 0,c=void 0;for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:p,__isDefaultExample:g,example:f,isCaseSensitive:k,...x}=r;if(b=!0===g||b,n=f||n,Object.assign(m,x),0===e)i=p,o=x,h=!0===g||h,s=f||s,l=null!=k?k:l;else{const e=p??_t.EMPTY_STRING,t=a?.body;u.push(e),d.push(t),!y&&!b||n||(n=t),c=null!=k?k:l}}if(e>0){b&&(s=f=void 0),h&&(f=void 0);const e=b||h||y,t=n||s||f,r={values:u,__valuesAst:d,...m,__isDefaultExample:e,example:t,isCaseSensitive:c};r&&p.push(r)}}const k={key:i??_t.EMPTY_STRING,cells:p,...o};k&&a.push(k)}return{heading:g?.heading,matrix:a.length>0?a:void 0}}(0,0,p);break;case j:c=function(e,t,r){const i=[];let o=[];for(const e of r.cards){o=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBody:i,resources:a}=t,s=r&&r[1].titleAst,n=a&&a.length>0?a.find(e=>e.type===y.audio):void 0,l={title:s??[],body:i?.body??[],audio:n};o.push(l)}i.push(o)}return{pronunciationTable:{data:i}}}(0,0,p);break;case z:case q:c=function(e,t,r){const i={header:[],body:[],footer:[]},o=t=>{if(!t)return;const r=t.trim().toLowerCase();return"table-header"===r?"header":"table-body"===r?"body":"table-footer"===r?"footer":void e.addWarning(`Unknown table section qualifier '${t}', defaulting to body.`)},a=(e,t)=>0===t&&e.sides.some(e=>e.variants.some(e=>{const t=e.data.title;return Array.isArray(t)&&t[1]?.titleAst})),s=(e,t)=>{if(!e)return;const r=e[t];return Array.isArray(r)?r[0]:r},n=(e,t)=>{const r=e.extraProperties;if(r){for(const e of t)Object.prototype.hasOwnProperty.call(r,e)&&delete r[e];0===Object.keys(r).length&&delete e.extraProperties}},l=(t,r)=>{if("string"==typeof t){const i=t.trim().toLowerCase();if("th"===i||"td"===i)return i;e.addWarning(`Invalid table cell type '${t}', using default for section '${r}'.`)}return"body"===r?"td":"th"},c=(t,r)=>{if(null==t)return 1;const i=rr.asNumber(t);return null==i||!Number.isInteger(i)||i<1?(e.addWarning(`Invalid table ${r} '${t}', defaulting to 1.`),1):i},p=t=>{if(null==t)return;if("string"!=typeof t)return void e.addWarning(`Invalid table scope '${t}', ignoring.`);const r=t.trim().toLowerCase();switch(r){case"row":case"col":case"rowgroup":case"colgroup":return r;default:return void e.addWarning(`Invalid table scope '${t}', ignoring.`)}},u=(e,t)=>{const r=e.data,i=r.title&&r.title[1]?.titleAst,o=r.cardBody?.body??r.cardBodyStr??_t.EMPTY_STRING,a=i??o,u=r.tableCellType??s(r.extraProperties,"tableCellType"),d=r.tableRowSpan??s(r.extraProperties,"tableRowSpan"),m=r.tableColSpan??s(r.extraProperties,"tableColSpan"),h=r.tableScope??s(r.extraProperties,"tableScope"),b=r.tableColWidth??s(r.extraProperties,"tableColWidth");n(r,["tableCellType","tableRowSpan","tableColSpan","tableScope","tableColWidth"]);const g=l(u,t),y=c(d,"rowspan"),f=c(m,"colspan"),k=p(h),x=rr.asNumber(b)??0,v={content:a};return"th"===g&&(v.title=!0),y>1&&(v.rowspan=y),f>1&&(v.colspan=f),k&&(v.scope=k),x>0&&(v.colwidth=x),v},d=e=>{const t=o(e.qualifier);if(t)return t;for(const t of e.sides){const e=o(t.qualifier);if(e)return e;for(const e of t.variants){const t=o(e.qualifier);if(t)return t}}};for(let e=0;e<r.cards.length;e++){const t=r.cards[e],o=d(t),s=o||(a(t,e)?"header":"body"),n=[];for(const e of t.sides)for(const t of e.variants)n.push(u(t,s));i[s].push({cells:n})}const m={},h=i.header.length>0,b=i.body.length>0,g=i.footer.length>0;h&&(m.header={rows:i.header});b&&(m.body={rows:i.body});g&&(m.footer={rows:i.footer});h||b||g||(m.header={rows:[]},m.body={rows:[]},m.footer={rows:[]});return{table:m}}(e,0,p);break;case M:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{__instructionString:t,__itemString:r,reaction:o,cardBodyStr:a,...s}=e.data,n={response:t??_t.EMPTY_STRING,reaction:o??_t.EMPTY_STRING,feedback:a??_t.EMPTY_STRING,...s,item:r??_t.EMPTY_STRING};n&&i.push(n)}return{botResponses:i.length>0?i:void 0}}(0,0,p);break;case Y:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{title:t,__instructionString:r,unit:o,unitPlural:a,unitAbbr:s,unitAbbrPlural:n,decimalPlaces:l,disableCalculation:c,cardBodyStr:p,cardBody:u,...d}=e.data,m=Array.isArray(t)&&t.length>0?t[t.length-1].titleString:void 0;let h=!1,b=rr.asNumber(r);if(u&&u.bodyBits){const e=u.bodyBits.find(e=>e.type===Ye.select);e&&(b=e.__instructionString?rr.asNumber(e.__instructionString):b,e.options&&e.options.length>0&&(h=e.options[0].isCorrect))}const g={title:m,checked:h,ingredient:p,quantity:b,unit:o??_t.EMPTY_STRING,unitPlural:a,unitAbbr:s??_t.EMPTY_STRING,unitAbbrPlural:n,decimalPlaces:l??1,disableCalculation:c,...d};g&&i.push(g)}return{ingredients:i.length>0?i:void 0}}(0,0,p);break;case W:case H:case U:case Q:c=function(e,t,r,i){const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const{cardBody:t,...r}=e.data,i={body:t,...r};i&&o.push(i)}return{cardBits:o.length>0?o:void 0}}(0,0,0,p)}return c.internalComments=p.internalComments.length>0?p.internalComments:void 0,c}function Yr(e,t=!1){let r,i,o=!1;const a=[];let s,n=!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 r=t.variants[0].data,{title:c,__isDefaultExample:p,example:u}=r,d=c&&c[1].titleString;null!=d&&(o=!0),0===e?o&&(i=d,n=!0===p||n,s=u||s):o&&(a.push(d??""),n=!0===p||n,s=u||s)}if(o){let e=a;e=t?a:a.length>=1?a[a.length-1]:"",r={forKeys:i??"",forValues:e}}return r?{heading:r,isDefaultExampleCardSet:n,exampleCardSet:s}:void 0}function Qr(e,t,r,i,o){const{type:a,value:s}=i,{textFormat:n}=e,l=new er,c=g.trimmedString(s);switch(a){case Vr.Instruction:o.instruction=l.toAst(c,{format:n,location:rt}),o.__instructionString=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Vr.Hint:o.hint=l.toAst(c,{format:n,location:rt}),o.__hintString=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Vr.Anchor:o.anchor=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Vr.Reference:o.reference=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Vr.SampleSolution:o.sampleSolution=_t.unbreakscape(c,{format:S.bitmarkText,location:rt}),o.__sampleSolutionAst=l.toAst(c,{format:n,location:rt}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",i)}}var Zr=new er,Xr=new class{process(e,t,r,i,o,a){const{textFormat:s}=e;let n;o=o.trimStart(),a=a.trimEnd();const l=!!o.trim(),c=!!a.trim();let p=0;if(l&&c&&(p=g.countOccurrencesAtEnd(o,"\n")+g.countOccurrencesAtStart(a,"\n")),o||a){const r=s===S.bitmarkText;o&&(o=jr.checkFooter(e,t,o));const i=r?Zr.toAst(o,{format:s,location:it}):_t.unbreakscape(o,{format:S.plainText,location:it}),l=_t.unbreakscape(a,{format:S.plainText,location:it});n=Mr.concatenatePlainTextWithAstTexts(i,p,l)}return n?{footer:n}:void 0}},ei=r(722),ti=new er;function ri(e,t,r,i,o,a){if(t===Fr)!function(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=o.solutions,l=o.__solutionsAst;if(n&&l&&g.isString(s)){const e=g.trimmedString(s);n.push(_t.unbreakscape(e,{format:S.bitmarkText,location:rt}));const t=ti.toAst(e,{format:a,location:rt});l.push(t)}}(e,0,0,i,o);else{const t=function(e,t,r,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",i);const o=Le.getTagConfigForTag(r,(0,ei.Enum)(x).fromValue(i.type)),a=[i,...i.chain??[]],s=e.bitContentProcessor(Fr,o?.chain,a);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",s);const n={type:Ye.gap,...s};return n}(e,0,r,i);t&&a.push(t)}}var ii=r(722);function oi(e){const t=[e];if(e.chain)for(const r of e.chain)t.push(...oi(r));return t}function ai(e,t,r,i,o){t===Fr?function(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=new er,l=g.trimmedString(s);o.itemLead||(o.itemLead=[]);const c=n.toAst(l,{format:a,location:rt});o.itemLead.push(c),o.__itemLeadString||(o.__itemLeadString=[]),o.__itemLeadString.push(_t.unbreakscape(l,{format:S.bitmarkText,location:rt}))}(e,0,0,i,o):function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",i);const a=Le.getTagConfigForTag(r,(0,ii.Enum)(x).fromValue(i.type)),s=oi(i),n=e.bitContentProcessor(Fr,a?.chain,s);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",n);o.itemLead=n.itemLead,o.__itemLeadString=n.__itemLeadString}(e,0,r,i,o)}var si=r(722);function ni(e,t,r,i,o,a){if(t===Fr)!function(e,t,r,i){const{value:o}=r;g.isString(o)&&(i.solution=g.trimmedString(o))}(0,0,i,o);else{const t=function(e,t,r,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",i);const o=Le.getTagConfigForTag(r,(0,si.Enum)(x).fromValue(i.type)),a=e.bitContentProcessor(Fr,r,[i]),s=e.bitContentProcessor(Fr,o?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",s);const{solution:n}=a,{mark:l,...c}=s,p={type:Ye.mark,solution:n??"",mark:St.asSingle(l)??"",...c};return p}(e,0,r,i);t&&a.push(t)}}var li=r(722);function ci(e,t,r,i,o){t===Fr||function(e,t,r,i,o){const{bitConfig:a}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",i);const s=e.bitContentProcessor(Fr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",s);const{reference:n,referenceEnd:l}=s,c=_t.unbreakscape(g.trimmedString(i.value),{format:S.bitmarkText,location:rt}),p=a.tags[ye.property_book];if(p&&(p.maxCount===m||p.maxCount>1))return Array.isArray(o.book)||(o.book=[]),void o.book.push({book:c,reference:n??"",referenceEnd:l??void 0});o.book=c,o.reference=n,o.referenceEnd=l}(e,0,r,i,o)}var pi=new er;function ui(e,t,r,i){const{bitType:o}=e,{value:a}=r,s=a;Le.isOfBitType(o,[u.cloze,u.clozeAndMultipleChoiceText,u.multipleChoiceText,u.highlightText,u.trueFalse,u.trueFalse1,u.multipleResponse,u.multipleResponse1,u.multipleChoice,u.multipleChoice1])?function(e,t,r,i){const{bitType:o,textFormat:a}=e;let s;Array.isArray(i.trueFalse)&&i.trueFalse.length>0&&(s=i.trueFalse[i.trueFalse.length-1]??void 0);s?!0===r?(s.__isDefaultExample=!0,s.example=!!s.isCorrect):tr.isBooleanString(r)?s.example=tr.toBoolean(r):(s.__isDefaultExample=!0,s.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(i.__solutionsAst)&&i.__solutionsAst.length>0?i.example=!0===r?i.__solutionsAst[i.__solutionsAst.length-1]??void 0:r?pi.toAst(r,{format:a,location:rt}):void 0:Le.isOfBitType(o,[u.multipleChoiceText,u.highlightText,u.trueFalse,u.trueFalse1,u.multipleResponse,u.multipleResponse1])?function(e,t,r,i){if(!0===r)i.__isDefaultExample=!0,i.example=void 0;else{const o=r?_t.unbreakscape(r,{format:S.bitmarkText,location:rt}):void 0;tr.isBooleanString(o)?i.example=tr.toBoolean(o):(i.__isDefaultExample=!0,i.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,r,i):Le.isOfBitType(o,[u.clozeAndMultipleChoiceText,u.multipleChoice,u.multipleChoice1])?(i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):di(e,t,r,i)}(e,r,s,i):Le.isOfBitType(o,u.mark)?function(e,t,r,i){i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,r,s,i):di(e,r,s,i)}function di(e,t,r,i){const{textFormat:o}=e;!0===r||"true"===r?(i.__isDefaultExample=!0,i.example=void 0):i.example=r?pi.toAst(r,{format:o,location:rt}):void 0}var mi={groupKey:"groupTag",memberKey:"tag"},hi={groupKey:"accessibilityGroupTag",memberKey:"accessibilityTag"};function bi(e,t,r,i,o,a=mi){const{value:s}=i,{groupKey:n,memberKey:l}=a;e.DEBUG_CHAIN_CONTENT&&e.debugPrint(`${n} content`,i);const c=e.bitContentProcessor(Fr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint(`${n} TAGS`,c);const p=c[l],u={name:g.trimmedString(s)??"",tags:p??[]};Array.isArray(o[n])||(o[n]=[]),o[n].push(u)}var gi=r(722);function yi(e,t,r,i,o){t===Fr?function(e,t,r,i,o){const{value:a}=i,s=_t.unbreakscape(g.trimmedString(a),{format:S.bitmarkText,location:rt});o.imageSourceUrl=s}(0,0,0,i,o):function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",i);const{key:a}=i,s=Le.getTagConfigForTag(r,(0,gi.Enum)(ye).fromValue(a)),n=e.bitContentProcessor(Fr,r,[i]),l=e.bitContentProcessor(Fr,s?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",l);const{imageSourceUrl:c}=n,{mockupId:p,...u}=l;c||e.addWarning("[@imageSource] is missing the image url",i);p||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",i);const d={url:c??"",mockupId:p??"",...u};o.imageSource=d}(e,0,r,i,o)}var fi=r(722);function ki(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",i);const a=e.bitContentProcessor(Fr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",a);const{propertyTitle:s,resources:n}=a,l=_t.unbreakscape(g.trimmedString(i.value),{format:S.bitmarkText,location:rt}),c=g.trimmedString(s),p=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||y.image!==e.type?i.push(e):r=e;i.length>0&&e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`);return r}(e,n),u={name:l,title:c,avatarImage:p};o.person=u}var xi=new er;var vi=new er;function Ti(e,t,r,i,o){const{value:a}=i,{key:s}=i,n=t===Fr,l=Le.getTagConfigForTag(r,(0,li.Enum)(ge).fromValue(s)),c=l?l.configKey:void 0;let p=ke(s);if(c===ye.property_internalComment)return void function(e,t,r,i){if(!i.internalComments)return;const{value:o}=r,a=g.isString(o)?g.trimmedString(o):void 0;a&&i.internalComments.push(a)}(0,0,i,o);if(l){if(c===ye.property_example)return void ui(e,0,i,o);if(c===ye.property_groupTag)return void bi(e,0,l.chain,i,o);if(c===ye.property_accessibilityGroupTag)return void bi(e,0,l.chain,i,o,hi);if(c===ye.property_ratingLevelStart||c===ye.property_ratingLevelEnd)return void function(e,t,r,i,o){const{textFormat:a}=e,{key:s,value:n}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",i);const l=e.bitContentProcessor(Fr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",l);const{label:c}=l,p={level:rr.asNumber(n)??0,label:c?xi.toAst(c,{format:a,location:rt}):void 0};switch(s){case ye.property_ratingLevelStart:o.ratingLevelStart=p;break;case ye.property_ratingLevelEnd:o.ratingLevelEnd=p}}(e,0,l.chain,i,o);if(c===ye.property_technicalTerm)return void function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",i);const a=e.bitContentProcessor(Fr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",a);const{lang:s}=a,n={technicalTerm:_t.unbreakscape(g.trimmedString(i.value),{format:S.bitmarkText,location:rt}),lang:s};o.technicalTerm=n}(e,0,l.chain,i,o);if(c===ye.property_servings)return void function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",i);const a=e.bitContentProcessor(Fr,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",a);const{unit:s,unitPlural:n,unitAbbr:l,unitAbbrPlural:c,decimalPlaces:p,disableCalculation:u,__hintString:d}=a,m={servings:rr.asNumber(i.value)??1,unit:s,unitPlural:n,unitAbbr:l,unitAbbrPlural:c,decimalPlaces:p??1,disableCalculation:u,hint:d};o.servings=m}(e,0,l.chain,i,o);if(c===ye.property_person||c===ye.property_partner)return void ki(e,0,l.chain,i,o);if(c===ye.property_imageSource)return void yi(e,t,r,i,o);if(c===ye.property_book)return void ci(e,t,l.chain,i,o);if(c===ye.property_mark&&!n)return void function(e,t,r,i,o){const{key:a}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",i);const s=o.markConfig;if(!s)return;const n=Le.getTagConfigForTag(r,(0,fi.Enum)(ye).fromValue(a)),{mark:l,...c}=e.bitContentProcessor(Fr,n?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",c);const p={mark:_t.unbreakscape(g.trimmedString(i.value)??"unknown",{format:S.bitmarkText,location:rt}),emphasis:"underline",...c};p&&s.push(p)}(e,0,r,i,o);c===ye.property_title&&n&&(p="propertyTitle")}const u=(t,r,o,a)=>{if(o=(t=>{if(null!=t){if(a)switch(a.format){case v:return _t.unbreakscape(g.isString(t)?g.trimmedString(t):void 0,{format:S.plainText,location:rt});case A:{const o=_t.unbreakscape(g.isString(t)?g.trimmedString(t):void 0,{format:S.plainText,location:rt});return null==o||""===o?a.defaultValue??"":(a.values&&!a.values.includes(o)&&e.addWarning(`Invalid value '${o}' for property [@${r}]. Valid values: ${a.values.join(" | ")}`,i),o)}case _:return rr.asNumber(_t.unbreakscape(t,{format:S.plainText,location:rt}));case C:return tr.toBoolean(_t.unbreakscape(t,{format:S.plainText,location:rt}),!0);case w:return!tr.toBoolean(_t.unbreakscape(t,{format:S.plainText,location:rt}),!0);case T:return t=g.isString(t)?t:"",vi.toAst(t,{format:S.bitmarkText,location:rt});case B:const o=_t.unbreakscape(t,{format:S.plainText,location:rt});if(null==o)return;const s=o.split(",").map(e=>rr.asNumber(e.trim()));if(4!==s.length||s.some(e=>null==e))return;return s}return _t.unbreakscape(t,{format:S.plainText,location:rt})}})(o),null==a||a.array)if(Object.prototype.hasOwnProperty.call(t,r)){const e=t[r];t[r]=[...e,o]}else t[r]=[o];else t[r]=o};u(l?o:o.extraProperties,p,a,l),c===ye.property_sampleSolution&&u(o,"__sampleSolutionAst",a,new le({configKey:ye.property_sampleSolution,tag:"sampleSolution",maxCount:1,minCount:1,chain:void 0,jsonKey:void 0,exportJsonKey:void 0,hasExportJsonKey:!1,htmlKey:void 0,hasHtmlKey:!1,format:T,values:void 0,defaultValue:void 0,deprecated:void 0}))}function _i(e,t,r,i,o){const{value:a,chain:s}=i,n=g.trimmedString(a);if(o.reference=_t.unbreakscape(n,{format:S.bitmarkText,location:rt}),Array.isArray(s)&&s.length>0){const t=e.bitContentProcessor(Fr,r,s);null!=t.reference&&(o.referenceEnd=t.reference)}}var Ci=r(722),wi=new cr;function Ai(e,t,r,i,o){const{type:a,key:s,value:n,chain:l}=i,c=o.resources;if(!c)return;const p=(0,Ci.Enum)(ye).fromValue(s);if(!p)return;const u=(0,Ci.Enum)(y).fromKey(p.replace(/^&/,""))??y.unknown,d=Le.getTagConfigForTag(r,p),{posterImage:m,...h}=e.bitContentProcessor(Fr,d?.chain,l);let b;if(m){const{subConfig:t,subChain:r}=function(e,t,r){let i;e&&(i=e[r]?.chain);const o=t?.reduce((e,t)=>{if(e)return e;const i=t;return i.key===r?i.chain:void 0},void 0);return{subConfig:i,subChain:o}}(d?.chain,l,ye.property_posterImage),{posterImage:i,...o}=e.bitContentProcessor(Fr,t,r);b=wi.resource(e,{type:y.image,value:m,...o}).image}const g=wi.resource(e,{type:u,value:_t.unbreakscape(n,{format:S.bitmarkText,location:rt}),posterImage:b,...h});g&&(p===ye.resource_backgroundWallpaper||p===ye.resource_imagePlaceholder||p===ye.resource_platformIcon||p===ye.resource_platformLogo||p===ye.resource_platformBackgroundImage||p===ye.resource_previewImage||p===ye.resource_previewVideo||p===ye.resource_coverImage||p===ye.resource_backgroundImage?o.propertyStyleResources&&(o.propertyStyleResources[u]?(Array.isArray(o.propertyStyleResources[u])||(o.propertyStyleResources[u]=[o.propertyStyleResources[u]]),o.propertyStyleResources[u].push(g)):o.propertyStyleResources[u]=g):c.push(g))}var Bi=new er;function Si(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=o.title;if(!n)return;const l=s,c=g.trimmedString(l.title);n[l.level.length]={titleAst:Bi.toAst(c??"",{format:a,location:rt}),titleString:c??""}}var Pi=new er;function Ii(e,t,r,i,o,a){t===Fr?function(e,t,r,i){const{textFormat:o}=e,{type:a,value:s}=r,n=i.trueFalse;if(!n)return;const l=_t.unbreakscape(g.trimmedString(s),{format:S.bitmarkText,location:rt}),c=Pi.toAst(l??"",{format:o,location:rt});n.push({text:l,textAst:c,isCorrect:a===Vr.True,__isDefaultExample:!1})}(e,0,i,o):function(e,t,r,i,o,a){const{bitType:s}=e,n=[i,...i.chain??[]],l=o.statements,c=o.choices,p=o.responses;if(!(l&&c&&p&&a))return;if(Le.isOfBitType(s,u.trueFalse1))o.statement=function(e,t,r){const{bitType:i}=e;if(!Le.isOfBitType(i,u.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",r);const{trueFalse:o,...a}=e.bitContentProcessor(Fr,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",a);let s,n;o&&o.length>0&&(n=o[0]);if(n){const{statement:e,...t}=a;s={...n,statement:n.text,...t}}return s}(e,r,n);else if(Le.isOfBitType(s,[u.trueFalse,u.multipleChoice,u.multipleChoice1,u.multipleResponse,u.multipleResponse1,u.feedback])){const t=function(e,t,r){const{bitType:i}=e,o=Le.isOfBitType(i,u.trueFalse),a=Le.isOfBitType(i,[u.multipleChoice,u.multipleChoice1,u.feedback]),s=Le.isOfBitType(i,[u.multipleResponse,u.multipleResponse1]);if(!o&&!a&&!s)return{};const n=[],l=[],c=[],p=e.splitBitContent(r,[Vr.True,Vr.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",p);for(const r of p){const{trueFalse:i,...p}=e.bitContentProcessor(Fr,t,r);let u;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",p),i&&i.length>0&&(u=i[0]),u)if(o){const{statement:e,...t}=p,r={...u,statement:u.textAst??[],...t};r&&n.push(r)}else if(a){const e={...u,choice:u.text,...p};e&&l.push(e)}else if(s){const e={...u,response:u.text,...p};e&&c.push(e)}}const d={};o?d.statements=n:a?d.choices=l:s&&(d.responses=c);return d}(e,r,n);t.statements&&l.push(...t.statements),t.choices&&c.push(...t.choices),t.responses&&p.push(...t.responses)}else if(Le.isOfBitType(s,u.highlightText)){const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",r);const{trueFalse:i,...o}=e.bitContentProcessor(Fr,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",{trueFalse:i,...o});const a=[];if(i)for(const e of i){const t={...e,isHighlighted:!1};t&&a.push(t)}const s={type:Ye.highlight,texts:a,...o};return s}(e,r,n);t&&a.push(t)}else{const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",r);const{trueFalse:i,...o}=e.bitContentProcessor(Fr,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",{trueFalse:i,...o});const a=[];if(i)for(const e of i){const t=e;t&&a.push(t)}const s={type:Ye.select,options:a,...o};return s}(e,r,n);t&&a.push(t)}}(e,0,r,i,o,a)}var Ei=!1,Li=!0,Ni=!0,Vi=!0,Ri=!0,Gi=new pr,Fi=class{constructor(e){l(this,"context"),l(this,"nonFatalWarnings",[]),l(this,"nonFatalErrors",[]),l(this,"parser",{}),l(this,"parse"),l(this,"parserText"),l(this,"parserLocation"),this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:Le.getBitConfig(u._error),bitType:u._error,textFormat:S.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:Ei,DEBUG_BIT_CONTENT:Li,DEBUG_BIT_TAGS:Ni,DEBUG_BODY:Vi,DEBUG_FOOTER:Ri,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){const t=[];let r=[];for(const i of e){if(!i)continue;const e=i.value;e?t.push(e):r=r.concat(i.errors??[])}return Gi.buildBitmark({bits:t,errors:r.length>0?r:void 0})}buildBit(e,t){const{bitType:r,textFormat:i,resourceType:o,bitLevel:a,isCommented:s}=e;if(!r||Le.isOfBitType(r,u._error))return this.invalidBit();const n=Le.getBitConfig(r);this.context.bitConfig=n,this.context.bitType=r,this.context.textFormat=i,this.context.resourceType=o;const l=Le.isOfBitType(r,u.trueFalse1),c=Le.isOfBitType(r,u.multipleChoice1),p=Le.isOfBitType(r,u.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=jr.validateBitTags(this.context,t);const{body:d,footer:h,cardSet:b,title:g,statement:f,statements:k,choices:x,responses:v,propertyStyleResources:T,resources:_,posterImage:C,internalComments:w,...A}=this.bitContentProcessor(Rr,n.tags,t);this.debugPrint("BIT TAGS",A),this.debugPrint("BIT BODY",d),this.debugPrint("BIT FOOTER",h);const B=function(e,t,r){if(r=r??[],Le.isOfBitType(t,u.chapter)){let e;return r.length>0&&(e=r[r.length-1]),{title:e?.titleAst??[],titleString:e?.titleString??"",level:r.length>0?r.length-1:void 0}}return Array.isArray(r)?{title:r[1]?.titleAst??void 0,titleString:r[1]?.titleString??void 0,subtitle:r[2]?.titleAst??void 0,subtitleString:r[2]?.titleString??void 0}:{title:void 0,titleString:r??void 0,subtitle:void 0,subtitleString:void 0}}(this.context,r,g),S=Wr(this.context,r,0,b,f,k,x,v),P=function(e,t,r){const{bitType:i}=e,o=[],a=[],s=(0,Ci.Enum)(y).fromValue(t),n=Le.getBitResourcesConfig(i,s),l=n.resourceAttachmentAllowed,c=n.getCountsMin(),p=n.getCountsMax();if(r)for(const t of r.reverse()){const r=t.__configKey;let i=c.get(r)??0,s=p.get(r)??0;i=Math.max(0,i-1),s===m?o.unshift(t):s>0?(o.unshift(t),s--):a.unshift(t),c.set(r,i),p.set(r,s),t.__invalid&&e.addWarning(`Resource type [&${t.type}] is not valid`)}if(!l&&t){const r=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(r)}else 0===o.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such resource is present`);return a.forEach(e=>{e.__excessResource=!0,o.push(e)}),o}(this.context,o,_),I=[...w??[],...S.internalComments??[]],E=this.buildBitLevelWarnings(),L=this.buildBitLevelErrors();E&&(this.parser.warnings=E),L&&(this.parser.errors=L);return{value:Gi.buildBit({bitType:r,bitLevel:a,isCommented:s,textFormat:i,resourceType:o,...B,posterImage:C,statement:l?f:void 0,choices:c?x:void 0,responses:p?v:void 0,...A,...T,resources:P,...S,body:d,footer:h,internalComment:I,parser:this.parser})}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:Gi.buildBit({bitType:Le.getBitType(u._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,r){const i=_t.unbreakscape(e,{format:S.plainText,location:rt}),o=Le.getBitType(i),a=Le.isBitTypeCommented(i);Le.isOfBitType(o,u._error)&&this.addError(`Invalid bit type: '${i}'`);const s=Le.getBitConfig(o);t>Le.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${Le.bitLevelMax}`),t=Le.bitLevelMax):t<Le.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${Le.bitLevelMin}`),t=Le.bitLevelMin);let n=(0,Or.Enum)(S).fromValue(r.textFormat);r.textFormat&&!n&&this.addWarning(`Invalid text format '${r.textFormat}', defaulting to '${ot.bitmarkPlusPlus}'`);const l=(0,Or.Enum)(Ct).fromValue(r.textFormat);l&&(n=S.bitmarkText,this.addWarning(`${l} text format is deprecated. Bit will be parsed as '${ot.bitmarkPlusPlus}'`)),n=n??s.textFormatDefault;const c=(0,Or.Enum)(y).fromValue(r.resourceType);return r.resourceType&&!c&&this.addWarning(`Invalid resource type '${r.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:n??s.textFormatDefault,resourceType:c,isCommented:a}}buildTextAndResourceType(e,t){const r={},i=e=>{if(e){const t=_t.unbreakscape(g.string(e.value),{format:S.plainText,location:rt});e.type===Vr.TextFormat?r.textFormat=t:r.resourceType=t}};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:r}=this.context,i=r===S.bitmarkText,o=(e,t="")=>{const{chain:r,parser:i}=e;if(t+=i.text,r)for(const e of r)t=o(e,t);return t};let a=!1;for(const r of e){const{type:e,value:s}=r,n=s??"";let l=!1;if(a||(e===Vr.BodyText&&!i&&n&&n.trim()&&(a=!0),e===Vr.PlainTextDivider&&(a=!0,l=!0)),l)t.push({type:Vr.BodyText,value:"\n"});else if(a)if(e===Vr.BodyText)t.push({type:Vr.BodyTextPlain,value:s});else{const e=o(r);t.push({type:Vr.BodyTextPlain,value:e})}else t.push(r)}return t}bitContentProcessor(e,t,r){const i={};if(!r)return i;const{bitType:o,textFormat:a}=this.context;i.title=[],i.solutions=[],i.__solutionsAst=[],i.statements=[],i.choices=[],i.responses=[],i.propertyStyleResources={},i.resources=[],i.trueFalse=[],i.markConfig=[],i.extraProperties={},i.internalComments=[];let s=!1;const n=[];let l=_t.EMPTY_STRING,c=_t.EMPTY_STRING,p=_t.EMPTY_STRING,u=_t.EMPTY_STRING;const d=e===Rr,m=e===Gr,h=e===Fr,b=()=>{if(l){l=jr.checkBodyPart(this.context,e,l);const t=Ur.buildBodyText(l,!1);n.push(t)}l=_t.EMPTY_STRING};for(const o of r){const{type:r,value:a}=o;switch(r){case Vr.ItemLead:ai(this.context,e,t,o,i);break;case Vr.Instruction:case Vr.Hint:case Vr.Anchor:case Vr.SampleSolution:Qr(this.context,0,0,o,i);break;case Vr.Reference:_i(this.context,0,t,o,i);break;case Vr.Title:Si(this.context,0,0,o,i);break;case Vr.Property:Ti(this.context,e,t,o,i);break;case Vr.Gap:h||b(),ri(this.context,e,t,o,i,n);break;case Vr.Mark:h||b(),ni(this.context,e,t,o,i,n);break;case Vr.True:case Vr.False:h||b(),Ii(this.context,e,t,o,i,n);break;case Vr.Resource:Ai(this.context,0,t,o,i);break;case Vr.CardSet:i.cardSet=a,s=!0;break;case Vr.BodyText:case Vr.CardText:s?c=_t.concatenate(c,a):l=_t.concatenate(l,a);break;case Vr.BodyTextPlain:s?u=_t.concatenate(u,a):p=_t.concatenate(p,a);break;case Vr.FooterDivider:s&&(c=_t.concatenate(c,a)),s=!0}}b();const g=p?Ur.buildBodyText(p,!0):void 0;if(g&&n.push(g),i.itemLead){const e=i.itemLead.length;e>0&&(i.item=i.itemLead[0]),e>1&&(i.lead=i.itemLead[1]),e>2&&(i.pageNumber=i.itemLead[2]),e>3&&(i.marginNumber=i.itemLead[e-1])}if(i.__itemLeadString){const e=i.__itemLeadString.length;e>0&&(i.__itemString=i.__itemLeadString[0]),e>1&&(i.__leadString=i.__itemLeadString[1]),e>2&&(i.__pageNumberString=i.__itemLeadString[2]),e>3&&(i.__marginNumberString=i.__itemLeadString[e-1])}return d?i.body=Ur.process(this.context,e,o,a,t,i,n,!1):m&&(i.cardBody=Ur.process(this.context,e,o,a,t,i,n,!0)),i.footer=Xr.process(this.context,e,t,i,c,u),0===Object.keys(i.extraProperties).length&&delete i.extraProperties,0===i.title.length&&delete i.title,0===i.solutions.length&&delete i.solutions,0===i.statements.length&&delete i.statements,0===i.choices.length&&delete i.choices,0===i.responses.length&&delete i.responses,0===i.trueFalse.length&&delete i.trueFalse,0===i.markConfig.length&&delete i.markConfig,0===Object.keys(i.propertyStyleResources).length&&delete i.propertyStyleResources,0===i.resources.length&&delete i.resources,0===i.internalComments.length&&delete i.internalComments,i}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 r=[];let i=[];for(const o of e)t.includes(o.type)&&(i.length>0&&r.push(i),i=[]),i.push(o);return i.length>0&&r.push(i),r}addWarning(e,t,r){const i={message:e,text:t?.parser.text??this.parserText(),location:t?.parser.location??this.parserLocation(),original:r?.parser??void 0};i.original||delete i.original,this.nonFatalWarnings.push(i)}addError(e,t,r){const i={message:e,text:t?.parser.text??this.parserText(),location:t?.parser.location??this.parserLocation(),original:r?.parser??void 0};i.original||delete i.original,this.nonFatalErrors.push(i)}debugPrint(e,t){}},Ki=class extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,i="".padEnd(a.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+a.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function a(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const n={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(((c=t)?'"'+a(c)+'"':"end of input")+" found.");var c}};var $i=function e(t,r){const i={},o=(r=void 0!==r?r:{}).grammarSource,a={bitmark:nt,bit:function(){let e,t,r,o,a;e=Me,t=[],r=Nt();for(;r!==i;)t.push(r),r=Nt();if(r=pt(),r!==i){for(o=[],a=Nt();a!==i;)o.push(a),a=Nt();He=e,e=r}else Me=e,e=i;return e},cardContent:function(){let e,t,r;e=Me,t=[],r=ht(),r===i&&(r=wt());for(;r!==i;)t.push(r),r=ht(),r===i&&(r=wt());return He=e,t=je(t),e=t,e}};let s=nt;const n="[.",l="]",c="[",p=":",u="&",d="$$$$",m="====",h="text",b="~~~~",g="footer",y=" ",f="--",k="++",x="===",v="==",T="[@id",_="#",C="[▼",w="[►",A="[@",B="[%",S="[!",P="[?",I="[+",E="[-",L="[$",N="[_",V="[=",R="[&",G="^]",F="id:",K=".",$="\n",O="\r\n",J=/^[^\]]/,D=/^[a-z]/,z=/^[a-z0-9\-]/,q=/^[^:\]]/,j=/^[^&:\]]/,M=/^[^\n\r\u2028\u2029]/,H=/^[ \t]/,U=/^[\r\u2028-\u2029]/,W=/^[ \t\n\r\u2028\u2029]/,Y=et("[.",!1),Q=tt(["]"],!0,!1,!1),Z=et("]",!1),X=et("[",!1),ee=et(":",!1),te=et("&",!1),re={type:"any"},ie=et("$$$$",!1),oe=et("====",!1),ae=et("text",!1),se=et("~~~~",!1),ne=et("footer",!1),le=et(" ",!1),ce=et("--",!1),pe=et("++",!1),ue=et("===",!1),de=et("==",!1),me=tt([["a","z"]],!1,!1,!1),he=tt([["a","z"],["0","9"],"-"],!1,!1,!1),be=et("[@id",!1),ge=et("#",!1),ye=et("[▼",!1),fe=et("[►",!1),ke=et("[@",!1),xe=et("[%",!1),ve=et("[!",!1),Te=et("[?",!1),_e=et("[+",!1),Ce=et("[-",!1),we=et("[$",!1),Ae=et("[_",!1),Be=et("[=",!1),Se=et("[&",!1),Pe=et("^]",!1),Ie=et("id:",!1),Ee=tt([":","]"],!0,!1,!1),Le=et(".",!1),Ne=tt(["&",":","]"],!0,!1,!1),Ve=rt("Character"),Re=tt(["\n","\r","\u2028","\u2029"],!0,!1,!1),Ge=rt("Blank Line"),Fe=tt([" ","\t"],!1,!1,!1),Ke=rt("Line Terminator"),$e=et("\n",!1),Oe=et("\r\n",!1),Je=tt(["\r",["\u2028","\u2029"]],!1,!1,!1),De=rt("Whitespace, then Line Terminator"),ze=rt("whitespace"),qe=tt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1,!1);function je(e){return $t.handleCardContent(e)}let Me=0|r.peg$currPos,He=Me;const Ue=[{line:1,column:1}];let We,Ye=Me,Qe=r.peg$maxFailExpected||[],Ze=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in a))throw new Error("Can't start parsing from rule \""+r.startRule+'".');s=a[r.startRule]}function Xe(){return t.substring(He,Me)}function et(e,t){return{type:"literal",text:e,ignoreCase:t}}function tt(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function rt(e){return{type:"other",description:e}}function it(e){let r,i=Ue[e];if(i)return i;if(e>=Ue.length)r=Ue.length-1;else for(r=e;!Ue[--r];);for(i=Ue[r],i={line:i.line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Ue[e]=i,i}function ot(e,t,r){const i=it(e),a=it(t),s={source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return r&&o&&"function"==typeof o.offset&&(s.start=o.offset(s.start),s.end=o.offset(s.end)),s}function at(e){Me<Ye||(Me>Ye&&(Ye=Me,Qe=[]),Qe.push(e))}function st(e,t,r){return new Ki(Ki.buildMessage(e,t),e,t,r)}function nt(){let e;return e=function(){let e,r,o,a;e=Me,r=[],o=Gt();for(;o!==i;)r.push(o),o=Gt();return o=function(){let e,r,o,a;e=Me,r=Me,o=[],a=ct();for(;a!==i;)o.push(a),a=ct();return r=t.substring(r,Me),He=e,r=function(e){return $t.handleRawBit(e)}(r),e=r,e}(),a=function(){let e,t;e=[],t=lt();for(;t!==i;)e.push(t),t=lt();return e}(),He=e,e=function(e,t){return Ot.buildBits([e,...t])}(o,a),e}(),e}function lt(){let e,r,o,a;for(e=Me,r=[],o=Nt();o!==i;)r.push(o),o=Nt();return o=Vt(),o===i&&(o=null),a=function(){let e,r,o,a,s,c;if(e=Me,r=Me,o=Me,a=function(){let e,r,o,a;e=Me,t.substr(Me,2)===n?(r=n,Me+=2):(r=i,0===Ze&&at(Y));if(r!==i){for(o=[],a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q));a!==i;)o.push(a),a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q));93===t.charCodeAt(Me)?(a=l,Me++):(a=i,0===Ze&&at(Z)),a!==i?(He=e,e=r):(Me=e,e=i)}else Me=e,e=i;return e}(),a!==i){for(s=[],c=ct();c!==i;)s.push(c),c=ct();a=[a,s],o=a}else Me=o,o=i;r=o!==i?t.substring(r,Me):o;r!==i&&(He=e,p=r,r=$t.handleRawBit(p));var p;return e=r,e}(),a!==i?(He=e,e=a):(Me=e,e=i),e}function ct(){let e,t,r,o;if(e=Me,t=Vt(),t!==i?(r=Me,Ze++,o=ut(),Ze--,o===i?r=void 0:(Me=r,r=i),r!==i?(t=[t,r],e=t):(Me=e,e=i)):(Me=e,e=i),e===i)if(e=[],t=Et(),t!==i)for(;t!==i;)e.push(t),t=Et();else e=i;return e}function pt(){let e,r,o;var a,s,n;return e=Me,r=ut(),r!==i?(o=function(){let e,t,r;e=Me,t=[],r=ft(),r===i&&(r=xt(),r===i&&(r=Tt(),r===i&&(r=ht(),r===i&&(r=yt()))));for(;r!==i;)t.push(r),r=ft(),r===i&&(r=xt(),r===i&&(r=Tt(),r===i&&(r=ht(),r===i&&(r=yt()))));return He=e,t=function(e){return $t.handleBitContent(e)}(t),e=t,e}(),He=e,a=r,s=o,e=Ot.buildBit(a,s)):(Me=e,e=i),e===i&&(e=Me,r=Me,o=function(){let e,r;Ze++,e=[],t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re));for(;r!==i;)e.push(r),t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re));return Ze--,e}(),r=t.substring(r,Me),He=e,n=r,r=Ot.invalidBit(n),e=r),e}function ut(){let e,r,o,a,s,n;var p,u,d;return e=Me,91===t.charCodeAt(Me)?(r=c,Me++):(r=i,0===Ze&&at(X)),r!==i?(o=function(){let e,r,o;e=Me,r=[],46===t.charCodeAt(Me)?(o=K,Me++):(o=i,0===Ze&&at(Le));if(o!==i)for(;o!==i;)r.push(o),46===t.charCodeAt(Me)?(o=K,Me++):(o=i,0===Ze&&at(Le));else r=i;r!==i&&(He=e,r=r.length);return e=r,e}(),o!==i?(a=Pt(),s=function(){let e,t,r;e=Me,t=dt(),t===i&&(t=mt());t===i&&(t=null);r=dt(),r===i&&(r=mt());r===i&&(r=null);return He=e,e=function(e,t){return Ot.buildTextAndResourceType(e,t)}(t,r),e}(),93===t.charCodeAt(Me)?(n=l,Me++):(n=i,0===Ze&&at(Z)),n!==i?(He=e,p=o,u=a,d=s,e=Ot.buildBitHeader(u,p,d)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i),e}function dt(){let e,r,o;var a;return e=Me,58===t.charCodeAt(Me)?(r=p,Me++):(r=i,0===Ze&&at(ee)),r!==i?(o=Pt(),He=e,a=o,e=$t.handleTextFormat(a)):(Me=e,e=i),e}function mt(){let e,r,o;var a;return e=Me,38===t.charCodeAt(Me)?(r=u,Me++):(r=i,0===Ze&&at(te)),r!==i?(o=Pt(),He=e,a=o,e=$t.handleResourceType(a)):(Me=e,e=i),e}function ht(){let e,t,r,o,a;if(e=Me,t=Me,r=gt(),r!==i){for(o=[],a=bt();a!==i;)o.push(a),a=bt();r=[r,o],t=r}else Me=t,t=i;var s;return t!==i&&(He=e,s=t,t=$t.handleTagChain(s)),e=t,e}function bt(){let e,t;return e=Me,t=gt(),t!==i&&(He=e),e=t,e}function gt(){let e,r;var o;return e=Me,r=function(){let e,r,o,a;e=Me,t.substr(Me,4)===T?(r=T,Me+=4):(r=i,0===Ze&&at(be));r!==i?(o=It(),o!==i?(a=function(){let e;93===t.charCodeAt(Me)?(e=l,Me++):(e=i,0===Ze&&at(Z));return e}(),a!==i?(He=e,s=o,e=$t.handlePropertyTag("id",s)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=Me,t.substr(Me,2)===A?(r=A,Me+=2):(r=i,0===Ze&&at(ke));r!==i?(o=Bt(),o!==i?(a=It(),a!==i?(s=St(),s!==i?(He=e,n=o,l=a,e=$t.handlePropertyTag(n,l)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);var n,l;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=Me,91===t.charCodeAt(Me)?(r=c,Me++):(r=i,0===Ze&&at(X));if(r!==i){if(o=[],35===t.charCodeAt(Me)?(a=_,Me++):(a=i,0===Ze&&at(ge)),a!==i)for(;a!==i;)o.push(a),35===t.charCodeAt(Me)?(a=_,Me++):(a=i,0===Ze&&at(ge));else o=i;o!==i?(a=At(),s=St(),s!==i?(He=e,n=o,l=a,e=$t.handleTag(Vr.Title,{level:n,title:l})):(Me=e,e=i)):(Me=e,e=i)}else Me=e,e=i;var n,l;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===C?(r=C,Me+=2):(r=i,0===Ze&&at(ye));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.Anchor,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===w?(r=w,Me+=2):(r=i,0===Ze&&at(fe));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.Reference,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===B?(r=B,Me+=2):(r=i,0===Ze&&at(xe));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.ItemLead,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===S?(r=S,Me+=2):(r=i,0===Ze&&at(ve));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.Instruction,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===P?(r=P,Me+=2):(r=i,0===Ze&&at(Te));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.Hint,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===N?(r=N,Me+=2):(r=i,0===Ze&&at(Ae));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.Gap,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===V?(r=V,Me+=2):(r=i,0===Ze&&at(Be));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.Mark,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===L?(r=L,Me+=2):(r=i,0===Ze&&at(we));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.SampleSolution,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===I?(r=I,Me+=2):(r=i,0===Ze&&at(_e));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.True,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===E?(r=E,Me+=2):(r=i,0===Ze&&at(Ce));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Vr.False,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=Me,t.substr(Me,2)===R?(r=R,Me+=2):(r=i,0===Ze&&at(Se));r!==i?(o=Bt(),o!==i?(a=It(),a!==i?(s=St(),s!==i?(He=e,n=o,l=a,e=$t.handleResourceTag(n,l)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);var n,l;return e}()))))))))))))),r!==i&&(He=e,o=r,r=$t.handleBitTag(o)),e=r,e}function yt(){let e,r;return e=Me,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),r!==i&&(He=e,r={type:Vr.BodyChar,value:r}),e=r,e}function ft(){let e;return e=function(){let e,t,r,o,a;e=Me,t=Me,r=Vt(),r!==i?(o=kt(),o!==i?(a=Rt(),a!==i?(r=[r,o,a],t=r):(Me=t,t=i)):(Me=t,t=i)):(Me=t,t=i);t!==i&&(He=e,s=t,t=$t.handleFooterDivider(s));var s;return e=t,e}(),e===i&&(e=function(){let e,r,o,a,s;e=Me,r=Me,o=Vt(),o!==i?(a=function(){let e,r,o,a,s,n;t.substr(Me,4)===d?(e=d,Me+=4):(e=i,0===Ze&&at(ie));if(e===i)if(e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe)),r!==i){if(o=[],a=Gt(),a!==i)for(;a!==i;)o.push(a),a=Gt();else o=i;if(o!==i)if(t.substr(Me,4)===h?(a=h,Me+=4):(a=i,0===Ze&&at(ae)),a!==i){if(s=[],n=Gt(),n!==i)for(;n!==i;)s.push(n),n=Gt();else s=i;s!==i?(t.substr(Me,4)===m?(n=m,Me+=4):(n=i,0===Ze&&at(oe)),n!==i?(r=[r,o,a,s,n],e=r):(Me=e,e=i)):(Me=e,e=i)}else Me=e,e=i;else Me=e,e=i}else Me=e,e=i;return e}(),a!==i?(s=Rt(),s!==i?(o=[o,a,s],r=o):(Me=r,r=i)):(Me=r,r=i)):(Me=r,r=i);r!==i&&(He=e,n=r,r=$t.handlePlainTextDivider(n));var n;return e=r,e}()),e}function kt(){let e,r,o,a,s,n;if(t.substr(Me,4)===b?(e=b,Me+=4):(e=i,0===Ze&&at(se)),e===i)if(e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe)),r!==i){if(o=[],a=Gt(),a!==i)for(;a!==i;)o.push(a),a=Gt();else o=i;if(o!==i)if(t.substr(Me,6)===g?(a=g,Me+=6):(a=i,0===Ze&&at(ne)),a!==i){if(s=[],n=Gt(),n!==i)for(;n!==i;)s.push(n),n=Gt();else s=i;s!==i?(t.substr(Me,4)===m?(n=m,Me+=4):(n=i,0===Ze&&at(oe)),n!==i?(r=[r,o,a,s,n],e=r):(Me=e,e=i)):(Me=e,e=i)}else Me=e,e=i;else Me=e,e=i}else Me=e,e=i;return e}function xt(){let e,r,o,a,s;if(e=Me,r=Me,o=function(){let e,r,o,a;e=Me,r=[],o=Rt(),o===i&&(o=Vt());if(o!==i)for(;o!==i;)r.push(o),o=Rt(),o===i&&(o=Vt());else r=i;r!==i?(o=Me,Ze++,a=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe));r!==i?(o=Me,32===t.charCodeAt(Me)?(a=y,Me++):(a=i,0===Ze&&at(le)),a!==i?(s=Ct(),s!==i?(32===t.charCodeAt(Me)?(n=y,Me++):(n=i,0===Ze&&at(le)),n!==i?(t.substr(Me,4)===m?(l=m,Me+=4):(l=i,0===Ze&&at(oe)),l!==i?(a=[a,s,n,l],o=a):(Me=o,o=i)):(Me=o,o=i)):(Me=o,o=i)):(Me=o,o=i),o===i&&(o=null),a=Rt(),a===i&&(a=Kt()),a!==i?(r=[r,o,a],e=r):(Me=e,e=i)):(Me=e,e=i);return e}(),Ze--,a!==i?(Me=o,o=void 0):o=i,o!==i?(He=e,e=void $t.handleCardSetStart()):(Me=e,e=i)):(Me=e,e=i);return e}(),o!==i){for(a=[],s=vt();s!==i;)a.push(s),s=vt();s=function(){let e,t,r,o,a;e=Me,t=Me,r=kt(),r===i&&(r=null);o=Me,Ze++,a=Kt(),Ze--,a!==i?(Me=o,o=void 0):o=i;o!==i?(r=[r,o],t=r):(Me=t,t=i);t!==i&&(He=e,t=void $t.handleCardSetEnd());return e=t,e}(),s!==i?(o=[o,a,s],r=o):(Me=r,r=i)}else Me=r,r=i;var n;return r!==i&&(He=e,n=r,r=$t.handleCardSet(n[1].flat())),e=r,e}function vt(){let e,r;var o;return e=Me,r=function(){let e,r;e=Me,r=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe));r!==i?(32===t.charCodeAt(Me)?(o=y,Me++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(Me)?(s=y,Me++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(Me,4)===m?(n=m,Me+=4):(n=i,0===Ze&&at(oe)),n!==i?(l=Rt(),l===i&&(l=Kt()),l!==i?(He=e,e=["====",a]):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);e===i&&(e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe)),r!==i?(o=Rt(),o===i&&(o=Kt()),o!==i?(He=e,e=["===="]):(Me=e,e=i)):(Me=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,2)===f?(r=f,Me+=2):(r=i,0===Ze&&at(ce));r!==i?(32===t.charCodeAt(Me)?(o=y,Me++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(Me)?(s=y,Me++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(Me,2)===f?(n=f,Me+=2):(n=i,0===Ze&&at(ce)),n!==i?(l=Rt(),l===i&&(l=Kt()),l!==i?(He=e,e=["--",a]):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);e===i&&(e=Me,t.substr(Me,2)===f?(r=f,Me+=2):(r=i,0===Ze&&at(ce)),r!==i?(o=Rt(),o===i&&(o=Kt()),o!==i?(He=e,e=["--"]):(Me=e,e=i)):(Me=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,2)===k?(r=k,Me+=2):(r=i,0===Ze&&at(pe));r!==i?(32===t.charCodeAt(Me)?(o=y,Me++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(Me)?(s=y,Me++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(Me,2)===k?(n=k,Me+=2):(n=i,0===Ze&&at(pe)),n!==i?(l=Rt(),l===i&&(l=Kt()),l!==i?(He=e,e=["++",a]):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);e===i&&(e=Me,t.substr(Me,2)===k?(r=k,Me+=2):(r=i,0===Ze&&at(pe)),r!==i?(o=Rt(),o===i&&(o=Kt()),o!==i?(He=e,e=["++"]):(Me=e,e=i)):(Me=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n;e=Me,r=Me,Ze++,o=Me,a=kt(),a!==i?(s=Kt(),s!==i?(a=[a,s],o=a):(Me=o,o=i)):(Me=o,o=i);Ze--,o===i?r=void 0:(Me=r,r=i);if(r!==i){if(o=Me,a=Me,s=Lt(),n=Vt(),n!==i?(s=[s,n],a=s):(Me=a,a=i),a===i){if(a=Me,s=[],n=Et(),n!==i)for(;n!==i;)s.push(n),n=Et();else s=i;s!==i?(n=Ft(),n!==i?(s=[s,n],a=s):(Me=a,a=i)):(Me=a,a=i)}o=a!==i?t.substring(o,Me):a,o!==i?(He=e,l=o,e=$t.handleCardLine(l)):(Me=e,e=i)}else Me=e,e=i;var l;return e}())));r!==i&&(He=e,o=r,r=$t.handleCardLineOrDivider(o,2));var o;return e=r,e}(),r!==i&&(He=e,o=r,r=$t.handleCards(o)),e=r,e}function Tt(){let e,r,o,a,s;if(e=Me,r=Me,o=function(){let e,r,o,a,s,n;e=Me,r=[],o=Rt(),o===i&&(o=Vt());if(o!==i)for(;o!==i;)r.push(o),o=Rt(),o===i&&(o=Vt());else r=i;r!==i?(o=Me,Ze++,a=Me,t.substr(Me,3)===x?(s=x,Me+=3):(s=i,0===Ze&&at(ue)),s!==i?(n=Rt(),n!==i?(s=[s,n],a=s):(Me=a,a=i)):(Me=a,a=i),Ze--,a!==i?(Me=o,o=void 0):o=i,o!==i?(He=e,e=void $t.handleCardSetStart()):(Me=e,e=i)):(Me=e,e=i);return e}(),o!==i){for(a=[],s=_t();s!==i;)a.push(s),s=_t();s=function(){let e,t,r,o,a;e=Me,t=Me,r=kt(),r===i&&(r=null);o=Me,Ze++,a=Kt(),Ze--,a!==i?(Me=o,o=void 0):o=i;o!==i?(r=[r,o],t=r):(Me=t,t=i);t!==i&&(He=e,t=void $t.handleCardSetEnd());return e=t,e}(),s!==i?(o=[o,a,s],r=o):(Me=r,r=i)}else Me=r,r=i;var n;return r!==i&&(He=e,n=r,r=$t.handleCardSet(n[1].flat())),e=r,e}function _t(){let e,r;var o;return e=Me,r=function(){let e,r,o,a;e=Me,r=Me,t.substr(Me,3)===x?(o=x,Me+=3):(o=i,0===Ze&&at(ue));o!==i?(a=Rt(),a===i&&(a=Kt()),a!==i?(o=[o,a],r=o):(Me=r,r=i)):(Me=r,r=i);r===i&&(r=Me,t.substr(Me,2)===v?(o=v,Me+=2):(o=i,0===Ze&&at(de)),o!==i?(a=Rt(),a===i&&(a=Kt()),a!==i?(o=[o,a],r=o):(Me=r,r=i)):(Me=r,r=i),r===i&&(r=Me,t.substr(Me,2)===f?(o=f,Me+=2):(o=i,0===Ze&&at(ce)),o!==i?(a=Rt(),a===i&&(a=Kt()),a!==i?(o=[o,a],r=o):(Me=r,r=i)):(Me=r,r=i),r===i&&(r=function(){let e,r,o,a,s,n;e=Me,r=Me,Ze++,o=Me,a=kt(),a!==i?(s=Kt(),s!==i?(a=[a,s],o=a):(Me=o,o=i)):(Me=o,o=i);Ze--,o===i?r=void 0:(Me=r,r=i);if(r!==i){if(o=Me,a=Me,s=Lt(),n=Vt(),n!==i?(s=[s,n],a=s):(Me=a,a=i),a===i){if(a=Me,s=[],n=Et(),n!==i)for(;n!==i;)s.push(n),n=Et();else s=i;s!==i?(n=Ft(),n!==i?(s=[s,n],a=s):(Me=a,a=i)):(Me=a,a=i)}o=a!==i?t.substring(o,Me):a,o!==i?(He=e,l=o,e=$t.handleCardLine(l)):(Me=e,e=i)}else Me=e,e=i;var l;return e}())));r!==i&&(He=e,s=r,r=$t.handleCardLineOrDivider(s,1));var s;return e=r,e}(),r!==i&&(He=e,o=r,r=$t.handleCards(o)),e=r,e}function Ct(){let e,r,o;return e=Me,r=Me,Ze++,t.substr(Me,6)===g?(o=g,Me+=6):(o=i,0===Ze&&at(ne)),o===i&&(t.substr(Me,4)===h?(o=h,Me+=4):(o=i,0===Ze&&at(ae))),Ze--,o===i?r=void 0:(Me=r,r=i),r!==i?(o=function(){let e,r,o,a,s;e=Me,r=Me,o=t.charAt(Me),D.test(o)?Me++:(o=i,0===Ze&&at(me));if(o!==i){for(a=[],s=t.charAt(Me),z.test(s)?Me++:(s=i,0===Ze&&at(he));s!==i;)a.push(s),s=t.charAt(Me),z.test(s)?Me++:(s=i,0===Ze&&at(he));o=[o,a],r=o}else Me=r,r=i;e=r!==i?t.substring(e,Me):r;return e}(),o!==i?(He=e,e=o):(Me=e,e=i)):(Me=e,e=i),e}function wt(){let e,r;return e=Me,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),r!==i&&(He=e,r={type:Vr.CardChar,value:r}),e=r,e}function At(){let e,r,o,a;for(e=Me,r=Me,o=[],t.substr(Me,2)===G?(a=G,Me+=2):(a=i,0===Ze&&at(Pe)),a===i&&(a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q)));a!==i;)o.push(a),t.substr(Me,2)===G?(a=G,Me+=2):(a=i,0===Ze&&at(Pe)),a===i&&(a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q)));return r=t.substring(r,Me),He=e,e=r,e}function Bt(){let e,r,o,a,s;if(e=Me,r=Me,Ze++,t.substr(Me,3)===F?(o=F,Me+=3):(o=i,0===Ze&&at(Ie)),Ze--,o===i?r=void 0:(Me=r,r=i),r!==i){for(o=Me,a=[],s=t.charAt(Me),q.test(s)?Me++:(s=i,0===Ze&&at(Ee));s!==i;)a.push(s),s=t.charAt(Me),q.test(s)?Me++:(s=i,0===Ze&&at(Ee));o=t.substring(o,Me),He=e,e=(n=o)?n.trim():""}else Me=e,e=i;var n;return e}function St(){let e,r,o;if(93===t.charCodeAt(Me)?(e=l,Me++):(e=i,0===Ze&&at(Z)),e===i){for(e=Me,r=[],o=Gt();o!==i;)r.push(o),o=Gt();o=function(){let e,r;e=Me,Ze++,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re));Ze--,r===i?e=void 0:(Me=e,e=i);return e}(),o!==i?(r=[r,o],e=r):(Me=e,e=i)}return e}function Pt(){let e,r,o,a;for(e=Me,r=Me,o=[],a=t.charAt(Me),j.test(a)?Me++:(a=i,0===Ze&&at(Ne));a!==i;)o.push(a),a=t.charAt(Me),j.test(a)?Me++:(a=i,0===Ze&&at(Ne));var s;return r=t.substring(r,Me),He=e,r=(s=r)?s.trim():null,e=r,e}function It(){let e,r,o;var a;return e=Me,58===t.charCodeAt(Me)?(r=p,Me++):(r=i,0===Ze&&at(ee)),r!==i?(o=At(),He=e,e=(a=o)?a.trim():""):(Me=e,e=i),e===i&&(e=Me,r="",He=e,r=!0,e=r),e}function Et(){let e,r;return Ze++,e=t.charAt(Me),M.test(e)?Me++:(e=i,0===Ze&&at(Re)),Ze--,e===i&&(r=i,0===Ze&&at(Ve)),e}function Lt(){let e,t;for(Ze++,e=[],t=Et();t!==i;)e.push(t),t=Et();return Ze--,e}function Nt(){let e,r,o;for(Ze++,e=Me,r=[],o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));o!==i;)r.push(o),o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));return o=Vt(),o!==i?(r=[r,o],e=r):(Me=e,e=i),Ze--,e===i&&(r=i,0===Ze&&at(Ge)),e}function Vt(){let e,r;return Ze++,10===t.charCodeAt(Me)?(e=$,Me++):(e=i,0===Ze&&at($e)),e===i&&(t.substr(Me,2)===O?(e=O,Me+=2):(e=i,0===Ze&&at(Oe)),e===i&&(e=t.charAt(Me),U.test(e)?Me++:(e=i,0===Ze&&at(Je)))),Ze--,e===i&&(r=i,0===Ze&&at(Ke)),e}function Rt(){let e,r,o;for(Ze++,e=Me,r=[],o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));o!==i;)r.push(o),o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));return o=Vt(),o!==i?(r=[r,o],e=r):(Me=e,e=i),Ze--,e===i&&(r=i,0===Ze&&at(De)),e}function Gt(){let e,r;return Ze++,e=t.charAt(Me),W.test(e)?Me++:(e=i,0===Ze&&at(qe)),Ze--,e===i&&(r=i,0===Ze&&at(ze)),e}function Ft(){let e,r;return e=Vt(),e===i&&(e=Me,Ze++,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),Ze--,r===i?e=void 0:(Me=e,e=i)),e}function Kt(){let e,r;return e=Rt(),e===i&&(e=Me,Ze++,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),Ze--,r===i?e=void 0:(Me=e,e=i)),e}const $t=new $r({parse:e,parserText:Xe,parserLocation:Jt}),Ot=new Fi({parse:e,parserText:Xe,parserLocation:Jt});function Jt(){const e=ot(He,Me);return e?(delete e.source,e):e}function ot(e,t,r){var i=it(e),a=it(t),s={source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return o&&"function"==typeof o.offset&&(s.start=o.offset(s.start),s.end=o.offset(s.end)),s}We=s();const Dt=We!==i&&Me===t.length;function zt(){throw We!==i&&Me<t.length&&at({type:"end"}),st(Qe,Ye<t.length?function(e=Me){const r=t.codePointAt(e);return void 0===r?"":String.fromCodePoint(r)}(Ye):null,Ye<t.length?ot(Ye,Ye+1):ot(Ye,Ye))}return r.peg$library?{peg$result:We,peg$currPos:Me,peg$FAILED:i,peg$maxFailExpected:Qe,peg$maxFailPos:Ye,peg$success:Dt,peg$throw:Dt?void 0:zt}:Dt?We:void zt()},Oi=class{constructor(){l(this,"jsonParser",new Lr)}toAst(e,t){return $i(e)}},Ji=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Di={li:new Set(["li"]),td:new Set(["td","th"]),th:new Set(["td","th"]),tr:new Set(["td","th","tr"]),thead:new Set(["td","th","tr","thead","tbody","tfoot"]),tbody:new Set(["td","th","tr","thead","tbody","tfoot"]),tfoot:new Set(["td","th","tr","thead","tbody","tfoot"]),p:new Set(["p"]),option:new Set(["option"])},zi=/<(\/)?([a-zA-Z][a-zA-Z0-9:-]*)((?:\s+(?:"[^"]*"|'[^']*'|[^<>"'])*)?)(\/)?>/g,qi=/([a-zA-Z_:][a-zA-Z0-9:._-]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;function ji(e){const t={};if(!e)return t;let r;for(qi.lastIndex=0;null!==(r=qi.exec(e));){const e=r[1].toLowerCase();let i=r[2]??"";i.length>=2&&('"'===i[0]||"'"===i[0])&&(i=i.slice(1,-1)),t[e]=i}return t}function Mi(e){const t={type:"element",name:"#root",attrs:{},children:[]},r=[t],i=()=>r[r.length-1];for(const t of function(e){const t=[],r=function(e){return e.replace(/<!--[\s\S]*?-->/g,"").replace(/<!\[CDATA\[[\s\S]*?\]\]>/g,"").replace(/<!doctype[^>]*>/gi,"").replace(/<script\b[\s\S]*?<\/script>/gi,"").replace(/<style\b[\s\S]*?<\/style>/gi,"")}(e);zi.lastIndex=0;let i,o=0;for(;null!==(i=zi.exec(r));){i.index>o&&t.push({kind:"text",text:r.slice(o,i.index)}),o=zi.lastIndex;const e="/"===i[1],a=i[2].toLowerCase();e?t.push({kind:"close",name:a}):t.push({kind:"open",name:a,attrs:ji(i[3]),selfClose:"/"===i[4]})}return o<r.length&&t.push({kind:"text",text:r.slice(o)}),t}(e))if("text"!==t.kind){if("open"===t.kind){const e=t.name,o=Di[e];if(o)for(;r.length>1&&o.has(i().name);)r.pop();const a={type:"element",name:e,attrs:t.attrs??{},children:[]};i().children.push(a),t.selfClose||Ji.has(e)||r.push(a);continue}for(let e=r.length-1;e>0;e--)if(r[e].name===t.name){r.length=e;break}}else t.text&&i().children.push({type:"text",value:t.text});return t.children}function Hi(e,t){return e.children.filter(e=>"element"===e.type&&t.has(e.name))}var Ui={b:"bold",strong:"bold",i:"italic",em:"italic",sup:"superscript",sub:"subscript",s:"strike",strike:"strike",del:"del",ins:"ins",u:"underline",mark:"highlight",code:"code"},Wi=new Set(["thead","tbody","tfoot"]),Yi=new Set(["tr"]),Qi=new Set(["td","th"]),Zi=new Set(["li"]),Xi=new Set(["row","col","rowgroup","colgroup"]),eo={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};function to(e){return e.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g,(e,t)=>{if("#"===t[0]){const r="x"===t[1]||"X"===t[1]?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);if(Number.isFinite(r)&&r>=0&&r<=1114111)try{return String.fromCodePoint(r)}catch{return e}return e}return eo[t]??e})}function ro(e){if(null==e)return;const t=Number.parseInt(e,10);return Number.isInteger(t)?t:void 0}function io(e){return"element"===e.type}var oo=class{constructor(){l(this,"keepUnknownTags",!1)}parse(e,t){this.keepUnknownTags=t?.keepUnknownTags??!1;const r=t?.tableFormat??"table-extended",i=t?.onWarning,o=this.collectTopLevelTables(Mi(e)),a=[];for(const e of o){const t=this.tableToBit(e,r,i);t&&a.push(t)}return a}collectTopLevelTables(e){const t=[],r=e=>{io(e)&&("table"!==e.name?e.children.forEach(r):t.push(e))};return e.forEach(r),t}tableToBit(e,t,r){const i=[],o=[],a=[];let s;for(const t of e.children)if(io(t))if("caption"===t.name){const e=this.inlineNodes(t.children,[]),r=this.trimInline(e);r.length>0&&(s=r)}else if(Wi.has(t.name)){const e="thead"===t.name?i:"tfoot"===t.name?a:o;for(const r of Hi(t,Yi))e.push(this.rowToCells(r))}else Yi.has(t.name)&&o.push(this.rowToCells(t));if(0===i.length&&0===o.length&&0===a.length)return;const n={};i.length>0&&(n.header={rows:i}),o.length>0&&(n.body={rows:o}),a.length>0&&(n.footer={rows:a});let l=n;"table"===t&&(this.isLossyAsBasic(n)&&r?.("Converting an HTML table to [.table] loses rowspan/colspan/scope and multi-section structure; use --tableFormat table-extended to preserve them."),l=At(n));const c={type:t,format:"bitmark++",table:l};return s&&(c.caption=s),c}rowToCells(e){const t=[];for(const r of Hi(e,Qi))t.push(this.cellToJson(r));return{cells:t}}cellToJson(e){const t={content:this.blockNodes(e.children)};"th"===e.name&&(t.title=!0);const r=ro(e.attrs.rowspan);null!=r&&r>=2&&(t.rowspan=r);const i=ro(e.attrs.colspan);null!=i&&i>=2&&(t.colspan=i);const o=e.attrs.scope?.toLowerCase();o&&Xi.has(o)&&(t.scope=o);const a=this.widthFromCell(e);return null!=a&&(t.colwidth=a),t}widthFromCell(e){const t=ro(e.attrs.width);if(null!=t&&t>0)return t;const r=e.attrs.style;if(r){const e=r.match(/width\s*:\s*(\d+)\s*px/i);if(e){const t=Number.parseInt(e[1],10);if(Number.isInteger(t)&&t>0)return t}}}isLossyAsBasic(e){if(e.footer)return!0;if(e.header&&e.header.rows.length>1)return!0;const t=[e.header,e.body,e.footer];for(const e of t)if(e)for(const t of e.rows)for(const e of t.cells)if(e.rowspan||e.colspan||e.scope)return!0;return!1}blockNodes(e){const t=[];let r=[];const i=()=>{const e=this.trimInline(r);r=[],0!==e.length&&(1===e.length&&"imageInline"===e[0].type?t.push({...e[0],type:"image"}):t.push({type:"paragraph",content:e,attrs:{}}))};for(const o of e){if(!io(o)){r.push(...this.inlineText(o.value,[]));continue}const e=o.name;if("p"===e){i();const e=this.trimInline(this.inlineNodes(o.children,[]));e.length>0&&t.push({type:"paragraph",content:e,attrs:{}})}else if(this.isListTag(e)){i();const e=this.listNode(o);e&&t.push(e)}else r.push(...this.inlineFromElement(o,[]))}return i(),t}inlineNodes(e,t){const r=[];for(const i of e)io(i)?r.push(...this.inlineFromElement(i,t)):r.push(...this.inlineText(i.value,t));return r}inlineFromElement(e,t){const r=e.name;if("br"===r)return[{type:"hardBreak"}];if("img"===r)return[this.imageNode(e,!0)];if(this.isMathTag(r))return[this.latexNode(e)];const i=Ui[r];if(i)return this.inlineNodes(e.children,[...t,{type:i}]);if("a"===r){const r={type:"link",attrs:{href:e.attrs.href??"",...e.attrs.target?{target:e.attrs.target}:{}}};return this.inlineNodes(e.children,[...t,r])}if(this.keepUnknownTags){const i=this.serializeOpenTag(e),o=`</${r}>`;return[...this.inlineText(i,t),...this.inlineNodes(e.children,t),...this.inlineText(o,t)]}return this.inlineNodes(e.children,t)}inlineText(e,t){const r=to(e).replace(/\s+/g," ");if(""===r)return[];const i={text:r,type:"text"};return t.length>0&&(i.marks=t.map(e=>({...e}))),[i]}serializeOpenTag(e){const t=Object.entries(e.attrs).map(([e,t])=>""===t?` ${e}`:` ${e}="${t}"`).join("");return`<${e.name}${t}>`}isListTag(e){return"ul"===e||"ol"===e}listNode(e){const t=Hi(e,Zi);if(0===t.length)return;if("ul"===e.name&&t.some(e=>{const t=e.children.find(io);return"input"===t?.name&&"checkbox"===t.attrs.type?.toLowerCase()}))return{type:"taskList",content:t.map(e=>this.taskItemNode(e))};const r={type:this.listType(e),content:t.map(e=>this.listItemNode(e))};if("ol"===e.name){const t=ro(e.attrs.start);null!=t&&(r.attrs={start:t})}return r}listType(e){if("ol"===e.name)switch(e.attrs.type){case"i":return"orderedListRomanLower";case"I":return"orderedListRoman";case"a":return"letteredListLower";case"A":return"letteredList";default:return"orderedList"}const t=e.attrs.style??"";return/list-style(-type)?\s*:\s*none/i.test(t)?"noBulletList":"bulletList"}listItemNode(e){let t=this.blockNodes(e.children);return 0===t.length&&(t=[{type:"paragraph",content:[],attrs:{}}]),{type:"listItem",content:t}}taskItemNode(e){const t=e.children.find(e=>io(e)&&"input"===e.name&&"checkbox"===e.attrs.type?.toLowerCase()),r=!!t&&"checked"in t.attrs,i=e.children.filter(e=>e!==t);let o=this.blockNodes(i);return 0===o.length&&(o=[{type:"paragraph",content:[],attrs:{}}]),{type:"taskItem",attrs:{checked:r},content:o}}imageNode(e,t){const r={src:e.attrs.src??""};r.alt=e.attrs.alt??null,r.title=e.attrs.title??null;const i=ro(e.attrs.width);null!=i&&(r.width=i);const o=ro(e.attrs.height);return null!=o&&(r.height=o),e.attrs.class&&(r.class=e.attrs.class),{type:t?"imageInline":"image",attrs:r}}isMathTag(e){return"math"===this.localName(e)}latexNode(e){return{type:"latex",attrs:{formula:this.latexFromMath(e)}}}latexFromMath(e){const t=e.attrs.alttext??e.attrs.alt??e.attrs.title;if(null!=t)return to(t);const r=this.findLatexAnnotation(e);return r?this.textContent(r).trim():this.textContent(e).trim()}findLatexAnnotation(e){for(const t of e.children){if(!io(t))continue;const e=(t.attrs.encoding??"").toLowerCase();if("annotation"===this.localName(t.name)&&(/\btex\b/.test(e)||/\blatex\b/.test(e)))return t;const r=this.findLatexAnnotation(t);if(r)return r}}textContent(e){return e.children.map(e=>io(e)?this.textContent(e):to(e.value)).join("").replace(/\s+/g," ")}localName(e){return e.includes(":")?e.slice(e.indexOf(":")+1):e}trimInline(e){const t=e.slice(),r=e=>"text"===e.type&&/^\s*$/.test(e.text??"");for(;t.length>0&&r(t[0]);)t.shift();for(t.length>0&&"text"===t[0].type&&(t[0]={...t[0],text:(t[0].text??"").replace(/^\s+/,"")});t.length>0&&r(t[t.length-1]);)t.pop();if(t.length>0&&"text"===t[t.length-1].type){const e=t.length-1;t[e]={...t[e],text:(t[e].text??"").replace(/\s+$/,"")}}return t.filter(e=>!("text"===e.type&&""===e.text))}},ao={string:"string",file:"file"},so={bitmark:"bitmark",json:"json",ast:"ast",text:"text"},no={bitmark:"bitmark",bitmarkText:"bitmarkText",plainText:"plainText",html:"html"},lo=class{constructor(){l(this,"ast",new et),l(this,"jsonParser",new Lr),l(this,"bitmarkParser",new Oi),l(this,"textParser",new er),l(this,"textGenerator",new Mt),l(this,"jsonStringifyPrettify",(e,t,r)=>{const i=!0===t.prettify?2:t.prettify||void 0;return r||!0===t.stringify||void 0!==i?JSON.stringify(e,null,i):e})}version(){return je.appVersion.full}info(e){const t=Object.assign({},e),r=new Ar;let i;const o=!t.outputFormat||t.outputFormat===Sr.text,a=t.outputFormat===Sr.json,s=t.type===Pr.all,n=t.type===Pr.deprecated,l=s||!n,c=s||n;if(t.type===Pr.bitGroups){const e=r.getBitGroups();i=o?e.map(e=>`${e.key}${e.subgroupOf?` (subgroup of: ${e.subgroupOf})`:""}\n ${e.bitTypes.join(", ")}`).join("\n"):e}else if(t.type===Pr.resourceGroups){const e=r.getResourceGroups();i=o?e.map(e=>`${e.key}\n ${e.resourceTypes.join(", ")}`).join("\n"):e}else if(t.type===Pr.bit){const e=r.getSupportedBitConfigs().filter(e=>{if(!t.bit)return!0;return Le.getBitType(t.bit)===e.bitType});i=o?e.map(e=>e.toString({includeChains:!0,includeConfigs:!0})).join("\n\n--------------\n\n"):e}else{const e=r.getSupportedBits({includeNonDeprecated:l,includeDeprecated:c}).filter(e=>{if(!t.bit)return!0;const r=Le.getBitType(t.bit);return e.name===r||void 0});i=o?this.supportedBitsAsString(e):e}if(a){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}registerTranslations(e){Le.registerTranslations(e)}getBitGroups(e){return(new Ar).getBitGroups(e)}getResourceGroups(e){return(new Ar).getResourceGroups(e)}getBitTypesForBitGroups(e,t){return Le.getBitTypesForBitGroups(e,t)}getBitGroupsForBitTypes(e,t){return(new Ar).getBitGroupsForBitTypes(e,t)}getResourceTypesForResourceGroups(e){return Le.getResourceTypesForResourceGroups(e)}getResourceGroupsForResourceTypes(e){return Le.getResourceGroupsForResourceTypes(e)}getBitTitle(e,t){return Le.getBitTitle(e,t)}getBitGroupTitle(e,t){return Le.getBitGroupTitle(e,t)}getResourceGroupTitle(e,t){return Le.getResourceGroupTitle(e,t)}generateConfig(e){const t=Object.assign({},e);(new ConfigBuilder).build(t)}convert(e,t){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.outputFormat,s=a===so.bitmark,n=a===so.json,l=a===so.ast,c=a===so.text,p=Br.peggy;let u=e;const d="string"==typeof e;if(je.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==ao.file||je.isNode&&d&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));let m=this.ast.preprocessAst(u);const h=!!m;h||(m=this.jsonParser.toAst(u));const b=!!m?.bits,g=e=>{r=this.bitmarkParser.toAst(e,{parserType:p})},y=e=>{if(p===Br.peggy)if(m=this.bitmarkParser.toAst(e,{parserType:p}),i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(m)}else{const e=new Cr(i).generateSync(m);r=this.jsonStringifyPrettify(e,o)}},f=e=>{m=this.bitmarkParser.toAst(e,{parserType:p});const t=new Cr(i).generateSync(m),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o},k=e=>{if(i.outputFile){new BitmarkFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new yr(i);r=t.generateSync(e)}},x=e=>{r=this.jsonStringifyPrettify(e,o)},v=e=>{if(i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new Cr(i).generateSync(e);r=this.jsonStringifyPrettify(t,o)}},T=e=>{r=this.jsonStringifyPrettify(e,o)};return d&&!b&&!h?s?(g(u),k(r)):l?g(u):c?f(u):y(u):h?l?x(m):n?v(m):c?(e=>{const t=new Cr(i).generateSync(e),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o})(m):k(m):b?n?v(m):l?T(m):c?(e=>{const t=new Cr(i).generateSync(e),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o})(m):(e=>{if(i.outputFile)new BitmarkFileGenerator(i.outputFile,i).generateSync(e);else{const t=new yr(i);r=t.generateSync(e)}})(m):r="",r}upgrade(e,t){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.bitmarkParserType;let s=e;const n="string"==typeof e;if(je.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==ao.file||je.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const c=!!l?.bits,p=e=>{if(i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new Cr(i).generateSync(e);r=this.jsonStringifyPrettify(t,o)}};if(n&&!c)(e=>{const t=this.bitmarkParser.toAst(e,{parserType:a});if(i.outputFile){new BitmarkFileGenerator(i.outputFile,i).generateSync(t)}else{const e=new yr(i);r=e.generateSync(t)}})(s);else{if(!c)return;p(l)}return r}createAst(e,t){let r,i=e;const o="string"==typeof e,a=Object.assign({},t);a.inputFormat&&a.inputFormat!==ao.file||je.isNode&&o&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let s=this.ast.preprocessAst(i);const n=!!s;n||(s=this.jsonParser.toAst(i));const l=!!s?.bits;return r=o&&!l&&!n?this.bitmarkParser.toAst(i):l?s:{},r}convertText(e,t){let r,i;const o=Object.assign({},t),a=Object.assign({},o.fileOptions),s=Object.assign({},o.jsonOptions),n=(0,dr.Enum)(TextFormat).fromValue(o.textFormat)??TextFormat.bitmarkText,l=o.textLocation??TextLocation.body;let c=e;const p="string"==typeof e;if(je.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==ao.file||je.isNode&&p&&fs.existsSync(c)&&(c=fs.readFileSync(c,{encoding:"utf8"}));const u=this.textParser.preprocessAst(c),d=!!u;if(i=d?this.textGenerator.generateSync(u,n,l):this.textParser.toAst(c,{format:n,location:TextLocation.body}),o.outputFile){const e=o.outputFile.toString();let t=i;d||(t=this.jsonStringifyPrettify(i,s,!0));const r=a.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else r=d?i:this.jsonStringifyPrettify(i,s);return r}extractPlainText(e,t){const r=e,i=t?.inputFormat,o="string"==typeof e;let a;const s=()=>{let e=r;if("string"==typeof r)try{e=JSON.parse(r)}catch(t){let i=!1;const o=this.convert(r,{outputFormat:so.json});if(o.length>0){o[0].bit.type===BitType._error||(i=!0,e=o)}i||(e=this.convertText(r,{textFormat:TextFormat.bitmarkText}))}return e};i===no.bitmark?a=this.convert(r,{outputFormat:so.json}):i===no.bitmarkText?a=this.convertText(r,{textFormat:TextFormat.bitmarkText}):i===no.plainText?o&&(a=String(e)):a=s();return(new PlainTextGenerator).generate(a)}convertHtmlTable(e,t){const r=Object.assign({},t);if(je.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");let i=e;const o="string"==typeof e;je.isNode&&o&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let a;if(a=r.inputFormat===no.html||null==r.inputFormat&&(o&&(e=>{const t=e.replace(/^\s+/,"");return t.startsWith("<")&&/<table/i.test(t)})(i)),a){const e=(new oo).parse(i,{tableFormat:r.tableFormat??"table-extended",keepUnknownTags:r.keepUnknownTags,onWarning:e=>console.warn(e)}),t=r.outputFormat??so.bitmark;if("html"===t){const t=this.convert(e,{outputFormat:so.json});return this.outputHtml((new xr).generate(t),r)}return this.convert(e,{outputFormat:(0,dr.Enum)(so).fromValue(t),outputFile:r.outputFile,fileOptions:r.fileOptions,jsonOptions:r.jsonOptions,bitmarkOptions:{...r.bitmarkOptions,...r.noBreakscaping?{noBreakscaping:!0}:{}}})}if("html"!==(r.outputFormat??"html"))throw new Error("convertHtmlTable: non-HTML input can only be converted to HTML. Use convert() for bitmark/JSON/AST conversions.");const s=this.convert(o?i:e,{outputFormat:so.json});return this.outputHtml((new xr).generate(s),r)}outputHtml(e,t){if(t.outputFile){const r=t.outputFile.toString(),i=t.fileOptions?.append?"a":"w";return fs.ensureDirSync(path.dirname(r)),void fs.writeFileSync(r,e,{flag:i})}return e}breakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions),o=(0,dr.Enum)(TextFormat).fromValue(r.textFormat)??TextFormat.bitmarkText,a=r.textLocation??TextLocation.body;let s=e;const n="string"==typeof e;if(je.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==ao.file||je.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));const l=Breakscape.breakscape(s,{format:o,location:a});if(!r.outputFile)return l;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,l,{flag:t})}}unbreakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions),o=(0,dr.Enum)(TextFormat).fromValue(r.textFormat)??TextFormat.bitmarkText,a=r.textLocation??TextLocation.body;let s=e;const n="string"==typeof e;if(je.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==ao.file||je.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));const l=Breakscape.unbreakscape(s,{format:o,location:a});if(!r.outputFile)return l;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,l,{flag:t})}}textAstToPlainText(e,t){return new Mt(It.v3,{}).generateSync(e,TextFormat.bitmarkText,TextLocation.body,{noBreakscaping:!0,noMarkup:!0})}supportedBitsAsString(e){let t="";for(const r of e)t+=`${r.name} (since: ${r.since}`,r.deprecated&&(t+=`, deprecated: ${r.deprecated}`),t+=")",r.bitGroups&&(t+=` [${r.bitGroups.join(", ")}]`),t+="\n";return t}},co=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new ur,this.generator=new _r(this.writer,e)}async generate(e){return await this.generator.generate(e),this.writer.getString()}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}};function po(e){return Array.isArray(e)&&4===e.length&&e.every(Number.isFinite)?[e[0],e[1],e[2],e[3]]:null}function uo(e){if(null==e)return[];if(!Array.isArray(e)||0===e.length)return[];const t=e.some(Array.isArray)?e:[e],r=[];for(const e of t){const t=po(e);t&&r.push(t)}return r}function mo(e,t){return e[0]<t[2]&&e[2]>t[0]&&e[1]<t[3]&&e[3]>t[1]}var ho=class e{constructor(e){l(this,"_entries"),l(this,"bitmarkParser",new lo),this._entries=e}static fromBits(t,r){const i=r?.sourceRL,o=[];for(const e of t){if(!e?.bit)continue;if(void 0!==i&&e.bit.sourceRL!==i)continue;const t=uo(e.bit.sourceBB);0!==t.length&&o.push({bit:e.bit,wrapper:e,boxes:t})}return new e(o)}get entries(){return this._entries}intersecting(e){const t=[];for(const r of this._entries)r.boxes.some(t=>mo(e,t))&&t.push(r);return t}intersectingBoxes(e){const t=[];for(const r of this._entries)for(const i of r.boxes)mo(e,i)&&t.push(i);return t}enclosingBoundingBox(e){return function(e){if(0===e.length)return null;let[t,r,i,o]=e[0];for(let a=1;a<e.length;a++){const s=e[a];s[0]<t&&(t=s[0]),s[1]<r&&(r=s[1]),s[2]>i&&(i=s[2]),s[3]>o&&(o=s[3])}return[t,r,i,o]}(this.intersectingBoxes(e))}toBitmark(e){if(0===e.length)return"";const t=e.map(e=>e.wrapper);return this.bitmarkParser.convert(t,{outputFormat:so.bitmark,bitmarkOptions:{prettifyJson:!0}})}};Ue()},722(e){var t,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(s,{Enum:()=>l}),e.exports=(t=s,((e,t,s,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))a.call(e,l)||l===s||r(e,l,{get:()=>t[l],enumerable:!(n=i(t,l))||n.enumerable});return e})(r({},"__esModule",{value:!0}),t));var n=new WeakMap;function l(e){let t=n.get(e);const r=e;if(!t){const i=[];for(const t in e){const e=Number(t);!isNaN(e)&&r[r[e]]===e||i.push(t)}const o={_keys:i,_valueKeyMap:new Map};for(const e of o._keys){const t=r[e];o._valueKeyMap.set(t,e)}n.set(e,o),t=o}function i(){const e=new Map;for(const i of t._keys){const t=r[i];e.set(i,t)}return t._keyValueMap=e,e}function o(){const e=new Map;for(const i of t._keys){const t=r[i],o="string"==typeof t?t.toLowerCase():t;e.set(o,i)}return t._lcValueKeyMap=e,e}function a(){const e=new Map;return t._valueLabelMap=e,e}function s(e,r){if(r?.ignoreCase&&"string"==typeof e){const r=t._keyValueMap??i(),a=(t._lcValueKeyMap??o()).get(e.toLowerCase());if(!a)return;return r.get(a)}if(t._valueKeyMap.has(e))return e}function l(e,o){const a=t._keyValueMap??i();if(o?.ignoreCase&&"string"==typeof e){const i=t._lcKeyValueMap??function(){const e=new Map;for(const i of t._keys){const t=r[i];e.set(i.toLowerCase(),t)}return t._lcKeyValueMap=e,e}();return i.get(e.toLowerCase())}return a.get(`${e}`)}function c(){return t._values??function(){const e=t._keyValueMap??i();return t._values=t._keys.map(t=>e.get(t)),t._values}()}function p(){return t._entries??function(){const e=t._keyValueMap??i();return t._entries=t._keys.map(t=>[t,e.get(t)]),t._entries}()}return{fromValue:s,fromKey:l,keyFromValue:function(e,r){if(r?.ignoreCase&&"string"==typeof e){return(t._lcValueKeyMap??o()).get(e.toLowerCase())}return t._valueKeyMap.get(e)},hasKey:function(e,t){return null!=l(e,t)},hasValue:function(e,t){return null!=s(e,t)},keys:()=>t._keys,values:()=>c(),entries:()=>p(),[Symbol.iterator]:function*(){for(const e of c())yield e},setAllLabels:function(e){const r=t._valueLabelMap??a();for(const[t,i]of Object.entries(e)){const e=s(t);null!=e&&r.set(e,i)}},setLabels:function(e,r){(t._valueLabelMap??a()).set(e,r)},getLabels:function(e){return(t._valueLabelMap??a()).get(e)??{}},getLabel:function(e,r){const i=(t._valueLabelMap??a()).get(e)??{};if(!r)for(const t of Object.values(i))return t??`${e}`;return i[r]??`${e}`}}}l.fromArray=e=>{let t=e;Array.isArray(t)||(t=[]);return t.reduce((e,t)=>(e[t]=t,e),{})}}};const t={};let r=function r(i){const o=t[i];if(void 0!==o)return o.exports;const a=t[i]={exports:{}};return e[i](a,a.exports,r),a.exports}(922);return 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={922(e,t,r){var i,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,l=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),c={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(c,{Ast:()=>et,BitGroup:()=>d,BitType:()=>u,BitmarkGenerator:()=>ui,BitmarkParser:()=>Ro,BitmarkParserGenerator:()=>ia,BitmarkParserType:()=>vi,BitmarkStringGenerator:()=>di,BitmarkVersion:()=>It,BodyTextFormat:()=>ot,BoundingBoxIndex:()=>la,Builder:()=>ai,CardSetVersion:()=>ci,HtmlTableGenerator:()=>hi,HtmlTableParser:()=>Xo,InfoFormat:()=>Ti,InfoType:()=>_i,Input:()=>ea,InputFormat:()=>ra,JsonGenerator:()=>yi,JsonParser:()=>Ai,JsonStringGenerator:()=>oa,NodeType:()=>Xe,Output:()=>ta,ResourceBuilder:()=>oi,ResourceGroup:()=>Te,StringWriter:()=>si,TextMarkType:()=>Qe,TextNodeType:()=>Ze,bitmarkTextParse:()=>Ur}),e.exports=(i=c,((e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of s(t))n.call(e,l)||l===r||o(e,l,{get:()=>t[l],enumerable:!(i=a(t,l))||i.enumerable});return e})(o({},"__esModule",{value:!0}),i));var p=r(722),u=(r(722),{_error:"_error",_comment:"_comment",_standard:"_standard",_standardLight:"_standard-light",advertising:"advertising",advertisingAdvertorial:"advertising-advertorial",advertisingAdvertorialPage:"advertising-advertorial-page",advertisingCallToAction:"advertising-call-to-action",advertisingCallToActionMeeting:"advertising-call-to-action-meeting",advertisingBanner:"advertising-banner",advertisingSkyscraper:"advertising-skyscraper",advertisingRectangle:"advertising-rectangle",advertisingFullPage:"advertising-full-page",advertisingHalfPage:"advertising-half-page",advertisingQuarterPage:"advertising-quarter-page",advertisingClassifiedPage:"advertising-classified-page",advertisingLandscape:"advertising-landscape",advertisingPortrait:"advertising-portrait",aiChat:"ai-chat",aiEditor:"ai-editor",aiPrompt:"ai-prompt",aiTutor:"ai-tutor",aiWbt:"ai-wbt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCalculatorLatex:"app-calculator-latex",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",appRag:"app-rag",appSearch:"app-search",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleAuthor:"article-author",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",author:"author",authorContentBitGenerator:"author-content-bit-generator",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",bookAuthor:"book-author",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",brandColor:"brand-color",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",catalogItemBook:"catalog-item-book",catalogItemExternalBook:"catalog-item-external-book",catalogItemProduct:"catalog-item-product",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",clozeAndMultipleChoiceTextConversationLeft1:"cloze-and-multiple-choice-text-conversation-left-1",clozeAndMultipleChoiceTextConversationLeft1Scream:"cloze-and-multiple-choice-text-conversation-left-1-scream",clozeAndMultipleChoiceTextConversationLeft1Thought:"cloze-and-multiple-choice-text-conversation-left-1-thought",clozeAndMultipleChoiceTextConversationRight1:"cloze-and-multiple-choice-text-conversation-right-1",clozeAndMultipleChoiceTextConversationRight1Scream:"cloze-and-multiple-choice-text-conversation-right-1-scream",clozeAndMultipleChoiceTextConversationRight1Thought:"cloze-and-multiple-choice-text-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",definitionListCollapsible:"definition-list-collapsible",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",extractorBlueprint:"extractor-blueprint",extractorBlueprintConfiguration:"extractor-blueprint-configuration",extractorConfiguration:"extractor-configuration",extractorImage:"extractor-image",extractorImageCollapsible:"extractor-image-collapsible",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",extractorReconcile:"extractor-reconcile",extractorRepeatedText:"extractor-repeated-text",extractorRule:"extractor-rule",extractorTheme:"extractor-theme",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formFreeText:"form-free-text",formula:"formula",formulaImage:"formula-image",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",handInFreeText:"hand-in-free-text",handInFreeTextExpert:"hand-in-free-text-expert",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInSystemMedia:"hand-in-system-media",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",h:"h",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",leMultiDayEvent:"le-multi-day-event",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",listAlt:"list-alt",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",nonProductionPrototypeIframe:"non-production-prototype-iframe",note:"note",noteAi:"note-ai",noteAlt:"note-alt",notebookArticle:"notebook-article",noteCollapsible:"note-collapsible",output:"output",p:"p",pAlt:"p-alt",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",printBook:"print-book",openBookChapter:"open-book-chapter",openBookChapterTeaser:"open-book-chapter-teaser",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",pageEnd:"page-end",pageStart:"page-start",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platform:"platform",platformBrandTarget:"platform-brand-target",platformHeader:"platform-header",platformMain:"platform-main",platformMainButton:"platform-main-button",platformMainInput:"platform-main-input",platformPath:"platform-path",platformSection:"platform-section",platformSectionButton:"platform-section-button",platformSectionChat:"platform-section-chat",platformSectionHeader:"platform-section-header",platformSectionInput:"platform-section-input",platformSystemIcon:"platform-system-icon",preparationNote:"preparation-note",printThisBook:"print-this-book",printThisChapter:"print-this-chapter",printPageBreak:"print-page-break",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",reviewError:"review-error",reviewErrorAi:"review-error-ai",reviewErrorTranslation:"review-error-translation",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",sandbox:"sandbox",sandboxOutputJson:"sandbox-output-json",sandboxOutputMarkup:"sandbox-output-markup",sandboxOutputRender:"sandbox-output-render",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",smartStandardDefinitionListNonNormative:"smart-standard-definition-list-non-normative",smartStandardDefinitionListNormative:"smart-standard-definition-list-normative",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",smartStandardP:"smart-standard-p",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",smartStandardRemarkTableExtendedImageNonNormative:"smart-standard-remark-table-extended-image-non-normative",smartStandardRemarkTableExtendedImageNonNormativeCollapsible:"smart-standard-remark-table-extended-image-non-normative-collapsible",smartStandardRemarkTableExtendedImageNormative:"smart-standard-remark-table-extended-image-normative",smartStandardRemarkTableExtendedImageNormativeCollapsible:"smart-standard-remark-table-extended-image-normative-collapsible",smartStandardRemarkTableExtendedNonNormative:"smart-standard-remark-table-extended-non-normative",smartStandardRemarkTableExtendedNonNormativeCollapsible:"smart-standard-remark-table-extended-non-normative-collapsible",smartStandardRemarkTableExtendedNormative:"smart-standard-remark-table-extended-normative",smartStandardRemarkTableExtendedNormativeCollapsible:"smart-standard-remark-table-extended-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",smartStandardTableExtendedImageNonNormative:"smart-standard-table-extended-image-non-normative",smartStandardTableExtendedImageNonNormativeCollapsible:"smart-standard-table-extended-image-non-normative-collapsible",smartStandardTableExtendedImageNormative:"smart-standard-table-extended-image-normative",smartStandardTableExtendedImageNormativeCollapsible:"smart-standard-table-extended-image-normative-collapsible",smartStandardTableExtendedNonNormative:"smart-standard-table-extended-non-normative",smartStandardTableExtendedNonNormativeCollapsible:"smart-standard-table-extended-non-normative-collapsible",smartStandardTableExtendedNormative:"smart-standard-table-extended-normative",smartStandardTableExtendedNormativeCollapsible:"smart-standard-table-extended-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",standardDefinitionListNonNormative:"standard-definition-list-non-normative",standardDefinitionListNormative:"standard-definition-list-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",standardRemarkTableExtendedImageNonNormative:"standard-remark-table-extended-image-non-normative",standardRemarkTableExtendedImageNormative:"standard-remark-table-extended-image-normative",standardRemarkTableExtendedNonNormative:"standard-remark-table-extended-non-normative",standardRemarkTableExtendedNormative:"standard-remark-table-extended-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",standardTableExtendedImageNonNormative:"standard-table-extended-image-non-normative",standardTableExtendedImageNormative:"standard-table-extended-image-normative",standardTableExtendedNonNormative:"standard-table-extended-non-normative",standardTableExtendedNormative:"standard-table-extended-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",tableExtended:"table-extended",tableExtendedImage:"table-extended-image",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",tocResource:"toc-resource",tocContent:"toc-content",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboard:"vendor-datadog-dashboard",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",vendorLearndashEmbed:"vendor-learndash-embed",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",vendorStripePricingTablePrintOnRequest:"vendor-stripe-pricing-table-print-on-request",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"}),d=(r(722),{assignment:"assignment",authors:"authors",botAction:"bot-action",bots:"bots",chat:"chat",cloze:"cloze",conversation:"conversation",cooking:"cooking",correction:"correction",documentUpload:"document-upload",essay:"essay",extractor:"extractor",flashcard:"flashcard",group:"group",highlightText:"highlight-text",interview:"interview",learningPath:"learning-path",mark:"mark",match:"match",message:"message",multipleChoice:"multiple-choice",multipleResponse:"multiple-response",nonProduction:"non-production",other:"other",pages:"pages",preparationNote:"preparation-note",quizzes:"quizzes",rating:"rating",recipes:"recipes",recordAudio:"record-audio",reviewErrors:"review-errors",reviews:"reviews",selfAssessment:"self-assessment",sequence:"sequence",set:"set",static:"static",steps:"steps",survey:"survey",surveyAnonymous:"survey-anonymous",surveys:"surveys",tables:"tables",takePicture:"take-picture",trueFalse:"true-false",vocabulary:"vocabulary",warning:"warning",whiteLabel:"white-label"}),m=(r(722),"infinity"),h=(r(722),"string"),b="boolean",g=(r(722),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 r=0;for(;e.startsWith(t);)r++,e=e.substring(t.length);return r}countOccurrencesAtEnd(e,t){let r=0;for(;e.endsWith(t);)r++,e=e.substring(0,e.length-t.length);return r}splitPlaceholders(e,t){let r=[e];const i=(e,t)=>{const r=[];for(const i of e){const e=i.split(t);for(let i=0,o=e.length;i<o;i++){const a=e[i],s=i===o-1;r.push(a),s||r.push(t)}}return r};for(const e of t)r=i(r,e);return r}firstLine(e,t){const r=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return r;const i=e.split("\n");return i.length>0?i[0].substring(0,t):r}wordWrap(e,t){const r=[];if(t<1||null==e||e.length<=t)return r;const i=e.length,o=i-t;let a,s=0;for(;s<o;){let i;const o=s+t,n=e.indexOf("\n",s);if(n>-1&&n>s&&n<o){i=n-s,a=e.substr(s,i),s=s+i+1,r.push(a);continue}const l=e.lastIndexOf(" ",o);let c=0;l>-1&&l!=s-1?(i=l-s,i>0&&(c=s+i+1)):(i=t,c=s+t),a=e.slice(s,s+i),s=c,r.push(a.trim())}return s<i&&(a=e.slice(s),r.push(a)),r}kebabToCamel(e){return e?e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()):e}camelToKebab(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():e}}),y={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",platformIcon:"platformIcon",platformLogo:"platformLogo",platformBackgroundImage:"platformBackgroundImage",previewImage:"previewImage",previewVideo:"previewVideo",coverImage:"coverImage",backgroundImage:"backgroundImage"};function f(e){return`&${g.kebabToCamel(e)}`}r(722);var k={tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_item:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"},x=k,v=(r(722),"plainText"),T="bitmarkText",_="number",C="boolean",w="invertedBoolean",A="enumeration",B="numberList4",S=(r(722),{plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"}),P=(r(722),"flashcard"),I="flashcard1",E="definitionList",L="definitionListPlain",N="elements",V="statements",R="quiz",G="quizResponses",F="feedback",K="questions",$="matchPairs",O="matchAudioPairs",J="matchImagePairs",D="matchMatrix",z="table",j="tableExtended",q="pronunciationTable",M="botActionResponses",H="exampleBitList",U="pageFooterSections",W="clozeList",Y="ingredients",Q="bookReferenceList",Z=(r(722),"standard"),X="resource",ee="comboResource",te=(r(722),"unknown"),re="tag",ie="property",oe="resource",ae="group",se=class{constructor(e){l(this,"type"),l(this,"configKey"),l(this,"tag"),l(this,"maxCount"),l(this,"minCount"),l(this,"chain"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"deprecated"),this.type=e.type,this.configKey=e.configKey,this.tag=e.tag,this.maxCount=e.maxCount,this.minCount=e.minCount,this.chain=e.chain,this.jsonKey=e.jsonKey,this.exportJsonKey=e.exportJsonKey,this.hasExportJsonKey=e.hasExportJsonKey,this.htmlKey=e.htmlKey,this.hasHtmlKey=e.hasHtmlKey,this.deprecated=e.deprecated}},ne=class extends se{constructor(e){super({type:re,...e}),l(this,"type",re)}toString(e){const t=Object.assign({},e);let r=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},le=class extends se{constructor(e){super({type:ie,...e}),l(this,"type",ie),l(this,"array"),l(this,"format"),l(this,"values"),l(this,"defaultValue"),this.array=e.maxCount===m||e.maxCount>1,this.format=e.format,this.values=e.values,this.defaultValue=e.defaultValue}toString(e){const t=Object.assign({},e);let r=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.array&&(r+=`, arr=${this.array}`),null!=this.format&&(r+=`, fmt=${this.format}`),null!=this.values&&(r+=`, vals=[${this.values.join(",")}]`),null!=this.defaultValue&&(r+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},ce=class extends se{constructor(e){super({type:oe,...e}),l(this,"type",oe)}toString(e){const t=Object.assign({},e);let r=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(r+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(r+=`, max=${this.maxCount}`),null!=this.minCount&&(r+=`, min=${this.minCount}`),null!=this.jsonKey&&(r+=`, json=${this.jsonKey}`)),r+="]",this.chain&&t.includeChains){r+="\n|__";let e=!0;for(const i of Object.values(this.chain))e||(r+=" "),r+=`${i.toString(t)}`,e=!1}return r}},pe=class{constructor(e,t,r,i,o,a,s=!1,n,c,p=!1){l(this,"tags"),l(this,"bodyAllowed"),l(this,"bodyRequired"),l(this,"repeatCount"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"format"),this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=r,this.repeatCount=i,this.jsonKey=o,this.exportJsonKey=a,this.hasExportJsonKey=s,this.htmlKey=c,this.hasHtmlKey=p,this.format=n}toString(e){const t=Object.assign({},e);let r="";const i=[];this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),null!=this.repeatCount&&i.push(`repeatCount=${this.repeatCount}`),r+=`[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))r+=`\n${e.toString(t)}`;return r}},ue=class{constructor(e,t,r,i,o,a=!1,s,n=!1){l(this,"name"),l(this,"repeat"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"variants"),this.name=e,this.repeat=t,this.jsonKey=i,this.exportJsonKey=o,this.hasExportJsonKey=a,this.htmlKey=s,this.hasHtmlKey=n,this.variants=r}toString(e){const t=Object.assign({},e);let r="";r+=`[Side: ${this.name}]`,this.repeat&&(r+=" (repeat)");let i=0;for(const e of this.variants)r+=`\n [Variant ${i}]`,r+=`\n ${e.toString(t)}`,i++;return r}},de=class{constructor(e,t,r,i,o,a,s=void 0,n=!1){l(this,"configKey"),l(this,"jsonKey"),l(this,"exportJsonKey"),l(this,"hasExportJsonKey"),l(this,"htmlKey"),l(this,"hasHtmlKey"),l(this,"sections"),l(this,"sides"),this.configKey=e,this.jsonKey=t,this.exportJsonKey=r,this.hasExportJsonKey=i,this.htmlKey=s,this.hasHtmlKey=n,this.sections=o,this.sides=a}get variants(){return this.sides.map(e=>e.variants)}toString(e){const t=Object.assign({},e);let r="";r+=`[CardSet: ${this.configKey}]`,r+=`\n jsonKey: ${this.jsonKey}`;for(const e of this.sides)r+=`\n${e.toString(t)}`;return r}},me=class{constructor(e){l(this,"since"),l(this,"bitType"),l(this,"title"),l(this,"bitGroups"),l(this,"inheritedBitTypes"),l(this,"inheritedBitTypesSet"),l(this,"textFormatDefault"),l(this,"tags",{}),l(this,"cardSet"),l(this,"quizBit"),l(this,"deprecated"),l(this,"bodyAllowed"),l(this,"bodyRequired"),l(this,"footerAllowed"),l(this,"footerRequired"),l(this,"resourceAttachmentAllowed"),l(this,"rootExampleType"),l(this,"comboResourceConfigKey");const{since:t,bitType:r,inheritedBitTypes:i,textFormatDefault:o,tags:a,cardSet:s,quizBit:n,deprecated:c,bodyAllowed:p,bodyRequired:u,footerAllowed:d,footerRequired:m,resourceAttachmentAllowed:h,rootExampleType:b,comboResourceConfigKey:g,title:y,bitGroups:f}=e;this.since=t,this.bitType=r,this.title=y,this.bitGroups=f,this.inheritedBitTypes=i,this.inheritedBitTypesSet=new Set(i),this.textFormatDefault=o,this.tags=a,this.cardSet=s,this.quizBit=n,this.deprecated=c,this.bodyAllowed=p??!0,this.bodyRequired=u,this.footerAllowed=d??!0,this.footerRequired=m,this.resourceAttachmentAllowed=h??!0,this.rootExampleType=b,this.comboResourceConfigKey=g}toString(e){const t=Object.assign({},e);let r=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(r+="\n\n[Inheritance]",r+=`\n${this.inheritedBitTypes.join(" => ")}`),r+=`\n\n[Default text format]\n${this.textFormatDefault}`;const i=[];null!=this.since&&i.push(`since=${this.since}`),null!=this.deprecated&&i.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&i.push("bodyAllowed"),this.bodyRequired&&i.push("bodyRequired"),this.footerAllowed&&i.push("footerAllowed"),this.footerRequired&&i.push("footerRequired"),this.resourceAttachmentAllowed&&i.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&i.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceConfigKey&&i.push(`comboResourceConfigKey=${this.comboResourceConfigKey}`),r+=`\n\n[Flags]\n${i.join(", ")}`,r+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===m||e.maxCount>0)&&(r+=`\n${e.toString(t)}`);return this.cardSet&&(r+=`\n\n${this.cardSet.toString(t)}`),r}},he=r(722),be=(r(722),r(722),{property_accessibilityGroupTag:"@accessibilityGroupTag",property_accessibilityTag:"@accessibilityTag",property_action:"@action",property_activityType:"@activityType",property_additionalSolutions:"@additionalSolutions",property_advertisingClickUrl:"@advertisingClickUrl",property_ageRange:"@ageRange",property_aiGenerated:"@aiGenerated",property_allowedBit:"@allowedBit",property_allowPrint:"@allowPrint",property_allowSubtitles:"@allowSubtitles",property_alt:"@alt",property_altLangTag:"@altLangTag",property_analyticsTag:"@analyticsTag",property_author:"@author",property_authorFullName:"@authorFullName",property_authorJobTitle:"@authorJobTitle",property_authorPseudonym:"@authorPseudonym",property_authorTitle:"@authorTitle",property_autoplay:"@autoplay",property_availableClassifications:"@availableClassifications",property_brandColor:"@brandColor",property_brandColorName:"@brandColorName",property_backgroundImage:"@backgroundImage",property_blockId:"@blockId",property_book:"@book",property_bookAlias:"@bookAlias",property_bookDiff:"@bookDiff",property_bot:"@bot",property_bubbleTag:"@bubbleTag",property_extractorTag:"@extractorTag",property_extractorInternal:"@extractorInternal",property_bitFingerprint:"@bitFingerprint",property_buttonCaption:"@buttonCaption",property_callToActionUrl:"@callToActionUrl",property_caption:"@caption",property_categoryTag:"@categoryTag",property_chatWithBook:"@chatWithBook",property_chatWithBookBrainKey:"@chatWithBookBrainKey",property_currency:"@currency",property_bookIsbn:"@bookIsbn",property_bookAuthor:"@bookAuthor",property_bookType:"@bookType",property_bookBindingType:"@bookBindingType",property_bookNumberOfPages:"@bookNumberOfPages",property_bookRating:"@bookRating",property_bookSeriesTitle:"@bookSeriesTitle",property_bookSeriesId:"@bookSeriesId",property_bookSeriesNumber:"@bookSeriesNumber",property_bookLanguage:"@bookLanguage",property_bookPublishingDate:"@bookPublishingDate",property_bookPublisher:"@bookPublisher",property_bookTranslator:"@bookTranslator",property_bookOriginalTitle:"@bookOriginalTitle",property_gmbExternalShop:"@gmbExternalShop",property_gmbExternalShopItems:"@gmbExternalShopItems",property_citationStyle:"@citationStyle",property_classification:"@classification",property_codeLineNumbers:"@codeLineNumbers",property_codeMinimap:"@codeMinimap",property_color:"@color",property_colorTag:"@colorTag",property_computerLanguage:"@computerLanguage",property_content2Buy:"@content2Buy",property_listPrice:"@listPrice",property_customerProductId:"@customerProductId",property_customerProductShopLink:"@customerProductShopLink",property_copyright:"@copyright",property_coverColor:"@coverColor",property_coverImage:"@coverImage",property_customerExternalId:"@customerExternalId",property_customerId:"@customerId",property_date:"@date",property_dateEnd:"@dateEnd",property_decimalPlaces:"@decimalPlaces",property_deeplink:"@deeplink",property_displayName:"@displayName",property_diffContext:"@diffContext",property_diffOp:"@diffOp",property_diffRef:"@diffRef",property_diffTime:"@diffTime",property_diffTo:"@diffTo",property_disableCalculation:"@disableCalculation",property_disableFeedback:"@disableFeedback",property_duration:"@duration",property_isEditable:"@isEditable",property_needsValidation:"@needsValidation",property_validationDate:"@validationDate",property_emphasis:"@emphasis",property_example:"@example",property_externalId:"@externalId",property_externalLink:"@externalLink",property_externalLinkText:"@externalLinkText",property_feedbackEngine:"@feedbackEngine",property_feedbackType:"@feedbackType",property_userFeedbackTranslationUrl:"@userFeedbackTranslationUrl",property_userFeedbackContentUrl:"@userFeedbackContentUrl",property_flashcardSet:"@flashcardSet",property_focusX:"@focusX",property_focusY:"@focusY",property_format:"@format",property_formula:"@formula",property_fullName:"@fullName",property_groupTag:"@groupTag",property_gUri:"@gUri",property_handInAcceptFileType:"@handInAcceptFileType",property_handInInstruction:"@handInInstruction",property_handInRequirement:"@handInRequirement",property_hasBookNavigation:"@hasBookNavigation",property_hasMarkAsDone:"@hasMarkAsDone",property_height:"@height",property_icon:"@icon",property_iconTag:"@iconTag",property_id:"@id",property_iframeSrc:"@iframeSrc",property_iframeName:"@iframeName",property_imageFirst:"@imageFirst",property_imageSource:"@imageSource",property_index:"@index",property_internalComment:"@internalComment",property_internalPrintPdf:"@internalPrintPdf",property_hasPrintRestriction:"@hasPrintRestriction",property_enforceUpdateOverUserInput:"@enforceUpdateOverUserInput",property_extractorExtractionTimestamp:"@extractorExtractionTimestamp",property_isCaseSensitive:"@isCaseSensitive",property_isCollapsible:"@isCollapsible",property_isInfoOnly:"@isInfoOnly",property_isPublic:"@isPublic",property_isTemplate:"@isTemplate",property_isTemplateStripTheme:"@isTemplateStripTheme",property_isTracked:"@isTracked",property_jobTitle:"@jobTitle",property_jupyterExecutionCount:"@jupyterExecutionCount",property_jupyterId:"@jupyterId",property_kind:"@kind",property_label:"@label",property_labelFalse:"@labelFalse",property_labelTrue:"@labelTrue",property_lang:"@lang",property_language:"@language",property_layer:"@layer",property_layerRole:"@layerRole",property_levelACTFL:"@levelACTFL",property_levelCEFR:"@levelCEFR",property_levelCEFRp:"@levelCEFRp",property_levelILR:"@levelILR",property_license:"@license",property_list:"@list",property_listItemIndent:"@listItemIndent",property_location:"@location",property_machineTranslated:"@machineTranslated",property_translationOf:"@translationOf",property_translationOfBook:"@translationOfBook",property_spansPageBreak:"@spansPageBreak",property_mailingList:"@mailingList",property_mark:"@mark",property_maxCreatedBits:"@maxCreatedBits",property_maxDisplayLevel:"@maxDisplayLevel",property_maxTocChapterLevel:"@maxTocChapterLevel",property_mockupId:"@mockupId",property_mute:"@mute",property_padletId:"@padletId",property_page:"@page",property_printParentChapterLevel:"@printParentChapterLevel",property_printOnRequestCustomerId:"@printOnRequestCustomerId",property_printOnRequestProductId:"@printOnRequestProductId",property_pageNo:"@pageNo",property_partialAnswer:"@partialAnswer",property_partner:"@partner",property_path:"@path",property_platformBackgroundColor:"@platformBackgroundColor",property_platformBorderColor:"@platformBorderColor",property_platformBrandTarget:"@platformBrandTarget",property_platformButtonBackgroundColor:"@platformButtonBackgroundColor",property_platformButtonPrimaryColor:"@platformButtonPrimaryColor",property_platformMessageBackgroundColor:"@platformMessageBackgroundColor",property_platformName:"@platformName",property_platformPlaceholderColor:"@platformPlaceholderColor",property_platformPrimaryColor:"@platformPrimaryColor",property_platformScrollbarColor:"@platformScrollbarColor",property_platformSecondaryColor:"@platformSecondaryColor",property_platformSelectionColor:"@platformSelectionColor",property_platformSelectionTextColor:"@platformSelectionTextColor",property_platformBaseLayerColor:"@platformBaseLayerColor",property_platformMargin:"@platformMargin",property_platformBorderRadius:"@platformBorderRadius",property_platformSelectionBorderRadius:"@platformSelectionBorderRadius",property_platformLogoMaxHeight:"@platformLogoMaxHeight",property_platformNeedsShadow:"@platformNeedsShadow",property_platformSeparatorColor:"@platformSeparatorColor",property_platformTextSelectionColor:"@platformTextSelectionColor",property_person:"@person",property_pointerLeft:"@pointerLeft",property_pointerTop:"@pointerTop",property_posterImage:"@posterImage",property_processHandIn:"@processHandIn",property_processHandInLocation:"@processHandInLocation",property_product:"@product",property_productFolder:"@productFolder",property_productId:"@productId",property_productVideo:"@productVideo",property_progress:"@progress",property_pseudonym:"@pseudonym",property_publications:"@publications",property_publisher:"@publisher",property_publisherName:"@publisherName",property_quizCountItems:"@quizCountItems",property_quizStrikethroughSolutions:"@quizStrikethroughSolutions",property_quotedPerson:"@quotedPerson",property_ratingLevelEnd:"@ratingLevelEnd",property_ratingLevelSelected:"@ratingLevelSelected",property_ratingLevelStart:"@ratingLevelStart",property_reaction:"@reaction",property_reasonableNumOfChars:"@reasonableNumOfChars",property_reductionTag:"@reductionTag",property_refAuthor:"@refAuthor",property_refBookTitle:"@refBookTitle",property_reference:"@reference",property_refPublicationYear:"@refPublicationYear",property_refPublisher:"@refPublisher",property_relatedBook:"@relatedBook",property_releaseDate:"@releaseDate",property_releaseKind:"@releaseKind",property_releaseVersion:"@releaseVersion",property_reportTag:"@reportTag",property_resolved:"@resolved",property_resolvedBy:"@resolvedBy",property_resolvedDate:"@resolvedDate",property_revealSolutions:"@revealSolutions",property_reviewTag:"@reviewTag",property_reviewerTag:"@reviewerTag",property_rightsPolicy:"@rightsPolicy",property_sampleSolution:"@sampleSolution",property_scormSource:"@scormSource",property_search:"@search",property_searchIndex:"@searchIndex",property_selected:"@selected",property_servings:"@servings",property_showInIndex:"@showInIndex",property_showSubtitles:"@showSubtitles",property_siteName:"@siteName",property_size:"@size",property_slug:"@slug",property_sourceBB:"@sourceBB",property_sourceDocument:"@sourceDocument",property_sourceRL:"@sourceRL",property_spaceId:"@spaceId",property_src1x:"@src1x",property_src2x:"@src2x",property_src3x:"@src3x",property_src4x:"@src4x",property_srcAlt:"@srcAlt",property_stripePricingTableId:"@stripePricingTableId",property_stripePricingTableDescriptiveName:"@stripePricingTableDescriptiveName",property_stripePublishableKey:"@stripePublishableKey",property_subject:"@subject",property_subtype:"@subtype",property_tableAutoWidth:"@tableAutoWidth",property_tableColWidth:"@tableColWidth",property_tableColumnMinWidth:"@tableColumnMinWidth",property_tableFixedHeader:"@tableFixedHeader",property_tableHeaderWhitespaceNoWrap:"@tableHeaderWhitespaceNoWrap",property_tableHeight:"@tableHeight",property_tablePagination:"@tablePagination",property_tablePaginationLimit:"@tablePaginationLimit",property_tableResizableColumns:"@tableResizableColumns",property_tableSearch:"@tableSearch",property_tableSort:"@tableSort",property_tableWhitespaceNoWrap:"@tableWhitespaceNoWrap",property_tableCellType:"@tableCellType",property_tableRowSpan:"@tableRowSpan",property_tableColSpan:"@tableColSpan",property_tableScope:"@tableScope",property_tag:"@tag",property_target:"@target",property_technicalTerm:"@technicalTerm",property_textReference:"@textReference",property_theme:"@theme",property_rtl:"@rtl",property_thumbImage:"@thumbImage",property_title:"@title",property_toc:"@toc",property_tocContent:"@tocContent",property_tocResource:"@tocResource",property_topicTag:"@topicTag",property_trim:"@trim",property_unit:"@unit",property_unitAbbr:"@unitAbbr",property_unitAbbrPlural:"@unitAbbrPlural",property_unitPlural:"@unitPlural",property_vendorDashboardId:"@vendorDashboardId",property_vendorSurveyId:"@vendorSurveyId",property_vendorUrl:"@vendorUrl",property_videoCallLink:"@videoCallLink",property_width:"@width",property_x:"@x",property_y:"@y",property_zoomDisabled:"@zoomDisabled"}),ge=be,ye=(r(722),{_unknown:"_unknown",...k,resource_image:"&image",resource_imageResponsive:"&imageResponsive",resource_imagePortrait:"&imagePortrait",resource_imageLandscape:"&imageLandscape",resource_imageEmbed:"&imageEmbed",resource_imageLink:"&imageLink",resource_audio:"&audio",resource_audioEmbed:"&audioEmbed",resource_audioLink:"&audioLink",resource_video:"&video",resource_videoEmbed:"&videoEmbed",resource_videoLink:"&videoLink",resource_stillImageFilm:"&stillImageFilm",resource_stillImageFilmEmbed:"&stillImageFilmEmbed",resource_stillImageFilmLink:"&stillImageFilmLink",resource_article:"&article",resource_articleEmbed:"&articleEmbed",resource_articleLink:"&articleLink",resource_document:"&document",resource_documentEmbed:"&documentEmbed",resource_documentLink:"&documentLink",resource_documentDownload:"&documentDownload",resource_appLink:"&appLink",resource_websiteLink:"&websiteLink",resource_icon:"&icon",resource_platformBackgroundImage:"&platformBackgroundImage",resource_platformIcon:"&platformIcon",resource_platformLogo:"&platformLogo",resource_backgroundWallpaper:"&backgroundWallpaper",resource_imagePlaceholder:"&imagePlaceholder",resource_previewImage:"&previewImage",resource_previewVideo:"&previewVideo",resource_coverImage:"&coverImage",resource_backgroundImage:"&backgroundImage",...be,group_accessibilityDecorative:"group_accessibilityDecorative",group_standardAllBits:"group_standardAllBits",group_standardExample:"group_standardExample",group_standardItem:"group_standardItem",group_standardItemLead:"group_standardItemLead",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardInstructionHint:"group_standardInstructionHint",group_standardTags:"group_standardTags",group_standardTagsNoItemLead:"group_standardTagsNoItemLead",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_trueFalseInlineHighlight:"group_trueFalseInlineHighlight",group_trueFalseInlineSelect:"group_trueFalseInlineSelect",group_trueFalseResponses:"group_trueFalseResponses",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_advertisingCommon:"group_advertisingCommon",group_platformStylesCommon:"group_platformStylesCommon",group_quizCommon:"group_quizCommon",group_backgroundWallpaper:"group_backgroundWallpaper",group_imageNoZoom:"group_imageNoZoom",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceImageCommonNoZoom:"group_resourceImageCommonNoZoom",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageNoZoom:"group_resourceImageNoZoom",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",group_previewImages:"group_previewImages",group_previewVideos:"group_previewVideos"});function fe(e){return e?e.startsWith("@")?ie:e.startsWith("&")?oe:e.startsWith("group_")?ae:re:te}function ke(e){return e.replace(/^@/,"")}function xe(e){return(0,he.Enum)(y).fromKey(e.replace(/^&/,""))}var ve=class{constructor(e,t,r,i){l(this,"tags"),l(this,"resourceAttachmentAllowed"),l(this,"resourceAttachmentConfigKey"),l(this,"comboResourceConfigKeysMap"),this.tags=e,this.resourceAttachmentAllowed=t??!1,this.resourceAttachmentConfigKey=r,this.comboResourceConfigKeysMap=i}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.configKey,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.configKey,t.maxCount);return e}},Te=(r(722),{app:"app",article:"article",audio:"audio",document:"document",image:"image",stillImageFilm:"still-image-film",video:"video",website:"website"}),_e=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 r=e;for(const e of t){if(null==r)return;r=r[e]}return r}setViaPath(e,t,r,i){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 r=t[e];if(null==o[r]){if(!i)return!1;o[r]={}}o=o[r]}return o[t[t.length-1]]=r,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const r=e,i=t.shift();if(null==i)return r;const o=r[i];return o?Array.isArray(o)?o.flatMap(e=>this.flatMapPath(e,t.slice())):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const r=e,i=Object.assign({},r);for(const e of Object.keys(r))delete r[e];for(const e of t)Object.prototype.hasOwnProperty.call(i,e)&&(r[e]=i[e])}removeUndefinedProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||null==i&&delete r[e]}removeFalseProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||!1===i&&delete r[e]}removeEmptyStringProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||""===i&&delete r[e]}removeEmptyArrayProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||Array.isArray(i)&&0===i.length&&delete r[e]}removeEmptyObjectProperties(e,t){const r=e;for(const[e,i]of Object.entries(r))t&&t.indexOf(e)>=0||this.isObject(i)&&0===Object.keys(i).length&&delete r[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 r=e;if(null==r[t])return;let i=r[t];if(Array.isArray(i)){if(0===i.length)return;i=i[i.length-1]}return i}deepMerge(...e){return function e(...t){function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(t,i){for(const[o,a]of Object.entries(i)){const i=r(a);void 0!==t[o]&&r(t[o])===i&&["array","object"].includes(i)?t[o]=e(t[o],a):t[o]=structuredClone(a)}}let o=structuredClone(t.shift());for(const e of t){const t=r(e);r(o)===t?"array"===t?o=[...o,...structuredClone(e)]:"object"===t?i(o,e):o=e:o=structuredClone(e)}return o}(...e)}},Ce=r(722),we={[P]:{jsonKey:"cards",exportJsonKey:{cards:"$"},sides:[{name:"question",variants:[{jsonKey:"question.text",exportJsonKey:[{"@absent":{question:{}}},{question:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"question.icon|resource(type=image, key=image)",exportJsonKey:{question:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard question.",format:T,nullable:!0}]}]},{name:"answer",variants:[{jsonKey:"answer.text",exportJsonKey:[{"@absent":{answer:{}}},{answer:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"answer.icon|resource(type=image, key=image)",exportJsonKey:{answer:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard answer.",format:T,nullable:!0}]},{jsonKey:"alternativeAnswers[].text",exportJsonKey:{alternativeAnswers:[{text:"$"}]},tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"alternativeAnswers[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeAnswers:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[I]:{jsonKey:"cards",exportJsonKey:{cards:"$"},sections:{default:{jsonKey:"cards",exportJsonKey:{cards:"$"},isDefault:!0,maxCount:1}},sides:[{name:"question",variants:[{jsonKey:"question.text",exportJsonKey:[{"@absent":{question:{}}},{question:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"question.icon|resource(type=image, key=image)",exportJsonKey:{question:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard question.",format:T,nullable:!0}]}]},{name:"answer",variants:[{jsonKey:"answer.text",exportJsonKey:[{"@absent":{answer:{}}},{answer:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"answer.icon|resource(type=image, key=image)",exportJsonKey:{answer:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the flashcard answer.",format:T,nullable:!0}]},{jsonKey:"alternativeAnswers[].text",exportJsonKey:{alternativeAnswers:[{text:"$"}]},tags:[{key:ye.group_standardTags,description:"Standard tags for the flashcard."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the flashcard."},{key:ye.group_resourceIcon,description:"Icon resource for the flashcard.",jsonKey:"alternativeAnswers[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeAnswers:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[E]:{jsonKey:"definitions",exportJsonKey:{definitions:"$"},mappingKeys:{"xml-niso-iec":[{"@el":"def-item","@children":"$"},{"@el":"tbx:langSet","@children":"$"}]},sides:[{name:"term",mappingKeys:{"xml-niso-iec":[{"@el":"term","@text":"$"},{"@el":"tbx:tig","@children":{"@el":"tbx:term","@text":"$\n"}}]},variants:[{jsonKey:"term.text",exportJsonKey:[{"@absent":{term:{}}},{term:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",format:v,jsonKey:"term.icon|resource(type=image, key=image)",exportJsonKey:{term:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition term.",format:T,nullable:!0}]}]},{name:"definition",mappingKeys:{"xml-niso-iec":[{"@el":"def","@children":"$"},{"@el":"tbx:subjectField","@text":"⟨$⟩ "},{"@el":"tbx:definition","@children":"$"},{"@el":"tbx:example","@children":"BEISPIEL $"},{"@el":"tbx:note","@children":"Anmerkung zu Begriff: $"},{"@el":"tbx:source","@text":"[QUELLE: $]"}]},variants:[{jsonKey:"definition.text",exportJsonKey:[{"@absent":{definition:{}}},{definition:{text:"$"}}],tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"definition.icon|resource(type=image, key=image)",exportJsonKey:{definition:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition.",format:T,nullable:!0}]},{jsonKey:"alternativeDefinitions[].text",exportJsonKey:{alternativeDefinitions:[{text:"$"}]},tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the definition."},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"alternativeDefinitions[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeDefinitions:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[L]:{jsonKey:"definitions",exportJsonKey:{definitions:"$"},sides:[{name:"term",variants:[{jsonKey:"term.text",exportJsonKey:[{"@absent":{term:{}}},{term:{text:"$"}}],format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",format:v,jsonKey:"term.icon|resource(type=image, key=image)",exportJsonKey:{term:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition term.",format:T,nullable:!0}]}]},{name:"definition",variants:[{jsonKey:"definition.text",exportJsonKey:[{"@absent":{definition:{}}},{definition:{text:"$"}}],format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{key:ye.tag_title,description:"Title of the definition.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"definition.icon|resource(type=image, key=image)",exportJsonKey:{definition:{icon:{type:"image",image:{src:"$"}}}}},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the definition.",format:T,nullable:!0}]},{jsonKey:"alternativeDefinitions[].text",exportJsonKey:{alternativeDefinitions:[{text:"$"}]},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the definition."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the definition."},{key:ye.group_resourceIcon,description:"Icon resource for the definition.",jsonKey:"alternativeDefinitions[].icon|resource(type=image, key=image)",exportJsonKey:{alternativeDefinitions:[{icon:{type:"image",image:{src:"$"}}}]}}],repeatCount:m}]}]},[$]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the match pair."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{isExample:!0,example:"$cascade","@bit":{isExample:!0}}},{"@absent":{isExample:!0}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker / value on the match pair.",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the match pair.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.property_isCaseSensitive,exportJsonKey:[{predicates:["@absent",{"@variantLacksTag":"@isCaseSensitive"}],rule:{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"Property to indicate if the match is case sensitive.",format:C},{key:ye.resource_audio,description:"Audio resource for the match pair.",jsonKey:"keyAudio",exportJsonKey:{keyAudio:"$"}},{key:ye.resource_image,description:"Image resource for the match pair.",jsonKey:"keyImage",exportJsonKey:{keyImage:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:S.plainText,tags:[{key:ye.group_standardTagsNoItemLead,description:"Standard tags for the match pair (values side, no item/lead)."},{key:ye.property_example,exportJsonKey:[{predicates:["@keyonly"],maxEmits:1,rule:{isExample:!0,example:"$parent","@bit":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{isExample:!0,example:"$cascade","@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent","@bit":{isExample:!0}}},{predicates:[],maxEmits:1,rule:{isExample:!0,example:"$","@bit":{isExample:!0}}}],description:"Example marker / value on the match pair (values side).",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the match pair.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.property_isCaseSensitive,exportJsonKey:[{predicates:["@absent",{"@variantLacksTag":"@isCaseSensitive"}],rule:{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"Property to indicate if the match is case sensitive.",format:C}],repeatCount:m}]}]},[O]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the audio match pair."},{key:ye.tag_title,description:"Title of the audio match pair.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.resource_audio,description:"Audio resource for the match pair.",jsonKey:"keyAudio",exportJsonKey:{keyAudio:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:S.plainText,tags:[{key:ye.group_standardTagsNoItemLead,description:"Standard tags for the audio match pair (values side, no item/lead)."},{key:ye.tag_title,description:"Title of the audio match pair.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.resource_audio,description:"Audio resource for the match pair."}],repeatCount:m}]}]},[J]:{jsonKey:"pairs",exportJsonKey:{pairs:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardTags,description:"Standard tags for the image match pair."},{key:ye.tag_title,description:"Title of the image match pair.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.resource_image,description:"Image resource for the match pair.",jsonKey:"keyImage",exportJsonKey:{keyImage:"$"}}]}]},{name:"values",repeat:!0,variants:[{jsonKey:"values[]",exportJsonKey:{values:["$"]},format:S.plainText,tags:[{key:ye.group_standardTagsNoItemLead,description:"Standard tags for the image match pair (values side, no item/lead)."},{key:ye.tag_title,description:"Title of the image match pair.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}},{key:ye.resource_image,description:"Image resource for the match pair."}],repeatCount:m}]}]},[D]:{jsonKey:"matrix",exportJsonKey:{matrix:"$"},sides:[{name:"key",variants:[{jsonKey:"key",exportJsonKey:{key:"$"},format:S.plainText,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}],description:"Example text for the match matrix.",format:v,nullable:!0},{key:ye.tag_title,description:"Title of the match matrix.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"Property to indicate if the match is case sensitive.",format:C}]}]},{name:"cell",repeat:!0,variants:[{jsonKey:"cells[{s}].values[]",exportJsonKey:[{predicates:["@absent",{"@variantHasTag":"#"}],rule:{"@bit":{heading:{forValues:[""]}}}},{cells:{$s:{values:["$"]}}}],format:S.plainText,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{cells:{$s:{isExample:!0,example:"$parent"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{predicates:["@absent",{$cascade:"*"}],rule:{cells:{$s:{isExample:!0,example:"$cascade"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{cells:{$s:{isExample:!0,example:"$parent"}},"@bit":{isExample:!0},"@card":{isExample:!0}}},{cells:{$s:{isExample:!0,example:"$"}},"@bit":{isExample:!0},"@card":{isExample:!0}}],description:"Example text for the match matrix.",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the match matrix.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:[{"@keyonly":{"@bit":{heading:{forValues:[""]}}}},{"@bit":{heading:{forValues:["$"]}}}]},{key:ye.property_isCaseSensitive,exportJsonKey:[{"@absent":{cells:{$s:{isCaseSensitive:"$ancestor"}}}},{cells:{$s:{isCaseSensitive:"$"}}}],description:"Property to indicate if the match is case sensitive.",format:C}],repeatCount:m}]}]},[V]:{jsonKey:"statements",exportJsonKey:{statements:"$"},sides:[{name:"statement",variants:[{jsonKey:"statement",exportJsonKey:{statement:"$"},tags:[{key:ye.tag_true,description:"Tag for true statements.",jsonKey:"statement|set(isCorrect=true)",exportJsonKey:{statement:"$",isCorrect:!0},maxCount:1},{key:ye.tag_false,description:"Tag for false statements.",jsonKey:"statement|set(isCorrect=false)",exportJsonKey:{statement:"$",isCorrect:!1},maxCount:1},{key:ye.group_standardTags,description:"Standard tags for the statement."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker on the statement. Bare `[@example]` emits the boolean marker; valued `[@example:true|false]` emits the literal value. Cascade from bit-header fills `example` with the entry’s own `isCorrect`.",format:C,nullable:!0}],bodyAllowed:!1}]}]},[R]:{jsonKey:"quizzes",exportJsonKey:{quizzes:"$"},sides:[{name:"choices",variants:[{jsonKey:null,tags:[{key:ye.group_trueFalse,description:"Group for true/false questions."},{key:ye.group_standardTags,description:"Standard tags for the quiz."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0}}],description:"Example marker on the quiz choice (entry-local only; cascade handled by group_trueFalse chain-children).",format:C,nullable:!0}],bodyAllowed:!1}]}]},[G]:{jsonKey:"quizzes",exportJsonKey:{quizzes:"$"},sides:[{name:"responses",variants:[{jsonKey:null,tags:[{key:ye.group_trueFalseResponses,description:"Group for true/false questions."},{key:ye.group_standardTags,description:"Standard tags for the quiz."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,"@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0}}},{isExample:!0,"@bit":{isExample:!0}}],description:"Example marker on the quiz response; cascade from bit-header fills `example` with the entry’s own `isCorrect`.",format:C,nullable:!0}],bodyAllowed:!1}]}]},[F]:{jsonKey:"feedbacks",exportJsonKey:{feedbacks:"$"},sides:[{name:"choices",variants:[{jsonKey:null,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.tag_true,exportJsonKey:{choices:[{choice:"$",requireReason:!0}]},description:"Reason-required choice for feedback (`[+]`).",maxCount:m,format:v,chain:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"Per-choice example marker for feedback `[+]`.",format:C,maxCount:1,nullable:!0},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint chained onto the feedback choice."}]},{key:ye.tag_false,exportJsonKey:{choices:[{choice:"$",requireReason:!1}]},description:"Reason-not-required choice for feedback (`[-]`).",maxCount:m,format:v,chain:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"Per-choice example marker for feedback `[-]`.",format:C,maxCount:1,nullable:!0},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint chained onto the feedback choice."}]},{key:ye.group_trueFalse,description:"Group for true/false feedback."},{key:ye.tag_title,description:"Title of the feedback.",format:v,nullable:!0,jsonKey:"^heading.forKeys",exportJsonKey:{"@bit":{heading:{forKeys:"$"}}}}],bodyAllowed:!1}]},{name:"reason",variants:[{jsonKey:"reason.text",exportJsonKey:{reason:{text:"$"}},format:S.plainText,tags:[{key:ye.tag_instruction,exportJsonKey:{reason:{instruction:"$"}},description:"Instruction for the feedback reason.",format:T},{key:ye.property_reasonableNumOfChars,exportJsonKey:[{"@absent":{reason:{reasonableNumOfChars:"$ancestor"}}},{reason:{reasonableNumOfChars:"$"}}],description:"Property for reasonable number of characters.",format:_},{key:ye.property_example,exportJsonKey:[{"@keyonly":{reason:{isExample:!0,example:[{type:"paragraph",content:[{text:"true",type:"text"}]}]},isExample:!0,example:!0,"@bit":{isExample:!0}}},{reason:{isExample:!0,example:"$"},isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the feedback reason (entry-local only; no bit-header cascade).",format:T,nullable:!0},{key:ye.tag_title,description:"Title of the feedback.",format:v,nullable:!0,jsonKey:"^heading.forValues",exportJsonKey:{"@bit":{heading:{forValues:"$"}}}}],bodyAllowed:!0}]}]},[K]:{jsonKey:"questions",exportJsonKey:{questions:"$"},sides:[{name:"question",variants:[{jsonKey:"question",exportJsonKey:{question:"$"},tags:[{key:ye.property_reasonableNumOfChars,exportJsonKey:[{"@absent":{reasonableNumOfChars:"$ancestor"}},{reasonableNumOfChars:"$"}],description:"Property for reasonable number of characters.",format:_},{exportJsonKey:{sampleSolution:"$"},key:ye.tag_sampleSolution,description:"Sample solution for the question.",format:v},{key:ye.property_sampleSolution,description:"Property for sample solution text.",format:v},{key:ye.property_additionalSolutions,description:"Property for additional solutions.",format:v,maxCount:m},{key:ye.property_partialAnswer,description:"Property for partial answer text.",format:v},{key:ye.group_standardTags,description:"Standard tags for the question."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.sampleSolution","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example marker for the question (entry-local only; no bit-header cascade).",format:T,nullable:!0}]}]}]},[N]:{jsonKey:null,sides:[{name:"element",repeat:!0,variants:[{jsonKey:"elements[]",exportJsonKey:{elements:["$"]},tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the element (entry-local only; no bit-header cascade).",format:v,nullable:!0}],repeatCount:m}]}]},[z]:{jsonKey:null,exportJsonKey:null,htmlKey:{"@el":"table","@children":"$"},sections:{"table-header":{jsonKey:"table.columns",exportJsonKey:[{predicates:[{"@cardIndex":0},{"@variantHasTag":"#"}],rule:{"@bit":{table:{columns:"$"}}}},{"@cardIndex=0":{"@bit":{table:{columns:"$"}}}},{"@bit":{table:{data:["$"]}}}],htmlKey:{"@el":"thead","@children":{"@el":"tr","@children":"$"}},sideHtmlKey:{"@el":"th","@children":"$"}},"table-body":{jsonKey:"table.data",exportJsonKey:{"@bit":{table:{data:"$"}}},htmlKey:{"@el":"tbody","@children":{"@el":"tr","@children":"$"}},isDefault:!0},"table-footer":{jsonKey:"table.data",exportJsonKey:{"@bit":{table:{data:"$"}}},htmlKey:{"@el":"tfoot","@children":{"@el":"tr","@children":"$"}}}},sides:[{name:"cell",repeat:!0,htmlKey:{"@el":"td","@children":"$"},variants:[{jsonKey:null,tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.tag_title,jsonKey:"^table.columns[]",exportJsonKey:{"@bit":{table:{columns:["$"]}}},description:"Title of the table."},{key:ye.property_tableCellType,htmlKey:[{"@value=th":{"@el":"th"}},{"@absent":{"@el":"td"}}],description:"Table cell type (th/td).",format:v},{key:ye.property_tableRowSpan,htmlKey:{"@el":{"@attr":{rowspan:"$"}}},description:"Number of rows the cell spans.",format:_},{key:ye.property_tableColSpan,htmlKey:{"@el":{"@attr":{colspan:"$"}}},description:"Number of columns the cell spans.",format:_},{key:ye.property_tableScope,htmlKey:{"@el":{"@attr":{scope:"$"}}},description:"Scope attribute for header cells.",format:v},{key:ye.property_tableColWidth,jsonKey:"^table.columnWidths[{s}]",exportJsonKey:{"@bit":{table:{columnWidths:{$s:"$"}}}},htmlKey:{"@el":{"@attr":{width:"$"}}},description:"Width for the column.",format:_}],repeatCount:m}]}]},[j]:{jsonKey:null,htmlKey:{"@el":"table","@children":"$"},sections:{"table-header":{jsonKey:"table.header.rows",exportJsonKey:[{predicates:[{"@cardIndex":0},{"@variantHasTag":"#"}],rule:{table:{header:{rows:["$"]}}}},{table:{header:{rows:["$"]}}}],htmlKey:{"@el":"thead","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"thead","@children":{"@el":"tr","@children":"$"}}},sideJsonKey:"cells[{s}]|set(title=true)",sideExportJsonKey:{cells:{$s:{title:!0,$:"$"}}},sideHtmlKey:{"@el":"th","@children":"$"}},"table-body":{jsonKey:"table.body.rows",exportJsonKey:{table:{body:{rows:"$"}}},htmlKey:{"@el":"tbody","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"tbody","@children":{"@el":"tr","@children":"$"}}},isDefault:!0},"table-footer":{jsonKey:"table.footer.rows",exportJsonKey:{table:{footer:{rows:"$"}}},htmlKey:{"@el":"tfoot","@children":{"@el":"tr","@children":"$"}},mappingKeys:{"xml-niso-iec":{"@el":"table-wrap-foot","@children":"$"}},sideJsonKey:"cells[{s}]|set(title=true)",sideExportJsonKey:{cells:{$s:{title:!0,$:"$"}}},sideHtmlKey:{"@el":"th","@children":"$"}}},sides:[{name:"cell",repeat:!0,jsonKey:"cells[{s}]",exportJsonKey:{cells:{$s:"$"}},htmlKey:{"@el":"td","@children":"$"},mappingKeys:{"xml-niso-iec":{"@el":"td","@children":"$"}},variants:[{jsonKey:"content",exportJsonKey:{content:"$"},tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{key:ye.tag_title,jsonKey:"content",exportJsonKey:{content:"$"},description:"Title text of the table cell (header rows).",mappingKeys:{"xml-niso-iec":{"@el":"th","@children":"$"}}},{key:ye.property_tableCellType,jsonKey:"title|bool(th)",exportJsonKey:[{"@value=th":{title:!0}}],htmlKey:[{"@value=th":{"@el":"th"}},{"@absent":{"@el":"td"}}],description:"Table cell type (th/td).",format:v},{key:ye.property_tableRowSpan,jsonKey:"rowspan",exportJsonKey:{rowspan:"$"},htmlKey:{"@el":{"@attr":{rowspan:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":{"@attr":{rowspan:"$"}}}},description:"Number of rows the cell spans.",format:_},{key:ye.property_tableColSpan,jsonKey:"colspan",exportJsonKey:{colspan:"$"},htmlKey:{"@el":{"@attr":{colspan:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":{"@attr":{colspan:"$"}}}},description:"Number of columns the cell spans.",format:_},{key:ye.property_tableScope,jsonKey:"scope",exportJsonKey:{scope:"$"},htmlKey:{"@el":{"@attr":{scope:"$"}}},description:"Scope attribute for header cells.",format:v},{key:ye.property_tableColWidth,jsonKey:"colwidth",exportJsonKey:{colwidth:"$"},htmlKey:{"@el":{"@attr":{width:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"col","@attr":{width:"$"}}},description:"Width for the column.",format:_}],repeatCount:m}]}]},[q]:{jsonKey:"pronunciationTable.data",exportJsonKey:{pronunciationTable:{data:"$"}},sides:[{name:"cell",repeat:!0,variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardItemLeadInstructionHint,description:"Standard tags for lead, instruction, and hint."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the pronunciation table."},{key:ye.resource_audio,description:"Audio resource for the pronunciation table.",jsonKey:"audio",exportJsonKey:{audio:{type:"audio",audio:{src:"$"}}}}],repeatCount:m}]}]},[M]:{jsonKey:"responses",exportJsonKey:{responses:"$"},sides:[{name:"response",variants:[{jsonKey:"feedback",exportJsonKey:{feedback:"$"},format:S.plainText,tags:[{key:ye.property_reaction,description:"Reaction to the bot action.",format:v},{key:ye.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},format:v,description:"The item for the bit",chain:[{key:ye.tag_item,jsonKey:"lead",exportJsonKey:{lead:"$"},description:"The lead for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"pageNumber",exportJsonKey:{pageNumber:"$"},description:"The page number for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"marginNumber",exportJsonKey:{marginNumber:"$"},description:"The margin number for the bit",maxCount:1}]}]}]},{key:ye.tag_instruction,description:"The response label for the bot action.",jsonKey:"response",exportJsonKey:{response:"$"},format:v},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0,"@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"Example text for the bot action response (entry-local only; no bit-header cascade).",format:v,nullable:!0}]}]}]},[W]:{jsonKey:"listItems",exportJsonKey:{listItems:"$"},sides:[{name:"content",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardTags,description:"Standard tags for cloze items."},{key:ye.group_gap,description:"Group for gap tags in cloze items."}]}]}]},[H]:{jsonKey:"listItems",exportJsonKey:{listItems:"$"},sides:[{name:"item",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardTags,description:"Standard tags for example bits."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the example bit."}]}]}]},[U]:{jsonKey:"sections",exportJsonKey:{sections:"$"},sides:[{name:"item",variants:[{jsonKey:"body",exportJsonKey:{body:"$"},tags:[{key:ye.group_standardTags,description:"Standard tags for page-footer section bits."},{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the page-footer section."}]}]}]},[Y]:{jsonKey:"ingredients",exportJsonKey:{ingredients:"$"},sides:[{name:"ingredient",variants:[{jsonKey:"ingredient",exportJsonKey:{ingredient:"$"},tags:[{exportJsonKey:{title:"$"},key:ye.tag_title,description:"Title of the ingredient."},{key:ye.tag_true,description:"Checked state for the ingredient.",jsonKey:"|set(checked=true)",exportJsonKey:{checked:!0,$:"$"},maxCount:1},{key:ye.tag_false,description:"Unchecked state for the ingredient.",jsonKey:"|set(checked=false)",exportJsonKey:{checked:!1,$:"$"},maxCount:1},{key:ye.group_standardItemLead,description:"Item, lead, page number, and margin number for the ingredient."},{key:ye.tag_instruction,description:"The quantity of the ingredient.",jsonKey:"quantity",exportJsonKey:{quantity:"$"},format:_},{exportJsonKey:{hint:"$"},key:ye.tag_hint,description:"The hint for the ingredient."},{key:ye.property_unit,description:"Unit of measurement for the ingredient (singular).",format:v},{key:ye.property_unitPlural,description:"Unit of measurement for the ingredient (plural).",format:v},{key:ye.property_unitAbbr,description:"Abbreviation for the unit of measurement (singular).",format:v},{key:ye.property_unitAbbrPlural,description:"Abbreviation for the unit of measurement (plural).",format:v},{key:ye.property_decimalPlaces,description:"Number of decimal places for the ingredient quantity.",format:_,defaultValue:"1"},{key:ye.property_disableCalculation,description:"Disable calculation for the ingredient.",format:C}]}]}]},[Q]:{jsonKey:"bookReferences",exportJsonKey:{bookReferences:"$"},sides:[{name:"reference",variants:[{jsonKey:null,tags:[{key:ye.group_standardTags,description:"Standard tags for book references."},{key:ye.property_refAuthor,description:"Author of the book.",format:v,maxCount:m},{key:ye.property_refBookTitle,description:"Title of the book.",format:v},{key:ye.property_refPublisher,description:"Publisher of the book.",format:v,maxCount:m},{key:ye.property_refPublicationYear,description:"Year of publication of the book.",format:v},{key:ye.property_citationStyle,description:"Citation style for the book reference.",format:v}]}]}]}},Ae=["complex","functional","decorative","standard"],Be={[ye.group_standardAllBits]:{name:"Standard",description:"Standard tags which apply to all bits",type:Z,tags:[{key:ye.property_id,description:"The unique identifier(s) for the bit",format:v,maxCount:m},{key:ye.property_gUri,description:"Global URI for the bit",format:v},{key:ye.property_customerId,description:"The customer-specific identifier for the bit",format:v},{key:ye.property_externalId,description:"The external identifier for the bit",format:v,maxCount:m,mappingKeys:{"xml-niso-iec":[{"@el":"std","@children":{"@el":"std-id","@text":"$"}},{"@el":"std-ref","@attr":{type:"dated"},"@text":"$"}]}},{key:ye.property_sourceRL,description:"The original location of the information in the original source material",format:v},{key:ye.property_copyright,description:"The copyright information for the bit",format:v},{key:ye.property_license,description:"The license for the bit",format:v},{key:ye.property_rightsPolicy,description:"The rights policy or policies for the bit",format:v,maxCount:m},{key:ye.property_isTemplate,description:"If true, the bit is a template",format:C,defaultValue:"false"},{key:ye.property_isTemplateStripTheme,description:"If true, the bit is a template strip theme",format:C,defaultValue:"false"},{key:ye.property_needsValidation,description:"If true, the bit needs validation",format:C,defaultValue:"false"},{key:ye.property_validationDate,description:"The date when the bit was validated",format:v},{key:ye.property_aiGenerated,description:"If true, the bit is AI-generated",format:C,nullable:!0},{key:ye.property_machineTranslated,description:"If true, the bit is machine-translated",format:v},{key:ye.property_translationOf,description:"Translation source reference",format:v},{key:ye.property_isCollapsible,description:"If true, the bit is collapsible",format:C,nullable:!0},{key:ye.property_spansPageBreak,description:"If true, the bit spans a page break",format:C,nullable:!0},{key:ye.property_searchIndex,description:"The search index(es) for the bit",format:v,maxCount:m},{key:ye.property_analyticsTag,description:"The analytics tag(s) for the bit",format:v,maxCount:m},{key:ye.property_categoryTag,description:"The category tag(s) for the bit",format:v,maxCount:m},{key:ye.property_topicTag,description:"The topic tag(s) for the bit",format:v,maxCount:m},{key:ye.property_reportTag,description:"The report tag(s) for the bit",format:v,maxCount:m},{key:ye.property_altLangTag,description:"The alternative language tag for the bit",format:v},{key:ye.property_feedbackEngine,description:"The feedback engine for the bit",format:v},{key:ye.property_feedbackType,description:"The feedback type for the bit",format:v},{key:ye.property_disableFeedback,description:"If true, feedback is disabled for the bit",format:C},{key:ye.property_diffTo,description:"The diff to version for the bit",format:v},{key:ye.property_diffOp,description:"The diff operation for the bit",format:v},{key:ye.property_diffRef,description:"The diff reference for the bit",format:v},{key:ye.property_diffContext,description:"The diff context for the bit",format:v},{key:ye.property_diffTime,description:"The diff time for the bit",format:_,nullable:!0},{key:ye.property_ageRange,description:"The age range for the bit",format:v,maxCount:m},{key:ye.property_lang,description:"The language for the bit",format:v,mappingKeys:{"xml-niso-iec":{"@el":"tbx:termEntry","@children":{"@el":"tbx:langSet","@attr":{"xml:lang":"$"}}}}},{key:ye.property_publisher,description:"The publisher(s) of the bit",format:v,maxCount:m},{key:ye.property_publisherName,description:"The name of the publisher of the bit",format:v},{key:ye.property_theme,description:"The theme(s) for the bit",format:v,nullable:!0,maxCount:m},{key:ye.property_rtl,description:"If true, the book is right-to-left",format:C,defaultValue:"false"},{key:ye.property_target,description:"The target(s) for the bit",format:v,maxCount:m},{key:ye.property_tag,description:"The tag(s) for the bit",format:v,nullable:!0,maxCount:m},{key:ye.property_groupTag,jsonKey:"groupTag.name",exportJsonKey:{groupTag:[{"@id":"name",name:"$"}]},description:"The group tag(s) for the bit",format:v,maxCount:m,chain:[{key:ye.property_tag,exportJsonKey:{tags:["$"]},description:"The tag(s) for the group",format:v,nullable:!0,maxCount:m}]},{key:ye.property_accessibilityTag,description:"The accessibility classification(s) for the bit",format:A,values:Ae,nullable:!0,maxCount:m},{key:ye.property_accessibilityGroupTag,jsonKey:"accessibilityGroupTag.name",exportJsonKey:{accessibilityGroupTag:[{"@id":"name",name:"$"}]},description:"The accessibility group tag(s) for the bit",format:v,maxCount:m,chain:[{key:ye.property_accessibilityTag,exportJsonKey:{tags:["$"]},description:"The accessibility classification(s) for the group",format:A,values:Ae,nullable:!0,maxCount:m}]},{key:ye.property_reviewTag,description:"The review tag(s) for the bit",format:v,maxCount:m},{key:ye.property_reviewerTag,description:"The reviewer tag(s) for the bit",format:v,maxCount:m},{key:ye.property_reductionTag,description:"The reduction tag(s) for the bit",format:v,maxCount:m},{key:ye.property_bubbleTag,description:"The bubble tag(s) for the bit",format:v,maxCount:m},{key:ye.property_extractorTag,description:"The extractor tag(s) for the bit",format:v,maxCount:m},{key:ye.property_extractorInternal,description:"Internal metadata used by the extractor for processing purposes",format:v,maxCount:m},{key:ye.property_sourceBB,description:"The source bounding box(es) for the bit (x, y, x1, y1)",format:B,maxCount:m},{key:ye.property_bitFingerprint,description:"Fingerprint(s) used by the AI extractor to identify the bit (font, style, color, pixels, etc.)",format:v,maxCount:m},{key:ye.property_levelCEFRp,description:"The CEFRp level for the bit",format:v},{key:ye.property_levelCEFR,description:"The CEFR level for the bit",format:v},{key:ye.property_levelILR,description:"The ILR level for the bit",format:v},{key:ye.property_levelACTFL,description:"The ACTFL level for the bit",format:v},{key:ye.property_icon,description:"The icon for the bit",format:v},{key:ye.property_iconTag,description:"The icon tag for the bit",format:v},{key:ye.property_colorTag,description:"The color tag(s) for the bit",format:v,maxCount:m},{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,name:"Anchor",format:v,description:"The anchor for the bit"},{key:ye.property_search,description:"The search text for the bit",format:v},{key:ye.property_showInIndex,description:"If true, the bit is shown in the index",format:C,defaultValue:"false"},{key:ye.property_layer,description:"The layer(s) for the bit",format:v,maxCount:m},{key:ye.property_layerRole,description:"The layer role(s) for the bit",format:v,maxCount:m},{key:ye.property_internalComment,description:"Internal comment for the bit.",format:v,maxCount:m,exportJsonKey:{}}]},[ye.group_accessibilityDecorative]:{name:"Accessibility (decorative)",description:"Accessibility tags defaulting to a decorative image, for bits that are decorative by definition",type:Z,tags:[{key:ye.property_accessibilityGroupTag,jsonKey:"accessibilityGroupTag.name",exportJsonKey:{accessibilityGroupTag:[{"@id":"name",name:"$"}]},description:"The accessibility group tag(s) for the bit",format:v,defaultValue:"image",maxCount:m,chain:[{key:ye.property_accessibilityTag,exportJsonKey:{tags:["$"]},description:"The accessibility classification(s) for the group",format:A,values:Ae,defaultValue:"decorative",maxCount:m}]}]},[ye.group_standardExample]:{type:Z,description:"PLAN-021: Standard group for the bit-level example property only. Mirror of the group_standardTags property_example entry, used by the lightweight bits (_standardLight).",tags:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[ye.group_standardItem]:{type:Z,description:"PLAN-021: Standard group for the item tag ONLY (no lead/pageNumber/marginNumber chain). Used by the lightweight bits (_standardLight).",tags:[{key:ye.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},mappingKeys:{"xml-niso-iec":{"@el":"label","@text":"$"}},description:"The item for the bit"}]},[ye.group_standardItemLead]:{type:Z,description:"Standard group for item, lead, page number, and margin number tags",tags:[{key:ye.tag_item,jsonKey:"item",exportJsonKey:{item:"$"},mappingKeys:{"xml-niso-iec":{"@el":"label","@text":"$"}},description:"The item for the bit",chain:[{key:ye.tag_item,jsonKey:"lead",exportJsonKey:{lead:"$"},description:"The lead for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"pageNumber",exportJsonKey:{pageNumber:"$"},description:"The page number for the bit",maxCount:1,chain:[{key:ye.tag_item,jsonKey:"marginNumber",exportJsonKey:{marginNumber:"$"},description:"The margin number for the bit",maxCount:1}]}]}]}]},[ye.group_standardItemLeadInstructionHint]:{type:Z,description:"Standard group for item, lead, page number, margin number, instruction and hint tags",tags:[{key:ye.group_standardItemLead,description:"Item, lead, page number, and margin number tags"},{exportJsonKey:{instruction:"$"},key:ye.tag_instruction,name:"Instruction",description:"The instruction for the bit"},{exportJsonKey:{hint:"$"},key:ye.tag_hint,name:"Hint",description:"The hint for the bit"}]},[ye.group_standardInstructionHint]:{type:Z,description:"Standard group for instruction and hint tags only (no item/lead/pageNumber/marginNumber chain). Used by sides where item/lead are owned by another side (e.g. matchPairs value-side, which BPG strips item/lead from at sideIdx > 0).",tags:[{exportJsonKey:{instruction:"$"},key:ye.tag_instruction,name:"Instruction",description:"The instruction for the bit"},{exportJsonKey:{hint:"$"},key:ye.tag_hint,name:"Hint",description:"The hint for the bit"}]},[ye.group_standardTags]:{type:Z,description:"Standard tags which apply to MOST (but not all) bits",tags:[{key:ye.group_standardAllBits,description:"All standard tags which apply to all bits"},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[ye.group_standardTagsNoItemLead]:{type:Z,description:"Standard tags mirror of group_standardTags but excluding the item/lead/pageNumber/marginNumber chain. Used by sides where item/lead are owned by another side (e.g. matchPairs value-side — BPG `parseMatchPairs` strips tags.item / tags.lead for sideIdx > 0).",tags:[{key:ye.group_standardAllBits,description:"All standard tags which apply to all bits"},{key:ye.group_standardInstructionHint,description:"Instruction and hint tags only (no item/lead chain)."},{key:ye.property_example,exportJsonKey:[{"@keyonly":{}},{"@absent":{isExample:!0}},{example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[ye.group_imageSource]:{type:Z,description:"Image source chain",tags:[{key:ye.property_imageSource,jsonKey:"imageSource.url",exportJsonKey:{imageSource:{url:"$"}},description:"The source of an image",format:v,chain:[{key:ye.property_mockupId,description:"The mockup ID for the image",format:v},{key:ye.property_size,description:"The size of the image",format:_,nullable:!0},{key:ye.property_format,description:"The format of the image",format:v},{key:ye.property_trim,description:"If true, the image is trimmed",format:C}]}]},[ye.group_technicalTerm]:{type:Z,description:"Technical term chain",tags:[{key:ye.property_technicalTerm,jsonKey:"technicalTerm.technicalTerm",exportJsonKey:{technicalTerm:{technicalTerm:"$"}},description:"The technical term",format:v,chain:[{key:ye.property_lang,description:"The language of the technical term",format:v}]}]},[ye.group_person]:{type:Z,description:"Person chain",tags:[{key:ye.property_person,jsonKey:"person.name",exportJsonKey:{person:{name:"$"}},description:"A person",format:v,chain:[{key:ye.property_title,description:"The person's title",format:v},{key:ye.group_resourceImage,jsonKey:"avatarImage|resource(type=image, key=image)",exportJsonKey:{avatarImage:{type:"image",image:{src:"$"}}},description:"The image of the person"}]},{key:ye.property_partner,jsonKey:"person.name",exportJsonKey:{person:{name:"$"}},description:"A partner",format:v,chain:[{key:ye.property_title,description:"The partner's title",format:v},{key:ye.group_resourceImage,jsonKey:"avatarImage|resource(type=image, key=image)",exportJsonKey:{avatarImage:{type:"image",image:{src:"$"}}},description:"The image of the partner"}]}]},[ye.group_gap]:{type:Z,description:"Gap chain",tags:[{exportJsonKey:{"@body-inline":{type:"gap",attrs:{solutions:["$"]}}},key:ye.tag_gap,description:"The value of a gap in the content",maxCount:m,format:v,chain:[{key:ye.tag_gap,jsonKey:"solutions[]",exportJsonKey:{solutions:["$"]},description:"Alternative values for the gaps in the content",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.solutions[-1]","@bit":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.solutions[-1]","@bit":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0}}],description:"An example for the gap",format:T,nullable:!0},{key:ye.property_isCaseSensitive,jsonKey:"isCaseSensitive",exportJsonKey:[{"@absent":{isCaseSensitive:"$ancestor"}},{isCaseSensitive:"$"}],description:"If true, the gap text is case sensitive",format:C,defaultValue:"true"}]}]},[ye.group_trueFalse]:{type:Z,description:"True/False chain",tags:[{exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},key:ye.tag_true,description:"True value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"choices[]|set(isCorrect=true)",exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"choices[]|set(isCorrect=false)",exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:C,nullable:!0}]},{exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},key:ye.tag_false,description:"False value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"choices[]|set(isCorrect=true)",exportJsonKey:{choices:[{choice:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"choices[]|set(isCorrect=false)",exportJsonKey:{choices:[{choice:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question (incorrect entry — no cascade decoration: an ancestor bare example leaves incorrect choices untouched, bpg 5.31)",format:C,nullable:!0}]}]},[ye.group_trueFalseResponses]:{type:Z,description:"True/False Responses chain",tags:[{exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},key:ye.tag_true,description:"True value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"responses[]|set(isCorrect=true)",exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"responses[]|set(isCorrect=false)",exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:"$parent.isCorrect",example:"$parent.isCorrect","@bit":{isExample:"$parent.isCorrect"},"@card":{isExample:"$parent.isCorrect"}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:C,nullable:!0}]},{exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},key:ye.tag_false,description:"False value for a true/false statement/question",maxCount:m,format:v,chain:[{key:ye.tag_true,jsonKey:"responses[]|set(isCorrect=true)",exportJsonKey:{responses:[{response:"$",isCorrect:!0}]},description:"True values for a true/false statement/question",maxCount:m,format:v},{key:ye.tag_false,jsonKey:"responses[]|set(isCorrect=false)",exportJsonKey:{responses:[{response:"$",isCorrect:!1}]},description:"False values for a true/false statement/question",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{"@absent":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@card":{isExample:!0}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@card":{isExample:!0}}],description:"An example for the true/false statement/question",format:C,nullable:!0}]}]},[ye.group_trueFalseInlineSelect]:{type:Z,description:"True/False chain composed inline (select body-bit). +/- tags are consume-only at bit level.",tags:[{exportJsonKey:{"@body-inline":{type:"select",attrs:{options:[{text:"$",isCorrect:!0}]}}},key:ye.tag_true,description:"True value for an inline select body bit",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"True values for an inline select body bit",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"False values for an inline select body bit",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the inline select option (first correct only)",format:C,nullable:!0}]},{exportJsonKey:{"@body-inline":{type:"select",attrs:{options:[{text:"$",isCorrect:!1}]}}},key:ye.tag_false,description:"False value for an inline select body bit",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"True values for an inline select body bit",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"False values for an inline select body bit",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the inline select option (first correct only)",format:C,nullable:!0}]}]},[ye.group_trueFalseInlineHighlight]:{type:Z,description:'True/False chain composed inline (highlight body-bit). +/- tags emit `{type:"highlight", attrs:{texts:[{text,isCorrect?}]}}` inline body nodes. Used by highlight-text bit.',tags:[{exportJsonKey:{"@body-inline":{type:"highlight",attrs:{texts:[{text:"$",isCorrect:!0}]}}},key:ye.tag_true,description:"Highlighted span in the body (correct)",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"Highlighted span values (correct)",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"Highlighted span values (incorrect)",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the highlighted span (first correct only)",format:C,nullable:!0}]},{exportJsonKey:{"@body-inline":{type:"highlight",attrs:{texts:[{text:"$",isCorrect:!1}]}}},key:ye.tag_false,description:"Highlighted span in the body (incorrect)",maxCount:m,format:v,chain:[{key:ye.tag_true,exportJsonKey:{},description:"Highlighted span values (correct)",maxCount:m,format:v},{key:ye.tag_false,exportJsonKey:{},description:"Highlighted span values (incorrect)",maxCount:m,format:v},{key:ye.group_standardItemLeadInstructionHint,description:"Item, lead, page number, margin number, instruction and hint tags"},{key:ye.property_example,jsonKey:"example",exportJsonKey:[{"@keyonly":{isExample:!0,example:"$parent.isCorrect","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{predicates:["@absent",{"@parent.isCorrect":!0}],maxEmits:1,rule:{isExample:!0,example:!0,"@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}},{isExample:!0,example:"$","@bit":{isExample:!0},"@body-inline":{attrs:{isExample:!0}}}],description:"An example for the highlighted span (first correct only)",format:C,nullable:!0}]}]},[ye.group_markConfig]:{type:Z,description:"Mark configuration chain",tags:[{key:ye.property_mark,jsonKey:"marks.mark",exportJsonKey:{marks:[{mark:"$",emphasis:"underline"}]},description:"The mark configuration",format:v,maxCount:m,chain:[{key:ye.property_color,description:"The color of the mark",format:v},{key:ye.property_emphasis,description:"The emphasis of the mark",format:v}]}]},[ye.group_mark]:{type:Z,description:"Mark chain",tags:[{exportJsonKey:{"@body-inline":{type:"mark",attrs:{solution:"$"}}},key:ye.tag_mark,description:"The marked content",maxCount:m,format:v,chain:[{key:ye.property_mark,jsonKey:"mark",exportJsonKey:{mark:"$"},description:"The mark configuration",format:v},{key:ye.property_example,jsonKey:"example",exportJsonKey:{isExample:!0,example:!0,"@bit":{isExample:!0}},description:"An example for the marked content",format:C,nullable:!0}]}]},[ye.group_bookCommon]:{type:Z,description:"Common book tags",tags:[{key:ye.property_language,description:"The language of the book",format:v,maxCount:m,mappingKeys:{"xml-niso-iec":[{predicates:[],maxEmits:1,rule:{"@el":"content-language","@text":"$"}}]}},{key:ye.property_displayName,description:"The display name of the book",format:v},{key:ye.property_customerExternalId,description:"The customer-specific external identifier for the book",format:v},{key:ye.property_spaceId,description:"The space ID for the book",format:v,maxCount:m},{key:ye.property_kind,description:"The kind of the book",format:v},{key:ye.property_hasMarkAsDone,description:'If true, the book has a "Mark as done" feature',format:C,defaultValue:"false"},{key:ye.property_processHandIn,description:"If true, the book will be processed when upon hand-in",format:C,defaultValue:"false"},{key:ye.property_processHandInLocation,description:"The location where the book was handed-in",format:v},{key:ye.property_isPublic,description:"If true, the book is public",format:C,defaultValue:"false"},{key:ye.property_isTemplate,description:"If true, the book is a template",format:C,defaultValue:"false"},{key:ye.property_isTemplateStripTheme,description:"If true, the book is a template strip theme",format:C,defaultValue:"false"},{key:ye.property_isEditable,description:"If true, the book is editable",format:C,defaultValue:"false"},{key:ye.property_chatWithBook,description:"If true, the user can chat about the book with an AI assistant",format:C,defaultValue:"false"},{key:ye.property_chatWithBookBrainKey,description:"The BookBrain key for the book chat",format:v},{key:ye.tag_title,name:"Title",description:"The title of the book",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],mappingKeys:{"xml-niso-iec":[{predicates:[],maxEmits:1,rule:{"@el":"title-wrap","@children":{"@el":"full","@text":"$"}}}]}},{key:ye.property_subtype,description:"The subtype of the book",format:v},{key:ye.property_coverImage,description:"The cover image(s) of the book",format:v,nullable:!0,maxCount:m},{key:ye.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"The cover image of the book",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:ye.property_backgroundImage,description:"The background image(s) of the book",format:v,maxCount:m},{key:ye.resource_backgroundImage,jsonKey:"backgroundImage|resource(type=image, key=image)",exportJsonKey:{backgroundImage:{type:"image",image:{src:"$"}}},description:"The background image of the book",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the background image resource"}]},{key:ye.property_coverColor,description:"The cover color of the book",format:v},{key:ye.property_subject,description:"The subject(s) of the book",format:v,maxCount:m},{key:ye.property_author,description:"The author(s) of the book",format:v,maxCount:m},{key:ye.property_publications,description:"The publication(s) of the book",format:v,maxCount:m},{key:ye.property_relatedBook,description:"Books related to this book",format:v,maxCount:m},{key:ye.property_translationOfBook,description:"External Id of the translated book",format:v},{key:ye.property_userFeedbackTranslationUrl,description:"URL to an external feedback form for book translation feedback",format:v},{key:ye.property_userFeedbackContentUrl,description:"URL to an external feedback form for book content feedback",format:v},{key:ye.property_duration,description:"The duration of the book",format:v},{key:ye.property_maxTocChapterLevel,description:"The maximum table of contents chapter level",format:_,defaultValue:"-1"},{key:ye.property_sourceDocument,description:"Url of the source document for the book (for example, a PDF file)",format:v},{key:ye.property_internalPrintPdf,description:"Url of the internal print PDF for the book",format:v},{key:ye.property_allowPrint,description:"If true, the book allows printing",format:A,values:["enforceFalse","enforceTrue","useSpaceConfiguration"],defaultValue:"useSpaceConfiguration"},{key:ye.property_hasPrintRestriction,description:"If true, the book has print restrictions",format:C,defaultValue:"true"},{key:ye.property_enforceUpdateOverUserInput,description:"If true, prioritize new content over legacy content from the instance API",format:C,defaultValue:"false"},{key:ye.property_extractorExtractionTimestamp,description:"Extraction timestamps for book conversion",format:v,maxCount:m}]},[ye.group_learningPathCommon]:{type:Z,description:"Common learning path tags",tags:[{key:ye.property_action,description:"The action for the learning path",format:v},{key:ye.property_duration,description:"The duration of the learning path",format:v},{key:ye.property_date,description:"The date of the learning path",format:v},{key:ye.property_dateEnd,description:"The end date of the learning path",format:v},{key:ye.property_location,description:"The location of the learning path",format:v},{key:ye.property_list,description:"The list of items in the learning path",format:v,maxCount:m},{key:ye.property_textReference,description:"The text reference for the learning path",format:v},{key:ye.property_isTracked,description:"If true, the learning path is tracked",format:C,defaultValue:"true"},{key:ye.property_isInfoOnly,description:"If true, the learning path is info only",format:C,defaultValue:"false"},{key:ye.property_deeplink,description:"The deeplink(s) for the learning path",format:v,maxCount:m},{key:ye.property_buttonCaption,description:"The caption for the button of the learning path",format:v},{key:ye.property_book,description:"The book(s) associated with the learning path",format:v,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"The reference for the book(s) in the learning path",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"The referenceEnd for the book(s) in the learning path",maxCount:1}]}]}]},[ye.group_advertisingCommon]:{type:Z,description:"Common advertising tags",tags:[{key:ye.property_advertisingClickUrl,description:"The URL to which the advertisement should link",format:v}]},[ye.group_platformStylesCommon]:{type:Z,description:"Common platform styles",tags:[{key:ye.property_platformPrimaryColor,description:"The platform system primary color",format:v},{key:ye.property_platformSecondaryColor,description:"The platform section secondary color",format:v},{key:ye.property_platformBackgroundColor,description:"The platform system background color",format:v},{key:ye.property_platformButtonPrimaryColor,description:"The platform section header button primary color",format:v},{key:ye.property_platformButtonBackgroundColor,description:"The platform section header button background color",format:v},{key:ye.property_platformScrollbarColor,description:"The platform main scrollbar color",format:v},{key:ye.property_platformSelectionColor,description:"The platform main selection color",format:v},{key:ye.property_platformTextSelectionColor,description:"The platform main input text selection color",format:v},{key:ye.property_platformSeparatorColor,description:"The platform main separator color",format:v},{key:ye.property_platformPlaceholderColor,description:"The platform main input placeholder color",format:v},{key:ye.property_platformMessageBackgroundColor,description:"The platform section chat message background color",format:v},{key:ye.property_platformBorderColor,description:"The platform border color",format:v},{key:ye.property_platformSelectionTextColor,description:"The platform selection text color",format:v},{key:ye.property_platformBaseLayerColor,description:"The platform base layer color",format:v},{key:ye.property_platformMargin,description:"The platform margin",format:_,nullable:!0},{key:ye.property_platformBorderRadius,description:"The platform border radius",format:_,nullable:!0},{key:ye.property_platformSelectionBorderRadius,description:"The platform selection border radius",format:_,nullable:!0},{key:ye.property_platformNeedsShadow,description:"If true, the platform needs shadow",format:C,nullable:!0}]},[ye.group_quizCommon]:{type:Z,description:"Common quiz tags",tags:[{key:ye.property_revealSolutions,description:"If true, the quiz solutions are revealed",format:C,nullable:!0},{key:ye.property_additionalSolutions,description:"Additional solutions",format:v,maxCount:m}]},[ye.group_backgroundWallpaper]:{type:Z,description:"Background wallpaper tags",tags:[{key:ye.resource_backgroundWallpaper,exportJsonKey:{backgroundWallpaper:{type:"image",image:{src:"$"}}},description:"Background wallpaper for the image, used to set a background for the image",chain:[{key:ye.group_resourceImageCommon,description:"Common resource image tags for images"}]}]},[ye.group_imageNoZoom]:{type:Z,description:"Image bit tags",tags:[{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImageNoZoom,description:"Resource image tags for images, used to attach images to the bit",minCount:1}]},[ye.group_resourceBitTags]:{type:Z,description:"Resource bit tags",tags:[{key:ye.resource_imagePlaceholder,jsonKey:"imagePlaceholder|resource(type=image, key=image)",exportJsonKey:{imagePlaceholder:{type:"image",image:{src:"$"}}},description:"Placeholder image for the resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the placeholder image"}],maxCount:1}]},[ye.group_resourceCommon]:{type:Z,description:"Common resource properties",tags:[{key:ye.property_license,description:"The license for the resource",format:v},{key:ye.property_copyright,description:"The copyright information for the resource",format:v},{key:ye.property_caption,description:"The caption for the resource",format:T,mappingKeys:{"xml-niso-iec":{"@el":"caption","@children":{"@el":"title","@text":"$"}}}},{key:ye.property_showInIndex,description:"If true, the resource is shown in the index",format:C,defaultValue:"false"},{key:ye.property_search,description:"The search text for the resource",format:v},{key:ye.property_selected,description:"If true, the resource is selected",format:C,defaultValue:"false"},{key:ye.property_srcAlt,description:"An alternative source for the resource",format:v,maxCount:m}]},[ye.group_resourceImageCommon]:{type:Z,description:"Common properties for image resources",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_src1x,description:"The source URL for the image at 1x resolution",format:v},{key:ye.property_src2x,description:"The source URL for the image at 2x resolution",format:v},{key:ye.property_src3x,description:"The source URL for the image at 3x resolution",format:v},{key:ye.property_src4x,description:"The source URL for the image at 4x resolution",format:v},{key:ye.property_width,description:"The width of the image",format:_,nullable:!0},{key:ye.property_height,description:"The height of the image",format:_,nullable:!0},{key:ye.property_alt,description:"The alternative text for the image",format:v},{key:ye.property_zoomDisabled,description:"If true, zooming is disabled for the image",format:C}]},[ye.group_resourceImageCommonNoZoom]:{type:Z,description:"Common properties for image resources where @zoomDisabled defaults to true",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_src1x,description:"The source URL for the image at 1x resolution",format:v},{key:ye.property_src2x,description:"The source URL for the image at 2x resolution",format:v},{key:ye.property_src3x,description:"The source URL for the image at 3x resolution",format:v},{key:ye.property_src4x,description:"The source URL for the image at 4x resolution",format:v},{key:ye.property_width,description:"The width of the image",format:_,nullable:!0},{key:ye.property_height,description:"The height of the image",format:_,nullable:!0},{key:ye.property_alt,description:"The alternative text for the image",format:v},{key:ye.property_zoomDisabled,description:"If true, zooming is disabled for the image (defaults to true)",format:C,defaultValue:"true"}]},[ye.group_resourceAudioCommon]:{type:Z,description:"Common properties for audio resources",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_duration,description:"The duration of the audio resource",format:v},{key:ye.property_mute,description:"If true, the audio is muted",format:C},{key:ye.property_autoplay,description:"If true, the audio plays automatically",format:C}]},[ye.group_resourceVideoCommon]:{type:Z,description:"Common properties for video resources",tags:[{key:ye.group_resourceCommon,description:"Common resource properties"},{key:ye.property_width,description:"The width of the video",format:_,nullable:!0},{key:ye.property_height,description:"The height of the video",format:_,nullable:!0},{key:ye.property_duration,description:"The duration of the video",format:v},{key:ye.property_mute,description:"If true, the video is muted",format:C},{key:ye.property_autoplay,description:"If true, the video plays automatically",format:C},{key:ye.property_allowSubtitles,description:"If true, subtitles are allowed for the video",format:C},{key:ye.property_showSubtitles,description:"If true, subtitles are shown in the video",format:C},{key:ye.property_alt,description:"The alternative text for the video",format:v},{key:ye.property_posterImage,jsonKey:"posterImage.src",exportJsonKey:{posterImage:{src:"$"}},description:"The poster image for the video",format:v,chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the poster image"}]},{key:ye.property_src1x,description:"The source URL for the video at 1x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:ye.property_src2x,description:"The source URL for the video at 2x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:ye.property_src3x,description:"The source URL for the video at 3x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}},{key:ye.property_src4x,description:"The source URL for the video at 4x resolution",format:v,exportJsonKey:{thumbnails:[{src:"$"}]}}]},[ye.group_resourceIcon]:{type:Z,description:"Common properties for icon resources",tags:[{key:ye.resource_icon,exportJsonKey:{resource:{type:"icon",icon:{src:"$"}}},description:"The icon resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the icon resource"}]}]},[ye.group_resourceImage]:{type:X,description:"Common properties for image resources",tags:[{key:ye.resource_image,exportJsonKey:{resource:{type:"image",image:{src:"$"}}},mappingKeys:{"xml-niso-iec":{"@el":"graphic","@attr":{"xlink:href":"$"}}},description:"The image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]},[ye.group_resourceImageNoZoom]:{type:X,description:"Image resource where @zoomDisabled defaults to true",tags:[{key:ye.resource_image,exportJsonKey:{resource:{type:"image",image:{src:"$"}}},description:"The image resource (no-zoom default)",chain:[{key:ye.group_resourceImageCommonNoZoom,description:"Common image properties with @zoomDisabled defaulting to true"}]}]},[ye.group_resourceImagePortrait]:{type:X,description:"Portrait image resource",tags:[{key:ye.resource_imagePortrait,exportJsonKey:{resource:{type:"image-portrait",imagePortrait:{src:"$"}}},description:"The portrait image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the portrait image resource"}]}]},[ye.group_resourceImageLandscape]:{type:X,description:"Landscape image resource",tags:[{key:ye.resource_imageLandscape,exportJsonKey:{resource:{type:"image-landscape",imageLandscape:{src:"$"}}},description:"The landscape image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the landscape image resource"}]}]},[ye.group_resourceImageEmbed]:{type:X,description:"Embedded image resource",tags:[{key:ye.resource_imageEmbed,exportJsonKey:{resource:{type:"image-embed",imageEmbed:{src:"$"}}},description:"The embedded image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the embedded image resource"}]}]},[ye.group_resourceImageLink]:{type:X,description:"Link to an image resource",tags:[{key:ye.resource_imageLink,exportJsonKey:{resource:{type:"image-link",imageLink:{url:"$"}}},description:"The link to the image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the linked image resource"}]}]},[ye.group_resourceAudio]:{type:X,description:"Audio resource",tags:[{key:ye.resource_audio,exportJsonKey:{resource:{type:"audio",audio:{src:"$"}}},description:"The audio resource",chain:[{key:ye.group_resourceAudioCommon,description:"Common audio properties for the audio resource"}]}]},[ye.group_resourceAudioEmbed]:{type:X,description:"Embedded audio resource",tags:[{key:ye.resource_audioEmbed,exportJsonKey:{resource:{type:"audio-embed",audioEmbed:{src:"$"}}},description:"The embedded audio resource",chain:[{key:ye.group_resourceAudioCommon,description:"Common audio properties for the embedded audio resource"}]}]},[ye.group_resourceAudioLink]:{type:X,description:"Link to an audio resource",tags:[{key:ye.resource_audioLink,exportJsonKey:{resource:{type:"audio-link",audioLink:{url:"$"}}},description:"The link to the audio resource",chain:[{key:ye.group_resourceAudioCommon,description:"Common audio properties for the linked audio resource"}]}]},[ye.group_resourceVideo]:{type:X,description:"Video resource",tags:[{key:ye.resource_video,exportJsonKey:{resource:{type:"video",video:{src:"$"}}},description:"The video resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the video resource"}]}]},[ye.group_resourceVideoEmbed]:{type:X,description:"Embedded video resource",tags:[{key:ye.resource_videoEmbed,exportJsonKey:{resource:{type:"video-embed",videoEmbed:{url:"$"}}},description:"The embedded video resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the embedded video resource"}]}]},[ye.group_resourceVideoLink]:{type:X,description:"Link to a video resource",tags:[{key:ye.resource_videoLink,exportJsonKey:{resource:{type:"video-link",videoLink:{url:"$"}}},description:"The link to the video resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the linked video resource"}]}]},[ye.group_resourceStillImageFilmEmbed]:{type:X,description:"Embedded still image film resource",tags:[{key:ye.resource_stillImageFilmEmbed,exportJsonKey:{resource:{type:"still-image-film-embed",stillImageFilmEmbed:{url:"$"}}},description:"The embedded still image film resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the embedded still image film resource"}]}]},[ye.group_resourceStillImageFilmLink]:{type:X,description:"Link to a still image film resource",tags:[{key:ye.resource_stillImageFilmLink,exportJsonKey:{resource:{type:"still-image-film-link",stillImageFilmLink:{url:"$"}}},description:"The link to the still image film resource",chain:[{key:ye.group_resourceVideoCommon,description:"Common video properties for the linked still image film resource"}]}]},[ye.group_resourceArticle]:{type:X,description:"Article resource",tags:[{key:ye.resource_article,exportJsonKey:{resource:{type:"article",article:{body:"$"}}},description:"The article resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the article resource"}]}]},[ye.group_resourceArticleEmbed]:{type:X,description:"Embedded article resource",tags:[{key:ye.resource_articleEmbed,exportJsonKey:{resource:{type:"article-embed",articleEmbed:{url:"$"}}},description:"The embedded article resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the embedded article resource"}]}]},[ye.group_resourceArticleLink]:{type:X,description:"Link to an article resource",tags:[{key:ye.resource_articleLink,exportJsonKey:{resource:{type:"article-link",articleLink:{url:"$"}}},description:"The link to the article resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked article resource"}]}]},[ye.group_resourceDocument]:{type:X,description:"Document resource",tags:[{key:ye.resource_document,exportJsonKey:{resource:{type:"document",document:{url:"$"}}},description:"The document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the document resource"}]}]},[ye.group_resourceDocumentEmbed]:{type:X,description:"Embedded document resource",tags:[{key:ye.resource_documentEmbed,exportJsonKey:{resource:{type:"document-embed",documentEmbed:{url:"$"}}},description:"The embedded document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the embedded document resource"}]}]},[ye.group_resourceDocumentLink]:{type:X,description:"Link to a document resource",tags:[{key:ye.resource_documentLink,exportJsonKey:{resource:{type:"document-link",documentLink:{url:"$"}}},description:"The link to the document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked document resource"}]}]},[ye.group_resourceDocumentDownload]:{type:X,description:"Downloadable document resource",tags:[{key:ye.resource_documentDownload,exportJsonKey:{resource:{type:"document-download",documentDownload:{url:"$"}}},description:"The downloadable document resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the downloadable document resource"}]}]},[ye.group_resourceAppLink]:{type:X,description:"Link to an app resource",tags:[{key:ye.resource_appLink,exportJsonKey:{resource:{type:"app-link",appLink:{url:"$"}}},description:"The link to the app resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked app resource"}]}]},[ye.group_resourceWebsiteLink]:{type:X,description:"Link to a website resource",tags:[{key:ye.resource_websiteLink,exportJsonKey:{resource:{type:"website-link",websiteLink:{url:"$"}}},description:"The link to the website resource",chain:[{key:ye.group_resourceCommon,description:"Common resource properties for the linked website resource"}]}]},[ye.group_resourceStillImageFilm]:{type:ee,description:"Resource for still image film",comboResourceConfigKey:ye.resource_stillImageFilm,tags:[{key:ye.group_resourceImage,description:"The image resource for the still image film",maxCount:1,minCount:1},{key:ye.group_resourceAudio,description:"The audio resource for the still image film",maxCount:1,minCount:1}]},[ye.group_resourceImageResponsive]:{type:ee,description:"Responsive image resource",comboResourceConfigKey:ye.resource_imageResponsive,tags:[{key:ye.group_resourceImagePortrait,description:"The portrait image resource",maxCount:1,minCount:1},{key:ye.group_resourceImageLandscape,description:"The landscape image resource",maxCount:1,minCount:1}]},[ye.group_previewImages]:{type:X,description:"Array of preview images for catalog items",tags:[{key:ye.resource_previewImage,jsonKey:"previewImage|resource(type=image, key=image)",exportJsonKey:{previewImage:{type:"image",image:{src:"$"}}},description:"The preview image resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]},[ye.group_previewVideos]:{type:X,description:"Array of preview videos for catalog items",tags:[{key:ye.resource_previewVideo,jsonKey:"previewVideo|resource(type=video, key=video)",exportJsonKey:{previewVideo:{type:"video",video:{src:"$"}}},description:"The preview video resource",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the image resource"}]}]}},Se=new class{hydrateTagsConfig(e){const t={tags:{}};for(const r of e){let e;switch(fe(r.key)){case re:e=this.hydrateTagConfig(r);break;case ie:e=this.hydratePropertyTagConfig(r);break;case oe:e=this.hydrateResourceTagConfig(r);break;case ae:e=this.hydrateTagGroupConfig(r);break;default:throw new Error(`Unknown tag type for config key '${r.key}'`)}e&&(t.tags={...t.tags,...e.tags},t.info=Object.assign(t.info??{},e.info))}return t}hydrateCardSetConfig(e){if(!e)return;const t=we[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const r=[];for(const e of t.sides){const t=[];for(const r of e.variants){const e=this.hydrateCardVariantConfig(r);t.push(e)}const i=new ue(e.name,e.repeat??!1,t,e.jsonKey,e.exportJsonKey,Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),e.htmlKey,Object.prototype.hasOwnProperty.call(e,"htmlKey"));r.push(i)}return new de(e,t.jsonKey,t.exportJsonKey,Object.prototype.hasOwnProperty.call(t,"exportJsonKey"),this.hydrateCardSections(t.sections),r,t.htmlKey,Object.prototype.hasOwnProperty.call(t,"htmlKey"))}hydrateCardSections(e){if(!e)return;const t={};for(const[r,i]of Object.entries(e))t[r]={jsonKey:i.jsonKey,exportJsonKey:i.exportJsonKey,hasExportJsonKey:Object.prototype.hasOwnProperty.call(i,"exportJsonKey"),htmlKey:i.htmlKey,hasHtmlKey:Object.prototype.hasOwnProperty.call(i,"htmlKey"),isDefault:i.isDefault,sideJsonKey:i.sideJsonKey,sideExportJsonKey:i.sideExportJsonKey,hasSideExportJsonKey:Object.prototype.hasOwnProperty.call(i,"sideExportJsonKey"),sideHtmlKey:i.sideHtmlKey,hasSideHtmlKey:Object.prototype.hasOwnProperty.call(i,"sideHtmlKey"),minCount:i.minCount,maxCount:i.maxCount};return t}hydrateTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,jsonKey:s,exportJsonKey:n,htmlKey:l}=e,c=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!c)throw new Error(`No tag key found for config key '${c}'`);const p=(0,Ce.Enum)(x).fromValue(c);if(!p)throw new Error(`No tag found for tag config key '${c}'`);let u;o&&(u=this.hydrateTagsConfig(o).tags);const d=new ne({configKey:c,tag:p,maxCount:r??1,minCount:i??0,chain:u,jsonKey:s,exportJsonKey:n,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:l,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),deprecated:a});return{tags:{[c]:d}}}hydratePropertyTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,format:s,values:n,defaultValue:l,jsonKey:c,exportJsonKey:p,htmlKey:u}=e,d=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!d)throw new Error(`No property key found for config key '${d}'`);const m=t.substring(1);let h;o&&(h=this.hydrateTagsConfig(o).tags);const b=new le({configKey:d,tag:m,maxCount:r??1,minCount:i??0,chain:h,jsonKey:c,exportJsonKey:p,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:u,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),format:s,values:n,defaultValue:l,deprecated:a});return{tags:{[d]:b}}}hydrateResourceTagConfig(e){const{key:t,maxCount:r,minCount:i,chain:o,deprecated:a,jsonKey:s,exportJsonKey:n,htmlKey:l}=e,c=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!c)throw new Error(`No resource key found for config key '${c}'`);const p=t.substring(1);let u;o&&(u=this.hydrateTagsConfig(o).tags);const d=new ce({configKey:c,tag:p,maxCount:r??1,minCount:i??0,chain:u,jsonKey:s,exportJsonKey:n,hasExportJsonKey:Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),htmlKey:l,hasHtmlKey:Object.prototype.hasOwnProperty.call(e,"htmlKey"),deprecated:a});return{tags:{[c]:d}}}hydrateTagGroupConfig(e){const{key:t}=e,r=(0,Ce.Enum)(ye).fromValue(t)||ye._unknown;if(!r)throw new Error(`No group key found for config key '${r}'`);const i=Be[r];if(!i)throw new Error(`No config found for group config key '${t}'`);const{tags:o}=i,a=this.hydrateTagsConfig(o).tags,s=Object.values(a);if(s.length>0){const t=s[0],r=t;r.maxCount=e.maxCount??t.maxCount,r.minCount=e.minCount??t.minCount}return{tags:a,info:{comboResourceConfigKey:i.comboResourceConfigKey}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:r,bodyRequired:i,repeatCount:o,jsonKey:a,exportJsonKey:s,htmlKey:n,format:l}=e,c=this.hydrateTagsConfig(t);return new pe(c.tags,r,i,o,a,s,Object.prototype.hasOwnProperty.call(e,"exportJsonKey"),l,n,Object.prototype.hasOwnProperty.call(e,"htmlKey"))}},Pe={[d.assignment]:{since:"5.39.0",description:"Assignment bits",title:"Assignment",subgroupOf:d.quizzes},[d.authors]:{since:"5.39.0",description:"Author bits",title:"Authors"},[d.botAction]:{since:"5.39.0",description:"Bot action bits",title:"Bot Action"},[d.bots]:{since:"5.39.0",description:"Bot bits",title:"Bots"},[d.chat]:{since:"5.39.0",description:"Chat bits",title:"Chat"},[d.cloze]:{since:"5.39.0",description:"Cloze (fill-in-the-blank) quiz bits",title:"Cloze",subgroupOf:d.quizzes},[d.conversation]:{since:"5.39.0",description:"Conversation bits",title:"Conversation"},[d.cooking]:{since:"5.39.0",description:"Cooking / recipe content bits",title:"Cooking"},[d.correction]:{since:"5.39.0",description:"Correction quiz bits",title:"Correction",subgroupOf:d.quizzes},[d.documentUpload]:{since:"5.39.0",description:"Document upload task bits",title:"Document Upload",subgroupOf:d.quizzes},[d.essay]:{since:"5.39.0",description:"Essay quiz bits",title:"Essay",subgroupOf:d.quizzes},[d.extractor]:{since:"5.39.0",description:"Extractor bits (PDF / document extraction)",title:"Extractor"},[d.flashcard]:{since:"5.39.0",description:"Flashcard quiz bits",title:"Flashcard",subgroupOf:d.quizzes},[d.group]:{since:"5.39.0",description:"Grouping bits (no current bit type is a member; key kept for consumer compatibility)",title:"Group",allowEmpty:!0},[d.highlightText]:{since:"5.39.0",description:"Highlight text quiz bits",title:"Highlight Text",subgroupOf:d.quizzes},[d.interview]:{since:"5.39.0",description:"Interview quiz bits",title:"Interview",subgroupOf:d.quizzes},[d.learningPath]:{since:"5.39.0",description:"Learning path bits",title:"Learning Path"},[d.mark]:{since:"5.39.0",description:"Mark quiz bits",title:"Mark",subgroupOf:d.quizzes},[d.match]:{since:"5.39.0",description:"Match quiz bits",title:"Match",subgroupOf:d.quizzes},[d.message]:{since:"5.39.0",description:"Message bits",title:"Message"},[d.multipleChoice]:{since:"5.39.0",description:"Multiple choice quiz bits",title:"Multiple Choice",subgroupOf:d.quizzes},[d.multipleResponse]:{since:"5.39.0",description:"Multiple response quiz bits",title:"Multiple Response",subgroupOf:d.quizzes},[d.nonProduction]:{since:"5.39.0",description:"Bits not for production use",title:"Not for Production"},[d.other]:{since:"5.39.0",description:"Other bits (aliases, chapters)",title:"Other"},[d.pages]:{since:"5.39.0",description:"Page bits",title:"Pages"},[d.preparationNote]:{since:"5.39.0",description:"Preparation note task bits",title:"Preparation Note",subgroupOf:d.quizzes},[d.quizzes]:{since:"5.39.0",description:"All quiz / interactive task bits",title:"Quizzes"},[d.rating]:{since:"5.39.0",description:"Rating bits",title:"Rating",subgroupOf:d.surveys},[d.recipes]:{since:"5.39.0",description:"Recipe bits",title:"Recipes"},[d.recordAudio]:{since:"5.39.0",description:"Record audio task bits",title:"Record Audio",subgroupOf:d.quizzes},[d.reviewErrors]:{since:"5.39.0",description:"Review bits indicating review errors",title:"Review Errors",subgroupOf:d.reviews},[d.reviews]:{since:"5.39.0",description:"Review workflow bits",title:"Reviews"},[d.selfAssessment]:{since:"5.39.0",description:"Self-assessment bits",title:"Self Assessment",subgroupOf:d.surveys},[d.sequence]:{since:"5.39.0",description:"Sequence quiz bits",title:"Sequence",subgroupOf:d.quizzes},[d.set]:{since:"5.39.0",description:"Set bits (no current bit type is a member; key kept for consumer compatibility)",title:"Set",allowEmpty:!0},[d.static]:{since:"5.39.0",description:"Static (non-interactive) content bits",title:"Static Content"},[d.steps]:{since:"5.39.0",description:"Step bits",title:"Steps"},[d.survey]:{since:"5.39.0",description:"Simple survey bits",title:"Survey",subgroupOf:d.surveys},[d.surveyAnonymous]:{since:"5.39.0",description:"Anonymous survey bits",title:"Survey Anonymous",subgroupOf:d.surveys},[d.surveys]:{since:"5.39.0",description:"All survey-like bits (surveys, self-assessments, ratings)",title:"Surveys"},[d.tables]:{since:"5.39.0",description:"Table bits",title:"Tables"},[d.takePicture]:{since:"5.39.0",description:"Take picture task bits",title:"Take Picture",subgroupOf:d.quizzes},[d.trueFalse]:{since:"5.39.0",description:"True/false quiz bits",title:"True False",subgroupOf:d.quizzes},[d.vocabulary]:{since:"5.39.0",description:"Vocabulary bits (no current bit type is a member; key kept for consumer compatibility)",title:"Vocabulary",subgroupOf:d.quizzes,allowEmpty:!0},[d.warning]:{since:"5.39.0",description:"Warning-style content bits (warnings, bugs, dangers)",title:"Warning"},[d.whiteLabel]:{since:"5.39.0",description:"White-label / platform branding bits",title:"White-label"}},Ie={[u._error]:{since:"1.3.0",description:"An error bit, rendered when the bit cannot be interpreted"},[u._comment]:{since:"1.4.12",description:"A comment bit, used when a bit is commented out by adding | between the . and the bit name, e.g [.|article]"},[u._standard]:{since:"3.2.0",description:"The standard bit type, used as a base for other bits, should not be used directly",tags:[{key:ye.group_standardTags,description:"Standard tags for (almost) all bits"}]},[u._standardLight]:{since:"5.40.0",description:"PLAN-021: Lightweight standard base bit with a minimal tag set (item + example only — no instruction/hint/lead, no resource attachments), used as a base for other bits, should not be used directly",resourceAttachmentAllowed:!1,tags:[{key:ye.group_standardAllBits,description:"Standard tags for all bits"},{key:ye.group_standardItem,description:"The item tag (no lead/pageNumber/marginNumber chain)"},{key:ye.group_standardExample,description:"The bit-level example property"}]},[u.appFlashcards]:{since:"1.3.0",title:"Flashcards",bitGroups:[d.static],baseBitType:u._standard,description:"App flashcards bit, used for flashcard quizzes in the app",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"The title of the flashcard quiz"},{key:ye.property_flashcardSet,description:"The flashcard set to use for the app flashcards",format:v,maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.appFlashcardsQuiz]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.appFlashcards,description:"App flashcards quiz bit"},[u.appFlashcardsLearn]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.appFlashcards,description:"App flashcards learn bit"},[u.appLink]:{since:"1.3.0",title:"Link",bitGroups:[d.static],baseBitType:u._standard,description:"App link bit, used to link to other bits in the app",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAppLink,description:"Tags for the app link resource",minCount:1}],resourceAttachmentAllowed:!1},[u.appRag]:{since:"5.14.0",bitGroups:[d.static],baseBitType:u.article,description:"App RAG (Retrieval-Augmented Generation) bit, equal to article"},[u.appSearch]:{since:"5.14.0",bitGroups:[d.static],baseBitType:u.article,description:"App search bit, equal to article"},[u.author]:{since:"4.2.0",bitGroups:[d.authors,d.static],baseBitType:u._standard,description:"Represents an author of something",tags:[{key:ye.property_fullName,description:"Full name of the author"},{key:ye.property_pseudonym,description:"A pseudonym of the author, if any"},{key:ye.property_title,description:'The title of the author, e.g. "Dr.", "Prof.", etc.',jsonKey:"title"},{key:ye.property_jobTitle,description:'The job title of the author, e.g. "Software Engineer", "Professor", etc.'}]},[u.bookAuthor]:{since:"4.2.0",title:"Author",bitGroups:[d.authors,d.static],baseBitType:u.author,description:"Represents an author of a book"},[u.articleAuthor]:{since:"4.2.0",title:"Article Author",bitGroups:[d.authors,d.static],baseBitType:u.author,description:"Represents an author of a book"},[u.article]:{since:"1.3.0",title:"Article",bitGroups:[d.static],baseBitType:u._standard,description:"Article bit, used for articles / paragraphs",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}},key:ye.tag_title,description:"The title of the article"}]},[u.articleAlt]:{since:"1.15.0",title:"Article Altnerative",bitGroups:[d.static],baseBitType:u.article,description:"Alternative article bit"},[u.articleResponsive]:{since:"1.21.0",title:"Responsive",bitGroups:[d.static],baseBitType:u.article,description:"Responsive article bit, used for articles that adapt to the screen size",tags:[{key:ye.property_imageFirst,description:"If the image should be displayed first in the responsive article",format:C,defaultValue:"true"}]},[u.articleResponsiveAlt]:{since:"2.0.0",title:"Responsive Alternative",bitGroups:[d.static],baseBitType:u.articleResponsive,description:"Alternative responsive article bit"},[u.standardArticleNormative]:{since:"1.16.0",title:"Standard Article (Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard normative article bit"},[u.standardArticleNonNormative]:{since:"1.16.0",title:"Standard Article (Non Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard non-normative article bit"},[u.smartStandardArticleNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardArticleNormative,description:"Smart standard normative article bit",mappingKeys:{"xml-niso-iec":[{"@el":"p","@attr":{id:"$customerId"},"@children":"$"},{"@el":"sec","@attr":{"sec-type":"numbered-paragraph",id:"$customerId"},"@children":"$","▼":"$anchor"}]}},[u.smartStandardArticleNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardArticleNonNormative,description:"Smart standard non-normative article bit",mappingKeys:{"xml-niso-iec":[{"@el":"p","@attr":{id:"$customerId"},"@ancestor":{"@attr":{"sec-type":"foreword|intro"}},"@children":"$"},{"@el":"p","@attr":{id:"$customerId"},"@ancestor":{"@attr":{"content-type":"informative"}},"@children":"$"}]}},[u.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardArticleNormative,description:"Smart standard normative article bit that is collapsible",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardArticleNonNormative,description:"Smart standard non-normative article bit that is collapsible",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.statement]:{since:"1.3.0",title:"Statement",bitGroups:[d.static],baseBitType:u.article,description:"Statement bit, used for statements in documents"},[u.pageArticle]:{since:"1.15.0",title:"Page Article",bitGroups:[d.static],baseBitType:u.article,description:"Page article bit"},[u.pageArticleAlt]:{since:"1.15.0",title:"Page Article Alternative",bitGroups:[d.static],baseBitType:u.article,description:"Alternative page article bit"},[u.pageArticleResponsive]:{since:"1.21.0",bitGroups:[d.static],baseBitType:u.article,description:"Responsive page article bit, used for articles that adapt to the screen size",tags:[{key:ye.property_imageFirst,description:"If the image should be displayed first in the responsive article",format:C,defaultValue:"true"}]},[u.buttonCopyText]:{since:"1.4.3",title:"Copy Text",bitGroups:[d.static],baseBitType:u.article,description:"Button copy text bit, used to create a button that copies text to the clipboard",tags:[{key:ye.property_buttonCaption,description:"The caption of the button",format:v}]},[u.catalogItemBook]:{since:"4.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Catalog item book bit, used to represent a book product in a catalog with cover and description",tags:[{key:ye.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverImage,description:"Cover image of the catalog item",format:v,nullable:!0},{key:ye.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"Cover image of the catalog item",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:ye.property_content2Buy,description:"Content to buy identifier",format:v},{key:ye.property_listPrice,description:"List price of the catalog item",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button",format:v},{key:ye.property_customerProductId,description:"Customer-specific product identifier",format:v},{key:ye.property_currency,description:"Currency for the catalog item",format:v},{key:ye.property_bookIsbn,description:"ISBN for iBook version",format:v},{key:ye.property_bookAuthor,description:"Author of the book",format:v},{key:ye.property_bookType,description:"Type of the book",format:v},{key:ye.property_bookBindingType,description:"Binding type of the book",format:v},{key:ye.property_bookNumberOfPages,description:"Number of pages in the book",format:v},{key:ye.property_bookRating,description:"Rating of the book",format:v},{key:ye.property_bookSeriesTitle,description:"Title of the book series",format:v},{key:ye.property_bookSeriesId,description:"ID of the book series",format:v},{key:ye.property_bookSeriesNumber,description:"Number in the book series",format:v},{key:ye.property_bookLanguage,description:"Language of the book",format:v},{key:ye.property_bookPublishingDate,description:"Publishing date of the book",format:v},{key:ye.property_bookPublisher,description:"Publisher of the book",format:v},{key:ye.property_bookTranslator,description:"Translator of the book",format:v},{key:ye.property_bookOriginalTitle,description:"Original title of the book",format:v},{key:ye.property_gmbExternalShop,description:"External shop identifier",format:v},{key:ye.property_gmbExternalShopItems,description:"Array of external shop items",format:v,maxCount:m},{key:ye.group_imageSource,description:"Image source chain"},{key:ye.group_previewImages,description:"Array of preview images for the catalog item",maxCount:m},{key:ye.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.catalogItemExternalBook]:{since:"4.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Catalog item external book bit, used to represent an external book product in a catalog with link to external shop",tags:[{key:ye.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverImage,description:"Cover image of the catalog item",format:v,nullable:!0},{key:ye.resource_coverImage,jsonKey:"coverImage|resource(type=image, key=image)",exportJsonKey:{coverImage:{type:"image",image:{src:"$"}}},description:"Cover image of the catalog item",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the cover image resource"}]},{key:ye.property_customerProductShopLink,description:"Link to external shop for the product",format:v},{key:ye.property_listPrice,description:"List price of the catalog item",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button",format:v},{key:ye.property_customerProductId,description:"Customer-specific product identifier",format:v},{key:ye.property_currency,description:"Currency for the catalog item",format:v},{key:ye.property_bookIsbn,description:"ISBN for iBook version",format:v},{key:ye.property_bookAuthor,description:"Author of the book",format:v},{key:ye.property_bookType,description:"Type of the book",format:v},{key:ye.property_bookBindingType,description:"Binding type of the book",format:v},{key:ye.property_bookNumberOfPages,description:"Number of pages in the book",format:v},{key:ye.property_bookRating,description:"Rating of the book",format:v},{key:ye.property_bookSeriesTitle,description:"Title of the book series",format:v},{key:ye.property_bookSeriesId,description:"ID of the book series",format:v},{key:ye.property_bookSeriesNumber,description:"Number in the book series",format:v},{key:ye.property_bookLanguage,description:"Language of the book",format:v},{key:ye.property_bookPublishingDate,description:"Publishing date of the book",format:v},{key:ye.property_bookPublisher,description:"Publisher of the book",format:v},{key:ye.property_bookTranslator,description:"Translator of the book",format:v},{key:ye.property_bookOriginalTitle,description:"Original title of the book",format:v},{key:ye.property_gmbExternalShop,description:"External shop identifier",format:v},{key:ye.property_gmbExternalShopItems,description:"Array of external shop items",format:v,maxCount:m},{key:ye.group_imageSource,description:"Image source chain"},{key:ye.group_previewImages,description:"Array of preview images for the catalog item",maxCount:m},{key:ye.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.catalogItemProduct]:{since:"4.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Catalog item product bit, used to represent a general product in a catalog with cover and description",tags:[{key:ye.tag_title,description:"Title and subtitle of the catalog item",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverImage,description:"Cover image of the catalog item",format:v,nullable:!0},{key:ye.property_content2Buy,description:"Content to buy identifier",format:v},{key:ye.property_listPrice,description:"List price of the catalog item",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button",format:v},{key:ye.property_customerProductId,description:"Customer-specific product identifier",format:v},{key:ye.property_currency,description:"Currency for the catalog item",format:v},{key:ye.property_bookIsbn,description:"ISBN for iBook version",format:v},{key:ye.property_bookAuthor,description:"Author of the book",format:v},{key:ye.property_bookType,description:"Type of the book",format:v},{key:ye.property_bookBindingType,description:"Binding type of the book",format:v},{key:ye.property_bookNumberOfPages,description:"Number of pages in the book",format:v},{key:ye.property_bookRating,description:"Rating of the book",format:v},{key:ye.property_bookSeriesTitle,description:"Title of the book series",format:v},{key:ye.property_bookSeriesId,description:"ID of the book series",format:v},{key:ye.property_bookSeriesNumber,description:"Number in the book series",format:v},{key:ye.property_bookLanguage,description:"Language of the book",format:v},{key:ye.property_bookPublishingDate,description:"Publishing date of the book",format:v},{key:ye.property_bookPublisher,description:"Publisher of the book",format:v},{key:ye.property_bookTranslator,description:"Translator of the book",format:v},{key:ye.property_bookOriginalTitle,description:"Original title of the book",format:v},{key:ye.property_gmbExternalShop,description:"External shop identifier",format:v},{key:ye.property_gmbExternalShopItems,description:"Array of external shop items",format:v,maxCount:m},{key:ye.group_imageSource,description:"Image source chain"},{key:ye.group_previewImages,description:"Array of preview images for the catalog item",maxCount:m},{key:ye.group_previewVideos,description:"Array of preview videos for the catalog item",maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the bit",format:v,nullable:!0}],rootExampleType:h},[u.callToAction]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u._standard,description:"Call to action bit, used to create a call to action button",tags:[{key:ye.property_buttonCaption,description:"The caption of the call to action button",format:v},{key:ye.property_callToActionUrl,description:"The URL to navigate to when the call to action button is clicked",format:v,minCount:1}]},[u.callToActionSubscribe]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action subscribe bit"},[u.callToActionContact]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action contact bit"},[u.callToActionJoin]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action join bit"},[u.callToActionMail]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action mail bit"},[u.callToActionLearnMore]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action learn more bit"},[u.callToActionSeeMore]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action see more bit"},[u.callToActionWatch]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action watch bit"},[u.callToActionStartNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action start now bit"},[u.callToActionGetOffer]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action get offer bit"},[u.callToActionBookNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action book now bit"},[u.callToActionShopNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action shop now bit"},[u.callToActionGetNow]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action get now bit"},[u.callToActionDownload]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action download bit"},[u.callToActionCreateAccount]:{since:"1.15.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call to action create account bit"},[u.appBitmarkFromJavascript]:{since:"1.4.5",bitGroups:[d.static],baseBitType:u._standard,description:"App bitmark from JavaScript, used to create bits from JavaScript in the app",tags:[{key:ye.property_maxCreatedBits,description:"The maximum number of bits that can be created from this bit",format:_,nullable:!0}],textFormatDefault:S.plainText},[u.appBitmarkFromEditor]:{since:"1.4.5",bitGroups:[d.static],baseBitType:u.appBitmarkFromJavascript,description:"App bitmark from editor, used to create bits from the editor in the app"},[u.articleEmbed]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Article embed bit, used to embed articles from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceArticleEmbed,description:"Tags for the article embed resource",minCount:1}],resourceAttachmentAllowed:!1},[u.articleLink]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Article link bit, used to link to articles from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceArticleLink,description:"Tags for the article link resource",minCount:1}],resourceAttachmentAllowed:!1},[u.audio]:{since:"1.3.0",title:"Audio",bitGroups:[d.static],baseBitType:u._standard,description:"Audio bit, used for audio files",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAudio,description:"Tags for the audio resource",minCount:1}],resourceAttachmentAllowed:!1},[u.audioEmbed]:{since:"1.3.0",title:"Embed audio",bitGroups:[d.static],baseBitType:u._standard,description:"Audio embed bit, used to embed audio files from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAudioEmbed,description:"Tags for the audio embed resource",minCount:1}],resourceAttachmentAllowed:!1},[u.audioLink]:{since:"1.3.0",title:"Audio Link",bitGroups:[d.static],baseBitType:u._standard,description:"Audio link bit, used to link to audio files from other sources",tags:[{key:ye.group_resourceBitTags,description:"Tags for the resource bit"},{key:ye.group_resourceAudioLink,description:"Tags for the audio link resource",minCount:1}],resourceAttachmentAllowed:!1},[u.bitAlias]:{since:"1.3.0",title:"Bit Alias",bitGroups:[d.other,d.static],baseBitType:u._standard,description:"Bit alias, used to create an alias for a bit",tags:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"The reference to the bit that this alias points to"},{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,format:v,description:"The anchor for the bit alias, used for linking"}]},[u.diff]:{since:"3.13.0",bitGroups:[d.static],baseBitType:u._standard,description:"Diff bit, used to show differences between two bits",tags:[{key:ye.property_diffTo,description:"The reference to the bit that this diff compares to",format:v}]},[u.book]:{since:"1.3.0",title:"Book",bitGroups:[d.static],baseBitType:u._standard,description:"Book bit, used to represent a book",mappingKeys:{"xml-niso-iec":{"@el":"std-meta"}},tags:[{key:ye.group_bookCommon,description:"Common tags for book bits"}]},[u.bookEnd]:{since:"3.27.0",bitGroups:[d.static],baseBitType:u.article,description:"End of book bit"},[u.bookAcknowledgements]:{since:"1.17.0",title:"Book Acknowledgements",bitGroups:[d.static],baseBitType:u.article,description:"Acknowledgements section of a book"},[u.bookAddendum]:{since:"1.3.0",title:"Book Addendum",bitGroups:[d.static],baseBitType:u.article,description:"Addendum section of a book"},[u.bookAfterword]:{since:"1.3.0",title:"Book Afterword",bitGroups:[d.static],baseBitType:u.article,description:"Afterword section of a book"},[u.bookAppendix]:{since:"1.3.0",title:"Book Appendix",bitGroups:[d.static],baseBitType:u.article,description:"Appendix section of a book"},[u.bookArticle]:{since:"1.3.0",title:"Book Article",bitGroups:[d.static],baseBitType:u.article,description:"Article section of a book"},[u.bookAutherBio]:{since:"1.3.0",title:"Book Author Bio",bitGroups:[d.static],baseBitType:u.article,description:"Author biography section of a book"},[u.bookBibliography]:{since:"1.3.0",title:"Book Bibliography",bitGroups:[d.static],baseBitType:u.article,description:"Bibliography section of a book"},[u.bookComingSoon]:{since:"1.3.0",title:"Book Coming Soon",bitGroups:[d.static],baseBitType:u.article,description:"Coming soon section of a book"},[u.bookConclusion]:{since:"1.3.0",title:"Book Conclusion",bitGroups:[d.static],baseBitType:u.article,description:"Conclusion section of a book"},[u.bookCopyright]:{since:"1.3.0",title:"Book Copyright",bitGroups:[d.static],baseBitType:u.article,description:"Copyright section of a book"},[u.bookCopyrightPermissions]:{since:"1.3.0",title:"Book Copyright Permissions",bitGroups:[d.static],baseBitType:u.article,description:"Copyright permissions section of a book"},[u.bookDedication]:{since:"1.3.0",title:"Book Dedication",bitGroups:[d.static],baseBitType:u.article,description:"Dedication section of a book"},[u.bookEndnotes]:{since:"1.3.0",title:"Book Endnotes",bitGroups:[d.static],baseBitType:u.article,description:"Endnotes section of a book"},[u.bookEpigraph]:{since:"1.3.0",title:"Book Epigraph",bitGroups:[d.static],baseBitType:u.article,description:"Epigraph section of a book"},[u.bookEpilogue]:{since:"1.3.0",title:"Book Epilogue",bitGroups:[d.static],baseBitType:u.article,description:"Epilogue section of a book"},[u.bookForword]:{since:"1.3.0",title:"Book Foreword",bitGroups:[d.static],baseBitType:u.article,description:"Foreword section of a book"},[u.bookFrontispiece]:{since:"1.3.0",title:"Book Frontispiece",bitGroups:[d.static],baseBitType:u.article,description:"Frontispiece section of a book"},[u.bookImprint]:{since:"1.3.0",title:"Book Imprint",bitGroups:[d.static],baseBitType:u.article,description:"Imprint section of a book"},[u.bookIncitingIncident]:{since:"1.3.0",title:"Inciting Incident",bitGroups:[d.static],baseBitType:u.article,description:"Inciting incident section of a book"},[u.bookIntroduction]:{since:"1.3.0",title:"Book Introduction",bitGroups:[d.static],baseBitType:u.article,description:"Introduction section of a book"},[u.bookListOfContributors]:{since:"1.3.0",title:"Book List Of Contributors",bitGroups:[d.static],baseBitType:u.article,description:"List of contributors section of a book"},[u.bookNotes]:{since:"1.3.0",title:"Book Notes",bitGroups:[d.static],baseBitType:u.article,description:"Notes section of a book"},[u.bookPostscript]:{since:"1.3.0",title:"Book Postscript",bitGroups:[d.static],baseBitType:u.article,description:"Postscript section of a book"},[u.bookPreface]:{since:"1.3.0",title:"Book Preface",bitGroups:[d.static],baseBitType:u.article,description:"Preface section of a book"},[u.bookPrologue]:{since:"1.3.0",title:"Book Prologue",bitGroups:[d.static],baseBitType:u.article,description:"Prologue section of a book"},[u.bookReadMore]:{since:"1.3.0",title:"Read More",bitGroups:[d.static],baseBitType:u.article,description:"Read more section of a book"},[u.bookReferenceList]:{since:"3.2.0",title:"Book Reference List",bitGroups:[d.static],baseBitType:u._standard,description:"Book reference list, used to list references in a book",cardSet:Q},[u.bookRequestForABookReview]:{since:"1.3.0",title:"Request For A Book Review",bitGroups:[d.static],baseBitType:u.article,description:"Request for a book review section of a book"},[u.bookSummary]:{since:"1.3.0",title:"Book Summary",bitGroups:[d.static],baseBitType:u.article,description:"Summary section of a book"},[u.bookTeaser]:{since:"1.3.0",title:"Book Teaser",bitGroups:[d.static],baseBitType:u.article,description:"Teaser section of a book"},[u.bookTitle]:{since:"1.3.0",title:"Book Title",bitGroups:[d.static],baseBitType:u.article,description:"Title section of a book"},[u.bookCover]:{since:"3.27.0",bitGroups:[d.static],baseBitType:u.image,description:"Cover image of a book",tags:[{key:ye.tag_title,description:"The title of the book cover",maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}]},{key:ye.property_coverColor,description:"The color of the book cover",format:v}]},[u.bookAlias]:{since:"1.4.3",title:"Book Alias",bitGroups:[d.static],baseBitType:u.book,description:"Book alias, used to create an alias for a book",tags:[{key:ye.property_bookAlias,description:"The alias for the book",format:v,maxCount:m}]},[u.bookDiff]:{since:"3.10.0",bitGroups:[d.static],baseBitType:u.book,description:"Book diff, used to show differences between two book versions",tags:[{key:ye.property_bookDiff,description:"The reference to the book that this diff compares to",format:v}]},[u.bookClose]:{since:"1.18.0",title:"Close Book",bitGroups:[d.static],baseBitType:u.article,description:"Close section of a book, used to close the book",tags:[{key:ye.property_buttonCaption,description:"The caption of the close button",format:v}]},[u.bookReference]:{since:"2.2.0",title:"Book Reference",bitGroups:[d.static],baseBitType:u.article,description:"Book reference, used to reference a book in another book",tags:[{key:ye.property_refAuthor,description:"The author of the referenced book",format:v,maxCount:m},{key:ye.property_refBookTitle,description:"The title of the referenced book",format:v},{key:ye.property_refPublisher,description:"The publisher of the referenced book",format:v,maxCount:m},{key:ye.property_refPublicationYear,description:"The publication year of the referenced book",format:v},{key:ye.property_citationStyle,description:"The citation style to use for the book reference",format:v}]},[u.botActionResponse]:{since:"1.3.0",title:"Bot Action Response",bitGroups:[d.bots],baseBitType:u._standard,description:"Bot action response bit, used to define responses for bot actions",cardSet:M},[u.botActionSend]:{since:"1.3.0",title:"Bot Action Send",bitGroups:[d.botAction,d.bots],baseBitType:u._standard,description:"Bot action send bit, used to define actions for sending messages",tags:[{key:ye.property_date,description:"The date when the message should be sent",format:v}]},[u.browserImage]:{since:"1.3.0",title:"Browser Image",bitGroups:[d.static],baseBitType:u.image,description:"Browser image bit, used to display images in the browser",tags:[{key:ye.property_focusX,description:"The X coordinate for focusing the image in the browser",format:_,nullable:!0},{key:ye.property_focusY,description:"The Y coordinate for focusing the image in the browser",format:_,nullable:!0}]},[u.card1]:{since:"1.3.0",title:"Card",bitGroups:[d.static],baseBitType:u._standard,description:"Card bit, used for cards in quizzes",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"}]},[u.question1]:{since:"1.3.0",title:"Question",bitGroups:[d.static],baseBitType:u.card1,description:"Question card bit"},[u.survey1]:{since:"1.3.0",bitGroups:[d.survey,d.surveys],baseBitType:u.card1,description:"Survey card bit"},[u.surveyAnonymous1]:{since:"1.3.0",bitGroups:[d.surveyAnonymous,d.surveys],baseBitType:u.card1,description:"Anonymous survey card bit"},[u.chapter]:{since:"1.3.0",title:"Chapter",bitGroups:[d.other,d.static],baseBitType:u._standard,description:"Chapter bit, used to define chapters in books or articles",mappingKeys:{"xml-niso-iec":{"@el":"sec|app","@attr":{id:"$customerId"},"▼":"$anchor"}},tags:[{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,format:v,description:"The anchor for the chapter, used for linking"},{key:ye.tag_title,description:"The title of the chapter",jsonKey:"title|setMulti(level)",exportJsonKey:{title:"$",level:"$level"},mappingKeys:{"xml-niso-iec":{"@el":"title","@text":"$"}}},{key:ye.property_toc,description:"If the chapter should be included in the table of contents",format:C,defaultValue:"true"},{key:ye.property_progress,description:"The progress of the chapter, used for tracking reading progress",format:C,defaultValue:"true"},{key:ye.property_isCollapsible,description:"If true, the chapter is collapsible (always emitted; defaults false)",format:C,defaultValue:"false",alwaysEmit:!0}]},[u.clozeAndMultipleChoiceText]:{since:"1.3.0",title:"Cloze And Multiple Choice Text",bitGroups:[d.cloze,d.quizzes],baseBitType:u._standard,description:"Cloze and multiple choice text bit, used for quizzes with cloze and multiple choice questions",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.group_gap,description:"Tags for gaps in cloze and multiple choice text bits"},{key:ye.group_trueFalseInlineSelect,description:"Tags for true/false questions in cloze and multiple choice text bits"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:C,defaultValue:"true"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",title:"Coach Call To Action Cloze And Multiple Choice Text",bitGroups:[d.quizzes],baseBitType:u.clozeAndMultipleChoiceText,description:"Coach call to action cloze and multiple choice text bit"},[u.cloze]:{since:"1.3.0",title:"Cloze",bitGroups:[d.cloze,d.quizzes],baseBitType:u._standard,description:"Cloze bit, used for fill-in-the-blank questions in quizzes",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:C,defaultValue:"true"},{key:ye.property_quizCountItems,description:"The number of items in the cloze quiz",format:C,nullable:!0},{key:ye.property_quizStrikethroughSolutions,description:"If the cloze solutions should be strikethrough",format:C,nullable:!0},{key:ye.group_gap,description:"Tags for gaps in cloze bits"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.clozeInstructionGrouped]:{since:"1.3.0",title:"Cloze Instruction Grouped",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Cloze instruction grouped bit, used for cloze questions with grouped instructions",tags:[{key:ye.property_quizCountItems,description:"The number of items in the cloze quiz (instruction-grouped default: true)",format:C,defaultValue:"true"}]},[u.clozeSolutionGrouped]:{since:"1.3.0",title:"Cloze Solution Grouped",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Cloze solution grouped bit, used for cloze questions with grouped solutions",tags:[{key:ye.property_quizCountItems,description:"The number of items in the cloze quiz (solution-grouped default: true)",format:C,defaultValue:"true"},{key:ye.property_quizStrikethroughSolutions,description:"If the cloze solutions should be strikethrough (solution-grouped default: true)",format:C,defaultValue:"true"}]},[u.clozeSeveral]:{since:"3.5.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Cloze several bit, used for cloze questions with multiple answers"},[u.gapText]:{since:"1.5.15",bitGroups:[d.cloze,d.quizzes],baseBitType:u.cloze,description:"Gap text bit, used for fill-in-the-blank questions in quizzes with text gaps"},[u.gapTextInstructionGrouped]:{since:"1.5.15",bitGroups:[d.cloze,d.quizzes],baseBitType:u.clozeInstructionGrouped,description:"Gap text instruction grouped bit, used for fill-in-the-blank questions with grouped instructions"},[u.coachSelfReflectionCloze]:{since:"1.3.0",title:"Coach Self Reflection Cloze",bitGroups:[d.quizzes],baseBitType:u.cloze,description:"Coach self-reflection cloze bit, used for self-reflection questions in coaching"},[u.coachCallToActionCloze]:{since:"1.3.0",title:"Coach Call To Action Cloze",bitGroups:[d.quizzes],baseBitType:u.cloze,description:"Coach call to action cloze bit, used for call to action questions in coaching"},[u.clozeList]:{since:"1.4.13",title:"Cloze List",bitGroups:[d.cloze,d.quizzes],baseBitType:u._standard,description:"Cloze list bit, used for lists of cloze questions in quizzes",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"If the cloze answers are case sensitive",format:C,defaultValue:"true"}],cardSet:W},[u.code]:{since:"1.3.0",title:"Code",bitGroups:[d.static],baseBitType:u._standard,description:"Code bit, used for code snippets in articles or documents",mappingKeys:{"xml-niso-iec":{"@el":"code","@attr":{id:"$customerId",language:"$computerLanguage"},"▼":"$anchor","@text":"$"}},tags:[{key:ye.property_computerLanguage,description:"The programming language of the code snippet",format:v,mappingKeys:{"xml-niso-iec":[{"@absent":"text"}]}},{key:ye.property_codeLineNumbers,description:"If line numbers should be displayed for the code snippet",format:C},{key:ye.property_codeMinimap,description:"If a minimap should be displayed for the code snippet",format:C}],textFormatDefault:S.plainText},[u.formula]:{since:"1.35.0",title:"Formula",bitGroups:[d.static],baseBitType:u._standard,description:"Formula bit, used for mathematical formulas in articles or documents",textFormatDefault:S.latex},[u.formulaImage]:{since:"5.23.0",bitGroups:[d.static],baseBitType:u.formula,description:"Formula image bit, used for mathematical formulas rendered as images"},[u.smartStandardFormula]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard formula bit, used for mathematical formulas in smart standards"},[u.smartStandardFormulaNonNormative]:{since:"3.11.0",title:"Smart Standard Formula (Non Normative)",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard non-normative formula bit, used for mathematical formulas in smart standards that are non-normative"},[u.smartStandardFormulaNormative]:{since:"3.11.0",title:"Smart Standard Formula (Normative)",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard normative formula bit, used for mathematical formulas in smart standards that are normative",mappingKeys:{"xml-niso-iec":{"@el":"disp-formula","@attr":{id:"$customerId"},"▼":"$anchor","@children":"$"}}},[u.smartStandardRemarkFormula]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard remark formula bit, used for mathematical formulas in smart standards remarks"},[u.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard non-normative remark formula bit, used for mathematical formulas in smart standards remarks that are non-normative"},[u.smartStandardRemarkFormulaNormative]:{since:"3.11.0",bitGroups:[d.static],baseBitType:u.formula,description:"Smart standard normative remark formula bit, used for mathematical formulas in smart standards remarks that are normative"},[u.appCodeCell]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"App code cell, used to create code cells in the app editor"},[u.appCodeEditor]:{since:"1.4.3",title:"Code Editor",bitGroups:[d.static],baseBitType:u.code,description:"App code editor, used to create code editors in the app editor"},[u.appCodeIde]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"App code IDE, used to create code IDEs in the app editor"},[u.codeRuntime]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Code runtime, used to define the runtime environment for code snippets"},[u.consoleLog]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Console log, used to log messages to the console in code snippets"},[u.output]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Output bit, used to display output from code snippets"},[u.stdout]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Standard output bit, used to display standard output from code snippets"},[u.sandbox]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox bit, used to create a sandboxed environment for code execution"},[u.sandboxOutputJson]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox output JSON bit, used to display JSON output from sandboxed code"},[u.sandboxOutputMarkup]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox output markup bit, used to display markup output from sandboxed code"},[u.sandboxOutputRender]:{since:"4.10.0",bitGroups:[d.static],baseBitType:u.code,description:"A sandbox output render bit, used to display rendered output from sandboxed code"},[u.step]:{since:"1.5.1",title:"Step",bitGroups:[d.static,d.steps],baseBitType:u.article,description:"Step bit, used to define steps in a process or guide"},[u.stepImageScreenshot]:{since:"1.5.1",title:"Step Image Screenshot",bitGroups:[d.static,d.steps],baseBitType:u.image,description:"Step image screenshot bit, used to display screenshots in steps"},[u.stepImageScreenshotWithPointer]:{since:"1.5.1",title:"Step Image Screenshot With Pointer",bitGroups:[d.static,d.steps],baseBitType:u.image,description:"Step image screenshot with pointer bit, used to display screenshots with pointers in steps",tags:[{key:ye.property_pointerTop,description:"The top position of the pointer in the screenshot",format:v,minCount:1,maxCount:1},{key:ye.property_pointerLeft,description:"The left position of the pointer in the screenshot",format:v,minCount:1,maxCount:1}]},[u.milestone]:{since:"1.20.0",bitGroups:[d.static],baseBitType:u.step,description:"Milestone bit, used to define milestones in a process or guide"},[u.conversationLeft1]:{since:"1.3.0",title:"Conversation Left",bitGroups:[d.conversation,d.static],baseBitType:u._standard,description:"Conversation left bit, used to create a conversation on the left side of the screen",tags:[{key:ye.group_person,exportJsonKey:{partner:{name:"$"}},description:"Tags for the person in the conversation"}]},[u.conversationLeft1Scream]:{since:"1.3.0",title:"Conversation Left Scream",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation left scream bit, used to create a conversation with a scream on the left side of the screen"},[u.conversationLeft1Thought]:{since:"1.3.0",title:"Conversation Left Thought",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation left thought bit, used to create a conversation with a thought on the left side of the screen"},[u.conversationRight1]:{since:"1.3.0",title:"Conversation Right",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation right bit, used to create a conversation on the right side of the screen"},[u.conversationRight1Scream]:{since:"1.3.0",title:"Conversation Right Scream",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation right scream bit, used to create a conversation with a scream on the right side of the screen"},[u.conversationRight1Thought]:{since:"1.3.0",title:"Conversation Right Thought",bitGroups:[d.conversation,d.static],baseBitType:u.conversationLeft1,description:"Conversation right thought bit, used to create a conversation with a thought on the right side of the screen"},[u.clozeAndMultipleChoiceTextConversationLeft1]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation left bit, used for conversations with cloze and multiple choice text on the left side of the screen"},[u.clozeAndMultipleChoiceTextConversationLeft1Scream]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation left scream bit, used for conversations with cloze and multiple choice text and a scream on the left side of the screen"},[u.clozeAndMultipleChoiceTextConversationLeft1Thought]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation left thought bit, used for conversations with cloze and multiple choice text and a thought on the left side of the screen"},[u.clozeAndMultipleChoiceTextConversationRight1]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation right bit, used for conversations with cloze and multiple choice text on the right side of the screen"},[u.clozeAndMultipleChoiceTextConversationRight1Scream]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation right scream bit, used for conversations with cloze and multiple choice text and a scream on the right side of the screen"},[u.clozeAndMultipleChoiceTextConversationRight1Thought]:{since:"1.3.0",bitGroups:[d.cloze,d.quizzes],baseBitType:u.conversationLeft1,description:"Cloze and multiple choice text conversation right thought bit, used for conversations with cloze and multiple choice text and a thought on the right side of the screen"},[u.advertising]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"General advertising content bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingAdvertorial]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"Advertorial content bit (sponsored article)",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingCallToAction]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call-to-action for advertising",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingCallToActionMeeting]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.callToAction,description:"Call-to-action for meeting or appointment",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingBanner]:{since:"4.2.0",title:"Advertising Banner",bitGroups:[d.static],baseBitType:u.image,description:"Banner advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingSkyscraper]:{since:"4.2.0",title:"Advertising Skyscraper",bitGroups:[d.static],baseBitType:u.image,description:"Skyscraper (vertical) advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingRectangle]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Rectangle advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingFullPage]:{since:"4.2.0",title:"Full-page Advertising",bitGroups:[d.static],baseBitType:u.image,description:"Full-page advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingHalfPage]:{since:"4.2.0",title:"Half-Page Advertising",bitGroups:[d.static],baseBitType:u.image,description:"Half-page advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingQuarterPage]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Quarter-page advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingClassifiedPage]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Classifieds advertisement page bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingLandscape]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Landscape format advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.advertisingPortrait]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.image,description:"Portrait format advertisement bit",tags:[{key:ye.group_advertisingCommon,description:"Common advertising tags"}]},[u.cookPreparation]:{since:"1.3.0",title:"Cook Preparation",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook preparation bit"},[u.cookStep]:{since:"1.3.0",title:"Cook Step",bitGroups:[d.cooking,d.static,d.steps],baseBitType:u.article,description:"Cook step bit"},[u.cookIngredients]:{since:"1.5.16",title:"Cook Ingredients",bitGroups:[d.cooking,d.static],baseBitType:u._standard,description:"Cook ingredients bit, used to define ingredients for recipes",tags:[{key:ye.group_technicalTerm,description:"Tags for technical terms related to ingredients"},{key:ye.property_servings,jsonKey:"servings.servings",exportJsonKey:{servings:{servings:"$"}},description:"The number of servings for the ingredients",format:_,chain:[{key:ye.property_unit,description:"The unit of measurement for the ingredients (singular)",format:v},{key:ye.property_unitPlural,description:"The unit of measurement for the ingredients (plural)",format:v},{key:ye.property_unitAbbr,description:"The abbreviation for the unit of measurement (singular)",format:v},{key:ye.property_unitAbbrPlural,description:"The abbreviation for the unit of measurement (plural)",format:v},{key:ye.property_decimalPlaces,description:"The number of decimal places for the ingredient quantity",format:_,defaultValue:"1"},{key:ye.property_disableCalculation,description:"If the ingredient quantity calculation should be disabled",format:C},{exportJsonKey:{hint:"$"},key:ye.tag_hint,description:"Hint for the ingredient, used to provide additional information",format:v}]}],cardSet:Y},[u.recipe]:{since:"1.5.24",title:"Recipe",bitGroups:[d.recipes,d.static],baseBitType:u.cookIngredients,description:"Recipe bit, used to define a recipe"},[u.cookRemark]:{since:"1.3.0",title:"Cook Remark",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook remark bit, used to add remarks to recipes"},[u.cookVariation]:{since:"1.3.0",title:"Cook Variation",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook variation bit, used to define variations of recipes"},[u.cookInsert]:{since:"1.3.0",title:"Cook Insert",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook insert bit, used to insert additional content in recipes"},[u.cookNoteOnQuantity]:{since:"3.27.0",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook note on quantity bit, used to add notes on ingredient quantities in recipes"},[u.cookArrangement]:{since:"1.3.0",title:"Cook Arrangement",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook arrangement bit, used to arrange ingredients or steps in recipes"},[u.cookPracticeAdvise]:{since:"1.3.0",title:"Cook Practice Advise",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook practice advice bit, used to provide practical advice in recipes"},[u.cookPlate]:{since:"1.3.0",title:"Cook Plate",bitGroups:[d.static],baseBitType:u.article,description:"Cook plate bit, used to define the presentation of a dish"},[u.cookRecommendation]:{since:"1.3.0",title:"Cook Recommendation",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook recommendation bit, used to recommend dishes or ingredients"},[u.cookPersonalRecommendation]:{since:"1.3.0",title:"Cook Personal Recommendation",bitGroups:[d.static],baseBitType:u.article,description:"Cook personal recommendation bit, used to provide personal recommendations for dishes or ingredients"},[u.cookSideDrink]:{since:"1.3.0",title:"Cook Side Drink",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook side drink bit, used to define side drinks for dishes"},[u.cookSideDish]:{since:"1.3.0",title:"Cook Side Dish",bitGroups:[d.cooking,d.static],baseBitType:u.article,description:"Cook side dish bit, used to define side dishes for main courses"},[u.cookTimer]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Cook timer bit, used to set timers for cooking steps"},[u.document]:{since:"1.3.0",title:"Document",bitGroups:[d.static],baseBitType:u._standard,description:"Document bit, used to define documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize documents"},{key:ye.group_resourceDocument,description:"Tags for document resources, used to define documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.documentDownload]:{since:"1.3.0",title:"Document Download",bitGroups:[d.static],baseBitType:u._standard,description:"Document download bit, used to define downloadable documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize downloadable documents"},{key:ye.group_resourceDocumentDownload,description:"Tags for downloadable document resources, used to define downloadable documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.leDocumentDownload]:{since:"3.18.0",bitGroups:[d.static],baseBitType:u.documentDownload,description:"LE Document download bit, used to define downloadable documents in learning experiences"},[u.documentEmbed]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Document embed bit, used to embed documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize embedded documents"},{key:ye.group_resourceDocumentEmbed,description:"Tags for embedded document resources, used to define embedded documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.documentLink]:{since:"1.3.0",title:"Document Link",bitGroups:[d.static],baseBitType:u._standard,description:"Document link bit, used to link to documents in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Tags for resource bits, used to categorize document links"},{key:ye.group_resourceDocumentLink,description:"Tags for document link resources, used to define links to documents in articles or books",minCount:1}],resourceAttachmentAllowed:!1},[u.essay]:{since:"1.3.0",title:"Essay",bitGroups:[d.essay,d.quizzes],baseBitType:u._standard,description:"Essay bit, used to define essays in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common tags for quiz bits"},{key:ye.property_reasonableNumOfChars,description:"The reasonable number of characters for the essay",format:_,nullable:!0},{key:ye.property_sampleSolution,description:"Sample solution for the essay, used as a reference answer",format:v},{key:ye.property_partialAnswer,description:"Partial answer for the essay, used to indicate incomplete answers",format:v},{key:ye.property_reference,description:"Reference for the essay, used to link to external resources",format:v,maxCount:m},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the essay bit",format:T,nullable:!0}],rootExampleType:h},[u.coachSelfReflectionEssay]:{since:"1.3.0",title:"Coach Self Reflection Essay",bitGroups:[d.quizzes],baseBitType:u.essay,description:"Coach self-reflection essay bit"},[u.coachCallToActionEssay]:{since:"1.3.0",title:"Coach Call To Action Essay",bitGroups:[d.quizzes],baseBitType:u.essay,description:"Coach call to action essay bit"},[u.example]:{since:"1.3.0",title:"Example",bitGroups:[d.static],baseBitType:u._standard,description:"Example bit, used to provide examples in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"The title of the example"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the example bit",format:v,nullable:!0}],rootExampleType:h},[u.exampleAlt]:{since:"1.16.0",title:"Example Alternative",bitGroups:[d.static],baseBitType:u.example,description:"Alternative example bit, used to provide alternative examples in articles or books"},[u.standardExampleNormative]:{since:"1.16.0",title:"Standard Example (Normative)",bitGroups:[d.static],baseBitType:u.example,description:"Standard normative example bit, used to provide normative examples in articles or books"},[u.standardExampleNonNormative]:{since:"1.16.0",title:"Standard Example (Non Normative)",bitGroups:[d.static],baseBitType:u.example,description:"Standard non-normative example bit, used to provide non-normative examples in articles or books"},[u.smartStandardExampleNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardExampleNormative,description:"Smart standard normative example bit, used to provide normative examples in smart standards"},[u.smartStandardExampleNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardExampleNonNormative,description:"Smart standard non-normative example bit, used to provide non-normative examples in smart standards"},[u.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardExampleNormative,description:"Smart standard normative example collapsible bit, used to provide normative examples in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardExampleNonNormative,description:"Smart standard non-normative example collapsible bit, used to provide non-normative examples in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.authorContentBitGenerator]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"Body contains the content of one or more bits to be created by the bit generator",tags:[{key:ye.property_classification,description:"Classification for the created bits",format:v,maxCount:m}]},[u.appAiPrompt]:{since:"1.3.0",title:"AI Prompt",bitGroups:[d.static],baseBitType:u.article,description:"App AI prompt bit, used to create AI prompts in the app editor"},[u.aiPrompt]:{since:"1.3.0",title:"AI Prompt",bitGroups:[d.static],baseBitType:u.article,description:"AI prompt bit, used to create AI prompts in articles or books"},[u.aiChat]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI chat bit, used to create an AI chat"},[u.aiEditor]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI editor bit, used to create an AI editor"},[u.aiTutor]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI tutor bit, used to create an AI tutor"},[u.aiWbt]:{since:"4.2.0",bitGroups:[d.static],baseBitType:u.article,description:"AI WBT bit, used to create an AI WBT (Web-Based Training)"},[u.articleAi]:{since:"1.3.0",title:"AI Article",bitGroups:[d.static],baseBitType:u.article,description:"Article AI bit, used to create AI-generated articles",tags:[{key:ye.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:C,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[u.articleAttachment]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Article attachment bit, used to attach files to articles"},[u.assignment]:{since:"1.3.0",title:"Assignment",bitGroups:[d.assignment,d.quizzes],baseBitType:u.essay,description:"Assignment bit, used to define assignments in articles or books"},[u.audioTranscript]:{since:"1.3.0",title:"Audio Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Audio transcript bit, used to provide transcripts for audio files in articles or books"},[u.bitmarkExample]:{since:"1.3.0",title:"bitmark Example",bitGroups:[d.static],baseBitType:u.example,description:"Bitmark example bit, used to provide examples for bitmarks in articles or books"},[u.blogArticle]:{since:"1.3.0",title:"Blog Article",bitGroups:[d.static],baseBitType:u.article,description:"Blog article bit, used to define blog articles in articles or books"},[u.bug]:{since:"1.3.0",title:"Bug",bitGroups:[d.static,d.warning],baseBitType:u.article,description:"Bug bit, used to report bugs in articles or books"},[u.bugAlt]:{since:"1.16.0",title:"Bug Alternative",bitGroups:[d.static],baseBitType:u.bug,description:"Alternative bug bit, used to report bugs in articles or books with alternative styling"},[u.checklist]:{since:"1.3.0",title:"Checklist",bitGroups:[d.static],baseBitType:u.article,description:"Checklist bit, used to create checklists in articles or books"},[u.coachAudioTranscript]:{since:"1.3.0",title:"Coach Audio Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Coach audio transcript bit, used to provide transcripts for audio files in coaching articles or books"},[u.coachCallToActionChecklist]:{since:"1.3.0",title:"Coach Call To Action Checklist",bitGroups:[d.static],baseBitType:u.article,description:"Coach call to action checklist bit, used to create checklists in coaching articles or books"},[u.coachHomeRules]:{since:"1.3.0",title:"Coach Home Rules",bitGroups:[d.static],baseBitType:u.article,description:"Coach home rules bit, used to define home rules in coaching articles or books"},[u.coachVideoTranscript]:{since:"1.3.0",title:"Coach Video Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Coach video transcript bit, used to provide transcripts for video files in coaching articles or books"},[u.correction]:{since:"1.3.0",title:"Correction",bitGroups:[d.correction,d.quizzes,d.static],baseBitType:u.article,description:"Correction bit, used to provide corrections in articles or books"},[u.danger]:{since:"1.3.0",title:"Danger",bitGroups:[d.static,d.warning],baseBitType:u.article,description:"Danger bit, used to highlight dangerous or critical information in articles or books"},[u.dangerAlt]:{since:"1.16.0",title:"Danger Alternative",bitGroups:[d.static],baseBitType:u.article,description:"Alternative danger bit, used to highlight dangerous or critical information in articles or books with alternative styling"},[u.definitionTerm]:{since:"1.34.0",title:"Definition Term",bitGroups:[d.static],baseBitType:u.article,description:"Definition term bit, used to define terms in articles or books"},[u.deleted]:{since:"3.9.0",title:"Deleted Bit",bitGroups:[d.static],baseBitType:u.article,description:"Deleted bit, used to indicate deleted content in articles or books"},[u.details1]:{since:"1.3.0",title:"Details",bitGroups:[d.static],baseBitType:u.article,description:"Details bit, used to provide additional details in articles or books"},[u.details]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Details bit, used to provide additional details in articles or books"},[u.qAndA]:{since:"3.5.0",bitGroups:[d.static],baseBitType:u.article,description:"Q&A bit, used to create question and answer sections in articles or books"},[u.editorial]:{since:"1.3.0",title:"Editorial",bitGroups:[d.static],baseBitType:u.article,description:"Editorial bit, used to provide editorial content in articles or books"},[u.editorNote]:{since:"1.3.0",title:"Editor Note",bitGroups:[d.static],baseBitType:u.article,description:"Editor note bit, used to provide notes from the editor in articles or books"},[u.featured]:{since:"1.3.0",title:"Featured",bitGroups:[d.static],baseBitType:u.article,description:"Featured bit, used to highlight featured content in articles or books"},[u.glossaryTerm]:{since:"1.33.0",title:"Glossary Term",bitGroups:[d.static],baseBitType:u.article,description:"Glossary term bit, used to define glossary terms in articles or books"},[u.h]:{since:"5.40.0",title:"Heading",bitGroups:[d.static],baseBitType:u._standardLight,description:"Lightweight heading bit with chapter-style title levels 1-7; title/level + item only — no body, no footer",bodyAllowed:!1,footerAllowed:!1,tags:[{key:ye.tag_title,description:"The title of the heading",jsonKey:"title|setMulti(level)",exportJsonKey:{title:"$",level:"$level"}}]},[u.help]:{since:"1.3.0",title:"Help",bitGroups:[d.static],baseBitType:u.article,description:"Help bit, used to provide help or support information in articles or books"},[u.helpAlt]:{since:"1.16.0",title:"Help Alt",bitGroups:[d.static],baseBitType:u.help,description:"Alternative help bit, used to provide help or support information in articles or books with alternative styling"},[u.hint]:{since:"1.3.0",title:"Hint",bitGroups:[d.static],baseBitType:u.article,description:"Hint bit, used to provide hints or tips in articles or books"},[u.hintAlt]:{since:"1.16.0",title:"Hint Alternative",bitGroups:[d.static],baseBitType:u.hint,description:"Alternative hint bit, used to provide hints or tips in articles or books with alternative styling"},[u.indexTerm]:{since:"1.33.0",title:"Index Term",bitGroups:[d.static],baseBitType:u.article,description:"Index term bit, used to define index terms in articles or books"},[u.info]:{since:"1.3.0",title:"Info",bitGroups:[d.static],baseBitType:u.article,description:"Info bit, used to provide informational content in articles or books"},[u.infoAlt]:{since:"1.16.0",title:"Info Alternative",bitGroups:[d.static],baseBitType:u.info,description:"Alternative info bit, used to provide informational content in articles or books with alternative styling"},[u.langLearningOutcomes]:{since:"1.3.0",title:"Language Learning Outcomes",bitGroups:[d.static],baseBitType:u.article,description:"Language learning outcomes bit, used to define learning outcomes in language articles or books"},[u.langEnablingLanguageSkills]:{since:"1.3.0",title:"Language Enabling Language Skills",bitGroups:[d.static],baseBitType:u.article,description:"Language enabling skills bit, used to define enabling language skills in language articles or books"},[u.langLifeSkills]:{since:"1.3.0",title:"Language Life Skills",bitGroups:[d.static],baseBitType:u.article,description:"Language life skills bit, used to define life skills in language articles or books"},[u.langEnglishAroundWorld]:{since:"1.3.0",title:"Language English Around World",bitGroups:[d.static],baseBitType:u.article,description:"Language English around the world bit, used to provide information about English usage around the world in language articles or books"},[u.langGoodToKnow]:{since:"1.3.0",title:"Language Good To Know",bitGroups:[d.static],baseBitType:u.article,description:"Language good to know bit, used to provide useful information in language articles or books"},[u.langLearningGoal]:{since:"1.3.0",title:"Language Learning Goal",bitGroups:[d.static],baseBitType:u.article,description:"Language learning goal bit, used to define learning goals in language articles or books"},[u.langLearningStrategy]:{since:"1.3.0",title:"Language Learning Strategy",bitGroups:[d.static],baseBitType:u.article,description:"Language learning strategy bit, used to define learning strategies in language articles or books"},[u.langLikeALocal]:{since:"1.3.0",title:"Language Like A Local",bitGroups:[d.static],baseBitType:u.article,description:"Language like a local bit, used to provide tips for speaking like a local in language articles or books"},[u.langMaterial]:{since:"1.3.0",title:"Language Material",bitGroups:[d.static],baseBitType:u.article,description:"Language material bit, used to provide language learning materials in language articles or books"},[u.langUsefulPhrases]:{since:"1.3.0",title:"Language Useful Phrases",bitGroups:[d.static],baseBitType:u.article,description:"Language useful phrases bit, used to provide useful phrases in language articles or books"},[u.langLevelDown]:{since:"1.3.0",title:"Language Level Down",bitGroups:[d.static],baseBitType:u.article,description:"Language level down bit, used to provide information about lower language levels in language articles or books"},[u.langLevelUp]:{since:"1.3.0",title:"Language Level Up",bitGroups:[d.static],baseBitType:u.article,description:"Language level up bit, used to provide information about higher language levels in language articles or books"},[u.langExtraActivity]:{since:"1.3.0",title:"Language Extra Activity",bitGroups:[d.static],baseBitType:u.article,description:"Language extra activity bit, used to provide additional activities in language articles or books"},[u.langVideoScript]:{since:"1.3.0",title:"Language Video Script",bitGroups:[d.static],baseBitType:u.article,description:"Language video script bit, used to provide scripts for language learning videos in articles or books"},[u.langAudioScript]:{since:"1.3.0",title:"Language Audio Script",bitGroups:[d.static],baseBitType:u.article,description:"Language audio script bit, used to provide scripts for language learning audio files in articles or books"},[u.langVocabulary]:{since:"1.3.0",title:"Language Vocabulary",bitGroups:[d.static],baseBitType:u.article,description:"Language vocabulary bit, used to provide vocabulary lists in language articles or books"},[u.langHomework]:{since:"1.3.0",title:"Language Homework",bitGroups:[d.static],baseBitType:u.article,description:"Language homework bit, used to define homework assignments in language articles or books"},[u.langTeacherNote]:{since:"1.3.0",title:"Language Teacher Note",bitGroups:[d.static],baseBitType:u.article,description:"Language teacher note bit, used to provide notes for teachers in language articles or books"},[u.langTeacherPronunciation]:{since:"1.3.0",title:"Language Teacher Pronunciation",bitGroups:[d.static],baseBitType:u.article,description:"Language teacher pronunciation bit, used to provide pronunciation guidance for teachers in language articles or books"},[u.list]:{since:"1.22.0",title:"List",bitGroups:[d.static],baseBitType:u._standardLight,description:"List bit, used to create lists in articles or books"},[u.listAlt]:{since:"5.40.0",title:"List Alt",bitGroups:[d.static],baseBitType:u.list,description:"Lightweight list bit (alternative), based on list"},[u.standardList]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.list,description:"Standard list bit, used to create standard lists in articles or books"},[u.smartStandardList]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardList,description:"Smart standard list bit, used to create smart standard lists in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"ref-list","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardP]:{since:"5.40.0",title:"Smart Standard Paragraph",bitGroups:[d.static],baseBitType:u.p,description:"Smart standard paragraph bit, based on p"},[u.smartStandardListCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardList,description:"Smart standard list collapsible bit, used to create collapsible smart standard lists in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.message]:{since:"1.3.0",title:"Message",bitGroups:[d.message,d.static],baseBitType:u.article,description:"Message bit, used to create messages in articles or books"},[u.newspaperArticle]:{since:"1.3.0",title:"Newspaper Article",bitGroups:[d.static],baseBitType:u.article,description:"Newspaper article bit, used to define newspaper articles in articles or books"},[u.note]:{since:"1.3.0",title:"Note",bitGroups:[d.static],baseBitType:u.article,description:"Note bit, used to provide notes in articles or books"},[u.noteAlt]:{since:"1.16.0",title:"Note Alternative",bitGroups:[d.static],baseBitType:u.note,description:"Alternative note bit, used to provide notes in articles or books with alternative styling"},[u.standardNoteNormative]:{since:"1.16.0",title:"Standard Note (Normative)",bitGroups:[d.static],baseBitType:u.note,description:"Standard normative note bit, used to provide normative notes in articles or books"},[u.standardNoteNonNormative]:{since:"1.16.0",title:"Standard Note (Non Normative)",bitGroups:[d.static],baseBitType:u.note,description:"Standard non-normative note bit, used to provide non-normative notes in articles or books"},[u.smartStandardNoteNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardNoteNormative,description:"Smart standard normative note bit, used to provide normative notes in smart standards"},[u.smartStandardNoteNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardNoteNonNormative,description:"Smart standard non-normative note bit, used to provide non-normative notes in smart standards",mappingKeys:{"xml-niso-iec":{"@el":"non-normative-note","@attr":{id:"$customerId"},"@children":"$","▼":"$anchor"}}},[u.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardNoteNormative,description:"Smart standard normative note collapsible bit, used to provide normative notes in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardNoteNonNormative,description:"Smart standard non-normative note collapsible bit, used to provide non-normative notes in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.noteAi]:{since:"1.3.0",title:"Note AI",bitGroups:[d.static],baseBitType:u.note,description:"Note AI bit, used to create AI-generated notes in articles or books",tags:[{key:ye.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:C,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[u.notebookArticle]:{since:"1.3.0",title:"Notebook Article",bitGroups:[d.static],baseBitType:u.article,description:"Notebook article bit, used to define notebook articles in articles or books"},[u.preparationNote]:{since:"1.3.0",title:"Preparation Note",bitGroups:[d.preparationNote,d.quizzes,d.static],baseBitType:u.article,description:"Preparation note bit, used to provide preparation notes in articles or books"},[u.printThisBook]:{since:"5.4.0",bitGroups:[d.static],baseBitType:u._standard,description:"Print this book bit, used to create a button that prints the entire book",tags:[{key:ye.property_buttonCaption,description:"The caption of the print button",format:v}]},[u.printThisChapter]:{since:"5.4.0",bitGroups:[d.static],baseBitType:u._standard,description:"Print this chapter bit, used to create a button that prints the current chapter",tags:[{key:ye.property_buttonCaption,description:"The caption of the print button",format:v},{key:ye.property_printParentChapterLevel,description:"The parent chapter level to print",format:_,defaultValue:"-1"}]},[u.printPageBreak]:{since:"5.4.0",bitGroups:[d.static],baseBitType:u.article,description:"Print page break bit, used to create page breaks for printing in articles or books"},[u.releaseNotesSummary]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.article,description:"Release notes summary bit, used to summarize release notes in articles or books"},[u.remark]:{since:"1.3.0",title:"Remark",bitGroups:[d.static],baseBitType:u.article,description:"Remark bit, used to provide remarks in articles or books"},[u.remarkAlt]:{since:"1.16.0",title:"Remark Alternative",bitGroups:[d.static],baseBitType:u.remark,description:"Alternative remark bit, used to provide remarks in articles or books with alternative styling"},[u.standardRemarkNormative]:{since:"1.16.0",title:"Standard Remark (Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard normative remark bit, used to provide normative remarks in articles or books"},[u.standardRemarkNonNormative]:{since:"1.16.0",title:"Standard Remark (Non Normative)",bitGroups:[d.static],baseBitType:u.article,description:"Standard non-normative remark bit, used to provide non-normative remarks in articles or books"},[u.smartStandardRemarkNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkNormative,description:"Smart standard normative remark bit, used to provide normative remarks in smart standards"},[u.smartStandardRemarkNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkNonNormative,description:"Smart standard non-normative remark bit, used to provide non-normative remarks in smart standards",mappingKeys:{"xml-niso-iec":{"@el":"non-normative-note","@attr":{"content-type":"warning|caution",id:"$customerId"},"@children":"$","▼":"$anchor"}}},[u.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkNormative,description:"Smart standard normative remark collapsible bit, used to provide normative remarks in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkNonNormative,description:"Smart standard non-normative remark collapsible bit, used to provide non-normative remarks in smart standards that can be collapsed",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.selfAssessment]:{since:"1.3.0",title:"Self Assessment",bitGroups:[d.selfAssessment,d.static,d.surveys],baseBitType:u.article,description:"Self-assessment bit, used to create self-assessment sections in articles or books"},[u.separator]:{since:"1.4.15",title:"Separator",bitGroups:[d.static],baseBitType:u.article,description:"Separator bit, used to create visual separators in articles or books",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.separatorAlt]:{since:"1.16.0",title:"Separator Alternative",bitGroups:[d.static],baseBitType:u.separator,description:"Alternative separator bit, used to create visual separators in articles or books with alternative styling",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.sticker]:{since:"1.5.28",bitGroups:[d.static],baseBitType:u.article,description:"Sticker bit, used to create stickers in articles or books"},[u.sideNote]:{since:"1.3.0",title:"Side Note",bitGroups:[d.static],baseBitType:u.article,description:"Side note bit, used to provide side notes in articles or books"},[u.summary]:{since:"1.3.0",title:"Summary",bitGroups:[d.static],baseBitType:u.article,description:"Summary bit, used to provide summaries in articles or books"},[u.summaryAi]:{since:"1.3.0",title:"Summary AI",bitGroups:[d.static],baseBitType:u.summary,description:"AI-generated summary bit",tags:[{key:ye.property_aiGenerated,description:"AI-generated flag, forced true for article-ai bits",format:C,defaultValue:"true",exportJsonKey:{aiGenerated:!0}}]},[u.videoTranscript]:{since:"1.3.0",title:"Video Transcript",bitGroups:[d.static],baseBitType:u.article,description:"Video transcript bit, used to provide transcripts for video files in articles or books"},[u.warning]:{since:"1.3.0",title:"Warning",bitGroups:[d.static,d.warning],baseBitType:u.article,description:"Warning bit, used to highlight warnings in articles or books"},[u.warningAlt]:{since:"1.16.0",title:"Warning Alternative",bitGroups:[d.static],baseBitType:u.warning,description:"Alternative warning bit, used to highlight warnings in articles or books with alternative styling"},[u.workbookArticle]:{since:"1.3.0",title:"Workbook Article",bitGroups:[d.static],baseBitType:u.article,description:"Workbook article bit, used to define workbook articles in articles or books"},[u.collapsible]:{since:"1.21.0",title:"Collapsible",bitGroups:[d.static],deprecated:"5.37.0",baseBitType:u.article,description:"Collapsible bit, used to create collapsible sections in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.sideNoteCollapsible]:{since:"1.21.0",title:"Side Note Collapsible",deprecated:"5.37.0",baseBitType:u.sideNote,description:"Side note collapsible bit, used to create collapsible side notes in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.infoCollapsible]:{since:"1.21.0",title:"Info Collapsible",deprecated:"5.37.0",baseBitType:u.info,description:"Info collapsible bit, used to create collapsible informational sections in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.remarkCollapsible]:{since:"1.21.0",title:"Remark Collapsible",deprecated:"5.37.0",baseBitType:u.remark,description:"Remark collapsible bit, used to create collapsible remarks in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.warningCollapsible]:{since:"1.21.0",title:"Warning Collapsible",deprecated:"5.37.0",baseBitType:u.warning,description:"Warning collapsible bit, used to create collapsible warnings in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.dangerCollapsible]:{since:"1.21.0",title:"Danger Collapsible",deprecated:"5.37.0",baseBitType:u.danger,description:"Danger collapsible bit, used to create collapsible danger sections in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.noteCollapsible]:{since:"1.21.0",title:"Note Collapsible",deprecated:"5.37.0",baseBitType:u.note,description:"Note collapsible bit, used to create collapsible notes in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.exampleCollapsible]:{since:"1.21.0",title:"Example Collapsible",deprecated:"5.37.0",baseBitType:u.example,description:"Example collapsible bit, used to create collapsible examples in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.hintCollapsible]:{since:"1.21.0",title:"Hint Collapsible",deprecated:"5.37.0",baseBitType:u.hint,description:"Hint collapsible bit, used to create collapsible hints in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.bugCollapsible]:{since:"1.21.0",title:"Bug Collapsible",deprecated:"5.37.0",baseBitType:u.bug,description:"Bug collapsible bit, used to create collapsible bug reports in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.platformPath]:{since:"3.14.1",bitGroups:[d.static],baseBitType:u._standard,description:"Platform path bit, used to define paths in the platform",tags:[{key:ye.property_path,description:"The path for the platform, used to define navigation paths",format:v}]},[u.appCalculatorLatex]:{since:"4.10.0",title:"Calculator LaTeX",bitGroups:[d.static],baseBitType:u.article,description:"A LaTeX calculator bit, used to create a calculator that can interpret LaTeX expressions",tags:[{key:ye.property_formula,description:"The LaTeX formula for the calculator, used to define the calculation logic",format:v}]},[u.container]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.article,description:"Container bit, used to group bits together in articles or books",tags:[{key:ye.property_allowedBit,description:"Allowed bits in the container, used to define which bits can be placed inside",format:v,maxCount:m}]},[u.containerWrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container wrap bit, used to wrap content in a container"},[u.containerNowrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container nowrap bit, used to prevent wrapping of content in a container"},[u.containerNowrapStretch]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container nowrap stretch bit, used to stretch content without wrapping in a container"},[u.containerGroup]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container group bit, used to group multiple containers together"},[u.containerFolder]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Container folder bit, used to create folders for organizing bits"},[u.containerCarousel]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container carousel bit, used to create carousels for displaying bits"},[u.containerCards]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container cards bit, used to create card layouts for displaying bits"},[u.containerGrid]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container grid bit, used to create grid layouts for displaying bits"},[u.containerStack]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container stack bit, used to create stacked layouts for displaying bits"},[u.containerSlides]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container slides bit, used to create slide presentations for displaying bits"},[u.containerGallery]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container gallery bit, used to create galleries for displaying bits"},[u.containerScroller]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container scroller bit, used to create scrolling sections for displaying bits"},[u.containerTabs]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container tabs bit, used to create tabbed sections for displaying bits"},[u.containerAccordionTabs]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container accordion tabs bit, used to create accordion-style tabbed sections for displaying bits"},[u.containerFolderAll]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container folder all bit, used to create folders that can contain all types of bits"},[u.containerBits2]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container bits 2 bit, used to create a container for bits with additional features"},[u.containerCookRecipe]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container cook recipe bit, used to create recipe containers for displaying cooking recipes"},[u.containerNewsArticle]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container news article bit, used to create containers for news articles"},[u.containerPreview]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.container,description:"Container preview bit, used to create preview sections for displaying bits"},[u.pageContainer]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.container,description:"Page container bit, used to create containers for pages in articles or books"},[u.pageContainerWrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container wrap bit, used to wrap content in a page container"},[u.pageContainerNowrap]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container nowrap bit, used to prevent wrapping of content in a page container"},[u.pageContainerNowrapStretch]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container nowrap stretch bit, used to stretch content without wrapping in a page container"},[u.pageContainerFolder]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container folder bit, used to create folders for organizing bits in a page container"},[u.pageContainerGroup]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.pageContainer,description:"Page container group bit, used to group multiple page containers together"},[u.metalevelExplanation]:{since:"1.10.0",bitGroups:[d.static],baseBitType:u.article,description:"Metalevel explanation bit, used to provide explanations for metalevels in articles or books"},[u.module]:{since:"1.5.26",title:"Module",bitGroups:[d.static],baseBitType:u.article,description:"Module bit, used to define modules in articles or books",tags:[{key:ye.property_hasBookNavigation,description:"Indicates if the module has book navigation",format:C,defaultValue:"true"},{key:ye.property_productId,description:"Product ID for the module, used to link to a specific product",format:v,minCount:1,maxCount:m},{key:ye.property_duration,description:"Duration of the module, used to indicate how long it takes to complete",format:v}]},[u.moduleProduct]:{since:"1.9.0",bitGroups:[d.static],baseBitType:u.module,description:"Module product bit, used to define products in modules",tags:[{key:ye.property_productId,description:"Product ID for the module product, used to link to a specific product",format:v,minCount:1,maxCount:1}]},[u.exampleList]:{since:"1.4.13",bitGroups:[d.static],baseBitType:u.example,description:"Example list bit, used to create lists of examples in articles or books",cardSet:H,rootExampleType:h},[u.extractorPage]:{since:"1.5.17",title:"Extractor Page",bitGroups:[d.extractor,d.pages],baseBitType:u.image,description:"Extractor page bit, used to extract pages from images"},[u.extractorPageCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPage,description:"Collapsible extractor page bit, used to extract pages from images with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorPageWithBlocks]:{since:"1.5.21",title:"Extractor Page With Blocks",bitGroups:[d.extractor],baseBitType:u.image,description:"Extractor page with blocks bit, used to extract pages with blocks from images"},[u.extractorPageWithBlocksCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageWithBlocks,description:"Collapsible extractor page with blocks bit, used to extract pages with blocks from images with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorConfiguration]:{since:"1.7.1",title:"Extractor Configuration",bitGroups:[d.extractor],baseBitType:u._standard,description:"Extractor configuration bit, used to configure extractors in articles or books",textFormatDefault:S.plainText},[u.extractorBlueprintConfiguration]:{since:"5.11.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor blueprint configuration bit, used to specify extractor blueprint configuration when extracting from blueprints",textFormatDefault:S.plainText},[u.extractorImage]:{since:"4.3.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor images bit, used for images extracted from PDFs",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for logo grave images, used to define additional properties"},{key:ye.group_resourceImageNoZoom,description:"Resource image tags for logo grave images, used to attach images",exportJsonKey:{images:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:m}],resourceAttachmentAllowed:!1,textFormatDefault:S.plainText},[u.extractorImageCollapsible]:{since:"4.3.0",title:"Extractor Collapsible Image",deprecated:"5.37.0",baseBitType:u.extractorImage,description:"Collapsible extractor images bit, used for images extracted from PDFs",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorBlueprint]:{since:"5.12.0",title:"Extractor Blueprint",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor blueprint bit, used to provide blueprint information about extractors",textFormatDefault:S.json,tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for the blueprint reference image"},{key:ye.group_resourceImage,description:"Optional uncropped reference page image, used so authoring tools can compute crops against the original page dimensions"}],resourceAttachmentAllowed:!1},[u.extractorInformation]:{since:"3.8.0",title:"Extractor Information",bitGroups:[d.extractor],baseBitType:u._standard,description:"Extractor information bit, used to provide information about extractors in articles or books",textFormatDefault:S.json},[u.extractorTheme]:{since:"5.7.0",title:"Theme",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor theme bit, used to store design/theme JSON extracted from documents",textFormatDefault:S.json},[u.extractorReconcile]:{since:"5.35.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor reconcile bit, used to store PDF-compare reconciliation decisions (config and issues) in JSON",textFormatDefault:S.json},[u.extractorAiChat]:{since:"3.19.0",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor AI chat bit, used to create AI chat interfaces for extractors in articles or books"},[u.extractorBlock]:{since:"1.5.16",title:"Extractor Block",bitGroups:[d.extractor],baseBitType:u._standard,description:"Extractor block bit, used to define blocks within extractor pages",tags:[{key:ye.property_blockId,description:"Unique identifier for the block, used to reference the block in extractor pages",format:v},{key:ye.property_pageNo,description:"Page number for the block, used to indicate the page on which the block appears",format:_,nullable:!0},{key:ye.property_x,description:"X-coordinate for the block, used to position the block on the page",format:_,nullable:!0},{key:ye.property_y,description:"Y-coordinate for the block, used to position the block on the page",format:_,nullable:!0},{key:ye.property_width,description:"Width of the block, used to define the size of the block on the page",format:_,nullable:!0},{key:ye.property_height,description:"Height of the block, used to define the size of the block on the page",format:_,nullable:!0},{key:ye.property_index,description:"Index of the block, used to order blocks within the extractor page",format:_,nullable:!0},{key:ye.property_classification,description:"Classification for the block, used to categorize the block within the extractor",format:v},{key:ye.property_availableClassifications,description:"Available classifications for the block, used to define possible classifications",format:v,maxCount:m},{key:ye.group_resourceImage,description:"Resource image for the block, used to attach images to the block",minCount:1}],resourceAttachmentAllowed:!1},[u.extractorRepeatedText]:{since:"1.5.21",title:"Extractor Repeated Text",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor repeated text bit, used to define repeated text in extractor pages"},[u.extractorRule]:{since:"5.17.0",title:"Extractor Rule",bitGroups:[d.extractor,d.static],baseBitType:u._standard,description:"Extractor rule bit, used to define extraction rules with reference images and instructions",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for extraction rule images"},{key:ye.group_resourceImage,description:"Resource image tags for the rule reference image",minCount:1}],resourceAttachmentAllowed:!1,textFormatDefault:S.plainText},[u.extractorPageNumber]:{since:"1.5.21",title:"Extractor Page Number",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor page number bit, used to define page numbers in extractor pages"},[u.extractorPageNumberCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageNumber,description:"Collapsible extractor page number bit, used to define page numbers in extractor pages with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorPageHeader]:{since:"1.5.21",title:"Extractor Page Header",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor page header bit, used to define headers in extractor pages"},[u.extractorPageHeaderCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageHeader,description:"Collapsible extractor page header bit, used to define headers in extractor pages with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.extractorPageFooter]:{since:"1.5.21",title:"Extractor Page Footer",bitGroups:[d.extractor],baseBitType:u.article,description:"Extractor page footer bit, used to define footers in extractor pages"},[u.extractorPageFooterCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.extractorPageFooter,description:"Collapsible extractor page footer bit, used to define footers in extractor pages with collapsible functionality",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.pageOpenBook]:{since:"1.5.10",title:"Page Open Book",bitGroups:[d.static],baseBitType:u.article,description:"Page open book bit, used to create pages that open books in articles or books",tags:[{key:ye.property_slug,description:"Slug for the book, used to identify the book in the system",format:v},{key:ye.property_book,description:"Book reference for the page, used to link to a specific book",format:v,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system"},{key:ye.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button"},{key:ye.property_authorFullName,description:"Full name of the author",format:v},{key:ye.property_authorPseudonym,description:"A pseudonym of the author, if any",format:v},{key:ye.property_authorTitle,description:'The title of the author, e.g. "Dr.", "Prof.", etc.',format:v},{key:ye.property_authorJobTitle,description:'The job title of the author, e.g. "Software Engineer", "Professor", etc.',format:v}]},[u.printBook]:{since:"5.5.0",bitGroups:[d.static],baseBitType:u.article,description:"Print book bit, used to create pages that open books without author information in articles or books",tags:[{key:ye.property_slug,description:"Slug for the book, used to identify the book in the system",format:v},{key:ye.property_book,description:"Book reference for the page, used to link to a specific book",format:v,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]},{key:ye.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button"}]},[u.openBookChapter]:{since:"4.16.0",title:"Open Chapter",bitGroups:[d.static],baseBitType:u.pageOpenBook,description:"Open book chapter bit, derived from page-open-book, used to create chapter pages that open books"},[u.openBookChapterTeaser]:{since:"4.16.0",bitGroups:[d.static],baseBitType:u.openBookChapter,description:"Open book chapter teaser bit, equal to open-book-chapter, used to create teaser chapter pages that open books"},[u.pageOpenBookList]:{since:"2.1.0",title:"Page Open Book List",bitGroups:[d.static],baseBitType:u.article,description:"Page open book list bit, used to create pages that open lists of books in articles or books",tags:[{key:ye.property_book,exportJsonKey:{book:[{book:"$"}]},description:"Book reference for the page, used to link to a specific book",maxCount:m,chain:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the book, used to link to the book in the system",maxCount:1,chain:[{key:ye.tag_reference,jsonKey:"referenceEnd",exportJsonKey:{referenceEnd:"$"},format:v,description:"End reference tag for the book, used to specify a range",maxCount:1}]}]},{key:ye.property_buttonCaption,description:"Caption for the button, used to define the text displayed on the button",format:v}]},[u.pageSubscribe]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.article,description:"Page subscribe bit, used to create pages that allow users to subscribe to content",tags:[{key:ye.property_slug,description:"Slug for the subscription page, used to identify the page in the system",format:v},{key:ye.property_buttonCaption,description:"Caption for the subscription button, used to define the text displayed on the button",format:v},{key:ye.property_mailingList,description:"Mailing list for the subscription, used to link to a specific mailing list",format:v}]},[u.assignmentList]:{since:"1.4.13",bitGroups:[d.static],baseBitType:u.exampleList,description:"Assignment list bit, used to create lists of assignments in articles or books"},[u.pageFooter]:{since:"1.4.13",title:"Page Footer",bitGroups:[d.static],baseBitType:u.article,description:"Page footer bit, used to create footers in articles or books",tags:[{key:ye.property_slug,description:"Slug for the footer, used to identify the footer in the system",format:v}],cardSet:U},[u.legend]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Legend bit, used to provide legends in articles or books",cardSet:E},[u.smartStandardLegend]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard legend bit, used to provide smart standard legends in articles or books"},[u.smartStandardLegendNonNormative]:{since:"3.12.0",title:"Smart Standard Legend (Non Normative)",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard non-normative legend bit, used to provide non-normative smart standard legends in articles or books"},[u.smartStandardLegendNormative]:{since:"3.12.0",title:"Smart Standard Legend (Normative)",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard normative legend bit, used to provide normative smart standard legends in articles or books",mappingKeys:{"xml-niso-iec":[{"@el":"legend","@attr":{id:"$customerId"},"▼":"$anchor"},{"@el":"def-list","@attr":{id:"$customerId"},"▼":"$anchor"}]}},[u.smartStandardRemarkLegend]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard remark legend bit, used to provide smart standard remarks in legends"},[u.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard non-normative remark legend bit, used to provide non-normative smart standard remarks in legends"},[u.smartStandardRemarkLegendNormative]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.legend,description:"Smart standard normative remark legend bit, used to provide normative smart standard remarks in legends"},[u.definitionList]:{since:"1.34.0",title:"Definition List",bitGroups:[d.static],baseBitType:u._standard,description:"Definition list bit, used to create lists of definitions in articles or books",tags:[{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:E},[u.definitionListCollapsible]:{since:"5.25.0",title:"Collapsible definition list",deprecated:"5.37.0",baseBitType:u.definitionList,description:"Collapsible definition list bit, used to create collapsible lists of definitions in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.standardDefinitionListNormative]:{since:"5.24.0",bitGroups:[d.static],baseBitType:u.definitionList,description:"Standard normative definition list bit, used to create normative standard definition lists in articles or books"},[u.standardDefinitionListNonNormative]:{since:"5.24.0",bitGroups:[d.static],baseBitType:u.definitionList,description:"Standard non-normative definition list bit, used to create non-normative standard definition lists in articles or books"},[u.smartStandardDefinitionListNormative]:{since:"5.24.0",title:"Smart Standard Definition List (Normative)",bitGroups:[d.static],baseBitType:u.standardDefinitionListNormative,description:"Smart standard normative definition list bit, used to create normative smart standard definition lists in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"term-sec","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardDefinitionListNonNormative]:{since:"5.24.0",bitGroups:[d.static],baseBitType:u.standardDefinitionListNonNormative,description:"Smart standard non-normative definition list bit, used to create non-normative smart standard definition lists in articles or books"},[u.metaSearchDefaultTerms]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Meta search default terms bit, used to define default search terms in articles",cardSet:L},[u.metaSearchDefaultTopics]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.metaSearchDefaultTerms,description:"Meta search default topics bit, used to define default search topics in articles"},[u.flashcard]:{since:"1.3.0",title:"Flashcard",bitGroups:[d.flashcard,d.quizzes,d.static],baseBitType:u._standard,description:"Flashcard bit, used to create flashcards in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for flashcards"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:P},[u.flashcard1]:{since:"1.3.0",title:"Flashcard 1",bitGroups:[d.flashcard,d.quizzes,d.static],baseBitType:u.flashcard,description:"Flashcard 1 bit",cardSet:I},[u.qAndACard]:{since:"3.25.0",title:"Q&A Card",bitGroups:[d.quizzes],baseBitType:u.flashcard1,description:"Q&A card bit, used to create question and answer cards in articles or books",cardSet:P},[u.focusImage]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.image,description:"Focus image bit, used to create images with focus points in articles or books",tags:[{key:ye.property_focusX,description:"X-coordinate for the focus point, used to define the focus area in the image",format:_,nullable:!0},{key:ye.property_focusY,description:"Y-coordinate for the focus point, used to define the focus area in the image",format:_,nullable:!0}]},[u.highlightText]:{since:"1.3.0",title:"Highlight Text",bitGroups:[d.highlightText,d.quizzes],baseBitType:u._standard,description:"Highlight text bit, used to create highlighted text in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for highlighted text"},{key:ye.group_trueFalseInlineHighlight,description:"True/False quiz tags for highlighted text (inline body nodes)"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.image]:{since:"1.3.0",title:"Image",bitGroups:[d.static],baseBitType:u._standard,description:"Image bit, used to create images in articles or books",tags:[{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.appCreateBitsFromImage]:{since:"1.3.0",title:"Create Bits From Image",bitGroups:[d.static],baseBitType:u.image,description:"App create bits from image bit, used to create bits from images in the app"},[u.appGetScreenshot]:{since:"1.3.0",title:"Get Screenshot",bitGroups:[d.static],baseBitType:u.image,description:"App get screenshot bit, used to capture screenshots in the app"},[u.detailsImage]:{since:"1.3.0",title:"Details Image",bitGroups:[d.static],baseBitType:u.image,description:"Details image bit, used to create detailed images in articles or books"},[u.figure]:{since:"1.3.0",title:"Figure",bitGroups:[d.static],baseBitType:u.image,description:"Figure bit, used to create figures in articles or books",cardSet:E},[u.imageBanner]:{since:"1.3.0",title:"Banner Image",bitGroups:[d.static],baseBitType:u.image,description:"Image banner bit, used to create banners in articles or books"},[u.imageFigure]:{since:"1.3.0",title:"Figure Image",bitGroups:[d.static],baseBitType:u.image,description:"Image figure bit, used to create figures with images in articles or books",cardSet:E},[u.imageFigureAlt]:{since:"1.16.0",title:"Figure Alternative Image",bitGroups:[d.static],baseBitType:u.imageFigure,description:"Alternative image figure bit, used to create figures with alternative images in articles or books"},[u.standardImageFigureNormative]:{since:"1.16.0",title:"Standard Figure (Normative)",bitGroups:[d.static],baseBitType:u.imageFigure,description:"Standard normative image figure bit, used to create normative image figures in articles or books"},[u.standardImageFigureNonNormative]:{since:"1.16.0",title:"Standard Figure (Non Normative)",bitGroups:[d.static],baseBitType:u.imageFigure,description:"Standard non-normative image figure bit, used to create non-normative image figures in articles or books"},[u.smartStandardImageFigureNormative]:{since:"1.28.0",title:"Smart Standard Image/Figure (Normative)",bitGroups:[d.static],baseBitType:u.standardImageFigureNormative,description:"Smart standard normative image figure bit, used to create smart standard normative image figures in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"fig","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardImageFigureNonNormative]:{since:"1.28.0",title:"Smart Standard Figure (Non Normative)",bitGroups:[d.static],baseBitType:u.standardImageFigureNonNormative,description:"Smart standard non-normative image figure bit, used to create smart standard non-normative image figures in articles or books"},[u.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardImageFigureNormative,description:"Collapsible smart standard normative image figure bit, used to create collapsible smart standard normative image figures in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardImageFigureNonNormative,description:"Collapsible smart standard non-normative image figure bit, used to create collapsible smart standard non-normative image figures in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.imageLandscape]:{since:"1.3.0",title:"Landscape Image",bitGroups:[d.static],baseBitType:u.image,description:"Image landscape bit, used to create landscape images in articles or books"},[u.imageMood]:{since:"1.3.0",title:"Mood Image",bitGroups:[d.static],baseBitType:u.image,description:"Image mood bit, used to create mood images in articles or books",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.imagePortrait]:{since:"1.3.0",title:"Portrait Image",bitGroups:[d.static],baseBitType:u.image,description:"Image portrait bit, used to create portrait images in articles or books"},[u.imagePrototype]:{since:"1.3.0",title:"Prototype Image",bitGroups:[d.static],baseBitType:u.image,description:"Image prototype bit, used to create prototype images in articles or books"},[u.imageSeparator]:{since:"1.4.15",title:"Separator Image",bitGroups:[d.static],baseBitType:u._standard,description:"Image separator bit, used to create separators in articles or books",tags:[{key:ye.group_imageNoZoom,description:"Image no zoom tags for images, used to define whether images should have zoom functionality"},{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}],resourceAttachmentAllowed:!1},[u.imageSeparatorAlt]:{since:"1.16.0",title:"Separator Alternative Image",bitGroups:[d.static],baseBitType:u.imageSeparator,description:"Alternative image separator bit, used to create alternative separators in articles or books",tags:[{key:ye.group_accessibilityDecorative,description:"Accessibility tags, defaulting to a decorative image"}]},[u.imageScreenshot]:{since:"1.3.0",title:"Screenshot",bitGroups:[d.static],baseBitType:u.image,description:"Image screenshot bit, used to create screenshots in articles or books"},[u.imageStyled]:{since:"1.3.0",title:"Styled Image",bitGroups:[d.static],baseBitType:u.image,description:"Image styled bit, used to create styled images in articles or books"},[u.imageSuperWide]:{since:"1.3.0",title:"Super Wide Image",bitGroups:[d.static],baseBitType:u.image,description:"Image super wide bit, used to create super wide images in articles or books"},[u.imageZoom]:{since:"1.3.0",title:"Image Zoom",bitGroups:[d.static],baseBitType:u.image,description:"Image zoom bit, used to create zoomable images in articles or books"},[u.langLifeSkillIcon]:{since:"1.3.0",title:"Language Life Skill Icon",bitGroups:[d.static],baseBitType:u.image,description:"Language life skill icon bit, used to create icons for life skills in articles or books"},[u.lifeSkillSticker]:{since:"1.3.0",title:"Life Skill Sticker",bitGroups:[d.static],baseBitType:u.image,description:"Life skill sticker bit, used to create stickers for life skills in articles or books"},[u.pageBanner]:{since:"1.4.3",title:"Page Banner",bitGroups:[d.static],baseBitType:u._standard,description:"Page banner bit, used to create banners for pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the page banner, used to identify the banner in the system",format:v},{key:ye.group_imageNoZoom,description:"Image no zoom tags for images, used to define whether images should have zoom functionality"}],resourceAttachmentAllowed:!1},[u.pageHero]:{since:"1.11.0",bitGroups:[d.static],baseBitType:u.pageBanner,description:"Page hero bit, used to create hero sections in articles or books"},[u.screenshot]:{since:"1.3.0",title:"Screenshot",bitGroups:[d.static],deprecated:"1.4.0",baseBitType:u.image,description:"Screenshot bit, used to create screenshots in articles or books"},[u.tableImage]:{since:"1.5.15",title:"Table Image",bitGroups:[d.static,d.tables],baseBitType:u.tableExtended,description:"Table image bit, used to create images in tables in articles or books",tags:[{key:ye.property_caption,description:"Caption for the table image, used to provide a description for the image",format:T,htmlKey:{"@el":"caption","@children":"$"}},{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.tableImageAlt]:{since:"1.16.0",title:"Table Image Alt",bitGroups:[d.static,d.tables],baseBitType:u.tableImage,description:"Alternative table image bit, used to create alternative images in tables in articles or books"},[u.standardTableImageNormative]:{since:"1.16.0",title:"Standard Table (Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard normative table image bit, used to create normative images in tables in articles or books"},[u.standardTableImageNonNormative]:{since:"1.16.0",title:"Standard Table (Non Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard non-normative table image bit, used to create non-normative images in tables in articles or books"},[u.standardRemarkTableImageNormative]:{since:"1.17.0",title:"Standard Remark on Table (Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard normative remark table image bit, used to create normative remark images in tables in articles or books"},[u.standardRemarkTableImageNonNormative]:{since:"1.17.0",title:"Standard Remark on Table (Non Normative)",bitGroups:[d.static],baseBitType:u.tableImage,description:"Standard non-normative remark table image bit, used to create non-normative remark images in tables in articles or books"},[u.standardTableExtendedImageNormative]:{since:"1.16.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard normative extended table image bit, used to create normative extended images in tables in articles or books"},[u.standardTableExtendedImageNonNormative]:{since:"1.16.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard non-normative extended table image bit, used to create non-normative extended images in tables in articles or books"},[u.standardRemarkTableExtendedImageNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard normative remark extended table image bit, used to create normative remark extended images in tables in articles or books"},[u.standardRemarkTableExtendedImageNonNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtendedImage,description:"Standard non-normative remark extended table image bit, used to create non-normative remark extended images in tables in articles or books"},[u.smartStandardTableImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableImageNormative,description:"Smart standard normative table image bit, used to create smart standard normative images in tables in articles or books"},[u.smartStandardTableImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableImageNonNormative,description:"Smart standard non-normative table image bit, used to create smart standard non-normative images in tables in articles or books"},[u.smartStandardRemarkTableImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableImageNormative,description:"Smart standard normative remark table image bit, used to create smart standard normative remark images in tables in articles or books"},[u.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableImageNonNormative,description:"Smart standard non-normative remark table image bit, used to create smart standard non-normative remark images in tables in articles or books"},[u.smartStandardTableExtendedImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedImageNormative,description:"Smart standard normative extended table image bit, used to create smart standard normative extended images in tables in articles or books"},[u.smartStandardTableExtendedImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedImageNonNormative,description:"Smart standard non-normative extended table image bit, used to create smart standard non-normative extended images in tables in articles or books"},[u.smartStandardRemarkTableExtendedImageNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedImageNormative,description:"Smart standard normative remark extended table image bit, used to create smart standard normative remark extended images in tables in articles or books"},[u.smartStandardRemarkTableExtendedImageNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedImageNonNormative,description:"Smart standard non-normative remark extended table image bit, used to create smart standard non-normative remark extended images in tables in articles or books"},[u.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableImageNormative,description:"Collapsible smart standard normative table image bit, used to create collapsible smart standard normative images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableImageNonNormative,description:"Collapsible smart standard non-normative table image bit, used to create collapsible smart standard non-normative images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableImageNormative,description:"Collapsible smart standard normative remark table image bit, used to create collapsible smart standard normative remark images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableImageNonNormative,description:"Collapsible smart standard non-normative remark table image bit, used to create collapsible smart standard non-normative remark images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedImageNormative,description:"Collapsible smart standard normative extended table image bit, used to create collapsible smart standard normative extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedImageNonNormative,description:"Collapsible smart standard non-normative extended table image bit, used to create collapsible smart standard non-normative extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedImageNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedImageNormative,description:"Collapsible smart standard normative remark extended table image bit, used to create collapsible smart standard normative remark extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedImageNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedImageNonNormative,description:"Collapsible smart standard non-normative remark extended table image bit, used to create collapsible smart standard non-normative remark extended images in tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.imageLink]:{since:"1.3.0",title:"Image Link",bitGroups:[d.static],baseBitType:u._standard,description:"Image link bit, used to create links with images in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for image links, used to define additional properties"},{key:ye.group_resourceImageLink,description:"Resource image link tags, used to attach images to the link",minCount:1}],resourceAttachmentAllowed:!1},[u.imageOnDevice]:{since:"1.3.0",title:"Image On Device",bitGroups:[d.static],baseBitType:u._standard,description:"Image on device bit, used to create images stored on the device in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for images on device, used to define additional properties"},{key:ye.group_resourceImage,description:"Resource image tags for images on device, used to attach images"},{key:ye.group_imageSource,description:"Image source tags for images on device, used to define the source of the image"}],resourceAttachmentAllowed:!1},[u.imageResponsive]:{since:"1.3.0",title:"Responsive Image",bitGroups:[d.static],baseBitType:u._standard,description:"Responsive image bit, used to create responsive images in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for responsive images, used to define additional properties"},{key:ye.group_resourceImageResponsive,description:"Resource image responsive tags, used to attach responsive images"}],resourceAttachmentAllowed:!1},[u.imagesLogoGrave]:{since:"1.5.11",title:"Logo Grave Image",bitGroups:[d.static],baseBitType:u._standard,description:"Logo grave images bit, used to create logo grave images in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for logo grave images, used to define additional properties"},{key:ye.group_resourceImageNoZoom,description:"Resource image tags for logo grave images, used to attach images",exportJsonKey:{logos:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:m}],resourceAttachmentAllowed:!1},[u.prototypeImages]:{since:"1.6.1",title:"Prototype Images",bitGroups:[d.static],baseBitType:u.imagesLogoGrave,description:"Prototype images bit, used to create prototype images in articles or books",tags:[{key:ye.group_resourceImageNoZoom,description:"Resource image tags for prototype images",exportJsonKey:{images:[{type:"image",image:{src:"$"}}]},minCount:1,maxCount:m}]},[u.internalLink]:{since:"1.3.0",title:"Internal Link",bitGroups:[d.static],baseBitType:u._standard,description:"Internal link bit, used to create links to other bits in articles or books",tags:[{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference tag for the internal link, used to link to the target bit"}]},[u.interview]:{since:"1.3.0",title:"Interview",bitGroups:[d.interview,d.quizzes],baseBitType:u._standard,description:"Interview bit, used to create interviews in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for interviews"},{key:ye.property_reasonableNumOfChars,exportJsonKey:{},description:"Reasonable number of characters for the interview, used to limit input size",format:_},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:K},[u.interviewInstructionGrouped]:{since:"1.3.0",title:"Interview Instruction Grouped",bitGroups:[d.interview,d.quizzes],baseBitType:u.interview,description:"Grouped interview instruction bit"},[u.botInterview]:{since:"1.3.0",title:"Bot Interview",bitGroups:[d.bots],baseBitType:u.interview,description:"Bot interview bit, used to create bot interviews in articles or books"},[u.brandColor]:{since:"4.12.0",title:"Color",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Brand color bit, used to define brand colors",tags:[{key:ye.property_brandColor,description:"The brand color",format:v},{key:ye.property_brandColorName,description:"The brand color name",format:v}]},[u.learningPathBook]:{since:"1.3.0",title:"Learning Path Book",bitGroups:[d.learningPath],baseBitType:u._standard,description:"Learning path book bit, used to create learning paths in articles or books",tags:[{key:ye.group_learningPathCommon,description:"Common tags for learning path books, used to define properties of learning paths"}]},[u.bookLink]:{since:"1.3.0",title:"Book Link",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Book link bit, used to create links to books in learning paths"},[u.bookLinkNext]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Next book link bit, used to create links to the next book in learning paths"},[u.bookLinkPrev]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Previous book link bit, used to create links to the previous book in learning paths"},[u.learningPathClassroomEvent]:{since:"1.3.0",title:"Learning Path Classroom Event",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path classroom event bit, used to create classroom events in learning paths"},[u.learningPathClassroomTraining]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path classroom training bit, used to create classroom training in learning paths"},[u.learningPathClosing]:{since:"1.3.0",title:"Learning Path Closing",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path closing bit, used to close learning paths"},[u.learningPathFeedback]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path feedback bit, used to provide feedback in learning paths"},[u.learningPathLearningGoal]:{since:"1.3.0",title:"Learning Path Learning Goal",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path learning goal bit, used to define learning goals in learning paths"},[u.learningPathLti]:{since:"1.3.0",title:"Learning Path Lti",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path LTI bit, used to integrate LTI tools in learning paths"},[u.learningPathSign]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path sign bit, used to create signs in learning paths"},[u.learningPathStep]:{since:"1.3.0",title:"Learning Path Step",bitGroups:[d.learningPath,d.steps],baseBitType:u.learningPathBook,description:"Learning path step bit, used to create steps in learning paths"},[u.learningPathBotTraining]:{since:"1.3.0",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path bot training bit, used to create bot training in learning paths",tags:[{key:ye.property_bot,description:"Bot reference for the training, used to link to a specific bot",format:v}]},[u.learningPathExternalLink]:{since:"1.3.0",title:"Learning Path External Link",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path external link bit, used to create external links in learning paths",tags:[{key:ye.property_externalLink,description:"External link for the learning path, used to link to external resources",format:v},{key:ye.property_externalLinkText,description:"Text for the external link, used to define the link text displayed",format:v}]},[u.learningPathVideoCall]:{since:"1.3.0",title:"Learning Path Video Call",bitGroups:[d.learningPath],baseBitType:u.learningPathBook,description:"Learning path video call bit, used to create video calls in learning paths",tags:[{key:ye.property_videoCallLink,description:"Video call link for the learning path, used to link to video calls",format:v}]},[u.leLearningObjectives]:{since:"1.25.0",title:"Learning Objectives",bitGroups:[d.static],baseBitType:u.learningPathLearningGoal,description:"Learning objectives bit, used to define learning objectives in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the learning objectives, used to categorize the activity",format:v}]},[u.leVideoCall]:{since:"1.25.0",title:"Video Call",bitGroups:[d.static],baseBitType:u.learningPathVideoCall,description:"Video call bit, used to create video calls in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the video call, used to categorize the activity",format:v}]},[u.leClassroomEvent]:{since:"1.25.0",title:"Classroom Event",bitGroups:[d.static],baseBitType:u.learningPathClassroomEvent,description:"Classroom event bit, used to create classroom events in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the classroom event, used to categorize the activity",format:v}]},[u.leMultiDayEvent]:{since:"3.32.0",title:"Multi-day Event",bitGroups:[d.static],baseBitType:u.leClassroomEvent,description:"Multi-day event bit, used to create multi-day events in learning paths"},[u.leCompletion]:{since:"1.25.0",title:"Completion",bitGroups:[d.static],baseBitType:u.learningPathClosing,description:"Completion bit, used to mark the completion of learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the completion, used to categorize the activity",format:v}]},[u.leExternalLink]:{since:"1.25.0",title:"External Link",bitGroups:[d.static],baseBitType:u.learningPathExternalLink,description:"External link bit, used to create external links in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the external link, used to categorize the activity",format:v}]},[u.leReadBook]:{since:"1.25.0",title:"Read Book",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Read book bit, used to create reading tasks in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the reading task, used to categorize the activity",format:v}]},[u.leLearningStep]:{since:"1.25.0",title:"Learning Step",bitGroups:[d.static],baseBitType:u.learningPathStep,description:"Learning step bit, used to create steps in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the learning step, used to categorize the activity",format:v}]},[u.lePreparationTask]:{since:"1.26.0",title:"Preparation Task",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Preparation task bit, used to create preparation tasks in learning paths",tags:[{key:ye.property_activityType,format:v,description:"Activity type for the preparation task, used to categorize the activity"}]},[u.leRead]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Read task bit, used to create reading tasks in learning paths"},[u.leTask]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Task bit, used to create tasks in learning paths"},[u.leTodo]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Todo bit, used to create todo tasks in learning paths"},[u.leFollowUpTask]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Follow-up task bit, used to create follow-up tasks in learning paths"},[u.leFinishingTask]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Finishing task bit, used to create finishing tasks in learning paths"},[u.leAssignment]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.lePreparationTask,description:"Assignment bit, used to create assignments in learning paths"},[u.leWatchVideoEmbed]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Watch video embed bit, used to embed videos in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the video embed, used to categorize the activity",format:v},{key:ye.group_resourceBitTags,description:"Resource bit tags for video embeds, used to define additional properties"},{key:ye.group_resourceVideoEmbed,description:"Resource video embed tags, used to attach video embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.leListenAudioEmbed]:{since:"1.27.0",bitGroups:[d.static],baseBitType:u.learningPathBook,description:"Listen audio embed bit, used to embed audio in learning paths",tags:[{key:ye.property_activityType,description:"Activity type for the audio embed, used to categorize the activity",format:v},{key:ye.group_resourceBitTags,description:"Resource bit tags for audio embeds, used to define additional properties"},{key:ye.group_resourceAudioEmbed,description:"Resource audio embed tags, used to attach audio embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.listItem]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u._standardLight,description:"List item bit, used to create list items in articles or books",tags:[{key:ye.property_listItemIndent,description:"Indentation level for the list item, used to define the hierarchy of the list",format:_,defaultValue:"0"}]},[u.standardListItem]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.listItem,description:"Standard list item bit, used to create standard list items in articles or books"},[u.smartStandardListItem]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardListItem,description:"Smart standard list item bit, used to create smart standard list items in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"ref","@attr":{id:"$customerId"},"@children":"$","▼":"$anchor"}}},[u.smartStandardListItemCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardListItem,description:"Collapsible smart standard list item bit, used to create collapsible smart standard list items in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.mark]:{since:"1.3.0",title:"Mark",bitGroups:[d.mark,d.quizzes],baseBitType:u._standard,description:"Mark bit, used to create marks in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for marks"},{key:ye.group_markConfig,description:"Configuration tags for marks, used to define properties of marks"},{key:ye.group_mark,description:"Mark tags, used to define the content of marks"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.match]:{since:"1.3.0",title:"Match",bitGroups:[d.match,d.quizzes],baseBitType:u._standard,description:"Match bit, used to create matching pairs in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for matching pairs"},{key:ye.property_isCaseSensitive,exportJsonKey:{},description:"Case sensitivity for matching pairs, used to define if matches are case-sensitive",format:C,defaultValue:"true"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:$},[u.matchAll]:{since:"1.3.0",title:"Match All",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match all bit, used to create matching pairs with all options in articles or books"},[u.matchReverse]:{since:"1.3.0",title:"Match Reverse",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match reverse bit, used to create matching pairs with reversed options in articles or books"},[u.matchAllReverse]:{since:"1.3.0",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match all reverse bit, used to create matching pairs with all options and reversed in articles or books"},[u.matchSolutionGrouped]:{since:"1.3.0",title:"Match Solution Grouped",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Grouped match solution bit, used to create grouped matching solutions in articles or books"},[u.matchMatrix]:{since:"1.3.0",title:"Match Matrix",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match matrix bit, used to create matching pairs in a matrix format in articles or books",cardSet:D},[u.matchAudio]:{since:"1.3.0",title:"Match Audio",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match audio bit, used to create matching pairs with audio in articles or books",cardSet:O},[u.matchPicture]:{since:"1.3.0",title:"Match Picture",bitGroups:[d.match,d.quizzes],baseBitType:u.match,description:"Match picture bit, used to create matching pairs with pictures in articles or books",cardSet:J},[u.feedback]:{since:"3.13.0",title:"Feedback",bitGroups:[d.static],baseBitType:u._standard,description:"Feedback bit, used to provide feedback in articles or books",tags:[{key:ye.property_reasonableNumOfChars,exportJsonKey:{},description:"Reasonable number of characters for feedback, used to limit input size",format:_}],cardSet:F},[u.learningDocumentationFeedback]:{since:"3.13.0",bitGroups:[d.static],baseBitType:u.feedback,description:"Feedback for learning documentation"},[u.handInFeedbackExpert]:{since:"3.30.0",title:"Expert Feedback",bitGroups:[d.static],baseBitType:u.feedback,description:"Feedback for expert hand-in"},[u.handInFeedbackSelf]:{since:"3.30.0",title:"Hand-In Feedback (Self)",bitGroups:[d.static],baseBitType:u.feedback,description:"Self-feedback for hand-in"},[u.multipleChoice1]:{since:"1.3.0",title:"Multiple Choice 1",bitGroups:[d.multipleChoice,d.quizzes],baseBitType:u._standard,description:"Multiple choice 1 bit, used to create single-choice questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple choice 1 questions"},{key:ye.group_trueFalse,description:"True/False tags for multiple choice 1 questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",title:"Coach Self Reflection Multiple Choice 1",bitGroups:[d.quizzes],baseBitType:u.multipleChoice1,description:"Coach self-reflection multiple choice 1 bit, used for self-reflection in coaching"},[u.multipleChoice]:{since:"1.3.0",title:"Multiple Choice",bitGroups:[d.multipleChoice,d.quizzes],baseBitType:u._standard,description:"Multiple choice bit, used to create multiple-choice questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple choice questions"},{key:ye.group_trueFalse,description:"True/False tags for multiple choice questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:R},[u.coachSelfReflectionMultipleChoice]:{since:"1.3.0",title:"Coach Self Reflection Multiple Choice",bitGroups:[d.quizzes],baseBitType:u.multipleChoice,description:"Coach self-reflection multiple choice bit, used for self-reflection in coaching"},[u.multipleChoiceText]:{since:"1.3.0",title:"Multiple Choice Text",bitGroups:[d.multipleChoice,d.quizzes],baseBitType:u._standard,description:"Multiple choice text bit, used to create multiple-choice questions with text in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple choice text questions"},{key:ye.group_trueFalseInlineSelect,description:"True/False tags for multiple choice text questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachCallToActionMultipleChoiceText]:{since:"1.3.0",title:"Coach Call To Action Multiple Choice Text",bitGroups:[d.quizzes],baseBitType:u.multipleChoiceText,description:"Coach call to action multiple choice text bit, used for self-reflection in coaching"},[u.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",title:"Coach Self Reflection Multiple Choice Text",bitGroups:[d.quizzes],baseBitType:u.multipleChoiceText,description:"Coach self-reflection multiple choice text bit, used for self-reflection in coaching"},[u.multipleResponse1]:{since:"1.3.0",title:"Multiple Response 1",bitGroups:[d.multipleResponse,d.quizzes],baseBitType:u._standard,description:"Multiple response 1 bit, used to create multiple-response questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple response 1 questions"},{key:ye.group_trueFalseResponses,description:"True/False tags for multiple response 1 questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}]},[u.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",title:"Coach Self Reflection Multiple Response 1",bitGroups:[d.quizzes],baseBitType:u.multipleResponse1,description:"Coach self-reflection multiple response 1 bit, used for self-reflection in coaching"},[u.multipleResponse]:{since:"1.3.0",title:"Multiple Response",bitGroups:[d.multipleResponse,d.quizzes],baseBitType:u._standard,description:"Multiple response bit, used to create multiple-response questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for multiple response questions"},{key:ye.group_trueFalseResponses,description:"True/False tags for multiple response questions"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:G},[u.coachSelfReflectionMultipleResponse]:{since:"1.3.0",title:"Coach Self Reflection Multiple Response",bitGroups:[d.quizzes],baseBitType:u.multipleResponse,description:"Coach self-reflection multiple response bit, used for self-reflection in coaching"},[u.p]:{since:"5.40.0",title:"Paragraph",bitGroups:[d.static],baseBitType:u._standardLight,description:"Lightweight paragraph bit with a minimal tag set"},[u.pAlt]:{since:"5.40.0",title:"Paragraph Alt",bitGroups:[d.static],baseBitType:u.p,description:"Lightweight paragraph bit (alternative), based on p"},[u.page]:{since:"1.3.0",title:"Page",bitGroups:[d.pages,d.static],baseBitType:u._standard,description:"Page bit, used to create pages in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"Title of the page, used to display the page title"},{key:ye.property_thumbImage,description:"Thumbnail image for the page, used to display a small image representation",format:v}]},[u.pageCollapsible]:{since:"1.30.0",deprecated:"5.37.0",baseBitType:u.page,description:"Collapsible page bit, used to create collapsible sections in pages",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.pageCoverImage]:{since:"1.22.0",bitGroups:[d.static],baseBitType:u.page,description:"Page cover image bit, used to create cover images for pages"},[u.advertisingAdvertorialPage]:{since:"4.5.0",title:"Advertorial",bitGroups:[d.static],baseBitType:u.page,description:"Advertorial Page bit, used to create advertorial pages"},[u.pageBuyButton]:{since:"1.4.3",title:"Page Buy Button",bitGroups:[d.static],baseBitType:u._standard,description:"Page buy button bit, used to create buy buttons on pages",tags:[{key:ye.property_slug,description:"Slug for the page, used to identify the page in URLs",format:v},{key:ye.property_content2Buy,description:"Content to buy for the page, used to define what is being sold",format:v},{key:ye.property_buttonCaption,description:"Caption for the buy button, used to define the text displayed on the button",format:v}]},[u.pageBuyButtonAlt]:{since:"1.31.0",title:"Page Buy Button Alternative",bitGroups:[d.static],baseBitType:u.pageBuyButton,description:"Alternative page buy button bit, used to create alternative buy buttons on pages"},[u.pageBuyButtonPromotion]:{since:"1.5.11",title:"Page Buy Button Promotion",bitGroups:[d.static],baseBitType:u.pageBuyButton,description:"Page buy button for promotions, used to create buy buttons on promotional pages"},[u.pageSubpage]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u._standard,description:"Page subpage bit, used to create subpages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the subpage, used to identify the subpage in URLs",format:v},{key:ye.property_page,description:"Page reference for the subpage, used to link to the parent page",format:v}]},[u.pageShopInShop]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page shop-in-shop bit, used to create shop-in-shop pages in articles or books"},[u.pageCategory]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page category bit, used to create category pages in articles or books"},[u.pageAcademy]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page academy bit, used to create academy pages in articles or books"},[u.pagePromotion]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page promotion bit, used to create promotional pages in articles or books"},[u.pageSpecial]:{since:"1.6.6",bitGroups:[d.static],baseBitType:u.pageSubpage,description:"Page special bit, used to create special pages in articles or books"},[u.pageEnd]:{since:"5.33.0",bitGroups:[d.pages,d.static],baseBitType:u.article,description:"Page end bit, used to mark the end of a page section in articles or books"},[u.pageStart]:{since:"5.33.0",bitGroups:[d.pages,d.static],baseBitType:u.article,description:"Page start bit, used to mark the start of a page section in articles or books"},[u.pagePerson]:{since:"1.5.16",bitGroups:[d.static],baseBitType:u._standard,description:"Page person bit, used to create person pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the person page, used to identify the person in URLs",format:v},{key:ye.group_person,description:"Person tags, used to define properties of the person"},{key:ye.property_buttonCaption,description:"Caption for the button on the person page, used to define the text displayed",format:v}]},[u.pageProduct]:{since:"1.4.17",title:"Page Product",bitGroups:[d.static],baseBitType:u._standard,description:"Page product bit, used to create product pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product page, used to identify the product in URLs",format:v},{key:ye.property_product,description:"Product reference for the product page, used to link to the product",format:v,nullable:!0}]},[u.pageProductList]:{since:"1.4.17",title:"Page Product List",bitGroups:[d.static],baseBitType:u._standard,description:"Page product list bit, used to create product lists in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product list page, used to identify the product list in URLs",format:v},{key:ye.property_product,description:"Product reference for the product list, used to link to the product",format:v,nullable:!0,maxCount:m}]},[u.pageProductVideo]:{since:"1.4.17",title:"Page Product Video",bitGroups:[d.static],baseBitType:u._standard,description:"Page product video bit, used to create product video pages in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product video page, used to identify the product video in URLs",format:v},{key:ye.property_productVideo,description:"Product video reference for the product video page, used to link to the video",format:v}]},[u.pageProductVideoList]:{since:"1.4.17",title:"Page Product Video List",bitGroups:[d.static],baseBitType:u._standard,description:"Page product video list bit, used to create product video lists in articles or books",tags:[{key:ye.property_slug,description:"Slug for the product video list page, used to identify the product video list in URLs",format:v},{key:ye.property_productVideo,description:"Product video reference for the product video list, used to link to the video",format:v,maxCount:m}]},[u.pageSectionFolder]:{since:"1.4.17",title:"Page Section Folder",bitGroups:[d.static],baseBitType:u._standard,description:"Page section folder bit, used to create section folders in articles or books",tags:[{key:ye.property_slug,description:"Slug for the section folder page, used to identify the section in URLs",format:v},{key:ye.property_productFolder,description:"Product folder reference for the section folder page, used to link to the folder",format:v}]},[u.photo]:{since:"1.3.0",title:"Photo",bitGroups:[d.static],baseBitType:u.image,description:"Photo bit, used to create photo bits in articles or books"},[u.platform]:{since:"4.12.0",title:"Platform Information",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform bit, used to define platform properties",tags:[{key:ye.property_platformName,description:"The platform name",format:v},{key:ye.resource_platformIcon,jsonKey:"platformIcon|resource(type=image, key=image)",exportJsonKey:{platformIcon:{type:"image",image:{src:"$"}}},description:"The platform icon",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the platform icon resource"}],maxCount:1},{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformBrandTarget]:{since:"4.15.0",title:"Target Mode",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform brand target bit, used to define the brand target for publishing",tags:[{key:ye.property_platformBrandTarget,description:'The platform brand target (typically "light", "dark" or "none")',format:v,defaultValue:"none"}]},[u.platformHeader]:{since:"4.12.0",title:"Header Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform header bit, used to define platform header properties",tags:[{key:ye.resource_platformLogo,jsonKey:"platformLogo|resource(type=image, key=image)",exportJsonKey:{platformLogo:{type:"image",image:{src:"$"}}},description:"The platform logo",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the platform logo resource"}],maxCount:1},{key:ye.property_platformLogoMaxHeight,description:"Maximum height for the platform logo",format:_,defaultValue:"40"},{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformMain]:{since:"4.12.0",title:"Main Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform main bit, used to define platform main properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformMainButton]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform main button bit, used to define platform main button properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformMainInput]:{since:"4.12.0",title:"Main Input Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform main input bit, used to define platform main input properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSection]:{since:"4.12.0",title:"Sections Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform section bit, used to define platform section properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSectionButton]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform section button bit, used to define platform section button properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSectionChat]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform section chat bit, used to define platform section chat properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"},{key:ye.resource_platformBackgroundImage,jsonKey:"platformBackgroundImage|resource(type=image, key=image)",exportJsonKey:{platformBackgroundImage:{type:"image",image:{src:"$"}}},description:"The platform section chat background image",chain:[{key:ye.group_resourceImageCommon,description:"Common image properties for the platform background image resource"}]}]},[u.platformSectionHeader]:{since:"4.12.0",bitGroups:[d.static],baseBitType:u._standard,description:"Platform section header bit, used to define platform section header properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSectionInput]:{since:"4.12.0",title:"Section Input Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform section input bit, used to define platform section input properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.platformSystemIcon]:{since:"4.12.0",title:"System Icon Styling",bitGroups:[d.static,d.whiteLabel],baseBitType:u._standard,description:"Platform system icon bit, used to define platform system icon properties",tags:[{key:ye.group_platformStylesCommon,description:"Common platform styles"}]},[u.quote]:{since:"1.3.0",title:"Quote",bitGroups:[d.static],baseBitType:u._standard,description:"Quote bit, used to create quotes in articles or books",tags:[{key:ye.property_quotedPerson,description:"Quoted person for the quote, used to define who is being quoted",format:v}]},[u.rating]:{since:"1.3.0",title:"Rating",bitGroups:[d.rating,d.surveys],baseBitType:u._standard,description:"Rating bit, used to create rating bits in articles or books"},[u.coachSelfReflectionRating]:{since:"1.3.0",title:"Coach Self Reflection Rating",bitGroups:[d.rating,d.surveys],baseBitType:u.rating,description:"Coach self-reflection rating bit, used for self-reflection in coaching"},[u.releaseNote]:{since:"1.3.0",title:"Release Note",bitGroups:[d.static],baseBitType:u._standard,description:"Release note bit, used to create release notes in articles or books",tags:[{key:ye.property_releaseVersion,description:"Release version for the release note, used to define the version of the release",format:v},{key:ye.property_releaseKind,description:"Release kind for the release note, used to define the type of release",format:v},{key:ye.property_releaseDate,description:"Release date for the release note, used to define when the release was made",format:v}]},[u.reviewNote]:{since:"1.3.0",title:"Review Note",bitGroups:[d.reviews,d.static],baseBitType:u._standard,description:"Review note bit, used to create review notes in articles or books",tags:[{maxCount:2,jsonKey:"title|multi(count=2, key=subtitle)",exportJsonKey:[{"@level=1":{title:"$"}},{"@level=2":{subtitle:"$"}}],key:ye.tag_title,description:"Title of the review note, used to display the note title"},{key:ye.property_resolved,description:"Resolved status for the review note, used to indicate if the note is resolved",format:C,defaultValue:"false"},{key:ye.property_resolvedDate,description:"Resolved date for the review note, used to define when the note was resolved",format:v},{key:ye.property_resolvedBy,description:"Resolved by for the review note, used to define who resolved the note",format:v},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:"true"}},{"@absent":{isExample:!0,example:"true"}},{isExample:!0,example:"$"}],description:"The example text for the review note bit",format:v,nullable:!0}],rootExampleType:h},[u.reviewAuthorNote]:{since:"1.3.0",title:"Review Author Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Author review note bit, used to create author notes in reviews"},[u.reviewCustomerNote]:{since:"3.5.0",title:"Review Customer Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Customer review note bit, used to create customer notes in reviews"},[u.reviewError]:{since:"5.8.0",bitGroups:[d.reviewErrors,d.reviews,d.static],baseBitType:u.reviewNote,description:"Review error note bit, used to create error notes in reviews"},[u.reviewErrorAi]:{since:"5.8.0",bitGroups:[d.reviewErrors,d.reviews,d.static],baseBitType:u.reviewNote,description:"Review error AI note bit, used to create AI error notes in reviews"},[u.reviewErrorTranslation]:{since:"5.8.0",bitGroups:[d.reviewErrors,d.reviews,d.static],baseBitType:u.reviewNote,description:"Review error translation note bit, used to create translation error notes in reviews"},[u.reviewReviewerNote]:{since:"1.3.0",title:"Review Reviewer Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Reviewer review note bit, used to create reviewer notes in reviews"},[u.reviewRequestForReviewNote]:{since:"1.3.0",title:"Review Request For Review Note",bitGroups:[d.reviewErrors,d.reviews],baseBitType:u.reviewNote,description:"Request for review note bit, used to create notes requesting reviews"},[u.reviewApprovedNote]:{since:"1.3.0",title:"Review Approved Note",bitGroups:[d.reviews,d.static],baseBitType:u.reviewNote,description:"Approved review note bit, used to create notes for approved reviews"},[u.sampleSolution]:{since:"1.3.0",title:"Sample Solution",bitGroups:[d.static],baseBitType:u._standard,description:"Sample solution bit, used to create sample solutions in articles or books",tags:[{exportJsonKey:{anchor:"$"},key:ye.tag_anchor,format:v,description:"Anchor for the sample solution, used to link to the solution"},{exportJsonKey:{reference:"$"},key:ye.tag_reference,format:v,description:"Reference for the sample solution, used to link to the source of the solution"}]},[u.sequence]:{since:"1.3.0",title:"Sequence",bitGroups:[d.quizzes,d.sequence],baseBitType:u._standard,description:"Sequence bit, used to create sequences in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for sequences"},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{"@absent":{isExample:!0,example:!0}},{isExample:!0,example:"$"}],description:"The example flag for the bit (boolean)",format:C,nullable:!0}],cardSet:N,rootExampleType:b},[u.stillImageFilm]:{since:"1.3.0",title:"Still image film",bitGroups:[d.static],baseBitType:u._standard,description:"Still image film bit, used to create still image films in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:ye.group_resourceStillImageFilm,description:"Resource still image film tags, used to attach still image films to the bit"}],resourceAttachmentAllowed:!1},[u.stillImageFilmEmbed]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Still image film embed bit, used to embed still image films in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:ye.group_resourceStillImageFilmEmbed,description:"Resource still image film embed tags, used to attach still image films to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.stillImageFilmLink]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Still image film link bit, used to create still image film links in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for still image films, used to define additional properties"},{key:ye.group_resourceStillImageFilmLink,description:"Resource still image film link tags, used to attach still image films to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.surveyAnonymous]:{since:"1.3.0",title:"Survey Anonymous",bitGroups:[d.surveyAnonymous,d.surveys],baseBitType:u._standard,description:"Anonymous survey bit, used to create anonymous surveys in articles or books"},[u.survey]:{since:"1.3.0",title:"Survey",bitGroups:[d.survey,d.surveys],baseBitType:u._standard,description:"Survey bit, used to create surveys in articles or books"},[u.surveyMatrix]:{since:"1.6.2",title:"Survey Matrix",bitGroups:[d.survey,d.surveys],baseBitType:u.image,description:"Survey matrix bit, used to create survey matrices in articles or books",tags:[{key:ye.property_pointerTop,description:"Pointer for the top of the survey matrix, used to define the top label",format:v,minCount:1,maxCount:1},{key:ye.property_pointerLeft,description:"Pointer for the left of the survey matrix, used to define the left label",format:v,minCount:1,maxCount:1},{key:ye.property_buttonCaption,description:"Caption for the button in the survey matrix, used to define the button text",format:v,minCount:1,maxCount:1}]},[u.surveyMatrixMe]:{since:"1.6.2",title:"Survey Matrix Me",bitGroups:[d.survey,d.surveys],baseBitType:u.surveyMatrix,description:"Survey matrix me bit, used to create personal survey matrices in articles or books"},[u.surveyRating]:{since:"1.6.0",title:"Survey Rating",bitGroups:[d.survey,d.surveys],baseBitType:u._standard,description:"Survey rating bit, used to create rating surveys in articles or books",tags:[{key:ye.property_ratingLevelStart,jsonKey:"ratingLevelStart.level",exportJsonKey:{ratingLevelStart:{level:"$"}},description:"Start level for the rating survey, used to define the lowest rating",format:_,chain:[{key:ye.property_label,description:"Label for the start level of the rating survey, used to define the text displayed",format:T}]},{key:ye.property_ratingLevelEnd,jsonKey:"ratingLevelEnd.level",exportJsonKey:{ratingLevelEnd:{level:"$"}},description:"End level for the rating survey, used to define the highest rating",format:_,chain:[{key:ye.property_label,description:"Label for the end level of the rating survey, used to define the text displayed",format:T}]},{key:ye.property_ratingLevelSelected,description:"Selected level for the rating survey, used to define the default rating",format:_,nullable:!0},{key:ye.property_buttonCaption,description:"Caption for the button in the rating survey, used to define the button text",format:v}]},[u.surveyRatingOnce]:{since:"1.6.0",title:"Survey Rating Once",bitGroups:[d.survey,d.surveys],baseBitType:u.surveyRating,description:"Survey rating once bit, used to create one-time rating surveys in articles or books"},[u.surveyRatingDisplay]:{since:"1.6.0",title:"Survey Rating Display",bitGroups:[d.survey,d.surveys],baseBitType:u.surveyRating,description:"Survey rating display bit, used to display rating surveys in articles or books"},[u.scorm]:{since:"1.5.11",title:"Scorm",bitGroups:[d.static],baseBitType:u._standard,description:"SCORM bit, used to embed SCORM content in articles or books",tags:[{key:ye.property_scormSource,description:"Source for the SCORM content, used to define the SCORM package URL",format:v},{key:ye.property_posterImage,description:"Poster image for the SCORM content, used to display a preview image",format:v}]},[u.pronunciationTable]:{since:"3.1.0",title:"Pronunciation Table",bitGroups:[d.static],baseBitType:u._standard,description:"Pronunciation table bit, used to create pronunciation tables in articles or books",cardSet:q},[u.table]:{since:"1.5.19",title:"Table",bitGroups:[d.static,d.tables],baseBitType:u._standard,description:"Table bit, used to create tables in articles or books",tags:[{key:ye.property_caption,description:"Caption for the table, used to define the title of the table",format:T,htmlKey:{"@el":"caption","@children":"$"},mappingKeys:{"xml-niso-iec":{"@el":"caption","@children":{"@el":"title","@text":"$"}}}},{key:ye.property_tableFixedHeader,description:"Fixed header for the table, used to keep the header visible while scrolling",format:C,defaultValue:"false"},{key:ye.property_tableHeaderWhitespaceNoWrap,description:"No wrap for table header whitespace, used to prevent header text wrapping",format:C,defaultValue:"false"},{key:ye.property_tableSearch,description:"Search functionality for the table, used to enable searching within the table",format:C,defaultValue:"false"},{key:ye.property_tableSort,description:"Sorting functionality for the table, used to enable sorting of table columns",format:C,defaultValue:"false"},{key:ye.property_tablePagination,description:"Pagination for the table, used to limit the number of rows displayed at once",format:C,defaultValue:"false"},{key:ye.property_tablePaginationLimit,description:"Pagination limit for the table, used to define the number of rows per page",format:_,defaultValue:"0"},{key:ye.property_tableHeight,description:"Height for the table, used to define the height of the table in pixels",format:_,defaultValue:"0"},{key:ye.property_tableWhitespaceNoWrap,description:"No wrap for table whitespace, used to prevent text wrapping in table cells",format:C,defaultValue:"false"},{key:ye.property_tableAutoWidth,description:"Auto width for table columns, used to automatically adjust column widths",format:C,defaultValue:"true"},{key:ye.property_tableResizableColumns,description:"Resizable columns for the table, used to allow users to resize table columns",format:C,defaultValue:"false"},{key:ye.property_tableColumnMinWidth,description:"Minimum width for table columns, used to define the minimum width of columns",format:_,defaultValue:"0"}],cardSet:z},[u.tableExtended]:{since:"4.14.0",title:"Table",bitGroups:[d.tables],baseBitType:u.table,description:"Extended table bit, used to create complex tables with all HTML table features",cardSet:j},[u.tableExtendedImage]:{since:"5.13.0",bitGroups:[d.static,d.tables],baseBitType:u.tableExtended,description:"Extended table image bit, used to create complex tables with images and all HTML table features",tags:[{key:ye.property_caption,description:"Caption for the table image, used to provide a description for the image",format:T,htmlKey:{"@el":"caption","@children":"$"}},{key:ye.group_backgroundWallpaper,description:"Background wallpaper tags for images, used to define background properties for images"},{key:ye.group_resourceBitTags,description:"Resource bit tags for images, used to define additional properties for images"},{key:ye.group_resourceImage,description:"Resource image tags for images, used to attach images to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.tableAlt]:{since:"1.16.0",title:"Table Alternative",bitGroups:[d.static,d.tables],baseBitType:u.table,description:"Alternative table bit, used to create alternative tables in articles or books"},[u.standardTableNormative]:{since:"1.16.0",title:"Standard Table (Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard normative table bit, used to create standard normative tables in articles or books"},[u.standardTableNonNormative]:{since:"1.16.0",title:"Standard Table (Non Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard non-normative table bit, used to create standard non-normative tables in articles or books"},[u.standardRemarkTableNormative]:{since:"1.17.0",title:"Standard Remark on Table (Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard normative remark table bit, used to create standard normative remark tables in articles or books"},[u.standardRemarkTableNonNormative]:{since:"1.17.0",title:"Standard Remark on Table (Non Normative)",bitGroups:[d.static],baseBitType:u.table,description:"Standard non-normative remark table bit, used to create standard non-normative remark tables in articles or books"},[u.standardTableExtendedNormative]:{since:"1.16.0",title:"Standard, Extended, Normative",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard normative extended table bit, used to create standard normative extended tables in articles or books"},[u.standardTableExtendedNonNormative]:{since:"1.16.0",title:"Standard Table (Extended Non-Normative)",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard non-normative extended table bit, used to create standard non-normative extended tables in articles or books"},[u.standardRemarkTableExtendedNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard normative remark extended table bit, used to create standard normative remark extended tables in articles or books"},[u.standardRemarkTableExtendedNonNormative]:{since:"1.17.0",bitGroups:[d.static],baseBitType:u.tableExtended,description:"Standard non-normative remark extended table bit, used to create standard non-normative remark extended tables in articles or books"},[u.smartStandardTableNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableNormative,description:"Smart standard normative table bit, used to create smart standard normative tables in articles or books"},[u.smartStandardTableNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableNonNormative,description:"Smart standard non-normative table bit, used to create smart standard non-normative tables in articles or books"},[u.smartStandardRemarkTableNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableNormative,description:"Smart standard normative remark table bit, used to create smart standard normative remark tables in articles or books"},[u.smartStandardRemarkTableNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableNonNormative,description:"Smart standard non-normative remark table bit, used to create smart standard non-normative remark tables in articles or books"},[u.smartStandardTableExtendedNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedNormative,description:"Smart standard normative extended table bit, used to create smart standard normative extended tables in articles or books",mappingKeys:{"xml-niso-iec":{"@el":"table-wrap","@attr":{id:"$customerId"},"▼":"$anchor"}}},[u.smartStandardTableExtendedNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardTableExtendedNonNormative,description:"Smart standard non-normative extended table bit, used to create smart standard non-normative extended tables in articles or books"},[u.smartStandardRemarkTableExtendedNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedNormative,description:"Smart standard normative remark extended table bit, used to create smart standard normative remark extended tables in articles or books"},[u.smartStandardRemarkTableExtendedNonNormative]:{since:"1.28.0",bitGroups:[d.static],baseBitType:u.standardRemarkTableExtendedNonNormative,description:"Smart standard non-normative remark extended table bit, used to create smart standard non-normative remark extended tables in articles or books"},[u.smartStandardTableNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableNormative,description:"Collapsible smart standard normative table bit, used to create collapsible smart standard normative tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableNonNormative,description:"Collapsible smart standard non-normative table bit, used to create collapsible smart standard non-normative tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableNormative,description:"Collapsible smart standard normative remark table bit, used to create collapsible smart standard normative remark tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableNonNormative,description:"Collapsible smart standard non-normative remark table bit, used to create collapsible smart standard non-normative remark tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedNormative,description:"Collapsible smart standard normative extended table bit, used to create collapsible smart standard normative extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardTableExtendedNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardTableExtendedNonNormative,description:"Collapsible smart standard non-normative extended table bit, used to create collapsible smart standard non-normative extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedNormative,description:"Collapsible smart standard normative remark extended table bit, used to create collapsible smart standard normative remark extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.smartStandardRemarkTableExtendedNonNormativeCollapsible]:{since:"1.28.0",deprecated:"5.37.0",baseBitType:u.smartStandardRemarkTableExtendedNonNormative,description:"Collapsible smart standard non-normative remark extended table bit, used to create collapsible smart standard non-normative remark extended tables in articles or books",tags:[{key:ye.property_isCollapsible,description:"If true, the bit is collapsible (defaults true for this deprecated bit type)",format:C,defaultValue:"true"}]},[u.parameters]:{since:"1.18.0",bitGroups:[d.static],baseBitType:u.table,description:"Parameters bit, used to create parameter tables in articles or books"},[u.toc]:{since:"1.3.0",title:"Toc",bitGroups:[d.static],baseBitType:u._standard,description:"Table of contents bit, used to create a table of contents in articles or books"},[u.tocChapter]:{since:"1.5.5",bitGroups:[d.static],baseBitType:u.toc,description:"Table of contents chapter bit, used to create chapters in the table of contents",tags:[{key:ye.property_maxDisplayLevel,description:"Maximum display level for the chapter in the table of contents",format:_,nullable:!0}]},[u.tocInline]:{since:"3.24.0",bitGroups:[d.static],baseBitType:u.toc,description:"Inline table of contents bit, used to create inline tables of contents in articles or books",tags:[{key:ye.property_maxTocChapterLevel,description:"Maximum chapter level for the inline table of contents",format:_,nullable:!0}]},[u.tocResource]:{since:"3.31.0",bitGroups:[d.static],baseBitType:u.toc,description:"Table of contents resource bit, used to create resources in the table of contents",tags:[{key:ye.property_tocResource,description:"Resource content for the table of contents, used to define the resource",format:v,maxCount:m},{key:ye.property_buttonCaption,description:"Caption for the button in the table of contents resource, used to define the text displayed on the button",format:v}]},[u.tocContent]:{since:"3.31.0",bitGroups:[d.static],baseBitType:u.toc,description:"Table of contents content bit, used to create content sections in the table of contents",tags:[{key:ye.property_tocContent,description:"Content for the table of contents, used to define the content section",format:v,maxCount:m},{key:ye.property_buttonCaption,description:"Caption for the button in the table of contents content, used to define the text displayed on the button",format:v}]},[u.anchor]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Anchor bit, used to create anchors in articles or books"},[u.bitBookEnding]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Bit book ending bit, used to create endings in articles or books"},[u.bitBookSummary]:{since:"1.3.0",title:"Book Summary",bitGroups:[d.static],baseBitType:u._standard,description:"Bit book summary bit, used to create summaries in articles or books"},[u.botActionAnnounce]:{since:"1.3.0",bitGroups:[d.botAction],baseBitType:u._standard,description:"Bot action announce bit, used to create announcements in articles or books"},[u.botActionRatingNumber]:{since:"1.3.0",title:"Bot Rating Number",bitGroups:[d.bots],baseBitType:u._standard,description:"Bot action rating number bit, used to create rating number actions in articles or books"},[u.botActionRemind]:{since:"1.3.0",bitGroups:[d.botAction],baseBitType:u._standard,description:"Bot action remind bit, used to create reminders in articles or books"},[u.botActionSave]:{since:"1.3.0",bitGroups:[d.botAction],baseBitType:u._standard,description:"Bot action save bit, used to create save actions in articles or books"},[u.botActionTrueFalse]:{since:"1.3.0",title:"Bot Action True False",bitGroups:[d.botAction,d.bots],baseBitType:u._standard,description:"Bot action true/false bit, used to create true/false actions in articles or books"},[u.chapterSubjectMatter]:{since:"1.3.0",title:"Chapter Subject Matter",bitGroups:[d.static],baseBitType:u._standard,description:"Chapter subject matter bit, used to create subject matter chapters in articles or books"},[u.chat]:{since:"1.3.0",title:"Chat",bitGroups:[d.chat,d.static],baseBitType:u._standard,description:"Chat bit, used to create chat sections in articles or books"},[u.conclusion]:{since:"1.3.0",title:"Conclusion",bitGroups:[d.static],baseBitType:u._standard,description:"Conclusion bit, used to create conclusions in articles or books"},[u.conclusionAlt]:{since:"1.16.0",title:"Conclusion Altenrative",bitGroups:[d.static],baseBitType:u.conclusion,description:"Alternative conclusion bit, used to create alternative conclusions in articles or books"},[u.documentUpload]:{since:"1.3.0",title:"Document Upload",bitGroups:[d.documentUpload,d.quizzes],baseBitType:u._standard,description:"Document upload bit, used to create document upload sections in articles or books"},[u.footNote]:{since:"1.3.0",title:"Foot Note",bitGroups:[d.static],baseBitType:u._standard,description:"Footnote bit, used to create footnotes in articles or books"},[u.formFreeText]:{since:"5.3.0",bitGroups:[d.interview,d.quizzes],baseBitType:u.interview,description:"Form free text bit, used to create free text forms in articles or books"},[u.groupBorn]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Group born bit, used to create group born sections in articles or books"},[u.groupDied]:{since:"1.3.0",bitGroups:[d.static],baseBitType:u._standard,description:"Group died bit, used to create group died sections in articles or books"},[u.recordAudio]:{since:"1.3.0",title:"Record Audio",bitGroups:[d.quizzes,d.recordAudio],baseBitType:u._standard,description:"Record audio bit, used to create audio recording sections in articles or books"},[u.recordVideo]:{since:"1.5.24",title:"Record Video",bitGroups:[d.quizzes],baseBitType:u._standard,description:"Record video bit, used to create video recording sections in articles or books"},[u.stickyNote]:{since:"1.3.0",title:"Sticky Note",bitGroups:[d.static],baseBitType:u._standard,description:"Sticky note bit, used to create sticky notes in articles or books"},[u.takePicture]:{since:"1.3.0",title:"Take Picture",bitGroups:[d.quizzes,d.takePicture],baseBitType:u._standard,description:"Take picture bit, used to create picture taking sections in articles or books"},[u.handInAudio]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in audio bit, used to create audio submission sections in articles or books"},[u.handInContact]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in contact bit, used to create contact submission sections in articles or books"},[u.handInDocument]:{since:"1.5.15",title:"Hand in Document",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in document bit, used to create document submission sections in articles or books"},[u.handInFile]:{since:"3.2.0",title:"Hand in File",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in file bit, used to create file submission sections in articles or books",tags:[{key:ye.property_handInAcceptFileType,description:"Accepted file types for the hand-in file, used to define allowed file formats",format:v,maxCount:m}]},[u.handInFreeText]:{since:"5.3.0",bitGroups:[d.quizzes],baseBitType:u.interview,description:"Hand in free text bit, used to create free text submission sections in articles or books"},[u.handInFreeTextExpert]:{since:"5.3.0",bitGroups:[d.quizzes],baseBitType:u.interview,description:"Hand in free text expert bit, used to create free text expert submission sections in articles or books"},[u.handInLocation]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in location bit, used to create location submission sections in articles or books"},[u.handInPhoto]:{since:"1.5.15",title:"Hand in Photo",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in photo bit, used to create photo submission sections in articles or books"},[u.handInScan]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in scan bit, used to create scan submission sections in articles or books"},[u.handInSystemMedia]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in system media bit, used to create system media submission sections in articles or books",tags:[{key:ye.property_handInAcceptFileType,description:"Accepted file types for the hand-in system media, used to define allowed file formats",format:v,maxCount:m}]},[u.handInSubmit]:{since:"3.2.0",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in submit bit, used to create submission sections in articles or books",tags:[{key:ye.property_handInRequirement,description:"Requirement for the hand-in submission, used to define what is needed",format:v,maxCount:m},{key:ye.property_handInInstruction,description:"Instruction for the hand-in submission, used to guide the user",format:v},{key:ye.property_buttonCaption,description:"Caption for the button in the hand-in submission, used to define the button text",format:v}]},[u.handInVideo]:{since:"1.5.15",title:"Hand In Video",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in video bit, used to create video submission sections in articles or books"},[u.handInVoice]:{since:"1.5.15",bitGroups:[d.static],baseBitType:u._standard,description:"Hand in voice bit, used to create voice submission sections in articles or books"},[u.trueFalse1]:{since:"1.3.0",title:"True False",bitGroups:[d.quizzes,d.trueFalse],baseBitType:u._standard,description:"True/False bit, used to create true/false questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for true/false questions"},{key:ye.property_labelTrue,description:"Label for the true option in the true/false question",format:v},{key:ye.property_labelFalse,description:"Label for the false option in the true/false question",format:v},{exportJsonKey:{statement:"$",isCorrect:!0},key:ye.tag_true,description:"Tag for the true option in the true/false question",format:T},{exportJsonKey:{statement:"$",isCorrect:!1},key:ye.tag_false,description:"Tag for the false option in the true/false question",format:T},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0,example:!0}},{"@absent":{isExample:!0,example:!0}},{"@value=false":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example flag for the bit (boolean)",format:C,nullable:!0}],rootExampleType:b},[u.trueFalse]:{since:"1.3.0",title:"True False",bitGroups:[d.quizzes,d.trueFalse],baseBitType:u._standard,description:"True/False bit, used to create true/false questions in articles or books",quizBit:!0,tags:[{key:ye.group_quizCommon,description:"Common quiz tags for true/false questions"},{key:ye.property_labelTrue,description:"Label for the true option in the true/false question",format:v},{key:ye.property_labelFalse,description:"Label for the false option in the true/false question",format:v},{key:ye.property_example,exportJsonKey:[{"@keyonly":{isExample:!0}},{"@absent":{isExample:!0}},{isExample:!0,example:"$"}],description:"The example(s) for the bit",format:T,nullable:!0}],cardSet:V},[u.vendorAmcharts5Chart]:{since:"1.5.8",title:"Amcharts 5 Chart",bitGroups:[d.static],baseBitType:u.code,description:"AmCharts 5 chart bit, used to embed AmCharts 5 charts in articles or books",textFormatDefault:S.json},[u.vendorDatadogDashboard]:{since:"5.2.0",title:"Datadog Dashboard",bitGroups:[d.static],baseBitType:u.nonProductionPrototypeIframe,description:"A Datadog dashboard bit, used to embed Datadog dashboards"},[u.vendorDatadogDashboardEmbed]:{since:"3.12.0",bitGroups:[d.static],baseBitType:u.code,description:"Datadog dashboard embed bit, used to embed Datadog dashboards in articles or books",tags:[{key:ye.property_vendorDashboardId,description:"Dashboard ID for the Datadog dashboard, used to define which dashboard to embed",format:v}],textFormatDefault:S.plainText},[u.vendorFormbricksEmbed]:{since:"3.8.0",bitGroups:[d.static],baseBitType:u.code,description:"Formbricks embed bit, used to embed Formbricks surveys in articles or books",tags:[{key:ye.property_vendorSurveyId,description:"Survey ID for the Formbricks survey, used to define which survey to embed",format:v}],textFormatDefault:S.plainText},[u.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",title:"Formbricks Embed Anonymous",bitGroups:[d.static],baseBitType:u.vendorFormbricksEmbed,description:"Anonymous Formbricks embed bit, used to embed anonymous Formbricks surveys in articles or books"},[u.vendorFormbricksLink]:{since:"3.8.0",bitGroups:[d.static],baseBitType:u.code,description:"Formbricks link bit, used to create links to Formbricks surveys in articles or books",tags:[{key:ye.property_vendorSurveyId,description:"Survey ID for the Formbricks survey, used to define which survey to link to",format:v}],textFormatDefault:S.plainText},[u.vendorFormbricksLinkAnonymous]:{since:"3.9.0",bitGroups:[d.static],baseBitType:u.vendorFormbricksLink,description:"Anonymous Formbricks link bit, used to create links to anonymous Formbricks surveys in articles or books"},[u.vendorHighchartsChart]:{since:"1.5.28",title:"Highcharts Chart",bitGroups:[d.static],baseBitType:u.vendorAmcharts5Chart,description:"Highcharts chart bit, used to embed Highcharts charts in articles or books"},[u.vendorIframelyEmbed]:{since:"1.5.10",title:"Iframely Embed",bitGroups:[d.static],baseBitType:u.code,description:"Iframely embed bit, used to embed content from various sources in articles or books",tags:[{key:ye.property_width,description:"Width for the embedded content, used to define the width in pixels",format:_,nullable:!0},{key:ye.property_height,description:"Height for the embedded content, used to define the height in pixels",format:_,nullable:!0},{key:ye.property_vendorUrl,description:"URL for the content to be embedded, used to define the source URL",format:v}],textFormatDefault:S.plainText},[u.vendorIframelyCard]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.vendorIframelyEmbed,description:"Iframely card bit, used to create cards for embedded content in articles or books"},[u.vendorIframelyPreview]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.vendorIframelyEmbed,description:"Iframely preview bit, used to create previews for embedded content in articles or books"},[u.vendorIframelyPreviewMini]:{since:"1.5.10",bitGroups:[d.static],baseBitType:u.vendorIframelyEmbed,description:"Iframely preview mini bit, used to create mini previews for embedded content in articles or books"},[u.vendorJupyterOutput]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.code,description:"Jupyter output bit, used to embed Jupyter notebook outputs in articles or books",tags:[{key:ye.property_jupyterId,description:"Jupyter ID for the notebook, used to define which notebook to embed",format:v},{key:ye.property_jupyterExecutionCount,description:"Execution count for the Jupyter output, used to define the execution order",format:_,nullable:!0}],textFormatDefault:S.plainText},[u.vendorJupyterCellCode]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter cell code bit, used to embed Jupyter notebook cell code in articles or books"},[u.vendorJupyterCellMarkdown]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter cell markdown bit, used to embed Jupyter notebook cell markdown in articles or books"},[u.vendorJupyterCellRaw]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter cell raw bit, used to embed Jupyter notebook cell raw content in articles or books"},[u.vendorJupyterIpynb]:{since:"1.4.3",bitGroups:[d.static],baseBitType:u.vendorJupyterOutput,description:"Jupyter IPYNB bit, used to embed Jupyter notebook files in articles or books"},[u.vendorPadletEmbed]:{since:"1.3.0",title:"Padlet Embed",bitGroups:[d.static],baseBitType:u.code,description:"Padlet embed bit, used to embed Padlet boards in articles or books",tags:[{key:ye.property_padletId,description:"Padlet ID for the board, used to define which Padlet to embed",format:v}],textFormatDefault:S.plainText},[u.vendorStripePricingTable]:{since:"1.20.0",title:"Stripe Pricing Table",bitGroups:[d.static],baseBitType:u.article,description:"Stripe pricing table bit, used to embed Stripe pricing tables in articles or books",tags:[{key:ye.property_stripePricingTableId,description:"Stripe pricing table ID, used to define which pricing table to embed",format:v,minCount:1},{key:ye.property_stripePublishableKey,description:"Stripe publishable key, used to authenticate the Stripe pricing table",format:v,minCount:1}]},[u.vendorStripePricingTableExternal]:{since:"3.13.0",title:"Stripe Pricing Table External",bitGroups:[d.static],baseBitType:u.vendorStripePricingTable,description:"External Stripe pricing table bit, used to embed external Stripe pricing tables in articles or books"},[u.vendorStripePricingTablePrintOnRequest]:{since:"5.21.0",title:"Print on Request",bitGroups:[d.static],baseBitType:u.vendorStripePricingTable,description:"Stripe pricing table bit with print-on-request customer/product IDs, used to embed Stripe pricing tables tied to a specific print-on-request customer and product",tags:[{key:ye.property_stripePricingTableDescriptiveName,description:"Descriptive name for the Stripe pricing table",format:v},{key:ye.property_printOnRequestCustomerId,description:"Print-on-request customer ID, used to identify the customer for the print-on-request flow",format:v,minCount:1},{key:ye.property_printOnRequestProductId,description:"Print-on-request product ID, used to identify the product for the print-on-request flow",format:v,minCount:1}]},[u.video]:{since:"1.3.0",title:"Video",bitGroups:[d.static],baseBitType:u._standard,description:"Video bit, used to embed videos in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for videos, used to define additional properties"},{key:ye.group_resourceVideo,description:"Resource video tags, used to attach videos to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.videoLandscape]:{since:"1.3.0",title:"Video (Landscape)",bitGroups:[d.static],baseBitType:u.video,description:"Landscape video bit, used to embed landscape videos in articles or books"},[u.videoPortrait]:{since:"1.3.0",title:"Video Portrait",bitGroups:[d.static],baseBitType:u.video,description:"Portrait video bit, used to embed portrait videos in articles or books"},[u.videoEmbed]:{since:"1.3.0",title:"Video Embed",bitGroups:[d.static],baseBitType:u._standard,description:"Video embed bit, used to embed videos from external sources in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for video embeds, used to define additional properties"},{key:ye.group_resourceVideoEmbed,description:"Resource video embed tags, used to attach video embeds to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.videoEmbedLandscape]:{since:"1.3.0",title:"Video Embed Landscape",bitGroups:[d.static],baseBitType:u.videoEmbed,description:"Landscape video embed bit, used to embed landscape videos from external sources in articles or books"},[u.videoEmbedPortrait]:{since:"1.3.0",title:"Video Embed Portrait",bitGroups:[d.static],baseBitType:u.videoEmbed,description:"Portrait video embed bit, used to embed portrait videos from external sources in articles or books"},[u.videoLink]:{since:"1.3.0",title:"Video Link",bitGroups:[d.static],baseBitType:u._standard,description:"Video link bit, used to create links to videos in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for video links, used to define additional properties"},{key:ye.group_resourceVideoLink,description:"Resource video link tags, used to attach video links to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.videoLinkLandscape]:{since:"1.3.0",title:"Video Link Landscape",bitGroups:[d.static],baseBitType:u.videoLink,description:"Landscape video link bit, used to create links to landscape videos in articles or books"},[u.videoLinkPortrait]:{since:"1.3.0",title:"Video Link Portrait",bitGroups:[d.static],baseBitType:u.videoLink,description:"Portrait video link bit, used to create links to portrait videos in articles or books"},[u.websiteLink]:{since:"1.3.0",title:"Website Link",bitGroups:[d.static],baseBitType:u._standard,description:"Website link bit, used to create links to websites in articles or books",tags:[{key:ye.group_resourceBitTags,description:"Resource bit tags for website links, used to define additional properties"},{key:ye.group_resourceWebsiteLink,description:"Resource website link tags, used to attach website links to the bit",minCount:1}],resourceAttachmentAllowed:!1},[u.nonProductionPrototypeIframe]:{since:"4.20.0",title:"iFrame (Not for Production)",bitGroups:[d.nonProduction,d.static],baseBitType:u._standard,description:"A non-production prototype iframe bit, used to embed prototype iframes",tags:[{key:ye.property_iframeSrc,description:"Iframe source URL, used to define the source of the iframe",minCount:1},{key:ye.property_iframeName,description:"Iframe name, used to define the name of the iframe"}]},[u.vendorLearndashEmbed]:{since:"5.0.0",title:"Learndash",bitGroups:[d.static],baseBitType:u.nonProductionPrototypeIframe,description:"Learndash embed bit, used to embed Learndash content in an iframe"}},Ee={[Te.app]:{since:"5.39.0",description:"App resources",title:"App",resourceTypes:[y.appLink]},[Te.article]:{since:"5.39.0",description:"Article resources",title:"Article",resourceTypes:[y.article,y.articleEmbed,y.articleLink]},[Te.audio]:{since:"5.39.0",description:"Audio resources",title:"Audio",resourceTypes:[y.audio,y.audioEmbed,y.audioLink]},[Te.document]:{since:"5.39.0",description:"Document resources",title:"Document",resourceTypes:[y.document,y.documentDownload,y.documentEmbed,y.documentLink]},[Te.image]:{since:"5.39.0",description:"Image resources",title:"Image",resourceTypes:[y.image,y.imageEmbed,y.imageLandscape,y.imageLink,y.imagePortrait,y.imageResponsive]},[Te.stillImageFilm]:{since:"5.39.0",description:"Still-image film resources",title:"Still image film",resourceTypes:[y.stillImageFilm,y.stillImageFilmEmbed,y.stillImageFilmLink]},[Te.video]:{since:"5.39.0",description:"Video resources (incl. still-image film variants, per the historical book-service grouping)",title:"Video",resourceTypes:[y.stillImageFilmEmbed,y.stillImageFilmLink,y.video,y.videoEmbed,y.videoLink]},[Te.website]:{since:"5.39.0",description:"Website resources",title:"Website",resourceTypes:[y.websiteLink]}},Le=new class{constructor(){l(this,"bitLevelMin",1),l(this,"bitLevelMax",7),l(this,"bitCache",new Map),l(this,"migratedBitCache",new Map),l(this,"allResourcesCache"),l(this,"comboResourcesCache",new Map),l(this,"bitGroupKeyCache"),l(this,"bitGroupToBitTypesCache"),l(this,"resourceGroupKeyCache"),l(this,"translations")}registerTranslations(e){const t={};for(const[r,i]of Object.entries(e)){const e={};for(const[t,r]of Object.entries(i))e[t.toLowerCase()]=r;t[r]=e}this.translations=t}getBitGroupKey(e){if(null!=e)return this.getBitGroupKeyMap().get(e)}getResourceGroupKey(e){if(null!=e)return this.getResourceGroupKeyMap().get(e)}getBitGroupsForBitType(e){if(null==e)return[];const t=Ie[e];if(!t)return[];if(t.bitGroups)return[...t.bitGroups];const r=this.getMigratedBitType(e);return r?this.getBitGroupsForBitType(r):[]}getBitTypesForBitGroups(e,t){const r=t?.includeDeprecated??!0,i=this.getBitGroupToBitTypesMap(),o=new Set;for(const t of e){const e=this.getBitGroupKey(t);if(e)for(const t of i.get(e)??[])!r&&Ie[t]?.deprecated||o.add(t)}return[...o].sort()}getBitGroupsForBitTypes(e){const t=new Set;for(const r of e)for(const e of this.getBitGroupsForBitType(r))t.add(e);return[...t].sort()}getResourceTypesForResourceGroups(e){const t=new Set;for(const r of e){const e=this.getResourceGroupKey(r);if(e)for(const r of Ee[e].resourceTypes)t.add(r)}return[...t].sort()}getResourceGroupsForResourceTypes(e){const t=new Set(e),r=new Set;for(const[e,i]of Object.entries(Ee))i.resourceTypes.some(e=>t.has(e))&&r.add(e);return[...r].sort()}getBitTitle(e,t){const r=Ie[e]?.title;return this.translate(e,r,t)}getBitGroupTitle(e,t){const r=this.getBitGroupKey(e);return r?this.translate(r,Pe[r].title,t):e}getResourceGroupTitle(e,t){const r=this.getResourceGroupKey(e);return r?this.translate(r,Ee[r].title,t):e}translate(e,t,r){if(r&&this.translations){const t=this.translations[e];if(t){let e=r.toLowerCase();for(;;){const r=t[e];if(r)return r;const i=e.lastIndexOf("-");if(i<0)break;e=e.substring(0,i)}}}return t??e}getBitGroupKeyMap(){if(!this.bitGroupKeyCache){const e=new Map;for(const[t,r]of Object.entries(Pe)){if(e.has(t))throw new Error(`Duplicate bit-group key/alias: ${t}`);e.set(t,t);for(const i of r.aliases??[]){if(e.has(i))throw new Error(`Duplicate bit-group key/alias: ${i}`);e.set(i,t)}}this.bitGroupKeyCache=e}return this.bitGroupKeyCache}getResourceGroupKeyMap(){if(!this.resourceGroupKeyCache){const e=new Map;for(const[t,r]of Object.entries(Ee)){if(e.has(t))throw new Error(`Duplicate resource-group key/alias: ${t}`);e.set(t,t);for(const i of r.aliases??[]){if(e.has(i))throw new Error(`Duplicate resource-group key/alias: ${i}`);e.set(i,t)}}this.resourceGroupKeyCache=e}return this.resourceGroupKeyCache}getBitGroupToBitTypesMap(){if(!this.bitGroupToBitTypesCache){const e=new Map;for(const t of Object.keys(Pe))e.set(t,[]);for(const t of Object.keys(Ie).sort())for(const r of this.getBitGroupsForBitType(t)){const i=e.get(r);if(!i)throw new Error(`Bit '${t}' references unknown bit group '${r}'`);i.push(t)}this.bitGroupToBitTypesCache=e}return this.bitGroupToBitTypesCache}getBitType(e){return e?.startsWith("|")&&(e=e.substring(1)),(0,p.Enum)(u).fromValue(e)??u._error}getMigratedBitType(e){const t=this.migratedBitCache.get(e);if(void 0!==t||this.migratedBitCache.has(e))return t;let r;return e!==u.collapsible&&e.endsWith("-collapsible")&&(r=Ie[e]?.baseBitType),this.migratedBitCache.set(e,r),r}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const r=this.getBitConfig(e);if(!r)return!1;if(Array.isArray(t)){for(const e of t)if(r.inheritedBitTypesSet.has(e))return!0;return!1}return r.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!e?.startsWith("|")}getBitConfig(e){let t=this.bitCache.get(e);if(!t){const r=()=>{throw new Error(`No config found for bit: ${e}`)},i=[],o=[];let a=e;for(;a;){const e=Ie[a];e||r(),i.push(a),o.push(e),a=e.baseBitType}o.reverse();const s=o.reduce((e,t)=>e=_e.deepMerge(e,t),{}),{since:n,textFormatDefault:l,quizBit:c,tags:p,cardSet:u,deprecated:d,bodyAllowed:h,bodyRequired:b,footerAllowed:g,footerRequired:y,resourceAttachmentAllowed:f,rootExampleType:k}=s;p?.push({key:ye.property_internalComment,description:"Internal comment for the bit.",format:v,maxCount:m,minCount:0});const x=this.getAllResourcesTagsWithZeroCounts(),T=Se.hydrateTagsConfig(p??[]),_=Se.hydrateCardSetConfig(u),C=T.info?.comboResourceConfigKey,w={...T.tags};for(const[e,t]of Object.entries(x))w[e]||(w[e]=t);t=new me({since:n,bitType:e,title:Ie[e]?.title,bitGroups:this.getBitGroupsForBitType(e),inheritedBitTypes:i,textFormatDefault:l??S.bitmarkText,tags:w,cardSet:_,quizBit:c,deprecated:d,bodyAllowed:h,bodyRequired:b,footerAllowed:g,footerRequired:y,resourceAttachmentAllowed:f,rootExampleType:k,comboResourceConfigKey:C}),this.bitCache.set(e,t)}return t}getTagConfigForTag(e,t){if(e)return e[t]}getTagsConfigForCardSet(e,t,r){const i=this.getCardSetVariantConfig(e,t,r);if(i)return i.tags}getCardSetVariantConfig(e,t,r){let i;const o=this.getBitConfig(e);if(!o)return;const a=o.cardSet?.variants;if(!a)return;const s=a[Math.min(t,a.length-1)],n=s.length-1;return i=r>n?s[n]:s[r],i}getBitResourcesConfig(e,t){let r={};const i=new Map,o=t?f(t):void 0,a=this.getBitConfig(e),s={};for(const[e,t]of Object.entries(a.tags))t.type===oe&&(s[e]=t);const n=a.comboResourceConfigKey??(a.resourceAttachmentAllowed?o:void 0);if(n){const e=new Map,o=this.getComboResource(n);if(o){const t=Object.values(o).filter(e=>e.type===oe);t.map(e=>e.configKey).forEach(r=>{const i=t.find(e=>e.configKey===r);i&&e.set(r,i)});const r=this.getComboResourceConfigKeys(n);r&&r.length>0&&i.set(n,r)}if(t)for(const[t,i]of Object.entries(s)){const o=n===i.configKey,a=!!e&&e.has(i.configKey);if(o){const e=new ce({configKey:i.configKey,tag:i.tag,minCount:1,maxCount:1,chain:i.chain,jsonKey:i.jsonKey,exportJsonKey:i.exportJsonKey,hasExportJsonKey:i.hasExportJsonKey,htmlKey:i.htmlKey,hasHtmlKey:i.hasHtmlKey,deprecated:i.deprecated});r[t]=e}else if(a){if(e){const o=e.get(i.configKey);o&&(r[t]=o)}}else r[t]=i}else r=s}else r=s;return new ve(r,a.resourceAttachmentAllowed,o,i)}getComboResourceConfigKeys(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter(e=>e.type===oe).map(e=>e.configKey)}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(Be).filter(t=>t.type===ee&&t.comboResourceConfigKey===e).forEach(e=>{t={...t,...Se.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(Be).filter(e=>e.type===X).forEach(t=>{e={...e,...Se.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}},Ne="@gmb/bitmark-parser-generator",Ve="5.41.0",Re="ISC",Ge=(r(722),""),Fe="node",Ke="chrome",$e="safari",Oe="firefox",Je=(r(722),""),De="macos";function ze(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:Ge,os:Je},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce((e,t)=>(t&&e.push(t),e),[]),r={keys:new Set,versions:{}};let i="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let a=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){a=!0;break}a?r.versions[i]=o.replace("_","."):r.keys.add(o),i=o}return r}(window.navigator.userAgent),r=t.keys.has("firefox"),i=t.keys.has("chrome"),o=t.keys.has("chromium"),a=t.keys.has("safari"),s=i,n=r,l=t.keys.has("macintosh");return a&&!i&&!o?(e.browser=$e,e.browserVersion=t.versions.version):s?(e.browser=Ke,e.browserVersion=t.versions.chrome):n&&(e.browser=Oe,e.browserVersion=t.versions.firefox),l&&(e.os=De,e.osVersion=t.versions.x),e}var je={full:"",major:"",minor:"",patch:"",build:""},qe=new class{constructor(){l(this,"bootTimestamp"),l(this,"app"),l(this,"appVersion"),l(this,"environment"),l(this,"environmentVersion"),l(this,"os"),l(this,"osVersion"),l(this,"isBrowser"),l(this,"isNode"),l(this,"isCI"),l(this,"NODE_ENV"),l(this,"userAgentInfo"),Object.defineProperty(this,"userAgentInfo",{value:ze(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=je,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===Fe,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?Fe:Ge}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):je}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,Je)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):je}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 je;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let r="",i="",o="",a="";for(let e=0,s=t.length;e<s;e++){const s=t[e];0===e?r=s:1===e?i=s:2===e?a=s:3===e&&(o=s)}return{full:e,major:r,minor:i,patch:a,build:o}}},Me=qe.init.bind(qe),He=!1;function Ue(){He||(Me(Ne,Ve),He=!0)}var We=r(722),Ye=(r(722),{text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"}),Qe=(r(722),{bold:"bold",light:"light",italic:"italic",highlight:"highlight",highlightOrange:"highlightOrange",highlightYellow:"highlightYellow",highlightGreen:"highlightGreen",highlightBlue:"highlightBlue",highlightPurple:"highlightPurple",highlightPink:"highlightPink",highlightBrown:"highlightBrown",highlightBlack:"highlightBlack",highlightWhite:"highlightWhite",highlightGray:"highlightGray",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",smallcaps:"smallcaps",circle:"circle",languageEmRed:"languageEmRed",languageEmOrange:"languageEmOrange",languageEmYellow:"languageEmYellow",languageEmGreen:"languageEmGreen",languageEmBlue:"languageEmBlue",languageEmPurple:"languageEmPurple",languageEmPink:"languageEmPink",languageEmBrown:"languageEmBrown",languageEmBlack:"languageEmBlack",languageEmWhite:"languageEmWhite",languageEmGray:"languageEmGray",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",textStyle:"textStyle",colorPicker:"colorPicker",comment:"comment"}),Ze=(r(722),{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"}),Xe=(r(722),{unknown:"unknown",__isDefaultExample:"__isDefaultExample",__typeAlias:"__typeAlias",accessibilityGroupTag:"accessibilityGroupTag",accessibilityGroupTagValue:"accessibilityGroupTagValue",accessibilityTag:"accessibilityTag",accessibilityTagValue:"accessibilityTagValue",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",advertisingClickUrl:"advertisingClickUrl",advertisingClickUrlValue:"advertisingClickUrlValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",allowPrint:"allowPrint",allowPrintValue:"allowPrintValue",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",authorFullName:"authorFullName",authorFullNameValue:"authorFullNameValue",authorJobTitle:"authorJobTitle",authorJobTitleValue:"authorJobTitleValue",authorPseudonym:"authorPseudonym",authorPseudonymValue:"authorPseudonymValue",authorTitle:"authorTitle",authorTitleValue:"authorTitleValue",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",backgroundImage:"backgroundImage",backgroundImageValue:"backgroundImageValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",bitFingerprint:"bitFingerprint",bitFingerprintValue:"bitFingerprintValue",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",bodyValue:"bodyValue",book:"book",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookAuthor:"bookAuthor",bookBindingType:"bookBindingType",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bookIsbn:"bookIsbn",bookLanguage:"bookLanguage",bookNumberOfPages:"bookNumberOfPages",bookOriginalTitle:"bookOriginalTitle",bookPublisher:"bookPublisher",bookPublishingDate:"bookPublishingDate",bookRating:"bookRating",bookSeriesId:"bookSeriesId",bookSeriesNumber:"bookSeriesNumber",bookSeriesTitle:"bookSeriesTitle",bookTranslator:"bookTranslator",bookType:"bookType",bookValue:"bookValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",brandColor:"brandColor",brandColorName:"brandColorName",brandColorNameValue:"brandColorNameValue",brandColorValue:"brandColorValue",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",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",chatWithBookValue:"chatWithBookValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",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",currency:"currency",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",customerProductId:"customerProductId",customerProductShopLink:"customerProductShopLink",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",displayName:"displayName",displayNameValue:"displayNameValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",diffTo:"diffTo",diffToValue:"diffToValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",elementsValueValue:"elementsValueValue",emphasis:"emphasis",end:"end",enforceUpdateOverUserInput:"enforceUpdateOverUserInput",enforceUpdateOverUserInputValue:"enforceUpdateOverUserInputValue",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extractorExtractionTimestamp:"extractorExtractionTimestamp",extractorExtractionTimestampValue:"extractorExtractionTimestampValue",extractorTag:"extractorTag",extractorTagValue:"extractorTagValue",extractorInternal:"extractorInternal",extractorInternalValue:"extractorInternalValue",extraProperties:"extraProperties",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",footerValue:"footerValue",forKeys:"forKeys",format:"format",formula:"formula",formulaValue:"formulaValue",forValues:"forValues",forValuesValue:"forValuesValue",fullName:"fullName",fullNameValue:"fullNameValue",gap:"gap",gmbExternalShop:"gmbExternalShop",gmbExternalShopItems:"gmbExternalShopItems",groupTag:"groupTag",groupTagValue:"groupTagValue",gUri:"gUri",gUriValue:"gUriValue",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",hasPrintRestriction:"hasPrintRestriction",hasPrintRestrictionValue:"hasPrintRestrictionValue",head:"head",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",hintValue:"hintValue",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",iframeName:"iframeName",iframeSrc:"iframeSrc",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",ingredient:"ingredient",ingredientValue:"ingredientValue",instruction:"instruction",instructionValue:"instructionValue",internalComment:"internalComment",internalCommentValue:"internalCommentValue",internalPrintPdf:"internalPrintPdf",internalPrintPdfValue:"internalPrintPdfValue",isCaseSensitive:"isCaseSensitive",isCollapsible:"isCollapsible",isCollapsibleValue:"isCollapsibleValue",isCommented:"isCommented",isCorrect:"isCorrect",isEditable:"isEditable",isEditableValue:"isEditableValue",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTemplate:"isTemplate",isTemplateStripTheme:"isTemplateStripTheme",isTemplateStripThemeValue:"isTemplateStripThemeValue",isTemplateValue:"isTemplateValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",itemValue:"itemValue",jobTitle:"jobTitle",jobTitleValue:"jobTitleValue",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",layerRole:"layerRole",layerRoleValue:"layerRoleValue",layerValue:"layerValue",lead:"lead",leadValue:"leadValue",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",listPrice:"listPrice",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",marginNumberValue:"marginNumberValue",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",needsValidation:"needsValidation",needsValidationValue:"needsValidationValue",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageNumberValue:"pageNumberValue",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",path:"path",pathValue:"pathValue",person:"person",platformBackgroundColor:"platformBackgroundColor",platformBackgroundColorValue:"platformBackgroundColorValue",platformBackgroundImage:"platformBackgroundImage",platformBackgroundImageValue:"platformBackgroundImageValue",platformBaseLayerColor:"platformBaseLayerColor",platformBaseLayerColorValue:"platformBaseLayerColorValue",platformBorderColor:"platformBorderColor",platformBorderColorValue:"platformBorderColorValue",platformBorderRadius:"platformBorderRadius",platformBorderRadiusValue:"platformBorderRadiusValue",platformBrandTarget:"platformBrandTarget",platformBrandTargetValue:"platformBrandTargetValue",platformButtonBackgroundColor:"platformButtonBackgroundColor",platformButtonBackgroundColorValue:"platformButtonBackgroundColorValue",platformButtonPrimaryColor:"platformButtonPrimaryColor",platformButtonPrimaryColorValue:"platformButtonPrimaryColorValue",platformIcon:"platformIcon",platformIconValue:"platformIconValue",platformLogo:"platformLogo",platformLogoMaxHeight:"platformLogoMaxHeight",platformLogoMaxHeightValue:"platformLogoMaxHeightValue",platformLogoValue:"platformLogoValue",platformMargin:"platformMargin",platformMarginValue:"platformMarginValue",platformMessageBackgroundColor:"platformMessageBackgroundColor",platformMessageBackgroundColorValue:"platformMessageBackgroundColorValue",platformName:"platformName",platformNameValue:"platformNameValue",platformNeedsShadow:"platformNeedsShadow",platformNeedsShadowValue:"platformNeedsShadowValue",platformPlaceholderColor:"platformPlaceholderColor",platformPlaceholderColorValue:"platformPlaceholderColorValue",platformPrimaryColor:"platformPrimaryColor",platformPrimaryColorValue:"platformPrimaryColorValue",platformScrollbarColor:"platformScrollbarColor",platformScrollbarColorValue:"platformScrollbarColorValue",platformSecondaryColor:"platformSecondaryColor",platformSecondaryColorValue:"platformSecondaryColorValue",platformSelectionBorderRadius:"platformSelectionBorderRadius",platformSelectionBorderRadiusValue:"platformSelectionBorderRadiusValue",platformSelectionColor:"platformSelectionColor",platformSelectionColorValue:"platformSelectionColorValue",platformSelectionTextColor:"platformSelectionTextColor",platformSelectionTextColorValue:"platformSelectionTextColorValue",platformSeparatorColor:"platformSeparatorColor",platformSeparatorColorValue:"platformSeparatorColorValue",platformTextSelectionColor:"platformTextSelectionColor",platformTextSelectionColorValue:"platformTextSelectionColorValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",previewImage:"previewImage",previewImageValue:"previewImageValue",previewVideo:"previewVideo",previewVideoValue:"previewVideoValue",printParentChapterLevel:"printParentChapterLevel",printParentChapterLevelValue:"printParentChapterLevelValue",printOnRequestCustomerId:"printOnRequestCustomerId",printOnRequestCustomerIdValue:"printOnRequestCustomerIdValue",printOnRequestProductId:"printOnRequestProductId",printOnRequestProductIdValue:"printOnRequestProductIdValue",processHandIn:"processHandIn",processHandInLocation:"processHandInLocation",processHandInLocationValue:"processHandInLocationValue",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",pseudonym:"pseudonym",pseudonymValue:"pseudonymValue",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",questionValue:"questionValue",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",refPublicationYear:"refPublicationYear",refPublisher:"refPublisher",relatedBook:"relatedBook",relatedBookValue:"relatedBookValue",translationOfBook:"translationOfBook",translationOfBookValue:"translationOfBookValue",userFeedbackTranslationUrl:"userFeedbackTranslationUrl",userFeedbackTranslationUrlValue:"userFeedbackTranslationUrlValue",userFeedbackContentUrl:"userFeedbackContentUrl",userFeedbackContentUrlValue:"userFeedbackContentUrlValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",reportTag:"reportTag",reportTagValue:"reportTagValue",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",reviewTag:"reviewTag",reviewTagValue:"reviewTagValue",reviewerTag:"reviewerTag",reviewerTagValue:"reviewerTagValue",rightsPolicy:"rightsPolicy",rightsPolicyValue:"rightsPolicyValue",root:"root",rows:"rows",rowsValue:"rowsValue",rtl:"rtl",rtlValue:"rtlValue",rubric:"rubric",rubricValue:"rubricValue",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",searchValue:"searchValue",section:"section",select:"select",selected:"selected",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",sourceBB:"sourceBB",sourceBBValue:"sourceBBValue",sourceDocument:"sourceDocument",sourceDocumentValue:"sourceDocumentValue",sourceRL:"sourceRL",sourceRLValue:"sourceRLValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",spansPageBreak:"spansPageBreak",spansPageBreakValue:"spansPageBreakValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",srcAlt:"srcAlt",srcAltValue:"srcAltValue",start:"start",statement:"statement",statementValue:"statementValue",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePricingTableDescriptiveName:"stripePricingTableDescriptiveName",stripePricingTableDescriptiveNameValue:"stripePricingTableDescriptiveNameValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtitleValue:"subtitleValue",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableColWidth:"tableColWidth",tableColWidthValue:"tableColWidthValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeaderWhitespaceNoWrap:"tableHeaderWhitespaceNoWrap",tableHeaderWhitespaceNoWrapValue:"tableHeaderWhitespaceNoWrapValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",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",titleString:"titleString",titleValue:"titleValue",toc:"toc",tocContent:"tocContent",tocContentValue:"tocContentValue",tocResource:"tocResource",tocResourceValue:"tocResourceValue",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",translationOf:"translationOf",translationOfValue:"translationOfValue",trim:"trim",type:"type",unit:"unit",unitAbbr:"unitAbbr",unitAbbrPlural:"unitAbbrPlural",unitPlural:"unitPlural",url:"url",validationDate:"validationDate",validationDateValue:"validationDateValue",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"}),et=class{constructor(){Ue()}walk(e,t,r,i){this.walkRecursive(e,[{index:0,key:t,value:e}],r,i)}getRouteKey(e){return e.reduce((t,r,i)=>(+r.key!==r.index&&(t+=`${r.key}`,i<e.length-1&&(t+="_")),t),"")}printTree(e,t=Xe.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==Xe.bodyJson),between:(e,t,r,i)=>{console.log("Between: "+this.getRouteKey(i))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(g.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,r,i){const{enter:o,between:a,exit:s,leaf:n}=r,l=t[t.length-1].key,c=!this.isValue(e),p=t[t.length-1];if(c){if(o){if(!1===o(p,t,i))return}}else n&&n(p,t,i);if(c){const o=this.isArray(e),s=Object.keys(e);for(let n=0,c=s.length;n<c;n++){const u=s[n],d=n===c-1,m=e,h=m[u];if(null!=h){const e={key:this.getAstKey(u,l,o),index:n,value:h},c=t.slice();if(c.push(e),this.walkRecursive(h,c,r,i),!d){const r=s[n+1],c=m[r],u={key:this.getAstKey(r,l,o),index:n+1,value:c};if(a){if(!1===a(p,e,u,t,i))break}}}}}c&&s&&s(p,t,i)}getAstKey(e,t,r){let i=e;return r&&t&&(i=`${t}Value`),(0,We.Enum)(Xe).fromKey(i)||`unknown(${i})`}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)}},tt=r(722),rt=(r(722),"tag"),it="body",ot=(r(722),{plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"}),at=/([*`_!=])(?=\1)/,st=/(\^*])/,nt=/(\^+)/,lt=`${st.source}|${nt.source}`,ct=`${at.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}|${nt.source}`,pt=`${/^(\[)(\^*)(\.)/.source}`,ut=new RegExp(`${at.source}|${st.source}|${nt.source}`,"gm"),dt=new RegExp(lt,"gm"),mt=new RegExp(ct,"gm"),ht=new RegExp(pt,"gm"),bt=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),gt=new RegExp("\\^([\\^]*)","gm"),yt=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),ft=new RegExp("^(\\||•|#)","gm"),kt={format:ot.bitmarkPlusPlus,location:it,v2:!1};function xt(e){return"string"==typeof e||e instanceof String}var vt={format:S.bitmarkText,location:it,inPlaceArray:!1,v2:!1},Tt=new class{constructor(){l(this,"EMPTY_STRING","")}breakscape(e,t={}){if(null==e)return;const r=Object.assign({},kt,t);if(Array.isArray(e))return e.map(e=>this.breakscape(e,r));if(!xt(e))return e;const{regex:i,replacer:o}=function(e,t,r=!1){return t===rt?r||e!==ot.bitmarkPlusPlus?{regex:dt,replacer:"$2^$1"}:{regex:ut,replacer:"$1$3^$2"}:e===ot.bitmarkPlusPlus?r?{regex:bt,replacer:"$1$4^$2$3"}:{regex:mt,replacer:"$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14"}:{regex:ht,replacer:"$1^$2$3"}}(r.format,r.location,r.v2);let a=e;return a=a.replace(i,o),a}unbreakscape(e,t={}){if(null==e)return;const r=Object.assign({},kt,t);if(Array.isArray(e))return e.map(e=>this.unbreakscape(e,r));if(!xt(e))return e;const{regex:i,replacer:o}=function(e,t){const r=e!==ot.bitmarkPlusPlus;return t===it&&r?{regex:yt,replacer:"$1$2$3"}:{regex:gt,replacer:"$1"}}(r.format,r.location);let a=e;return a=a.replace(i,o),a}breakscapeCode(e,t){if(null==e)return e;const r=Object.assign({},kt,t),i=e=>e?e.replace(ft,"$1^"):e;if(Array.isArray(e)){const t=r.inPlaceArray?e:[e.length];for(let t=0,r=e.length;t<r;t++){const r=e[t];xt(r)&&(e[t]=i(r))}e=t}else xt(e)&&(e=i(e));return e}version(){return Ve}license(){return Re}},_t=new class{constructor(){l(this,"EMPTY_STRING","")}breakscape(e,t){const r=Object.assign({},vt,t);return Tt.breakscape(e,{format:r.format,location:r.location,inPlaceArray:r.inPlaceArray,v2:r.v2})}unbreakscape(e,t){const r=Object.assign({},vt,t);return Tt.unbreakscape(e,r)}breakscapeCode(e,t){const r=Object.assign({},vt,t);return Tt.breakscapeCode(e,r)}concatenate(e,t){return e+t}},Ct=(r(722),{bitmarkMinusMinus:"bitmark--"});function wt(e){const t={};if(e.columns&&e.columns.length>0&&(t.header={rows:[{cells:e.columns.map(e=>({content:e,title:!0}))}]}),e.data&&e.data.length>0&&(t.body={rows:e.data.map(e=>({cells:e.map(e=>({content:e}))}))}),Array.isArray(e.columnWidths)&&e.columnWidths.length>0){const r=t.header?.rows[0]?.cells??t.body?.rows[0]?.cells;if(r)for(let t=0;t<e.columnWidths.length;t++){const i=e.columnWidths[t];"number"==typeof i&&i>0&&r[t]&&(r[t].colwidth=i)}}return t}function At(e){const t={},r=e=>e&&Array.isArray(e.cells)?e.cells.map(e=>e?.content).filter(e=>void 0!==e):[],i=[],o=[];let a=!1,s=0;const n=e=>{e&&(e.length>s&&(s=e.length),e.forEach((e,t)=>{e&&"number"==typeof e.colwidth&&e.colwidth>0&&(o[t]=e.colwidth,a=!0)}))},l=e.header?.rows??[];if(l.forEach(e=>n(e?.cells)),(e.body?.rows??[]).forEach(e=>n(e?.cells)),(e.footer?.rows??[]).forEach(e=>n(e?.cells)),l.length>0){const e=r(l[0]);e.length>0&&(t.columns=e);l.slice(1).forEach(e=>{const t=r(e);t.length>0&&i.push(t)})}const c=e=>{e&&Array.isArray(e.rows)&&e.rows.forEach(e=>{const t=r(e);t.length>0&&i.push(t)})};if(c(e.body),c(e.footer),i.length>0&&(t.data=i),a){const e=t.columns?.length??s,r=new Array(e).fill(null);for(let t=0;t<e;t++){const e=o[t];"number"==typeof e&&(r[t]=e)}t.columnWidths=r}return t}function Bt(e,t){if(function(e){const t=e,r=!(!t.columns&&!t.data),i=!!(t.header||t.body||t.footer);return r&&i}(t)){const e=t;delete e.columns,delete e.data}const r=Le.isOfBitType(e,u.tableExtended)||Le.isOfBitType(e,u.tableImage);return r&&function(e){const t=e;return!(!t.columns&&!t.data||t.header||t.body||t.footer)}(t)?wt(t):!r&&function(e){const t=e;return!!(t.header||t.body||t.footer)}(t)?At(t):t}var St=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}removeDuplicates(e,t){const r=new Set;let i=0;for(let o=0;o<e.length;o++){const a=e[o],s=t?t(a):a;r.has(s)||(r.add(s),i!==o&&(e[i]=a),i++)}return i<e.length&&(e.length=i),e}},Pt=r(722),It=(r(722),{v2:2,v3:3}),Et=It.v3,Lt=class{constructor(){l(this,"ast",new et),l(this,"debugGenerationInline",!1),l(this,"printed",!1)}enter(e,t,r){let i;const o=this,a=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[a]&&(i=o[a](e,t,r)),i}between(e,t,r,i,o){let a;const s=this,n=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof s[n]&&(a=s[n](e,t,r,i,o)),a}exit(e,t,r){const i=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof i[o]&&i[o](e,t,r)}leaf(e,t,r){const i=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof i[o]&&i[o](e,t,r),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}getSiblingNodes(e){const t=this.getParentNode(e);if(!t||!t.value||!Array.isArray(t.value))return{};const r=t.value,i=r.findIndex(t=>t===e[e.length-1]?.value);return-1===i?{}:{left:i>0?r[i-1]:void 0,right:i<r.length-1?r[i+1]:void 0}}isEmptyParagraph(e){if(!e)return!1;if(e.type!==Ze.paragraph)return!1;if(!e.content||!Array.isArray(e.content))return!0;for(const t of e.content){if(t.type!==Ze.text)return!1;if(t.text&&""!==t.text.trim())return!1}return!0}},Nt=["aqua","black","blue","brown","fuchsia","lightgrey","gray","darkgray","green","lime","magenta","maroon","navy","olive","orange","pink","purple","red","silver","teal","violet","white","yellow"],Vt=["orange","yellow","green","blue","purple","pink","brown","white","black","gray"],Rt=["bold","italic","light","highlightOrange","highlightYellow","highlightGreen","highlightBlue","highlightPurple","highlightPink","highlightBrown","highlightBlack","highlightWhite","highlightGray","highlight","strike","subscript","superscript","ins","del","underline","doubleUnderline","smallcaps","circle","languageEmRed","languageEmOrange","languageEmYellow","languageEmGreen","languageEmBlue","languageEmPurple","languageEmPink","languageEmBrown","languageEmBlack","languageEmWhite","languageEmGray","languageEm","userUnderline","userDoubleUnderline","userStrike","userCircle","userHighlight","notranslate"],Gt=["left","center","right"],Ft=["top","middle","bottom","baseline","sub","super","text-bottom","text-top"],Kt=["line-height","font-height","super","sub","explicit"],$t=/[\n\r\u2028\u2029]/,Ot=/[|\n\r\u2028\u2029]/,Jt="a-zA-Z0-9!*'()=+,\\-./_?#@[\\]$&;%:{}~^",Dt=new RegExp(`^[${Jt}]$`),zt=new RegExp(`^https?://[${Jt}]*$`),jt=new RegExp(`^(https?://|mailto:)[${Jt}]*$`);function qt(e){return"string"==typeof e&&!Ot.test(e)}function Mt(e){return $t.test(e)}function Ht(e){return"string"==typeof e&&-1!==Vt.indexOf(e)}function Ut(e){return"number"==typeof e?Number.isInteger(e)&&e>=0?e:void 0:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):void 0}function Wt(e){return"string"==typeof e&&jt.test(e)}function Yt(e){if(function(e){return"string"==typeof e&&!$t.test(e)}(e))return e.trim().toLowerCase()}var Qt=e=>Ut(e),Zt=e=>function(e){return"boolean"==typeof e?e:"true"===e||"false"!==e&&void 0}(e),Xt=e=>function(e){return"string"==typeof e&&-1!==Gt.indexOf(e)}(e)?e:void 0,er=e=>qt(e)?e.trim():void 0,tr={image:{alt:er,title:er,alignment:Xt,textAlign:Xt,zoomDisabled:Zt,width:Qt,height:Qt,comment:er},imageInline:{srcAlt:er,alignmentVertical:e=>function(e){return"string"==typeof e&&-1!==Ft.indexOf(e)}(e)?e:void 0,size:e=>function(e){return"string"==typeof e&&-1!==Kt.indexOf(e)}(e)?e:void 0,width:Qt,height:Qt,comment:er},symbol:{alt:er,title:er,caption:er,alignment:Xt,textAlign:Xt,captionAlign:Xt,zoomDisabled:Zt,width:Qt,height:Qt,comment:er}},rr={textAlign:"captionAlign",title:"caption"},ir={image:{alignment:"center",textAlign:"left",zoomDisabled:!0},imageInline:{alignmentVertical:"top",size:"line-height"},symbol:{}};function or(e,t){const r={};if(!t||"object"!=typeof t)return r;const i=tr[e];for(const[e,o]of Object.entries(t)){const t=i[e];if(!t||null==o)continue;const a=t(o);void 0!==a&&(r[e]=a)}return"symbol"===e&&("caption"in r&&delete r.title,"captionAlign"in r&&delete r.textAlign),r}function ar(e,t){const r=ir[e];let i="";for(const o of Object.keys(tr[e])){const e=t[o];if(null!=e&&(!(o in r)||r[o]!==e))if("comment"===o)e&&(i+=`|#${e}`);else{if("string"==typeof e&&""===e)continue;i+=`|${rr[o]??o}:${e}`}}return i}var sr=[Qe.bold,Qe.italic,Qe.light,Qe.highlight];function nr(e){const t=e.attrs;return t&&"object"==typeof t&&!Array.isArray(t)?t:{}}function lr(e){return null==e?"":qt(e)?e.trim():void 0}function cr(e,t){return t?{type:e,attrs:t}:{type:e}}function pr(e,t){const r=nr(e);switch(e.type){case Qe.highlight:case Qe.userHighlight:{const t=r.color;return Ht(t)?cr(e.type,{color:t}):cr(e.type)}case Qe.textStyle:case Qe.color:{const e=r.color;return"string"==typeof(i=e)&&-1!==Nt.indexOf(i)?cr(Qe.textStyle,{color:e}):void 0}case Qe.link:{const t=lr(r.href);return void 0===t?void 0:cr(e.type,{href:t})}case Qe.ref:{const t=lr(r.reference);return void 0===t?void 0:cr(e.type,{reference:t})}case Qe.xref:{const t=lr(r.xref);if(void 0===t)return;const i=lr(r.reference)??"";return cr(e.type,{xref:t,reference:i})}case Qe.extref:{const t=lr(r.extref),i=lr(r.provider);if(void 0===t||void 0===i)return;const o=(Array.isArray(r.references)?r.references:[]).map(e=>lr(e)).filter(e=>void 0!==e);return cr(e.type,{extref:t,references:o,provider:i})}case Qe.footnote:case Qe.footnoteStar:{const i=t.normalizeChainValue?t.normalizeChainValue(r.content):Array.isArray(r.content)?r.content:[];return void 0===i?void 0:cr(e.type,{content:i})}case Qe.symbol:{const t=lr(r.src);if(void 0===t)return;return cr(e.type,{src:t,...or("symbol",r)})}case Qe.var:{const t=lr(r.name);return void 0===t?void 0:cr(e.type,{name:t})}case Qe.code:{const t=function(e){if(qt(e))return e.trim().toLowerCase()}(r.language);return void 0===t?cr(e.type):cr(e.type,{language:t})}case Qe.timer:{const t=r.duration;if(!function(e){return qt(e)&&e.trim().startsWith("P")}(t))return;const i=lr(r.name)??"";return cr(e.type,{name:i,duration:t.trim()})}case Qe.colorPicker:{const t=lr(r.propertyRef);return void 0===t?void 0:cr(e.type,{propertyRef:t})}case Qe.comment:{const t=lr(e.comment);return void 0===t?void 0:{type:e.type,comment:t}}default:return-1!==Rt.indexOf(e.type)?cr(e.type):void 0}var i}function ur(e,t={}){if(!Array.isArray(e))return[];let r=e.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.type);r=function(e){const t=e.find(e=>e.type===Qe.timer),r=e.find(e=>e.type===Qe.duration);return t&&r&&!nr(t).duration?e.map(e=>e===t?{...t,attrs:{...nr(t),duration:nr(r).duration}}:e):e}(r);const i=[];for(const e of r){const r=pr(e,t);r&&i.push(r)}return t.chainValue?1===i.length&&-1!==sr.indexOf(i[0].type)?[cr(i[0].type)]:1===i.length&&i[0].type===Qe.link?i:[]:function(e){const t=e=>e.attrs??{},r=e=>(e.type===Qe.highlight||e.type===Qe.userHighlight)&&!t(e).color,i=e=>e.type===Qe.textStyle&&Ht(t(e).color),o=e=>e.type===Qe.xref&&!t(e).reference,a=[];for(const t of e){if(t.type===Qe.ref){const e=a.findIndex(o);if(-1!==e){a.splice(e,0,t);continue}}a.push(t)}for(let e=0;e<a.length-1;e++)r(a[e])&&i(a[e+1])&&([a[e],a[e+1]]=[a[e+1],a[e]]);const s=a.filter(e=>e.type===Qe.symbol);return 0===s.length?a:[...a.filter(e=>e.type!==Qe.symbol),s[0]]}(i)}var dr=[Ze.noBulletList,Ze.bulletList,Ze.orderedList,Ze.orderedListRoman,Ze.orderedListRomanLower,Ze.letteredList,Ze.letteredListLower,Ze.taskList],mr=[Ze.orderedList,Ze.orderedListRoman,Ze.orderedListRomanLower],hr=[Ze.gap,Ze.select,Ze.highlight,Ze.mark],br=/(^|[\n\r\u2028\u2029])\t+/g,gr=e=>-1!==dr.indexOf(e.type),yr=e=>e.type===Ze.listItem||e.type===Ze.taskItem,fr=e=>-1!==hr.indexOf(e.type),kr=e=>!!e&&"object"==typeof e&&"string"==typeof e.type,xr=e=>Array.isArray(e.content)?e.content.filter(kr):[],vr=e=>e.attrs&&"object"==typeof e.attrs?e.attrs:{},Tr=e=>({type:Ze.paragraph,attrs:{},content:e}),_r=()=>({type:Ze.hardBreak}),Cr=e=>e?.type===Ze.hardBreak,wr=e=>e.some(e=>e.type!==Ze.hardBreak&&(e.type!==Ze.text||"string"==typeof e.text&&""!==e.text.trim()));function Ar(e){if(!e)return!0;if(e.type===Ze.hardBreak)return!0;if(e.type!==Ze.text)return!1;if(e.marks&&e.marks.length>0)return!1;const t=(e.text??"").charAt(0);return""===t||(r=t,!Dt.test(r));var r}function Br(e,t){if(e.type!==Ze.text||1!==e.marks?.length)return!1;const r=e.marks[0];if(r.type!==Qe.link)return!1;const i=r.attrs?.href;return Wt(i)&&function(e){return e.replace(/^(https?:\/\/|mailto:)/,"")}(i)===e.text&&Ar(t)}var Sr=[Ze.paragraph,Ze.heading,Ze.section,Ze.listItem,Ze.taskItem,Ze.codeBlock],Pr=class{constructor(e){l(this,"options"),this.options=e}normalize(e){if(!Array.isArray(e))return[];const t=e.filter(kr);return this.options.chainValue?this.inline(t,{plain:!0,chainValue:!0}):this.options.location===rt?t.flatMap(e=>this.inlineRootNode(e,{})):t.flatMap(e=>this.block(e))}block(e){switch(e.type){case Ze.paragraph:return[{...e,content:this.inline(xr(e))}];case Ze.heading:return this.heading(e);case Ze.section:return[Tr(this.inline(xr(e)))];case Ze.image:{const t=this.image(e);return t?[t]:[]}case Ze.codeBlock:return[{...e,content:this.code(xr(e))}];case Ze.text:case Ze.hardBreak:case Ze.imageInline:case Ze.latex:return this.inline([e]);default:return gr(e)?this.list(e):yr(e)?[Tr(this.inline(xr(e)))]:fr(e)?[e]:Array.isArray(e.content)?[{...e,content:this.blocks(xr(e))}]:[e]}}blocks(e){return e.flatMap(e=>this.block(e))}heading(e){const t=vr(e).level;if(null!=t&&!("number"==typeof(r=t)&&Number.isInteger(r)&&r>=1&&r<=3))return[Tr(this.inline(xr(e)))];var r;const i=this.inline(xr(e),{singleLine:!0});return wr(i)?[{...e,content:i}]:[]}image(e){const t=vr(e);var r;if("string"==typeof(r=t.src)&&zt.test(r))return{...e,attrs:{src:t.src,...or("image",t)}}}code(e){const t=[];for(const r of e)r.type===Ze.text?"string"==typeof r.text&&r.text&&t.push({type:Ze.text,text:r.text}):r.type===Ze.hardBreak?t.push(_r()):t.push(...this.code(xr(r)));return t}list(e){const t=vr(e),r=-1!==mr.indexOf(e.type);let i;if(r&&null!=t.start&&(i=Ut(t.start),void 0===i))return xr(e).map(e=>Tr(this.inline([e],{stripLeadingTabs:!0})));const o=[];for(const t of xr(e))yr(t)?o.push(...this.listItem(t)):o.push(...this.listItem({type:Ze.listItem,content:[t]}));if(0===o.length)return[];const a={...t};return r&&void 0!==i&&(a.start=i),[{...e,attrs:a,content:o}]}listItem(e){const t={stripLeadingTabs:!0},r={};let i;const o=[],a=e=>{r.para?e.length>0&&r.para.push(_r(),...e):r.para=e};for(const r of xr(e))if(gr(r))for(const t of this.list(r))t.type===Ze.paragraph?a(t.content??[]):i?o.push({...e,content:[Tr([]),t]}):i=t;else r.type===Ze.image||a(this.inline([r],t));const s=r.para??[];if(!wr(s)&&!i)return o;const n=[Tr(s)];return i&&n.push(i),[{...e,content:n},...o]}inlineRootNode(e,t){switch(e.type){case Ze.text:case Ze.hardBreak:case Ze.imageInline:case Ze.latex:return this.inline([e],t);case Ze.image:return[];default:return fr(e)?[e]:gr(e)?xr(e).map(e=>Tr(this.inline([e],{...t,stripLeadingTabs:!0}))):[Tr(this.inline(xr(e),t))]}}inline(e,t={}){const r=[],i=()=>t.singleLine?this.spaceText():_r(),o=()=>{r.length>0&&!Cr(r[r.length-1])&&r.push(i())};for(const a of e)switch(a.type){case Ze.text:{const e=this.text(a,t);e&&r.push(e);break}case Ze.hardBreak:r.push(i());break;case Ze.imageInline:{if(t.plain)break;const e=this.imageInline(a);e&&r.push(e);break}case Ze.latex:if(t.plain)break;"string"==typeof vr(a).formula&&r.push(a);break;case Ze.image:break;default:if(fr(a))r.push(a);else if(gr(a))for(const e of xr(a))o(),r.push(...this.inline([e],t));else-1!==Sr.indexOf(a.type)?(o(),r.push(...this.inline(xr(a),t))):Array.isArray(a.content)?r.push({...a,content:this.inline(xr(a),t)}):r.push(a)}return this.dropSymbolsBeforePipes(r)}dropSymbolsBeforePipes(e){for(let t=0;t<e.length;t++){const r=e[t];if(!r.marks?.some(e=>e.type===Qe.symbol))continue;let i=!1;for(let r=t+1;r<e.length&&!Cr(e[r]);r++){const t=e[r].text;if("string"!=typeof t)continue;if(-1!==t.split(/[\n\r\u2028\u2029]/,1)[0].indexOf("|")&&(i=!0),Mt(t))break}if(i){const i=r.marks.filter(e=>e.type!==Qe.symbol),{marks:o,...a}=r;e[t]=i.length>0?{...a,marks:i}:a}}return e}text(e,t){if("string"!=typeof e.text)return;let r=e.text;if(t.stripLeadingTabs&&(r=r.replace(br,"$1")),t.singleLine&&(r=r.replace(/[\n\r\u2028\u2029]+/g," ")),!r)return;const i=ur(e.marks,{chainValue:t.chainValue,normalizeChainValue:e=>this.chainValue(e)}),{marks:o,...a}=e;return i.length>0?{...a,text:r,marks:i}:{...a,text:r}}spaceText(){return{type:Ze.text,text:" "}}imageInline(e){const t=vr(e);if(!Wt(t.src))return;const r=t.alt;var i;return"string"==typeof(i=r)&&i.length>0&&-1===i.indexOf("==")&&!i.startsWith("=")&&!i.endsWith("=")?{...e,attrs:{src:t.src,alt:r,...or("imageInline",t)}}:void 0}chainValue(e){if(!Array.isArray(e))return[];const t=this.inline(e.filter(kr),{plain:!0,chainValue:!0,singleLine:!0});for(let e=0;e<t.length;e++){const r=t[e],i=r.text;if("string"==typeof i&&(-1!==i.indexOf("|")||Mt(i)))return;if(r.marks?.some(e=>e.type===Qe.link)&&!Br(r,t[e+1])){const{marks:i,...o}=r;t[e]=o}}return t}};var Ir={bodyBitCallback:void 0,debugGenerationInline:!1},Er=["*","`","_","!","="],Lr={[Qe.bold]:"**",[Qe.light]:"``",[Qe.italic]:"__",[Qe.highlight]:"!!"},Nr=[Qe.bold,Qe.light,Qe.italic,Qe.highlight],Vr=[Qe.highlightOrange,Qe.highlightYellow,Qe.highlightGreen,Qe.highlightBlue,Qe.highlightPurple,Qe.highlightPink,Qe.highlightBrown,Qe.highlightBlack,Qe.highlightWhite,Qe.highlightGray,Qe.strike,Qe.subscript,Qe.superscript,Qe.ins,Qe.del,Qe.underline,Qe.doubleUnderline,Qe.smallcaps,Qe.circle,Qe.languageEmRed,Qe.languageEmOrange,Qe.languageEmYellow,Qe.languageEmGreen,Qe.languageEmBlue,Qe.languageEmPurple,Qe.languageEmPink,Qe.languageEmBrown,Qe.languageEmBlack,Qe.languageEmWhite,Qe.languageEmGray,Qe.languageEm,Qe.userUnderline,Qe.userDoubleUnderline,Qe.userStrike,Qe.userCircle,Qe.userHighlight,Qe.notranslate,Qe.link,Qe.ref,Qe.xref,Qe.extref,Qe.footnote,Qe.footnoteStar,Qe.symbol,Qe.var,Qe.code,Qe.timer,Qe.color,Qe.textStyle,Qe.colorPicker,Qe.comment],Rr=new RegExp(/(\n|\r\n)/,"g"),Gr=new RegExp(/\]/,"g"),Fr=/^[^\n\r\u2028\u2029]*\|/,Kr="enter",$r="between",Or="exit",Jr=class e extends Lt{constructor(t,r){super(),l(this,"ast",new et),l(this,"bitmarkVersion"),l(this,"options"),l(this,"internalTextGenerator",null),l(this,"generateOptions",{}),l(this,"textFormat",S.bitmarkText),l(this,"textLocation",it),l(this,"writerText",""),l(this,"nodeIndex",0),l(this,"currentIndent",0),l(this,"prevIndent",0),l(this,"indentationStringCache",""),l(this,"inParagraph",!1),l(this,"inHeading",!1),l(this,"inCodeBlock",!1),l(this,"inBulletList",!1),l(this,"inInline",!1),l(this,"markDepth",0),l(this,"textDepth",0),l(this,"placeholderIndex",0),l(this,"placeholders",{}),l(this,"chainJustClosed",!1),l(this,"simpleLinkAllowed",!0),l(this,"rootParagraphNodeContentIndex",0),l(this,"previousRootParagraphContextType",Ze.text),l(this,"inPreText",!1),l(this,"thisNodeIsPreText",!1),l(this,"preTextIndexTemp",-1),l(this,"havePreText",!1),l(this,"preTextIndex",-1),this.bitmarkVersion=(0,Pt.Enum)(It).fromValue(t)??Et,this.options={...Ir,...r},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.bitmarkVersion,It.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),this.options.isInternal||(this.internalTextGenerator=new e(t,{...this.options,writeCallback:void 0,isInternal:!0}))}async generate(e,t,r,i){return this.generateSync(e,t,r,i)}generateSync(e,t,r,i){if(!e||!Array.isArray(e))return"";if(this.generateOptions=Object.assign({},i),e=function(e,t){return new Pr(t).normalize(e)}(e,{format:t??S.bitmarkText,location:r,chainValue:this.generateOptions.chainValueContext}),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const i=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,r),this.walkAndWrite(e),this.options.writeCallback=i,this.options.bodyBitCallback=o;const a=this.havePreText,s=this.preTextIndex;this.resetState(t,r),this.havePreText=a,this.preTextIndex=s,this.walkAndWrite(e)}else this.resetState(t,r),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=e??S.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.inBulletList=!1,this.inInline=!1,this.markDepth=0,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.chainJustClosed=!1,this.simpleLinkAllowed=!0,this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=Ze.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,Xe.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,r,i){return this.handleBetweenNode(e.value,t,r,i)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,r,i){this.handleBetweenContentValueNode(e,t,r,i)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,r,i){this.handleBetweenNode(e.value,t,r,i)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}enter_marks(e,t){this.markDepth++}exit_marks(e,t){this.markDepth--}handleEnterNode(e,t){if(!(this.markDepth>0))switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case Ze.paragraph:this.inParagraph=!0,this.writeParagraph(e,t);break;case Ze.hardBreak:this.writeHardBreak(e);break;case Ze.text:this.simpleLinkAllowed=this.isSimpleLinkAllowedAfter(t),this.writeMarks(e,Kr),this.writeText(e),this.writeMarks(e,$r),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case Ze.heading:this.writeHeading(e),this.inHeading=!0;break;case Ze.listItem:case Ze.taskItem:this.writeBullet(e,t);break;case Ze.image:case Ze.imageInline:this.writeImage(e);break;case Ze.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case Ze.latex:this.writeLatex(e);break;case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.inBulletList=!0;break;case Ze.gap:case Ze.select:case Ze.highlight:case Ze.mark:return this.writeBodyBit(e,t),!1}}handleBetweenNode(e,t,r,i){e.type}handleExitNode(e,t){if(!(this.markDepth>0)){switch(e.type){case Ze.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,Or);break;case Ze.paragraph:this.writeNL(),this.inParagraph=!1;break;case Ze.heading:this.inHeading=!1;case Ze.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case Ze.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1;break;case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}}handleIndent(e){switch(e.type){case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case Ze.noBulletList:case Ze.bulletList:case Ze.orderedList:case Ze.orderedListRoman:case Ze.orderedListRomanLower:case Ze.letteredList:case Ze.letteredListLower:case Ze.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=Ze.hardBreak)}handleBetweenContentValueNode(e,t,r,i){if(3===i.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===Ze.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===Ze.hardBreak)return;if(e.type===Ze.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===Ze.text&&e.marks){const t=e.marks.reduce((e,t)=>{if(t.type===Qe.link){const e=t,r=e.attrs?.href;if(r)return r}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 r=`[!${this.placeholderIndex}]`;if(this.placeholders[r]=e,this.options.bodyBitCallback){const r=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(r)}else this.write(r);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let r=e.text;const i=this.getLinkText(e);if(i&&(r=i),r=i||this.breakscape(r,{format:this.textFormat,location:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();r=r.replace(Rr,`$1${e}`)}if(this.chainJustClosed&&Fr.test(r)&&(r=`^${r}`),this.havePreText&&this.rootParagraphNodeContentIndex===this.preTextIndex&&(this.writePlainTextDivider(),this.writeNL()),this.havePreText&&this.rootParagraphNodeContentIndex>=this.preTextIndex){const t=this.breakscape(e.text,{format:S.plainText,location:this.textLocation});this.write(t)}else this.write(r);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==r||(this.thisNodeIsPreText=!1)}isSimpleLink(e){return this.simpleLinkAllowed&&Br(e,void 0)}isSimpleLinkAllowedAfter(e){return Ar(this.getSiblingNodes(e).right)}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){return(this.isSimpleLink(e)?t:e.text).replace(Gr,"^]")}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===It.v2)return"";if(this.textFormat===S.plainText)return"";const t=this.writerText.slice(-1),r=e.slice(0,1);return t===r&&-1!==Er.indexOf(t)||this.textLocation===it&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(r)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==Ze.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const r=this.generateOptions.forceInline||!(!this.inInline&&!this.inHeading),i=e.marks;if(0===i.length)return;this.thisNodeIsPreText=!1;const o=1===i.length&&r,a=i.reduce((e,t)=>e||(this.isStandardMark(t)?o?Lr[t.type]:"==":this.isInlineMark(t)?"==":e),void 0),s=this.isSimpleLink(e);if(null!=a&&!s){if(t!=Kr&&t!=$r||this.writeMarkTextWrapper(a),t==$r)for(const e of i)this.isStandardMark(e)?o||(this.writeInlineMarkStartEnd(),this.writeInlineMark(e)):Qe.comment===e.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(e)):Qe.link===e.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(e)):Qe.ref===e.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(e)):Qe.xref===e.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(e)):Qe.extref===e.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(e)):Qe.footnote===e.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(e)):Qe.footnoteStar===e.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(e)):Qe.symbol===e.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(e)):this.isInlineMark(e)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(e));if(t==Or){let e=!1;for(const t of i)this.isStandardMark(t)?o||(e=!0):(Qe.comment===t.type||Qe.link===t.type||Qe.ref===t.type||Qe.xref===t.type||Qe.footnote===t.type||Qe.footnoteStar===t.type||this.isInlineMark(t))&&(e=!0);e&&(this.writeInlineMarkStartEnd(),this.chainJustClosed=!0)}}}}writeParagraph(e,t){if(this.textFormat===S.bitmarkText){if(this.inBulletList)return;const r=this.getSiblingNodes(t),i=r.left?.type,o=this.textLocation===it,a=this.isEmptyParagraph(e);if(!o||!a&&i!==Ze.codeBlock&&i!==Ze.paragraph)return;this.write("|"),this.writeNL(),i===Ze.codeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){let t="";const r=e.attrs?.level??1;for(let e=0;e<+r;e++)t+="#";t+=" ",this.write(t)}writeBullet(e,t){let r=this.getIndentationString();const i=this.getParentNode(t,2),o=i?.value,a=o?.type,s=o?.attrs?.start??1;if(a===Ze.bulletList)r+="• ";else if(a===Ze.noBulletList)r+="•_ ";else if(a===Ze.orderedList)r+=`•${s} `;else if(a===Ze.orderedListRoman)r+=`•${s}I `;else if(a===Ze.orderedListRomanLower)r+=`•${s}i `;else if(a===Ze.letteredList)r+="•A ";else if(a===Ze.letteredListLower)r+="•a ";else if(a===Ze.taskList){const t=e;r+=!0===t.attrs?.checked?"•+ ":"•- "}r&&this.write(r)}writeImage(e){if(null==e.attrs||!e.attrs.src)return;const t=e.attrs,r=e.type===Ze.imageInline,i=r?"imageInline":"image",o=ar(i,t);let a="";r&&(a=`==${t.alt??""}==`),a+=`|${i}:${t.src}${o}|`,this.write(a)}writeCodeBlock(e){const t=Yt(e.attrs?.language??e.language)??"",r=t?`|code:${t}\n`:"|code\n";this.write(r)}writeLatex(e){if(null==e.attrs||!e.attrs.formula)return;const t=e.attrs,r=`==${this.breakscape(t.formula,{format:this.textFormat,location:this.textLocation})}==|latex|`;this.write(r)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){const t=e.attrs??{};let r;switch(e.type){case Qe.textStyle:case Qe.color:r=`color:${t.color??""}`;break;case Qe.timer:r=t.name?`timer:${t.name}`:"timer",r+=`|duration:${t.duration??""}`;break;case Qe.highlight:case Qe.userHighlight:r=t.color?`${e.type}|color:${t.color}`:`${e.type}`;break;default:r=`${e.type}`;for(const[e,i]of Object.entries(t))("language"===e&&"plain text"!==i||"propertyRef"===e||"name"===e)&&(r=`${r}:${i}`)}this.write(r)}isStandardMark(e){return-1!==Nr.indexOf(e.type)&&!(e.attrs&&e.attrs.color)}isInlineMark(e){return-1!==Vr.indexOf(e.type)||e.type===Qe.highlight&&!(!e.attrs||!e.attrs.color)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){const t=`link:${((e.attrs?.href||"")??"").replace(Gr,"^]")}`;this.write(t)}writeRefMark(e){const t=`►${e.attrs?.reference??""}`;this.write(t)}writeXRefMark(e){const t=e.attrs?.xref??"",r=e.attrs?.reference??"";let i=`xref:${t}`;r&&(i+=`|►${r}`),this.write(i)}writeExtRefMark(e){const t=e.attrs?.extref??"",r=e.attrs?.references??[],i=e.attrs?.provider??"";let o=`extref:${t}`;for(const e of r)o+=`|►${e??""}`;o+=`|provider:${i}`,this.write(o)}writeFootnoteMark(e){this.write("footnote:");const t=this.internalTextGenerator?.generateSync(e.attrs?.content,this.textFormat,this.textLocation,{...this.generateOptions,forceInline:!0,chainValueContext:!0})??"";this.write(t)}writeFootnoteStarMark(e){this.write("footnote*:");const t=this.internalTextGenerator?.generateSync(e.attrs?.content,this.textFormat,this.textLocation,{...this.generateOptions,forceInline:!0,chainValueContext:!0})??"";this.write(t)}writeSymbolMark(e){const t=e.attrs??{},r=`symbol:${t.src??""}${ar("symbol",t)}`;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 r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}breakscape(e,t){return this.generateOptions.noBreakscaping?e:_t.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.bitType}}write(e){return e=this.getInterTextBreakscape(e)+e,this.chainJustClosed=!1,this.options.writeCallback&&this.options.writeCallback(e),this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const r of e)this.write(`${r}${t??""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}};function Dr(e){return"string"!=typeof e?null:_t.unbreakscape(e)}function zr(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach(t=>{zr(e[t])}))}function jr(e){const t=e=>e&&"text"===e.type&&!e.text;function r(e){for(let i=e.length-1;i>=0;i--){const o=e[i];t(o)?e.splice(i,1):o&&Array.isArray(o.content)&&r(o.content)}}return Array.isArray(e)?r(e):e&&Array.isArray(e.content)&&r(e.content),e}function qr(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):Hr(e,{startRule:"bitmarkPlusString"})}var Mr=class extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,i="".padEnd(a.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+a.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function a(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const n={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(((c=t)?'"'+a(c)+'"':"end of input")+" found.");var c}};function Hr(e,t){const r={},i=(t=void 0!==t?t:{}).grammarSource,o={version:la,bitmarkPlusPlus:function(){let e,t;if(ea++,e=[],t=ca(),t!==r)for(;t!==r;)e.push(t),t=ca();else e=r;e===r&&(e=function(){let e,t;return e=Uo,t="",Wo=e,t=[],e=t,e}());ea--,e===r&&(t=r,0===ea&&sa(Wt));return e},bitmarkPlus:function(){let e,t;return ea++,e=Uo,t=Fa(),Wo=e,t=Mo(t),e=t,ea--,e},bitmarkMinusMinus:function(){let e,t;return ea++,e=Uo,t=Ha(),Wo=e,t=Ho(t),e=t,ea--,e},bitmarkPlusString:function(){let e;return ea++,e=Fa(),ea--,e},bitmarkMinusMinusString:Ha};let a=la;const s="|",n="### ",l="## ",c="# ",p="code",u=":",d="bitmark++",m="bitmark--",h="JavaScript",b="• ",g="•_ ",y="•",f=" ",k="I ",x="i ",v="•A ",T="•a ",_="•+ ",C="•- ",w="\t",A="image",B="#",S="@",P="width",I="height",E="alignment",L="captionAlign",N="left",V="center",R="right",G="alt",F="caption",K="zoomDisabled",$="true",O="false",J="=",D="|latex|",z="|imageInline:",j="srcAlt",q="alignmentVertical",M="size",H="top",U="middle",W="bottom",Y="baseline",Q="sub",Z="super",X="text-bottom",ee="text-top",te="line-height",re="font-height",ie="explicit",oe="link:",ae="extref:",se="provider:",ne="xref:",le="►",ce="symbol:",pe="footnote:",ue="footnote*:",de="var:",me="code:",he="timer",be="duration:",ge="P",ye="timer:",fe="highlight",ke="color:",xe="userHighlight",ve="colorPicker:",Te="|►",_e="bold",Ce="italic",we="light",Ae="highlightOrange",Be="highlightYellow",Se="highlightGreen",Pe="highlightBlue",Ie="highlightPurple",Ee="highlightPink",Le="highlightBrown",Ne="highlightBlack",Ve="highlightWhite",Re="highlightGray",Ge="strike",Fe="subscript",Ke="superscript",$e="ins",Oe="del",Je="underline",De="doubleUnderline",ze="smallcaps",je="circle",qe="languageEmRed",Me="languageEmOrange",He="languageEmYellow",Ue="languageEmGreen",We="languageEmBlue",Ye="languageEmPurple",Qe="languageEmPink",Ze="languageEmBrown",Xe="languageEmBlack",et="languageEmWhite",tt="languageEmGray",rt="languageEm",it="userUnderline",ot="userDoubleUnderline",at="userStrike",st="userCircle",nt="notranslate",lt="aqua",ct="black",pt="blue",ut="brown",dt="fuchsia",mt="lightgrey",ht="gray",bt="darkgray",gt="green",yt="lime",ft="magenta",kt="maroon",xt="navy",vt="olive",Tt="orange",_t="pink",Ct="purple",wt="red",At="silver",Bt="teal",St="violet",Pt="white",It="yellow",Et="*",Lt="_",Nt="`",Vt="!",Rt="[!",Gt="]",Ft="\n",Kt="\r\n",$t="http",Ot="s",Jt="://",Dt="mailto:",zt=/^[ \t]/,jt=/^[0-9]/,qt=/^[\r\u2028-\u2029]/,Mt=/^[^\n\r\u2028\u2029]/,Ht=/^[!#-;=?-[\]-_a-{}-~]/,Ut={type:"any"},Wt=ia("StyledText"),Yt=ta("|",!1),Qt=ta("### ",!1),Zt=ta("## ",!1),Xt=ta("# ",!1),er=ta("code",!1),tr=ra([" ","\t"],!1,!1,!1),rr=ta(":",!1),ir=ta("bitmark++",!1),or=ta("bitmark--",!1),ar=ta("JavaScript",!1),sr=ta("• ",!1),nr=ta("•_ ",!1),lr=ta("•",!1),cr=ra([["0","9"]],!1,!1,!1),pr=ta(" ",!1),ur=ta("I ",!1),dr=ta("i ",!1),mr=ta("•A ",!1),hr=ta("•a ",!1),br=ta("•+ ",!1),gr=ta("•- ",!1),yr=ta("\t",!1),fr=ta("image",!1),kr=ta("#",!1),xr=ta("@",!1),vr=ta("width",!1),Tr=ta("height",!1),_r=ta("alignment",!1),Cr=ta("captionAlign",!1),wr=ta("left",!1),Ar=ta("center",!1),Br=ta("right",!1),Sr=ta("alt",!1),Pr=ta("caption",!1),Ir=ta("zoomDisabled",!1),Er=ta("true",!1),Lr=ta("false",!1),Nr=ta("=",!1),Vr=ta("|latex|",!1),Rr=ta("|imageInline:",!1),Gr=ta("srcAlt",!1),Fr=ta("alignmentVertical",!1),Kr=ta("size",!1),$r=ta("top",!1),Or=ta("middle",!1),Jr=ta("bottom",!1),Hr=ta("baseline",!1),Ur=ta("sub",!1),Wr=ta("super",!1),Yr=ta("text-bottom",!1),Qr=ta("text-top",!1),Zr=ta("line-height",!1),Xr=ta("font-height",!1),ei=ta("explicit",!1),ti=ta("link:",!1),ri=ta("extref:",!1),ii=ta("provider:",!1),oi=ta("xref:",!1),ai=ta("►",!1),si=ta("symbol:",!1),ni=ta("footnote:",!1),li=ta("footnote*:",!1),ci=ta("var:",!1),pi=ta("code:",!1),ui=ta("timer",!1),di=ta("duration:",!1),mi=ta("P",!1),hi=ta("timer:",!1),bi=ta("highlight",!1),gi=ta("color:",!1),yi=ta("userHighlight",!1),fi=ta("colorPicker:",!1),ki=ta("|►",!1),xi=ta("bold",!1),vi=ta("italic",!1),Ti=ta("light",!1),_i=ta("highlightOrange",!1),Ci=ta("highlightYellow",!1),wi=ta("highlightGreen",!1),Ai=ta("highlightBlue",!1),Bi=ta("highlightPurple",!1),Si=ta("highlightPink",!1),Pi=ta("highlightBrown",!1),Ii=ta("highlightBlack",!1),Ei=ta("highlightWhite",!1),Li=ta("highlightGray",!1),Ni=ta("strike",!1),Vi=ta("subscript",!1),Ri=ta("superscript",!1),Gi=ta("ins",!1),Fi=ta("del",!1),Ki=ta("underline",!1),$i=ta("doubleUnderline",!1),Oi=ta("smallcaps",!1),Ji=ta("circle",!1),Di=ta("languageEmRed",!1),zi=ta("languageEmOrange",!1),ji=ta("languageEmYellow",!1),qi=ta("languageEmGreen",!1),Mi=ta("languageEmBlue",!1),Hi=ta("languageEmPurple",!1),Ui=ta("languageEmPink",!1),Wi=ta("languageEmBrown",!1),Yi=ta("languageEmBlack",!1),Qi=ta("languageEmWhite",!1),Zi=ta("languageEmGray",!1),Xi=ta("languageEm",!1),eo=ta("userUnderline",!1),to=ta("userDoubleUnderline",!1),ro=ta("userStrike",!1),io=ta("userCircle",!1),oo=ta("notranslate",!1),ao=ta("aqua",!1),so=ta("black",!1),no=ta("blue",!1),lo=ta("brown",!1),co=ta("fuchsia",!1),po=ta("lightgrey",!1),uo=ta("gray",!1),mo=ta("darkgray",!1),ho=ta("green",!1),bo=ta("lime",!1),go=ta("magenta",!1),yo=ta("maroon",!1),fo=ta("navy",!1),ko=ta("olive",!1),xo=ta("orange",!1),vo=ta("pink",!1),To=ta("purple",!1),_o=ta("red",!1),Co=ta("silver",!1),wo=ta("teal",!1),Ao=ta("violet",!1),Bo=ta("white",!1),So=ta("yellow",!1),Po=ta("*",!1),Io=ta("_",!1),Eo=ta("`",!1),Lo=ta("!",!1),No=ta("[!",!1),Vo=ta("]",!1),Ro=ia("Line Terminator"),Go=ta("\n",!1),Fo=ta("\r\n",!1),Ko=ra(["\r",["\u2028","\u2029"]],!1,!1,!1),$o=ra(["\n","\r","\u2028","\u2029"],!0,!1,!1),Oo=ta("http",!1),Jo=ta("s",!1),Do=ta("://",!1),zo=ta("mailto:",!1),jo=ra(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1,!1);function qo(e){let t={...e};zr(t);return jr(t)}function Mo(e){return[{type:"paragraph",content:e,attrs:{}}]}function Ho(e){return[{type:"paragraph",content:e,attrs:{}}]}let Uo=0|t.peg$currPos,Wo=Uo;const Yo=[{line:1,column:1}];let Qo,Zo=Uo,Xo=t.peg$maxFailExpected||[],ea=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function ta(e,t){return{type:"literal",text:e,ignoreCase:t}}function ra(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function ia(e){return{type:"other",description:e}}function oa(t){let r,i=Yo[t];if(i)return i;if(t>=Yo.length)r=Yo.length-1;else for(r=t;!Yo[--r];);for(i=Yo[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Yo[t]=i,i}function aa(e,t,r){const o=oa(e),a=oa(t),s={source:i,start:{offset:e,line:o.line,column:o.column},end:{offset:t,line:a.line,column:a.column}};return r&&i&&"function"==typeof i.offset&&(s.start=i.offset(s.start),s.end=i.offset(s.end)),s}function sa(e){Uo<Zo||(Uo>Zo&&(Zo=Uo,Xo=[]),Xo.push(e))}function na(e,t,r){return new Mr(Mr.buildMessage(e,t),e,t,r)}function la(){let t,i,o;for(t=Uo,i=[],e.length>Uo?(o=e.charAt(Uo),Uo++):(o=r,0===ea&&sa(Ut));o!==r;)i.push(o),e.length>Uo?(o=e.charAt(Uo),Uo++):(o=r,0===ea&&sa(Ut));return Wo=t,i="8.41.1",t=i,t}function ca(){let t,i;var o;return t=Uo,i=function(){let t,i,o,a,s;if(t=Uo,i=da(),i!==r){for(o=Uo,a=[],s=ls();s!==r;)a.push(s),s=ls();o=e.substring(o,Uo),a=cs(),a!==r?(s=ns(),s===r&&(s=null),Wo=t,n=i,t={type:"heading",content:qr(o),attrs:{level:n.length-1}}):(Uo=t,t=r)}else Uo=t,t=r;var n;return t}(),i!==r&&(Wo=t,o=i,i=jr({...o})),t=i,t===r&&(t=Uo,i=function(){let e,t,i,o;if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=ga(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"bulletList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,a=t,s=i,e={...a,content:s,attrs:{}}):(Uo=e,e=r)}else Uo=e,e=r;var a,s;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=ya(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"noBulletList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=fa(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"orderedList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=ka(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"orderedListRoman"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=xa(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"orderedListRomanLower"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,attrs:{start:t[0]._tempListStart},content:t}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=va(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"letteredList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r){if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=Ta(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"letteredListLower"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r;if(e===r)if(e=Uo,t=function(){let e,t,i;e=Uo,t=Uo,ea++,i=_a(),ea--,i!==r?(Uo=t,t=void 0):t=r;t!==r&&(Wo=e,t={type:"taskList"});return e=t,e}(),t!==r){if(i=[],o=wa(),o!==r)for(;o!==r;)i.push(o),o=wa();else i=r;i!==r?(o=ns(),o===r&&(o=null),Wo=e,e=function(e,t){return{...e,content:t,attrs:{}}}(t,i)):(Uo=e,e=r)}else Uo=e,e=r}}}}}}return e}(),i!==r&&(Wo=t,i=qo(i)),t=i,t===r&&(t=Uo,i=La(),i!==r&&(Wo=t,i=function(e){return{...e}}(i)),t=i,t===r&&(t=Uo,i=function(){let t,i,o;t=Uo,i=ha(),i!==r?(o=function(){let t,i,o,a;t=Uo,i=Uo,o=[],a=ba();for(;a!==r;)o.push(a),a=ba();return i=e.substring(i,Uo),Wo=t,i=function(e){return[{type:"text",text:Dr(e.trim())}]}(i),t=i,t}(),Wo=t,t=function(e,t){return{...e,content:t}}(i,o)):(Uo=t,t=r);return t}(),i!==r&&(Wo=t,i=function(e){return{...e}}(i)),t=i,t===r&&(t=Uo,i=function(){let e,t,i;e=Uo,t=Uo,ea++,i=pa(),ea--,i===r?t=void 0:(Uo=t,t=r);t!==r?(i=Sa(),i!==r?(Wo=e,e={type:"paragraph",content:qr(i.trim()),attrs:{}}):(Uo=e,e=r)):(Uo=e,e=r);e===r&&(e=Uo,t=Ia(),t!==r?(i=Sa(),i!==r?(Wo=e,e=function(e){return{type:"paragraph",content:qr(e.trim()),attrs:{}}}(i)):(Uo=e,e=r)):(Uo=e,e=r),e===r&&(e=Uo,t=Ia(),t!==r?(i="",Wo=e,e=function(e){return{type:"paragraph",content:qr(e.trim()),attrs:{}}}(i)):(Uo=e,e=r)));return e}(),i!==r&&(Wo=t,i=function(e){return jr({...e})}(i)),t=i)))),t}function pa(){let e;return e=da(),e===r&&(e=Ca(),e===r&&(e=La(),e===r&&(e=ha(),e===r&&(e=Ia())))),e}function ua(){let t;return 124===e.charCodeAt(Uo)?(t=s,Uo++):(t=r,0===ea&&sa(Yt)),t}function da(){let t;return e.substr(Uo,4)===n?(t=n,Uo+=4):(t=r,0===ea&&sa(Qt)),t===r&&(e.substr(Uo,3)===l?(t=l,Uo+=3):(t=r,0===ea&&sa(Zt)),t===r&&(e.substr(Uo,2)===c?(t=c,Uo+=2):(t=r,0===ea&&sa(Xt)))),t}function ma(){let t,i,o;return t=Uo,i=ua(),i!==r?(o=function(){let t;return e.substr(Uo,4)===p?(t=p,Uo+=4):(t=r,0===ea&&sa(er)),t}(),o!==r?(Wo=t,t=o):(Uo=t,t=r)):(Uo=t,t=r),t}function ha(){let t,i,o,a,s,n,l,c;if(t=Uo,i=ma(),i!==r){for(o=Uo,a=Uo,s=[],n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(tr));n!==r;)s.push(n),n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(tr));n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(Wo=t,t={type:"codeBlock",language:""}):(Uo=t,t=r)}else Uo=t,t=r;if(t===r)if(t=Uo,i=ma(),i!==r)if(58===e.charCodeAt(Uo)?(o=u,Uo++):(o=r,0===ea&&sa(rr)),o!==r)if(a=function(){let t,i,o;e.substr(Uo,9)===d?(t=d,Uo+=9):(t=r,0===ea&&sa(ir));if(t===r&&(e.substr(Uo,9)===m?(t=m,Uo+=9):(t=r,0===ea&&sa(or)),t===r&&(e.substr(Uo,10)===h?(t=h,Uo+=10):(t=r,0===ea&&sa(ar)),t===r))){if(t=Uo,i=[],o=ls(),o!==r)for(;o!==r;)i.push(o),o=ls();else i=r;t=i!==r?e.substring(t,Uo):i,t===r&&(t="")}return t}(),a!==r){for(s=Uo,n=Uo,l=[],c=e.charAt(Uo),zt.test(c)?Uo++:(c=r,0===ea&&sa(tr));c!==r;)l.push(c),c=e.charAt(Uo),zt.test(c)?Uo++:(c=r,0===ea&&sa(tr));c=cs(),c!==r?(l=[l,c],n=l):(Uo=n,n=r),s=n!==r?e.substring(s,Uo):n,s!==r?(Wo=t,t={type:"codeBlock",attrs:{language:a.trim().toLowerCase()}}):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;return t}function ba(){let t,i,o,a,s,n;if(t=Uo,i=Uo,ea++,o=pa(),ea--,o===r?i=void 0:(Uo=i,i=r),i!==r){if(o=Uo,a=Uo,s=[],n=ls(),n!==r)for(;n!==r;)s.push(n),n=ls();else s=r;s!==r?(n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(Wo=t,t=o):(Uo=t,t=r)}else Uo=t,t=r;return t===r&&(t=ns()),t}function ga(){let t;return e.substr(Uo,2)===b?(t=b,Uo+=2):(t=r,0===ea&&sa(sr)),t}function ya(){let t;return e.substr(Uo,3)===g?(t=g,Uo+=3):(t=r,0===ea&&sa(nr)),t}function fa(){let t,i,o,a,s;if(t=Uo,i=Uo,8226===e.charCodeAt(Uo)?(o=y,Uo++):(o=r,0===ea&&sa(lr)),o!==r){if(a=[],s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr));else a=r;a!==r?(32===e.charCodeAt(Uo)?(s=f,Uo++):(s=r,0===ea&&sa(pr)),s!==r?(o=[o,a,s],i=o):(Uo=i,i=r)):(Uo=i,i=r)}else Uo=i,i=r;return t=i!==r?e.substring(t,Uo):i,t}function ka(){let t,i,o,a,s;if(t=Uo,i=Uo,8226===e.charCodeAt(Uo)?(o=y,Uo++):(o=r,0===ea&&sa(lr)),o!==r){if(a=[],s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr));else a=r;a!==r?(e.substr(Uo,2)===k?(s=k,Uo+=2):(s=r,0===ea&&sa(ur)),s!==r?(o=[o,a,s],i=o):(Uo=i,i=r)):(Uo=i,i=r)}else Uo=i,i=r;return t=i!==r?e.substring(t,Uo):i,t}function xa(){let t,i,o,a,s;if(t=Uo,i=Uo,8226===e.charCodeAt(Uo)?(o=y,Uo++):(o=r,0===ea&&sa(lr)),o!==r){if(a=[],s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr));else a=r;a!==r?(e.substr(Uo,2)===x?(s=x,Uo+=2):(s=r,0===ea&&sa(dr)),s!==r?(o=[o,a,s],i=o):(Uo=i,i=r)):(Uo=i,i=r)}else Uo=i,i=r;return t=i!==r?e.substring(t,Uo):i,t}function va(){let t;return e.substr(Uo,3)===v?(t=v,Uo+=3):(t=r,0===ea&&sa(mr)),t}function Ta(){let t;return e.substr(Uo,3)===T?(t=T,Uo+=3):(t=r,0===ea&&sa(hr)),t}function _a(){let t;return e.substr(Uo,3)===_?(t=_,Uo+=3):(t=r,0===ea&&sa(br)),t===r&&(e.substr(Uo,3)===C?(t=C,Uo+=3):(t=r,0===ea&&sa(gr))),t}function Ca(){let e;return e=ga(),e===r&&(e=ya(),e===r&&(e=fa(),e===r&&(e=ka(),e===r&&(e=xa(),e===r&&(e=va(),e===r&&(e=Ta(),e===r&&(e=_a()))))))),e}function wa(){let t,i,o,a,s,n,l,c,p;if(t=Uo,i=Ba(),i!==r)if(o=Ca(),o!==r){for(a=Uo,s=Uo,n=[],l=Uo,c=Uo,ea++,p=ns(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(e.length>Uo?(p=e.charAt(Uo),Uo++):(p=r,0===ea&&sa(Ut)),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);l!==r;)n.push(l),l=Uo,c=Uo,ea++,p=ns(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(e.length>Uo?(p=e.charAt(Uo),Uo++):(p=r,0===ea&&sa(Ut)),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);for(l=ns(),l===r&&(l=null),n=[n,l],s=n,a=e.substring(a,Uo),s=[],n=Aa();n!==r;)s.push(n),n=Aa();if(n=Uo,l=function(){let t,i,o,a;t=Uo,ea++,i=Uo,o=[],9===e.charCodeAt(Uo)?(a=w,Uo++):(a=r,0===ea&&sa(yr));if(a!==r)for(;a!==r;)o.push(a),9===e.charCodeAt(Uo)?(a=w,Uo++):(a=r,0===ea&&sa(yr));else o=r;o!==r?(Wo=Uo,a=o.length>ms.length,a=a?void 0:r,a!==r?(Wo=i,i=function(e){ds.push(ms),ms=e.join("")}(o)):(Uo=i,i=r)):(Uo=i,i=r);ea--,i!==r?(Uo=t,t=void 0):t=r;return t}(),l!==r){for(c=[],p=wa();p!==r;)c.push(p),p=wa();p=function(){let e;Wo=Uo,e=function(){return ms=ds.pop(),!0}(),e=e?void 0:r;return e}(),p!==r?(Wo=n,n=c):(Uo=n,n=r)}else Uo=n,n=r;n===r&&(n=null),Wo=t,t=function(e,t,r,i){let o="bulletList";const a=e.match(/•([0-9]+)([Ii]?) /);let s=1;if(a&&(o="orderedList",a.length>1&&(s=Number(a[1])),a.length>2)){let e=a[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 n=[{type:"paragraph",attrs:{},content:qr((t+r.join("")).trim())}];if(i&&i[0]&&i[0]._tempParsingParent){let e={type:i[0]._tempParsingParent,attrs:{start:s},content:i};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&i[0]._tempListStart){const t=i[0]._tempListStart;t>1&&(e.attrs.start=t)}n.push(e)}let l="listItem",c=null;if("taskList"==o){l="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:l,attrs:c,content:n,_tempParsingParent:o,_tempListStart:s}:{type:l,content:n,_tempParsingParent:o,_tempListStart:s}}(o,a,s,n)}else Uo=t,t=r;else Uo=t,t=r;return t}function Aa(){let t,i,o,a,s,n,l,c,p,u;if(t=Uo,i=Uo,ea++,o=function(){let t,i,o;t=Uo,i=[],o=e.charAt(Uo),zt.test(o)?Uo++:(o=r,0===ea&&sa(tr));for(;o!==r;)i.push(o),o=e.charAt(Uo),zt.test(o)?Uo++:(o=r,0===ea&&sa(tr));o=ns(),o!==r?(i=[i,o],t=i):(Uo=t,t=r);return t}(),ea--,o===r?i=void 0:(Uo=i,i=r),i!==r)if(o=Ba(),o!==r)if(a=Uo,ea++,s=Ca(),ea--,s===r?a=void 0:(Uo=a,a=r),a!==r){if(s=Uo,n=Uo,l=[],c=Uo,p=Uo,ea++,u=ns(),ea--,u===r?p=void 0:(Uo=p,p=r),p!==r?(e.length>Uo?(u=e.charAt(Uo),Uo++):(u=r,0===ea&&sa(Ut)),u!==r?(p=[p,u],c=p):(Uo=c,c=r)):(Uo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Uo,p=Uo,ea++,u=ns(),ea--,u===r?p=void 0:(Uo=p,p=r),p!==r?(e.length>Uo?(u=e.charAt(Uo),Uo++):(u=r,0===ea&&sa(Ut)),u!==r?(p=[p,u],c=p):(Uo=c,c=r)):(Uo=c,c=r);else l=r;l!==r?(c=cs(),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r),s=n!==r?e.substring(s,Uo):n,s!==r?(Wo=t,t=s):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;return t}function Ba(){let t,i,o;for(t=Uo,i=[],9===e.charCodeAt(Uo)?(o=w,Uo++):(o=r,0===ea&&sa(yr));o!==r;)i.push(o),9===e.charCodeAt(Uo)?(o=w,Uo++):(o=r,0===ea&&sa(yr));return Wo=Uo,o=i.join("")===ms,o=o?void 0:r,o!==r?(i=[i,o],t=i):(Uo=t,t=r),t}function Sa(){let t,i,o;if(t=Uo,i=[],o=Pa(),o!==r)for(;o!==r;)i.push(o),o=Pa();else i=r;return t=i!==r?e.substring(t,Uo):i,t}function Pa(){let t,i,o,a,s,n;if(t=Uo,i=Uo,ea++,o=pa(),ea--,o===r?i=void 0:(Uo=i,i=r),i!==r){if(o=Uo,a=Uo,s=[],n=ls(),n!==r)for(;n!==r;)s.push(n),n=ls();else s=r;s!==r?(n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(i=[i,o],t=i):(Uo=t,t=r)}else Uo=t,t=r;return t===r&&(t=ns()),t}function Ia(){let t,i,o,a,s,n;if(t=Uo,i=ua(),i!==r){for(o=Uo,a=Uo,s=[],n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(tr));n!==r;)s.push(n),n=e.charAt(Uo),zt.test(n)?Uo++:(n=r,0===ea&&sa(tr));n=cs(),n!==r?(s=[s,n],a=s):(Uo=a,a=r),o=a!==r?e.substring(o,Uo):a,o!==r?(a=ns(),a===r&&(a=null),i=[i,o,a],t=i):(Uo=t,t=r)}else Uo=t,t=r;return t}function Ea(){let t,i,o;return t=Uo,i=ua(),i!==r?(o=function(){let t;return e.substr(Uo,5)===A?(t=A,Uo+=5):(t=r,0===ea&&sa(fr)),t}(),o!==r?(Wo=t,t=o):(Uo=t,t=r)):(Uo=t,t=r),t}function La(){let t,i,o,a,s,n,l,c,p,d,m,h;if(t=Uo,i=Ea(),i!==r)if(58===e.charCodeAt(Uo)?(o=u,Uo++):(o=r,0===ea&&sa(rr)),o!==r)if(32===e.charCodeAt(Uo)?(a=f,Uo++):(a=r,0===ea&&sa(pr)),a===r&&(a=null),s=function(){let t,i,o,a,s,n,l,c,p;t=Uo,i=Uo,e.substr(Uo,4)===$t?(o=$t,Uo+=4):(o=r,0===ea&&sa(Oo));if(o!==r)if(115===e.charCodeAt(Uo)?(a=Ot,Uo++):(a=r,0===ea&&sa(Jo)),a===r&&(a=null),e.substr(Uo,3)===Jt?(s=Jt,Uo+=3):(s=r,0===ea&&sa(Do)),s!==r){for(n=[],l=Uo,c=Uo,ea++,p=ua(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(p=us(),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);l!==r;)n.push(l),l=Uo,c=Uo,ea++,p=ua(),ea--,p===r?c=void 0:(Uo=c,c=r),c!==r?(p=us(),p!==r?(c=[c,p],l=c):(Uo=l,l=r)):(Uo=l,l=r);o=[o,a,s,n],i=o}else Uo=i,i=r;else Uo=i,i=r;t=i!==r?e.substring(t,Uo):i;return t}(),s!==r){for(n=[],32===e.charCodeAt(Uo)?(l=f,Uo++):(l=r,0===ea&&sa(pr));l!==r;)n.push(l),32===e.charCodeAt(Uo)?(l=f,Uo++):(l=r,0===ea&&sa(pr));if(l=ua(),l!==r){for(c=Na(),p=Uo,d=Uo,m=[],h=e.charAt(Uo),zt.test(h)?Uo++:(h=r,0===ea&&sa(tr));h!==r;)m.push(h),h=e.charAt(Uo),zt.test(h)?Uo++:(h=r,0===ea&&sa(tr));h=cs(),h!==r?(m=[m,h],d=m):(Uo=d,d=r),p=d!==r?e.substring(p,Uo):d,p!==r?(d=ns(),d===r&&(d=null),Wo=t,t=function(e,t,r){const i=Object.assign({},...r);let o=i.alignment||"center";delete i.alignment;let a=i.captionAlign||"left";delete i.captionAlign;let s=i.alt||null;delete i.alt;let n=i.caption||null;delete i.caption;let l=i.align||"center";delete i.align;let c=void 0===i.zoomDisabled||("boolean"==typeof i.zoomDisabled?i.zoomDisabled:"true"===String(i.zoomDisabled).toLowerCase());return delete i.zoomDisabled,{type:e,attrs:{alignment:o,textAlign:a,src:t,alt:Dr(s),title:Dr(n),class:l,zoomDisabled:c,...i}}}(i,s,c)):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;return t}function Na(){let e,t,i;for(e=Uo,t=[],i=Va();i!==r;)t.push(i),i=Va();return Wo=e,e=t,e}function Va(){let t,i,o,a,s,n,l,c,p,d;if(t=Uo,35===e.charCodeAt(Uo)?(i=B,Uo++):(i=r,0===ea&&sa(kr)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={comment:o.trim()}):(Uo=t,t=r)}else Uo=t,t=r;var m,h;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));if(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),jt.test(d)?Uo++:(d=r,0===ea&&sa(cr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),jt.test(d)?Uo++:(d=r,0===ea&&sa(cr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);else l=r;if(n=l!==r?e.substring(n,Uo):l,n!==r){for(l=[],32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(pr));c!==r;)l.push(c),32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(pr));c=ua(),c!==r?(Wo=t,m=o,h=n,t={[m]:parseInt(h)}):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=function(){let t;e.substr(Uo,3)===G?(t=G,Uo+=3):(t=r,0===ea&&sa(Sr));t===r&&(e.substr(Uo,7)===F?(t=F,Uo+=7):(t=r,0===ea&&sa(Pr)));return t}(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));for(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:t.trim()}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=function(){let t;e.substr(Uo,9)===E?(t=E,Uo+=9):(t=r,0===ea&&sa(_r));t===r&&(e.substr(Uo,12)===L?(t=L,Uo+=12):(t=r,0===ea&&sa(Cr)));return t}(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));if(n=function(){let t;e.substr(Uo,4)===N?(t=N,Uo+=4):(t=r,0===ea&&sa(wr));t===r&&(e.substr(Uo,6)===V?(t=V,Uo+=6):(t=r,0===ea&&sa(Ar)),t===r&&(e.substr(Uo,5)===R?(t=R,Uo+=5):(t=r,0===ea&&sa(Br))));return t}(),n!==r){for(l=[],32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(pr));c!==r;)l.push(c),32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(pr));c=ua(),c!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=Ga(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));if(n=function(){let t;e.substr(Uo,4)===$?(t=$,Uo+=4):(t=r,0===ea&&sa(Er));t===r&&(e.substr(Uo,5)===O?(t=O,Uo+=5):(t=r,0===ea&&sa(Lr)));return t}(),n!==r){for(l=[],32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(pr));c!==r;)l.push(c),32===e.charCodeAt(Uo)?(c=f,Uo++):(c=r,0===ea&&sa(pr));c=ua(),c!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=Ga(),o!==r){for(a=[],32===e.charCodeAt(Uo)?(s=f,Uo++):(s=r,0===ea&&sa(pr));s!==r;)a.push(s),32===e.charCodeAt(Uo)?(s=f,Uo++):(s=r,0===ea&&sa(pr));s=ua(),s!==r?(Wo=t,t=function(e){return{[e]:!0}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r&&(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=ua(),o!==r?(Wo=t,t=void 0):(Uo=t,t=r),t===r)){for(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{error:"Found unknown property or invalid value: "+e}}(o)):(Uo=t,t=r)}}}}}}return t}function Ra(){let t;return e.substr(Uo,5)===P?(t=P,Uo+=5):(t=r,0===ea&&sa(vr)),t===r&&(e.substr(Uo,6)===I?(t=I,Uo+=6):(t=r,0===ea&&sa(Tr))),t}function Ga(){let t;return e.substr(Uo,12)===K?(t=K,Uo+=12):(t=r,0===ea&&sa(Ir)),t}function Fa(){let e,t,i,o;for(e=Uo,t=Ka(),t===r&&(t=null),i=[],o=Ja(),o===r&&(o=Ka());o!==r;)i.push(o),o=Ja(),o===r&&(o=Ka());var a,s;return Wo=e,s=i,e=jr((a=t)?[a,...s.flat()]:s.flat()),e}function Ka(){let t,i,o,a,s,n,l;if(t=Uo,i=ns(),i!==r&&(Wo=t,i={type:"hardBreak"}),t=i,t===r){if(t=Uo,i=Uo,o=[],a=Uo,s=Da(),s===r&&(s=null),n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=Da(),s!==r?(n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r)),a!==r)for(;a!==r;)o.push(a),a=Uo,s=Da(),s===r&&(s=null),n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=Da(),s!==r?(n=Uo,ea++,l=Ja(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r));else o=r;i=o!==r?e.substring(i,Uo):o,i!==r&&(Wo=t,i={text:Dr(i),type:"text"}),t=i}return t}function $a(){let t;return 61===e.charCodeAt(Uo)?(t=J,Uo++):(t=r,0===ea&&sa(Nr)),t}function Oa(){let e,t,i;return e=Uo,t=$a(),t!==r?(i=$a(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function Ja(){let t,i,o,a,n,l,c,p;if(t=Uo,i=is(),i!==r){if(o=Uo,a=[],n=e.charAt(Uo),jt.test(n)?Uo++:(n=r,0===ea&&sa(cr)),n!==r)for(;n!==r;)a.push(n),n=e.charAt(Uo),jt.test(n)?Uo++:(n=r,0===ea&&sa(cr));else a=r;o=a!==r?e.substring(o,Uo):a,o!==r?(a=os(),a!==r?(Wo=t,t={index:+o,type:"bit"}):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;var u,d;if(t===r){if(t=Uo,i=Oa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Oa(),a!==r?(e.substr(Uo,7)===D?(n=D,Uo+=7):(n=r,0===ea&&sa(Vr)),n!==r?(Wo=t,t=function(e){return{attrs:{formula:Dr(e)},type:"latex"}}(o)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Oa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Oa(),a!==r?(e.substr(Uo,13)===z?(n=z,Uo+=13):(n=r,0===ea&&sa(Rr)),n!==r?(l=ps(),l!==r?(124===e.charCodeAt(Uo)?(c=s,Uo++):(c=r,0===ea&&sa(Yt)),c!==r?(p=function(){let e,t,i;e=Uo,t=[],i=za();for(;i!==r;)t.push(i),i=za();return Wo=e,e=t,e}(),Wo=t,d=p,t={attrs:{alt:o,src:((u=l).pr+u.t).trim(),alignmentVertical:"top",size:"line-height",...Object.assign({},...d),zoomDisabled:!0},type:"imageInline"}):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Oa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Oa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Oa(),a!==r?(n=function(){let t,i,o,a;t=Uo,124===e.charCodeAt(Uo)?(i=s,Uo++):(i=r,0===ea&&sa(Yt));if(i!==r){if(o=[],a=ja(),a!==r)for(;a!==r;)o.push(a),a=ja();else o=r;o!==r?(Wo=t,t=o):(Uo=t,t=r)}else Uo=t,t=r;return t}(),n!==r?(Wo=t,t=function(e,t){return t||(t=[]),{marks:t,text:Dr(e),type:"text"}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Xa(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=Xa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=Xa(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=Xa(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"bold"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=es(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=es(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=es(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=es(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"italic"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=ts(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=ts(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=ts(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=ts(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"light"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=rs(),i!==r){for(o=Uo,a=[],n=Uo,l=Uo,ea++,c=rs(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);n!==r;)a.push(n),n=Uo,l=Uo,ea++,c=rs(),ea--,c===r?l=void 0:(Uo=l,l=r),l!==r?(e.length>Uo?(c=e.charAt(Uo),Uo++):(c=r,0===ea&&sa(Ut)),c!==r?(l=[l,c],n=l):(Uo=n,n=r)):(Uo=n,n=r);o=e.substring(o,Uo),a=rs(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"highlight"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;t===r&&(t=Uo,i=ps(),i!==r&&(Wo=t,i=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}}(i)),t=i)}}}}}}}return t}function Da(){let t,i,o,a,s;if(t=Uo,i=Uo,o=Oa(),o!==r){if(a=[],s=$a(),s!==r)for(;s!==r;)a.push(s),s=$a();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;if(t=i!==r?e.substring(t,Uo):i,t===r){if(t=Uo,i=Uo,o=ts(),o!==r){if(a=[],s=Qa(),s!==r)for(;s!==r;)a.push(s),s=Qa();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;if(t=i!==r?e.substring(t,Uo):i,t===r){if(t=Uo,i=Uo,o=rs(),o!==r){if(a=[],s=Za(),s!==r)for(;s!==r;)a.push(s),s=Za();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;t=i!==r?e.substring(t,Uo):i}}return t}function za(){let t,i,o,a,s,n,l,c,p,d;if(t=Uo,35===e.charCodeAt(Uo)?(i=B,Uo++):(i=r,0===ea&&sa(kr)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={comment:o}):(Uo=t,t=r)}else Uo=t,t=r;var m,h;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),e.substr(Uo,6)===j?(o=j,Uo+=6):(o=r,0===ea&&sa(Gr)),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));for(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,m=o,h=n,t={[m]:h}):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));if(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),jt.test(d)?Uo++:(d=r,0===ea&&sa(cr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r),c!==r)for(;c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=e.charAt(Uo),jt.test(d)?Uo++:(d=r,0===ea&&sa(cr)),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);else l=r;n=l!==r?e.substring(n,Uo):l,n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:parseInt(t)}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),o=Ra(),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));for(n=Uo,l=[],c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,p=Uo,ea++,d=ua(),ea--,d===r?p=void 0:(Uo=p,p=r),p!==r?(d=ls(),d!==r?(p=[p,d],c=p):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,t=function(e,t){return{type:"error",msg:e+" must be a positive integer.",found:t}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),e.substr(Uo,17)===q?(o=q,Uo+=17):(o=r,0===ea&&sa(Fr)),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n=function(){let t;e.substr(Uo,3)===H?(t=H,Uo+=3):(t=r,0===ea&&sa($r));t===r&&(e.substr(Uo,6)===U?(t=U,Uo+=6):(t=r,0===ea&&sa(Or)),t===r&&(e.substr(Uo,6)===W?(t=W,Uo+=6):(t=r,0===ea&&sa(Jr)),t===r&&(e.substr(Uo,8)===Y?(t=Y,Uo+=8):(t=r,0===ea&&sa(Hr)),t===r&&(e.substr(Uo,3)===Q?(t=Q,Uo+=3):(t=r,0===ea&&sa(Ur)),t===r&&(e.substr(Uo,5)===Z?(t=Z,Uo+=5):(t=r,0===ea&&sa(Wr)),t===r&&(e.substr(Uo,11)===X?(t=X,Uo+=11):(t=r,0===ea&&sa(Yr)),t===r&&(e.substr(Uo,8)===ee?(t=ee,Uo+=8):(t=r,0===ea&&sa(Qr)))))))));return t}(),n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;if(t===r)if(t=Uo,64===e.charCodeAt(Uo)?(i=S,Uo++):(i=r,0===ea&&sa(xr)),i===r&&(i=null),e.substr(Uo,4)===M?(o=M,Uo+=4):(o=r,0===ea&&sa(Kr)),o!==r)if(58===e.charCodeAt(Uo)?(a=u,Uo++):(a=r,0===ea&&sa(rr)),a!==r){for(s=[],32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n!==r;)s.push(n),32===e.charCodeAt(Uo)?(n=f,Uo++):(n=r,0===ea&&sa(pr));n=function(){let t;e.substr(Uo,11)===te?(t=te,Uo+=11):(t=r,0===ea&&sa(Zr));t===r&&(e.substr(Uo,11)===re?(t=re,Uo+=11):(t=r,0===ea&&sa(Xr)),t===r&&(e.substr(Uo,5)===Z?(t=Z,Uo+=5):(t=r,0===ea&&sa(Wr)),t===r&&(e.substr(Uo,3)===Q?(t=Q,Uo+=3):(t=r,0===ea&&sa(Ur)),t===r&&(e.substr(Uo,8)===ie?(t=ie,Uo+=8):(t=r,0===ea&&sa(ei))))));return t}(),n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{[e]:t}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}}}}return t}function ja(){let t,i,o,a,s,n,l,c,u,d,m,h,b;if(t=Uo,e.substr(Uo,5)===oe?(i=oe,Uo+=5):(i=r,0===ea&&sa(ti)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={type:"link",attrs:{href:o.trim(),target:"_blank"}}):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,7)===ae?(i=ae,Uo+=7):(i=r,0===ea&&sa(ri)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);if(o=e.substring(o,Uo),a=function(){let e,t;e=[],t=qa();for(;t!==r;)e.push(t),t=qa();return e}(),s=ua(),s!==r)if(e.substr(Uo,9)===se?(n=se,Uo+=9):(n=r,0===ea&&sa(ii)),n!==r){for(l=Uo,c=[],u=Uo,d=Uo,ea++,m=ua(),ea--,m===r?d=void 0:(Uo=d,d=r),d!==r?(m=ls(),m!==r?(d=[d,m],u=d):(Uo=u,u=r)):(Uo=u,u=r);u!==r;)c.push(u),u=Uo,d=Uo,ea++,m=ua(),ea--,m===r?d=void 0:(Uo=d,d=r),d!==r?(m=ls(),m!==r?(d=[d,m],u=d):(Uo=u,u=r)):(Uo=u,u=r);l=e.substring(l,Uo),c=ua(),c!==r?(Wo=t,t=function(e,t,r){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:r.trim()}}}(o,a,l)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,5)===ne?(i=ne,Uo+=5):(i=r,0===ea&&sa(oi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);if(o=e.substring(o,Uo),a=ua(),a!==r)if(9658===e.charCodeAt(Uo)?(s=le,Uo++):(s=r,0===ea&&sa(ai)),s!==r){for(n=Uo,l=[],c=Uo,u=Uo,ea++,d=ua(),ea--,d===r?u=void 0:(Uo=u,u=r),u!==r?(d=ls(),d!==r?(u=[u,d],c=u):(Uo=c,c=r)):(Uo=c,c=r);c!==r;)l.push(c),c=Uo,u=Uo,ea++,d=ua(),ea--,d===r?u=void 0:(Uo=u,u=r),u!==r?(d=ls(),d!==r?(u=[u,d],c=u):(Uo=c,c=r)):(Uo=c,c=r);n=e.substring(n,Uo),l=ua(),l!==r?(Wo=t,t=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}}(o,n)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,5)===ne?(i=ne,Uo+=5):(i=r,0===ea&&sa(oi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,9658===e.charCodeAt(Uo)?(i=le,Uo++):(i=r,0===ea&&sa(ai)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"ref",attrs:{reference:e.trim()}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,7)===ce?(i=ce,Uo+=7):(i=r,0===ea&&sa(si)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(s=Na(),Wo=t,t=function(e,t){const r=Object.assign({},...t);return{type:"symbol",attrs:{src:e.trim(),...r}}}(o,s)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,9)===pe?(i=pe,Uo+=9):(i=r,0===ea&&sa(ni)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"footnote",attrs:{content:qr(e.trim())}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,10)===ue?(i=ue,Uo+=10):(i=r,0===ea&&sa(li)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"footnote*",attrs:{content:qr(e.trim())}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,4)===de?(i=de,Uo+=4):(i=r,0===ea&&sa(ci)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"var",attrs:{name:e.trim()}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r&&(t=Uo,e.substr(Uo,4)===p?(i=p,Uo+=4):(i=r,0===ea&&sa(er)),i!==r?(o=ua(),o!==r?(Wo=t,t={type:"code",attrs:{language:"plain text"}}):(Uo=t,t=r)):(Uo=t,t=r),t===r)){if(t=Uo,e.substr(Uo,5)===me?(i=me,Uo+=5):(i=r,0===ea&&sa(pi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t={type:"code",attrs:{language:o.trim().toLowerCase()}}):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,5)===he?(i=he,Uo+=5):(i=r,0===ea&&sa(ui)),i!==r)if(o=ua(),o!==r)if(e.substr(Uo,9)===be?(a=be,Uo+=9):(a=r,0===ea&&sa(di)),a!==r){if(s=Uo,n=Uo,80===e.charCodeAt(Uo)?(l=ge,Uo++):(l=r,0===ea&&sa(mi)),l!==r){for(c=Uo,u=[],d=Uo,m=Uo,ea++,h=ua(),ea--,h===r?m=void 0:(Uo=m,m=r),m!==r?(h=ls(),h!==r?(m=[m,h],d=m):(Uo=d,d=r)):(Uo=d,d=r);d!==r;)u.push(d),d=Uo,m=Uo,ea++,h=ua(),ea--,h===r?m=void 0:(Uo=m,m=r),m!==r?(h=ls(),h!==r?(m=[m,h],d=m):(Uo=d,d=r)):(Uo=d,d=r);c=e.substring(c,Uo),l=[l,c],n=l}else Uo=n,n=r;s=n!==r?e.substring(s,Uo):n,s!==r?(n=ua(),n!==r?(Wo=t,t={type:"timer",attrs:{name:"",duration:s.trim()}}):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r;else Uo=t,t=r;if(t===r){if(t=Uo,e.substr(Uo,6)===ye?(i=ye,Uo+=6):(i=r,0===ea&&sa(hi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);if(o=e.substring(o,Uo),a=ua(),a!==r)if(e.substr(Uo,9)===be?(s=be,Uo+=9):(s=r,0===ea&&sa(di)),s!==r){if(n=Uo,l=Uo,80===e.charCodeAt(Uo)?(c=ge,Uo++):(c=r,0===ea&&sa(mi)),c!==r){for(u=Uo,d=[],m=Uo,h=Uo,ea++,b=ua(),ea--,b===r?h=void 0:(Uo=h,h=r),h!==r?(b=ls(),b!==r?(h=[h,b],m=h):(Uo=m,m=r)):(Uo=m,m=r);m!==r;)d.push(m),m=Uo,h=Uo,ea++,b=ua(),ea--,b===r?h=void 0:(Uo=h,h=r),h!==r?(b=ls(),b!==r?(h=[h,b],m=h):(Uo=m,m=r)):(Uo=m,m=r);u=e.substring(u,Uo),c=[c,u],l=c}else Uo=l,l=r;n=l!==r?e.substring(n,Uo):l,n!==r?(l=ua(),l!==r?(Wo=t,t=function(e,t){return{type:"timer",attrs:{name:e.trim(),duration:t.trim()}}}(o,n)):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;else Uo=t,t=r}else Uo=t,t=r;if(t===r&&(t=Uo,e.substr(Uo,9)===fe?(i=fe,Uo+=9):(i=r,0===ea&&sa(bi)),i!==r?(o=ua(),o!==r?(e.substr(Uo,6)===ke?(a=ke,Uo+=6):(a=r,0===ea&&sa(gi)),a!==r?(s=Ma(),s!==r?(n=ua(),n!==r?(Wo=t,t={type:"highlight",attrs:{color:s}}):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r),t===r&&(t=Uo,e.substr(Uo,13)===xe?(i=xe,Uo+=13):(i=r,0===ea&&sa(yi)),i!==r?(o=ua(),o!==r?(e.substr(Uo,6)===ke?(a=ke,Uo+=6):(a=r,0===ea&&sa(gi)),a!==r?(s=Ma(),s!==r?(n=ua(),n!==r?(Wo=t,t=function(e){return{type:"userHighlight",attrs:{color:e}}}(s)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r),t===r&&(t=Uo,e.substr(Uo,6)===ke?(i=ke,Uo+=6):(i=r,0===ea&&sa(gi)),i!==r?(o=function(){let t;e.substr(Uo,4)===lt?(t=lt,Uo+=4):(t=r,0===ea&&sa(ao));t===r&&(e.substr(Uo,5)===ct?(t=ct,Uo+=5):(t=r,0===ea&&sa(so)),t===r&&(e.substr(Uo,4)===pt?(t=pt,Uo+=4):(t=r,0===ea&&sa(no)),t===r&&(e.substr(Uo,5)===ut?(t=ut,Uo+=5):(t=r,0===ea&&sa(lo)),t===r&&(e.substr(Uo,7)===dt?(t=dt,Uo+=7):(t=r,0===ea&&sa(co)),t===r&&(e.substr(Uo,9)===mt?(t=mt,Uo+=9):(t=r,0===ea&&sa(po)),t===r&&(e.substr(Uo,4)===ht?(t=ht,Uo+=4):(t=r,0===ea&&sa(uo)),t===r&&(e.substr(Uo,8)===bt?(t=bt,Uo+=8):(t=r,0===ea&&sa(mo)),t===r&&(e.substr(Uo,5)===gt?(t=gt,Uo+=5):(t=r,0===ea&&sa(ho)),t===r&&(e.substr(Uo,4)===yt?(t=yt,Uo+=4):(t=r,0===ea&&sa(bo)),t===r&&(e.substr(Uo,7)===ft?(t=ft,Uo+=7):(t=r,0===ea&&sa(go)),t===r&&(e.substr(Uo,6)===kt?(t=kt,Uo+=6):(t=r,0===ea&&sa(yo)),t===r&&(e.substr(Uo,4)===xt?(t=xt,Uo+=4):(t=r,0===ea&&sa(fo)),t===r&&(e.substr(Uo,5)===vt?(t=vt,Uo+=5):(t=r,0===ea&&sa(ko)),t===r&&(e.substr(Uo,6)===Tt?(t=Tt,Uo+=6):(t=r,0===ea&&sa(xo)),t===r&&(e.substr(Uo,4)===_t?(t=_t,Uo+=4):(t=r,0===ea&&sa(vo)),t===r&&(e.substr(Uo,6)===Ct?(t=Ct,Uo+=6):(t=r,0===ea&&sa(To)),t===r&&(e.substr(Uo,3)===wt?(t=wt,Uo+=3):(t=r,0===ea&&sa(_o)),t===r&&(e.substr(Uo,6)===At?(t=At,Uo+=6):(t=r,0===ea&&sa(Co)),t===r&&(e.substr(Uo,4)===Bt?(t=Bt,Uo+=4):(t=r,0===ea&&sa(wo)),t===r&&(e.substr(Uo,6)===St?(t=St,Uo+=6):(t=r,0===ea&&sa(Ao)),t===r&&(e.substr(Uo,5)===Pt?(t=Pt,Uo+=5):(t=r,0===ea&&sa(Bo)),t===r&&(e.substr(Uo,6)===It?(t=It,Uo+=6):(t=r,0===ea&&sa(So))))))))))))))))))))))));return t}(),o!==r?(a=ua(),a!==r?(Wo=t,t=function(e){return{type:"textStyle",attrs:{color:e}}}(o)):(Uo=t,t=r)):(Uo=t,t=r)):(Uo=t,t=r),t===r)))){if(t=Uo,e.substr(Uo,12)===ve?(i=ve,Uo+=12):(i=r,0===ea&&sa(fi)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"colorPicker",attrs:{propertyRef:e.trim()}}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r&&(t=Uo,i=function(){let t;e.substr(Uo,4)===_e?(t=_e,Uo+=4):(t=r,0===ea&&sa(xi));t===r&&(e.substr(Uo,6)===Ce?(t=Ce,Uo+=6):(t=r,0===ea&&sa(vi)),t===r&&(e.substr(Uo,5)===we?(t=we,Uo+=5):(t=r,0===ea&&sa(Ti)),t===r&&(e.substr(Uo,15)===Ae?(t=Ae,Uo+=15):(t=r,0===ea&&sa(_i)),t===r&&(e.substr(Uo,15)===Be?(t=Be,Uo+=15):(t=r,0===ea&&sa(Ci)),t===r&&(e.substr(Uo,14)===Se?(t=Se,Uo+=14):(t=r,0===ea&&sa(wi)),t===r&&(e.substr(Uo,13)===Pe?(t=Pe,Uo+=13):(t=r,0===ea&&sa(Ai)),t===r&&(e.substr(Uo,15)===Ie?(t=Ie,Uo+=15):(t=r,0===ea&&sa(Bi)),t===r&&(e.substr(Uo,13)===Ee?(t=Ee,Uo+=13):(t=r,0===ea&&sa(Si)),t===r&&(e.substr(Uo,14)===Le?(t=Le,Uo+=14):(t=r,0===ea&&sa(Pi)),t===r&&(e.substr(Uo,14)===Ne?(t=Ne,Uo+=14):(t=r,0===ea&&sa(Ii)),t===r&&(e.substr(Uo,14)===Ve?(t=Ve,Uo+=14):(t=r,0===ea&&sa(Ei)),t===r&&(e.substr(Uo,13)===Re?(t=Re,Uo+=13):(t=r,0===ea&&sa(Li)),t===r&&(e.substr(Uo,9)===fe?(t=fe,Uo+=9):(t=r,0===ea&&sa(bi)),t===r&&(e.substr(Uo,6)===Ge?(t=Ge,Uo+=6):(t=r,0===ea&&sa(Ni)),t===r&&(e.substr(Uo,9)===Fe?(t=Fe,Uo+=9):(t=r,0===ea&&sa(Vi)),t===r&&(e.substr(Uo,11)===Ke?(t=Ke,Uo+=11):(t=r,0===ea&&sa(Ri)),t===r&&(e.substr(Uo,3)===$e?(t=$e,Uo+=3):(t=r,0===ea&&sa(Gi)),t===r&&(e.substr(Uo,3)===Oe?(t=Oe,Uo+=3):(t=r,0===ea&&sa(Fi)),t===r&&(e.substr(Uo,9)===Je?(t=Je,Uo+=9):(t=r,0===ea&&sa(Ki)),t===r&&(e.substr(Uo,15)===De?(t=De,Uo+=15):(t=r,0===ea&&sa($i)),t===r&&(e.substr(Uo,9)===ze?(t=ze,Uo+=9):(t=r,0===ea&&sa(Oi)),t===r&&(e.substr(Uo,6)===je?(t=je,Uo+=6):(t=r,0===ea&&sa(Ji)),t===r&&(e.substr(Uo,13)===qe?(t=qe,Uo+=13):(t=r,0===ea&&sa(Di)),t===r&&(e.substr(Uo,16)===Me?(t=Me,Uo+=16):(t=r,0===ea&&sa(zi)),t===r&&(e.substr(Uo,16)===He?(t=He,Uo+=16):(t=r,0===ea&&sa(ji)),t===r&&(e.substr(Uo,15)===Ue?(t=Ue,Uo+=15):(t=r,0===ea&&sa(qi)),t===r&&(e.substr(Uo,14)===We?(t=We,Uo+=14):(t=r,0===ea&&sa(Mi)),t===r&&(e.substr(Uo,16)===Ye?(t=Ye,Uo+=16):(t=r,0===ea&&sa(Hi)),t===r&&(e.substr(Uo,14)===Qe?(t=Qe,Uo+=14):(t=r,0===ea&&sa(Ui)),t===r&&(e.substr(Uo,15)===Ze?(t=Ze,Uo+=15):(t=r,0===ea&&sa(Wi)),t===r&&(e.substr(Uo,15)===Xe?(t=Xe,Uo+=15):(t=r,0===ea&&sa(Yi)),t===r&&(e.substr(Uo,15)===et?(t=et,Uo+=15):(t=r,0===ea&&sa(Qi)),t===r&&(e.substr(Uo,14)===tt?(t=tt,Uo+=14):(t=r,0===ea&&sa(Zi)),t===r&&(e.substr(Uo,10)===rt?(t=rt,Uo+=10):(t=r,0===ea&&sa(Xi)),t===r&&(e.substr(Uo,13)===it?(t=it,Uo+=13):(t=r,0===ea&&sa(eo)),t===r&&(e.substr(Uo,19)===ot?(t=ot,Uo+=19):(t=r,0===ea&&sa(to)),t===r&&(e.substr(Uo,10)===at?(t=at,Uo+=10):(t=r,0===ea&&sa(ro)),t===r&&(e.substr(Uo,10)===st?(t=st,Uo+=10):(t=r,0===ea&&sa(io)),t===r&&(e.substr(Uo,13)===xe?(t=xe,Uo+=13):(t=r,0===ea&&sa(yi)),t===r&&(e.substr(Uo,11)===nt?(t=nt,Uo+=11):(t=r,0===ea&&sa(oo))))))))))))))))))))))))))))))))))))))))));return t}(),i!==r?(o=ua(),o!==r?(Wo=t,t={type:i}):(Uo=t,t=r)):(Uo=t,t=r),t===r))if(t=Uo,35===e.charCodeAt(Uo)?(i=B,Uo++):(i=r,0===ea&&sa(kr)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ua(),a!==r?(Wo=t,t=function(e){return{type:"comment",comment:e}}(o)):(Uo=t,t=r)}else Uo=t,t=r}}}}}}}}}}}}return t}function qa(){let t,i,o,a,s,n,l;if(t=Uo,e.substr(Uo,2)===Te?(i=Te,Uo+=2):(i=r,0===ea&&sa(ki)),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),Wo=t,t=o.trim()}else Uo=t,t=r;return t}function Ma(){let t;return e.substr(Uo,6)===Tt?(t=Tt,Uo+=6):(t=r,0===ea&&sa(xo)),t===r&&(e.substr(Uo,6)===It?(t=It,Uo+=6):(t=r,0===ea&&sa(So)),t===r&&(e.substr(Uo,5)===gt?(t=gt,Uo+=5):(t=r,0===ea&&sa(ho)),t===r&&(e.substr(Uo,4)===pt?(t=pt,Uo+=4):(t=r,0===ea&&sa(no)),t===r&&(e.substr(Uo,6)===Ct?(t=Ct,Uo+=6):(t=r,0===ea&&sa(To)),t===r&&(e.substr(Uo,4)===_t?(t=_t,Uo+=4):(t=r,0===ea&&sa(vo)),t===r&&(e.substr(Uo,5)===ut?(t=ut,Uo+=5):(t=r,0===ea&&sa(lo)),t===r&&(e.substr(Uo,5)===Pt?(t=Pt,Uo+=5):(t=r,0===ea&&sa(Bo)),t===r&&(e.substr(Uo,5)===ct?(t=ct,Uo+=5):(t=r,0===ea&&sa(so)),t===r&&(e.substr(Uo,4)===ht?(t=ht,Uo+=4):(t=r,0===ea&&sa(uo))))))))))),t}function Ha(){let e,t,i,o;for(ea++,e=Uo,t=Ua(),t===r&&(t=null),i=[],o=as(),o===r&&(o=Ua());o!==r;)i.push(o),o=as(),o===r&&(o=Ua());var a,s;return Wo=e,s=i,e=jr((a=t)?[a,...s.flat()]:s.flat()),ea--,e}function Ua(){let t,i,o,a,s,n,l;if(t=Uo,i=ns(),i!==r&&(Wo=t,i={type:"hardBreak"}),t=i,t===r){if(t=Uo,i=Uo,o=[],a=Uo,s=ss(),s===r&&(s=null),n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=ss(),s!==r?(n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r)),a!==r)for(;a!==r;)o.push(a),a=Uo,s=ss(),s===r&&(s=null),n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=ls(),l!==r?(s=[s,n,l],a=s):(Uo=a,a=r)):(Uo=a,a=r),a===r&&(a=Uo,s=ss(),s!==r?(n=Uo,ea++,l=as(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(s=[s,n],a=s):(Uo=a,a=r)):(Uo=a,a=r));else o=r;i=o!==r?e.substring(i,Uo):o,i!==r&&(Wo=t,i={text:Dr(i),type:"text"}),t=i}return t}function Wa(){let t;return 42===e.charCodeAt(Uo)?(t=Et,Uo++):(t=r,0===ea&&sa(Po)),t}function Ya(){let t;return 95===e.charCodeAt(Uo)?(t=Lt,Uo++):(t=r,0===ea&&sa(Io)),t}function Qa(){let t;return 96===e.charCodeAt(Uo)?(t=Nt,Uo++):(t=r,0===ea&&sa(Eo)),t}function Za(){let t;return 33===e.charCodeAt(Uo)?(t=Vt,Uo++):(t=r,0===ea&&sa(Lo)),t}function Xa(){let e,t,i;return e=Uo,t=Wa(),t!==r?(i=Wa(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function es(){let e,t,i;return e=Uo,t=Ya(),t!==r?(i=Ya(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function ts(){let e,t,i;return e=Uo,t=Qa(),t!==r?(i=Qa(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function rs(){let e,t,i;return e=Uo,t=Za(),t!==r?(i=Za(),i!==r?(t=[t,i],e=t):(Uo=e,e=r)):(Uo=e,e=r),e}function is(){let t;return e.substr(Uo,2)===Rt?(t=Rt,Uo+=2):(t=r,0===ea&&sa(No)),t}function os(){let t;return 93===e.charCodeAt(Uo)?(t=Gt,Uo++):(t=r,0===ea&&sa(Vo)),t}function as(){let t,i,o,a,s,n,l;if(t=Uo,i=is(),i!==r){if(o=Uo,a=[],s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr)),s!==r)for(;s!==r;)a.push(s),s=e.charAt(Uo),jt.test(s)?Uo++:(s=r,0===ea&&sa(cr));else a=r;o=a!==r?e.substring(o,Uo):a,o!==r?(a=os(),a!==r?(Wo=t,t={index:+o,type:"bit"}):(Uo=t,t=r)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=Xa(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=Xa(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=Xa(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=Xa(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"bold"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=es(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=es(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=es(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=es(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"italic"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r){if(t=Uo,i=ts(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ts(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ts(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=ts(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"light"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r;if(t===r)if(t=Uo,i=rs(),i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=rs(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=rs(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(e.length>Uo?(l=e.charAt(Uo),Uo++):(l=r,0===ea&&sa(Ut)),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),a=rs(),a!==r?(Wo=t,t=function(e){return{marks:[{type:"highlight"}],text:Dr(e),type:"text"}}(o)):(Uo=t,t=r)}else Uo=t,t=r}}}return t}function ss(){let t,i,o,a,s;if(t=Uo,i=Uo,o=ts(),o!==r){if(a=[],s=Qa(),s!==r)for(;s!==r;)a.push(s),s=Qa();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;if(t=i!==r?e.substring(t,Uo):i,t===r){if(t=Uo,i=Uo,o=rs(),o!==r){if(a=[],s=Za(),s!==r)for(;s!==r;)a.push(s),s=Za();else a=r;a!==r?(o=[o,a],i=o):(Uo=i,i=r)}else Uo=i,i=r;t=i!==r?e.substring(t,Uo):i}return t}function ns(){let t,i;return ea++,10===e.charCodeAt(Uo)?(t=Ft,Uo++):(t=r,0===ea&&sa(Go)),t===r&&(e.substr(Uo,2)===Kt?(t=Kt,Uo+=2):(t=r,0===ea&&sa(Fo)),t===r&&(t=e.charAt(Uo),qt.test(t)?Uo++:(t=r,0===ea&&sa(Ko)))),ea--,t===r&&(i=r,0===ea&&sa(Ro)),t}function ls(){let t;return t=e.charAt(Uo),Mt.test(t)?Uo++:(t=r,0===ea&&sa($o)),t}function cs(){let t,i;return t=ns(),t===r&&(t=Uo,ea++,e.length>Uo?(i=e.charAt(Uo),Uo++):(i=r,0===ea&&sa(Ut)),ea--,i===r?t=void 0:(Uo=t,t=r)),t}function ps(){let t,i,o,a,s,n,l;if(t=Uo,i=Uo,o=Uo,e.substr(Uo,4)===$t?(a=$t,Uo+=4):(a=r,0===ea&&sa(Oo)),a!==r?(115===e.charCodeAt(Uo)?(s=Ot,Uo++):(s=r,0===ea&&sa(Jo)),s===r&&(s=null),e.substr(Uo,3)===Jt?(n=Jt,Uo+=3):(n=r,0===ea&&sa(Do)),n!==r?(a=[a,s,n],o=a):(Uo=o,o=r)):(Uo=o,o=r),o===r&&(e.substr(Uo,7)===Dt?(o=Dt,Uo+=7):(o=r,0===ea&&sa(zo))),i=o!==r?e.substring(i,Uo):o,i!==r){for(o=Uo,a=[],s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=us(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);s!==r;)a.push(s),s=Uo,n=Uo,ea++,l=ua(),ea--,l===r?n=void 0:(Uo=n,n=r),n!==r?(l=us(),l!==r?(n=[n,l],s=n):(Uo=s,s=r)):(Uo=s,s=r);o=e.substring(o,Uo),Wo=t,t={pr:i,t:o}}else Uo=t,t=r;return t}function us(){let t;return t=e.charAt(Uo),Ht.test(t)?Uo++:(t=r,0===ea&&sa(jo)),t}var ds=[],ms="";e=(e=e.replace(/\s+$/,"")).trimStart(),Qo=a();const hs=Qo!==r&&Uo===e.length;function bs(){throw Qo!==r&&Uo<e.length&&sa({type:"end"}),na(Xo,Zo<e.length?function(t=Uo){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(Zo):null,Zo<e.length?aa(Zo,Zo+1):aa(Zo,Zo))}return t.peg$library?{peg$result:Qo,peg$currPos:Uo,peg$FAILED:r,peg$maxFailExpected:Xo,peg$maxFailPos:Zo,peg$success:hs,peg$throw:hs?void 0:bs}:hs?Qo:void bs()}var Ur=Hr,Wr=class{version(){return Ur("",{startRule:"version"})}preprocessAst(e){if(g.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){if(Array.isArray(e))return e;let r=e??"";if(!r)return[];let i="bitmarkPlusPlus";return Object.assign({},t).location===rt&&(i="bitmarkPlus"),r=r.trim(),Ur(r,{startRule:i})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],r=e;for(const e of r)switch(e.type){case Ze.gap:case Ze.select:case Ze.highlight:case Ze.mark:t.push(e);break;default:{const r=this.extractBodyBits(e.content);for(const e of r)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const r=e;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case Ze.gap:case Ze.select:case Ze.highlight:case Ze.mark:t(r,e,i);break;default:this.walkBodyBits(i.content,t)}}}},Yr=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}},Qr=new class{asNumber(e,t){if(null==e)return t??void 0;const r=+e;return Number.isNaN(r)||!isFinite(r)?t??void 0:r}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}},Zr=class{constructor(){l(this,"textParser"),l(this,"textGenerator"),this.textParser=new Wr,this.textGenerator=new Jr}toExample(e,t,r){if(null!=t){let e;return e=Yr.isBoolean(r)?Yr.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:r??null}}return e?{isExample:!0,example:r??null,__defaultExample:r??null}:{isExample:!1,example:null,__defaultExample:r??null}}toAstProperty(e,t,r,i){if(null==r)return;let o=Le.getBitConfig(e).tags;if(i?.cardSet){const{sideNo:t,variantNo:r}=i.cardSet;o=Le.getTagsConfigForCardSet(e,t,r)??o}const a=Le.getTagConfigForTag(o,t);a?.array&&!Array.isArray(r)?r=[r]:!a?.array&&Array.isArray(r)&&(r=r[r.length-1]);const s=e=>{if(null==e)return;switch(a?.format??v){case v:return null!=Qr.asNumber(e)&&(e=`${e}`),g.isString(e)?g.trimmedString(e):void 0;case A:{null!=Qr.asNumber(e)&&(e=`${e}`);const t=g.isString(e)?g.trimmedString(e):void 0;return null==t||""===t?a?.defaultValue??"":t}case _:return Qr.asNumber(e);case C:return Yr.toBoolean(e,!0);case w:return!Yr.toBoolean(e,!0)}return e};if(Array.isArray(r)){const e=r;for(let t=0,r=e.length;t<r;t++)e[t]=s(e[t])}else r=s(r);return r}getEmptyTextAst(e){return this.handleJsonText(e,rt," ")}handleJsonText(e,t,r){let i;const{textFormat:o}=e;if(null==r)i=[];else if(this.textParser.isAst(r))i=r;else{if(Array.isArray(r)){const e=[];for(let i=0,a=r.length;i<a;i++){const a=r[i];this.textParser.isAst(a)?e[i]=a:g.isString(a)?(e[i]=this.textParser.toAst(_t.breakscape(a,{format:o,location:t}),{format:o,location:t}),e[i].__tag="text"):e[i]=[]}return e}i=g.isString(r)?this.textParser.toAst(_t.breakscape(r,{format:o,location:t,v2:!0}),{format:o,location:t}):[]}return i.__tag="text",i}},Xr=new Wr,ei=new class{fillStringExample(e,t,r,i,o){if(t){Array.isArray(t)||(t=[t]);for(const a of t)if(!a.isExample&&(r?(a.example=a.__defaultExample,a.isExample=!0):a.example=i?Xr.toAst(i,{format:e,location:rt}):void 0,o))break}}fillBooleanExample(e,t,r,i){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!i||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=Yr.toBoolean(r),i))break}}},ti=r(722),ri=new class{fileExtensionFromUrl(e){let t;if(e)try{const r=new URL(e).pathname.split(".");r.length>1&&(t=r[r.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}},ii=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;const t=e;let r=!0;switch(e.type){case y.image:{const t=e.image;g.isString(t.src)||(t.src="");break}case y.imageLink:{const t=e.imageLink;g.isString(t.url)||(t.url="");break}case y.audio:{const t=e.audio;g.isString(t.src)||(t.src="");break}case y.audioEmbed:{const t=e.audioEmbed;g.isString(t.src)||(t.src="");break}case y.audioLink:{const t=e.audioLink;g.isString(t.url)||(t.url="");break}case y.video:{const t=e.video;g.isString(t.src)||(t.src="");break}case y.videoEmbed:{const t=e.videoEmbed;g.isString(t.url)||(t.url="");break}case y.videoLink:{const t=e.videoLink;g.isString(t.url)||(t.url="");break}case y.stillImageFilm:{const t=e;g.isString(t.image.src)||(t.image.src=""),g.isString(t.audio.src)||(t.audio.src="");break}case y.stillImageFilmEmbed:{const t=e.stillImageFilmEmbed;g.isString(t.url)||(t.url="");break}case y.stillImageFilmLink:{const t=e.stillImageFilmLink;g.isString(t.url)||(t.url="");break}case y.article:{const t=e.article;g.isString(t.body)||(t.body="");break}case y.document:{const t=e.document;g.isString(t.url)||(t.url="");break}case y.documentEmbed:{const t=e.documentEmbed;g.isString(t.url)||(t.url="");break}case y.documentLink:{const t=e.documentLink;g.isString(t.url)||(t.url="");break}case y.documentDownload:{const t=e.documentDownload;g.isString(t.url)||(t.url="");break}case y.appLink:{const t=e.appLink;g.isString(t.url)||(t.url="");break}case y.websiteLink:{const t=e.websiteLink;g.isString(t.url)||(t.url="");break}default:r=!1}return r||e.type&&(e.__invalid=!0),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(!g.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!g.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!g.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!g.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(!g.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`)}},oi=class extends Zr{resourceFromResourceJson(e,t){if(!t)return;const r=[];Array.isArray(t)||(t=[t]);for(const i of t){let t=(0,ti.Enum)(y).fromValue(i.type);if(!t)return;const o=(0,ti.Enum)(y).keyFromValue(t);if(!o)return;let a;if(t=(0,ti.Enum)(y).fromValue(i.__typeAlias)??t,t===y.imageResponsive){const t=i,o=this.resourceFromResourceDataJson(e,y.imagePortrait,t.imagePortrait),a=this.resourceFromResourceDataJson(e,y.imageLandscape,t.imageLandscape);o&&r.push(o),a&&r.push(a)}else if(t===y.stillImageFilm){const t=i,o=this.resourceFromResourceDataJson(e,y.image,t.image),a=this.resourceFromResourceDataJson(e,y.audio,t.audio);o&&r.push(o),a&&r.push(a)}else{if(a=i[o],!a)return;const s=this.resourceFromResourceDataJson(e,t,a);s&&r.push(s)}}return 0!==r.length?1===r.length?r[0]:r:void 0}resourceFromResourceDataJson(e,t,r){if(!r)return;if(!(t=(0,ti.Enum)(y).fromValue(t)))return;const i=g.isString(r)?r:void 0,o=r.url||r.src||r.body||i,a=r.posterImage?this.resourceFromResourceDataJson(e,y.image,r.posterImage)?.image:void 0,s=r.thumbnails?r.thumbnails.map(t=>this.resourceFromResourceDataJson(e,y.image,t)?.image):void 0;return this.resource(e,{type:t,value:o,srcAlt:r.srcAlt,format:r.format,src1x:r.src1x,src2x:r.src2x,src3x:r.src3x,src4x:r.src4x,caption:this.handleJsonText(e,rt,r.caption),width:r.width??void 0,height:r.height??void 0,alt:r.alt,zoomDisabled:r.zoomDisabled,duration:r.duration,mute:r.mute,autoplay:r.autoplay,allowSubtitles:r.allowSubtitles,showSubtitles:r.showSubtitles,posterImage:a,thumbnails:s,siteName:void 0,license:r.license,copyright:r.copyright,showInIndex:r.showInIndex,search:r.search,selected:r.selected})}resource(e,t){let r;const{type:i,value:o,format:a,...s}=t,n={type:i,value:o??_t.EMPTY_STRING,format:a??_t.EMPTY_STRING,...s};switch(i){case y.video:case y.videoEmbed:case y.videoLink:case y.stillImageFilmEmbed:case y.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],i=[];for(const o of r){const r=t[o];if(r){const t=this.resource(e,{type:y.image,value:r});t&&i.push(t.image)}}n.thumbnails=[...n.thumbnails||[],...i]}}switch(i){case y.image:case y.imagePortrait:case y.imageLandscape:case y.backgroundWallpaper:case y.imagePlaceholder:case y.icon:case y.platformIcon:case y.platformLogo:case y.platformBackgroundImage:case y.previewImage:case y.coverImage:case y.backgroundImage:r=this.imageResource(e,n,i);break;case y.imageLink:r=this.imageLinkResource(e,n);break;case y.audio:r=this.audioResource(e,n);break;case y.audioEmbed:r=this.audioEmbedResource(e,n);break;case y.audioLink:r=this.audioLinkResource(e,n);break;case y.video:case y.previewVideo:r=this.videoResource(e,n);break;case y.videoEmbed:r=this.videoEmbedResource(e,n);break;case y.videoLink:r=this.videoLinkResource(e,n);break;case y.stillImageFilmEmbed:r=this.stillImageFilmEmbedResource(e,n);break;case y.stillImageFilmLink:r=this.stillImageFilmLinkResource(e,n);break;case y.article:r=this.articleResource(e,n);break;case y.document:r=this.documentResource(e,n);break;case y.documentEmbed:r=this.documentEmbedResource(e,n);break;case y.documentLink:r=this.documentLinkResource(e,n);break;case y.documentDownload:r=this.documentDownloadResource(e,n);break;case y.appLink:r=this.appLinkResource(e,n);break;case y.websiteLink:r=this.websiteLinkResource(e,n)}return r}imageResource(e,t,r){const{value:i,srcAlt:o,src1x:a,src2x:s,src3x:n,src4x:l,width:c,height:p,alt:d,zoomDisabled:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,{bitType:T}=e;let _=!1;Le.isOfBitType(T,[u.imageSeparator,u.pageBanner,u.imagesLogoGrave,u.prototypeImages,u.extractorImage])&&(_=!0);const C={type:y.image,__typeAlias:r??y.image,__configKey:f(r??y.image),image:{format:ri.fileExtensionFromUrl(i)??void 0,provider:ri.domainFromUrl(i)??void 0,src:i??"",srcAlt:o??void 0,src1x:a??void 0,src2x:s??void 0,src3x:n??void 0,src4x:l??void 0,width:c??null,height:p??null,alt:d??"",zoomDisabled:m??_,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(C.image,{ignoreFalse:["zoomDisabled","showInIndex","selected"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),ii.validateResource(C)}imageLinkResource(e,t){const{value:r,srcAlt:i,src1x:o,src2x:a,src3x:s,src4x:n,width:l,height:c,alt:p,zoomDisabled:u,license:d,copyright:m,showInIndex:h,caption:b,search:g,selected:k}=t,x={type:y.imageLink,__typeAlias:y.imageLink,__configKey:f(y.imageLink),imageLink:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,src1x:o??void 0,src2x:a??void 0,src3x:s??void 0,src4x:n??void 0,width:l??null,height:c??null,alt:p??"",zoomDisabled:u??!1,license:d??"",copyright:m??"",showInIndex:h??!1,caption:this.handleJsonText(e,rt,b),search:g??void 0,selected:k??!1}};return _e.removeUnwantedProperties(x.imageLink,{ignoreFalse:["zoomDisabled","showInIndex","selected"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),ii.validateResource(x)}audioResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:u,selected:d}=t,m={type:y.audio,__typeAlias:y.audio,__configKey:f(y.audio),audio:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,rt,p),search:u??void 0,selected:d??!1}};return _e.removeUnwantedProperties(m.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(m)}audioEmbedResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:u,selected:d}=t,m={type:y.audioEmbed,__typeAlias:y.audioEmbed,__configKey:f(y.audioEmbed),audioEmbed:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,rt,p),search:u??void 0,selected:d??!1}};return _e.removeUnwantedProperties(m.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(m)}audioLinkResource(e,t){const{value:r,srcAlt:i,duration:o,mute:a,autoplay:s,license:n,copyright:l,showInIndex:c,caption:p,search:u,selected:d}=t,m={type:y.audioLink,__typeAlias:y.audioLink,__configKey:f(y.audioLink),audioLink:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,duration:o??void 0,mute:a??void 0,autoplay:s??void 0,license:n??"",copyright:l??"",showInIndex:c??!1,caption:this.handleJsonText(e,rt,p),search:u??void 0,selected:d??!1}};return _e.removeUnwantedProperties(m.audioLink,{ignoreEmptyString:["url"],ignoreFalse:["selected"]}),ii.validateResource(m)}videoResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.video,__typeAlias:y.video,__configKey:f(y.video),video:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,src:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1,posterImage:d??void 0,thumbnails:m??void 0}};return _e.removeUnwantedProperties(T.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(T)}videoEmbedResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.videoEmbed,__typeAlias:y.videoEmbed,__configKey:f(y.videoEmbed),videoEmbed:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(T)}videoLinkResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.videoLink,__typeAlias:y.videoLink,__configKey:f(y.videoLink),videoLink:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(T)}stillImageFilmEmbedResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.stillImageFilmEmbed,__typeAlias:y.stillImageFilmEmbed,__configKey:f(y.stillImageFilmEmbed),stillImageFilmEmbed:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(T)}stillImageFilmLinkResource(e,t){const{value:r,srcAlt:i,width:o,height:a,duration:s,mute:n,autoplay:l,allowSubtitles:c,showSubtitles:p,alt:u,posterImage:d,thumbnails:m,license:h,copyright:b,showInIndex:g,caption:k,search:x,selected:v}=t,T={type:y.stillImageFilmLink,__typeAlias:y.stillImageFilmLink,__configKey:f(y.stillImageFilmLink),stillImageFilmLink:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,width:o??null,height:a??null,duration:s??void 0,mute:n??void 0,autoplay:l??void 0,allowSubtitles:c??void 0,showSubtitles:p??void 0,alt:u??"",posterImage:d??void 0,thumbnails:m??void 0,license:h??"",copyright:b??"",showInIndex:g??!1,caption:this.handleJsonText(e,rt,k),search:x??void 0,selected:v??!1}};return _e.removeUnwantedProperties(T.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(T)}articleResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.article,__typeAlias:y.article,__configKey:f(y.article),article:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,body:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"],ignoreFalse:["selected"]}),ii.validateResource(p)}documentResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.document,__typeAlias:y.document,__configKey:f(y.document),document:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(p)}documentEmbedResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.documentEmbed,__typeAlias:y.documentEmbed,__configKey:f(y.documentEmbed),documentEmbed:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(p)}documentLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.documentLink,__typeAlias:y.documentLink,__configKey:f(y.documentLink),documentLink:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(p)}documentDownloadResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.documentDownload,__typeAlias:y.documentDownload,__configKey:f(y.documentDownload),documentDownload:{format:ri.fileExtensionFromUrl(r)??void 0,provider:ri.domainFromUrl(r)??void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(p)}appLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.appLink,__typeAlias:y.appLink,__configKey:f(y.appLink),appLink:{provider:void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(p)}websiteLinkResource(e,t){const{value:r,srcAlt:i,license:o,copyright:a,showInIndex:s,caption:n,search:l,selected:c}=t,p={type:y.websiteLink,__typeAlias:y.websiteLink,__configKey:f(y.websiteLink),websiteLink:{provider:void 0,url:r??"",srcAlt:i??void 0,license:o??"",copyright:a??"",showInIndex:s??!1,caption:this.handleJsonText(e,rt,n),search:l??void 0,selected:c??!1}};return _e.removeUnwantedProperties(p.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex","selected"]}),ii.validateResource(p)}},ai=class extends Zr{constructor(){super(...arguments),l(this,"resourceBuilder",new oi)}buildBitmark(e){const{bits:t,errors:r}=e,i={bits:t,errors:r};return _e.removeUnwantedProperties(i),i}buildBit(e,t){e=structuredClone(e);const r=Le.getMigratedBitType(e.bitType);r&&(e.bitType=r,e.isCollapsible=e.isCollapsible??!0);const i=e.bitType,o=Le.getBitConfig(i),a="true"===o.tags[ye.property_isCollapsible]?.defaultValue,s=this.resolveAccessibilityGroupTag(o,e.accessibilityGroupTag),n=(0,tt.Enum)(Ct).fromValue(e.textFormat);let l=(0,tt.Enum)(S).fromValue(e.textFormat)??o.textFormatDefault;n===Ct.bitmarkMinusMinus&&(l=S.bitmarkText);const c={bitConfig:o,bitType:i,textFormat:l},p=this.buildCardNode(c,e),d=Le.isOfBitType(e.bitType,u.essay)?this.toAstProperty(i,ye.property_reasonableNumOfChars,e.reasonableNumOfChars,t):void 0,m={...this.toExample(e.__isDefaultExample,e.example)},h={bitType:i,bitLevel:e.bitLevel,textFormat:l,resourceType:(0,tt.Enum)(y).fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(i,ye.property_id,e.id,t),gUri:this.toAstProperty(i,ye.property_gUri,e.gUri,t),internalComment:this.toAstProperty(i,ye.property_internalComment,e.internalComment,t),customerId:this.toAstProperty(i,ye.property_customerId,e.customerId,t),customerExternalId:this.toAstProperty(i,ye.property_customerExternalId,e.customerExternalId,t),externalId:this.toAstProperty(i,ye.property_externalId,e.externalId,t),spaceId:this.toAstProperty(i,ye.property_spaceId,e.spaceId,t),padletId:this.toAstProperty(i,ye.property_padletId,e.padletId,t),jupyterId:this.toAstProperty(i,ye.property_jupyterId,e.jupyterId,t),jupyterExecutionCount:this.toAstProperty(i,ye.property_jupyterExecutionCount,e.jupyterExecutionCount,t),copyright:this.toAstProperty(i,ye.property_copyright,e.copyright,t),license:this.toAstProperty(i,ye.property_license,e.license,t),rightsPolicy:this.toAstProperty(i,ye.property_rightsPolicy,e.rightsPolicy,t),sourceRL:this.toAstProperty(i,ye.property_sourceRL,e.sourceRL,t),isPublic:this.toAstProperty(i,ye.property_isPublic,e.isPublic,t),isTemplate:this.toAstProperty(i,ye.property_isTemplate,e.isTemplate,t),isTemplateStripTheme:this.toAstProperty(i,ye.property_isTemplateStripTheme,e.isTemplateStripTheme,t),isEditable:this.toAstProperty(i,ye.property_isEditable,e.isEditable,t),needsValidation:this.toAstProperty(i,ye.property_needsValidation,e.needsValidation,t),validationDate:this.toAstProperty(i,ye.property_validationDate,e.validationDate,t),aiGenerated:this.toAstProperty(i,ye.property_aiGenerated,e.aiGenerated,t),machineTranslated:this.toAstProperty(i,ye.property_machineTranslated,e.machineTranslated,t),translationOf:this.toAstProperty(i,ye.property_translationOf,e.translationOf,t),spansPageBreak:this.toAstProperty(i,ye.property_spansPageBreak,e.spansPageBreak,t),searchIndex:this.toAstProperty(i,ye.property_searchIndex,e.searchIndex,t),analyticsTag:this.toAstProperty(i,ye.property_analyticsTag,e.analyticsTag,t),categoryTag:this.toAstProperty(i,ye.property_categoryTag,e.categoryTag,t),topicTag:this.toAstProperty(i,ye.property_topicTag,e.topicTag,t),reportTag:this.toAstProperty(i,ye.property_reportTag,e.reportTag,t),altLangTag:this.toAstProperty(i,ye.property_altLangTag,e.altLangTag,t),feedbackEngine:this.toAstProperty(i,ye.property_feedbackEngine,e.feedbackEngine,t),feedbackType:this.toAstProperty(i,ye.property_feedbackType,e.feedbackType,t),disableFeedback:this.toAstProperty(i,ye.property_disableFeedback,e.disableFeedback,t),diffTo:this.toAstProperty(i,ye.property_diffTo,e.diffTo,t),diffOp:this.toAstProperty(i,ye.property_diffOp,e.diffOp,t),diffRef:this.toAstProperty(i,ye.property_diffRef,e.diffRef,t),diffContext:this.toAstProperty(i,ye.property_diffContext,e.diffContext,t),diffTime:this.toAstProperty(i,ye.property_diffTime,e.diffTime,t),path:this.toAstProperty(i,ye.property_path,e.path,t),releaseVersion:this.toAstProperty(i,ye.property_releaseVersion,e.releaseVersion,t),releaseKind:this.toAstProperty(i,ye.property_releaseKind,e.releaseKind,t),releaseDate:this.toAstProperty(i,ye.property_releaseDate,e.releaseDate,t),iframeSrc:this.toAstProperty(i,ye.property_iframeSrc,e.iframeSrc,t),iframeName:this.toAstProperty(i,ye.property_iframeName,e.iframeName,t),book:this.buildBooks(c,e.book),ageRange:this.toAstProperty(i,ye.property_ageRange,e.ageRange,t),lang:this.toAstProperty(i,ye.property_lang,e.lang,t),language:this.toAstProperty(i,ye.property_language,e.language,t),publisher:this.toAstProperty(i,ye.property_publisher,e.publisher,t),publisherName:this.toAstProperty(i,ye.property_publisherName,e.publisherName,t),displayName:this.toAstProperty(i,ye.property_displayName,e.displayName,t),theme:this.toAstProperty(i,ye.property_theme,e.theme,t),rtl:this.toAstProperty(i,ye.property_rtl,e.rtl,t),computerLanguage:this.toAstProperty(i,ye.property_computerLanguage,e.computerLanguage,t),target:this.toAstProperty(i,ye.property_target,e.target,t),slug:this.toAstProperty(i,ye.property_slug,e.slug,t),tag:this.toAstProperty(i,ye.property_tag,e.tag,t),groupTag:this.buildGroupTags(c,e.groupTag),accessibilityTag:this.toAstProperty(i,ye.property_accessibilityTag,e.accessibilityTag,t),accessibilityGroupTag:this.buildGroupTags(c,s),reviewTag:this.toAstProperty(i,ye.property_reviewTag,e.reviewTag,t),reviewerTag:this.toAstProperty(i,ye.property_reviewerTag,e.reviewerTag,t),reductionTag:this.toAstProperty(i,ye.property_reductionTag,e.reductionTag,t),bubbleTag:this.toAstProperty(i,ye.property_bubbleTag,e.bubbleTag,t),extractorTag:this.toAstProperty(i,ye.property_extractorTag,e.extractorTag,t),extractorInternal:this.toAstProperty(i,ye.property_extractorInternal,e.extractorInternal,t),sourceBB:this.normaliseSourceBB(e.sourceBB),bitFingerprint:this.toAstProperty(i,ye.property_bitFingerprint,e.bitFingerprint,t),levelCEFRp:this.toAstProperty(i,ye.property_levelCEFRp,e.levelCEFRp,t),levelCEFR:this.toAstProperty(i,ye.property_levelCEFR,e.levelCEFR,t),levelILR:this.toAstProperty(i,ye.property_levelILR,e.levelILR,t),levelACTFL:this.toAstProperty(i,ye.property_levelACTFL,e.levelACTFL,t),icon:this.toAstProperty(i,ye.property_icon,e.icon,t),iconTag:this.toAstProperty(i,ye.property_iconTag,e.iconTag,t),colorTag:this.toAstProperty(i,ye.property_colorTag,e.colorTag,t),flashcardSet:this.toAstProperty(i,ye.property_flashcardSet,e.flashcardSet,t),subtype:this.toAstProperty(i,ye.property_subtype,e.subtype,t),bookAlias:this.toAstProperty(i,ye.property_bookAlias,e.bookAlias,t),bookDiff:this.toAstProperty(i,ye.property_bookDiff,e.bookDiff,t),coverImage:"string"==typeof e.coverImage||Array.isArray(e.coverImage)?this.toAstProperty(i,ye.property_coverImage,St.asArray(e.coverImage),t):this.toImageResource(c,e.coverImage),coverColor:this.toAstProperty(i,ye.property_coverColor,e.coverColor,t),backgroundImage:"string"==typeof e.backgroundImage||Array.isArray(e.backgroundImage)?this.toAstProperty(i,ye.property_backgroundImage,St.asArray(e.backgroundImage),t):this.toImageResource(c,e.backgroundImage),publications:this.toAstProperty(i,ye.property_publications,e.publications,t),relatedBook:this.toAstProperty(i,ye.property_relatedBook,e.relatedBook,t),translationOfBook:this.toAstProperty(i,ye.property_translationOfBook,e.translationOfBook,t),userFeedbackTranslationUrl:this.toAstProperty(i,ye.property_userFeedbackTranslationUrl,e.userFeedbackTranslationUrl,t),userFeedbackContentUrl:this.toAstProperty(i,ye.property_userFeedbackContentUrl,e.userFeedbackContentUrl,t),author:this.toAstProperty(i,ye.property_author,e.author,t),subject:this.toAstProperty(i,ye.property_subject,e.subject,t),date:this.toAstProperty(i,ye.property_date,e.date,t),dateEnd:this.toAstProperty(i,ye.property_dateEnd,e.dateEnd,t),location:this.toAstProperty(i,ye.property_location,e.location,t),kind:this.toAstProperty(i,ye.property_kind,e.kind,t),hasMarkAsDone:this.toAstProperty(i,ye.property_hasMarkAsDone,e.hasMarkAsDone,t),processHandIn:this.toAstProperty(i,ye.property_processHandIn,e.processHandIn,t),processHandInLocation:this.toAstProperty(i,ye.property_processHandInLocation,e.processHandInLocation,t),chatWithBook:this.toAstProperty(i,ye.property_chatWithBook,e.chatWithBook,t),chatWithBookBrainKey:this.toAstProperty(i,ye.property_chatWithBookBrainKey,e.chatWithBookBrainKey,t),currency:this.toAstProperty(i,ye.property_currency,e.currency,t),bookIsbn:this.toAstProperty(i,ye.property_bookIsbn,e.bookIsbn,t),bookAuthor:this.toAstProperty(i,ye.property_bookAuthor,e.bookAuthor,t),bookType:this.toAstProperty(i,ye.property_bookType,e.bookType,t),bookBindingType:this.toAstProperty(i,ye.property_bookBindingType,e.bookBindingType,t),bookNumberOfPages:this.toAstProperty(i,ye.property_bookNumberOfPages,e.bookNumberOfPages,t),bookRating:this.toAstProperty(i,ye.property_bookRating,e.bookRating,t),bookSeriesTitle:this.toAstProperty(i,ye.property_bookSeriesTitle,e.bookSeriesTitle,t),bookSeriesId:this.toAstProperty(i,ye.property_bookSeriesId,e.bookSeriesId,t),bookSeriesNumber:this.toAstProperty(i,ye.property_bookSeriesNumber,e.bookSeriesNumber,t),bookLanguage:this.toAstProperty(i,ye.property_bookLanguage,e.bookLanguage,t),bookPublishingDate:this.toAstProperty(i,ye.property_bookPublishingDate,e.bookPublishingDate,t),bookPublisher:this.toAstProperty(i,ye.property_bookPublisher,e.bookPublisher,t),bookTranslator:this.toAstProperty(i,ye.property_bookTranslator,e.bookTranslator,t),bookOriginalTitle:this.toAstProperty(i,ye.property_bookOriginalTitle,e.bookOriginalTitle,t),gmbExternalShop:this.toAstProperty(i,ye.property_gmbExternalShop,e.gmbExternalShop,t),gmbExternalShopItems:this.toAstProperty(i,ye.property_gmbExternalShopItems,e.gmbExternalShopItems,t),action:this.toAstProperty(i,ye.property_action,e.action,t),showInIndex:this.toAstProperty(i,ye.property_showInIndex,e.showInIndex,t),refAuthor:this.toAstProperty(i,ye.property_refAuthor,e.refAuthor,t),refBookTitle:this.toAstProperty(i,ye.property_refBookTitle,e.refBookTitle,t),refPublisher:this.toAstProperty(i,ye.property_refPublisher,e.refPublisher,t),refPublicationYear:this.toAstProperty(i,ye.property_refPublicationYear,e.refPublicationYear,t),citationStyle:this.toAstProperty(i,ye.property_citationStyle,e.citationStyle,t),blockId:this.toAstProperty(i,ye.property_blockId,e.blockId,t),pageNo:this.toAstProperty(i,ye.property_pageNo,e.pageNo,t),x:this.toAstProperty(i,ye.property_x,e.x,t),y:this.toAstProperty(i,ye.property_y,e.y,t),width:this.toAstProperty(i,ye.property_width,e.width,t),height:this.toAstProperty(i,ye.property_height,e.height,t),index:this.toAstProperty(i,ye.property_index,e.index,t),classification:this.toAstProperty(i,ye.property_classification,e.classification,t),availableClassifications:this.toAstProperty(i,ye.property_availableClassifications,e.availableClassifications,t),allowedBit:this.toAstProperty(i,ye.property_allowedBit,e.allowedBit,t),authorFullName:this.toAstProperty(i,ye.property_authorFullName,e.authorFullName,t),authorPseudonym:this.toAstProperty(i,ye.property_authorPseudonym,e.authorPseudonym,t),authorTitle:this.toAstProperty(i,ye.property_authorTitle,e.authorTitle,t),authorJobTitle:this.toAstProperty(i,ye.property_authorJobTitle,e.authorJobTitle,t),tableFixedHeader:this.toAstProperty(i,ye.property_tableFixedHeader,e.tableFixedHeader,t),tableHeaderWhitespaceNoWrap:this.toAstProperty(i,ye.property_tableHeaderWhitespaceNoWrap,e.tableHeaderWhitespaceNoWrap,t),tableSearch:this.toAstProperty(i,ye.property_tableSearch,e.tableSearch,t),tableSort:this.toAstProperty(i,ye.property_tableSort,e.tableSort,t),tablePagination:this.toAstProperty(i,ye.property_tablePagination,e.tablePagination,t),tablePaginationLimit:this.toAstProperty(i,ye.property_tablePaginationLimit,e.tablePaginationLimit,t),tableHeight:this.toAstProperty(i,ye.property_tableHeight,e.tableHeight,t),tableWhitespaceNoWrap:this.toAstProperty(i,ye.property_tableWhitespaceNoWrap,e.tableWhitespaceNoWrap,t),tableAutoWidth:this.toAstProperty(i,ye.property_tableAutoWidth,e.tableAutoWidth,t),tableResizableColumns:this.toAstProperty(i,ye.property_tableResizableColumns,e.tableResizableColumns,t),tableColumnMinWidth:this.toAstProperty(i,ye.property_tableColumnMinWidth,e.tableColumnMinWidth,t),quizCountItems:this.toAstProperty(i,ye.property_quizCountItems,e.quizCountItems,t),quizStrikethroughSolutions:this.toAstProperty(i,ye.property_quizStrikethroughSolutions,e.quizStrikethroughSolutions,t),codeLineNumbers:this.toAstProperty(i,ye.property_codeLineNumbers,e.codeLineNumbers,t),codeMinimap:this.toAstProperty(i,ye.property_codeMinimap,e.codeMinimap,t),stripePricingTableId:this.toAstProperty(i,ye.property_stripePricingTableId,e.stripePricingTableId,t),stripePricingTableDescriptiveName:this.toAstProperty(i,ye.property_stripePricingTableDescriptiveName,e.stripePricingTableDescriptiveName,t),stripePublishableKey:this.toAstProperty(i,ye.property_stripePublishableKey,e.stripePublishableKey,t),thumbImage:this.toAstProperty(i,ye.property_thumbImage,e.thumbImage,t),scormSource:this.toAstProperty(i,ye.property_scormSource,e.scormSource,t),posterImage:this.toAstProperty(i,ye.property_posterImage,e.posterImage,t),focusX:this.toAstProperty(i,ye.property_focusX,e.focusX,t),focusY:this.toAstProperty(i,ye.property_focusY,e.focusY,t),pointerLeft:this.toAstProperty(i,ye.property_pointerLeft,e.pointerLeft,t),pointerTop:this.toAstProperty(i,ye.property_pointerTop,e.pointerTop,t),listItemIndent:this.toAstProperty(i,ye.property_listItemIndent,e.listItemIndent,t),backgroundWallpaper:this.toImageResource(c,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(i,ye.property_hasBookNavigation,e.hasBookNavigation,t),duration:this.toAstProperty(i,ye.property_duration,e.duration,t),deeplink:this.toAstProperty(i,ye.property_deeplink,e.deeplink,t),externalLink:this.toAstProperty(i,ye.property_externalLink,e.externalLink,t),externalLinkText:this.toAstProperty(i,ye.property_externalLinkText,e.externalLinkText,t),videoCallLink:this.toAstProperty(i,ye.property_videoCallLink,e.videoCallLink,t),vendorDashboardId:this.toAstProperty(i,ye.property_vendorDashboardId,e.vendorDashboardId,t),vendorSurveyId:this.toAstProperty(i,ye.property_vendorSurveyId,e.vendorSurveyId,t),vendorUrl:this.toAstProperty(i,ye.property_vendorUrl,e.vendorUrl,t),search:this.toAstProperty(i,ye.property_search,e.search,t),list:this.toAstProperty(i,ye.property_list,e.list,t),layer:this.toAstProperty(i,ye.property_layer,e.layer,t),layerRole:this.toAstProperty(i,ye.property_layerRole,e.layerRole,t),textReference:this.toAstProperty(i,ye.property_textReference,e.textReference,t),isTracked:this.toAstProperty(i,ye.property_isTracked,e.isTracked,t),isInfoOnly:this.toAstProperty(i,ye.property_isInfoOnly,e.isInfoOnly,t),imageFirst:this.toAstProperty(i,ye.property_imageFirst,e.imageFirst,t),activityType:this.toAstProperty(i,ye.property_activityType,e.activityType,t),labelTrue:this.toAstProperty(i,ye.property_labelTrue,e.labelTrue,t),labelFalse:this.toAstProperty(i,ye.property_labelFalse,e.labelFalse,t),content2Buy:this.toAstProperty(i,ye.property_content2Buy,e.content2Buy,t),listPrice:this.toAstProperty(i,ye.property_listPrice,e.listPrice,t),customerProductId:this.toAstProperty(i,ye.property_customerProductId,e.customerProductId,t),customerProductShopLink:this.toAstProperty(i,ye.property_customerProductShopLink,e.customerProductShopLink,t),mailingList:this.toAstProperty(i,ye.property_mailingList,e.mailingList,t),buttonCaption:this.toAstProperty(i,ye.property_buttonCaption,e.buttonCaption,t),callToActionUrl:this.toAstProperty(i,ye.property_callToActionUrl,e.callToActionUrl,t),advertisingClickUrl:this.toAstProperty(i,ye.property_advertisingClickUrl,e.advertisingClickUrl,t),brandColor:this.toAstProperty(i,ye.property_brandColor,e.brandColor,t),brandColorName:this.toAstProperty(i,ye.property_brandColorName,e.brandColorName,t),caption:this.handleJsonText(c,rt,e.caption),quotedPerson:this.toAstProperty(i,ye.property_quotedPerson,e.quotedPerson,t),reasonableNumOfChars:d,resolved:this.toAstProperty(i,ye.property_resolved,e.resolved,t),resolvedDate:this.toAstProperty(i,ye.property_resolvedDate,e.resolvedDate,t),resolvedBy:this.toAstProperty(i,ye.property_resolvedBy,e.resolvedBy,t),handInAcceptFileType:this.toAstProperty(i,ye.property_handInAcceptFileType,e.handInAcceptFileType,t),handInRequirement:this.toAstProperty(i,ye.property_handInRequirement,e.handInRequirement,t),handInInstruction:this.toAstProperty(i,ye.property_handInInstruction,e.handInInstruction,t),maxCreatedBits:this.toAstProperty(i,ye.property_maxCreatedBits,e.maxCreatedBits,t),maxDisplayLevel:this.toAstProperty(i,ye.property_maxDisplayLevel,e.maxDisplayLevel,t),maxTocChapterLevel:this.toAstProperty(i,ye.property_maxTocChapterLevel,e.maxTocChapterLevel,t),sourceDocument:this.toAstProperty(i,ye.property_sourceDocument,e.sourceDocument,t),internalPrintPdf:this.toAstProperty(i,ye.property_internalPrintPdf,e.internalPrintPdf,t),hasPrintRestriction:this.toAstProperty(i,ye.property_hasPrintRestriction,e.hasPrintRestriction,t),enforceUpdateOverUserInput:this.toAstProperty(i,ye.property_enforceUpdateOverUserInput,e.enforceUpdateOverUserInput,t),extractorExtractionTimestamp:this.toAstProperty(i,ye.property_extractorExtractionTimestamp,e.extractorExtractionTimestamp,t),tocResource:this.toAstProperty(i,ye.property_tocResource,e.tocResource,t),tocContent:this.toAstProperty(i,ye.property_tocContent,e.tocContent,t),page:this.toAstProperty(i,ye.property_page,e.page,t),allowPrint:this.toAstProperty(i,ye.property_allowPrint,e.allowPrint,t),printParentChapterLevel:this.toAstProperty(i,ye.property_printParentChapterLevel,e.printParentChapterLevel,t),printOnRequestCustomerId:this.toAstProperty(i,ye.property_printOnRequestCustomerId,e.printOnRequestCustomerId,t),printOnRequestProductId:this.toAstProperty(i,ye.property_printOnRequestProductId,e.printOnRequestProductId,t),platformBrandTarget:this.toAstProperty(i,ye.property_platformBrandTarget,e.platformBrandTarget,t),platformName:this.toAstProperty(i,ye.property_platformName,e.platformName,t),platformIcon:this.toImageResource(c,e.platformIcon),platformLogo:this.toImageResource(c,e.platformLogo),platformLogoMaxHeight:this.toAstProperty(i,ye.property_platformLogoMaxHeight,e.platformLogoMaxHeight,t),platformPrimaryColor:this.toAstProperty(i,ye.property_platformPrimaryColor,e.platformPrimaryColor,t),platformSecondaryColor:this.toAstProperty(i,ye.property_platformSecondaryColor,e.platformSecondaryColor,t),platformBackgroundColor:this.toAstProperty(i,ye.property_platformBackgroundColor,e.platformBackgroundColor,t),platformScrollbarColor:this.toAstProperty(i,ye.property_platformScrollbarColor,e.platformScrollbarColor,t),platformSelectionColor:this.toAstProperty(i,ye.property_platformSelectionColor,e.platformSelectionColor,t),platformSeparatorColor:this.toAstProperty(i,ye.property_platformSeparatorColor,e.platformSeparatorColor,t),platformPlaceholderColor:this.toAstProperty(i,ye.property_platformPlaceholderColor,e.platformPlaceholderColor,t),platformTextSelectionColor:this.toAstProperty(i,ye.property_platformTextSelectionColor,e.platformTextSelectionColor,t),platformButtonPrimaryColor:this.toAstProperty(i,ye.property_platformButtonPrimaryColor,e.platformButtonPrimaryColor,t),platformButtonBackgroundColor:this.toAstProperty(i,ye.property_platformButtonBackgroundColor,e.platformButtonBackgroundColor,t),platformMessageBackgroundColor:this.toAstProperty(i,ye.property_platformMessageBackgroundColor,e.platformMessageBackgroundColor,t),platformBackgroundImage:this.toImageResource(c,e.platformBackgroundImage),platformBorderColor:this.toAstProperty(i,ye.property_platformBorderColor,e.platformBorderColor,t),platformSelectionTextColor:this.toAstProperty(i,ye.property_platformSelectionTextColor,e.platformSelectionTextColor,t),platformBaseLayerColor:this.toAstProperty(i,ye.property_platformBaseLayerColor,e.platformBaseLayerColor,t),platformMargin:this.toAstProperty(i,ye.property_platformMargin,e.platformMargin,t),platformBorderRadius:this.toAstProperty(i,ye.property_platformBorderRadius,e.platformBorderRadius,t),platformSelectionBorderRadius:this.toAstProperty(i,ye.property_platformSelectionBorderRadius,e.platformSelectionBorderRadius,t),platformNeedsShadow:this.toAstProperty(i,ye.property_platformNeedsShadow,e.platformNeedsShadow,t),productId:this.toAstProperty(i,ye.property_productId,e.productId,t),product:this.toAstProperty(i,ye.property_product,e.product,t),productVideo:this.toAstProperty(i,ye.property_productVideo,e.productVideo,t),productFolder:this.toAstProperty(i,ye.property_productFolder,e.productFolder,t),technicalTerm:this.buildTechnicalTerm(c,e.technicalTerm),servings:this.buildServings(c,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(c,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(c,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(i,ye.property_ratingLevelSelected,e.ratingLevelSelected,t),formula:this.toAstProperty(i,ye.property_formula,e.formula,t),markConfig:this.buildMarkConfigs(c,e.markConfig),imageSource:this.buildImageSource(c,e.imageSource),person:this.buildPerson(c,e.person),bot:this.toAstProperty(i,ye.property_bot,e.bot,t),referenceProperty:this.toAstProperty(i,ye.property_reference,e.referenceProperty,t),fullName:this.toAstProperty(i,ye.property_fullName,e.fullName,t),pseudonym:this.toAstProperty(i,ye.property_pseudonym,e.pseudonym,t),titleString:this.toAstProperty(i,ye.property_title,e.titleString,t),jobTitle:this.toAstProperty(i,ye.property_jobTitle,e.jobTitle,t),title:this.handleJsonText(c,rt,e.title),subtitle:this.handleJsonText(c,rt,e.subtitle),level:Qr.asNumber(e.level),toc:this.toAstProperty(i,ye.property_toc,e.toc,t),progress:this.toAstProperty(i,ye.property_progress,e.progress,t),isCollapsible:this.toAstProperty(i,ye.property_isCollapsible,e.isCollapsible??(!!a||void 0),t),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(i,ye.property_revealSolutions,e.revealSolutions,t),item:this.handleJsonText(c,rt,e.item),lead:this.handleJsonText(c,rt,e.lead),pageNumber:this.handleJsonText(c,rt,e.pageNumber),marginNumber:this.handleJsonText(c,rt,e.marginNumber),hint:this.handleJsonText(c,rt,e.hint),instruction:this.handleJsonText(c,rt,e.instruction),partialAnswer:this.toAstProperty(i,ye.property_partialAnswer,e.partialAnswer,t),sampleSolution:this.toAstProperty(i,ye.property_sampleSolution,e.sampleSolution,t),additionalSolutions:this.toAstProperty(i,ye.property_additionalSolutions,e.additionalSolutions,t),...this.toExample(e.__isDefaultExample,e.example),previewImage:this.toImageResources(c,e.previewImage),previewVideo:this.toVideoResources(c,e.previewVideo),imagePlaceholder:this.toImageResource(c,e.imagePlaceholder),resources:St.asArray(this.resourceBuilder.resourceFromResourceJson(c,e.resources)),body:this.buildBody(c,e.body),cardNode:p,footer:this.buildFooter(c,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:e.__isDefaultExample??!1};return Le.isOfBitType(h.bitType,u.interview)&&this.pushDownTree(c,void 0,void 0,p,"questions","reasonableNumOfChars",e.reasonableNumOfChars),Le.isOfBitType(h.bitType,u.feedback)&&this.pushDownTree(c,void 0,void 0,p,["feedbacks","reason"],"reasonableNumOfChars",e.reasonableNumOfChars),this.pushDownTree(c,[h.body,...p?.cardBits?.map(e=>e.body)||[]],[Ye.gap],void 0,void 0,"isCaseSensitive",e.isCaseSensitive??!0),this.pushDownTree(c,void 0,void 0,p,"pairs","isCaseSensitive",e.isCaseSensitive??!0),this.pushDownTree(c,void 0,void 0,p,["matrix","cells"],"isCaseSensitive",e.isCaseSensitive??!0),this.pushExampleDownTree(c,h.body,p,h.__isDefaultExample,m.example),this.setDefaultBitValues(h),this.setIsExampleFlags(h),this.addVersionToParserInfo(h),_e.removeUnwantedProperties(h,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),ii.validateBit(h)}buildBooks(e,t){if(g.isString(t))return t;if(!Array.isArray(t))return;const r=t.map(t=>this.buildBook(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildBook(e,t){if(!t)return;const r={book:t.book??"",reference:t.reference??"",referenceEnd:t.referenceEnd??void 0};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),r}resolveAccessibilityGroupTag(e,t){if(null!=t&&(!Array.isArray(t)||t.length>0))return t;const r=e.tags[ye.property_accessibilityGroupTag],i=r?.defaultValue;if(null==i)return t;const o=r?.chain?.[ye.property_accessibilityTag]?.defaultValue;return[{name:i,tags:null!=o?[o]:[]}]}buildGroupTags(e,t){if(!t)return;Array.isArray(t)||(t=[t]);let r=t.map(t=>this.buildGroupTag(e,t)).filter(e=>null!=e);const i={};for(const e of r)e&&(i[e.name]?i[e.name].tags=St.removeDuplicates([...i[e.name].tags,...e.tags]):i[e.name]=e);return r=Object.values(i),r.length>0?r:void 0}normaliseSourceBB(e){if(null==e)return;if(!Array.isArray(e)||0===e.length)return;const t=(e.some(Array.isArray)?e:[e]).filter(e=>Array.isArray(e)&&4===e.length&&e.every(e=>"number"==typeof e));return t.length>0?t:void 0}buildGroupTag(e,t){if(!t)return;const r=Array.isArray(t.tags)?t.tags:[];return{name:t.name??"",tags:r.map(e=>e?.trim()??"")??[]}}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFeedbackChoice(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFeedbackChoice(e,t){if(!t)return;const r={choice:t.choice??"",requireReason:!!t.requireReason,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildFeedbackReason(e,t){if(!t)return;const r=this.handleJsonText(e,rt,"true"),i={text:t.text??"",reasonableNumOfChars:t.reasonableNumOfChars??void 0,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,r),__textAst:t.__textAst};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),i}buildChoices(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildChoice(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildChoice(e,t){if(!t)return;const r={choice:t.choice??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildResponses(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildResponse(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildResponse(e,t){if(!t)return;const r={response:t.response??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildBotResponses(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.botResponse(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}botResponse(e,t){if(!t)return;const r={response:t.response??"",reaction:t.reaction??"",feedback:t.feedback??"",item:t.item??"",lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint)};return _e.removeUnwantedProperties(r,{ignoreEmptyString:["response","reaction","feedback","item"],ignoreAllFalse:!0,ignoreEmptyArrays:[],ignoreUndefined:["example"]}),r}buildFeedbacks(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFeedback(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFeedback(e,t){if(!t)return;let r,i;if(!t.choices)return;r=this.buildFeedbackChoices(e,t.choices),t.reason&&(i=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),choices:r,reason:i};return _e.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildQuiz(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildQuiz(e,t){if(!t)return;const r={...this.toExample(t.__isDefaultExample,t.__defaultExample)};let i,o;if(t.choices)i=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!0,i);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,r.example,!1,o)}const a={item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isExample:!!t.__defaultExample,choices:i,responses:o};return _e.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),a}buildHeading(e,t){if(!t)return;if(null==t.forKeys)return;const r={forKeys:t.forKeys??"",forValues:t.forValues??t.__forValuesDefault??""};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),r}buildPairs(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildPair(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildPair(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),o=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),a={key:t.key??"",keyAudio:i,keyImage:o,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),values:t.values||[],__valuesAst:t.__valuesAst};return _e.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),a}buildMatricies(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildMatrix(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildMatrix(e,t){if(!t)return;let r=!1;for(const e of t.cells||[])e&&(t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),r=!!e.isExample||r);const i={key:t.key??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isExample:r,cells:(t.cells||[]).map(t=>this.buildMatrixCell(e,t)).filter(e=>null!=e)};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),i}buildMatrixCell(e,t){if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,i={values:t.values||[],item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),__valuesAst:t.__valuesAst};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),i}buildPronunciationTable(e,t){if(!t)return;return{data:(t.data||[]).map(t=>(t||[]).map(t=>{const r=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,rt,t.title),body:this.handleJsonText(e,rt,t.body),audio:r}}))}}buildTable(e,t){if(!t)return;const r=Bt(e.bitType,t),i=r,o=r;if(Array.isArray(i.columns)&&i.columns.length>0&&(i.columns=i.columns.map(t=>this.handleJsonText(e,rt,t))),Array.isArray(i.data)&&i.data.length>0&&(i.data=i.data.map(t=>(t||[]).map(t=>this.handleJsonText(e,rt,t)))),Array.isArray(i.columnWidths)){const e=Array.isArray(i.columns)?i.columns.length:void 0,t=(null!=e?i.columnWidths.slice(0,e):i.columnWidths).map(e=>"number"==typeof e&&e>0?e:null);t.some(e=>null!=e)?i.columnWidths=t:delete i.columnWidths}const a=t=>{if(!t||!Array.isArray(t.rows))return;return{rows:t.rows.map(t=>({cells:(t.cells||[]).map(t=>{const r={content:this.handleJsonText(e,rt,t.content)};return null!=t.title&&(r.title=t.title),null!=t.rowspan&&(r.rowspan=t.rowspan),null!=t.colspan&&(r.colspan=t.colspan),t.scope&&(r.scope=t.scope),null!=t.colwidth&&(r.colwidth=t.colwidth),r})}))}},s=a(o.header);s&&s.rows?.length>0&&(o.header=s);const n=a(o.body);n&&n.rows?.length>0&&(o.body=n);const l=a(o.footer);return l&&l.rows?.length>0&&(o.footer=l),r}buildQuestions(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildQuestion(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildQuestion(e,t){if(!t)return;const r=t.__sampleSolutionAst,i={question:this.handleJsonText(e,it,t.question),partialAnswer:t.partialAnswer??"",sampleSolution:t.sampleSolution??"",additionalSolutions:t.additionalSolutions??void 0,reasonableNumOfChars:t.reasonableNumOfChars??void 0,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,r),__sampleSolutionAst:t.__sampleSolutionAst};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["partialAnswer","sampleSolution"]}),i}buildIngredients(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildIngredient(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildIngredient(e,t){if(!t)return;const r={title:this.handleJsonText(e,rt,t.title),checked:t.checked??!1,ingredient:this.handleJsonText(e,rt,t.ingredient),quantity:t.quantity??0,unit:t.unit??"",unitPlural:t.unitPlural??"",unitAbbr:t.unitAbbr??"",unitAbbrPlural:t.unitAbbrPlural??"",decimalPlaces:t.decimalPlaces??1,disableCalculation:t.disableCalculation??!1,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),r}buildBody(e,t){if(!t)return;let r;const i=[],o=t.placeholders,a=t.bodyString,{textFormat:s}=e,n=()=>{let a,n=t.body;const l={};if(g.isString(t.body)?(a=(t.body??"").trim(),n=[]):Array.isArray(t.body)||(n=[]),o)for(const[e,t]of Object.entries(o))l[e]=t;if(a){a=_t.breakscape(a,{format:s,location:it,v2:!0});let e=0;const t=[];for(const[r,i]of Object.entries(l))if(a){const o=`[!${e}]`;a=a.replace(`${r}`,o),t.push(i),e++}n=this.textParser.toAst(a,{format:s,location:it});const r=e=>{for(let i=0,o=e.length;i<o;i++){const o=e[i];if("bit"===o.type){const r=o.index;null!=t[r]&&(e[i]=t[r])}else o.content&&r(o.content)}};r(n)}n=structuredClone(n),this.textParser.walkBodyBits(n,(t,r,o)=>{let a;switch(o.type){case Ye.gap:a=this.buildGap(e,o);break;case Ye.mark:a=this.buildMark(e,o);break;case Ye.select:a=this.buildSelect(e,o);break;case Ye.highlight:a=this.buildHighlight(e,o)}null!=a&&(t[r]=a,i.push(a))}),r=n,r.__tag="text"},l=s===S.bitmarkText;s===S.json?(()=>{if("string"==typeof t.body)try{r=JSON.parse(t.body)}catch(e){r=null}else r=t.body})():l?n():r=t.body;return{body:r,bodyBits:i,bodyString:a}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,it,t.footer)}}buildGap(e,t){if(!t)return;const r=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const i={type:Ye.gap,solutions:t.solutions||[],item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),isCaseSensitive:t.isCaseSensitive,...this.toExample(t.__isDefaultExample,t.example,r),__solutionsAst:t.__solutionsAst,attrs:{}};return _e.removeUnwantedProperties(i,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),i}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildMarkConfig(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildMarkConfig(e,t){if(!t)return;const r={mark:t.mark??"unknown",color:t.color??"",emphasis:t.emphasis??""};return _e.removeUnwantedProperties(r,{ignoreAllEmptyString:!0}),r}buildMark(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:Ye.mark,solution:t.solution??"",mark:t.mark??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0),attrs:{}};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),r}buildSelect(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:Ye.select,options:this.buildSelectOptions(e,t.options)||[],prefix:t.prefix??"",postfix:t.postfix??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(!1,void 0,void 0),__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),r}buildSelectOptions(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildSelectOption(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildSelectOption(e,t){if(!t)return;const r={text:t.text??"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildHighlight(e,t){if(!t)return;t=this.bodyBitCopyFromAttrs(t);const r={type:Ye.highlight,texts:this.buildHighlightTexts(e,t.texts)||[],prefix:t.prefix??"",postfix:t.postfix??"",item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(!1,void 0,void 0),attrs:{}};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),r}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildHighlightText(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildHighlightText(e,t){if(!t)return;const r={text:t.text??"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildFlashcards(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildFlashcard(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildFlashcard(e,t){if(!t)return;const r={question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(t.alternativeAnswers||[]).map(t=>this.buildTextAndIcon(e,t)).filter(e=>null!=e),item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),r}buildDefinitionList(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildDefinitionListItem(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildDefinitionListItem(e,t){if(!t)return;const{bitType:r}=e,i=Le.isOfBitType(r,[u.metaSearchDefaultTerms]),o={term:this.buildTextAndIcon(e,t.term,i),definition:this.buildTextAndIcon(e,t.definition,i),alternativeDefinitions:(t.alternativeDefinitions||[]).map(t=>this.buildTextAndIcon(e,t,i)).filter(e=>null!=e),item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!0)};return _e.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),o}buildTextAndIcon(e,t,r=!1){const i=this.resourceBuilder.resourceFromResourceJson(e,t?.icon);let o=this.handleJsonText(e,rt,t?.text||t);r&&(o=this.textGenerator.generateSync(o,S.plainText,it,{noBreakscaping:!0}).trim());const a={text:o,icon:i};return _e.removeUnwantedProperties(a,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),a}buildStatements(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildStatement(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildStatement(e,t){if(!t)return;const r={statement:this.handleJsonText(e,rt,t.statement),isCorrect:!!t.isCorrect,item:this.handleJsonText(e,rt,t.item),lead:this.handleJsonText(e,rt,t.lead),hint:this.handleJsonText(e,rt,t.hint),instruction:this.handleJsonText(e,rt,t.instruction),...this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect)};return _e.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["statement"],ignoreUndefined:["example"]}),r}buildImageSource(e,t){if(!t)return;const{url:r,mockupId:i,size:o,format:a,trim:s}=t,n={url:r??"",mockupId:i??"",size:o??null,format:a??null,trim:Yr.isBoolean(s)?s:null};return _e.removeUnwantedProperties(n,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),n}buildPerson(e,t){if(!t)return;const{name:r,title:i,avatarImage:o}=t,a={name:r??"",title:i??void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return _e.removeUnwantedProperties(a,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),a}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:r,lang:i}=t,o={technicalTerm:r??"",lang:i??""};return _e.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:r,unit:i,unitPlural:o,unitAbbr:a,unitAbbrPlural:s,decimalPlaces:n,disableCalculation:l,hint:c}=t,p={servings:r??0,unit:i??"",unitPlural:o??"",unitAbbr:a??"",unitAbbrPlural:s??"",decimalPlaces:n??1,disableCalculation:l??!1,hint:c??""};return _e.removeUnwantedProperties(p,{ignoreEmptyString:["servings","unit"]}),p}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:r,label:i}=t,o={level:r??0,label:this.handleJsonText(e,rt,i)};return _e.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const r=t.map(t=>this.buildCardBit(e,t)).filter(e=>null!=e);return r.length>0?r:void 0}buildCardBit(e,t){if(!t)return;const{bitType:r,textFormat:i}=e,o=this.buildBit({...t,bitType:r,textFormat:i},{cardSet:{sideNo:0,variantNo:0}});return _e.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),ii.validateCardBit(o)}toImageResource(e,t){return St.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,y.image,t?.image))}toImageResources(e,t){const r=St.asArray(t),i=[];if(r&&r.length>0)for(const t of r){const r=this.resourceBuilder.resourceFromResourceDataJson(e,y.image,t.image);i.push(r)}return i}toVideoResources(e,t){const r=St.asArray(t),i=[];if(r&&r.length>0)for(const t of r){const r=this.resourceBuilder.resourceFromResourceDataJson(e,y.video,t.video);i.push(r)}return i}buildCardNode(e,t){const r={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:this.handleJsonText(e,it,t.elements),flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,t.definitions??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 _e.removeUnwantedProperties(r,{ignoreEmptyObjects:["table"]}),Object.keys(r).length>0?r:void 0}bodyBitCopyFromAttrs(e){const t={...e};if(e.attrs)for(const[r,i]of Object.entries(e.attrs))t[r]=i;return t}pushExampleDownTree(e,t,r,i,o){if(i||null!=o){if(r){if(this.pushExampleDownTreeString(e,i,o,r.pairs),this.pushExampleDownTreeBoolean(e,i,o,!1,r.flashcards),this.pushExampleDownTreeBoolean(e,i,o,!1,r.definitions),this.pushExampleDownTreeBoolean(e,i,o,!0,r.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,r.responses,r.statements,r.statement),r.quizzes)for(const t of r.quizzes)this.pushExampleDownTreeBoolean(e,i,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,i,o,!1,t.responses);if(r.matrix)for(const t of r.matrix)this.pushExampleDownTreeString(e,i,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,i,o,t)}}pushExampleDownTreeBoolean(e,t,r,i,...o){if((t||null!=r)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];ei.fillBooleanExample(o,t,r,i)}}pushExampleDownTreeString(e,t,r,...i){if((t||r)&&Array.isArray(i))for(const o of i)if(o){const i=Array.isArray(o)?o:[o];ei.fillStringExample(e.textFormat,i,t,r,!1)}}pushExampleDownTreeBodyBits(e,t,r,i){if(!t&&!r)return;const o=this.textParser.extractBodyBits(i?.body);for(const i of o)if(i)switch(i.type){case Ye.gap:{const o=i;ei.fillStringExample(e.textFormat,[o],t,r,!1);break}case Ye.mark:{const e=i;ei.fillBooleanExample([e],t,r,!1);break}case Ye.select:{const e=i;ei.fillBooleanExample(e.options,t,r,!0);break}case Ye.highlight:{const e=i;ei.fillBooleanExample(e.texts,t,r,!0);break}}}pushDownTree(e,t,r,i,o,a,s){if(void 0!==s){if(i&&o){Array.isArray(o)||(o=[o]);const e=_e.flatMapPath(i,o);for(const t of e)null==t[a]&&(t[a]=s)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&r){const e=this.textParser.extractBodyBits(t.body);if(r&&e&&e.length>0)for(const t of e)if(t&&-1!==r.indexOf(t.type)){const e=t;null==e[a]&&(e[a]=s)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const r={};for(const[e,i]of t)r[e]=St.asArray(i)||[i];return r}setIsExampleFlags(e){const t=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:r,cardNode:i}=e,o=this.textParser.extractBodyBits(r?.body);for(const e of o)switch(e.type){case Ye.gap:case Ye.mark:t(e);break;case Ye.select:{const r=e;let i=!1;for(const e of r.options)i=!!t(e)||i;r.isExample=i;break}case Ye.highlight:{const r=e;let i=!1;for(const e of r.texts)i=!!t(e)||i;r.isExample=i;break}}if(i){for(const e of i.flashcards||[])t(e);for(const e of i.definitions||[])t(e);for(const e of i.pairs||[])t(e);for(const e of i.matrix||[]){let r=!1;for(const i of e.cells||[])r=!!t(i)||r;e.isExample=r}for(const e of i.quizzes||[]){let r=!1;for(const i of e.responses||[])r=!!t(i)||r;for(const i of e.choices||[])r=!!t(i)||r;e.isExample=r}for(const e of i.responses||[])t(e);for(const e of i.choices||[])t(e);for(const e of i.statements||[])t(e);t(i.statement);for(const e of i.questions||[])t(e)}t(e.statement);for(const r of e.responses||[])t(r);for(const r of e.choices||[])t(r);t(e)}setDefaultBitValues(e){const{bitType:t}=e;switch(t){case u.articleAi:case u.noteAi:case u.summaryAi:e.aiGenerated=this.toAstProperty(t,ye.property_aiGenerated,!0,void 0)}}addVersionToParserInfo(e){const t=e.parser??{};t.version=qe.appVersion.full,e.parser=t}},si=class{constructor(){l(this,"_buffer"),l(this,"_string",""),l(this,"endOfLineString","\n"),l(this,"lastWrite","")}get isSync(){return!0}getString(){return this._string}async open(){return this.openSync(),Promise.resolve()}async close(){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){if(!this._buffer)return this;let t;return t=null!=e?e+this.endOfLineString:this.endOfLineString,this._buffer.push(t),this.lastWrite=t,this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let r="";for(let i=0,o=e.length;i<o;i++){const a=e[i];this._buffer.push(a),r+=a,t&&i<o-1&&(this._buffer.push(t),r+=t),this._buffer.push(this.endOfLineString),r+=this.endOfLineString}return this.lastWrite=r,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}},ni=r(722),li=r(722),ci=(r(722),{v1:1,v2:2}),pi={debugGenerationInline:!1},ui=class extends Lt{constructor(e,t){super(),l(this,"ast",new et),l(this,"textGenerator"),l(this,"bitmarkVersion"),l(this,"options"),l(this,"mainWriter"),l(this,"partWriter"),l(this,"writer"),l(this,"prettifySpace"),l(this,"spacesAroundValues"),l(this,"spacesAroundValuesStr"),l(this,"bitType",u._error),l(this,"textFormat",S.bitmarkText),l(this,"isBodyBitmarkText",!1),l(this,"isCardAllowed",!1),l(this,"firstBit",!0),l(this,"hasCardSet",!1),l(this,"hasFooter",!1),l(this,"inTag",!0),l(this,"skipTableTraversal",!1),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=(0,li.Enum)(It).fromValue(t?.bitmarkVersion)??Et,this.options={...pi,...t?.bitmarkOptions},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.bitmarkVersion===It.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=ci.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=ci.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 Jr(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new si,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}async generate(e){this.resetState(),await this.writer.open(),this.walkAndWrite(e),this.writeLine(),await this.writer.close()}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=u._error,this.textFormat=S.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,Xe.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){const r=e.value,i=Le.getBitConfig(r.bitType),o=Le.getBitResourcesConfig(r.bitType,r.resourceType);if(this.bitType=r.bitType,this.textFormat=r.textFormat??i.textFormatDefault,this.isBodyBitmarkText=this.textFormat===S.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,i.textFormatDefault)&&(this.writeColon(),this.writeTagKey(r.textFormat))}let a;if(i.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=o.comboResourceConfigKeysMap;if(o.comboResourceConfigKeysMap.size>0)for(const t of e.keys())a=xe(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 r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;for(let e=0;e<r.length;e++){const i=r[e];this.writeNL(),this.writeProperty("internalComment",i,t,{format:v,array:!0})}return!1}enter_groupTag(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;for(const e of r){const{name:r,tags:i}=e;if(this.writeProperty("groupTag",r,t,{format:v,writeEmpty:!0}),i&&i.length>0)for(const e of i)this.writeProperty("tag",e,t,{format:v,writeEmpty:!0,forceChain:!0})}return!1}enter_accessibilityGroupTag(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;for(const e of r){const{name:r,tags:i}=e;if(this.writeProperty("accessibilityGroupTag",r,t,{format:v,writeEmpty:!0}),i&&i.length>0)for(const e of i)this.writeProperty("accessibilityTag",e,t,{format:v,writeEmpty:!0,forceChain:!0})}return!1}leaf_labelTrue(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const o=i?.value;if(o){const e=""!=r,i=o.labelFalse&&""!=o.labelFalse;(e||i)&&this.writeNL(),e&&this.writeProperty("labelTrue",r,t,{format:v,forceChain:!0}),i&&this.writeProperty("labelFalse",o.labelFalse,t,{format:v,forceChain:!0})}return!1}leaf_labelFalse(e,t){return!0}enter_imageSource(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{url:o,mockupId:a,size:s,format:n,trim:l}=r;return this.writeProperty("imageSource",o,t,{format:v}),o&&(a&&this.writeProperty("mockupId",a,t,{format:v,forceChain:!0}),s&&this.writeProperty("size",s,t,{format:v,forceChain:!0}),n&&this.writeProperty("format",n,t,{format:v,forceChain:!0}),Yr.isBoolean(l)&&this.writeProperty("trim",l,t,{format:v,forceChain:!0})),!1}enter_technicalTerm(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{technicalTerm:o,lang:a}=r;return this.writeProperty("technicalTerm",o,t,{format:v}),null!=a&&this.writeProperty("lang",a,t,{format:v,forceChain:!0}),!1}enter_servings(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{servings:o,unit:a,unitPlural:s,unitAbbr:n,unitAbbrPlural:l,decimalPlaces:c,disableCalculation:p,hint:u}=r;return this.writeProperty("servings",o,t,{format:v}),null!=a&&this.writeProperty("unit",a,t,{format:v,forceChain:!0}),null!=s&&this.writeProperty("unitPlural",s,t,{format:v,forceChain:!0}),null!=n&&this.writeProperty("unitAbbr",n,t,{format:v,forceChain:!0}),null!=l&&this.writeProperty("unitAbbrPlural",l,t,{format:v,forceChain:!0}),null!=c&&this.writeProperty("decimalPlaces",c,t,{format:v,forceChain:!0}),null!=p&&this.writeProperty("disableCalculation",p,t,{format:v,forceChain:!0}),null!=u&&(this.writeOPQ(),this.writeTextOrValue(u,S.plainText,rt),this.writeCL()),!1}enter_person(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{name:o,title:a,avatarImage:s}=r;return this.writeProperty("person",o,t,{format:v}),a&&this.writeProperty("title",a,t,{format:v,forceChain:!0}),s&&this.writeResource(y.image,s.image.src),!1}enter_text(e,t){const r=this.getParentNode(t);return!r||r.key!==Xe.term&&r.key!==Xe.definition&&r.key!==Xe.alternativeDefinitionsValue&&r.key!==Xe.question&&r.key!==Xe.answer&&r.key!==Xe.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}leaf_text(e,t){const r=this.getParentNode(t);return!r||r.key!==Xe.term&&r.key!==Xe.definition&&r.key!==Xe.alternativeDefinitionsValue&&r.key!==Xe.question&&r.key!==Xe.answer&&r.key!==Xe.alternativeAnswersValue&&r.key!==Xe.reason||(g.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}enter_icon(e,t){const r=e.value,i=this.getParentNode(t);return!i||(i.key!==Xe.term&&i.key!==Xe.definition&&i.key!==Xe.alternativeDefinitionsValue&&i.key!==Xe.question&&i.key!==Xe.answer&&i.key!==Xe.alternativeAnswersValue||this.writeResource(y.icon,r.image.src),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,t,{format:v}),!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 r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;const{level:o,label:a}=r,s=e.key===Xe.ratingLevelStart?"ratingLevelStart":"ratingLevelEnd";return this.writeProperty(s,o,t,{format:v}),a&&this.writeProperty("label",a,t,{format:T,forceChain:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.markConfig)return!0;const{mark:o,color:a,emphasis:s}=r;return o&&(this.writeNL(),this.writeProperty("mark",o,t,{format:v}),a&&this.writeProperty("color",a,t,{format:v,forceChain:!0}),s&&this.writeProperty("emphasis",s,t,{format:v,forceChain:!0})),!1}enter_partialAnswer(e,t){return e.value&&this.writeProperty("partialAnswer",e.value,t,{format:v}),!1}leaf_partialAnswer(e,t){return e.value&&this.writeProperty("partialAnswer",e.value,t,{format:v}),!1}enter_sampleSolution(e,t){return e.value&&this.writeProperty("sampleSolution",e.value,t,{format:v}),!1}leaf_sampleSolution(e,t){return e.value&&this.writeProperty("sampleSolution",e.value,t,{format:v}),!1}leaf_reasonableNumOfChars(e,t){this.writeProperty("reasonableNumOfChars",e.value,t,{format:v})}enter_sourceBB(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!1;const i=e.value;return!(!Array.isArray(i)||0===i.length)&&(this.writeProperty("sourceBB",i.map(e=>e.join(", ")),t,{format:v,array:!0}),!1)}leaf_additionalSolutionsValue(e,t){const r=this.getParentNode(t,2);r?.key===Xe.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,t,{format:v,array:!0,writeEmpty:!0}))}enter_item(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.lead)||(!this.isEmptyText(i?.value?.pageNumber)||(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL(),!0))))}enter_lead(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.pageNumber)||(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL(),!0)))}enter_pageNumber(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(!this.isEmptyText(i?.value?.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.lead??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r??"",S.bitmarkText,rt),this.writeCL(),!0))}enter_marginNumber(e,t){const r=e.value,i=this.getParentNode(t);return!this.isEmptyText(r)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(i?.value?.item??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.lead??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(i?.value?.pageNumber??"",S.bitmarkText,rt),this.writeCL(),this.writeOPC(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL(),!0)}enter_body(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue&&r?.key!==Xe.cardBitsValue)return!0;this.inTag=!1;const i=e.value;if(this.textFormat===S.json){const e=i.body??null;if(Array.isArray(e)||_e.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,S.plainText,it))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(i.body)?i.body:[];this.writeTextOrValue(t,this.textFormat,it,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=g.isString(i.body)?i.body:"";this.writeTextOrValue(`${e}`,S.plainText,it)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,r){const i=(0,li.Enum)(Xe).fromValue(e.type)??Xe.bodyBit;return this.ast.walk(e,i,this,void 0),""}enter_gap(e,t){const r=e.value;if(r.solutions&&0===r.solutions.length)this.writeOPU(),this.writeCL();else for(const e of r.solutions)this.writeOPU(),this.writeTextOrValue(e,S.plainText,rt),this.writeCL();return!0}enter_mark(e,t){const r=e.value;return this.writeOPE(),this.writeTextOrValue(r.solution,S.plainText,rt),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value;return this.textFormat===S.json||i.footer&&i.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",S.plainText,it),this.writeNL(),this.writeTextOrValue(i.footer,this.textFormat,it,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value;return i&&0===i.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return;const i=e.value,o=this.getParentNode(t,2)?.value;o?.type===Ye.mark&&i&&(this.writeOPE(),this.writeTextOrValue(i,S.plainText,rt),this.writeCL())}leaf_mark(e,t){const r=t[0];if(r?.key!==Xe.mark)return;const i=e.value;i&&this.writeProperty("mark",i,t,{format:v})}enter_optionsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,S.plainText,rt),this.writeCL(),!0}enter_textsValue(e,t){const r=e.value;return r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.text,S.plainText,rt),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,ci.v1)}enter_elements(e,t){}between_elements(e,t,r,i){this.writeCardSetSideDivider()}between_flashcards(e,t,r,i){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,r,i){this.isCardAllowed&&(r.key===Xe.answer?this.writeCardSetSideDivider():r.key===Xe.alternativeAnswers&&0!==r.value?.length&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,r,i){this.isOfBitType(u.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.statement,S.plainText,rt),this.writeCL(),!0}enter_choicesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect||r.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.choice,S.plainText,rt),this.writeCL(),!0}enter_responsesValue(e,t){const r=e.value;return this.writeNL(),r.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(r.response,S.plainText,rt),this.writeCL(),!0}between_feedbacks(e,t,r,i){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,r,i){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,r,i){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,r,i){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const r=e.value;return this.writeNL(),this.writeResource(y.audio,r.audio.src),!1}enter_keyImage(e,t){const r=e.value;return this.writeNL(),this.writeResource(y.image,r.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,r,i){this.isCardAllowed&&this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,r,i){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}enter_table(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.cardNode)return!0;const i=e.value;return!i||!this.writeAdvancedTable(i)}between_table(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}writeAdvancedTable(e){const t=Bt(u.tableExtended,e),r=[{key:"header",qualifier:"table-header",section:t.header},{key:"body",qualifier:void 0,section:t.body},{key:"footer",qualifier:"table-footer",section:t.footer}];let i=0;for(const{key:e,qualifier:t,section:o}of r){const r=o?.rows??[];if(0!==r.length)for(const o of r)this.writeCardSetCardDivider(t),this.writeTableRow(o,e),i++}return i>0}writeTableRow(e,t){const r=e?.cells??[];if(0!==r.length)for(let e=0;e<r.length;e++)e>0&&this.writeCardSetSideDivider(),this.writeNL(),this.writeTableCell(r[e],t)}writeTableCell(e,t){const r="body"===t?"td":"th",i=e.title?"th":"td";i!==r&&(this.writeTableCellProperty("tableCellType",i),this.writeNL()),e.rowspan&&e.rowspan>1&&(this.writeTableCellProperty("tableRowSpan",e.rowspan),this.writeNL()),e.colspan&&e.colspan>1&&(this.writeTableCellProperty("tableColSpan",e.colspan),this.writeNL()),e.scope&&(this.writeTableCellProperty("tableScope",e.scope),this.writeNL()),e.colwidth&&e.colwidth>0&&(this.writeTableCellProperty("tableColWidth",e.colwidth),this.writeNL());const o=e.content??_t.EMPTY_STRING,a=this.options.noBreakscaping?{noBreakscaping:!0}:void 0;this.writeTextOrValue(o,this.textFormat,it,a)}writeTableCellProperty(e,t){this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,S.plainText,rt),this.writeCL()}between_data(e,t,r,i){const o=this.getParentNode(i);o?.key!==Xe.table&&o?.key!==Xe.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,r,i){const o=this.getParentNode(i),a=o?.key;a!==Xe.table&&a!==Xe.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.bitmarkText,rt),this.writeCL()}between_dataValue(e,t,r,i){const o=this.getParentNode(i,2);o?.key!==Xe.table&&o?.key!==Xe.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const r=this.getParentNode(t,3);r?.key===Xe.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}enter_dataValueValue(e,t){const r=this.getParentNode(t,3);if((r?.key===Xe.table||r?.key===Xe.pronunciationTable)&&e.value){if(r?.key===Xe.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,S.bitmarkText,rt),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(y.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,it)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)}}between_captionDefinitionList(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const r=this.getParentNode(t);return r?.key!==Xe.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}leaf_definition(e,t){const r=this.getParentNode(t);return r?.key!==Xe.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}between_definitions(e,t,r,i){const o=this.getParentNode(i);o?.key!==Xe.cardNode&&o?.key!==Xe.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,r,i){const o=this.getParentNode(i);o?.key===Xe.definitions&&this.isCardAllowed&&(r.key===Xe.definition?this.writeCardSetSideDivider():r.key===Xe.alternativeDefinitions&&r.value?.length>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,r,i){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const r=e.value;return null!=r.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(r.title,S.bitmarkText,rt),this.writeCL()),null!=r.ingredient&&(this.writeNL(),r.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=r.quantity&&(this.writeOPB(),this.writeTextOrValue(`${r.quantity}`,S.plainText,rt),this.writeCL()),null!=r.unit&&this.writeProperty("unit",r.unit,t,{format:v}),null!=r.unitPlural&&this.writeProperty("unitPlural",r.unitPlural,t,{format:v}),null!=r.unitAbbr&&this.writeProperty("unitAbbr",r.unitAbbr,t,{format:v}),null!=r.unitAbbrPlural&&this.writeProperty("unitAbbrPlural",r.unitAbbrPlural,t,{format:v}),null!=r.decimalPlaces&&this.writeProperty("decimalPlaces",r.decimalPlaces,t,{format:v}),r.disableCalculation&&this.writeProperty("disableCalculation",!0,t,{format:v}),this.writeNL(),this.writeTextOrValue(r.ingredient,this.textFormat,it)),!0}enter_botResponses(e,t){}between_botResponses(e,t,r,i){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,r,i){this.writeCardSetCardDivider()}leaf_item(e,t){const r=this.getParentNode(t);r?.key===Xe.botResponsesValue&&(this.writeNL(),this.writeOPC(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_response(e,t){const r=this.getParentNode(t);r?.key===Xe.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_reaction(e,t){const r=this.getParentNode(t);r?.key===Xe.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,t,{format:v}))}leaf_feedback(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.botResponsesValue)return;const i=e.value;i&&(this.writeNL(),this.writeTextOrValue(i,this.textFormat,it))}enter_backgroundWallpaper(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_imagePlaceholder(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_previewImageValue(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource("previewImage",r),!0}enter_previewVideoValue(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource("previewVideo",r),!0}enter_platformIcon(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_platformLogo(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_platformBackgroundImage(e,t){const r=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,r),!0}enter_coverImage(e,t){const r=e.value;if(r&&"object"==typeof r&&!Array.isArray(r)&&"type"in r){const t=r;return this.writeNL(),this.writePropertyStyleResource(e.key,t),!0}if(Array.isArray(r)){if(null==r)return!0;const e=this.getParentNode(t);if(e?.key!==Xe.bitsValue)return!0;const i=this.getBitType(t);if(!i)return!0;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_coverImage);if(!a)return!0;this.writeNL_IfNotChain(t),this.writeProperty(a.tag,r,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue})}return!0}leaf_coverImage(e,t){if(null==e.value)return;const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return;const i=this.getBitType(t);if(!i)return;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_coverImage);a&&(this.writeNL_IfNotChain(t),this.writeProperty(a.tag,e.value,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue}))}enter_backgroundImage(e,t){const r=e.value;if(r&&"object"==typeof r&&!Array.isArray(r)&&"type"in r){const t=r;return this.writeNL(),this.writePropertyStyleResource(e.key,t),!0}if(Array.isArray(r)){if(null==r)return!0;const e=this.getParentNode(t);if(e?.key!==Xe.bitsValue)return!0;const i=this.getBitType(t);if(!i)return!0;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_backgroundImage);if(!a)return!0;this.writeNL_IfNotChain(t),this.writeProperty(a.tag,r,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue})}return!0}leaf_backgroundImage(e,t){if(null==e.value)return;const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return;const i=this.getBitType(t);if(!i)return;const o=Le.getBitConfig(i),a=Le.getTagConfigForTag(o.tags,ye.property_backgroundImage);a&&(this.writeNL_IfNotChain(t),this.writeProperty(a.tag,e.value,t,{format:a.format??v,array:a.array??!1,writeEmpty:!0,ignoreFalse:"false"===a.defaultValue,ignoreTrue:"true"===a.defaultValue}))}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const r=this.getParentNode(t);if(r?.key===Xe.bitsValue){const r=e.value;r&&this.writeProperty("posterImage",r,t,{format:v})}else{const r=e.value;r&&r.src&&this.writeProperty("posterImage",r.src,t,{format:v})}return!0}enter_thumbnails(e,t){const r=e.value;if(Array.isArray(r)){const e=["src1x","src2x","src3x","src4x"];for(let i=0;i<r.length&&i!==e.length;i++){const o=r[i],a=e[i];this.writeProperty(a,o.src,t,{format:v})}}return!1}leaf_level(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;if(!Le.isOfBitType(this.bitType,[u.chapter,u.h]))return!0;const i=e.value,o=r?.value;if(i>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+i;e++)this.writeHash();this.writeCL()}return!1}leaf_titleString(e,t){const r=this.getParentNode(t);return r?.key!==Xe.bitsValue||(e.value&&(this.writeNL(),this.writeProperty("title",e.value,t,{format:v})),!1)}enter_title(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value,o=r?.value,a=o.level||1;if(a&&i){this.writeNL(),this.writeOP();for(let e=0;e<+a;e++)this.writeHash();this.writeTextOrValue(i,S.bitmarkText,rt),this.writeCL()}return!1}enter_subtitle(e,t){const r=this.getParentNode(t);if(r?.key!==Xe.bitsValue)return!0;const i=e.value;if(i){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(i,S.bitmarkText,rt),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const r=e.value;return r&&(this.writeNL(),this.writeProperty("book",r.book,t,{format:v,writeEmpty:!0}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,S.plainText,rt),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,S.plainText,rt),this.writeCL()))),!1}leaf_book(e,t){const r=this.getParentNode(t),i=r?.value;i&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,t,{format:v,writeEmpty:!0}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,S.plainText,rt),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,S.plainText,rt),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_reference(e,t){const r=this.getParentNode(t),i=r?.value;i&&e.value&&(i.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()))}enter_hint(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL()),!1}enter_instruction(e,t){const r=e.value;return this.isEmptyText(r)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(r,S.bitmarkText,rt),this.writeCL()),!1}leaf_lang(e,t){e.value&&this.writeProperty("lang",e.value,t,{format:C})}enter_refAuthor(e,t){e.value&&this.writeProperty("refAuthor",e.value,t,{format:v,array:!0})}leaf_refBookTitle(e,t){e.value&&this.writeProperty("refBookTitle",e.value,t,{format:v,array:!0})}enter_refPublisher(e,t){e.value&&this.writeProperty("refPublisher",e.value,t,{format:v,array:!0})}leaf_refPublicationYear(e,t){e.value&&this.writeProperty("refPublicationYear",e.value,t,{format:v})}leaf_citationStyle(e,t){e.value&&this.writeProperty("citationStyle",e.value,t,{format:v})}leaf_isExample(e,t){if(!e.value)return;const r=this.getParentNode(t),i=r?.value.example??null;null!=i&&""!==i&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===i?this.writeString(" true "):!1===i?this.writeString(" false "):Array.isArray(i)?this.writeTextOrValue(i,S.bitmarkText,rt):this.writeTextOrValue(i,S.plainText,rt),this.writeCL())}enter_elementsValue(e,t){return e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1}leaf_solutionsValue(e,t){const r=this.getParentNode(t,2);r?.key===Xe.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,t,{format:C,writeEmpty:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,S.plainText,rt),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}enter_question(e,t){const r=this.getParentNode(t);return r?.key!==Xe.questionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it)),!1)}leaf_question(e,t){const r=this.getParentNode(t);r?.key===Xe.flashcardsValue&&e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,it))}leaf_srcAltValue(e,t){this.writeProperty("srcAlt",e.value,t,{format:v})}leaf_src1x(e,t){this.writeProperty("src1x",e.value,t,{format:v})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,t,{format:v})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,t,{format:v})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,t,{format:v})}leaf_width(e,t){this.writeProperty("width",e.value,t,{format:v})}leaf_height(e,t){this.writeProperty("height",e.value,t,{format:v})}leaf_alt(e,t){this.writeProperty("alt",e.value,t,{format:v})}leaf_zoomDisabled(e,t){Le.isOfBitType(this.bitType,[u.imageSeparator,u.pageBanner,u.imagesLogoGrave,u.prototypeImages,u.extractorImage])?this.writeProperty("zoomDisabled",e.value,t,{format:C,writeEmpty:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,t,{format:C,writeEmpty:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,t,{format:v})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,t,{format:v})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,t,{format:C,ignoreFalse:!0}))}enter_caption(e,t){const r=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",r,t,{format:T}),!1}leaf_search(e,t){const r=e.value;r&&(this.writeNL_IfNotChain(t),this.writeProperty("search",r,t,{format:v}))}leaf_selected(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("selected",e.value,t,{format:C,ignoreFalse:!0}))}leaf_duration(e,t){const r=this.getParentNode(t);r?.key===Xe.bitsValue&&this.writeNL(),this.writeProperty("duration",e.value,t,{format:v})}leaf_mute(e,t){this.writeProperty("mute",e.value,t,{format:C})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,t,{format:C})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,t,{format:C})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,t,{format:C})}generateResourceHandlers(){for(const e of(0,li.Enum)(y).keys()){if(e===(0,li.Enum)(y).keyFromValue(y.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const r=e.value;if(null==r)return!1;const i=this.getParentNode(t);if(i?.key!==Xe.resourcesValue)return!0;const o=(0,li.Enum)(y).fromValue(i?.value.__typeAlias)??(0,li.Enum)(y).fromValue(i?.value.type);if(!o)return!1;const a=r.url||r.src||r.body||"";return this.writeNL(),this.writeResource(o,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){for(const e of(0,li.Enum)(ge).values()){const t=ke(e),r=[`enter_${t}`,`leaf_${t}`];for(const i of r)"function"!=typeof this[i]&&"example"!==t&&(this[i]=(t,r)=>{if(null==t.value)return;const i=this.getParentNode(r);if(i?.key!==Xe.bitsValue)return;const o=this.getBitType(r);if(!o)return;const a=Le.getBitConfig(o),s=Le.getTagConfigForTag(a.tags,e);s&&this.writeProperty(s.tag,t.value,r,{format:s.format??v,array:s.array??!1,writeEmpty:!0,ignoreFalse:"false"===s.defaultValue,ignoreTrue:"true"===s.defaultValue})},this[i]=this[i].bind(this))}}getBitType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.bitType}}isChain(e){const t=this.getParentNode(e);return t?.key!==Xe.bitsValue&&(t?.key!==Xe.cardBitsValue&&(t?.key!==Xe.feedbacksValue&&(t?.key!==Xe.quizzesValue&&(t?.key!==Xe.pairsValue&&(t?.key!==Xe.matrixValue&&(t?.key!==Xe.definitionsValue&&(t?.key!==Xe.questionsValue&&t?.key!==Xe.reason)))))))}haveValidCardSet(e){const t=Le.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==S.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(_t.breakscape(`${e}`,{format:S.plainText,location:rt}))}writeTextOrValue(e,t,r,i){const o=r===rt,a="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,n=o?this.spacesAroundValuesStr:"",l=t===S.bitmarkText?t:S.plainText,c=e=>o?`${n}${e}${n}`:e,p=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const r=this.partWriter.getString().trim();return this.writer=t,r};if(null!=a){const e=()=>this.write(_t.breakscape(a,{format:l,location:r}));if(o){const t=p(e);t&&this.write(c(t))}else e();return}if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,r,i);if(o){const t=p(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===ci.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===ci.v1&&this.write("===")}writeCardSetCardDivider(e){this.writeNL();const t=this.getCardDividerMarker();this.write(t),e&&this.appendCardDividerQualifier(e)}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===ci.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===ci.v1?this.write("--"):this.write("++")}getCardDividerMarker(){return this.options.cardSetVersion===ci.v1?"===":"===="}appendCardDividerQualifier(e){const t=this.getCardDividerMarker(),r=_t.breakscape(e,{format:S.plainText,location:rt});this.write(" "),this.write(r),this.write(" "),this.write(t)}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,r=!1){if(e&&t){const i=t[(0,li.Enum)(y).keyFromValue(t.type)??""],o=i&&(i.src||i.url||i.body)||"";r?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(o,S.plainText,rt),t.type,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,S.plainText,rt),this.writeCL())}writeProperty(e,t,r,i){let o;if(void 0!==t){const a=i.format===T;if(a){if(!i.writeEmpty&&a&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,S.bitmarkText,rt),this.writeCL()}else if(o=Array.isArray(t)?t:[t],o.length>0){i.array||(o=o.slice(o.length-1));let t=0;for(const a of o)if(void 0!==a){if(i.ignoreFalse&&!1===a)continue;if(i.ignoreTrue&&!0===a)continue;if(!i.writeEmpty&&""===a)continue;i.forceChain||0!==t||this.writeNL_IfNotChain(r),this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${a}`,S.plainText,rt),this.writeCL(),t++}}}}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!((0,li.Enum)(S).fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()&&!this.isTableBitType()}isTableBitType(){return this.isOfBitType([u.table])}isOfBitType1(){return this.isOfBitType([u.trueFalse1,u.multipleChoice1,u.multipleResponse1])}isOfBitType(e){return Le.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}},di=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new si,this.generator=new ui(this.writer,e)}async generate(e){return await this.generator.generate(e),this.writer.getString()}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}},mi={bold:"b",italic:"i",superscript:"sup",subscript:"sub",strike:"s",del:"del",ins:"ins",underline:"u",highlight:"mark",code:"code"},hi=class{constructor(){l(this,"indentUnit"," ")}generate(e){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{return""}const r=this.collectBits(t),i=[];for(const e of r){const t=this.renderTableBit(e);t&&i.push(t)}return i.join("\n\n")}collectBits(e){const t=[],r=e=>{if(null==e||"object"!=typeof e)return;if(Array.isArray(e))return void e.forEach(r);const i=e;"bit"in i&&i.bit&&"object"==typeof i.bit?t.push(i.bit):"type"in i&&t.push(i)};return r(e),t}renderTableBit(e){const t=e.table;if(!t)return"";if("table"!==e.type&&"table-extended"!==e.type)return"";const r=this.toExtended(t),i=[];if(i.push("<table>"),null!=e.caption){const t=this.cellContentToHtml(this.asTextAst(e.caption));t&&i.push(`${this.indentUnit}<caption>${t}</caption>`)}return this.renderSection(i,"thead",r.header,"header"),this.renderSection(i,"tbody",r.body,"body"),this.renderSection(i,"tfoot",r.footer,"footer"),i.push("</table>"),i.join("\n")}toExtended(e){const t=e;return t.header||t.body||t.footer?e:wt(e)}renderSection(e,t,r,i){if(r&&r.rows&&0!==r.rows.length){e.push(`${this.indentUnit}<${t}>`);for(const t of r.rows){e.push(`${this.indentUnit.repeat(2)}<tr>`);for(const r of t.cells??[])e.push(`${this.indentUnit.repeat(3)}${this.renderCell(r,i)}`);e.push(`${this.indentUnit.repeat(2)}</tr>`)}e.push(`${this.indentUnit}</${t}>`)}}renderCell(e,t){const r=!0===e.title?"th":"td",i=[];e.rowspan&&e.rowspan>1&&i.push(`rowspan="${e.rowspan}"`),e.colspan&&e.colspan>1&&i.push(`colspan="${e.colspan}"`),e.scope&&i.push(`scope="${e.scope}"`),e.colwidth&&e.colwidth>0&&i.push(`width="${e.colwidth}"`);return`${i.length>0?`<${r} ${i.join(" ")}>`:`<${r}>`}${this.cellContentToHtml(this.asTextAst(e.content))}</${r}>`}asTextAst(e){return null==e?[]:"string"==typeof e?[{type:"text",text:e}]:e}cellContentToHtml(e){return 0===e.length?"":1===e.length&&"paragraph"===e[0].type?this.inlineToHtml(e[0].content??[]):e.map(e=>this.blockToHtml(e)).join("")}blockToHtml(e){switch(e.type){case"paragraph":return`<p>${this.inlineToHtml(e.content??[])}</p>`;case"bulletList":case"noBulletList":case"orderedList":case"orderedListRoman":case"orderedListRomanLower":case"letteredList":case"letteredListLower":case"taskList":return this.listToHtml(e);case"image":case"imageInline":return this.imageToHtml(e);case"latex":return this.latexToHtml(e);default:return this.inlineToHtml([e])}}inlineToHtml(e){return e.map(e=>this.inlineNodeToHtml(e)).join("")}inlineNodeToHtml(e){return"hardBreak"===e.type?"<br>":"image"===e.type||"imageInline"===e.type?this.imageToHtml(e):"latex"===e.type?this.latexToHtml(e):"text"===e.type?this.wrapMarks(this.textToHtml(e.text??""),e.marks):e.content?this.inlineToHtml(e.content):this.escapeText(e.text??"")}wrapMarks(e,t){if(!t||0===t.length)return e;let r="",i="";for(const e of t)if("link"===e.type){const t=e.attrs?.href??"";r+=`<a href="${this.escapeAttr(t)}">`,i=`</a>${i}`}else{const t=mi[e.type];t&&(r+=`<${t}>`,i=`</${t}>${i}`)}return`${r}${e}${i}`}listToHtml(e){const{tag:t,attrs:r}=this.listTag(e);return`<${t}${r}>${(e.content??[]).map(t=>this.listItemToHtml(t,"taskList"===e.type)).join("")}</${t}>`}listTag(e){const t=e.attrs?.start,r="number"==typeof t&&1!==t?` start="${t}"`:"";switch(e.type){case"orderedList":return{tag:"ol",attrs:r};case"orderedListRoman":return{tag:"ol",attrs:` type="I"${r}`};case"orderedListRomanLower":return{tag:"ol",attrs:` type="i"${r}`};case"letteredList":return{tag:"ol",attrs:` type="A"${r}`};case"letteredListLower":return{tag:"ol",attrs:` type="a"${r}`};case"noBulletList":return{tag:"ul",attrs:' style="list-style:none"'};default:return{tag:"ul",attrs:""}}}listItemToHtml(e,t){const r=(e.content??[]).map(e=>"paragraph"===e.type?this.inlineToHtml(e.content??[]):this.blockToHtml(e)).join("");if(t){return`<li><input type="checkbox"${e.attrs?.checked?" checked":""}>${r}</li>`}return`<li>${r}</li>`}imageToHtml(e){const t=e.attrs??{},r=[],i=t.src;return r.push(`src="${this.escapeAttr("string"==typeof i?i:"")}"`),"string"==typeof t.alt&&r.push(`alt="${this.escapeAttr(t.alt)}"`),"string"==typeof t.title&&r.push(`title="${this.escapeAttr(t.title)}"`),null!=t.width&&r.push(`width="${t.width}"`),null!=t.height&&r.push(`height="${t.height}"`),"string"==typeof t.class&&t.class&&r.push(`class="${this.escapeAttr(t.class)}"`),`<img ${r.join(" ")}>`}textToHtml(e){return this.escapeText(e)}latexToHtml(e){const t=e.attrs?.formula??"";return`<math alttext="${this.escapeAttr(t)}"></math>`}escapeText(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}escapeAttr(e){return this.escapeText(e).replace(/"/g,""")}},bi=r(722),gi={},yi=class extends Lt{constructor(e,t){super(),l(this,"ast",new et),l(this,"textGenerator"),l(this,"bitmarkVersion"),l(this,"textParserVersion"),l(this,"textParser",new Wr),l(this,"options"),l(this,"jsonPrettifySpace"),l(this,"writer"),l(this,"json",[]),l(this,"bitWrapperJson",{}),l(this,"bitJson",{}),l(this,"textDefault",_t.EMPTY_STRING),l(this,"bodyDefault",_t.EMPTY_STRING),l(this,"bodyJson",this.bodyDefault),l(this,"listItem"),l(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=(0,bi.Enum)(It).fromValue(t?.bitmarkVersion)??Et,this.textParserVersion=this.textParser.version(),this.options={...gi,...t?.jsonOptions},this.debugGenerationInline=this.options.debugGenerationInline??!1,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===It.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new Jr(It.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}async generate(e){this.resetState(),await this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),await this.writer.close()}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?_t.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?_t.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,Xe.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){const r=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(r),this.bitWrapperJson.bit=this.bitJson;const i=Le.getBitConfig(r.bitType),o=this.getTextFormat(t),a=!!i.rootExampleType,s=i.rootExampleType===b;if(a){let e;s?(e=!0,Le.isOfBitType(r.bitType,u.trueFalse1)&&void 0!==r.cardNode?.statement?.isCorrect&&(e=r.cardNode.statement.isCorrect)):e="true";const t=this.toExample(r,{defaultExample:e,isBoolean:s,textFormat:o});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else r.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const r=this.bitJson.isExample,i=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=r,this.bitJson.example=i,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_person(e,t){const r=this.getBitType(t);let i="person";return Le.isOfBitType(r,u.conversationLeft1)&&(i="partner"),this.standardHandler(e,t,Xe.bitsValue,{array:!1,keyOverride:i})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_sourceBB(e,t){const r=e.value,i=this.getParentNode(t);return i?.key!==Xe.bitsValue||r&&r.length>0&&(this.bitJson.sourceBB=1===r.length?r[0]:r),!1}enter_productId(e,t){const r=e.value,i=this.getParentNode(t);if(i?.key!==Xe.bitsValue)return!0;return this.getBitType(t)===u.module?this.addProperty(this.bitJson,"productId",r,{array:!0}):r.length>0&&this.addProperty(this.bitJson,"productId",r[r.length-1],{array:!1}),!1}leaf_isCollapsible(e,t){const r=this.getParentNode(t);return r?.key!==Xe.bitsValue||null!=e.value&&(this.bitJson.isCollapsible=!0===e.value),!1}enter_isCollapsible(e,t){return this.leaf_isCollapsible(e,t)}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const r=e.value,i=this.getParentNode(t);return i?.key!==Xe.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(r),!1)}enter_item(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}leaf_titleString(e,t){const r=this.getParentNode(t);return r?.key!==Xe.bitsValue||this.standardHandler(e,t,[Xe.bitsValue],{array:!1,keyOverride:"title"})}enter_title(e,t){return this.standardHandler(e,t,[Xe.bitsValue,Xe.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_width(e,t){let r=e.value;const i=this.getBitType(t),o=this.getParentNode(t);return o?.key===Xe.bitsValue&&Le.isOfBitType(i,u.extractorBlock)&&(r=Qr.asNumber(r,0)??0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_height(e,t){let r=e.value;const i=this.getBitType(t),o=this.getParentNode(t);return o?.key===Xe.bitsValue&&Le.isOfBitType(i,u.extractorBlock)&&(r=Qr.asNumber(r,0)??0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_extraProperties(e,t){const r=e.value;if(!this.options.excludeUnknownProperties&&r)for(const[e,t]of Object.entries(r)){let r=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(r=`_${e}`),this.addProperty(this.bitJson,r,t,{array:!0})}return!1}enter_cardBitsValue(e,t){const r=e.value,i=this.getBitType(t);if(!i)return;let o;if(i===u.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",r.lang,{array:!1}),this.addProperty(e,"refAuthor",r.refAuthor??[],{array:!0}),this.addProperty(e,"refBookTitle",r.refBookTitle??[],{array:!1}),this.addProperty(e,"refPublisher",r.refPublisher??[],{array:!0}),this.addProperty(e,"refPublicationYear",r.refPublicationYear??[],{array:!1}),this.addProperty(e,"citationStyle",r.citationStyle??[],{array:!1}),this.bitJson.bookReferences.push(e)}else i===u.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),o=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),o=this.bitJson.listItems),this.listItem={item:r.item??[],lead:r.lead??[],hint:r.hint??[],instruction:r.instruction??[],body:this.bodyDefault},o.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const r=e.value,i=this.getParentNode(t);if(!i)return!1;const o=this.getTextFormat(t),a=o===S.bitmarkText;if(this.bodyJson=r.body,i.key===Xe.bitsValue){this.bitJson.body=this.bodyJson;const e=a&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,it,{noBreakscaping:!0});this.bitJson.body=(e??"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else i.key===Xe.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,r){const i=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=this.bitJson.placeholders??{},this.bitJson.placeholders[i]=e,i}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=structuredClone(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const r of e)if(r.type!==Ye.text&&(0,bi.Enum)(Ye).values().includes(r.type)){const e=r;e.attrs={};for(const[t,r]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=r,delete e[t])}else Array.isArray(r.content)&&(t++,this.moveBodyBitPropertiesToAttrs(r.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,Xe.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_statement(e,t){const r=e.value,i=this.getParentNode(t);i?.key===Xe.cardNode&&r&&(this.bitJson.statement=r.statement??[],this.bitJson.isCorrect=r.isCorrect??!1,this.bitJson.example=r.example,this.bitJson.isExample=r.isExample)}enter_statements(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,Xe.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,Xe.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,Xe.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_previewImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_previewVideo(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}enter_platformIcon(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_platformLogo(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_platformBackgroundImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_coverImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:Array.isArray(e.value)})}enter_backgroundImage(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:Array.isArray(e.value)})}enter_resources(e,t){const r=e.value,i=this.getBitType(t),o=this.getResourceType(t);if(!r||!i)return!0;let a;const s=Le.getBitConfig(i),n=Le.getBitResourcesConfig(i,o).comboResourceConfigKeysMap;if(n.size>0)for(const[e,t]of n.entries()){const i=xe(e),o={type:i,__typeAlias:i,__configKey:e};for(const e of t){const t=r.find(t=>t.__configKey===e);if(t){const e=Le.getTagConfigForTag(s.tags,t.__configKey);if(e){const r=e.jsonKey??e.tag,i=e.configKey??t.__configKey,a=t.__configKey===i?t:void 0;if(a)for(const[e,t]of Object.entries(a))"type"!==e&&(o[r]=t)}}}a=o}else if(Le.isOfBitType(i,[u.imagesLogoGrave,u.prototypeImages,u.extractorImage])){const e=[];for(const t of r)t.type===y.image&&e.push(t);i===u.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else r.length>=1&&(a=r[0]);return this.bitJson.resource=a,!1}leaf_level(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,Xe.bitsValue,{array:!1})}leaf_markup(e,t){const r=e.value;return r&&(this.bitWrapperJson.bitmark=r),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const r=e.value,i=this.getBitType(t),o=this.getParentNode(t);if(r&&i){const{version:e,warnings:i,errors:a,...s}=r,n=`${this.bitmarkVersion}`,l=this.textParserVersion,c=this.getInternalComments(t);o?.key===Xe.bitsValue&&(this.bitWrapperJson.parser={version:e,bitmarkVersion:n,textParserVersion:l,internalComments:c,...s,warnings:i,errors:a},this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){for(const e of(0,bi.Enum)(ge).values()){const t=ke(e),r=[`enter_${t}`,`leaf_${t}`];for(const e of r)"function"!=typeof this[e]&&"example"!==t&&(this[e]=(e,r)=>{const i=e.value;if(null==i)return;const o=this.getParentNode(r);o?.key===Xe.bitsValue&&(this.bitJson[t]=i)},this[e]=this[e].bind(this))}}standardHandler(e,t,r,i){if(r){const e=Array.isArray(r)?r:[r],i=this.getParentNode(t);if(!i?.key||!e.includes(i?.key))return!0}return this.addProperty(this.bitJson,i.keyOverride??e.key,i.valueOverride??e.value,i),!1}addProperty(e,t,r,i){if(void 0!==r){let o;Array.isArray(r)||(r=[r]);const a=r;o=!i.array&&a.length>=1?a[a.length-1]:a,(i.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:r,example:i,__isDefaultExample:o}=e,{defaultExample:a,isBoolean:s}=t;if(!r)return{isExample:!1,example:null};let n;return n=o?s?Yr.toBoolean(a):this.convertBreakscapedStringToJsonText(a,t.textFormat,rt):s?Yr.toBoolean(i):this.convertBreakscapedStringToJsonText(i,t.textFormat,rt),{isExample:!0,example:n}}getBitType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.bitType}}getTextFormat(e){const t=this.getBitType(e);if(t){const r=Le.getBitConfig(t);for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return(0,bi.Enum)(S).fromValue(e?.textFormat)??r.textFormatDefault}}return S.bitmarkText}getResourceType(e){for(const t of e)if(t.key===Xe.bitsValue){const e=t.value;return e?.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===Xe.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,r){if(!e)return"";if(!(t===S.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{format:t,location:r})}concatenatePlainTextWithJsonTexts(e,t,r){if(Array.isArray(e)){if(r=r.trim()){const i=r.split("\n"),o=[];for(let e=0;e<t;e++)o.push({type:Ze.hardBreak});for(let e=0;e<i.length;e++){const t=i[e];t&&o.push({text:t,type:Ze.text}),e<i.length-1&&o.push({type:Ze.hardBreak})}const a=e[e.length-1];a&&a.type===Ze.paragraph?a.content=[...a.content??[],...o]:e.push({type:Ze.paragraph,content:o,attrs:{}})}return e}return`${e??""}${"\n".repeat(t)}${r??""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let r=e;t.open?r=`<${e}>`:t.close?r=`</${e}>`:t.single&&(r=`<${e} />`),this.writeString(r)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?u._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){const t=Le.getBitType(e.type);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),Le.isOfBitType(t,[u._error,u._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let r=!1,i=!1;Le.isOfBitType(t,[u.page])?(null!=e.item&&0!==e.item?.length||delete e.item,null!=e.lead&&0!==e.lead?.length||delete e.lead,null!=e.pageNumber&&0!==e.pageNumber?.length||delete e.pageNumber,null!=e.marginNumber&&0!==e.marginNumber?.length||delete e.marginNumber,null!=e.hint&&0!==e.hint?.length||delete e.hint,null!=e.instruction&&0!==e.instruction?.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),Le.isOfBitType(t,[u.article]),Le.isOfBitType(t,[u.example])&&(r=!0,i=!0),Le.isOfBitType(t,[u.multipleChoice1,u.multipleResponse1,u.multipleChoiceText,u.highlightText,u.gapText,u.gapTextInstructionGrouped,u.clozeAndMultipleChoiceText,u.sequence,u.mark,u.flashcard,u.definitionList])&&(r=!0,null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,[u.sequence])&&(r=!0,i=!0,null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.cloze)&&(r=!0,Le.isOfBitType(t,u.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):Le.isOfBitType(t,u.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),Le.isOfBitType(t,[u.multipleChoice,u.multipleResponse])&&(r=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),Le.isOfBitType(t,u.essay)&&(r=!0,i=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),Le.isOfBitType(t,u.trueFalse1)&&(r=!0,i=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.trueFalse)&&(r=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.isCollapsible&&(e.isCollapsible=!1),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),Le.isOfBitType(t,u.interview)&&(r=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),Le.isOfBitType(t,u.sequence)&&null==e.elements&&(e.elements=[]),t===u.matchMatrix&&(r=!0),Le.isOfBitType(t,u.match)&&(r=!0,null==e.heading&&(e.heading={})),Le.isOfBitType(t,u.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1));const o=Le.isOfBitType(t,u.tableImage)&&!this.tableIsEmpty(e.table);(Le.isOfBitType(t,u.table)&&!Le.isOfBitType(t,u.tableImage)||o)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableHeaderWhitespaceNoWrap&&(e.tableHeaderWhitespaceNoWrap=!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)),Le.isOfBitType(t,u.tableImage)&&!o&&delete e.table,Le.isOfBitType(t,u.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),Le.isOfBitType(t,[u.pageBanner,u.pageBuyButton,u.pageBuyButtonAlt,u.pageBuyButtonPromotion,u.pageFooter,u.pageOpenBook,u.pagePerson,u.printBook,u.pageProduct,u.pageProductList,u.pageProductVideo,u.pageProductVideoList,u.pageSectionFolder,u.pageSubscribe,u.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),Le.isOfBitType(t,u.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),Le.isOfBitType(t,u.tocResource)&&null==e.tocResource&&(e.tocResource=[]),Le.isOfBitType(t,u.tocContent)&&null==e.tocContent&&(e.tocContent=[]),Le.isOfBitType(t,u.printThisChapter)&&null==e.printParentChapterLevel&&(e.printParentChapterLevel=-1),Le.isOfBitType(t,u.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.allowPrint&&(e.allowPrint="useSpaceConfiguration"),null==e.hasPrintRestriction&&(e.hasPrintRestriction=!0),null==e.enforceUpdateOverUserInput&&(e.enforceUpdateOverUserInput=!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="")),t!==u.articleAi&&t!==u.noteAi&&t!==u.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),Le.isOfBitType(t,[u.articleResponsive,u.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),Le.isOfBitType(t,u.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),Le.isOfBitType(t,[u.imagesLogoGrave,u.prototypeImages,u.extractorImage])&&(t===u.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),Le.isOfBitType(t,[u.stepImageScreenshotWithPointer,u.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),Le.isOfBitType(t,[u.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),Le.isOfBitType(t,[u.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),Le.isOfBitType(t,u.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),Le.isOfBitType(t,u.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey=""),Le.isOfBitType(t,u.vendorStripePricingTablePrintOnRequest)&&(null==e.printOnRequestCustomerId&&(e.printOnRequestCustomerId=""),null==e.printOnRequestProductId&&(e.printOnRequestProductId=""))),Le.isOfBitType(t,u.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),Le.isOfBitType(t,[u.handInFile,u.handInSystemMedia])&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),Le.isOfBitType(t,u.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),Le.isOfBitType(t,u.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),Le.isOfBitType(t,u.container)&&null==e.allowedBit&&(e.allowedBit=[]),Le.isOfBitType(t,u.platformPath)&&null==e.path&&(e.path=""),Le.isOfBitType(t,u.platformBrandTarget)&&null==e.platformBrandTarget&&(e.platformBrandTarget="none"),Le.isOfBitType(t,u.platformHeader)&&null==e.platformLogoMaxHeight&&(e.platformLogoMaxHeight=40),r?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),i?null==e.example&&(e.example=null):delete e.example}return e}tableIsEmpty(e){if(!e)return!0;if(0===Object.keys(e).length)return!0;const t=e;if(0===t.columns?.length&&t.data?.length)return!0;const r=e;return 0===r.header?.rows.length&&0===r.body?.rows.length&&0===r.footer?.rows.length}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const r=t[e];if(this.isBitmarkText(r)){const i=this.textGenerator.generateSync(r,S.bitmarkText,rt,{noBreakscaping:!0});t[e]=(i??"").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}},fi=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new si,this.generator=new yi(this.writer,e)}async generate(e){return await this.generator.generate(e),JSON.parse(this.writer.getString())}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}},ki=r(722),xi=class{getSupportedBits(e){const t=e?.includeNonDeprecated??!0,r=e?.includeDeprecated??!1,i=[];for(const e of(0,ki.Enum)(u).values()){if(e===u._error||e===u._comment)continue;const o=Le.getBitType(e),a=Le.getBitConfig(o),s=a.inheritedBitTypes.length>0?a.inheritedBitTypes:void 0;(t&&!a.deprecated||r&&a.deprecated)&&i.push({name:e,title:a.title,since:a.since,deprecated:a.deprecated,inheritedBitTypes:s,bitGroups:a.bitGroups.length>0?a.bitGroups:void 0})}return i}getBitGroups(e){const t=null!=e?.subgroupOf?Le.getBitGroupKey(e.subgroupOf):void 0;if(null!=e?.subgroupOf&&null==t)return[];const r=[];for(const[i,o]of Object.entries(Pe))null!=t&&o.subgroupOf!==t||r.push({key:i,aliases:o.aliases?[...o.aliases]:void 0,description:o.description,title:Le.getBitGroupTitle(i,e?.language),subgroupOf:o.subgroupOf,since:o.since,bitTypes:Le.getBitTypesForBitGroups([i],{includeDeprecated:e?.includeDeprecated})});return r}getResourceGroups(e){const t=[];for(const[r,i]of Object.entries(Ee))t.push({key:r,aliases:i.aliases?[...i.aliases]:void 0,description:i.description,title:Le.getResourceGroupTitle(r,e?.language),since:i.since,resourceTypes:Le.getResourceTypesForResourceGroups([r])});return t}getBitGroupsForBitTypes(e,t){const r=new Set(Le.getBitGroupsForBitTypes(e));return this.getBitGroups(t).filter(e=>r.has(e.key))}getSupportedBitConfigs(){const e=[];for(const t of(0,ki.Enum)(u).values()){if(t===u._error||t===u._comment)continue;const r=Le.getBitType(t),i=Le.getBitConfig(r);e.push(i)}return e}},vi=(r(722),{peggy:"peggy"}),Ti=(r(722),{text:"text",json:"json",pojo:"pojo"}),_i=(r(722),{list:"list",deprecated:"deprecated",all:"all",bit:"bit",bitGroups:"bitGroups",resourceGroups:"resourceGroups"}),Ci=r(722),wi=new ai,Ai=class{toAst(e){const t=this.preprocessJson(e),r=[];for(const e of t){const{bit:t,parser:i}=e,o=this.bitToAst(t,i?.internalComments);o&&r.push(o)}const i=r.length>0?{bits:r}:{};return wi.buildBitmark(i)}preprocessJson(e){const t=[];if(g.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const r=e=>{if(this.isBitWrapper(e)){const r=e;t.push(r)}else if(this.isBit(e)){const r=e;t.push(this.bitToBitWrapper(r))}};if(Array.isArray(e))for(const t of e)r(t);else r(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 Le.getBitType(t.type)!==u._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){const{statement:r,reference:i,...o}=e,a=e.type===u._comment&&void 0!==e.originalType,s=Le.getBitType(a?e.originalType:e.type),n=Le.getBitConfig(s),l=(0,Ci.Enum)(Ct).fromValue(e.format);let c=(0,Ci.Enum)(S).fromValue(e.format)??n.textFormatDefault;l===Ct.bitmarkMinusMinus&&(c=S.bitmarkText);return wi.buildBit({...o,bitType:s,bitLevel:Math.max(Math.min(e.bitLevel??1,Le.bitLevelMax),Le.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:a,internalComment:t,...this.processTitle(s,e.title),...this.processReference(i),...this.parseExample(e.example),person:e.partner??e.person,markConfig:e.marks,resources:this.processResources(s,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(r,e.isCorrect,e.statements,e.example),responses:this.processResponses(s,e.responses),botResponses:this.processBotResponse(s,e.responses),cardBits:this.processListItems(e.listItems??e.sections??e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)})}processStatements(e,t,r,i){const o=[];if(e){const r={statement:e??"",isCorrect:t??!1,...this.parseExample(i)};r&&o.push(r)}if(Array.isArray(r))for(const e of r)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!Le.isOfBitType(e,u.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(Le.isOfBitType(e,u.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const r=[];if(Array.isArray(e))for(const i of e){const e={...i};e.body&&(e.body={body:e.body,placeholders:t}),e&&r.push(e)}if(0!==r.length)return r}getResourceType(e){if(e){return(0,Ci.Enum)(y).fromValue(e.type)}}processResources(e,t,r,i){const o=[];if(t&&o.push(t),Le.isOfBitType(e,[u.prototypeImages,u.extractorImage])&&Array.isArray(r))for(const e of r)e&&o.push(e);if(Le.isOfBitType(e,[u.imagesLogoGrave])&&Array.isArray(i))for(const e of i)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processTitle(e,t){return Le.isOfBitType(e,u.author)?{titleString:t,title:void 0}:{titleString:void 0,title:t}}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=g.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}},Bi=(r(722),class{constructor(e,t){l(this,"source"),l(this,"start"),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}}),Si={TextFormat:"TextFormat",ResourceType:"ResourceType",Title:x.tag_title,Anchor:x.tag_anchor,Reference:x.tag_reference,ItemLead:x.tag_item,Instruction:x.tag_instruction,Hint:x.tag_hint,True:x.tag_true,False:x.tag_false,Gap:x.tag_gap,Mark:x.tag_mark,SampleSolution:x.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"},Pi="Bit",Ii="Card",Ei="Chain",Li=r(722),Ni=class{constructor(e){l(this,"cardIndex",0),l(this,"cardSideIndex",0),l(this,"cardVariantIndex",0),l(this,"currentCardQualifier"),l(this,"currentSideQualifier"),l(this,"currentVariantQualifier"),l(this,"parse"),l(this,"parserText"),l(this,"parserLocation"),this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){const t=e.trim();if(this.debugPrint("RAW BIT",t),!t)return;const r=this.parserLocation()?.start??{line:1,column:1,offset:0},i=this.parse(e,{startRule:"bit",grammarSource:new Bi("bit",r)});return i.value&&(i.value.markup=t),i}handleTextFormat(e){return{type:Si.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:Si.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,key:(0,Li.Enum)(x).fromValue(e),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:Si.Property,key:`@${_t.unbreakscape(e,{format:S.plainText,location:rt})}`,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){const r=_t.unbreakscape(e,{format:S.plainText,location:rt}),i=g.kebabToCamel(r);return{type:Si.Resource,key:`&${i}`,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let r=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),r=[e]}return r}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:Si.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:Si.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,r={cards:[]},i={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:i,parser:o}=e;if(!t||t!==Si.Card)continue;const{cardIndex:a,cardSideIndex:s,cardVariantIndex:n,value:l,cardQualifier:c,cardSideQualifier:p,cardVariantQualifier:u}=i;let d=r.cards[a];d?c&&!d.qualifier&&(d.qualifier=c):(d={sides:[],qualifier:c},r.cards[a]=d);let m=d.sides[s];m?p&&!m.qualifier&&(m.qualifier=p):(m={variants:[],qualifier:p},d.sides[s]=m);const h=m.variants[n];h?(m.variants[n].value+=l,u&&!h.qualifier&&(h.qualifier=u)):m.variants[n]={value:l,parser:o,qualifier:u}}r.cards=r.cards.filter(e=>e.sides.some(e=>e.variants.some(e=>0!==g.trimmedString(e.value).length)));for(const t of r.cards){const r={sides:[],qualifier:t.qualifier};i.cards.push(r);for(const i of t.sides){const t={variants:[],qualifier:i.qualifier};r.sides.push(t);for(const r of i.variants){let i={line:1,column:1,offset:0};if(r.parser.location){i=r.parser.location.start;const e=r.parser.text,t=e?e.length:0,o=1;i.offset+=t,i.line+=o}let o=this.parse(r.value,{startRule:"cardContent",grammarSource:new Bi("card-content",i)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o,qualifier:r.qualifier})}}}}return{type:Si.CardSet,value:i,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=void 0,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=void 0,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0}handleCards(e){return e}handleCardLineOrDivider(e,t){let r,i=!1,o=!1,a=!1;if(Array.isArray(e)&&2===e.length){const[t,i]=e;"string"==typeof t?(e=t,"string"==typeof i&&i.trim()===i&&i.length>0&&(r=i)):e=t}else if(Array.isArray(e)&&1===e.length){const[t]=e;e=t}return t===ci.v1?(i="==="===e,o="=="===e,a="--"===e):(i="===="===e,o="--"===e,a="++"===e),i?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0,this.currentCardQualifier=r,this.currentSideQualifier=void 0,this.currentVariantQualifier=void 0):o?(this.cardSideIndex++,this.cardVariantIndex=0,this.currentSideQualifier=r,this.currentVariantQualifier=void 0):a&&(this.cardVariantIndex++,this.currentVariantQualifier=r),this.isType(e,Si.Card)?e:{type:Si.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:"",cardQualifier:this.currentCardQualifier,cardSideQualifier:this.currentSideQualifier,cardVariantQualifier:this.currentVariantQualifier},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:Si.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e,cardQualifier:this.currentCardQualifier,cardSideQualifier:this.currentSideQualifier,cardVariantQualifier:this.currentVariantQualifier},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){const t=[];let r,i;for(const o of e)switch(o.type){case Si.BodyChar:if(r){const e=`${r.value??""}${o.value??""}`;r.value=e}else r={type:Si.BodyText,value:o.value??"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case Si.CardChar:if(i){const e=`${i.value??""}${o.value??""}`;i.value=e}else i={type:Si.CardText,value:o.value??"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:r&&(t.push(r),r=void 0),i&&(t.push(i),i=void 0),t.push(o)}return r&&t.push(r),i&&t.push(i),t}isType(e,t){if(!e)return!1;const{type:r}=e;return t?Array.isArray(t)?t.indexOf(r)>=0:t===r:!!(0,Li.Enum)(Si).fromValue(r)}reduceToArrayOfTypes(e,t,r){if(!Array.isArray(e))return[];return e.reduce((e,i,o)=>{if(null==i)return e;const{type:a,value:s}=i;if(Array.isArray(i)){const r=this.reduceToArrayOfTypes(i,t);e.push(...r)}else{if(!this.isType(i,t))return e;if(r&&Array.isArray(s)){const r=this.reduceToArrayOfTypes(s,t);e.push(...r)}else a&&e.push(i)}return e},[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce((e,t,r)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e},[])}debugPrint(e,t){}},Vi=r(722),Ri=r(722),Gi=["----","\n==\n","\n---\n"],Fi=["==\n","--\n"],Ki=["\n==","\n--"],$i=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:r,bitType:i,resourceType:o}=e,{tags:a,cardSet:s}=r,n={...a,...Le.getBitResourcesConfig(i,o).tags};return this.validateTagChainsRecursive(e,Pi,i,t,n,s).validated}checkBody(e,t,r,i,o){if(!o)return o;const{bitConfig:a}=e,{bodyAllowed:s}=a;return o.length>0&&!s&&e.addWarning(`Bit '${r}' should not have a body.`),o}checkBodyPart(e,t,r){return r?(this.checkBodyForCommonPotentialMistakes(e,t,r),r):r}checkFooter(e,t,r){if(!r)return r;const{bitConfig:i,bitType:o}=e,{footerAllowed:a}=i;return this.checkBodyForCommonPotentialMistakes(e,t,r),a||e.addWarning(`Bit '${o}' should not have a footer.`),r}checkCardBody(e,t,r,i,o,a,s){if(!i||!i.body)return i;const{bitConfig:n}=e;if(!n.cardSet)return i;const l=Le.getCardSetVariantConfig(r,a,s);if(!l)return i;const{bodyAllowed:c}=l;return i.bodyString.length>0&&!c&&e.addWarning(`Bit '${r}' should not have a card body at card:${o+1}, side:${a+1}, variant:${s+1}.`),i}validateTagChainsRecursive(e,t,r,i,o,a,s){if(!i)return{validated:[]};let n;const l=[...i],c=this.convertTagsToTypeKeyMap(e,t,r,o),p=(e,t,r)=>{c.set(e,{maxCount:t,minCount:r,_type:e,_tag:e,_seenCount:0})};t===Pi?(a&&p(Si.CardSet,1,0),p(Si.TextFormat,1,0),p(Si.BodyText,m,0),p(Si.BodyTextPlain,m,0),p(Si.PlainTextDivider,m,0),p(Si.FooterDivider,m,0)):t===Ii&&p(Si.CardText,m,0);for(let i=0;i<l.length;i++){const o=l[i];if(!o)continue;const{type:p,key:u}=o;let d=(0,Ri.Enum)(Si).fromValue(p);if(!d)continue;let m=d;d!==Si.Property&&d!==Si.Resource||(m=u);let h=c.get(m);if(!h&&d===Si.Property){const t=u.replace(/^@/,"&");if((t===ye.resource_backgroundWallpaper||t===ye.resource_imagePlaceholder||t===ye.resource_platformIcon||t===ye.resource_platformLogo||t===ye.resource_platformBackgroundImage||t===ye.resource_coverImage)&&(h=c.get(t),h)){d=Si.Resource,o.type=Si.Resource;const r=`Falling back to '[${t}]' from '[${u}]'. Replace '[${u}]' with '[&${u}]' to avoid this warning.`;e.addWarning(r)}}const{validated:b,warning:g}=this.validateSingleTag(e,t,r,o,d,h,a);d===Si.Resource&&(s=Si.Resource);let y=!0;if(!b)if(t===Ei&&s!==Si.Resource){n=o;const e=l.slice(i+1);e.length>0&&(n.chain=e),l.splice(i),y=!1}else l.splice(i,1,null);if(g&&y&&e.addWarning(g.warning??"",g.content,g.previousContent),t===Ei&&h&&h.chain&&b&&!b.chain){const e=l.slice(i+1);e.length>0&&(b.chain=e),l.splice(i+1)}if(b&&Array.isArray(b.chain)&&b.chain.length>0)if(h&&h.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,Ei,r,b.chain,h.chain,void 0,b.type);t&&t.length>0?b.chain=t:b.chain=void 0,o&&l.splice(i+1,0,o)}else if(b.type!==Si.Resource){const e=b.chain[0];b.chain.length>1&&(e.chain=b.chain.slice(1)),l.splice(i+1,0,e),b.chain=void 0}}for(const t of c.values()){const{minCount:r,_seenCount:i}=t;if(null!=r&&i<r){const i=`${this.getTagSignature(t)} is required at least ${r} time(s)`;e.addWarning(i)}}return{validated:l.filter(e=>null!=e),remaining:n}}validateSingleTag(e,t,r,i,o,a,s){const{type:n,key:l}=i,c=a?this.getTagSignature(a):this.getUnknownTagSignature(n,l),p=" It will be ignored";let u,d,m="";if(a)switch(a._seenCount++,o){case Si.Property:{const{content:o,warning:s}=this.validatePropertyTag(e,t,r,a,i);u=o,d=s;break}case Si.Resource:{const{content:o,warning:s}=this.validateResourceTag(e,t,r,a,i);u=o,d=s;break}case Si.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,r,a,i,s);u=t,d=o;break}default:{const{content:o,warning:s}=this.validateStandardTag(e,t,r,a,i);u=o,d=s}}else switch(o){case Si.Property:d={extraProperty:!0},t!==Ei&&(u=i);break;case Si.Resource:d={excessResource:!0},u=i;break;default:d={invalid:!0}}if(d){const e=a?._previous;d.invalid||d.excessResource?m=`${c} is not valid here (incorrectly chained?).${p}`:null!=d.tooMany?(m=`${c} is included more than the required ${d.tooMany} time(s).`,0===d.tooMany&&o===Si.Resource&&(m+=` Did you forget the '${l}' in the bit header?`),d.tooMany>0&&(m+=" The earlier ones will be ignored")):d.extraProperty?m=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:d.unexpectedCardSet?m=`${c} is not expected here.${p}`:d.unexpectedCardSideVariant&&(m=`${c} has a card / side / variant that is not expected here.${p}`),d.warning=m,d.content=u,d.previousContent=e}return a&&(a._previous=i),{validated:u,warning:d}}validateStandardTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==m&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==m&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,r,i,o){const a=null==i.maxCount?1:i.maxCount;return a!==m&&i._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,r,i,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:a}=i,s=a;let n,l=0,c=0;for(const r of s.cards){l=0;for(const i of r.sides){c=0;for(const r of i.variants){const o=r.content;let a;const s=Le.getCardSetVariantConfig(t,l,c);if(s){a=this.validateTagChainsRecursive(e,Ii,t,o,s.tags).validated}else n={unexpectedCardSideVariant:!0};a&&a.length>0?i.variants[c]={parser:r.parser,content:a}:i.variants[c]={parser:r.parser,content:[]},c++}l++}}return{content:i,warning:n}}checkBodyForCommonPotentialMistakes(e,t,r){if(!r)return;const{bitType:i}=e;for(const t of Gi)r.includes(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of Fi)r.startsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`);for(const t of Ki)r.endsWith(t)&&e.addWarning(`Bit '${i}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,r,i){const o=new Map;for(const e of Object.values(i)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===re,isProperty:e.type===ie,isResource:e.type===oe,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)o.set(e.configKey,t);else if(t.isResource)o.set(e.configKey,t);else{const r=(0,Ri.Enum)(Si).fromValue(e.tag);r&&o.set(r,t)}}return o}getTagSignature(e){switch(e._type){case re:case ie:case oe:return`[${e._configKey}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case Si.Property:case Si.Resource:return`[${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}},Oi=new class{concatenatePlainTextWithAstTexts(e,t,r){if(Array.isArray(e)){if(r=r&&r.trim()){const i=r.split("\n"),o=[];for(let e=0;e<t;e++)o.push({type:Ze.hardBreak});for(let e=0;e<i.length;e++){const t=i[e];t&&o.push({text:t,type:Ze.text}),e<i.length-1&&o.push({type:Ze.hardBreak})}const a=e[e.length-1];a&&a.type===Ze.paragraph?a.content=[...a.content??[],...o]:e.push({type:Ze.paragraph,content:o,attrs:{}})}return e}return`${e??""}${"\n".repeat(t)}${r??""}`}},Ji=new Wr,Di=new class{process(e,t,r,i,o,a,s,n){const l=[];let c,p;const u=s.length>0?this.trimBodyParts(s):void 0,d=n?u:$i.checkBody(e,t,r,i,u);if(i===S.json&&d){c=d.reduce((e,t)=>{if(t.type===Ye.text&&t.data){return e+(t.data.bodyText??"")}return e},"");try{c=JSON.parse(c)}catch(t){c=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",r="",o=0;const a=e=>`[!${e}]`;if(d)for(let i=0;i<d.length;i++){const s=d[i];if(s.type===Ye.text){const i=s,o=i.data.bodyText;i.data.isPlain?t=_t.concatenate(t,o):e=_t.concatenate(e,o),r=_t.concatenate(r,o)}else{const t=a(o);e=_t.concatenate(e,t),l.push(s),o++}}const s=i===S.bitmarkText?Ji.toAst(e,{format:i,location:it}):_t.unbreakscape(e,{format:S.plainText,location:it}),n=_t.unbreakscape(t,{format:S.plainText,location:it}),u=g.countOccurrencesAtEnd(e,"\n")+g.countOccurrencesAtStart(t,"\n");c=Oi.concatenatePlainTextWithAstTexts(s,u,n),p=_t.unbreakscape(r,{format:i,location:it}).trim();const m=Array.isArray(c)?c:void 0;if(m&&d){o=0;for(let e=0;e<d.length;e++){const t=d[e];if(t.type===Ye.text)continue;const r=t;let i;switch(t.type){case Ye.gap:case Ye.mark:case Ye.select:case Ye.highlight:i=r}i&&this.replacePlaceholderWithBodyBit(m,i,o),o++}}}return{body:c,bodyBits:l.length>0?l:void 0,bodyString:p}}buildBodyText(e,t){return{type:Ye.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,r){const i=(e,o,a)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const r=e[t];if(i(r,e,t))return!0}else{if("bit"===e.type&&e.index===r)return o[a]=t,!0;if(e.content){if(i(e.content,e,"content"))return!0}}return!1};i(e,null,null)}trimBodyParts(e){let t=!1,r=e.reduce((e,r)=>{const i=r;if(t||i.type!==Ye.text)t=!0,e.push(r);else{const r=i.data.bodyText.trimStart();r&&(t=!0,i.data.bodyText=r,e.push(i))}return e},[]);return t=!1,r=r.reduceRight((e,r)=>{const i=r;if(t||i.type!==Ye.text)t=!0,e.unshift(r);else{const r=i.data.bodyText.trimEnd();r&&(t=!0,i.data.bodyText=r,e.unshift(i))}return e},[]),r}};function zi(e,t,r,i,o,a,s,n){const{bitConfig:l}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",i);let c={};const p=function(e,t){const r={cards:[],internalComments:[]};if(!t)return r;const{bitType:i}=e;let o=0,a=0,s=0;for(const n of t.cards){const t={no:o++,sides:[],qualifier:n.qualifier};r.cards.push(t);for(const o of n.sides){const n={no:a++,variants:[],qualifier:o.qualifier};t.sides.push(n);for(const l of o.variants){const{parser:o,content:c}=l,p={parser:o,no:s++,qualifier:l.qualifier};n.variants.push(p);const u=Le.getTagsConfigForCardSet(i,a,s),d=e.bitContentProcessor(Ii,u,c);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",d),d.cardBody=$i.checkCardBody(e,Ii,i,d.cardBody,t.no,n.no,p.no),d.cardBodyStr=d.cardBody?.bodyString,p.data=d,d.internalComments&&r.internalComments.push(...d.internalComments)}s=0}a=0}return r}(e,i),d=l.cardSet?.configKey;switch(d){case P:case I:case E:case L:c=function(e,t,r){const i=[],o=[];let a,s,n,l="",c=[],p=0,d={};const m=t===u.flashcard1,h=ji(r);for(let b=0;b<r.cards.length;b++){const g=r.cards[b];if(!h||0!==b){a=void 0,s=void 0,c=[],p=0,d={};for(const e of g.sides)for(const t of e.variants){const{cardBody:e,resources:r,...i}=t.data;d={...d,...i};const o=r&&r.length>0?r[0]:void 0,u=e?.body;0===p?(n=t,l=e?.bodyString??"",a={text:u,icon:o}):1===p?s={text:u,icon:o}:c.push({text:u,icon:o}),p++}if(0!==b&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${l}'`,n);break}if(Le.isOfBitType(t,[u.flashcard])){const e={question:a,answer:s,alternativeAnswers:c,...d};e&&i.push(e)}else{const e={term:a,definition:s,alternativeDefinitions:c,...d};e&&o.push(e)}}}return{heading:h?.heading,flashcards:i.length>0?i:void 0,definitions:o.length>0?o:void 0}}(e,t,p);break;case N:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r=t.cardBody?.body??t.cardBodyStr??_t.EMPTY_STRING;i.push(r)}return{elements:i.length>0?i:void 0}}(0,0,p);break;case V:c=function(e,t,r,i,o){const a=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{statements:t,statement:r,...i}=e.data;if(Array.isArray(t))for(const e of t){const t={statement:e.statement??[],isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example,...i};t&&a.push(t)}}i&&a.push(i);Array.isArray(o)&&o.length>0&&a.push(...o);return{statements:a.length>0?a:void 0}}(0,0,p,o,a);break;case F:c=function(e,t,r){let i;const o=[],a=ji(r);for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(!a||0!==e){i=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:s,choices:n,...l}=r;if(0===e){const e=[];if(n&&n.length>0)for(const t of n){const{__isDefaultExample:r,example:i,...o}=t,a={choice:o.choice,requireReason:o.isCorrect,item:o.item,lead:o.lead,instruction:o.instruction,__isDefaultExample:r,example:i};e.push(a)}i={...r,choices:e},i&&o.push(i)}else if(1===e){const e={text:s??"",__textAst:a?.body,...l};i&&(i.reason=e)}}}}}return{heading:a?.heading,feedbacks:o.length>0?o:void 0}}(0,0,p);break;case R:case G:c=function(e,t,r,i,o){const a=[],s=Le.isOfBitType(t,u.multipleChoice),n=Le.isOfBitType(t,u.multipleResponse);if(!s&&!n)return{};let l,c=!1;for(const e of r.cards){c=!1,l=void 0;for(const t of e.sides)for(const e of t.variants){const{__isDefaultExample:t,example:r,...i}=e.data;if(c=!0===t||c,l=r||l,i.trueFalse&&i.trueFalse.length>0){const e=[];for(const t of i.trueFalse){const{__isDefaultExample:r,example:i,...o}=t,a=r||c,s=i||l,p={isCorrect:o.isCorrect,__isDefaultExample:a,example:s};n?p.response=o.text:p.choice=o.text,p&&e.push(p)}n?i.responses=e:i.choices=e}const o={...i,choices:i.choices,responses:i.responses,__isDefaultExample:c,__defaultExample:l};o&&a.push(o)}}if(s&&Array.isArray(i)&&i.length>0){const e={choices:i};e&&a.push(e)}if(n&&Array.isArray(o)&&o.length>0){const e={responses:o};e&&a.push(e)}return{quizzes:a.length>0?a:void 0}}(0,t,p,s,n);break;case K:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,r={question:t.cardBody?.body??t.cardBodyStr??_t.EMPTY_STRING,...t};r&&i.push(r)}return{questions:i.length>0?i:void 0}}(0,0,p);break;case $:c=function(e,t,r){const i=[];let o,a,s,n,l=[],c=[],p={},d=!1;const m=Le.isOfBitType(t,u.matchMatrix),h=ji(r,m),b=h?.isDefaultExampleCardSet??!1;let g=h?.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(h&&0===e)continue;o=void 0,l=[],c=[],a=void 0,s=void 0,p={},d=!1,n=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];for(const t of r.variants){const{cardBody:r,cardBodyStr:i,resources:u,__isDefaultExample:m,example:h,...g}=t.data;if(d=!0===m||d,n=h||n,0===e)if(Array.isArray(u)&&u.length>0){const e=u[0];e.type===y.audio?a=e:e.type===y.image&&(s=e)}else o=i;else{const e=i??"",t=r?.body;l.push(e),c.push(t),!b&&!d||n||(n=t),delete g.item,delete g.lead}p={...p,...g}}}d&&(g=void 0);const u=d||b,m=n||g,f={key:o??"",keyAudio:a,keyImage:s,values:l,__valuesAst:c,...p,__isDefaultExample:u,example:m};f&&i.push(f)}return{heading:h?.heading,pairs:i.length>0?i:void 0}}(0,t,p);break;case D:c=function(e,t,r){let i,o;const a=[];let s,n,l,c,p=[],u=[],d=[],m={},h=!1,b=!1;const g=ji(r,!0),y=g?.isDefaultExampleCardSet??!1;let f=g?.exampleCardSet;for(let e=0;e<r.cards.length;e++){const t=r.cards[e];if(g&&0===e)continue;i=void 0,o=void 0,p=[],u=[],d=[],h=!1,s=void 0,l=void 0;for(let e=0;e<t.sides.length;e++){const r=t.sides[e];u=[],d=[],m={},b=!1,n=void 0,c=void 0;for(const t of r.variants){const r=t.data,{cardBody:a,cardBodyStr:p,__isDefaultExample:g,example:f,isCaseSensitive:k,...x}=r;if(b=!0===g||b,n=f||n,Object.assign(m,x),0===e)i=p,o=x,h=!0===g||h,s=f||s,l=null!=k?k:l;else{const e=p??_t.EMPTY_STRING,t=a?.body;u.push(e),d.push(t),!y&&!b||n||(n=t),c=null!=k?k:l}}if(e>0){b&&(s=f=void 0),h&&(f=void 0);const e=b||h||y,t=n||s||f,r={values:u,__valuesAst:d,...m,__isDefaultExample:e,example:t,isCaseSensitive:c};r&&p.push(r)}}const k={key:i??_t.EMPTY_STRING,cells:p,...o};k&&a.push(k)}return{heading:g?.heading,matrix:a.length>0?a:void 0}}(0,0,p);break;case q:c=function(e,t,r){const i=[];let o=[];for(const e of r.cards){o=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:r,cardBody:i,resources:a}=t,s=r&&r[1].titleAst,n=a&&a.length>0?a.find(e=>e.type===y.audio):void 0,l={title:s??[],body:i?.body??[],audio:n};o.push(l)}i.push(o)}return{pronunciationTable:{data:i}}}(0,0,p);break;case z:case j:c=function(e,t,r){const i={header:[],body:[],footer:[]},o=t=>{if(!t)return;const r=t.trim().toLowerCase();return"table-header"===r?"header":"table-body"===r?"body":"table-footer"===r?"footer":void e.addWarning(`Unknown table section qualifier '${t}', defaulting to body.`)},a=(e,t)=>0===t&&e.sides.some(e=>e.variants.some(e=>{const t=e.data.title;return Array.isArray(t)&&t[1]?.titleAst})),s=(e,t)=>{if(!e)return;const r=e[t];return Array.isArray(r)?r[0]:r},n=(e,t)=>{const r=e.extraProperties;if(r){for(const e of t)Object.prototype.hasOwnProperty.call(r,e)&&delete r[e];0===Object.keys(r).length&&delete e.extraProperties}},l=(t,r)=>{if("string"==typeof t){const i=t.trim().toLowerCase();if("th"===i||"td"===i)return i;e.addWarning(`Invalid table cell type '${t}', using default for section '${r}'.`)}return"body"===r?"td":"th"},c=(t,r)=>{if(null==t)return 1;const i=Qr.asNumber(t);return null==i||!Number.isInteger(i)||i<1?(e.addWarning(`Invalid table ${r} '${t}', defaulting to 1.`),1):i},p=t=>{if(null==t)return;if("string"!=typeof t)return void e.addWarning(`Invalid table scope '${t}', ignoring.`);const r=t.trim().toLowerCase();switch(r){case"row":case"col":case"rowgroup":case"colgroup":return r;default:return void e.addWarning(`Invalid table scope '${t}', ignoring.`)}},u=(e,t)=>{const r=e.data,i=r.title&&r.title[1]?.titleAst,o=r.cardBody?.body??r.cardBodyStr??_t.EMPTY_STRING,a=i??o,u=r.tableCellType??s(r.extraProperties,"tableCellType"),d=r.tableRowSpan??s(r.extraProperties,"tableRowSpan"),m=r.tableColSpan??s(r.extraProperties,"tableColSpan"),h=r.tableScope??s(r.extraProperties,"tableScope"),b=r.tableColWidth??s(r.extraProperties,"tableColWidth");n(r,["tableCellType","tableRowSpan","tableColSpan","tableScope","tableColWidth"]);const g=l(u,t),y=c(d,"rowspan"),f=c(m,"colspan"),k=p(h),x=Qr.asNumber(b)??0,v={content:a};return"th"===g&&(v.title=!0),y>1&&(v.rowspan=y),f>1&&(v.colspan=f),k&&(v.scope=k),x>0&&(v.colwidth=x),v},d=e=>{const t=o(e.qualifier);if(t)return t;for(const t of e.sides){const e=o(t.qualifier);if(e)return e;for(const e of t.variants){const t=o(e.qualifier);if(t)return t}}};for(let e=0;e<r.cards.length;e++){const t=r.cards[e],o=d(t),s=o||(a(t,e)?"header":"body"),n=[];for(const e of t.sides)for(const t of e.variants)n.push(u(t,s));i[s].push({cells:n})}const m={},h=i.header.length>0,b=i.body.length>0,g=i.footer.length>0;h&&(m.header={rows:i.header});b&&(m.body={rows:i.body});g&&(m.footer={rows:i.footer});h||b||g||(m.header={rows:[]},m.body={rows:[]},m.footer={rows:[]});return{table:m}}(e,0,p);break;case M:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{__instructionString:t,__itemString:r,reaction:o,cardBodyStr:a,...s}=e.data,n={response:t??_t.EMPTY_STRING,reaction:o??_t.EMPTY_STRING,feedback:a??_t.EMPTY_STRING,...s,item:r??_t.EMPTY_STRING};n&&i.push(n)}return{botResponses:i.length>0?i:void 0}}(0,0,p);break;case Y:c=function(e,t,r){const i=[];for(const e of r.cards)for(const t of e.sides)for(const e of t.variants){const{title:t,__instructionString:r,unit:o,unitPlural:a,unitAbbr:s,unitAbbrPlural:n,decimalPlaces:l,disableCalculation:c,cardBodyStr:p,cardBody:u,...d}=e.data,m=Array.isArray(t)&&t.length>0?t[t.length-1].titleString:void 0;let h=!1,b=Qr.asNumber(r);if(u&&u.bodyBits){const e=u.bodyBits.find(e=>e.type===Ye.select);e&&(b=e.__instructionString?Qr.asNumber(e.__instructionString):b,e.options&&e.options.length>0&&(h=e.options[0].isCorrect))}const g={title:m,checked:h,ingredient:p,quantity:b,unit:o??_t.EMPTY_STRING,unitPlural:a,unitAbbr:s??_t.EMPTY_STRING,unitAbbrPlural:n,decimalPlaces:l??1,disableCalculation:c,...d};g&&i.push(g)}return{ingredients:i.length>0?i:void 0}}(0,0,p);break;case W:case H:case U:case Q:c=function(e,t,r,i){const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const{cardBody:t,...r}=e.data,i={body:t,...r};i&&o.push(i)}return{cardBits:o.length>0?o:void 0}}(0,0,0,p)}return c.internalComments=p.internalComments.length>0?p.internalComments:void 0,c}function ji(e,t=!1){let r,i,o=!1;const a=[];let s,n=!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 r=t.variants[0].data,{title:c,__isDefaultExample:p,example:u}=r,d=c&&c[1].titleString;null!=d&&(o=!0),0===e?o&&(i=d,n=!0===p||n,s=u||s):o&&(a.push(d??""),n=!0===p||n,s=u||s)}if(o){let e=a;e=t?a:a.length>=1?a[a.length-1]:"",r={forKeys:i??"",forValues:e}}return r?{heading:r,isDefaultExampleCardSet:n,exampleCardSet:s}:void 0}function qi(e,t,r,i,o){const{type:a,value:s}=i,{textFormat:n}=e,l=new Wr,c=g.trimmedString(s);switch(a){case Si.Instruction:o.instruction=l.toAst(c,{format:n,location:rt}),o.__instructionString=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Si.Hint:o.hint=l.toAst(c,{format:n,location:rt}),o.__hintString=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Si.Anchor:o.anchor=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Si.Reference:o.reference=_t.unbreakscape(c,{format:S.bitmarkText,location:rt});break;case Si.SampleSolution:o.sampleSolution=_t.unbreakscape(c,{format:S.bitmarkText,location:rt}),o.__sampleSolutionAst=l.toAst(c,{format:n,location:rt}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",i)}}var Mi=new Wr,Hi=new class{process(e,t,r,i,o,a){const{textFormat:s}=e;let n;o=o.trimStart(),a=a.trimEnd();const l=!!o.trim(),c=!!a.trim();let p=0;if(l&&c&&(p=g.countOccurrencesAtEnd(o,"\n")+g.countOccurrencesAtStart(a,"\n")),o||a){const r=s===S.bitmarkText;o&&(o=$i.checkFooter(e,t,o));const i=r?Mi.toAst(o,{format:s,location:it}):_t.unbreakscape(o,{format:S.plainText,location:it}),l=_t.unbreakscape(a,{format:S.plainText,location:it});n=Oi.concatenatePlainTextWithAstTexts(i,p,l)}return n?{footer:n}:void 0}},Ui=r(722),Wi=new Wr;function Yi(e,t,r,i,o,a){if(t===Ei)!function(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=o.solutions,l=o.__solutionsAst;if(n&&l&&g.isString(s)){const e=g.trimmedString(s);n.push(_t.unbreakscape(e,{format:S.bitmarkText,location:rt}));const t=Wi.toAst(e,{format:a,location:rt});l.push(t)}}(e,0,0,i,o);else{const t=function(e,t,r,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",i);const o=Le.getTagConfigForTag(r,(0,Ui.Enum)(x).fromValue(i.type)),a=[i,...i.chain??[]],s=e.bitContentProcessor(Ei,o?.chain,a);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",s);const n={type:Ye.gap,...s};return n}(e,0,r,i);t&&a.push(t)}}var Qi=r(722);function Zi(e){const t=[e];if(e.chain)for(const r of e.chain)t.push(...Zi(r));return t}function Xi(e,t,r,i,o){t===Ei?function(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=new Wr,l=g.trimmedString(s);o.itemLead||(o.itemLead=[]);const c=n.toAst(l,{format:a,location:rt});o.itemLead.push(c),o.__itemLeadString||(o.__itemLeadString=[]),o.__itemLeadString.push(_t.unbreakscape(l,{format:S.bitmarkText,location:rt}))}(e,0,0,i,o):function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",i);const a=Le.getTagConfigForTag(r,(0,Qi.Enum)(x).fromValue(i.type)),s=Zi(i),n=e.bitContentProcessor(Ei,a?.chain,s);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",n);o.itemLead=n.itemLead,o.__itemLeadString=n.__itemLeadString}(e,0,r,i,o)}var eo=r(722);function to(e,t,r,i,o,a){if(t===Ei)!function(e,t,r,i){const{value:o}=r;g.isString(o)&&(i.solution=g.trimmedString(o))}(0,0,i,o);else{const t=function(e,t,r,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",i);const o=Le.getTagConfigForTag(r,(0,eo.Enum)(x).fromValue(i.type)),a=e.bitContentProcessor(Ei,r,[i]),s=e.bitContentProcessor(Ei,o?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",s);const{solution:n}=a,{mark:l,...c}=s,p={type:Ye.mark,solution:n??"",mark:St.asSingle(l)??"",...c};return p}(e,0,r,i);t&&a.push(t)}}var ro=r(722);function io(e,t,r,i,o){t===Ei||function(e,t,r,i,o){const{bitConfig:a}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",i);const s=e.bitContentProcessor(Ei,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",s);const{reference:n,referenceEnd:l}=s,c=_t.unbreakscape(g.trimmedString(i.value),{format:S.bitmarkText,location:rt}),p=a.tags[ye.property_book];if(p&&(p.maxCount===m||p.maxCount>1))return Array.isArray(o.book)||(o.book=[]),void o.book.push({book:c,reference:n??"",referenceEnd:l??void 0});o.book=c,o.reference=n,o.referenceEnd=l}(e,0,r,i,o)}var oo=new Wr;function ao(e,t,r,i){const{bitType:o}=e,{value:a}=r,s=a;Le.isOfBitType(o,[u.cloze,u.clozeAndMultipleChoiceText,u.multipleChoiceText,u.highlightText,u.trueFalse,u.trueFalse1,u.multipleResponse,u.multipleResponse1,u.multipleChoice,u.multipleChoice1])?function(e,t,r,i){const{bitType:o,textFormat:a}=e;let s;Array.isArray(i.trueFalse)&&i.trueFalse.length>0&&(s=i.trueFalse[i.trueFalse.length-1]??void 0);s?!0===r?(s.__isDefaultExample=!0,s.example=!!s.isCorrect):Yr.isBooleanString(r)?s.example=Yr.toBoolean(r):(s.__isDefaultExample=!0,s.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(i.__solutionsAst)&&i.__solutionsAst.length>0?i.example=!0===r?i.__solutionsAst[i.__solutionsAst.length-1]??void 0:r?oo.toAst(r,{format:a,location:rt}):void 0:Le.isOfBitType(o,[u.multipleChoiceText,u.highlightText,u.trueFalse,u.trueFalse1,u.multipleResponse,u.multipleResponse1])?function(e,t,r,i){if(!0===r)i.__isDefaultExample=!0,i.example=void 0;else{const o=r?_t.unbreakscape(r,{format:S.bitmarkText,location:rt}):void 0;Yr.isBooleanString(o)?i.example=Yr.toBoolean(o):(i.__isDefaultExample=!0,i.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,r,i):Le.isOfBitType(o,[u.clozeAndMultipleChoiceText,u.multipleChoice,u.multipleChoice1])?(i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):so(e,t,r,i)}(e,r,s,i):Le.isOfBitType(o,u.mark)?function(e,t,r,i){i.__isDefaultExample=!0,i.example=void 0,!0!==r&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,r,s,i):so(e,r,s,i)}function so(e,t,r,i){const{textFormat:o}=e;!0===r||"true"===r?(i.__isDefaultExample=!0,i.example=void 0):i.example=r?oo.toAst(r,{format:o,location:rt}):void 0}var no={groupKey:"groupTag",memberKey:"tag"},lo={groupKey:"accessibilityGroupTag",memberKey:"accessibilityTag"};function co(e,t,r,i,o,a=no){const{value:s}=i,{groupKey:n,memberKey:l}=a;e.DEBUG_CHAIN_CONTENT&&e.debugPrint(`${n} content`,i);const c=e.bitContentProcessor(Ei,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint(`${n} TAGS`,c);const p=c[l],u={name:g.trimmedString(s)??"",tags:p??[]};Array.isArray(o[n])||(o[n]=[]),o[n].push(u)}var po=r(722);function uo(e,t,r,i,o){t===Ei?function(e,t,r,i,o){const{value:a}=i,s=_t.unbreakscape(g.trimmedString(a),{format:S.bitmarkText,location:rt});o.imageSourceUrl=s}(0,0,0,i,o):function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",i);const{key:a}=i,s=Le.getTagConfigForTag(r,(0,po.Enum)(ye).fromValue(a)),n=e.bitContentProcessor(Ei,r,[i]),l=e.bitContentProcessor(Ei,s?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",l);const{imageSourceUrl:c}=n,{mockupId:p,...u}=l;c||e.addWarning("[@imageSource] is missing the image url",i);p||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",i);const d={url:c??"",mockupId:p??"",...u};o.imageSource=d}(e,0,r,i,o)}var mo=r(722);function ho(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",i);const a=e.bitContentProcessor(Ei,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",a);const{propertyTitle:s,resources:n}=a,l=_t.unbreakscape(g.trimmedString(i.value),{format:S.bitmarkText,location:rt}),c=g.trimmedString(s),p=function(e,t){let r;const i=[];if(t)for(const e of t.reverse())r||y.image!==e.type?i.push(e):r=e;i.length>0&&e.addWarning(`${i.length} excess resource(s) present in the [@person] chain.`);return r}(e,n),u={name:l,title:c,avatarImage:p};o.person=u}var bo=new Wr;var go=new Wr;function yo(e,t,r,i,o){const{value:a}=i,{key:s}=i,n=t===Ei,l=Le.getTagConfigForTag(r,(0,ro.Enum)(ge).fromValue(s)),c=l?l.configKey:void 0;let p=ke(s);if(c===ye.property_internalComment)return void function(e,t,r,i){if(!i.internalComments)return;const{value:o}=r,a=g.isString(o)?g.trimmedString(o):void 0;a&&i.internalComments.push(a)}(0,0,i,o);if(l){if(c===ye.property_example)return void ao(e,0,i,o);if(c===ye.property_groupTag)return void co(e,0,l.chain,i,o);if(c===ye.property_accessibilityGroupTag)return void co(e,0,l.chain,i,o,lo);if(c===ye.property_ratingLevelStart||c===ye.property_ratingLevelEnd)return void function(e,t,r,i,o){const{textFormat:a}=e,{key:s,value:n}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",i);const l=e.bitContentProcessor(Ei,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",l);const{label:c}=l,p={level:Qr.asNumber(n)??0,label:c?bo.toAst(c,{format:a,location:rt}):void 0};switch(s){case ye.property_ratingLevelStart:o.ratingLevelStart=p;break;case ye.property_ratingLevelEnd:o.ratingLevelEnd=p}}(e,0,l.chain,i,o);if(c===ye.property_technicalTerm)return void function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",i);const a=e.bitContentProcessor(Ei,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",a);const{lang:s}=a,n={technicalTerm:_t.unbreakscape(g.trimmedString(i.value),{format:S.bitmarkText,location:rt}),lang:s};o.technicalTerm=n}(e,0,l.chain,i,o);if(c===ye.property_servings)return void function(e,t,r,i,o){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",i);const a=e.bitContentProcessor(Ei,r,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",a);const{unit:s,unitPlural:n,unitAbbr:l,unitAbbrPlural:c,decimalPlaces:p,disableCalculation:u,__hintString:d}=a,m={servings:Qr.asNumber(i.value)??1,unit:s,unitPlural:n,unitAbbr:l,unitAbbrPlural:c,decimalPlaces:p??1,disableCalculation:u,hint:d};o.servings=m}(e,0,l.chain,i,o);if(c===ye.property_person||c===ye.property_partner)return void ho(e,0,l.chain,i,o);if(c===ye.property_imageSource)return void uo(e,t,r,i,o);if(c===ye.property_book)return void io(e,t,l.chain,i,o);if(c===ye.property_mark&&!n)return void function(e,t,r,i,o){const{key:a}=i;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",i);const s=o.markConfig;if(!s)return;const n=Le.getTagConfigForTag(r,(0,mo.Enum)(ye).fromValue(a)),{mark:l,...c}=e.bitContentProcessor(Ei,n?.chain,i.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",c);const p={mark:_t.unbreakscape(g.trimmedString(i.value)??"unknown",{format:S.bitmarkText,location:rt}),emphasis:"underline",...c};p&&s.push(p)}(e,0,r,i,o);c===ye.property_title&&n&&(p="propertyTitle")}const u=(t,r,o,a)=>{if(o=(t=>{if(null!=t){if(a)switch(a.format){case v:return _t.unbreakscape(g.isString(t)?g.trimmedString(t):void 0,{format:S.plainText,location:rt});case A:{const o=_t.unbreakscape(g.isString(t)?g.trimmedString(t):void 0,{format:S.plainText,location:rt});return null==o||""===o?a.defaultValue??"":(a.values&&!a.values.includes(o)&&e.addWarning(`Invalid value '${o}' for property [@${r}]. Valid values: ${a.values.join(" | ")}`,i),o)}case _:return Qr.asNumber(_t.unbreakscape(t,{format:S.plainText,location:rt}));case C:return Yr.toBoolean(_t.unbreakscape(t,{format:S.plainText,location:rt}),!0);case w:return!Yr.toBoolean(_t.unbreakscape(t,{format:S.plainText,location:rt}),!0);case T:return t=g.isString(t)?t:"",go.toAst(t,{format:S.bitmarkText,location:rt});case B:const o=_t.unbreakscape(t,{format:S.plainText,location:rt});if(null==o)return;const s=o.split(",").map(e=>Qr.asNumber(e.trim()));if(4!==s.length||s.some(e=>null==e))return;return s}return _t.unbreakscape(t,{format:S.plainText,location:rt})}})(o),null==a||a.array)if(Object.prototype.hasOwnProperty.call(t,r)){const e=t[r];t[r]=[...e,o]}else t[r]=[o];else t[r]=o};u(l?o:o.extraProperties,p,a,l),c===ye.property_sampleSolution&&u(o,"__sampleSolutionAst",a,new le({configKey:ye.property_sampleSolution,tag:"sampleSolution",maxCount:1,minCount:1,chain:void 0,jsonKey:void 0,exportJsonKey:void 0,hasExportJsonKey:!1,htmlKey:void 0,hasHtmlKey:!1,format:T,values:void 0,defaultValue:void 0,deprecated:void 0}))}function fo(e,t,r,i,o){const{value:a,chain:s}=i,n=g.trimmedString(a);if(o.reference=_t.unbreakscape(n,{format:S.bitmarkText,location:rt}),Array.isArray(s)&&s.length>0){const t=e.bitContentProcessor(Ei,r,s);null!=t.reference&&(o.referenceEnd=t.reference)}}var ko=r(722),xo=new oi;function vo(e,t,r,i,o){const{type:a,key:s,value:n,chain:l}=i,c=o.resources;if(!c)return;const p=(0,ko.Enum)(ye).fromValue(s);if(!p)return;const u=(0,ko.Enum)(y).fromKey(p.replace(/^&/,""))??y.unknown,d=Le.getTagConfigForTag(r,p),{posterImage:m,...h}=e.bitContentProcessor(Ei,d?.chain,l);let b;if(m){const{subConfig:t,subChain:r}=function(e,t,r){let i;e&&(i=e[r]?.chain);const o=t?.reduce((e,t)=>{if(e)return e;const i=t;return i.key===r?i.chain:void 0},void 0);return{subConfig:i,subChain:o}}(d?.chain,l,ye.property_posterImage),{posterImage:i,...o}=e.bitContentProcessor(Ei,t,r);b=xo.resource(e,{type:y.image,value:m,...o}).image}const g=xo.resource(e,{type:u,value:_t.unbreakscape(n,{format:S.bitmarkText,location:rt}),posterImage:b,...h});g&&(p===ye.resource_backgroundWallpaper||p===ye.resource_imagePlaceholder||p===ye.resource_platformIcon||p===ye.resource_platformLogo||p===ye.resource_platformBackgroundImage||p===ye.resource_previewImage||p===ye.resource_previewVideo||p===ye.resource_coverImage||p===ye.resource_backgroundImage?o.propertyStyleResources&&(o.propertyStyleResources[u]?(Array.isArray(o.propertyStyleResources[u])||(o.propertyStyleResources[u]=[o.propertyStyleResources[u]]),o.propertyStyleResources[u].push(g)):o.propertyStyleResources[u]=g):c.push(g))}var To=new Wr;function _o(e,t,r,i,o){const{textFormat:a}=e,{value:s}=i,n=o.title;if(!n)return;const l=s,c=g.trimmedString(l.title);n[l.level.length]={titleAst:To.toAst(c??"",{format:a,location:rt}),titleString:c??""}}var Co=new Wr;function wo(e,t,r,i,o,a){t===Ei?function(e,t,r,i){const{textFormat:o}=e,{type:a,value:s}=r,n=i.trueFalse;if(!n)return;const l=_t.unbreakscape(g.trimmedString(s),{format:S.bitmarkText,location:rt}),c=Co.toAst(l??"",{format:o,location:rt});n.push({text:l,textAst:c,isCorrect:a===Si.True,__isDefaultExample:!1})}(e,0,i,o):function(e,t,r,i,o,a){const{bitType:s}=e,n=[i,...i.chain??[]],l=o.statements,c=o.choices,p=o.responses;if(!(l&&c&&p&&a))return;if(Le.isOfBitType(s,u.trueFalse1))o.statement=function(e,t,r){const{bitType:i}=e;if(!Le.isOfBitType(i,u.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",r);const{trueFalse:o,...a}=e.bitContentProcessor(Ei,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",a);let s,n;o&&o.length>0&&(n=o[0]);if(n){const{statement:e,...t}=a;s={...n,statement:n.text,...t}}return s}(e,r,n);else if(Le.isOfBitType(s,[u.trueFalse,u.multipleChoice,u.multipleChoice1,u.multipleResponse,u.multipleResponse1,u.feedback])){const t=function(e,t,r){const{bitType:i}=e,o=Le.isOfBitType(i,u.trueFalse),a=Le.isOfBitType(i,[u.multipleChoice,u.multipleChoice1,u.feedback]),s=Le.isOfBitType(i,[u.multipleResponse,u.multipleResponse1]);if(!o&&!a&&!s)return{};const n=[],l=[],c=[],p=e.splitBitContent(r,[Si.True,Si.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",p);for(const r of p){const{trueFalse:i,...p}=e.bitContentProcessor(Ei,t,r);let u;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",p),i&&i.length>0&&(u=i[0]),u)if(o){const{statement:e,...t}=p,r={...u,statement:u.textAst??[],...t};r&&n.push(r)}else if(a){const e={...u,choice:u.text,...p};e&&l.push(e)}else if(s){const e={...u,response:u.text,...p};e&&c.push(e)}}const d={};o?d.statements=n:a?d.choices=l:s&&(d.responses=c);return d}(e,r,n);t.statements&&l.push(...t.statements),t.choices&&c.push(...t.choices),t.responses&&p.push(...t.responses)}else if(Le.isOfBitType(s,u.highlightText)){const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",r);const{trueFalse:i,...o}=e.bitContentProcessor(Ei,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",{trueFalse:i,...o});const a=[];if(i)for(const e of i){const t={...e,isHighlighted:!1};t&&a.push(t)}const s={type:Ye.highlight,texts:a,...o};return s}(e,r,n);t&&a.push(t)}else{const t=function(e,t,r){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",r);const{trueFalse:i,...o}=e.bitContentProcessor(Ei,t,r);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",{trueFalse:i,...o});const a=[];if(i)for(const e of i){const t=e;t&&a.push(t)}const s={type:Ye.select,options:a,...o};return s}(e,r,n);t&&a.push(t)}}(e,0,r,i,o,a)}var Ao=!1,Bo=!0,So=!0,Po=!0,Io=!0,Eo=new ai,Lo=class{constructor(e){l(this,"context"),l(this,"nonFatalWarnings",[]),l(this,"nonFatalErrors",[]),l(this,"parser",{}),l(this,"parse"),l(this,"parserText"),l(this,"parserLocation"),this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:Le.getBitConfig(u._error),bitType:u._error,textFormat:S.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:Ao,DEBUG_BIT_CONTENT:Bo,DEBUG_BIT_TAGS:So,DEBUG_BODY:Po,DEBUG_FOOTER:Io,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){const t=[];let r=[];for(const i of e){if(!i)continue;const e=i.value;e?t.push(e):r=r.concat(i.errors??[])}return Eo.buildBitmark({bits:t,errors:r.length>0?r:void 0})}buildBit(e,t){const{bitType:r,textFormat:i,resourceType:o,bitLevel:a,isCommented:s}=e;if(!r||Le.isOfBitType(r,u._error))return this.invalidBit();const n=Le.getBitConfig(r);this.context.bitConfig=n,this.context.bitType=r,this.context.textFormat=i,this.context.resourceType=o;const l=Le.isOfBitType(r,u.trueFalse1),c=Le.isOfBitType(r,u.multipleChoice1),p=Le.isOfBitType(r,u.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=$i.validateBitTags(this.context,t);const{body:d,footer:h,cardSet:b,title:g,statement:f,statements:k,choices:x,responses:v,propertyStyleResources:T,resources:_,posterImage:C,internalComments:w,...A}=this.bitContentProcessor(Pi,n.tags,t);this.debugPrint("BIT TAGS",A),this.debugPrint("BIT BODY",d),this.debugPrint("BIT FOOTER",h);const B=function(e,t,r){if(r=r??[],Le.isOfBitType(t,[u.chapter,u.h])){let i;r.length>0&&(i=r[r.length-1]);let o=r.length>0?r.length-1:void 0;return null!=o&&o>7&&Le.isOfBitType(t,u.h)&&(e.addWarning(`Title level of ${o} too high, setting to max value of 7`),o=7),{title:i?.titleAst??[],titleString:i?.titleString??"",level:o}}return Array.isArray(r)?{title:r[1]?.titleAst??void 0,titleString:r[1]?.titleString??void 0,subtitle:r[2]?.titleAst??void 0,subtitleString:r[2]?.titleString??void 0}:{title:void 0,titleString:r??void 0,subtitle:void 0,subtitleString:void 0}}(this.context,r,g),S=zi(this.context,r,0,b,f,k,x,v),P=function(e,t,r){const{bitType:i}=e,o=[],a=[],s=(0,ko.Enum)(y).fromValue(t),n=Le.getBitResourcesConfig(i,s),l=n.resourceAttachmentAllowed,c=n.getCountsMin(),p=n.getCountsMax();if(r)for(const t of r.reverse()){const r=t.__configKey;let i=c.get(r)??0,s=p.get(r)??0;i=Math.max(0,i-1),s===m?o.unshift(t):s>0?(o.unshift(t),s--):a.unshift(t),c.set(r,i),p.set(r,s),t.__invalid&&e.addWarning(`Resource type [&${t.type}] is not valid`)}if(!l&&t){const r=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(r)}else 0===o.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such resource is present`);return a.forEach(e=>{e.__excessResource=!0,o.push(e)}),o}(this.context,o,_),I=[...w??[],...S.internalComments??[]],E=this.buildBitLevelWarnings(),L=this.buildBitLevelErrors();E&&(this.parser.warnings=E),L&&(this.parser.errors=L);return{value:Eo.buildBit({bitType:r,bitLevel:a,isCommented:s,textFormat:i,resourceType:o,...B,posterImage:C,statement:l?f:void 0,choices:c?x:void 0,responses:p?v:void 0,...A,...T,resources:P,...S,body:d,footer:h,internalComment:I,parser:this.parser})}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:Eo.buildBit({bitType:Le.getBitType(u._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,r){const i=_t.unbreakscape(e,{format:S.plainText,location:rt}),o=Le.getBitType(i),a=Le.isBitTypeCommented(i);Le.isOfBitType(o,u._error)&&this.addError(`Invalid bit type: '${i}'`);const s=Le.getBitConfig(o);t>Le.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${Le.bitLevelMax}`),t=Le.bitLevelMax):t<Le.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${Le.bitLevelMin}`),t=Le.bitLevelMin);let n=(0,Vi.Enum)(S).fromValue(r.textFormat);r.textFormat&&!n&&this.addWarning(`Invalid text format '${r.textFormat}', defaulting to '${ot.bitmarkPlusPlus}'`);const l=(0,Vi.Enum)(Ct).fromValue(r.textFormat);l&&(n=S.bitmarkText,this.addWarning(`${l} text format is deprecated. Bit will be parsed as '${ot.bitmarkPlusPlus}'`)),n=n??s.textFormatDefault;const c=(0,Vi.Enum)(y).fromValue(r.resourceType);return r.resourceType&&!c&&this.addWarning(`Invalid resource type '${r.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:n??s.textFormatDefault,resourceType:c,isCommented:a}}buildTextAndResourceType(e,t){const r={},i=e=>{if(e){const t=_t.unbreakscape(g.string(e.value),{format:S.plainText,location:rt});e.type===Si.TextFormat?r.textFormat=t:r.resourceType=t}};return i(e),i(t),r}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:r}=this.context,i=r===S.bitmarkText,o=(e,t="")=>{const{chain:r,parser:i}=e;if(t+=i.text,r)for(const e of r)t=o(e,t);return t};let a=!1;for(const r of e){const{type:e,value:s}=r,n=s??"";let l=!1;if(a||(e===Si.BodyText&&!i&&n&&n.trim()&&(a=!0),e===Si.PlainTextDivider&&(a=!0,l=!0)),l)t.push({type:Si.BodyText,value:"\n"});else if(a)if(e===Si.BodyText)t.push({type:Si.BodyTextPlain,value:s});else{const e=o(r);t.push({type:Si.BodyTextPlain,value:e})}else t.push(r)}return t}bitContentProcessor(e,t,r){const i={};if(!r)return i;const{bitType:o,textFormat:a}=this.context;i.title=[],i.solutions=[],i.__solutionsAst=[],i.statements=[],i.choices=[],i.responses=[],i.propertyStyleResources={},i.resources=[],i.trueFalse=[],i.markConfig=[],i.extraProperties={},i.internalComments=[];let s=!1;const n=[];let l=_t.EMPTY_STRING,c=_t.EMPTY_STRING,p=_t.EMPTY_STRING,u=_t.EMPTY_STRING;const d=e===Pi,m=e===Ii,h=e===Ei,b=()=>{if(l){l=$i.checkBodyPart(this.context,e,l);const t=Di.buildBodyText(l,!1);n.push(t)}l=_t.EMPTY_STRING};for(const o of r){const{type:r,value:a}=o;switch(r){case Si.ItemLead:Xi(this.context,e,t,o,i);break;case Si.Instruction:case Si.Hint:case Si.Anchor:case Si.SampleSolution:qi(this.context,0,0,o,i);break;case Si.Reference:fo(this.context,0,t,o,i);break;case Si.Title:_o(this.context,0,0,o,i);break;case Si.Property:yo(this.context,e,t,o,i);break;case Si.Gap:h||b(),Yi(this.context,e,t,o,i,n);break;case Si.Mark:h||b(),to(this.context,e,t,o,i,n);break;case Si.True:case Si.False:h||b(),wo(this.context,e,t,o,i,n);break;case Si.Resource:vo(this.context,0,t,o,i);break;case Si.CardSet:i.cardSet=a,s=!0;break;case Si.BodyText:case Si.CardText:s?c=_t.concatenate(c,a):l=_t.concatenate(l,a);break;case Si.BodyTextPlain:s?u=_t.concatenate(u,a):p=_t.concatenate(p,a);break;case Si.FooterDivider:s&&(c=_t.concatenate(c,a)),s=!0}}b();const g=p?Di.buildBodyText(p,!0):void 0;if(g&&n.push(g),i.itemLead){const e=i.itemLead.length;e>0&&(i.item=i.itemLead[0]),e>1&&(i.lead=i.itemLead[1]),e>2&&(i.pageNumber=i.itemLead[2]),e>3&&(i.marginNumber=i.itemLead[e-1])}if(i.__itemLeadString){const e=i.__itemLeadString.length;e>0&&(i.__itemString=i.__itemLeadString[0]),e>1&&(i.__leadString=i.__itemLeadString[1]),e>2&&(i.__pageNumberString=i.__itemLeadString[2]),e>3&&(i.__marginNumberString=i.__itemLeadString[e-1])}return d?i.body=Di.process(this.context,e,o,a,t,i,n,!1):m&&(i.cardBody=Di.process(this.context,e,o,a,t,i,n,!0)),i.footer=Hi.process(this.context,e,t,i,c,u),0===Object.keys(i.extraProperties).length&&delete i.extraProperties,0===i.title.length&&delete i.title,0===i.solutions.length&&delete i.solutions,0===i.statements.length&&delete i.statements,0===i.choices.length&&delete i.choices,0===i.responses.length&&delete i.responses,0===i.trueFalse.length&&delete i.trueFalse,0===i.markConfig.length&&delete i.markConfig,0===Object.keys(i.propertyStyleResources).length&&delete i.propertyStyleResources,0===i.resources.length&&delete i.resources,0===i.internalComments.length&&delete i.internalComments,i}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 r=[];let i=[];for(const o of e)t.includes(o.type)&&(i.length>0&&r.push(i),i=[]),i.push(o);return i.length>0&&r.push(i),r}addWarning(e,t,r){const i={message:e,text:t?.parser.text??this.parserText(),location:t?.parser.location??this.parserLocation(),original:r?.parser??void 0};i.original||delete i.original,this.nonFatalWarnings.push(i)}addError(e,t,r){const i={message:e,text:t?.parser.text??this.parserText(),location:t?.parser.location??this.parserLocation(),original:r?.parser??void 0};i.original||delete i.original,this.nonFatalErrors.push(i)}debugPrint(e,t){}},No=class extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(r){const e=this.location.end,i="".padEnd(a.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+a.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function a(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return o(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,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const n={literal:e=>'"'+a(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(((c=t)?'"'+a(c)+'"':"end of input")+" found.");var c}};var Vo=function e(t,r){const i={},o=(r=void 0!==r?r:{}).grammarSource,a={bitmark:nt,bit:function(){let e,t,r,o,a;e=Me,t=[],r=Nt();for(;r!==i;)t.push(r),r=Nt();if(r=pt(),r!==i){for(o=[],a=Nt();a!==i;)o.push(a),a=Nt();He=e,e=r}else Me=e,e=i;return e},cardContent:function(){let e,t,r;e=Me,t=[],r=ht(),r===i&&(r=wt());for(;r!==i;)t.push(r),r=ht(),r===i&&(r=wt());return He=e,t=qe(t),e=t,e}};let s=nt;const n="[.",l="]",c="[",p=":",u="&",d="$$$$",m="====",h="text",b="~~~~",g="footer",y=" ",f="--",k="++",x="===",v="==",T="[@id",_="#",C="[▼",w="[►",A="[@",B="[%",S="[!",P="[?",I="[+",E="[-",L="[$",N="[_",V="[=",R="[&",G="^]",F="id:",K=".",$="\n",O="\r\n",J=/^[^\]]/,D=/^[a-z]/,z=/^[a-z0-9\-]/,j=/^[^:\]]/,q=/^[^&:\]]/,M=/^[^\n\r\u2028\u2029]/,H=/^[ \t]/,U=/^[\r\u2028-\u2029]/,W=/^[ \t\n\r\u2028\u2029]/,Y=et("[.",!1),Q=tt(["]"],!0,!1,!1),Z=et("]",!1),X=et("[",!1),ee=et(":",!1),te=et("&",!1),re={type:"any"},ie=et("$$$$",!1),oe=et("====",!1),ae=et("text",!1),se=et("~~~~",!1),ne=et("footer",!1),le=et(" ",!1),ce=et("--",!1),pe=et("++",!1),ue=et("===",!1),de=et("==",!1),me=tt([["a","z"]],!1,!1,!1),he=tt([["a","z"],["0","9"],"-"],!1,!1,!1),be=et("[@id",!1),ge=et("#",!1),ye=et("[▼",!1),fe=et("[►",!1),ke=et("[@",!1),xe=et("[%",!1),ve=et("[!",!1),Te=et("[?",!1),_e=et("[+",!1),Ce=et("[-",!1),we=et("[$",!1),Ae=et("[_",!1),Be=et("[=",!1),Se=et("[&",!1),Pe=et("^]",!1),Ie=et("id:",!1),Ee=tt([":","]"],!0,!1,!1),Le=et(".",!1),Ne=tt(["&",":","]"],!0,!1,!1),Ve=rt("Character"),Re=tt(["\n","\r","\u2028","\u2029"],!0,!1,!1),Ge=rt("Blank Line"),Fe=tt([" ","\t"],!1,!1,!1),Ke=rt("Line Terminator"),$e=et("\n",!1),Oe=et("\r\n",!1),Je=tt(["\r",["\u2028","\u2029"]],!1,!1,!1),De=rt("Whitespace, then Line Terminator"),ze=rt("whitespace"),je=tt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1,!1);function qe(e){return $t.handleCardContent(e)}let Me=0|r.peg$currPos,He=Me;const Ue=[{line:1,column:1}];let We,Ye=Me,Qe=r.peg$maxFailExpected||[],Ze=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in a))throw new Error("Can't start parsing from rule \""+r.startRule+'".');s=a[r.startRule]}function Xe(){return t.substring(He,Me)}function et(e,t){return{type:"literal",text:e,ignoreCase:t}}function tt(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function rt(e){return{type:"other",description:e}}function it(e){let r,i=Ue[e];if(i)return i;if(e>=Ue.length)r=Ue.length-1;else for(r=e;!Ue[--r];);for(i=Ue[r],i={line:i.line,column:i.column};r<e;)10===t.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return Ue[e]=i,i}function ot(e,t,r){const i=it(e),a=it(t),s={source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return r&&o&&"function"==typeof o.offset&&(s.start=o.offset(s.start),s.end=o.offset(s.end)),s}function at(e){Me<Ye||(Me>Ye&&(Ye=Me,Qe=[]),Qe.push(e))}function st(e,t,r){return new No(No.buildMessage(e,t),e,t,r)}function nt(){let e;return e=function(){let e,r,o,a;e=Me,r=[],o=Gt();for(;o!==i;)r.push(o),o=Gt();return o=function(){let e,r,o,a;e=Me,r=Me,o=[],a=ct();for(;a!==i;)o.push(a),a=ct();return r=t.substring(r,Me),He=e,r=function(e){return $t.handleRawBit(e)}(r),e=r,e}(),a=function(){let e,t;e=[],t=lt();for(;t!==i;)e.push(t),t=lt();return e}(),He=e,e=function(e,t){return Ot.buildBits([e,...t])}(o,a),e}(),e}function lt(){let e,r,o,a;for(e=Me,r=[],o=Nt();o!==i;)r.push(o),o=Nt();return o=Vt(),o===i&&(o=null),a=function(){let e,r,o,a,s,c;if(e=Me,r=Me,o=Me,a=function(){let e,r,o,a;e=Me,t.substr(Me,2)===n?(r=n,Me+=2):(r=i,0===Ze&&at(Y));if(r!==i){for(o=[],a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q));a!==i;)o.push(a),a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q));93===t.charCodeAt(Me)?(a=l,Me++):(a=i,0===Ze&&at(Z)),a!==i?(He=e,e=r):(Me=e,e=i)}else Me=e,e=i;return e}(),a!==i){for(s=[],c=ct();c!==i;)s.push(c),c=ct();a=[a,s],o=a}else Me=o,o=i;r=o!==i?t.substring(r,Me):o;r!==i&&(He=e,p=r,r=$t.handleRawBit(p));var p;return e=r,e}(),a!==i?(He=e,e=a):(Me=e,e=i),e}function ct(){let e,t,r,o;if(e=Me,t=Vt(),t!==i?(r=Me,Ze++,o=ut(),Ze--,o===i?r=void 0:(Me=r,r=i),r!==i?(t=[t,r],e=t):(Me=e,e=i)):(Me=e,e=i),e===i)if(e=[],t=Et(),t!==i)for(;t!==i;)e.push(t),t=Et();else e=i;return e}function pt(){let e,r,o;var a,s,n;return e=Me,r=ut(),r!==i?(o=function(){let e,t,r;e=Me,t=[],r=ft(),r===i&&(r=xt(),r===i&&(r=Tt(),r===i&&(r=ht(),r===i&&(r=yt()))));for(;r!==i;)t.push(r),r=ft(),r===i&&(r=xt(),r===i&&(r=Tt(),r===i&&(r=ht(),r===i&&(r=yt()))));return He=e,t=function(e){return $t.handleBitContent(e)}(t),e=t,e}(),He=e,a=r,s=o,e=Ot.buildBit(a,s)):(Me=e,e=i),e===i&&(e=Me,r=Me,o=function(){let e,r;Ze++,e=[],t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re));for(;r!==i;)e.push(r),t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re));return Ze--,e}(),r=t.substring(r,Me),He=e,n=r,r=Ot.invalidBit(n),e=r),e}function ut(){let e,r,o,a,s,n;var p,u,d;return e=Me,91===t.charCodeAt(Me)?(r=c,Me++):(r=i,0===Ze&&at(X)),r!==i?(o=function(){let e,r,o;e=Me,r=[],46===t.charCodeAt(Me)?(o=K,Me++):(o=i,0===Ze&&at(Le));if(o!==i)for(;o!==i;)r.push(o),46===t.charCodeAt(Me)?(o=K,Me++):(o=i,0===Ze&&at(Le));else r=i;r!==i&&(He=e,r=r.length);return e=r,e}(),o!==i?(a=Pt(),s=function(){let e,t,r;e=Me,t=dt(),t===i&&(t=mt());t===i&&(t=null);r=dt(),r===i&&(r=mt());r===i&&(r=null);return He=e,e=function(e,t){return Ot.buildTextAndResourceType(e,t)}(t,r),e}(),93===t.charCodeAt(Me)?(n=l,Me++):(n=i,0===Ze&&at(Z)),n!==i?(He=e,p=o,u=a,d=s,e=Ot.buildBitHeader(u,p,d)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i),e}function dt(){let e,r,o;var a;return e=Me,58===t.charCodeAt(Me)?(r=p,Me++):(r=i,0===Ze&&at(ee)),r!==i?(o=Pt(),He=e,a=o,e=$t.handleTextFormat(a)):(Me=e,e=i),e}function mt(){let e,r,o;var a;return e=Me,38===t.charCodeAt(Me)?(r=u,Me++):(r=i,0===Ze&&at(te)),r!==i?(o=Pt(),He=e,a=o,e=$t.handleResourceType(a)):(Me=e,e=i),e}function ht(){let e,t,r,o,a;if(e=Me,t=Me,r=gt(),r!==i){for(o=[],a=bt();a!==i;)o.push(a),a=bt();r=[r,o],t=r}else Me=t,t=i;var s;return t!==i&&(He=e,s=t,t=$t.handleTagChain(s)),e=t,e}function bt(){let e,t;return e=Me,t=gt(),t!==i&&(He=e),e=t,e}function gt(){let e,r;var o;return e=Me,r=function(){let e,r,o,a;e=Me,t.substr(Me,4)===T?(r=T,Me+=4):(r=i,0===Ze&&at(be));r!==i?(o=It(),o!==i?(a=function(){let e;93===t.charCodeAt(Me)?(e=l,Me++):(e=i,0===Ze&&at(Z));return e}(),a!==i?(He=e,s=o,e=$t.handlePropertyTag("id",s)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=Me,t.substr(Me,2)===A?(r=A,Me+=2):(r=i,0===Ze&&at(ke));r!==i?(o=Bt(),o!==i?(a=It(),a!==i?(s=St(),s!==i?(He=e,n=o,l=a,e=$t.handlePropertyTag(n,l)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);var n,l;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=Me,91===t.charCodeAt(Me)?(r=c,Me++):(r=i,0===Ze&&at(X));if(r!==i){if(o=[],35===t.charCodeAt(Me)?(a=_,Me++):(a=i,0===Ze&&at(ge)),a!==i)for(;a!==i;)o.push(a),35===t.charCodeAt(Me)?(a=_,Me++):(a=i,0===Ze&&at(ge));else o=i;o!==i?(a=At(),s=St(),s!==i?(He=e,n=o,l=a,e=$t.handleTag(Si.Title,{level:n,title:l})):(Me=e,e=i)):(Me=e,e=i)}else Me=e,e=i;var n,l;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===C?(r=C,Me+=2):(r=i,0===Ze&&at(ye));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.Anchor,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===w?(r=w,Me+=2):(r=i,0===Ze&&at(fe));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.Reference,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===B?(r=B,Me+=2):(r=i,0===Ze&&at(xe));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.ItemLead,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===S?(r=S,Me+=2):(r=i,0===Ze&&at(ve));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.Instruction,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===P?(r=P,Me+=2):(r=i,0===Ze&&at(Te));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.Hint,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===N?(r=N,Me+=2):(r=i,0===Ze&&at(Ae));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.Gap,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===V?(r=V,Me+=2):(r=i,0===Ze&&at(Be));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.Mark,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===L?(r=L,Me+=2):(r=i,0===Ze&&at(we));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.SampleSolution,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===I?(r=I,Me+=2):(r=i,0===Ze&&at(_e));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.True,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a;e=Me,t.substr(Me,2)===E?(r=E,Me+=2):(r=i,0===Ze&&at(Ce));r!==i?(o=At(),a=St(),a!==i?(He=e,s=o,e=$t.handleTag(Si.False,s)):(Me=e,e=i)):(Me=e,e=i);var s;return e}(),r===i&&(r=function(){let e,r,o,a,s;e=Me,t.substr(Me,2)===R?(r=R,Me+=2):(r=i,0===Ze&&at(Se));r!==i?(o=Bt(),o!==i?(a=It(),a!==i?(s=St(),s!==i?(He=e,n=o,l=a,e=$t.handleResourceTag(n,l)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);var n,l;return e}()))))))))))))),r!==i&&(He=e,o=r,r=$t.handleBitTag(o)),e=r,e}function yt(){let e,r;return e=Me,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),r!==i&&(He=e,r={type:Si.BodyChar,value:r}),e=r,e}function ft(){let e;return e=function(){let e,t,r,o,a;e=Me,t=Me,r=Vt(),r!==i?(o=kt(),o!==i?(a=Rt(),a!==i?(r=[r,o,a],t=r):(Me=t,t=i)):(Me=t,t=i)):(Me=t,t=i);t!==i&&(He=e,s=t,t=$t.handleFooterDivider(s));var s;return e=t,e}(),e===i&&(e=function(){let e,r,o,a,s;e=Me,r=Me,o=Vt(),o!==i?(a=function(){let e,r,o,a,s,n;t.substr(Me,4)===d?(e=d,Me+=4):(e=i,0===Ze&&at(ie));if(e===i)if(e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe)),r!==i){if(o=[],a=Gt(),a!==i)for(;a!==i;)o.push(a),a=Gt();else o=i;if(o!==i)if(t.substr(Me,4)===h?(a=h,Me+=4):(a=i,0===Ze&&at(ae)),a!==i){if(s=[],n=Gt(),n!==i)for(;n!==i;)s.push(n),n=Gt();else s=i;s!==i?(t.substr(Me,4)===m?(n=m,Me+=4):(n=i,0===Ze&&at(oe)),n!==i?(r=[r,o,a,s,n],e=r):(Me=e,e=i)):(Me=e,e=i)}else Me=e,e=i;else Me=e,e=i}else Me=e,e=i;return e}(),a!==i?(s=Rt(),s!==i?(o=[o,a,s],r=o):(Me=r,r=i)):(Me=r,r=i)):(Me=r,r=i);r!==i&&(He=e,n=r,r=$t.handlePlainTextDivider(n));var n;return e=r,e}()),e}function kt(){let e,r,o,a,s,n;if(t.substr(Me,4)===b?(e=b,Me+=4):(e=i,0===Ze&&at(se)),e===i)if(e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe)),r!==i){if(o=[],a=Gt(),a!==i)for(;a!==i;)o.push(a),a=Gt();else o=i;if(o!==i)if(t.substr(Me,6)===g?(a=g,Me+=6):(a=i,0===Ze&&at(ne)),a!==i){if(s=[],n=Gt(),n!==i)for(;n!==i;)s.push(n),n=Gt();else s=i;s!==i?(t.substr(Me,4)===m?(n=m,Me+=4):(n=i,0===Ze&&at(oe)),n!==i?(r=[r,o,a,s,n],e=r):(Me=e,e=i)):(Me=e,e=i)}else Me=e,e=i;else Me=e,e=i}else Me=e,e=i;return e}function xt(){let e,r,o,a,s;if(e=Me,r=Me,o=function(){let e,r,o,a;e=Me,r=[],o=Rt(),o===i&&(o=Vt());if(o!==i)for(;o!==i;)r.push(o),o=Rt(),o===i&&(o=Vt());else r=i;r!==i?(o=Me,Ze++,a=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe));r!==i?(o=Me,32===t.charCodeAt(Me)?(a=y,Me++):(a=i,0===Ze&&at(le)),a!==i?(s=Ct(),s!==i?(32===t.charCodeAt(Me)?(n=y,Me++):(n=i,0===Ze&&at(le)),n!==i?(t.substr(Me,4)===m?(l=m,Me+=4):(l=i,0===Ze&&at(oe)),l!==i?(a=[a,s,n,l],o=a):(Me=o,o=i)):(Me=o,o=i)):(Me=o,o=i)):(Me=o,o=i),o===i&&(o=null),a=Rt(),a===i&&(a=Kt()),a!==i?(r=[r,o,a],e=r):(Me=e,e=i)):(Me=e,e=i);return e}(),Ze--,a!==i?(Me=o,o=void 0):o=i,o!==i?(He=e,e=void $t.handleCardSetStart()):(Me=e,e=i)):(Me=e,e=i);return e}(),o!==i){for(a=[],s=vt();s!==i;)a.push(s),s=vt();s=function(){let e,t,r,o,a;e=Me,t=Me,r=kt(),r===i&&(r=null);o=Me,Ze++,a=Kt(),Ze--,a!==i?(Me=o,o=void 0):o=i;o!==i?(r=[r,o],t=r):(Me=t,t=i);t!==i&&(He=e,t=void $t.handleCardSetEnd());return e=t,e}(),s!==i?(o=[o,a,s],r=o):(Me=r,r=i)}else Me=r,r=i;var n;return r!==i&&(He=e,n=r,r=$t.handleCardSet(n[1].flat())),e=r,e}function vt(){let e,r;var o;return e=Me,r=function(){let e,r;e=Me,r=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe));r!==i?(32===t.charCodeAt(Me)?(o=y,Me++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(Me)?(s=y,Me++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(Me,4)===m?(n=m,Me+=4):(n=i,0===Ze&&at(oe)),n!==i?(l=Rt(),l===i&&(l=Kt()),l!==i?(He=e,e=["====",a]):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);e===i&&(e=Me,t.substr(Me,4)===m?(r=m,Me+=4):(r=i,0===Ze&&at(oe)),r!==i?(o=Rt(),o===i&&(o=Kt()),o!==i?(He=e,e=["===="]):(Me=e,e=i)):(Me=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,2)===f?(r=f,Me+=2):(r=i,0===Ze&&at(ce));r!==i?(32===t.charCodeAt(Me)?(o=y,Me++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(Me)?(s=y,Me++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(Me,2)===f?(n=f,Me+=2):(n=i,0===Ze&&at(ce)),n!==i?(l=Rt(),l===i&&(l=Kt()),l!==i?(He=e,e=["--",a]):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);e===i&&(e=Me,t.substr(Me,2)===f?(r=f,Me+=2):(r=i,0===Ze&&at(ce)),r!==i?(o=Rt(),o===i&&(o=Kt()),o!==i?(He=e,e=["--"]):(Me=e,e=i)):(Me=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n,l;e=Me,t.substr(Me,2)===k?(r=k,Me+=2):(r=i,0===Ze&&at(pe));r!==i?(32===t.charCodeAt(Me)?(o=y,Me++):(o=i,0===Ze&&at(le)),o!==i?(a=Ct(),a!==i?(32===t.charCodeAt(Me)?(s=y,Me++):(s=i,0===Ze&&at(le)),s!==i?(t.substr(Me,2)===k?(n=k,Me+=2):(n=i,0===Ze&&at(pe)),n!==i?(l=Rt(),l===i&&(l=Kt()),l!==i?(He=e,e=["++",a]):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i)):(Me=e,e=i);e===i&&(e=Me,t.substr(Me,2)===k?(r=k,Me+=2):(r=i,0===Ze&&at(pe)),r!==i?(o=Rt(),o===i&&(o=Kt()),o!==i?(He=e,e=["++"]):(Me=e,e=i)):(Me=e,e=i));return e}(),r===i&&(r=function(){let e,r,o,a,s,n;e=Me,r=Me,Ze++,o=Me,a=kt(),a!==i?(s=Kt(),s!==i?(a=[a,s],o=a):(Me=o,o=i)):(Me=o,o=i);Ze--,o===i?r=void 0:(Me=r,r=i);if(r!==i){if(o=Me,a=Me,s=Lt(),n=Vt(),n!==i?(s=[s,n],a=s):(Me=a,a=i),a===i){if(a=Me,s=[],n=Et(),n!==i)for(;n!==i;)s.push(n),n=Et();else s=i;s!==i?(n=Ft(),n!==i?(s=[s,n],a=s):(Me=a,a=i)):(Me=a,a=i)}o=a!==i?t.substring(o,Me):a,o!==i?(He=e,l=o,e=$t.handleCardLine(l)):(Me=e,e=i)}else Me=e,e=i;var l;return e}())));r!==i&&(He=e,o=r,r=$t.handleCardLineOrDivider(o,2));var o;return e=r,e}(),r!==i&&(He=e,o=r,r=$t.handleCards(o)),e=r,e}function Tt(){let e,r,o,a,s;if(e=Me,r=Me,o=function(){let e,r,o,a,s,n;e=Me,r=[],o=Rt(),o===i&&(o=Vt());if(o!==i)for(;o!==i;)r.push(o),o=Rt(),o===i&&(o=Vt());else r=i;r!==i?(o=Me,Ze++,a=Me,t.substr(Me,3)===x?(s=x,Me+=3):(s=i,0===Ze&&at(ue)),s!==i?(n=Rt(),n!==i?(s=[s,n],a=s):(Me=a,a=i)):(Me=a,a=i),Ze--,a!==i?(Me=o,o=void 0):o=i,o!==i?(He=e,e=void $t.handleCardSetStart()):(Me=e,e=i)):(Me=e,e=i);return e}(),o!==i){for(a=[],s=_t();s!==i;)a.push(s),s=_t();s=function(){let e,t,r,o,a;e=Me,t=Me,r=kt(),r===i&&(r=null);o=Me,Ze++,a=Kt(),Ze--,a!==i?(Me=o,o=void 0):o=i;o!==i?(r=[r,o],t=r):(Me=t,t=i);t!==i&&(He=e,t=void $t.handleCardSetEnd());return e=t,e}(),s!==i?(o=[o,a,s],r=o):(Me=r,r=i)}else Me=r,r=i;var n;return r!==i&&(He=e,n=r,r=$t.handleCardSet(n[1].flat())),e=r,e}function _t(){let e,r;var o;return e=Me,r=function(){let e,r,o,a;e=Me,r=Me,t.substr(Me,3)===x?(o=x,Me+=3):(o=i,0===Ze&&at(ue));o!==i?(a=Rt(),a===i&&(a=Kt()),a!==i?(o=[o,a],r=o):(Me=r,r=i)):(Me=r,r=i);r===i&&(r=Me,t.substr(Me,2)===v?(o=v,Me+=2):(o=i,0===Ze&&at(de)),o!==i?(a=Rt(),a===i&&(a=Kt()),a!==i?(o=[o,a],r=o):(Me=r,r=i)):(Me=r,r=i),r===i&&(r=Me,t.substr(Me,2)===f?(o=f,Me+=2):(o=i,0===Ze&&at(ce)),o!==i?(a=Rt(),a===i&&(a=Kt()),a!==i?(o=[o,a],r=o):(Me=r,r=i)):(Me=r,r=i),r===i&&(r=function(){let e,r,o,a,s,n;e=Me,r=Me,Ze++,o=Me,a=kt(),a!==i?(s=Kt(),s!==i?(a=[a,s],o=a):(Me=o,o=i)):(Me=o,o=i);Ze--,o===i?r=void 0:(Me=r,r=i);if(r!==i){if(o=Me,a=Me,s=Lt(),n=Vt(),n!==i?(s=[s,n],a=s):(Me=a,a=i),a===i){if(a=Me,s=[],n=Et(),n!==i)for(;n!==i;)s.push(n),n=Et();else s=i;s!==i?(n=Ft(),n!==i?(s=[s,n],a=s):(Me=a,a=i)):(Me=a,a=i)}o=a!==i?t.substring(o,Me):a,o!==i?(He=e,l=o,e=$t.handleCardLine(l)):(Me=e,e=i)}else Me=e,e=i;var l;return e}())));r!==i&&(He=e,s=r,r=$t.handleCardLineOrDivider(s,1));var s;return e=r,e}(),r!==i&&(He=e,o=r,r=$t.handleCards(o)),e=r,e}function Ct(){let e,r,o;return e=Me,r=Me,Ze++,t.substr(Me,6)===g?(o=g,Me+=6):(o=i,0===Ze&&at(ne)),o===i&&(t.substr(Me,4)===h?(o=h,Me+=4):(o=i,0===Ze&&at(ae))),Ze--,o===i?r=void 0:(Me=r,r=i),r!==i?(o=function(){let e,r,o,a,s;e=Me,r=Me,o=t.charAt(Me),D.test(o)?Me++:(o=i,0===Ze&&at(me));if(o!==i){for(a=[],s=t.charAt(Me),z.test(s)?Me++:(s=i,0===Ze&&at(he));s!==i;)a.push(s),s=t.charAt(Me),z.test(s)?Me++:(s=i,0===Ze&&at(he));o=[o,a],r=o}else Me=r,r=i;e=r!==i?t.substring(e,Me):r;return e}(),o!==i?(He=e,e=o):(Me=e,e=i)):(Me=e,e=i),e}function wt(){let e,r;return e=Me,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),r!==i&&(He=e,r={type:Si.CardChar,value:r}),e=r,e}function At(){let e,r,o,a;for(e=Me,r=Me,o=[],t.substr(Me,2)===G?(a=G,Me+=2):(a=i,0===Ze&&at(Pe)),a===i&&(a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q)));a!==i;)o.push(a),t.substr(Me,2)===G?(a=G,Me+=2):(a=i,0===Ze&&at(Pe)),a===i&&(a=t.charAt(Me),J.test(a)?Me++:(a=i,0===Ze&&at(Q)));return r=t.substring(r,Me),He=e,e=r,e}function Bt(){let e,r,o,a,s;if(e=Me,r=Me,Ze++,t.substr(Me,3)===F?(o=F,Me+=3):(o=i,0===Ze&&at(Ie)),Ze--,o===i?r=void 0:(Me=r,r=i),r!==i){for(o=Me,a=[],s=t.charAt(Me),j.test(s)?Me++:(s=i,0===Ze&&at(Ee));s!==i;)a.push(s),s=t.charAt(Me),j.test(s)?Me++:(s=i,0===Ze&&at(Ee));o=t.substring(o,Me),He=e,e=(n=o)?n.trim():""}else Me=e,e=i;var n;return e}function St(){let e,r,o;if(93===t.charCodeAt(Me)?(e=l,Me++):(e=i,0===Ze&&at(Z)),e===i){for(e=Me,r=[],o=Gt();o!==i;)r.push(o),o=Gt();o=function(){let e,r;e=Me,Ze++,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re));Ze--,r===i?e=void 0:(Me=e,e=i);return e}(),o!==i?(r=[r,o],e=r):(Me=e,e=i)}return e}function Pt(){let e,r,o,a;for(e=Me,r=Me,o=[],a=t.charAt(Me),q.test(a)?Me++:(a=i,0===Ze&&at(Ne));a!==i;)o.push(a),a=t.charAt(Me),q.test(a)?Me++:(a=i,0===Ze&&at(Ne));var s;return r=t.substring(r,Me),He=e,r=(s=r)?s.trim():null,e=r,e}function It(){let e,r,o;var a;return e=Me,58===t.charCodeAt(Me)?(r=p,Me++):(r=i,0===Ze&&at(ee)),r!==i?(o=At(),He=e,e=(a=o)?a.trim():""):(Me=e,e=i),e===i&&(e=Me,r="",He=e,r=!0,e=r),e}function Et(){let e,r;return Ze++,e=t.charAt(Me),M.test(e)?Me++:(e=i,0===Ze&&at(Re)),Ze--,e===i&&(r=i,0===Ze&&at(Ve)),e}function Lt(){let e,t;for(Ze++,e=[],t=Et();t!==i;)e.push(t),t=Et();return Ze--,e}function Nt(){let e,r,o;for(Ze++,e=Me,r=[],o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));o!==i;)r.push(o),o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));return o=Vt(),o!==i?(r=[r,o],e=r):(Me=e,e=i),Ze--,e===i&&(r=i,0===Ze&&at(Ge)),e}function Vt(){let e,r;return Ze++,10===t.charCodeAt(Me)?(e=$,Me++):(e=i,0===Ze&&at($e)),e===i&&(t.substr(Me,2)===O?(e=O,Me+=2):(e=i,0===Ze&&at(Oe)),e===i&&(e=t.charAt(Me),U.test(e)?Me++:(e=i,0===Ze&&at(Je)))),Ze--,e===i&&(r=i,0===Ze&&at(Ke)),e}function Rt(){let e,r,o;for(Ze++,e=Me,r=[],o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));o!==i;)r.push(o),o=t.charAt(Me),H.test(o)?Me++:(o=i,0===Ze&&at(Fe));return o=Vt(),o!==i?(r=[r,o],e=r):(Me=e,e=i),Ze--,e===i&&(r=i,0===Ze&&at(De)),e}function Gt(){let e,r;return Ze++,e=t.charAt(Me),W.test(e)?Me++:(e=i,0===Ze&&at(je)),Ze--,e===i&&(r=i,0===Ze&&at(ze)),e}function Ft(){let e,r;return e=Vt(),e===i&&(e=Me,Ze++,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),Ze--,r===i?e=void 0:(Me=e,e=i)),e}function Kt(){let e,r;return e=Rt(),e===i&&(e=Me,Ze++,t.length>Me?(r=t.charAt(Me),Me++):(r=i,0===Ze&&at(re)),Ze--,r===i?e=void 0:(Me=e,e=i)),e}const $t=new Ni({parse:e,parserText:Xe,parserLocation:Jt}),Ot=new Lo({parse:e,parserText:Xe,parserLocation:Jt});function Jt(){const e=ot(He,Me);return e?(delete e.source,e):e}function ot(e,t,r){var i=it(e),a=it(t),s={source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:a.line,column:a.column}};return o&&"function"==typeof o.offset&&(s.start=o.offset(s.start),s.end=o.offset(s.end)),s}We=s();const Dt=We!==i&&Me===t.length;function zt(){throw We!==i&&Me<t.length&&at({type:"end"}),st(Qe,Ye<t.length?function(e=Me){const r=t.codePointAt(e);return void 0===r?"":String.fromCodePoint(r)}(Ye):null,Ye<t.length?ot(Ye,Ye+1):ot(Ye,Ye))}return r.peg$library?{peg$result:We,peg$currPos:Me,peg$FAILED:i,peg$maxFailExpected:Qe,peg$maxFailPos:Ye,peg$success:Dt,peg$throw:Dt?void 0:zt}:Dt?We:void zt()},Ro=class{constructor(){l(this,"jsonParser",new Ai)}toAst(e,t){return Vo(e)}},Go=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Fo={li:new Set(["li"]),td:new Set(["td","th"]),th:new Set(["td","th"]),tr:new Set(["td","th","tr"]),thead:new Set(["td","th","tr","thead","tbody","tfoot"]),tbody:new Set(["td","th","tr","thead","tbody","tfoot"]),tfoot:new Set(["td","th","tr","thead","tbody","tfoot"]),p:new Set(["p"]),option:new Set(["option"])},Ko=/<(\/)?([a-zA-Z][a-zA-Z0-9:-]*)((?:\s+(?:"[^"]*"|'[^']*'|[^<>"'])*)?)(\/)?>/g,$o=/([a-zA-Z_:][a-zA-Z0-9:._-]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;function Oo(e){const t={};if(!e)return t;let r;for($o.lastIndex=0;null!==(r=$o.exec(e));){const e=r[1].toLowerCase();let i=r[2]??"";i.length>=2&&('"'===i[0]||"'"===i[0])&&(i=i.slice(1,-1)),t[e]=i}return t}function Jo(e){const t={type:"element",name:"#root",attrs:{},children:[]},r=[t],i=()=>r[r.length-1];for(const t of function(e){const t=[],r=function(e){return e.replace(/<!--[\s\S]*?-->/g,"").replace(/<!\[CDATA\[[\s\S]*?\]\]>/g,"").replace(/<!doctype[^>]*>/gi,"").replace(/<script\b[\s\S]*?<\/script>/gi,"").replace(/<style\b[\s\S]*?<\/style>/gi,"")}(e);Ko.lastIndex=0;let i,o=0;for(;null!==(i=Ko.exec(r));){i.index>o&&t.push({kind:"text",text:r.slice(o,i.index)}),o=Ko.lastIndex;const e="/"===i[1],a=i[2].toLowerCase();e?t.push({kind:"close",name:a}):t.push({kind:"open",name:a,attrs:Oo(i[3]),selfClose:"/"===i[4]})}return o<r.length&&t.push({kind:"text",text:r.slice(o)}),t}(e))if("text"!==t.kind){if("open"===t.kind){const e=t.name,o=Fo[e];if(o)for(;r.length>1&&o.has(i().name);)r.pop();const a={type:"element",name:e,attrs:t.attrs??{},children:[]};i().children.push(a),t.selfClose||Go.has(e)||r.push(a);continue}for(let e=r.length-1;e>0;e--)if(r[e].name===t.name){r.length=e;break}}else t.text&&i().children.push({type:"text",value:t.text});return t.children}function Do(e,t){return e.children.filter(e=>"element"===e.type&&t.has(e.name))}var zo={b:"bold",strong:"bold",i:"italic",em:"italic",sup:"superscript",sub:"subscript",s:"strike",strike:"strike",del:"del",ins:"ins",u:"underline",mark:"highlight",code:"code"},jo=new Set(["thead","tbody","tfoot"]),qo=new Set(["tr"]),Mo=new Set(["td","th"]),Ho=new Set(["li"]),Uo=new Set(["row","col","rowgroup","colgroup"]),Wo={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};function Yo(e){return e.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g,(e,t)=>{if("#"===t[0]){const r="x"===t[1]||"X"===t[1]?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);if(Number.isFinite(r)&&r>=0&&r<=1114111)try{return String.fromCodePoint(r)}catch{return e}return e}return Wo[t]??e})}function Qo(e){if(null==e)return;const t=Number.parseInt(e,10);return Number.isInteger(t)?t:void 0}function Zo(e){return"element"===e.type}var Xo=class{constructor(){l(this,"keepUnknownTags",!1)}parse(e,t){this.keepUnknownTags=t?.keepUnknownTags??!1;const r=t?.tableFormat??"table-extended",i=t?.onWarning,o=this.collectTopLevelTables(Jo(e)),a=[];for(const e of o){const t=this.tableToBit(e,r,i);t&&a.push(t)}return a}collectTopLevelTables(e){const t=[],r=e=>{Zo(e)&&("table"!==e.name?e.children.forEach(r):t.push(e))};return e.forEach(r),t}tableToBit(e,t,r){const i=[],o=[],a=[];let s;for(const t of e.children)if(Zo(t))if("caption"===t.name){const e=this.inlineNodes(t.children,[]),r=this.trimInline(e);r.length>0&&(s=r)}else if(jo.has(t.name)){const e="thead"===t.name?i:"tfoot"===t.name?a:o;for(const r of Do(t,qo))e.push(this.rowToCells(r))}else qo.has(t.name)&&o.push(this.rowToCells(t));if(0===i.length&&0===o.length&&0===a.length)return;const n={};i.length>0&&(n.header={rows:i}),o.length>0&&(n.body={rows:o}),a.length>0&&(n.footer={rows:a});let l=n;"table"===t&&(this.isLossyAsBasic(n)&&r?.("Converting an HTML table to [.table] loses rowspan/colspan/scope and multi-section structure; use --tableFormat table-extended to preserve them."),l=At(n));const c={type:t,format:"bitmark++",table:l};return s&&(c.caption=s),c}rowToCells(e){const t=[];for(const r of Do(e,Mo))t.push(this.cellToJson(r));return{cells:t}}cellToJson(e){const t={content:this.blockNodes(e.children)};"th"===e.name&&(t.title=!0);const r=Qo(e.attrs.rowspan);null!=r&&r>=2&&(t.rowspan=r);const i=Qo(e.attrs.colspan);null!=i&&i>=2&&(t.colspan=i);const o=e.attrs.scope?.toLowerCase();o&&Uo.has(o)&&(t.scope=o);const a=this.widthFromCell(e);return null!=a&&(t.colwidth=a),t}widthFromCell(e){const t=Qo(e.attrs.width);if(null!=t&&t>0)return t;const r=e.attrs.style;if(r){const e=r.match(/width\s*:\s*(\d+)\s*px/i);if(e){const t=Number.parseInt(e[1],10);if(Number.isInteger(t)&&t>0)return t}}}isLossyAsBasic(e){if(e.footer)return!0;if(e.header&&e.header.rows.length>1)return!0;const t=[e.header,e.body,e.footer];for(const e of t)if(e)for(const t of e.rows)for(const e of t.cells)if(e.rowspan||e.colspan||e.scope)return!0;return!1}blockNodes(e){const t=[];let r=[];const i=()=>{const e=this.trimInline(r);r=[],0!==e.length&&(1===e.length&&"imageInline"===e[0].type?t.push({...e[0],type:"image"}):t.push({type:"paragraph",content:e,attrs:{}}))};for(const o of e){if(!Zo(o)){r.push(...this.inlineText(o.value,[]));continue}const e=o.name;if("p"===e){i();const e=this.trimInline(this.inlineNodes(o.children,[]));e.length>0&&t.push({type:"paragraph",content:e,attrs:{}})}else if(this.isListTag(e)){i();const e=this.listNode(o);e&&t.push(e)}else r.push(...this.inlineFromElement(o,[]))}return i(),t}inlineNodes(e,t){const r=[];for(const i of e)Zo(i)?r.push(...this.inlineFromElement(i,t)):r.push(...this.inlineText(i.value,t));return r}inlineFromElement(e,t){const r=e.name;if("br"===r)return[{type:"hardBreak"}];if("img"===r)return[this.imageNode(e,!0)];if(this.isMathTag(r))return[this.latexNode(e)];const i=zo[r];if(i)return this.inlineNodes(e.children,[...t,{type:i}]);if("a"===r){const r={type:"link",attrs:{href:e.attrs.href??"",...e.attrs.target?{target:e.attrs.target}:{}}};return this.inlineNodes(e.children,[...t,r])}if(this.keepUnknownTags){const i=this.serializeOpenTag(e),o=`</${r}>`;return[...this.inlineText(i,t),...this.inlineNodes(e.children,t),...this.inlineText(o,t)]}return this.inlineNodes(e.children,t)}inlineText(e,t){const r=Yo(e).replace(/\s+/g," ");if(""===r)return[];const i={text:r,type:"text"};return t.length>0&&(i.marks=t.map(e=>({...e}))),[i]}serializeOpenTag(e){const t=Object.entries(e.attrs).map(([e,t])=>""===t?` ${e}`:` ${e}="${t}"`).join("");return`<${e.name}${t}>`}isListTag(e){return"ul"===e||"ol"===e}listNode(e){const t=Do(e,Ho);if(0===t.length)return;if("ul"===e.name&&t.some(e=>{const t=e.children.find(Zo);return"input"===t?.name&&"checkbox"===t.attrs.type?.toLowerCase()}))return{type:"taskList",content:t.map(e=>this.taskItemNode(e))};const r={type:this.listType(e),content:t.map(e=>this.listItemNode(e))};if("ol"===e.name){const t=Qo(e.attrs.start);null!=t&&(r.attrs={start:t})}return r}listType(e){if("ol"===e.name)switch(e.attrs.type){case"i":return"orderedListRomanLower";case"I":return"orderedListRoman";case"a":return"letteredListLower";case"A":return"letteredList";default:return"orderedList"}const t=e.attrs.style??"";return/list-style(-type)?\s*:\s*none/i.test(t)?"noBulletList":"bulletList"}listItemNode(e){let t=this.blockNodes(e.children);return 0===t.length&&(t=[{type:"paragraph",content:[],attrs:{}}]),{type:"listItem",content:t}}taskItemNode(e){const t=e.children.find(e=>Zo(e)&&"input"===e.name&&"checkbox"===e.attrs.type?.toLowerCase()),r=!!t&&"checked"in t.attrs,i=e.children.filter(e=>e!==t);let o=this.blockNodes(i);return 0===o.length&&(o=[{type:"paragraph",content:[],attrs:{}}]),{type:"taskItem",attrs:{checked:r},content:o}}imageNode(e,t){const r={src:e.attrs.src??""};r.alt=e.attrs.alt??null,r.title=e.attrs.title??null;const i=Qo(e.attrs.width);null!=i&&(r.width=i);const o=Qo(e.attrs.height);return null!=o&&(r.height=o),e.attrs.class&&(r.class=e.attrs.class),{type:t?"imageInline":"image",attrs:r}}isMathTag(e){return"math"===this.localName(e)}latexNode(e){return{type:"latex",attrs:{formula:this.latexFromMath(e)}}}latexFromMath(e){const t=e.attrs.alttext??e.attrs.alt??e.attrs.title;if(null!=t)return Yo(t);const r=this.findLatexAnnotation(e);return r?this.textContent(r).trim():this.textContent(e).trim()}findLatexAnnotation(e){for(const t of e.children){if(!Zo(t))continue;const e=(t.attrs.encoding??"").toLowerCase();if("annotation"===this.localName(t.name)&&(/\btex\b/.test(e)||/\blatex\b/.test(e)))return t;const r=this.findLatexAnnotation(t);if(r)return r}}textContent(e){return e.children.map(e=>Zo(e)?this.textContent(e):Yo(e.value)).join("").replace(/\s+/g," ")}localName(e){return e.includes(":")?e.slice(e.indexOf(":")+1):e}trimInline(e){const t=e.slice(),r=e=>"text"===e.type&&/^\s*$/.test(e.text??"");for(;t.length>0&&r(t[0]);)t.shift();for(t.length>0&&"text"===t[0].type&&(t[0]={...t[0],text:(t[0].text??"").replace(/^\s+/,"")});t.length>0&&r(t[t.length-1]);)t.pop();if(t.length>0&&"text"===t[t.length-1].type){const e=t.length-1;t[e]={...t[e],text:(t[e].text??"").replace(/\s+$/,"")}}return t.filter(e=>!("text"===e.type&&""===e.text))}},ea={string:"string",file:"file"},ta={bitmark:"bitmark",json:"json",ast:"ast",text:"text"},ra={bitmark:"bitmark",bitmarkText:"bitmarkText",plainText:"plainText",html:"html"},ia=class{constructor(){l(this,"ast",new et),l(this,"jsonParser",new Ai),l(this,"bitmarkParser",new Ro),l(this,"textParser",new Wr),l(this,"textGenerator",new Jr),l(this,"jsonStringifyPrettify",(e,t,r)=>{const i=!0===t.prettify?2:t.prettify||void 0;return r||!0===t.stringify||void 0!==i?JSON.stringify(e,null,i):e})}version(){return qe.appVersion.full}info(e){const t=Object.assign({},e),r=new xi;let i;const o=!t.outputFormat||t.outputFormat===Ti.text,a=t.outputFormat===Ti.json,s=t.type===_i.all,n=t.type===_i.deprecated,l=s||!n,c=s||n;if(t.type===_i.bitGroups){const e=r.getBitGroups();i=o?e.map(e=>`${e.key}${e.subgroupOf?` (subgroup of: ${e.subgroupOf})`:""}\n ${e.bitTypes.join(", ")}`).join("\n"):e}else if(t.type===_i.resourceGroups){const e=r.getResourceGroups();i=o?e.map(e=>`${e.key}\n ${e.resourceTypes.join(", ")}`).join("\n"):e}else if(t.type===_i.bit){const e=r.getSupportedBitConfigs().filter(e=>{if(!t.bit)return!0;return Le.getBitType(t.bit)===e.bitType});i=o?e.map(e=>e.toString({includeChains:!0,includeConfigs:!0})).join("\n\n--------------\n\n"):e}else{const e=r.getSupportedBits({includeNonDeprecated:l,includeDeprecated:c}).filter(e=>{if(!t.bit)return!0;const r=Le.getBitType(t.bit);return e.name===r||void 0});i=o?this.supportedBitsAsString(e):e}if(a){const e=!0===t.prettify?2:t.prettify||void 0;i=JSON.stringify(i,null,e)}return i}registerTranslations(e){Le.registerTranslations(e)}getBitGroups(e){return(new xi).getBitGroups(e)}getResourceGroups(e){return(new xi).getResourceGroups(e)}getBitTypesForBitGroups(e,t){return Le.getBitTypesForBitGroups(e,t)}getBitGroupsForBitTypes(e,t){return(new xi).getBitGroupsForBitTypes(e,t)}getResourceTypesForResourceGroups(e){return Le.getResourceTypesForResourceGroups(e)}getResourceGroupsForResourceTypes(e){return Le.getResourceGroupsForResourceTypes(e)}getBitTitle(e,t){return Le.getBitTitle(e,t)}getBitGroupTitle(e,t){return Le.getBitGroupTitle(e,t)}getResourceGroupTitle(e,t){return Le.getResourceGroupTitle(e,t)}generateConfig(e){const t=Object.assign({},e);(new ConfigBuilder).build(t)}convert(e,t){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.outputFormat,s=a===ta.bitmark,n=a===ta.json,l=a===ta.ast,c=a===ta.text,p=vi.peggy;let u=e;const d="string"==typeof e;if(qe.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==ea.file||qe.isNode&&d&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));let m=this.ast.preprocessAst(u);const h=!!m;h||(m=this.jsonParser.toAst(u));const b=!!m?.bits,g=e=>{r=this.bitmarkParser.toAst(e,{parserType:p})},y=e=>{if(p===vi.peggy)if(m=this.bitmarkParser.toAst(e,{parserType:p}),i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(m)}else{const e=new fi(i).generateSync(m);r=this.jsonStringifyPrettify(e,o)}},f=e=>{m=this.bitmarkParser.toAst(e,{parserType:p});const t=new fi(i).generateSync(m),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o},k=e=>{if(i.outputFile){new BitmarkFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new di(i);r=t.generateSync(e)}},x=e=>{r=this.jsonStringifyPrettify(e,o)},v=e=>{if(i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new fi(i).generateSync(e);r=this.jsonStringifyPrettify(t,o)}},T=e=>{r=this.jsonStringifyPrettify(e,o)};return d&&!b&&!h?s?(g(u),k(r)):l?g(u):c?f(u):y(u):h?l?x(m):n?v(m):c?(e=>{const t=new fi(i).generateSync(e),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o})(m):k(m):b?n?v(m):l?T(m):c?(e=>{const t=new fi(i).generateSync(e),o=(new PlainTextGenerator).generate(t);i.outputFile?fs.writeFileSync(i.outputFile,o,{encoding:"utf8"}):r=o})(m):(e=>{if(i.outputFile)new BitmarkFileGenerator(i.outputFile,i).generateSync(e);else{const t=new di(i);r=t.generateSync(e)}})(m):r="",r}upgrade(e,t){let r;const i=Object.assign({},t),o=Object.assign({},i.jsonOptions),a=i.bitmarkParserType;let s=e;const n="string"==typeof e;if(qe.isBrowser&&i.outputFile)throw new Error("Cannot write to file in browser environment");i.inputFormat&&i.inputFormat!==ea.file||qe.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const c=!!l?.bits,p=e=>{if(i.outputFile){new JsonFileGenerator(i.outputFile,i).generateSync(e)}else{const t=new fi(i).generateSync(e);r=this.jsonStringifyPrettify(t,o)}};if(n&&!c)(e=>{const t=this.bitmarkParser.toAst(e,{parserType:a});if(i.outputFile){new BitmarkFileGenerator(i.outputFile,i).generateSync(t)}else{const e=new di(i);r=e.generateSync(t)}})(s);else{if(!c)return;p(l)}return r}createAst(e,t){let r,i=e;const o="string"==typeof e,a=Object.assign({},t);a.inputFormat&&a.inputFormat!==ea.file||qe.isNode&&o&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let s=this.ast.preprocessAst(i);const n=!!s;n||(s=this.jsonParser.toAst(i));const l=!!s?.bits;return r=o&&!l&&!n?this.bitmarkParser.toAst(i):l?s:{},r}convertText(e,t){let r,i;const o=Object.assign({},t),a=Object.assign({},o.fileOptions),s=Object.assign({},o.jsonOptions),n=(0,ni.Enum)(TextFormat).fromValue(o.textFormat)??TextFormat.bitmarkText,l=o.textLocation??TextLocation.body;let c=e;const p="string"==typeof e;if(qe.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==ea.file||qe.isNode&&p&&fs.existsSync(c)&&(c=fs.readFileSync(c,{encoding:"utf8"}));const u=this.textParser.preprocessAst(c),d=!!u;if(i=d?this.textGenerator.generateSync(u,n,l):this.textParser.toAst(c,{format:n,location:TextLocation.body}),o.outputFile){const e=o.outputFile.toString();let t=i;d||(t=this.jsonStringifyPrettify(i,s,!0));const r=a.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,t,{flag:r})}else r=d?i:this.jsonStringifyPrettify(i,s);return r}extractPlainText(e,t){const r=e,i=t?.inputFormat,o="string"==typeof e;let a;const s=()=>{let e=r;if("string"==typeof r)try{e=JSON.parse(r)}catch(t){let i=!1;const o=this.convert(r,{outputFormat:ta.json});if(o.length>0){o[0].bit.type===BitType._error||(i=!0,e=o)}i||(e=this.convertText(r,{textFormat:TextFormat.bitmarkText}))}return e};i===ra.bitmark?a=this.convert(r,{outputFormat:ta.json}):i===ra.bitmarkText?a=this.convertText(r,{textFormat:TextFormat.bitmarkText}):i===ra.plainText?o&&(a=String(e)):a=s();return(new PlainTextGenerator).generate(a)}convertHtmlTable(e,t){const r=Object.assign({},t);if(qe.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");let i=e;const o="string"==typeof e;qe.isNode&&o&&fs.existsSync(i)&&(i=fs.readFileSync(i,{encoding:"utf8"}));let a;if(a=r.inputFormat===ra.html||null==r.inputFormat&&(o&&(e=>{const t=e.replace(/^\s+/,"");return t.startsWith("<")&&/<table/i.test(t)})(i)),a){const e=(new Xo).parse(i,{tableFormat:r.tableFormat??"table-extended",keepUnknownTags:r.keepUnknownTags,onWarning:e=>console.warn(e)}),t=r.outputFormat??ta.bitmark;if("html"===t){const t=this.convert(e,{outputFormat:ta.json});return this.outputHtml((new hi).generate(t),r)}return this.convert(e,{outputFormat:(0,ni.Enum)(ta).fromValue(t),outputFile:r.outputFile,fileOptions:r.fileOptions,jsonOptions:r.jsonOptions,bitmarkOptions:{...r.bitmarkOptions,...r.noBreakscaping?{noBreakscaping:!0}:{}}})}if("html"!==(r.outputFormat??"html"))throw new Error("convertHtmlTable: non-HTML input can only be converted to HTML. Use convert() for bitmark/JSON/AST conversions.");const s=this.convert(o?i:e,{outputFormat:ta.json});return this.outputHtml((new hi).generate(s),r)}outputHtml(e,t){if(t.outputFile){const r=t.outputFile.toString(),i=t.fileOptions?.append?"a":"w";return fs.ensureDirSync(path.dirname(r)),void fs.writeFileSync(r,e,{flag:i})}return e}breakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions),o=(0,ni.Enum)(TextFormat).fromValue(r.textFormat)??TextFormat.bitmarkText,a=r.textLocation??TextLocation.body;let s=e;const n="string"==typeof e;if(qe.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==ea.file||qe.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));const l=Breakscape.breakscape(s,{format:o,location:a});if(!r.outputFile)return l;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,l,{flag:t})}}unbreakscapeText(e,t){if(!e)return e;const r=Object.assign({},t),i=Object.assign({},r.fileOptions),o=(0,ni.Enum)(TextFormat).fromValue(r.textFormat)??TextFormat.bitmarkText,a=r.textLocation??TextLocation.body;let s=e;const n="string"==typeof e;if(qe.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==ea.file||qe.isNode&&n&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));const l=Breakscape.unbreakscape(s,{format:o,location:a});if(!r.outputFile)return l;{const e=r.outputFile.toString(),t=i.append?"a":"w";fs.ensureDirSync(path.dirname(e)),fs.writeFileSync(e,l,{flag:t})}}textAstToPlainText(e,t){return new Jr(It.v3,{}).generateSync(e,TextFormat.bitmarkText,TextLocation.body,{noBreakscaping:!0,noMarkup:!0})}supportedBitsAsString(e){let t="";for(const r of e)t+=`${r.name} (since: ${r.since}`,r.deprecated&&(t+=`, deprecated: ${r.deprecated}`),t+=")",r.bitGroups&&(t+=` [${r.bitGroups.join(", ")}]`),t+="\n";return t}},oa=class{constructor(e){l(this,"generator"),l(this,"writer"),this.writer=new si,this.generator=new yi(this.writer,e)}async generate(e){return await this.generator.generate(e),this.writer.getString()}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}};function aa(e){return Array.isArray(e)&&4===e.length&&e.every(Number.isFinite)?[e[0],e[1],e[2],e[3]]:null}function sa(e){if(null==e)return[];if(!Array.isArray(e)||0===e.length)return[];const t=e.some(Array.isArray)?e:[e],r=[];for(const e of t){const t=aa(e);t&&r.push(t)}return r}function na(e,t){return e[0]<t[2]&&e[2]>t[0]&&e[1]<t[3]&&e[3]>t[1]}var la=class e{constructor(e){l(this,"_entries"),l(this,"bitmarkParser",new ia),this._entries=e}static fromBits(t,r){const i=r?.sourceRL,o=[];for(const e of t){if(!e?.bit)continue;if(void 0!==i&&e.bit.sourceRL!==i)continue;const t=sa(e.bit.sourceBB);0!==t.length&&o.push({bit:e.bit,wrapper:e,boxes:t})}return new e(o)}get entries(){return this._entries}intersecting(e){const t=[];for(const r of this._entries)r.boxes.some(t=>na(e,t))&&t.push(r);return t}intersectingBoxes(e){const t=[];for(const r of this._entries)for(const i of r.boxes)na(e,i)&&t.push(i);return t}enclosingBoundingBox(e){return function(e){if(0===e.length)return null;let[t,r,i,o]=e[0];for(let a=1;a<e.length;a++){const s=e[a];s[0]<t&&(t=s[0]),s[1]<r&&(r=s[1]),s[2]>i&&(i=s[2]),s[3]>o&&(o=s[3])}return[t,r,i,o]}(this.intersectingBoxes(e))}toBitmark(e){if(0===e.length)return"";const t=e.map(e=>e.wrapper);return this.bitmarkParser.convert(t,{outputFormat:ta.bitmark,bitmarkOptions:{prettifyJson:!0}})}};Ue()},722(e){var t,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(s,{Enum:()=>l}),e.exports=(t=s,((e,t,s,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))a.call(e,l)||l===s||r(e,l,{get:()=>t[l],enumerable:!(n=i(t,l))||n.enumerable});return e})(r({},"__esModule",{value:!0}),t));var n=new WeakMap;function l(e){let t=n.get(e);const r=e;if(!t){const i=[];for(const t in e){const e=Number(t);!isNaN(e)&&r[r[e]]===e||i.push(t)}const o={_keys:i,_valueKeyMap:new Map};for(const e of o._keys){const t=r[e];o._valueKeyMap.set(t,e)}n.set(e,o),t=o}function i(){const e=new Map;for(const i of t._keys){const t=r[i];e.set(i,t)}return t._keyValueMap=e,e}function o(){const e=new Map;for(const i of t._keys){const t=r[i],o="string"==typeof t?t.toLowerCase():t;e.set(o,i)}return t._lcValueKeyMap=e,e}function a(){const e=new Map;return t._valueLabelMap=e,e}function s(e,r){if(r?.ignoreCase&&"string"==typeof e){const r=t._keyValueMap??i(),a=(t._lcValueKeyMap??o()).get(e.toLowerCase());if(!a)return;return r.get(a)}if(t._valueKeyMap.has(e))return e}function l(e,o){const a=t._keyValueMap??i();if(o?.ignoreCase&&"string"==typeof e){const i=t._lcKeyValueMap??function(){const e=new Map;for(const i of t._keys){const t=r[i];e.set(i.toLowerCase(),t)}return t._lcKeyValueMap=e,e}();return i.get(e.toLowerCase())}return a.get(`${e}`)}function c(){return t._values??function(){const e=t._keyValueMap??i();return t._values=t._keys.map(t=>e.get(t)),t._values}()}function p(){return t._entries??function(){const e=t._keyValueMap??i();return t._entries=t._keys.map(t=>[t,e.get(t)]),t._entries}()}return{fromValue:s,fromKey:l,keyFromValue:function(e,r){if(r?.ignoreCase&&"string"==typeof e){return(t._lcValueKeyMap??o()).get(e.toLowerCase())}return t._valueKeyMap.get(e)},hasKey:function(e,t){return null!=l(e,t)},hasValue:function(e,t){return null!=s(e,t)},keys:()=>t._keys,values:()=>c(),entries:()=>p(),[Symbol.iterator]:function*(){for(const e of c())yield e},setAllLabels:function(e){const r=t._valueLabelMap??a();for(const[t,i]of Object.entries(e)){const e=s(t);null!=e&&r.set(e,i)}},setLabels:function(e,r){(t._valueLabelMap??a()).set(e,r)},getLabels:function(e){return(t._valueLabelMap??a()).get(e)??{}},getLabel:function(e,r){const i=(t._valueLabelMap??a()).get(e)??{};if(!r)for(const t of Object.values(i))return t??`${e}`;return i[r]??`${e}`}}}l.fromArray=e=>{let t=e;Array.isArray(t)||(t=[]);return t.reduce((e,t)=>(e[t]=t,e),{})}}};const t={};let r=function r(i){const o=t[i];if(void 0!==o)return o.exports;const a=t[i]={exports:{}};return e[i](a,a.exports,r),a.exports}(922);return r})());
|