@cerefox/memory 1.22.1 → 1.22.2
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/bin/cerefox.js +3984 -1652
- package/dist/frontend/assets/Courier-tKiTGlNQ.js +2 -0
- package/dist/frontend/assets/Courier-tKiTGlNQ.js.map +1 -0
- package/dist/frontend/assets/docx-CjhuGfqI.js +11 -0
- package/dist/frontend/assets/docx-CjhuGfqI.js.map +1 -0
- package/dist/frontend/assets/{index-nwj65c23.js → index-BI4vv_74.js} +10 -10
- package/dist/frontend/assets/index-BI4vv_74.js.map +1 -0
- package/dist/frontend/assets/{markdown-C3Pl9aLl.js → markdown-D6ZljOkv.js} +2 -2
- package/dist/frontend/assets/{markdown-C3Pl9aLl.js.map → markdown-D6ZljOkv.js.map} +1 -1
- package/dist/frontend/assets/{pdf-nplQ05zY.js → pdf-C3krYx-2.js} +4 -4
- package/dist/frontend/assets/{pdf-nplQ05zY.js.map → pdf-C3krYx-2.js.map} +1 -1
- package/dist/frontend/assets/pdfmake-DHl2b3Ex.js +163 -0
- package/dist/frontend/assets/pdfmake-DHl2b3Ex.js.map +1 -0
- package/dist/frontend/assets/{rolldown-runtime-COiEfhsA.js → rolldown-runtime-XKyaHtl9.js} +1 -1
- package/dist/frontend/assets/{vfs_fonts-D9BViC6C.js → vfs_fonts-BjQxQix9.js} +2 -2
- package/dist/frontend/assets/{vfs_fonts-D9BViC6C.js.map → vfs_fonts-BjQxQix9.js.map} +1 -1
- package/dist/frontend/index.html +2 -2
- package/dist/server-assets/_shared/ef-meta/index.ts +2 -2
- package/package.json +5 -5
- package/dist/frontend/assets/Courier-BRJ-B_ND.js +0 -1370
- package/dist/frontend/assets/Courier-BRJ-B_ND.js.map +0 -1
- package/dist/frontend/assets/docx-BvP4Jo4k.js +0 -29
- package/dist/frontend/assets/docx-BvP4Jo4k.js.map +0 -1
- package/dist/frontend/assets/index-nwj65c23.js.map +0 -1
- package/dist/frontend/assets/pdfmake-L7DGtDcB.js +0 -229
- package/dist/frontend/assets/pdfmake-L7DGtDcB.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docx-CjhuGfqI.js","names":["Numbering","Document","__commonJSMin","mod","cb","_typeof","o","toPrimitive","t","e","r","toPropertyKey","i","_defineProperty","BaseXmlComponent","rootKey","isXmlComponent","value","elementOf","EMPTY_OBJECT","XmlComponent","context","children","comp","parts","part","child","IgnoreIfEmptyXmlComponent","includeIfEmpty","result","ownKeys","_objectSpread2","XmlAttributeComponent","root","attrs","key","newKey","NextAttributeComponent","acc","Attributes","_args","_objectWithoutPropertiesLoose","n","_objectWithoutProperties","s","_excluded$4","PREDEFINED_ENTITIES","ENTITY_REFERENCE","decodeEntities","raw","reference","predefined","name","codePoint","isWhitespace","char","DECLARATION_ATTRIBUTE","parseDeclarationAttributes","body","doubleQuoted","singleQuoted","parseXml","document","open","position","text","append","parent","node","appendText","keepWhitespaceText","indexOfOrThrow","index","search","from","what","tagStart","end","content","nameEnd","attributes","comment","cdata","quote","inSubset","element","parseStartTag","selfClosing","rest","elements","onElement","equals","attributeName","valueStart","valueEnd","existing","ESCAPES","escapeAll","escapeText","escapeValue","resolve","data","values","addAttributes","attr","isStringContent","indent","depth","format","indents","length","isLast","stringifyXmlable","items","input","startDepth","standalone","declaration","item","stringifyAttributes","stringifyNode","stringifyElement","convertToXmlComponent","xmlComponent","ImportedXmlComponent","childElements","childElm","ImportedXmlComponentAttributes","importedContent","_attr","ImportedRootElementAttributes","InitializableXmlComponent","initComponent","decimalNumber","val","unsignedDecimalNumber","hexBinary","expectedLength","uCharHexNumber","universalMeasureValue","unit","amount","TWIPS_PER_UNIT","universalMeasureToTwips","twipsPerUnit","positiveUniversalMeasureValue","hexColorValue","signedTwipsMeasureValue","hpsMeasureValue","twipsMeasureValue","percentageValue","percent","measurementOrPercentValue","eighthPointMeasureValue","pointMeasureValue","dateTimeValue","OnOffElement","HpsMeasureElement","EmptyElement","StringValueElement","createStringElement","BuilderElement","NumberValueElement","StringContainer","AlignmentType","createAlignment","type","COLOR_OOXML_NAMES","OFFICE_COLORS","OFFICE_SYSTEM_COLORS","rgbColorValue","color","themeColorValues","colors","office","createRgbColor","createColor","system","createColorScheme","THEME_COLOR_NAMES","THEME_COLOR_SUGGESTIONS","changeValue","option","themeColorChange","theme","suggestion","lighter","darker","tint","shade","toHsl","red","green","blue","hex","max","min","lightness","range","toHex","chroma","saturation","second","hue","lowest","applyChange","hsl","hexByte","checkColor","colorValues","checked","OFFICE_THEME_COLORS","ColorAttributeComponent","attribute","_context$file","themeColors","entries","keys","ColorElement","createColorElement","COLOR_ATTRIBUTES","createBorderElement","elementName","style","size","space","BorderStyle","Border","options","ThematicBreak","bottom","createIndent","start","left","right","hanging","firstLine","firstLineChars","createBreak","FieldCharacterType","createFieldChar","dirty","locked","createBegin","dirtyWithoutPageNumbers","BeginDirtyWithoutPageNumbers","xml","createBeginDirtyWithoutPageNumbers","isDirtyWithoutPageNumbers","createSeparate","createEnd","SpaceType","TextAttributes","Page","NumberOfPages","NumberOfPagesSection","CurrentSection","createShading","fill","ShadingType","ChangeAttributes","DeletionTrackChange","InsertionTrackChange","createEastAsianLayout","group","twoLinesInOne","brackets","horizontalInVertical","fitToLine","EmphasisMarkType","createEmphasisMark","emphasisMarkType","urlAlphabet","customAlphabet","defaultSize","id","alphabet","nanoid","paddedWords","words","bytesOfWords","bytes","rotateRight","word","bits","SHA256_ROUND_CONSTANTS","SHA256_INITIAL_HASH","sha256Schedule","sha256","schedule","h0","h1","h2","h3","h4","h5","h6","h7","block","early","late","a","b","c","d","f","g","h","first","convertInchesToTwip","inches","uniqueNumericIdCreator","currentCount","initial","abstractNumUniqueNumericIdGen","concreteNumUniqueNumericIdGen","bookmarkUniqueNumericId","fitTextUniqueNumericIdGen","fitTextUniqueNumericId","uniqueId","generateUuidPart","count","uniqueUuid","encodeUtf8","str","createFitText","width","CharacterSpacing","Color","Highlight","createLanguageComponent","createRunFonts","nameOrAttrs","hint","createVerticalAlignRun","createSuperScript","createSubScript","UnderlineType","createUnderline","underlineType","RunProperties","szCs","RunPropertiesChange","ParagraphRunProperties","Text","PageNumber","pageNumberFieldOf","Run","field","runOf","beginsHere","run","TextRun","TargetModeType","createRelationship","target","targetMode","createHyperlinkClick","hasXmlNs","linkId","DrawingLink","link","declareNamespace","relationships","LARGEST_ROMAN","LARGEST_LETTERS","ROMAN","roman","numeral","letters","ordinal","numberWriterOf","small","inCase","write","PLAIN_FORMATS","CASE_FORMATS","isNumberPicture","picture","inNumberPicture","zeros","character","places","digits","inCapitals","capitals","numberFieldOf","instruction","numberFormat","relative","written","argument","lower","own","prefixesPageNumbers","resultFrom","estimate","writesNumber","inFormat","within","inTextBox","relativeTo","pageCount","sectionPageCount","enclosing","bookmarkPageNumbers","bookmarks","blank","placeIn","fillFields","tree","current","filling","_filling$beforeParagr","sectionPropertiesIn","endsSection","paragraph","partPageCountsOf","countsOfParts","references","properties","all","counts","sectionPageCounts","section","fillBodyFields","relativeCounts","_relativePositions$ge","bookmark","relativePositions","place","fillPartFields","onPage","page","notes","fillSequenceFields","resultOf","FieldInstruction","styles","sl","StructuredDocumentTagContent","beginOf","beginDirty","writtenTables","HeadingBookmarkIds","_this$ids","nameOf$4","childrenOf$1","childOf$2","attributeOf","_childOf","numberAttributeOf","BLOCK_CONTAINERS","blocksOf","TEXT_CONTAINERS","textOfRunContent","textOf$1","fields","read","bookmarkMarksOf","bookmarksOf","paragraphs","marks","names","mark","paragraphDetailsOf","followBookmarks","stylesOf","parseRange","match","isWithin","to","level","headingLevelOf","styleId","styleOutlineLevelOf","heading","headingLevels","outlineLevel","outlineLevelOf","outline","levelIn","entriesFromBookmark","listed","stylesWithLevels","namesItsEntries","headingStyleRange","useAppliedParagraphOutlineLevel","headingRange","titleRunsOf","title","line","partIndex","Tab","numberRunsOf","separator","numberTabStopOf","entryStyleOf","contentOf","withoutPageNumbers","hasPageNumber","entry","PageReference","Paragraph","textWidth","tabLeader","InternalHyperlink","BookmarkStart","BookmarkEnd","fillTablesOfContents","blocks","tables","headings","levels","bookmarkIds","listNumbers","listNumbersOf","table","listNumber","IDENTIFIER","sequenceOf","step","hidden","caseFormat","switches","next","sequenceFieldOf","identifier","isSequenceField","identifiersIn","identifiersInCommentsOf","comments","wrapper","sequenceNumbering","levelOf","numbers","counted","headingsAt","unclearAt","unknown","afterHeading","headingAt","at","since","followed","sequence","before","nameOf$3","textElement","FORMATTED","_holder$_attr","holder","begin","estimates","fillSequenceNumbers","startParagraph","numberOf","fillPageNumbers","estimator","partPageCounts","fillPartPageNumbers","referenceId","RelationshipsAttributes","Relationships","copy","CommentAttributes","RootCommentsAttributes","_args3","Comment","paraId","date","commentChildren","pChildren","commentIdToParaId","Comments","hasThreading","hasDurableIds","idToParaId","CommentsExtendedAttributes","CommentExAttributes","_args2","CommentEx","CommentsExtended","threadData","CommentIdAttributes","CommentId","CommentsIdsAttributes","_args4","CommentsIds","commentIdsData","EndnoteReference","PageBreakBefore","LineRuleType","createSpacing","after","lineRule","beforeAutoSpacing","afterAutoSpacing","HeadingLevel","createParagraphStyle","TabStopType","createTabStopItem","leader","createTabStop","tabDefinitions","tabDefinition","NumberProperties","IndentLevel","indentLevel","NumberId","numberId","FileChild","HyperlinkAttributes","ConcreteHyperlink","relationshipId","anchor","externalLink","ExternalHyperlink","BookmarkStartAttributes","BookmarkEndAttributes","Bookmark","createOutlineLevel","PageReferenceFieldInstruction","bookmarkId","MAX_ANCHOR_LENGTH","externalHyperlinkTarget","fragmentLength","listKey","restartedListId","instance","createFontRelationship","fontKey","subsetted","createFont","altName","panose1","charset","family","notTrueType","pitch","sig","embedRegular","embedBold","embedItalic","embedBoldItalic","createEmbeddedFont","characterSet","createFontTable","fonts","FACES","FontWrapper","faces","font","ofFont","file","createWordWrap","createFrameProperties","currentRestartedLists","restartedListIds","RIGHT_TO_LEFT_ALIGNMENTS","ParagraphProperties","implicitListParagraphStyle","list","numberProperties","restart","inListOrder","ParagraphPropertiesChange","revisionIndex","sectionProperties","definition","concreteHyperlink","createVerticalAlign","createColumns","separate","equalWidth","createDocumentGrid","linePitch","charSpace","HeaderFooterReferenceType","HeaderFooterType","createHeaderFooterReference","createLineNumberType","countBy","distance","createNoteProperties","createFootnoteProperties","createEndnoteProperties","PageBordersAttributes","PageBorders","createPageMargin","top","header","footer","gutter","PageNumberSeparator","createPageNumberType","formatType","chapterHeadingLevel","PageOrientation","createPageSize","widthTwips","heightTwips","height","orientation","code","PageTextDirectionAttributes","PageTextDirection","createSectionType","sectionMarginDefaults","sectionPageSizeDefaults","SectionProperties","gridType","headerWrapperGroup","footerWrapperGroup","footnoteProperties","endnoteProperties","borders","lineNumbers","pageNumbers","column","verticalAlign","titlePage","textDirection","revision","SectionPropertiesChange","pageWidth","columnCount","Body","component","currentSection","lastParagraph","sectionParagraph","last","WidthType","createTableWidthElement","tableWidthValue","DEFAULT_AVAILABLE_WIDTH","columnSpanOf","cell","resolvePreferredWidth","twips","referenceWidth","resolveTableWidth","availableWidth","countGridColumns","rows","row","resolveColumnWidths","tableWidth","widths","spanningCells","span","cellWidth","_column","columns","unresolvedSpanColumns","remaining","sum","unresolvedColumns","columnWidth","share","createGridCol","TableGrid","TableGridChange","TableGridChangeAttributes","InsertedTableRow","DeletedTableRow","InsertedTableCell","DeletedTableCell","CellMergeAttributes","CellMerge","buildMarginChildren","marginUnitType","createTableCellMargin","createCellMargin","TableCellBorders","GridSpanAttributes","GridSpan","VerticalMergeType","VerticalMergeAttributes","VerticalMerge","TDirectionAttributes","TDirection","TableCellProperties","cellMargin","TableCellPropertiesChange","TableCell","createOnOffOnlyElement","NONE_BORDER","DEFAULT_BORDER","TableBorders","sides","border","resolved","fillMissingSides","RelativeHorizontalPosition","RelativeVerticalPosition","createTableFloatProperties","leftFromText","rightFromText","topFromText","bottomFromText","absoluteHorizontalPosition","absoluteVerticalPosition","horizontalAnchor","relativeHorizontalPosition","relativeVerticalPosition","verticalAnchor","createTableLayout","CellSpacingType","createTableCellSpacing","createTableLook","firstRow","lastRow","firstColumn","lastColumn","noHBand","noVBand","createTableOverlap","overlap","INLINE_ALIGNMENTS","TableProperties","inline","float","alignment","TablePropertiesChange","createTableRowHeight","rule","TableRowProperties","TableRowPropertiesChange","childrenOf","nameOf$2","withKeepNext","keepNext","settings","setting","newProperties","TableRow","rootIndex","columnIndex","colIdx","rootIdx","allowEndNewCell","Table","columnWidths","columnWidthsRevision","rowIndex","lastChild","continueCell","margins","cellIndex","cells","previous","gridIndex","total","scale","spanned","stack","parentTable","bodyIndex","documentBody","AppPropertiesAttributes","AppProperties","ContentTypeAttributes","createDefault","contentType","extension","createOverride","partName","ContentTypes","macros","DocumentAttributeNamespaces","DocumentAttributes","ns","CoreProperties","TimestampElement","TimestampElementProperties","CustomPropertiesAttributes","CustomPropertyAttributes","CustomProperty","CustomPropertyValue","CustomProperties","property","createSourcesProperties","itemId","EVENT_ELEMENTS","createMacroEvents","event","events","DocumentBackground","themeColor","themeShade","themeTint","Document","DocumentWrapper","EndnotesAttributes","FirstNoteParagraph","EndnoteAttributes","EndnoteRefRun","EndnoteType","Endnote","ContinuationSeperator","ContinuationSeperatorRun","Seperator","SeperatorRun","Endnotes","spacing","endnote","EndnotesWrapper","FooterAttributes","Footer$1","initContent","referenceNumber","FooterWrapper","media","childElement","FootnoteAttributes","FootnoteRef","FootnoteRefRun","FootnoteType","Footnote","FootnotesAttributes","FootNotes","footnote","FootnotesWrapper","HeaderAttributes","Header$1","HeaderWrapper","Media","mediaData","LevelFormat","LevelAttributes","NumberFormat$1","LevelText","levelAlignment","LevelJc","Suffix","IsLegalNumberingStyle","LevelBase","isLegalNumberingStyle","suffix","Level","MultiLevelType","AbstractNumberingAttributes","AbstractNumbering","levelOptions","AbstractNumId","NumAttributes","ConcreteNumbering","LevelOverride","LevelOverrideAttributes","levelNum","StartOverride","StartOverrideAttributes","Numbering$1","abstractNumbering","con","fullReference","referenceConfigLevels","concreteNumberingSettings","PackageParts","contentTypes","existingPaths","added","taken","folder","path","createCompatibilitySetting","version","Compatibility","PROTECTION_PASSWORD_SPIN_COUNT","MAX_PASSWORD_LENGTH","INITIAL_CODES","ENCRYPTION_MATRIX","rotateLeft15","legacyPasswordKey","password","highOrderWord","byte","bit","lowOrderWord","hashProtectionPassword","digest","salt","view","iteration","spinCount","randomSalt","DocumentProtectionAttributes","toBase64","DocumentProtection","SettingsAttributes","Settings","ComponentAttributes","Name","UiPriority","StyleAttributes","Style","StyleForParagraph","StyleForCharacter","HeadingStyle","TitleStyle","Heading1Style","Heading2Style","Heading3Style","Heading4Style","Heading5Style","Heading6Style","StrongStyle","ListParagraph","CaptionStyle","BibliographyStyle","tableOfContentsStyles","isDefaultTableOfContentsStyle","TableOfContentsStyle","levelIndent","FootnoteText","FootnoteReferenceStyle","FootnoteTextChar","EndnoteText","EndnoteReferenceStyle","EndnoteTextChar","HyperlinkStyle","LineNumberStyle","NormalTableStyle","nameOf$1","attributesOf","styleIdOf","styleNameOf","_flat$find2","isParagraphStyle","isDefaultParagraphStyle","markedAsDefault","Styles","named","ids","unique","otherNames","kept","ParagraphPropertiesDefaults","RunPropertiesDefaults","DocumentDefaults","ExternalStylesFactory","xmlObj","xmlData","stylesXmlElement","xmlElm","stylesElements","tableOfContentsLevelIndentOf","_options$document","createTableOfContentsStyles","createDefaultStyles","DefaultStylesFactory","OFFICE_FONTS","OFFICE_SCRIPT_FONTS","createTextFont","typeface","panose","themeLatinFont","use","themeScriptFonts","script","scripts","officeScripts","createFontCollection","latin","eastAsia","complexScript","createFontScheme","createStyleColor","changes","createSolidFill","createGradientFill","stops","createLine","createEffectStyle","effects","createShadow","createFormatScheme","Theme","relationshipsPathOf","slash","sourceOfRelationships","folderOf","resolveTarget","normalized","segment","segments","relativeTarget","folders","common","shared","isSamePart","other","u8","u16","i32","fleb","fdeb","clim","freb","eb","j","_a","fl","revfl","_b","fd","revfd","rev","x","hMap","cd","l","mb","le","co","rvb","sv","r_1","v","m","flt","fdt","flm","flrm","fdm","fdrm","p","bits16","shft","slc","ec","err","msg","ind","nt","inflt","dat","dl","dict","st","buf","noBuf","resize","noSt","cbuf","bl","nbuf","final","pos","bt","lm","dm","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","dt","lms","dms","lpos","sym","add","dsym","shift","dend","wbits","wbits16","hTree","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","lft","cst","i2_1","i2_2","i2_3","lc","cl","cli","cln","cls","w","clen","cf","wfblk","out","wblk","lf","dlt","mlb","df","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","flen","ftlen","dtlen","bs","ll","llm","lcts","it","clct","len","li","syms","dst","deo","dflt","pre","post","lst","lvl","opt","msk_1","plvl","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","maxd","ml","nl","mmd","md","ti","lin","din","crct","k","crc","cr","dopt","newDat","mrg","b2","b4","b8","wbytes","deflateSync","opts","inflateSync","fltn","op","te","td","dutf8","strToU8","latin1","ar_1","ar","ai","strFromU8","slzh","zh","fnl","efl","fn","es","z64hs","z","sc","su","off","nsc","nsu","noff","nf","exfl","ex","wzh","col","exl","ce","u","y","exf","wzf","zipSync","files","tot","compression","com","ms","oe","cdl","badd","unzipSync","ze","fltr","c_2","no","bytesOf$2","zipFiles","MAX_DEFLATE_RATIO","wrongSize","unzipFiles","sizes","compressed","include","originalSize","wrong","binaryStringOf","unsupported","OUTPUTS","mimeType","zipOutput","output","COLOR_NAMES","DEFAULT_SYSTEM_COLORS","THEME_TYPES","localName$1","_element$name","_element$elements","_element$attributes","decode$1","relatedPart","types","themePathOf","colorValue","withSystemColors","readColors","scheme","readThemeColorValues","COMPOUND_FILE_SIGNATURE","File","project","given","defaultStyles","isGiven","externalStyles","stylesFactory","headers","footers","obfuscatedStartOffset","obfuscatedEndOffset","guidSize","obfuscate","guid","hexNumbers","hexString","obfuscatedBytes","Formatter","PLACEHOLDER","replacePlaceholders","placeholder","findPlaceholders","ImageReplacer","image","offset","placeholders","NumberingReplacer","concreteNumberings","numId","formatter$4","xmlifyPart","prettify","xmlifyPackagePart","filePath","fileContent","xmlifyPackageParts","_excluded","Compiler","_this$xmlifyFile","prettifyXml","packageParts","xmlifiedFileMapping","xmlifiedFiles","obj","overrides","buffer","documentXmlData","commentXmlData","footnoteXmlData","endnoteXmlData","documentRelationshipCount","commentRelationshipCount","footnoteRelationshipCount","endnoteRelationshipCount","documentMediaDatas","commentMediaDatas","footnoteMediaDatas","endnoteMediaDatas","xmlStyles","headerWrapper","mediaDatas","footerWrapper","tempXmlData","import_events","R","ReflectApply","receiver","args","ReflectOwnKeys","ProcessEmitWarning","warning","NumberIsNaN","EventEmitter","once","defaultMaxListeners","checkListener","listener","arg","_getMaxListeners","that","doError","er","handler","listeners","arrayClone","_addListener","prepend","onceWrapper","_onceWrap","state","wrapped","originalListener","spliceOne","_listeners","evlistener","unwrap","unwrapListeners","emitter","listenerCount","arr","ret","errorListener","resolver","reject","eventTargetAgnosticAddListener","addErrorHandlerIfEventEmitter","flags","wrapListener","Stream","source","dest","destination","ondata","chunk","ondrain","onend","onclose","didOnEnd","onerror","cleanup","error","asyncGeneratorStep","_asyncToGenerator","_next","_throw","PrettifyType","convertPrettifyType","mimeTypeOf","Packer","_this","stream","bookmarkIdOf","findBookmarkIds","renumberBookmarksAvoiding","usedIds","idsInDocument","newIds","highestId","highest","newIdFor","knownId","newId","renumber","formatter$3","decodeUtf8","toJson","createTextElementContents","patchSpaceAttribute","getFirstLevelElements","appendContentType","relationshipElements","_el$attributes","_el$attributes2","el","appendContentTypeOverride","contentTypeElements","removeContentTypeOverride","getIdFromRelationshipId","getNextRelationshipIndex","_e$attributes","curr","appendRelationship","createRelationshipFile","CORE_PROPERTIES_RELATIONSHIP_TYPE","CORE_PROPERTIES_CONTENT_TYPE","PACKAGE_RELATIONSHIPS_PATH","CORE_PROPERTIES_PATH","NAMESPACES","ELEMENTS","textOf","localName","prefixOf","namespace","decode","encoding","readPart","binaryParts","corePropertiesPathOf","_getFirstLevelElement","relationship","patchCoreProperties","addContentTypeOverride","DRAWINGS","ID_ELEMENTS","REFERENCE_ELEMENTS","idOf$1","findDrawingIds","ownIdsOf","idsIn","drawing","renumberDrawingsAvoiding","renumberDrawing","renumberIn","PatchType","DRAWING_PROPERTIES","findDrawings","altTextOf","CONTENT_TYPES$1","relationshipsIn","RELATIONSHIPS_NAMESPACE","relationshipPrefixesIn","relationshipIdsIn","prefixes","contentsOf","has","findPath","decoded","findRelationship","pathOf","isReferenced","relationshipsPath","removeIfUnreferenced","_parts$get","removed","createTemplatePackage","formatter","relationshipType","patchDrawings","patches","patch","delimiters","found","xmlPart","altText","matches","contents","referenced","createContext","used","isStream","isZipArchive","isBlob","readStream","chunks","bytesOf$1","_ref","loadZip","_ref2","formatter$2","DOCUMENT_PATH$1","FOOTNOTES","ENDNOTES","formatElement$1","findIds","withMark","patchNotesOfKind","givenNotes","note","carriedIds","highestGivenId","noteOfId","kind","findOrAddPart","contentOfNote","useStyles","renumberLists","renumberBookmarks","renumberDrawings","stylesPart","styleIds","patchNotes","patchers","footnotes","helpers","endnotes","patcher","renumbered","formatter$1","DOCUMENT_PATH","NUMBERING_PATH","NUMBERING_CONTENT_TYPE","NUMBERING_RELATIONSHIP","BULLET_REFERENCE","BULLET_NUM_ID","formatElement","highestOf","patchNumbering","newNumIds","highestNumId","numberingRelationship","numberingPath","idsInTemplate","listOf","numbering","newNumIdOf","abstractNumIdOf","lists","highestAbstractNumId","newAbstractNumIds","abstractLists","prefix","firstIndexOf","PARSED","DOCUMENT","IMPORT","ZIP","readPackage","importedDocuments","readImportedDocuments","imported","rootOf","_part$elements","fillTemplatePageNumbers","_ref3","TokenNotFoundError","token","findRunElementIndexWithToken","paragraphElement","splitRunElement","splitIndex","splitElements","runElement","_e$elements","splitText","newElements","ReplaceMode","replaceTokenInParagraphElement","startIndex","renderedParagraph","originalText","fromIndex","endIndex","replaceMode","offsetStartIndex","offsetEndIndex","firstPart","replacementText","patchTextElement","lastPart","currentElement","renderParagraphNode","currentRunStringLength","runs","renderedRunNode","renderRunNode","buildNodePath","currentRunStringIndex","currentTextStringIndex","partText","elementsToWrapper","traverse","renderedParagraphs","queue","currentNode","findLocationOfText","SPLIT_TOKEN","replacer","json","patchText","paragraphsInPatchOrder","paragraphsToPatch","withoutNestedParagraphs","parentElement","goToParentElementFromPath","elementIndex","getLastElementIndexFromPath","formatChildren","renumberIds","endParagraph","goToElementFromPath","nextRunIndex","replaceOccurrenceInParagraph","recursive","formatted","runElementToBeReplaced","runProperties","newRunElements","keepOriginalStyles","withRunPropertiesOnRuns","patchedRightElement","withRunProperties","originalRunProperties","ownRunProperties","childElementsOf","ownPropertyNames","mergedRunProperties","runPropertyRank","RUN_PROPERTY_ORDER","isInsideElementAtPath","ancestorPath","STYLES_PATH","REFERENCES","idOf","nameOf","_style$elements","childOf$1","sizeIn","normalSizeOf","normal","defaults","formatDefaultStyles","normalSize","patchStyles","templateElements","templateStyles","templateIds","defaultStyleOf","missingIds","findIdInDocument","sameStyle","templateStyle","idInDocument","withIdsInDocument","EMPTY","patchTableRows","fieldStart","findRowsToRepeat","fieldsIn","copies","copyOf","withoutIds","fieldPatches","fieldPatch","patchPlaceholder","hasRows","rowHolding","isInside","siblingRows","positions","pathToParagraph","fieldEnd","ATTRIBUTES_TO_REMOVE","ELEMENTS_TO_REMOVE","isUtf16","readThemeColors","findSpacedPlaceholder","isKey","trimInText","trimmed","paragraphsIn","trimInParagraph","render","rendered","trimPlaceholders","isTextKey","textKeys","tableRowsKeys","tableRowsKey","isDrawingKey","drawingKeys","shapeTypeIdOf","findShapeTypeIds","removeShapeTypesIn","idsInPart","remove","assertValidPatch","inTableRow","imageReplacer","UTF16LE","UTF16BE","PATCHED_PART_ROOTS","compareByteArrays","trimPlaceholders$1","zipContent","contexts","contentTypeOverrides","carryNote","map","imageRelationshipAdditions","relationshipAdditions","hasMedia","binaryContentMap","placeholderDelimiters","binaryValue","startBytes","viewWrappers","viewWrapperOf","viewWrapper","keysWhere","test","textPatches","patchesInOrder","removeShapeTypes","patchValue","patchKey","hyperlinkRelationships","didFindOccurrence","relationshipKey","relationshipsJson","newJson","fileName","contentTypesJson","partData","outputType","isSearched","findPatchKeys","pattern","MONO","CODE_FILL","ORDERED","HEADINGS","Numbering","nodes","url","exportableUrl","blockStyle","ctx","lines","label","marker","manual","lead","bulletOrNumber","align","markdownToDocxDocument","parseMarkdown","markdown","markdownToDocx"],"sources":["../../../node_modules/.bun/docx@9.15.0/node_modules/docx/dist/index.mjs","../../src/lib/export/docx.ts"],"sourcesContent":["// \\0rolldown/runtime.js\nvar __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n// src/file/xml-components/base.ts\n/**\n* Abstract base class for all XML components in the library.\n*\n* BaseXmlComponent defines the minimal interface that all XML components must implement.\n* It stores the XML element name (rootKey) and requires subclasses to implement\n* the prepForXml method for serialization.\n*\n* @example\n* ```typescript\n* class MyElement extends BaseXmlComponent {\n* constructor() {\n* super(\"w:myElement\");\n* }\n*\n* prepForXml(context: IContext): IXmlableObject {\n* return { \"w:myElement\": {} };\n* }\n* }\n* ```\n*/\nvar BaseXmlComponent = class {\n\t/**\n\t* Creates a new BaseXmlComponent with the specified XML element name.\n\t*\n\t* @param rootKey - The XML element name (e.g., \"w:p\", \"w:r\", \"w:t\")\n\t*/\n\tconstructor(rootKey) {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The XML element name for this component (e.g., \"w:p\" for paragraph). */\n\t\t\t\"rootKey\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.rootKey = rootKey;\n\t}\n\t/**\n\t* The components written in this one's place, one after another, when it can't be written as a single element,\n\t* such as a run with another run in its children. Undefined when it is written as itself.\n\t*\n\t* @internal\n\t*/\n\tget writtenAs() {}\n};\n/**\n* Whether a value is a component, from this copy of docx or from another, such as the copy a plugin or another\n* library that builds on docx was bundled with. A component from another copy isn't an instance of this copy's\n* classes, so it is known by the method that writes it.\n*\n* The method is checked, rather than a marker such as a `Symbol.for` brand, because copies of docx that predate any\n* marker wouldn't carry it, while every copy's components have `prepForXml`. Overriding `Symbol.hasInstance` on the\n* base class isn't an option either: subclasses inherit it, so `instanceof Paragraph` would match any component.\n*\n* What it doesn't take for a component stays safe: an object to write as XML, such as `{ \"w:b\": {} }`, has no\n* methods, and neither has a component copied without its class (with `Object.assign` or spread), which has lost the\n* method that would write it.\n*\n* @internal\n*/\nvar isXmlComponent = (value) => value instanceof BaseXmlComponent || typeof value === \"object\" && value !== null && typeof value.prepForXml === \"function\";\n/**\n* The element a component writes, such as `w:p` for a paragraph, from this copy of docx or from another. Undefined\n* when the value isn't a component.\n*\n* Checks that need to know what kind of component a child is, such as whether a cell ends with a paragraph, compare\n* this rather than the child's class, so they hold for components from another copy too. The element is also what\n* those checks are really about, because the rules they enforce are rules of the XML: a cell must end with a `w:p`,\n* and a `w:r` can't be inside another.\n*\n* `rootKey` is protected, so it is read through a cast. That is safe for any copy of docx, because every component\n* is constructed with its element as `rootKey`.\n*\n* @internal\n*/\nvar elementOf = (value) => isXmlComponent(value) ? value.rootKey : void 0;\n// src/file/xml-components/xml-component.ts\n/**\n* XML Component module for the docx library.\n*\n* This module provides the core XmlComponent class that all WordprocessingML elements\n* extend from. XmlComponent manages the conversion of component trees into XML structures\n* that can be serialized into DOCX files.\n*\n* @module\n*/\n/**\n* Empty object singleton used for empty XML elements.\n*\n* This sealed object is used to generate self-closing XML tags when an element\n* has no children or attributes.\n*\n* @internal\n*/\nvar EMPTY_OBJECT = Object.seal({});\n/**\n* Base class for all XML components in WordprocessingML documents.\n*\n* XmlComponent provides the infrastructure for building XML element trees\n* that are serialized into document.xml and other parts of the DOCX package.\n* It manages a collection of child components and handles the conversion to\n* the intermediate object format used by the xml serialization library.\n*\n* @example\n* ```typescript\n* // Creating a custom XML component\n* class MyElement extends XmlComponent {\n* constructor(text: string) {\n* super(\"w:myElement\");\n* this.root.push(new Attributes({ val: text }));\n* }\n* }\n*\n* const element = new MyElement(\"Hello\");\n* // When serialized: <w:myElement w:val=\"Hello\"/>\n* ```\n*/\nvar XmlComponent = class extends BaseXmlComponent {\n\t/**\n\t* Creates a new XmlComponent.\n\t*\n\t* @param rootKey - The XML element name (e.g., \"w:p\", \"w:r\", \"w:t\")\n\t*/\n\tconstructor(rootKey) {\n\t\tsuper(rootKey);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Array of child components, text nodes, and attributes.\n\t\t\t*\n\t\t\t* This array forms the content of the XML element. It can contain other\n\t\t\t* XmlComponents, string values (text nodes), or attribute components.\n\t\t\t*/\n\t\t\t\"root\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.root = new Array();\n\t}\n\t/**\n\t* Prepares this component and its children for XML serialization.\n\t*\n\t* This method is called by the Formatter to convert the component tree into\n\t* an object structure compatible with the xml library (https://www.npmjs.com/package/xml).\n\t* It recursively processes all children and handles special cases like\n\t* attribute-only elements and empty elements.\n\t*\n\t* The method can be overridden by subclasses to customize XML representation\n\t* or execute side effects during serialization (e.g., creating relationships).\n\t*\n\t* @param context - The serialization context containing document state\n\t* @returns The XML-serializable object, or undefined to exclude from output\n\t*\n\t* @example\n\t* ```typescript\n\t* // Override to add custom serialization logic\n\t* prepForXml(context: IContext): IXmlableObject | undefined {\n\t* // Custom logic here\n\t* return super.prepForXml(context);\n\t* }\n\t* ```\n\t*/\n\tprepForXml(context) {\n\t\tvar _children$;\n\t\tcontext.stack.push(this);\n\t\tconst children = this.root.flatMap((comp) => {\n\t\t\tif (isXmlComponent(comp)) {\n\t\t\t\tconst parts = comp.writtenAs;\n\t\t\t\treturn parts ? parts.map((part) => part.prepForXml(context)) : comp.prepForXml(context);\n\t\t\t}\n\t\t\treturn comp;\n\t\t}).filter((comp) => comp !== void 0);\n\t\tcontext.stack.pop();\n\t\treturn { [this.rootKey]: children.length ? children.length === 1 && ((_children$ = children[0]) === null || _children$ === void 0 ? void 0 : _children$._attr) ? children[0] : children : EMPTY_OBJECT };\n\t}\n\t/**\n\t* Adds a child element to this component.\n\t*\n\t* @deprecated Do not use this method. It is only used internally by the library. It will be removed in a future version.\n\t* @param child - The child component or text string to add\n\t* @returns This component (for chaining)\n\t*/\n\taddChildElement(child) {\n\t\tthis.root.push(child);\n\t\treturn this;\n\t}\n};\n/**\n* XML component that is excluded from output if it has no meaningful content.\n*\n* IgnoreIfEmptyXmlComponent is useful for optional container elements that\n* should only appear in the XML if they contain children or attributes.\n* If the element would be empty, it returns undefined instead, causing it\n* to be excluded from the output.\n*\n* @example\n* ```typescript\n* class OptionalContainer extends IgnoreIfEmptyXmlComponent {\n* constructor(items?: Item[]) {\n* super(\"w:container\");\n* if (items) {\n* items.forEach(item => this.root.push(item));\n* }\n* }\n* }\n*\n* const container1 = new OptionalContainer([item1, item2]);\n* // Renders: <w:container>...</w:container>\n*\n* const container2 = new OptionalContainer();\n* // Renders: nothing (excluded from output)\n* ```\n*/\nvar IgnoreIfEmptyXmlComponent = class extends XmlComponent {\n\tconstructor(rootKey, includeIfEmpty) {\n\t\tsuper(rootKey);\n\t\t_defineProperty(this, \"includeIfEmpty\", void 0);\n\t\tthis.includeIfEmpty = includeIfEmpty;\n\t}\n\t/**\n\t* Prepares the component for XML serialization, excluding it if empty.\n\t*\n\t* @param context - The serialization context\n\t* @returns The XML-serializable object, or undefined if empty\n\t*/\n\tprepForXml(context) {\n\t\tconst result = super.prepForXml(context);\n\t\tif (this.includeIfEmpty) return result;\n\t\treturn result && (typeof result[this.rootKey] !== \"object\" || Object.keys(result[this.rootKey]).length) ? result : void 0;\n\t}\n};\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/objectSpread2.js\nfunction ownKeys(e, r) {\n\tvar t = Object.keys(e);\n\tif (Object.getOwnPropertySymbols) {\n\t\tvar o = Object.getOwnPropertySymbols(e);\n\t\tr && (o = o.filter(function(r) {\n\t\t\treturn Object.getOwnPropertyDescriptor(e, r).enumerable;\n\t\t})), t.push.apply(t, o);\n\t}\n\treturn t;\n}\nfunction _objectSpread2(e) {\n\tfor (var r = 1; r < arguments.length; r++) {\n\t\tvar t = null != arguments[r] ? arguments[r] : {};\n\t\tr % 2 ? ownKeys(Object(t), !0).forEach(function(r) {\n\t\t\t_defineProperty(e, r, t[r]);\n\t\t}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {\n\t\t\tObject.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n\t\t});\n\t}\n\treturn e;\n}\n// src/file/xml-components/default-attributes.ts\n/**\n* XML attribute components for the docx library.\n*\n* This module provides base classes for creating XML element attributes.\n* Attributes are represented as special components with the \"_attr\" key.\n*\n* @module\n*/\n/**\n* Base class for creating XML attributes with automatic name mapping.\n*\n* XmlAttributeComponent allows you to define attributes using JavaScript-friendly\n* property names that are automatically mapped to XML attribute names. Subclasses\n* can define an xmlKeys map to specify the transformation.\n*\n* @example\n* ```typescript\n* class MyAttributes extends XmlAttributeComponent<{ fontSize: number }> {\n* protected readonly xmlKeys = { fontSize: \"w:sz\" };\n* }\n*\n* new MyAttributes({ fontSize: 24 });\n* // Generates: _attr: { \"w:sz\": 24 }\n* ```\n*/\nvar XmlAttributeComponent = class extends BaseXmlComponent {\n\t/**\n\t* Creates a new attribute component.\n\t*\n\t* @param root - The attribute data object\n\t*/\n\tconstructor(root) {\n\t\tsuper(\"_attr\");\n\t\t_defineProperty(this, \"root\", void 0);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** Optional mapping from property names to XML attribute names. */\n\t\t\t\"xmlKeys\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.root = root;\n\t}\n\t/**\n\t* Converts the attribute data to an XML-serializable object.\n\t*\n\t* This method transforms the property names using xmlKeys (if defined)\n\t* and filters out undefined values.\n\t*\n\t* @param _ - Context (unused for attributes)\n\t* @returns Object with _attr key containing the mapped attributes\n\t*/\n\tprepForXml(_) {\n\t\tconst attrs = {};\n\t\tObject.entries(this.root).forEach(([key, value]) => {\n\t\t\tif (value !== void 0) {\n\t\t\t\tconst newKey = this.xmlKeys && this.xmlKeys[key] || key;\n\t\t\t\tattrs[newKey] = value;\n\t\t\t}\n\t\t});\n\t\treturn { _attr: attrs };\n\t}\n};\n/**\n* Next-generation attribute component with explicit key-value pairs.\n*\n* NextAttributeComponent provides an alternative approach to attributes where\n* each property explicitly specifies both its XML attribute name and value.\n* This gives more control but is more verbose than XmlAttributeComponent.\n*\n* @example\n* ```typescript\n* new NextAttributeComponent({\n* fontSize: { key: \"w:sz\", value: 24 },\n* bold: { key: \"w:b\", value: true }\n* });\n* // Generates: _attr: { \"w:sz\": 24, \"w:b\": true }\n* ```\n*/\nvar NextAttributeComponent = class extends BaseXmlComponent {\n\t/**\n\t* Creates a new NextAttributeComponent.\n\t*\n\t* @param root - Attribute payload with explicit key-value mappings\n\t*/\n\tconstructor(root) {\n\t\tsuper(\"_attr\");\n\t\t_defineProperty(this, \"root\", void 0);\n\t\tthis.root = root;\n\t}\n\t/**\n\t* Converts the attribute payload to an XML-serializable object.\n\t*\n\t* Extracts the key and value from each property and filters out\n\t* undefined values.\n\t*\n\t* @param _ - Context (unused for attributes)\n\t* @returns Object with _attr key containing the attributes\n\t*/\n\tprepForXml(_) {\n\t\treturn { _attr: Object.values(this.root).filter(({ value }) => value !== void 0).reduce((acc, { key, value }) => _objectSpread2(_objectSpread2({}, acc), {}, { [key]: value }), {}) };\n\t}\n};\n// src/file/xml-components/attributes.ts\n/**\n* Common XML attributes module for WordprocessingML elements.\n*\n* This module provides a reusable Attributes class with commonly used\n* WordprocessingML attribute mappings.\n*\n* @module\n*/\n/**\n* Common XML attributes used across WordprocessingML elements.\n*\n* This class provides a convenient way to add common attributes to XML elements.\n* It automatically maps JavaScript-friendly property names to their corresponding\n* w: (WordprocessingML) namespace prefixed XML attribute names.\n*\n* @example\n* ```typescript\n* // Create an element with a value attribute\n* new Attributes({ val: \"someValue\" });\n* // Generates: <element w:val=\"someValue\"/>\n*\n* // Multiple attributes\n* new Attributes({ color: \"FF0000\", sz: \"24\" });\n* // Generates: <element w:color=\"FF0000\" w:sz=\"24\"/>\n* ```\n*/\nvar Attributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tval: \"w:val\",\n\t\t\tcolor: \"w:color\",\n\t\t\tfill: \"w:fill\",\n\t\t\tspace: \"w:space\",\n\t\t\tsz: \"w:sz\",\n\t\t\ttype: \"w:type\",\n\t\t\trsidR: \"w:rsidR\",\n\t\t\trsidRPr: \"w:rsidRPr\",\n\t\t\trsidSect: \"w:rsidSect\",\n\t\t\tw: \"w:w\",\n\t\t\th: \"w:h\",\n\t\t\ttop: \"w:top\",\n\t\t\tright: \"w:right\",\n\t\t\tbottom: \"w:bottom\",\n\t\t\tleft: \"w:left\",\n\t\t\theader: \"w:header\",\n\t\t\tfooter: \"w:footer\",\n\t\t\tgutter: \"w:gutter\",\n\t\t\tlinePitch: \"w:linePitch\",\n\t\t\tpos: \"w:pos\"\n\t\t});\n\t}\n};\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/objectWithoutPropertiesLoose.js\nfunction _objectWithoutPropertiesLoose(r, e) {\n\tif (null == r) return {};\n\tvar t = {};\n\tfor (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n\t\tif (e.includes(n)) continue;\n\t\tt[n] = r[n];\n\t}\n\treturn t;\n}\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/objectWithoutProperties.js\nfunction _objectWithoutProperties(e, t) {\n\tif (null == e) return {};\n\tvar o, r, i = _objectWithoutPropertiesLoose(e, t);\n\tif (Object.getOwnPropertySymbols) {\n\t\tvar s = Object.getOwnPropertySymbols(e);\n\t\tfor (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n\t}\n\treturn i;\n}\n// src/util/xml/parse.ts\nvar _excluded$4 = [\"elements\"];\nvar PREDEFINED_ENTITIES = /* @__PURE__ */ new Map([\n\t[\"amp\", \"&\"],\n\t[\"lt\", \"<\"],\n\t[\"gt\", \">\"],\n\t[\"quot\", \"\\\"\"],\n\t[\"apos\", \"'\"]\n]);\nvar ENTITY_REFERENCE = /&([^;]*);?/g;\n/**\n* Decodes the five entities XML predefines and character references, such as ` `. XML that declares entities of\n* its own in a DTD is not supported, so that no input can expand into more than it holds.\n*/\nvar decodeEntities = (raw) => raw.indexOf(\"&\") === -1 ? raw : raw.replace(ENTITY_REFERENCE, (reference, name) => {\n\tif (!reference.endsWith(\";\")) throw new Error(`Invalid XML: \"&\" that starts no entity, in \"${raw}\"`);\n\tconst predefined = PREDEFINED_ENTITIES.get(name);\n\tif (predefined !== void 0) return predefined;\n\tconst codePoint = /^#x[0-9a-f]+$/i.test(name) ? parseInt(name.slice(2), 16) : /^#[0-9]+$/.test(name) ? parseInt(name.slice(1), 10) : NaN;\n\tif (!(codePoint > 0 && codePoint <= 1114111)) throw new Error(`Invalid XML: unknown entity \"${reference}\"`);\n\treturn String.fromCodePoint(codePoint);\n});\nvar isWhitespace = (char) => char === \" \" || char === \"\\n\" || char === \"\t\" || char === \"\\r\";\nvar DECLARATION_ATTRIBUTE = /([\\w:-]+)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/g;\nvar parseDeclarationAttributes = (body) => Object.fromEntries([...body.matchAll(DECLARATION_ATTRIBUTE)].map(([, name, doubleQuoted, singleQuoted]) => [name, doubleQuoted !== null && doubleQuoted !== void 0 ? doubleQuoted : singleQuoted]));\n/**\n* Reads XML into a tree of {@link XmlElement}s, the shape xml-js gave for `xml2js(text)`.\n*\n* Throws on XML that isn't well formed, such as an element that isn't closed or an entity XML doesn't predefine.\n*\n* @param text - The XML\n* @param options - Whether to keep text that is only whitespace\n* @returns The document, with its declaration and the nodes at its top level\n*/\nvar parseXml = (text, { keepWhitespaceText = false } = {}) => {\n\tconst document = {};\n\tconst open = [];\n\tlet position = text.charCodeAt(0) === 65279 ? 1 : 0;\n\twhile (position < text.length && isWhitespace(text[position])) position++;\n\tconst append = (node) => {\n\t\tvar _parent$elements;\n\t\tconst parent = open.length === 0 ? document : open[open.length - 1];\n\t\t((_parent$elements = parent.elements) !== null && _parent$elements !== void 0 ? _parent$elements : parent.elements = []).push(node);\n\t};\n\tconst appendText = (raw) => {\n\t\tif (raw.trim() === \"\") {\n\t\t\tif (raw !== \"\" && keepWhitespaceText) append({\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: raw\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (open.length === 0) throw new Error(`Invalid XML: text outside of the root element, \"${raw.trim()}\"`);\n\t\tappend({\n\t\t\ttype: \"text\",\n\t\t\ttext: decodeEntities(raw)\n\t\t});\n\t};\n\tconst indexOfOrThrow = (search, from, what) => {\n\t\tconst index = text.indexOf(search, from);\n\t\tif (index === -1) throw new Error(`Invalid XML: ${what} that isn't closed`);\n\t\treturn index;\n\t};\n\twhile (position < text.length) {\n\t\tconst tagStart = text.indexOf(\"<\", position);\n\t\tappendText(text.slice(position, tagStart === -1 ? text.length : tagStart));\n\t\tif (tagStart === -1) break;\n\t\tif (text.startsWith(\"<?\", tagStart)) {\n\t\t\tconst end = indexOfOrThrow(\"?>\", tagStart + 2, \"processing instruction\");\n\t\t\tconst content = text.slice(tagStart + 2, end);\n\t\t\tconst nameEnd = content.search(/\\s/);\n\t\t\tconst name = nameEnd === -1 ? content : content.slice(0, nameEnd);\n\t\t\tconst body = nameEnd === -1 ? \"\" : content.slice(nameEnd).trimStart();\n\t\t\tif (name.toLowerCase() === \"xml\") {\n\t\t\t\tconst attributes = parseDeclarationAttributes(body);\n\t\t\t\tdocument.declaration = Object.keys(attributes).length > 0 ? { attributes } : {};\n\t\t\t} else append({\n\t\t\t\ttype: \"instruction\",\n\t\t\t\tname,\n\t\t\t\tinstruction: body\n\t\t\t});\n\t\t\tposition = end + 2;\n\t\t} else if (text.startsWith(\"<!--\", tagStart)) {\n\t\t\tconst end = indexOfOrThrow(\"-->\", tagStart + 4, \"comment\");\n\t\t\tconst comment = text.slice(tagStart + 4, end);\n\t\t\tif (comment !== \"\") append({\n\t\t\t\ttype: \"comment\",\n\t\t\t\tcomment\n\t\t\t});\n\t\t\tposition = end + 3;\n\t\t} else if (text.startsWith(\"<![CDATA[\", tagStart)) {\n\t\t\tconst end = indexOfOrThrow(\"]]>\", tagStart + 9, \"CDATA section\");\n\t\t\tconst cdata = text.slice(tagStart + 9, end);\n\t\t\tif (cdata !== \"\") append({\n\t\t\t\ttype: \"cdata\",\n\t\t\t\tcdata\n\t\t\t});\n\t\t\tposition = end + 3;\n\t\t} else if (text.startsWith(\"<!DOCTYPE\", tagStart)) {\n\t\t\tlet end = tagStart + 9;\n\t\t\tlet quote;\n\t\t\tlet inSubset = false;\n\t\t\tfor (; end < text.length; end++) {\n\t\t\t\tconst char = text[end];\n\t\t\t\tif (quote !== void 0) quote = char === quote ? void 0 : quote;\n\t\t\t\telse if (char === \"\\\"\" || char === \"'\") quote = char;\n\t\t\t\telse if (char === \"[\") inSubset = true;\n\t\t\t\telse if (char === \"]\") inSubset = false;\n\t\t\t\telse if (char === \">\" && !inSubset) break;\n\t\t\t}\n\t\t\tif (end === text.length) throw new Error(\"Invalid XML: DOCTYPE that isn't closed\");\n\t\t\tappend({\n\t\t\t\ttype: \"doctype\",\n\t\t\t\tdoctype: text.slice(tagStart + 9, end).replace(/^ /, \"\")\n\t\t\t});\n\t\t\tposition = end + 1;\n\t\t} else if (text.startsWith(\"</\", tagStart)) {\n\t\t\tconst end = indexOfOrThrow(\">\", tagStart + 2, \"closing tag\");\n\t\t\tconst name = text.slice(tagStart + 2, end).trimEnd();\n\t\t\tconst element = open.pop();\n\t\t\tif ((element === null || element === void 0 ? void 0 : element.name) !== name) {\n\t\t\t\tvar _element$name;\n\t\t\t\tthrow new Error(`Invalid XML: closing tag </${name}> doesn't match <${(_element$name = element === null || element === void 0 ? void 0 : element.name) !== null && _element$name !== void 0 ? _element$name : \"\"}>`);\n\t\t\t}\n\t\t\tposition = end + 1;\n\t\t} else position = parseStartTag(text, tagStart + 1, (element, selfClosing) => {\n\t\t\tappend(element);\n\t\t\tif (!selfClosing) open.push(element);\n\t\t});\n\t}\n\tif (open.length > 0) throw new Error(`Invalid XML: <${open[open.length - 1].name}> isn't closed`);\n\tconst { elements } = document, rest = _objectWithoutProperties(document, _excluded$4);\n\treturn elements === void 0 ? rest : _objectSpread2(_objectSpread2({}, rest), {}, { elements });\n};\n/**\n* Reads a start tag from just after its \"<\", such as `w:p w14:paraId=\"1A2B3C4D\">` or `w:br/>`.\n*\n* @returns The position just after the tag's \">\"\n*/\nvar parseStartTag = (text, from, onElement) => {\n\tlet nameEnd = from;\n\twhile (nameEnd < text.length && !isWhitespace(text[nameEnd]) && text[nameEnd] !== \"/\" && text[nameEnd] !== \">\") nameEnd++;\n\tconst name = text.slice(from, nameEnd);\n\tif (name === \"\") throw new Error(\"Invalid XML: tag without a name\");\n\tconst attributes = [];\n\tlet position = nameEnd;\n\tfor (;;) {\n\t\twhile (position < text.length && isWhitespace(text[position])) position++;\n\t\tif (position >= text.length) throw new Error(`Invalid XML: <${name}> that isn't closed`);\n\t\tif (text[position] === \">\" || text.startsWith(\"/>\", position)) {\n\t\t\tconst selfClosing = text[position] === \"/\";\n\t\t\tonElement(_objectSpread2({\n\t\t\t\ttype: \"element\",\n\t\t\t\tname\n\t\t\t}, attributes.length > 0 ? { attributes: Object.fromEntries(attributes) } : {}), selfClosing);\n\t\t\treturn position + (selfClosing ? 2 : 1);\n\t\t}\n\t\tconst equals = text.indexOf(\"=\", position);\n\t\tconst attributeName = text.slice(position, equals === -1 ? text.length : equals).trimEnd();\n\t\tif (equals === -1 || attributeName === \"\" || /[\\s/>]/.test(attributeName)) throw new Error(`Invalid XML: attribute of <${name}> without a value`);\n\t\tlet valueStart = equals + 1;\n\t\twhile (valueStart < text.length && isWhitespace(text[valueStart])) valueStart++;\n\t\tconst quote = text[valueStart];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") throw new Error(`Invalid XML: value of ${attributeName} on <${name}> isn't quoted`);\n\t\tconst valueEnd = text.indexOf(quote, valueStart + 1);\n\t\tif (valueEnd === -1) throw new Error(`Invalid XML: value of ${attributeName} on <${name}> isn't closed`);\n\t\tif (!attributes.some(([existing]) => existing === attributeName)) attributes.push([attributeName, decodeEntities(text.slice(valueStart + 1, valueEnd))]);\n\t\tposition = valueEnd + 1;\n\t}\n};\n// src/util/xml/stringify.ts\nvar ESCAPES = /* @__PURE__ */ new Map([\n\t[\"&\", \"&\"],\n\t[\"\\\"\", \""\"],\n\t[\"'\", \"'\"],\n\t[\"<\", \"<\"],\n\t[\">\", \">\"]\n]);\nvar escapeAll = (value) => value.replace(/[&\"'<>\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/g, (char) => {\n\tvar _ESCAPES$get;\n\treturn (_ESCAPES$get = ESCAPES.get(char)) !== null && _ESCAPES$get !== void 0 ? _ESCAPES$get : \"\";\n});\nvar escapeText = (value) => value.replace(/[&<>\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/g, (char) => {\n\tvar _ESCAPES$get2;\n\treturn (_ESCAPES$get2 = ESCAPES.get(char)) !== null && _ESCAPES$get2 !== void 0 ? _ESCAPES$get2 : \"\";\n});\n/**\n* Escapes a value the way the xml package did, leaving values that aren't strings, such as numbers, as they are.\n*/\nvar escapeValue = (value) => typeof value === \"string\" ? escapeAll(value) : value;\n/**\n* Works out an element's tag, attributes and content, as the xml package did, quirks and all, so that docx writes the\n* same XML byte for byte.\n*/\nvar resolve = (data, indent, depth) => {\n\tconst name = Object.keys(data)[0];\n\tconst values = name === void 0 ? void 0 : data[name];\n\tconst attributes = [];\n\tconst content = [];\n\tconst addAttributes = (attr) => {\n\t\tfor (const [key, value] of Object.entries(attr)) attributes.push(`${key}=\"${String(escapeValue(value))}\"`);\n\t};\n\tif (typeof values === \"object\") {\n\t\tif (values !== null) {\n\t\t\tconst { _attr: attr, _cdata: cdata } = values;\n\t\t\tif (attr) addAttributes(attr);\n\t\t\tif (cdata) content.push(`<![CDATA[${cdata.replace(/\\]\\]>/g, \"]]]]><![CDATA[>\")}]]>`);\n\t\t\tif (Array.isArray(values)) {\n\t\t\t\tlet isStringContent = false;\n\t\t\t\tcontent.push(\"\");\n\t\t\t\tfor (const value of values) if (typeof value === \"object\") {\n\t\t\t\t\tif (Object.keys(value)[0] === \"_attr\") addAttributes(value._attr);\n\t\t\t\t\telse content.push(resolve(value, indent, depth + 1));\n\t\t\t\t} else {\n\t\t\t\t\tcontent.pop();\n\t\t\t\t\tisStringContent = true;\n\t\t\t\t\tcontent.push(escapeValue(value));\n\t\t\t\t}\n\t\t\t\tif (!isStringContent) content.push(\"\");\n\t\t\t}\n\t\t}\n\t} else content.push(escapeValue(values));\n\treturn {\n\t\tname,\n\t\tattributes,\n\t\tcontent,\n\t\tindents: depth > 1 ? indent.repeat(depth - 1) : \"\"\n\t};\n};\nvar format = (element, indent, isLast) => {\n\tif (typeof element !== \"object\") return String(element);\n\tconst { name, attributes, content, indents } = element;\n\tconst { length } = content;\n\tconst open = indents + (name ? `<${name}` : \"\") + (attributes.length > 0 ? ` ${attributes.join(\" \")}` : \"\") + (length > 0 ? name ? \">\" : \"\" : \"/>\") + (indent && length > 1 ? \"\\n\" : \"\");\n\tif (length === 0) return open + (indent ? \"\\n\" : \"\");\n\treturn open + content.map((child) => child === void 0 ? \"\" : format(child, indent, false)).join(\"\") + (length > 1 ? indents : \"\") + (name ? `</${name}>` : \"\") + (indent && !isLast ? \"\\n\" : \"\");\n};\n/**\n* Writes the XML of an object from docx's `Formatter`, such as `{ \"w:b\": { _attr: { \"w:val\": false } } }`,\n* as the xml package did.\n*\n* @param input - The object, or several to write one after another\n* @param options - How to indent, and the XML declaration to write first\n* @returns The XML\n*/\nvar stringifyXmlable = (input, { indent = \"\", declaration } = {}) => {\n\tconst items = Array.isArray(input) ? input : [input];\n\tconst startDepth = indent ? 1 : 0;\n\tconst standalone = (declaration === null || declaration === void 0 ? void 0 : declaration.standalone) ? ` standalone=\"${escapeAll(declaration.standalone)}\"` : \"\";\n\treturn (declaration === void 0 ? \"\" : `<?xml version=\"1.0\" encoding=\"${escapeAll(declaration.encoding || \"UTF-8\")}\"${standalone}?>${indent ? \"\\n\" : \"\"}`) + items.map((item, i) => format(resolve(item, indent, startDepth), indent, i === items.length - 1)).join(\"\");\n};\nvar stringifyAttributes = (attributes) => Object.entries(attributes !== null && attributes !== void 0 ? attributes : {}).flatMap(([key, value]) => value === void 0 || value === null ? [] : [` ${key}=\"${escapeAll(String(value))}\"`]).join(\"\");\nvar stringifyNode = (node) => {\n\tswitch (node.type) {\n\t\tcase \"element\": {\n\t\t\tvar _node$elements, _node$attributes;\n\t\t\tconst elements = (_node$elements = node.elements) !== null && _node$elements !== void 0 ? _node$elements : [];\n\t\t\tconst open = `<${node.name}${stringifyAttributes(node.attributes)}`;\n\t\t\treturn elements.length > 0 || ((_node$attributes = node.attributes) === null || _node$attributes === void 0 ? void 0 : _node$attributes[\"xml:space\"]) === \"preserve\" ? `${open}>${elements.map(stringifyNode).join(\"\")}</${node.name}>` : `${open}/>`;\n\t\t}\n\t\tcase \"text\": return escapeText(String(node.text));\n\t\tcase \"cdata\": return `<![CDATA[${String(node.cdata).replace(/\\]\\]>/g, \"]]]]><![CDATA[>\")}]]>`;\n\t\tcase \"comment\": return `<!--${node.comment}-->`;\n\t\tcase \"doctype\": return `<!DOCTYPE ${node.doctype}>`;\n\t\tcase \"instruction\": return `<?${node.name}${node.instruction ? ` ${node.instruction}` : \"\"}?>`;\n\t\tdefault: return \"\";\n\t}\n};\n/**\n* Writes the XML of an {@link XmlElement} tree, such as one from {@link parseXml}.\n*\n* @param document - The document, with its declaration and the nodes at its top level\n* @returns The XML\n*/\nvar stringifyElement = (document) => {\n\tvar _document$elements;\n\treturn (document.declaration ? `<?xml${stringifyAttributes(document.declaration.attributes)}?>` : \"\") + ((_document$elements = document.elements) !== null && _document$elements !== void 0 ? _document$elements : []).map(stringifyNode).join(\"\");\n};\n// src/file/xml-components/imported-xml-component.ts\n/**\n* Imported XML Component module for handling external XML content.\n*\n* This module provides functionality to import existing XML content and convert it\n* into XmlComponent trees. This is useful for incorporating XML from external sources\n* or templates into generated documents.\n*\n* @module\n*/\n/**\n* Converts an XML element, in the shape of xml-js's non-compact `Element`, into an XmlComponent tree.\n*\n* This function recursively processes the element and creates a tree of\n* ImportedXmlComponent objects that match the structure of the original XML.\n*\n* @param element - The XML element as an {@link XmlElement}\n* @returns An ImportedXmlComponent tree, text string, or undefined\n*\n* @example\n* ```typescript\n* const component = convertToXmlComponent({\n* type: \"element\",\n* name: \"w:p\",\n* elements: [{ type: \"element\", name: \"w:r\", elements: [{ type: \"element\", name: \"w:t\", elements: [{ type: \"text\", text: \"Hello\" }] }] }],\n* });\n* ```\n*/\nvar convertToXmlComponent = (element) => {\n\tswitch (element.type) {\n\t\tcase void 0:\n\t\tcase \"element\":\n\t\t\tconst xmlComponent = new ImportedXmlComponent(element.name, element.attributes);\n\t\t\tconst childElements = element.elements || [];\n\t\t\tfor (const childElm of childElements) {\n\t\t\t\tconst child = convertToXmlComponent(childElm);\n\t\t\t\tif (child !== void 0) xmlComponent.push(child);\n\t\t\t}\n\t\t\treturn xmlComponent;\n\t\tcase \"text\": return element.text;\n\t\tdefault: return;\n\t}\n};\n/**\n* Internal attribute component for imported XML elements.\n* @internal\n*/\nvar ImportedXmlComponentAttributes = class extends XmlAttributeComponent {};\n/**\n* XML component representing imported XML content.\n*\n* ImportedXmlComponent allows you to parse XML strings and incorporate them\n* into the document structure. This is particularly useful when working with\n* templates or when you need to include pre-existing XML fragments.\n*\n* @example\n* ```typescript\n* // Parse XML string into component tree\n* const component = ImportedXmlComponent.fromXmlString(\n* '<w:p><w:r><w:t>Hello World</w:t></w:r></w:p>'\n* );\n*\n* // Manually create an imported component\n* const element = new ImportedXmlComponent(\"w:customElement\", { \"w:val\": \"value\" });\n* element.push(new ImportedXmlComponent(\"w:child\"));\n* ```\n*/\nvar ImportedXmlComponent = class extends XmlComponent {\n\t/**\n\t* Parses an XML string and converts it to an ImportedXmlComponent tree.\n\t*\n\t* This static method is the primary way to import external XML content.\n\t* It parses the XML string into an {@link XmlElement} tree,\n\t* then converts that into a tree of XmlComponent objects.\n\t*\n\t* @param importedContent - The XML content as a string\n\t* @returns An ImportedXmlComponent representing the parsed XML\n\t*\n\t* @example\n\t* ```typescript\n\t* const xml = '<w:p><w:r><w:t>Hello</w:t></w:r></w:p>';\n\t* const component = ImportedXmlComponent.fromXmlString(xml);\n\t* ```\n\t*/\n\tstatic fromXmlString(importedContent) {\n\t\treturn convertToXmlComponent(parseXml(importedContent));\n\t}\n\t/**\n\t* Creates an ImportedXmlComponent.\n\t*\n\t* @param rootKey - The XML element name\n\t* @param _attr - Optional attributes for the root element\n\t*/\n\tconstructor(rootKey, _attr) {\n\t\tsuper(rootKey);\n\t\tif (_attr) this.root.push(new ImportedXmlComponentAttributes(_attr));\n\t}\n\t/**\n\t* Adds a child component or text to this element.\n\t*\n\t* @param xmlComponent - The child component or text string to add\n\t*/\n\tpush(xmlComponent) {\n\t\tthis.root.push(xmlComponent);\n\t}\n};\n/**\n* Represents attributes for imported root elements.\n*\n* This class is used internally to handle attributes on root elements\n* that are being imported from external XML. It passes through the\n* attributes without transformation.\n*\n* @example\n* ```typescript\n* const attrs = new ImportedRootElementAttributes({\n* \"xmlns:w\": \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"\n* });\n* ```\n*/\nvar ImportedRootElementAttributes = class extends XmlComponent {\n\t/**\n\t* Creates an ImportedRootElementAttributes component.\n\t*\n\t* @param _attr - The attributes object to pass through\n\t*/\n\tconstructor(_attr) {\n\t\tsuper(\"\");\n\t\t_defineProperty(this, \"_attr\", void 0);\n\t\tthis._attr = _attr;\n\t}\n\t/**\n\t* Prepares the attributes for XML serialization.\n\t*\n\t* @param _ - Context (unused)\n\t* @returns Object with _attr key containing the raw attributes\n\t*/\n\tprepForXml(_) {\n\t\treturn { _attr: this._attr };\n\t}\n};\n// src/file/xml-components/initializable-xml-component.ts\n/**\n* Initializable XML Component module.\n*\n* This module provides a base class for XML components that can be initialized\n* from another component's state, useful for component reuse and composition.\n*\n* @module\n*/\n/**\n* XML component that can be initialized from another component.\n*\n* InitializableXmlComponent extends XmlComponent to support copying the internal\n* state (root array) from another component. This is useful when you need to\n* create a new component that shares or extends the children of an existing component.\n*\n* @example\n* ```typescript\n* class MyElement extends InitializableXmlComponent {\n* constructor(init?: MyElement) {\n* super(\"w:myElement\", init);\n* // If init is provided, this.root is copied from init\n* // Otherwise, this.root is an empty array\n* }\n* }\n*\n* const element1 = new MyElement();\n* element1.addChildElement(new TextRun(\"Hello\"));\n*\n* const element2 = new MyElement(element1);\n* // element2 now has the same children as element1\n* ```\n*/\nvar InitializableXmlComponent = class extends XmlComponent {\n\t/**\n\t* Creates a new InitializableXmlComponent.\n\t*\n\t* @param rootKey - The XML element name\n\t* @param initComponent - Optional component to copy children from\n\t*/\n\tconstructor(rootKey, initComponent) {\n\t\tsuper(rootKey);\n\t\tif (initComponent) this.root = initComponent.root;\n\t}\n};\n// src/util/values.ts\n/**\n* Validates and converts a number to an integer (decimal number).\n*\n* Reference: ST_DecimalNumber in OOXML specification\n*\n* @param val - The number to validate and convert\n* @returns The floored integer value\n* @throws Error if the value is NaN or infinite, which no integer can be written as\n*\n* @example\n* ```typescript\n* const num = decimalNumber(10.7); // Returns 10\n* const negative = decimalNumber(-5.3); // Returns -6\n* ```\n*/\nvar decimalNumber = (val) => {\n\tif (!Number.isFinite(val)) throw new Error(`Invalid value '${val}' specified. Must be an integer.`);\n\treturn Math.floor(val);\n};\n/**\n* Validates and converts a number to a positive integer (unsigned decimal number).\n*\n* Reference: ST_UnsignedDecimalNumber in OOXML specification\n*\n* @param val - The number to validate and convert\n* @returns The floored positive integer value\n* @throws Error if the value is NaN, infinite or negative\n*\n* @example\n* ```typescript\n* const num = unsignedDecimalNumber(10.7); // Returns 10\n* const invalid = unsignedDecimalNumber(-5); // Throws Error\n* ```\n*/\nvar unsignedDecimalNumber = (val) => {\n\tconst value = decimalNumber(val);\n\tif (value < 0) throw new Error(`Invalid value '${val}' specified. Must be a positive integer.`);\n\treturn value;\n};\n/**\n* Validates and normalizes a hexadecimal binary value.\n*\n* The xsd:hexBinary type represents binary data as a sequence of binary octets\n* using hexadecimal encoding, where each binary octet is a two-character\n* hexadecimal number. Both lowercase and uppercase letters A-F are permitted.\n*\n* @param val - The hexadecimal string to validate\n* @param length - The expected length in bytes (not characters)\n* @returns The validated hexadecimal string\n* @throws Error if the value is not a valid hex string of the expected length\n*\n* @example\n* ```typescript\n* hexBinary(\"0FB8\", 2); // Valid: 2 bytes = 4 characters\n* hexBinary(\"ABC\", 2); // Invalid: wrong length\n* ```\n*/\nvar hexBinary = (val, length) => {\n\tconst expectedLength = length * 2;\n\tif (val.length !== expectedLength || isNaN(Number(`0x${val}`))) throw new Error(`Invalid hex value '${val}'. Expected ${expectedLength} digit hex value`);\n\treturn val;\n};\n/**\n* Validates a long hexadecimal number (4 bytes / 8 characters).\n*\n* Reference: ST_LongHexNumber in OOXML specification\n*\n* @param val - The hexadecimal string to validate\n* @returns The validated hexadecimal string\n* @throws Error if the value is not a valid 8-character hex string\n*\n* @example\n* ```typescript\n* const hex = longHexNumber(\"ABCD1234\"); // Valid\n* ```\n*/\nvar longHexNumber = (val) => hexBinary(val, 4);\n/**\n* Validates a short hexadecimal number (2 bytes / 4 characters).\n*\n* Reference: ST_ShortHexNumber in OOXML specification\n*\n* @param val - The hexadecimal string to validate\n* @returns The validated hexadecimal string\n* @throws Error if the value is not a valid 4-character hex string\n*\n* @example\n* ```typescript\n* const hex = shortHexNumber(\"AB12\"); // Valid\n* ```\n*/\nvar shortHexNumber = (val) => hexBinary(val, 2);\n/**\n* Validates a single-byte hexadecimal number (1 byte / 2 characters).\n*\n* Reference: ST_UcharHexNumber in OOXML specification\n*\n* @param val - The hexadecimal string to validate\n* @returns The validated hexadecimal string\n* @throws Error if the value is not a valid 2-character hex string\n*\n* @example\n* ```typescript\n* const hex = uCharHexNumber(\"FF\"); // Valid\n* ```\n*/\nvar uCharHexNumber = (val) => hexBinary(val, 1);\n/**\n* Normalizes a universal measure value by parsing and reformatting.\n*\n* Ensures the numeric portion is properly formatted while preserving the unit.\n*\n* Reference: ST_UniversalMeasure in OOXML specification\n*\n* @param val - The universal measure string to normalize\n* @returns The normalized universal measure\n*\n* @example\n* ```typescript\n* const measure = universalMeasureValue(\"10.500mm\"); // Returns \"10.5mm\"\n* ```\n*/\nvar universalMeasureValue = (val) => {\n\tconst unit = val.slice(-2);\n\tconst amount = val.substring(0, val.length - 2);\n\treturn `${Number(amount)}${unit}`;\n};\n/**\n* Twips per unit for each universal measure suffix.\n*\n* 1 inch = 72 points = 1440 twips; 1 pica = 12 points.\n*/\nvar TWIPS_PER_UNIT = {\n\tin: 1440,\n\tcm: 1440 / 2.54,\n\tmm: 1440 / 25.4,\n\tpt: 20,\n\tpc: 240,\n\tpi: 240\n};\n/**\n* Converts a universal measure (or a value already in twips) into twips.\n*\n* Numbers are assumed to already be in twips and are returned unchanged.\n* Strings are converted according to their unit suffix.\n*\n* @param val - A number of twips or a universal measure such as \"10mm\" or \"1.5in\"\n* @returns The equivalent number of twips (not rounded)\n*\n* @example\n* ```typescript\n* universalMeasureToTwips(720); // Returns 720\n* universalMeasureToTwips(\"1in\"); // Returns 1440\n* universalMeasureToTwips(\"2.54cm\"); // Returns 1440\n* ```\n*/\nvar universalMeasureToTwips = (val) => {\n\tif (typeof val === \"number\") return val;\n\tconst unit = val.slice(-2);\n\tconst amount = Number(val.substring(0, val.length - 2));\n\tconst twipsPerUnit = TWIPS_PER_UNIT[unit];\n\tif (twipsPerUnit === void 0 || Number.isNaN(amount)) throw new Error(`Invalid universal measure '${val}'. Expected a number followed by mm, cm, in, pt, pc or pi.`);\n\treturn amount * twipsPerUnit;\n};\n/**\n* Validates and normalizes a positive universal measure value.\n*\n* Reference: ST_PositiveUniversalMeasure in OOXML specification\n*\n* @param val - The positive universal measure string to validate\n* @returns The normalized positive universal measure\n* @throws Error if the value is negative\n*\n* @example\n* ```typescript\n* const measure = positiveUniversalMeasureValue(\"10.5mm\"); // Valid\n* const invalid = positiveUniversalMeasureValue(\"-5mm\"); // Throws Error\n* ```\n*/\nvar positiveUniversalMeasureValue = (val) => {\n\tconst value = universalMeasureValue(val);\n\tif (parseFloat(value) < 0) throw new Error(`Invalid value '${value}' specified. Expected a positive number.`);\n\treturn value;\n};\n/**\n* Validates and normalizes a hexadecimal color value.\n*\n* Accepts either \"auto\" or a 6-character RGB hex value (with or without # prefix).\n* The # prefix is commonly used but technically invalid in OOXML, so it is stripped\n* for strict compliance.\n*\n* Reference: ST_HexColor in OOXML specification\n*\n* @param val - The color value to validate (\"auto\" or hex color)\n* @returns The normalized color value\n* @throws Error if the hex color is invalid\n*\n* @example\n* ```typescript\n* const color1 = hexColorValue(\"auto\"); // Returns \"auto\"\n* const color2 = hexColorValue(\"FF0000\"); // Returns \"FF0000\"\n* const color3 = hexColorValue(\"#00FF00\"); // Returns \"00FF00\" (# stripped)\n* ```\n*/\nvar hexColorValue = (val) => {\n\tif (val === \"auto\") return val;\n\treturn hexBinary(val.charAt(0) === \"#\" ? val.substring(1) : val, 3);\n};\n/**\n* Validates a signed TWIP measurement value.\n*\n* Accepts either a universal measure string or a numeric TWIP value.\n*\n* Reference: ST_SignedTwipsMeasure in OOXML specification\n*\n* @param val - The measurement value (universal measure or number)\n* @returns The normalized measurement value\n*\n* @example\n* ```typescript\n* const measure1 = signedTwipsMeasureValue(\"10mm\");\n* const measure2 = signedTwipsMeasureValue(1440); // 1 inch in TWIP\n* ```\n*/\nvar signedTwipsMeasureValue = (val) => typeof val === \"string\" ? universalMeasureValue(val) : decimalNumber(val);\n/**\n* Validates a half-point (HPS) measurement value.\n*\n* Accepts either a positive universal measure string or a positive number.\n* HPS (half-points) are commonly used for font sizes.\n*\n* Reference: ST_HpsMeasure in OOXML specification\n*\n* @param val - The measurement value (positive universal measure or number)\n* @returns The normalized measurement value\n*\n* @example\n* ```typescript\n* const fontSize1 = hpsMeasureValue(\"12pt\");\n* const fontSize2 = hpsMeasureValue(24); // 12pt in half-points\n* ```\n*/\nvar hpsMeasureValue = (val) => typeof val === \"string\" ? positiveUniversalMeasureValue(val) : unsignedDecimalNumber(val);\n/**\n* Validates a signed half-point (HPS) measurement value.\n*\n* Accepts either a universal measure string or a numeric value.\n*\n* Reference: ST_SignedHpsMeasure in OOXML specification\n*\n* @param val - The measurement value (universal measure or number)\n* @returns The normalized measurement value\n*\n* @example\n* ```typescript\n* const spacing1 = signedHpsMeasureValue(\"6pt\");\n* const spacing2 = signedHpsMeasureValue(-12); // Negative spacing\n* ```\n*/\nvar signedHpsMeasureValue = (val) => typeof val === \"string\" ? universalMeasureValue(val) : decimalNumber(val);\n/**\n* Validates a positive TWIP measurement value.\n*\n* Accepts either a positive universal measure string or a positive number.\n*\n* Reference: ST_TwipsMeasure in OOXML specification\n*\n* @param val - The measurement value (positive universal measure or number)\n* @returns The normalized measurement value\n*\n* @example\n* ```typescript\n* const width1 = twipsMeasureValue(\"25.4mm\");\n* const width2 = twipsMeasureValue(1440); // 1 inch in TWIP\n* ```\n*/\nvar twipsMeasureValue = (val) => typeof val === \"string\" ? positiveUniversalMeasureValue(val) : unsignedDecimalNumber(val);\n/**\n* Normalizes a percentage value by parsing and reformatting.\n*\n* Reference: ST_Percentage in OOXML specification\n*\n* @param val - The percentage string to normalize\n* @returns The normalized percentage\n*\n* @example\n* ```typescript\n* const percent = percentageValue(\"50.000%\"); // Returns \"50%\"\n* ```\n*/\nvar percentageValue = (val) => {\n\tconst percent = val.substring(0, val.length - 1);\n\treturn `${Number(percent)}%`;\n};\n/**\n* Validates a measurement value that can be expressed as a number, percentage, or universal measure.\n*\n* Reference: ST_MeasurementOrPercent in OOXML specification\n*\n* @param val - The measurement value (number, percentage, or universal measure)\n* @returns The normalized measurement value\n*\n* @example\n* ```typescript\n* const measure1 = measurementOrPercentValue(100); // Unqualified number\n* const measure2 = measurementOrPercentValue(\"50%\"); // Percentage\n* const measure3 = measurementOrPercentValue(\"10mm\"); // Universal measure\n* ```\n*/\nvar measurementOrPercentValue = (val) => {\n\tif (typeof val === \"number\") return decimalNumber(val);\n\treturn val.slice(-1) === \"%\" ? percentageValue(val) : universalMeasureValue(val);\n};\n/**\n* Validates an eighth-point measurement value.\n*\n* Eighth-points are used for fine-grained measurements in text formatting.\n*\n* Reference: ST_EighthPointMeasure in OOXML specification\n*\n* @param val - The measurement value in eighth-points\n* @returns The validated positive integer value\n*\n* @example\n* ```typescript\n* const measure = eighthPointMeasureValue(16); // 2 points\n* ```\n*/\nvar eighthPointMeasureValue = unsignedDecimalNumber;\n/**\n* Validates a point measurement value.\n*\n* Reference: ST_PointMeasure in OOXML specification\n*\n* @param val - The measurement value in points\n* @returns The validated positive integer value\n*\n* @example\n* ```typescript\n* const fontSize = pointMeasureValue(12); // 12pt\n* ```\n*/\nvar pointMeasureValue = unsignedDecimalNumber;\n/**\n* Converts a JavaScript Date object to an ISO 8601 date-time string.\n*\n* The format is CCYY-MM-DDThh:mm:ss.sssZ where T is a literal and Z indicates UTC.\n* This matches the xsd:dateTime format required by OOXML.\n*\n* Reference: ST_DateTime in OOXML specification\n*\n* @param val - The Date object to convert\n* @returns An ISO 8601 formatted date-time string\n*\n* @example\n* ```typescript\n* const now = new Date();\n* const timestamp = dateTimeValue(now); // Returns \"2024-01-15T10:30:00.000Z\"\n* ```\n*/\nvar dateTimeValue = (val) => val.toISOString();\n// src/file/xml-components/simple-elements.ts\n/**\n* Simple XML element types for common WordprocessingML patterns.\n*\n* This module provides reusable element classes for common XML patterns in OOXML,\n* such as boolean elements, string values, number values, and empty elements.\n* These are building blocks used throughout the library.\n*\n* @module\n*/\n/**\n* XML element representing a boolean on/off value (CT_OnOff).\n*\n* This element type is used throughout WordprocessingML to represent boolean properties.\n* A value of true (or 1) means the property is enabled. A value of false (or 0) means\n* it is explicitly disabled. When the value is true, the attribute is often omitted.\n*\n* OOXML Reference:\n* ```xml\n* <xsd:complexType name=\"CT_OnOff\">\n* <xsd:attribute name=\"val\" type=\"s:ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Bold enabled (w:val omitted when true)\n* new OnOffElement(\"w:b\", true);\n* // Generates: <w:b/>\n*\n* // Bold explicitly disabled\n* new OnOffElement(\"w:b\", false);\n* // Generates: <w:b w:val=\"false\"/>\n* ```\n*/\nvar OnOffElement = class extends XmlComponent {\n\t/**\n\t* Creates an OnOffElement.\n\t*\n\t* @param name - The XML element name (e.g., \"w:b\", \"w:i\")\n\t* @param val - The boolean value (defaults to true)\n\t*/\n\tconstructor(name, val = true) {\n\t\tsuper(name);\n\t\tif (val !== true) this.root.push(new Attributes({ val }));\n\t}\n};\n/**\n* XML element representing a half-point size measurement (CT_HpsMeasure).\n*\n* HpsMeasure elements are used for font sizes and other measurements in WordprocessingML.\n* Values can be specified as numbers (interpreted as half-points) or with explicit units.\n*\n* OOXML Reference:\n* ```xml\n* <xsd:complexType name=\"CT_HpsMeasure\">\n* <xsd:attribute name=\"val\" type=\"ST_HpsMeasure\" use=\"required\"/>\n* </xsd:complexType>\n*\n* <xsd:simpleType name=\"ST_HpsMeasure\">\n* <xsd:union memberTypes=\"s:ST_UnsignedDecimalNumber s:ST_PositiveUniversalMeasure\" />\n* </xsd:simpleType>\n* ```\n*\n* @example\n* ```typescript\n* // Font size of 24 half-points (12pt)\n* new HpsMeasureElement(\"w:sz\", 24);\n* // Generates: <w:sz w:val=\"24\"/>\n*\n* // Using explicit units\n* new HpsMeasureElement(\"w:sz\", \"12pt\");\n* ```\n*/\nvar HpsMeasureElement = class extends XmlComponent {\n\t/**\n\t* Creates an HpsMeasureElement.\n\t*\n\t* @param name - The XML element name\n\t* @param val - The measurement value (number in half-points or string with units)\n\t*/\n\tconstructor(name, val) {\n\t\tsuper(name);\n\t\tthis.root.push(new Attributes({ val: hpsMeasureValue(val) }));\n\t}\n};\n/**\n* XML element representing an empty element (CT_Empty).\n*\n* EmptyElement creates self-closing XML tags with no attributes or content.\n*\n* OOXML Reference:\n* ```xml\n* <xsd:complexType name=\"CT_Empty\"/>\n* ```\n*\n* @example\n* ```typescript\n* new EmptyElement(\"w:noProof\");\n* // Generates: <w:noProof/>\n* ```\n*/\nvar EmptyElement = class extends XmlComponent {};\n/**\n* XML element with a string value attribute (CT_String).\n*\n* StringValueElement creates elements with a single \"w:val\" attribute\n* containing a string value.\n*\n* OOXML Reference:\n* ```xml\n* <xsd:complexType name=\"CT_String\">\n* <xsd:attribute name=\"val\" type=\"s:ST_String\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new StringValueElement(\"w:style\", \"Heading1\");\n* // Generates: <w:style w:val=\"Heading1\"/>\n* ```\n*/\nvar StringValueElement = class extends XmlComponent {\n\t/**\n\t* Creates a StringValueElement.\n\t*\n\t* @param name - The XML element name\n\t* @param val - The string value\n\t*/\n\tconstructor(name, val) {\n\t\tsuper(name);\n\t\tthis.root.push(new Attributes({ val }));\n\t}\n};\n/**\n* Creates a string element using the builder pattern.\n*\n* This is an alternative to StringValueElement that uses BuilderElement\n* for more explicit attribute naming.\n*\n* @param name - The XML element name\n* @param value - The string value\n* @returns An XmlComponent with the string value\n*\n* @example\n* ```typescript\n* createStringElement(\"w:pStyle\", \"Heading1\");\n* // Generates: <w:pStyle w:val=\"Heading1\"/>\n* ```\n*/\nvar createStringElement = (name, value) => new BuilderElement({\n\tname,\n\tattributes: { value: {\n\t\tkey: \"w:val\",\n\t\tvalue\n\t} }\n});\n/**\n* XML element with a numeric value attribute.\n*\n* NumberValueElement creates elements with a single \"w:val\" attribute\n* containing a numeric value.\n*\n* @example\n* ```typescript\n* new NumberValueElement(\"w:ilvl\", 2);\n* // Generates: <w:ilvl w:val=\"2\"/>\n* ```\n*/\nvar NumberValueElement = class extends XmlComponent {\n\t/**\n\t* Creates a NumberValueElement.\n\t*\n\t* @param name - The XML element name\n\t* @param val - The numeric value\n\t*/\n\tconstructor(name, val) {\n\t\tsuper(name);\n\t\tthis.root.push(new Attributes({ val }));\n\t}\n};\n/**\n* XML element with a string enum value attribute.\n*\n* StringEnumValueElement is similar to StringValueElement but uses a generic\n* type parameter to enforce type safety for enum values.\n*\n* @example\n* ```typescript\n* type AlignmentType = \"left\" | \"center\" | \"right\";\n* new StringEnumValueElement<AlignmentType>(\"w:jc\", \"center\");\n* // Generates: <w:jc w:val=\"center\"/>\n* ```\n*/\nvar StringEnumValueElement = class extends XmlComponent {\n\t/**\n\t* Creates a StringEnumValueElement.\n\t*\n\t* @param name - The XML element name\n\t* @param val - The enum value\n\t*/\n\tconstructor(name, val) {\n\t\tsuper(name);\n\t\tthis.root.push(new Attributes({ val }));\n\t}\n};\n/**\n* XML element containing text content.\n*\n* StringContainer creates elements with text content (not attributes).\n* This is used for elements where the value is the text node content\n* rather than an attribute.\n*\n* @example\n* ```typescript\n* new StringContainer(\"w:author\", \"John Doe\");\n* // Generates: <w:author>John Doe</w:author>\n* ```\n*/\nvar StringContainer = class extends XmlComponent {\n\t/**\n\t* Creates a StringContainer.\n\t*\n\t* @param name - The XML element name\n\t* @param val - The text content\n\t*/\n\tconstructor(name, val) {\n\t\tsuper(name);\n\t\tthis.root.push(val);\n\t}\n};\n/**\n* Flexible XML element builder with explicit attribute and child configuration.\n*\n* BuilderElement provides a structured way to create XML elements with typed\n* attributes and children. It uses the NextAttributeComponent pattern for\n* explicit attribute key-value mapping.\n*\n* @example\n* ```typescript\n* // Element with attributes\n* new BuilderElement({\n* name: \"w:spacing\",\n* attributes: {\n* before: { key: \"w:before\", value: 240 },\n* after: { key: \"w:after\", value: 120 }\n* }\n* });\n* // Generates: <w:spacing w:before=\"240\" w:after=\"120\"/>\n*\n* // Element with children\n* new BuilderElement({\n* name: \"w:pPr\",\n* children: [\n* new StringValueElement(\"w:pStyle\", \"Heading1\")\n* ]\n* });\n* ```\n*/\nvar BuilderElement = class extends XmlComponent {\n\t/**\n\t* Creates a BuilderElement with the specified configuration.\n\t*\n\t* @param config - Element configuration\n\t* @param config.name - The XML element name\n\t* @param config.attributes - Optional attributes with explicit key-value pairs\n\t* @param config.children - Optional child elements\n\t*/\n\tconstructor({ name, attributes, children }) {\n\t\tsuper(name);\n\t\tif (attributes) this.root.push(new NextAttributeComponent(attributes));\n\t\tif (children) this.root.push(...children);\n\t}\n};\n// src/file/paragraph/formatting/alignment.ts\n/**\n* Paragraph and table alignment module for WordprocessingML documents.\n*\n* This module provides justification (alignment) options for paragraphs and tables.\n*\n* Reference: http://officeopenxml.com/WPalignment.php\n*\n* @see http://officeopenxml.com/WPtableAlignment.php\n* @see http://www.datypic.com/sc/ooxml/t-w_ST_Jc.html\n*\n* @module\n*/\n/**\n* Paragraph justification (alignment) types.\n*\n* Specifies the horizontal alignment of text within a paragraph.\n*\n* Reference: http://officeopenxml.com/WPalignment.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_Jc\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"start\"/>\n* <xsd:enumeration value=\"center\"/>\n* <xsd:enumeration value=\"end\"/>\n* <xsd:enumeration value=\"both\"/>\n* <xsd:enumeration value=\"mediumKashida\"/>\n* <xsd:enumeration value=\"distribute\"/>\n* <xsd:enumeration value=\"numTab\"/>\n* <xsd:enumeration value=\"highKashida\"/>\n* <xsd:enumeration value=\"lowKashida\"/>\n* <xsd:enumeration value=\"thaiDistribute\"/>\n* <xsd:enumeration value=\"left\"/>\n* <xsd:enumeration value=\"right\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar AlignmentType = {\n\t/** Align Start: the left in a left-to-right paragraph, and the right in a `bidirectional` (right-to-left) paragraph */\n\tSTART: \"start\",\n\t/** Align Center */\n\tCENTER: \"center\",\n\t/** Align End: the right in a left-to-right paragraph, and the left in a `bidirectional` (right-to-left) paragraph */\n\tEND: \"end\",\n\t/** Justified */\n\tBOTH: \"both\",\n\t/** Medium Kashida Length */\n\tMEDIUM_KASHIDA: \"mediumKashida\",\n\t/** Distribute All Characters Equally */\n\tDISTRIBUTE: \"distribute\",\n\t/** Align to List Tab */\n\tNUM_TAB: \"numTab\",\n\t/** Widest Kashida Length */\n\tHIGH_KASHIDA: \"highKashida\",\n\t/** Low Kashida Length */\n\tLOW_KASHIDA: \"lowKashida\",\n\t/** Thai Language Justification */\n\tTHAI_DISTRIBUTE: \"thaiDistribute\",\n\t/** Align Left: a paragraph stays on the left of the page even when it is `bidirectional` (right-to-left) */\n\tLEFT: \"left\",\n\t/** Align Right: a paragraph stays on the right of the page even when it is `bidirectional` (right-to-left) */\n\tRIGHT: \"right\",\n\t/** Justified */\n\tJUSTIFIED: \"both\"\n};\n/**\n* Creates paragraph alignment (justification) element for a WordprocessingML document.\n*\n* The jc element specifies the horizontal alignment of all text in the paragraph.\n*\n* Reference: http://officeopenxml.com/WPalignment.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Jc\">\n* <xsd:attribute name=\"val\" type=\"ST_Jc\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* alignment: AlignmentType.CENTER,\n* children: [new TextRun(\"Centered text\")],\n* });\n* ```\n*/\nvar createAlignment = (type) => new BuilderElement({\n\tname: \"w:jc\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: type\n\t} }\n});\n// src/file/theme/color-scheme.ts\n/**\n* Color scheme module for DrawingML themes.\n*\n* The twelve colors of a document's theme: the dark and light colors text and backgrounds use, six accent colors,\n* and the colors of hyperlinks.\n*\n* Reference: http://officeopenxml.com/drwTheme.php\n*\n* @module\n*/\nvar COLOR_OOXML_NAMES = {\n\tdark1: \"dk1\",\n\tlight1: \"lt1\",\n\tdark2: \"dk2\",\n\tlight2: \"lt2\",\n\taccent1: \"accent1\",\n\taccent2: \"accent2\",\n\taccent3: \"accent3\",\n\taccent4: \"accent4\",\n\taccent5: \"accent5\",\n\taccent6: \"accent6\",\n\thyperlink: \"hlink\",\n\tfollowedHyperlink: \"folHlink\"\n};\nvar OFFICE_COLORS = {\n\tdark2: \"44546A\",\n\tlight2: \"E7E6E6\",\n\taccent1: \"4472C4\",\n\taccent2: \"ED7D31\",\n\taccent3: \"A5A5A5\",\n\taccent4: \"FFC000\",\n\taccent5: \"5B9BD5\",\n\taccent6: \"70AD47\",\n\thyperlink: \"0563C1\",\n\tfollowedHyperlink: \"954F72\"\n};\nvar OFFICE_SYSTEM_COLORS = {\n\tdark1: {\n\t\tvalue: \"windowText\",\n\t\tlastColor: \"000000\"\n\t},\n\tlight1: {\n\t\tvalue: \"window\",\n\t\tlastColor: \"FFFFFF\"\n\t}\n};\nvar rgbColorValue = (name, color) => {\n\tif (color === \"auto\") throw new Error(`Invalid theme color ${name} 'auto'. Expected 6 digit hex value`);\n\treturn hexColorValue(color);\n};\n/**\n* The hex color of each of a theme's colors, with Office's in place of those not given. The system's window text and\n* window colors are black and white.\n*\n* @throws If a color isn't a 6-digit hex value\n*/\nvar themeColorValues = (colors = {}) => Object.fromEntries(Object.keys(COLOR_OOXML_NAMES).map((name) => {\n\tconst color = colors[name];\n\tconst office = name === \"dark1\" || name === \"light1\" ? OFFICE_SYSTEM_COLORS[name].lastColor : OFFICE_COLORS[name];\n\treturn [name, color === void 0 ? office : rgbColorValue(name, color)];\n}));\nvar createRgbColor = (name, color) => new BuilderElement({\n\tname: \"a:srgbClr\",\n\tattributes: { value: {\n\t\tkey: \"val\",\n\t\tvalue: rgbColorValue(name, color)\n\t} }\n});\nvar createColor = (name, colors) => {\n\tconst color = colors[name];\n\tconst system = name === \"dark1\" || name === \"light1\" ? OFFICE_SYSTEM_COLORS[name] : void 0;\n\treturn new BuilderElement({\n\t\tname: `a:${COLOR_OOXML_NAMES[name]}`,\n\t\tchildren: [color === void 0 && system ? new BuilderElement({\n\t\t\tname: \"a:sysClr\",\n\t\t\tattributes: {\n\t\t\t\tvalue: {\n\t\t\t\t\tkey: \"val\",\n\t\t\t\t\tvalue: system.value\n\t\t\t\t},\n\t\t\t\tlastColor: {\n\t\t\t\t\tkey: \"lastClr\",\n\t\t\t\t\tvalue: system.lastColor\n\t\t\t\t}\n\t\t\t}\n\t\t}) : createRgbColor(name, color !== null && color !== void 0 ? color : OFFICE_COLORS[name])]\n\t});\n};\n/**\n* Creates a theme's color scheme, with Office's colors in place of those not given.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_ColorScheme\">\n* <xsd:sequence>\n* <xsd:element name=\"dk1\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"lt1\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"dk2\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"lt2\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"accent1\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"accent2\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"accent3\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"accent4\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"accent5\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"accent6\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"hlink\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"folHlink\" type=\"CT_Color\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @throws If a color isn't a 6-digit hex value\n*/\nvar createColorScheme = (name, colors = {}) => new BuilderElement({\n\tname: \"a:clrScheme\",\n\tattributes: { name: {\n\t\tkey: \"name\",\n\t\tvalue: name\n\t} },\n\tchildren: Object.keys(COLOR_OOXML_NAMES).map((color) => createColor(color, colors))\n});\n// src/file/theme/theme-color.ts\n/**\n* Theme color module for WordprocessingML documents.\n*\n* Text, underlines, borders and shading can be in a color of the document's theme, lighter or darker as Word's color\n* menus offer them. Word writes the theme color's name, how much lighter (`themeTint`) or darker (`themeShade`) it\n* is, and the color it comes to in hex, for applications that don't read the theme. The hex color is worked out in\n* HSL as the standard describes, and is close to Word's but not always the same.\n*\n* Reference: http://officeopenxml.com/WPtextFormatting.php\n*\n* @module\n*/\nvar THEME_COLOR_NAMES = /* @__PURE__ */ new Set([\n\t\"dark1\",\n\t\"light1\",\n\t\"dark2\",\n\t\"light2\",\n\t\"accent1\",\n\t\"accent2\",\n\t\"accent3\",\n\t\"accent4\",\n\t\"accent5\",\n\t\"accent6\",\n\t\"hyperlink\",\n\t\"followedHyperlink\"\n]);\nvar THEME_COLOR_SUGGESTIONS = /* @__PURE__ */ new Map([\n\t[\"dk1\", \"dark1\"],\n\t[\"lt1\", \"light1\"],\n\t[\"dk2\", \"dark2\"],\n\t[\"lt2\", \"light2\"],\n\t[\"hlink\", \"hyperlink\"],\n\t[\"folHlink\", \"followedHyperlink\"],\n\t[\"text1\", \"dark1\"],\n\t[\"background1\", \"light1\"],\n\t[\"text2\", \"dark2\"],\n\t[\"background2\", \"light2\"]\n]);\nvar changeValue = (value, option) => {\n\tif (!(value >= 0 && value <= 100)) throw new Error(`Invalid ${option} ${value}. Expected a number from 0 to 100`);\n\treturn Math.round(255 * (1 - value / 100));\n};\n/**\n* Checks a theme color, and works out its tint or shade.\n*\n* @throws If the color isn't one of the theme's, is both lighter and darker, or a change is outside 0 to 100\n*/\nvar themeColorChange = ({ theme, lighter, darker }) => {\n\tif (!THEME_COLOR_NAMES.has(theme)) {\n\t\tconst suggestion = THEME_COLOR_SUGGESTIONS.get(theme);\n\t\tthrow new Error(`Invalid theme color \"${theme}\". ${suggestion ? `Did you mean \"${suggestion}\"?` : `Expected one of ${[...THEME_COLOR_NAMES].join(\", \")}`}`);\n\t}\n\tif (lighter !== void 0 && darker !== void 0) throw new Error(\"Invalid theme color. Expected lighter or darker, not both\");\n\tconst tint = lighter === void 0 ? void 0 : changeValue(lighter, \"lighter\");\n\tconst shade = darker === void 0 ? void 0 : changeValue(darker, \"darker\");\n\treturn {\n\t\ttint: tint === 255 ? void 0 : tint,\n\t\tshade: shade === 255 ? void 0 : shade\n\t};\n};\nvar toHsl = (hex) => {\n\tconst [red, green, blue] = [\n\t\t0,\n\t\t2,\n\t\t4\n\t].map((index) => parseInt(hex.slice(index, index + 2), 16) / 255);\n\tconst max = Math.max(red, green, blue);\n\tconst min = Math.min(red, green, blue);\n\tconst lightness = (max + min) / 2;\n\tconst range = max - min;\n\tif (range === 0) return {\n\t\thue: 0,\n\t\tsaturation: 0,\n\t\tlightness\n\t};\n\treturn {\n\t\thue: (max === red ? ((green - blue) / range + 6) % 6 : max === green ? (blue - red) / range + 2 : (red - green) / range + 4) * 60,\n\t\tsaturation: range / (1 - Math.abs(2 * lightness - 1)),\n\t\tlightness\n\t};\n};\nvar toHex = ({ hue, saturation, lightness }) => {\n\tconst chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n\tconst second = chroma * (1 - Math.abs(hue / 60 % 2 - 1));\n\tconst [red, green, blue] = hue < 60 ? [\n\t\tchroma,\n\t\tsecond,\n\t\t0\n\t] : hue < 120 ? [\n\t\tsecond,\n\t\tchroma,\n\t\t0\n\t] : hue < 180 ? [\n\t\t0,\n\t\tchroma,\n\t\tsecond\n\t] : hue < 240 ? [\n\t\t0,\n\t\tsecond,\n\t\tchroma\n\t] : hue < 300 ? [\n\t\tsecond,\n\t\t0,\n\t\tchroma\n\t] : [\n\t\tchroma,\n\t\t0,\n\t\tsecond\n\t];\n\tconst lowest = lightness - chroma / 2;\n\treturn [\n\t\tred,\n\t\tgreen,\n\t\tblue\n\t].map((value) => Math.floor((value + lowest) * 255 + 1e-9).toString(16).padStart(2, \"0\")).join(\"\").toUpperCase();\n};\n/**\n* The color a theme color comes to: its lightness moved towards white by its tint, or towards black by its shade.\n*/\nvar applyChange = (hex, { tint, shade }) => {\n\tif (tint === void 0 && shade === void 0) return hex;\n\tconst hsl = toHsl(hex);\n\tconst lightness = tint === void 0 ? hsl.lightness * shade / 255 : hsl.lightness * tint / 255 + (1 - tint / 255);\n\treturn toHex(_objectSpread2(_objectSpread2({}, hsl), {}, { lightness }));\n};\nvar hexByte = (value) => value === void 0 ? void 0 : value.toString(16).padStart(2, \"0\").toUpperCase();\n/**\n* Checks a color option, so that mistakes throw when an element is created rather than when it is written.\n*\n* @throws If a hex color isn't 6 hex digits, or a theme color isn't valid\n*/\nvar checkColor = (color) => typeof color === \"string\" ? {\n\ttype: \"hex\",\n\tvalue: hexColorValue(color)\n} : {\n\ttype: \"theme\",\n\tcolor,\n\tchange: themeColorChange(color)\n};\nvar colorValues = (checked, colors) => checked.type === \"hex\" ? { color: checked.value } : {\n\tcolor: applyChange(colors[checked.color.theme], checked.change),\n\ttheme: checked.color.theme,\n\ttint: hexByte(checked.change.tint),\n\tshade: hexByte(checked.change.shade)\n};\nvar OFFICE_THEME_COLORS = themeColorValues();\n/**\n* The attributes of an element with colors, some of which may be the theme's. A theme color is written with the hex\n* color it comes to in the document's theme, so that is worked out when the element is written. Attributes are written\n* in the order given.\n*\n* @internal\n*/\nvar ColorAttributeComponent = class extends BaseXmlComponent {\n\t/**\n\t* @throws If a color isn't valid\n\t*/\n\tconstructor(attributes) {\n\t\tsuper(\"_attr\");\n\t\t_defineProperty(this, \"attributes\", void 0);\n\t\tthis.attributes = attributes.map((attribute) => \"keys\" in attribute ? {\n\t\t\tkeys: attribute.keys,\n\t\t\tcolor: attribute.color === void 0 ? void 0 : checkColor(attribute.color)\n\t\t} : attribute);\n\t}\n\tprepForXml(context) {\n\t\tvar _context$file$Theme$C, _context$file;\n\t\tconst themeColors = (_context$file$Theme$C = (_context$file = context.file) === null || _context$file === void 0 || (_context$file = _context$file.Theme) === null || _context$file === void 0 ? void 0 : _context$file.Colors) !== null && _context$file$Theme$C !== void 0 ? _context$file$Theme$C : OFFICE_THEME_COLORS;\n\t\tconst entries = this.attributes.flatMap((attribute) => {\n\t\t\tif (!(\"keys\" in attribute)) return [[attribute.key, attribute.value]];\n\t\t\tif (attribute.color === void 0) return [];\n\t\t\tconst { keys } = attribute;\n\t\t\tconst values = colorValues(attribute.color, themeColors);\n\t\t\treturn [\n\t\t\t\t[keys.color, values.color],\n\t\t\t\t[keys.theme, values.theme],\n\t\t\t\t[keys.tint, values.tint],\n\t\t\t\t[keys.shade, values.shade]\n\t\t\t];\n\t\t});\n\t\treturn { _attr: Object.fromEntries(entries.filter(([, value]) => value !== void 0)) };\n\t}\n};\nvar ColorElement = class extends XmlComponent {\n\tconstructor(name, attributes) {\n\t\tsuper(name);\n\t\tthis.root.push(new ColorAttributeComponent(attributes));\n\t}\n};\n/**\n* Creates an element whose attributes include colors, some of which may be the theme's.\n*\n* @throws If a color isn't valid\n*/\nvar createColorElement = (name, attributes) => new ColorElement(name, attributes);\n/**\n* The attributes most elements write a color with: `w:color`, `w:themeColor`, `w:themeTint` and `w:themeShade`.\n*/\nvar COLOR_ATTRIBUTES = {\n\tcolor: \"w:color\",\n\ttheme: \"w:themeColor\",\n\ttint: \"w:themeTint\",\n\tshade: \"w:themeShade\"\n};\n// src/file/border/border.ts\n/**\n* Border module for WordprocessingML documents.\n*\n* Borders are used in multiple contexts (paragraphs, tables, table cells, sections)\n* and share the same CT_Border type definition. This module provides the createBorderElement\n* factory function and BorderStyle constants used throughout the document structure.\n*\n* Reference: http://officeopenxml.com/WPborders.php\n*\n* @see http://officeopenxml.com/WPtableBorders.php\n* @see http://officeopenxml.com/WPtableCellProperties-Borders.php\n* @see http://officeopenxml.com/WPsectionBorders.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Border\">\n* <xsd:attribute name=\"val\" type=\"ST_Border\" use=\"required\"/>\n* <xsd:attribute name=\"color\" type=\"ST_HexColor\" use=\"optional\" default=\"auto\"/>\n* <xsd:attribute name=\"themeColor\" type=\"ST_ThemeColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeTint\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"themeShade\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"sz\" type=\"ST_EighthPointMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"space\" type=\"ST_PointMeasure\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"shadow\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"frame\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\n/**\n* Creates a border element for a WordprocessingML document.\n*\n* Used to create border specifications for paragraphs, tables, table cells,\n* and sections. The element name is specified to create different border\n* types (top, bottom, left, right, etc.).\n*\n* @example\n* ```typescript\n* // Create a top border\n* createBorderElement(\"w:top\", {\n* style: BorderStyle.SINGLE,\n* color: \"FF0000\",\n* size: 24,\n* space: 1,\n* });\n* ```\n*/\nvar createBorderElement = (elementName, { color, size, space, style }) => createColorElement(elementName, [\n\t{\n\t\tkey: \"w:val\",\n\t\tvalue: style\n\t},\n\t{\n\t\tkeys: COLOR_ATTRIBUTES,\n\t\tcolor\n\t},\n\t{\n\t\tkey: \"w:sz\",\n\t\tvalue: size === void 0 ? void 0 : eighthPointMeasureValue(size)\n\t},\n\t{\n\t\tkey: \"w:space\",\n\t\tvalue: space === void 0 ? void 0 : pointMeasureValue(space)\n\t}\n]);\n/**\n* Table borders are defined with the <w:tblBorders> element. Child elements of this element specify the kinds of `border`:\n*\n* `bottom`, `end` (`right` in the previous version of the standard), `insideH`, `insideV`, `start` (`left` in the previous version of the standard), and `top`.\n*\n* Reference: http://officeopenxml.com/WPtableBorders.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_Border\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"single\"/>\n* <xsd:enumeration value=\"dashDotStroked\"/>\n* <xsd:enumeration value=\"dashed\"/>\n* <xsd:enumeration value=\"dashSmallGap\"/>\n* <xsd:enumeration value=\"dotDash\"/>\n* <xsd:enumeration value=\"dotDotDash\"/>\n* <xsd:enumeration value=\"dotted\"/>\n* <xsd:enumeration value=\"double\"/>\n* <xsd:enumeration value=\"doubleWave\"/>\n* <xsd:enumeration value=\"inset\"/>\n* <xsd:enumeration value=\"nil\"/>\n* <xsd:enumeration value=\"none\"/>\n* <xsd:enumeration value=\"outset\"/>\n* <xsd:enumeration value=\"thick\"/>\n* <xsd:enumeration value=\"thickThinLargeGap\"/>\n* <xsd:enumeration value=\"thickThinMediumGap\"/>\n* <xsd:enumeration value=\"thickThinSmallGap\"/>\n* <xsd:enumeration value=\"thinThickLargeGap\"/>\n* <xsd:enumeration value=\"thinThickMediumGap\"/>\n* <xsd:enumeration value=\"thinThickSmallGap\"/>\n* <xsd:enumeration value=\"thinThickThinLargeGap\"/>\n* <xsd:enumeration value=\"thinThickThinMediumGap\"/>\n* <xsd:enumeration value=\"thinThickThinSmallGap\"/>\n* <xsd:enumeration value=\"threeDEmboss\"/>\n* <xsd:enumeration value=\"threeDEngrave\"/>\n* <xsd:enumeration value=\"triple\"/>\n* <xsd:enumeration value=\"wave\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar BorderStyle = {\n\t/** a single line */\n\tSINGLE: \"single\",\n\t/** a line with a series of alternating thin and thick strokes */\n\tDASH_DOT_STROKED: \"dashDotStroked\",\n\t/** a dashed line */\n\tDASHED: \"dashed\",\n\t/** a dashed line with small gaps */\n\tDASH_SMALL_GAP: \"dashSmallGap\",\n\t/** a line with alternating dots and dashes */\n\tDOT_DASH: \"dotDash\",\n\t/** a line with a repeating dot - dot - dash sequence */\n\tDOT_DOT_DASH: \"dotDotDash\",\n\t/** a dotted line */\n\tDOTTED: \"dotted\",\n\t/** a double line */\n\tDOUBLE: \"double\",\n\t/** a double wavy line */\n\tDOUBLE_WAVE: \"doubleWave\",\n\t/** an inset set of lines */\n\tINSET: \"inset\",\n\t/** no border */\n\tNIL: \"nil\",\n\t/** no border */\n\tNONE: \"none\",\n\t/** an outset set of lines */\n\tOUTSET: \"outset\",\n\t/** a single line */\n\tTHICK: \"thick\",\n\t/** a thick line contained within a thin line with a large-sized intermediate gap */\n\tTHICK_THIN_LARGE_GAP: \"thickThinLargeGap\",\n\t/** a thick line contained within a thin line with a medium-sized intermediate gap */\n\tTHICK_THIN_MEDIUM_GAP: \"thickThinMediumGap\",\n\t/** a thick line contained within a thin line with a small intermediate gap */\n\tTHICK_THIN_SMALL_GAP: \"thickThinSmallGap\",\n\t/** a thin line contained within a thick line with a large-sized intermediate gap */\n\tTHIN_THICK_LARGE_GAP: \"thinThickLargeGap\",\n\t/** a thick line contained within a thin line with a medium-sized intermediate gap */\n\tTHIN_THICK_MEDIUM_GAP: \"thinThickMediumGap\",\n\t/** a thick line contained within a thin line with a small intermediate gap */\n\tTHIN_THICK_SMALL_GAP: \"thinThickSmallGap\",\n\t/** a thin-thick-thin line with a large gap */\n\tTHIN_THICK_THIN_LARGE_GAP: \"thinThickThinLargeGap\",\n\t/** a thin-thick-thin line with a medium gap */\n\tTHIN_THICK_THIN_MEDIUM_GAP: \"thinThickThinMediumGap\",\n\t/** a thin-thick-thin line with a small gap */\n\tTHIN_THICK_THIN_SMALL_GAP: \"thinThickThinSmallGap\",\n\t/** a three-staged gradient line, getting darker towards the paragraph */\n\tTHREE_D_EMBOSS: \"threeDEmboss\",\n\t/** a three-staged gradient like, getting darker away from the paragraph */\n\tTHREE_D_ENGRAVE: \"threeDEngrave\",\n\t/** a triple line */\n\tTRIPLE: \"triple\",\n\t/** a wavy line */\n\tWAVE: \"wave\"\n};\n// src/file/paragraph/formatting/border.ts\n/**\n* Paragraph border module for WordprocessingML documents.\n*\n* This module provides border options for paragraphs.\n*\n* Reference: http://officeopenxml.com/WPborders.php\n*\n* @module\n*/\n/**\n* Represents paragraph borders in a WordprocessingML document.\n*\n* The pBdr element specifies borders that surround the paragraph.\n*\n* Reference: http://officeopenxml.com/WPborders.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PBdr\">\n* <xsd:sequence>\n* <xsd:element name=\"top\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"left\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"bottom\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"right\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"between\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"bar\" type=\"CT_Border\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* border: {\n* top: { style: BorderStyle.SINGLE, size: 6, color: \"FF0000\" },\n* bottom: { style: BorderStyle.SINGLE, size: 6, color: \"FF0000\" },\n* },\n* children: [new TextRun(\"Paragraph with top and bottom borders\")],\n* });\n* ```\n*/\nvar Border = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:pBdr\");\n\t\tif (options.top) this.root.push(createBorderElement(\"w:top\", options.top));\n\t\tif (options.left) this.root.push(createBorderElement(\"w:left\", options.left));\n\t\tif (options.bottom) this.root.push(createBorderElement(\"w:bottom\", options.bottom));\n\t\tif (options.right) this.root.push(createBorderElement(\"w:right\", options.right));\n\t\tif (options.between) this.root.push(createBorderElement(\"w:between\", options.between));\n\t}\n};\n/**\n* Represents a thematic break (horizontal rule) in a WordprocessingML document.\n*\n* Creates a horizontal line across the paragraph using a bottom border.\n*\n* Reference: http://officeopenxml.com/WPborders.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PBdr\">\n* <xsd:sequence>\n* <xsd:element name=\"bottom\" type=\"CT_Border\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* thematicBreak: true,\n* children: [new TextRun(\"Paragraph with horizontal rule below\")],\n* });\n* ```\n*/\nvar ThematicBreak = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:pBdr\");\n\t\tconst bottom = createBorderElement(\"w:bottom\", {\n\t\t\tcolor: \"auto\",\n\t\t\tspace: 1,\n\t\t\tstyle: BorderStyle.SINGLE,\n\t\t\tsize: 6\n\t\t});\n\t\tthis.root.push(bottom);\n\t}\n};\n// src/file/paragraph/formatting/indent.ts\n/**\n* Paragraph indentation module for WordprocessingML documents.\n*\n* This module provides indentation options for paragraphs including left, right,\n* hanging, and first line indentation.\n*\n* Reference: http://officeopenxml.com/WPindentation.php\n*\n* @module\n*/\n/**\n* Creates paragraph indentation element for a WordprocessingML document.\n*\n* The ind element specifies the indentation of the paragraph from the margins.\n*\n* Reference: http://officeopenxml.com/WPindentation.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Ind\">\n* <xsd:attribute name=\"start\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"startChars\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"end\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"endChars\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"left\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"leftChars\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"right\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"rightChars\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"hanging\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"hangingChars\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"firstLine\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"firstLineChars\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createIndent = ({ start, end, left, right, hanging, firstLine, firstLineChars }) => new BuilderElement({\n\tname: \"w:ind\",\n\tattributes: {\n\t\tstart: {\n\t\t\tkey: \"w:start\",\n\t\t\tvalue: start === void 0 ? void 0 : signedTwipsMeasureValue(start)\n\t\t},\n\t\tend: {\n\t\t\tkey: \"w:end\",\n\t\t\tvalue: end === void 0 ? void 0 : signedTwipsMeasureValue(end)\n\t\t},\n\t\tleft: {\n\t\t\tkey: \"w:left\",\n\t\t\tvalue: left === void 0 ? void 0 : signedTwipsMeasureValue(left)\n\t\t},\n\t\tright: {\n\t\t\tkey: \"w:right\",\n\t\t\tvalue: right === void 0 ? void 0 : signedTwipsMeasureValue(right)\n\t\t},\n\t\thanging: {\n\t\t\tkey: \"w:hanging\",\n\t\t\tvalue: hanging === void 0 ? void 0 : twipsMeasureValue(hanging)\n\t\t},\n\t\tfirstLine: {\n\t\t\tkey: \"w:firstLine\",\n\t\t\tvalue: firstLine === void 0 ? void 0 : twipsMeasureValue(firstLine)\n\t\t},\n\t\tfirstLineChars: {\n\t\t\tkey: \"w:firstLineChars\",\n\t\t\tvalue: firstLineChars === void 0 ? void 0 : decimalNumber(firstLineChars)\n\t\t}\n\t}\n});\n// src/file/paragraph/run/break.ts\n/**\n* Break module for WordprocessingML documents.\n*\n* This module provides support for line breaks within a run. A break element\n* represents a line break (line feed) within text content.\n*\n* Reference: http://officeopenxml.com/WPtextSpecialContent-break.php\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Br\">\n* <xsd:attribute name=\"type\" type=\"ST_BrType\" use=\"optional\"/>\n* <xsd:attribute name=\"clear\" type=\"ST_BrClear\" use=\"optional\"/>\n* </xsd:complexType>\n*\n* <xsd:simpleType name=\"ST_BrType\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"page\"/>\n* <xsd:enumeration value=\"column\"/>\n* <xsd:enumeration value=\"textWrapping\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n*\n* <xsd:simpleType name=\"ST_BrClear\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"none\"/>\n* <xsd:enumeration value=\"left\"/>\n* <xsd:enumeration value=\"right\"/>\n* <xsd:enumeration value=\"all\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @module\n*/\n/**\n* Creates a line break element for a WordprocessingML document.\n*\n* The Break element inserts a line break (carriage return/line feed) within a run.\n* This forces text to continue on the next line without starting a new paragraph.\n*\n* Reference: http://officeopenxml.com/WPtextSpecialContent-break.php\n*\n* @example\n* ```typescript\n* // Add line breaks in a run\n* new Run({\n* children: [\n* \"First line\",\n* createBreak(),\n* \"Second line\",\n* createBreak(),\n* \"Third line\",\n* ],\n* });\n* ```\n*/\nvar createBreak = () => new BuilderElement({ name: \"w:br\" });\n// src/file/paragraph/run/field.ts\n/**\n* Field module for WordprocessingML documents.\n*\n* This module provides support for complex fields, which are regions of text\n* that can contain dynamic content such as page numbers, dates, or mail merge fields.\n* Fields are delimited by field character elements (begin, separate, end).\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Field character types that delimit field regions.\n*\n* @internal\n*/\nvar FieldCharacterType = {\n\tBEGIN: \"begin\",\n\tEND: \"end\",\n\tSEPARATE: \"separate\"\n};\n/**\n* Creates a field character element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FldChar\">\n* <xsd:sequence>\n* <xsd:element name=\"fldData\" type=\"CT_Text\" minOccurs=\"0\"/>\n* <xsd:element name=\"ffData\" type=\"CT_FFData\" minOccurs=\"0\"/>\n* <xsd:element name=\"numberingChange\" type=\"CT_TrackChangeNumbering\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"fldCharType\" type=\"ST_FldCharType\" use=\"required\"/>\n* <xsd:attribute name=\"fldLock\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"dirty\" type=\"s:ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n* @internal\n*/\nvar createFieldChar = (type, dirty, locked) => new BuilderElement({\n\tname: \"w:fldChar\",\n\tattributes: {\n\t\ttype: {\n\t\t\tkey: \"w:fldCharType\",\n\t\t\tvalue: type\n\t\t},\n\t\tdirty: {\n\t\t\tkey: \"w:dirty\",\n\t\t\tvalue: dirty\n\t\t},\n\t\tlocked: {\n\t\t\tkey: \"w:fldLock\",\n\t\t\tvalue: locked\n\t\t}\n\t}\n});\n/**\n* Creates the beginning of a complex field.\n*\n* The Begin element marks the start of a field. A field consists of a begin character,\n* field instructions, an optional separate character, field result, and an end character.\n* A locked field (`w:fldLock`) is not updated by Word.\n*/\nvar createBegin = (dirty, locked) => createFieldChar(FieldCharacterType.BEGIN, dirty, locked);\n/** The formatted begin characters of the fields that are dirty only when the document isn't given page numbers */\nvar dirtyWithoutPageNumbers = /* @__PURE__ */ new WeakSet();\n/** The beginning of a field that is dirty, so Word updates it, unless the document is given page numbers */\nvar BeginDirtyWithoutPageNumbers = class extends BuilderElement {\n\tconstructor() {\n\t\tsuper({\n\t\t\tname: \"w:fldChar\",\n\t\t\tattributes: {\n\t\t\t\ttype: {\n\t\t\t\t\tkey: \"w:fldCharType\",\n\t\t\t\t\tvalue: FieldCharacterType.BEGIN\n\t\t\t\t},\n\t\t\t\tdirty: {\n\t\t\t\t\tkey: \"w:dirty\",\n\t\t\t\t\tvalue: true\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tdirtyWithoutPageNumbers.add(xml);\n\t\treturn xml;\n\t}\n};\n/**\n* Creates the beginning of a field whose result is written when the document is given page numbers, such as a page\n* reference or a SEQ field. It is written dirty, so Word updates the field when it opens the document, and asks to. When\n* the document is given page numbers, it is written clean (see {@link isDirtyWithoutPageNumbers}), so Word shows the\n* number written, or nothing when none could be worked out, and doesn't ask.\n*/\nvar createBeginDirtyWithoutPageNumbers = () => new BeginDirtyWithoutPageNumbers();\n/** Whether a formatted field character is the beginning of a field that is dirty only without page numbers */\nvar isDirtyWithoutPageNumbers = (element) => typeof element === \"object\" && element !== null && dirtyWithoutPageNumbers.has(element);\n/**\n* Creates the separator between field code and field result in a complex field.\n*\n* The Separate element divides the field code (instructions) from the field result\n* (the computed value).\n*/\nvar createSeparate = (dirty) => createFieldChar(FieldCharacterType.SEPARATE, dirty);\n/**\n* Creates the end of a complex field.\n*\n* The End element marks the end of a field. Every field that begins with a Begin\n* element must be terminated with an End element.\n*/\nvar createEnd = (dirty) => createFieldChar(FieldCharacterType.END, dirty);\n// src/file/shared/alignment.ts\n/**\n* Alignment constants for DrawingML positioning.\n*\n* This module provides horizontal and vertical alignment options\n* for floating drawings.\n*\n* @module\n*/\n/**\n* Horizontal alignment options for floating drawings.\n*\n* Reference: https://www.datypic.com/sc/ooxml/t-wp_ST_AlignH.html\n*\n* @publicApi\n*/\nvar HorizontalPositionAlign = {\n\t/** Center horizontally */\n\tCENTER: \"center\",\n\t/** Align to inside margin (left on odd, right on even pages) */\n\tINSIDE: \"inside\",\n\t/** Align to left */\n\tLEFT: \"left\",\n\t/** Align to outside margin (right on odd, left on even pages) */\n\tOUTSIDE: \"outside\",\n\t/** Align to right */\n\tRIGHT: \"right\"\n};\n/**\n* Vertical alignment options for floating drawings.\n*\n* Reference: https://www.datypic.com/sc/ooxml/t-wp_ST_AlignV.html\n*\n* @publicApi\n*/\nvar VerticalPositionAlign = {\n\t/** Align to bottom */\n\tBOTTOM: \"bottom\",\n\t/** Center vertically */\n\tCENTER: \"center\",\n\t/** Align to inside margin */\n\tINSIDE: \"inside\",\n\t/** Align to outside margin */\n\tOUTSIDE: \"outside\",\n\t/** Align to top */\n\tTOP: \"top\"\n};\n// src/file/shared/number-format.ts\n/**\n* Number format module for WordprocessingML documents.\n*\n* This module provides number format constants for page numbers,\n* list numbering, and other numbered elements.\n*\n* Reference: http://officeopenxml.com/WPnumbering-numFmt.php\n*\n* @module\n*/\n/**\n* Number format types for page numbers and list numbering.\n*\n* Provides international number formats including decimal, Roman numerals,\n* alphabetic, and various Asian numbering systems.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_NumberFormat\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"decimal\"/>\n* <xsd:enumeration value=\"upperRoman\"/>\n* <xsd:enumeration value=\"lowerRoman\"/>\n* <xsd:enumeration value=\"upperLetter\"/>\n* <xsd:enumeration value=\"lowerLetter\"/>\n* <!-- ... many more formats ... -->\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @example\n* ```typescript\n* // Arabic numerals (1, 2, 3)\n* NumberFormat.DECIMAL;\n*\n* // Roman numerals (I, II, III)\n* NumberFormat.UPPER_ROMAN;\n*\n* // Letters (a, b, c)\n* NumberFormat.LOWER_LETTER;\n* ```\n*\n* @publicApi\n*/\nvar NumberFormat = {\n\tDECIMAL: \"decimal\",\n\tUPPER_ROMAN: \"upperRoman\",\n\tLOWER_ROMAN: \"lowerRoman\",\n\tUPPER_LETTER: \"upperLetter\",\n\tLOWER_LETTER: \"lowerLetter\",\n\tORDINAL: \"ordinal\",\n\tCARDINAL_TEXT: \"cardinalText\",\n\tORDINAL_TEXT: \"ordinalText\",\n\tHEX: \"hex\",\n\tCHICAGO: \"chicago\",\n\tIDEOGRAPH_DIGITAL: \"ideographDigital\",\n\tJAPANESE_COUNTING: \"japaneseCounting\",\n\tAIUEO: \"aiueo\",\n\tIROHA: \"iroha\",\n\tDECIMAL_FULL_WIDTH: \"decimalFullWidth\",\n\tDECIMAL_HALF_WIDTH: \"decimalHalfWidth\",\n\tJAPANESE_LEGAL: \"japaneseLegal\",\n\tJAPANESE_DIGITAL_TEN_THOUSAND: \"japaneseDigitalTenThousand\",\n\tDECIMAL_ENCLOSED_CIRCLE: \"decimalEnclosedCircle\",\n\tDECIMAL_FULL_WIDTH_2: \"decimalFullWidth2\",\n\tAIUEO_FULL_WIDTH: \"aiueoFullWidth\",\n\tIROHA_FULL_WIDTH: \"irohaFullWidth\",\n\tDECIMAL_ZERO: \"decimalZero\",\n\tBULLET: \"bullet\",\n\tGANADA: \"ganada\",\n\tCHOSUNG: \"chosung\",\n\tDECIMAL_ENCLOSED_FULL_STOP: \"decimalEnclosedFullstop\",\n\tDECIMAL_ENCLOSED_PAREN: \"decimalEnclosedParen\",\n\tDECIMAL_ENCLOSED_CIRCLE_CHINESE: \"decimalEnclosedCircleChinese\",\n\tIDEOGRAPH_ENCLOSED_CIRCLE: \"ideographEnclosedCircle\",\n\tIDEOGRAPH_TRADITIONAL: \"ideographTraditional\",\n\tIDEOGRAPH_ZODIAC: \"ideographZodiac\",\n\tIDEOGRAPH_ZODIAC_TRADITIONAL: \"ideographZodiacTraditional\",\n\tTAIWANESE_COUNTING: \"taiwaneseCounting\",\n\tIDEOGRAPH_LEGAL_TRADITIONAL: \"ideographLegalTraditional\",\n\tTAIWANESE_COUNTING_THOUSAND: \"taiwaneseCountingThousand\",\n\tTAIWANESE_DIGITAL: \"taiwaneseDigital\",\n\tCHINESE_COUNTING: \"chineseCounting\",\n\tCHINESE_LEGAL_SIMPLIFIED: \"chineseLegalSimplified\",\n\tCHINESE_COUNTING_TEN_THOUSAND: \"chineseCountingThousand\",\n\tKOREAN_DIGITAL: \"koreanDigital\",\n\tKOREAN_COUNTING: \"koreanCounting\",\n\tKOREAN_LEGAL: \"koreanLegal\",\n\tKOREAN_DIGITAL_2: \"koreanDigital2\",\n\tVIETNAMESE_COUNTING: \"vietnameseCounting\",\n\tRUSSIAN_LOWER: \"russianLower\",\n\tRUSSIAN_UPPER: \"russianUpper\",\n\tNONE: \"none\",\n\tNUMBER_IN_DASH: \"numberInDash\",\n\tHEBREW_1: \"hebrew1\",\n\tHEBREW_2: \"hebrew2\",\n\tARABIC_ALPHA: \"arabicAlpha\",\n\tARABIC_ABJAD: \"arabicAbjad\",\n\tHINDI_VOWELS: \"hindiVowels\",\n\tHINDI_CONSONANTS: \"hindiConsonants\",\n\tHINDI_NUMBERS: \"hindiNumbers\",\n\tHINDI_COUNTING: \"hindiCounting\",\n\tTHAI_LETTERS: \"thaiLetters\",\n\tTHAI_NUMBERS: \"thaiNumbers\",\n\tTHAI_COUNTING: \"thaiCounting\",\n\tBAHT_TEXT: \"bahtText\",\n\tDOLLAR_TEXT: \"dollarText\",\n\tCUSTOM: \"custom\"\n};\n// src/file/shared/space-type.ts\n/**\n* Space type module for WordprocessingML documents.\n*\n* This module provides the xml:space attribute values for\n* controlling whitespace handling in text elements.\n*\n* @module\n*/\n/**\n* XML space handling modes.\n*\n* Controls how whitespace is handled in text elements.\n*\n* @example\n* ```typescript\n* // Preserve whitespace (spaces, newlines)\n* SpaceType.PRESERVE;\n*\n* // Default whitespace handling\n* SpaceType.DEFAULT;\n* ```\n*\n* @publicApi\n*/\nvar SpaceType = {\n\tDEFAULT: \"default\",\n\tPRESERVE: \"preserve\"\n};\n// src/file/paragraph/run/text-attributes.ts\n/**\n* Represents text element attributes.\n*\n* Used to set the xml:space attribute which controls\n* whitespace preservation in text content.\n*\n* @example\n* ```typescript\n* new TextAttributes({ space: SpaceType.PRESERVE });\n* ```\n*\n* @internal\n*/\nvar TextAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { space: \"xml:space\" });\n\t}\n};\n// src/file/paragraph/run/page-number.ts\n/**\n* Page number field instruction module for WordprocessingML documents.\n*\n* This module provides field instruction elements for displaying\n* page numbers, page counts, and section information.\n*\n* Reference: http://officeopenxml.com/WPfields.php\n*\n* @module\n*/\n/**\n* Represents a PAGE field instruction.\n*\n* Displays the current page number in the document.\n*\n* @example\n* ```typescript\n* new Run({ children: [new Begin(true), new Page(), new End()] });\n* ```\n*\n* @internal\n*/\nvar Page = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"PAGE\");\n\t}\n};\n/**\n* Represents a NUMPAGES field instruction.\n*\n* Displays the total number of pages in the document.\n*\n* @internal\n*/\nvar NumberOfPages = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"NUMPAGES\");\n\t}\n};\n/**\n* Represents a SECTIONPAGES field instruction.\n*\n* Displays the total number of pages in the current section.\n*\n* @internal\n*/\nvar NumberOfPagesSection = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"SECTIONPAGES\");\n\t}\n};\n/**\n* Represents a SECTION field instruction.\n*\n* Displays the current section number.\n*\n* @internal\n*/\nvar CurrentSection = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"SECTION\");\n\t}\n};\n// src/file/shading/shading.ts\n/**\n* Shading module for WordprocessingML documents.\n*\n* Shading is used to apply background colors and patterns to paragraphs,\n* table cells, and text runs. The shading type is identical in all places.\n*\n* Reference: http://officeopenxml.com/WPshading.php\n*\n* @see http://officeopenxml.com/WPtableShading.php\n* @see http://officeopenxml.com/WPtableCellProperties-Shading.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Shd\">\n* <xsd:attribute name=\"val\" type=\"ST_Shd\" use=\"required\"/>\n* <xsd:attribute name=\"color\" type=\"ST_HexColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeColor\" type=\"ST_ThemeColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeTint\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"themeShade\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"fill\" type=\"ST_HexColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeFill\" type=\"ST_ThemeColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeFillTint\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"themeFillShade\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\n/**\n* Creates a shading element for a WordprocessingML document.\n*\n* The shd element specifies the shading applied to the paragraph,\n* table cell, or text run.\n*\n* Reference: http://officeopenxml.com/WPshading.php\n*/\nvar createShading = ({ fill, color, type }) => createColorElement(\"w:shd\", [\n\t{\n\t\tkeys: {\n\t\t\tcolor: \"w:fill\",\n\t\t\ttheme: \"w:themeFill\",\n\t\t\ttint: \"w:themeFillTint\",\n\t\t\tshade: \"w:themeFillShade\"\n\t\t},\n\t\tcolor: fill\n\t},\n\t{\n\t\tkeys: COLOR_ATTRIBUTES,\n\t\tcolor\n\t},\n\t{\n\t\tkey: \"w:val\",\n\t\tvalue: type !== null && type !== void 0 ? type : ShadingType.CLEAR\n\t}\n]);\n/**\n* Shading pattern types.\n*\n* Specifies the pattern used for shading. The pattern combines the fill\n* color and the pattern color.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_Shd\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"nil\"/>\n* <xsd:enumeration value=\"clear\"/>\n* <xsd:enumeration value=\"solid\"/>\n* <xsd:enumeration value=\"horzStripe\"/>\n* <xsd:enumeration value=\"vertStripe\"/>\n* <xsd:enumeration value=\"reverseDiagStripe\"/>\n* <xsd:enumeration value=\"diagStripe\"/>\n* <xsd:enumeration value=\"horzCross\"/>\n* <xsd:enumeration value=\"diagCross\"/>\n* <!-- ... percent values ... -->\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar ShadingType = {\n\t/** Clear shading - no pattern, fill color only */\n\tCLEAR: \"clear\",\n\tDIAGONAL_CROSS: \"diagCross\",\n\tDIAGONAL_STRIPE: \"diagStripe\",\n\tHORIZONTAL_CROSS: \"horzCross\",\n\tHORIZONTAL_STRIPE: \"horzStripe\",\n\tNIL: \"nil\",\n\tPERCENT_5: \"pct5\",\n\tPERCENT_10: \"pct10\",\n\tPERCENT_12: \"pct12\",\n\tPERCENT_15: \"pct15\",\n\tPERCENT_20: \"pct20\",\n\tPERCENT_25: \"pct25\",\n\tPERCENT_30: \"pct30\",\n\tPERCENT_35: \"pct35\",\n\tPERCENT_37: \"pct37\",\n\tPERCENT_40: \"pct40\",\n\tPERCENT_45: \"pct45\",\n\tPERCENT_50: \"pct50\",\n\tPERCENT_55: \"pct55\",\n\tPERCENT_60: \"pct60\",\n\tPERCENT_62: \"pct62\",\n\tPERCENT_65: \"pct65\",\n\tPERCENT_70: \"pct70\",\n\tPERCENT_75: \"pct75\",\n\tPERCENT_80: \"pct80\",\n\tPERCENT_85: \"pct85\",\n\tPERCENT_87: \"pct87\",\n\tPERCENT_90: \"pct90\",\n\tPERCENT_95: \"pct95\",\n\tREVERSE_DIAGONAL_STRIPE: \"reverseDiagStripe\",\n\tSOLID: \"solid\",\n\tTHIN_DIAGONAL_CROSS: \"thinDiagCross\",\n\tTHIN_DIAGONAL_STRIPE: \"thinDiagStripe\",\n\tTHIN_HORIZONTAL_CROSS: \"thinHorzCross\",\n\tTHIN_REVERSE_DIAGONAL_STRIPE: \"thinReverseDiagStripe\",\n\tTHIN_VERTICAL_STRIPE: \"thinVertStripe\",\n\tVERTICAL_STRIPE: \"vertStripe\"\n};\n// src/file/track-revision/track-revision.ts\n/**\n* Track Revision module for WordprocessingML documents.\n*\n* This module provides support for tracking document revisions\n* (insertions, deletions, and formatting changes).\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @module\n*/\n/**\n* Attributes for a tracked change element.\n*\n* Represents the common attributes (id, author, date) that appear on track change\n* elements such as insertions (w:ins) and deletions (w:del). These attributes\n* are part of the CT_TrackChange complex type in OOXML.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TrackChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_Markup\">\n* <xsd:attribute name=\"author\" type=\"s:ST_String\" use=\"required\"/>\n* <xsd:attribute name=\"date\" type=\"ST_DateTime\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_Markup\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar ChangeAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"w:id\",\n\t\t\tauthor: \"w:author\",\n\t\t\tdate: \"w:date\"\n\t\t});\n\t}\n};\n// src/file/track-revision/track-revision-components/deletion-track-change.ts\nvar DeletionTrackChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:del\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t}\n};\n// src/file/track-revision/track-revision-components/insertion-track-change.ts\nvar InsertionTrackChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:ins\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t}\n};\n// src/file/paragraph/run/east-asian-layout.ts\n/**\n* East Asian layout module for WordprocessingML run properties.\n*\n* This module provides Word's two lines in one, which sets a run's text in two half-size lines within one line, and\n* horizontal in vertical, which sets a run's text across the line in text that runs down the page.\n*\n* Reference: ISO/IEC 29500-1, 17.3.2.10 eastAsianLayout\n*\n* @module\n*/\n/**\n* Brackets Word draws around text set as two lines in one.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_CombineBrackets\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"none\"/>\n* <xsd:enumeration value=\"round\"/>\n* <xsd:enumeration value=\"square\"/>\n* <xsd:enumeration value=\"angle\"/>\n* <xsd:enumeration value=\"curly\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar TwoLinesInOneBrackets = {\n\t/** No brackets */\n\tNONE: \"none\",\n\t/** Round brackets: ( ) */\n\tROUND: \"round\",\n\t/** Square brackets: [ ] */\n\tSQUARE: \"square\",\n\t/** Angle brackets: < > */\n\tANGLE: \"angle\",\n\t/** Curly brackets: { } */\n\tCURLY: \"curly\"\n};\n/**\n* Creates the East Asian layout (`w:eastAsianLayout`) of a run's text.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_EastAsianLayout\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"combine\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"combineBrackets\" type=\"ST_CombineBrackets\" use=\"optional\"/>\n* <xsd:attribute name=\"vert\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"vertCompress\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createEastAsianLayout({ twoLinesInOne: true, brackets: TwoLinesInOneBrackets.ROUND });\n* ```\n*/\nvar createEastAsianLayout = ({ twoLinesInOne, brackets, horizontalInVertical, fitToLine, group }) => new BuilderElement({\n\tname: \"w:eastAsianLayout\",\n\tattributes: {\n\t\tid: {\n\t\t\tkey: \"w:id\",\n\t\t\tvalue: group === void 0 ? void 0 : decimalNumber(group)\n\t\t},\n\t\tcombine: {\n\t\t\tkey: \"w:combine\",\n\t\t\tvalue: twoLinesInOne\n\t\t},\n\t\tcombineBrackets: {\n\t\t\tkey: \"w:combineBrackets\",\n\t\t\tvalue: brackets\n\t\t},\n\t\tvert: {\n\t\t\tkey: \"w:vert\",\n\t\t\tvalue: horizontalInVertical\n\t\t},\n\t\tvertCompress: {\n\t\t\tkey: \"w:vertCompress\",\n\t\t\tvalue: fitToLine\n\t\t}\n\t}\n});\n// src/file/paragraph/run/emphasis-mark.ts\n/**\n* Emphasis mark module for WordprocessingML run properties.\n*\n* This module provides support for East Asian emphasis marks, which are\n* characters placed above or below text to emphasize it.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Emphasis mark types.\n*\n* Defines the types of emphasis marks that can be applied to text.\n* Emphasis marks are commonly used in East Asian typography.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_Em\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"none\"/>\n* <xsd:enumeration value=\"dot\"/>\n* <xsd:enumeration value=\"comma\"/>\n* <xsd:enumeration value=\"circle\"/>\n* <xsd:enumeration value=\"underDot\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar EmphasisMarkType = { \n/** Dot emphasis mark */\nDOT: \"dot\" };\n/**\n* Creates an emphasis mark element for a WordprocessingML document.\n*\n* Emphasis marks are characters (typically dots or circles) placed above or below\n* text to emphasize it. This is commonly used in East Asian typography.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Em\">\n* <xsd:attribute name=\"val\" type=\"ST_Em\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Apply dot emphasis mark\n* createEmphasisMark(EmphasisMarkType.DOT);\n*\n* // Default to dot\n* createEmphasisMark();\n* ```\n*/\nvar createEmphasisMark = (emphasisMarkType = EmphasisMarkType.DOT) => new BuilderElement({\n\tname: \"w:em\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: emphasisMarkType\n\t} }\n});\n/**\n* Creates a dot emphasis mark.\n*\n* Convenience function for applying a dot emphasis mark to text.\n*/\nvar createDotEmphasisMark = () => createEmphasisMark(EmphasisMarkType.DOT);\n// node_modules/nanoid/url-alphabet/index.js\nvar urlAlphabet = \"57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9\";\n// node_modules/nanoid/non-secure/index.js\nvar customAlphabet = (alphabet, defaultSize = 21) => {\n\treturn (size = defaultSize) => {\n\t\tlet id = \"\";\n\t\tlet i = size | 0;\n\t\twhile (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];\n\t\treturn id;\n\t};\n};\nvar nanoid = (size = 21) => {\n\tlet id = \"\";\n\tlet i = size | 0;\n\twhile (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];\n\treturn id;\n};\n// src/util/sha.ts\n/**\n* SHA-1 and SHA-256, for the names of media files and the hashes of passwords that protect a document. They are worked\n* out here because documents are written synchronously, and browsers only hash asynchronously.\n*\n* @module\n*/\n/**\n* The words the bytes come to once padded as SHA-1 and SHA-256 pad them: a 1 bit, then 0 bits up to a multiple of 64\n* bytes, the last 8 of which are the length in bits. Words and the length are big-endian.\n*/\nvar paddedWords = (data) => {\n\tconst words = new Int32Array(Math.ceil((data.length + 9) / 64) * 16);\n\tfor (let index = 0; index < data.length; index++) words[index >> 2] |= data[index] << 24 - (index & 3) * 8;\n\twords[data.length >> 2] |= 128 << 24 - (data.length & 3) * 8;\n\twords[words.length - 2] = Math.floor(data.length / 536870912);\n\twords[words.length - 1] = data.length * 8;\n\treturn words;\n};\n/** The bytes of the words of a hash, big-endian */\nvar bytesOfWords = (words) => {\n\tconst bytes = new Uint8Array(words.length * 4);\n\tfor (let index = 0; index < bytes.length; index++) bytes[index] = words[index >> 2] >>> 24 - (index & 3) * 8;\n\treturn bytes;\n};\nvar rotateLeft = (word, bits) => word << bits | word >>> 32 - bits;\nvar rotateRight = (word, bits) => word >>> bits | word << 32 - bits;\nvar SHA1_INITIAL_HASH = [\n\t1732584193,\n\t4023233417,\n\t2562383102,\n\t271733878,\n\t3285377520\n];\nvar SHA1_ROUND_CONSTANTS = Int32Array.of(1518500249, 1859775393, 2400959708, 3395469782);\nvar sha1Schedule = /* @__PURE__ */ new Int32Array(80);\n/** SHA-1 of bytes, as in FIPS 180-4 */\nvar sha1 = (data) => {\n\tconst words = paddedWords(data);\n\tconst schedule = sha1Schedule;\n\tlet [h0, h1, h2, h3, h4] = SHA1_INITIAL_HASH;\n\tfor (let block = 0; block < words.length; block += 16) {\n\t\tschedule.set(words.subarray(block, block + 16));\n\t\tfor (let t = 16; t < 80; t++) schedule[t] = rotateLeft(schedule[t - 3] ^ schedule[t - 8] ^ schedule[t - 14] ^ schedule[t - 16], 1);\n\t\tlet [a, b, c, d, e] = [\n\t\t\th0,\n\t\t\th1,\n\t\t\th2,\n\t\t\th3,\n\t\t\th4\n\t\t];\n\t\tfor (let t = 0; t < 80; t++) {\n\t\t\tconst f = t < 20 ? b & c | ~b & d : t >= 40 && t < 60 ? b & c | b & d | c & d : b ^ c ^ d;\n\t\t\tconst next = rotateLeft(a, 5) + f + e + SHA1_ROUND_CONSTANTS[Math.floor(t / 20)] + schedule[t] | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = rotateLeft(b, 30);\n\t\t\tb = a;\n\t\t\ta = next;\n\t\t}\n\t\t[h0, h1, h2, h3, h4] = [\n\t\t\th0 + a | 0,\n\t\t\th1 + b | 0,\n\t\t\th2 + c | 0,\n\t\t\th3 + d | 0,\n\t\t\th4 + e | 0\n\t\t];\n\t}\n\treturn bytesOfWords([\n\t\th0,\n\t\th1,\n\t\th2,\n\t\th3,\n\t\th4\n\t]);\n};\nvar SHA256_ROUND_CONSTANTS = Int32Array.of(1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298);\nvar SHA256_INITIAL_HASH = [\n\t1779033703,\n\t3144134277,\n\t1013904242,\n\t2773480762,\n\t1359893119,\n\t2600822924,\n\t528734635,\n\t1541459225\n];\nvar sha256Schedule = /* @__PURE__ */ new Int32Array(64);\n/** SHA-256 of bytes, as in FIPS 180-4 */\nvar sha256 = (data) => {\n\tconst words = paddedWords(data);\n\tconst schedule = sha256Schedule;\n\tlet [h0, h1, h2, h3, h4, h5, h6, h7] = SHA256_INITIAL_HASH;\n\tfor (let block = 0; block < words.length; block += 16) {\n\t\tschedule.set(words.subarray(block, block + 16));\n\t\tfor (let t = 16; t < 64; t++) {\n\t\t\tconst early = schedule[t - 15];\n\t\t\tconst late = schedule[t - 2];\n\t\t\tschedule[t] = schedule[t - 16] + (rotateRight(early, 7) ^ rotateRight(early, 18) ^ early >>> 3) + schedule[t - 7] + (rotateRight(late, 17) ^ rotateRight(late, 19) ^ late >>> 10);\n\t\t}\n\t\tlet [a, b, c, d, e, f, g, h] = [\n\t\t\th0,\n\t\t\th1,\n\t\t\th2,\n\t\t\th3,\n\t\t\th4,\n\t\t\th5,\n\t\t\th6,\n\t\t\th7\n\t\t];\n\t\tfor (let t = 0; t < 64; t++) {\n\t\t\tconst first = h + (rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25)) + (e & f ^ ~e & g) + SHA256_ROUND_CONSTANTS[t] + schedule[t] | 0;\n\t\t\tconst second = (rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22)) + (a & b ^ a & c ^ b & c) | 0;\n\t\t\th = g;\n\t\t\tg = f;\n\t\t\tf = e;\n\t\t\te = d + first | 0;\n\t\t\td = c;\n\t\t\tc = b;\n\t\t\tb = a;\n\t\t\ta = first + second | 0;\n\t\t}\n\t\t[h0, h1, h2, h3, h4, h5, h6, h7] = [\n\t\t\th0 + a | 0,\n\t\t\th1 + b | 0,\n\t\t\th2 + c | 0,\n\t\t\th3 + d | 0,\n\t\t\th4 + e | 0,\n\t\t\th5 + f | 0,\n\t\t\th6 + g | 0,\n\t\t\th7 + h | 0\n\t\t];\n\t}\n\treturn bytesOfWords([\n\t\th0,\n\t\th1,\n\t\th2,\n\t\th3,\n\t\th4,\n\t\th5,\n\t\th6,\n\t\th7\n\t]);\n};\n// src/util/convenience-functions.ts\n/**\n* Convenience utility functions for unit conversion and unique ID generation.\n*\n* This module provides:\n* - Unit conversion functions (millimeters/inches to TWIP)\n* - Unique ID generators for various document elements\n* - Hash and UUID generation utilities\n*\n* @module\n*/\n/**\n* Converts millimeters to TWIP (twentieths of a point).\n*\n* TWIP is a common unit in Office Open XML where 1 inch = 1440 TWIP.\n*\n* @param millimeters - The measurement in millimeters to convert\n* @returns The equivalent measurement in TWIP\n*\n* @example\n* ```typescript\n* const width = convertMillimetersToTwip(25.4); // Returns 1440 (1 inch)\n* ```\n*\n* @publicApi\n*/\nvar convertMillimetersToTwip = (millimeters) => Math.floor(millimeters / 25.4 * 72 * 20);\n/**\n* Converts inches to TWIP (twentieths of a point).\n*\n* TWIP is a common unit in Office Open XML where 1 inch = 1440 TWIP.\n*\n* @param inches - The measurement in inches to convert\n* @returns The equivalent measurement in TWIP\n*\n* @example\n* ```typescript\n* const width = convertInchesToTwip(1); // Returns 1440\n* ```\n*\n* @publicApi\n*/\nvar convertInchesToTwip = (inches) => Math.floor(inches * 72 * 20);\n/**\n* Creates a unique numeric ID generator with sequential numbering.\n*\n* @param initial - The initial value to start counting from (default: 0)\n* @returns A function that returns incrementing numbers on each call\n*\n* @example\n* ```typescript\n* const idGen = uniqueNumericIdCreator(10);\n* console.log(idGen()); // 11\n* console.log(idGen()); // 12\n* console.log(idGen()); // 13\n* ```\n*/\nvar uniqueNumericIdCreator = (initial = 0) => {\n\tlet currentCount = initial;\n\treturn () => ++currentCount;\n};\n/**\n* Creates a unique numeric ID generator for abstract numbering definitions.\n*\n* Abstract numbering definitions define the appearance and behavior of lists.\n*\n* @returns A function that generates sequential IDs starting from 1\n*\n* @example\n* ```typescript\n* const idGen = abstractNumUniqueNumericIdGen();\n* const id = idGen(); // Returns 1\n* ```\n*/\nvar abstractNumUniqueNumericIdGen = () => uniqueNumericIdCreator();\n/**\n* Creates a unique numeric ID generator for concrete numbering instances.\n*\n* Concrete numbering instances reference abstract numbering definitions and are\n* used to apply numbering to paragraphs. Initial value is 1 because ID 1 is\n* reserved for \"default-bullet-numbering\".\n*\n* @returns A function that generates sequential IDs starting from 2\n*\n* @example\n* ```typescript\n* const idGen = concreteNumUniqueNumericIdGen();\n* const id = idGen(); // Returns 2 (1 is reserved)\n* ```\n*/\nvar concreteNumUniqueNumericIdGen = () => uniqueNumericIdCreator(1);\n/**\n* Creates a unique numeric ID generator for document properties.\n*\n* @returns A function that generates sequential IDs starting from 1\n*\n* @example\n* ```typescript\n* const idGen = docPropertiesUniqueNumericIdGen();\n* const id = idGen(); // Returns 1\n* ```\n*/\nvar docPropertiesUniqueNumericIdGen = () => uniqueNumericIdCreator();\n/**\n* Returns the next drawing ID from a single counter shared by every drawing.\n*\n* Drawing IDs (`wp:docPr` and `wps:cNvPr`) must be unique within a document,\n* and Word reports unreadable content when two drawings share one. A drawing\n* is created before it belongs to a document, so all drawings draw from this\n* one counter rather than a generator per instance.\n*\n* @returns A number no earlier call has returned\n*\n* @example\n* ```typescript\n* const first = docPropertiesUniqueNumericId();\n* const second = docPropertiesUniqueNumericId(); // first + 1\n* ```\n*/\nvar docPropertiesUniqueNumericId = docPropertiesUniqueNumericIdGen();\n/**\n* Creates a unique numeric ID generator for bookmarks.\n*\n* Bookmarks are used to mark specific locations in a document for navigation\n* and cross-referencing.\n*\n* @returns A function that generates sequential IDs starting from 1\n*\n* @example\n* ```typescript\n* const idGen = bookmarkUniqueNumericIdGen();\n* const id = idGen(); // Returns 1\n* ```\n*/\nvar bookmarkUniqueNumericIdGen = () => uniqueNumericIdCreator();\n/**\n* Returns the next bookmark ID from a single counter shared by every bookmark.\n*\n* Bookmark IDs must be unique within a document, but a bookmark is created\n* before it belongs to one, so all bookmarks draw from this one counter rather\n* than a generator per instance.\n*\n* @returns A number no earlier call has returned\n*\n* @example\n* ```typescript\n* const first = bookmarkUniqueNumericId();\n* const second = bookmarkUniqueNumericId(); // first + 1\n* ```\n*/\nvar bookmarkUniqueNumericId = bookmarkUniqueNumericIdGen();\nvar fitTextUniqueNumericIdGen = uniqueNumericIdCreator();\n/**\n* Returns the next ID for text fitted to a width on its own (`w:fitText`), from a single counter shared by every run.\n*\n* Word fits runs one after the other with the same ID together, and runs without one unreliably, so a run fitted\n* without a group is given an ID no other run has. The IDs count down from -1, as Word's own are negative, so they\n* don't meet the groups people give, which count up.\n*\n* @returns A negative number no earlier call has returned\n*\n* @example\n* ```typescript\n* const first = fitTextUniqueNumericId(); // -1\n* const second = fitTextUniqueNumericId(); // -2\n* ```\n*/\nvar fitTextUniqueNumericId = () => -fitTextUniqueNumericIdGen();\n/**\n* Generates a unique lowercase alphanumeric ID using nanoid.\n*\n* The ID is suitable for use as a relationship ID or other unique identifier\n* within a document.\n*\n* @returns A unique lowercase string ID\n*/\nvar uniqueId = () => nanoid().toLowerCase();\n/**\n* Generates a SHA-1 hash of the provided data.\n*\n* Useful for generating deterministic IDs based on content, such as for\n* image references or revision tracking.\n*\n* @param data - The data to hash (Buffer, string, Uint8Array, or ArrayBuffer)\n* @returns A hexadecimal string representation of the SHA-1 hash\n*\n* @example\n* ```typescript\n* const hash = hashedId(\"Hello World\"); // Returns \"0a4d55a8d778e5022fab701977c5d840bbc486d0\"\n* ```\n*/\nvar hashedId = (data) => Array.from(sha1(typeof data === \"string\" ? encodeUtf8(data) : ArrayBuffer.isView(data) ? data : new Uint8Array(data)), (byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n/**\n* Generates a random hexadecimal string of specified length.\n*\n* @param count - The number of hexadecimal characters to generate\n* @returns A random hexadecimal string\n*/\nvar generateUuidPart = (count) => customAlphabet(\"1234567890abcdef\", count)();\n/**\n* Generates a UUID v4-style unique identifier.\n*\n* The UUID follows the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n*\n* @returns A UUID string\n*\n* @example\n* ```typescript\n* const uuid = uniqueUuid(); // Returns \"a3bb189e-8bf9-3888-9912-ace4e6543002\"\n* ```\n*/\nvar uniqueUuid = () => `${generateUuidPart(8)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(12)}`;\n/**\n* Encode a string to UTF-8 bytes.\n*\n* The copy via `new Uint8Array()` ensures the returned array uses the\n* current module's Uint8Array constructor, avoiding cross-realm issues\n* in test environments (jsdom) where TextEncoder returns a different\n* realm's Uint8Array that fails `instanceof Uint8Array` checks.\n*/\nvar encodeUtf8 = (str) => new Uint8Array(new TextEncoder().encode(str));\n// src/file/paragraph/run/fit-text.ts\n/**\n* Fit text module for WordprocessingML run properties.\n*\n* This module provides Word's Fit Text, which squeezes or spreads a run's text so that it takes up a width given for it.\n*\n* Reference: ISO/IEC 29500-1, 17.3.2.14 fitText\n*\n* @module\n*/\n/**\n* Creates the fitting of a run's text to a width (`w:fitText`).\n*\n* Word writes an ID for each piece of fitted text, and fits runs without one unreliably: two of them next to each other\n* together, and some not at all. So a run without a group is given an ID of its own.\n*\n* A width given as a measure is written in twips, as Office's schemas allow only a whole number of them, though the\n* standard's allow a measure.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FitText\">\n* <xsd:attribute name=\"val\" type=\"s:ST_TwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createFitText({ width: 1440, group: 1 });\n* ```\n*/\nvar createFitText = ({ width, group }) => new BuilderElement({\n\tname: \"w:fitText\",\n\tattributes: {\n\t\tval: {\n\t\t\tkey: \"w:val\",\n\t\t\tvalue: Math.round(universalMeasureToTwips(twipsMeasureValue(width)))\n\t\t},\n\t\tid: {\n\t\t\tkey: \"w:id\",\n\t\t\tvalue: group === void 0 ? fitTextUniqueNumericId() : decimalNumber(group)\n\t\t}\n\t}\n});\n// src/file/paragraph/run/formatting.ts\n/**\n* Run formatting module for WordprocessingML documents.\n*\n* This module provides character-level formatting elements including\n* spacing, color, and highlighting.\n*\n* Reference: http://officeopenxml.com/WPtextFormatting.php\n*\n* @module\n*/\n/**\n* Represents character spacing (tracking) in a run.\n*\n* Adjusts the space between characters in the text.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SignedTwipsMeasure\">\n* <xsd:attribute name=\"val\" type=\"ST_SignedTwipsMeasure\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new CharacterSpacing(20); // 20 twips (1 point)\n* new CharacterSpacing(\"0.5pt\"); // Half point\n* ```\n*\n* @internal\n*/\nvar CharacterSpacing = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:spacing\");\n\t\tthis.root.push(new Attributes({ val: signedTwipsMeasureValue(value) }));\n\t}\n};\n/**\n* Represents text color in a run.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Color\">\n* <xsd:attribute name=\"val\" type=\"ST_HexColor\" use=\"required\"/>\n* <xsd:attribute name=\"themeColor\" type=\"ST_ThemeColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeTint\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"themeShade\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Color(\"FF0000\"); // Red text\n* new Color(\"auto\"); // Automatic color\n* new Color({ theme: \"accent1\", darker: 25 }); // The theme's first accent color, 25% darker\n* ```\n*\n* @internal\n*/\nvar Color = class extends XmlComponent {\n\tconstructor(color) {\n\t\tsuper(\"w:color\");\n\t\tthis.root.push(new ColorAttributeComponent([{\n\t\t\tkeys: _objectSpread2(_objectSpread2({}, COLOR_ATTRIBUTES), {}, { color: \"w:val\" }),\n\t\t\tcolor\n\t\t}]));\n\t}\n};\n/**\n* Represents text highlighting in a run.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_HighlightColor\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"black\"/>\n* <xsd:enumeration value=\"blue\"/>\n* <xsd:enumeration value=\"cyan\"/>\n* <xsd:enumeration value=\"green\"/>\n* <xsd:enumeration value=\"magenta\"/>\n* <xsd:enumeration value=\"red\"/>\n* <xsd:enumeration value=\"yellow\"/>\n* <xsd:enumeration value=\"white\"/>\n* <xsd:enumeration value=\"darkBlue\"/>\n* <xsd:enumeration value=\"darkCyan\"/>\n* <xsd:enumeration value=\"darkGreen\"/>\n* <xsd:enumeration value=\"darkMagenta\"/>\n* <xsd:enumeration value=\"darkRed\"/>\n* <xsd:enumeration value=\"darkYellow\"/>\n* <xsd:enumeration value=\"darkGray\"/>\n* <xsd:enumeration value=\"lightGray\"/>\n* <xsd:enumeration value=\"none\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @example\n* ```typescript\n* new Highlight(\"yellow\"); // Yellow highlight\n* new Highlight(\"cyan\"); // Cyan highlight\n* ```\n*\n* @internal\n*/\nvar Highlight = class extends XmlComponent {\n\tconstructor(color) {\n\t\tsuper(\"w:highlight\");\n\t\tthis.root.push(new Attributes({ val: color }));\n\t}\n};\n// src/file/paragraph/run/language.ts\n/**\n* Language module for WordprocessingML run properties.\n*\n* This module provides support for specifying the language of text content,\n* which affects spell checking, grammar checking, and hyphenation.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Creates a language component for run properties.\n*\n* This function creates a language element that specifies the language for text content.\n* The language setting affects spell checking, grammar checking, and hyphenation.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @param options - Language options for different text types\n* @returns XmlComponent representing the language element\n*\n* @example\n* ```typescript\n* // Set language for English (US)\n* createLanguageComponent({ value: \"en-US\" });\n*\n* // Set different languages for different scripts\n* createLanguageComponent({\n* value: \"en-US\",\n* eastAsia: \"ja-JP\",\n* bidirectional: \"ar-SA\",\n* });\n* ```\n*/\nvar createLanguageComponent = (options) => new BuilderElement({\n\tname: \"w:lang\",\n\tattributes: {\n\t\tvalue: {\n\t\t\tkey: \"w:val\",\n\t\t\tvalue: options.value\n\t\t},\n\t\teastAsia: {\n\t\t\tkey: \"w:eastAsia\",\n\t\t\tvalue: options.eastAsia\n\t\t},\n\t\tbidirectional: {\n\t\t\tkey: \"w:bidi\",\n\t\t\tvalue: options.bidirectional\n\t\t}\n\t}\n});\n// src/file/paragraph/run/run-fonts.ts\n/**\n* Run fonts module for WordprocessingML documents.\n*\n* This module provides support for specifying fonts for different character sets\n* within a run. Fonts can be specified separately for ASCII, complex script (CS),\n* East Asian, and high ANSI character ranges.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Creates font settings for a run in a WordprocessingML document.\n*\n* The rFonts element specifies which fonts should be used for different character\n* ranges in a run. This allows documents to use different fonts for ASCII, complex\n* script, East Asian, and high ANSI characters.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Fonts\">\n* <xsd:attribute name=\"hint\" type=\"ST_Hint\"/>\n* <xsd:attribute name=\"ascii\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"hAnsi\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"eastAsia\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"cs\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"asciiTheme\" type=\"ST_Theme\"/>\n* <xsd:attribute name=\"hAnsiTheme\" type=\"ST_Theme\"/>\n* <xsd:attribute name=\"eastAsiaTheme\" type=\"ST_Theme\"/>\n* <xsd:attribute name=\"cstheme\" type=\"ST_Theme\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Use same font for all character sets\n* createRunFonts(\"Arial\");\n*\n* // Specify different fonts for different character sets\n* createRunFonts({\n* ascii: \"Arial\",\n* eastAsia: \"MS Mincho\",\n* cs: \"Arial\",\n* hAnsi: \"Arial\",\n* });\n*\n* // Use the theme's font for body text, in every character set\n* createRunFonts({ theme: \"body\" });\n* ```\n*/\nvar createRunFonts = (nameOrAttrs, hint) => {\n\tif (typeof nameOrAttrs === \"string\") {\n\t\tconst name = nameOrAttrs;\n\t\treturn new BuilderElement({\n\t\t\tname: \"w:rFonts\",\n\t\t\tattributes: {\n\t\t\t\tascii: {\n\t\t\t\t\tkey: \"w:ascii\",\n\t\t\t\t\tvalue: name\n\t\t\t\t},\n\t\t\t\tcs: {\n\t\t\t\t\tkey: \"w:cs\",\n\t\t\t\t\tvalue: name\n\t\t\t\t},\n\t\t\t\teastAsia: {\n\t\t\t\t\tkey: \"w:eastAsia\",\n\t\t\t\t\tvalue: name\n\t\t\t\t},\n\t\t\t\thAnsi: {\n\t\t\t\t\tkey: \"w:hAnsi\",\n\t\t\t\t\tvalue: name\n\t\t\t\t},\n\t\t\t\thint: {\n\t\t\t\t\tkey: \"w:hint\",\n\t\t\t\t\tvalue: hint\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tif (\"theme\" in nameOrAttrs) {\n\t\tconst theme = nameOrAttrs.theme === \"headings\" ? \"major\" : \"minor\";\n\t\treturn new BuilderElement({\n\t\t\tname: \"w:rFonts\",\n\t\t\tattributes: {\n\t\t\t\tascii: {\n\t\t\t\t\tkey: \"w:asciiTheme\",\n\t\t\t\t\tvalue: `${theme}HAnsi`\n\t\t\t\t},\n\t\t\t\teastAsia: {\n\t\t\t\t\tkey: \"w:eastAsiaTheme\",\n\t\t\t\t\tvalue: `${theme}EastAsia`\n\t\t\t\t},\n\t\t\t\thAnsi: {\n\t\t\t\t\tkey: \"w:hAnsiTheme\",\n\t\t\t\t\tvalue: `${theme}HAnsi`\n\t\t\t\t},\n\t\t\t\tcs: {\n\t\t\t\t\tkey: \"w:cstheme\",\n\t\t\t\t\tvalue: `${theme}Bidi`\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tconst attrs = nameOrAttrs;\n\treturn new BuilderElement({\n\t\tname: \"w:rFonts\",\n\t\tattributes: {\n\t\t\tascii: {\n\t\t\t\tkey: \"w:ascii\",\n\t\t\t\tvalue: attrs.ascii\n\t\t\t},\n\t\t\tcs: {\n\t\t\t\tkey: \"w:cs\",\n\t\t\t\tvalue: attrs.cs\n\t\t\t},\n\t\t\teastAsia: {\n\t\t\t\tkey: \"w:eastAsia\",\n\t\t\t\tvalue: attrs.eastAsia\n\t\t\t},\n\t\t\thAnsi: {\n\t\t\t\tkey: \"w:hAnsi\",\n\t\t\t\tvalue: attrs.hAnsi\n\t\t\t},\n\t\t\thint: {\n\t\t\t\tkey: \"w:hint\",\n\t\t\t\tvalue: attrs.hint\n\t\t\t}\n\t\t}\n\t});\n};\n// src/file/paragraph/run/script.ts\n/**\n* Subscript and superscript module for WordprocessingML documents.\n*\n* This module provides vertical alignment elements for subscript\n* and superscript text formatting.\n*\n* Reference: http://officeopenxml.com/WPtextFormatting.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_VerticalAlignRun\">\n* <xsd:attribute name=\"val\" type=\"ST_VerticalAlignRun\" use=\"required\"/>\n* </xsd:complexType>\n* <xsd:simpleType name=\"ST_VerticalAlignRun\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"baseline\"/>\n* <xsd:enumeration value=\"superscript\"/>\n* <xsd:enumeration value=\"subscript\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @module\n*/\n/**\n* Creates a vertical alignment run element.\n* @internal\n*/\nvar createVerticalAlignRun = (type) => new BuilderElement({\n\tname: \"w:vertAlign\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: type\n\t} }\n});\n/**\n* Creates superscript text formatting.\n*\n* Raises text above the baseline, commonly used for exponents\n* and ordinal indicators.\n*/\nvar createSuperScript = () => createVerticalAlignRun(\"superscript\");\n/**\n* Creates subscript text formatting.\n*\n* Lowers text below the baseline, commonly used for chemical\n* formulas and footnote references.\n*/\nvar createSubScript = () => createVerticalAlignRun(\"subscript\");\n// src/file/paragraph/run/underline.ts\n/**\n* Underline module for WordprocessingML documents.\n*\n* This module provides support for underlining text with various styles and colors.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Underline style types for text.\n*\n* Defines the various underline patterns that can be applied to text runs.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_Underline\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"single\"/>\n* <xsd:enumeration value=\"words\"/>\n* <xsd:enumeration value=\"double\"/>\n* <xsd:enumeration value=\"thick\"/>\n* <xsd:enumeration value=\"dotted\"/>\n* <xsd:enumeration value=\"dottedHeavy\"/>\n* <xsd:enumeration value=\"dash\"/>\n* <xsd:enumeration value=\"dashedHeavy\"/>\n* <xsd:enumeration value=\"dashLong\"/>\n* <xsd:enumeration value=\"dashLongHeavy\"/>\n* <xsd:enumeration value=\"dotDash\"/>\n* <xsd:enumeration value=\"dashDotHeavy\"/>\n* <xsd:enumeration value=\"dotDotDash\"/>\n* <xsd:enumeration value=\"dashDotDotHeavy\"/>\n* <xsd:enumeration value=\"wave\"/>\n* <xsd:enumeration value=\"wavyHeavy\"/>\n* <xsd:enumeration value=\"wavyDouble\"/>\n* <xsd:enumeration value=\"none\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar UnderlineType = {\n\t/** Single underline */\n\tSINGLE: \"single\",\n\t/** Underline words only (not spaces) */\n\tWORDS: \"words\",\n\t/** Double underline */\n\tDOUBLE: \"double\",\n\t/** Thick single underline */\n\tTHICK: \"thick\",\n\t/** Dotted underline */\n\tDOTTED: \"dotted\",\n\t/** Heavy dotted underline */\n\tDOTTEDHEAVY: \"dottedHeavy\",\n\t/** Dashed underline */\n\tDASH: \"dash\",\n\t/** Heavy dashed underline */\n\tDASHEDHEAVY: \"dashedHeavy\",\n\t/** Long dashed underline */\n\tDASHLONG: \"dashLong\",\n\t/** Heavy long dashed underline */\n\tDASHLONGHEAVY: \"dashLongHeavy\",\n\t/** Dot-dash underline */\n\tDOTDASH: \"dotDash\",\n\t/** Heavy dot-dash underline */\n\tDASHDOTHEAVY: \"dashDotHeavy\",\n\t/** Dot-dot-dash underline */\n\tDOTDOTDASH: \"dotDotDash\",\n\t/** Heavy dot-dot-dash underline */\n\tDASHDOTDOTHEAVY: \"dashDotDotHeavy\",\n\t/** Wave underline */\n\tWAVE: \"wave\",\n\t/** Heavy wave underline */\n\tWAVYHEAVY: \"wavyHeavy\",\n\t/** Double wave underline */\n\tWAVYDOUBLE: \"wavyDouble\",\n\t/** No underline */\n\tNONE: \"none\"\n};\n/**\n* Creates underline formatting for a run in a WordprocessingML document.\n*\n* The u element specifies the style and optional color of underline\n* formatting applied to text.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Underline\">\n* <xsd:attribute name=\"val\" type=\"ST_Underline\" use=\"required\"/>\n* <xsd:attribute name=\"color\" type=\"ST_HexColor\"/>\n* <xsd:attribute name=\"themeColor\" type=\"ST_ThemeColor\"/>\n* <xsd:attribute name=\"themeTint\" type=\"ST_UcharHexNumber\"/>\n* <xsd:attribute name=\"themeShade\" type=\"ST_UcharHexNumber\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Simple single underline\n* createUnderline();\n*\n* // Double underline\n* createUnderline(UnderlineType.DOUBLE);\n*\n* // Red wavy underline\n* createUnderline(UnderlineType.WAVE, \"FF0000\");\n*\n* // Underline in the theme's first accent color\n* createUnderline(UnderlineType.SINGLE, { theme: \"accent1\" });\n* ```\n*/\nvar createUnderline = (underlineType = UnderlineType.SINGLE, color) => createColorElement(\"w:u\", [{\n\tkey: \"w:val\",\n\tvalue: underlineType\n}, {\n\tkeys: COLOR_ATTRIBUTES,\n\tcolor\n}]);\n// src/file/paragraph/run/properties.ts\n/**\n* Run properties module for WordprocessingML documents.\n*\n* This module provides the run properties (rPr) element which specifies\n* the formatting applied to a run of text.\n*\n* Reference: https://www.ecma-international.org/wp-content/uploads/ECMA-376-1_5th_edition_december_2016.zip\n* Section 17.3.2.21 (page 297)\n*\n* @module\n*/\n/**\n* Text animation effect types.\n*\n* These effects specify animations that can be applied to text. Note that\n* these effects are deprecated and may not be supported by all applications.\n*\n* Reference: http://officeopenxml.com/WPtextFormatting.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_TextEffect\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"blinkBackground\"/>\n* <xsd:enumeration value=\"lights\"/>\n* <xsd:enumeration value=\"antsBlack\"/>\n* <xsd:enumeration value=\"antsRed\"/>\n* <xsd:enumeration value=\"shimmer\"/>\n* <xsd:enumeration value=\"sparkle\"/>\n* <xsd:enumeration value=\"none\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar TextEffect = {\n\t/** Blinking background animation */\n\tBLINK_BACKGROUND: \"blinkBackground\",\n\t/** Lights animation effect */\n\tLIGHTS: \"lights\",\n\t/** Black marching ants animation */\n\tANTS_BLACK: \"antsBlack\",\n\t/** Red marching ants animation */\n\tANTS_RED: \"antsRed\",\n\t/** Shimmer animation effect */\n\tSHIMMER: \"shimmer\",\n\t/** Sparkle animation effect */\n\tSPARKLE: \"sparkle\",\n\t/** No text effect */\n\tNONE: \"none\"\n};\n/**\n* Highlight color values for text highlighting.\n*\n* These colors specify the background highlight color that can be applied to text.\n*\n* Reference: http://officeopenxml.com/WPtextShading.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_HighlightColor\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"black\"/>\n* <xsd:enumeration value=\"blue\"/>\n* <xsd:enumeration value=\"cyan\"/>\n* <xsd:enumeration value=\"green\"/>\n* <xsd:enumeration value=\"magenta\"/>\n* <xsd:enumeration value=\"red\"/>\n* <xsd:enumeration value=\"yellow\"/>\n* <xsd:enumeration value=\"white\"/>\n* <xsd:enumeration value=\"darkBlue\"/>\n* <xsd:enumeration value=\"darkCyan\"/>\n* <xsd:enumeration value=\"darkGreen\"/>\n* <xsd:enumeration value=\"darkMagenta\"/>\n* <xsd:enumeration value=\"darkRed\"/>\n* <xsd:enumeration value=\"darkYellow\"/>\n* <xsd:enumeration value=\"darkGray\"/>\n* <xsd:enumeration value=\"lightGray\"/>\n* <xsd:enumeration value=\"none\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*/\nvar HighlightColor = {\n\t/** Black highlight */\n\tBLACK: \"black\",\n\t/** Blue highlight */\n\tBLUE: \"blue\",\n\t/** Cyan highlight */\n\tCYAN: \"cyan\",\n\t/** Dark blue highlight */\n\tDARK_BLUE: \"darkBlue\",\n\t/** Dark cyan highlight */\n\tDARK_CYAN: \"darkCyan\",\n\t/** Dark gray highlight */\n\tDARK_GRAY: \"darkGray\",\n\t/** Dark green highlight */\n\tDARK_GREEN: \"darkGreen\",\n\t/** Dark magenta highlight */\n\tDARK_MAGENTA: \"darkMagenta\",\n\t/** Dark red highlight */\n\tDARK_RED: \"darkRed\",\n\t/** Dark yellow highlight */\n\tDARK_YELLOW: \"darkYellow\",\n\t/** Green highlight */\n\tGREEN: \"green\",\n\t/** Light gray highlight */\n\tLIGHT_GRAY: \"lightGray\",\n\t/** Magenta highlight */\n\tMAGENTA: \"magenta\",\n\t/** No highlight */\n\tNONE: \"none\",\n\t/** Red highlight */\n\tRED: \"red\",\n\t/** White highlight */\n\tWHITE: \"white\",\n\t/** Yellow highlight */\n\tYELLOW: \"yellow\"\n};\n/**\n* Represents run properties (rPr) in a WordprocessingML document.\n*\n* Run properties specify all character-level formatting applied to text,\n* such as bold, italic, font, size, color, underline, and other text effects.\n*\n* Reference: http://officeopenxml.com/WPtextFormatting.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_RPr\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_RPrContent\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* The EG_RPrBase group includes elements like rStyle, rFonts, b, bCs, i, iCs,\n* caps, smallCaps, strike, dstrike, outline, shadow, emboss, imprint, noProof,\n* snapToGrid, vanish, color, spacing, w, kern, position, sz, szCs, highlight,\n* u, effect, bdr, shd, vertAlign, rtl, em, lang, and more.\n*/\nvar RunProperties = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:rPr\");\n\t\tif (!options) return;\n\t\tif (options.style) this.push(new StringValueElement(\"w:rStyle\", options.style));\n\t\tif (options.font) {\n\t\t\tif (typeof options.font === \"string\") this.push(createRunFonts(options.font));\n\t\t\telse if (\"name\" in options.font) this.push(createRunFonts(options.font.name, options.font.hint));\n\t\t\telse this.push(createRunFonts(options.font));\n\t\t}\n\t\tif (options.bold !== void 0) this.push(new OnOffElement(\"w:b\", options.bold));\n\t\tif (options.boldComplexScript === void 0 && options.bold !== void 0 || options.boldComplexScript) {\n\t\t\tvar _options$boldComplexS;\n\t\t\tthis.push(new OnOffElement(\"w:bCs\", (_options$boldComplexS = options.boldComplexScript) !== null && _options$boldComplexS !== void 0 ? _options$boldComplexS : options.bold));\n\t\t}\n\t\tif (options.italics !== void 0) this.push(new OnOffElement(\"w:i\", options.italics));\n\t\tif (options.italicsComplexScript === void 0 && options.italics !== void 0 || options.italicsComplexScript) {\n\t\t\tvar _options$italicsCompl;\n\t\t\tthis.push(new OnOffElement(\"w:iCs\", (_options$italicsCompl = options.italicsComplexScript) !== null && _options$italicsCompl !== void 0 ? _options$italicsCompl : options.italics));\n\t\t}\n\t\tif (options.smallCaps !== void 0) this.push(new OnOffElement(\"w:smallCaps\", options.smallCaps));\n\t\telse if (options.allCaps !== void 0) this.push(new OnOffElement(\"w:caps\", options.allCaps));\n\t\tif (options.strike !== void 0) this.push(new OnOffElement(\"w:strike\", options.strike));\n\t\tif (options.doubleStrike !== void 0) this.push(new OnOffElement(\"w:dstrike\", options.doubleStrike));\n\t\tif (options.emboss !== void 0) this.push(new OnOffElement(\"w:emboss\", options.emboss));\n\t\tif (options.imprint !== void 0) this.push(new OnOffElement(\"w:imprint\", options.imprint));\n\t\tif (options.noProof !== void 0) this.push(new OnOffElement(\"w:noProof\", options.noProof));\n\t\tif (options.snapToGrid !== void 0) this.push(new OnOffElement(\"w:snapToGrid\", options.snapToGrid));\n\t\tif (options.vanish !== void 0) this.push(new OnOffElement(\"w:vanish\", options.vanish));\n\t\tif (options.color) this.push(new Color(options.color));\n\t\tif (options.characterSpacing) this.push(new CharacterSpacing(options.characterSpacing));\n\t\tif (options.scale !== void 0) this.push(new NumberValueElement(\"w:w\", options.scale));\n\t\tif (options.kern) this.push(new HpsMeasureElement(\"w:kern\", options.kern));\n\t\tif (options.position) this.push(new StringValueElement(\"w:position\", options.position));\n\t\tif (options.size !== void 0) this.push(new HpsMeasureElement(\"w:sz\", options.size));\n\t\tconst szCs = options.sizeComplexScript === void 0 || options.sizeComplexScript === true ? options.size : options.sizeComplexScript;\n\t\tif (szCs) this.push(new HpsMeasureElement(\"w:szCs\", szCs));\n\t\tif (options.highlight) this.push(new Highlight(options.highlight));\n\t\tif (options.underline) this.push(createUnderline(options.underline.type, options.underline.color));\n\t\tif (options.effect) this.push(new StringValueElement(\"w:effect\", options.effect));\n\t\tif (options.border) this.push(createBorderElement(\"w:bdr\", options.border));\n\t\tif (options.shading) this.push(createShading(options.shading));\n\t\tif (options.fitText) this.push(createFitText(options.fitText));\n\t\tif (options.subScript) this.push(createSubScript());\n\t\tif (options.superScript) this.push(createSuperScript());\n\t\tif (options.rightToLeft !== void 0) this.push(new OnOffElement(\"w:rtl\", options.rightToLeft));\n\t\tif (options.emphasisMark) this.push(createEmphasisMark(options.emphasisMark.type));\n\t\tif (options.language) this.push(createLanguageComponent(options.language));\n\t\tif (options.eastAsianLayout) this.push(createEastAsianLayout(options.eastAsianLayout));\n\t\tif (options.specVanish !== void 0) this.push(new OnOffElement(\"w:specVanish\", options.specVanish));\n\t\tif (options.math !== void 0) this.push(new OnOffElement(\"w:oMath\", options.math));\n\t\tif (options.revision) this.push(new RunPropertiesChange(options.revision));\n\t}\n\tpush(item) {\n\t\tthis.root.push(item);\n\t}\n};\nvar ParagraphRunProperties = class extends RunProperties {\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tif (options === null || options === void 0 ? void 0 : options.insertion) this.push(new InsertionTrackChange(options.insertion));\n\t\tif (options === null || options === void 0 ? void 0 : options.deletion) this.push(new DeletionTrackChange(options.deletion));\n\t}\n};\n/**\n* Represents a run properties change element for revision tracking.\n*\n* This element is used to track changes to run properties when revision\n* tracking is enabled in the document.\n*/\nvar RunPropertiesChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:rPrChange\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.addChildElement(new RunProperties(options));\n\t}\n};\n// src/file/paragraph/run/run-components/text.ts\n/**\n* Text module for WordprocessingML run content.\n*\n* This module provides the Text class for text content within runs.\n*\n* @module\n*/\n/**\n* Represents a text element within a run.\n*\n* Text is the container for actual character content in a Word document.\n* It corresponds to the `<w:t>` element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Text\">\n* <xsd:simpleContent>\n* <xsd:extension base=\"s:ST_String\">\n* <xsd:attribute ref=\"xml:space\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:simpleContent>\n* </xsd:complexType>\n* ```\n*/\nvar Text = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:t\");\n\t\tif (typeof options === \"string\") {\n\t\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\t\tthis.root.push(options);\n\t\t} else {\n\t\t\tvar _options$space;\n\t\t\tthis.root.push(new TextAttributes({ space: (_options$space = options.space) !== null && _options$space !== void 0 ? _options$space : SpaceType.DEFAULT }));\n\t\t\tthis.root.push(options.text);\n\t\t}\n\t}\n};\n// src/file/paragraph/run/run.ts\n/**\n* Constants for page number field types.\n*\n* These values are used to insert dynamic page number fields into a document.\n*\n* Reference: http://officeopenxml.com/WPfields.php\n*\n* @publicApi\n*/\nvar PageNumber = {\n\t/** Inserts the current page number */\n\tCURRENT: \"CURRENT\",\n\t/** Inserts the total number of pages in the document */\n\tTOTAL_PAGES: \"TOTAL_PAGES\",\n\t/** Inserts the total number of pages in the current section */\n\tTOTAL_PAGES_IN_SECTION: \"TOTAL_PAGES_IN_SECTION\",\n\t/** Inserts the current section number */\n\tCURRENT_SECTION: \"SECTION\"\n};\n/** The parts of the field a page number child shows, in order, or undefined when the child is text */\nvar pageNumberFieldOf = (child) => {\n\tswitch (child) {\n\t\tcase PageNumber.CURRENT: return [\n\t\t\tcreateBegin(),\n\t\t\tnew Page(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tcase PageNumber.TOTAL_PAGES: return [\n\t\t\tcreateBegin(),\n\t\t\tnew NumberOfPages(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tcase PageNumber.TOTAL_PAGES_IN_SECTION: return [\n\t\t\tcreateBegin(),\n\t\t\tnew NumberOfPagesSection(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tcase PageNumber.CURRENT_SECTION: return [\n\t\t\tcreateBegin(),\n\t\t\tnew CurrentSection(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tdefault: return;\n\t}\n};\n/**\n* Represents a run of text with uniform formatting in a WordprocessingML document.\n*\n* A run is the lowest level unit of text in a paragraph. All content within a run\n* shares the same formatting properties (bold, italic, font, size, etc.).\n*\n* Reference: http://officeopenxml.com/WPtext.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_R\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_RPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_RunInnerContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"rsidRPr\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidDel\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidR\" type=\"ST_LongHexNumber\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Simple run with text\n* new Run({ text: \"Hello World\" });\n*\n* // Bold and italic run\n* new Run({ text: \"Formatted\", bold: true, italics: true });\n*\n* // Run with page number\n* new Run({ children: [PageNumber.CURRENT] });\n* ```\n*/\nvar Run = class Run extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:r\");\n\t\t_defineProperty(this, \"properties\", void 0);\n\t\t_defineProperty(this, \"following\", []);\n\t\tthis.properties = new RunProperties(options);\n\t\tthis.root.push(this.properties);\n\t\tif (options.break) for (let i = 0; i < options.break; i++) this.root.push(createBreak());\n\t\tif (options.children) for (const [index, child] of options.children.entries()) {\n\t\t\tif (elementOf(child) === \"w:r\") {\n\t\t\t\tconst rest = options.children.slice(index + 1);\n\t\t\t\tthis.following = [child, ...rest.length > 0 ? [new Run(_objectSpread2(_objectSpread2({}, options), {}, {\n\t\t\t\t\tbreak: void 0,\n\t\t\t\t\tchildren: rest\n\t\t\t\t}))] : []];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (typeof child === \"string\") {\n\t\t\t\tconst field = pageNumberFieldOf(child);\n\t\t\t\tif (field) {\n\t\t\t\t\tconst rest = options.children.slice(index + 1);\n\t\t\t\t\tconst runOf = (children) => new Run(_objectSpread2(_objectSpread2({}, options), {}, {\n\t\t\t\t\t\tbreak: void 0,\n\t\t\t\t\t\tchildren\n\t\t\t\t\t}));\n\t\t\t\t\tconst beginsHere = this.root.length === 1;\n\t\t\t\t\tif (beginsHere) this.root.push(field[0]);\n\t\t\t\t\tconst parts = beginsHere ? field.slice(1) : field;\n\t\t\t\t\tthis.following = [...parts.map((part) => runOf([part])), ...rest.length > 0 ? [runOf(rest)] : []];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthis.root.push(new Text(child));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.root.push(child);\n\t\t}\n\t\telse if (options.text !== void 0) this.root.push(new Text(options.text));\n\t}\n\tget writtenAs() {\n\t\treturn this.following.length > 0 ? [this, ...this.following.flatMap((run) => {\n\t\t\tvar _run$writtenAs;\n\t\t\treturn (_run$writtenAs = run.writtenAs) !== null && _run$writtenAs !== void 0 ? _run$writtenAs : run;\n\t\t})] : void 0;\n\t}\n};\n// src/file/paragraph/run/text-run.ts\n/**\n* Represents a text run in a WordprocessingML document.\n*\n* TextRun is a convenience class that extends Run, allowing you to pass\n* either a string or full run options. This is the most common way to\n* add text content to a paragraph.\n*\n* Reference: http://officeopenxml.com/WPtext.php\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* // Simple text\n* new TextRun(\"Hello World\");\n*\n* // Formatted text\n* new TextRun({ text: \"Bold Text\", bold: true });\n* ```\n*/\nvar TextRun = class extends Run {\n\tconstructor(options) {\n\t\tsuper(typeof options === \"string\" ? { text: options } : options);\n\t}\n};\n// src/file/paragraph/run/run-components/symbol.ts\n/**\n* Symbol module for WordprocessingML run content.\n*\n* This module provides support for inserting symbol characters\n* from symbol fonts like Wingdings or Symbol.\n*\n* @module\n*/\n/**\n* Attributes for the symbol element.\n* @internal\n*/\nvar SymbolAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tchar: \"w:char\",\n\t\t\tsymbolfont: \"w:font\"\n\t\t});\n\t}\n};\n/**\n* Represents a symbol character in a run.\n*\n* Symbol inserts a character from a symbol font using its\n* character code (hex value).\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Sym\">\n* <xsd:attribute name=\"font\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"char\" type=\"s:ST_ShortHexNumber\"/>\n* </xsd:complexType>\n* ```\n*/\nvar Symbol$1 = class extends XmlComponent {\n\tconstructor(char = \"\", symbolfont = \"Wingdings\") {\n\t\tsuper(\"w:sym\");\n\t\tthis.root.push(new SymbolAttributes({\n\t\t\tchar,\n\t\t\tsymbolfont\n\t\t}));\n\t}\n};\n// src/file/paragraph/run/symbol-run.ts\n/**\n* SymbolRun module for WordprocessingML documents.\n*\n* This module provides support for inserting symbol characters into documents.\n*\n* @module\n*/\n/**\n* Represents a symbol character in a WordprocessingML document.\n*\n* SymbolRun is used to insert special characters from symbol fonts.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new SymbolRun({\n* char: \"F04A\",\n* symbolfont: \"Wingdings\",\n* });\n* ```\n*/\nvar SymbolRun = class extends Run {\n\tconstructor(options) {\n\t\tsuper(typeof options === \"string\" ? {} : options);\n\t\tthis.root.push(typeof options === \"string\" ? new Symbol$1(options) : new Symbol$1(options.char, options.symbolfont));\n\t}\n};\n// src/file/paragraph/run/image-data.ts\nvar convertDataURIToBinary = (dataURI) => {\n\tconst base64Index = dataURI.indexOf(\";base64,\");\n\tconst base64IndexWithOffset = base64Index === -1 ? 0 : base64Index + 8;\n\treturn new Uint8Array(atob(dataURI.substring(base64IndexWithOffset)).split(\"\").map((c) => c.charCodeAt(0)));\n};\nvar standardizeData = (data) => typeof data === \"string\" ? convertDataURIToBinary(data) : data;\nvar SIGNATURES = [\n\t[\"png\", [\n\t\t137,\n\t\t80,\n\t\t78,\n\t\t71,\n\t\t13,\n\t\t10,\n\t\t26,\n\t\t10\n\t]],\n\t[\"jpg\", [\n\t\t255,\n\t\t216,\n\t\t255\n\t]],\n\t[\"gif\", [\n\t\t71,\n\t\t73,\n\t\t70,\n\t\t56,\n\t\t55,\n\t\t97\n\t]],\n\t[\"gif\", [\n\t\t71,\n\t\t73,\n\t\t70,\n\t\t56,\n\t\t57,\n\t\t97\n\t]],\n\t[\"bmp\", [66, 77]]\n];\n/**\n* The format of an image given without a `type`, read from the bytes its file starts with. Without one, its file in the\n* package would be named `.undefined`, which has no content type, so Word reports the document as unreadable.\n*/\nvar imageTypeOf = ({ type, data }, name) => {\n\tif (type !== void 0) return type;\n\tconst standardized = standardizeData(data);\n\tconst bytes = ArrayBuffer.isView(standardized) ? new Uint8Array(standardized.buffer, standardized.byteOffset, standardized.byteLength) : new Uint8Array(standardized);\n\tconst signature = SIGNATURES.find(([, start]) => start.every((byte, index) => bytes[index] === byte));\n\tif (signature === void 0) throw new Error(`${name}: type isn't given, and data isn't a PNG, JPEG, GIF or BMP file to read it from. Give its type`);\n\treturn signature[0];\n};\n// src/file/drawing/floating/floating-position.ts\n/**\n* Horizontal Relative Positioning.\n*\n* Specifies the horizontal base from which the drawing position is calculated.\n*\n* Reference: https://www.datypic.com/sc/ooxml/t-wp_ST_RelFromH.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_RelFromH\">\n* <xsd:restriction base=\"xsd:token\">\n* <xsd:enumeration value=\"margin\"/>\n* <xsd:enumeration value=\"page\"/>\n* <xsd:enumeration value=\"column\"/>\n* <xsd:enumeration value=\"character\"/>\n* <xsd:enumeration value=\"leftMargin\"/>\n* <xsd:enumeration value=\"rightMargin\"/>\n* <xsd:enumeration value=\"insideMargin\"/>\n* <xsd:enumeration value=\"outsideMargin\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar HorizontalPositionRelativeFrom = {\n\t/**\n\t* ## Character\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the position of the anchor within its run content.\n\t*/\n\tCHARACTER: \"character\",\n\t/**\n\t* ## Column\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the extents of the column which contains its anchor.\n\t*/\n\tCOLUMN: \"column\",\n\t/**\n\t* ## Inside Margin\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the inside margin of the current page (the left margin on odd pages, right on even pages).\n\t*/\n\tINSIDE_MARGIN: \"insideMargin\",\n\t/**\n\t* ## Left Margin\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the left margin of the page.\n\t*/\n\tLEFT_MARGIN: \"leftMargin\",\n\t/**\n\t* ## Page Margin\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the page margins.\n\t*/\n\tMARGIN: \"margin\",\n\t/**\n\t* ## Outside Margin\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the outside margin of the current page (the right margin on odd pages, left on even pages).\n\t*/\n\tOUTSIDE_MARGIN: \"outsideMargin\",\n\t/**\n\t* ## Page Edge\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the edge of the page.\n\t*/\n\tPAGE: \"page\",\n\t/**\n\t* ## Right Margin\n\t*\n\t* Specifies that the horizontal positioning shall be relative to the right margin of the page.\n\t*/\n\tRIGHT_MARGIN: \"rightMargin\"\n};\n/**\n* Vertical Relative Positioning.\n*\n* Specifies the vertical base from which the drawing position is calculated.\n*\n* Reference: https://www.datypic.com/sc/ooxml/t-wp_ST_RelFromV.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_RelFromV\">\n* <xsd:restriction base=\"xsd:token\">\n* <xsd:enumeration value=\"margin\"/>\n* <xsd:enumeration value=\"page\"/>\n* <xsd:enumeration value=\"paragraph\"/>\n* <xsd:enumeration value=\"line\"/>\n* <xsd:enumeration value=\"topMargin\"/>\n* <xsd:enumeration value=\"bottomMargin\"/>\n* <xsd:enumeration value=\"insideMargin\"/>\n* <xsd:enumeration value=\"outsideMargin\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar VerticalPositionRelativeFrom = {\n\t/**\n\t* ## Bottom Margin\n\t*\n\t* Specifies that the vertical positioning shall be relative to the bottom margin of the current page.\n\t*/\n\tBOTTOM_MARGIN: \"bottomMargin\",\n\t/**\n\t* ## Inside Margin\n\t*\n\t* Specifies that the vertical positioning shall be relative to the inside margin of the current page.\n\t*/\n\tINSIDE_MARGIN: \"insideMargin\",\n\t/**\n\t* ## Line\n\t*\n\t* Specifies that the vertical positioning shall be relative to the line containing the anchor character.\n\t*/\n\tLINE: \"line\",\n\t/**\n\t* ## Page Margin\n\t*\n\t* Specifies that the vertical positioning shall be relative to the page margins.\n\t*/\n\tMARGIN: \"margin\",\n\t/**\n\t* ## Outside Margin\n\t*\n\t* Specifies that the vertical positioning shall be relative to the outside margin of the current page.\n\t*/\n\tOUTSIDE_MARGIN: \"outsideMargin\",\n\t/**\n\t* ## Page Edge\n\t*\n\t* Specifies that the vertical positioning shall be relative to the edge of the page.\n\t*/\n\tPAGE: \"page\",\n\t/**\n\t* ## Paragraph\n\t*\n\t* Specifies that the vertical positioning shall be relative to the paragraph which contains the drawing anchor.\n\t*/\n\tPARAGRAPH: \"paragraph\",\n\t/**\n\t* ## Top Margin\n\t*\n\t* Specifies that the vertical positioning shall be relative to the top margin of the current page.\n\t*/\n\tTOP_MARGIN: \"topMargin\"\n};\n// src/file/drawing/floating/simple-pos.ts\n/**\n* # Simple Positioning Coordinates\n*\n* This element specifies the coordinates at which a DrawingML object shall be positioned relative to the top-left edge of its page, when the `simplePos` attribute is specified on the <anchor> element (§5.5.2.3).\n*\n* References:\n* - https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_simplePos_topic_ID0E5K6OB.html\n* - http://officeopenxml.com/drwPicFloating-position.php\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:complexType name=\"CT_Point2D\">\n* <xsd:attribute name=\"x\" type=\"ST_Coordinate\" use=\"required\"/>\n* <xsd:attribute name=\"y\" type=\"ST_Coordinate\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createSimplePos = () => new BuilderElement({\n\tname: \"wp:simplePos\",\n\tattributes: {\n\t\tx: {\n\t\t\tkey: \"x\",\n\t\t\tvalue: 0\n\t\t},\n\t\ty: {\n\t\t\tkey: \"y\",\n\t\t\tvalue: 0\n\t\t}\n\t}\n});\n// src/file/drawing/floating/align.ts\n/**\n* # Relative Horizontal/Vertical Alignment\n*\n* This element specifies how a DrawingML object shall be horizontally/vertically aligned relative to the horizontal/vertical alignment base defined by the parent element. Once an alignment base is defined, this element shall determine how the DrawingML object shall be aligned relative to that location.\n*\n* References:\n* - https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_align_topic_ID0EYZZOB.html\n* - https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_align_topic_ID0ET4ZOB.html\n* - http://officeopenxml.com/drwPicFloating-position.php\n*/\nvar createAlign = (value) => new BuilderElement({\n\tname: \"wp:align\",\n\tchildren: [value]\n});\n// src/file/drawing/floating/position-offset.ts\n/**\n* # Absolute Position Offset\n*\n* This element specifies an absolute measurement for the positioning of a floating DrawingML object within a WordprocessingML document. This measurement shall be calculated relative to the top left edge of the positioning base specified by the parent element's `relativeFrom` attribute.\n*\n* References:\n* - https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_posOffset_topic_ID0EMG6OB.html\n* - http://officeopenxml.com/drwPicFloating-position.php\n*/\nvar createPositionOffset = (offsetValue) => new BuilderElement({\n\tname: \"wp:posOffset\",\n\tchildren: [offsetValue.toString()]\n});\n// src/file/drawing/floating/horizontal-position.ts\n/**\n* Horizontal position module for floating drawings in WordprocessingML documents.\n*\n* This module provides horizontal positioning for floating drawing objects,\n* specifying the horizontal placement relative to a base element.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-position.php\n*\n* @module\n*/\n/**\n* Creates a horizontal position element for floating drawings.\n*\n* The positionH element specifies the horizontal positioning of a floating\n* object relative to a base element (page, margin, column, etc.).\n*\n* Reference: https://www.datypic.com/sc/ooxml/e-wp_positionH-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PosH\">\n* <xsd:choice>\n* <xsd:element name=\"align\" type=\"ST_AlignH\"/>\n* <xsd:element name=\"posOffset\" type=\"ST_PositionOffset\"/>\n* </xsd:choice>\n* <xsd:attribute name=\"relativeFrom\" type=\"ST_RelFromH\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @param options - Horizontal position configuration\n* @returns The positionH XML element\n*\n* @example\n* ```typescript\n* // Align to the left of the page\n* createHorizontalPosition({\n* relative: HorizontalPositionRelativeFrom.PAGE,\n* align: HorizontalPositionAlign.LEFT,\n* });\n*\n* // Offset from the margin\n* createHorizontalPosition({\n* relative: HorizontalPositionRelativeFrom.MARGIN,\n* offset: 914400, // 1 inch in EMUs\n* });\n* ```\n*/\nvar createHorizontalPosition = ({ relative, align, offset }) => new BuilderElement({\n\tname: \"wp:positionH\",\n\tattributes: { relativeFrom: {\n\t\tkey: \"relativeFrom\",\n\t\tvalue: relative !== null && relative !== void 0 ? relative : HorizontalPositionRelativeFrom.PAGE\n\t} },\n\tchildren: [(() => {\n\t\tif (align) return createAlign(align);\n\t\telse if (offset !== void 0) return createPositionOffset(offset);\n\t\telse throw new Error(\"There is no configuration provided for floating position (Align or offset)\");\n\t})()]\n});\n// src/file/drawing/floating/vertical-position.ts\n/**\n* Vertical position module for floating drawings in WordprocessingML documents.\n*\n* This module provides vertical positioning for floating drawing objects,\n* specifying the vertical placement relative to a base element.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-position.php\n*\n* @module\n*/\n/**\n* Creates a vertical position element for floating drawings.\n*\n* The positionV element specifies the vertical positioning of a floating\n* object relative to a base element (page, margin, paragraph, line, etc.).\n*\n* Reference: https://www.datypic.com/sc/ooxml/e-wp_positionV-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PosV\">\n* <xsd:choice>\n* <xsd:element name=\"align\" type=\"ST_AlignV\"/>\n* <xsd:element name=\"posOffset\" type=\"ST_PositionOffset\"/>\n* </xsd:choice>\n* <xsd:attribute name=\"relativeFrom\" type=\"ST_RelFromV\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @param options - Vertical position configuration\n* @returns The positionV XML element\n*\n* @example\n* ```typescript\n* // Align to the top of the page\n* createVerticalPosition({\n* relative: VerticalPositionRelativeFrom.PAGE,\n* align: VerticalPositionAlign.TOP,\n* });\n*\n* // Offset from the paragraph\n* createVerticalPosition({\n* relative: VerticalPositionRelativeFrom.PARAGRAPH,\n* offset: 457200, // 0.5 inch in EMUs\n* });\n* ```\n*/\nvar createVerticalPosition = ({ relative, align, offset }) => new BuilderElement({\n\tname: \"wp:positionV\",\n\tattributes: { relativeFrom: {\n\t\tkey: \"relativeFrom\",\n\t\tvalue: relative !== null && relative !== void 0 ? relative : VerticalPositionRelativeFrom.PAGE\n\t} },\n\tchildren: [(() => {\n\t\tif (align) return createAlign(align);\n\t\telse if (offset !== void 0) return createPositionOffset(offset);\n\t\telse throw new Error(\"There is no configuration provided for floating position (Align or offset)\");\n\t})()]\n});\n// src/file/drawing/inline/graphic/graphic-data/wps/body-properties.ts\n/**\n* @publicApi\n*/\nvar VerticalAnchor = /* @__PURE__ */ function(VerticalAnchor) {\n\tVerticalAnchor[\"CENTER\"] = \"ctr\";\n\tVerticalAnchor[\"TOP\"] = \"t\";\n\tVerticalAnchor[\"BOTTOM\"] = \"b\";\n\treturn VerticalAnchor;\n}({});\nvar createBodyProperties = (options = {}) => {\n\tvar _options$margins, _options$margins2, _options$margins3, _options$margins4;\n\treturn new BuilderElement({\n\t\tname: \"wps:bodyPr\",\n\t\tattributes: {\n\t\t\tlIns: {\n\t\t\t\tkey: \"lIns\",\n\t\t\t\tvalue: (_options$margins = options.margins) === null || _options$margins === void 0 ? void 0 : _options$margins.left\n\t\t\t},\n\t\t\trIns: {\n\t\t\t\tkey: \"rIns\",\n\t\t\t\tvalue: (_options$margins2 = options.margins) === null || _options$margins2 === void 0 ? void 0 : _options$margins2.right\n\t\t\t},\n\t\t\ttIns: {\n\t\t\t\tkey: \"tIns\",\n\t\t\t\tvalue: (_options$margins3 = options.margins) === null || _options$margins3 === void 0 ? void 0 : _options$margins3.top\n\t\t\t},\n\t\t\tbIns: {\n\t\t\t\tkey: \"bIns\",\n\t\t\t\tvalue: (_options$margins4 = options.margins) === null || _options$margins4 === void 0 ? void 0 : _options$margins4.bottom\n\t\t\t},\n\t\t\tanchor: {\n\t\t\t\tkey: \"anchor\",\n\t\t\t\tvalue: options.verticalAnchor\n\t\t\t}\n\t\t},\n\t\tchildren: [...options.noAutoFit ? [new OnOffElement(\"a:noAutofit\", options.noAutoFit)] : []]\n\t});\n};\n// src/file/drawing/inline/graphic/graphic-data/wps/non-visual-shape-properties.ts\nvar createNonVisualShapeProperties = (options = { txBox: \"1\" }) => new BuilderElement({\n\tname: \"wps:cNvSpPr\",\n\tattributes: { txBox: {\n\t\tkey: \"txBox\",\n\t\tvalue: options.txBox\n\t} }\n});\n// src/file/drawing/inline/graphic/graphic-data/wps/text-box-content.ts\nvar createTextBoxContent = (children) => new BuilderElement({\n\tname: \"w:txbxContent\",\n\tchildren: [...children]\n});\n// src/file/drawing/inline/graphic/graphic-data/wps/wps-text-box.ts\nvar createWpsTextBox = (children) => new BuilderElement({\n\tname: \"wps:txbx\",\n\tchildren: [createTextBoxContent(children)]\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents-attributes.ts\n/**\n* Extents attributes for DrawingML shapes.\n*\n* This module defines the width and height attributes for shape extents.\n*\n* @module\n*/\n/**\n* Attributes for shape extents (size).\n*\n* Defines the width (cx) and height (cy) in EMUs.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:attribute name=\"cx\" type=\"ST_PositiveCoordinate\" use=\"required\"/>\n* <xsd:attribute name=\"cy\" type=\"ST_PositiveCoordinate\" use=\"required\"/>\n* ```\n*\n* @internal\n*/\nvar ExtentsAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tcx: \"cx\",\n\t\t\tcy: \"cy\"\n\t\t});\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.ts\n/**\n* Extents (size) element for DrawingML shapes.\n*\n* This module defines the size of a shape or picture in EMUs.\n*\n* Reference: http://officeopenxml.com/drwSp-size.php\n*\n* @module\n*/\n/**\n* Represents the extents (size) of a DrawingML shape.\n*\n* Defines the width and height of the shape in English Metric Units (EMUs).\n* One EMU equals 1/914,400 of an inch.\n*\n* Reference: http://officeopenxml.com/drwSp-size.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PositiveSize2D\">\n* <xsd:attribute name=\"cx\" type=\"ST_PositiveCoordinate\" use=\"required\"/>\n* <xsd:attribute name=\"cy\" type=\"ST_PositiveCoordinate\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a 1-inch by 1-inch shape\n* const extents = new Extents(914400, 914400);\n* ```\n*/\nvar Extents = class extends XmlComponent {\n\tconstructor(x, y) {\n\t\tsuper(\"a:ext\");\n\t\t_defineProperty(this, \"attributes\", void 0);\n\t\tthis.attributes = new ExtentsAttributes({\n\t\t\tcx: x,\n\t\t\tcy: y\n\t\t});\n\t\tthis.root.push(this.attributes);\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off-attributes.ts\n/**\n* Offset attributes for DrawingML shapes.\n*\n* This module defines the x and y coordinate attributes for shape offset.\n*\n* @module\n*/\n/**\n* Attributes for shape offset (position).\n*\n* Defines the x and y coordinates in EMUs.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:attribute name=\"x\" type=\"ST_Coordinate\" use=\"required\"/>\n* <xsd:attribute name=\"y\" type=\"ST_Coordinate\" use=\"required\"/>\n* ```\n*\n* @internal\n*/\nvar OffsetAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tx: \"x\",\n\t\t\ty: \"y\"\n\t\t});\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts\n/**\n* Offset (position) element for DrawingML shapes.\n*\n* This module defines the position of a shape or picture in EMUs.\n*\n* Reference: http://officeopenxml.com/drwSp-size.php\n*\n* @module\n*/\n/**\n* Represents the offset (position) of a DrawingML shape.\n*\n* Defines the x and y coordinates of the shape's position in\n* English Metric Units (EMUs). One EMU equals 1/914,400 of an inch.\n*\n* Reference: http://officeopenxml.com/drwSp-size.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Point2D\">\n* <xsd:attribute name=\"x\" type=\"ST_Coordinate\" use=\"required\"/>\n* <xsd:attribute name=\"y\" type=\"ST_Coordinate\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const offset = new Offset();\n* ```\n*/\nvar Offset = class extends XmlComponent {\n\tconstructor(x, y) {\n\t\tsuper(\"a:off\");\n\t\tthis.root.push(new OffsetAttributes({\n\t\t\tx: x !== null && x !== void 0 ? x : 0,\n\t\t\ty: y !== null && y !== void 0 ? y : 0\n\t\t}));\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/form.ts\n/**\n* Attributes for 2D transformation.\n*\n* Defines flip and rotation properties.\n*/\nvar FormAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tflipVertical: \"flipV\",\n\t\t\tflipHorizontal: \"flipH\",\n\t\t\trotation: \"rot\"\n\t\t});\n\t}\n};\n/**\n* Represents a 2D transformation for DrawingML objects.\n*\n* This element defines how a shape or picture is positioned, sized,\n* rotated, and flipped within the document.\n*\n* Reference: http://officeopenxml.com/drwSp-size.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Transform2D\">\n* <xsd:sequence>\n* <xsd:element name=\"off\" type=\"CT_Point2D\" minOccurs=\"0\"/>\n* <xsd:element name=\"ext\" type=\"CT_PositiveSize2D\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"rot\" type=\"ST_Angle\" use=\"optional\"/>\n* <xsd:attribute name=\"flipH\" type=\"xsd:boolean\" use=\"optional\"/>\n* <xsd:attribute name=\"flipV\" type=\"xsd:boolean\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const form = new Form({\n* emus: { x: 914400, y: 914400 },\n* flip: { horizontal: true, vertical: false },\n* rotation: 450000 // 7.5 degrees\n* });\n* ```\n*/\nvar Form = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$flip, _options$flip2, _options$offset, _options$offset2;\n\t\tsuper(\"a:xfrm\");\n\t\t_defineProperty(this, \"extents\", void 0);\n\t\t_defineProperty(this, \"offset\", void 0);\n\t\tthis.root.push(new FormAttributes({\n\t\t\tflipVertical: (_options$flip = options.flip) === null || _options$flip === void 0 ? void 0 : _options$flip.vertical,\n\t\t\tflipHorizontal: (_options$flip2 = options.flip) === null || _options$flip2 === void 0 ? void 0 : _options$flip2.horizontal,\n\t\t\trotation: options.rotation\n\t\t}));\n\t\tthis.offset = new Offset((_options$offset = options.offset) === null || _options$offset === void 0 || (_options$offset = _options$offset.emus) === null || _options$offset === void 0 ? void 0 : _options$offset.x, (_options$offset2 = options.offset) === null || _options$offset2 === void 0 || (_options$offset2 = _options$offset2.emus) === null || _options$offset2 === void 0 ? void 0 : _options$offset2.y);\n\t\tthis.extents = new Extents(options.emus.x, options.emus.y);\n\t\tthis.root.push(this.offset);\n\t\tthis.root.push(this.extents);\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.ts\n/**\n* No fill element for DrawingML shapes.\n*\n* This module provides the no-fill option for outline and shape fills.\n*\n* @module\n*/\n/**\n* Creates a no-fill element.\n*\n* Specifies that the outline or shape should have no fill applied.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"noFill\" type=\"CT_Empty\"/>\n* ```\n*\n* @example\n* ```typescript\n* const noFill = createNoFill();\n* ```\n*/\nvar createNoFill = () => new BuilderElement({ name: \"a:noFill\" });\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/rgb-color.ts\n/**\n* RGB color element for DrawingML shapes.\n*\n* This module provides RGB color support for solid fills.\n*\n* @module\n*/\n/**\n* Creates an sRGB color element.\n*\n* Specifies a color using RGB hex values.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SRgbColor\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_ColorTransform\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"val\" type=\"s:ST_HexColorRGB\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const redColor = createSolidRgbColor({ value: \"FF0000\" });\n* const blueColor = createSolidRgbColor({ value: \"0000FF\" });\n* ```\n*/\nvar createSolidRgbColor = (options) => new BuilderElement({\n\tname: \"a:srgbClr\",\n\tattributes: { value: {\n\t\tkey: \"val\",\n\t\tvalue: options.value\n\t} }\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/scheme-color.ts\n/**\n* Scheme color element for DrawingML shapes.\n*\n* This module provides scheme-based color support for solid fills,\n* allowing colors to be defined using theme color schemes.\n*\n* @module\n*/\n/**\n* Scheme color values for theme-based colors.\n*\n* These values reference colors defined in the document's color scheme/theme.\n*/\nvar SchemeColor = {\n\t/** Background color 1 */\n\tBG1: \"bg1\",\n\t/** Text color 1 */\n\tTX1: \"tx1\",\n\t/** Background color 2 */\n\tBG2: \"bg2\",\n\t/** Text color 2 */\n\tTX2: \"tx2\",\n\t/** Accent color 1 */\n\tACCENT1: \"accent1\",\n\t/** Accent color 2 */\n\tACCENT2: \"accent2\",\n\t/** Accent color 3 */\n\tACCENT3: \"accent3\",\n\t/** Accent color 4 */\n\tACCENT4: \"accent4\",\n\t/** Accent color 5 */\n\tACCENT5: \"accent5\",\n\t/** Accent color 6 */\n\tACCENT6: \"accent6\",\n\t/** Hyperlink color */\n\tHLINK: \"hlink\",\n\t/** Followed hyperlink color */\n\tFOLHLINK: \"folHlink\",\n\t/** Dark color 1 */\n\tDK1: \"dk1\",\n\t/** Light color 1 */\n\tLT1: \"lt1\",\n\t/** Dark color 2 */\n\tDK2: \"dk2\",\n\t/** Light color 2 */\n\tLT2: \"lt2\",\n\t/** Placeholder color */\n\tPHCLR: \"phClr\"\n};\n/**\n* Creates a scheme color element.\n*\n* Specifies a color using a theme color scheme reference.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SchemeColor\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_ColorTransform\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"val\" type=\"ST_SchemeColorVal\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const accentColor = createSchemeColor({ value: SchemeColor.ACCENT1 });\n* const bgColor = createSchemeColor({ value: SchemeColor.BG1 });\n* ```\n*/\nvar createSchemeColor = (options) => new BuilderElement({\n\tname: \"a:schemeClr\",\n\tattributes: { value: {\n\t\tkey: \"val\",\n\t\tvalue: options.value\n\t} }\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.ts\n/**\n* Solid fill element for DrawingML shapes.\n*\n* This module provides solid fill support for outlines and shapes,\n* supporting both RGB and scheme-based colors.\n*\n* @module\n*/\n/**\n* Creates a solid fill element.\n*\n* Specifies a solid color fill using either RGB or scheme colors.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SolidColorFillProperties\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_ColorChoice\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_EffectProperties\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // RGB solid fill\n* const fill = createSolidFill({\n* type: \"rgb\",\n* value: \"FF0000\"\n* });\n*\n* // Scheme solid fill\n* const schemeFill = createSolidFill({\n* type: \"scheme\",\n* value: SchemeColor.ACCENT1\n* });\n* ```\n*/\nvar createSolidFill$1 = (options) => new BuilderElement({\n\tname: \"a:solidFill\",\n\tchildren: [options.type === \"rgb\" ? createSolidRgbColor(options) : createSchemeColor(options)]\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.ts\n/**\n* Outline (line) properties for DrawingML shapes.\n*\n* This module provides support for configuring outline properties including\n* width, cap style, compound line types, and fill properties.\n*\n* Reference: http://officeopenxml.com/drwSp-outline.php\n*\n* @module\n*/\n/**\n* Line cap styles for outline endpoints.\n*\n* Defines how the ends of a line are rendered.\n*/\nvar LineCap = {\n\t/** Round cap style */\n\tROUND: \"rnd\",\n\t/** Square cap style */\n\tSQUARE: \"sq\",\n\t/** Flat cap style */\n\tFLAT: \"flat\"\n};\n/**\n* Compound line types for outlines.\n*\n* Defines the structure of compound lines (single, double, etc.).\n*/\nvar CompoundLine = {\n\t/** Single line */\n\tSINGLE: \"sng\",\n\t/** Double line */\n\tDOUBLE: \"dbl\",\n\t/** Thick-thin double line */\n\tTHICK_THIN: \"thickThin\",\n\t/** Thin-thick double line */\n\tTHIN_THICK: \"thinThick\",\n\t/** Triple line */\n\tTRI: \"tri\"\n};\n/**\n* Pen alignment options for outline positioning.\n*\n* Defines how the outline is aligned relative to the shape edge.\n*/\nvar PenAlignment = {\n\t/** Center alignment */\n\tCENTER: \"ctr\",\n\t/** Inset alignment */\n\tINSET: \"in\"\n};\n/**\n* Creates an outline element for DrawingML shapes.\n*\n* The outline element specifies the line properties for the shape border,\n* including width, cap style, compound line type, alignment, and fill.\n*\n* Reference: http://officeopenxml.com/drwSp-outline.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_LineProperties\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_FillProperties\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_LineDashProperties\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_LineJoinProperties\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"w\" use=\"optional\" type=\"a:ST_LineWidth\"/>\n* <xsd:attribute name=\"cap\" use=\"optional\" type=\"ST_LineCap\"/>\n* <xsd:attribute name=\"cmpd\" use=\"optional\" type=\"ST_CompoundLine\"/>\n* <xsd:attribute name=\"algn\" use=\"optional\" type=\"ST_PenAlignment\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create outline with RGB color\n* const outline = createOutline({\n* width: 9525,\n* cap: \"ROUND\",\n* type: \"solidFill\",\n* solidFillType: \"rgb\",\n* value: \"FF0000\"\n* });\n* ```\n*/\nvar createOutline = (options) => new BuilderElement({\n\tname: \"a:ln\",\n\tattributes: {\n\t\twidth: {\n\t\t\tkey: \"w\",\n\t\t\tvalue: options.width\n\t\t},\n\t\tcap: {\n\t\t\tkey: \"cap\",\n\t\t\tvalue: options.cap === void 0 ? void 0 : LineCap[options.cap]\n\t\t},\n\t\tcompoundLine: {\n\t\t\tkey: \"cmpd\",\n\t\t\tvalue: options.compoundLine === void 0 ? void 0 : CompoundLine[options.compoundLine]\n\t\t},\n\t\talign: {\n\t\t\tkey: \"algn\",\n\t\t\tvalue: options.align === void 0 ? void 0 : PenAlignment[options.align]\n\t\t}\n\t},\n\tchildren: [options.type === \"noFill\" ? createNoFill() : options.solidFillType === \"rgb\" ? createSolidFill$1({\n\t\ttype: \"rgb\",\n\t\tvalue: options.value\n\t}) : createSolidFill$1({\n\t\ttype: \"scheme\",\n\t\tvalue: options.value\n\t})]\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/adjustment-values/adjustment-values.ts\n/**\n* Adjustment values module for preset geometries.\n*\n* This module provides adjustment value lists that can modify the appearance\n* of preset shape geometries.\n*\n* Reference: http://officeopenxml.com/drwSp-prstGeom.php\n*\n* @module\n*/\n/**\n* Represents a list of adjustment values for preset geometry.\n*\n* This element contains a list of shape adjust values that modify the\n* appearance of a preset geometric shape. When empty, default values are used.\n*\n* Reference: http://officeopenxml.com/drwSp-prstGeom.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_GeomGuideList\">\n* <xsd:sequence>\n* <xsd:element name=\"gd\" type=\"CT_GeomGuide\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const avLst = new AdjustmentValues();\n* ```\n*/\nvar AdjustmentValues = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"a:avLst\");\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry-attributes.ts\n/**\n* Preset geometry attributes for DrawingML shapes.\n*\n* This module defines the shape type attribute for preset geometries.\n*\n* @module\n*/\n/**\n* Attributes for preset geometry.\n*\n* Defines the shape type identifier for a preset geometry.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:attribute name=\"prst\" type=\"ST_ShapeType\" use=\"required\"/>\n* ```\n*\n* @internal\n*/\nvar PresetGeometryAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { prst: \"prst\" });\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.ts\n/**\n* Preset geometry module for DrawingML shapes.\n*\n* This module provides predefined shape geometries that can be applied\n* to pictures and shapes without requiring custom path definitions.\n*\n* Reference: http://officeopenxml.com/drwSp-prstGeom.php\n*\n* @module\n*/\n/**\n* Represents a preset geometry for a DrawingML shape.\n*\n* This element specifies when a preset geometric shape should be used instead\n* of a custom geometry. It includes a shape preset identifier and optional\n* adjustment values that modify the base shape.\n*\n* Reference: http://officeopenxml.com/drwSp-prstGeom.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PresetGeometry2D\">\n* <xsd:sequence>\n* <xsd:element name=\"avLst\" type=\"CT_GeomGuideList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"prst\" type=\"ST_ShapeType\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const geometry = new PresetGeometry();\n* ```\n*/\nvar PresetGeometry = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"a:prstGeom\");\n\t\tthis.root.push(new PresetGeometryAttributes({ prst: \"rect\" }));\n\t\tthis.root.push(new AdjustmentValues());\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties-attributes.ts\n/**\n* Shape properties attributes for DrawingML.\n*\n* This module defines attributes for shape properties.\n*\n* @module\n*/\n/**\n* Attributes for shape properties.\n*\n* Defines optional attributes such as black and white mode.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:attribute name=\"bwMode\" type=\"ST_BlackWhiteMode\" use=\"optional\"/>\n* ```\n*\n* @internal\n*/\nvar ShapePropertiesAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { bwMode: \"bwMode\" });\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.ts\n/**\n* Represents shape properties for a DrawingML picture.\n*\n* This element defines the visual formatting of a picture, including\n* its transform (size, position, rotation, flip), geometry preset,\n* and outline properties.\n*\n* Reference: http://officeopenxml.com/drwSp-SpPr.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_ShapeProperties\">\n* <xsd:sequence>\n* <xsd:element name=\"xfrm\" type=\"CT_Transform2D\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_Geometry\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_FillProperties\" minOccurs=\"0\"/>\n* <xsd:element name=\"ln\" type=\"CT_LineProperties\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_EffectProperties\" minOccurs=\"0\"/>\n* <xsd:element name=\"scene3d\" type=\"CT_Scene3D\" minOccurs=\"0\"/>\n* <xsd:element name=\"sp3d\" type=\"CT_Shape3D\" minOccurs=\"0\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"bwMode\" type=\"ST_BlackWhiteMode\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const shapeProps = new ShapeProperties({\n* transform: {\n* emus: { x: 914400, y: 914400 },\n* flip: { horizontal: false, vertical: false },\n* rotation: 0\n* },\n* outline: {\n* width: 9525,\n* type: \"solidFill\",\n* solidFillType: \"rgb\",\n* value: \"FF0000\"\n* }\n* });\n* ```\n*/\nvar ShapeProperties = class extends XmlComponent {\n\tconstructor({ element, outline, solidFill, transform }) {\n\t\tsuper(`${element}:spPr`);\n\t\t_defineProperty(this, \"form\", void 0);\n\t\tthis.root.push(new ShapePropertiesAttributes({ bwMode: \"auto\" }));\n\t\tthis.form = new Form(transform);\n\t\tthis.root.push(this.form);\n\t\tthis.root.push(new PresetGeometry());\n\t\tif (solidFill) this.root.push(createSolidFill$1(solidFill));\n\t\telse if (outline) this.root.push(createNoFill());\n\t\tif (outline) this.root.push(createOutline(outline));\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/wps/wps-shape.ts\nvar createWpsShape = (options) => new BuilderElement({\n\tname: \"wps:wsp\",\n\tchildren: [\n\t\tcreateNonVisualShapeProperties(options.nonVisualProperties),\n\t\tnew ShapeProperties({\n\t\t\telement: \"wps\",\n\t\t\ttransform: options.transformation,\n\t\t\toutline: options.outline,\n\t\t\tsolidFill: options.solidFill\n\t\t}),\n\t\tcreateWpsTextBox(options.children),\n\t\tcreateBodyProperties(options.bodyProperties)\n\t]\n});\n// src/file/drawing/inline/graphic/graphic-data/graphic-data-attribute.ts\n/**\n* Graphic data attributes module.\n*\n* This module defines the URI attribute that identifies the type\n* of graphical content within a graphicData element.\n*\n* @module\n*/\n/**\n* XML attributes component for graphic data.\n*\n* The URI attribute identifies the schema namespace of the content\n* stored in the graphicData element. For pictures, this is typically\n* \"http://schemas.openxmlformats.org/drawingml/2006/picture\".\n*\n* @internal\n*/\nvar GraphicDataAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { uri: \"uri\" });\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.ts\n/**\n* Creates an SVG blip element for embedding SVG images.\n*\n* This element is a Microsoft Office extension that allows SVG images\n* to be referenced within a blip.\n*\n* @param mediaData - The media data containing the SVG image information\n* @returns An XML component representing the SVG blip element\n* @internal\n*/\nvar createSvgBlip = (mediaData) => new BuilderElement({\n\tname: \"asvg:svgBlip\",\n\tattributes: {\n\t\tasvg: {\n\t\t\tkey: \"xmlns:asvg\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/drawing/2016/SVG/main\"\n\t\t},\n\t\tembed: {\n\t\t\tkey: \"r:embed\",\n\t\t\tvalue: `rId{${mediaData.fileName}}`\n\t\t}\n\t}\n});\n/**\n* Creates an extension element for SVG support.\n*\n* This element wraps the SVG blip extension with the appropriate URI\n* to identify it as an SVG extension.\n*\n* @param mediaData - The media data containing the SVG image information\n* @returns An XML component representing the extension element\n* @internal\n*/\nvar createExtention = (mediaData) => new BuilderElement({\n\tname: \"a:ext\",\n\tattributes: { uri: {\n\t\tkey: \"uri\",\n\t\tvalue: \"{96DAC541-7B7A-43D3-8B79-37D633B846F1}\"\n\t} },\n\tchildren: [createSvgBlip(mediaData)]\n});\n/**\n* Creates an extension list for SVG images.\n*\n* This element contains the extensions needed to embed SVG images\n* within a blip. It wraps the SVG-specific extension elements.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OfficeArtExtensionList\">\n* <xsd:sequence>\n* <xsd:element name=\"ext\" type=\"CT_OfficeArtExtension\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @param mediaData - The media data containing the SVG image information\n* @returns An XML component representing the extension list\n*/\nvar createExtentionList = (mediaData) => new BuilderElement({\n\tname: \"a:extLst\",\n\tchildren: [createExtention(mediaData)]\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts\n/**\n* Creates a blip element for an image.\n*\n* A blip references the actual image data stored in the document package\n* through a relationship ID. For SVG images, it includes extensions that\n* reference the SVG data.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Blip\">\n* <xsd:sequence>\n* <xsd:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\n* <xsd:element name=\"alphaBiLevel\" type=\"CT_AlphaBiLevelEffect\"/>\n* <xsd:element name=\"alphaCeiling\" type=\"CT_AlphaCeilingEffect\"/>\n* <xsd:element name=\"alphaFloor\" type=\"CT_AlphaFloorEffect\"/>\n* <xsd:element name=\"alphaInv\" type=\"CT_AlphaInverseEffect\"/>\n* <xsd:element name=\"alphaMod\" type=\"CT_AlphaModulateEffect\"/>\n* <xsd:element name=\"alphaModFix\" type=\"CT_AlphaModulateFixedEffect\"/>\n* <xsd:element name=\"alphaRepl\" type=\"CT_AlphaReplaceEffect\"/>\n* <xsd:element name=\"biLevel\" type=\"CT_BiLevelEffect\"/>\n* <xsd:element name=\"blur\" type=\"CT_BlurEffect\"/>\n* <xsd:element name=\"clrChange\" type=\"CT_ColorChangeEffect\"/>\n* <xsd:element name=\"clrRepl\" type=\"CT_ColorReplaceEffect\"/>\n* <xsd:element name=\"duotone\" type=\"CT_DuotoneEffect\"/>\n* <xsd:element name=\"fillOverlay\" type=\"CT_FillOverlayEffect\"/>\n* <xsd:element name=\"grayscl\" type=\"CT_GrayscaleEffect\"/>\n* <xsd:element name=\"hsl\" type=\"CT_HSLEffect\"/>\n* <xsd:element name=\"lum\" type=\"CT_LuminanceEffect\"/>\n* <xsd:element name=\"tint\" type=\"CT_TintEffect\"/>\n* </xsd:choice>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute ref=\"r:embed\"/>\n* <xsd:attribute ref=\"r:link\"/>\n* <xsd:attribute name=\"cstate\" type=\"ST_BlipCompression\"/>\n* </xsd:complexType>\n* ```\n*\n* @param mediaData - The media data containing the image information\n* @returns An XML component representing the blip element\n*/\nvar createBlip = (mediaData) => new BuilderElement({\n\tname: \"a:blip\",\n\tattributes: {\n\t\tembed: {\n\t\t\tkey: \"r:embed\",\n\t\t\tvalue: `rId{${mediaData.type === \"svg\" ? mediaData.fallback.fileName : mediaData.fileName}}`\n\t\t},\n\t\tcstate: {\n\t\t\tkey: \"cstate\",\n\t\t\tvalue: \"none\"\n\t\t}\n\t},\n\tchildren: mediaData.type === \"svg\" ? [createExtentionList(mediaData)] : []\n});\n// src/file/drawing/inline/graphic/graphic-data/pic/blip/source-rectangle.ts\n/**\n* Source rectangle module for blip fills.\n*\n* This module defines the portion of an image to use when filling a shape.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\n/**\n* Attributes for the source rectangle element.\n*\n* Percentages are stored in thousandths of a percent, as required by the\n* `ST_Percentage` schema type (for example `10000` represents `10%`).\n*\n* @internal\n*/\nvar SourceRectangleAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tleft: \"l\",\n\t\t\ttop: \"t\",\n\t\t\tright: \"r\",\n\t\t\tbottom: \"b\"\n\t\t});\n\t}\n};\n/**\n* Converts a crop percentage to thousandths of a percent.\n*\n* @throws If the percentage isn't a number from 0 to 100\n*/\nvar cropValue = (value, edge) => {\n\tif (value === void 0) return;\n\tif (!(value >= 0 && value <= 100)) throw new Error(`Invalid crop ${edge} ${value}. Expected a number from 0 to 100`);\n\treturn Math.round(value * 1e3);\n};\n/**\n* Represents a source rectangle for blip fills.\n*\n* This element specifies a portion of the blip (image) to use as the fill.\n* When not specified with attributes, it indicates the entire blip should be used.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_RelativeRect\">\n* <xsd:attribute name=\"l\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"t\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"r\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"b\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const srcRect = new SourceRectangle({ left: 10, top: 10, right: 10, bottom: 10 });\n* ```\n*/\nvar SourceRectangle = class extends XmlComponent {\n\tconstructor(crop) {\n\t\tsuper(\"a:srcRect\");\n\t\tif (crop) this.root.push(new SourceRectangleAttributes({\n\t\t\tleft: cropValue(crop.left, \"left\"),\n\t\t\ttop: cropValue(crop.top, \"top\"),\n\t\t\tright: cropValue(crop.right, \"right\"),\n\t\t\tbottom: cropValue(crop.bottom, \"bottom\")\n\t\t}));\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/blip/stretch.ts\n/**\n* Stretch fill module for blip fills.\n*\n* This module defines how images are stretched to fill shapes.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\n/**\n* Represents a fill rectangle for stretch fill mode.\n*\n* This element specifies the rectangular area of the shape to which\n* the blip fill should be stretched.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_RelativeRect\">\n* <xsd:attribute name=\"l\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"t\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"r\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* <xsd:attribute name=\"b\" type=\"ST_Percentage\" use=\"optional\" default=\"0\"/>\n* </xsd:complexType>\n* ```\n*/\nvar FillRectangle = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"a:fillRect\");\n\t}\n};\n/**\n* Represents a stretch fill mode for blip fills.\n*\n* This element specifies that the blip (image) should be stretched to fill\n* the entire shape. The stretch fill is one of the fill mode properties\n* that determines how an image is applied to a shape.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_StretchInfoProperties\">\n* <xsd:sequence>\n* <xsd:element name=\"fillRect\" type=\"CT_RelativeRect\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const stretch = new Stretch();\n* ```\n*/\nvar Stretch = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"a:stretch\");\n\t\tthis.root.push(new FillRectangle());\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-fill.ts\n/**\n* Represents a blip fill for pictures in DrawingML.\n*\n* This element specifies the type of fill used for a picture. It contains the blip (image)\n* reference, an optional source rectangle, and the fill mode (typically stretch).\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_BlipFillProperties\">\n* <xsd:sequence>\n* <xsd:element name=\"blip\" type=\"CT_Blip\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"srcRect\" type=\"CT_RelativeRect\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:group ref=\"EG_FillModeProperties\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"dpi\" type=\"xsd:unsignedInt\" use=\"optional\"/>\n* <xsd:attribute name=\"rotWithShape\" type=\"xsd:boolean\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const blipFill = new BlipFill(mediaData);\n* ```\n*/\nvar BlipFill = class extends XmlComponent {\n\tconstructor(mediaData, crop) {\n\t\tsuper(\"pic:blipFill\");\n\t\tthis.root.push(createBlip(mediaData));\n\t\tthis.root.push(new SourceRectangle(crop));\n\t\tthis.root.push(new Stretch());\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks-attributes.ts\n/**\n* Picture locks attributes module.\n*\n* This module defines the attributes that control locking behavior\n* for picture elements.\n*\n* @module\n*/\n/**\n* Attributes for picture locking properties.\n*\n* Defines the XML attributes that control which operations are forbidden\n* on a picture element.\n*\n* @internal\n*/\nvar PicLocksAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tnoChangeAspect: \"noChangeAspect\",\n\t\t\tnoChangeArrowheads: \"noChangeArrowheads\"\n\t\t});\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.ts\n/**\n* Picture locks module.\n*\n* This module provides locking settings for pictures that control\n* which operations are allowed on the picture element.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\n/**\n* Represents picture locking properties in DrawingML.\n*\n* This element specifies all locking properties for a picture. These properties\n* inform the generating application about which operations are forbidden on the\n* parent picture object.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PictureLocking\">\n* <xsd:sequence>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"noGrp\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noSelect\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noRot\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noChangeAspect\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noMove\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noResize\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noEditPoints\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noAdjustHandles\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noChangeArrowheads\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noChangeShapeType\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"noCrop\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const locks = new PicLocks();\n* ```\n*/\nvar PicLocks = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"a:picLocks\");\n\t\tthis.root.push(new PicLocksAttributes({\n\t\t\tnoChangeAspect: 1,\n\t\t\tnoChangeArrowheads: 1\n\t\t}));\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.ts\n/**\n* Child non-visual picture properties module.\n*\n* This module provides picture-specific non-visual properties including\n* locking settings that control operations on the picture.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\n/**\n* Represents non-visual picture drawing properties.\n*\n* This element specifies the non-visual properties specific to a picture.\n* These properties include picture-specific locking settings that control\n* which operations are allowed on the picture.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NonVisualPictureProperties\">\n* <xsd:sequence>\n* <xsd:element name=\"picLocks\" type=\"CT_PictureLocking\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"preferRelativeResize\" type=\"xsd:boolean\" use=\"optional\" default=\"true\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const cNvPicPr = new ChildNonVisualProperties();\n* ```\n*/\nvar ChildNonVisualProperties = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"pic:cNvPicPr\");\n\t\tthis.root.push(new PicLocks());\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties-attributes.ts\n/**\n* Non-visual properties attributes module.\n*\n* This module defines the attributes for non-visual drawing properties\n* including ID, name, and description.\n*\n* @module\n*/\n/**\n* Attributes for non-visual drawing properties.\n*\n* Defines the identification and descriptive attributes for DrawingML objects.\n*\n* @internal\n*/\nvar NonVisualPropertiesAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"id\",\n\t\t\tname: \"name\",\n\t\t\tdescr: \"descr\"\n\t\t});\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.ts\n/**\n* Non-visual drawing properties module.\n*\n* This module provides basic metadata for drawing elements including\n* ID, name, description, and hyperlink support.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\n/**\n* Represents non-visual drawing properties for pictures.\n*\n* This element specifies non-visual properties for a DrawingML object.\n* These include identification, naming, description, and hyperlink properties.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NonVisualDrawingProps\">\n* <xsd:sequence>\n* <xsd:element name=\"hlinkClick\" type=\"CT_Hyperlink\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"hlinkHover\" type=\"CT_Hyperlink\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"id\" type=\"ST_DrawingElementId\" use=\"required\"/>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n* <xsd:attribute name=\"descr\" type=\"xsd:string\" use=\"optional\" default=\"\"/>\n* <xsd:attribute name=\"hidden\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"title\" type=\"xsd:string\" use=\"optional\" default=\"\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const cNvPr = new NonVisualProperties();\n* ```\n*/\nvar NonVisualProperties = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"pic:cNvPr\");\n\t\tthis.root.push(new NonVisualPropertiesAttributes({\n\t\t\tid: 0,\n\t\t\tname: \"\",\n\t\t\tdescr: \"\"\n\t\t}));\n\t}\n\tprepForXml(context) {\n\t\tfor (let i = context.stack.length - 1; i >= 0; i--) {\n\t\t\tconst element = context.stack[i];\n\t\t\tif (!(element instanceof ConcreteHyperlink)) continue;\n\t\t\tthis.root.push(element.createDrawingClick(context, false));\n\t\t\tbreak;\n\t\t}\n\t\tconst result = super.prepForXml(context);\n\t\tthis.root.splice(1);\n\t\treturn result;\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.ts\n/**\n* Non-visual picture properties module.\n*\n* This module provides metadata and locking settings for pictures\n* that don't affect their visual appearance.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\n/**\n* Represents non-visual picture properties.\n*\n* This element specifies non-visual properties for a picture. These properties\n* include metadata like name, description, and locking settings that don't affect\n* the visual appearance of the picture.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PictureNonVisual\">\n* <xsd:sequence>\n* <xsd:element name=\"cNvPr\" type=\"a:CT_NonVisualDrawingProps\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"cNvPicPr\" type=\"a:CT_NonVisualPictureProperties\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const nvPicPr = new NonVisualPicProperties();\n* ```\n*/\nvar NonVisualPicProperties = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"pic:nvPicPr\");\n\t\tthis.root.push(new NonVisualProperties());\n\t\tthis.root.push(new ChildNonVisualProperties());\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/pic-attributes.ts\n/**\n* Picture attributes module.\n*\n* This module defines the XML namespace attribute for picture elements.\n*\n* @module\n*/\n/**\n* Attributes for picture elements.\n*\n* Defines the XML namespace declaration for picture elements in DrawingML.\n*\n* @internal\n*/\nvar PicAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { xmlns: \"xmlns:pic\" });\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/pic/pic.ts\n/**\n* Represents a picture element in DrawingML.\n*\n* A picture contains non-visual properties, image data (blip fill),\n* and shape properties that define how the image is displayed.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Picture\">\n* <xsd:sequence>\n* <xsd:element name=\"nvPicPr\" type=\"CT_PictureNonVisual\"/>\n* <xsd:element name=\"blipFill\" type=\"CT_BlipFillProperties\"/>\n* <xsd:element name=\"spPr\" type=\"a:CT_ShapeProperties\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const pic = new Pic({\n* mediaData: imageData,\n* transform: { emus: { x: 914400, y: 914400 } },\n* outline: { color: \"000000\", width: 9525 }\n* });\n* ```\n*/\nvar Pic = class extends XmlComponent {\n\tconstructor({ mediaData, transform, outline, solidFill, crop }) {\n\t\tsuper(\"pic:pic\");\n\t\tthis.root.push(new PicAttributes({ xmlns: \"http://schemas.openxmlformats.org/drawingml/2006/picture\" }));\n\t\tthis.root.push(new NonVisualPicProperties());\n\t\tthis.root.push(new BlipFill(mediaData, crop));\n\t\tthis.root.push(new ShapeProperties({\n\t\t\telement: \"pic\",\n\t\t\ttransform,\n\t\t\toutline,\n\t\t\tsolidFill\n\t\t}));\n\t}\n};\n// src/file/drawing/inline/graphic/graphic-data/wpg/wpg-group.ts\nvar createGroupTransform = (transformation) => {\n\tvar _transformation$flip, _transformation$flip2, _transformation$offse, _transformation$offse2;\n\treturn new BuilderElement({\n\t\tname: \"a:xfrm\",\n\t\tattributes: {\n\t\t\tflipVertical: {\n\t\t\t\tkey: \"flipV\",\n\t\t\t\tvalue: (_transformation$flip = transformation.flip) === null || _transformation$flip === void 0 ? void 0 : _transformation$flip.vertical\n\t\t\t},\n\t\t\tflipHorizontal: {\n\t\t\t\tkey: \"flipH\",\n\t\t\t\tvalue: (_transformation$flip2 = transformation.flip) === null || _transformation$flip2 === void 0 ? void 0 : _transformation$flip2.horizontal\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tkey: \"rot\",\n\t\t\t\tvalue: transformation.rotation\n\t\t\t}\n\t\t},\n\t\tchildren: [\n\t\t\tnew Offset((_transformation$offse = transformation.offset) === null || _transformation$offse === void 0 || (_transformation$offse = _transformation$offse.emus) === null || _transformation$offse === void 0 ? void 0 : _transformation$offse.x, (_transformation$offse2 = transformation.offset) === null || _transformation$offse2 === void 0 || (_transformation$offse2 = _transformation$offse2.emus) === null || _transformation$offse2 === void 0 ? void 0 : _transformation$offse2.y),\n\t\t\tnew Extents(transformation.emus.x, transformation.emus.y),\n\t\t\tnew BuilderElement({\n\t\t\t\tname: \"a:chOff\",\n\t\t\t\tattributes: {\n\t\t\t\t\tx: {\n\t\t\t\t\t\tkey: \"x\",\n\t\t\t\t\t\tvalue: 0\n\t\t\t\t\t},\n\t\t\t\t\ty: {\n\t\t\t\t\t\tkey: \"y\",\n\t\t\t\t\t\tvalue: 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t\tnew BuilderElement({\n\t\t\t\tname: \"a:chExt\",\n\t\t\t\tattributes: {\n\t\t\t\t\tx: {\n\t\t\t\t\t\tkey: \"cx\",\n\t\t\t\t\t\tvalue: transformation.emus.x\n\t\t\t\t\t},\n\t\t\t\t\ty: {\n\t\t\t\t\t\tkey: \"cy\",\n\t\t\t\t\t\tvalue: transformation.emus.y\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t]\n\t});\n};\nvar createNonVisualGroupProperties = () => new BuilderElement({ name: \"wpg:cNvGrpSpPr\" });\nvar createWpgGroup = (options) => new BuilderElement({\n\tname: \"wpg:wgp\",\n\tchildren: [\n\t\tcreateNonVisualGroupProperties(),\n\t\tnew BuilderElement({\n\t\t\tname: \"wpg:grpSpPr\",\n\t\t\tchildren: [createGroupTransform(options.transformation)]\n\t\t}),\n\t\t...options.children\n\t]\n});\n// src/file/drawing/inline/graphic/graphic-data/graphic-data.ts\n/**\n* Represents graphical data within a DrawingML graphic element.\n*\n* GraphicData contains the actual picture, chart, or other graphical\n* content referenced by a graphic element. It uses a URI to identify\n* the type of content being stored.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_GraphicalObjectData\">\n* <xsd:sequence>\n* <xsd:any minOccurs=\"0\" maxOccurs=\"unbounded\" processContents=\"strict\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"uri\" type=\"xsd:token\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const graphicData = new GraphicData({\n* mediaData: imageData,\n* transform: transformation,\n* outline: { color: \"000000\", width: 9525 }\n* });\n* ```\n*/\nvar GraphicData = class extends XmlComponent {\n\tconstructor({ mediaData, transform, outline, solidFill, crop }) {\n\t\tsuper(\"a:graphicData\");\n\t\tif (mediaData.type === \"graphic\") {\n\t\t\tthis.root.push(new GraphicDataAttributes({ uri: mediaData.uri }));\n\t\t\tthis.root.push(mediaData.content);\n\t\t} else if (mediaData.type === \"wps\") {\n\t\t\tthis.root.push(new GraphicDataAttributes({ uri: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" }));\n\t\t\tconst wps = createWpsShape(_objectSpread2(_objectSpread2({}, mediaData.data), {}, {\n\t\t\t\ttransformation: transform,\n\t\t\t\toutline,\n\t\t\t\tsolidFill\n\t\t\t}));\n\t\t\tthis.root.push(wps);\n\t\t} else if (mediaData.type === \"wpg\") {\n\t\t\tthis.root.push(new GraphicDataAttributes({ uri: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" }));\n\t\t\tconst wpg = createWpgGroup({\n\t\t\t\tchildren: mediaData.children.map((child) => {\n\t\t\t\t\tif (child.type === \"wps\") return createWpsShape(_objectSpread2(_objectSpread2({}, child.data), {}, {\n\t\t\t\t\t\ttransformation: child.transformation,\n\t\t\t\t\t\toutline: child.outline,\n\t\t\t\t\t\tsolidFill: child.solidFill\n\t\t\t\t\t}));\n\t\t\t\t\telse return new Pic({\n\t\t\t\t\t\tmediaData: child,\n\t\t\t\t\t\ttransform: child.transformation,\n\t\t\t\t\t\toutline: child.outline,\n\t\t\t\t\t\tsolidFill: child.solidFill\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t\ttransformation: transform\n\t\t\t});\n\t\t\tthis.root.push(wpg);\n\t\t} else {\n\t\t\tthis.root.push(new GraphicDataAttributes({ uri: \"http://schemas.openxmlformats.org/drawingml/2006/picture\" }));\n\t\t\tconst pic = new Pic({\n\t\t\t\tmediaData,\n\t\t\t\ttransform,\n\t\t\t\toutline,\n\t\t\t\tsolidFill,\n\t\t\t\tcrop\n\t\t\t});\n\t\t\tthis.root.push(pic);\n\t\t}\n\t}\n};\n// src/file/drawing/inline/graphic/graphic.ts\n/**\n* Attributes for the graphic element.\n* @internal\n*/\nvar GraphicAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { a: \"xmlns:a\" });\n\t}\n};\n/**\n* Represents a graphic element in DrawingML.\n*\n* Graphic is the container for graphical content such as\n* pictures, shapes, and charts within a drawing.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_GraphicalObject\">\n* <xsd:sequence>\n* <xsd:element name=\"graphicData\" type=\"CT_GraphicalObjectData\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const graphic = new Graphic({\n* mediaData: imageData,\n* transform: transformation,\n* outline: { color: \"FF0000\", width: 9525 }\n* });\n* ```\n*/\nvar Graphic = class extends XmlComponent {\n\tconstructor({ mediaData, transform, outline, solidFill, crop }) {\n\t\tsuper(\"a:graphic\");\n\t\t_defineProperty(this, \"data\", void 0);\n\t\tthis.root.push(new GraphicAttributes({ a: \"http://schemas.openxmlformats.org/drawingml/2006/main\" }));\n\t\tthis.data = new GraphicData({\n\t\t\tmediaData,\n\t\t\ttransform,\n\t\t\toutline,\n\t\t\tsolidFill,\n\t\t\tcrop\n\t\t});\n\t\tthis.root.push(this.data);\n\t}\n};\n// src/file/drawing/text-wrap/text-wrapping.ts\n/**\n* Enumeration of text wrapping types for floating drawings.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* @publicApi\n*/\nvar TextWrappingType = {\n\t/** Text doesn't wrap around the drawing. It is drawn in front of or behind the text */\n\tNONE: 0,\n\t/** Text wraps around the drawing's box */\n\tSQUARE: 1,\n\t/** Text wraps closely around the drawing's outline */\n\tTIGHT: 2,\n\t/** Text sits above and below the drawing, not beside it */\n\tTOP_AND_BOTTOM: 3,\n\t/** Text wraps closely around the drawing's outline, and fills any open space inside it */\n\tTHROUGH: 4\n};\n/**\n* Enumeration of text wrapping sides for floating drawings.\n*\n* Specifies on which side(s) text can wrap around the drawing.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* @publicApi\n*/\nvar TextWrappingSide = {\n\t/** Text wraps on both sides of the drawing */\n\tBOTH_SIDES: \"bothSides\",\n\t/** Text wraps only on the left side */\n\tLEFT: \"left\",\n\t/** Text wraps only on the right side */\n\tRIGHT: \"right\",\n\t/** Text wraps on the side with more space */\n\tLARGEST: \"largest\"\n};\n// src/file/drawing/text-wrap/wrap-none.ts\n/**\n* Wrap None module for DrawingML text wrapping.\n*\n* This module provides no text wrapping for floating drawings\n* where text does not wrap around the drawing.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* @module\n*/\n/**\n* Creates no text wrapping for a floating drawing.\n*\n* WrapNone causes text to flow behind or in front of the drawing\n* without wrapping around it.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*/\nvar createWrapNone = () => new BuilderElement({ name: \"wp:wrapNone\" });\n// src/file/drawing/text-wrap/wrap-square.ts\n/**\n* Wrap Square module for DrawingML text wrapping.\n*\n* This module provides square text wrapping for floating drawings\n* where text wraps around a rectangular bounding box.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* @module\n*/\n/**\n* Creates square text wrapping for a floating drawing.\n*\n* WrapSquare causes text to wrap around the rectangular bounding box\n* of the drawing on the specified side(s).\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_WrapSquare\">\n* <xsd:sequence>\n* <xsd:element name=\"effectExtent\" type=\"CT_EffectExtent\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"wrapText\" type=\"ST_WrapText\" use=\"required\"/>\n* <xsd:attribute name=\"distT\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distB\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distL\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distR\" type=\"ST_WrapDistance\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createWrapSquare = (textWrapping, margins = {\n\ttop: 0,\n\tbottom: 0,\n\tleft: 0,\n\tright: 0\n}) => new BuilderElement({\n\tname: \"wp:wrapSquare\",\n\tattributes: {\n\t\twrapText: {\n\t\t\tkey: \"wrapText\",\n\t\t\tvalue: textWrapping.side || TextWrappingSide.BOTH_SIDES\n\t\t},\n\t\tdistT: {\n\t\t\tkey: \"distT\",\n\t\t\tvalue: margins.top\n\t\t},\n\t\tdistB: {\n\t\t\tkey: \"distB\",\n\t\t\tvalue: margins.bottom\n\t\t},\n\t\tdistL: {\n\t\t\tkey: \"distL\",\n\t\t\tvalue: margins.left\n\t\t},\n\t\tdistR: {\n\t\t\tkey: \"distR\",\n\t\t\tvalue: margins.right\n\t\t}\n\t}\n});\n// src/file/drawing/text-wrap/wrap-tight.ts\n/**\n* Wrap Tight and Wrap Through modules for DrawingML text wrapping.\n*\n* These provide tight and through text wrapping for floating drawings,\n* where text wraps closely around the outline of the drawing.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* @module\n*/\nvar WRAP_POLYGON_SIZE = 21600;\nvar createPoint = (name, { x, y }) => new BuilderElement({\n\tname,\n\tattributes: {\n\t\tx: {\n\t\t\tkey: \"x\",\n\t\t\tvalue: x\n\t\t},\n\t\ty: {\n\t\t\tkey: \"y\",\n\t\t\tvalue: y\n\t\t}\n\t}\n});\n/**\n* Creates a wrap polygon around the drawing's box.\n*\n* Word works out the outline to wrap text around when it lays out the page, so the polygon\n* is marked as not edited, and Word replaces it with the drawing's real outline.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_WrapPath\">\n* <xsd:sequence>\n* <xsd:element name=\"start\" type=\"a:CT_Point2D\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"lineTo\" type=\"a:CT_Point2D\" minOccurs=\"2\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"edited\" type=\"xsd:boolean\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createWrapPolygon = () => new BuilderElement({\n\tname: \"wp:wrapPolygon\",\n\tattributes: { edited: {\n\t\tkey: \"edited\",\n\t\tvalue: false\n\t} },\n\tchildren: [\n\t\tcreatePoint(\"wp:start\", {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t}),\n\t\tcreatePoint(\"wp:lineTo\", {\n\t\t\tx: 0,\n\t\t\ty: WRAP_POLYGON_SIZE\n\t\t}),\n\t\tcreatePoint(\"wp:lineTo\", {\n\t\t\tx: WRAP_POLYGON_SIZE,\n\t\t\ty: WRAP_POLYGON_SIZE\n\t\t}),\n\t\tcreatePoint(\"wp:lineTo\", {\n\t\t\tx: WRAP_POLYGON_SIZE,\n\t\t\ty: 0\n\t\t}),\n\t\tcreatePoint(\"wp:lineTo\", {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t})\n\t]\n});\nvar createPolygonWrap = (name, margins = {}, textWrapping) => {\n\tvar _textWrapping$side;\n\treturn new BuilderElement({\n\t\tname,\n\t\tattributes: {\n\t\t\twrapText: {\n\t\t\t\tkey: \"wrapText\",\n\t\t\t\tvalue: (_textWrapping$side = textWrapping === null || textWrapping === void 0 ? void 0 : textWrapping.side) !== null && _textWrapping$side !== void 0 ? _textWrapping$side : TextWrappingSide.BOTH_SIDES\n\t\t\t},\n\t\t\tdistL: {\n\t\t\t\tkey: \"distL\",\n\t\t\t\tvalue: margins.left\n\t\t\t},\n\t\t\tdistR: {\n\t\t\t\tkey: \"distR\",\n\t\t\t\tvalue: margins.right\n\t\t\t}\n\t\t},\n\t\tchildren: [createWrapPolygon()]\n\t});\n};\n/**\n* Creates tight text wrapping for a floating drawing.\n*\n* WrapTight causes text to wrap closely around the contours\n* of the drawing rather than its rectangular bounding box.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_WrapTight\">\n* <xsd:sequence>\n* <xsd:element name=\"wrapPolygon\" type=\"CT_WrapPath\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"wrapText\" type=\"ST_WrapText\" use=\"required\"/>\n* <xsd:attribute name=\"distL\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distR\" type=\"ST_WrapDistance\"/>\n* </xsd:complexType>\n* ```\n*\n* @param margins - The distances from the text on the left and right. The top and bottom aren't written for tight wrapping\n* @param textWrapping - Which sides the text wraps on. Defaults to both\n*/\nvar createWrapTight = (margins, textWrapping) => createPolygonWrap(\"wp:wrapTight\", margins, textWrapping);\n/**\n* Creates through text wrapping for a floating drawing.\n*\n* WrapThrough wraps text around the contours of the drawing like WrapTight, and also\n* fills any open space inside the drawing, such as the middle of a ring.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_WrapThrough\">\n* <xsd:sequence>\n* <xsd:element name=\"wrapPolygon\" type=\"CT_WrapPath\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"wrapText\" type=\"ST_WrapText\" use=\"required\"/>\n* <xsd:attribute name=\"distL\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distR\" type=\"ST_WrapDistance\"/>\n* </xsd:complexType>\n* ```\n*\n* @param margins - The distances from the text on the left and right. The top and bottom aren't written for through wrapping\n* @param textWrapping - Which sides the text wraps on. Defaults to both\n*/\nvar createWrapThrough = (margins, textWrapping) => createPolygonWrap(\"wp:wrapThrough\", margins, textWrapping);\n// src/file/drawing/text-wrap/wrap-top-and-bottom.ts\n/**\n* Wrap Top and Bottom module for DrawingML text wrapping.\n*\n* This module provides top-and-bottom text wrapping for floating drawings\n* where text appears above and below the drawing but not beside it.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* @module\n*/\n/**\n* Creates top-and-bottom text wrapping for a floating drawing.\n*\n* WrapTopAndBottom causes text to appear above and below the drawing\n* without wrapping beside it, creating a line break effect.\n*\n* Reference: http://officeopenxml.com/drwPicFloating-textWrap.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_WrapTopBottom\">\n* <xsd:sequence>\n* <xsd:element name=\"effectExtent\" type=\"CT_EffectExtent\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"distT\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distB\" type=\"ST_WrapDistance\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createWrapTopAndBottom = (margins = {\n\ttop: 0,\n\tbottom: 0\n}) => new BuilderElement({\n\tname: \"wp:wrapTopAndBottom\",\n\tattributes: {\n\t\tdistT: {\n\t\t\tkey: \"distT\",\n\t\t\tvalue: margins.top\n\t\t},\n\t\tdistB: {\n\t\t\tkey: \"distB\",\n\t\t\tvalue: margins.bottom\n\t\t}\n\t}\n});\n// src/file/relationships/relationship/relationship.ts\n/**\n* Target mode types for relationships.\n*\n* Indicates whether a relationship target is external to the package.\n*/\nvar TargetModeType = { \n/** Target is external to the package (e.g., hyperlink to a URL) */\nEXTERNAL: \"External\" };\n/**\n* Creates a single relationship between parts in an OPC package.\n*\n* A relationship defines a typed connection from a source part to a target part,\n* identified by a unique ID within the relationships collection.\n*\n* @example\n* ```typescript\n* // Internal relationship to an image\n* createRelationship(\"rId1\", \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", \"media/image1.png\");\n*\n* // External relationship to a hyperlink\n* createRelationship(\"rId2\", \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\", \"https://example.com\", TargetModeType.EXTERNAL);\n* ```\n*/\nvar createRelationship = (id, type, target, targetMode) => new BuilderElement({\n\tname: \"Relationship\",\n\tattributes: {\n\t\tid: {\n\t\t\tkey: \"Id\",\n\t\t\tvalue: id\n\t\t},\n\t\ttype: {\n\t\t\tkey: \"Type\",\n\t\t\tvalue: type\n\t\t},\n\t\ttarget: {\n\t\t\tkey: \"Target\",\n\t\t\tvalue: target\n\t\t},\n\t\ttargetMode: {\n\t\t\tkey: \"TargetMode\",\n\t\t\tvalue: targetMode\n\t\t}\n\t}\n});\n// src/file/drawing/doc-properties/doc-properties-children.ts\n/**\n* Child elements for document properties.\n*\n* This module provides hyperlink elements that can be attached to\n* drawing elements for interactive behavior.\n*\n* @module\n*/\n/**\n* Creates a click hyperlink element for a drawing.\n*\n* This element defines what happens when a user clicks on a drawing element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Hyperlink\">\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:attribute name=\"tgtFrame\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"tooltip\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"docLocation\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"history\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"anchor\" type=\"s:ST_String\"/>\n* <xsd:attribute ref=\"r:id\"/>\n* </xsd:complexType>\n* ```\n*\n* @param linkId - The relationship ID for the hyperlink target\n* @param hasXmlNs - Whether to include the XML namespace declaration\n* @returns An XML component representing the click hyperlink\n*/\nvar createHyperlinkClick = (linkId, hasXmlNs) => new BuilderElement({\n\tname: \"a:hlinkClick\",\n\tattributes: _objectSpread2(_objectSpread2({}, hasXmlNs ? { xmlns: {\n\t\tkey: \"xmlns:a\",\n\t\tvalue: \"http://schemas.openxmlformats.org/drawingml/2006/main\"\n\t} } : {}), {}, { id: {\n\t\tkey: \"r:id\",\n\t\tvalue: `rId${linkId}`\n\t} })\n});\n// src/file/drawing/doc-properties/non-visual-drawing-properties.ts\n/**\n* Non-visual drawing properties (`CT_NonVisualDrawingProps`) of the shapes, pictures and groups inside a drawing:\n* their id, name and alternative text, a link followed when they are clicked, and whether they are decorative.\n*\n* @module\n*/\nvar DECORATIVE_EXTENSION_URI = \"{C183D7F6-B498-43B3-948B-1728B52AA6E4}\";\n/**\n* Creates the extension list that marks a drawing as decorative, as Word's \"Mark as decorative\" does.\n*\n* ```xml\n* <a:extLst>\n* <a:ext uri=\"{C183D7F6-B498-43B3-948B-1728B52AA6E4}\">\n* <adec:decorative xmlns:adec=\"http://schemas.microsoft.com/office/drawing/2017/decorative\" val=\"1\"/>\n* </a:ext>\n* </a:extLst>\n* ```\n*\n* @param declareNamespace - Declares the DrawingML namespace, for elements outside `a:graphic` such as `wp:docPr`\n*/\nvar createDecorativeExtensionList = (declareNamespace) => new BuilderElement({\n\tname: \"a:extLst\",\n\tattributes: { namespace: {\n\t\tkey: \"xmlns:a\",\n\t\tvalue: declareNamespace ? \"http://schemas.openxmlformats.org/drawingml/2006/main\" : void 0\n\t} },\n\tchildren: [new BuilderElement({\n\t\tname: \"a:ext\",\n\t\tattributes: { uri: {\n\t\t\tkey: \"uri\",\n\t\t\tvalue: DECORATIVE_EXTENSION_URI\n\t\t} },\n\t\tchildren: [new BuilderElement({\n\t\t\tname: \"adec:decorative\",\n\t\t\tattributes: {\n\t\t\t\tnamespace: {\n\t\t\t\t\tkey: \"xmlns:adec\",\n\t\t\t\t\tvalue: \"http://schemas.microsoft.com/office/drawing/2017/decorative\"\n\t\t\t\t},\n\t\t\t\tvalue: {\n\t\t\t\t\tkey: \"val\",\n\t\t\t\t\tvalue: 1\n\t\t\t\t}\n\t\t\t}\n\t\t})]\n\t})]\n});\n/**\n* A link from a drawing to a web address: the `a:hlinkClick` element, and the relationship that holds the address.\n*\n* The relationship is added to the part the drawing is written in (the document, a header or a footer) when it is written.\n*/\nvar DrawingLink = class {\n\tconstructor(link) {\n\t\t_defineProperty(this, \"link\", void 0);\n\t\t_defineProperty(this, \"linkId\", uniqueId());\n\t\t_defineProperty(this, \"addedTo\", /* @__PURE__ */ new WeakSet());\n\t\tthis.link = link;\n\t}\n\tcreateClick(declareNamespace) {\n\t\treturn createHyperlinkClick(this.linkId, declareNamespace);\n\t}\n\taddRelationship(context) {\n\t\tconst relationships = context.viewWrapper.Relationships;\n\t\tif (this.addedTo.has(relationships)) return;\n\t\tthis.addedTo.add(relationships);\n\t\trelationships.addRelationship(this.linkId, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\", this.link, TargetModeType.EXTERNAL);\n\t}\n};\n/**\n* The non-visual drawing properties of a shape, picture or group inside a drawing, such as `wps:cNvPr`.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NonVisualDrawingProps\">\n* <xsd:sequence>\n* <xsd:element name=\"hlinkClick\" type=\"CT_Hyperlink\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"hlinkHover\" type=\"CT_Hyperlink\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"id\" type=\"ST_DrawingElementId\" use=\"required\"/>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n* <xsd:attribute name=\"descr\" type=\"xsd:string\" use=\"optional\" default=\"\"/>\n* <xsd:attribute name=\"hidden\" type=\"xsd:boolean\" use=\"optional\" default=\"false\"/>\n* <xsd:attribute name=\"title\" type=\"xsd:string\" use=\"optional\" default=\"\"/>\n* </xsd:complexType>\n* ```\n*/\nvar NonVisualDrawingProperties = class extends XmlComponent {\n\tconstructor(name, { id, name: drawingName, description, title, link, decorative }) {\n\t\tsuper(name);\n\t\t_defineProperty(this, \"link\", void 0);\n\t\tthis.link = link === void 0 ? void 0 : new DrawingLink(link);\n\t\tthis.root.push(new NextAttributeComponent({\n\t\t\tid: {\n\t\t\t\tkey: \"id\",\n\t\t\t\tvalue: id\n\t\t\t},\n\t\t\tname: {\n\t\t\t\tkey: \"name\",\n\t\t\t\tvalue: drawingName\n\t\t\t},\n\t\t\tdescription: {\n\t\t\t\tkey: \"descr\",\n\t\t\t\tvalue: description\n\t\t\t},\n\t\t\ttitle: {\n\t\t\t\tkey: \"title\",\n\t\t\t\tvalue: title\n\t\t\t}\n\t\t}));\n\t\tif (this.link) this.root.push(this.link.createClick(false));\n\t\tif (decorative) this.root.push(createDecorativeExtensionList(false));\n\t}\n\tprepForXml(context) {\n\t\tvar _this$link;\n\t\t(_this$link = this.link) === null || _this$link === void 0 || _this$link.addRelationship(context);\n\t\treturn super.prepForXml(context);\n\t}\n};\n// src/file/drawing/doc-properties/doc-properties.ts\n/**\n* Document Properties module for DrawingML elements.\n*\n* This module provides non-visual properties for drawing elements,\n* including name, description, and accessibility information.\n*\n* Reference: https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_docPr_topic_ID0ES32OB.html\n*\n* @module\n*/\n/**\n* Represents non-visual drawing properties in a WordprocessingML document.\n*\n* DocProperties contains metadata about a drawing element such as\n* its name, description (alt text), and title for accessibility.\n*\n* Reference: https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_docPr_topic_ID0ES32OB.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NonVisualDrawingProps\">\n* <xsd:sequence>\n* <xsd:element name=\"hlinkClick\" type=\"CT_Hyperlink\" minOccurs=\"0\"/>\n* <xsd:element name=\"hlinkHover\" type=\"CT_Hyperlink\" minOccurs=\"0\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"id\" type=\"ST_DrawingElementId\" use=\"required\"/>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n* <xsd:attribute name=\"descr\" type=\"xsd:string\"/>\n* <xsd:attribute name=\"hidden\" type=\"xsd:boolean\"/>\n* </xsd:complexType>\n* ```\n*/\nvar DocProperties = class extends XmlComponent {\n\tconstructor({ name = \"\", description, title, id } = {}, { link, decorative } = {}) {\n\t\tsuper(\"wp:docPr\");\n\t\t_defineProperty(this, \"link\", void 0);\n\t\t_defineProperty(this, \"decorative\", void 0);\n\t\tconst attributes = {\n\t\t\tid: {\n\t\t\t\tkey: \"id\",\n\t\t\t\tvalue: id !== null && id !== void 0 ? id : docPropertiesUniqueNumericId()\n\t\t\t},\n\t\t\tname: {\n\t\t\t\tkey: \"name\",\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t};\n\t\tif (description) attributes.description = {\n\t\t\tkey: \"descr\",\n\t\t\tvalue: description\n\t\t};\n\t\tif (title) attributes.title = {\n\t\t\tkey: \"title\",\n\t\t\tvalue: title\n\t\t};\n\t\tthis.root.push(new NextAttributeComponent(attributes));\n\t\tthis.link = link === void 0 ? void 0 : new DrawingLink(link);\n\t\tthis.decorative = decorative;\n\t}\n\tprepForXml(context) {\n\t\tif (this.link) {\n\t\t\tthis.link.addRelationship(context);\n\t\t\tthis.root.push(this.link.createClick(true));\n\t\t} else for (let i = context.stack.length - 1; i >= 0; i--) {\n\t\t\tconst element = context.stack[i];\n\t\t\tif (!(element instanceof ConcreteHyperlink)) continue;\n\t\t\tthis.root.push(element.createDrawingClick(context, true));\n\t\t\tbreak;\n\t\t}\n\t\tif (this.decorative) this.root.push(createDecorativeExtensionList(true));\n\t\tconst result = super.prepForXml(context);\n\t\tthis.root.splice(1);\n\t\treturn result;\n\t}\n};\n// src/file/drawing/effect-extent/effect-extent.ts\n/**\n* Effect extent for DrawingML objects.\n*\n* This module provides support for defining additional extent to compensate\n* for drawing effects applied to objects.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_effectExtent_topic_ID0E5O3OB.html\n*\n* @module\n*/\n/**\n* Creates an effect extent element.\n*\n* This element specifies the additional extent which shall be added to each\n* edge of the image (top, bottom, left, right) in order to compensate for any\n* drawing effects applied to the DrawingML object.\n*\n* The extent element specifies the size of the actual DrawingML object; however,\n* an object may have effects applied which change its overall size. This element\n* accounts for that additional space.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_effectExtent_topic_ID0E5O3OB.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_EffectExtent\">\n* <xsd:attribute name=\"l\" type=\"a:ST_Coordinate\" use=\"required\"/>\n* <xsd:attribute name=\"t\" type=\"a:ST_Coordinate\" use=\"required\"/>\n* <xsd:attribute name=\"r\" type=\"a:ST_Coordinate\" use=\"required\"/>\n* <xsd:attribute name=\"b\" type=\"a:ST_Coordinate\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const effectExtent = createEffectExtent({\n* top: 0,\n* right: 0,\n* bottom: 0,\n* left: 0\n* });\n* ```\n*/\nvar createEffectExtent = ({ top, right, bottom, left }) => new BuilderElement({\n\tname: \"wp:effectExtent\",\n\tattributes: {\n\t\ttop: {\n\t\t\tkey: \"t\",\n\t\t\tvalue: top\n\t\t},\n\t\tright: {\n\t\t\tkey: \"r\",\n\t\t\tvalue: right\n\t\t},\n\t\tbottom: {\n\t\t\tkey: \"b\",\n\t\t\tvalue: bottom\n\t\t},\n\t\tleft: {\n\t\t\tkey: \"l\",\n\t\t\tvalue: left\n\t\t}\n\t}\n});\n// src/file/drawing/extent/extent.ts\n/**\n* Extent (size) for DrawingML objects.\n*\n* This module provides support for defining the size of DrawingML objects\n* in inline drawings.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_extent_topic_ID0EQB4OB.html\n*\n* @module\n*/\n/**\n* The largest width or height, in EMUs, Word opens a drawing at. The standard allows `ST_PositiveCoordinate` up to\n* 27273042316900, but Word and PowerPoint restrict it to 2147483647 and won't open a document with a larger drawing.\n*\n* Reference: [MS-OI29500] Part 1 Section 20.1.10.42, ST_PositiveCoordinate\n*/\nvar MAX_EXTENT = 2147483647;\nvar EMUS_PER_PIXEL$1 = 9525;\nvar checkExtent = (dimension, value) => {\n\tif (value !== void 0 && value > MAX_EXTENT) throw new Error(`Invalid drawing ${dimension} ${value} EMUs (${Math.round(value / EMUS_PER_PIXEL$1)} pixels). Word won't open a drawing with a ${dimension} over ${MAX_EXTENT} EMUs (${Math.floor(MAX_EXTENT / EMUS_PER_PIXEL$1)} pixels). Sizes such as an ImageRun's transformation are in pixels, not EMUs`);\n\treturn value;\n};\n/**\n* Creates an extent element for inline drawings.\n*\n* This element specifies the extents of the parent DrawingML object within\n* the document (i.e. its final height and width).\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_extent_topic_ID0EQB4OB.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PositiveSize2D\">\n* <xsd:attribute name=\"cx\" type=\"ST_PositiveCoordinate\" use=\"required\"/>\n* <xsd:attribute name=\"cy\" type=\"ST_PositiveCoordinate\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a 1-inch by 1-inch extent\n* const extent = createExtent({\n* x: 914400,\n* y: 914400\n* });\n* ```\n*\n* @throws Error if the width or height is over 2147483647 EMUs, which Word won't open\n*/\nvar createExtent = ({ x, y }) => new BuilderElement({\n\tname: \"wp:extent\",\n\tattributes: {\n\t\tx: {\n\t\t\tkey: \"cx\",\n\t\t\tvalue: checkExtent(\"width\", x)\n\t\t},\n\t\ty: {\n\t\t\tkey: \"cy\",\n\t\t\tvalue: checkExtent(\"height\", y)\n\t\t}\n\t}\n});\n// src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-lock-attributes.ts\n/**\n* Attributes for graphic frame locking properties.\n*\n* Defines the XML attributes that control which operations are forbidden\n* on a graphic frame element.\n*/\nvar GraphicFrameLockAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\txmlns: \"xmlns:a\",\n\t\t\tnoChangeAspect: \"noChangeAspect\"\n\t\t});\n\t}\n};\n// src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.ts\n/**\n* Represents graphic frame locking properties in DrawingML.\n*\n* This element specifies all locking properties for a graphic frame. These properties\n* inform the generating application about which operations are forbidden on the parent\n* graphic frame.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_GraphicalObjectFrameLocking\">\n* <xsd:sequence>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"noGrp\" type=\"xsd:boolean\" use=\"optional\"/>\n* <xsd:attribute name=\"noDrilldown\" type=\"xsd:boolean\" use=\"optional\"/>\n* <xsd:attribute name=\"noSelect\" type=\"xsd:boolean\" use=\"optional\"/>\n* <xsd:attribute name=\"noChangeAspect\" type=\"xsd:boolean\" use=\"optional\"/>\n* <xsd:attribute name=\"noMove\" type=\"xsd:boolean\" use=\"optional\"/>\n* <xsd:attribute name=\"noResize\" type=\"xsd:boolean\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const locks = new GraphicFrameLocks();\n* ```\n*/\nvar GraphicFrameLocks = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"a:graphicFrameLocks\");\n\t\tthis.root.push(new GraphicFrameLockAttributes({\n\t\t\txmlns: \"http://schemas.openxmlformats.org/drawingml/2006/main\",\n\t\t\tnoChangeAspect: 1\n\t\t}));\n\t}\n};\n// src/file/drawing/graphic-frame/graphic-frame-properties.ts\n/**\n* # Common DrawingML Non-Visual Properties\n*\n* This element specifies common non-visual DrawingML object properties for the parent DrawingML object. These properties are specified as child elements of this element.\n*\n* References:\n* - https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_cNvGraphicFramePr_topic_ID0E6U2OB.html\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:complexType name=\"CT_NonVisualGraphicFrameProperties\">\n* <xsd:sequence>\n* <xsd:element name=\"graphicFrameLocks\" type=\"CT_GraphicalObjectFrameLocking\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @param lockAspectRatio - Whether Word keeps the drawing's aspect ratio when it is resized\n*/\nvar createGraphicFrameProperties = (lockAspectRatio = true) => new BuilderElement({\n\tname: \"wp:cNvGraphicFramePr\",\n\tchildren: lockAspectRatio ? [new GraphicFrameLocks()] : []\n});\n// src/file/drawing/anchor/anchor-attributes.ts\n/**\n* Anchor attributes module for DrawingML floating elements.\n*\n* This module defines the attributes for anchored/floating drawings,\n* controlling positioning, z-order, and wrapping behavior.\n*\n* @module\n*/\n/**\n* XML attributes component for anchored drawings.\n*\n* Maps the IAnchorAttributes to XML attribute names for the wp:anchor element.\n*\n* @internal\n*/\nvar AnchorAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tdistT: \"distT\",\n\t\t\tdistB: \"distB\",\n\t\t\tdistL: \"distL\",\n\t\t\tdistR: \"distR\",\n\t\t\tallowOverlap: \"allowOverlap\",\n\t\t\tbehindDoc: \"behindDoc\",\n\t\t\tlayoutInCell: \"layoutInCell\",\n\t\t\tlocked: \"locked\",\n\t\t\trelativeHeight: \"relativeHeight\",\n\t\t\tsimplePos: \"simplePos\"\n\t\t});\n\t}\n};\n// src/file/drawing/anchor/anchor.ts\n/**\n* Represents an anchored/floating drawing in a WordprocessingML document.\n*\n* Anchored drawings can be positioned relative to the page, margin, column,\n* paragraph, character, or line. They support text wrapping options.\n*\n* Reference: http://officeopenxml.com/drwPicFloating.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Anchor\">\n* <xsd:sequence>\n* <xsd:element name=\"simplePos\" type=\"a:CT_Point2D\"/>\n* <xsd:element name=\"positionH\" type=\"CT_PosH\"/>\n* <xsd:element name=\"positionV\" type=\"CT_PosV\"/>\n* <xsd:element name=\"extent\" type=\"a:CT_PositiveSize2D\"/>\n* <xsd:element name=\"effectExtent\" type=\"CT_EffectExtent\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_WrapType\"/>\n* <xsd:element name=\"docPr\" type=\"a:CT_NonVisualDrawingProps\"/>\n* <xsd:element name=\"cNvGraphicFramePr\" type=\"a:CT_NonVisualGraphicFrameProperties\" minOccurs=\"0\"/>\n* <xsd:element ref=\"a:graphic\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"distT\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distB\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distL\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"distR\" type=\"ST_WrapDistance\"/>\n* <xsd:attribute name=\"simplePos\" type=\"xsd:boolean\"/>\n* <xsd:attribute name=\"relativeHeight\" type=\"xsd:unsignedInt\" use=\"required\"/>\n* <xsd:attribute name=\"behindDoc\" type=\"xsd:boolean\" use=\"required\"/>\n* <xsd:attribute name=\"locked\" type=\"xsd:boolean\" use=\"required\"/>\n* <xsd:attribute name=\"layoutInCell\" type=\"xsd:boolean\" use=\"required\"/>\n* <xsd:attribute name=\"hidden\" type=\"xsd:boolean\"/>\n* <xsd:attribute name=\"allowOverlap\" type=\"xsd:boolean\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar Anchor = class extends XmlComponent {\n\tconstructor({ mediaData, transform, drawingOptions }) {\n\t\tvar _drawingOptions$effec;\n\t\tsuper(\"wp:anchor\");\n\t\tconst floating = _objectSpread2({\n\t\t\tallowOverlap: true,\n\t\t\tbehindDocument: false,\n\t\t\tlockAnchor: false,\n\t\t\tlayoutInCell: true,\n\t\t\tverticalPosition: {},\n\t\t\thorizontalPosition: {}\n\t\t}, drawingOptions.floating);\n\t\tthis.root.push(new AnchorAttributes({\n\t\t\tdistT: floating.margins ? floating.margins.top || 0 : 0,\n\t\t\tdistB: floating.margins ? floating.margins.bottom || 0 : 0,\n\t\t\tdistL: floating.margins ? floating.margins.left || 0 : 0,\n\t\t\tdistR: floating.margins ? floating.margins.right || 0 : 0,\n\t\t\tsimplePos: \"0\",\n\t\t\tallowOverlap: floating.allowOverlap === true ? \"1\" : \"0\",\n\t\t\tbehindDoc: floating.behindDocument === true ? \"1\" : \"0\",\n\t\t\tlocked: floating.lockAnchor === true ? \"1\" : \"0\",\n\t\t\tlayoutInCell: floating.layoutInCell === true ? \"1\" : \"0\",\n\t\t\trelativeHeight: floating.zIndex ? floating.zIndex : transform.emus.y\n\t\t}));\n\t\tthis.root.push(createSimplePos());\n\t\tthis.root.push(createHorizontalPosition(floating.horizontalPosition));\n\t\tthis.root.push(createVerticalPosition(floating.verticalPosition));\n\t\tthis.root.push(createExtent({\n\t\t\tx: transform.emus.x,\n\t\t\ty: transform.emus.y\n\t\t}));\n\t\tthis.root.push(createEffectExtent((_drawingOptions$effec = drawingOptions.effectExtent) !== null && _drawingOptions$effec !== void 0 ? _drawingOptions$effec : {\n\t\t\ttop: 0,\n\t\t\tright: 0,\n\t\t\tbottom: 0,\n\t\t\tleft: 0\n\t\t}));\n\t\tif (drawingOptions.floating !== void 0 && drawingOptions.floating.wrap !== void 0) switch (drawingOptions.floating.wrap.type) {\n\t\t\tcase TextWrappingType.SQUARE:\n\t\t\t\tthis.root.push(createWrapSquare(drawingOptions.floating.wrap, drawingOptions.floating.margins));\n\t\t\t\tbreak;\n\t\t\tcase TextWrappingType.TIGHT:\n\t\t\t\tthis.root.push(createWrapTight(drawingOptions.floating.margins, drawingOptions.floating.wrap));\n\t\t\t\tbreak;\n\t\t\tcase TextWrappingType.THROUGH:\n\t\t\t\tthis.root.push(createWrapThrough(drawingOptions.floating.margins, drawingOptions.floating.wrap));\n\t\t\t\tbreak;\n\t\t\tcase TextWrappingType.TOP_AND_BOTTOM:\n\t\t\t\tthis.root.push(createWrapTopAndBottom(drawingOptions.floating.margins));\n\t\t\t\tbreak;\n\t\t\tcase TextWrappingType.NONE:\n\t\t\tdefault: this.root.push(createWrapNone());\n\t\t}\n\t\telse this.root.push(createWrapNone());\n\t\tthis.root.push(new DocProperties(drawingOptions.docProperties, {\n\t\t\tlink: drawingOptions.link,\n\t\t\tdecorative: drawingOptions.decorative\n\t\t}));\n\t\tthis.root.push(createGraphicFrameProperties(mediaData.type !== \"graphic\" || mediaData.lockAspectRatio !== false));\n\t\tthis.root.push(new Graphic({\n\t\t\tmediaData,\n\t\t\ttransform,\n\t\t\toutline: drawingOptions.outline,\n\t\t\tsolidFill: drawingOptions.solidFill,\n\t\t\tcrop: drawingOptions.crop\n\t\t}));\n\t}\n};\n// src/file/drawing/inline/inline.ts\nvar createInline = ({ mediaData, transform, docProperties, outline, solidFill, crop, effectExtent, link, decorative }) => {\n\tvar _outline$width, _outline$width2, _outline$width3, _outline$width4;\n\treturn new BuilderElement({\n\t\tname: \"wp:inline\",\n\t\tattributes: {\n\t\t\tdistanceTop: {\n\t\t\t\tkey: \"distT\",\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tdistanceBottom: {\n\t\t\t\tkey: \"distB\",\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tdistanceLeft: {\n\t\t\t\tkey: \"distL\",\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tdistanceRight: {\n\t\t\t\tkey: \"distR\",\n\t\t\t\tvalue: 0\n\t\t\t}\n\t\t},\n\t\tchildren: [\n\t\t\tcreateExtent({\n\t\t\t\tx: transform.emus.x,\n\t\t\t\ty: transform.emus.y\n\t\t\t}),\n\t\t\tcreateEffectExtent(effectExtent !== null && effectExtent !== void 0 ? effectExtent : outline ? {\n\t\t\t\ttop: ((_outline$width = outline.width) !== null && _outline$width !== void 0 ? _outline$width : 9525) * 2,\n\t\t\t\tright: ((_outline$width2 = outline.width) !== null && _outline$width2 !== void 0 ? _outline$width2 : 9525) * 2,\n\t\t\t\tbottom: ((_outline$width3 = outline.width) !== null && _outline$width3 !== void 0 ? _outline$width3 : 9525) * 2,\n\t\t\t\tleft: ((_outline$width4 = outline.width) !== null && _outline$width4 !== void 0 ? _outline$width4 : 9525) * 2\n\t\t\t} : {\n\t\t\t\ttop: 0,\n\t\t\t\tright: 0,\n\t\t\t\tbottom: 0,\n\t\t\t\tleft: 0\n\t\t\t}),\n\t\t\tnew DocProperties(docProperties, {\n\t\t\t\tlink,\n\t\t\t\tdecorative\n\t\t\t}),\n\t\t\tcreateGraphicFrameProperties(mediaData.type !== \"graphic\" || mediaData.lockAspectRatio !== false),\n\t\t\tnew Graphic({\n\t\t\t\tmediaData,\n\t\t\t\ttransform,\n\t\t\t\toutline,\n\t\t\t\tsolidFill,\n\t\t\t\tcrop\n\t\t\t})\n\t\t]\n\t});\n};\n// src/file/drawing/drawing.ts\n/**\n* Represents a drawing element in a WordprocessingML document.\n*\n* Drawings can be either inline (positioned as part of the text flow) or\n* anchored (positioned relative to the page, column, or paragraph).\n*\n* Reference: http://officeopenxml.com/drwOverview.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Drawing\">\n* <xsd:choice minOccurs=\"1\" maxOccurs=\"unbounded\">\n* <xsd:element ref=\"wp:anchor\" minOccurs=\"0\"/>\n* <xsd:element ref=\"wp:inline\" minOccurs=\"0\"/>\n* </xsd:choice>\n* </xsd:complexType>\n* ```\n*/\nvar Drawing = class extends XmlComponent {\n\tconstructor(imageData, drawingOptions = {}) {\n\t\tsuper(\"w:drawing\");\n\t\tif (!drawingOptions.floating) this.root.push(createInline({\n\t\t\tmediaData: imageData,\n\t\t\ttransform: imageData.transformation,\n\t\t\tdocProperties: drawingOptions.docProperties,\n\t\t\toutline: drawingOptions.outline,\n\t\t\tsolidFill: drawingOptions.solidFill,\n\t\t\tcrop: drawingOptions.crop,\n\t\t\teffectExtent: drawingOptions.effectExtent,\n\t\t\tlink: drawingOptions.link,\n\t\t\tdecorative: drawingOptions.decorative\n\t\t}));\n\t\telse this.root.push(new Anchor({\n\t\t\tmediaData: imageData,\n\t\t\ttransform: imageData.transformation,\n\t\t\tdrawingOptions\n\t\t}));\n\t}\n};\n// src/file/paragraph/run/image-run.ts\nvar createImageData = (options, key) => ({\n\tdata: standardizeData(options.data),\n\tfileName: key,\n\ttransformation: {\n\t\tpixels: {\n\t\t\tx: Math.round(options.transformation.width),\n\t\t\ty: Math.round(options.transformation.height)\n\t\t},\n\t\temus: {\n\t\t\tx: Math.round(options.transformation.width * 9525),\n\t\t\ty: Math.round(options.transformation.height * 9525)\n\t\t},\n\t\tflip: options.transformation.flip,\n\t\trotation: options.transformation.rotation ? options.transformation.rotation * 6e4 : void 0\n\t}\n});\n/** The media data of a PNG, JPEG, GIF or BMP image, as an image of its own or as an SVG image's fallback */\nvar createRegularImageData = (options, transformation, name) => {\n\tconst type = imageTypeOf(options, name);\n\treturn _objectSpread2({ type }, createImageData(_objectSpread2(_objectSpread2({}, options), {}, { transformation }), `${hashedId(options.data)}.${type}`));\n};\nvar createDeletion = ({ id, author, date }, run) => new BuilderElement({\n\tname: \"w:del\",\n\tattributes: {\n\t\tid: {\n\t\t\tkey: \"w:id\",\n\t\t\tvalue: id\n\t\t},\n\t\tauthor: {\n\t\t\tkey: \"w:author\",\n\t\t\tvalue: author\n\t\t},\n\t\tdate: {\n\t\t\tkey: \"w:date\",\n\t\t\tvalue: date\n\t\t}\n\t},\n\tchildren: [run]\n});\n/**\n* Represents an image in a WordprocessingML document.\n*\n* ImageRun embeds an image within a run, supporting various formats\n* including JPG, PNG, GIF, BMP, and SVG. Optionally wraps the run in\n* `<w:ins>` or `<w:del>`, or both, for track-change insertion/deletion markup.\n*\n* Reference: http://officeopenxml.com/drwPicInline.php\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new ImageRun({\n* data: fs.readFileSync(\"./image.png\"),\n* transformation: {\n* width: 100,\n* height: 100,\n* },\n* type: \"png\",\n* });\n* ```\n*/\nvar ImageRun = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$insertion;\n\t\tconst imageData = options.type === \"svg\" ? _objectSpread2(_objectSpread2({ type: options.type }, createImageData(options, `${hashedId(options.data)}.svg`)), {}, { fallback: createRegularImageData(options.fallback, options.transformation, \"ImageRun fallback\") }) : createRegularImageData(options, options.transformation, \"ImageRun\");\n\t\tconst drawing = new Drawing(imageData, {\n\t\t\tfloating: options.floating,\n\t\t\tdocProperties: options.altText,\n\t\t\toutline: options.outline,\n\t\t\tsolidFill: options.solidFill,\n\t\t\tcrop: options.crop,\n\t\t\tlink: options.link,\n\t\t\tdecorative: options.decorative\n\t\t});\n\t\tconst properties = new RunProperties(options.run);\n\t\tconst revision = (_options$insertion = options.insertion) !== null && _options$insertion !== void 0 ? _options$insertion : options.deletion;\n\t\tconst rootName = options.insertion ? \"w:ins\" : options.deletion ? \"w:del\" : \"w:r\";\n\t\tsuper(rootName);\n\t\t_defineProperty(this, \"imageData\", void 0);\n\t\tif (revision) {\n\t\t\tthis.root.push(new ChangeAttributes({\n\t\t\t\tid: revision.id,\n\t\t\t\tauthor: revision.author,\n\t\t\t\tdate: revision.date\n\t\t\t}));\n\t\t\tconst run = new BuilderElement({\n\t\t\t\tname: \"w:r\",\n\t\t\t\tchildren: [properties, drawing]\n\t\t\t});\n\t\t\tthis.addChildElement(options.insertion && options.deletion ? createDeletion(options.deletion, run) : run);\n\t\t} else {\n\t\t\tthis.root.push(properties);\n\t\t\tthis.root.push(drawing);\n\t\t}\n\t\tthis.imageData = imageData;\n\t}\n\tprepForXml(context) {\n\t\tcontext.file.Media.addImage(this.imageData.fileName, this.imageData);\n\t\tif (this.imageData.type === \"svg\") context.file.Media.addImage(this.imageData.fallback.fileName, this.imageData.fallback);\n\t\treturn super.prepForXml(context);\n\t}\n};\n// src/file/paragraph/run/wps-shape-run.ts\nvar createTransformation = (options) => {\n\tvar _options$offset$left, _options$offset, _options$offset$top, _options$offset2, _options$offset$left2, _options$offset3, _options$offset$top2, _options$offset4;\n\treturn {\n\t\toffset: {\n\t\t\tpixels: {\n\t\t\t\tx: Math.round((_options$offset$left = (_options$offset = options.offset) === null || _options$offset === void 0 ? void 0 : _options$offset.left) !== null && _options$offset$left !== void 0 ? _options$offset$left : 0),\n\t\t\t\ty: Math.round((_options$offset$top = (_options$offset2 = options.offset) === null || _options$offset2 === void 0 ? void 0 : _options$offset2.top) !== null && _options$offset$top !== void 0 ? _options$offset$top : 0)\n\t\t\t},\n\t\t\temus: {\n\t\t\t\tx: Math.round(((_options$offset$left2 = (_options$offset3 = options.offset) === null || _options$offset3 === void 0 ? void 0 : _options$offset3.left) !== null && _options$offset$left2 !== void 0 ? _options$offset$left2 : 0) * 9525),\n\t\t\t\ty: Math.round(((_options$offset$top2 = (_options$offset4 = options.offset) === null || _options$offset4 === void 0 ? void 0 : _options$offset4.top) !== null && _options$offset$top2 !== void 0 ? _options$offset$top2 : 0) * 9525)\n\t\t\t}\n\t\t},\n\t\tpixels: {\n\t\t\tx: Math.round(options.width),\n\t\t\ty: Math.round(options.height)\n\t\t},\n\t\temus: {\n\t\t\tx: Math.round(options.width * 9525),\n\t\t\ty: Math.round(options.height * 9525)\n\t\t},\n\t\tflip: options.flip,\n\t\trotation: options.rotation ? options.rotation * 6e4 : void 0\n\t};\n};\n/**\n* A rectangular text box.\n*\n* @publicApi\n* @deprecated Use `ShapeRun` from `docx/shapes`, with `type: \"rectangle\"` and `children` for a text box. It has plain\n* options for fills, lines, effects and text layout, and can be any of the preset shapes.\n*/\nvar WpsShapeRun = class extends Run {\n\tconstructor(options) {\n\t\tsuper({});\n\t\t_defineProperty(this, \"wpsShapeData\", void 0);\n\t\tthis.wpsShapeData = {\n\t\t\ttype: options.type,\n\t\t\ttransformation: createTransformation(options.transformation),\n\t\t\tdata: _objectSpread2({}, options)\n\t\t};\n\t\tconst drawing = new Drawing(this.wpsShapeData, {\n\t\t\tfloating: options.floating,\n\t\t\tdocProperties: options.altText,\n\t\t\toutline: options.outline,\n\t\t\tsolidFill: options.solidFill\n\t\t});\n\t\tthis.root.push(drawing);\n\t}\n};\n// src/file/paragraph/run/wpg-group-run.ts\n/**\n* A group of text boxes and pictures.\n*\n* @publicApi\n* @deprecated Use `ShapeGroupRun` from `docx/shapes`, whose children can be shapes, pictures, groups and connectors,\n* positioned in pixels.\n*/\nvar WpgGroupRun = class extends Run {\n\tconstructor(options) {\n\t\tsuper({});\n\t\t_defineProperty(this, \"wpgGroupData\", void 0);\n\t\t_defineProperty(this, \"mediaDatas\", void 0);\n\t\tthis.wpgGroupData = {\n\t\t\ttype: options.type,\n\t\t\ttransformation: createTransformation(options.transformation),\n\t\t\tchildren: options.children\n\t\t};\n\t\tconst drawing = new Drawing(this.wpgGroupData, {\n\t\t\tfloating: options.floating,\n\t\t\tdocProperties: options.altText\n\t\t});\n\t\tthis.mediaDatas = options.children.filter((child) => child.type !== \"wps\").map((child) => child);\n\t\tthis.root.push(drawing);\n\t}\n\tprepForXml(context) {\n\t\tthis.mediaDatas.forEach((child) => {\n\t\t\tcontext.file.Media.addImage(child.fileName, child);\n\t\t\tif (child.type === \"svg\") context.file.Media.addImage(child.fallback.fileName, child.fallback);\n\t\t});\n\t\treturn super.prepForXml(context);\n\t}\n};\n// src/file/paragraph/run/sequential-identifier-instruction.ts\n/**\n* Sequential identifier instruction module for WordprocessingML documents.\n*\n* This module provides the SEQ field instruction for creating\n* auto-numbered sequences like figure numbers, table numbers, etc.\n*\n* Reference: http://officeopenxml.com/WPfieldInstructions.php\n*\n* @module\n*/\n/**\n* Represents a SEQ field instruction.\n*\n* The SEQ field inserts an automatically incrementing sequence number,\n* useful for numbering figures, tables, equations, or custom sequences.\n*\n* @example\n* ```typescript\n* // Create a figure number sequence\n* new SequentialIdentifierInstruction(\"Figure\");\n*\n* // Create a table number sequence\n* new SequentialIdentifierInstruction(\"Table\");\n* ```\n*\n* @internal\n*/\nvar SequentialIdentifierInstruction = class extends XmlComponent {\n\tconstructor(identifier) {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(`SEQ ${identifier}`);\n\t}\n};\n// src/file/paragraph/run/sequential-identifier.ts\n/**\n* Sequential identifier module for WordprocessingML documents.\n*\n* This module provides support for SEQ (sequence) fields, which are used to\n* automatically number items in a document such as figures, tables, and equations.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Represents a sequential identifier field in a WordprocessingML document.\n*\n* SequentialIdentifier creates a SEQ field that automatically numbers items in a document.\n* Each identifier maintains its own sequence, allowing you to have separate numbering\n* for figures, tables, equations, etc.\n*\n* It is written dirty, so Word numbers it when it opens the document, after asking to update the fields. When the\n* document is given `pageNumbers`, it is written clean, with its number counted as Word counts it, or blank where\n* Word's count isn't known, and Word doesn't ask.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_R\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_RunInnerContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a figure number\n* new SequentialIdentifier(\"Figure\");\n*\n* // Create a table number\n* new SequentialIdentifier(\"Table\");\n*\n* // Create an equation number\n* new SequentialIdentifier(\"Equation\");\n* ```\n*/\nvar SequentialIdentifier = class extends Run {\n\tconstructor(identifier) {\n\t\tsuper({});\n\t\tthis.root.push(createBeginDirtyWithoutPageNumbers());\n\t\tthis.root.push(new SequentialIdentifierInstruction(identifier));\n\t\tthis.root.push(createSeparate());\n\t\tthis.root.push(createEnd());\n\t}\n};\n// src/file/paragraph/run/simple-field.ts\n/**\n* Simple field module for WordprocessingML documents.\n*\n* This module provides support for simple fields, which are self-contained field\n* elements that include both the field code and optional cached result in a single element.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_fldSimple-1.html\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* The fields that mark a place in the document and have no result: index entries (`XE`), table of contents entries\n* (`TC`), table of authorities entries (`TA`), referenced documents (`RD`) and `PRIVATE`. Word misreads them as a\n* `w:fldSimple`, moving the text around them to other places in the document, so they are written as a complex field.\n*/\nvar MARKER_FIELD = /^\\s*(?:XE|TC|TA|RD|PRIVATE)\\b/i;\n/**\n* @internal\n*/\nvar FieldInstructionText = class extends XmlComponent {\n\tconstructor(instruction) {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(instruction);\n\t}\n};\n/**\n* @internal\n*/\nvar FldSimpleAttrs = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tinstr: \"w:instr\",\n\t\t\tfldLock: \"w:fldLock\"\n\t\t});\n\t}\n};\n/**\n* Represents a simple field in a WordprocessingML document.\n*\n* A simple field (fldSimple) contains both the field code and the optional cached value\n* in a single element, unlike complex fields which use separate begin/end markers.\n* Simple fields are typically used for fields that don't require complex nesting.\n*\n* Fields that mark a place and have no result, such as an index entry (`XE`) or a table of contents entry (`TC`), are\n* written as a complex field in a run (`w:r`), as Word writes them, because Word moves the text around them when it\n* reads them as a `w:fldSimple`. They have no cached value, so one given isn't written.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_fldSimple-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SimpleField\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"instr\" type=\"s:ST_String\" use=\"required\"/>\n* <xsd:attribute name=\"fldLock\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"dirty\" type=\"s:ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Simple field with instruction\n* new SimpleField(\"DATE\");\n*\n* // Simple field with cached value\n* new SimpleField(\"DATE\", \"2024-01-01\");\n*\n* // Locked field, Word keeps the cached value when fields are updated\n* new SimpleField(\"DATE\", \"2024-01-01\", { locked: true });\n*\n* // Index entry, for an INDEX field to list\n* new SimpleField('XE \"Apples\"');\n* ```\n*/\nvar SimpleField = class extends XmlComponent {\n\tconstructor(instruction, cachedValue, options = {}) {\n\t\tconst marker = MARKER_FIELD.test(instruction);\n\t\tsuper(marker ? \"w:r\" : \"w:fldSimple\");\n\t\tif (marker) {\n\t\t\tthis.root.push(createBegin(void 0, options.locked ? true : void 0));\n\t\t\tthis.root.push(new FieldInstructionText(instruction));\n\t\t\tthis.root.push(createEnd());\n\t\t\treturn;\n\t\t}\n\t\tthis.root.push(new FldSimpleAttrs({\n\t\t\tinstr: instruction,\n\t\t\tfldLock: options.locked ? true : void 0\n\t\t}));\n\t\tif (cachedValue !== void 0) this.root.push(new TextRun(cachedValue));\n\t}\n};\n/**\n* Represents a mail merge field in a WordprocessingML document.\n*\n* SimpleMailMergeField is a specialized simple field for mail merge operations.\n* It creates a MERGEFIELD that will be populated with data during mail merge.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @example\n* ```typescript\n* // Creates a merge field for \"FirstName\"\n* new SimpleMailMergeField(\"FirstName\");\n* // Renders as: MERGEFIELD FirstName with placeholder «FirstName»\n* ```\n*/\nvar SimpleMailMergeField = class extends SimpleField {\n\tconstructor(fieldName) {\n\t\tsuper(` MERGEFIELD ${fieldName} `, `«${fieldName}»`);\n\t}\n};\n// src/file/document/body/field-number-formats.ts\nvar LARGEST_ROMAN = 32767;\nvar LARGEST_LETTERS = 780;\nvar ROMAN = [\n\t[1e3, \"M\"],\n\t[900, \"CM\"],\n\t[500, \"D\"],\n\t[400, \"CD\"],\n\t[100, \"C\"],\n\t[90, \"XC\"],\n\t[50, \"L\"],\n\t[40, \"XL\"],\n\t[10, \"X\"],\n\t[9, \"IX\"],\n\t[5, \"V\"],\n\t[4, \"IV\"],\n\t[1, \"I\"]\n];\nvar roman = (value) => value <= LARGEST_ROMAN ? ROMAN.reduce(({ rest, text }, [amount, numeral]) => ({\n\trest: rest % amount,\n\ttext: text + numeral.repeat(Math.floor(rest / amount))\n}), {\n\trest: value,\n\ttext: \"\"\n}).text : void 0;\nvar letters = (value) => value === 0 ? \"\" : value <= LARGEST_LETTERS ? String.fromCharCode(65 + (value - 1) % 26).repeat(Math.ceil(value / 26)) : void 0;\nvar ordinal = (value) => {\n\tvar _ref;\n\treturn `${value}${value % 100 >= 11 && value % 100 <= 13 ? \"th\" : (_ref = [\n\t\t\"th\",\n\t\t\"st\",\n\t\t\"nd\",\n\t\t\"rd\"\n\t][value % 10]) !== null && _ref !== void 0 ? _ref : \"th\"}`;\n};\n/**\n* The number formats of a field's `\\*` switch that are written as Word writes them, by their names in any capitals.\n* Word writes roman numerals and letters in small letters when the name starts with a small letter, as `roman`, and in\n* capitals otherwise, as `Roman` and `ROMAN`\n*/\nvar numberWriterOf = (format) => {\n\tconst small = format.charAt(0) !== format.charAt(0).toUpperCase();\n\tconst inCase = (write) => (value) => {\n\t\tvar _write;\n\t\treturn small ? (_write = write(value)) === null || _write === void 0 ? void 0 : _write.toLowerCase() : write(value);\n\t};\n\tswitch (format.toLowerCase()) {\n\t\tcase \"arabic\": return String;\n\t\tcase \"roman\": return inCase(roman);\n\t\tcase \"alphabetic\": return inCase(letters);\n\t\tcase \"ordinal\": return (value) => value > 0 ? ordinal(value) : void 0;\n\t\tcase \"arabicdash\": return (value) => `- ${value} -`;\n\t\tdefault: return;\n\t}\n};\nvar PLAIN_FORMATS = /* @__PURE__ */ new Set([\n\t\"mergeformat\",\n\t\"charformat\",\n\t\"mergeformatinet\"\n]);\nvar CASE_FORMATS = /* @__PURE__ */ new Set([\n\t\"upper\",\n\t\"lower\",\n\t\"firstcap\",\n\t\"caps\"\n]);\n/**\n* Whether Word's text for a picture of a field's `\\#` switch is known: one of digits (`0`), digits only where the number\n* has them (`#`) and commas between thousands, as Word wrote `00`, `000`, `0`, `#` and `#,##0` for page numbers\n* (`scripts/layout-probes/word-page-fields.ts` PF5 to PF7)\n*/\nvar isNumberPicture = (picture) => /^[#0,]*[#0][#0,]*$/.test(picture);\n/**\n* A number with a picture: with as many digits as it has `0`s at least, which Word fills with 0s (5 is 05 with `00`), and\n* its thousands between commas when it has one (1234 is 1,234 with `#,##0`). Undefined where a `#` has no digit of the\n* number, which Word writes as a space, not yet seen\n*/\nvar inNumberPicture = (value, picture) => {\n\tconst zeros = [...picture].filter((character) => character === \"0\").length;\n\tconst places = zeros + [...picture].filter((character) => character === \"#\").length;\n\tconst digits = String(value).padStart(zeros, \"0\");\n\tif (digits.length < places || zeros === 0 && value === 0) return;\n\treturn picture.includes(\",\") ? digits.replace(/\\B(?=(\\d{3})+$)/g, \",\") : digits;\n};\n/**\n* Text in the capitals of a field's switch, applied after its number's format, as Word wrote `\\* roman \\* Upper` as V,\n* `\\* Ordinal \\* Upper` as 5TH, and \"above\" with `\\* Upper` as ABOVE (`word-page-fields.ts` PF3 and PF5)\n*/\nvar inCapitals = (text, capitals) => {\n\tswitch (capitals) {\n\t\tcase \"upper\": return text.toUpperCase();\n\t\tcase \"lower\": return text.toLowerCase();\n\t\tcase \"firstcap\": return text.charAt(0).toUpperCase() + text.slice(1);\n\t\tdefault: return text;\n\t}\n};\n// src/file/document/body/page-number-fields.ts\n/**\n* Writes estimated page numbers into the fields of a tree of elements that show them: those docx formats to write a\n* document, and those `patchDocument` parses from a template. Not part of the public API.\n*\n* A page reference is a PAGEREF field, and the numbers of pages of the document and of a section are NUMPAGES and\n* SECTIONPAGES fields. Each field's result is written just after its `separate` field character, and any result it had\n* is taken out.\n*\n* @module\n*/\n/** Reads a field that shows a page's number or a number of pages, or undefined for another field */\nvar numberFieldOf = (instruction) => {\n\tvar _match;\n\tconst field = new RegExp(\"^\\\\s*(PAGEREF|NUMPAGES|SECTIONPAGES)\\\\b(.*)$\", \"is\").exec(instruction);\n\tconst reference = (field === null || field === void 0 ? void 0 : field[1].toUpperCase()) === \"PAGEREF\" ? new RegExp(\"^\\\\s*(\\\"?)([^\\\\s\\\"\\\\\\\\]+)\\\\1(.*)$\", \"s\").exec(field[2]) : void 0;\n\tif (!field || field[1].toUpperCase() === \"PAGEREF\" && !reference) return;\n\tconst parts = (_match = (reference ? reference[3] : field[2]).match(/\"[^\"]*\"|\\S+/g)) !== null && _match !== void 0 ? _match : [];\n\tlet numberFormat;\n\tlet picture;\n\tconst capitals = [];\n\tlet relative = false;\n\tlet written = true;\n\tfor (let index = 0; index < parts.length; index++) {\n\t\tconst part = parts[index];\n\t\tconst argument = () => {\n\t\t\tvar _parts$index;\n\t\t\treturn (part.length > 2 ? part.slice(2) : (_parts$index = parts[++index]) !== null && _parts$index !== void 0 ? _parts$index : \"\").replace(/^\"(.*)\"$/, \"$1\");\n\t\t};\n\t\tif (/^\\\\p$/i.test(part)) relative = true;\n\t\telse if (part.startsWith(\"\\\\#\")) {\n\t\t\tvar _picture;\n\t\t\tconst value = argument();\n\t\t\twritten && (written = picture === void 0 && isNumberPicture(value));\n\t\t\t(_picture = picture) !== null && _picture !== void 0 || (picture = value);\n\t\t} else if (part.startsWith(\"\\\\*\")) {\n\t\t\tconst name = argument();\n\t\t\tconst lower = name.toLowerCase();\n\t\t\tif (CASE_FORMATS.has(lower)) capitals.push(lower);\n\t\t\telse if (name !== \"\" && !PLAIN_FORMATS.has(lower)) {\n\t\t\t\tvar _numberFormat;\n\t\t\t\twritten && (written = numberFormat === void 0 && numberWriterOf(name) !== void 0);\n\t\t\t\t(_numberFormat = numberFormat) !== null && _numberFormat !== void 0 || (numberFormat = name);\n\t\t\t}\n\t\t}\n\t}\n\tconst own = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, numberFormat === void 0 ? {} : { numberFormat }), picture === void 0 ? {} : { picture }), capitals.length === 0 ? {} : { capitals: capitals[0] }), {}, { written: written && capitals.length <= 1 && capitals[0] !== \"caps\" && (numberFormat === void 0 || picture === void 0) });\n\treturn reference ? _objectSpread2({\n\t\ttype: \"pageReference\",\n\t\tbookmark: reference[2],\n\t\trelative\n\t}, own) : _objectSpread2({\n\t\ttype: \"pageCount\",\n\t\tscope: field[1].toUpperCase() === \"NUMPAGES\" ? \"document\" : \"section\"\n\t}, own);\n};\n/**\n* Whether a field is a table of contents that writes the number of a SEQ field before each page number (`\\s`), such as\n* 2-5 for page 5 of chapter 2, which isn't written\n*/\nvar prefixesPageNumbers = (instruction) => new RegExp(\"^\\\\s*TOC\\\\b.*\\\\\\\\s\\\\b\", \"is\").test(instruction);\n/**\n* The result of a field that shows a page's number or a number of pages, or undefined to leave it as it is. A field\n* the estimate has no number for is left as it is, or made blank, and so is a page number in a table of contents that\n* writes a SEQ field's number before it.\n*/\nvar resultFrom = (instruction, { enclosing, within, inTextBox }, { estimate, sectionPageCount, blank, relativeTo }) => {\n\tconst field = numberFieldOf(instruction);\n\tif (field === void 0) return;\n\tconst { bookmarks, pageCount, bookmarkPageNumbers } = estimate;\n\tconst { numberFormat, picture, capitals, written } = field;\n\tconst writesNumber = numberFormat !== void 0 || picture !== void 0;\n\t/** A number in the field's format of its own, or as it is */\n\tconst inFormat = (value) => value === void 0 ? void 0 : picture === void 0 ? numberWriterOf(numberFormat !== null && numberFormat !== void 0 ? numberFormat : \"arabic\")(value) : inNumberPicture(value, picture);\n\tconst position = field.type === \"pageReference\" && field.relative && within === \"counted\" && !inTextBox ? relativeTo === null || relativeTo === void 0 ? void 0 : relativeTo(field.bookmark) : void 0;\n\tlet result;\n\tif (!written) result = void 0;\n\telse if (field.type === \"pageCount\") result = inFormat(field.scope === \"document\" ? pageCount : sectionPageCount);\n\telse if (enclosing.some(prefixesPageNumbers)) result = void 0;\n\telse if (writesNumber) result = inFormat(bookmarkPageNumbers === null || bookmarkPageNumbers === void 0 ? void 0 : bookmarkPageNumbers.get(field.bookmark));\n\telse result = field.relative ? position : bookmarks.get(field.bookmark);\n\treturn result === void 0 ? blank ? \"\" : void 0 : inCapitals(result, capitals);\n};\n/** Where the content of an element is: in what an application that doesn't read Word's own shows, or in deleted text */\nvar placeIn = (name, within) => name === \"mc:Fallback\" || within === \"fallback\" ? \"fallback\" : name === \"w:del\" || name === \"w:moveFrom\" ? \"deleted\" : within;\n/**\n* Writes the results the filling works out into the fields in the elements, in order.\n*/\nvar fillFields = (tree, elements, open, filling, within = \"counted\", inTextBox = false) => {\n\tfor (let index = 0; index < elements.length; index++) {\n\t\tconst element = elements[index];\n\t\tconst name = tree.nameOf(element);\n\t\tif (name === void 0) continue;\n\t\tconst current = open[open.length - 1];\n\t\tif (name === \"w:fldChar\") {\n\t\t\tconst type = tree.attributeOf(element, \"w:fldCharType\");\n\t\t\tif (type === \"begin\") open.push({\n\t\t\t\tbegin: element,\n\t\t\t\tinstruction: \"\",\n\t\t\t\tinResult: false\n\t\t\t});\n\t\t\telse if (type === \"separate\" && current) {\n\t\t\t\ttree.writeClean(current.begin, current.instruction);\n\t\t\t\tcurrent.inResult = true;\n\t\t\t\tcurrent.result = filling.resultOf(current.instruction, {\n\t\t\t\t\twithin,\n\t\t\t\t\tenclosing: open.slice(0, -1).map((field) => field.instruction),\n\t\t\t\t\tinTextBox\n\t\t\t\t});\n\t\t\t\tif (current.result !== void 0) {\n\t\t\t\t\telements.splice(index + 1, 0, tree.textElement(current.result));\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t} else if (type === \"end\") open.pop();\n\t\t} else if (name === \"w:instrText\" && current && !current.inResult) current.instruction += tree.textOf(element);\n\t\telse if ((name === \"w:t\" || name === \"w:tab\" || name === \"w:br\" || name === \"w:cr\") && (current === null || current === void 0 ? void 0 : current.result) !== void 0) {\n\t\t\telements.splice(index, 1);\n\t\t\tindex--;\n\t\t} else if (name === \"w:fldSimple\") {\n\t\t\tconst result = filling.resultOf(String(tree.attributeOf(element, \"w:instr\")), {\n\t\t\t\twithin,\n\t\t\t\tenclosing: open.map((field) => field.instruction),\n\t\t\t\tinTextBox\n\t\t\t});\n\t\t\tif (result === void 0) {\n\t\t\t\tvar _tree$contentOf;\n\t\t\t\tfillFields(tree, (_tree$contentOf = tree.contentOf(element)) !== null && _tree$contentOf !== void 0 ? _tree$contentOf : [], [], filling, within, inTextBox);\n\t\t\t} else tree.setSimpleFieldResult(element, result);\n\t\t} else {\n\t\t\tvar _tree$contentOf2;\n\t\t\tif (name === \"w:p\") {\n\t\t\t\tvar _filling$beforeParagr;\n\t\t\t\t(_filling$beforeParagr = filling.beforeParagraph) === null || _filling$beforeParagr === void 0 || _filling$beforeParagr.call(filling, element);\n\t\t\t}\n\t\t\tfillFields(tree, (_tree$contentOf2 = tree.contentOf(element)) !== null && _tree$contentOf2 !== void 0 ? _tree$contentOf2 : [], open, filling, placeIn(name, within), inTextBox || name === \"w:txbxContent\");\n\t\t\tif (name === \"w:p\") filling.afterParagraph(element);\n\t\t}\n\t}\n};\n/** The section properties (`w:sectPr`) in the elements, in order: those of the paragraphs that end sections, and the last */\nvar sectionPropertiesIn = (tree, elements) => elements.flatMap((element) => {\n\tvar _tree$contentOf3;\n\tconst name = tree.nameOf(element);\n\tif (name === void 0) return [];\n\treturn name === \"w:sectPr\" ? [element] : sectionPropertiesIn(tree, (_tree$contentOf3 = tree.contentOf(element)) !== null && _tree$contentOf3 !== void 0 ? _tree$contentOf3 : []);\n});\n/** Whether a paragraph ends a section: whether its properties have the section's */\nvar endsSection = (tree, paragraph) => {\n\tvar _tree$contentOf4;\n\treturn ((_tree$contentOf4 = tree.contentOf(paragraph)) !== null && _tree$contentOf4 !== void 0 ? _tree$contentOf4 : []).some((child) => {\n\t\tvar _tree$contentOf5;\n\t\treturn tree.nameOf(child) === \"w:pPr\" && ((_tree$contentOf5 = tree.contentOf(child)) !== null && _tree$contentOf5 !== void 0 ? _tree$contentOf5 : []).some((part) => tree.nameOf(part) === \"w:sectPr\");\n\t});\n};\n/**\n* The number of pages each header and footer shows in its SECTIONPAGES fields, by the id of the relationship to it:\n* that of the sections whose pages it is on, when they all have the same. A section without a header or footer of a kind\n* has the one of the section before, as Word lays them out.\n*/\nvar partPageCountsOf = (tree, body, sectionPageCounts) => {\n\tconst countsOfParts = sectionPropertiesIn(tree, [body]).reduce((all, properties) => {\n\t\tvar _tree$contentOf6, _all;\n\t\tconst references = ((_tree$contentOf6 = tree.contentOf(properties)) !== null && _tree$contentOf6 !== void 0 ? _tree$contentOf6 : []).flatMap((child) => {\n\t\t\tconst name = tree.nameOf(child);\n\t\t\treturn name === \"w:headerReference\" || name === \"w:footerReference\" ? [[`${name} ${String(tree.attributeOf(child, \"w:type\"))}`, String(tree.attributeOf(child, \"r:id\"))]] : [];\n\t\t});\n\t\treturn [...all, new Map([...(_all = all[all.length - 1]) !== null && _all !== void 0 ? _all : [], ...references])];\n\t}, []).reduce((counts, parts, section) => {\n\t\tfor (const id of parts.values()) {\n\t\t\tvar _counts$get;\n\t\t\tcounts.set(id, [...(_counts$get = counts.get(id)) !== null && _counts$get !== void 0 ? _counts$get : [], sectionPageCounts[section]]);\n\t\t}\n\t\treturn counts;\n\t}, /* @__PURE__ */ new Map());\n\treturn new Map([...countsOfParts].flatMap(([id, [first, ...rest]]) => first !== void 0 && rest.every((count) => count === first) ? [[id, first]] : []));\n};\n/**\n* Writes the estimated page numbers into the fields of a document's body that show them: its PAGEREF fields, in its\n* tables of contents and elsewhere, and its NUMPAGES and SECTIONPAGES fields.\n*\n* @returns The number of pages each header and footer shows in its SECTIONPAGES fields, by the id of the relationship to it\n*/\nvar fillBodyFields = (tree, body, estimate, { blank }) => {\n\tconst { sectionPageCounts = [], relativePositions } = estimate;\n\tlet section = 0;\n\tconst relativeCounts = /* @__PURE__ */ new Map();\n\tconst relativeTo = (bookmark) => {\n\t\tvar _relativeCounts$get, _relativePositions$ge;\n\t\tconst count = (_relativeCounts$get = relativeCounts.get(bookmark)) !== null && _relativeCounts$get !== void 0 ? _relativeCounts$get : 0;\n\t\trelativeCounts.set(bookmark, count + 1);\n\t\treturn relativePositions === null || relativePositions === void 0 || (_relativePositions$ge = relativePositions.get(bookmark)) === null || _relativePositions$ge === void 0 ? void 0 : _relativePositions$ge[count];\n\t};\n\tfillFields(tree, [body], [], {\n\t\tresultOf: (instruction, place) => resultFrom(instruction, place, {\n\t\t\testimate,\n\t\t\tsectionPageCount: sectionPageCounts[section],\n\t\t\tblank,\n\t\t\trelativeTo\n\t\t}),\n\t\tafterParagraph: (paragraph) => {\n\t\t\tsection += endsSection(tree, paragraph) ? 1 : 0;\n\t\t}\n\t});\n\treturn partPageCountsOf(tree, body, sectionPageCounts);\n};\n/**\n* Writes the estimated page numbers into the fields of a header, footer, footnote or endnote that show them, with the\n* number of pages its SECTIONPAGES fields show, if it is known. A page reference with `\\p` in a footnote or endnote\n* (`notes`) writes \"on page\" and its bookmark's page, whatever page it is on, as Word writes it\n* (`word-page-fields.docx` PF8f, PF8g)\n*/\nvar fillPartFields = (tree, part, estimate, { blank, sectionPageCount, notes = false }) => {\n\tconst onPage = (bookmark) => {\n\t\tconst page = estimate.bookmarks.get(bookmark);\n\t\treturn page === void 0 ? void 0 : `on page ${page}`;\n\t};\n\tfillFields(tree, [part], [], {\n\t\tresultOf: (instruction, place) => resultFrom(instruction, place, _objectSpread2({\n\t\t\testimate,\n\t\t\tsectionPageCount,\n\t\t\tblank\n\t\t}, notes ? { relativeTo: onPage } : {})),\n\t\tafterParagraph: () => void 0\n\t});\n};\n/** Writes the numbers of the SEQ fields of a document's body into them */\nvar fillSequenceFields = (tree, body, { beforeParagraph, resultOf }) => fillFields(tree, [body], [], {\n\tresultOf: (instruction, { within }) => resultOf(instruction, within),\n\tbeforeParagraph,\n\tafterParagraph: () => void 0\n});\n// src/file/table-of-contents/field-instruction.ts\n/**\n* Field Instruction module for Table of Contents.\n*\n* This module handles the generation of TOC field instruction text\n* that controls how the table of contents is built.\n*\n* Reference: http://officeopenxml.com/WPfieldInstructions.php\n*\n* @module\n*/\n/**\n* Represents a field instruction for a Table of Contents.\n*\n* The FieldInstruction class generates the TOC field code string that Word uses\n* to determine how to build the table of contents, including which headings to include,\n* formatting options, and other TOC-specific settings.\n*\n* Reference: http://officeopenxml.com/WPfieldInstructions.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"instrText\" type=\"CT_Text\"/>\n* ```\n*\n* @example\n* ```typescript\n* // Basic TOC field instruction\n* new FieldInstruction({ headingStyleRange: \"1-3\" });\n*\n* // TOC with hyperlinks and custom styles\n* new FieldInstruction({\n* hyperlink: true,\n* headingStyleRange: \"1-3\",\n* stylesWithLevels: [new StyleLevel(\"CustomStyle\", 2)],\n* });\n* ```\n*/\nvar FieldInstruction = class extends XmlComponent {\n\tconstructor(properties = {}) {\n\t\tsuper(\"w:instrText\");\n\t\t_defineProperty(this, \"properties\", void 0);\n\t\tthis.properties = properties;\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tlet instruction = \"TOC\";\n\t\tif (this.properties.captionLabel) instruction = `${instruction} \\\\a \"${this.properties.captionLabel}\"`;\n\t\tif (this.properties.entriesFromBookmark) instruction = `${instruction} \\\\b \"${this.properties.entriesFromBookmark}\"`;\n\t\tif (this.properties.captionLabelIncludingNumbers) instruction = `${instruction} \\\\c \"${this.properties.captionLabelIncludingNumbers}\"`;\n\t\tif (this.properties.sequenceAndPageNumbersSeparator) instruction = `${instruction} \\\\d \"${this.properties.sequenceAndPageNumbersSeparator}\"`;\n\t\tif (this.properties.tcFieldIdentifier) instruction = `${instruction} \\\\f \"${this.properties.tcFieldIdentifier}\"`;\n\t\tif (this.properties.hyperlink) instruction = `${instruction} \\\\h`;\n\t\tif (this.properties.tcFieldLevelRange) instruction = `${instruction} \\\\l \"${this.properties.tcFieldLevelRange}\"`;\n\t\tif (this.properties.pageNumbersEntryLevelsRange) instruction = `${instruction} \\\\n \"${this.properties.pageNumbersEntryLevelsRange}\"`;\n\t\tif (this.properties.headingStyleRange) instruction = `${instruction} \\\\o \"${this.properties.headingStyleRange}\"`;\n\t\tif (this.properties.entryAndPageNumberSeparator) instruction = `${instruction} \\\\p \"${this.properties.entryAndPageNumberSeparator}\"`;\n\t\tif (this.properties.seqFieldIdentifierForPrefix) instruction = `${instruction} \\\\s \"${this.properties.seqFieldIdentifierForPrefix}\"`;\n\t\tif (this.properties.stylesWithLevels && this.properties.stylesWithLevels.length) {\n\t\t\tconst styles = this.properties.stylesWithLevels.map((sl) => `${sl.styleName},${sl.level}`).join(\",\");\n\t\t\tinstruction = `${instruction} \\\\t \"${styles}\"`;\n\t\t}\n\t\tif (this.properties.useAppliedParagraphOutlineLevel) instruction = `${instruction} \\\\u`;\n\t\tif (this.properties.preserveTabInEntries) instruction = `${instruction} \\\\w`;\n\t\tif (this.properties.preserveNewLineInEntries) instruction = `${instruction} \\\\x`;\n\t\tif (this.properties.hideTabAndPageNumbersInWebView) instruction = `${instruction} \\\\z`;\n\t\tthis.root.push(instruction);\n\t}\n};\n// src/file/table-of-contents/sdt-content.ts\n/**\n* Structured Document Tag Content module.\n*\n* This module represents the content container for structured document tags,\n* including table of contents elements.\n*\n* Reference: http://officeopenxml.com/WPtableOfContents.php\n*\n* @module\n*/\n/**\n* Represents the content portion of a Structured Document Tag.\n*\n* The StructuredDocumentTagContent contains the actual content elements\n* (paragraphs, tables, etc.) within a structured document tag, such as\n* the paragraphs that make up a table of contents.\n*\n* Reference: http://officeopenxml.com/WPtableOfContents.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtContentBlock\">\n* <xsd:group ref=\"EG_ContentBlockContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const content = new StructuredDocumentTagContent();\n* content.addChildElement(new Paragraph(\"Content\"));\n* ```\n*/\nvar StructuredDocumentTagContent = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:sdtContent\");\n\t}\n};\n// src/file/table-of-contents/heading-entries.ts\n/**\n* The beginning of a table of contents' field: dirty or clean, as the caller set it, or else dirty unless the document\n* is given page numbers\n*/\nvar beginOf = (beginDirty) => beginDirty === void 0 ? createBeginDirtyWithoutPageNumbers() : createBegin(beginDirty);\n/** The formatted tables of contents, with what each is filled in with, or undefined when it was given its content */\nvar writtenTables = /* @__PURE__ */ new WeakMap();\n/**\n* Records a formatted table of contents, so the paragraphs in it aren't taken for headings, with what to fill it in\n* with from the headings once the body it is in is written. That is undefined when it was given its content.\n*/\nvar recordTableOfContents = (table, fillWith) => {\n\twrittenTables.set(table, fillWith);\n};\n/**\n* The ids of the bookmarks on a body's headings: the first for its first bookmarked heading, and so on. Each is taken\n* from the counter every bookmark shares, the first time it is needed, so a document packed again is written the same.\n*/\nvar HeadingBookmarkIds = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"ids\", []);\n\t}\n\tget(index) {\n\t\tvar _this$ids, _this$ids$index;\n\t\t(_this$ids$index = (_this$ids = this.ids)[index]) !== null && _this$ids$index !== void 0 || (_this$ids[index] = bookmarkUniqueNumericId());\n\t\treturn this.ids[index];\n\t}\n};\n/** The name of a formatted element, or `_attr` for its parent's attributes */\nvar nameOf$4 = (element) => typeof element === \"object\" && element !== null ? Object.keys(element)[0] : void 0;\n/** The children of a formatted element. An element with only attributes has them as its one child */\nvar childrenOf$1 = (element) => {\n\tconst name = nameOf$4(element);\n\tconst content = name === void 0 ? void 0 : element[name];\n\treturn Array.isArray(content) ? content : content === void 0 ? [] : [content];\n};\nvar childOf$2 = (element, name) => childrenOf$1(element).find((child) => nameOf$4(child) === name);\nvar attributeOf = (element, attribute) => {\n\tvar _childOf;\n\treturn (_childOf = childOf$2(element, \"_attr\")) === null || _childOf === void 0 || (_childOf = _childOf._attr) === null || _childOf === void 0 ? void 0 : _childOf[attribute];\n};\n/** An attribute such as `w:val=\"2\"` as a number. Imported XML gives it as a string */\nvar numberAttributeOf = (element, attribute) => {\n\tconst value = attributeOf(element, attribute);\n\treturn value === void 0 ? void 0 : Number(value);\n};\n/** The block-level containers of paragraphs: tables, their rows and cells, and content controls */\nvar BLOCK_CONTAINERS = /* @__PURE__ */ new Set([\n\t\"w:tbl\",\n\t\"w:tr\",\n\t\"w:tc\",\n\t\"w:sdt\",\n\t\"w:sdtContent\",\n\t\"w:customXml\"\n]);\n/**\n* The paragraphs and the tables of contents, in the order they are in the body. A table of contents isn't looked into,\n* so the paragraphs in it aren't taken for headings. Nor are paragraphs in text boxes, as in Word.\n*/\nvar blocksOf = (elements) => elements.flatMap((element) => {\n\tconst name = nameOf$4(element);\n\tif (name === \"w:p\" || writtenTables.has(element)) return [element];\n\treturn name !== void 0 && BLOCK_CONTAINERS.has(name) ? blocksOf(childrenOf$1(element)) : [];\n});\n/** The elements in a paragraph that its text is in. Deleted text, field instructions and drawings aren't */\nvar TEXT_CONTAINERS = /* @__PURE__ */ new Set([\n\t\"w:r\",\n\t\"w:hyperlink\",\n\t\"w:ins\",\n\t\"w:moveTo\",\n\t\"w:smartTag\",\n\t\"w:customXml\",\n\t\"w:sdt\",\n\t\"w:sdtContent\",\n\t\"w:fldSimple\",\n\t\"w:dir\",\n\t\"w:bdo\"\n]);\n/** The text an element in a run stands for, such as `\\t` for a tab. A page or column break isn't text */\nvar textOfRunContent = (element) => {\n\tswitch (nameOf$4(element)) {\n\t\tcase \"w:t\": return childrenOf$1(element).filter((child) => typeof child === \"string\").join(\"\");\n\t\tcase \"w:tab\": return \"\t\";\n\t\tcase \"w:br\": return [void 0, \"textWrapping\"].includes(attributeOf(element, \"w:type\")) ? \"\\n\" : \"\";\n\t\tcase \"w:cr\": return \"\\n\";\n\t\tcase \"w:noBreakHyphen\": return \"-\";\n\t\tdefault: return \"\";\n\t}\n};\n/** The text of a paragraph. Of a field, only its result is text, not its instruction */\nvar textOf$1 = (paragraph) => {\n\tconst fields = [];\n\tconst read = (element) => {\n\t\tconst name = nameOf$4(element);\n\t\tif (name !== void 0 && TEXT_CONTAINERS.has(name)) return childrenOf$1(element).map(read).join(\"\");\n\t\tif (name === \"w:fldChar\") {\n\t\t\tconst type = attributeOf(element, \"w:fldCharType\");\n\t\t\tif (type === \"begin\") fields.push(false);\n\t\t\telse if (type === \"separate\") fields[fields.length - 1] = true;\n\t\t\telse fields.pop();\n\t\t\treturn \"\";\n\t\t}\n\t\treturn fields.every(Boolean) ? textOfRunContent(element) : \"\";\n\t};\n\treturn childrenOf$1(paragraph).map(read).join(\"\");\n};\n/** The bookmarks started and ended in an element, in order */\nvar bookmarkMarksOf = (element) => {\n\tconst name = nameOf$4(element);\n\tif (name === \"w:bookmarkStart\") return [{\n\t\tstart: true,\n\t\tid: attributeOf(element, \"w:id\"),\n\t\tname: attributeOf(element, \"w:name\")\n\t}];\n\tif (name === \"w:bookmarkEnd\") return [{\n\t\tstart: false,\n\t\tid: attributeOf(element, \"w:id\")\n\t}];\n\treturn name === void 0 || name === \"_attr\" ? [] : childrenOf$1(element).flatMap(bookmarkMarksOf);\n};\n/**\n* The names of the bookmarks each paragraph is in, for the `\\b` switch: those open where it starts, followed through the\n* body, and those that start in it.\n*/\nvar bookmarksOf = (paragraphs) => {\n\tconst open = /* @__PURE__ */ new Map();\n\treturn paragraphs.map((paragraph) => {\n\t\tconst marks = bookmarkMarksOf(paragraph);\n\t\tconst names = /* @__PURE__ */ new Set([...open.values(), ...marks.flatMap((mark) => mark.start ? [mark.name] : [])]);\n\t\tfor (const mark of marks) if (mark.start) open.set(mark.id, mark.name);\n\t\telse open.delete(mark.id);\n\t\treturn names;\n\t});\n};\n/** The details of each paragraph that could be a heading. The bookmarks it is in are only followed when needed */\nvar paragraphDetailsOf = (paragraphs, followBookmarks) => {\n\tconst bookmarks = followBookmarks ? bookmarksOf(paragraphs) : [];\n\treturn paragraphs.map((element, index) => {\n\t\tvar _bookmarks$index;\n\t\tconst properties = childOf$2(element, \"w:pPr\");\n\t\treturn {\n\t\t\telement,\n\t\t\tstyleId: attributeOf(childOf$2(properties, \"w:pStyle\"), \"w:val\"),\n\t\t\toutlineLevel: numberAttributeOf(childOf$2(properties, \"w:outlineLvl\"), \"w:val\"),\n\t\t\ttext: textOf$1(element),\n\t\t\tbookmarks: (_bookmarks$index = bookmarks[index]) !== null && _bookmarks$index !== void 0 ? _bookmarks$index : /* @__PURE__ */ new Set()\n\t\t};\n\t});\n};\n/** The document's paragraph styles, by id, read from the styles as they are written */\nvar stylesOf = (context) => {\n\tvar _context$file;\n\tconst styles = (_context$file = context.file) === null || _context$file === void 0 || (_context$file = _context$file.Styles) === null || _context$file === void 0 ? void 0 : _context$file.prepForXml(context);\n\treturn new Map(childrenOf$1(styles).filter((style) => nameOf$4(style) === \"w:style\" && [\"paragraph\", void 0].includes(attributeOf(style, \"w:type\"))).map((style) => [attributeOf(style, \"w:styleId\"), {\n\t\tname: attributeOf(childOf$2(style, \"w:name\"), \"w:val\"),\n\t\tbasedOn: attributeOf(childOf$2(style, \"w:basedOn\"), \"w:val\"),\n\t\toutlineLevel: numberAttributeOf(childOf$2(childOf$2(style, \"w:pPr\"), \"w:outlineLvl\"), \"w:val\")\n\t}]));\n};\n/** A range such as `1-3` */\nvar parseRange = (range) => {\n\tconst match = /^\\s*(\\d+)\\s*-\\s*(\\d+)\\s*$/.exec(range);\n\treturn match ? [Number(match[1]), Number(match[2])] : void 0;\n};\nvar isWithin = (level, [from, to]) => level >= from && level <= to;\n/** The level of a built-in heading style, Heading 1 to Heading 9, by its name, or by its id when it has no name */\nvar headingLevelOf = (styleId, styles) => {\n\tvar _styles$get$name, _styles$get;\n\tif (styleId === void 0) return;\n\tconst match = /^heading ?([1-9])$/i.exec((_styles$get$name = (_styles$get = styles.get(styleId)) === null || _styles$get === void 0 ? void 0 : _styles$get.name) !== null && _styles$get$name !== void 0 ? _styles$get$name : styleId);\n\treturn match ? Number(match[1]) : void 0;\n};\n/**\n* A style's outline level, from 0: its own, or else the one of the style it is based on. A built-in heading style has\n* its heading's. Following the styles it is based on stops after as many as there are, in case they loop.\n*/\nvar styleOutlineLevelOf = (styleId, styles, depth = 0) => {\n\tvar _style$outlineLevel;\n\tif (styleId === void 0 || depth > styles.size) return;\n\tconst style = styles.get(styleId);\n\tconst heading = headingLevelOf(styleId, styles);\n\treturn (_style$outlineLevel = style === null || style === void 0 ? void 0 : style.outlineLevel) !== null && _style$outlineLevel !== void 0 ? _style$outlineLevel : heading === void 0 ? styleOutlineLevelOf(style === null || style === void 0 ? void 0 : style.basedOn, styles, depth + 1) : heading - 1;\n};\n/**\n* Reads the heading level of the document's paragraphs, as the `\\s` switch of a SEQ field follows it: the level of a\n* paragraph in a built-in heading style, Heading 1 to Heading 9. A paragraph whose outline level is another, or that has\n* one without a heading style, is `\"unclear\"`, as which of the two Word follows hasn't been checked. Other paragraphs\n* are undefined.\n*/\nvar headingLevels = (context) => {\n\tconst styles = stylesOf(context);\n\treturn (paragraph) => {\n\t\tconst properties = childOf$2(paragraph, \"w:pPr\");\n\t\tconst styleId = attributeOf(childOf$2(properties, \"w:pStyle\"), \"w:val\");\n\t\tconst heading = headingLevelOf(styleId, styles);\n\t\tconst outlineLevel = outlineLevelOf({\n\t\t\tstyleId,\n\t\t\toutlineLevel: numberAttributeOf(childOf$2(properties, \"w:outlineLvl\"), \"w:val\")\n\t\t}, styles);\n\t\tconst outline = outlineLevel === void 0 || outlineLevel >= 9 ? void 0 : outlineLevel + 1;\n\t\tif (heading !== void 0 && (outline === void 0 || outline === heading)) return heading;\n\t\treturn outline === void 0 ? void 0 : \"unclear\";\n\t};\n};\n/** A paragraph's outline level, from 0: its own, or else its style's */\nvar outlineLevelOf = (paragraph, styles) => {\n\tvar _paragraph$outlineLev;\n\treturn (_paragraph$outlineLev = paragraph.outlineLevel) !== null && _paragraph$outlineLev !== void 0 ? _paragraph$outlineLev : styleOutlineLevelOf(paragraph.styleId, styles);\n};\n/** The level a table of contents gives a paragraph, or undefined when it doesn't include it */\nvar levelIn = (properties, paragraph, styles) => {\n\tvar _styles$get2;\n\tconst { entriesFromBookmark, headingStyleRange, stylesWithLevels = [], useAppliedParagraphOutlineLevel } = properties;\n\tif (paragraph.text.trim() === \"\" || entriesFromBookmark && !paragraph.bookmarks.has(entriesFromBookmark)) return;\n\tconst names = [paragraph.styleId, paragraph.styleId === void 0 ? void 0 : (_styles$get2 = styles.get(paragraph.styleId)) === null || _styles$get2 === void 0 ? void 0 : _styles$get2.name].filter((name) => name !== void 0).map((name) => name.toLowerCase());\n\tconst listed = stylesWithLevels.find((style) => names.includes(style.styleName.toLowerCase()));\n\tif (listed) return listed.level;\n\tconst namesItsEntries = Boolean(headingStyleRange) || stylesWithLevels.length > 0 || Boolean(useAppliedParagraphOutlineLevel) || Boolean(properties.tcFieldIdentifier) || Boolean(properties.tcFieldLevelRange) || Boolean(properties.captionLabel) || Boolean(properties.captionLabelIncludingNumbers);\n\tconst headingRange = headingStyleRange ? parseRange(headingStyleRange) : namesItsEntries ? void 0 : [1, 9];\n\tconst heading = headingLevelOf(paragraph.styleId, styles);\n\tif (headingRange && heading !== void 0 && isWithin(heading, headingRange)) return heading;\n\tconst outlineLevel = useAppliedParagraphOutlineLevel ? outlineLevelOf(paragraph, styles) : void 0;\n\treturn outlineLevel !== void 0 && isWithin(outlineLevel + 1, headingRange !== null && headingRange !== void 0 ? headingRange : [1, 9]) ? outlineLevel + 1 : void 0;\n};\n/** The runs of an entry's title. Tabs and line breaks are kept only when the table of contents keeps them (\\w and \\x) */\nvar titleRunsOf = (title, properties) => {\n\tconst text = properties.preserveTabInEntries ? title : title.replace(/\\t/g, \" \");\n\treturn (properties.preserveNewLineInEntries ? text.split(\"\\n\") : [text.replace(/\\n/g, \" \")]).map((line, index) => new TextRun({\n\t\tbreak: index > 0 ? 1 : void 0,\n\t\tchildren: line.split(\"\t\").flatMap((part, partIndex) => [...partIndex > 0 ? [new Tab()] : [], ...part === \"\" ? [] : [part]])\n\t}));\n};\n/**\n* The runs of a heading's list number at the start of its entry: the number and a tab, or the number and a space, which\n* Word writes after a number its list follows with a space or with nothing\n*/\nvar numberRunsOf = ({ text, separator }) => separator === \"tab\" ? [new TextRun(text), new TextRun({ children: [new Tab()] })] : [new TextRun(`${text} `)];\n/**\n* The left tab stop after a heading's number in its entry, as Word places it, in twips: past the number, as wide as Word\n* measures it, by 240 twips, and 240 more for each level of the table below the first, at the next multiple of 240 up to\n* 1920, and where it falls past that. Word goes by its Normal template's 12 points here, not the document's font, size or\n* indents (`scripts/layout-probes/word-toc-numbers.ts`)\n*/\nvar numberTabStopOf = (level, width) => {\n\tconst end = 240 * (level - 1) + width + 240;\n\treturn end <= 1920 ? Math.ceil(end / 240) * 240 : Math.round(end);\n};\n/**\n* The paragraph style of the entries at a level: the built-in TOC style, found by its name, \"toc 1\" to \"toc 9\", such as\n* a template's in another language, or else docx's own, `TOC1` to `TOC9`, which indent the levels as Word's do.\n*/\nvar entryStyleOf = (level, styles) => {\n\tvar _find$, _find;\n\treturn (_find$ = (_find = [...styles].find(([, style]) => {\n\t\tvar _style$name;\n\t\treturn ((_style$name = style.name) === null || _style$name === void 0 ? void 0 : _style$name.toLowerCase()) === `toc ${level}`;\n\t})) === null || _find === void 0 ? void 0 : _find[0]) !== null && _find$ !== void 0 ? _find$ : `TOC${level}`;\n};\n/** The formatted content of a table of contents with its entries */\nvar contentOf = ({ properties, beginDirty, textWidth, tabLeader }, entries, styles, context) => {\n\tvar _parseRange;\n\tconst withoutPageNumbers = properties.pageNumbersEntryLevelsRange ? (_parseRange = parseRange(properties.pageNumbersEntryLevelsRange)) !== null && _parseRange !== void 0 ? _parseRange : [1, 9] : void 0;\n\tconst content = new StructuredDocumentTagContent();\n\tentries.forEach((entry, index) => {\n\t\tvar _entry$listNumber;\n\t\tconst hasPageNumber = withoutPageNumbers === void 0 || !isWithin(entry.level, withoutPageNumbers);\n\t\tconst children = [\n\t\t\t...entry.listNumber ? numberRunsOf(entry.listNumber) : [],\n\t\t\t...titleRunsOf(entry.title, properties),\n\t\t\t...hasPageNumber ? [new TextRun({ children: [properties.entryAndPageNumberSeparator || new Tab()] }), new PageReference(entry.bookmark, { hyperlink: properties.hyperlink })] : []\n\t\t];\n\t\tcontent.addChildElement(new Paragraph({\n\t\t\tstyle: entryStyleOf(entry.level, styles),\n\t\t\ttabStops: [...((_entry$listNumber = entry.listNumber) === null || _entry$listNumber === void 0 ? void 0 : _entry$listNumber.separator) === \"tab\" ? [{\n\t\t\t\ttype: \"left\",\n\t\t\t\tposition: numberTabStopOf(entry.level, entry.listNumber.width)\n\t\t\t}] : [], {\n\t\t\t\ttype: \"right\",\n\t\t\t\tposition: textWidth,\n\t\t\t\tleader: tabLeader\n\t\t\t}],\n\t\t\tchildren: [...index === 0 ? [new Run({ children: [\n\t\t\t\tbeginOf(beginDirty),\n\t\t\t\tnew FieldInstruction(properties),\n\t\t\t\tcreateSeparate()\n\t\t\t] })] : [], ...properties.hyperlink ? [new InternalHyperlink({\n\t\t\t\tanchor: entry.bookmark,\n\t\t\t\tchildren\n\t\t\t})] : children]\n\t\t}));\n\t});\n\tcontent.addChildElement(new Paragraph({ children: [new Run({ children: [createEnd()] })] }));\n\treturn content.prepForXml(context);\n};\n/** Puts a bookmark around the content of a formatted paragraph */\nvar bookmark = (paragraph, name, id, context) => {\n\tconst children = childrenOf$1(paragraph);\n\tconst start = children.findIndex((child) => nameOf$4(child) === \"w:pPr\") + 1;\n\tparagraph[\"w:p\"] = [\n\t\t...children.slice(0, start),\n\t\tnew BookmarkStart(name, id).prepForXml(context),\n\t\t...children.slice(start),\n\t\tnew BookmarkEnd(id).prepForXml(context)\n\t];\n};\n/**\n* Fills in the tables of contents in a formatted body from its headings, and bookmarks the headings they list. A\n* table of contents that doesn't list any heading is left empty, for Word to fill in. Given how to work out the headings'\n* list numbers, the entry of a numbered heading starts with its number, once the headings are bookmarked.\n*/\nvar fillTablesOfContents = (body, context, bookmarkIds, listNumbersOf) => {\n\tconst blocks = blocksOf(childrenOf$1(body));\n\tconst tables = blocks.flatMap((block) => {\n\t\tconst options = writtenTables.get(block);\n\t\treturn options ? [[block, options]] : [];\n\t});\n\tif (tables.length === 0) return;\n\tconst styles = stylesOf(context);\n\tconst followBookmarks = tables.some(([, { properties }]) => Boolean(properties.entriesFromBookmark));\n\tconst headings = paragraphDetailsOf(blocks.filter((block) => nameOf$4(block) === \"w:p\"), followBookmarks).map((paragraph) => ({\n\t\tparagraph,\n\t\tlevels: tables.map(([, { properties }]) => levelIn(properties, paragraph, styles))\n\t})).filter(({ levels }) => levels.some((level) => level !== void 0)).map((heading, index) => _objectSpread2(_objectSpread2({}, heading), {}, { id: bookmarkIds.get(index) }));\n\tfor (const { paragraph, id } of headings) bookmark(paragraph.element, `_Toc${id}`, id, context);\n\tconst listNumbers = headings.length > 0 ? listNumbersOf === null || listNumbersOf === void 0 ? void 0 : listNumbersOf(body) : void 0;\n\ttables.forEach(([table, options], index) => {\n\t\tconst entries = headings.flatMap(({ paragraph, levels, id }) => {\n\t\t\tconst level = levels[index];\n\t\t\tconst listNumber = listNumbers === null || listNumbers === void 0 ? void 0 : listNumbers.get(`_Toc${id}`);\n\t\t\treturn level === void 0 ? [] : [_objectSpread2({\n\t\t\t\ttitle: paragraph.text,\n\t\t\t\tlevel,\n\t\t\t\tbookmark: `_Toc${id}`\n\t\t\t}, listNumber ? { listNumber } : {})];\n\t\t});\n\t\tif (entries.length === 0) return;\n\t\ttable[\"w:sdt\"] = childrenOf$1(table).map((child) => nameOf$4(child) === \"w:sdtContent\" ? contentOf(options, entries, styles, context) : child);\n\t});\n};\n// src/file/document/body/sequence-numbers.ts\n/**\n* Caption numbers written into the SEQ fields of a document, such as the 2 of \"Figure 2\", when the document is given page\n* numbers.\n*\n* A SEQ field (`SequentialIdentifier`) shows how many SEQ fields of its identifier, such as \"Figure\", there are up to and\n* including it, so the number doesn't depend on how the pages are laid out. Its switches change the count: `\\r 5` starts\n* it again from 5, `\\c` repeats the number of the one before, `\\s 1` starts it again after each Heading 1, `\\h` hides the\n* number, and `\\* ROMAN` writes it in roman numerals. `docx` writes SEQ fields dirty, for Word to number when it opens the\n* document, which makes Word ask to update the fields. When the document is given page numbers, each is written clean\n* with its number, counted as Word counts it. What Word does was read from its PDF of `scripts/layout-probes/word-seq.ts`.\n*\n* Word counts the SEQ fields of the body, those in text boxes and hidden text too, in order, and counts an identifier in\n* any capitals, or in quotes, as the same one. It writes the SEQ fields of headers, footers, footnotes and endnotes as an\n* error, \"Error! Main Document Only.\", and doesn't count them with the body's.\n*\n* Where Word's count isn't known, the field is left blank rather than given a number that could be wrong: a switch it\n* doesn't follow, a SEQ field in deleted text, and every SEQ field of an identifier that also has SEQ fields in a comment.\n* The fields of its identifier after one whose number isn't known are left blank too, until one starts the count again\n* with `\\r`. A number in a format not followed is left blank, but the count goes on.\n*\n* @module\n*/\nvar IDENTIFIER = new RegExp(\"^\\\\p{L}[\\\\p{L}\\\\p{N}_]*$\", \"u\");\n/** Reads the switches of a SEQ field, and a bookmark before them, or undefined when one of them isn't followed */\nvar sequenceOf = (switches) => {\n\tvar _step, _format;\n\tlet step;\n\tlet hidden = false;\n\tlet format;\n\tlet caseFormat = false;\n\tlet picture = false;\n\tfor (let index = 0; index < switches.length; index++) {\n\t\tvar _switches, _next;\n\t\tconst name = switches[index];\n\t\tconst argument = (_switches = switches[index + 1]) !== null && _switches !== void 0 ? _switches : \"\";\n\t\tlet next;\n\t\tif (index === 0 && !name.startsWith(\"\\\\\")) next = { type: \"bookmark\" };\n\t\telse if (name === \"\\\\c\" || name === \"\\\\n\") next = { type: name === \"\\\\c\" ? \"repeat\" : \"next\" };\n\t\telse if ((name === \"\\\\r\" || name === \"\\\\s\") && /^\\d+$/.test(argument)) {\n\t\t\tindex++;\n\t\t\tnext = name === \"\\\\r\" ? {\n\t\t\t\ttype: \"reset\",\n\t\t\t\tto: Number(argument)\n\t\t\t} : {\n\t\t\t\ttype: \"heading\",\n\t\t\t\tlevel: Number(argument)\n\t\t\t};\n\t\t} else if (name === \"\\\\h\") hidden = true;\n\t\telse if (name === \"\\\\#\" && index + 1 < switches.length) {\n\t\t\tindex++;\n\t\t\tpicture = true;\n\t\t} else if (name === \"\\\\*\" && index + 1 < switches.length) {\n\t\t\tconst value = switches[++index];\n\t\t\tif (CASE_FORMATS.has(value.toLowerCase())) caseFormat = true;\n\t\t\telse if (!PLAIN_FORMATS.has(value.toLowerCase())) {\n\t\t\t\tif (format !== void 0) return;\n\t\t\t\tformat = value;\n\t\t\t}\n\t\t} else return;\n\t\tif (next && step) return;\n\t\tstep = (_next = next) !== null && _next !== void 0 ? _next : step;\n\t}\n\tif ((step === null || step === void 0 ? void 0 : step.type) === \"bookmark\" && switches.length > 1) return;\n\tconst written = !picture && !(caseFormat && format !== void 0 && format.toLowerCase() !== \"arabic\");\n\treturn {\n\t\tstep: (_step = step) !== null && _step !== void 0 ? _step : { type: \"next\" },\n\t\thidden: hidden && format === void 0,\n\t\tformat: written ? (_format = format) !== null && _format !== void 0 ? _format : \"ARABIC\" : \"\"\n\t};\n};\n/** Reads a SEQ field's instruction, or undefined when the field isn't a SEQ field */\nvar sequenceFieldOf = (instruction) => {\n\tvar _match$1$match;\n\tconst match = new RegExp(\"^\\\\s*SEQ\\\\b(.*)$\", \"is\").exec(instruction);\n\tif (!match) return;\n\tconst [written, ...switches] = (_match$1$match = match[1].match(/\"[^\"]*\"|\\S+/g)) !== null && _match$1$match !== void 0 ? _match$1$match : [];\n\tif (written === void 0) return {};\n\tconst identifier = written.replace(/^\"(.*)\"$/, \"$1\");\n\treturn IDENTIFIER.test(identifier) ? {\n\t\tidentifier,\n\t\tsequence: sequenceOf(switches)\n\t} : { identifier };\n};\n/** Whether a field's instruction is that of a SEQ field */\nvar isSequenceField = (instruction) => sequenceFieldOf(instruction) !== void 0;\n/** The identifier, in small letters, of each SEQ field in the formatted elements */\nvar identifiersIn = (element) => {\n\tif (typeof element !== \"object\" || element === null) return [];\n\tif (Array.isArray(element)) return element.flatMap(identifiersIn);\n\treturn Object.entries(element).flatMap(([name, content]) => {\n\t\treturn [...(name === \"w:instrText\" && Array.isArray(content) ? content : name === \"_attr\" ? [content[\"w:instr\"]] : []).flatMap((instruction) => {\n\t\t\tconst field = typeof instruction === \"string\" ? sequenceFieldOf(instruction) : void 0;\n\t\t\treturn (field === null || field === void 0 ? void 0 : field.identifier) === void 0 ? [] : [field.identifier.toLowerCase()];\n\t\t}), ...identifiersIn(content)];\n\t});\n};\n/** The identifiers, in small letters, of the SEQ fields in the document's comments, whose count in Word isn't known */\nvar identifiersInCommentsOf = (context) => {\n\tvar _context$file;\n\tconst comments = (_context$file = context.file) === null || _context$file === void 0 ? void 0 : _context$file.Comments;\n\tif (!comments) return /* @__PURE__ */ new Set();\n\tconst wrapper = {\n\t\tView: comments,\n\t\tRelationships: comments.Relationships\n\t};\n\treturn new Set(identifiersIn(comments.prepForXml(_objectSpread2(_objectSpread2({}, context), {}, {\n\t\tviewWrapper: wrapper,\n\t\tstack: []\n\t}))));\n};\n/** Counts the SEQ fields of a document's body, in order, as Word counts them */\nvar sequenceNumbering = (context) => {\n\tconst levelOf = headingLevels(context);\n\tconst numbers = /* @__PURE__ */ new Map();\n\tconst counted = /* @__PURE__ */ new Map();\n\tconst headingsAt = [];\n\tlet unclearAt = -1;\n\tlet paragraph = -1;\n\tlet unknown;\n\t/**\n\t* The number of a field that starts the count again after headings of a level or a higher one (`\\s`): the number of\n\t* fields of its identifier since the last of them, with it, as Word counts them. It isn't known when a paragraph\n\t* whose level isn't clear came after that heading, or a field since it whose number didn't follow as the next one's\n\t*/\n\tconst afterHeading = (key, level) => {\n\t\tvar _counted$get;\n\t\tconst headingAt = Math.max(-1, ...headingsAt.slice(1, level + 1).filter((at) => at !== void 0));\n\t\tconst since = ((_counted$get = counted.get(key)) !== null && _counted$get !== void 0 ? _counted$get : []).filter((field) => field.paragraph >= headingAt);\n\t\tconst followed = since.every(({ step }) => (step === null || step === void 0 ? void 0 : step.type) === \"next\" || (step === null || step === void 0 ? void 0 : step.type) === \"heading\" && step.level === level);\n\t\treturn unclearAt > headingAt || !followed ? void 0 : since.length + 1;\n\t};\n\treturn {\n\t\tstartParagraph: (element) => {\n\t\t\tparagraph++;\n\t\t\tconst level = levelOf(element);\n\t\t\tif (level === \"unclear\") unclearAt = paragraph;\n\t\t\telse if (level !== void 0) headingsAt[level] = paragraph;\n\t\t},\n\t\tnumberOf: (instruction, place) => {\n\t\t\tvar _unknown, _counted$get2, _numberWriterOf;\n\t\t\tconst { identifier, sequence } = sequenceFieldOf(instruction);\n\t\t\tif (identifier === void 0 || place === \"fallback\") return;\n\t\t\t(_unknown = unknown) !== null && _unknown !== void 0 || (unknown = identifiersInCommentsOf(context));\n\t\t\tconst key = identifier.toLowerCase();\n\t\t\tif ((sequence === null || sequence === void 0 ? void 0 : sequence.step.type) === \"bookmark\" && place === \"counted\" && !unknown.has(key)) return;\n\t\t\tconst before = numbers.has(key) ? numbers.get(key) : 0;\n\t\t\tconst step = unknown.has(key) || place === \"deleted\" ? void 0 : sequence === null || sequence === void 0 ? void 0 : sequence.step;\n\t\t\tconst value = (step === null || step === void 0 ? void 0 : step.type) === \"reset\" ? step.to : (step === null || step === void 0 ? void 0 : step.type) === \"repeat\" ? before : (step === null || step === void 0 ? void 0 : step.type) === \"heading\" ? afterHeading(key, step.level) : (step === null || step === void 0 ? void 0 : step.type) === \"next\" && before !== void 0 ? before + 1 : void 0;\n\t\t\tnumbers.set(key, value);\n\t\t\tcounted.set(key, [...(_counted$get2 = counted.get(key)) !== null && _counted$get2 !== void 0 ? _counted$get2 : [], _objectSpread2({ paragraph }, value === void 0 ? {} : { step })]);\n\t\t\treturn value === void 0 || sequence === void 0 ? void 0 : sequence.hidden ? \"\" : (_numberWriterOf = numberWriterOf(sequence.format)) === null || _numberWriterOf === void 0 ? void 0 : _numberWriterOf(value);\n\t\t}\n\t};\n};\n// src/file/document/body/page-numbers.ts\n/**\n* Page numbers written into the fields of a document that show them, when it is written, from an estimate of its pages.\n*\n* A page reference is a PAGEREF field, such as the page number of an entry in a table of contents, and the numbers of\n* pages of the document and of a section are NUMPAGES and SECTIONPAGES fields. Word works their results out when it\n* updates the fields, or lays the pages out, and until then, and in applications that don't, the fields show the results\n* they were written with. `docx` doesn't lay out pages, so it writes the results empty, unless the document is given a\n* {@link PageNumberEstimator}, such as `estimatePageNumbers` from `docx/layout`. Then, once the body is written, each of\n* those fields in the body, and then in the headers and footers, is given the number the estimator worked out.\n*\n* Page references and tables of contents are written dirty, so Word updates them when it opens the document, and asks\n* \"This document contains fields that may refer to other files. Do you want to update the fields in this document?\".\n* When the document is given page numbers, they are written clean, so Word shows them as they are and doesn't ask. A\n* page number the estimator didn't work out is left blank, until the fields are updated. So are SEQ fields, the numbers\n* of captions, which are given their numbers then too.\n*\n* @module\n*/\nvar nameOf$3 = (element) => {\n\tconst name = typeof element === \"object\" && element !== null && !Array.isArray(element) ? Object.keys(element)[0] : void 0;\n\treturn name === \"_attr\" ? void 0 : name;\n};\nvar textElement = (text) => ({ \"w:t\": [{ _attr: { \"xml:space\": \"preserve\" } }, text] });\n/** The elements docx formats to write a document */\nvar FORMATTED = {\n\tnameOf: nameOf$3,\n\tcontentOf: (element) => {\n\t\tconst content = element[nameOf$3(element)];\n\t\treturn Array.isArray(content) ? content : void 0;\n\t},\n\tattributeOf: (element, attribute) => {\n\t\tvar _holder$_attr;\n\t\tconst content = element[nameOf$3(element)];\n\t\tconst holder = Array.isArray(content) ? content.find((child) => typeof child === \"object\" && child !== null && \"_attr\" in child) : content;\n\t\treturn holder === null || holder === void 0 || (_holder$_attr = holder._attr) === null || _holder$_attr === void 0 ? void 0 : _holder$_attr[attribute];\n\t},\n\ttextOf: (element) => FORMATTED.contentOf(element).filter((part) => typeof part === \"string\").join(\"\"),\n\ttextElement,\n\twriteClean: (begin) => {\n\t\tif (isDirtyWithoutPageNumbers(begin)) {\n\t\t\tconst attributes = begin[\"w:fldChar\"]._attr;\n\t\t\tbegin[\"w:fldChar\"] = { _attr: Object.fromEntries(Object.entries(attributes).filter(([key]) => key !== \"w:dirty\")) };\n\t\t}\n\t},\n\tsetSimpleFieldResult: (element, text) => {\n\t\tconst content = element[\"w:fldSimple\"];\n\t\telement[\"w:fldSimple\"] = [...(Array.isArray(content) ? content : [content]).filter((child) => typeof child === \"object\" && child !== null && \"_attr\" in child), { \"w:r\": [textElement(text)] }];\n\t}\n};\n/** The estimate of each document's pages, and the numbers of pages its headers and footers show, once its body is written */\nvar estimates = /* @__PURE__ */ new WeakMap();\n/**\n* Writes the numbers of the SEQ fields of a formatted body into them, counted as Word counts them (see\n* {@link sequenceNumbering}), and writes them clean, whether or not their numbers were worked out. It is done after its\n* tables of contents are filled in from its headings, as Word leaves a heading's SEQ number out of its entry.\n*/\nvar fillSequenceNumbers = (body, context) => {\n\tconst { startParagraph, numberOf } = sequenceNumbering(context);\n\tfillSequenceFields(FORMATTED, body, {\n\t\tbeforeParagraph: (paragraph) => startParagraph(paragraph),\n\t\tresultOf: (instruction, within) => isSequenceField(instruction) ? numberOf(instruction, within) : void 0\n\t});\n};\n/**\n* Writes the page numbers the estimator works out into the fields of a formatted body that show them: the PAGEREF fields\n* in its tables of contents and elsewhere, those with `\\p` and in number formats of their own, and its NUMPAGES and\n* SECTIONPAGES fields. A field whose number the estimator didn't work out is left as it is. Page references and tables\n* of contents are written clean, whether or not their numbers were worked out. The estimate is kept for the document's\n* headers and footers.\n*/\nvar fillPageNumbers = (body, context, estimator) => {\n\tconst estimate = estimator(body, context);\n\tconst partPageCounts = fillBodyFields(FORMATTED, body, estimate, { blank: false });\n\tif (context.file) estimates.set(context.file, {\n\t\testimate,\n\t\tpartPageCounts\n\t});\n};\n/**\n* Writes the page numbers worked out for the document a header, footer, footnote, endnote or comment is in into the\n* fields of the formatted part that show them, once the document's body is written. Its page references and SEQ fields\n* are written clean, and its SEQ fields are left blank: Word writes them as an error, \"Error! Main Document Only.\".\n*\n* @param part - The formatted part, if it has anything to write\n* @param context - The context it was formatted in, with the document it is in\n* @param referenceId - The number of the relationship to a header or footer. The SECTIONPAGES fields of the other parts\n* are left as they are\n*/\nvar fillPartPageNumbers = (part, context, referenceId) => {\n\tconst written = context.file && estimates.get(context.file);\n\tif (!part || !written) return;\n\tconst sectionPageCount = referenceId === void 0 ? void 0 : written.partPageCounts.get(`rId${referenceId}`);\n\tconst notes = \"w:footnotes\" in part || \"w:endnotes\" in part;\n\tfillPartFields(FORMATTED, part, written.estimate, {\n\t\tblank: false,\n\t\tsectionPageCount,\n\t\tnotes\n\t});\n};\n// src/file/relationships/attributes.ts\n/**\n* Attributes for the Relationships element.\n*\n* Defines the XML namespace for the relationships part.\n*\n* @example\n* ```typescript\n* new RelationshipsAttributes({\n* xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\"\n* });\n* ```\n*/\nvar RelationshipsAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { xmlns: \"xmlns\" });\n\t}\n};\n// src/file/relationships/relationships.ts\n/**\n* Relationships module for Open Packaging Conventions.\n*\n* This module provides support for managing relationships between\n* parts in an OPC package (DOCX file).\n*\n* Reference: http://officeopenxml.com/anatomyofOOXML.php\n*\n* @module\n*/\n/**\n* Represents a collection of relationships in an OPC package.\n*\n* Relationships define connections between package parts, such as\n* linking the main document to its headers, footers, images, etc.\n*\n* Reference: http://officeopenxml.com/anatomyofOOXML.php\n*\n* @example\n* ```typescript\n* const relationships = new Relationships();\n* relationships.addRelationship(\n* 1,\n* \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n* \"media/image1.png\"\n* );\n* ```\n*/\nvar Relationships = class Relationships extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"Relationships\");\n\t\tthis.root.push(new RelationshipsAttributes({ xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\" }));\n\t}\n\t/**\n\t* Creates a new relationship to another part in the package.\n\t*\n\t* @param id - Unique identifier for this relationship (will be prefixed with \"rId\")\n\t* @param type - Relationship type URI (e.g., image, header, hyperlink)\n\t* @param target - Path to the target part\n\t* @param targetMode - Optional mode indicating if target is external\n\t*/\n\taddRelationship(id, type, target, targetMode) {\n\t\tthis.root.push(createRelationship(`rId${id}`, type, target, targetMode));\n\t}\n\t/**\n\t* Creates a copy of the relationships given. Relationships added to the copy aren't added to them, so the compiler\n\t* adds the ones it writes for a part, such as to its images, to a copy, and packing a document again doesn't add\n\t* them a second time.\n\t*\n\t* Static, as `IContext` is public and has `Relationships`, so a new instance member would change the public API.\n\t*\n\t* @param relationships - The relationships to copy\n\t*/\n\tstatic copy(relationships) {\n\t\tconst copy = new Relationships();\n\t\tcopy.root.push(...relationships.root.slice(1));\n\t\treturn copy;\n\t}\n\t/**\n\t* Gets the count of relationships in this collection.\n\t* Excludes the attributes element from the count.\n\t*/\n\tget RelationshipCount() {\n\t\treturn this.root.length - 1;\n\t}\n};\n// src/file/paragraph/run/comment-run.ts\n/**\n* Comment module for WordprocessingML documents.\n*\n* This module provides support for comments (annotations) in documents. Comments\n* consist of comment ranges (start/end markers), comment references, and the\n* actual comment content.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* @internal\n*/\nvar CommentAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"w:id\",\n\t\t\tinitials: \"w:initials\",\n\t\t\tauthor: \"w:author\",\n\t\t\tdate: \"w:date\"\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar CommentRangeAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args2) {\n\t\tsuper(..._args2);\n\t\t_defineProperty(this, \"xmlKeys\", { id: \"w:id\" });\n\t}\n};\n/**\n* @internal\n*/\nvar RootCommentsAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args3) {\n\t\tsuper(..._args3);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\t\"xmlns:wpc\": \"xmlns:wpc\",\n\t\t\t\"xmlns:cx\": \"xmlns:cx\",\n\t\t\t\"xmlns:cx1\": \"xmlns:cx1\",\n\t\t\t\"xmlns:cx2\": \"xmlns:cx2\",\n\t\t\t\"xmlns:cx3\": \"xmlns:cx3\",\n\t\t\t\"xmlns:cx4\": \"xmlns:cx4\",\n\t\t\t\"xmlns:cx5\": \"xmlns:cx5\",\n\t\t\t\"xmlns:cx6\": \"xmlns:cx6\",\n\t\t\t\"xmlns:cx7\": \"xmlns:cx7\",\n\t\t\t\"xmlns:cx8\": \"xmlns:cx8\",\n\t\t\t\"xmlns:mc\": \"xmlns:mc\",\n\t\t\t\"xmlns:aink\": \"xmlns:aink\",\n\t\t\t\"xmlns:am3d\": \"xmlns:am3d\",\n\t\t\t\"xmlns:o\": \"xmlns:o\",\n\t\t\t\"xmlns:r\": \"xmlns:r\",\n\t\t\t\"xmlns:m\": \"xmlns:m\",\n\t\t\t\"xmlns:v\": \"xmlns:v\",\n\t\t\t\"xmlns:wp14\": \"xmlns:wp14\",\n\t\t\t\"xmlns:wp\": \"xmlns:wp\",\n\t\t\t\"xmlns:w10\": \"xmlns:w10\",\n\t\t\t\"xmlns:w\": \"xmlns:w\",\n\t\t\t\"xmlns:w14\": \"xmlns:w14\",\n\t\t\t\"xmlns:w15\": \"xmlns:w15\",\n\t\t\t\"xmlns:w16cex\": \"xmlns:w16cex\",\n\t\t\t\"xmlns:w16cid\": \"xmlns:w16cid\",\n\t\t\t\"xmlns:w16\": \"xmlns:w16\",\n\t\t\t\"xmlns:w16sdtdh\": \"xmlns:w16sdtdh\",\n\t\t\t\"xmlns:w16se\": \"xmlns:w16se\",\n\t\t\t\"xmlns:wpg\": \"xmlns:wpg\",\n\t\t\t\"xmlns:wpi\": \"xmlns:wpi\",\n\t\t\t\"xmlns:wne\": \"xmlns:wne\",\n\t\t\t\"xmlns:wps\": \"xmlns:wps\",\n\t\t\t\"mc:Ignorable\": \"mc:Ignorable\"\n\t\t});\n\t}\n};\n/**\n* Represents the start of a comment range in a WordprocessingML document.\n*\n* Marks the beginning of a region of text that is associated with a comment.\n* Must be paired with a CommentRangeEnd with the same ID.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_MarkupRange\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new CommentRangeStart(0);\n* ```\n*/\nvar CommentRangeStart = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:commentRangeStart\");\n\t\tthis.root.push(new CommentRangeAttributes({ id }));\n\t}\n};\n/**\n* Represents the end of a comment range in a WordprocessingML document.\n*\n* Marks the end of a region of text that is associated with a comment.\n* Must be paired with a CommentRangeStart with the same ID.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_MarkupRange\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new CommentRangeEnd(0);\n* ```\n*/\nvar CommentRangeEnd = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:commentRangeEnd\");\n\t\tthis.root.push(new CommentRangeAttributes({ id }));\n\t}\n};\n/**\n* Represents a reference to a comment in a WordprocessingML document.\n*\n* This element is placed within a run to create a link to a comment.\n* It should be placed after the CommentRangeEnd element.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Markup\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new CommentReference(0);\n* ```\n*/\nvar CommentReference = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:commentReference\");\n\t\tthis.root.push(new CommentRangeAttributes({ id }));\n\t}\n};\n/**\n* Represents a single comment in a WordprocessingML document.\n*\n* Contains the actual content of a comment, including author information\n* and the comment text (typically paragraphs).\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Comment\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"initials\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"author\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"date\" type=\"s:ST_DateTime\"/>\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Comment({\n* id: 0,\n* author: \"John Doe\",\n* initials: \"JD\",\n* children: [new Paragraph(\"This is a comment\")],\n* });\n* ```\n*/\nvar Comment = class extends XmlComponent {\n\tconstructor({ id, initials, author, date = /* @__PURE__ */ new Date(), children }, paraId) {\n\t\tsuper(\"w:comment\");\n\t\t_defineProperty(this, \"paraId\", void 0);\n\t\tthis.paraId = paraId;\n\t\tthis.root.push(new CommentAttributes({\n\t\t\tid,\n\t\t\tinitials,\n\t\t\tauthor,\n\t\t\tdate: date.toISOString()\n\t\t}));\n\t\tfor (const child of children) this.root.push(child);\n\t}\n\t/**\n\t* Serializes this comment to XML, injecting w14:paraId and w14:textId into the last\n\t* paragraph when threading is active. These attributes link the comment to its\n\t* corresponding w15:commentEx entry in commentsExtended.xml.\n\t*/\n\tprepForXml(context) {\n\t\tconst result = super.prepForXml(context);\n\t\tif (!result || !this.paraId) return result;\n\t\tconst commentChildren = result[\"w:comment\"];\n\t\tif (!Array.isArray(commentChildren)) return result;\n\t\tfor (let i = commentChildren.length - 1; i >= 0; i--) {\n\t\t\tconst child = commentChildren[i];\n\t\t\tif (child && typeof child === \"object\" && \"w:p\" in child) {\n\t\t\t\tconst pChildren = child[\"w:p\"];\n\t\t\t\tif (Array.isArray(pChildren)) pChildren.unshift({ _attr: {\n\t\t\t\t\t\"w14:paraId\": this.paraId,\n\t\t\t\t\t\"w14:textId\": this.paraId\n\t\t\t\t} });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n};\n/**\n* Converts a comment ID to a deterministic 8-character uppercase hex paraId.\n*/\nvar commentIdToParaId = (id) => (id + 1).toString(16).toUpperCase().padStart(8, \"0\");\n/**\n* Represents the comments container in a WordprocessingML document.\n*\n* This is the root element for the comments.xml file that stores all\n* comment definitions in the document. When any comment uses `parentId`,\n* threading is activated and thread data is generated for commentsExtended.xml.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"comments\" type=\"CT_Comments\"/>\n* <xsd:complexType name=\"CT_Comments\">\n* <xsd:sequence>\n* <xsd:element name=\"comment\" type=\"CT_Comment\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Comments({\n* children: [\n* {\n* id: 0,\n* author: \"John Doe\",\n* children: [new Paragraph(\"First comment\")],\n* },\n* {\n* id: 1,\n* author: \"Jane Smith\",\n* parentId: 0,\n* children: [new Paragraph(\"Reply to first comment\")],\n* },\n* ],\n* });\n* ```\n*/\nvar Comments = class extends XmlComponent {\n\tconstructor({ children }) {\n\t\tsuper(\"w:comments\");\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\t_defineProperty(this, \"threadData\", void 0);\n\t\t_defineProperty(this, \"commentIdsData\", void 0);\n\t\t_defineProperty(this, \"isEmpty\", void 0);\n\t\tthis.isEmpty = children.length === 0;\n\t\tthis.root.push(new RootCommentsAttributes({\n\t\t\t\"xmlns:wpc\": \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\t\"xmlns:cx\": \"http://schemas.microsoft.com/office/drawing/2014/chartex\",\n\t\t\t\"xmlns:cx1\": \"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\",\n\t\t\t\"xmlns:cx2\": \"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex\",\n\t\t\t\"xmlns:cx3\": \"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex\",\n\t\t\t\"xmlns:cx4\": \"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex\",\n\t\t\t\"xmlns:cx5\": \"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex\",\n\t\t\t\"xmlns:cx6\": \"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex\",\n\t\t\t\"xmlns:cx7\": \"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex\",\n\t\t\t\"xmlns:cx8\": \"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex\",\n\t\t\t\"xmlns:mc\": \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\t\"xmlns:aink\": \"http://schemas.microsoft.com/office/drawing/2016/ink\",\n\t\t\t\"xmlns:am3d\": \"http://schemas.microsoft.com/office/drawing/2017/model3d\",\n\t\t\t\"xmlns:o\": \"urn:schemas-microsoft-com:office:office\",\n\t\t\t\"xmlns:r\": \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\t\t\t\"xmlns:m\": \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\t\t\t\"xmlns:v\": \"urn:schemas-microsoft-com:vml\",\n\t\t\t\"xmlns:wp14\": \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\t\t\t\"xmlns:wp\": \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\t\t\t\"xmlns:w10\": \"urn:schemas-microsoft-com:office:word\",\n\t\t\t\"xmlns:w\": \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\t\t\t\"xmlns:w14\": \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\t\t\t\"xmlns:w15\": \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\t\"xmlns:w16cex\": \"http://schemas.microsoft.com/office/word/2018/wordml/cex\",\n\t\t\t\"xmlns:w16cid\": \"http://schemas.microsoft.com/office/word/2016/wordml/cid\",\n\t\t\t\"xmlns:w16\": \"http://schemas.microsoft.com/office/word/2018/wordml\",\n\t\t\t\"xmlns:w16sdtdh\": \"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash\",\n\t\t\t\"xmlns:w16se\": \"http://schemas.microsoft.com/office/word/2015/wordml/symex\",\n\t\t\t\"xmlns:wpg\": \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\t\t\t\"xmlns:wpi\": \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\t\t\t\"xmlns:wne\": \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\t\t\t\"xmlns:wps\": \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\",\n\t\t\t\"mc:Ignorable\": \"w14 w15 wp14\"\n\t\t}));\n\t\tconst hasThreading = children.some((child) => child.parentId !== void 0);\n\t\tconst hasDurableIds = children.some((child) => child.durableId !== void 0);\n\t\tif (hasThreading || hasDurableIds) {\n\t\t\tconst idToParaId = new Map(children.map((child) => [child.id, commentIdToParaId(child.id)]));\n\t\t\tfor (const child of children) this.root.push(new Comment(child, idToParaId.get(child.id)));\n\t\t\tif (hasThreading) this.threadData = children.map((child) => ({\n\t\t\t\tparaId: idToParaId.get(child.id),\n\t\t\t\tparentParaId: child.parentId !== void 0 ? idToParaId.get(child.parentId) : void 0,\n\t\t\t\tdone: child.resolved\n\t\t\t}));\n\t\t\tif (hasDurableIds) this.commentIdsData = children.map((child) => {\n\t\t\t\tvar _child$durableId;\n\t\t\t\treturn {\n\t\t\t\t\tparaId: idToParaId.get(child.id),\n\t\t\t\t\tdurableId: (_child$durableId = child.durableId) !== null && _child$durableId !== void 0 ? _child$durableId : idToParaId.get(child.id)\n\t\t\t\t};\n\t\t\t});\n\t\t} else for (const child of children) this.root.push(new Comment(child));\n\t\tthis.relationships = new Relationships();\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n\t/** Thread data for commentsExtended.xml, or undefined when no comments use parentId. */\n\tget ThreadData() {\n\t\treturn this.threadData;\n\t}\n\t/** Comment id data for commentsIds.xml, or undefined when no comments carry a durableId. */\n\tget CommentIdsData() {\n\t\treturn this.commentIdsData;\n\t}\n\t/** Whether there are no comments, in which case the document has no comments.xml part. */\n\tget IsEmpty() {\n\t\treturn this.isEmpty;\n\t}\n\t/**\n\t* Formats the comments, with the page numbers worked out for their document written into their fields, when the\n\t* document's body is written with an estimate of its pages.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tfillPartPageNumbers(xml, context);\n\t\treturn xml;\n\t}\n};\n// src/file/paragraph/run/editable-range.ts\n/**\n* Editable range module for WordprocessingML documents.\n*\n* An editable range is a part of a protected document that anyone can still change, as Word's Restrict Editing\n* exceptions for \"Everyone\" are. It runs from an `EditableRangeStart` to the `EditableRangeEnd` with the same id,\n* which can be in a later paragraph.\n*\n* Reference: ISO/IEC 29500-1 17.13.7 (permStart and permEnd)\n*\n* @module\n*/\n/**\n* @internal\n*/\nvar EditableRangeStartAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"w:id\",\n\t\t\teditorGroup: \"w:edGrp\"\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar EditableRangeEndAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args2) {\n\t\tsuper(..._args2);\n\t\t_defineProperty(this, \"xmlKeys\", { id: \"w:id\" });\n\t}\n};\n/**\n* Represents the start of an editable range: where a part of a protected document that anyone can change begins.\n*\n* It must be paired with an `EditableRangeEnd` with the same id, which can be in the same paragraph or a later one.\n* The id must be different from every other editable range's. The document's `protection` option protects the rest.\n*\n* Reference: ISO/IEC 29500-1 17.13.7.3 (permStart)\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PermStart\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_Perm\">\n* <xsd:attribute name=\"edGrp\" type=\"ST_EdGrp\" use=\"optional\"/>\n* <xsd:attribute name=\"ed\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"colFirst\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"colLast\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* children: [new TextRun(\"Name: \"), new EditableRangeStart(1), new TextRun(\"type your name\"), new EditableRangeEnd(1)],\n* });\n* ```\n*/\nvar EditableRangeStart = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:permStart\");\n\t\tthis.root.push(new EditableRangeStartAttributes({\n\t\t\tid,\n\t\t\teditorGroup: \"everyone\"\n\t\t}));\n\t}\n};\n/**\n* Represents the end of an editable range, which `EditableRangeStart` with the same id begins.\n*\n* Reference: ISO/IEC 29500-1 17.13.7.2 (permEnd)\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Perm\">\n* <xsd:attribute name=\"id\" type=\"s:ST_String\" use=\"required\"/>\n* <xsd:attribute name=\"displacedByCustomXml\" type=\"ST_DisplacedByCustomXml\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new EditableRangeEnd(1);\n* ```\n*/\nvar EditableRangeEnd = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:permEnd\");\n\t\tthis.root.push(new EditableRangeEndAttributes({ id }));\n\t}\n};\n// src/file/paragraph/run/comments-extended.ts\n/**\n* CommentsExtended module for WordprocessingML documents.\n*\n* Generates word/commentsExtended.xml which stores comment reply threading\n* relationships using w15:commentEx elements.\n*\n* Reference: ISO/IEC 29500 + Microsoft wml-2012.xsd\n*\n* @module\n*/\n/**\n* @internal\n*/\nvar CommentsExtendedAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\t\"xmlns:wpc\": \"xmlns:wpc\",\n\t\t\t\"xmlns:mc\": \"xmlns:mc\",\n\t\t\t\"xmlns:w15\": \"xmlns:w15\",\n\t\t\t\"mc:Ignorable\": \"mc:Ignorable\"\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar CommentExAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args2) {\n\t\tsuper(..._args2);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tparaId: \"w15:paraId\",\n\t\t\tparaIdParent: \"w15:paraIdParent\",\n\t\t\tdone: \"w15:done\"\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar CommentEx = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w15:commentEx\");\n\t\tthis.root.push(new CommentExAttributes({\n\t\t\tparaId: options.paraId,\n\t\t\tparaIdParent: options.parentParaId,\n\t\t\tdone: options.done !== void 0 ? options.done ? \"1\" : \"0\" : void 0\n\t\t}));\n\t}\n};\n/**\n* Represents the commentsExtended part (word/commentsExtended.xml).\n*\n* Contains w15:commentEx elements that define comment reply threading\n* and resolved status.\n*\n* ## XSD Schema (wml-2012.xsd)\n* ```xml\n* <xsd:complexType name=\"CT_CommentsEx\">\n* <xsd:sequence>\n* <xsd:element name=\"commentEx\" type=\"CT_CommentEx\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar CommentsExtended = class extends XmlComponent {\n\tconstructor(threadData) {\n\t\tsuper(\"w15:commentsEx\");\n\t\tthis.root.push(new CommentsExtendedAttributes({\n\t\t\t\"xmlns:wpc\": \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\t\"xmlns:mc\": \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\t\"xmlns:w15\": \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\t\"mc:Ignorable\": \"w15\"\n\t\t}));\n\t\tfor (const data of threadData) this.root.push(new CommentEx(data));\n\t}\n};\n/**\n* @internal\n*/\nvar CommentIdAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args3) {\n\t\tsuper(..._args3);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tparaId: \"w16cid:paraId\",\n\t\t\tdurableId: \"w16cid:durableId\"\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar CommentId = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w16cid:commentId\");\n\t\tthis.root.push(new CommentIdAttributes({\n\t\t\tparaId: options.paraId,\n\t\t\tdurableId: options.durableId\n\t\t}));\n\t}\n};\n/**\n* @internal\n*/\nvar CommentsIdsAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args4) {\n\t\tsuper(..._args4);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\t\"xmlns:w16cid\": \"xmlns:w16cid\",\n\t\t\t\"xmlns:mc\": \"xmlns:mc\",\n\t\t\t\"mc:Ignorable\": \"mc:Ignorable\"\n\t\t});\n\t}\n};\n/**\n* Represents the commentsIds part (word/commentsIds.xml).\n*\n* Contains w16cid:commentId elements that map each comment's volatile paraId\n* to a stable w16cid:durableId preserved by Word across edits.\n*\n* ## XSD Schema (wml-cid.xsd)\n* ```xml\n* <xsd:complexType name=\"CT_CommentsIds\">\n* <xsd:sequence>\n* <xsd:element name=\"commentId\" type=\"CT_CommentId\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar CommentsIds = class extends XmlComponent {\n\tconstructor(commentIdsData) {\n\t\tsuper(\"w16cid:commentsIds\");\n\t\tthis.root.push(new CommentsIdsAttributes({\n\t\t\t\"xmlns:w16cid\": \"http://schemas.microsoft.com/office/word/2016/wordml/cid\",\n\t\t\t\"xmlns:mc\": \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\t\"mc:Ignorable\": \"w16cid\"\n\t\t}));\n\t\tfor (const data of commentIdsData) this.root.push(new CommentId(data));\n\t}\n};\n// src/file/paragraph/run/empty-children.ts\n/**\n* Empty children module for WordprocessingML run elements.\n*\n* This module provides support for various empty (self-closing) elements that can\n* appear within a run. These elements represent special characters, references,\n* and separators that don't require additional content.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Represents a non-breaking hyphen character.\n*\n* Inserts a hyphen that prevents line breaking at that position.\n*/\nvar NoBreakHyphen = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:noBreakHyphen\");\n\t}\n};\n/**\n* Represents a soft hyphen (optional hyphen) character.\n*\n* Inserts a hyphen that only appears when a word is broken across lines.\n*/\nvar SoftHyphen = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:softHyphen\");\n\t}\n};\n/**\n* Represents the current day in short format (e.g., \"1\", \"15\").\n*\n* Inserts a dynamic field showing the day portion of the current date.\n*/\nvar DayShort = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:dayShort\");\n\t}\n};\n/**\n* Represents the current month in short format (e.g., \"1\", \"12\").\n*\n* Inserts a dynamic field showing the month portion of the current date.\n*/\nvar MonthShort = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:monthShort\");\n\t}\n};\n/**\n* Represents the current year in short format (e.g., \"24\").\n*\n* Inserts a dynamic field showing the year portion of the current date in two digits.\n*/\nvar YearShort = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:yearShort\");\n\t}\n};\n/**\n* Represents the current day in long format (e.g., \"01\", \"15\").\n*\n* Inserts a dynamic field showing the day portion of the current date with leading zeros.\n*/\nvar DayLong = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:dayLong\");\n\t}\n};\n/**\n* Represents the current month in long format (e.g., \"January\", \"December\").\n*\n* Inserts a dynamic field showing the full month name of the current date.\n*/\nvar MonthLong = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:monthLong\");\n\t}\n};\n/**\n* Represents the current year in long format (e.g., \"2024\").\n*\n* Inserts a dynamic field showing the year portion of the current date in four digits.\n*/\nvar YearLong = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:yearLong\");\n\t}\n};\n/**\n* Represents a reference to an annotation (comment).\n*\n* Used internally within comment ranges to mark comment references.\n*/\nvar AnnotationReference = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:annotationRef\");\n\t}\n};\n/**\n* Represents a reference to a footnote.\n*\n* Used within footnote content to refer back to the footnote marker.\n*/\nvar FootnoteReferenceElement = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:footnoteRef\");\n\t}\n};\n/**\n* Represents a reference to an endnote.\n*\n* Used within endnote content to refer back to the endnote marker.\n*/\nvar EndnoteReference = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:endnoteRef\");\n\t}\n};\n/**\n* Represents a separator line for footnotes or endnotes.\n*\n* Used to create the separator line between document content and footnotes/endnotes.\n*/\nvar Separator = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:separator\");\n\t}\n};\n/**\n* Represents a continuation separator for footnotes or endnotes.\n*\n* Used when footnotes/endnotes continue across multiple pages.\n*/\nvar ContinuationSeparator = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:continuationSeparator\");\n\t}\n};\n/**\n* Represents a page number field element.\n*\n* Inserts the current page number at this position.\n*/\nvar PageNumberElement = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:pgNum\");\n\t}\n};\n/**\n* Represents a carriage return character.\n*\n* Inserts a carriage return, which may be rendered differently than a standard line break.\n*/\nvar CarriageReturn = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:cr\");\n\t}\n};\n/**\n* Represents a tab character.\n*\n* Inserts a tab stop, advancing to the next tab position in the paragraph.\n*\n* @publicApi\n*/\nvar Tab = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:tab\");\n\t}\n};\n/**\n* Represents the last rendered page break location.\n*\n* Used internally by Word to track where page breaks occurred in the last rendering.\n* This is typically generated by Word and not created manually.\n*/\nvar LastRenderedPageBreak = class extends EmptyElement {\n\tconstructor() {\n\t\tsuper(\"w:lastRenderedPageBreak\");\n\t}\n};\n// src/file/paragraph/run/positional-tab.ts\n/**\n* Positional tab module for WordprocessingML documents.\n*\n* This module provides support for positional tabs, which are absolute position\n* tab stops used primarily in paragraphs with bidirectional text.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @module\n*/\n/**\n* Positional tab alignment types.\n*\n* Specifies how text is aligned at the positional tab stop.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_PTabAlignment\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"left\" />\n* <xsd:enumeration value=\"center\" />\n* <xsd:enumeration value=\"right\" />\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PositionalTabAlignment = {\n\t/** Left-aligned tab */\n\tLEFT: \"left\",\n\t/** Center-aligned tab */\n\tCENTER: \"center\",\n\t/** Right-aligned tab */\n\tRIGHT: \"right\"\n};\n/**\n* Positional tab relative positioning types.\n*\n* Specifies what the positional tab position is relative to.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_PTabRelativeTo\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"margin\" />\n* <xsd:enumeration value=\"indent\" />\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PositionalTabRelativeTo = {\n\t/** Position relative to margin */\n\tMARGIN: \"margin\",\n\t/** Position relative to indent */\n\tINDENT: \"indent\"\n};\n/**\n* Positional tab leader character types.\n*\n* Specifies the character used to fill the space before the tab.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_PTabLeader\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"none\" />\n* <xsd:enumeration value=\"dot\" />\n* <xsd:enumeration value=\"hyphen\" />\n* <xsd:enumeration value=\"underscore\" />\n* <xsd:enumeration value=\"middleDot\" />\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PositionalTabLeader = {\n\t/** No leader character */\n\tNONE: \"none\",\n\t/** Dot leader (...) */\n\tDOT: \"dot\",\n\t/** Hyphen leader (---) */\n\tHYPHEN: \"hyphen\",\n\t/** Underscore leader (___) */\n\tUNDERSCORE: \"underscore\",\n\t/** Middle dot leader (···) */\n\tMIDDLE_DOT: \"middleDot\"\n};\nvar PositionalTabAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\talignment: \"w:alignment\",\n\t\t\trelativeTo: \"w:relativeTo\",\n\t\t\tleader: \"w:leader\"\n\t\t});\n\t}\n};\n/**\n* Represents a positional tab element for a WordprocessingML document.\n*\n* A positional tab is an absolute position tab stop that is typically used\n* in bidirectional text scenarios. Unlike normal tabs, positional tabs specify\n* an exact alignment and position within the paragraph.\n*\n* Reference: http://officeopenxml.com/WPrun.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PTab\">\n* <xsd:attribute name=\"alignment\" type=\"ST_PTabAlignment\" use=\"required\" />\n* <xsd:attribute name=\"relativeTo\" type=\"ST_PTabRelativeTo\" use=\"required\" />\n* <xsd:attribute name=\"leader\" type=\"ST_PTabLeader\" use=\"required\" />\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a centered positional tab\n* new PositionalTab({\n* alignment: PositionalTabAlignment.CENTER,\n* relativeTo: PositionalTabRelativeTo.MARGIN,\n* leader: PositionalTabLeader.DOT,\n* });\n* ```\n*/\nvar PositionalTab = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:ptab\");\n\t\tthis.root.push(new PositionalTabAttributes({\n\t\t\talignment: options.alignment,\n\t\t\trelativeTo: options.relativeTo,\n\t\t\tleader: options.leader\n\t\t}));\n\t}\n};\n// src/file/paragraph/formatting/break.ts\n/**\n* Break elements module for WordprocessingML documents.\n*\n* This module provides page break and column break functionality.\n*\n* Reference: http://officeopenxml.com/WPtextSpecialContent-break.php\n*\n* @module\n*/\n/**\n* Break type values.\n* @internal\n*/\nvar BreakType = {\n\t/** Column break - text continues at the beginning of the next column */\n\tCOLUMN: \"column\",\n\t/** Page break - text continues at the beginning of the next page */\n\tPAGE: \"page\"\n};\n/**\n* Represents a break element in a WordprocessingML document.\n* @internal\n*/\nvar Break = class extends XmlComponent {\n\tconstructor(type) {\n\t\tsuper(\"w:br\");\n\t\tthis.root.push(new Attributes({ type }));\n\t}\n};\n/**\n* Represents a page break in a WordprocessingML document.\n*\n* A page break forces text to continue at the beginning of the next page.\n*\n* Reference: http://officeopenxml.com/WPtextSpecialContent-break.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Br\">\n* <xsd:attribute name=\"type\" type=\"ST_BrType\" use=\"optional\"/>\n* <xsd:attribute name=\"clear\" type=\"ST_BrClear\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* children: [new PageBreak()],\n* });\n* ```\n*/\nvar PageBreak = class extends Run {\n\tconstructor() {\n\t\tsuper({});\n\t\tthis.root.push(new Break(BreakType.PAGE));\n\t}\n};\n/**\n* Represents a column break in a WordprocessingML document.\n*\n* A column break forces text to continue at the beginning of the next column.\n*\n* Reference: http://officeopenxml.com/WPtextSpecialContent-break.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Br\">\n* <xsd:attribute name=\"type\" type=\"ST_BrType\" use=\"optional\"/>\n* <xsd:attribute name=\"clear\" type=\"ST_BrClear\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* children: [new ColumnBreak()],\n* });\n* ```\n*/\nvar ColumnBreak = class extends Run {\n\tconstructor() {\n\t\tsuper({});\n\t\tthis.root.push(new Break(BreakType.COLUMN));\n\t}\n};\n/**\n* Represents a page break before setting for paragraph properties.\n*\n* When applied to a paragraph, ensures the paragraph begins on a new page.\n*\n* Reference: http://officeopenxml.com/WPparagraphProperties.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OnOff\">\n* <xsd:attribute name=\"val\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* pageBreakBefore: true,\n* children: [new TextRun(\"This text starts on a new page\")],\n* });\n* ```\n*/\nvar PageBreakBefore = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:pageBreakBefore\");\n\t}\n};\n// src/file/paragraph/formatting/spacing.ts\n/**\n* Paragraph spacing module for WordprocessingML documents.\n*\n* This module provides spacing options for paragraphs including space before,\n* space after, and line spacing.\n*\n* Reference: http://officeopenxml.com/WPspacing.php\n*\n* @module\n*/\n/**\n* Line spacing rule types.\n*\n* Specifies how the line height is calculated.\n*\n* @publicApi\n*/\nvar LineRuleType = {\n\t/** Line spacing is at least the specified value */\n\tAT_LEAST: \"atLeast\",\n\t/** Writes `exactly`, which isn't a value the schema allows, so Word ignores it. Use {@link LineRuleType.EXACT} for an exact line height. */\n\tEXACTLY: \"exactly\",\n\t/** Line spacing is exactly the specified value */\n\tEXACT: \"exact\",\n\t/** Line spacing is automatically determined based on content */\n\tAUTO: \"auto\"\n};\n/**\n* Creates paragraph spacing element for a WordprocessingML document.\n*\n* The spacing element specifies the spacing between lines and paragraphs.\n*\n* Reference: http://officeopenxml.com/WPspacing.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Spacing\">\n* <xsd:attribute name=\"before\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"beforeLines\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"beforeAutospacing\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"after\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"afterLines\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"afterAutospacing\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"line\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"lineRule\" type=\"ST_LineSpacingRule\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* spacing: {\n* before: 200,\n* after: 200,\n* line: 360,\n* lineRule: LineRuleType.AT_LEAST,\n* },\n* children: [new TextRun(\"Paragraph with custom spacing\")],\n* });\n* ```\n*/\nvar createSpacing = ({ after, before, line, lineRule, beforeAutoSpacing, afterAutoSpacing }) => new BuilderElement({\n\tname: \"w:spacing\",\n\tattributes: {\n\t\tafter: {\n\t\t\tkey: \"w:after\",\n\t\t\tvalue: after\n\t\t},\n\t\tbefore: {\n\t\t\tkey: \"w:before\",\n\t\t\tvalue: before\n\t\t},\n\t\tline: {\n\t\t\tkey: \"w:line\",\n\t\t\tvalue: line\n\t\t},\n\t\tlineRule: {\n\t\t\tkey: \"w:lineRule\",\n\t\t\tvalue: lineRule\n\t\t},\n\t\tbeforeAutoSpacing: {\n\t\t\tkey: \"w:beforeAutospacing\",\n\t\t\tvalue: beforeAutoSpacing\n\t\t},\n\t\tafterAutoSpacing: {\n\t\t\tkey: \"w:afterAutospacing\",\n\t\t\tvalue: afterAutoSpacing\n\t\t}\n\t}\n});\n// src/file/paragraph/formatting/style.ts\n/**\n* Paragraph style module for WordprocessingML documents.\n*\n* This module provides paragraph style references including heading levels.\n*\n* @module\n*/\n/**\n* Built-in heading level styles.\n*\n* These are the standard heading styles available in Word documents.\n*\n* @publicApi\n*/\nvar HeadingLevel = {\n\t/** Heading 1 style */\n\tHEADING_1: \"Heading1\",\n\t/** Heading 2 style */\n\tHEADING_2: \"Heading2\",\n\t/** Heading 3 style */\n\tHEADING_3: \"Heading3\",\n\t/** Heading 4 style */\n\tHEADING_4: \"Heading4\",\n\t/** Heading 5 style */\n\tHEADING_5: \"Heading5\",\n\t/** Heading 6 style */\n\tHEADING_6: \"Heading6\",\n\t/** Title style */\n\tTITLE: \"Title\"\n};\n/**\n* Creates a paragraph style reference for a WordprocessingML document.\n*\n* The pStyle element specifies the paragraph style to apply to the paragraph.\n*\n* Reference: http://officeopenxml.com/WPstyle.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_String\">\n* <xsd:attribute name=\"val\" type=\"s:ST_String\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Using a built-in heading style\n* new Paragraph({\n* style: HeadingLevel.HEADING_1,\n* children: [new TextRun(\"Chapter 1\")],\n* });\n*\n* // Using a custom style\n* new Paragraph({\n* style: \"MyCustomStyle\",\n* children: [new TextRun(\"Styled text\")],\n* });\n* ```\n*/\nvar createParagraphStyle = (styleId) => new BuilderElement({\n\tname: \"w:pStyle\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: styleId\n\t} }\n});\n// src/file/paragraph/formatting/tab-stop.ts\n/**\n* Tab stop module for WordprocessingML documents.\n*\n* This module provides tab stop definitions for paragraphs.\n*\n* Reference: http://officeopenxml.com/WPtab.php\n*\n* @module\n*/\n/**\n* Tab stop alignment types.\n*\n* Specifies the type of tab stop and how text aligns to it.\n*\n* @publicApi\n*/\nvar TabStopType = {\n\t/** Left-aligned tab stop */\n\tLEFT: \"left\",\n\t/** Right-aligned tab stop */\n\tRIGHT: \"right\",\n\t/** Center-aligned tab stop */\n\tCENTER: \"center\",\n\t/** Bar tab stop - inserts a vertical bar at the position */\n\tBAR: \"bar\",\n\t/** Clears a tab stop at the specified position */\n\tCLEAR: \"clear\",\n\t/** Decimal-aligned tab stop - aligns on decimal point */\n\tDECIMAL: \"decimal\",\n\t/** End-aligned tab stop (right-to-left equivalent) */\n\tEND: \"end\",\n\t/** List tab stop for numbered lists */\n\tNUM: \"num\",\n\t/** Start-aligned tab stop (left-to-right equivalent) */\n\tSTART: \"start\"\n};\n/**\n* Tab stop leader character types.\n*\n* Specifies the character used to fill the space before the tab stop.\n*\n* @publicApi\n*/\nvar LeaderType = {\n\t/** Dot leader (....) */\n\tDOT: \"dot\",\n\t/** Hyphen leader (----) */\n\tHYPHEN: \"hyphen\",\n\t/** Middle dot leader (····) */\n\tMIDDLE_DOT: \"middleDot\",\n\t/** No leader */\n\tNONE: \"none\",\n\t/** Underscore leader (____) */\n\tUNDERSCORE: \"underscore\"\n};\n/**\n* Predefined tab stop positions.\n*\n* @publicApi\n*/\nvar TabStopPosition = { \n/** Maximum tab stop position (right margin) */\nMAX: 9026 };\n/**\n* Creates a single tab stop item element.\n*\n* Reference: http://officeopenxml.com/WPtab.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TabStop\">\n* <xsd:attribute name=\"val\" type=\"ST_TabJc\" use=\"required\"/>\n* <xsd:attribute name=\"leader\" type=\"ST_TabTlc\" use=\"optional\"/>\n* <xsd:attribute name=\"pos\" type=\"ST_SignedTwipsMeasure\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createTabStopItem = ({ type, position, leader }) => new BuilderElement({\n\tname: \"w:tab\",\n\tattributes: {\n\t\tval: {\n\t\t\tkey: \"w:val\",\n\t\t\tvalue: type\n\t\t},\n\t\tpos: {\n\t\t\tkey: \"w:pos\",\n\t\t\tvalue: signedTwipsMeasureValue(position)\n\t\t},\n\t\tleader: {\n\t\t\tkey: \"w:leader\",\n\t\t\tvalue: leader\n\t\t}\n\t}\n});\n/**\n* Creates a collection of tab stops for a WordprocessingML document.\n*\n* Tab stops define the positions where text will align when a tab character is used.\n*\n* Reference: http://officeopenxml.com/WPtab.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Tabs\">\n* <xsd:sequence>\n* <xsd:element name=\"tab\" type=\"CT_TabStop\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Paragraph({\n* tabStops: [\n* { type: TabStopType.LEFT, position: 2000 },\n* { type: TabStopType.CENTER, position: 4000 },\n* { type: TabStopType.RIGHT, position: TabStopPosition.MAX, leader: LeaderType.DOT },\n* ],\n* children: [new TextRun(\"Text\\twith\\ttabs\")],\n* });\n* ```\n*/\nvar createTabStop = (tabDefinitions) => new BuilderElement({\n\tname: \"w:tabs\",\n\tchildren: tabDefinitions.map((tabDefinition) => createTabStopItem(tabDefinition))\n});\n// src/file/paragraph/formatting/unordered-list.ts\n/**\n* Numbering properties module for WordprocessingML documents.\n*\n* This module provides numbering and list properties for paragraphs.\n*\n* @module\n*/\n/**\n* Represents numbering properties for a paragraph.\n*\n* The numPr element specifies the numbering definition instance and level\n* for the paragraph, enabling numbered and bulleted lists.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NumPr\">\n* <xsd:sequence>\n* <xsd:element name=\"ilvl\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"numId\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"numberingChange\" type=\"CT_TrackChangeNumbering\" minOccurs=\"0\"/>\n* <xsd:element name=\"ins\" type=\"CT_TrackChange\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a bulleted list item at level 0\n* new Paragraph({\n* numbering: {\n* reference: \"my-bullet-list\",\n* level: 0,\n* },\n* children: [new TextRun(\"First item\")],\n* });\n*\n* // Create a numbered list item at level 1\n* new Paragraph({\n* numbering: {\n* reference: \"my-numbered-list\",\n* level: 1,\n* },\n* children: [new TextRun(\"Nested item\")],\n* });\n* ```\n*/\nvar NumberProperties = class extends XmlComponent {\n\tconstructor(numberId, indentLevel) {\n\t\tsuper(\"w:numPr\");\n\t\tthis.root.push(new IndentLevel(indentLevel));\n\t\tthis.root.push(new NumberId(numberId));\n\t}\n};\n/**\n* Represents the indentation level (ilvl) for a numbered or bulleted list.\n*\n* The ilvl element specifies the list level (0-9) for the paragraph.\n*\n* @internal\n*/\nvar IndentLevel = class extends XmlComponent {\n\tconstructor(level) {\n\t\tsuper(\"w:ilvl\");\n\t\tif (level > 9) throw new Error(\"Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7\");\n\t\tthis.root.push(new Attributes({ val: level }));\n\t}\n};\n/**\n* Represents the numbering definition ID (numId) for a numbered or bulleted list.\n*\n* The numId element specifies which numbering definition to use for the paragraph.\n*\n* @internal\n*/\nvar NumberId = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:numId\");\n\t\tthis.root.push(new Attributes({ val: typeof id === \"string\" ? `{${id}}` : id }));\n\t}\n};\n// src/file/file-child.ts\n/**\n* FileChild module for WordprocessingML documents.\n*\n* FileChild is the base class for block-level elements that can appear\n* in the document body, such as paragraphs and tables.\n*\n* @module\n*/\n/**\n* Base class for document body children.\n*\n* FileChild represents a block-level element that can be added directly\n* to the document body. Examples include Paragraph and Table.\n*/\nvar FileChild = class extends XmlComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** Marker property identifying this as a FileChild */\n\t\t\t\"fileChild\",\n\t\t\tSymbol()\n\t\t);\n\t}\n};\n// src/file/paragraph/links/hyperlink-attributes.ts\n/**\n* Hyperlink attributes module for WordprocessingML documents.\n*\n* This module provides attribute components for hyperlink elements.\n*\n* Reference: http://officeopenxml.com/WPhyperlink.php\n*\n* @module\n*/\n/**\n* Attributes for the hyperlink element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Hyperlink\">\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:attribute name=\"tgtFrame\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"tooltip\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"docLocation\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"history\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"anchor\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute ref=\"r:id\"/>\n* </xsd:complexType>\n* ```\n*/\nvar HyperlinkAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"r:id\",\n\t\t\thistory: \"w:history\",\n\t\t\tanchor: \"w:anchor\"\n\t\t});\n\t}\n};\n// src/file/paragraph/links/hyperlink.ts\n/**\n* Hyperlink module for WordprocessingML documents.\n*\n* This module provides hyperlink functionality for internal and external links.\n*\n* Reference: http://officeopenxml.com/WPhyperlink.php\n*\n* @module\n*/\n/**\n* Hyperlink type enumeration.\n*\n* Defines the types of hyperlinks supported in WordprocessingML documents.\n*\n* @publicApi\n*/\nvar HyperlinkType = {\n\t/** Internal hyperlink to a bookmark within the document */\n\tINTERNAL: \"INTERNAL\",\n\t/** External hyperlink to a URL outside the document */\n\tEXTERNAL: \"EXTERNAL\"\n};\n/**\n* Represents a concrete hyperlink in a WordprocessingML document.\n*\n* This class is the low-level implementation of hyperlinks used internally.\n* Use InternalHyperlink or ExternalHyperlink for creating hyperlinks in documents.\n*\n* Reference: http://officeopenxml.com/WPhyperlink.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"hyperlink\" type=\"CT_Hyperlink\"/>\n*\n* <xsd:complexType name=\"CT_Hyperlink\">\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:attribute name=\"tgtFrame\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"tooltip\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"docLocation\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"history\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"anchor\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute ref=\"r:id\"/>\n* </xsd:complexType>\n* ```\n*/\nvar ConcreteHyperlink = class extends XmlComponent {\n\t/**\n\t* @param children - Inline content of the hyperlink\n\t* @param relationshipId - Id of the external relationship, without the rId prefix\n\t* @param anchor - Bookmark name or external URL fragment\n\t* @param externalLink - The full address of an external hyperlink, so the relationship id is kept alongside its anchor\n\t*/\n\tconstructor(children, relationshipId, anchor, externalLink) {\n\t\tsuper(\"w:hyperlink\");\n\t\t_defineProperty(this, \"linkId\", void 0);\n\t\t_defineProperty(this, \"drawingLink\", void 0);\n\t\tthis.linkId = relationshipId;\n\t\tthis.drawingLink = anchor && externalLink !== void 0 ? new DrawingLink(externalLink) : void 0;\n\t\tconst attributes = new HyperlinkAttributes({\n\t\t\thistory: 1,\n\t\t\tanchor: anchor ? anchor : void 0,\n\t\t\tid: !anchor || externalLink !== void 0 ? `rId${this.linkId}` : void 0\n\t\t});\n\t\tthis.root.push(attributes);\n\t\tchildren.forEach((child) => {\n\t\t\tthis.root.push(child);\n\t\t});\n\t}\n\t/**\n\t* Creates the `a:hlinkClick` of a picture in the hyperlink, which links to the same address.\n\t*\n\t* The hyperlink decides which relationship its pictures use, rather than the pictures reading `linkId`, because only it\n\t* knows whether that relationship has lost the fragment to `w:anchor`. The picture's relationship is added as the\n\t* picture is written, through the context's relationships, so it lands in the part the picture is in, both when\n\t* packing and when patching.\n\t*\n\t* @param context - The context the picture is written in, whose relationships get the picture's link if it has its own\n\t* @param declareNamespace - Declares the DrawingML namespace, for elements outside `a:graphic` such as `wp:docPr`\n\t*/\n\tcreateDrawingClick(context, declareNamespace) {\n\t\tif (!this.drawingLink) return createHyperlinkClick(this.linkId, declareNamespace);\n\t\tthis.drawingLink.addRelationship(context);\n\t\treturn this.drawingLink.createClick(declareNamespace);\n\t}\n};\n/**\n* Represents an internal hyperlink to a bookmark within the document.\n*\n* Internal hyperlinks use the anchor attribute to reference a bookmark by name.\n* The bookmark must exist in the document for the hyperlink to function.\n*\n* Reference: http://officeopenxml.com/WPhyperlink.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"hyperlink\" type=\"CT_Hyperlink\"/>\n*\n* <xsd:complexType name=\"CT_Hyperlink\">\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:attribute name=\"anchor\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"history\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a bookmark\n* new Bookmark({\n* id: \"section1\",\n* children: [new TextRun(\"Section 1\")],\n* });\n*\n* // Link to the bookmark\n* new InternalHyperlink({\n* children: [new TextRun({ text: \"Go to Section 1\", style: \"Hyperlink\" })],\n* anchor: \"section1\",\n* });\n* ```\n*/\nvar InternalHyperlink = class extends ConcreteHyperlink {\n\tconstructor(options) {\n\t\tsuper(options.children, uniqueId(), options.anchor);\n\t}\n};\n/**\n* Represents an external hyperlink to a URL outside the document.\n*\n* External hyperlinks create a relationship to an external resource (URL).\n* The relationship is created during document preparation and the hyperlink\n* is converted to a ConcreteHyperlink with the relationship ID.\n* URL fragments of at most 255 UTF-16 units are written as anchors, preserving any additional # characters.\n* Longer fragments stay in the original relationship URI to avoid exceeding Word's anchor limit;\n* those links retain the existing limitations for fragments with multiple # characters.\n* Word appends the anchor to the relationship target as described in MS-OI29500 §17.16.22:\n* https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/df06e423-11a6-4a36-bfb3-82139e531781\n*\n* Reference: http://officeopenxml.com/WPhyperlink.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"hyperlink\" type=\"CT_Hyperlink\"/>\n*\n* <xsd:complexType name=\"CT_Hyperlink\">\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:attribute ref=\"r:id\"/>\n* <xsd:attribute name=\"history\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"anchor\" type=\"s:ST_String\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new ExternalHyperlink({\n* children: [new TextRun({ text: \"Visit Example\", style: \"Hyperlink\" })],\n* link: \"https://example.com\",\n* });\n* ```\n*/\nvar ExternalHyperlink = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:externalHyperlink\");\n\t\t_defineProperty(this, \"options\", void 0);\n\t\tthis.options = options;\n\t}\n};\n// src/file/paragraph/links/bookmark-attributes.ts\n/**\n* Bookmark attributes module for WordprocessingML documents.\n*\n* This module provides attribute components for bookmark start and end elements.\n*\n* Reference: http://officeopenxml.com/WPbookmark.php\n*\n* @module\n*/\n/**\n* Attributes for the bookmark start element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Bookmark\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_BookmarkRange\">\n* <xsd:attribute name=\"name\" type=\"s:ST_String\" use=\"required\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_BookmarkRange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_MarkupRange\">\n* <xsd:attribute name=\"colFirst\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"colLast\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_MarkupRange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_Markup\">\n* <xsd:attribute name=\"displacedByCustomXml\" type=\"ST_DisplacedByCustomXml\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_Markup\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar BookmarkStartAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"w:id\",\n\t\t\tname: \"w:name\"\n\t\t});\n\t}\n};\n/**\n* Attributes for the bookmark end element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_MarkupRange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_Markup\">\n* <xsd:attribute name=\"displacedByCustomXml\" type=\"ST_DisplacedByCustomXml\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_Markup\">\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar BookmarkEndAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args2) {\n\t\tsuper(..._args2);\n\t\t_defineProperty(this, \"xmlKeys\", { id: \"w:id\" });\n\t}\n};\n// src/file/paragraph/links/bookmark.ts\n/**\n* Bookmark module for WordprocessingML documents.\n*\n* Bookmarks are used to identify a location or selection of text within a document.\n* They can be used as targets for hyperlinks.\n*\n* Reference: http://officeopenxml.com/WPbookmark.php\n*\n* @module\n*/\n/**\n* Represents a bookmark in a WordprocessingML document.\n*\n* A bookmark identifies a location or range of content that can be referenced\n* elsewhere, such as from a hyperlink or table of contents. The bookmark consists\n* of a start marker, content, and an end marker.\n*\n* Reference: http://officeopenxml.com/WPbookmark.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"bookmarkStart\" type=\"CT_Bookmark\"/>\n* <xsd:element name=\"bookmarkEnd\" type=\"CT_MarkupRange\"/>\n*\n* <xsd:complexType name=\"CT_Bookmark\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_BookmarkRange\">\n* <xsd:attribute name=\"name\" type=\"s:ST_String\" use=\"required\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a bookmark around a heading\n* new Bookmark({\n* id: \"section1\",\n* children: [new TextRun(\"Section 1 Heading\")],\n* });\n*\n* // Link to the bookmark from elsewhere\n* new InternalHyperlink({\n* children: [new TextRun(\"Go to Section 1\")],\n* anchor: \"section1\",\n* });\n* ```\n*/\nvar Bookmark = class Bookmark {\n\tconstructor(options) {\n\t\t_defineProperty(this, \"start\", void 0);\n\t\t_defineProperty(this, \"children\", void 0);\n\t\t_defineProperty(this, \"end\", void 0);\n\t\tconst linkId = bookmarkUniqueNumericId();\n\t\tthis.start = new BookmarkStart(options.id, linkId);\n\t\tthis.children = options.children;\n\t\tthis.end = new BookmarkEnd(linkId);\n\t}\n\t/**\n\t* The components written in this bookmark's place: its start, its children and its end. A bookmark in its\n\t* children is written the same way, so one bookmark can hold another.\n\t*\n\t* @internal\n\t*/\n\tget writtenAs() {\n\t\treturn [\n\t\t\tthis.start,\n\t\t\t...this.children.flatMap((child) => child instanceof Bookmark ? child.writtenAs : [child]),\n\t\t\tthis.end\n\t\t];\n\t}\n};\n/**\n* Represents the start marker of a bookmark range.\n*\n* This element marks the beginning of a bookmarked region in the document.\n* It must be paired with a corresponding BookmarkEnd element with the same id.\n*\n* The id must be unique in the document. `Bookmark` takes its ids from\n* `bookmarkUniqueNumericId`, so take this one from it too, or it can be the\n* same as a `Bookmark`'s.\n*\n* Reference: http://officeopenxml.com/WPbookmark.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"bookmarkStart\" type=\"CT_Bookmark\"/>\n*\n* <xsd:complexType name=\"CT_Bookmark\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_BookmarkRange\">\n* <xsd:attribute name=\"name\" type=\"s:ST_String\" use=\"required\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // A bookmark across two paragraphs\n* const id = bookmarkUniqueNumericId();\n* new Paragraph({ children: [new BookmarkStart(\"myBookmark\", id), new TextRun(\"First\")] });\n* new Paragraph({ children: [new TextRun(\"Last\"), new BookmarkEnd(id)] });\n* ```\n*/\nvar BookmarkStart = class extends XmlComponent {\n\tconstructor(id, linkId) {\n\t\tsuper(\"w:bookmarkStart\");\n\t\tconst attributes = new BookmarkStartAttributes({\n\t\t\tname: id,\n\t\t\tid: linkId\n\t\t});\n\t\tthis.root.push(attributes);\n\t}\n};\n/**\n* Represents the end marker of a bookmark range.\n*\n* This element marks the end of a bookmarked region in the document.\n* It must be paired with a corresponding BookmarkStart element with the same id,\n* taken from `bookmarkUniqueNumericId` (see `BookmarkStart`).\n*\n* Reference: http://officeopenxml.com/WPbookmark.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"bookmarkEnd\" type=\"CT_MarkupRange\"/>\n*\n* <xsd:complexType name=\"CT_MarkupRange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_Markup\">\n* <xsd:attribute name=\"displacedByCustomXml\" type=\"ST_DisplacedByCustomXml\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const id = bookmarkUniqueNumericId();\n* new BookmarkStart(\"myBookmark\", id);\n* new BookmarkEnd(id);\n* ```\n*/\nvar BookmarkEnd = class extends XmlComponent {\n\tconstructor(linkId) {\n\t\tsuper(\"w:bookmarkEnd\");\n\t\tconst attributes = new BookmarkEndAttributes({ id: linkId });\n\t\tthis.root.push(attributes);\n\t}\n};\n// src/file/paragraph/links/numbered-item-ref.ts\n/**\n* Numbered item reference module for WordprocessingML documents.\n*\n* This module provides cross-references to numbered items (such as\n* numbered paragraphs, list items, or headings) within a document.\n*\n* Reference: https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/7088a8ce-e784-49d4-94b8-cba6ef8fce78\n*\n* @module\n*/\n/**\n* Format options for numbered item references.\n*\n* Specifies how the paragraph number should be displayed when referenced.\n*/\nvar NumberedItemReferenceFormat = /* @__PURE__ */ function(NumberedItemReferenceFormat) {\n\tNumberedItemReferenceFormat[\"NONE\"] = \"none\";\n\t/**\n\t* \\r option - inserts the paragraph number of the bookmarked paragraph in relative context, or relative to its position in the numbering scheme\n\t*/\n\tNumberedItemReferenceFormat[\"RELATIVE\"] = \"relative\";\n\t/**\n\t* \\n option - causes the field result to be the paragraph number without trailing periods. No information about prior numbered levels is displayed unless it is included as part of the current level.\n\t*/\n\tNumberedItemReferenceFormat[\"NO_CONTEXT\"] = \"no_context\";\n\t/**\n\t* \\w option - causes the field result to be the entire paragraph number without trailing periods, regardless of the location of the REF field.\n\t*/\n\tNumberedItemReferenceFormat[\"FULL_CONTEXT\"] = \"full_context\";\n\treturn NumberedItemReferenceFormat;\n}({});\nvar SWITCH_MAP = {\n\t[\"relative\"]: \"\\\\r\",\n\t[\"no_context\"]: \"\\\\n\",\n\t[\"full_context\"]: \"\\\\w\",\n\t[\"none\"]: void 0\n};\n/**\n* Creates a field/cross reference to a numbered item in the document.\n*\n* The REF field displays the text or page number of a bookmarked paragraph,\n* particularly useful for referencing numbered headings or list items.\n*\n* @example\n* ```typescript\n* // Reference a numbered heading\n* new NumberedItemReference(\"heading_1_bookmark\", \"1.2.3\", {\n* hyperlink: true,\n* referenceFormat: NumberedItemReferenceFormat.FULL_CONTEXT,\n* });\n* ```\n*/\nvar NumberedItemReference = class extends SimpleField {\n\tconstructor(bookmarkId, cachedValue, options = {}) {\n\t\tconst { hyperlink = true, referenceFormat = \"full_context\" } = options;\n\t\tconst instruction = `${`REF ${bookmarkId}`} ${[...hyperlink ? [\"\\\\h\"] : [], ...[SWITCH_MAP[referenceFormat]].filter((a) => !!a)].join(\" \")}`;\n\t\tsuper(instruction, cachedValue);\n\t}\n};\n// src/file/paragraph/links/outline-level.ts\n/**\n* Outline level module for WordprocessingML documents.\n*\n* This module provides the outline level element which specifies\n* the outline level of a paragraph for document outline/TOC purposes.\n*\n* Reference: http://officeopenxml.com/WPparagraph.php\n*\n* @module\n*/\n/**\n* Creates an outline level element for a paragraph.\n*\n* The outline level determines the paragraph's position in the document\n* outline and affects table of contents generation. Level 0 corresponds\n* to Heading 1, level 1 to Heading 2, etc.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_DecimalNumber\">\n* <xsd:attribute name=\"val\" type=\"xsd:integer\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Set outline level to 0 (Heading 1)\n* createOutlineLevel(0);\n*\n* // Set outline level to 2 (Heading 3)\n* createOutlineLevel(2);\n* ```\n*/\nvar createOutlineLevel = (level) => new BuilderElement({\n\tname: \"w:outlineLvl\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: level\n\t} }\n});\n// src/file/paragraph/links/pageref-field-instruction.ts\n/**\n* Page reference field instruction module for WordprocessingML documents.\n*\n* This module provides the field instruction element for page references,\n* which displays the page number of a bookmarked location.\n*\n* Reference: http://officeopenxml.com/WPfields.php\n*\n* @module\n*/\n/**\n* Represents a PAGEREF field instruction.\n*\n* The PAGEREF field inserts the page number of the page containing\n* the specified bookmark. It can optionally create a hyperlink\n* and display relative positioning (e.g., \"on the previous page\").\n*\n* @example\n* ```typescript\n* // Basic page reference\n* new PageReferenceFieldInstruction(\"figure_1\");\n*\n* // Page reference with hyperlink and relative position\n* new PageReferenceFieldInstruction(\"table_1\", {\n* hyperlink: true,\n* useRelativePosition: true,\n* });\n* ```\n*\n* @internal\n*/\nvar PageReferenceFieldInstruction = class extends XmlComponent {\n\tconstructor(bookmarkId, options = {}) {\n\t\tsuper(\"w:instrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tlet instruction = `PAGEREF ${bookmarkId}`;\n\t\tif (options.hyperlink) instruction = `${instruction} \\\\h`;\n\t\tif (options.useRelativePosition) instruction = `${instruction} \\\\p`;\n\t\tthis.root.push(instruction);\n\t}\n};\n// src/file/paragraph/links/pageref.ts\n/**\n* Page reference module for WordprocessingML documents.\n*\n* This module provides page reference elements for cross-referencing\n* the page number of a bookmarked location.\n*\n* Reference: https://www.ecma-international.org/publications/standards/Ecma-376.htm (Part 1, Page 1234)\n*\n* @module\n*/\n/**\n* Represents a page reference (PAGEREF) field.\n*\n* The PAGEREF field displays the page number of the page containing\n* the specified bookmark, useful for cross-references like \"see page 5\".\n*\n* It is written dirty, so Word fills in the page number when it opens the document, after asking to. When the\n* document is given `pageNumbers`, it is written clean, with the number they work out, or blank when they couldn't,\n* and Word doesn't ask.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* // Simple page reference\n* new PageReference(\"figure_1_bookmark\");\n*\n* // With hyperlink\n* new PageReference(\"table_2\", { hyperlink: true });\n*\n* // With relative position (e.g., \"above\" or \"on page 5\")\n* new PageReference(\"section_3\", {\n* hyperlink: true,\n* useRelativePosition: true,\n* });\n* ```\n*/\nvar PageReference = class extends Run {\n\tconstructor(bookmarkId, options = {}) {\n\t\tsuper({ children: [\n\t\t\tcreateBeginDirtyWithoutPageNumbers(),\n\t\t\tnew PageReferenceFieldInstruction(bookmarkId, options),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t] });\n\t}\n};\n// src/file/paragraph/links/external-hyperlink-target.ts\n/**\n* External hyperlink targets and fragments for WordprocessingML.\n*\n* Word appends the anchor to the relationship target, separated by a # character.\n* Reference: https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/df06e423-11a6-4a36-bfb3-82139e531781\n*\n* @module\n*/\nvar MAX_ANCHOR_LENGTH = 255;\n/**\n* Splits a nonempty fragment that fits Word's anchor limit without decoding or normalizing either part.\n* Longer fragments stay in the original relationship URI, retaining its existing multi-hash limitations.\n*/\nvar externalHyperlinkTarget = (link) => {\n\tconst index = link.indexOf(\"#\");\n\tconst fragmentLength = link.length - index - 1;\n\treturn index > 0 && fragmentLength > 0 && fragmentLength <= MAX_ANCHOR_LENGTH ? {\n\t\ttarget: link.slice(0, index),\n\t\tanchor: link.slice(index + 1)\n\t} : { target: link };\n};\n// src/file/numbering/list-key.ts\n/**\n* The key a list's numbering id is found by while a document is written, which paragraphs write as a placeholder for it.\n*\n* Internal: not exported from the numbering module.\n*\n* @module\n*/\n/**\n* Gives the key of a list of a numbering reference: the list of an `instance` paragraphs give, or a list a paragraph\n* restarts with `restart`, which has an id of its own so it is never mistaken for one of the numbered instances.\n*\n* @param reference - The list's numbering reference\n* @param instance - The `instance` that paragraphs give, used when the list isn't a restarted one\n* @param restartedListId - For a list a paragraph restarts, the id of that restart\n* @returns The list's key\n*/\nvar listKey = (reference, instance, restartedListId) => restartedListId === void 0 ? `${reference}-${instance}` : `${reference}-restart ${restartedListId}`;\n// src/file/fonts/font.ts\n/**\n* Font module for WordprocessingML documents.\n*\n* Provides support for font definitions and embedded fonts.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_font-1.html\n*\n* @module\n*/\n/**\n* Character set constants for font definitions.\n* Maps character set names to their hexadecimal identifiers.\n*\n* @publicApi\n*/\nvar CharacterSet = {\n\tANSI: \"00\",\n\tDEFAULT: \"01\",\n\tSYMBOL: \"02\",\n\tMAC: \"4D\",\n\tJIS: \"80\",\n\tHANGUL: \"81\",\n\tJOHAB: \"82\",\n\tGB_2312: \"86\",\n\tCHINESEBIG5: \"88\",\n\tGREEK: \"A1\",\n\tTURKISH: \"A2\",\n\tVIETNAMESE: \"A3\",\n\tHEBREW: \"B1\",\n\tARABIC: \"B2\",\n\tBALTIC: \"BA\",\n\tRUSSIAN: \"CC\",\n\tTHAI: \"DE\",\n\tEASTEUROPE: \"EE\",\n\tOEM: \"FF\"\n};\n/**\n* Creates a font relationship element for embedding fonts.\n*/\nvar createFontRelationship = ({ id, fontKey, subsetted }, name) => new BuilderElement({\n\tname,\n\tattributes: _objectSpread2({ id: {\n\t\tkey: \"r:id\",\n\t\tvalue: id\n\t} }, fontKey ? { fontKey: {\n\t\tkey: \"w:fontKey\",\n\t\tvalue: `{${fontKey.toUpperCase()}}`\n\t} } : {}),\n\tchildren: [...subsetted ? [new OnOffElement(\"w:subsetted\", subsetted)] : []]\n});\n/**\n* Creates a font element with the specified options.\n*\n* This function builds a complete font definition including optional embedded font files,\n* font signature, character set, and other font properties.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_font-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Font\">\n* <xsd:sequence>\n* <xsd:element name=\"altName\" type=\"CT_String\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"panose1\" type=\"CT_Panose\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"charset\" type=\"CT_Charset\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"family\" type=\"CT_FontFamily\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"notTrueType\" type=\"CT_OnOff\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"pitch\" type=\"CT_Pitch\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"sig\" type=\"CT_FontSig\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"embedRegular\" type=\"CT_FontRel\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"embedBold\" type=\"CT_FontRel\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"embedItalic\" type=\"CT_FontRel\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"embedBoldItalic\" type=\"CT_FontRel\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"name\" type=\"s:ST_String\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const font = createFont({\n* name: \"Arial\",\n* family: \"swiss\",\n* pitch: \"variable\",\n* charset: CharacterSet.ANSI\n* });\n* ```\n*/\nvar createFont = ({ name, altName, panose1, charset, family, notTrueType, pitch, sig, embedRegular, embedBold, embedItalic, embedBoldItalic }) => new BuilderElement({\n\tname: \"w:font\",\n\tattributes: { name: {\n\t\tkey: \"w:name\",\n\t\tvalue: name\n\t} },\n\tchildren: [\n\t\t...altName ? [createStringElement(\"w:altName\", altName)] : [],\n\t\t...panose1 ? [createStringElement(\"w:panose1\", panose1)] : [],\n\t\t...charset ? [createStringElement(\"w:charset\", charset)] : [],\n\t\t...family ? [createStringElement(\"w:family\", family)] : [],\n\t\t...notTrueType ? [new OnOffElement(\"w:notTrueType\", notTrueType)] : [],\n\t\t...pitch ? [createStringElement(\"w:pitch\", pitch)] : [],\n\t\t...sig ? [new BuilderElement({\n\t\t\tname: \"w:sig\",\n\t\t\tattributes: {\n\t\t\t\tusb0: {\n\t\t\t\t\tkey: \"w:usb0\",\n\t\t\t\t\tvalue: sig.usb0\n\t\t\t\t},\n\t\t\t\tusb1: {\n\t\t\t\t\tkey: \"w:usb1\",\n\t\t\t\t\tvalue: sig.usb1\n\t\t\t\t},\n\t\t\t\tusb2: {\n\t\t\t\t\tkey: \"w:usb2\",\n\t\t\t\t\tvalue: sig.usb2\n\t\t\t\t},\n\t\t\t\tusb3: {\n\t\t\t\t\tkey: \"w:usb3\",\n\t\t\t\t\tvalue: sig.usb3\n\t\t\t\t},\n\t\t\t\tcsb0: {\n\t\t\t\t\tkey: \"w:csb0\",\n\t\t\t\t\tvalue: sig.csb0\n\t\t\t\t},\n\t\t\t\tcsb1: {\n\t\t\t\t\tkey: \"w:csb1\",\n\t\t\t\t\tvalue: sig.csb1\n\t\t\t\t}\n\t\t\t}\n\t\t})] : [],\n\t\t...embedRegular ? [createFontRelationship(embedRegular, \"w:embedRegular\")] : [],\n\t\t...embedBold ? [createFontRelationship(embedBold, \"w:embedBold\")] : [],\n\t\t...embedItalic ? [createFontRelationship(embedItalic, \"w:embedItalic\")] : [],\n\t\t...embedBoldItalic ? [createFontRelationship(embedBoldItalic, \"w:embedBoldItalic\")] : []\n\t]\n});\n// src/file/fonts/create-embedded-font.ts\n/**\n* Creates an embedded font with default settings.\n*\n* This helper function creates a font definition with standard font signature\n* values that work for most common fonts. The signature specifies Unicode\n* and code page ranges supported by the font.\n*\n* @returns XmlComponent representing the font definition\n*\n* @example\n* ```typescript\n* const font = createEmbeddedFont({\n* name: \"Arial\",\n* embedRegular: { id: \"rId1\", fontKey: \"12345678-1234-1234-1234-123456789012\" },\n* embedBold: { id: \"rId2\", fontKey: \"12345678-1234-1234-1234-123456789013\" },\n* });\n* ```\n*/\nvar createEmbeddedFont = ({ name, characterSet, embedRegular, embedBold, embedItalic, embedBoldItalic }) => createFont({\n\tname,\n\tsig: {\n\t\tusb0: \"E0002AFF\",\n\t\tusb1: \"C000247B\",\n\t\tusb2: \"00000009\",\n\t\tusb3: \"00000000\",\n\t\tcsb0: \"000001FF\",\n\t\tcsb1: \"00000000\"\n\t},\n\tcharset: characterSet,\n\tfamily: \"auto\",\n\tpitch: \"variable\",\n\tembedRegular,\n\tembedBold,\n\tembedItalic,\n\tembedBoldItalic\n});\n// src/file/fonts/font-table.ts\n/**\n* Font Table module for WordprocessingML documents.\n*\n* This module provides support for embedding fonts in the document.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_fonts.html\n*\n* @module\n*/\n/**\n* Creates a font table element containing embedded fonts.\n*\n* The font table allows custom fonts to be embedded in the document\n* so they display correctly even if not installed on the viewer's system.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_fonts.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FontsList\">\n* <xsd:sequence>\n* <xsd:element name=\"font\" type=\"CT_Font\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createFontTable = (fonts) => new BuilderElement({\n\tname: \"w:fonts\",\n\tattributes: {\n\t\tmc: {\n\t\t\tkey: \"xmlns:mc\",\n\t\t\tvalue: \"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n\t\t},\n\t\tr: {\n\t\t\tkey: \"xmlns:r\",\n\t\t\tvalue: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n\t\t},\n\t\tw: {\n\t\t\tkey: \"xmlns:w\",\n\t\t\tvalue: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"\n\t\t},\n\t\tw14: {\n\t\t\tkey: \"xmlns:w14\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2010/wordml\"\n\t\t},\n\t\tw15: {\n\t\t\tkey: \"xmlns:w15\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2012/wordml\"\n\t\t},\n\t\tw16cex: {\n\t\t\tkey: \"xmlns:w16cex\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2018/wordml/cex\"\n\t\t},\n\t\tw16cid: {\n\t\t\tkey: \"xmlns:w16cid\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2016/wordml/cid\"\n\t\t},\n\t\tw16: {\n\t\t\tkey: \"xmlns:w16\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2018/wordml\"\n\t\t},\n\t\tw16sdtdh: {\n\t\t\tkey: \"xmlns:w16sdtdh\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash\"\n\t\t},\n\t\tw16se: {\n\t\t\tkey: \"xmlns:w16se\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word/2015/wordml/symex\"\n\t\t},\n\t\tIgnorable: {\n\t\t\tkey: \"mc:Ignorable\",\n\t\t\tvalue: \"w14 w15 w16se w16cid w16 w16cex w16sdtdh\"\n\t\t}\n\t},\n\tchildren: fonts.map(createEmbeddedFont)\n});\n// src/file/fonts/font-wrapper.ts\nvar FACES = [\n\t{\n\t\toption: \"data\",\n\t\telement: \"embedRegular\",\n\t\tbold: false,\n\t\titalic: false\n\t},\n\t{\n\t\toption: \"bold\",\n\t\telement: \"embedBold\",\n\t\tbold: true,\n\t\titalic: false\n\t},\n\t{\n\t\toption: \"italic\",\n\t\telement: \"embedItalic\",\n\t\tbold: false,\n\t\titalic: true\n\t},\n\t{\n\t\toption: \"boldItalic\",\n\t\telement: \"embedBoldItalic\",\n\t\tbold: true,\n\t\titalic: true\n\t}\n];\n/**\n* Wrapper class for managing the font table and its relationships.\n*\n* Creates a font table with embedded font files and manages the relationships\n* required for font embedding. Each face of a font is embedded as a file of its own,\n* with a unique key for obfuscation.\n*\n* @example\n* ```typescript\n* const fontWrapper = new FontWrapper([\n* { name: \"CustomFont\", data: fontBuffer, bold: boldFontBuffer }\n* ]);\n* ```\n*/\nvar FontWrapper = class {\n\tconstructor(options) {\n\t\t_defineProperty(this, \"options\", void 0);\n\t\t_defineProperty(this, \"fontTable\", void 0);\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** @deprecated Use `files`, which has the file and key of each face a font embeds, not only the regular face's key */\n\t\t\t\"fontOptionsWithKey\",\n\t\t\t[]\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The files of the faces the fonts embed, in order: the Nth is `fonts/font<N>.odttf`, with the relationship `rId<N>` */\n\t\t\t\"files\",\n\t\t\t[]\n\t\t);\n\t\tthis.options = options;\n\t\tconst faces = options.map((font) => FACES.flatMap(({ option, element, bold, italic }) => {\n\t\t\tconst data = font[option];\n\t\t\treturn data ? [{\n\t\t\t\telement,\n\t\t\t\tfile: {\n\t\t\t\t\tname: font.name,\n\t\t\t\t\tdata,\n\t\t\t\t\tbold,\n\t\t\t\t\titalic,\n\t\t\t\t\tfontKey: uniqueUuid()\n\t\t\t\t}\n\t\t\t}] : [];\n\t\t}));\n\t\tthis.files = faces.flatMap((ofFont) => ofFont.map(({ file }) => file));\n\t\tthis.fontOptionsWithKey = options.map((font, index) => _objectSpread2(_objectSpread2({}, font), {}, { fontKey: faces[index][0].file.fontKey }));\n\t\tthis.fontTable = createFontTable(options.map((font, index) => _objectSpread2({\n\t\t\tname: font.name,\n\t\t\tcharacterSet: font.characterSet\n\t\t}, Object.fromEntries(faces[index].map(({ element, file }) => [element, {\n\t\t\tid: `rId${this.files.indexOf(file) + 1}`,\n\t\t\tfontKey: file.fontKey\n\t\t}])))));\n\t\tthis.relationships = new Relationships();\n\t\tfor (let i = 0; i < this.files.length; i++) this.relationships.addRelationship(i + 1, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font\", `fonts/font${i + 1}.odttf`);\n\t}\n\tget View() {\n\t\treturn this.fontTable;\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n};\n// src/file/paragraph/formatting/word-wrap.ts\n/**\n* Word wrap module for WordprocessingML documents.\n*\n* This module provides word wrap settings for paragraphs.\n*\n* Reference: http://officeopenxml.com/WPalignment.php\n*\n* @see http://officeopenxml.com/WPtableAlignment.php\n*\n* @module\n*/\n/**\n* Creates word wrap settings element for a WordprocessingML document.\n*\n* The wordWrap element specifies whether word wrap should be disabled\n* for the paragraph.\n*/\nvar createWordWrap = () => new BuilderElement({\n\tname: \"w:wordWrap\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: 0\n\t} }\n});\n// src/file/paragraph/frame/frame-properties.ts\n/**\n* Drop cap types for paragraph frames.\n*\n* Drop caps are decorative large initial letters that span multiple lines at the\n* beginning of a paragraph. This enum defines how the drop cap should be positioned.\n*/\nvar DropCapType = {\n\t/** No drop cap effect */\n\tNONE: \"none\",\n\t/** Drop cap that drops down into the paragraph text */\n\tDROP: \"drop\",\n\t/** Drop cap that extends into the margin */\n\tMARGIN: \"margin\"\n};\n/**\n* Frame anchor types specifying what the frame should be anchored relative to.\n*\n* Determines the reference point for frame positioning (horizontal and vertical).\n*/\nvar FrameAnchorType = {\n\t/** Anchor relative to the page margin */\n\tMARGIN: \"margin\",\n\t/** Anchor relative to the page edge */\n\tPAGE: \"page\",\n\t/** Anchor relative to the text column */\n\tTEXT: \"text\"\n};\n/**\n* Text wrapping types for frames.\n*\n* Controls how surrounding text wraps around the frame.\n*/\nvar FrameWrap = {\n\t/** Wrap text around the frame on all sides */\n\tAROUND: \"around\",\n\t/** Automatic wrapping based on available space */\n\tAUTO: \"auto\",\n\t/** No text wrapping */\n\tNONE: \"none\",\n\t/** Do not allow text beside the frame */\n\tNOT_BESIDE: \"notBeside\",\n\t/** Allow text to flow through the frame */\n\tTHROUGH: \"through\",\n\t/** Wrap text tightly around the frame */\n\tTIGHT: \"tight\"\n};\n/**\n* Creates a frame properties XML component for paragraph text frames.\n*\n* Frames allow paragraphs to be positioned absolutely on the page with text wrapping.\n* They support both coordinate-based and alignment-based positioning, along with\n* drop cap effects and various text wrapping options.\n*\n* Reference: http://officeopenxml.com/WPparagraph-textFrames.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FramePr\">\n* <xsd:attribute name=\"dropCap\" type=\"ST_DropCap\" use=\"optional\"/>\n* <xsd:attribute name=\"lines\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"w\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"h\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"vSpace\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"hSpace\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"wrap\" type=\"ST_Wrap\" use=\"optional\"/>\n* <xsd:attribute name=\"hAnchor\" type=\"ST_HAnchor\" use=\"optional\"/>\n* <xsd:attribute name=\"vAnchor\" type=\"ST_VAnchor\" use=\"optional\"/>\n* <xsd:attribute name=\"x\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"xAlign\" type=\"s:ST_XAlign\" use=\"optional\"/>\n* <xsd:attribute name=\"y\" type=\"ST_SignedTwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"yAlign\" type=\"s:ST_YAlign\" use=\"optional\"/>\n* <xsd:attribute name=\"hRule\" type=\"ST_HeightRule\" use=\"optional\"/>\n* <xsd:attribute name=\"anchorLock\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Frame with absolute positioning\n* createFrameProperties({\n* type: \"absolute\",\n* position: { x: 1440, y: 1440 }, // 1 inch from anchor\n* width: 2880, // 2 inches\n* height: 1440, // 1 inch\n* anchor: {\n* horizontal: FrameAnchorType.PAGE,\n* vertical: FrameAnchorType.PAGE,\n* },\n* wrap: FrameWrap.AROUND,\n* });\n*\n* // Frame with alignment positioning and drop cap\n* createFrameProperties({\n* type: \"alignment\",\n* alignment: {\n* x: HorizontalPositionAlign.LEFT,\n* y: VerticalPositionAlign.TOP,\n* },\n* width: 1440,\n* height: 1440,\n* anchor: {\n* horizontal: FrameAnchorType.TEXT,\n* vertical: FrameAnchorType.TEXT,\n* },\n* dropCap: DropCapType.DROP,\n* lines: 3,\n* });\n* ```\n*\n* @param options - Frame positioning and formatting options\n* @returns XmlComponent representing the frame properties element\n*/\nvar createFrameProperties = (options) => {\n\tvar _options$space, _options$space2;\n\treturn new BuilderElement({\n\t\tname: \"w:framePr\",\n\t\tattributes: {\n\t\t\tanchorLock: {\n\t\t\t\tkey: \"w:anchorLock\",\n\t\t\t\tvalue: options.anchorLock\n\t\t\t},\n\t\t\tdropCap: {\n\t\t\t\tkey: \"w:dropCap\",\n\t\t\t\tvalue: options.dropCap\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\tkey: \"w:w\",\n\t\t\t\tvalue: options.width\n\t\t\t},\n\t\t\theight: {\n\t\t\t\tkey: \"w:h\",\n\t\t\t\tvalue: options.height\n\t\t\t},\n\t\t\tx: {\n\t\t\t\tkey: \"w:x\",\n\t\t\t\tvalue: options.position ? options.position.x : void 0\n\t\t\t},\n\t\t\ty: {\n\t\t\t\tkey: \"w:y\",\n\t\t\t\tvalue: options.position ? options.position.y : void 0\n\t\t\t},\n\t\t\tanchorHorizontal: {\n\t\t\t\tkey: \"w:hAnchor\",\n\t\t\t\tvalue: options.anchor.horizontal\n\t\t\t},\n\t\t\tanchorVertical: {\n\t\t\t\tkey: \"w:vAnchor\",\n\t\t\t\tvalue: options.anchor.vertical\n\t\t\t},\n\t\t\tspaceHorizontal: {\n\t\t\t\tkey: \"w:hSpace\",\n\t\t\t\tvalue: (_options$space = options.space) === null || _options$space === void 0 ? void 0 : _options$space.horizontal\n\t\t\t},\n\t\t\tspaceVertical: {\n\t\t\t\tkey: \"w:vSpace\",\n\t\t\t\tvalue: (_options$space2 = options.space) === null || _options$space2 === void 0 ? void 0 : _options$space2.vertical\n\t\t\t},\n\t\t\trule: {\n\t\t\t\tkey: \"w:hRule\",\n\t\t\t\tvalue: options.rule\n\t\t\t},\n\t\t\talignmentX: {\n\t\t\t\tkey: \"w:xAlign\",\n\t\t\t\tvalue: options.alignment ? options.alignment.x : void 0\n\t\t\t},\n\t\t\talignmentY: {\n\t\t\t\tkey: \"w:yAlign\",\n\t\t\t\tvalue: options.alignment ? options.alignment.y : void 0\n\t\t\t},\n\t\t\tlines: {\n\t\t\t\tkey: \"w:lines\",\n\t\t\t\tvalue: options.lines\n\t\t\t},\n\t\t\twrap: {\n\t\t\t\tkey: \"w:wrap\",\n\t\t\t\tvalue: options.wrap\n\t\t\t}\n\t\t}\n\t});\n};\n// src/file/paragraph/properties.ts\n/**\n* The restarted list that paragraphs leaving out `instance` are in, by list reference, for each part being written, as\n* the id of the restart. A paragraph that restarts a list moves the paragraphs after it in the part onto its own list,\n* and before any does, they are in instance 0. Each part is written\n* with a context of its own, so the lists of one part, or of the same part written again, start from the first list.\n*/\nvar currentRestartedLists = /* @__PURE__ */ new WeakMap();\nvar restartedListIds = uniqueNumericIdCreator();\n/**\n* The alignment to write for each side of the page in a right-to-left paragraph.\n*\n* Word and LibreOffice read `w:jc` `left` and `right` as the start and end of the paragraph, the same as\n* `start` and `end` (ISO/IEC 29500-4 maps the transitional `left` and `right` onto the strict `start` and `end`,\n* and [MS-OE376] 2.3.1.13 notes the same for Word 2007). So in a `w:bidi` paragraph `left` lands on the right\n* side of the page. Swapping keeps `AlignmentType.LEFT` and `AlignmentType.RIGHT` on the side of the page they name.\n* `left` and `right` are written rather than `end` and `start` because Word 2007 does not know `start` and `end`.\n*/\nvar RIGHT_TO_LEFT_ALIGNMENTS = {\n\tleft: \"right\",\n\tright: \"left\"\n};\n/**\n* Represents paragraph properties (pPr) in a WordprocessingML document.\n*\n* The paragraph properties element specifies all formatting applied to a paragraph,\n* including alignment, spacing, indentation, borders, numbering, and style references.\n*\n* Reference: http://officeopenxml.com/WPparagraphProperties.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PPr\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_PPrBase\">\n* <xsd:sequence>\n* <xsd:element name=\"rPr\" type=\"CT_ParaRPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"sectPr\" type=\"CT_SectPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"pPrChange\" type=\"CT_PPrChange\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* The base type CT_PPrBase contains:\n* ```xml\n* <xsd:complexType name=\"CT_PPrBase\">\n* <xsd:sequence>\n* <xsd:element name=\"pStyle\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"keepNext\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"keepLines\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"pageBreakBefore\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"framePr\" type=\"CT_FramePr\" minOccurs=\"0\"/>\n* <xsd:element name=\"widowControl\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"numPr\" type=\"CT_NumPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"suppressLineNumbers\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"pBdr\" type=\"CT_PBdr\" minOccurs=\"0\"/>\n* <xsd:element name=\"shd\" type=\"CT_Shd\" minOccurs=\"0\"/>\n* <xsd:element name=\"tabs\" type=\"CT_Tabs\" minOccurs=\"0\"/>\n* <xsd:element name=\"suppressAutoHyphens\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"kinsoku\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"wordWrap\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"overflowPunct\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"topLinePunct\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"autoSpaceDE\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"autoSpaceDN\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"bidi\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"adjustRightInd\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"snapToGrid\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"spacing\" type=\"CT_Spacing\" minOccurs=\"0\"/>\n* <xsd:element name=\"ind\" type=\"CT_Ind\" minOccurs=\"0\"/>\n* <xsd:element name=\"contextualSpacing\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"mirrorIndents\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"suppressOverlap\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"jc\" type=\"CT_Jc\" minOccurs=\"0\"/>\n* <xsd:element name=\"textDirection\" type=\"CT_TextDirection\" minOccurs=\"0\"/>\n* <xsd:element name=\"textAlignment\" type=\"CT_TextAlignment\" minOccurs=\"0\"/>\n* <xsd:element name=\"textboxTightWrap\" type=\"CT_TextboxTightWrap\" minOccurs=\"0\"/>\n* <xsd:element name=\"outlineLvl\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"divId\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"cnfStyle\" type=\"CT_Cnf\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Basic paragraph with alignment\n* new ParagraphProperties({\n* alignment: AlignmentType.CENTER,\n* });\n*\n* // Formatted paragraph with spacing and indentation\n* new ParagraphProperties({\n* alignment: AlignmentType.JUSTIFIED,\n* spacing: { before: 200, after: 200, line: 360 },\n* indent: { left: 720, right: 720 },\n* });\n*\n* // Heading with outline level\n* new ParagraphProperties({\n* heading: HeadingLevel.HEADING_1,\n* outlineLevel: 0,\n* keepNext: true,\n* });\n*\n* // Numbered list item\n* new ParagraphProperties({\n* numbering: {\n* reference: \"my-numbering\",\n* level: 0,\n* instance: 0,\n* },\n* });\n*\n* // Paragraph with borders and shading\n* new ParagraphProperties({\n* border: {\n* top: { style: BorderStyle.SINGLE, size: 6, color: \"000000\" },\n* bottom: { style: BorderStyle.SINGLE, size: 6, color: \"000000\" },\n* },\n* shading: { fill: \"EEEEEE\" },\n* });\n* ```\n*/\nvar ParagraphProperties = class extends IgnoreIfEmptyXmlComponent {\n\t/**\n\t* Creates paragraph properties.\n\t*\n\t* @param options - The paragraph formatting to emit\n\t* @param config - Controls how the element is assembled; see {@link IParagraphPropertiesConfig}\n\t*/\n\tconstructor(options, { implicitListParagraphStyle = true, inListOrder = true } = {}) {\n\t\tsuper(\"w:pPr\", options === null || options === void 0 ? void 0 : options.includeIfEmpty);\n\t\t_defineProperty(this, \"numbering\", void 0);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The paragraph's `w:numPr`, which is written again with its list's id each time the paragraph is written */\n\t\t\t\"numberProperties\",\n\t\t\tvoid 0\n\t\t);\n\t\tif (!options) return this;\n\t\tif (options.heading) this.push(createParagraphStyle(options.heading));\n\t\tif (implicitListParagraphStyle) {\n\t\t\tif (options.bullet) this.push(createParagraphStyle(\"ListParagraph\"));\n\t\t\tif (options.numbering && !options.numbering.custom && !options.style && !options.heading) this.push(createParagraphStyle(\"ListParagraph\"));\n\t\t}\n\t\tif (options.style) this.push(createParagraphStyle(options.style));\n\t\tif (options.keepNext !== void 0) this.push(new OnOffElement(\"w:keepNext\", options.keepNext));\n\t\tif (options.keepLines !== void 0) this.push(new OnOffElement(\"w:keepLines\", options.keepLines));\n\t\tif (options.pageBreakBefore) this.push(new PageBreakBefore());\n\t\tif (options.frame) this.push(createFrameProperties(options.frame));\n\t\tif (options.widowControl !== void 0) this.push(new OnOffElement(\"w:widowControl\", options.widowControl));\n\t\tif (options.bullet) this.push(new NumberProperties(1, options.bullet.level));\n\t\tif (options.numbering) {\n\t\t\tconst { reference: list, instance, level, restart } = options.numbering;\n\t\t\tconst reference = typeof list === \"string\" ? list : list.reference;\n\t\t\tconst numberProperties = new NumberProperties(listKey(reference, instance !== null && instance !== void 0 ? instance : 0), level);\n\t\t\tthis.numbering = {\n\t\t\t\treference,\n\t\t\t\tlevel,\n\t\t\t\tinstance,\n\t\t\t\trestartedListId: restart && inListOrder && instance === void 0 ? restartedListIds() : void 0,\n\t\t\t\tdefinition: typeof list === \"string\" ? void 0 : list\n\t\t\t};\n\t\t\tthis.numberProperties = numberProperties;\n\t\t\tthis.push(numberProperties);\n\t\t} else if (options.numbering === false) this.push(new NumberProperties(0, 0));\n\t\tif (options.border) this.push(new Border(options.border));\n\t\tif (options.thematicBreak) this.push(new ThematicBreak());\n\t\tif (options.shading) this.push(createShading(options.shading));\n\t\tif (options.wordWrap) this.push(createWordWrap());\n\t\tif (options.overflowPunctuation) this.push(new OnOffElement(\"w:overflowPunct\", options.overflowPunctuation));\n\t\t/**\n\t\t* FIX: Multitab support for Libre Writer\n\t\t* Ensure there is only one w:tabs tag with multiple w:tab\n\t\t*/\n\t\tconst tabDefinitions = [\n\t\t\t...options.rightTabStop !== void 0 ? [{\n\t\t\t\ttype: TabStopType.RIGHT,\n\t\t\t\tposition: options.rightTabStop\n\t\t\t}] : [],\n\t\t\t...options.tabStops ? options.tabStops : [],\n\t\t\t...options.leftTabStop !== void 0 ? [{\n\t\t\t\ttype: TabStopType.LEFT,\n\t\t\t\tposition: options.leftTabStop\n\t\t\t}] : []\n\t\t];\n\t\tif (tabDefinitions.length > 0) this.push(createTabStop(tabDefinitions));\n\t\t/**\n\t\t* FIX - END\n\t\t*/\n\t\tif (options.bidirectional !== void 0) this.push(new OnOffElement(\"w:bidi\", options.bidirectional));\n\t\tif (options.spacing) this.push(createSpacing(options.spacing));\n\t\tif (options.indent) this.push(createIndent(options.indent));\n\t\tif (options.contextualSpacing !== void 0) this.push(new OnOffElement(\"w:contextualSpacing\", options.contextualSpacing));\n\t\tif (options.alignment) this.push(createAlignment(options.bidirectional && RIGHT_TO_LEFT_ALIGNMENTS[options.alignment] || options.alignment));\n\t\tif (options.outlineLevel !== void 0) this.push(createOutlineLevel(options.outlineLevel));\n\t\tif (options.suppressLineNumbers !== void 0) this.push(new OnOffElement(\"w:suppressLineNumbers\", options.suppressLineNumbers));\n\t\tif (options.autoSpaceEastAsianText !== void 0) this.push(new OnOffElement(\"w:autoSpaceDN\", options.autoSpaceEastAsianText));\n\t\tif (options.run) this.push(new ParagraphRunProperties(options.run));\n\t\tif (options.revision) this.push(new ParagraphPropertiesChange(options.revision));\n\t}\n\t/**\n\t* Adds a property element to the paragraph properties.\n\t*\n\t* @param item - The XML component to add to the paragraph properties\n\t*/\n\tpush(item) {\n\t\tthis.root.push(item);\n\t}\n\t/**\n\t* Adds the section properties (`w:sectPr`) of the section this paragraph ends.\n\t*\n\t* They go after the paragraph's run properties and before its revision (`w:pPrChange`),\n\t* the order CT_PPr gives them.\n\t*\n\t* @param sectionProperties - The properties of the section the paragraph ends\n\t*/\n\taddSectionProperties(sectionProperties) {\n\t\tconst revisionIndex = this.root.findIndex((item) => item instanceof ParagraphPropertiesChange);\n\t\tif (revisionIndex === -1) {\n\t\t\tthis.root.push(sectionProperties);\n\t\t\treturn;\n\t\t}\n\t\tthis.root.splice(revisionIndex, 0, sectionProperties);\n\t}\n\t/**\n\t* Removes the section properties added with {@link addSectionProperties}.\n\t*\n\t* @param sectionProperties - The properties of the section to remove\n\t*/\n\tremoveSectionProperties(sectionProperties) {\n\t\tconst index = this.root.indexOf(sectionProperties);\n\t\tif (index !== -1) this.root.splice(index, 1);\n\t}\n\t/**\n\t* Prepares the paragraph properties for XML serialization.\n\t*\n\t* This method works out which list instance a numbered paragraph is in, from where it is in its part when it\n\t* leaves out `instance`, and creates the concrete numbering instance for it before the properties are converted to XML.\n\t*\n\t* @param context - The XML context containing document and file information\n\t* @returns The prepared XML object, or undefined if the component should be ignored\n\t*/\n\tprepForXml(context) {\n\t\tvar _this$numbering;\n\t\tif (this.numbering) {\n\t\t\tvar _this$numbering$resta, _currentRestartedList;\n\t\t\tconst { reference, level, instance = 0, definition } = this.numbering;\n\t\t\tconst restartedListId = this.numbering.instance === void 0 ? (_this$numbering$resta = this.numbering.restartedListId) !== null && _this$numbering$resta !== void 0 ? _this$numbering$resta : (_currentRestartedList = currentRestartedLists.get(context)) === null || _currentRestartedList === void 0 ? void 0 : _currentRestartedList.get(reference) : void 0;\n\t\t\tif (!(context.viewWrapper instanceof FontWrapper)) context.file.Numbering.createConcreteNumberingInstance(reference, instance, definition, restartedListId);\n\t\t\tconst numberProperties = new NumberProperties(listKey(reference, instance, restartedListId), level);\n\t\t\tthis.root.splice(this.root.indexOf(this.numberProperties), 1, numberProperties);\n\t\t\tthis.numberProperties = numberProperties;\n\t\t}\n\t\tconst result = super.prepForXml(context);\n\t\tif (((_this$numbering = this.numbering) === null || _this$numbering === void 0 ? void 0 : _this$numbering.restartedListId) !== void 0) {\n\t\t\tvar _currentRestartedList2;\n\t\t\tcurrentRestartedLists.set(context, new Map([...(_currentRestartedList2 = currentRestartedLists.get(context)) !== null && _currentRestartedList2 !== void 0 ? _currentRestartedList2 : [], [this.numbering.reference, this.numbering.restartedListId]]));\n\t\t}\n\t\treturn result;\n\t}\n};\nvar ParagraphPropertiesChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:pPrChange\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.root.push(new ParagraphProperties(_objectSpread2(_objectSpread2({}, options), {}, { includeIfEmpty: true }), { inListOrder: false }));\n\t}\n};\n// src/file/paragraph/paragraph.ts\n/**\n* Represents a paragraph in a WordprocessingML document.\n*\n* A paragraph is the primary unit of block-level content in a document and can contain\n* various inline elements such as text runs, images, hyperlinks, and bookmarks.\n*\n* Reference: http://officeopenxml.com/WPparagraph.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_P\">\n* <xsd:sequence>\n* <xsd:element name=\"pPr\" type=\"CT_PPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_PContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"rsidRPr\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidR\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidDel\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidP\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidRDefault\" type=\"ST_LongHexNumber\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Simple paragraph with text\n* new Paragraph(\"Hello World\");\n*\n* // Paragraph with options\n* new Paragraph({\n* children: [new TextRun(\"Hello\"), new TextRun({ text: \"World\", bold: true })],\n* alignment: AlignmentType.CENTER,\n* });\n* ```\n*/\nvar Paragraph = class Paragraph extends FileChild {\n\tconstructor(options) {\n\t\tsuper(\"w:p\");\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The options the paragraph was made with. A paragraph made from a string has it as its `text` */\n\t\t\t\"options\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(this, \"properties\", void 0);\n\t\t_defineProperty(this, \"alignment\", void 0);\n\t\tthis.options = typeof options === \"string\" ? { text: options } : options;\n\t\tif (typeof options === \"string\") {\n\t\t\tthis.alignment = {};\n\t\t\tthis.properties = new ParagraphProperties({});\n\t\t\tthis.root.push(this.properties);\n\t\t\tthis.root.push(new TextRun(options));\n\t\t\treturn this;\n\t\t}\n\t\tthis.alignment = {\n\t\t\talignment: options.alignment,\n\t\t\tbidirectional: options.bidirectional\n\t\t};\n\t\tthis.properties = new ParagraphProperties(options);\n\t\tthis.root.push(this.properties);\n\t\tif (options.text) this.root.push(new TextRun(options.text));\n\t\tif (options.children) for (const child of options.children) {\n\t\t\tif (child instanceof Bookmark) {\n\t\t\t\tthis.root.push(...child.writtenAs);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.root.push(child);\n\t\t}\n\t}\n\tprepForXml(context) {\n\t\tfor (const element of this.root) if (elementOf(element) === \"w:externalHyperlink\") {\n\t\t\tconst index = this.root.indexOf(element);\n\t\t\tconst { options } = element;\n\t\t\tconst { target, anchor } = externalHyperlinkTarget(options.link);\n\t\t\tconst concreteHyperlink = new ConcreteHyperlink(options.children, uniqueId(), anchor, options.link);\n\t\t\tcontext.viewWrapper.Relationships.addRelationship(concreteHyperlink.linkId, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\", target, TargetModeType.EXTERNAL);\n\t\t\tthis.root[index] = concreteHyperlink;\n\t\t}\n\t\treturn super.prepForXml(context);\n\t}\n\t/**\n\t* Ends a section at this paragraph by adding the section's properties to the paragraph's properties,\n\t* as Word does with the last paragraph of each section but the last.\n\t*\n\t* The body adds them only while it is written and removes them afterwards with\n\t* {@link removeSectionProperties}, so the same paragraph can be used in other documents.\n\t*\n\t* @internal\n\t* @param sectionProperties - The properties of the section the paragraph ends\n\t*/\n\taddSectionProperties(sectionProperties) {\n\t\tthis.properties.addSectionProperties(sectionProperties);\n\t}\n\t/**\n\t* Removes the section properties added with {@link addSectionProperties}.\n\t*\n\t* @internal\n\t* @param sectionProperties - The properties of the section to remove\n\t*/\n\tremoveSectionProperties(sectionProperties) {\n\t\tthis.properties.removeSectionProperties(sectionProperties);\n\t}\n\t/**\n\t* The paragraph's alignment and direction, which a table gives the empty paragraphs of the cells it adds below a\n\t* cell merged down rows (`rowSpan`), so that the merged cell is aligned as one.\n\t*\n\t* @internal\n\t*/\n\tget Alignment() {\n\t\treturn this.alignment;\n\t}\n\t/**\n\t* Makes a new paragraph with the paragraph's options and these, which take the place of its own, such as to indent\n\t* the paragraphs a parser made. The paragraph itself is left as it is, and the new one has the same children.\n\t*\n\t* Each option given replaces the paragraph's whole option: to keep the rest of its spacing, give\n\t* `spacing: { ...paragraph.options.spacing, before: 240 }`. An option given as `undefined` is removed.\n\t*\n\t* @example\n\t* ```typescript\n\t* const indented = paragraphs.map((paragraph) => paragraph.with({ indent: { left: 720, right: 720 } }));\n\t* ```\n\t*/\n\twith(options) {\n\t\treturn new Paragraph(_objectSpread2(_objectSpread2({}, this.options), options));\n\t}\n\taddRunToFront(run) {\n\t\tthis.root.splice(1, 0, run);\n\t\treturn this;\n\t}\n};\n// src/file/paragraph/math/math.ts\n/**\n* Office Math module for WordprocessingML documents.\n*\n* This module provides support for mathematical equations and expressions\n* using Office MathML (OMML).\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_oMath-1.html\n*\n* @module\n*/\n/**\n* Represents a mathematical equation in a WordprocessingML document.\n*\n* Math is the container for Office MathML (OMML) content, supporting\n* fractions, radicals, integrals, sums, scripts, and more.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_oMath-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMath\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_OMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Math({\n* children: [\n* new MathFraction({\n* numerator: [new MathRun(\"a\")],\n* denominator: [new MathRun(\"b\")],\n* }),\n* ],\n* });\n* ```\n*/\nvar Math$1 = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:oMath\");\n\t\tfor (const child of options.children) this.root.push(child);\n\t}\n};\n// src/file/paragraph/math/math-text.ts\n/**\n* Math Text module for Office MathML.\n*\n* This module provides the MathText class for text content within math runs.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_t-1.html\n*\n* @module\n*/\n/**\n* Represents text content within a math run.\n*\n* MathText is the leaf element containing actual text characters\n* within a MathRun. It corresponds to the `<m:t>` element.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_t-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Text\">\n* <xsd:simpleContent>\n* <xsd:extension base=\"s:ST_String\">\n* <xsd:attribute ref=\"xml:space\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:simpleContent>\n* </xsd:complexType>\n* ```\n*/\nvar MathText = class extends XmlComponent {\n\tconstructor(text) {\n\t\tsuper(\"m:t\");\n\t\tif (/^[\\s\\u200B]|[\\s\\u200B]$/.test(text)) this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(text);\n\t}\n};\n// src/file/paragraph/math/math-run.ts\n/**\n* Math Run module for Office MathML.\n*\n* This module provides the MathRun class for text content within math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_r-1.html\n*\n* @module\n*/\nvar _excluded$3 = [\n\t\"text\",\n\t\"normalText\",\n\t\"script\",\n\t\"literal\"\n];\nvar STYLES = {\n\tplain: \"p\",\n\tbold: \"b\",\n\titalic: \"i\",\n\tboldItalic: \"bi\"\n};\nvar SCRIPTS = {\n\troman: \"roman\",\n\tscript: \"script\",\n\tfraktur: \"fraktur\",\n\tdoubleStruck: \"double-struck\",\n\tsansSerif: \"sans-serif\",\n\tmonospace: \"monospace\"\n};\nvar createValueElement = (name, value) => new BuilderElement({\n\tname,\n\tattributes: { value: {\n\t\tkey: \"m:val\",\n\t\tvalue\n\t} }\n});\n/**\n* Represents a run of text within a math equation.\n*\n* MathRun is the container for text content in Office MathML,\n* similar to how Run contains text in regular paragraphs.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_r-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_R\">\n* <xsd:sequence>\n* <xsd:element name=\"rPr\" type=\"CT_RPR\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_ScriptStyle\" minOccurs=\"0\"/>\n* <xsd:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\n* <xsd:element ref=\"w:br\"/>\n* <xsd:element name=\"t\" type=\"CT_Text\"/>\n* </xsd:choice>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new MathRun(\"x + y\");\n* new MathRun({ text: \"if \", normalText: true });\n* new MathRun({ text: \"R\", script: \"doubleStruck\" });\n* new MathRun({ text: \"d\", style: \"plain\" });\n* ```\n*/\nvar MathRun = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _rest$style;\n\t\tsuper(\"m:r\");\n\t\tconst _ref = typeof options === \"string\" ? { text: options } : options, { text, normalText, script, literal } = _ref;\n\t\tconst style = (_rest$style = _objectWithoutProperties(_ref, _excluded$3).style) !== null && _rest$style !== void 0 ? _rest$style : script === void 0 || script === \"roman\" ? void 0 : \"plain\";\n\t\tif (normalText && (style !== void 0 || script !== void 0)) throw new Error(\"MathRun: normalText can't be given with style or script, which are for math. Give one or the other\");\n\t\tif (style !== void 0 && !Object.keys(STYLES).includes(style)) throw new Error(`MathRun: style is \"${style}\", which isn't one of ${Object.keys(STYLES).join(\", \")}`);\n\t\tif (script !== void 0 && !Object.keys(SCRIPTS).includes(script)) throw new Error(`MathRun: script is \"${script}\", which isn't one of ${Object.keys(SCRIPTS).join(\", \")}`);\n\t\tconst properties = [\n\t\t\t...literal ? [createValueElement(\"m:lit\", 1)] : [],\n\t\t\t...normalText ? [createValueElement(\"m:nor\", 1)] : [],\n\t\t\t...script === void 0 ? [] : [createValueElement(\"m:scr\", SCRIPTS[script])],\n\t\t\t...style === void 0 ? [] : [createValueElement(\"m:sty\", STYLES[style])]\n\t\t];\n\t\tif (properties.length > 0) this.root.push(new BuilderElement({\n\t\t\tname: \"m:rPr\",\n\t\t\tchildren: properties\n\t\t}));\n\t\tthis.root.push(new MathText(text));\n\t}\n};\n// src/file/paragraph/math/fraction/math-denominator.ts\n/**\n* Math Denominator module for Office MathML fractions.\n*\n* This module provides the denominator element for fractions.\n*\n* @module\n*/\n/**\n* Represents the denominator (bottom part) of a fraction.\n*\n* @internal\n*/\nvar MathDenominator = class extends XmlComponent {\n\tconstructor(children) {\n\t\tsuper(\"m:den\");\n\t\tfor (const child of children) this.root.push(child);\n\t}\n};\n// src/file/paragraph/math/fraction/math-numerator.ts\n/**\n* Math Numerator module for Office MathML fractions.\n*\n* This module provides the numerator element for fractions.\n*\n* @module\n*/\n/**\n* Represents the numerator (top part) of a fraction.\n*\n* @internal\n*/\nvar MathNumerator = class extends XmlComponent {\n\tconstructor(children) {\n\t\tsuper(\"m:num\");\n\t\tfor (const child of children) this.root.push(child);\n\t}\n};\n// src/file/paragraph/math/fraction/math-fraction.ts\n/**\n* Math Fraction module for Office MathML.\n*\n* This module provides the MathFraction class for fraction expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_f-1.html\n*\n* @module\n*/\nvar TYPES = {\n\tstacked: \"bar\",\n\tskewed: \"skw\",\n\tlinear: \"lin\",\n\tnoBar: \"noBar\"\n};\n/**\n* Represents a fraction in a math equation.\n*\n* MathFraction displays a numerator over a denominator with a fraction bar.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_f-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_F\">\n* <xsd:sequence>\n* <xsd:element name=\"fPr\" type=\"CT_FPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"num\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"den\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new MathFraction({\n* numerator: [new MathRun(\"a + b\")],\n* denominator: [new MathRun(\"c\")],\n* });\n*\n* // n over k, as a binomial coefficient, in brackets\n* new MathRoundBrackets({\n* children: [new MathFraction({ numerator: [new MathRun(\"n\")], denominator: [new MathRun(\"k\")], type: \"noBar\" })],\n* });\n* ```\n*/\nvar MathFraction = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:f\");\n\t\tif (options.type !== void 0) {\n\t\t\tif (!Object.keys(TYPES).includes(options.type)) throw new Error(`MathFraction: type is \"${options.type}\", which isn't one of ${Object.keys(TYPES).join(\", \")}`);\n\t\t\tthis.root.push(new BuilderElement({\n\t\t\t\tname: \"m:fPr\",\n\t\t\t\tchildren: [new BuilderElement({\n\t\t\t\t\tname: \"m:type\",\n\t\t\t\t\tattributes: { value: {\n\t\t\t\t\t\tkey: \"m:val\",\n\t\t\t\t\t\tvalue: TYPES[options.type]\n\t\t\t\t\t} }\n\t\t\t\t})]\n\t\t\t}));\n\t\t}\n\t\tthis.root.push(new MathNumerator(options.numerator));\n\t\tthis.root.push(new MathDenominator(options.denominator));\n\t}\n};\n// src/file/paragraph/math/n-ary/math-accent-character.ts\n/**\n* Math Accent Character module for Office MathML.\n*\n* This module provides the accent character for n-ary operators.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_chr-1.html\n*\n* @module\n*/\n/**\n* Creates an accent character element for n-ary operators.\n*\n* This element specifies the character used for the n-ary operator,\n* such as summation (∑), integral (∫), or product (∏) symbols.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_chr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Char\">\n* <xsd:attribute name=\"val\" type=\"ST_Char\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createMathAccentCharacter = ({ accent }) => new BuilderElement({\n\tname: \"m:chr\",\n\tattributes: { accent: {\n\t\tkey: \"m:val\",\n\t\tvalue: accent\n\t} }\n});\n// src/file/paragraph/math/n-ary/math-base.ts\n/**\n* Math Base module for Office MathML.\n*\n* This module provides the base element (m:e) that contains\n* the primary content of math structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_e-1.html\n*\n* @module\n*/\n/**\n* Creates a math base element.\n*\n* The math base (m:e) is used within math structures like fractions,\n* radicals, and n-ary operators to contain the primary expression.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_e-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMathArg\">\n* <xsd:sequence>\n* <xsd:element name=\"argPr\" type=\"CT_OMathArgPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_OMathMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathBase = ({ children }) => new BuilderElement({\n\tname: \"m:e\",\n\tchildren\n});\n// src/file/paragraph/math/n-ary/math-limit-location.ts\n/**\n* Math Limit Location module for Office MathML.\n*\n* This module provides the limit location property for n-ary operators.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_limLoc-1.html\n*\n* @module\n*/\n/**\n* Creates a limit location element for n-ary operators.\n*\n* This element specifies where limits appear relative to the operator:\n* - \"undOvr\": limits appear directly above and below the operator\n* - \"subSup\": limits appear as superscript and subscript\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_limLoc-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_LimLoc\">\n* <xsd:attribute name=\"val\" type=\"ST_LimLoc\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createMathLimitLocation = ({ value }) => new BuilderElement({\n\tname: \"m:limLoc\",\n\tattributes: { value: {\n\t\tkey: \"m:val\",\n\t\tvalue: value || \"undOvr\"\n\t} }\n});\n// src/file/paragraph/math/n-ary/math-sub-script-hide.ts\n/**\n* Math SubScript Hide module for Office MathML.\n*\n* This module provides the element to hide subscripts in n-ary operators.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_subHide-1.html\n*\n* @module\n*/\n/**\n* Creates a subscript hide element for n-ary operators.\n*\n* This element indicates that the subscript (lower limit) should be hidden\n* in n-ary operators when no subscript is provided.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_subHide-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OnOff\">\n* <xsd:attribute name=\"val\" type=\"ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSubScriptHide = () => new BuilderElement({\n\tname: \"m:subHide\",\n\tattributes: { hide: {\n\t\tkey: \"m:val\",\n\t\tvalue: 1\n\t} }\n});\n// src/file/paragraph/math/n-ary/math-super-script-hide.ts\n/**\n* Math SuperScript Hide module for Office MathML.\n*\n* This module provides the element to hide superscripts in n-ary operators.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_supHide-1.html\n*\n* @module\n*/\n/**\n* Creates a superscript hide element for n-ary operators.\n*\n* This element indicates that the superscript (upper limit) should be hidden\n* in n-ary operators when no superscript is provided.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_supHide-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OnOff\">\n* <xsd:attribute name=\"val\" type=\"ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSuperScriptHide = () => new BuilderElement({\n\tname: \"m:supHide\",\n\tattributes: { hide: {\n\t\tkey: \"m:val\",\n\t\tvalue: 1\n\t} }\n});\n// src/file/paragraph/math/n-ary/math-n-ary-properties.ts\n/**\n* Math N-Ary Properties module for Office MathML.\n*\n* This module provides properties for n-ary operators (sum, integral, etc.) in math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_naryPr-1.html\n*\n* @module\n*/\n/**\n* Creates properties for n-ary operator structures.\n*\n* This element specifies properties for n-ary objects like summations\n* and integrals, including the operator character and limit positioning.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_naryPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NaryPr\">\n* <xsd:sequence>\n* <xsd:element name=\"chr\" type=\"CT_Char\" minOccurs=\"0\"/>\n* <xsd:element name=\"limLoc\" type=\"CT_LimLoc\" minOccurs=\"0\"/>\n* <xsd:element name=\"grow\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"subHide\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"supHide\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathNAryProperties = ({ accent, hasSuperScript, hasSubScript, limitLocationVal }) => new BuilderElement({\n\tname: \"m:naryPr\",\n\tchildren: [\n\t\t...!!accent ? [createMathAccentCharacter({ accent })] : [],\n\t\tcreateMathLimitLocation({ value: limitLocationVal }),\n\t\t...!hasSubScript ? [createMathSubScriptHide()] : [],\n\t\t...!hasSuperScript ? [createMathSuperScriptHide()] : []\n\t]\n});\n// src/file/paragraph/math/n-ary/math-sub-script.ts\n/**\n* Math SubScript Element module for Office MathML.\n*\n* This module provides the subscript element for n-ary operators and other structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sub-3.html\n*\n* @module\n*/\n/**\n* Creates a subscript element for math structures.\n*\n* This element contains the subscript content, used in n-ary operators,\n* script objects, and other structures that support subscripts.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sub-3.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMathArg\">\n* <xsd:sequence>\n* <xsd:element name=\"argPr\" type=\"CT_OMathArgPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_OMathMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSubScriptElement = ({ children }) => new BuilderElement({\n\tname: \"m:sub\",\n\tchildren\n});\n// src/file/paragraph/math/n-ary/limit-location-value.ts\nvar LOCATIONS = {\n\taboveBelow: \"undOvr\",\n\tside: \"subSup\"\n};\n/**\n* The value of `m:limLoc` for where limits go, or the default when none is given.\n*\n* @throws If the position isn't one of those allowed, for code that isn't type checked\n*/\nvar limitLocationValue = (owner, limits, defaultValue) => {\n\tif (limits === void 0) return defaultValue;\n\tif (!Object.keys(LOCATIONS).includes(limits)) throw new Error(`${owner}: limits is \"${limits}\", which isn't one of ${Object.keys(LOCATIONS).join(\", \")}`);\n\treturn LOCATIONS[limits];\n};\n// src/file/paragraph/math/n-ary/math-super-script.ts\n/**\n* Math SuperScript Element module for Office MathML.\n*\n* This module provides the superscript element for n-ary operators and other structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sup-3.html\n*\n* @module\n*/\n/**\n* Creates a superscript element for math structures.\n*\n* This element contains the superscript content, used in n-ary operators,\n* script objects, and other structures that support superscripts.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sup-3.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMathArg\">\n* <xsd:sequence>\n* <xsd:element name=\"argPr\" type=\"CT_OMathArgPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_OMathMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSuperScriptElement = ({ children }) => new BuilderElement({\n\tname: \"m:sup\",\n\tchildren\n});\n// src/file/paragraph/math/n-ary/math-sum.ts\n/**\n* Math Sum module for Office MathML.\n*\n* This module provides the MathSum class for summation (Σ) expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_nary-1.html\n*\n* @module\n*/\n/**\n* Represents a summation (Σ) expression in a math equation.\n*\n* MathSum displays the summation symbol with optional lower and upper bounds.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_nary-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Nary\">\n* <xsd:sequence>\n* <xsd:element name=\"naryPr\" type=\"CT_NaryPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"sub\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sup\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Sum from i=1 to n\n* new MathSum({\n* children: [new MathRun(\"x\")],\n* subScript: [new MathRun(\"i=1\")],\n* superScript: [new MathRun(\"n\")],\n* });\n* ```\n*/\nvar MathSum = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$subScript, _options$superScript;\n\t\tsuper(\"m:nary\");\n\t\tthis.root.push(createMathNAryProperties({\n\t\t\taccent: \"∑\",\n\t\t\thasSuperScript: !!options.superScript,\n\t\t\thasSubScript: !!options.subScript,\n\t\t\tlimitLocationVal: limitLocationValue(\"MathSum\", options.limits, \"undOvr\")\n\t\t}));\n\t\tthis.root.push(createMathSubScriptElement({ children: (_options$subScript = options.subScript) !== null && _options$subScript !== void 0 ? _options$subScript : [] }));\n\t\tthis.root.push(createMathSuperScriptElement({ children: (_options$superScript = options.superScript) !== null && _options$superScript !== void 0 ? _options$superScript : [] }));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/n-ary/math-integral.ts\n/**\n* Math Integral module for Office MathML.\n*\n* This module provides the MathIntegral class for integral (∫) expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_nary-1.html\n*\n* @module\n*/\n/**\n* Represents an integral (∫) expression in a math equation.\n*\n* MathIntegral displays the integral symbol with optional bounds.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_nary-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Nary\">\n* <xsd:sequence>\n* <xsd:element name=\"naryPr\" type=\"CT_NaryPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"sub\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sup\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Definite integral from 0 to 1\n* new MathIntegral({\n* children: [new MathRun(\"f(x) dx\")],\n* subScript: [new MathRun(\"0\")],\n* superScript: [new MathRun(\"1\")],\n* });\n* ```\n*/\nvar MathIntegral = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$subScript, _options$superScript;\n\t\tsuper(\"m:nary\");\n\t\tthis.root.push(createMathNAryProperties({\n\t\t\taccent: \"\",\n\t\t\thasSuperScript: !!options.superScript,\n\t\t\thasSubScript: !!options.subScript,\n\t\t\tlimitLocationVal: limitLocationValue(\"MathIntegral\", options.limits, \"subSup\")\n\t\t}));\n\t\tthis.root.push(createMathSubScriptElement({ children: (_options$subScript = options.subScript) !== null && _options$subScript !== void 0 ? _options$subScript : [] }));\n\t\tthis.root.push(createMathSuperScriptElement({ children: (_options$superScript = options.superScript) !== null && _options$superScript !== void 0 ? _options$superScript : [] }));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/n-ary/math-limit.ts\n/**\n* Math Limit module for Office MathML.\n*\n* This module provides the limit element for under/over limit structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_lim-1.html\n*\n* @module\n*/\n/**\n* Represents a limit in a math equation.\n*\n* MathLimit is used within limit structures to specify the limit\n* expression that appears above or below the base.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_lim-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMathArg\">\n* <xsd:sequence>\n* <xsd:element name=\"argPr\" type=\"CT_OMathArgPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_OMathMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar MathLimit = class extends XmlComponent {\n\tconstructor(children) {\n\t\tsuper(\"m:lim\");\n\t\tfor (const child of children) this.root.push(child);\n\t}\n};\n// src/file/paragraph/math/n-ary/math-limit-upper.ts\n/**\n* Math Upper Limit module for Office MathML.\n*\n* This module provides the upper limit structure for math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_limUpp-1.html\n*\n* @module\n*/\n/**\n* Represents an upper limit structure in a math equation.\n*\n* MathLimitUpper displays content with a limit above,\n* commonly used for mathematical notation like lim with conditions above.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_limUpp-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_LimUpp\">\n* <xsd:sequence>\n* <xsd:element name=\"limUppPr\" type=\"CT_LimUppPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"lim\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Expression with limit above\n* new MathLimitUpper({\n* children: [new MathRun(\"max\")],\n* limit: [new MathRun(\"x∈S\")],\n* });\n* ```\n*/\nvar MathLimitUpper = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:limUpp\");\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t\tthis.root.push(new MathLimit(options.limit));\n\t}\n};\n// src/file/paragraph/math/n-ary/math-limit-lower.ts\n/**\n* Math Lower Limit module for Office MathML.\n*\n* This module provides the lower limit structure for math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_limLow-1.html\n*\n* @module\n*/\n/**\n* Represents a lower limit structure in a math equation.\n*\n* MathLimitLower displays content with a limit underneath,\n* commonly used for limits in calculus (e.g., lim with x→0 below).\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_limLow-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_LimLow\">\n* <xsd:sequence>\n* <xsd:element name=\"limLowPr\" type=\"CT_LimLowPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"lim\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // lim with x→0 underneath\n* new MathLimitLower({\n* children: [new MathRun(\"lim\")],\n* limit: [new MathRun(\"x→0\")],\n* });\n* ```\n*/\nvar MathLimitLower = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:limLow\");\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t\tthis.root.push(new MathLimit(options.limit));\n\t}\n};\n// src/file/paragraph/math/script/super-script/math-super-script-function-properties.ts\n/**\n* Math SuperScript Properties module for Office MathML.\n*\n* This module provides properties for superscript structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSupPr-1.html\n*\n* @module\n*/\n/**\n* Creates properties for a superscript structure.\n*\n* This element specifies properties for the superscript object.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSupPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SSupPr\">\n* <xsd:sequence>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSuperScriptProperties = () => new BuilderElement({ name: \"m:sSupPr\" });\n// src/file/paragraph/math/script/super-script/math-super-script-function.ts\n/**\n* Math SuperScript module for Office MathML.\n*\n* This module provides the MathSuperScript class for superscript expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSup-1.html\n*\n* @module\n*/\n/**\n* Represents a superscript expression in a math equation.\n*\n* MathSuperScript displays a base with an exponent, like x².\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSup-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SSup\">\n* <xsd:sequence>\n* <xsd:element name=\"sSupPr\" type=\"CT_SSupPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sup\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // x squared\n* new MathSuperScript({\n* children: [new MathRun(\"x\")],\n* superScript: [new MathRun(\"2\")],\n* });\n* ```\n*/\nvar MathSuperScript = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:sSup\");\n\t\tthis.root.push(createMathSuperScriptProperties());\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t\tthis.root.push(createMathSuperScriptElement({ children: options.superScript }));\n\t}\n};\n// src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.ts\n/**\n* Math SubScript Properties module for Office MathML.\n*\n* This module provides properties for subscript structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSubPr-1.html\n*\n* @module\n*/\n/**\n* Creates properties for a subscript structure.\n*\n* This element specifies properties for the subscript object.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSubPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SSubPr\">\n* <xsd:sequence>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSubScriptProperties = () => new BuilderElement({ name: \"m:sSubPr\" });\n// src/file/paragraph/math/script/sub-script/math-sub-script-function.ts\n/**\n* Math SubScript module for Office MathML.\n*\n* This module provides the MathSubScript class for subscript expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSub-1.html\n*\n* @module\n*/\n/**\n* Represents a subscript expression in a math equation.\n*\n* MathSubScript displays a base with a subscript, like x₁.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSub-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SSub\">\n* <xsd:sequence>\n* <xsd:element name=\"sSubPr\" type=\"CT_SSubPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sub\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // x with subscript 1\n* new MathSubScript({\n* children: [new MathRun(\"x\")],\n* subScript: [new MathRun(\"1\")],\n* });\n* ```\n*/\nvar MathSubScript = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:sSub\");\n\t\tthis.root.push(createMathSubScriptProperties());\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t\tthis.root.push(createMathSubScriptElement({ children: options.subScript }));\n\t}\n};\n// src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.ts\n/**\n* Math Sub-Super-Script Properties module for Office MathML.\n*\n* This module provides properties for combined subscript and superscript structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSubSupPr-1.html\n*\n* @module\n*/\n/**\n* Creates properties for a combined subscript and superscript structure.\n*\n* This element specifies properties for the subscript-superscript object.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSubSupPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SSubSupPr\">\n* <xsd:sequence>\n* <xsd:element name=\"alignScripts\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathSubSuperScriptProperties = () => new BuilderElement({ name: \"m:sSubSupPr\" });\n// src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts\n/**\n* Math SubSuperScript module for Office MathML.\n*\n* This module provides the MathSubSuperScript class for combined subscript/superscript.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSubSup-1.html\n*\n* @module\n*/\n/**\n* Represents a combined subscript and superscript expression in a math equation.\n*\n* MathSubSuperScript displays a base with both a subscript and superscript,\n* commonly used for tensor notation or indexed variables with exponents.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sSubSup-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SSubSup\">\n* <xsd:sequence>\n* <xsd:element name=\"sSubSupPr\" type=\"CT_SSubSupPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sub\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sup\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // x with subscript i and superscript 2\n* new MathSubSuperScript({\n* children: [new MathRun(\"x\")],\n* subScript: [new MathRun(\"i\")],\n* superScript: [new MathRun(\"2\")],\n* });\n* ```\n*/\nvar MathSubSuperScript = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:sSubSup\");\n\t\tthis.root.push(createMathSubSuperScriptProperties());\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t\tthis.root.push(createMathSubScriptElement({ children: options.subScript }));\n\t\tthis.root.push(createMathSuperScriptElement({ children: options.superScript }));\n\t}\n};\n// src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.ts\n/**\n* Math Pre-Sub-Super-Script Properties module for Office MathML.\n*\n* This module provides properties for pre-script structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sPrePr-1.html\n*\n* @module\n*/\n/**\n* Creates properties for a pre-subscript and pre-superscript structure.\n*\n* This element specifies properties for the pre-script object.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sPrePr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SPrePr\">\n* <xsd:sequence>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathPreSubSuperScriptProperties = () => new BuilderElement({ name: \"m:sPrePr\" });\n// src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts\n/**\n* Math Pre-Sub-Super-Script module for Office MathML.\n*\n* This module provides pre-scripts with both subscript and superscript,\n* where the scripts appear before (to the left of) the base.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sPre-1.html\n*\n* @module\n*/\n/**\n* Represents a pre-subscript and pre-superscript expression in a math equation.\n*\n* MathPreSubSuperScript displays a base with both subscript and superscript\n* positioned before (to the left of) the base, commonly used in tensor notation.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_sPre-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SPre\">\n* <xsd:sequence>\n* <xsd:element name=\"sPrePr\" type=\"CT_SPrePr\" minOccurs=\"0\"/>\n* <xsd:element name=\"sub\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"sup\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Pre-scripts for tensor notation\n* new MathPreSubSuperScript({\n* children: [new MathRun(\"T\")],\n* subScript: [new MathRun(\"i\")],\n* superScript: [new MathRun(\"j\")],\n* });\n* ```\n*/\nvar MathPreSubSuperScript = class extends BuilderElement {\n\tconstructor({ children, subScript, superScript }) {\n\t\tsuper({\n\t\t\tname: \"m:sPre\",\n\t\t\tchildren: [\n\t\t\t\tcreateMathPreSubSuperScriptProperties(),\n\t\t\t\tcreateMathSubScriptElement({ children: subScript }),\n\t\t\t\tcreateMathSuperScriptElement({ children: superScript }),\n\t\t\t\tcreateMathBase({ children })\n\t\t\t]\n\t\t});\n\t}\n};\n// src/file/paragraph/math/radical/math-degree.ts\n/**\n* Math Degree module for Office MathML.\n*\n* This module provides the degree element for radical structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_deg-1.html\n*\n* @module\n*/\n/**\n* Represents the degree of a radical (root) in a math equation.\n*\n* MathDegree specifies the degree of the root, such as 3 for cube root.\n* For square roots, this element is typically hidden.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_deg-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMathArg\">\n* <xsd:sequence>\n* <xsd:element name=\"argPr\" type=\"CT_OMathArgPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_OMathMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar MathDegree = class extends XmlComponent {\n\tconstructor(children) {\n\t\tsuper(\"m:deg\");\n\t\tif (!!children) for (const child of children) this.root.push(child);\n\t}\n};\n// src/file/paragraph/math/radical/math-degree-hide.ts\n/**\n* Math Degree Hide module for Office MathML.\n*\n* This module provides the element to hide the degree in radical structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_degHide-1.html\n*\n* @module\n*/\n/**\n* @internal\n*/\nvar MathDegreeHideAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { hide: \"m:val\" });\n\t}\n};\n/**\n* Represents a property to hide the degree in a radical.\n*\n* MathDegreeHide is used in radical properties to hide the degree,\n* typically for square roots where the degree (2) is not displayed.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_degHide-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OnOff\">\n* <xsd:attribute name=\"val\" type=\"ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar MathDegreeHide = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"m:degHide\");\n\t\tthis.root.push(new MathDegreeHideAttributes({ hide: 1 }));\n\t}\n};\n// src/file/paragraph/math/radical/math-radical-properties.ts\n/**\n* Math Radical Properties module for Office MathML.\n*\n* This module provides properties for radical (root) structures in math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_radPr-1.html\n*\n* @module\n*/\n/**\n* Represents properties for a radical structure.\n*\n* This element specifies properties for the radical object,\n* such as whether to hide the degree (for square roots).\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_radPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_RadPr\">\n* <xsd:sequence>\n* <xsd:element name=\"degHide\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar MathRadicalProperties = class extends XmlComponent {\n\tconstructor(hasDegree) {\n\t\tsuper(\"m:radPr\");\n\t\tif (!hasDegree) this.root.push(new MathDegreeHide());\n\t}\n};\n// src/file/paragraph/math/radical/math-radical.ts\n/**\n* Math Radical module for Office MathML.\n*\n* This module provides the MathRadical class for radical (root) expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_rad-1.html\n*\n* @module\n*/\n/**\n* Represents a radical (root) expression in a math equation.\n*\n* MathRadical displays a radical symbol (√) with optional degree for\n* n-th roots (cube root, fourth root, etc.).\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_rad-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Rad\">\n* <xsd:sequence>\n* <xsd:element name=\"radPr\" type=\"CT_RadPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"deg\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Square root of x\n* new MathRadical({ children: [new MathRun(\"x\")] });\n*\n* // Cube root of x\n* new MathRadical({\n* children: [new MathRun(\"x\")],\n* degree: [new MathRun(\"3\")],\n* });\n* ```\n*/\nvar MathRadical = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:rad\");\n\t\tthis.root.push(new MathRadicalProperties(!!options.degree));\n\t\tthis.root.push(new MathDegree(options.degree));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/function/math-function-name.ts\n/**\n* Math Function Name module for Office MathML.\n*\n* This module provides the function name element for function structures.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_fName-1.html\n*\n* @module\n*/\n/**\n* Represents a function name in a math equation.\n*\n* MathFunctionName contains the function name (e.g., sin, cos, log)\n* that appears before the function argument.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_fName-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_OMathArg\">\n* <xsd:sequence>\n* <xsd:element name=\"argPr\" type=\"CT_OMathArgPr\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_OMathMathElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar MathFunctionName = class extends XmlComponent {\n\tconstructor(children) {\n\t\tsuper(\"m:fName\");\n\t\tfor (const child of children) this.root.push(child);\n\t}\n};\n// src/file/paragraph/math/function/math-function-properties.ts\n/**\n* Math Function Properties module for Office MathML.\n*\n* This module provides properties for function structures in math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_funcPr-1.html\n*\n* @module\n*/\n/**\n* Represents properties for a math function structure.\n*\n* This element specifies properties for the function object,\n* such as function name alignment and spacing.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_funcPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FuncPr\">\n* <xsd:sequence>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar MathFunctionProperties = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"m:funcPr\");\n\t}\n};\n// src/file/paragraph/math/function/math-function.ts\n/**\n* Math Function module for Office MathML.\n*\n* This module provides the MathFunction class for function expressions.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_func-1.html\n*\n* @module\n*/\n/**\n* Represents a mathematical function in a math equation.\n*\n* MathFunction displays a function name followed by its argument,\n* such as sin(x), cos(θ), or log(n).\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_func-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Func\">\n* <xsd:sequence>\n* <xsd:element name=\"funcPr\" type=\"CT_FuncPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"fName\" type=\"CT_OMathArg\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // sin(x)\n* new MathFunction({\n* name: [new MathRun(\"sin\")],\n* children: [new MathRun(\"x\")],\n* });\n* ```\n*/\nvar MathFunction = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:func\");\n\t\tthis.root.push(new MathFunctionProperties());\n\t\tthis.root.push(new MathFunctionName(options.name));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/brackets/math-beginning-character.ts\n/**\n* Math Beginning Character module for Office MathML.\n*\n* This module provides the beginning (opening) character for bracket delimiters.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_begChr-1.html\n*\n* @module\n*/\n/**\n* Creates a beginning character element for bracket delimiters.\n*\n* This element specifies the opening/beginning character for a delimiter object,\n* such as \"(\", \"[\", \"{\", or \"⟨\".\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_begChr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Char\">\n* <xsd:attribute name=\"val\" type=\"ST_Char\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createMathBeginningCharacter = ({ character }) => new BuilderElement({\n\tname: \"m:begChr\",\n\tattributes: { character: {\n\t\tkey: \"m:val\",\n\t\tvalue: character\n\t} }\n});\n// src/file/paragraph/math/brackets/math-ending-char.ts\n/**\n* Math Ending Character module for Office MathML.\n*\n* This module provides the ending (closing) character for bracket delimiters.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_endChr-1.html\n*\n* @module\n*/\n/**\n* Creates an ending character element for bracket delimiters.\n*\n* This element specifies the closing/ending character for a delimiter object,\n* such as \")\", \"]\", \"}\", or \"⟩\".\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_endChr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Char\">\n* <xsd:attribute name=\"val\" type=\"ST_Char\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createMathEndingCharacter = ({ character }) => new BuilderElement({\n\tname: \"m:endChr\",\n\tattributes: { character: {\n\t\tkey: \"m:val\",\n\t\tvalue: character\n\t} }\n});\n// src/file/paragraph/math/brackets/math-bracket-properties.ts\n/**\n* Math Bracket Properties module for Office MathML.\n*\n* This module provides properties for bracket delimiters in math equations.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_dPr-1.html\n*\n* @module\n*/\n/**\n* Creates bracket properties for math delimiter objects.\n*\n* This element specifies properties for the delimiter object,\n* including custom beginning and ending characters.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_dPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_DPr\">\n* <xsd:sequence>\n* <xsd:element name=\"begChr\" type=\"CT_Char\" minOccurs=\"0\"/>\n* <xsd:element name=\"sepChr\" type=\"CT_Char\" minOccurs=\"0\"/>\n* <xsd:element name=\"endChr\" type=\"CT_Char\" minOccurs=\"0\"/>\n* <xsd:element name=\"grow\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"shp\" type=\"CT_Shp\" minOccurs=\"0\"/>\n* <xsd:element name=\"ctrlPr\" type=\"CT_CtrlPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMathBracketProperties = ({ characters }) => new BuilderElement({\n\tname: \"m:dPr\",\n\tchildren: !!characters ? [createMathBeginningCharacter({ character: characters.beginningCharacter }), createMathEndingCharacter({ character: characters.endingCharacter })] : []\n});\n// src/file/paragraph/math/brackets/math-round-brackets.ts\n/**\n* Math Round Brackets module for Office MathML.\n*\n* This module provides the MathRoundBrackets class for parentheses.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @module\n*/\n/**\n* Represents round brackets (parentheses) in a math equation.\n*\n* MathRoundBrackets displays content surrounded by parentheses ( ).\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_D\">\n* <xsd:sequence>\n* <xsd:element name=\"dPr\" type=\"CT_DPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"e\" type=\"CT_OMathArg\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new MathRoundBrackets({ children: [new MathRun(\"x + y\")] });\n* ```\n*/\nvar MathRoundBrackets = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:d\");\n\t\tthis.root.push(createMathBracketProperties({}));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/brackets/math-square-brackets.ts\n/**\n* Math Square Brackets module for Office MathML.\n*\n* This module provides the MathSquareBrackets class for square brackets.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @module\n*/\n/**\n* Represents square brackets in a math equation.\n*\n* MathSquareBrackets displays content surrounded by square brackets [ ].\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new MathSquareBrackets({ children: [new MathRun(\"x + y\")] });\n* ```\n*/\nvar MathSquareBrackets = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:d\");\n\t\tthis.root.push(createMathBracketProperties({ characters: {\n\t\t\tbeginningCharacter: \"[\",\n\t\t\tendingCharacter: \"]\"\n\t\t} }));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/brackets/math-curly-brackets.ts\n/**\n* Math Curly Brackets module for Office MathML.\n*\n* This module provides the MathCurlyBrackets class for curly braces.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @module\n*/\n/**\n* Represents curly braces in a math equation.\n*\n* MathCurlyBrackets displays content surrounded by curly braces { }.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new MathCurlyBrackets({ children: [new MathRun(\"x + y\")] });\n* ```\n*/\nvar MathCurlyBrackets = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:d\");\n\t\tthis.root.push(createMathBracketProperties({ characters: {\n\t\t\tbeginningCharacter: \"{\",\n\t\t\tendingCharacter: \"}\"\n\t\t} }));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/paragraph/math/brackets/math-angled-brackets.ts\n/**\n* Math Angled Brackets module for Office MathML.\n*\n* This module provides the MathAngledBrackets class for angle brackets.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @module\n*/\n/**\n* Represents angle brackets in a math equation.\n*\n* MathAngledBrackets displays content surrounded by angle brackets ⟨ ⟩.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-m_d-1.html\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new MathAngledBrackets({ children: [new MathRun(\"x, y\")] });\n* ```\n*/\nvar MathAngledBrackets = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"m:d\");\n\t\tthis.root.push(createMathBracketProperties({ characters: {\n\t\t\tbeginningCharacter: \"⟨\",\n\t\t\tendingCharacter: \"⟩\"\n\t\t} }));\n\t\tthis.root.push(createMathBase({ children: options.children }));\n\t}\n};\n// src/file/vertical-align/vertical-align.ts\n/**\n* Vertical alignment module for WordprocessingML documents.\n*\n* This module provides vertical alignment options for table cells and sections.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_VerticalJc\">\n* <xsd:attribute name=\"val\" type=\"ST_VerticalJc\" use=\"required\"/>\n* </xsd:complexType>\n*\n* <xsd:simpleType name=\"ST_VerticalJc\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"both\"/>\n* <xsd:enumeration value=\"top\"/>\n* <xsd:enumeration value=\"center\"/>\n* <xsd:enumeration value=\"bottom\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @module\n*/\n/**\n* Enumeration for table-cell vertical alignment. Only `top`, `center`, `bottom`\n* are valid according to ECMA-376 (§17.18.87 ST_VerticalJc within `<w:tcPr>`).\n*\n* @publicApi\n*/\nvar VerticalAlignTable = {\n\tTOP: \"top\",\n\tCENTER: \"center\",\n\tBOTTOM: \"bottom\"\n};\n/**\n* Enumeration for section (<w:sectPr>) vertical alignment. Adds `both` on top of\n* the table-cell set (§17.18.87 ST_VerticalJc within <w:sectPr>).\n*\n* @publicApi\n*/\nvar VerticalAlignSection = _objectSpread2(_objectSpread2({}, VerticalAlignTable), {}, { BOTH: \"both\" });\n/**\n* @deprecated Use {@link VerticalAlignTable} for table cells or\n* {@link VerticalAlignSection} for section properties. This alias remains for\n* backward-compatibility and will be removed in the next major release.\n*\n* @publicApi\n*/\nvar VerticalAlign = VerticalAlignSection;\n/**\n* Creates a vertical alignment element in a WordprocessingML document.\n*\n* Used in table cells and sections to control vertical text positioning.\n*\n* @example\n* ```typescript\n* createVerticalAlign(VerticalAlignTable.CENTER);\n* ```\n*/\nvar createVerticalAlign = (value) => new BuilderElement({\n\tname: \"w:vAlign\",\n\tattributes: { verticalAlign: {\n\t\tkey: \"w:val\",\n\t\tvalue\n\t} }\n});\n// src/file/document/body/section-properties/properties/columns.ts\n/**\n* Columns module for WordprocessingML section properties.\n*\n* Defines multi-column layouts within document sections.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* @module\n*/\n/**\n* Creates column layout settings (cols) for a document section.\n*\n* This element defines the multi-column layout properties for a section,\n* including column count, spacing, and whether columns have equal or custom widths.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Columns\">\n* <xsd:sequence minOccurs=\"0\">\n* <xsd:element name=\"col\" type=\"CT_Column\" maxOccurs=\"45\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"equalWidth\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"space\" type=\"s:ST_TwipsMeasure\" use=\"optional\" default=\"720\"/>\n* <xsd:attribute name=\"num\" type=\"ST_DecimalNumber\" use=\"optional\" default=\"1\"/>\n* <xsd:attribute name=\"sep\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Two equal-width columns with separator\n* createColumns({\n* count: 2,\n* space: 720,\n* separate: true,\n* equalWidth: true\n* });\n*\n* // Custom column widths\n* createColumns({\n* equalWidth: false,\n* children: [\n* { width: 3000, space: 720 },\n* { width: 4000, space: 0 }\n* ]\n* });\n* ```\n*/\nvar createColumns = ({ space, count, separate, equalWidth, children }) => new BuilderElement({\n\tname: \"w:cols\",\n\tattributes: {\n\t\tspace: {\n\t\t\tkey: \"w:space\",\n\t\t\tvalue: space === void 0 ? void 0 : twipsMeasureValue(space)\n\t\t},\n\t\tcount: {\n\t\t\tkey: \"w:num\",\n\t\t\tvalue: count === void 0 ? void 0 : decimalNumber(count)\n\t\t},\n\t\tseparate: {\n\t\t\tkey: \"w:sep\",\n\t\t\tvalue: separate\n\t\t},\n\t\tequalWidth: {\n\t\t\tkey: \"w:equalWidth\",\n\t\t\tvalue: equalWidth\n\t\t}\n\t},\n\tchildren: !equalWidth && children ? children : void 0\n});\n// src/file/document/body/section-properties/properties/doc-grid.ts\n/**\n* Specifies the type of the current document grid, which defines the grid behavior.\n*\n* The grid can define a grid which snaps all East Asian characters to grid positions, but leaves Latin text with its default spacing; a grid which adds the specified character pitch to all characters on each row; or a grid which affects only the line pitch for the current section.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_ST_DocGrid_topic_ID0ELYP2.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_DocGrid\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"default\"/>\n* <xsd:enumeration value=\"lines\"/>\n* <xsd:enumeration value=\"linesAndChars\"/>\n* <xsd:enumeration value=\"snapToChars\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*/\nvar DocumentGridType = {\n\t/**\n\t* Specifies that no document grid shall be applied to the contents of the current section in the document.\n\t*/\n\tDEFAULT: \"default\",\n\t/**\n\t* Specifies that the parent section shall have additional line pitch added to each line within it (as specified on the <docGrid> element (§2.6.5)) in order to maintain the specified number of lines per page.\n\t*/\n\tLINES: \"lines\",\n\t/**\n\t* Specifies that the parent section shall have both the additional line pitch and character pitch added to each line and character within it (as specified on the <docGrid> element (§2.6.5)) in order to maintain a specific number of lines per page and characters per line.\n\t*\n\t* When this value is set, the input specified via the user interface may be allowed in exact number of line/character pitch units. */\n\tLINES_AND_CHARS: \"linesAndChars\",\n\t/**\n\t* Specifies that the parent section shall have both the additional line pitch and character pitch added to each line and character within it (as specified on the <docGrid> element (§2.6.5)) in order to maintain a specific number of lines per page and characters per line.\n\t*\n\t* When this value is set, the input specified via the user interface may be restricted to the number of lines per page and characters per line, with the consumer or producer translating this information based on the current font data to get the resulting line and character pitch values\n\t*/\n\tSNAP_TO_CHARS: \"snapToChars\"\n};\n/**\n* This element specifies the settings for the document grid, which enables precise layout of full-width East Asian language characters within a document by specifying the desired number of characters per line and lines per page for all East Asian text content in this section.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_docGrid_topic_ID0EHU5S.html\n*\n* ```xml\n* <xsd:complexType name=\"CT_DocGrid\">\n* <xsd:attribute name=\"type\" type=\"ST_DocGrid\"/>\n* <xsd:attribute name=\"linePitch\" type=\"ST_DecimalNumber\"/>\n* <xsd:attribute name=\"charSpace\" type=\"ST_DecimalNumber\"/>\n* </xsd:complexType>\n* ```\n* @returns\n*/\nvar createDocumentGrid = ({ type, linePitch, charSpace }) => new BuilderElement({\n\tname: \"w:docGrid\",\n\tattributes: {\n\t\ttype: {\n\t\t\tkey: \"w:type\",\n\t\t\tvalue: type\n\t\t},\n\t\tlinePitch: {\n\t\t\tkey: \"w:linePitch\",\n\t\t\tvalue: decimalNumber(linePitch)\n\t\t},\n\t\tcharSpace: {\n\t\t\tkey: \"w:charSpace\",\n\t\t\tvalue: charSpace ? decimalNumber(charSpace) : void 0\n\t\t}\n\t}\n});\n// src/file/document/body/section-properties/properties/header-footer-reference.ts\n/**\n* This simple type specifies the possible types of headers and footers which may be specified for a given header or footer reference in a document. This value determines the page(s) on which the current header or footer shall be displayed.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_ST_HdrFtr_topic_ID0E2UW2.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_HdrFtr\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"even\"/>\n* <xsd:enumeration value=\"default\"/>\n* <xsd:enumeration value=\"first\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*/\nvar HeaderFooterReferenceType = {\n\t/** Specifies that this header or footer shall appear on every page in this section which is not overridden with a specific `even` or `first` page header/footer. In a section with all three types specified, this type shall be used on all odd numbered pages (counting from the `first` page in the section, not the section numbering). */\n\tDEFAULT: \"default\",\n\t/** Specifies that this header or footer shall appear on the first page in this section. The appearance of this header or footer is contingent on the setting of the `titlePg` element (§2.10.6). */\n\tFIRST: \"first\",\n\t/** Specifies that this header or footer shall appear on all even numbered pages in this section (counting from the first page in the section, not the section numbering). The appearance of this header or footer is contingent on the setting of the `evenAndOddHeaders` element (§2.10.1). */\n\tEVEN: \"even\"\n};\nvar HeaderFooterType = {\n\tHEADER: \"w:headerReference\",\n\tFOOTER: \"w:footerReference\"\n};\nvar createHeaderFooterReference = (type, options) => new BuilderElement({\n\tname: type,\n\tattributes: {\n\t\ttype: {\n\t\t\tkey: \"w:type\",\n\t\t\tvalue: options.type || HeaderFooterReferenceType.DEFAULT\n\t\t},\n\t\tid: {\n\t\t\tkey: \"r:id\",\n\t\t\tvalue: `rId${options.id}`\n\t\t}\n\t}\n});\n// src/file/document/body/section-properties/properties/line-number.ts\n/**\n* This simple type specifies when the line numbering in the parent section shall be reset to its restart value. The line numbering increments for each line (even if the line number itself is not displayed) until it reaches the restart point specified by this element.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_ST_LineNumberRestart_topic_ID0EUS42.html\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:simpleType name=\"ST_LineNumberRestart\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"newPage\"/>\n* <xsd:enumeration value=\"newSection\"/>\n* <xsd:enumeration value=\"continuous\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar LineNumberRestartFormat = {\n\t/**\n\t* ## Restart Line Numbering on Each Page\n\t*\n\t* Specifies that line numbering for the parent section shall restart to the starting value whenever a new page is displayed.\n\t*/\n\tNEW_PAGE: \"newPage\",\n\t/**\n\t* ## Restart Line Numbering for Each Section\n\t*\n\t* Specifies that line numbering for the parent section shall restart to the starting value whenever the parent begins.\n\t*/\n\tNEW_SECTION: \"newSection\",\n\t/**\n\t* ## Continue Line Numbering From Previous Section\n\t*\n\t* Specifies that line numbering for the parent section shall continue from the line numbering from the end of the previous section, if any.\n\t*/\n\tCONTINUOUS: \"continuous\"\n};\n/**\n* This element specifies the settings for line numbering to be displayed before each column of text in this section in the document.\n*\n* References:\n* - https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_lnNumType_topic_ID0EVRAT.html\n* - http://officeopenxml.com/WPsectionLineNumbering.php\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:complexType name=\"CT_LineNumber\">\n* <xsd:attribute name=\"countBy\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"start\" type=\"ST_DecimalNumber\" use=\"optional\" default=\"1\"/>\n* <xsd:attribute name=\"distance\" type=\"s:ST_TwipsMeasure\" use=\"optional\"/>\n* <xsd:attribute name=\"restart\" type=\"ST_LineNumberRestart\" use=\"optional\" default=\"newPage\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createLineNumberType = ({ countBy, start, restart, distance }) => new BuilderElement({\n\tname: \"w:lnNumType\",\n\tattributes: {\n\t\tcountBy: {\n\t\t\tkey: \"w:countBy\",\n\t\t\tvalue: countBy === void 0 ? void 0 : decimalNumber(countBy)\n\t\t},\n\t\tstart: {\n\t\t\tkey: \"w:start\",\n\t\t\tvalue: start === void 0 ? void 0 : decimalNumber(start)\n\t\t},\n\t\trestart: {\n\t\t\tkey: \"w:restart\",\n\t\t\tvalue: restart\n\t\t},\n\t\tdistance: {\n\t\t\tkey: \"w:distance\",\n\t\t\tvalue: distance === void 0 ? void 0 : twipsMeasureValue(distance)\n\t\t}\n\t}\n});\n// src/file/document/body/section-properties/properties/note-properties.ts\n/**\n* Where the footnotes of a section are placed.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_FtnPos\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"pageBottom\"/>\n* <xsd:enumeration value=\"beneathText\"/>\n* <xsd:enumeration value=\"sectEnd\"/>\n* <xsd:enumeration value=\"docEnd\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar FootnotePosition = {\n\t/** At the bottom of each page */\n\tPAGE_BOTTOM: \"pageBottom\",\n\t/** Directly below the text on each page */\n\tBENEATH_TEXT: \"beneathText\",\n\t/** At the end of the section */\n\tSECTION_END: \"sectEnd\",\n\t/** At the end of the document */\n\tDOCUMENT_END: \"docEnd\"\n};\n/**\n* Where the endnotes of a section are placed.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_EdnPos\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"sectEnd\"/>\n* <xsd:enumeration value=\"docEnd\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar EndnotePosition = {\n\t/** At the end of the section */\n\tSECTION_END: \"sectEnd\",\n\t/** At the end of the document */\n\tDOCUMENT_END: \"docEnd\"\n};\n/**\n* When the footnote or endnote numbering restarts.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_RestartNumber\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"continuous\"/>\n* <xsd:enumeration value=\"eachSect\"/>\n* <xsd:enumeration value=\"eachPage\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar NoteNumberRestart = {\n\t/** Numbering never restarts */\n\tCONTINUOUS: \"continuous\",\n\t/** Numbering restarts in each section */\n\tEACH_SECTION: \"eachSect\",\n\t/** Numbering restarts on each page */\n\tEACH_PAGE: \"eachPage\"\n};\nvar createNoteProperties = ({ name, position, numberFormat, start, restart }) => new BuilderElement({\n\tname,\n\tchildren: [\n\t\t...position === void 0 ? [] : [new BuilderElement({\n\t\t\tname: \"w:pos\",\n\t\t\tattributes: { val: {\n\t\t\t\tkey: \"w:val\",\n\t\t\t\tvalue: position\n\t\t\t} }\n\t\t})],\n\t\t...numberFormat ? [new BuilderElement({\n\t\t\tname: \"w:numFmt\",\n\t\t\tattributes: {\n\t\t\t\tval: {\n\t\t\t\t\tkey: \"w:val\",\n\t\t\t\t\tvalue: numberFormat.type\n\t\t\t\t},\n\t\t\t\tformat: {\n\t\t\t\t\tkey: \"w:format\",\n\t\t\t\t\tvalue: numberFormat.format\n\t\t\t\t}\n\t\t\t}\n\t\t})] : [],\n\t\t...start === void 0 ? [] : [new BuilderElement({\n\t\t\tname: \"w:numStart\",\n\t\t\tattributes: { val: {\n\t\t\t\tkey: \"w:val\",\n\t\t\t\tvalue: decimalNumber(start)\n\t\t\t} }\n\t\t})],\n\t\t...restart === void 0 ? [] : [new BuilderElement({\n\t\t\tname: \"w:numRestart\",\n\t\t\tattributes: { val: {\n\t\t\t\tkey: \"w:val\",\n\t\t\t\tvalue: restart\n\t\t\t} }\n\t\t})]\n\t]\n});\n/**\n* Creates the footnote properties (footnotePr) of a section.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FtnProps\">\n* <xsd:sequence>\n* <xsd:element name=\"pos\" type=\"CT_FtnPos\" minOccurs=\"0\"/>\n* <xsd:element name=\"numFmt\" type=\"CT_NumFmt\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_FtnEdnNumProps\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Footnotes at the end of the section, numbered a, b, c and restarting in each section\n* createFootnoteProperties({\n* position: FootnotePosition.SECTION_END,\n* numberFormat: { type: NumberFormat.LOWER_LETTER },\n* restart: NoteNumberRestart.EACH_SECTION,\n* });\n* ```\n*/\nvar createFootnoteProperties = (options) => createNoteProperties(_objectSpread2({ name: \"w:footnotePr\" }, options));\n/**\n* Creates the endnote properties (endnotePr) of a section.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_EdnProps\">\n* <xsd:sequence>\n* <xsd:element name=\"pos\" type=\"CT_EdnPos\" minOccurs=\"0\"/>\n* <xsd:element name=\"numFmt\" type=\"CT_NumFmt\" minOccurs=\"0\"/>\n* <xsd:group ref=\"EG_FtnEdnNumProps\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Endnotes at the end of the document, numbered 001, 002, 003\n* createEndnoteProperties({\n* position: EndnotePosition.DOCUMENT_END,\n* numberFormat: { type: NumberFormat.CUSTOM, format: \"001\" },\n* });\n* ```\n*/\nvar createEndnoteProperties = (options) => createNoteProperties(_objectSpread2({ name: \"w:endnotePr\" }, options));\n// src/file/document/body/section-properties/properties/page-borders.ts\n/**\n* Page borders module for WordprocessingML section properties.\n*\n* Defines borders around pages in a document section.\n*\n* Reference: http://officeopenxml.com/WPsectionBorders.php\n*\n* @module\n*/\n/**\n* Specifies which pages display the page border.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_PageBorderDisplay\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"allPages\"/>\n* <xsd:enumeration value=\"firstPage\"/>\n* <xsd:enumeration value=\"notFirstPage\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PageBorderDisplay = {\n\t/** Display border on all pages */\n\tALL_PAGES: \"allPages\",\n\t/** Display border only on first page */\n\tFIRST_PAGE: \"firstPage\",\n\t/** Display border on all pages except first page */\n\tNOT_FIRST_PAGE: \"notFirstPage\"\n};\n/**\n* Specifies whether page border is positioned relative to page edge or text.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_PageBorderOffset\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"page\"/>\n* <xsd:enumeration value=\"text\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PageBorderOffsetFrom = {\n\t/** Position border relative to page edge */\n\tPAGE: \"page\",\n\t/** Position border relative to text (default) */\n\tTEXT: \"text\"\n};\n/**\n* Specifies z-order of page border relative to intersecting objects.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_PageBorderZOrder\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"front\"/>\n* <xsd:enumeration value=\"back\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PageBorderZOrder = {\n\t/** Display border behind page contents */\n\tBACK: \"back\",\n\t/** Display border in front of page contents (default) */\n\tFRONT: \"front\"\n};\nvar PageBordersAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tdisplay: \"w:display\",\n\t\t\toffsetFrom: \"w:offsetFrom\",\n\t\t\tzOrder: \"w:zOrder\"\n\t\t});\n\t}\n};\n/**\n* Represents page borders (pgBorders) for a document section.\n*\n* This element specifies the borders to display around pages in a section,\n* including which pages display the borders and how they are positioned.\n*\n* Reference: http://officeopenxml.com/WPsectionBorders.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PageBorders\">\n* <xsd:sequence>\n* <xsd:element name=\"top\" type=\"CT_TopPageBorder\" minOccurs=\"0\"/>\n* <xsd:element name=\"left\" type=\"CT_PageBorder\" minOccurs=\"0\"/>\n* <xsd:element name=\"bottom\" type=\"CT_BottomPageBorder\" minOccurs=\"0\"/>\n* <xsd:element name=\"right\" type=\"CT_PageBorder\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"zOrder\" type=\"ST_PageBorderZOrder\" use=\"optional\" default=\"front\"/>\n* <xsd:attribute name=\"display\" type=\"ST_PageBorderDisplay\" use=\"optional\"/>\n* <xsd:attribute name=\"offsetFrom\" type=\"ST_PageBorderOffset\" use=\"optional\" default=\"text\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Add page borders to all pages\n* new PageBorders({\n* pageBorders: {\n* display: PageBorderDisplay.ALL_PAGES,\n* offsetFrom: PageBorderOffsetFrom.PAGE,\n* zOrder: PageBorderZOrder.FRONT\n* },\n* pageBorderTop: { style: BorderStyle.SINGLE, size: 24, color: \"000000\" },\n* pageBorderBottom: { style: BorderStyle.SINGLE, size: 24, color: \"000000\" }\n* });\n* ```\n*/\nvar PageBorders = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:pgBorders\");\n\t\tif (!options) return this;\n\t\tif (options.pageBorders) this.root.push(new PageBordersAttributes({\n\t\t\tdisplay: options.pageBorders.display,\n\t\t\toffsetFrom: options.pageBorders.offsetFrom,\n\t\t\tzOrder: options.pageBorders.zOrder\n\t\t}));\n\t\telse this.root.push(new PageBordersAttributes({}));\n\t\tif (options.pageBorderTop) this.root.push(createBorderElement(\"w:top\", options.pageBorderTop));\n\t\tif (options.pageBorderLeft) this.root.push(createBorderElement(\"w:left\", options.pageBorderLeft));\n\t\tif (options.pageBorderBottom) this.root.push(createBorderElement(\"w:bottom\", options.pageBorderBottom));\n\t\tif (options.pageBorderRight) this.root.push(createBorderElement(\"w:right\", options.pageBorderRight));\n\t}\n};\n// src/file/document/body/section-properties/properties/page-margin.ts\n/**\n* Page margin module for WordprocessingML section properties.\n*\n* Defines page margins for document sections.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* @module\n*/\n/**\n* Creates page margins (pgMar) for a document section.\n*\n* This element specifies the page margins for all pages in a section,\n* including top, bottom, left, right, header, footer, and gutter margins.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PageMar\">\n* <xsd:attribute name=\"top\" type=\"ST_SignedTwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"right\" type=\"s:ST_TwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"bottom\" type=\"ST_SignedTwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"left\" type=\"s:ST_TwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"header\" type=\"s:ST_TwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"footer\" type=\"s:ST_TwipsMeasure\" use=\"required\"/>\n* <xsd:attribute name=\"gutter\" type=\"s:ST_TwipsMeasure\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create page margins with 1 inch margins (1440 twips = 1 inch)\n* createPageMargin(1440, 1440, 1440, 1440, 720, 720, 0);\n* ```\n*/\nvar createPageMargin = (top, right, bottom, left, header, footer, gutter) => new BuilderElement({\n\tname: \"w:pgMar\",\n\tattributes: {\n\t\ttop: {\n\t\t\tkey: \"w:top\",\n\t\t\tvalue: signedTwipsMeasureValue(top)\n\t\t},\n\t\tright: {\n\t\t\tkey: \"w:right\",\n\t\t\tvalue: twipsMeasureValue(right)\n\t\t},\n\t\tbottom: {\n\t\t\tkey: \"w:bottom\",\n\t\t\tvalue: signedTwipsMeasureValue(bottom)\n\t\t},\n\t\tleft: {\n\t\t\tkey: \"w:left\",\n\t\t\tvalue: twipsMeasureValue(left)\n\t\t},\n\t\theader: {\n\t\t\tkey: \"w:header\",\n\t\t\tvalue: twipsMeasureValue(header)\n\t\t},\n\t\tfooter: {\n\t\t\tkey: \"w:footer\",\n\t\t\tvalue: twipsMeasureValue(footer)\n\t\t},\n\t\tgutter: {\n\t\t\tkey: \"w:gutter\",\n\t\t\tvalue: twipsMeasureValue(gutter)\n\t\t}\n\t}\n});\n// src/file/document/body/section-properties/properties/page-number.ts\n/**\n* Specifies the separator character between chapter number and page number.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_ChapterSep\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"hyphen\"/>\n* <xsd:enumeration value=\"period\"/>\n* <xsd:enumeration value=\"colon\"/>\n* <xsd:enumeration value=\"emDash\"/>\n* <xsd:enumeration value=\"enDash\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PageNumberSeparator = {\n\t/** Hyphen separator (-) */\n\tHYPHEN: \"hyphen\",\n\t/** Period separator (.) */\n\tPERIOD: \"period\",\n\t/** Colon separator (:) */\n\tCOLON: \"colon\",\n\t/** Em dash separator (—) */\n\tEM_DASH: \"emDash\",\n\t/** En dash separator (–), written as `enDash` */\n\tEN_DASH: \"endash\"\n};\n/**\n* Creates page numbering settings (pgNumType) for a document section.\n*\n* This element specifies the page numbering format and starting value\n* for all pages in a section.\n*\n* Reference: http://officeopenxml.com/WPSectionPgNumType.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PageNumber\">\n* <xsd:attribute name=\"fmt\" type=\"ST_NumberFormat\" use=\"optional\" default=\"decimal\"/>\n* <xsd:attribute name=\"start\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"chapStyle\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"chapSep\" type=\"ST_ChapterSep\" use=\"optional\" default=\"hyphen\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Start page numbering at 5 with lowercase roman numerals\n* createPageNumberType({\n* start: 5,\n* formatType: NumberFormat.LOWER_ROMAN\n* });\n* ```\n*/\nvar createPageNumberType = ({ start, formatType, separator, chapterHeadingLevel }) => new BuilderElement({\n\tname: \"w:pgNumType\",\n\tattributes: {\n\t\tstart: {\n\t\t\tkey: \"w:start\",\n\t\t\tvalue: start === void 0 ? void 0 : decimalNumber(start)\n\t\t},\n\t\tformatType: {\n\t\t\tkey: \"w:fmt\",\n\t\t\tvalue: formatType\n\t\t},\n\t\tseparator: {\n\t\t\tkey: \"w:chapSep\",\n\t\t\tvalue: separator === PageNumberSeparator.EN_DASH ? \"enDash\" : separator\n\t\t},\n\t\tchapterHeadingLevel: {\n\t\t\tkey: \"w:chapStyle\",\n\t\t\tvalue: chapterHeadingLevel === void 0 ? void 0 : decimalNumber(chapterHeadingLevel)\n\t\t}\n\t}\n});\n// src/file/document/body/section-properties/properties/page-size.ts\n/**\n* This simple type specifies the orientation of all pages in the parent section. This information is used to determine the actual paper size to use when printing the file.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_ST_PageOrientation_topic_ID0EKBK3.html\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:simpleType name=\"ST_PageOrientation\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"portrait\"/>\n* <xsd:enumeration value=\"landscape\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar PageOrientation = {\n\t/**\n\t* ## Portrait Mode\n\t*\n\t* Specifies that pages in this section shall be printed in portrait mode.\n\t*/\n\tPORTRAIT: \"portrait\",\n\t/**\n\t* ## Landscape Mode\n\t*\n\t* Specifies that pages in this section shall be printed in landscape mode, which prints the page contents with a 90 degree rotation with respect to the normal page orientation.\n\t*/\n\tLANDSCAPE: \"landscape\"\n};\n/**\n* This element specifies the properties (size and orientation) for all pages in the current section.\n*\n* Reference: https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_pgSz_topic_ID0ENEDT.html?hl=pgsz%2Cpage%2Csize\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:complexType name=\"CT_PageSz\">\n* <xsd:attribute name=\"w\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"h\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"orient\" type=\"ST_PageOrientation\" use=\"optional\"/>\n* <xsd:attribute name=\"code\" type=\"ST_DecimalNumber\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createPageSize = ({ width, height, orientation, code }) => {\n\tconst widthTwips = twipsMeasureValue(width);\n\tconst heightTwips = twipsMeasureValue(height);\n\treturn new BuilderElement({\n\t\tname: \"w:pgSz\",\n\t\tattributes: {\n\t\t\twidth: {\n\t\t\t\tkey: \"w:w\",\n\t\t\t\tvalue: orientation === PageOrientation.LANDSCAPE ? heightTwips : widthTwips\n\t\t\t},\n\t\t\theight: {\n\t\t\t\tkey: \"w:h\",\n\t\t\t\tvalue: orientation === PageOrientation.LANDSCAPE ? widthTwips : heightTwips\n\t\t\t},\n\t\t\torientation: {\n\t\t\t\tkey: \"w:orient\",\n\t\t\t\tvalue: orientation\n\t\t\t},\n\t\t\tcode: {\n\t\t\t\tkey: \"w:code\",\n\t\t\t\tvalue: code\n\t\t\t}\n\t\t}\n\t});\n};\n// src/file/document/body/section-properties/properties/page-text-direction.ts\n/**\n* Page text direction module for WordprocessingML section properties.\n*\n* Defines text flow direction for pages in a section.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* @module\n*/\n/**\n* Specifies the text flow direction for pages in a section.\n*\n* This controls whether text flows horizontally (left-to-right) or\n* vertically (top-to-bottom), commonly used for East Asian languages.\n*/\nvar PageTextDirectionType = {\n\t/** Left-to-right, top-to-bottom (standard Western text flow) */\n\tLEFT_TO_RIGHT_TOP_TO_BOTTOM: \"lrTb\",\n\t/** Top-to-bottom, right-to-left (vertical East Asian text flow) */\n\tTOP_TO_BOTTOM_RIGHT_TO_LEFT: \"tbRl\"\n};\nvar PageTextDirectionAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { val: \"w:val\" });\n\t}\n};\n/**\n* Represents text direction (textDirection) for pages in a section.\n*\n* This element specifies the direction and orientation of text flow\n* for all pages in a section.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* @example\n* ```typescript\n* // Horizontal text flow (left-to-right, top-to-bottom)\n* new PageTextDirection(PageTextDirectionType.LEFT_TO_RIGHT_TOP_TO_BOTTOM);\n*\n* // Vertical text flow (top-to-bottom, right-to-left)\n* new PageTextDirection(PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT);\n* ```\n*/\nvar PageTextDirection = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:textDirection\");\n\t\tthis.root.push(new PageTextDirectionAttributes({ val: value }));\n\t}\n};\n// src/file/document/body/section-properties/properties/section-type.ts\n/**\n* Section type module for WordprocessingML section properties.\n*\n* Defines how a section begins relative to the previous section.\n*\n* Reference: http://officeopenxml.com/WPsection.php\n*\n* @module\n*/\n/**\n* Specifies the type of section break.\n*\n* This determines where the section begins relative to the previous section.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_SectionMark\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"nextPage\"/>\n* <xsd:enumeration value=\"nextColumn\"/>\n* <xsd:enumeration value=\"continuous\"/>\n* <xsd:enumeration value=\"evenPage\"/>\n* <xsd:enumeration value=\"oddPage\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar SectionType = {\n\t/** Section begins on the next page */\n\tNEXT_PAGE: \"nextPage\",\n\t/** Section begins on the next column */\n\tNEXT_COLUMN: \"nextColumn\",\n\t/** Section begins immediately following the previous section */\n\tCONTINUOUS: \"continuous\",\n\t/** Section begins on the next even-numbered page */\n\tEVEN_PAGE: \"evenPage\",\n\t/** Section begins on the next odd-numbered page */\n\tODD_PAGE: \"oddPage\"\n};\n/**\n* Creates section type (type) for a document section.\n*\n* This element specifies the type of section break, which determines\n* where the new section begins relative to the previous section.\n*\n* Reference: http://officeopenxml.com/WPsection.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SectType\">\n* <xsd:attribute name=\"val\" type=\"ST_SectionMark\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a continuous section (no page break)\n* createSectionType(SectionType.CONTINUOUS);\n*\n* // Create a section that starts on next odd page\n* createSectionType(SectionType.ODD_PAGE);\n* ```\n*/\nvar createSectionType = (value) => new BuilderElement({\n\tname: \"w:type\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue\n\t} }\n});\n// src/file/document/body/section-properties/section-properties.ts\n/**\n* Default margin values for sections (in twips).\n*\n* Standard margins are 1 inch (1440 twips) on all sides.\n* Header/footer margins are 0.5 inches (708 twips) from page edge.\n*\n* @property TOP - Top margin: 1440 twips (1 inch)\n* @property RIGHT - Right margin: 1440 twips (1 inch)\n* @property BOTTOM - Bottom margin: 1440 twips (1 inch)\n* @property LEFT - Left margin: 1440 twips (1 inch)\n* @property HEADER - Header margin: 708 twips (0.5 inches)\n* @property FOOTER - Footer margin: 708 twips (0.5 inches)\n* @property GUTTER - Gutter margin: 0 twips\n*/\nvar sectionMarginDefaults = {\n\t/** Top margin: 1440 twips (1 inch) */\n\tTOP: 1440,\n\t/** Right margin: 1440 twips (1 inch) */\n\tRIGHT: 1440,\n\t/** Bottom margin: 1440 twips (1 inch) */\n\tBOTTOM: 1440,\n\t/** Left margin: 1440 twips (1 inch) */\n\tLEFT: 1440,\n\t/** Header margin from top: 708 twips (0.5 inches) */\n\tHEADER: 708,\n\t/** Footer margin from bottom: 708 twips (0.5 inches) */\n\tFOOTER: 708,\n\t/** Gutter margin for binding: 0 twips */\n\tGUTTER: 0\n};\n/**\n* Default page size values (in twips, A4 portrait).\n*\n* A4 size is 210mm x 297mm (8.27\" x 11.69\").\n*\n* @property WIDTH - Page width: 11906 twips (8.27 inches, 210mm)\n* @property HEIGHT - Page height: 16838 twips (11.69 inches, 297mm)\n* @property ORIENTATION - Page orientation: portrait\n*/\nvar sectionPageSizeDefaults = {\n\t/** Page width: 11906 twips (8.27 inches, 210mm) */\n\tWIDTH: 11906,\n\t/** Page height: 16838 twips (11.69 inches, 297mm) */\n\tHEIGHT: 16838,\n\t/** Page orientation: portrait */\n\tORIENTATION: PageOrientation.PORTRAIT\n};\n/**\n* Represents section properties (sectPr) in a WordprocessingML document.\n*\n* Section properties define the page layout for a section of the document,\n* including page size, margins, headers/footers, columns, and page numbering.\n* A document can contain multiple sections with different properties.\n*\n* Reference: http://officeopenxml.com/WPsection.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SectPr\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_HdrFtrReferences\" minOccurs=\"0\" maxOccurs=\"6\"/>\n* <xsd:group ref=\"EG_SectPrContents\" minOccurs=\"0\"/>\n* <xsd:element name=\"sectPrChange\" type=\"CT_SectPrChange\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attributeGroup ref=\"AG_SectPrAttributes\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create section with custom page size and margins\n* new SectionProperties({\n* page: {\n* size: {\n* width: 12240,\n* height: 15840,\n* orientation: PageOrientation.PORTRAIT\n* },\n* margin: {\n* top: 1440,\n* right: 1440,\n* bottom: 1440,\n* left: 1440\n* },\n* pageNumbers: {\n* start: 1,\n* formatType: NumberFormat.DECIMAL\n* }\n* },\n* column: {\n* count: 2,\n* space: 720\n* }\n* });\n* ```\n*/\nvar SectionProperties = class SectionProperties extends XmlComponent {\n\tconstructor({ page: { size: { width = sectionPageSizeDefaults.WIDTH, height = sectionPageSizeDefaults.HEIGHT, orientation = sectionPageSizeDefaults.ORIENTATION, code } = {}, margin: { top = sectionMarginDefaults.TOP, right = sectionMarginDefaults.RIGHT, bottom = sectionMarginDefaults.BOTTOM, left = sectionMarginDefaults.LEFT, header = sectionMarginDefaults.HEADER, footer = sectionMarginDefaults.FOOTER, gutter = sectionMarginDefaults.GUTTER } = {}, pageNumbers = {}, borders, textDirection } = {}, grid: { linePitch = 360, charSpace, type: gridType } = {}, headerWrapperGroup = {}, footerWrapperGroup = {}, lineNumbers, titlePage, verticalAlign, column, type, footnoteProperties, endnoteProperties, revision } = {}) {\n\t\tsuper(\"w:sectPr\");\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Width, in twips, available to block-level content in this section.\n\t\t\t*\n\t\t\t* This is the page width (accounting for orientation) minus the left and right\n\t\t\t* margins and the gutter. When the section is laid out in several columns, it is\n\t\t\t* the width of a single column. Percentage table widths are resolved against it.\n\t\t\t*/\n\t\t\t\"availableTextWidth\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.availableTextWidth = SectionProperties.calculateAvailableTextWidth({\n\t\t\tpageWidth: orientation === PageOrientation.LANDSCAPE ? height : width,\n\t\t\tleft,\n\t\t\tright,\n\t\t\tgutter,\n\t\t\tcolumn\n\t\t});\n\t\tthis.addHeaderFooterGroup(HeaderFooterType.HEADER, headerWrapperGroup);\n\t\tthis.addHeaderFooterGroup(HeaderFooterType.FOOTER, footerWrapperGroup);\n\t\tif (footnoteProperties) this.root.push(createFootnoteProperties(footnoteProperties));\n\t\tif (endnoteProperties) this.root.push(createEndnoteProperties(endnoteProperties));\n\t\tif (type) this.root.push(createSectionType(type));\n\t\tthis.root.push(createPageSize({\n\t\t\twidth,\n\t\t\theight,\n\t\t\torientation,\n\t\t\tcode\n\t\t}));\n\t\tthis.root.push(createPageMargin(top, right, bottom, left, header, footer, gutter));\n\t\tif (borders) this.root.push(new PageBorders(borders));\n\t\tif (lineNumbers) this.root.push(createLineNumberType(lineNumbers));\n\t\tthis.root.push(createPageNumberType(pageNumbers));\n\t\tif (column) this.root.push(createColumns(column));\n\t\tif (verticalAlign) this.root.push(createVerticalAlign(verticalAlign));\n\t\tif (titlePage !== void 0) this.root.push(new OnOffElement(\"w:titlePg\", titlePage));\n\t\tif (textDirection) this.root.push(new PageTextDirection(textDirection));\n\t\tthis.root.push(createDocumentGrid({\n\t\t\tlinePitch,\n\t\t\tcharSpace,\n\t\t\ttype: gridType\n\t\t}));\n\t\tif (revision) this.root.push(new SectionPropertiesChange(revision));\n\t}\n\t/**\n\t* Width, in twips, available to block-level content (paragraphs and tables) in this section.\n\t*\n\t* Page width minus the left and right margins and the gutter, divided among the\n\t* section's columns when there is more than one. Tables use this to resolve\n\t* percentage widths into the absolute twip grid that Google Docs, Apple Pages and\n\t* other consumers lay tables out from.\n\t*\n\t* @example\n\t* ```typescript\n\t* // A4 portrait with 1 inch margins\n\t* new SectionProperties().AvailableTextWidth; // 11906 - 1440 - 1440 = 9026\n\t* ```\n\t*/\n\tget AvailableTextWidth() {\n\t\treturn this.availableTextWidth;\n\t}\n\tstatic calculateAvailableTextWidth({ pageWidth, left, right, gutter, column }) {\n\t\tvar _column$count, _column$space;\n\t\tconst textWidth = universalMeasureToTwips(pageWidth) - universalMeasureToTwips(left) - universalMeasureToTwips(right) - universalMeasureToTwips(gutter);\n\t\tconst columnCount = (_column$count = column === null || column === void 0 ? void 0 : column.count) !== null && _column$count !== void 0 ? _column$count : 1;\n\t\tif (columnCount <= 1) return textWidth;\n\t\treturn (textWidth - universalMeasureToTwips((_column$space = column === null || column === void 0 ? void 0 : column.space) !== null && _column$space !== void 0 ? _column$space : 720) * (columnCount - 1)) / columnCount;\n\t}\n\taddHeaderFooterGroup(type, group) {\n\t\tif (group.default) this.root.push(createHeaderFooterReference(type, {\n\t\t\ttype: HeaderFooterReferenceType.DEFAULT,\n\t\t\tid: group.default.View.ReferenceId\n\t\t}));\n\t\tif (group.first) this.root.push(createHeaderFooterReference(type, {\n\t\t\ttype: HeaderFooterReferenceType.FIRST,\n\t\t\tid: group.first.View.ReferenceId\n\t\t}));\n\t\tif (group.even) this.root.push(createHeaderFooterReference(type, {\n\t\t\ttype: HeaderFooterReferenceType.EVEN,\n\t\t\tid: group.even.View.ReferenceId\n\t\t}));\n\t}\n};\nvar SectionPropertiesChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:sectPrChange\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.root.push(new SectionProperties(options));\n\t}\n};\n// src/file/document/body/body.ts\n/**\n* Document body module for WordprocessingML documents.\n*\n* Reference: http://officeopenxml.com/WPdocument.php\n*\n* @module\n*/\n/**\n* Represents the document body in a WordprocessingML document.\n*\n* The body element is the container for all block-level content in the document.\n* This includes paragraphs, tables, and section properties that define page layout.\n*\n* The body supports multiple sections, where each section (except the last one) must\n* have its section properties stored in a paragraph's properties at the end of that\n* section. The last section's properties are stored as a direct child of the body element.\n*\n* Reference: http://officeopenxml.com/WPdocument.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Body\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"sectPr\" minOccurs=\"0\" maxOccurs=\"1\" type=\"CT_SectPr\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Body is typically created internally by the Document class\n* const doc = new Document({});\n* const body = doc.Body;\n*\n* // Add content to the body via Document.add()\n* doc.add(new Paragraph(\"Content in first section\"));\n*\n* // Add a new section\n* body.addSection({\n* page: {\n* size: { width: 12240, height: 15840 },\n* },\n* });\n*\n* // Content after addSection belongs to the new section\n* doc.add(new Paragraph(\"Content in second section\"));\n* ```\n*/\nvar Body = class extends XmlComponent {\n\tconstructor({ pageNumbers } = {}) {\n\t\tsuper(\"w:body\");\n\t\t_defineProperty(this, \"sections\", []);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Section properties that were moved into a paragraph at the end of their section\n\t\t\t* by {@link addSection}, keyed by that paragraph. Used to find the section that\n\t\t\t* governs a given child of the body, and to write each section's properties into\n\t\t\t* its paragraph while the body is written.\n\t\t\t*/\n\t\t\t\"sectionParagraphs\",\n\t\t\t/* @__PURE__ */ new Map()\n\t\t);\n\t\t_defineProperty(this, \"headingBookmarkIds\", new HeadingBookmarkIds());\n\t\t_defineProperty(this, \"pageNumbers\", void 0);\n\t\tthis.pageNumbers = pageNumbers;\n\t}\n\t/**\n\t* Finds the section properties that govern a top-level child of the body.\n\t*\n\t* A section's properties are stored after its content (either in the closing\n\t* paragraph of the section or, for the last section, at the end of the body), so\n\t* the governing section is the first one found at or after the child. When no\n\t* child is given (or it is not a direct child of the body), the first section is\n\t* returned.\n\t*\n\t* @param child - A direct child of the body (paragraph, table, etc.)\n\t* @returns The governing section properties, or undefined if the body has no sections\n\t*/\n\tgetSectionPropertiesFor(child) {\n\t\tconst start = child ? Math.max(this.root.indexOf(child), 0) : 0;\n\t\tfor (let i = start; i < this.root.length; i++) {\n\t\t\tconst component = this.root[i];\n\t\t\tif (component instanceof SectionProperties) return component;\n\t\t\tconst section = this.sectionParagraphs.get(component);\n\t\t\tif (section) return section;\n\t\t}\n\t\treturn this.sections[this.sections.length - 1];\n\t}\n\t/**\n\t* Adds new section properties to the document body.\n\t*\n\t* Creates a new section by moving the previous section's properties into the last\n\t* paragraph of that section, and then adding the new section as the current section.\n\t* When that section doesn't end with a paragraph of its own (it ends with a table, or\n\t* it is empty), an empty paragraph is added to hold its properties.\n\t*\n\t* According to the OOXML specification:\n\t* - Section properties for all sections except the last must be stored in a paragraph's\n\t* properties (pPr/sectPr) at the end of each section\n\t* - The last section's properties are stored as a direct child of the body element (w:body/w:sectPr)\n\t*\n\t* @param options - Section properties configuration (page size, margins, headers, footers, etc.)\n\t*/\n\taddSection(options) {\n\t\tconst currentSection = this.sections.pop();\n\t\tconst lastParagraph = this.lastParagraphOfSection();\n\t\tif (currentSection && lastParagraph) this.sectionParagraphs.set(lastParagraph, currentSection);\n\t\telse {\n\t\t\tconst sectionParagraph = this.createSectionParagraph();\n\t\t\tthis.root.push(sectionParagraph);\n\t\t\tif (currentSection) this.sectionParagraphs.set(sectionParagraph, currentSection);\n\t\t}\n\t\tthis.sections.push(new SectionProperties(options));\n\t}\n\t/**\n\t* Prepares the body element for XML serialization.\n\t*\n\t* Ensures that the last section's properties are placed as a direct child of the body\n\t* element, as required by the OOXML specification. Once the body is written, its tables\n\t* of contents are filled in from its headings, and, when the body has a page number\n\t* estimator, its page references are given their page numbers. Its SEQ fields are given\n\t* their numbers after the tables of contents are filled in, as Word leaves a heading's SEQ\n\t* number out of its entry.\n\t*\n\t* @param context - The XML serialization context\n\t* @returns The prepared XML object or undefined\n\t*/\n\tprepForXml(context) {\n\t\tvar _this$pageNumbers;\n\t\tif (this.sections.length === 1) {\n\t\t\tthis.root.splice(0, 1);\n\t\t\tthis.root.push(this.sections.pop());\n\t\t}\n\t\tfor (const [paragraph, section] of this.sectionParagraphs) paragraph.addSectionProperties(section);\n\t\tlet xml;\n\t\ttry {\n\t\t\txml = super.prepForXml(context);\n\t\t} finally {\n\t\t\tfor (const [paragraph, section] of this.sectionParagraphs) paragraph.removeSectionProperties(section);\n\t\t}\n\t\tconst listNumbers = (_this$pageNumbers = this.pageNumbers) === null || _this$pageNumbers === void 0 ? void 0 : _this$pageNumbers.listNumbers;\n\t\tfillTablesOfContents(xml, context, this.headingBookmarkIds, listNumbers && ((body) => listNumbers(body, context)));\n\t\tif (this.pageNumbers) {\n\t\t\tfillSequenceNumbers(xml, context);\n\t\t\tfillPageNumbers(xml, context, this.pageNumbers);\n\t\t}\n\t\treturn xml;\n\t}\n\t/**\n\t* Adds a block-level component to the body.\n\t*\n\t* This method is used internally by the Document class to add paragraphs,\n\t* tables, and other block-level elements to the document body.\n\t*\n\t* @param component - The XML component to add (paragraph, table, etc.)\n\t*/\n\tpush(component) {\n\t\tconst section = component instanceof Paragraph ? this.sectionParagraphs.get(component) : void 0;\n\t\tif (section) {\n\t\t\tconst sectionParagraph = this.createSectionParagraph();\n\t\t\tthis.root.splice(this.root.indexOf(component) + 1, 0, sectionParagraph);\n\t\t\tthis.sectionParagraphs.delete(component);\n\t\t\tthis.sectionParagraphs.set(sectionParagraph, section);\n\t\t}\n\t\tthis.root.push(component);\n\t}\n\t/**\n\t* The paragraph the current section ends with, which can hold its properties.\n\t*\n\t* There is none when the section ends with something other than a paragraph, or is empty:\n\t* its last child is then the placeholder at the start of the body (removed when the body is\n\t* written) or the paragraph that ends the section before, which has properties of its own.\n\t*/\n\tlastParagraphOfSection() {\n\t\tconst last = this.root[this.root.length - 1];\n\t\treturn last instanceof Paragraph && last !== this.root[0] && !this.sectionParagraphs.has(last) && this.root.indexOf(last) === this.root.length - 1 ? last : void 0;\n\t}\n\t/**\n\t* An empty paragraph to end a section that has no paragraph of its own to end it. The section's\n\t* properties are written into it with the others, when the body is written.\n\t*/\n\tcreateSectionParagraph() {\n\t\treturn new Paragraph({});\n\t}\n};\n// src/file/table/table-width.ts\n/**\n* Table width module for WordprocessingML documents.\n*\n* This module provides width specifications for tables and cells.\n*\n* Reference: http://officeopenxml.com/WPtableWidth.php\n*\n* @module\n*/\n/**\n* Width type values for tables and cells.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_TblWidth\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"nil\"/>\n* <xsd:enumeration value=\"pct\"/>\n* <xsd:enumeration value=\"dxa\"/>\n* <xsd:enumeration value=\"auto\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar WidthType = {\n\t/** Auto. */\n\tAUTO: \"auto\",\n\t/** Value is in twentieths of a point */\n\tDXA: \"dxa\",\n\t/** No (empty) value. */\n\tNIL: \"nil\",\n\t/** Value is in percentage. */\n\tPERCENTAGE: \"pct\"\n};\n/**\n* Creates a table width element in a WordprocessingML document.\n*\n* Used for specifying widths of tables, cells, margins, and indentation.\n*\n* Reference: http://officeopenxml.com/WPtableWidth.php\n*\n* @example\n* ```typescript\n* createTableWidthElement(\"w:tblW\", { size: 5000, type: WidthType.DXA });\n* createTableWidthElement(\"w:tcW\", { size: 50, type: WidthType.PERCENTAGE });\n* ```\n*/\nvar createTableWidthElement = (name, { type = WidthType.AUTO, size }) => {\n\tlet tableWidthValue = size;\n\tif (type === WidthType.PERCENTAGE && typeof size === \"number\") tableWidthValue = Math.round(size * 50);\n\treturn new BuilderElement({\n\t\tname,\n\t\tattributes: {\n\t\t\ttype: {\n\t\t\t\tkey: \"w:type\",\n\t\t\t\tvalue: type\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tkey: \"w:w\",\n\t\t\t\tvalue: measurementOrPercentValue(tableWidthValue)\n\t\t\t}\n\t\t}\n\t});\n};\n// src/file/table/column-widths.ts\n/**\n* Column width resolution for tables.\n*\n* Word lays a table out from its preferred widths (`w:tblW` / `w:tcW`) and only treats\n* the table grid (`w:tblGrid`) as a hint. Google Docs, Apple Pages, QuickLook and other\n* consumers do the opposite: they take the grid's absolute twip values as the physical\n* column widths and ignore percentage preferences. A grid of placeholder values therefore\n* collapses every column in those consumers, which is the long-standing \"tables are\n* broken in Google Docs / Pages\" report (#1457, #349, #216, #3015).\n*\n* This module derives a grid in twips from the table's and cells' preferred widths,\n* resolved against the width actually available to the table, so the table renders the\n* same everywhere. It is used when the caller does not supply explicit `columnWidths`.\n*\n* Reference: http://officeopenxml.com/WPtableGrid.php\n*\n* @module\n*/\n/**\n* Text width, in twips, of a section with the default page size and margins\n* (A4 portrait with 1 inch margins). Used when a table is formatted without access to\n* its section, e.g. by a bare `Formatter` or inside the patcher.\n*/\nvar DEFAULT_AVAILABLE_WIDTH = sectionPageSizeDefaults.WIDTH - sectionMarginDefaults.LEFT - sectionMarginDefaults.RIGHT - sectionMarginDefaults.GUTTER;\nvar columnSpanOf = (cell) => cell.options.columnSpan || 1;\n/**\n* Resolves a preferred width (`ITableWidthProperties`) into twips.\n*\n* Percentages are taken relative to `referenceWidth`: the available text width for a\n* table, or the table width for a cell. Auto and nil widths express no preference.\n*\n* @param width - The preferred width, if any\n* @param referenceWidth - Width in twips that percentages are relative to\n* @returns The width in twips, or undefined when there is no usable preference\n*/\nvar resolvePreferredWidth = (width, referenceWidth) => {\n\tif (!width) return;\n\tconst { type = WidthType.AUTO, size } = width;\n\tif (type !== WidthType.PERCENTAGE && type !== WidthType.DXA) return;\n\tconst twips = typeof size === \"number\" ? type === WidthType.PERCENTAGE ? size / 100 * referenceWidth : size : size.endsWith(\"%\") ? Number(size.slice(0, -1)) / 100 * referenceWidth : universalMeasureToTwips(size);\n\treturn twips > 0 ? twips : void 0;\n};\n/**\n* Resolves the width of a table in twips.\n*\n* A table without a usable preferred width (auto, nil or non-positive) takes up the\n* whole available width, which is also what Word does when a table is inserted.\n*\n* @param width - The table's preferred width, if any\n* @param availableWidth - Width in twips available to the table\n* @returns The table width in twips\n*/\nvar resolveTableWidth = (width, availableWidth) => {\n\tvar _resolvePreferredWidt;\n\treturn (_resolvePreferredWidt = resolvePreferredWidth(width, availableWidth)) !== null && _resolvePreferredWidt !== void 0 ? _resolvePreferredWidt : availableWidth;\n};\n/**\n* Counts the grid columns of a table: the largest number of columns (taking\n* `columnSpan` into account) spanned by any of its rows.\n*/\nvar countGridColumns = (rows) => Math.max(0, ...rows.map((row) => row.cells.reduce((count, cell) => count + columnSpanOf(cell), 0)));\n/**\n* Derives the widths of a table's grid columns, in twips.\n*\n* The algorithm mirrors what Word writes into `w:tblGrid` after laying a table out:\n*\n* 1. The table width is resolved against the available width.\n* 2. Each column takes the preferred width of the first cell (top to bottom) that\n* occupies exactly that column. Percentages are relative to the table width.\n* 3. Cells spanning several columns share their width among the spanned columns that\n* are still unresolved.\n* 4. Any column still unresolved gets an equal share of what is left of the table\n* width (or an equal share of the table width if nothing is left).\n*\n* @param options.rows - The table rows (including any vertical-merge continuation cells)\n* @param options.width - The table's preferred width\n* @param options.availableWidth - Width in twips available to the table (text width of the section, or the parent cell for nested tables)\n* @returns One width per grid column, rounded to whole twips\n*\n* @example\n* ```typescript\n* // A 100% table with 90% / 10% cells in a 9026 twip wide section\n* resolveColumnWidths({ rows, width: { size: 100, type: WidthType.PERCENTAGE }, availableWidth: 9026 });\n* // => [8123, 903]\n* ```\n*/\nvar resolveColumnWidths = ({ rows, width, availableWidth }) => {\n\tconst columnCount = countGridColumns(rows);\n\tif (columnCount === 0) return [];\n\tconst tableWidth = resolveTableWidth(width, availableWidth);\n\tconst widths = Array.from({ length: columnCount }, () => void 0);\n\tconst spanningCells = [];\n\tfor (const row of rows) {\n\t\tlet column = 0;\n\t\tfor (const cell of row.cells) {\n\t\t\tconst span = columnSpanOf(cell);\n\t\t\tconst cellWidth = resolvePreferredWidth(cell.options.width, tableWidth);\n\t\t\tif (cellWidth !== void 0) {\n\t\t\t\tif (span === 1) {\n\t\t\t\t\tvar _column, _widths$_column;\n\t\t\t\t\t(_widths$_column = widths[_column = column]) !== null && _widths$_column !== void 0 || (widths[_column] = cellWidth);\n\t\t\t\t} else spanningCells.push({\n\t\t\t\t\tstart: column,\n\t\t\t\t\tspan,\n\t\t\t\t\twidth: cellWidth\n\t\t\t\t});\n\t\t\t}\n\t\t\tcolumn += span;\n\t\t}\n\t}\n\tfor (const { start, span, width: cellWidth } of spanningCells) {\n\t\tconst columns = Array.from({ length: span }, (_, i) => start + i).filter((column) => column < columnCount);\n\t\tconst unresolvedSpanColumns = columns.filter((column) => widths[column] === void 0);\n\t\tconst remaining = cellWidth - columns.reduce((sum, column) => {\n\t\t\tvar _widths$column;\n\t\t\treturn sum + ((_widths$column = widths[column]) !== null && _widths$column !== void 0 ? _widths$column : 0);\n\t\t}, 0);\n\t\tif (unresolvedSpanColumns.length > 0 && remaining > 0) for (const column of unresolvedSpanColumns) widths[column] = remaining / unresolvedSpanColumns.length;\n\t}\n\tconst unresolvedColumns = widths.flatMap((columnWidth, column) => columnWidth === void 0 ? [column] : []);\n\tif (unresolvedColumns.length > 0) {\n\t\tconst remaining = tableWidth - widths.reduce((sum, columnWidth) => sum + (columnWidth !== null && columnWidth !== void 0 ? columnWidth : 0), 0);\n\t\tconst share = remaining > 0 ? remaining / unresolvedColumns.length : tableWidth / columnCount;\n\t\tfor (const column of unresolvedColumns) widths[column] = share;\n\t}\n\treturn widths.map((columnWidth) => Math.round(columnWidth));\n};\n// src/file/table/grid.ts\n/**\n* Table grid module for WordprocessingML documents.\n*\n* The table grid defines the column structure of a table.\n*\n* Reference: http://officeopenxml.com/WPtableGrid.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblGridCol\">\n* <xsd:attribute name=\"w\" type=\"s:ST_TwipsMeasure\"/>\n* </xsd:complexType>\n* <xsd:complexType name=\"CT_TblGridBase\">\n* <xsd:sequence>\n* <xsd:element name=\"gridCol\" type=\"CT_TblGridCol\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* <xsd:complexType name=\"CT_TblGridChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_Markup\">\n* <xsd:sequence>\n* <xsd:element name=\"tblGrid\" type=\"CT_TblGridBase\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\n/**\n* Creates a single column in the table grid.\n*\n* The gridCol element specifies the width of a single column.\n*/\nvar createGridCol = (width) => new BuilderElement({\n\tname: \"w:gridCol\",\n\tattributes: width !== void 0 ? { width: {\n\t\tkey: \"w:w\",\n\t\tvalue: twipsMeasureValue(width)\n\t} } : void 0\n});\n/**\n* Creates the table grid for a WordprocessingML document.\n*\n* The tblGrid element defines the number and width of columns in the table.\n*\n* Reference: http://officeopenxml.com/WPtableGrid.php\n*/\nvar TableGrid = class extends XmlComponent {\n\tconstructor(widths, revision) {\n\t\tsuper(\"w:tblGrid\");\n\t\tfor (const width of widths) this.root.push(createGridCol(width));\n\t\tif (revision) this.root.push(new TableGridChange(revision));\n\t}\n};\nvar TableGridChangeAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { id: \"w:id\" });\n\t}\n};\nvar TableGridChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tblGridChange\");\n\t\tthis.root.push(new TableGridChangeAttributes({ id: options.id }));\n\t\tthis.root.push(new TableGrid(options.columnWidths));\n\t}\n};\n// src/file/track-revision/track-revision-components/inserted-text-run.ts\n/**\n* Inserted text run module for track changes.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @module\n*/\n/**\n* Represents an inserted text run in a tracked changes document.\n*\n* An insertion marks text that has been added to the document as part of\n* revision tracking. It wraps a standard text run with metadata about who\n* made the insertion and when.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"ins\" type=\"CT_RunTrackChange\" minOccurs=\"0\"/>\n*\n* <xsd:complexType name=\"CT_RunTrackChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TrackChange\">\n* <xsd:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\n* <xsd:group ref=\"EG_ContentRunContent\"/>\n* <xsd:group ref=\"m:EG_OMathMathElements\"/>\n* </xsd:choice>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create an inserted text run\n* new InsertedTextRun({\n* id: 1,\n* author: \"John Doe\",\n* date: \"2024-01-15T10:30:00Z\",\n* text: \"This text was added\",\n* bold: true\n* });\n* ```\n*/\nvar InsertedTextRun = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:ins\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.addChildElement(new TextRun(options));\n\t}\n};\n// src/file/track-revision/track-revision-components/deleted-page-number.ts\n/**\n* Deleted instruction text elements for field codes in track changes.\n*\n* Provides deleted versions of page number and page count field instructions.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @module\n*/\n/**\n* Represents a deleted PAGE field instruction.\n*\n* This element contains the field instruction code for the current page number\n* within a deletion. Uses w:delInstrText instead of w:instrText to mark it as\n* part of a tracked deletion.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"delInstrText\" type=\"CT_Text\"/>\n*\n* <xsd:complexType name=\"CT_Text\">\n* <xsd:simpleContent>\n* <xsd:extension base=\"s:ST_String\">\n* <xsd:attribute ref=\"xml:space\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:simpleContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Used internally within DeletedTextRun for page number fields\n* new DeletedPage(); // Creates <w:delInstrText>PAGE</w:delInstrText>\n* ```\n*/\nvar DeletedPage = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:delInstrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"PAGE\");\n\t}\n};\n/**\n* Represents a deleted NUMPAGES field instruction.\n*\n* This element contains the field instruction code for the total number of pages\n* in the document within a deletion. Uses w:delInstrText instead of w:instrText\n* to mark it as part of a tracked deletion.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"delInstrText\" type=\"CT_Text\"/>\n*\n* <xsd:complexType name=\"CT_Text\">\n* <xsd:simpleContent>\n* <xsd:extension base=\"s:ST_String\">\n* <xsd:attribute ref=\"xml:space\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:simpleContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Used internally within DeletedTextRun for total pages field\n* new DeletedNumberOfPages(); // Creates <w:delInstrText>NUMPAGES</w:delInstrText>\n* ```\n*/\nvar DeletedNumberOfPages = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:delInstrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"NUMPAGES\");\n\t}\n};\n/**\n* Represents a deleted SECTIONPAGES field instruction.\n*\n* This element contains the field instruction code for the total number of pages\n* in the current section within a deletion. Uses w:delInstrText instead of\n* w:instrText to mark it as part of a tracked deletion.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"delInstrText\" type=\"CT_Text\"/>\n*\n* <xsd:complexType name=\"CT_Text\">\n* <xsd:simpleContent>\n* <xsd:extension base=\"s:ST_String\">\n* <xsd:attribute ref=\"xml:space\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:simpleContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Used internally within DeletedTextRun for section pages field\n* new DeletedNumberOfPagesSection(); // Creates <w:delInstrText>SECTIONPAGES</w:delInstrText>\n* ```\n*/\nvar DeletedNumberOfPagesSection = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:delInstrText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(\"SECTIONPAGES\");\n\t}\n};\n// src/file/track-revision/track-revision-components/deleted-text.ts\n/**\n* Deleted text element module for track changes.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @module\n*/\n/**\n* Represents deleted text content within a tracked deletion.\n*\n* This element contains the actual text that was deleted. Unlike regular text\n* (w:t), deleted text uses the w:delText element to distinguish it as part of\n* a deletion. The xml:space=\"preserve\" attribute ensures whitespace is maintained.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"delText\" type=\"CT_Text\"/>\n*\n* <xsd:complexType name=\"CT_Text\">\n* <xsd:simpleContent>\n* <xsd:extension base=\"s:ST_String\">\n* <xsd:attribute ref=\"xml:space\" use=\"optional\"/>\n* </xsd:extension>\n* </xsd:simpleContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Used internally within DeletedTextRun\n* new DeletedText(\"This text was removed\");\n* ```\n*/\nvar DeletedText = class extends XmlComponent {\n\tconstructor(text) {\n\t\tsuper(\"w:delText\");\n\t\tthis.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));\n\t\tthis.root.push(text);\n\t}\n};\n// src/file/track-revision/track-revision-components/deleted-text-run.ts\n/**\n* Deleted text run module for track changes.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @module\n*/\n/** The parts of the deleted field a page number child shows, in order, or undefined when the child is text */\nvar deletedPageNumberFieldOf = (child) => {\n\tswitch (child) {\n\t\tcase PageNumber.CURRENT: return [\n\t\t\tcreateBegin(),\n\t\t\tnew DeletedPage(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tcase PageNumber.TOTAL_PAGES: return [\n\t\t\tcreateBegin(),\n\t\t\tnew DeletedNumberOfPages(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tcase PageNumber.TOTAL_PAGES_IN_SECTION: return [\n\t\t\tcreateBegin(),\n\t\t\tnew DeletedNumberOfPagesSection(),\n\t\t\tcreateSeparate(),\n\t\t\tcreateEnd()\n\t\t];\n\t\tdefault: return;\n\t}\n};\n/**\n* Represents a deleted text run in a tracked changes document.\n*\n* A deletion marks text that has been removed from the document as part of\n* revision tracking. It wraps a text run with metadata about who made the\n* deletion and when. Deleted text is typically shown with strikethrough\n* formatting in applications that support track changes.\n*\n* Reference: http://officeopenxml.com/WPtrackChanges.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"del\" type=\"CT_RunTrackChange\" minOccurs=\"0\"/>\n*\n* <xsd:complexType name=\"CT_RunTrackChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TrackChange\">\n* <xsd:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\n* <xsd:group ref=\"EG_ContentRunContent\"/>\n* <xsd:group ref=\"m:EG_OMathMathElements\"/>\n* </xsd:choice>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a deleted text run\n* new DeletedTextRun({\n* id: 2,\n* author: \"Jane Smith\",\n* date: \"2024-01-15T11:00:00Z\",\n* text: \"This text was removed\",\n* italics: true\n* });\n*\n* // Deleted run with page number field\n* new DeletedTextRun({\n* id: 3,\n* author: \"John Doe\",\n* date: \"2024-01-15T12:00:00Z\",\n* children: [PageNumber.CURRENT]\n* });\n* ```\n*/\nvar DeletedTextRun = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:del\");\n\t\t_defineProperty(this, \"deletedTextRunWrapper\", void 0);\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.deletedTextRunWrapper = new DeletedTextRunWrapper(options);\n\t\tthis.addChildElement(this.deletedTextRunWrapper);\n\t}\n};\n/**\n* Internal wrapper for the run element within a deletion.\n*\n* Wraps the actual run content (text, fields, etc.) within a w:r element\n* that appears inside the w:del element. Handles special cases like page\n* numbers and other field codes using deleted-specific element types.\n*\n* @internal\n*/\nvar DeletedTextRunWrapper = class DeletedTextRunWrapper extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:r\");\n\t\t_defineProperty(this, \"following\", []);\n\t\tthis.root.push(new RunProperties(options));\n\t\tif (options.children) for (const [index, child] of options.children.entries()) {\n\t\t\tif (child instanceof Run) {\n\t\t\t\tconst rest = options.children.slice(index + 1);\n\t\t\t\tthis.following = [child, ...rest.length > 0 ? [new DeletedTextRunWrapper(_objectSpread2(_objectSpread2({}, options), {}, {\n\t\t\t\t\tbreak: void 0,\n\t\t\t\t\tchildren: rest\n\t\t\t\t}))] : []];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (typeof child === \"string\") {\n\t\t\t\tconst field = deletedPageNumberFieldOf(child);\n\t\t\t\tif (field) {\n\t\t\t\t\tconst rest = options.children.slice(index + 1);\n\t\t\t\t\tconst runOf = (children) => new DeletedTextRunWrapper(_objectSpread2(_objectSpread2({}, options), {}, {\n\t\t\t\t\t\tbreak: void 0,\n\t\t\t\t\t\tchildren\n\t\t\t\t\t}));\n\t\t\t\t\tconst beginsHere = this.root.length === 1;\n\t\t\t\t\tif (beginsHere) this.root.push(field[0]);\n\t\t\t\t\tconst parts = beginsHere ? field.slice(1) : field;\n\t\t\t\t\tthis.following = [...parts.map((part) => runOf([part])), ...rest.length > 0 ? [runOf(rest)] : []];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthis.root.push(new DeletedText(child));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.root.push(child);\n\t\t}\n\t\telse if (options.text) this.root.push(new DeletedText(options.text));\n\t\tif (options.break) for (let i = 0; i < options.break; i++) this.root.splice(1, 0, createBreak());\n\t}\n\tget writtenAs() {\n\t\treturn this.following.length > 0 ? [this, ...this.following.flatMap((run) => {\n\t\t\tvar _run$writtenAs;\n\t\t\treturn (_run$writtenAs = run.writtenAs) !== null && _run$writtenAs !== void 0 ? _run$writtenAs : run;\n\t\t})] : void 0;\n\t}\n};\n// src/file/track-revision/track-revision-components/inserted-table-row.ts\nvar InsertedTableRow = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:ins\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t}\n};\n// src/file/track-revision/track-revision-components/deleted-table-row.ts\nvar DeletedTableRow = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:del\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t}\n};\n// src/file/track-revision/track-revision-components/inserted-table-cell.ts\nvar InsertedTableCell = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:cellIns\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t}\n};\n// src/file/track-revision/track-revision-components/deleted-table-cell.ts\nvar DeletedTableCell = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:cellDel\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t}\n};\n// src/file/track-revision/track-revision-components/cell-merge.ts\n/**\n* Vertical merge revision types.\n*/\nvar VerticalMergeRevisionType = {\n\t/**\n\t* Cell that is merged with upper one.\n\t*/\n\tCONTINUE: \"cont\",\n\t/**\n\t* Cell that is starting the vertical merge.\n\t*/\n\tRESTART: \"rest\"\n};\nvar CellMergeAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tid: \"w:id\",\n\t\t\tauthor: \"w:author\",\n\t\t\tdate: \"w:date\",\n\t\t\tverticalMerge: \"w:vMerge\",\n\t\t\tverticalMergeOriginal: \"w:vMergeOrig\"\n\t\t});\n\t}\n};\nvar CellMerge = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:cellMerge\");\n\t\tthis.root.push(new CellMergeAttributes(options));\n\t}\n};\n// src/file/table/table-properties/table-cell-margin.ts\n/**\n* Table cell margin module for WordprocessingML documents.\n*\n* This module provides cell margin settings for tables and individual cells.\n* Margins define the padding between cell content and cell borders.\n*\n* Reference: http://officeopenxml.com/WPtableCellProperties-Margins.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblCellMar\">\n* <xsd:sequence>\n* <xsd:element name=\"top\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"start\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"left\" type=\"CT_TblWidth\" minOccurs=\"0\"/>\n* <xsd:element name=\"bottom\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"end\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"right\" type=\"CT_TblWidth\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\n/**\n* Builds an array of margin child elements based on the provided options.\n*\n* @internal\n*/\nvar buildMarginChildren = ({ marginUnitType = WidthType.DXA, top, left, bottom, right }) => [\n\t{\n\t\tname: \"w:top\",\n\t\tsize: top\n\t},\n\t{\n\t\tname: \"w:left\",\n\t\tsize: left\n\t},\n\t{\n\t\tname: \"w:bottom\",\n\t\tsize: bottom\n\t},\n\t{\n\t\tname: \"w:right\",\n\t\tsize: right\n\t}\n].filter((entry) => entry.size !== void 0).map(({ name, size }) => createTableWidthElement(name, {\n\ttype: marginUnitType,\n\tsize\n}));\n/**\n* Creates a table-level cell margin element (tblCellMar).\n*\n* The tblCellMar element specifies the default cell margins for all cells\n* in the table. Individual cells can override these defaults using\n* cell-level margins (tcMar).\n*\n* Reference: http://officeopenxml.com/WPtableCellProperties-Margins.php\n*\n* @param options - The margin options\n* @returns An XmlComponent representing the tblCellMar element, or undefined if no margins specified\n*\n* @example\n* ```typescript\n* // Table with 100 twip margins on all sides\n* new Table({\n* rows: [...],\n* margins: {\n* top: 100,\n* bottom: 100,\n* left: 100,\n* right: 100,\n* },\n* });\n* ```\n*/\nvar createTableCellMargin = (options) => {\n\tconst children = buildMarginChildren(options);\n\tif (children.length === 0) return;\n\treturn new BuilderElement({\n\t\tname: \"w:tblCellMar\",\n\t\tchildren\n\t});\n};\n/**\n* Creates a cell-level margin element (tcMar).\n*\n* The tcMar element specifies the margins for a specific table cell,\n* overriding any table-level default margins (tblCellMar).\n*\n* Reference: http://officeopenxml.com/WPtableCellProperties-Margins.php\n*\n* @param options - The margin options\n* @returns An XmlComponent representing the tcMar element, or undefined if no margins specified\n*\n* @example\n* ```typescript\n* // Cell with custom margins\n* new TableCell({\n* children: [...],\n* margins: {\n* top: 50,\n* bottom: 50,\n* left: 100,\n* right: 100,\n* },\n* });\n* ```\n*/\nvar createCellMargin = (options) => {\n\tconst children = buildMarginChildren(options);\n\tif (children.length === 0) return;\n\treturn new BuilderElement({\n\t\tname: \"w:tcMar\",\n\t\tchildren\n\t});\n};\n// src/file/table/table-cell/table-cell-components.ts\n/**\n* Table cell components module for WordprocessingML documents.\n*\n* This module provides XML components for table cell properties including borders,\n* grid span (column span), vertical merge, and text direction.\n*\n* Reference: http://officeopenxml.com/WPtableCell.php\n*\n* @module\n*/\n/**\n* Represents table cell borders (tcBorders) in a WordprocessingML document.\n*\n* The tcBorders element specifies the borders for a single table cell. Each border\n* can be configured independently with different styles, colors, and widths.\n*\n* Reference: http://officeopenxml.com/WPtableCell.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TcBorders\">\n* <xsd:sequence>\n* <xsd:element name=\"top\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"start\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"left\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"bottom\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"end\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"right\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"insideH\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"insideV\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"tl2br\" type=\"CT_Border\" minOccurs=\"0\"/>\n* <xsd:element name=\"tr2bl\" type=\"CT_Border\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new TableCellBorders({\n* top: { style: BorderStyle.SINGLE, size: 6, color: \"FF0000\" },\n* bottom: { style: BorderStyle.SINGLE, size: 6, color: \"0000FF\" },\n* diagonalDown: { style: BorderStyle.SINGLE, size: 4, color: \"000000\" },\n* });\n* ```\n*/\nvar TableCellBorders = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tcBorders\");\n\t\tif (options.top) this.root.push(createBorderElement(\"w:top\", options.top));\n\t\tif (options.start) this.root.push(createBorderElement(\"w:start\", options.start));\n\t\tif (options.left) this.root.push(createBorderElement(\"w:left\", options.left));\n\t\tif (options.bottom) this.root.push(createBorderElement(\"w:bottom\", options.bottom));\n\t\tif (options.end) this.root.push(createBorderElement(\"w:end\", options.end));\n\t\tif (options.right) this.root.push(createBorderElement(\"w:right\", options.right));\n\t\tif (options.diagonalDown) this.root.push(createBorderElement(\"w:tl2br\", options.diagonalDown));\n\t\tif (options.diagonalUp) this.root.push(createBorderElement(\"w:tr2bl\", options.diagonalUp));\n\t}\n};\n/**\n* Attributes for the GridSpan element.\n*/\nvar GridSpanAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { val: \"w:val\" });\n\t}\n};\n/**\n* Represents a grid span (gridSpan) element in a WordprocessingML document.\n*\n* The gridSpan element specifies the number of logical columns this cell spans\n* in the table grid. This is used to merge cells horizontally (column span).\n*\n* Reference: http://officeopenxml.com/WPtableCell.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_DecimalNumber\">\n* <xsd:attribute name=\"val\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Cell spanning 3 columns\n* new GridSpan(3);\n* ```\n*/\nvar GridSpan = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:gridSpan\");\n\t\tthis.root.push(new GridSpanAttributes({ val: decimalNumber(value) }));\n\t}\n};\n/**\n* Vertical merge types for table cells.\n*\n* Defines the merge behavior for vertically merged cells (row span).\n*/\nvar VerticalMergeType = {\n\t/**\n\t* Cell that is merged with upper one.\n\t* This cell continues a vertical merge started by a cell above it.\n\t*/\n\tCONTINUE: \"continue\",\n\t/**\n\t* Cell that is starting the vertical merge.\n\t* This cell begins a new vertical merge region.\n\t*/\n\tRESTART: \"restart\"\n};\n/**\n* Attributes for the VerticalMerge element.\n*/\nvar VerticalMergeAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args2) {\n\t\tsuper(..._args2);\n\t\t_defineProperty(this, \"xmlKeys\", { val: \"w:val\" });\n\t}\n};\n/**\n* Represents a vertical merge (vMerge) element in a WordprocessingML document.\n*\n* The vMerge element specifies that this cell is part of a vertically merged region.\n* Cells can either restart a new merge region or continue an existing one from above.\n* This is used to create row spans in tables.\n*\n* Reference: http://officeopenxml.com/WPtableCell.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_VMerge\">\n* <xsd:attribute name=\"val\" type=\"ST_Merge\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // First cell in a vertical merge\n* new VerticalMerge(VerticalMergeType.RESTART);\n*\n* // Subsequent cells that continue the merge\n* new VerticalMerge(VerticalMergeType.CONTINUE);\n* ```\n*/\nvar VerticalMerge = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:vMerge\");\n\t\tthis.root.push(new VerticalMergeAttributes({ val: value }));\n\t}\n};\n/**\n* Text direction values for table cells.\n*\n* Specifies the direction in which text flows within a table cell.\n*/\nvar TextDirection = {\n\t/** Text flows from bottom to top, left to right */\n\tBOTTOM_TO_TOP_LEFT_TO_RIGHT: \"btLr\",\n\t/** Text flows from left to right, top to bottom (default) */\n\tLEFT_TO_RIGHT_TOP_TO_BOTTOM: \"lrTb\",\n\t/** Text flows from top to bottom, right to left */\n\tTOP_TO_BOTTOM_RIGHT_TO_LEFT: \"tbRl\"\n};\n/**\n* Attributes for the TDirection element.\n*/\nvar TDirectionAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args3) {\n\t\tsuper(..._args3);\n\t\t_defineProperty(this, \"xmlKeys\", { val: \"w:val\" });\n\t}\n};\n/**\n* Represents a text direction (textDirection) element in a WordprocessingML document.\n*\n* The textDirection element specifies the flow of text within a table cell. This is\n* useful for creating rotated text or supporting different writing systems.\n*\n* Reference: http://officeopenxml.com/WPtableCell.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TextDirection\">\n* <xsd:attribute name=\"val\" type=\"ST_TextDirection\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Vertical text flowing from top to bottom\n* new TDirection(TextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT);\n* ```\n*/\nvar TDirection = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:textDirection\");\n\t\tthis.root.push(new TDirectionAttributes({ val: value }));\n\t}\n};\n// src/file/table/table-cell/table-cell-properties.ts\n/**\n* Table cell properties module for WordprocessingML documents.\n*\n* This module provides cell-level properties including width, borders,\n* shading, margins, and merge settings.\n*\n* Reference: http://officeopenxml.com/WPtableCellProperties.php\n*\n* @module\n*/\n/**\n* Represents table cell properties (tcPr) in a WordprocessingML document.\n*\n* The tcPr element specifies properties for a table cell including width,\n* borders, shading, margins, text direction, vertical alignment, and merge settings.\n* These properties control the appearance and behavior of individual table cells.\n*\n* Reference: http://officeopenxml.com/WPtableCellProperties.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TcPr\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TcPrInner\">\n* <xsd:sequence>\n* <xsd:element name=\"tcPrChange\" type=\"CT_TcPrChange\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_TcPrInner\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TcPrBase\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_CellMarkupElements\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_TcPrBase\">\n* <xsd:sequence>\n* <xsd:element name=\"cnfStyle\" type=\"CT_Cnf\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tcW\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"gridSpan\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"hMerge\" type=\"CT_HMerge\" minOccurs=\"0\"/>\n* <xsd:element name=\"vMerge\" type=\"CT_VMerge\" minOccurs=\"0\"/>\n* <xsd:element name=\"tcBorders\" type=\"CT_TcBorders\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"shd\" type=\"CT_Shd\" minOccurs=\"0\"/>\n* <xsd:element name=\"noWrap\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"tcMar\" type=\"CT_TcMar\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"textDirection\" type=\"CT_TextDirection\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tcFitText\" type=\"CT_OnOff\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"vAlign\" type=\"CT_VerticalJc\" minOccurs=\"0\"/>\n* <xsd:element name=\"hideMark\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"headers\" type=\"CT_Headers\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n*\n* <xsd:group name=\"EG_CellMarkupElements\">\n* <xsd:choice>\n* <xsd:element name=\"cellIns\" type=\"CT_TrackChange\" minOccurs=\"0\"/>\n* <xsd:element name=\"cellDel\" type=\"CT_TrackChange\" minOccurs=\"0\"/>\n* <xsd:element name=\"cellMerge\" type=\"CT_CellMergeTrackChange\" minOccurs=\"0\"/>\n* </xsd:choice>\n* </xsd:group>\n*\n* <xsd:complexType name=\"CT_TcPrChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TrackChange\">\n* <xsd:sequence>\n* <xsd:element name=\"tcPr\" type=\"CT_TcPrInner\" minOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new TableCellProperties({\n* width: { size: 3000, type: WidthType.DXA },\n* shading: { fill: \"EEEEEE\" },\n* verticalAlign: VerticalAlign.CENTER,\n* columnSpan: 2,\n* });\n* ```\n*/\nvar TableCellProperties = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tcPr\", options.includeIfEmpty);\n\t\t_defineProperty(this, \"hasWidth\", void 0);\n\t\t_defineProperty(this, \"hasColumnWidth\", false);\n\t\tthis.hasWidth = options.width !== void 0;\n\t\tif (options.width) this.root.push(createTableWidthElement(\"w:tcW\", options.width));\n\t\tif (options.columnSpan) this.root.push(new GridSpan(options.columnSpan));\n\t\tif (options.verticalMerge) this.root.push(new VerticalMerge(options.verticalMerge));\n\t\telse if (options.rowSpan && options.rowSpan > 1) this.root.push(new VerticalMerge(VerticalMergeType.RESTART));\n\t\tif (options.borders) this.root.push(new TableCellBorders(options.borders));\n\t\tif (options.shading) this.root.push(createShading(options.shading));\n\t\tif (options.margins) {\n\t\t\tconst cellMargin = createCellMargin(options.margins);\n\t\t\tif (cellMargin) this.root.push(cellMargin);\n\t\t}\n\t\tif (options.textDirection) this.root.push(new TDirection(options.textDirection));\n\t\tif (options.verticalAlign) this.root.push(createVerticalAlign(options.verticalAlign));\n\t\tif (options.insertion) this.root.push(new InsertedTableCell(options.insertion));\n\t\tif (options.deletion) this.root.push(new DeletedTableCell(options.deletion));\n\t\tif (options.cellMerge) this.root.push(new CellMerge(options.cellMerge));\n\t\tif (options.revision) this.root.push(new TableCellPropertiesChange(options.revision));\n\t}\n\t/**\n\t* Gives a cell without a width of its own the width of the table's columns it spans, in twips.\n\t*\n\t* @internal\n\t*/\n\tsetColumnWidth(twips) {\n\t\tif (this.hasWidth) return;\n\t\tthis.root.splice(0, this.hasColumnWidth ? 1 : 0, createTableWidthElement(\"w:tcW\", {\n\t\t\tsize: twips,\n\t\t\ttype: WidthType.DXA\n\t\t}));\n\t\tthis.hasColumnWidth = true;\n\t}\n};\nvar TableCellPropertiesChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tcPrChange\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.root.push(new TableCellProperties(_objectSpread2(_objectSpread2({}, options), {}, { includeIfEmpty: true })));\n\t}\n};\n// src/file/table/table-cell/table-cell.ts\n/**\n* Represents a table cell in a WordprocessingML document.\n*\n* A table cell is the basic unit of content within a table. Each cell can contain\n* paragraphs, nested tables, or other block-level content. Cells must always end\n* with a paragraph element.\n*\n* Reference: http://officeopenxml.com/WPtableCell.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Tc\">\n* <xsd:sequence>\n* <xsd:element name=\"tcPr\" type=\"CT_TcPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"1\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"id\" type=\"s:ST_String\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new TableCell({\n* children: [new Paragraph(\"Cell content\")],\n* width: { size: 3000, type: WidthType.DXA },\n* });\n* ```\n*/\nvar TableCell = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tc\");\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* The options the cell was created with.\n\t\t\t*\n\t\t\t* Its borders and shading are declared with hex colors, as they were before they took colors of the document's\n\t\t\t* theme, so that code reading them still compiles. A cell given a theme color has it here as it was given.\n\t\t\t*/\n\t\t\t\"options\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(this, \"properties\", void 0);\n\t\tthis.options = options;\n\t\tthis.properties = new TableCellProperties(options);\n\t\tthis.root.push(this.properties);\n\t\tfor (const child of options.children) this.root.push(child);\n\t}\n\t/**\n\t* Gives the cell, unless it has a width of its own, the width of the table's columns it spans, in twips.\n\t*\n\t* @internal\n\t*/\n\tsetColumnWidth(twips) {\n\t\tthis.properties.setColumnWidth(twips);\n\t}\n\tprepForXml(context) {\n\t\tif (elementOf(this.root[this.root.length - 1]) !== \"w:p\") this.root.push(new Paragraph({}));\n\t\treturn super.prepForXml(context);\n\t}\n};\n// src/file/table/on-off-only-element.ts\n/**\n* On/off elements of tables that Office only takes \"on\" and \"off\" for.\n*\n* @module\n*/\n/**\n* Creates an on/off element that Office only takes \"on\" and \"off\" for.\n*\n* ISO 29500 types a table's w:bidiVisual and a row's w:cantSplit and w:tblHeader as CT_OnOff, which takes true, false,\n* 1, 0, on and off. Office's schema types them as CT_OnOffOnly, which only takes on and off, so Word's validator rejects\n* w:val=\"false\". Off is written as \"off\", which both accept.\n*\n* @example\n* ```typescript\n* createOnOffOnlyElement(\"w:cantSplit\", true);\n* // Generates: <w:cantSplit/>\n*\n* createOnOffOnlyElement(\"w:cantSplit\", false);\n* // Generates: <w:cantSplit w:val=\"off\"/>\n* ```\n*\n* @internal\n*/\nvar createOnOffOnlyElement = (name, value) => value ? new OnOffElement(name) : new StringValueElement(name, \"off\");\n// src/file/table/table-properties/table-borders.ts\n/**\n* Table borders module for WordprocessingML documents.\n*\n* This module provides border options for tables.\n*\n* Reference: http://officeopenxml.com/WPtableBorders.php\n*\n* @module\n*/\nvar NONE_BORDER = {\n\tstyle: BorderStyle.NONE,\n\tsize: 0,\n\tcolor: \"auto\"\n};\nvar DEFAULT_BORDER = {\n\tstyle: BorderStyle.SINGLE,\n\tsize: 4,\n\tcolor: \"auto\"\n};\n/**\n* Represents table borders in a WordprocessingML document.\n*\n* The tblBorders element specifies the borders for all cells in the table. Each side that isn't given is a thin single\n* line, unless `fillMissingSides` is false, when it is left to the table's style.\n*\n* Reference: http://officeopenxml.com/WPtableBorders.php\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new TableBorders({\n* top: { style: BorderStyle.SINGLE, size: 6, color: \"000000\" },\n* bottom: { style: BorderStyle.SINGLE, size: 6, color: \"000000\" },\n* });\n*\n* // To remove all borders\n* new TableBorders(TableBorders.NONE);\n* ```\n*/\nvar TableBorders = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options, { fillMissingSides = true } = {}) {\n\t\tsuper(\"w:tblBorders\");\n\t\tconst sides = [\n\t\t\t[\"w:top\", options.top],\n\t\t\t[\"w:left\", options.left],\n\t\t\t[\"w:bottom\", options.bottom],\n\t\t\t[\"w:right\", options.right],\n\t\t\t[\"w:insideH\", options.insideHorizontal],\n\t\t\t[\"w:insideV\", options.insideVertical]\n\t\t];\n\t\tfor (const [elementName, border] of sides) {\n\t\t\tconst resolved = border !== null && border !== void 0 ? border : fillMissingSides ? DEFAULT_BORDER : void 0;\n\t\t\tif (resolved) this.root.push(createBorderElement(elementName, resolved));\n\t\t}\n\t}\n};\n_defineProperty(TableBorders, \"NONE\", {\n\ttop: NONE_BORDER,\n\tbottom: NONE_BORDER,\n\tleft: NONE_BORDER,\n\tright: NONE_BORDER,\n\tinsideHorizontal: NONE_BORDER,\n\tinsideVertical: NONE_BORDER\n});\n// src/file/table/table-properties/table-float-properties.ts\n/**\n* Table float properties module for WordprocessingML documents.\n*\n* This module provides floating table positioning options, allowing tables\n* to float with text wrapping around them.\n*\n* Reference: http://officeopenxml.com/WPtableFloating.php\n*\n* @module\n*/\n/**\n* Anchor types for floating table positioning.\n*\n* Specifies the base object from which positioning is determined.\n*/\nvar TableAnchorType = {\n\tMARGIN: \"margin\",\n\tPAGE: \"page\",\n\tTEXT: \"text\"\n};\n/**\n* Relative horizontal position values for floating tables.\n*/\nvar RelativeHorizontalPosition = {\n\tCENTER: \"center\",\n\tINSIDE: \"inside\",\n\tLEFT: \"left\",\n\tOUTSIDE: \"outside\",\n\tRIGHT: \"right\"\n};\n/**\n* Relative vertical position values for floating tables.\n*/\nvar RelativeVerticalPosition = {\n\tCENTER: \"center\",\n\tINSIDE: \"inside\",\n\tBOTTOM: \"bottom\",\n\tOUTSIDE: \"outside\",\n\t/**\n\t* In line with the text, with no text beside it. Word places a floating table lined up inline at the top of the\n\t* paragraph after it, with text beside it, so the table is written in line with the text instead.\n\t*/\n\tINLINE: \"inline\",\n\tTOP: \"top\"\n};\n/**\n* Table overlap behavior types.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_TblOverlap\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"never\"/>\n* <xsd:enumeration value=\"overlap\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*/\nvar OverlapType = {\n\tNEVER: \"never\",\n\tOVERLAP: \"overlap\"\n};\n/**\n* Creates floating table properties in a WordprocessingML document.\n*\n* This element specifies the positioning of a floating table,\n* including anchor points, offsets, and text wrapping behavior.\n* The overlap option isn't part of it: the table properties write it as w:tblOverlap.\n*\n* Reference: http://officeopenxml.com/WPtableFloating.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblPPr\">\n* <xsd:attribute name=\"leftFromText\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"rightFromText\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"topFromText\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"bottomFromText\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"vertAnchor\" type=\"ST_VAnchor\"/>\n* <xsd:attribute name=\"horzAnchor\" type=\"ST_HAnchor\"/>\n* <xsd:attribute name=\"tblpXSpec\" type=\"s:ST_XAlign\"/>\n* <xsd:attribute name=\"tblpX\" type=\"ST_SignedTwipsMeasure\"/>\n* <xsd:attribute name=\"tblpYSpec\" type=\"s:ST_YAlign\"/>\n* <xsd:attribute name=\"tblpY\" type=\"ST_SignedTwipsMeasure\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createTableFloatProperties({\n* horizontalAnchor: TableAnchorType.MARGIN,\n* relativeHorizontalPosition: RelativeHorizontalPosition.CENTER,\n* topFromText: 200,\n* bottomFromText: 200,\n* });\n* ```\n*/\nvar createTableFloatProperties = ({ horizontalAnchor, verticalAnchor, absoluteHorizontalPosition, relativeHorizontalPosition, absoluteVerticalPosition, relativeVerticalPosition, bottomFromText, topFromText, leftFromText, rightFromText }) => new BuilderElement({\n\tname: \"w:tblpPr\",\n\tattributes: {\n\t\tleftFromText: {\n\t\t\tkey: \"w:leftFromText\",\n\t\t\tvalue: leftFromText === void 0 ? void 0 : twipsMeasureValue(leftFromText)\n\t\t},\n\t\trightFromText: {\n\t\t\tkey: \"w:rightFromText\",\n\t\t\tvalue: rightFromText === void 0 ? void 0 : twipsMeasureValue(rightFromText)\n\t\t},\n\t\ttopFromText: {\n\t\t\tkey: \"w:topFromText\",\n\t\t\tvalue: topFromText === void 0 ? void 0 : twipsMeasureValue(topFromText)\n\t\t},\n\t\tbottomFromText: {\n\t\t\tkey: \"w:bottomFromText\",\n\t\t\tvalue: bottomFromText === void 0 ? void 0 : twipsMeasureValue(bottomFromText)\n\t\t},\n\t\tabsoluteHorizontalPosition: {\n\t\t\tkey: \"w:tblpX\",\n\t\t\tvalue: absoluteHorizontalPosition === void 0 ? void 0 : signedTwipsMeasureValue(absoluteHorizontalPosition)\n\t\t},\n\t\tabsoluteVerticalPosition: {\n\t\t\tkey: \"w:tblpY\",\n\t\t\tvalue: absoluteVerticalPosition === void 0 ? void 0 : signedTwipsMeasureValue(absoluteVerticalPosition)\n\t\t},\n\t\thorizontalAnchor: {\n\t\t\tkey: \"w:horzAnchor\",\n\t\t\tvalue: horizontalAnchor\n\t\t},\n\t\trelativeHorizontalPosition: {\n\t\t\tkey: \"w:tblpXSpec\",\n\t\t\tvalue: relativeHorizontalPosition\n\t\t},\n\t\trelativeVerticalPosition: {\n\t\t\tkey: \"w:tblpYSpec\",\n\t\t\tvalue: relativeVerticalPosition\n\t\t},\n\t\tverticalAnchor: {\n\t\t\tkey: \"w:vertAnchor\",\n\t\t\tvalue: verticalAnchor\n\t\t}\n\t}\n});\n// src/file/table/table-properties/table-layout.ts\n/**\n* Table layout module for WordprocessingML documents.\n*\n* This module provides table layout algorithm settings.\n*\n* @module\n*/\n/**\n* Table layout algorithm types.\n*\n* Specifies how the table width is calculated.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_TblLayoutType\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"fixed\"/>\n* <xsd:enumeration value=\"autofit\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar TableLayoutType = {\n\t/** Auto-fit layout - column widths are adjusted based on content */\n\tAUTOFIT: \"autofit\",\n\t/** Fixed layout - column widths are fixed as specified */\n\tFIXED: \"fixed\"\n};\n/**\n* Creates table layout settings in a WordprocessingML document.\n*\n* The tblLayout element specifies the algorithm used to lay out the table.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblLayoutType\">\n* <xsd:attribute name=\"type\" type=\"ST_TblLayoutType\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createTableLayout(TableLayoutType.FIXED);\n* ```\n*/\nvar createTableLayout = (type) => new BuilderElement({\n\tname: \"w:tblLayout\",\n\tattributes: { type: {\n\t\tkey: \"w:type\",\n\t\tvalue: type\n\t} }\n});\n// src/file/table/table-cell-spacing.ts\n/**\n* Table cell spacing module for WordprocessingML documents.\n*\n* This module provides cell spacing settings for tables, controlling\n* the space between cells in a table.\n*\n* Reference: http://officeopenxml.com/WPtableCellSpacing.php\n*\n* @module\n*/\n/**\n* Cell spacing measurement types.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_TblCellSpacing\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"nil\"/>\n* <xsd:enumeration value=\"dxa\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*/\nvar CellSpacingType = {\n\t/** Value is in twentieths of a point */\n\tDXA: \"dxa\",\n\t/** No (empty) value. */\n\tNIL: \"nil\"\n};\n/**\n* Creates table cell spacing in a WordprocessingML document.\n*\n* The tblCellSpacing element specifies the spacing between cells in a table.\n*\n* Reference: http://officeopenxml.com/WPtableCellSpacing.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblCellSpacing\">\n* <xsd:attribute name=\"w\" type=\"ST_MeasurementOrPercent\"/>\n* <xsd:attribute name=\"type\" type=\"ST_TblCellSpacing\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createTableCellSpacing({ value: 100, type: CellSpacingType.DXA });\n* ```\n*/\nvar createTableCellSpacing = ({ type = CellSpacingType.DXA, value }) => new BuilderElement({\n\tname: \"w:tblCellSpacing\",\n\tattributes: {\n\t\ttype: {\n\t\t\tkey: \"w:type\",\n\t\t\tvalue: type\n\t\t},\n\t\tvalue: {\n\t\t\tkey: \"w:w\",\n\t\t\tvalue: measurementOrPercentValue(value)\n\t\t}\n\t}\n});\n// src/file/table/table-properties/table-look.ts\n/**\n* Table look module for WordprocessingML documents.\n*\n* Table look specifies conditional formatting settings that determine which\n* special formatting is applied to a table. These settings control whether\n* special formatting is applied to the first row, last row, first column,\n* last column, and whether to display horizontal or vertical banding.\n*\n* Reference: http://officeopenxml.com/WPtblLook.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblLook\">\n* <xsd:attribute name=\"firstRow\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"lastRow\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"firstColumn\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"lastColumn\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"noHBand\" type=\"s:ST_OnOff\"/>\n* <xsd:attribute name=\"noVBand\" type=\"s:ST_OnOff\"/>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\n/**\n* Creates a table look element for conditional formatting settings.\n*\n* The tblLook element specifies which conditional formatting settings\n* are active for a table. These settings work in conjunction with table\n* styles to apply special formatting to specific regions of the table.\n*\n* Reference: http://officeopenxml.com/WPtblLook.php\n*\n* @example\n* ```typescript\n* // Table with header row formatting and alternating row colors\n* new Table({\n* rows: [...],\n* tableLook: {\n* firstRow: true,\n* noHBand: false,\n* noVBand: true,\n* },\n* });\n* ```\n*/\nvar createTableLook = ({ firstRow, lastRow, firstColumn, lastColumn, noHBand, noVBand }) => new BuilderElement({\n\tname: \"w:tblLook\",\n\tattributes: {\n\t\tfirstRow: {\n\t\t\tkey: \"w:firstRow\",\n\t\t\tvalue: firstRow\n\t\t},\n\t\tlastRow: {\n\t\t\tkey: \"w:lastRow\",\n\t\t\tvalue: lastRow\n\t\t},\n\t\tfirstColumn: {\n\t\t\tkey: \"w:firstColumn\",\n\t\t\tvalue: firstColumn\n\t\t},\n\t\tlastColumn: {\n\t\t\tkey: \"w:lastColumn\",\n\t\t\tvalue: lastColumn\n\t\t},\n\t\tnoHBand: {\n\t\t\tkey: \"w:noHBand\",\n\t\t\tvalue: noHBand\n\t\t},\n\t\tnoVBand: {\n\t\t\tkey: \"w:noVBand\",\n\t\t\tvalue: noVBand\n\t\t}\n\t}\n});\n// src/file/table/table-properties/table-properties.ts\n/**\n* Table properties module for WordprocessingML documents.\n*\n* This module provides table-level properties including width, borders,\n* layout, alignment, and margins.\n*\n* Reference: http://officeopenxml.com/WPtableProperties.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TblPrBase\">\n* <xsd:sequence>\n* <xsd:element name=\"tblStyle\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"tblpPr\" type=\"CT_TblPPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblOverlap\" type=\"CT_TblOverlap\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"bidiVisual\" type=\"CT_OnOff\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblStyleRowBandSize\" type=\"CT_DecimalNumber\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblStyleColBandSize\" type=\"CT_DecimalNumber\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblW\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"jc\" type=\"CT_JcTable\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblCellSpacing\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblInd\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblBorders\" type=\"CT_TblBorders\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"shd\" type=\"CT_Shd\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblLayout\" type=\"CT_TblLayoutType\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblCellMar\" type=\"CT_TblCellMar\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblLook\" type=\"CT_TblLook\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblCaption\" type=\"CT_String\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblDescription\" type=\"CT_String\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_TblPrChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TrackChange\">\n* <xsd:sequence>\n* <xsd:element name=\"tblPr\" type=\"CT_TblPrBase\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\nvar createTableOverlap = (overlap) => new BuilderElement({\n\tname: \"w:tblOverlap\",\n\tattributes: { val: {\n\t\tkey: \"w:val\",\n\t\tvalue: overlap\n\t} }\n});\nvar INLINE_ALIGNMENTS = {\n\t[RelativeHorizontalPosition.LEFT]: AlignmentType.LEFT,\n\t[RelativeHorizontalPosition.CENTER]: AlignmentType.CENTER,\n\t[RelativeHorizontalPosition.RIGHT]: AlignmentType.RIGHT\n};\n/**\n* Represents table properties (tblPr) in a WordprocessingML document.\n*\n* The tblPr element specifies the properties for a table including width,\n* alignment, borders, margins, and layout.\n*\n* Reference: http://officeopenxml.com/WPtableProperties.php\n*/\nvar TableProperties = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tvar _options$float, _options$alignment, _options$float2;\n\t\tsuper(\"w:tblPr\", options.includeIfEmpty);\n\t\tif (options.style) this.root.push(new StringValueElement(\"w:tblStyle\", options.style));\n\t\tconst inline = ((_options$float = options.float) === null || _options$float === void 0 ? void 0 : _options$float.relativeVerticalPosition) === RelativeVerticalPosition.INLINE;\n\t\tconst float = inline ? void 0 : options.float;\n\t\tif (float) this.root.push(createTableFloatProperties(float));\n\t\tif (float === null || float === void 0 ? void 0 : float.overlap) this.root.push(createTableOverlap(float.overlap));\n\t\tif (options.visuallyRightToLeft !== void 0) this.root.push(createOnOffOnlyElement(\"w:bidiVisual\", options.visuallyRightToLeft));\n\t\tif (options.width) this.root.push(createTableWidthElement(\"w:tblW\", options.width));\n\t\tconst alignment = (_options$alignment = options.alignment) !== null && _options$alignment !== void 0 ? _options$alignment : inline && ((_options$float2 = options.float) === null || _options$float2 === void 0 ? void 0 : _options$float2.relativeHorizontalPosition) ? INLINE_ALIGNMENTS[options.float.relativeHorizontalPosition] : void 0;\n\t\tif (alignment) this.root.push(createAlignment(alignment));\n\t\tif (options.cellSpacing) this.root.push(createTableCellSpacing(options.cellSpacing));\n\t\tif (options.indent) this.root.push(createTableWidthElement(\"w:tblInd\", options.indent));\n\t\tif (options.borders) this.root.push(new TableBorders(options.borders, { fillMissingSides: !options.style }));\n\t\tif (options.shading) this.root.push(createShading(options.shading));\n\t\tif (options.layout) this.root.push(createTableLayout(options.layout));\n\t\tif (options.cellMargin) {\n\t\t\tconst cellMargin = createTableCellMargin(options.cellMargin);\n\t\t\tif (cellMargin) this.root.push(cellMargin);\n\t\t}\n\t\tif (options.tableLook) this.root.push(createTableLook(options.tableLook));\n\t\tif (options.revision) this.root.push(new TablePropertiesChange(options.revision));\n\t}\n};\nvar TablePropertiesChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tblPrChange\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.root.push(new TableProperties(_objectSpread2(_objectSpread2({}, options), {}, { includeIfEmpty: true })));\n\t}\n};\n// src/file/table/table-row/table-row-height.ts\n/**\n* Table row height module for WordprocessingML documents.\n*\n* This module provides row height configuration including rules for how height should be applied.\n*\n* Reference: http://officeopenxml.com/WPtableRow.php\n*\n* @module\n*/\n/**\n* Height rules for table rows.\n*\n* Specifies how the height value should be interpreted.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:simpleType name=\"ST_HeightRule\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"auto\"/>\n* <xsd:enumeration value=\"exact\"/>\n* <xsd:enumeration value=\"atLeast\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar HeightRule = {\n\t/** Height is determined based on the content, so value is ignored. */\n\tAUTO: \"auto\",\n\t/** At least the value specified */\n\tATLEAST: \"atLeast\",\n\t/** Exactly the value specified */\n\tEXACT: \"exact\"\n};\n/**\n* Creates table row height (trHeight) in a WordprocessingML document.\n*\n* The trHeight element specifies the height of a table row, along with a rule\n* determining how the height should be applied.\n*\n* Reference: http://officeopenxml.com/WPtableRow.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Height\">\n* <xsd:attribute name=\"val\" type=\"s:ST_TwipsMeasure\"/>\n* <xsd:attribute name=\"hRule\" type=\"ST_HeightRule\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createTableRowHeight(1000, HeightRule.EXACT);\n* ```\n*/\nvar createTableRowHeight = (value, rule) => new BuilderElement({\n\tname: \"w:trHeight\",\n\tattributes: {\n\t\tvalue: {\n\t\t\tkey: \"w:val\",\n\t\t\tvalue: twipsMeasureValue(value)\n\t\t},\n\t\trule: {\n\t\t\tkey: \"w:hRule\",\n\t\t\tvalue: rule\n\t\t}\n\t}\n});\n// src/file/table/table-row/table-row-properties.ts\n/**\n* Table row properties module for WordprocessingML documents.\n*\n* This module provides row-level properties including height and header row settings.\n*\n* Reference: http://officeopenxml.com/WPtableRowProperties.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TrPrBase\">\n* <xsd:choice maxOccurs=\"unbounded\">\n* <xsd:element name=\"cnfStyle\" type=\"CT_Cnf\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"divId\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"gridBefore\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"gridAfter\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"wBefore\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"wAfter\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"cantSplit\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"trHeight\" type=\"CT_Height\" minOccurs=\"0\"/>\n* <xsd:element name=\"tblHeader\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"tblCellSpacing\" type=\"CT_TblWidth\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"jc\" type=\"CT_JcTable\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"hidden\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* </xsd:choice>\n* </xsd:complexType>\n* <xsd:complexType name=\"CT_TrPr\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TrPrBase\">\n* <xsd:sequence>\n* <xsd:element name=\"ins\" type=\"CT_TrackChange\" minOccurs=\"0\"/>\n* <xsd:element name=\"del\" type=\"CT_TrackChange\" minOccurs=\"0\"/>\n* <xsd:element name=\"trPrChange\" type=\"CT_TrPrChange\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* <xsd:complexType name=\"CT_TrPrChange\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_TrackChange\">\n* <xsd:sequence>\n* <xsd:element name=\"trPr\" type=\"CT_TrPrBase\" minOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\n/**\n* Represents table row properties (trPr) in a WordprocessingML document.\n*\n* The trPr element specifies properties for a table row including height,\n* whether it can split across pages, and whether it's a header row.\n*\n* Reference: http://officeopenxml.com/WPtableRowProperties.php\n*\n* @example\n* ```typescript\n* new TableRowProperties({\n* cantSplit: true,\n* tableHeader: true,\n* height: {\n* value: 1000,\n* rule: HeightRule.EXACT,\n* },\n* });\n* ```\n*/\nvar TableRowProperties = class extends IgnoreIfEmptyXmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:trPr\", options.includeIfEmpty);\n\t\tif (options.cantSplit !== void 0) this.root.push(createOnOffOnlyElement(\"w:cantSplit\", options.cantSplit));\n\t\tif (options.tableHeader !== void 0) this.root.push(createOnOffOnlyElement(\"w:tblHeader\", options.tableHeader));\n\t\tif (options.height) this.root.push(createTableRowHeight(options.height.value, options.height.rule));\n\t\tif (options.cellSpacing) this.root.push(createTableCellSpacing(options.cellSpacing));\n\t\tif (options.insertion) this.root.push(new InsertedTableRow(options.insertion));\n\t\tif (options.deletion) this.root.push(new DeletedTableRow(options.deletion));\n\t\tif (options.revision) this.root.push(new TableRowPropertiesChange(options.revision));\n\t}\n};\nvar TableRowPropertiesChange = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:trPrChange\");\n\t\tthis.root.push(new ChangeAttributes({\n\t\t\tid: options.id,\n\t\t\tauthor: options.author,\n\t\t\tdate: options.date\n\t\t}));\n\t\tthis.root.push(new TableRowProperties(_objectSpread2(_objectSpread2({}, options), {}, { includeIfEmpty: true })));\n\t}\n};\n// src/file/table/table-row/table-row.ts\n/**\n* Table row module for WordprocessingML documents.\n*\n* Reference: http://officeopenxml.com/WPtableRow.php\n*\n* @module\n*/\nvar childrenOf = (element, name) => {\n\tconst content = element[name];\n\treturn Array.isArray(content) ? content : [];\n};\nvar nameOf$2 = (element) => Object.keys(element)[0];\n/**\n* The paragraph with `keepNext` in its properties, unless it has its own. It goes after the paragraph's style, as\n* the schema orders them.\n*/\nvar withKeepNext = (paragraph, keepNext) => {\n\tconst children = childrenOf(paragraph, \"w:p\");\n\tconst properties = children.find((child) => nameOf$2(child) === \"w:pPr\");\n\tif (!properties) return { \"w:p\": [{ \"w:pPr\": [keepNext] }, ...children] };\n\tconst settings = childrenOf(properties, \"w:pPr\");\n\tif (settings.some((setting) => nameOf$2(setting) === \"w:keepNext\")) return paragraph;\n\tconst before = settings.filter((setting) => nameOf$2(setting) === \"w:pStyle\").length;\n\tconst newProperties = { \"w:pPr\": [\n\t\t...settings.slice(0, before),\n\t\tkeepNext,\n\t\t...settings.slice(before)\n\t] };\n\treturn { \"w:p\": children.map((child) => child === properties ? newProperties : child) };\n};\n/**\n* Represents a table row in a WordprocessingML document.\n*\n* A table row is a single row of cells within a table. Each row contains\n* one or more table cells that hold the actual content. A row with no cells\n* isn't written, as Word can't open a document with one.\n*\n* Reference: http://officeopenxml.com/WPtableRow.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Row\">\n* <xsd:sequence>\n* <xsd:element name=\"tblPrEx\" type=\"CT_TblPrEx\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"trPr\" type=\"CT_TrPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:group ref=\"EG_ContentCellContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"rsidRPr\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidR\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidDel\" type=\"ST_LongHexNumber\"/>\n* <xsd:attribute name=\"rsidTr\" type=\"ST_LongHexNumber\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new TableRow({\n* children: [\n* new TableCell({ children: [new Paragraph(\"Cell 1\")] }),\n* new TableCell({ children: [new Paragraph(\"Cell 2\")] }),\n* ],\n* });\n* ```\n*/\nvar TableRow = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:tr\");\n\t\t_defineProperty(this, \"options\", void 0);\n\t\tthis.options = options;\n\t\tthis.root.push(new TableRowProperties(options));\n\t\tfor (const child of options.children) this.root.push(child);\n\t}\n\tprepForXml(context) {\n\t\tif (this.cells.length === 0) return;\n\t\tconst xml = super.prepForXml(context);\n\t\tif (!xml || this.options.keepNext === void 0) return xml;\n\t\tconst keepNext = new OnOffElement(\"w:keepNext\", this.options.keepNext).prepForXml(context);\n\t\treturn { \"w:tr\": childrenOf(xml, \"w:tr\").map((child) => nameOf$2(child) === \"w:tc\" ? { \"w:tc\": childrenOf(child, \"w:tc\").map((content) => nameOf$2(content) === \"w:p\" ? withKeepNext(content, keepNext) : content) } : child) };\n\t}\n\tget CellCount() {\n\t\treturn this.options.children.length;\n\t}\n\tget cells() {\n\t\treturn this.root.filter((xmlComponent) => elementOf(xmlComponent) === \"w:tc\");\n\t}\n\taddCellToIndex(cell, index) {\n\t\tthis.root.splice(index + 1, 0, cell);\n\t}\n\taddCellToColumnIndex(cell, columnIndex) {\n\t\tconst rootIndex = this.columnIndexToRootIndex(columnIndex, true);\n\t\tthis.addCellToIndex(cell, rootIndex - 1);\n\t}\n\trootIndexToColumnIndex(rootIndex) {\n\t\tif (rootIndex < 1 || rootIndex >= this.root.length) throw new Error(`cell 'rootIndex' should between 1 to ${this.root.length - 1}`);\n\t\tlet colIdx = 0;\n\t\tfor (let rootIdx = 1; rootIdx < rootIndex; rootIdx++) {\n\t\t\tconst cell = this.root[rootIdx];\n\t\t\tcolIdx += cell.options.columnSpan || 1;\n\t\t}\n\t\treturn colIdx;\n\t}\n\tcolumnIndexToRootIndex(columnIndex, allowEndNewCell = false) {\n\t\tif (columnIndex < 0) throw new Error(`cell 'columnIndex' should not less than zero`);\n\t\tlet colIdx = 0;\n\t\tlet rootIdx = 1;\n\t\twhile (colIdx <= columnIndex) {\n\t\t\tif (rootIdx >= this.root.length) {\n\t\t\t\tif (allowEndNewCell) return this.root.length;\n\t\t\t\telse throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`);\n\t\t\t}\n\t\t\tconst cell = this.root[rootIdx];\n\t\t\trootIdx += 1;\n\t\t\tcolIdx += cell && cell.options.columnSpan || 1;\n\t\t}\n\t\treturn rootIdx - 1;\n\t}\n};\n// src/file/table/table.ts\n/**\n* Table module for WordprocessingML documents.\n*\n* Reference: http://officeopenxml.com/WPtableGrid.php\n*\n* @module\n*/\n/**\n* Represents a table in a WordprocessingML document.\n*\n* A table is a set of paragraphs (and other block-level content) arranged in rows and columns.\n* Tables are used to organize content into a grid structure.\n*\n* Reference: http://officeopenxml.com/WPtable.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Tbl\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_RangeMarkupElements\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"tblPr\" type=\"CT_TblPr\"/>\n* <xsd:element name=\"tblGrid\" type=\"CT_TblGrid\"/>\n* <xsd:group ref=\"EG_ContentRowContent\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new Table({\n* rows: [\n* new TableRow({\n* children: [\n* new TableCell({ children: [new Paragraph(\"Cell 1\")] }),\n* new TableCell({ children: [new Paragraph(\"Cell 2\")] }),\n* ],\n* }),\n* ],\n* });\n* ```\n*/\nvar Table = class Table extends FileChild {\n\tconstructor({ rows, width, columnWidths, columnWidthsRevision, margins, indent, float, layout, style, borders, alignment, visuallyRightToLeft, tableLook, cellSpacing, revision }) {\n\t\tsuper(\"w:tbl\");\n\t\t_defineProperty(this, \"rows\", void 0);\n\t\t_defineProperty(this, \"width\", void 0);\n\t\t_defineProperty(this, \"columnWidths\", void 0);\n\t\t_defineProperty(this, \"columnWidthsRevision\", void 0);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Grid column widths in twips: the explicit `columnWidths`, or the widths derived\n\t\t\t* from the table and cell widths (re-resolved against the actual page or parent\n\t\t\t* cell every time the table is serialized).\n\t\t\t*/\n\t\t\t\"resolvedColumnWidths\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.rows = rows;\n\t\tthis.width = width !== null && width !== void 0 ? width : { size: 100 };\n\t\tthis.columnWidths = columnWidths;\n\t\tthis.columnWidthsRevision = columnWidthsRevision;\n\t\trows.forEach((row, rowIndex) => {\n\t\t\tif (rowIndex === rows.length - 1) return;\n\t\t\tlet columnIndex = 0;\n\t\t\trow.cells.forEach((cell) => {\n\t\t\t\tif (cell.options.rowSpan && cell.options.rowSpan > 1) {\n\t\t\t\t\tconst lastChild = cell.options.children[cell.options.children.length - 1];\n\t\t\t\t\tconst continueCell = new TableCell({\n\t\t\t\t\t\trowSpan: cell.options.rowSpan - 1,\n\t\t\t\t\t\tcolumnSpan: cell.options.columnSpan,\n\t\t\t\t\t\twidth: cell.options.width,\n\t\t\t\t\t\tborders: cell.options.borders,\n\t\t\t\t\t\tshading: cell.options.shading,\n\t\t\t\t\t\tmargins: cell.options.margins,\n\t\t\t\t\t\ttextDirection: cell.options.textDirection,\n\t\t\t\t\t\tverticalAlign: cell.options.verticalAlign,\n\t\t\t\t\t\tchildren: lastChild instanceof Paragraph ? [new Paragraph(lastChild.Alignment)] : [],\n\t\t\t\t\t\tverticalMerge: VerticalMergeType.CONTINUE\n\t\t\t\t\t});\n\t\t\t\t\trows[rowIndex + 1].addCellToColumnIndex(continueCell, columnIndex);\n\t\t\t\t}\n\t\t\t\tcolumnIndex += cell.options.columnSpan || 1;\n\t\t\t});\n\t\t});\n\t\tthis.setCellWidths(DEFAULT_AVAILABLE_WIDTH);\n\t\tthis.resolvedColumnWidths = columnWidths !== null && columnWidths !== void 0 ? columnWidths : resolveColumnWidths({\n\t\t\trows,\n\t\t\twidth: this.width,\n\t\t\tavailableWidth: DEFAULT_AVAILABLE_WIDTH\n\t\t});\n\t\tthis.root.push(new TableProperties({\n\t\t\tborders: style ? borders : borders !== null && borders !== void 0 ? borders : {},\n\t\t\twidth: this.width,\n\t\t\tindent,\n\t\t\tfloat,\n\t\t\tlayout,\n\t\t\tstyle,\n\t\t\talignment,\n\t\t\tcellMargin: margins,\n\t\t\tvisuallyRightToLeft,\n\t\t\ttableLook,\n\t\t\tcellSpacing,\n\t\t\trevision\n\t\t}));\n\t\tthis.root.push(new TableGrid(this.resolvedColumnWidths, columnWidthsRevision));\n\t\tfor (const row of rows) this.root.push(row);\n\t}\n\t/**\n\t* Widths of the grid columns in twips, as they will be written to `w:tblGrid`.\n\t*\n\t* These are the explicit `columnWidths` when given, otherwise the widths derived\n\t* from the table and cell widths. Derived widths are resolved against the page (or\n\t* the parent cell for nested tables) during serialization, so before that they\n\t* reflect the default page size.\n\t*/\n\tget ColumnWidths() {\n\t\treturn this.resolvedColumnWidths;\n\t}\n\t/**\n\t* Width in twips, according to the grid, of a cell in one of this table's rows.\n\t*\n\t* Used by nested tables to resolve their own widths against the cell they sit in.\n\t*\n\t* @param row - A row of this table\n\t* @param cell - A cell of that row\n\t* @returns The summed width of the grid columns the cell spans, or undefined if the cell cannot be located on the grid\n\t*/\n\tgetCellWidth(row, cell) {\n\t\tconst { cells } = row;\n\t\tconst cellIndex = cells.indexOf(cell);\n\t\tif (cellIndex === -1) return;\n\t\tconst start = cells.slice(0, cellIndex).reduce((column, previous) => column + (previous.options.columnSpan || 1), 0);\n\t\tconst columns = this.resolvedColumnWidths.slice(start, start + (cell.options.columnSpan || 1));\n\t\treturn columns.length === 0 ? void 0 : columns.reduce((sum, columnWidth) => sum + columnWidth, 0);\n\t}\n\t/**\n\t* Resolves derived grid column widths against the width actually available to the\n\t* table (the section's text width, or the parent cell for nested tables) before\n\t* serializing.\n\t*/\n\tprepForXml(context) {\n\t\tthis.setCellWidths(this.resolveAvailableWidth(context));\n\t\tif (this.columnWidths === void 0) {\n\t\t\tthis.resolvedColumnWidths = resolveColumnWidths({\n\t\t\t\trows: this.rows,\n\t\t\t\twidth: this.width,\n\t\t\t\tavailableWidth: this.resolveAvailableWidth(context)\n\t\t\t});\n\t\t\tconst gridIndex = this.root.findIndex((component) => component instanceof TableGrid);\n\t\t\tthis.root[gridIndex] = new TableGrid(this.resolvedColumnWidths, this.columnWidthsRevision);\n\t\t}\n\t\treturn super.prepForXml(context);\n\t}\n\t/**\n\t* Gives each cell without a width of its own the width of the `columnWidths` it spans, as Word sizes the columns of\n\t* cells without a width to their content, whatever the grid says. When the table's width is wider than the columns\n\t* add up to, they are scaled up to fill it, as Word and LibreOffice lay them out, so columns given as proportions\n\t* keep them.\n\t*/\n\tsetCellWidths(availableWidth) {\n\t\tvar _resolvePreferredWidt;\n\t\tif (this.columnWidths === void 0) return;\n\t\tconst total = this.columnWidths.reduce((sum, columnWidth) => sum + columnWidth, 0);\n\t\tconst tableWidth = (_resolvePreferredWidt = resolvePreferredWidth(this.width, availableWidth)) !== null && _resolvePreferredWidt !== void 0 ? _resolvePreferredWidt : 0;\n\t\tconst scale = total > 0 && tableWidth > total ? tableWidth / total : 1;\n\t\tfor (const row of this.rows) {\n\t\t\tlet column = 0;\n\t\t\tfor (const cell of row.cells) {\n\t\t\t\tconst span = cell.options.columnSpan || 1;\n\t\t\t\tconst spanned = this.columnWidths.slice(column, column + span);\n\t\t\t\tconst cellWidth = Math.round(spanned.reduce((sum, columnWidth) => sum + columnWidth, 0) * scale);\n\t\t\t\tif (spanned.length === span && cellWidth > 0) cell.setColumnWidth(cellWidth);\n\t\t\t\tcolumn += span;\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Finds the width in twips available to this table from the serialization context:\n\t* the parent cell for a nested table, otherwise the text width of the section the\n\t* table belongs to (the first section for headers, footers and other parts). Falls\n\t* back to the default page when the context carries no document.\n\t*/\n\tresolveAvailableWidth(context) {\n\t\tvar _context$file, _stack, _section$AvailableTex;\n\t\tconst { stack } = context;\n\t\tconst cell = stack[stack.length - 1];\n\t\tconst row = stack[stack.length - 2];\n\t\tconst parentTable = stack[stack.length - 3];\n\t\tif (cell instanceof TableCell && row instanceof TableRow && parentTable instanceof Table) {\n\t\t\tconst cellWidth = parentTable.getCellWidth(row, cell);\n\t\t\tif (cellWidth !== void 0) return cellWidth;\n\t\t}\n\t\tconst bodyIndex = stack.findIndex((component) => component instanceof Body);\n\t\tconst documentBody = (_context$file = context.file) === null || _context$file === void 0 || (_context$file = _context$file.Document) === null || _context$file === void 0 ? void 0 : _context$file.View.Body;\n\t\tconst section = bodyIndex >= 0 ? stack[bodyIndex].getSectionPropertiesFor((_stack = stack[bodyIndex + 1]) !== null && _stack !== void 0 ? _stack : this) : documentBody === null || documentBody === void 0 ? void 0 : documentBody.getSectionPropertiesFor();\n\t\treturn (_section$AvailableTex = section === null || section === void 0 ? void 0 : section.AvailableTextWidth) !== null && _section$AvailableTex !== void 0 ? _section$AvailableTex : DEFAULT_AVAILABLE_WIDTH;\n\t}\n};\n// src/file/app-properties/app-properties-attributes.ts\n/**\n* App Properties Attributes module for WordprocessingML documents.\n*\n* Provides namespace attributes for extended document properties.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesExtended.xsd\n*\n* @module\n*/\n/**\n* XML namespace attributes for the app properties element.\n*\n* @property xmlns - Main namespace for extended properties\n* @property vt - Namespace for variant types\n*/\nvar AppPropertiesAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\txmlns: \"xmlns\",\n\t\t\tvt: \"xmlns:vt\"\n\t\t});\n\t}\n};\n// src/file/app-properties/app-properties.ts\n/**\n* App Properties module for WordprocessingML documents.\n*\n* Provides support for extended document properties specific to Office applications.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesExtended.xsd\n*\n* @module\n*/\n/**\n* Represents the extended application properties of a WordprocessingML document.\n*\n* Extended properties contain application-specific metadata such as total editing time,\n* word count, character count, and other Office-specific information.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesExtended.xsd\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Properties\">\n* <xsd:sequence>\n* <xsd:element name=\"Template\" type=\"xsd:string\" minOccurs=\"0\"/>\n* <xsd:element name=\"Manager\" type=\"xsd:string\" minOccurs=\"0\"/>\n* <xsd:element name=\"Company\" type=\"xsd:string\" minOccurs=\"0\"/>\n* <xsd:element name=\"Pages\" type=\"xsd:int\" minOccurs=\"0\"/>\n* <xsd:element name=\"Words\" type=\"xsd:int\" minOccurs=\"0\"/>\n* <xsd:element name=\"Characters\" type=\"xsd:int\" minOccurs=\"0\"/>\n* <xsd:element name=\"PresentationFormat\" type=\"xsd:string\" minOccurs=\"0\"/>\n* <xsd:element name=\"Lines\" type=\"xsd:int\" minOccurs=\"0\"/>\n* <xsd:element name=\"Paragraphs\" type=\"xsd:int\" minOccurs=\"0\"/>\n* <xsd:element name=\"CharactersWithSpaces\" type=\"xsd:int\" minOccurs=\"0\"/>\n* <xsd:element name=\"Application\" type=\"xsd:string\" minOccurs=\"0\"/>\n* <xsd:element name=\"DocSecurity\" type=\"xsd:int\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const appProps = new AppProperties();\n* ```\n*/\nvar AppProperties = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"Properties\");\n\t\tthis.root.push(new AppPropertiesAttributes({\n\t\t\txmlns: \"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\",\n\t\t\tvt: \"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\"\n\t\t}));\n\t}\n};\n// src/file/content-types/content-types-attributes.ts\n/**\n* Attributes for the Types (Content Types) element.\n*\n* Defines the XML namespace for the content types part.\n*\n* @example\n* ```typescript\n* new ContentTypeAttributes({\n* xmlns: \"http://schemas.openxmlformats.org/package/2006/content-types\"\n* });\n* ```\n*/\nvar ContentTypeAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { xmlns: \"xmlns\" });\n\t}\n};\n// src/file/content-types/default/default.ts\n/**\n* Creates a default content type mapping by file extension.\n*\n* Default elements map file extensions (e.g., \"png\", \"xml\") to MIME content types.\n* This tells the package reader what type of content to expect for files with\n* a given extension.\n*\n* @example\n* ```typescript\n* // Map .png files to image/png content type\n* createDefault(\"image/png\", \"png\");\n*\n* // Map .xml files to application/xml content type\n* createDefault(\"application/xml\", \"xml\");\n* ```\n*/\nvar createDefault = (contentType, extension) => new BuilderElement({\n\tname: \"Default\",\n\tattributes: {\n\t\tcontentType: {\n\t\t\tkey: \"ContentType\",\n\t\t\tvalue: contentType\n\t\t},\n\t\textension: {\n\t\t\tkey: \"Extension\",\n\t\t\tvalue: extension\n\t\t}\n\t}\n});\n// src/file/content-types/override/override.ts\n/**\n* Creates a content type override for a specific part.\n*\n* Override elements map specific part paths to MIME content types,\n* taking precedence over default extension mappings. This is used for\n* important parts like document.xml, styles.xml, etc.\n*\n* @example\n* ```typescript\n* // Override content type for the main document part\n* createOverride(\n* \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\",\n* \"/word/document.xml\"\n* );\n*\n* // Override for a header part\n* createOverride(\n* \"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\",\n* \"/word/header1.xml\"\n* );\n* ```\n*/\nvar createOverride = (contentType, partName) => new BuilderElement({\n\tname: \"Override\",\n\tattributes: {\n\t\tcontentType: {\n\t\t\tkey: \"ContentType\",\n\t\t\tvalue: contentType\n\t\t},\n\t\tpartName: {\n\t\t\tkey: \"PartName\",\n\t\t\tvalue: partName\n\t\t}\n\t}\n});\n// src/file/content-types/content-types.ts\n/**\n* Content Types module for Open Packaging Conventions.\n*\n* This module provides the [Content_Types].xml part which defines\n* the content types for all parts in the DOCX package.\n*\n* Reference: http://officeopenxml.com/anatomyofOOXML.php\n*\n* @module\n*/\n/**\n* Represents the Content Types part of an OPC package.\n*\n* ContentTypes maps file extensions and specific paths to their\n* MIME content types, enabling applications to process each part correctly.\n*\n* Reference: http://officeopenxml.com/anatomyofOOXML.php\n*\n* @example\n* ```typescript\n* const contentTypes = new ContentTypes();\n* contentTypes.addHeader(1); // Add header1.xml\n* contentTypes.addFooter(1); // Add footer1.xml\n* ```\n*/\nvar ContentTypes = class extends XmlComponent {\n\t/**\n\t* @param options.macros - Whether the document has VBA macros, which makes its main part a macro-enabled document\n\t* and adds the VBA project (word/vbaProject.bin)\n\t*/\n\tconstructor({ macros = false } = {}) {\n\t\tsuper(\"Types\");\n\t\tthis.root.push(new ContentTypeAttributes({ xmlns: \"http://schemas.openxmlformats.org/package/2006/content-types\" }));\n\t\tthis.root.push(createDefault(\"image/png\", \"png\"));\n\t\tthis.root.push(createDefault(\"image/jpeg\", \"jpeg\"));\n\t\tthis.root.push(createDefault(\"image/jpeg\", \"jpg\"));\n\t\tthis.root.push(createDefault(\"image/bmp\", \"bmp\"));\n\t\tthis.root.push(createDefault(\"image/gif\", \"gif\"));\n\t\tthis.root.push(createDefault(\"image/svg+xml\", \"svg\"));\n\t\tthis.root.push(createDefault(\"application/vnd.openxmlformats-package.relationships+xml\", \"rels\"));\n\t\tthis.root.push(createDefault(\"application/xml\", \"xml\"));\n\t\tthis.root.push(createDefault(\"application/vnd.openxmlformats-officedocument.obfuscatedFont\", \"odttf\"));\n\t\tthis.root.push(createOverride(macros ? \"application/vnd.ms-word.document.macroEnabled.main+xml\" : \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\", \"/word/document.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\", \"/word/styles.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-package.core-properties+xml\", \"/docProps/core.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.custom-properties+xml\", \"/docProps/custom.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.extended-properties+xml\", \"/docProps/app.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\", \"/word/numbering.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\", \"/word/footnotes.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\", \"/word/endnotes.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\", \"/word/settings.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml\", \"/word/fontTable.xml\"));\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.theme+xml\", \"/word/theme/theme1.xml\"));\n\t\tif (macros) this.root.push(createOverride(\"application/vnd.ms-office.vbaProject\", \"/word/vbaProject.bin\"));\n\t}\n\t/**\n\t* Registers the comments part in the content types.\n\t*/\n\taddComments() {\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\", \"/word/comments.xml\"));\n\t}\n\t/**\n\t* Registers the commentsExtended part in the content types.\n\t*/\n\taddCommentsExtended() {\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml\", \"/word/commentsExtended.xml\"));\n\t}\n\t/**\n\t* Registers the commentsIds part in the content types.\n\t*/\n\taddCommentsIds() {\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml\", \"/word/commentsIds.xml\"));\n\t}\n\t/**\n\t* Registers a footer part in the content types.\n\t*\n\t* @param index - Footer index number (e.g., 1 for footer1.xml)\n\t*/\n\taddFooter(index) {\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\", `/word/footer${index}.xml`));\n\t}\n\t/**\n\t* Registers a part by its name, such as a chart or an embedded workbook that a drawing adds to the package.\n\t*\n\t* @param contentType - The part's content type\n\t* @param partName - The part's name, from the root of the package, such as \"/word/charts/chart1.xml\"\n\t*/\n\taddOverride(contentType, partName) {\n\t\tthis.root.push(createOverride(contentType, partName));\n\t}\n\t/**\n\t* Registers a header part in the content types.\n\t*\n\t* @param index - Header index number (e.g., 1 for header1.xml)\n\t*/\n\taddHeader(index) {\n\t\tthis.root.push(createOverride(\"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\", `/word/header${index}.xml`));\n\t}\n};\n// src/file/document/document-attributes.ts\n/**\n* Document attributes module for WordprocessingML documents.\n*\n* This module defines the XML namespace declarations used in OOXML documents.\n* These namespaces are required for proper document parsing and generation.\n*\n* Reference: http://officeopenxml.com/anatomyofOOXML.php\n*\n* @module\n*/\n/**\n* XML namespace URIs used in WordprocessingML documents.\n*\n* These namespaces define the various XML schemas that can be referenced\n* in a document, including WordprocessingML, DrawingML, VML, and others.\n*/\nvar DocumentAttributeNamespaces = {\n\twpc: \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\tmc: \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\to: \"urn:schemas-microsoft-com:office:office\",\n\tr: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\tm: \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\tv: \"urn:schemas-microsoft-com:vml\",\n\twp14: \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\twp: \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\tw10: \"urn:schemas-microsoft-com:office:word\",\n\tw: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\tw14: \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\tw15: \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\twpg: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\twpi: \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\twne: \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\twps: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\",\n\tcp: \"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\",\n\tdc: \"http://purl.org/dc/elements/1.1/\",\n\tdcterms: \"http://purl.org/dc/terms/\",\n\tdcmitype: \"http://purl.org/dc/dcmitype/\",\n\txsi: \"http://www.w3.org/2001/XMLSchema-instance\",\n\tcx: \"http://schemas.microsoft.com/office/drawing/2014/chartex\",\n\tcx1: \"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\",\n\tcx2: \"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex\",\n\tcx3: \"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex\",\n\tcx4: \"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex\",\n\tcx5: \"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex\",\n\tcx6: \"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex\",\n\tcx7: \"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex\",\n\tcx8: \"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex\",\n\taink: \"http://schemas.microsoft.com/office/drawing/2016/ink\",\n\tam3d: \"http://schemas.microsoft.com/office/drawing/2017/model3d\",\n\tw16cex: \"http://schemas.microsoft.com/office/word/2018/wordml/cex\",\n\tw16cid: \"http://schemas.microsoft.com/office/word/2016/wordml/cid\",\n\tw16: \"http://schemas.microsoft.com/office/word/2018/wordml\",\n\tw16sdtdh: \"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash\",\n\tw16se: \"http://schemas.microsoft.com/office/word/2015/wordml/symex\"\n};\n/**\n* Represents XML namespace attributes for a WordprocessingML document.\n*\n* This class generates the xmlns declarations required at the root element\n* of document.xml and other document parts.\n*\n* @example\n* ```typescript\n* new DocumentAttributes(['w', 'r', 'wp'], 'w14 w15');\n* // Generates: xmlns:w=\"...\" xmlns:r=\"...\" xmlns:wp=\"...\" mc:Ignorable=\"w14 w15\"\n* ```\n*\n* @internal\n*/\nvar DocumentAttributes = class extends XmlAttributeComponent {\n\tconstructor(ns, Ignorable) {\n\t\tsuper(_objectSpread2({ Ignorable }, Object.fromEntries(ns.map((n) => [n, DocumentAttributeNamespaces[n]]))));\n\t\t_defineProperty(this, \"xmlKeys\", _objectSpread2({ Ignorable: \"mc:Ignorable\" }, Object.fromEntries(Object.keys(DocumentAttributeNamespaces).map((key) => [key, `xmlns:${key}`]))));\n\t}\n};\n// src/file/core-properties/properties.ts\n/**\n* Represents the core properties of a WordprocessingML document.\n*\n* Core properties contain document metadata based on Dublin Core elements,\n* including title, subject, creator, keywords, description, and modification tracking.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCore.xsd\n*\n* ## XSD Schema\n* ```xml\n* <xs:complexType name=\"CT_CoreProperties\">\n* <xs:all>\n* <xs:element name=\"category\" minOccurs=\"0\" maxOccurs=\"1\" type=\"xs:string\"/>\n* <xs:element name=\"contentStatus\" minOccurs=\"0\" maxOccurs=\"1\" type=\"xs:string\"/>\n* <xs:element ref=\"dcterms:created\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element ref=\"dc:creator\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element ref=\"dc:description\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element ref=\"dc:identifier\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element name=\"keywords\" minOccurs=\"0\" maxOccurs=\"1\" type=\"CT_Keywords\"/>\n* <xs:element ref=\"dc:language\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element name=\"lastModifiedBy\" minOccurs=\"0\" maxOccurs=\"1\" type=\"xs:string\"/>\n* <xs:element name=\"lastPrinted\" minOccurs=\"0\" maxOccurs=\"1\" type=\"xs:dateTime\"/>\n* <xs:element ref=\"dcterms:modified\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element name=\"revision\" minOccurs=\"0\" maxOccurs=\"1\" type=\"xs:string\"/>\n* <xs:element ref=\"dc:subject\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element ref=\"dc:title\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xs:element name=\"version\" minOccurs=\"0\" maxOccurs=\"1\" type=\"xs:string\"/>\n* </xs:all>\n* </xs:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const coreProps = new CoreProperties({\n* title: \"My Document\",\n* subject: \"Sample Document\",\n* creator: \"John Doe\",\n* keywords: \"docx, example\",\n* description: \"A sample document\",\n* lastModifiedBy: \"Jane Doe\",\n* revision: 1\n* });\n* ```\n*/\nvar CoreProperties = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"cp:coreProperties\");\n\t\tthis.root.push(new DocumentAttributes([\n\t\t\t\"cp\",\n\t\t\t\"dc\",\n\t\t\t\"dcterms\",\n\t\t\t\"dcmitype\",\n\t\t\t\"xsi\"\n\t\t]));\n\t\tif (options.title) this.root.push(new StringContainer(\"dc:title\", options.title));\n\t\tif (options.subject) this.root.push(new StringContainer(\"dc:subject\", options.subject));\n\t\tif (options.creator) this.root.push(new StringContainer(\"dc:creator\", options.creator));\n\t\tif (options.keywords) this.root.push(new StringContainer(\"cp:keywords\", options.keywords));\n\t\tif (options.description) this.root.push(new StringContainer(\"dc:description\", options.description));\n\t\tif (options.lastModifiedBy) this.root.push(new StringContainer(\"cp:lastModifiedBy\", options.lastModifiedBy));\n\t\tif (options.revision) this.root.push(new StringContainer(\"cp:revision\", String(options.revision)));\n\t\tthis.root.push(new TimestampElement(\"dcterms:created\"));\n\t\tthis.root.push(new TimestampElement(\"dcterms:modified\"));\n\t}\n};\n/**\n* Attributes for timestamp elements in core properties.\n* Specifies the W3C DateTime Format type for timestamps.\n*/\nvar TimestampElementProperties = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { type: \"xsi:type\" });\n\t}\n};\n/**\n* Represents a timestamp element (created or modified date).\n* Uses W3C DateTime Format (dcterms:W3CDTF) for dates.\n*/\nvar TimestampElement = class extends XmlComponent {\n\tconstructor(name) {\n\t\tsuper(name);\n\t\tthis.root.push(new TimestampElementProperties({ type: \"dcterms:W3CDTF\" }));\n\t\tthis.root.push(dateTimeValue(/* @__PURE__ */ new Date()));\n\t}\n};\n// src/file/custom-properties/custom-properties-attributes.ts\n/**\n* Custom Properties Attributes module for WordprocessingML documents.\n*\n* Provides namespace attributes for custom document properties.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCustom.xsd\n*\n* @module\n*/\n/**\n* XML namespace attributes for the custom properties element.\n*\n* @property xmlns - Main namespace for custom properties\n* @property vt - Namespace for variant types\n*/\nvar CustomPropertiesAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\txmlns: \"xmlns\",\n\t\t\tvt: \"xmlns:vt\"\n\t\t});\n\t}\n};\n// src/file/custom-properties/custom-property-attributes.ts\n/**\n* Custom Property Attributes module for WordprocessingML documents.\n*\n* Provides attributes for individual custom document properties.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCustom.xsd\n*\n* @module\n*/\n/**\n* XML attributes for a custom property element.\n*\n* @property formatId - Format identifier (GUID)\n* @property pid - Property identifier (unique ID)\n* @property name - Property name\n*/\nvar CustomPropertyAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tformatId: \"fmtid\",\n\t\t\tpid: \"pid\",\n\t\t\tname: \"name\"\n\t\t});\n\t}\n};\n// src/file/custom-properties/custom-property.ts\n/**\n* Custom Property module for WordprocessingML documents.\n*\n* Provides support for individual custom document properties.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCustom.xsd\n*\n* @module\n*/\n/**\n* Represents a single custom document property.\n*\n* Custom properties allow storing arbitrary key-value pairs in the document metadata.\n* Each property has a unique name and a string value.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCustom.xsd\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Property\">\n* <xsd:sequence>\n* <xsd:element name=\"lpwstr\" type=\"xsd:string\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"fmtid\" type=\"ST_Guid\" use=\"required\"/>\n* <xsd:attribute name=\"pid\" type=\"xsd:int\" use=\"required\"/>\n* <xsd:attribute name=\"name\" type=\"xsd:string\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const customProp = new CustomProperty(2, {\n* name: \"Department\",\n* value: \"Engineering\"\n* });\n* ```\n*/\nvar CustomProperty = class extends XmlComponent {\n\tconstructor(id, properties) {\n\t\tsuper(\"property\");\n\t\tthis.root.push(new CustomPropertyAttributes({\n\t\t\tformatId: \"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}\",\n\t\t\tpid: id.toString(),\n\t\t\tname: properties.name\n\t\t}));\n\t\tthis.root.push(new CustomPropertyValue(properties.value));\n\t}\n};\n/**\n* Represents the value of a custom property.\n* Uses the variant type \"long pointer to wide string\" for string values.\n*/\nvar CustomPropertyValue = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"vt:lpwstr\");\n\t\tthis.root.push(value);\n\t}\n};\n// src/file/custom-properties/custom-properties.ts\n/**\n* Custom Properties module for WordprocessingML documents.\n*\n* Provides support for managing custom document properties collection.\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCustom.xsd\n*\n* @module\n*/\n/**\n* Represents the collection of custom document properties.\n*\n* Custom properties allow storing arbitrary metadata as name-value pairs.\n* Each property is assigned a unique ID starting from 2 (per Office specification).\n*\n* Reference: ISO-IEC29500-4_2016 shared-documentPropertiesCustom.xsd\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_CustomProperties\">\n* <xsd:sequence>\n* <xsd:element name=\"property\" type=\"CT_Property\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* const customProps = new CustomProperties([\n* { name: \"Department\", value: \"Engineering\" },\n* { name: \"Project\", value: \"Alpha\" }\n* ]);\n* ```\n*/\nvar CustomProperties = class extends XmlComponent {\n\tconstructor(properties) {\n\t\tsuper(\"Properties\");\n\t\t_defineProperty(this, \"nextId\", void 0);\n\t\t_defineProperty(this, \"properties\", []);\n\t\tthis.root.push(new CustomPropertiesAttributes({\n\t\t\txmlns: \"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\",\n\t\t\tvt: \"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\"\n\t\t}));\n\t\tthis.nextId = 2;\n\t\tfor (const property of properties) this.addCustomProperty(property);\n\t}\n\tprepForXml(context) {\n\t\tthis.root.splice(1, this.root.length - 1, ...this.properties);\n\t\treturn super.prepForXml(context);\n\t}\n\taddCustomProperty(property) {\n\t\tthis.properties.push(new CustomProperty(this.nextId++, property));\n\t}\n};\n// src/file/document/body/section-properties/properties/column.ts\n/**\n* Column module for WordprocessingML section properties.\n*\n* Defines individual column properties within multi-column layouts.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Column\">\n* <xsd:attribute name=\"w\" type=\"s:ST_TwipsMeasure\" use=\"optional\" />\n* <xsd:attribute name=\"space\" type=\"s:ST_TwipsMeasure\" use=\"optional\" default=\"0\" />\n* </xsd:complexType>\n* ```\n*\n* @module\n*/\nvar ColumnAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\twidth: \"w:w\",\n\t\t\tspace: \"w:space\"\n\t\t});\n\t}\n};\n/**\n* Represents a column definition (col) for a multi-column section layout.\n*\n* This element defines the width and spacing for an individual column when\n* using unequal column widths in a section.\n*\n* Reference: http://officeopenxml.com/WPsectionPr.php\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* // Create a column with specific width and spacing\n* new Column({\n* width: 3000,\n* space: 720\n* });\n* ```\n*/\nvar Column = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:col\");\n\t\tthis.root.push(new ColumnAttributes({\n\t\t\twidth: twipsMeasureValue(options.width),\n\t\t\tspace: options.space === void 0 ? void 0 : twipsMeasureValue(options.space)\n\t\t}));\n\t}\n};\n// src/file/document-bibliography/document-bibliography.ts\n/**\n* Document bibliography module: the sources that a document's citations and bibliographies refer to.\n*\n* Word keeps a document's sources in a custom XML part, customXml/item1.xml, whose root is a `b:Sources` element, and\n* lists them in its Source Manager. The part's properties, customXml/itemProps1.xml, give it an id and name the schema\n* of its XML, the bibliography's.\n*\n* Reference: ooxml-schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd and shared-customXmlDataProperties.xsd\n*\n* @module\n*/\n/**\n* The properties of the part that a document's sources are in (customXml/itemProps1.xml): its id, and the schema of its\n* XML, the bibliography's.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_DatastoreItem\">\n* <xsd:sequence>\n* <xsd:element name=\"schemaRefs\" type=\"CT_DatastoreSchemaRefs\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"itemID\" type=\"s:ST_Guid\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @param itemId - The part's id, a GUID in braces, such as \"{6E3A1B2C-4D5E-4F60-8A7B-9C0D1E2F3A4B}\"\n*/\nvar createSourcesProperties = (itemId) => new BuilderElement({\n\tname: \"ds:datastoreItem\",\n\tattributes: {\n\t\titemId: {\n\t\t\tkey: \"ds:itemID\",\n\t\t\tvalue: itemId\n\t\t},\n\t\tnamespace: {\n\t\t\tkey: \"xmlns:ds\",\n\t\t\tvalue: \"http://schemas.openxmlformats.org/officeDocument/2006/customXml\"\n\t\t}\n\t},\n\tchildren: [new BuilderElement({\n\t\tname: \"ds:schemaRefs\",\n\t\tchildren: [new BuilderElement({\n\t\t\tname: \"ds:schemaRef\",\n\t\t\tattributes: { uri: {\n\t\t\t\tkey: \"ds:uri\",\n\t\t\t\tvalue: \"http://schemas.openxmlformats.org/officeDocument/2006/bibliography\"\n\t\t\t} }\n\t\t})]\n\t})]\n});\n// src/file/document-macros/document-macros.ts\n/**\n* Document macros module: a document's VBA macros, which make it a macro-enabled document (.docm).\n*\n* The macros are a VBA project, which Word keeps in word/vbaProject.bin. The events of the document that the project\n* handles are listed in word/vbaData.xml, as Word only runs a handler, such as `Document_Open`, for an event listed\n* there.\n*\n* Reference: ooxml-schemas/microsoft/wml-2006.xsd (CT_VbaSuppData), [MS-OFFMACRO2]\n*\n* @module\n*/\nvar EVENT_ELEMENTS = {\n\tnew: \"wne:eventDocNew\",\n\topen: \"wne:eventDocOpen\",\n\tclose: \"wne:eventDocClose\",\n\tsync: \"wne:eventDocSync\",\n\txmlAfterInsert: \"wne:eventDocXmlAfterInsert\",\n\txmlBeforeDelete: \"wne:eventDocXmlBeforeDelete\",\n\tcontentControlAfterAdd: \"wne:eventDocContentControlAfterInsert\",\n\tcontentControlBeforeDelete: \"wne:eventDocContentControlBeforeDelete\",\n\tcontentControlOnExit: \"wne:eventDocContentControlOnExit\",\n\tcontentControlOnEnter: \"wne:eventDocContentControlOnEnter\",\n\tcontentControlBeforeStoreUpdate: \"wne:eventDocStoreUpdate\",\n\tcontentControlBeforeContentUpdate: \"wne:eventDocContentControlContentUpdate\",\n\tbuildingBlockInsert: \"wne:eventDocBuildingBlockAfterInsert\"\n};\n/**\n* The events of a document that its macros handle (word/vbaData.xml).\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_VbaSuppData\">\n* <xsd:sequence>\n* <xsd:element name=\"docEvents\" type=\"CT_DocEvents\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"mcds\" type=\"CT_Mcds\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createMacroEvents = (events) => new BuilderElement({\n\tname: \"wne:vbaSuppData\",\n\tattributes: { namespace: {\n\t\tkey: \"xmlns:wne\",\n\t\tvalue: \"http://schemas.microsoft.com/office/word/2006/wordml\"\n\t} },\n\tchildren: [new BuilderElement({\n\t\tname: \"wne:docEvents\",\n\t\tchildren: Object.entries(EVENT_ELEMENTS).filter(([event]) => events.includes(event)).map(([, name]) => new BuilderElement({ name }))\n\t})]\n});\n// src/file/document/document-background/document-background.ts\n/**\n* Document background module for WordprocessingML documents.\n*\n* This module provides functionality for setting document background colors,\n* in hex or in a color of the document's theme.\n*\n* Reference: http://officeopenxml.com/WPdocument.php\n*\n* @module\n*/\n/**\n* Attributes for the document background element.\n*\n* ## XSD Schema (ST_ThemeColor)\n* ```xml\n* <xsd:simpleType name=\"ST_ThemeColor\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"dark1\"/>\n* <xsd:enumeration value=\"light1\"/>\n* <xsd:enumeration value=\"dark2\"/>\n* <xsd:enumeration value=\"light2\"/>\n* <xsd:enumeration value=\"accent1\"/>\n* <xsd:enumeration value=\"accent2\"/>\n* <xsd:enumeration value=\"accent3\"/>\n* <xsd:enumeration value=\"accent4\"/>\n* <xsd:enumeration value=\"accent5\"/>\n* <xsd:enumeration value=\"accent6\"/>\n* <xsd:enumeration value=\"hyperlink\"/>\n* <xsd:enumeration value=\"followedHyperlink\"/>\n* <xsd:enumeration value=\"none\"/>\n* <xsd:enumeration value=\"background1\"/>\n* <xsd:enumeration value=\"text1\"/>\n* <xsd:enumeration value=\"background2\"/>\n* <xsd:enumeration value=\"text2\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @internal\n*/\nvar DocumentBackgroundAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tcolor: \"w:color\",\n\t\t\tthemeColor: \"w:themeColor\",\n\t\t\tthemeShade: \"w:themeShade\",\n\t\t\tthemeTint: \"w:themeTint\"\n\t\t});\n\t}\n};\n/**\n* Represents a document background in a WordprocessingML document.\n*\n* The background element specifies the background color or theme color\n* for the document.\n*\n* Reference: http://officeopenxml.com/WPdocument.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Background\">\n* <xsd:sequence>\n* <xsd:sequence maxOccurs=\"unbounded\">\n* <xsd:any processContents=\"lax\" namespace=\"urn:schemas-microsoft-com:vml\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:any processContents=\"lax\" namespace=\"urn:schemas-microsoft-com:office:office\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:element name=\"drawing\" type=\"CT_Drawing\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"color\" type=\"ST_HexColor\" use=\"optional\" default=\"auto\"/>\n* <xsd:attribute name=\"themeColor\" type=\"ST_ThemeColor\" use=\"optional\"/>\n* <xsd:attribute name=\"themeTint\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"themeShade\" type=\"ST_UcharHexNumber\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new DocumentBackground({ color: \"FFFF00\" }); // Yellow background\n* new DocumentBackground({ color: { theme: \"accent1\", lighter: 80 } }); // A light version of the theme's first accent color\n* ```\n*/\nvar DocumentBackground = class extends XmlComponent {\n\t/**\n\t* @throws If a color isn't valid, or `color` is a theme color and `themeColor`, `themeShade` or `themeTint` is given\n\t*/\n\tconstructor({ color, themeColor, themeShade, themeTint }) {\n\t\tsuper(\"w:background\");\n\t\tif (typeof color === \"object\" && (themeColor !== void 0 || themeShade !== void 0 || themeTint !== void 0)) throw new Error(\"Invalid background. Expected a theme color in color, or themeColor, themeShade and themeTint, not both\");\n\t\tthis.root.push(new ColorAttributeComponent([\n\t\t\t{\n\t\t\t\tkeys: COLOR_ATTRIBUTES,\n\t\t\t\tcolor\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"w:themeColor\",\n\t\t\t\tvalue: themeColor\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"w:themeShade\",\n\t\t\t\tvalue: themeShade === void 0 ? void 0 : uCharHexNumber(themeShade)\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"w:themeTint\",\n\t\t\t\tvalue: themeTint === void 0 ? void 0 : uCharHexNumber(themeTint)\n\t\t\t}\n\t\t]));\n\t}\n};\n// src/file/document/document.ts\n/**\n* Represents the main document element in a WordprocessingML document.\n*\n* The document element is the root element of the main document part. It contains\n* the body element which holds all the content of the document.\n*\n* Reference: http://officeopenxml.com/WPdocument.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"document\" type=\"CT_Document\"/>\n*\n* <xsd:complexType name=\"CT_Document\">\n* <xsd:complexContent>\n* <xsd:extension base=\"CT_DocumentBase\">\n* <xsd:sequence>\n* <xsd:element name=\"body\" type=\"CT_Body\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"conformance\" type=\"s:ST_ConformanceClass\"/>\n* <xsd:attribute ref=\"mc:Ignorable\" use=\"optional\" />\n* </xsd:extension>\n* </xsd:complexContent>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_DocumentBase\">\n* <xsd:sequence>\n* <xsd:element name=\"background\" type=\"CT_Background\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a document with default options\n* const doc = new Document({});\n*\n* // Create a document with background\n* const doc = new Document({\n* background: {\n* color: \"FF0000\",\n* },\n* });\n*\n* // Add content to the document\n* doc.add(new Paragraph(\"Hello World\"));\n* doc.add(new Table({ rows: [...] }));\n* ```\n*/\nvar Document = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:document\");\n\t\t_defineProperty(this, \"body\", void 0);\n\t\tthis.root.push(new DocumentAttributes([\n\t\t\t\"wpc\",\n\t\t\t\"mc\",\n\t\t\t\"o\",\n\t\t\t\"r\",\n\t\t\t\"m\",\n\t\t\t\"v\",\n\t\t\t\"wp14\",\n\t\t\t\"wp\",\n\t\t\t\"w10\",\n\t\t\t\"w\",\n\t\t\t\"w14\",\n\t\t\t\"w15\",\n\t\t\t\"wpg\",\n\t\t\t\"wpi\",\n\t\t\t\"wne\",\n\t\t\t\"wps\",\n\t\t\t\"cx\",\n\t\t\t\"cx1\",\n\t\t\t\"cx2\",\n\t\t\t\"cx3\",\n\t\t\t\"cx4\",\n\t\t\t\"cx5\",\n\t\t\t\"cx6\",\n\t\t\t\"cx7\",\n\t\t\t\"cx8\",\n\t\t\t\"aink\",\n\t\t\t\"am3d\",\n\t\t\t\"w16cex\",\n\t\t\t\"w16cid\",\n\t\t\t\"w16\",\n\t\t\t\"w16sdtdh\",\n\t\t\t\"w16se\"\n\t\t], \"w14 w15 wp14\"));\n\t\tthis.body = new Body({ pageNumbers: options.pageNumbers });\n\t\tif (options.background) this.root.push(new DocumentBackground(options.background));\n\t\tthis.root.push(this.body);\n\t}\n\t/**\n\t* Adds a block-level element to the document body.\n\t*\n\t* @param item - The element to add (paragraph, table, table of contents, hyperlink, or any other file child)\n\t* @returns The Document instance for method chaining\n\t*/\n\tadd(item) {\n\t\tthis.body.push(item);\n\t\treturn this;\n\t}\n\t/**\n\t* Gets the document body element.\n\t*\n\t* @returns The Body instance containing all document content\n\t*/\n\tget Body() {\n\t\treturn this.body;\n\t}\n};\n// src/file/document-wrapper.ts\n/**\n* Document wrapper module for WordprocessingML documents.\n*\n* This module provides wrappers that combine the main document/header/footer\n* views with their associated relationships, enabling proper management of\n* document parts and their references.\n*\n* @module\n*/\n/**\n* Wrapper for the main document body.\n*\n* DocumentWrapper combines the main Document view with its Relationships,\n* managing the primary content of the .docx file along with references to\n* images, hyperlinks, and other linked resources.\n*\n* @example\n* ```typescript\n* const wrapper = new DocumentWrapper({\n* sections: [{\n* children: [new Paragraph(\"Hello World\")],\n* }],\n* });\n* ```\n*/\nvar DocumentWrapper = class {\n\tconstructor(options) {\n\t\t_defineProperty(this, \"document\", void 0);\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\tthis.document = new Document(options);\n\t\tthis.relationships = new Relationships();\n\t}\n\tget View() {\n\t\treturn this.document;\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n};\n// src/file/endnotes/endnotes-attributes.ts\nvar EndnotesAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\twpc: \"xmlns:wpc\",\n\t\t\tmc: \"xmlns:mc\",\n\t\t\to: \"xmlns:o\",\n\t\t\tr: \"xmlns:r\",\n\t\t\tm: \"xmlns:m\",\n\t\t\tv: \"xmlns:v\",\n\t\t\twp14: \"xmlns:wp14\",\n\t\t\twp: \"xmlns:wp\",\n\t\t\tw10: \"xmlns:w10\",\n\t\t\tw: \"xmlns:w\",\n\t\t\tw14: \"xmlns:w14\",\n\t\t\tw15: \"xmlns:w15\",\n\t\t\twpg: \"xmlns:wpg\",\n\t\t\twpi: \"xmlns:wpi\",\n\t\t\twne: \"xmlns:wne\",\n\t\t\twps: \"xmlns:wps\",\n\t\t\tIgnorable: \"mc:Ignorable\"\n\t\t});\n\t}\n};\n// src/file/footnotes/footnote/note-paragraph.ts\n/**\n* The first paragraph of a footnote or endnote, written with the run that shows the note's number before its content.\n*\n* The run is added to what the paragraph is written as, rather than to the paragraph, so a paragraph in more than one\n* note, such as the notes of two documents, or two notes with the same content, has one number in each.\n*\n* @internal\n*/\nvar FirstNoteParagraph = class extends XmlComponent {\n\tconstructor(paragraph, mark) {\n\t\tsuper(\"w:p\");\n\t\t_defineProperty(this, \"paragraph\", void 0);\n\t\t_defineProperty(this, \"mark\", void 0);\n\t\tthis.paragraph = paragraph;\n\t\tthis.mark = mark;\n\t}\n\tprepForXml(context) {\n\t\tconst content = this.paragraph.prepForXml(context)[\"w:p\"];\n\t\tconst children = Array.isArray(content) ? content : [];\n\t\tconst index = children.length > 0 && \"w:pPr\" in children[0] ? 1 : 0;\n\t\treturn { \"w:p\": [\n\t\t\t...children.slice(0, index),\n\t\t\tthis.mark.prepForXml(context),\n\t\t\t...children.slice(index)\n\t\t] };\n\t}\n};\n// src/file/endnotes/endnote/endnote-attributes.ts\nvar EndnoteAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\ttype: \"w:type\",\n\t\t\tid: \"w:id\"\n\t\t});\n\t}\n};\n// src/file/endnotes/endnote/run/endnote-ref-run.ts\nvar EndnoteRefRun = class extends Run {\n\tconstructor() {\n\t\tsuper({ style: \"EndnoteReference\" });\n\t\tthis.root.push(new EndnoteReference());\n\t}\n};\n// src/file/endnotes/endnote/endnote.ts\nvar EndnoteType = {\n\tSEPARATOR: \"separator\",\n\tCONTINUATION_SEPARATOR: \"continuationSeparator\"\n};\nvar Endnote = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:endnote\");\n\t\tthis.root.push(new EndnoteAttributes({\n\t\t\ttype: options.type,\n\t\t\tid: options.id\n\t\t}));\n\t\tfor (const [index, child] of options.children.entries()) this.root.push(index === 0 ? new FirstNoteParagraph(child, new EndnoteRefRun()) : child);\n\t}\n};\n// src/file/footnotes/footnote/run/continuation-seperator.ts\n/**\n* Footnote continuation separator module for WordprocessingML documents.\n*\n* This module provides the continuation separator element that defines\n* the line used when footnotes span multiple pages.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents a footnote continuation separator in WordprocessingML.\n*\n* ContinuationSeperator creates the separator line that appears when\n* footnotes continue from a previous page to the current page.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"continuationSeparator\" type=\"CT_Empty\" minOccurs=\"0\"/>\n* ```\n*\n* @internal\n*/\nvar ContinuationSeperator = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:continuationSeparator\");\n\t}\n};\n// src/file/footnotes/footnote/run/continuation-seperator-run.ts\n/**\n* Footnote continuation separator run module for WordprocessingML documents.\n*\n* This module provides the run containing the continuation separator element.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents a footnote continuation separator run in WordprocessingML.\n*\n* ContinuationSeperatorRun creates a run containing the continuation\n* separator element that defines the line used when footnotes continue\n* from a previous page.\n*\n* @internal\n*/\nvar ContinuationSeperatorRun = class extends Run {\n\tconstructor() {\n\t\tsuper({});\n\t\tthis.root.push(new ContinuationSeperator());\n\t}\n};\n// src/file/footnotes/footnote/run/seperator.ts\n/**\n* Footnote separator module for WordprocessingML documents.\n*\n* This module provides the separator element that defines the line\n* separating body text from footnotes.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents a footnote separator in WordprocessingML.\n*\n* Seperator creates the separator line that appears between the main\n* document text and the footnote area at the bottom of the page.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"separator\" type=\"CT_Empty\" minOccurs=\"0\"/>\n* ```\n*\n* @internal\n*/\nvar Seperator = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:separator\");\n\t}\n};\n// src/file/footnotes/footnote/run/seperator-run.ts\n/**\n* Footnote separator run module for WordprocessingML documents.\n*\n* This module provides the run containing the separator element.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents a footnote separator run in WordprocessingML.\n*\n* SeperatorRun creates a run containing the separator element that\n* defines the horizontal line between body text and footnotes.\n*\n* @internal\n*/\nvar SeperatorRun = class extends Run {\n\tconstructor() {\n\t\tsuper({});\n\t\tthis.root.push(new Seperator());\n\t}\n};\n// src/file/endnotes/endnotes.ts\nvar Endnotes = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:endnotes\");\n\t\t_defineProperty(this, \"ownNotes\", /* @__PURE__ */ new Map());\n\t\t_defineProperty(this, \"highestId\", 0);\n\t\tthis.root.push(new EndnotesAttributes({\n\t\t\twpc: \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\tmc: \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\to: \"urn:schemas-microsoft-com:office:office\",\n\t\t\tr: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\t\t\tm: \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\t\t\tv: \"urn:schemas-microsoft-com:vml\",\n\t\t\twp14: \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\t\t\twp: \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\t\t\tw10: \"urn:schemas-microsoft-com:office:word\",\n\t\t\tw: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\t\t\tw14: \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\t\t\tw15: \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\twpg: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\t\t\twpi: \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\t\t\twne: \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\t\t\twps: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\",\n\t\t\tIgnorable: \"w14 w15 wp14\"\n\t\t}));\n\t\tconst begin = new Endnote({\n\t\t\tid: -1,\n\t\t\ttype: EndnoteType.SEPARATOR,\n\t\t\tchildren: [new Paragraph({\n\t\t\t\tspacing: {\n\t\t\t\t\tafter: 0,\n\t\t\t\t\tline: 240,\n\t\t\t\t\tlineRule: LineRuleType.AUTO\n\t\t\t\t},\n\t\t\t\tchildren: [new SeperatorRun()]\n\t\t\t})]\n\t\t});\n\t\tthis.root.push(begin);\n\t\tconst spacing = new Endnote({\n\t\t\tid: 0,\n\t\t\ttype: EndnoteType.CONTINUATION_SEPARATOR,\n\t\t\tchildren: [new Paragraph({\n\t\t\t\tspacing: {\n\t\t\t\t\tafter: 0,\n\t\t\t\t\tline: 240,\n\t\t\t\t\tlineRule: LineRuleType.AUTO\n\t\t\t\t},\n\t\t\t\tchildren: [new ContinuationSeperatorRun()]\n\t\t\t})]\n\t\t});\n\t\tthis.root.push(spacing);\n\t}\n\tcreateEndnote(id, paragraph) {\n\t\tconst endnote = new Endnote({\n\t\t\tid,\n\t\t\tchildren: paragraph\n\t\t});\n\t\tthis.root.push(endnote);\n\t\tif (Number.isFinite(id)) this.highestId = Math.max(this.highestId, Math.floor(id));\n\t}\n\t/**\n\t* The id of the endnote that a reference run brings with it, which is added to the endnotes the first time the run\n\t* is written, with an id no other endnote has. Word has endnotes only in a document's body, so a run written\n\t* anywhere else, such as in a header, has none, and its endnote isn't added.\n\t*\n\t* @internal\n\t* @param reference - The run, which has the same endnote each time it is written\n\t* @param endnote - The endnote's content\n\t* @param context - The context the run is written in\n\t* @returns The endnote's id, or undefined outside the document's body\n\t*/\n\tidOf(reference, endnote, context) {\n\t\tif (context.viewWrapper !== context.file.Document) return;\n\t\tconst existing = this.ownNotes.get(reference);\n\t\tif (existing !== void 0) return existing;\n\t\tconst id = this.highestId + 1;\n\t\tthis.createEndnote(id, endnote.children);\n\t\tthis.ownNotes.set(reference, id);\n\t\treturn id;\n\t}\n\t/**\n\t* Formats the endnotes, with the page numbers worked out for their document written into their fields, when the\n\t* document's body is written with an estimate of its pages.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tfillPartPageNumbers(xml, context);\n\t\treturn xml;\n\t}\n};\n// src/file/endnotes-wrapper.ts\nvar EndnotesWrapper = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"endnotes\", void 0);\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\tthis.endnotes = new Endnotes();\n\t\tthis.relationships = new Relationships();\n\t}\n\tget View() {\n\t\treturn this.endnotes;\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n};\n// src/file/footer/footer-attributes.ts\n/**\n* Component for managing XML namespace attributes on footer elements.\n*\n* This class handles the serialization of namespace declarations that are required\n* for proper XML validation and processing of footer content in WordprocessingML documents.\n*\n* @example\n* ```typescript\n* new FooterAttributes({\n* w: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n* r: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n* });\n* ```\n*/\nvar FooterAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\twpc: \"xmlns:wpc\",\n\t\t\tmc: \"xmlns:mc\",\n\t\t\to: \"xmlns:o\",\n\t\t\tr: \"xmlns:r\",\n\t\t\tm: \"xmlns:m\",\n\t\t\tv: \"xmlns:v\",\n\t\t\twp14: \"xmlns:wp14\",\n\t\t\twp: \"xmlns:wp\",\n\t\t\tw10: \"xmlns:w10\",\n\t\t\tw: \"xmlns:w\",\n\t\t\tw14: \"xmlns:w14\",\n\t\t\tw15: \"xmlns:w15\",\n\t\t\twpg: \"xmlns:wpg\",\n\t\t\twpi: \"xmlns:wpi\",\n\t\t\twne: \"xmlns:wne\",\n\t\t\twps: \"xmlns:wps\",\n\t\t\tcp: \"xmlns:cp\",\n\t\t\tdc: \"xmlns:dc\",\n\t\t\tdcterms: \"xmlns:dcterms\",\n\t\t\tdcmitype: \"xmlns:dcmitype\",\n\t\t\txsi: \"xmlns:xsi\",\n\t\t\ttype: \"xsi:type\"\n\t\t});\n\t}\n};\n// src/file/footer/footer.ts\n/**\n* Footer module for WordprocessingML documents.\n*\n* Footers are repeated at the bottom of each page in a section.\n*\n* Reference: http://officeopenxml.com/WPfooters.php\n*\n* @module\n*/\n/**\n* Represents a footer in a WordprocessingML document.\n*\n* A footer is the portion of the document that appears at the bottom of each page in a section.\n* Footers can contain block-level elements such as paragraphs and tables. Each section can\n* have up to three different footers: first page, even pages, and odd pages.\n*\n* Reference: http://officeopenxml.com/WPfooters.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_HdrFtr\">\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"1\" maxOccurs=\"unbounded\"/>\n* </xsd:complexType>\n*\n* <xsd:element name=\"ftr\" type=\"CT_HdrFtr\"/>\n* ```\n*\n* @example\n* ```typescript\n* // Create a simple footer with page numbers\n* const footer = new Footer(1);\n* footer.add(new Paragraph({\n* alignment: AlignmentType.CENTER,\n* children: [new TextRun(\"Page \"), PageNumber.CURRENT]\n* }));\n*\n* // Create a footer with a table\n* const footer = new Footer(2);\n* footer.add(new Table({\n* rows: [\n* new TableRow({\n* children: [new TableCell({ children: [new Paragraph(\"Footer Content\")] })]\n* })\n* ]\n* }));\n* ```\n*/\nvar Footer$1 = class extends InitializableXmlComponent {\n\tconstructor(referenceNumber, initContent) {\n\t\tsuper(\"w:ftr\", initContent);\n\t\t_defineProperty(this, \"refId\", void 0);\n\t\tthis.refId = referenceNumber;\n\t\tif (!initContent) this.root.push(new FooterAttributes({\n\t\t\twpc: \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\tmc: \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\to: \"urn:schemas-microsoft-com:office:office\",\n\t\t\tr: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\t\t\tm: \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\t\t\tv: \"urn:schemas-microsoft-com:vml\",\n\t\t\twp14: \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\t\t\twp: \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\t\t\tw10: \"urn:schemas-microsoft-com:office:word\",\n\t\t\tw: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\t\t\tw14: \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\t\t\tw15: \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\twpg: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\t\t\twpi: \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\t\t\twne: \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\t\t\twps: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\"\n\t\t}));\n\t}\n\tget ReferenceId() {\n\t\treturn this.refId;\n\t}\n\tadd(item) {\n\t\tthis.root.push(item);\n\t}\n\t/**\n\t* Formats the footer, with the page numbers worked out for its document written into its fields, when the document's\n\t* body is written with an estimate of its pages.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tfillPartPageNumbers(xml, context, this.refId);\n\t\treturn xml;\n\t}\n};\n// src/file/footer-wrapper.ts\n/**\n* Wrapper for document footers.\n*\n* FooterWrapper combines a Footer view with its Relationships and Media,\n* enabling footers to contain paragraphs, tables, images, and hyperlinks.\n* Each section can have multiple footers for different page types.\n*\n* Reference: http://officeopenxml.com/WPfooter.php\n*\n* @example\n* ```typescript\n* const footerWrapper = new FooterWrapper(media, 1);\n* footerWrapper.add(new Paragraph(\"Page Footer\"));\n* footerWrapper.add(new Table({\n* rows: [new TableRow({ children: [new TableCell({ children: [new Paragraph(\"Cell\")] })] })],\n* }));\n* ```\n*/\nvar FooterWrapper = class {\n\tconstructor(media, referenceId, initContent) {\n\t\t_defineProperty(this, \"media\", void 0);\n\t\t_defineProperty(this, \"footer\", void 0);\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\tthis.media = media;\n\t\tthis.footer = new Footer$1(referenceId, initContent);\n\t\tthis.relationships = new Relationships();\n\t}\n\tadd(item) {\n\t\tthis.footer.add(item);\n\t}\n\taddChildElement(childElement) {\n\t\tthis.footer.addChildElement(childElement);\n\t}\n\tget View() {\n\t\treturn this.footer;\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n\tget Media() {\n\t\treturn this.media;\n\t}\n};\n// src/file/footnotes/footnote/footnote-attributes.ts\n/**\n* Footnote attributes module for WordprocessingML documents.\n*\n* This module defines attributes for individual footnote elements.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents the attributes for a footnote element.\n*\n* FootnoteAttributes defines the type and unique identifier for each footnote.\n*\n* @internal\n*/\nvar FootnoteAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\ttype: \"w:type\",\n\t\t\tid: \"w:id\"\n\t\t});\n\t}\n};\n// src/file/footnotes/footnote/run/footnote-ref.ts\n/**\n* Footnote reference marker module for WordprocessingML documents.\n*\n* This module provides the automatic footnote reference marker that appears\n* at the beginning of footnote content.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents a footnote reference marker in WordprocessingML.\n*\n* FootnoteRef creates the automatic reference mark (typically a superscript\n* number) that appears at the beginning of the footnote content itself.\n* This corresponds to the w:footnoteRef element in OOXML.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"footnoteRef\" type=\"CT_Empty\" minOccurs=\"0\"/>\n* ```\n*\n* @internal\n*/\nvar FootnoteRef = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:footnoteRef\");\n\t}\n};\n// src/file/footnotes/footnote/run/footnote-ref-run.ts\n/**\n* Footnote Reference Run module for WordprocessingML documents.\n*\n* This module provides the footnote reference marker that appears\n* at the start of a footnote.\n*\n* @module\n*/\n/**\n* Represents a footnote reference run in a WordprocessingML document.\n*\n* FootnoteRefRun displays the footnote reference mark (usually a superscript\n* number) at the beginning of the footnote content.\n*\n* @internal\n*/\nvar FootnoteRefRun = class extends Run {\n\tconstructor() {\n\t\tsuper({ style: \"FootnoteReference\" });\n\t\tthis.root.push(new FootnoteRef());\n\t}\n};\n// src/file/footnotes/footnote/footnote.ts\n/**\n* Enumeration of footnote types.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @publicApi\n*/\nvar FootnoteType = {\n\t/** Separator line between body text and footnotes */\n\tSEPERATOR: \"separator\",\n\t/** Continuation separator for footnotes spanning pages */\n\tCONTINUATION_SEPERATOR: \"continuationSeparator\"\n};\n/**\n* Represents a footnote in a WordprocessingML document.\n*\n* Footnotes appear at the bottom of the page and are referenced\n* from the main document text using footnote reference marks.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FtnEdn\">\n* <xsd:sequence>\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"type\" type=\"ST_FtnEdn\"/>\n* <xsd:attribute name=\"id\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a footnote with content\n* const footnote = new Footnote({\n* id: 1,\n* children: [\n* new Paragraph({\n* children: [\n* new TextRun(\"This is the footnote content.\"),\n* ],\n* }),\n* ],\n* });\n* ```\n*/\nvar Footnote = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:footnote\");\n\t\tthis.root.push(new FootnoteAttributes({\n\t\t\ttype: options.type,\n\t\t\tid: options.id\n\t\t}));\n\t\tfor (const [index, child] of options.children.entries()) this.root.push(index === 0 ? new FirstNoteParagraph(child, new FootnoteRefRun()) : child);\n\t}\n};\n// src/file/footnotes/footnotes-attributes.ts\n/**\n* Footnotes attributes module for WordprocessingML documents.\n*\n* This module defines XML namespace attributes for the footnotes element.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents the XML namespace attributes for the footnotes root element.\n*\n* FootnotesAttributes defines all necessary XML namespace declarations\n* for the footnotes.xml part of a WordprocessingML document.\n*\n* @internal\n*/\nvar FootnotesAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\twpc: \"xmlns:wpc\",\n\t\t\tmc: \"xmlns:mc\",\n\t\t\to: \"xmlns:o\",\n\t\t\tr: \"xmlns:r\",\n\t\t\tm: \"xmlns:m\",\n\t\t\tv: \"xmlns:v\",\n\t\t\twp14: \"xmlns:wp14\",\n\t\t\twp: \"xmlns:wp\",\n\t\t\tw10: \"xmlns:w10\",\n\t\t\tw: \"xmlns:w\",\n\t\t\tw14: \"xmlns:w14\",\n\t\t\tw15: \"xmlns:w15\",\n\t\t\twpg: \"xmlns:wpg\",\n\t\t\twpi: \"xmlns:wpi\",\n\t\t\twne: \"xmlns:wne\",\n\t\t\twps: \"xmlns:wps\",\n\t\t\tIgnorable: \"mc:Ignorable\"\n\t\t});\n\t}\n};\n// src/file/footnotes/footnotes.ts\n/**\n* Footnotes module for WordprocessingML documents.\n*\n* This module manages the collection of footnotes in a document, including\n* separator and continuation separator footnotes that appear by default.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @module\n*/\n/**\n* Represents the footnotes collection in a WordprocessingML document.\n*\n* FootNotes manages all footnotes in a document and automatically creates\n* the required separator and continuation separator footnotes. These special\n* footnotes define the line that separates body text from footnotes and the\n* line used when footnotes continue across pages.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Footnotes\">\n* <xsd:sequence maxOccurs=\"unbounded\">\n* <xsd:element name=\"footnote\" type=\"CT_FtnEdn\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // FootNotes is typically managed internally by the Document class\n* // Users create footnotes through the Document API\n* const doc = new Document({\n* sections: [{\n* children: [\n* new Paragraph({\n* children: [\n* new TextRun(\"Text with footnote\"),\n* new FootnoteReferenceRun(1),\n* ],\n* }),\n* ],\n* footnotes: {\n* 1: {\n* children: [new Paragraph(\"Footnote content\")],\n* },\n* },\n* }],\n* });\n* ```\n*/\nvar FootNotes = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:footnotes\");\n\t\t_defineProperty(this, \"ownNotes\", /* @__PURE__ */ new Map());\n\t\t_defineProperty(this, \"highestId\", 0);\n\t\tthis.root.push(new FootnotesAttributes({\n\t\t\twpc: \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\tmc: \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\to: \"urn:schemas-microsoft-com:office:office\",\n\t\t\tr: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\t\t\tm: \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\t\t\tv: \"urn:schemas-microsoft-com:vml\",\n\t\t\twp14: \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\t\t\twp: \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\t\t\tw10: \"urn:schemas-microsoft-com:office:word\",\n\t\t\tw: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\t\t\tw14: \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\t\t\tw15: \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\twpg: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\t\t\twpi: \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\t\t\twne: \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\t\t\twps: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\",\n\t\t\tIgnorable: \"w14 w15 wp14\"\n\t\t}));\n\t\tconst begin = new Footnote({\n\t\t\tid: -1,\n\t\t\ttype: FootnoteType.SEPERATOR,\n\t\t\tchildren: [new Paragraph({\n\t\t\t\tspacing: {\n\t\t\t\t\tafter: 0,\n\t\t\t\t\tline: 240,\n\t\t\t\t\tlineRule: LineRuleType.AUTO\n\t\t\t\t},\n\t\t\t\tchildren: [new SeperatorRun()]\n\t\t\t})]\n\t\t});\n\t\tthis.root.push(begin);\n\t\tconst spacing = new Footnote({\n\t\t\tid: 0,\n\t\t\ttype: FootnoteType.CONTINUATION_SEPERATOR,\n\t\t\tchildren: [new Paragraph({\n\t\t\t\tspacing: {\n\t\t\t\t\tafter: 0,\n\t\t\t\t\tline: 240,\n\t\t\t\t\tlineRule: LineRuleType.AUTO\n\t\t\t\t},\n\t\t\t\tchildren: [new ContinuationSeperatorRun()]\n\t\t\t})]\n\t\t});\n\t\tthis.root.push(spacing);\n\t}\n\t/**\n\t* Creates and adds a new footnote to the collection.\n\t*\n\t* @param id - Unique numeric identifier for the footnote\n\t* @param paragraph - Array of paragraphs that make up the footnote content\n\t*/\n\tcreateFootNote(id, paragraph) {\n\t\tconst footnote = new Footnote({\n\t\t\tid,\n\t\t\tchildren: paragraph\n\t\t});\n\t\tthis.root.push(footnote);\n\t\tif (Number.isFinite(id)) this.highestId = Math.max(this.highestId, Math.floor(id));\n\t}\n\t/**\n\t* The id of the footnote that a reference run brings with it, which is added to the footnotes the first time the\n\t* run is written, with an id no other footnote has. Word has footnotes only in a document's body, so a run written\n\t* anywhere else, such as in a header, has none, and its footnote isn't added.\n\t*\n\t* @internal\n\t* @param reference - The run, which has the same footnote each time it is written\n\t* @param footnote - The footnote's content\n\t* @param context - The context the run is written in\n\t* @returns The footnote's id, or undefined outside the document's body\n\t*/\n\tidOf(reference, footnote, context) {\n\t\tif (context.viewWrapper !== context.file.Document) return;\n\t\tconst existing = this.ownNotes.get(reference);\n\t\tif (existing !== void 0) return existing;\n\t\tconst id = this.highestId + 1;\n\t\tthis.createFootNote(id, footnote.children);\n\t\tthis.ownNotes.set(reference, id);\n\t\treturn id;\n\t}\n\t/**\n\t* Formats the footnotes, with the page numbers worked out for their document written into their fields, when the\n\t* document's body is written with an estimate of its pages.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tfillPartPageNumbers(xml, context);\n\t\treturn xml;\n\t}\n};\n// src/file/footnotes-wrapper.ts\n/**\n* Wrapper class for managing footnotes in a document.\n*\n* Encapsulates the footnotes collection and its relationships,\n* implementing the IViewWrapper interface for consistent access.\n*\n* @example\n* ```typescript\n* const wrapper = new FootnotesWrapper();\n* const footnotes = wrapper.View;\n* const relationships = wrapper.Relationships;\n* ```\n*/\nvar FootnotesWrapper = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"footnotess\", void 0);\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\tthis.footnotess = new FootNotes();\n\t\tthis.relationships = new Relationships();\n\t}\n\tget View() {\n\t\treturn this.footnotess;\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n};\n// src/file/header/header-attributes.ts\n/**\n* Component for managing XML namespace attributes on header elements.\n*\n* This class handles the serialization of namespace declarations that are required\n* for proper XML validation and processing of header content in WordprocessingML documents.\n*\n* @example\n* ```typescript\n* new HeaderAttributes({\n* w: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n* r: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n* });\n* ```\n*/\nvar HeaderAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\twpc: \"xmlns:wpc\",\n\t\t\tmc: \"xmlns:mc\",\n\t\t\to: \"xmlns:o\",\n\t\t\tr: \"xmlns:r\",\n\t\t\tm: \"xmlns:m\",\n\t\t\tv: \"xmlns:v\",\n\t\t\twp14: \"xmlns:wp14\",\n\t\t\twp: \"xmlns:wp\",\n\t\t\tw10: \"xmlns:w10\",\n\t\t\tw: \"xmlns:w\",\n\t\t\tw14: \"xmlns:w14\",\n\t\t\tw15: \"xmlns:w15\",\n\t\t\twpg: \"xmlns:wpg\",\n\t\t\twpi: \"xmlns:wpi\",\n\t\t\twne: \"xmlns:wne\",\n\t\t\twps: \"xmlns:wps\",\n\t\t\tcp: \"xmlns:cp\",\n\t\t\tdc: \"xmlns:dc\",\n\t\t\tdcterms: \"xmlns:dcterms\",\n\t\t\tdcmitype: \"xmlns:dcmitype\",\n\t\t\txsi: \"xmlns:xsi\",\n\t\t\ttype: \"xsi:type\",\n\t\t\tcx: \"xmlns:cx\",\n\t\t\tcx1: \"xmlns:cx1\",\n\t\t\tcx2: \"xmlns:cx2\",\n\t\t\tcx3: \"xmlns:cx3\",\n\t\t\tcx4: \"xmlns:cx4\",\n\t\t\tcx5: \"xmlns:cx5\",\n\t\t\tcx6: \"xmlns:cx6\",\n\t\t\tcx7: \"xmlns:cx7\",\n\t\t\tcx8: \"xmlns:cx8\",\n\t\t\tw16cid: \"xmlns:w16cid\",\n\t\t\tw16se: \"xmlns:w16se\"\n\t\t});\n\t}\n};\n// src/file/header/header.ts\n/**\n* Header module for WordprocessingML documents.\n*\n* Headers are repeated at the top of each page in a section.\n*\n* Reference: http://officeopenxml.com/WPheaders.php\n*\n* @module\n*/\n/**\n* Represents a header in a WordprocessingML document.\n*\n* A header is the portion of the document that appears at the top of each page in a section.\n* Headers can contain block-level elements such as paragraphs and tables. Each section can\n* have up to three different headers: first page, even pages, and odd pages.\n*\n* Reference: http://officeopenxml.com/WPheaders.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_HdrFtr\">\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"1\" maxOccurs=\"unbounded\"/>\n* </xsd:complexType>\n*\n* <xsd:element name=\"hdr\" type=\"CT_HdrFtr\"/>\n* ```\n*\n* @example\n* ```typescript\n* // Create a simple header\n* const header = new Header(1);\n* header.add(new Paragraph(\"Company Name\"));\n*\n* // Create a header with a table\n* const header = new Header(2);\n* header.add(new Table({\n* rows: [\n* new TableRow({\n* children: [new TableCell({ children: [new Paragraph(\"Header Content\")] })]\n* })\n* ]\n* }));\n* ```\n*/\nvar Header$1 = class extends InitializableXmlComponent {\n\tconstructor(referenceNumber, initContent) {\n\t\tsuper(\"w:hdr\", initContent);\n\t\t_defineProperty(this, \"refId\", void 0);\n\t\tthis.refId = referenceNumber;\n\t\tif (!initContent) this.root.push(new HeaderAttributes({\n\t\t\twpc: \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\tmc: \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\to: \"urn:schemas-microsoft-com:office:office\",\n\t\t\tr: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\t\t\tm: \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\t\t\tv: \"urn:schemas-microsoft-com:vml\",\n\t\t\twp14: \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\t\t\twp: \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\t\t\tw10: \"urn:schemas-microsoft-com:office:word\",\n\t\t\tw: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\t\t\tw14: \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\t\t\tw15: \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\twpg: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\t\t\twpi: \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\t\t\twne: \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\t\t\twps: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\",\n\t\t\tcx: \"http://schemas.microsoft.com/office/drawing/2014/chartex\",\n\t\t\tcx1: \"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\",\n\t\t\tcx2: \"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex\",\n\t\t\tcx3: \"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex\",\n\t\t\tcx4: \"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex\",\n\t\t\tcx5: \"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex\",\n\t\t\tcx6: \"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex\",\n\t\t\tcx7: \"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex\",\n\t\t\tcx8: \"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex\",\n\t\t\tw16cid: \"http://schemas.microsoft.com/office/word/2016/wordml/cid\",\n\t\t\tw16se: \"http://schemas.microsoft.com/office/word/2015/wordml/symex\"\n\t\t}));\n\t}\n\tget ReferenceId() {\n\t\treturn this.refId;\n\t}\n\tadd(item) {\n\t\tthis.root.push(item);\n\t}\n\t/**\n\t* Formats the header, with the page numbers worked out for its document written into its fields, when the document's\n\t* body is written with an estimate of its pages.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tfillPartPageNumbers(xml, context, this.refId);\n\t\treturn xml;\n\t}\n};\n// src/file/header-wrapper.ts\n/**\n* Wrapper for document headers.\n*\n* HeaderWrapper combines a Header view with its Relationships and Media,\n* enabling headers to contain paragraphs, tables, images, and hyperlinks.\n* Each section can have multiple headers for different page types.\n*\n* Reference: http://officeopenxml.com/WPheader.php\n*\n* @example\n* ```typescript\n* const headerWrapper = new HeaderWrapper(media, 1);\n* headerWrapper.add(new Paragraph(\"Page Header\"));\n* headerWrapper.add(new Table({\n* rows: [new TableRow({ children: [new TableCell({ children: [new Paragraph(\"Cell\")] })] })],\n* }));\n* ```\n*/\nvar HeaderWrapper = class {\n\tconstructor(media, referenceId, initContent) {\n\t\t_defineProperty(this, \"media\", void 0);\n\t\t_defineProperty(this, \"header\", void 0);\n\t\t_defineProperty(this, \"relationships\", void 0);\n\t\tthis.media = media;\n\t\tthis.header = new Header$1(referenceId, initContent);\n\t\tthis.relationships = new Relationships();\n\t}\n\tadd(item) {\n\t\tthis.header.add(item);\n\t\treturn this;\n\t}\n\taddChildElement(childElement) {\n\t\tthis.header.addChildElement(childElement);\n\t}\n\tget View() {\n\t\treturn this.header;\n\t}\n\tget Relationships() {\n\t\treturn this.relationships;\n\t}\n\tget Media() {\n\t\treturn this.media;\n\t}\n};\n// src/file/media/media.ts\n/**\n* Manages embedded media (images) in a document.\n*\n* Media stores all images referenced in the document and provides\n* access to their data for packaging into the DOCX file. Each image\n* is stored with a unique key for retrieval.\n*\n* @example\n* ```typescript\n* const media = new Media();\n* media.addImage(\"image1\", {\n* type: \"png\",\n* fileName: \"image1.png\",\n* transformation: {\n* pixels: { x: 200, y: 100 },\n* emus: { x: 1828800, y: 914400 }\n* },\n* data: imageBuffer\n* });\n* const allImages = media.Array;\n* ```\n*/\nvar Media = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"map\", void 0);\n\t\tthis.map = /* @__PURE__ */ new Map();\n\t}\n\t/**\n\t* Adds an image to the media collection.\n\t*\n\t* @param key - Unique identifier for this image\n\t* @param mediaData - Complete image data including file name, transformation, and raw data\n\t*/\n\taddImage(key, mediaData) {\n\t\tthis.map.set(key, mediaData);\n\t}\n\t/**\n\t* Gets all images as an array.\n\t*\n\t* @returns Read-only array of all media data in the collection\n\t*/\n\tget Array() {\n\t\treturn Array.from(this.map.values());\n\t}\n};\n// src/file/numbering/level.ts\n/**\n* Numbering level definitions module for WordprocessingML documents.\n*\n* This module defines the formatting and behavior of individual levels within\n* a numbered or bulleted list hierarchy.\n*\n* Reference: http://officeopenxml.com/WPnumbering-numFmt.php\n*\n* @module\n*/\n/**\n* Number format types for list levels.\n*\n* Defines the various numbering formats available for list levels, including\n* decimal, roman numerals, letters, and various international formats.\n*\n* Reference: http://officeopenxml.com/WPnumbering-numFmt.php\n*\n* @example\n* ```typescript\n* // Use decimal numbering (1, 2, 3...)\n* format: LevelFormat.DECIMAL\n*\n* // Use lowercase roman numerals (i, ii, iii...)\n* format: LevelFormat.LOWER_ROMAN\n*\n* // Use bullet points\n* format: LevelFormat.BULLET\n* ```\n*\n* @publicApi\n*/\nvar LevelFormat = {\n\t/** Decimal numbering (1, 2, 3...). */\n\tDECIMAL: \"decimal\",\n\t/** Uppercase roman numerals (I, II, III...). */\n\tUPPER_ROMAN: \"upperRoman\",\n\t/** Lowercase roman numerals (i, ii, iii...). */\n\tLOWER_ROMAN: \"lowerRoman\",\n\t/** Uppercase letters (A, B, C...). */\n\tUPPER_LETTER: \"upperLetter\",\n\t/** Lowercase letters (a, b, c...). */\n\tLOWER_LETTER: \"lowerLetter\",\n\t/** Ordinal numbers (1st, 2nd, 3rd...). */\n\tORDINAL: \"ordinal\",\n\t/** Cardinal text (one, two, three...). */\n\tCARDINAL_TEXT: \"cardinalText\",\n\t/** Ordinal text (first, second, third...). */\n\tORDINAL_TEXT: \"ordinalText\",\n\t/** Hexadecimal numbering. */\n\tHEX: \"hex\",\n\t/** Chicago Manual of Style numbering. */\n\tCHICAGO: \"chicago\",\n\t/** Ideograph digital numbering. */\n\tIDEOGRAPH__DIGITAL: \"ideographDigital\",\n\t/** Japanese counting system. */\n\tJAPANESE_COUNTING: \"japaneseCounting\",\n\t/** Japanese aiueo ordering. */\n\tAIUEO: \"aiueo\",\n\t/** Japanese iroha ordering. */\n\tIROHA: \"iroha\",\n\t/** Full-width decimal numbering. */\n\tDECIMAL_FULL_WIDTH: \"decimalFullWidth\",\n\t/** Half-width decimal numbering. */\n\tDECIMAL_HALF_WIDTH: \"decimalHalfWidth\",\n\t/** Japanese legal numbering. */\n\tJAPANESE_LEGAL: \"japaneseLegal\",\n\t/** Japanese digital ten thousand numbering. */\n\tJAPANESE_DIGITAL_TEN_THOUSAND: \"japaneseDigitalTenThousand\",\n\t/** Decimal numbers enclosed in circles. */\n\tDECIMAL_ENCLOSED_CIRCLE: \"decimalEnclosedCircle\",\n\t/** Full-width decimal numbering variant 2. */\n\tDECIMAL_FULL_WIDTH2: \"decimalFullWidth2\",\n\t/** Full-width aiueo ordering. */\n\tAIUEO_FULL_WIDTH: \"aiueoFullWidth\",\n\t/** Full-width iroha ordering. */\n\tIROHA_FULL_WIDTH: \"irohaFullWidth\",\n\t/** Decimal with leading zeros. */\n\tDECIMAL_ZERO: \"decimalZero\",\n\t/** Bullet points. */\n\tBULLET: \"bullet\",\n\t/** Korean ganada ordering. */\n\tGANADA: \"ganada\",\n\t/** Korean chosung ordering. */\n\tCHOSUNG: \"chosung\",\n\t/** Decimal enclosed with fullstop. */\n\tDECIMAL_ENCLOSED_FULLSTOP: \"decimalEnclosedFullstop\",\n\t/** Decimal enclosed in parentheses. */\n\tDECIMAL_ENCLOSED_PARENTHESES: \"decimalEnclosedParen\",\n\t/** Decimal enclosed in circles (Chinese). */\n\tDECIMAL_ENCLOSED_CIRCLE_CHINESE: \"decimalEnclosedCircleChinese\",\n\t/** Ideograph enclosed in circles. */\n\tIDEOGRAPH_ENCLOSED_CIRCLE: \"ideographEnclosedCircle\",\n\t/** Traditional ideograph numbering. */\n\tIDEOGRAPH_TRADITIONAL: \"ideographTraditional\",\n\t/** Ideograph zodiac numbering. */\n\tIDEOGRAPH_ZODIAC: \"ideographZodiac\",\n\t/** Traditional ideograph zodiac numbering. */\n\tIDEOGRAPH_ZODIAC_TRADITIONAL: \"ideographZodiacTraditional\",\n\t/** Taiwanese counting system. */\n\tTAIWANESE_COUNTING: \"taiwaneseCounting\",\n\t/** Traditional ideograph legal numbering. */\n\tIDEOGRAPH_LEGAL_TRADITIONAL: \"ideographLegalTraditional\",\n\t/** Taiwanese counting thousand system. */\n\tTAIWANESE_COUNTING_THOUSAND: \"taiwaneseCountingThousand\",\n\t/** Taiwanese digital numbering. */\n\tTAIWANESE_DIGITAL: \"taiwaneseDigital\",\n\t/** Chinese counting system. */\n\tCHINESE_COUNTING: \"chineseCounting\",\n\t/** Simplified Chinese legal numbering. */\n\tCHINESE_LEGAL_SIMPLIFIED: \"chineseLegalSimplified\",\n\t/** Chinese counting thousand system. */\n\tCHINESE_COUNTING_THOUSAND: \"chineseCountingThousand\",\n\t/** Korean digital numbering. */\n\tKOREAN_DIGITAL: \"koreanDigital\",\n\t/** Korean counting system. */\n\tKOREAN_COUNTING: \"koreanCounting\",\n\t/** Korean legal numbering. */\n\tKOREAN_LEGAL: \"koreanLegal\",\n\t/** Korean digital numbering variant 2. */\n\tKOREAN_DIGITAL2: \"koreanDigital2\",\n\t/** Vietnamese counting system. */\n\tVIETNAMESE_COUNTING: \"vietnameseCounting\",\n\t/** Russian lowercase numbering. */\n\tRUSSIAN_LOWER: \"russianLower\",\n\t/** Russian uppercase numbering. */\n\tRUSSIAN_UPPER: \"russianUpper\",\n\t/** No numbering. */\n\tNONE: \"none\",\n\t/** Number enclosed in dashes. */\n\tNUMBER_IN_DASH: \"numberInDash\",\n\t/** Hebrew numbering variant 1. */\n\tHEBREW1: \"hebrew1\",\n\t/** Hebrew numbering variant 2. */\n\tHEBREW2: \"hebrew2\",\n\t/** Arabic alpha numbering. */\n\tARABIC_ALPHA: \"arabicAlpha\",\n\t/** Arabic abjad numbering. */\n\tARABIC_ABJAD: \"arabicAbjad\",\n\t/** Hindi vowels. */\n\tHINDI_VOWELS: \"hindiVowels\",\n\t/** Hindi consonants. */\n\tHINDI_CONSONANTS: \"hindiConsonants\",\n\t/** Hindi numbers. */\n\tHINDI_NUMBERS: \"hindiNumbers\",\n\t/** Hindi counting system. */\n\tHINDI_COUNTING: \"hindiCounting\",\n\t/** Thai letters. */\n\tTHAI_LETTERS: \"thaiLetters\",\n\t/** Thai numbers. */\n\tTHAI_NUMBERS: \"thaiNumbers\",\n\t/** Thai counting system. */\n\tTHAI_COUNTING: \"thaiCounting\",\n\t/** Thai Baht text. */\n\tBAHT_TEXT: \"bahtText\",\n\t/** Dollar text. */\n\tDOLLAR_TEXT: \"dollarText\",\n\t/** Custom numbering format. */\n\tCUSTOM: \"custom\"\n};\n/**\n* Attributes for numbering levels.\n*/\nvar LevelAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tilvl: \"w:ilvl\",\n\t\t\ttentative: \"w:tentative\"\n\t\t});\n\t}\n};\n/**\n* Number format specification for a level.\n*\n* Specifies the numbering format to use (decimal, roman, letter, etc.).\n*/\nvar NumberFormat$1 = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:numFmt\");\n\t\tthis.root.push(new Attributes({ val: value }));\n\t}\n};\n/**\n* Level text template for displaying the numbering.\n*\n* The text can include placeholders like %1, %2, etc. to reference\n* numbering from different levels.\n*/\nvar LevelText = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:lvlText\");\n\t\tthis.root.push(new Attributes({ val: value }));\n\t}\n};\nvar levelAlignment = (value) => {\n\tswitch (value) {\n\t\tcase AlignmentType.CENTER: return \"center\";\n\t\tcase AlignmentType.END:\n\t\tcase AlignmentType.RIGHT: return \"right\";\n\t\tdefault: return \"left\";\n\t}\n};\n/**\n* Alignment specification for level numbering.\n*/\nvar LevelJc = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:lvlJc\");\n\t\tthis.root.push(new Attributes({ val: levelAlignment(value) }));\n\t}\n};\n/**\n* Suffix types for list levels.\n*\n* Defines what follows the numbering text (tab, space, or nothing).\n*\n* @example\n* ```typescript\n* // Add a tab after the numbering\n* suffix: LevelSuffix.TAB\n*\n* // Add a space after the numbering\n* suffix: LevelSuffix.SPACE\n*\n* // No separator after the numbering\n* suffix: LevelSuffix.NOTHING\n* ```\n*\n* @publicApi\n*/\nvar LevelSuffix = {\n\t/** No separator after the numbering. */\n\tNOTHING: \"nothing\",\n\t/** Space character after the numbering. */\n\tSPACE: \"space\",\n\t/** Tab character after the numbering. */\n\tTAB: \"tab\"\n};\n/**\n* Suffix specification for a level.\n*\n* Defines what character(s) follow the numbering text.\n*/\nvar Suffix = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:suff\");\n\t\tthis.root.push(new Attributes({ val: value }));\n\t}\n};\n/**\n* Legal numbering style flag.\n*\n* When enabled, creates multi-level legal numbering like 1.1.1.\n*\n* Reference: http://officeopenxml.com/WPnumbering-isLgl.php\n*/\nvar IsLegalNumberingStyle = class extends XmlComponent {\n\tconstructor() {\n\t\tsuper(\"w:isLgl\");\n\t}\n};\n/**\n* Base class for numbering level definitions.\n*\n* Defines the formatting and behavior of a single level in a multi-level\n* numbering scheme. Each level can have its own numbering format, text template,\n* alignment, and styling.\n*\n* Reference: http://officeopenxml.com/WPnumbering-numFmt.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Lvl\">\n* <xsd:sequence>\n* <xsd:element name=\"start\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"numFmt\" type=\"CT_NumFmt\" minOccurs=\"0\"/>\n* <xsd:element name=\"lvlRestart\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"pStyle\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"isLgl\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"suff\" type=\"CT_LevelSuffix\" minOccurs=\"0\"/>\n* <xsd:element name=\"lvlText\" type=\"CT_LevelText\" minOccurs=\"0\"/>\n* <xsd:element name=\"lvlPicBulletId\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"legacy\" type=\"CT_LvlLegacy\" minOccurs=\"0\"/>\n* <xsd:element name=\"lvlJc\" type=\"CT_Jc\" minOccurs=\"0\"/>\n* <xsd:element name=\"pPr\" type=\"CT_PPrGeneral\" minOccurs=\"0\"/>\n* <xsd:element name=\"rPr\" type=\"CT_RPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"ilvl\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* <xsd:attribute name=\"tplc\" type=\"ST_LongHexNumber\" use=\"optional\"/>\n* <xsd:attribute name=\"tentative\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*/\nvar LevelBase = class extends XmlComponent {\n\t/**\n\t* Creates a new numbering level.\n\t*\n\t* @param options - Level configuration options\n\t* @throws Error if level is greater than 9 (Word limitation)\n\t*/\n\tconstructor({ level, format, text, alignment = AlignmentType.START, start = 1, style, suffix, isLegalNumberingStyle }) {\n\t\tsuper(\"w:lvl\");\n\t\t_defineProperty(this, \"paragraphProperties\", void 0);\n\t\t_defineProperty(this, \"runProperties\", void 0);\n\t\tthis.root.push(new NumberValueElement(\"w:start\", decimalNumber(start)));\n\t\tif (format) this.root.push(new NumberFormat$1(format));\n\t\tif (style === null || style === void 0 ? void 0 : style.style) this.root.push(createParagraphStyle(style.style));\n\t\tif (isLegalNumberingStyle) this.root.push(new IsLegalNumberingStyle());\n\t\tif (suffix) this.root.push(new Suffix(suffix));\n\t\tif (text) this.root.push(new LevelText(text));\n\t\tthis.root.push(new LevelJc(alignment));\n\t\tthis.paragraphProperties = new ParagraphProperties(style && style.paragraph, {\n\t\t\timplicitListParagraphStyle: false,\n\t\t\tinListOrder: false\n\t\t});\n\t\tthis.runProperties = new RunProperties((style === null || style === void 0 ? void 0 : style.run) && _objectSpread2(_objectSpread2({}, style.run), {}, {\n\t\t\thighlight: void 0,\n\t\t\tmath: void 0,\n\t\t\trevision: void 0\n\t\t}));\n\t\tthis.root.push(this.paragraphProperties);\n\t\tthis.root.push(this.runProperties);\n\t\tif (level > 9) throw new Error(\"Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7\");\n\t\tthis.root.push(new LevelAttributes({\n\t\t\tilvl: decimalNumber(level),\n\t\t\ttentative: 1\n\t\t}));\n\t}\n};\n/**\n* Represents a numbering level within an abstract numbering definition.\n*\n* This is the standard level definition used in abstract numbering definitions.\n* Each abstract numbering definition can contain up to 9 levels (0-8).\n*\n* Reference: http://officeopenxml.com/WPnumbering-numFmt.php\n*\n* @example\n* ```typescript\n* // Create a decimal numbered level\n* const level = new Level({\n* level: 0,\n* format: LevelFormat.DECIMAL,\n* text: \"%1.\",\n* alignment: AlignmentType.LEFT,\n* start: 1,\n* });\n*\n* // Create a bullet level with custom styling\n* const bulletLevel = new Level({\n* level: 0,\n* format: LevelFormat.BULLET,\n* text: \"\\u2022\",\n* alignment: AlignmentType.LEFT,\n* style: {\n* paragraph: {\n* indent: { left: 720, hanging: 360 },\n* },\n* },\n* });\n* ```\n*/\nvar Level = class extends LevelBase {};\n/**\n* Represents a numbering level used in level overrides.\n*\n* This level type is used when overriding specific levels within a\n* concrete numbering instance.\n*/\nvar LevelForOverride = class extends LevelBase {};\n// src/file/numbering/multi-level-type.ts\n/**\n* Multi-level type definitions for WordprocessingML documents.\n*\n* Defines the type of numbering structure (single-level, multi-level, or hybrid).\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* @module\n*/\n/**\n* Represents the multi-level type of a numbering definition.\n*\n* The multi-level type specifies whether the numbering definition uses a single\n* level, multiple levels, or a hybrid approach.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_MultiLevelType\">\n* <xsd:attribute name=\"val\" type=\"ST_MultiLevelType\" use=\"required\"/>\n* </xsd:complexType>\n*\n* <xsd:simpleType name=\"ST_MultiLevelType\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"singleLevel\"/>\n* <xsd:enumeration value=\"multilevel\"/>\n* <xsd:enumeration value=\"hybridMultilevel\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a hybrid multi-level numbering\n* const multiLevel = new MultiLevelType(\"hybridMultilevel\");\n*\n* // Create a single-level numbering\n* const singleLevel = new MultiLevelType(\"singleLevel\");\n* ```\n*/\nvar MultiLevelType = class extends XmlComponent {\n\t/**\n\t* Creates a new multi-level type specification.\n\t*\n\t* @param value - The multi-level type: \"singleLevel\", \"multilevel\", or \"hybridMultilevel\"\n\t*/\n\tconstructor(value) {\n\t\tsuper(\"w:multiLevelType\");\n\t\tthis.root.push(new Attributes({ val: value }));\n\t}\n};\n// src/file/numbering/abstract-numbering.ts\n/**\n* Abstract numbering definitions module for WordprocessingML documents.\n*\n* Abstract numbering definitions contain the formatting and style information\n* that can be shared across multiple numbering instances.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* @module\n*/\n/**\n* Attributes for abstract numbering definitions.\n*\n* @property abstractNumId - Unique identifier for the abstract numbering definition\n* @property restartNumberingAfterBreak - Whether to restart numbering after section breaks\n*/\nvar AbstractNumberingAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tabstractNumId: \"w:abstractNumId\",\n\t\t\trestartNumberingAfterBreak: \"w15:restartNumberingAfterBreak\"\n\t\t});\n\t}\n};\n/**\n* Represents an abstract numbering definition in a WordprocessingML document.\n*\n* Abstract numbering definitions define the formatting and style of numbered or\n* bulleted lists that can be referenced by concrete numbering instances.\n* Each abstract definition can contain up to 9 levels.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_AbstractNum\">\n* <xsd:sequence>\n* <xsd:element name=\"nsid\" type=\"CT_LongHexNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"multiLevelType\" type=\"CT_MultiLevelType\" minOccurs=\"0\"/>\n* <xsd:element name=\"tmpl\" type=\"CT_LongHexNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"name\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"styleLink\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"numStyleLink\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"lvl\" type=\"CT_Lvl\" minOccurs=\"0\" maxOccurs=\"9\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"abstractNumId\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create an abstract numbering definition with multiple levels\n* const abstractNumbering = new AbstractNumbering(1, [\n* {\n* level: 0,\n* format: LevelFormat.DECIMAL,\n* text: \"%1.\",\n* alignment: AlignmentType.LEFT,\n* },\n* {\n* level: 1,\n* format: LevelFormat.LOWER_LETTER,\n* text: \"%2)\",\n* alignment: AlignmentType.LEFT,\n* },\n* ]);\n* ```\n*/\nvar AbstractNumbering = class extends XmlComponent {\n\t/**\n\t* Creates a new abstract numbering definition.\n\t*\n\t* @param id - Unique identifier for this abstract numbering definition\n\t* @param levelOptions - Array of level definitions (up to 9 levels)\n\t*/\n\tconstructor(id, levelOptions) {\n\t\tsuper(\"w:abstractNum\");\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The unique identifier for this abstract numbering definition. */\n\t\t\t\"id\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.root.push(new AbstractNumberingAttributes({\n\t\t\tabstractNumId: decimalNumber(id),\n\t\t\trestartNumberingAfterBreak: 0\n\t\t}));\n\t\tthis.root.push(new MultiLevelType(\"hybridMultilevel\"));\n\t\tthis.id = id;\n\t\tfor (const option of levelOptions) this.root.push(new Level(option));\n\t}\n};\n// src/file/numbering/num.ts\n/**\n* Concrete numbering instances module for WordprocessingML documents.\n*\n* Concrete numbering instances reference abstract numbering definitions and\n* can override specific level settings. Each paragraph references a concrete\n* numbering instance to apply list formatting.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* @module\n*/\n/**\n* Reference to an abstract numbering definition.\n*/\nvar AbstractNumId = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:abstractNumId\");\n\t\tthis.root.push(new Attributes({ val: value }));\n\t}\n};\n/**\n* Attributes for concrete numbering instances.\n*/\nvar NumAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { numId: \"w:numId\" });\n\t}\n};\n/**\n* Represents a concrete numbering instance in a WordprocessingML document.\n*\n* A concrete numbering instance references an abstract numbering definition and\n* can override specific levels. Paragraphs reference concrete numbering instances\n* to apply list formatting.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Num\">\n* <xsd:sequence>\n* <xsd:element name=\"abstractNumId\" type=\"CT_DecimalNumber\" minOccurs=\"1\"/>\n* <xsd:element name=\"lvlOverride\" type=\"CT_NumLvl\" minOccurs=\"0\" maxOccurs=\"9\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"numId\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a concrete numbering instance\n* const concreteNumbering = new ConcreteNumbering({\n* numId: 1,\n* abstractNumId: 0,\n* reference: \"my-numbering\",\n* instance: 0,\n* overrideLevels: [\n* {\n* num: 0,\n* start: 5, // Start numbering at 5 instead of 1\n* },\n* ],\n* });\n* ```\n*/\nvar ConcreteNumbering = class extends XmlComponent {\n\t/**\n\t* Creates a new concrete numbering instance.\n\t*\n\t* @param options - Configuration options for the numbering instance\n\t*/\n\tconstructor(options) {\n\t\tsuper(\"w:num\");\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The unique identifier for this numbering instance. */\n\t\t\t\"numId\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The reference name for this numbering instance. */\n\t\t\t\"reference\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The instance number for tracking multiple uses. */\n\t\t\t\"instance\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** For a list a paragraph restarts, the id of that restart, as {@link IConcreteNumberingOptions.restartedListId} describes. */\n\t\t\t\"restartedListId\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.numId = options.numId;\n\t\tthis.reference = options.reference;\n\t\tthis.instance = options.instance;\n\t\tthis.restartedListId = options.restartedListId;\n\t\tthis.root.push(new NumAttributes({ numId: decimalNumber(options.numId) }));\n\t\tthis.root.push(new AbstractNumId(decimalNumber(options.abstractNumId)));\n\t\tif (options.overrideLevels && options.overrideLevels.length) for (const level of options.overrideLevels) this.root.push(new LevelOverride(level.num, level.start));\n\t}\n};\n/**\n* Attributes for level overrides.\n*/\nvar LevelOverrideAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args2) {\n\t\tsuper(..._args2);\n\t\t_defineProperty(this, \"xmlKeys\", { ilvl: \"w:ilvl\" });\n\t}\n};\n/**\n* Represents a level override in a concrete numbering instance.\n*\n* Level overrides allow customization of specific levels within a numbering\n* instance, such as changing the starting number.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_NumLvl\">\n* <xsd:sequence>\n* <xsd:element name=\"startOverride\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"lvl\" type=\"CT_Lvl\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"ilvl\" type=\"ST_DecimalNumber\" use=\"required\"/>\n* </xsd:complexType>\n* ```\n*/\nvar LevelOverride = class extends XmlComponent {\n\t/**\n\t* Creates a new level override.\n\t*\n\t* @param levelNum - The level number to override (0-8)\n\t* @param start - Optional starting number for the level\n\t*/\n\tconstructor(levelNum, start) {\n\t\tsuper(\"w:lvlOverride\");\n\t\tthis.root.push(new LevelOverrideAttributes({ ilvl: levelNum }));\n\t\tif (start !== void 0) this.root.push(new StartOverride(start));\n\t}\n};\n/**\n* Attributes for start override values.\n*/\nvar StartOverrideAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args3) {\n\t\tsuper(..._args3);\n\t\t_defineProperty(this, \"xmlKeys\", { val: \"w:val\" });\n\t}\n};\n/**\n* Represents a start override for a numbering level.\n*\n* This element overrides the starting number for a specific level.\n*/\nvar StartOverride = class extends XmlComponent {\n\t/**\n\t* Creates a new start override.\n\t*\n\t* @param start - The starting number\n\t*/\n\tconstructor(start) {\n\t\tsuper(\"w:startOverride\");\n\t\tthis.root.push(new StartOverrideAttributes({ val: start }));\n\t}\n};\n// src/file/numbering/numbering.ts\n/**\n* Numbering module for WordprocessingML documents.\n*\n* Numbering provides support for numbered and bulleted lists.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* @see https://stackoverflow.com/questions/58622437/purpose-of-abstractnum-and-numberinginstance\n*\n* @module\n*/\n/**\n* Represents the numbering definitions in a WordprocessingML document.\n*\n* The numbering element contains abstract numbering definitions and their\n* concrete instances, which are referenced by paragraphs to create lists.\n* Each numbering configuration includes a default bullet list and any\n* custom numbering schemes defined by the user.\n*\n* Reference: http://officeopenxml.com/WPnumbering.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"numbering\" type=\"CT_Numbering\"/>\n*\n* <xsd:complexType name=\"CT_Numbering\">\n* <xsd:sequence>\n* <xsd:element name=\"numPicBullet\" type=\"CT_NumPicBullet\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"abstractNum\" type=\"CT_AbstractNum\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"num\" type=\"CT_Num\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"numIdMacAtCleanup\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create numbering with custom decimal list\n* const numbering = new Numbering({\n* config: [\n* {\n* reference: \"my-decimal-list\",\n* levels: [\n* {\n* level: 0,\n* format: LevelFormat.DECIMAL,\n* text: \"%1.\",\n* alignment: AlignmentType.LEFT,\n* start: 1,\n* style: {\n* paragraph: {\n* indent: { left: 720, hanging: 360 },\n* },\n* },\n* },\n* {\n* level: 1,\n* format: LevelFormat.LOWER_LETTER,\n* text: \"%2)\",\n* alignment: AlignmentType.LEFT,\n* style: {\n* paragraph: {\n* indent: { left: 1440, hanging: 360 },\n* },\n* },\n* },\n* ],\n* },\n* ],\n* });\n* ```\n*/\nvar Numbering = class extends XmlComponent {\n\t/**\n\t* Creates a new numbering definition collection.\n\t*\n\t* Initializes the numbering with a default bullet list configuration and\n\t* any custom numbering configurations provided in the options.\n\t*\n\t* @param options - Configuration options for numbering definitions\n\t*/\n\tconstructor(options) {\n\t\tsuper(\"w:numbering\");\n\t\t_defineProperty(this, \"abstractNumberingMap\", /* @__PURE__ */ new Map());\n\t\t_defineProperty(this, \"concreteNumberingMap\", /* @__PURE__ */ new Map());\n\t\t_defineProperty(this, \"referenceConfigMap\", /* @__PURE__ */ new Map());\n\t\t_defineProperty(this, \"abstractNumUniqueNumericId\", abstractNumUniqueNumericIdGen());\n\t\t_defineProperty(this, \"concreteNumUniqueNumericId\", concreteNumUniqueNumericIdGen());\n\t\tthis.root.push(new DocumentAttributes([\n\t\t\t\"wpc\",\n\t\t\t\"mc\",\n\t\t\t\"o\",\n\t\t\t\"r\",\n\t\t\t\"m\",\n\t\t\t\"v\",\n\t\t\t\"wp14\",\n\t\t\t\"wp\",\n\t\t\t\"w10\",\n\t\t\t\"w\",\n\t\t\t\"w14\",\n\t\t\t\"w15\",\n\t\t\t\"wpg\",\n\t\t\t\"wpi\",\n\t\t\t\"wne\",\n\t\t\t\"wps\"\n\t\t], \"w14 w15 wp14\"));\n\t\tconst abstractNumbering = new AbstractNumbering(this.abstractNumUniqueNumericId(), [\n\t\t\t{\n\t\t\t\tlevel: 0,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"●\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: convertInchesToTwip(.5),\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 1,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"○\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: convertInchesToTwip(1),\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 2,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"■\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 2160,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 3,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"●\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 2880,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 4,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"○\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 3600,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 5,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"■\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 4320,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 6,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"●\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 5040,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 7,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"●\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 5760,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t},\n\t\t\t{\n\t\t\t\tlevel: 8,\n\t\t\t\tformat: LevelFormat.BULLET,\n\t\t\t\ttext: \"●\",\n\t\t\t\talignment: AlignmentType.LEFT,\n\t\t\t\tstyle: { paragraph: { indent: {\n\t\t\t\t\tleft: 6480,\n\t\t\t\t\thanging: convertInchesToTwip(.25)\n\t\t\t\t} } }\n\t\t\t}\n\t\t]);\n\t\tthis.concreteNumberingMap.set(\"default-bullet-numbering\", new ConcreteNumbering({\n\t\t\tnumId: 1,\n\t\t\tabstractNumId: abstractNumbering.id,\n\t\t\treference: \"default-bullet-numbering\",\n\t\t\tinstance: 0,\n\t\t\toverrideLevels: [{\n\t\t\t\tnum: 0,\n\t\t\t\tstart: 1\n\t\t\t}]\n\t\t}));\n\t\tthis.abstractNumberingMap.set(\"default-bullet-numbering\", abstractNumbering);\n\t\tfor (const con of options.config) {\n\t\t\tthis.abstractNumberingMap.set(con.reference, new AbstractNumbering(this.abstractNumUniqueNumericId(), con.levels));\n\t\t\tthis.referenceConfigMap.set(con.reference, con.levels);\n\t\t}\n\t}\n\t/**\n\t* Prepares the numbering definitions for XML serialization.\n\t*\n\t* Adds all abstract and concrete numbering definitions to the XML tree.\n\t*\n\t* @param context - The XML context\n\t* @returns The prepared XML object\n\t*/\n\tprepForXml(context) {\n\t\tthis.root.splice(1, this.root.length - 1, ...this.abstractNumberingMap.values(), ...this.concreteNumberingMap.values());\n\t\treturn super.prepForXml(context);\n\t}\n\t/**\n\t* Creates a concrete numbering instance from an abstract numbering definition.\n\t*\n\t* This method creates a new concrete numbering instance that references an\n\t* abstract numbering definition. It's used internally when paragraphs reference\n\t* numbering configurations.\n\t*\n\t* @param reference - The reference name of the abstract numbering definition\n\t* @param instance - The instance number for this concrete numbering\n\t* @param definition - The list's definition, for a list a paragraph gives its own definition of. It is added with\n\t* its reference, unless the numbering already has a list with that reference, such as one of the document's\n\t* `numbering` option, which is kept\n\t* @param restartedListId - For a list a paragraph starts again with `restart`, the id of that restart. The list is\n\t* then that restart's own, not the `instance`'s\n\t*/\n\tcreateConcreteNumberingInstance(reference, instance, definition, restartedListId) {\n\t\tvar _this$referenceConfig;\n\t\tif (definition && !this.abstractNumberingMap.has(definition.reference)) {\n\t\t\tthis.abstractNumberingMap.set(definition.reference, new AbstractNumbering(this.abstractNumUniqueNumericId(), definition.levels));\n\t\t\tthis.referenceConfigMap.set(definition.reference, definition.levels);\n\t\t}\n\t\tconst abstractNumbering = this.abstractNumberingMap.get(reference);\n\t\tif (!abstractNumbering) return;\n\t\tconst fullReference = listKey(reference, instance, restartedListId);\n\t\tif (this.concreteNumberingMap.has(fullReference)) return;\n\t\tconst referenceConfigLevels = (_this$referenceConfig = this.referenceConfigMap.get(reference)) !== null && _this$referenceConfig !== void 0 ? _this$referenceConfig : [{ level: 0 }];\n\t\tconst concreteNumberingSettings = {\n\t\t\tnumId: this.concreteNumUniqueNumericId(),\n\t\t\tabstractNumId: abstractNumbering.id,\n\t\t\treference,\n\t\t\tinstance,\n\t\t\trestartedListId,\n\t\t\toverrideLevels: referenceConfigLevels.map(({ level, start = 1 }) => ({\n\t\t\t\tnum: level,\n\t\t\t\tstart: decimalNumber(start)\n\t\t\t}))\n\t\t};\n\t\tthis.concreteNumberingMap.set(fullReference, new ConcreteNumbering(concreteNumberingSettings));\n\t}\n\t/**\n\t* Gets all concrete numbering instances.\n\t*\n\t* @returns An array of all concrete numbering instances\n\t*/\n\tget ConcreteNumbering() {\n\t\treturn Array.from(this.concreteNumberingMap.values());\n\t}\n\t/**\n\t* Gets all reference configurations.\n\t*\n\t* @returns An array of all numbering reference configurations\n\t*/\n\tget ReferenceConfig() {\n\t\treturn Array.from(this.referenceConfigMap.values());\n\t}\n};\n// src/file/package-part/package-part.ts\nvar PATH_PART = /^[\\w-]+$/;\nvar RESERVED_FOLDERS = /* @__PURE__ */ new Set([\n\t\"_rels\",\n\t\"fonts\",\n\t\"theme\"\n]);\n/**\n* A part that something in a document adds to the package when it is written, such as a chart, with the relationship to\n* it from the part it is used in: the document, a header, a footer, the footnotes, the endnotes or the comments.\n*\n* The part is added once, however many times it is written, and parts are numbered in the order they are added, such\n* as word/charts/chart1.xml and word/charts/chart2.xml. The XML that refers to the part uses {@link relationshipId}, and\n* calls {@link addTo} from its `prepForXml`.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* const chart = new PackagePart({\n* folder: \"charts\",\n* name: \"chart\",\n* extension: \"xml\",\n* contentType: \"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\",\n* relationshipType: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\",\n* content: chartSpace,\n* });\n*\n* class ChartReference extends XmlComponent {\n* public prepForXml(context: IContext): IXmlableObject | undefined {\n* chart.addTo(context);\n* return super.prepForXml(context);\n* }\n* }\n* ```\n*/\nvar PackagePart = class {\n\t/**\n\t* @throws If the folder isn't a single folder name, or is one of the folders docx writes parts of its own in\n\t* @throws If the name or the extension isn't a single part of a file name, which could lead out of the folder\n\t*/\n\tconstructor(options) {\n\t\t_defineProperty(this, \"options\", void 0);\n\t\t_defineProperty(this, \"id\", uniqueId());\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The id of the relationship to the part, such as a chart's `r:id` in the document */\n\t\t\t\"relationshipId\",\n\t\t\t`rId${this.id}`\n\t\t);\n\t\t_defineProperty(this, \"addedTo\", /* @__PURE__ */ new WeakSet());\n\t\tthis.options = options;\n\t\tif (!PATH_PART.test(options.folder) || RESERVED_FOLDERS.has(options.folder)) throw new Error(`Invalid package part folder \"${options.folder}\". Expected a folder name docx doesn't use, such as \"charts\"`);\n\t\tif (!PATH_PART.test(options.name)) throw new Error(`Invalid package part name \"${options.name}\". Expected letters, digits, \"_\" and \"-\", such as \"chart\"`);\n\t\tif (!PATH_PART.test(options.extension)) throw new Error(`Invalid package part extension \"${options.extension}\". Expected letters, digits, \"_\" and \"-\", such as \"xml\"`);\n\t}\n\t/**\n\t* Adds the part to the package being written, once, and a relationship to it from the part being written.\n\t*/\n\taddTo(context) {\n\t\tconst parts = context.file.PackageParts;\n\t\tconst path = parts.add(this);\n\t\tconst relationships = context.viewWrapper.Relationships;\n\t\tif (this.addedTo.has(relationships)) return;\n\t\tthis.addedTo.add(relationships);\n\t\trelationships.addRelationship(this.id, this.options.relationshipType, parts.getTarget(relationships, path));\n\t}\n};\n/**\n* The parts added to a document's package when it is written, with their paths under word/, in the order they were\n* added. Not part of the public API: `File` holds one, and the compiler writes its parts, as `patchDocument` does.\n*/\nvar PackageParts = class {\n\t/**\n\t* @param contentTypes - Where each part's content type is added\n\t* @param existingPaths - The paths under word/ of the parts the package already has, such as a template's charts,\n\t* which new parts don't take\n\t*/\n\tconstructor(contentTypes, existingPaths = /* @__PURE__ */ new Set()) {\n\t\t_defineProperty(this, \"contentTypes\", void 0);\n\t\t_defineProperty(this, \"existingPaths\", void 0);\n\t\t_defineProperty(this, \"paths\", /* @__PURE__ */ new Map());\n\t\t_defineProperty(this, \"folders\", /* @__PURE__ */ new WeakMap());\n\t\tthis.contentTypes = contentTypes;\n\t\tthis.existingPaths = existingPaths;\n\t}\n\t/**\n\t* Adds a part, and its content type, once.\n\t*\n\t* @returns The part's path under word/, such as \"charts/chart1.xml\"\n\t*/\n\tadd(part) {\n\t\tconst added = this.paths.get(part);\n\t\tif (added !== void 0) return added;\n\t\tconst { folder, name, extension, contentType } = part.options;\n\t\tconst taken = /* @__PURE__ */ new Set([...this.existingPaths, ...this.paths.values()]);\n\t\tlet index = 1;\n\t\twhile (taken.has(`${folder}/${name}${index}.${extension}`)) index++;\n\t\tconst path = `${folder}/${name}${index}.${extension}`;\n\t\tthis.paths.set(part, path);\n\t\tthis.contentTypes.addOverride(contentType, `/word/${path}`);\n\t\treturn path;\n\t}\n\t/**\n\t* Each part added, with its path under word/, in the order they were added.\n\t*\n\t* A part related as an OLE object is listed too, though the parts are typed as they were before a part could be:\n\t* `File`, whose type is public, has these parts, and the compiler only writes their content.\n\t*/\n\tget Array() {\n\t\treturn [...this.paths].map(([part, path]) => ({\n\t\t\tpart,\n\t\t\tpath\n\t\t}));\n\t}\n\t/**\n\t* Creates the relationships of a part whose XML is being written, so the parts its XML refers to are found from its\n\t* folder.\n\t*\n\t* @param path - The part's path under word/\n\t*/\n\tcreateRelationships(path) {\n\t\tconst relationships = new Relationships();\n\t\tthis.folders.set(relationships, path.slice(0, path.indexOf(\"/\")));\n\t\treturn relationships;\n\t}\n\t/**\n\t* The target of a relationship to a part, relative to the part the relationships are from. The document, headers,\n\t* footers, footnotes, endnotes and comments are all in word/.\n\t*\n\t* @param path - The part's path under word/\n\t*/\n\tgetTarget(relationships, path) {\n\t\tconst from = this.folders.get(relationships);\n\t\tif (from === void 0) return path;\n\t\treturn path.startsWith(`${from}/`) ? path.slice(from.length + 1) : `../${path}`;\n\t}\n};\n// src/file/settings/compatibility-setting/compatibility-setting.ts\n/**\n* Compatibility setting module for WordprocessingML documents.\n*\n* This module provides the compatibility mode version setting that controls\n* which Word version's behavior the document should emulate.\n*\n* Reference: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/90138c4d-eb18-4edc-aa6c-dfb799cb1d0d\n*\n* @module\n*/\n/**\n* Creates a compatibility setting for a WordprocessingML document.\n*\n* Currently hard-coded to set Microsoft Word compatibility mode version.\n* This controls which Word version's formatting and layout behavior the document emulates.\n*\n* Common version values:\n* - 11: Word 2003\n* - 12: Word 2007\n* - 14: Word 2010\n* - 15: Word 2013+\n*\n* Reference: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/90138c4d-eb18-4edc-aa6c-dfb799cb1d0d\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_CompatSetting\">\n* <xsd:attribute name=\"name\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"uri\" type=\"s:ST_String\"/>\n* <xsd:attribute name=\"val\" type=\"s:ST_String\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Set compatibility mode to Word 2013+\n* createCompatibilitySetting(15);\n*\n* // Set compatibility mode to Word 2010\n* createCompatibilitySetting(14);\n* ```\n*/\nvar createCompatibilitySetting = (version) => new BuilderElement({\n\tname: \"w:compatSetting\",\n\tattributes: {\n\t\tversion: {\n\t\t\tkey: \"w:val\",\n\t\t\tvalue: version\n\t\t},\n\t\tname: {\n\t\t\tkey: \"w:name\",\n\t\t\tvalue: \"compatibilityMode\"\n\t\t},\n\t\turi: {\n\t\t\tkey: \"w:uri\",\n\t\t\tvalue: \"http://schemas.microsoft.com/office/word\"\n\t\t}\n\t}\n});\n// src/file/settings/compatibility.ts\n/**\n* Compatibility module for WordprocessingML documents.\n*\n* This module provides compatibility settings that control how Word\n* handles documents created in older versions or other word processors.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_compat-1.html\n*\n* @module\n*/\n/**\n* Represents compatibility settings in a WordprocessingML document.\n*\n* Compatibility settings control document rendering and layout behavior\n* to match older Word versions or other word processors. This ensures\n* documents maintain consistent appearance across different applications.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_compat-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Compat\">\n* <xsd:sequence>\n* <xsd:element name=\"useSingleBorderforContiguousCells\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"wpJustification\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"noTabHangInd\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"noLeading\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"usePrinterMetrics\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <!-- Additional compatibility elements omitted for brevity -->\n* <xsd:element name=\"compatSetting\" type=\"CT_CompatSetting\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Set compatibility mode to Word 2013+\n* new Compatibility({\n* version: 15,\n* });\n*\n* // Enable specific compatibility options\n* new Compatibility({\n* version: 15,\n* usePrinterMetrics: true,\n* doNotSnapToGridInCell: true,\n* });\n* ```\n*/\nvar Compatibility = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:compat\");\n\t\tif (options.useSingleBorderforContiguousCells) this.root.push(new OnOffElement(\"w:useSingleBorderforContiguousCells\", options.useSingleBorderforContiguousCells));\n\t\tif (options.wordPerfectJustification) this.root.push(new OnOffElement(\"w:wpJustification\", options.wordPerfectJustification));\n\t\tif (options.noTabStopForHangingIndent) this.root.push(new OnOffElement(\"w:noTabHangInd\", options.noTabStopForHangingIndent));\n\t\tif (options.noLeading) this.root.push(new OnOffElement(\"w:noLeading\", options.noLeading));\n\t\tif (options.spaceForUnderline) this.root.push(new OnOffElement(\"w:spaceForUL\", options.spaceForUnderline));\n\t\tif (options.noColumnBalance) this.root.push(new OnOffElement(\"w:noColumnBalance\", options.noColumnBalance));\n\t\tif (options.balanceSingleByteDoubleByteWidth) this.root.push(new OnOffElement(\"w:balanceSingleByteDoubleByteWidth\", options.balanceSingleByteDoubleByteWidth));\n\t\tif (options.noExtraLineSpacing) this.root.push(new OnOffElement(\"w:noExtraLineSpacing\", options.noExtraLineSpacing));\n\t\tif (options.doNotLeaveBackslashAlone) this.root.push(new OnOffElement(\"w:doNotLeaveBackslashAlone\", options.doNotLeaveBackslashAlone));\n\t\tif (options.underlineTrailingSpaces) this.root.push(new OnOffElement(\"w:ulTrailSpace\", options.underlineTrailingSpaces));\n\t\tif (options.doNotExpandShiftReturn) this.root.push(new OnOffElement(\"w:doNotExpandShiftReturn\", options.doNotExpandShiftReturn));\n\t\tif (options.spacingInWholePoints) this.root.push(new OnOffElement(\"w:spacingInWholePoints\", options.spacingInWholePoints));\n\t\tif (options.lineWrapLikeWord6) this.root.push(new OnOffElement(\"w:lineWrapLikeWord6\", options.lineWrapLikeWord6));\n\t\tif (options.printBodyTextBeforeHeader) this.root.push(new OnOffElement(\"w:printBodyTextBeforeHeader\", options.printBodyTextBeforeHeader));\n\t\tif (options.printColorsBlack) this.root.push(new OnOffElement(\"w:printColBlack\", options.printColorsBlack));\n\t\tif (options.spaceWidth) this.root.push(new OnOffElement(\"w:wpSpaceWidth\", options.spaceWidth));\n\t\tif (options.showBreaksInFrames) this.root.push(new OnOffElement(\"w:showBreaksInFrames\", options.showBreaksInFrames));\n\t\tif (options.subFontBySize) this.root.push(new OnOffElement(\"w:subFontBySize\", options.subFontBySize));\n\t\tif (options.suppressBottomSpacing) this.root.push(new OnOffElement(\"w:suppressBottomSpacing\", options.suppressBottomSpacing));\n\t\tif (options.suppressTopSpacing) this.root.push(new OnOffElement(\"w:suppressTopSpacing\", options.suppressTopSpacing));\n\t\tif (options.suppressSpacingAtTopOfPage) this.root.push(new OnOffElement(\"w:suppressSpacingAtTopOfPage\", options.suppressSpacingAtTopOfPage));\n\t\tif (options.suppressTopSpacingWP) this.root.push(new OnOffElement(\"w:suppressTopSpacingWP\", options.suppressTopSpacingWP));\n\t\tif (options.suppressSpBfAfterPgBrk) this.root.push(new OnOffElement(\"w:suppressSpBfAfterPgBrk\", options.suppressSpBfAfterPgBrk));\n\t\tif (options.swapBordersFacingPages) this.root.push(new OnOffElement(\"w:swapBordersFacingPages\", options.swapBordersFacingPages));\n\t\tif (options.convertMailMergeEsc) this.root.push(new OnOffElement(\"w:convMailMergeEsc\", options.convertMailMergeEsc));\n\t\tif (options.truncateFontHeightsLikeWP6) this.root.push(new OnOffElement(\"w:truncateFontHeightsLikeWP6\", options.truncateFontHeightsLikeWP6));\n\t\tif (options.macWordSmallCaps) this.root.push(new OnOffElement(\"w:mwSmallCaps\", options.macWordSmallCaps));\n\t\tif (options.usePrinterMetrics) this.root.push(new OnOffElement(\"w:usePrinterMetrics\", options.usePrinterMetrics));\n\t\tif (options.doNotSuppressParagraphBorders) this.root.push(new OnOffElement(\"w:doNotSuppressParagraphBorders\", options.doNotSuppressParagraphBorders));\n\t\tif (options.wrapTrailSpaces) this.root.push(new OnOffElement(\"w:wrapTrailSpaces\", options.wrapTrailSpaces));\n\t\tif (options.footnoteLayoutLikeWW8) this.root.push(new OnOffElement(\"w:footnoteLayoutLikeWW8\", options.footnoteLayoutLikeWW8));\n\t\tif (options.shapeLayoutLikeWW8) this.root.push(new OnOffElement(\"w:shapeLayoutLikeWW8\", options.shapeLayoutLikeWW8));\n\t\tif (options.alignTablesRowByRow) this.root.push(new OnOffElement(\"w:alignTablesRowByRow\", options.alignTablesRowByRow));\n\t\tif (options.forgetLastTabAlignment) this.root.push(new OnOffElement(\"w:forgetLastTabAlignment\", options.forgetLastTabAlignment));\n\t\tif (options.adjustLineHeightInTable) this.root.push(new OnOffElement(\"w:adjustLineHeightInTable\", options.adjustLineHeightInTable));\n\t\tif (options.autoSpaceLikeWord95) this.root.push(new OnOffElement(\"w:autoSpaceLikeWord95\", options.autoSpaceLikeWord95));\n\t\tif (options.noSpaceRaiseLower) this.root.push(new OnOffElement(\"w:noSpaceRaiseLower\", options.noSpaceRaiseLower));\n\t\tif (options.doNotUseHTMLParagraphAutoSpacing) this.root.push(new OnOffElement(\"w:doNotUseHTMLParagraphAutoSpacing\", options.doNotUseHTMLParagraphAutoSpacing));\n\t\tif (options.layoutRawTableWidth) this.root.push(new OnOffElement(\"w:layoutRawTableWidth\", options.layoutRawTableWidth));\n\t\tif (options.layoutTableRowsApart) this.root.push(new OnOffElement(\"w:layoutTableRowsApart\", options.layoutTableRowsApart));\n\t\tif (options.useWord97LineBreakRules) this.root.push(new OnOffElement(\"w:useWord97LineBreakRules\", options.useWord97LineBreakRules));\n\t\tif (options.doNotBreakWrappedTables) this.root.push(new OnOffElement(\"w:doNotBreakWrappedTables\", options.doNotBreakWrappedTables));\n\t\tif (options.doNotSnapToGridInCell) this.root.push(new OnOffElement(\"w:doNotSnapToGridInCell\", options.doNotSnapToGridInCell));\n\t\tif (options.selectFieldWithFirstOrLastCharacter) this.root.push(new OnOffElement(\"w:selectFldWithFirstOrLastChar\", options.selectFieldWithFirstOrLastCharacter));\n\t\tif (options.applyBreakingRules) this.root.push(new OnOffElement(\"w:applyBreakingRules\", options.applyBreakingRules));\n\t\tif (options.doNotWrapTextWithPunctuation) this.root.push(new OnOffElement(\"w:doNotWrapTextWithPunct\", options.doNotWrapTextWithPunctuation));\n\t\tif (options.doNotUseEastAsianBreakRules) this.root.push(new OnOffElement(\"w:doNotUseEastAsianBreakRules\", options.doNotUseEastAsianBreakRules));\n\t\tif (options.useWord2002TableStyleRules) this.root.push(new OnOffElement(\"w:useWord2002TableStyleRules\", options.useWord2002TableStyleRules));\n\t\tif (options.growAutofit) this.root.push(new OnOffElement(\"w:growAutofit\", options.growAutofit));\n\t\tif (options.useFELayout) this.root.push(new OnOffElement(\"w:useFELayout\", options.useFELayout));\n\t\tif (options.useNormalStyleForList) this.root.push(new OnOffElement(\"w:useNormalStyleForList\", options.useNormalStyleForList));\n\t\tif (options.doNotUseIndentAsNumberingTabStop) this.root.push(new OnOffElement(\"w:doNotUseIndentAsNumberingTabStop\", options.doNotUseIndentAsNumberingTabStop));\n\t\tif (options.useAlternateEastAsianLineBreakRules) this.root.push(new OnOffElement(\"w:useAltKinsokuLineBreakRules\", options.useAlternateEastAsianLineBreakRules));\n\t\tif (options.allowSpaceOfSameStyleInTable) this.root.push(new OnOffElement(\"w:allowSpaceOfSameStyleInTable\", options.allowSpaceOfSameStyleInTable));\n\t\tif (options.doNotSuppressIndentation) this.root.push(new OnOffElement(\"w:doNotSuppressIndentation\", options.doNotSuppressIndentation));\n\t\tif (options.doNotAutofitConstrainedTables) this.root.push(new OnOffElement(\"w:doNotAutofitConstrainedTables\", options.doNotAutofitConstrainedTables));\n\t\tif (options.autofitToFirstFixedWidthCell) this.root.push(new OnOffElement(\"w:autofitToFirstFixedWidthCell\", options.autofitToFirstFixedWidthCell));\n\t\tif (options.underlineTabInNumberingList) this.root.push(new OnOffElement(\"w:underlineTabInNumList\", options.underlineTabInNumberingList));\n\t\tif (options.displayHangulFixedWidth) this.root.push(new OnOffElement(\"w:displayHangulFixedWidth\", options.displayHangulFixedWidth));\n\t\tif (options.splitPgBreakAndParaMark) this.root.push(new OnOffElement(\"w:splitPgBreakAndParaMark\", options.splitPgBreakAndParaMark));\n\t\tif (options.doNotVerticallyAlignCellWithSp) this.root.push(new OnOffElement(\"w:doNotVertAlignCellWithSp\", options.doNotVerticallyAlignCellWithSp));\n\t\tif (options.doNotBreakConstrainedForcedTable) this.root.push(new OnOffElement(\"w:doNotBreakConstrainedForcedTable\", options.doNotBreakConstrainedForcedTable));\n\t\tif (options.ignoreVerticalAlignmentInTextboxes) this.root.push(new OnOffElement(\"w:doNotVertAlignInTxbx\", options.ignoreVerticalAlignmentInTextboxes));\n\t\tif (options.useAnsiKerningPairs) this.root.push(new OnOffElement(\"w:useAnsiKerningPairs\", options.useAnsiKerningPairs));\n\t\tif (options.cachedColumnBalance) this.root.push(new OnOffElement(\"w:cachedColBalance\", options.cachedColumnBalance));\n\t\tif (options.version) this.root.push(createCompatibilitySetting(options.version));\n\t}\n};\n// src/file/settings/protection-password.ts\n/**\n* Hashes the password that stops a document's protection, as Word does.\n*\n* Reference: ISO/IEC 29500-1 17.15.1.29 (documentProtection) and the legacy password algorithm it builds on,\n* ECMA-376 Part 4 2.15.1.28\n*\n* @module\n*/\n/** How many times Word hashes the password again, which is what it writes in `w:cryptSpinCount` */\nvar PROTECTION_PASSWORD_SPIN_COUNT = 1e5;\nvar MAX_PASSWORD_LENGTH = 15;\nvar INITIAL_CODES = [\n\t57840,\n\t7439,\n\t52380,\n\t33984,\n\t4364,\n\t3600,\n\t61902,\n\t12606,\n\t6258,\n\t57657,\n\t54287,\n\t34041,\n\t10252,\n\t43370,\n\t20163\n];\nvar ENCRYPTION_MATRIX = [\n\t[\n\t\t44796,\n\t\t19929,\n\t\t39858,\n\t\t10053,\n\t\t20106,\n\t\t40212,\n\t\t10761\n\t],\n\t[\n\t\t31585,\n\t\t63170,\n\t\t64933,\n\t\t60267,\n\t\t50935,\n\t\t40399,\n\t\t11199\n\t],\n\t[\n\t\t17763,\n\t\t35526,\n\t\t1453,\n\t\t2906,\n\t\t5812,\n\t\t11624,\n\t\t23248\n\t],\n\t[\n\t\t885,\n\t\t1770,\n\t\t3540,\n\t\t7080,\n\t\t14160,\n\t\t28320,\n\t\t56640\n\t],\n\t[\n\t\t55369,\n\t\t41139,\n\t\t20807,\n\t\t41614,\n\t\t21821,\n\t\t43642,\n\t\t17621\n\t],\n\t[\n\t\t28485,\n\t\t56970,\n\t\t44341,\n\t\t19019,\n\t\t38038,\n\t\t14605,\n\t\t29210\n\t],\n\t[\n\t\t60195,\n\t\t50791,\n\t\t40175,\n\t\t10751,\n\t\t21502,\n\t\t43004,\n\t\t24537\n\t],\n\t[\n\t\t18387,\n\t\t36774,\n\t\t3949,\n\t\t7898,\n\t\t15796,\n\t\t31592,\n\t\t63184\n\t],\n\t[\n\t\t47201,\n\t\t24803,\n\t\t49606,\n\t\t37805,\n\t\t14203,\n\t\t28406,\n\t\t56812\n\t],\n\t[\n\t\t17824,\n\t\t35648,\n\t\t1697,\n\t\t3394,\n\t\t6788,\n\t\t13576,\n\t\t27152\n\t],\n\t[\n\t\t43601,\n\t\t17539,\n\t\t35078,\n\t\t557,\n\t\t1114,\n\t\t2228,\n\t\t4456\n\t],\n\t[\n\t\t30388,\n\t\t60776,\n\t\t51953,\n\t\t34243,\n\t\t7079,\n\t\t14158,\n\t\t28316\n\t],\n\t[\n\t\t14128,\n\t\t28256,\n\t\t56512,\n\t\t43425,\n\t\t17251,\n\t\t34502,\n\t\t7597\n\t],\n\t[\n\t\t13105,\n\t\t26210,\n\t\t52420,\n\t\t35241,\n\t\t883,\n\t\t1766,\n\t\t3532\n\t],\n\t[\n\t\t4129,\n\t\t8258,\n\t\t16516,\n\t\t33032,\n\t\t4657,\n\t\t9314,\n\t\t18628\n\t]\n];\nvar rotateLeft15 = (value) => value >> 14 & 1 | value << 1 & 32767;\n/**\n* The legacy key Word derives from a password before hashing it, as uppercase hex in reversed byte order. The\n* standard's example is \"Example\", whose key 0x64CEED7E is written \"7EEDCE64\".\n*\n* @internal\n*/\nvar legacyPasswordKey = (password) => {\n\tconst bytes = password.slice(0, MAX_PASSWORD_LENGTH).split(\"\").map((character) => {\n\t\tconst code = character.charCodeAt(0);\n\t\treturn (code & 255) !== 0 ? code & 255 : code >> 8 & 255;\n\t});\n\tconst highOrderWord = bytes.reduce((word, byte, index) => ENCRYPTION_MATRIX[MAX_PASSWORD_LENGTH - bytes.length + index].reduce((current, code, bit) => byte >> bit & 1 ? current ^ code : current, word), INITIAL_CODES[bytes.length - 1]);\n\tconst lowOrderWord = (rotateLeft15(bytes.reduceRight((word, byte) => rotateLeft15(word) ^ byte, 0)) ^ bytes.length ^ 52811) & 65535;\n\treturn [\n\t\tlowOrderWord & 255,\n\t\tlowOrderWord >> 8,\n\t\thighOrderWord & 255,\n\t\thighOrderWord >> 8\n\t].map((byte) => byte.toString(16).toUpperCase().padStart(2, \"0\")).join(\"\");\n};\n/**\n* Hashes a password for `w:documentProtection` as Word does, with SHA-256: SHA-256 of the salt and the password's\n* legacy key (in UTF-16LE), then SHA-256 of each hash and its iteration number (32-bit little-endian), `spinCount`\n* times.\n*\n* Word itself uses SHA-512, and reads either. JavaScript works SHA-512's 64-bit words out in 32-bit halves, so\n* 100,000 rounds of it take a second or more, where SHA-256 takes about a tenth of that.\n*\n* @param password - The password, of at least one character\n* @param salt - The salt Word reads from `w:salt`\n* @param spinCount - How many times to hash again, which Word reads from `w:cryptSpinCount`\n* @returns The hash Word reads from `w:hash`\n*\n* @internal\n*/\nvar hashProtectionPassword = (password, salt, spinCount) => {\n\tconst key = [...legacyPasswordKey(password)].flatMap((character) => [character.charCodeAt(0), 0]);\n\tlet digest = sha256(Uint8Array.from([...salt, ...key]));\n\tconst block = new Uint8Array(digest.length + 4);\n\tconst view = new DataView(block.buffer);\n\tfor (let iteration = 0; iteration < spinCount; iteration++) {\n\t\tblock.set(digest);\n\t\tview.setUint32(digest.length, iteration, true);\n\t\tdigest = sha256(block);\n\t}\n\treturn Array.from(digest);\n};\n/**\n* Random bytes for a password's salt, from the platform's secure random numbers where it has them (browsers, and\n* Node.js from 19 on). The salt is written in the document beside the hash, so it only has to differ between\n* documents, and `Math.random` does that on older Node.js.\n*\n* @internal\n*/\nvar randomSalt = (length) => {\n\tvar _globalThis$crypto;\n\tconst bytes = new Uint8Array(length);\n\tif (typeof ((_globalThis$crypto = globalThis.crypto) === null || _globalThis$crypto === void 0 ? void 0 : _globalThis$crypto.getRandomValues) === \"function\") {\n\t\tglobalThis.crypto.getRandomValues(bytes);\n\t\treturn [...bytes];\n\t}\n\treturn [...bytes].map(() => Math.floor(Math.random() * 256));\n};\n// src/file/settings/document-protection.ts\n/**\n* Document protection module for WordprocessingML documents.\n*\n* Protection limits what people can change in a document when they open it in Word, as Word's Restrict Editing\n* does: nothing, or only comments, tracked changes or forms. A password stops anyone without it turning the\n* protection off.\n*\n* Reference: ISO/IEC 29500-1 17.15.1.29 (documentProtection)\n*\n* @module\n*/\n/**\n* What people can change in a protected document, as Word's Restrict Editing offers it.\n*\n* ## XSD Schema\n*\n* ```xml\n* <xsd:simpleType name=\"ST_DocProtect\">\n* <xsd:restriction base=\"xsd:string\">\n* <xsd:enumeration value=\"none\"/>\n* <xsd:enumeration value=\"readOnly\"/>\n* <xsd:enumeration value=\"comments\"/>\n* <xsd:enumeration value=\"trackedChanges\"/>\n* <xsd:enumeration value=\"forms\"/>\n* </xsd:restriction>\n* </xsd:simpleType>\n* ```\n*\n* @publicApi\n*/\nvar DocumentProtectionType = {\n\t/**\n\t* ## No Changes (Read Only)\n\t*\n\t* Nothing can be changed, except in the document's editable ranges (`EditableRangeStart` to `EditableRangeEnd`).\n\t*/\n\tREAD_ONLY: \"readOnly\",\n\t/**\n\t* ## Comments\n\t*\n\t* Only comments can be added, and the editable ranges changed.\n\t*/\n\tCOMMENTS: \"comments\",\n\t/**\n\t* ## Tracked Changes\n\t*\n\t* Anything can be changed, and every change is tracked, as a revision people can accept or reject.\n\t*/\n\tTRACKED_CHANGES: \"trackedChanges\",\n\t/**\n\t* ## Filling in Forms\n\t*\n\t* Only form fields can be filled in.\n\t*/\n\tFORMS: \"forms\"\n};\n/**\n* Attributes of the document protection element.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_DocProtect\">\n* <xsd:attribute name=\"edit\" type=\"ST_DocProtect\" use=\"optional\"/>\n* <xsd:attribute name=\"formatting\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"enforcement\" type=\"s:ST_OnOff\"/>\n* <xsd:attributeGroup ref=\"AG_Password\"/>\n* <xsd:attributeGroup ref=\"AG_TransitionalPassword\"/>\n* </xsd:complexType>\n* ```\n*/\nvar DocumentProtectionAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tedit: \"w:edit\",\n\t\t\tenforcement: \"w:enforcement\",\n\t\t\tcryptProviderType: \"w:cryptProviderType\",\n\t\t\tcryptAlgorithmClass: \"w:cryptAlgorithmClass\",\n\t\t\tcryptAlgorithmType: \"w:cryptAlgorithmType\",\n\t\t\tcryptAlgorithmSid: \"w:cryptAlgorithmSid\",\n\t\t\tcryptSpinCount: \"w:cryptSpinCount\",\n\t\t\thash: \"w:hash\",\n\t\t\tsalt: \"w:salt\"\n\t\t});\n\t}\n};\nvar toBase64 = (bytes) => btoa(String.fromCharCode(...bytes));\n/**\n* Represents a document's protection (`w:documentProtection`), which limits what people can change in it in Word.\n*\n* A password is hashed as Word hashes it, with a random 16-byte salt, 100,000 times, after Word's legacy key\n* derivation, but with SHA-256 (`w:cryptAlgorithmSid` 12), which is much faster here than the SHA-512 Word uses. These\n* are the transitional password attributes, which Word writes.\n*\n* Reference: ISO/IEC 29500-1 17.15.1.29 (documentProtection)\n*\n* @example\n* ```typescript\n* new DocumentProtection({ type: DocumentProtectionType.READ_ONLY, password: \"secret\" });\n* ```\n*/\nvar DocumentProtection = class extends XmlComponent {\n\tconstructor({ type, password }) {\n\t\tsuper(\"w:documentProtection\");\n\t\tif (password === void 0 || password === \"\") {\n\t\t\tthis.root.push(new DocumentProtectionAttributes({\n\t\t\t\tedit: type,\n\t\t\t\tenforcement: true\n\t\t\t}));\n\t\t\treturn;\n\t\t}\n\t\tconst salt = randomSalt(16);\n\t\tthis.root.push(new DocumentProtectionAttributes({\n\t\t\tedit: type,\n\t\t\tenforcement: true,\n\t\t\tcryptProviderType: \"rsaAES\",\n\t\t\tcryptAlgorithmClass: \"hash\",\n\t\t\tcryptAlgorithmType: \"typeAny\",\n\t\t\tcryptAlgorithmSid: 12,\n\t\t\tcryptSpinCount: PROTECTION_PASSWORD_SPIN_COUNT,\n\t\t\thash: toBase64(hashProtectionPassword(password, salt, PROTECTION_PASSWORD_SPIN_COUNT)),\n\t\t\tsalt: toBase64(salt)\n\t\t}));\n\t}\n};\n// src/file/settings/settings.ts\n/**\n* Settings module for WordprocessingML documents.\n*\n* This module provides document-level settings including compatibility,\n* track changes, headers/footers, and hyphenation options.\n*\n* Reference: http://officeopenxml.com/WPsettings.php\n*\n* @module\n*/\n/**\n* Attributes for the settings element with XML namespace declarations.\n*\n* Defines the XML namespaces required for the settings.xml document part.\n* These namespaces enable compatibility features, markup compatibility,\n* and various Office-specific extensions.\n*\n* @internal\n*/\nvar SettingsAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\twpc: \"xmlns:wpc\",\n\t\t\tmc: \"xmlns:mc\",\n\t\t\to: \"xmlns:o\",\n\t\t\tr: \"xmlns:r\",\n\t\t\tm: \"xmlns:m\",\n\t\t\tv: \"xmlns:v\",\n\t\t\twp14: \"xmlns:wp14\",\n\t\t\twp: \"xmlns:wp\",\n\t\t\tw10: \"xmlns:w10\",\n\t\t\tw: \"xmlns:w\",\n\t\t\tw14: \"xmlns:w14\",\n\t\t\tw15: \"xmlns:w15\",\n\t\t\twpg: \"xmlns:wpg\",\n\t\t\twpi: \"xmlns:wpi\",\n\t\t\twne: \"xmlns:wne\",\n\t\t\twps: \"xmlns:wps\",\n\t\t\tIgnorable: \"mc:Ignorable\"\n\t\t});\n\t}\n};\n/**\n* Represents document settings in a WordprocessingML document.\n*\n* Settings contain document-wide configuration options such as\n* compatibility mode, track changes, hyphenation, and more.\n*\n* Reference: http://officeopenxml.com/WPsettings.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Settings\">\n* <xsd:sequence>\n* <xsd:element name=\"embedTrueTypeFonts\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"trackRevisions\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"documentProtection\" type=\"CT_DocProtect\" minOccurs=\"0\"/>\n* <xsd:element name=\"defaultTabStop\" type=\"CT_TwipsMeasure\" minOccurs=\"0\"/>\n* <xsd:element name=\"autoHyphenation\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"consecutiveHyphenLimit\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"hyphenationZone\" type=\"CT_TwipsMeasure\" minOccurs=\"0\"/>\n* <xsd:element name=\"doNotHyphenateCaps\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"evenAndOddHeaders\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"updateFields\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"compat\" type=\"CT_Compat\" minOccurs=\"0\"/>\n* <!-- Additional elements omitted for brevity -->\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Basic settings with track changes enabled\n* new Settings({\n* trackRevisions: true,\n* evenAndOddHeaders: true,\n* });\n*\n* // Settings with compatibility mode and hyphenation\n* new Settings({\n* compatibility: {\n* version: 15, // Word 2013+\n* },\n* hyphenation: {\n* autoHyphenation: true,\n* consecutiveHyphenLimit: 2,\n* },\n* });\n* ```\n*/\nvar Settings = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$defaultTabSt, _options$hyphenation, _options$hyphenation2, _options$hyphenation3, _options$hyphenation4, _options$compatibilit, _ref, _options$compatibilit2, _options$compatibilit3;\n\t\tsuper(\"w:settings\");\n\t\tthis.root.push(new SettingsAttributes({\n\t\t\twpc: \"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\",\n\t\t\tmc: \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n\t\t\to: \"urn:schemas-microsoft-com:office:office\",\n\t\t\tr: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",\n\t\t\tm: \"http://schemas.openxmlformats.org/officeDocument/2006/math\",\n\t\t\tv: \"urn:schemas-microsoft-com:vml\",\n\t\t\twp14: \"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\",\n\t\t\twp: \"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\",\n\t\t\tw10: \"urn:schemas-microsoft-com:office:word\",\n\t\t\tw: \"http://schemas.openxmlformats.org/wordprocessingml/2006/main\",\n\t\t\tw14: \"http://schemas.microsoft.com/office/word/2010/wordml\",\n\t\t\tw15: \"http://schemas.microsoft.com/office/word/2012/wordml\",\n\t\t\twpg: \"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\",\n\t\t\twpi: \"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\",\n\t\t\twne: \"http://schemas.microsoft.com/office/word/2006/wordml\",\n\t\t\twps: \"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\",\n\t\t\tIgnorable: \"w14 w15 wp14\"\n\t\t}));\n\t\tthis.root.push(new OnOffElement(\"w:displayBackgroundShape\", true));\n\t\tif (options.embedFonts !== void 0) this.root.push(new OnOffElement(\"w:embedTrueTypeFonts\", options.embedFonts));\n\t\tif (options.trackRevisions !== void 0) this.root.push(new OnOffElement(\"w:trackRevisions\", options.trackRevisions));\n\t\tif (options.protection !== void 0) this.root.push(new DocumentProtection(options.protection));\n\t\tthis.root.push(new NumberValueElement(\"w:defaultTabStop\", (_options$defaultTabSt = options.defaultTabStop) !== null && _options$defaultTabSt !== void 0 ? _options$defaultTabSt : 720));\n\t\tif (((_options$hyphenation = options.hyphenation) === null || _options$hyphenation === void 0 ? void 0 : _options$hyphenation.autoHyphenation) !== void 0) this.root.push(new OnOffElement(\"w:autoHyphenation\", options.hyphenation.autoHyphenation));\n\t\tif (((_options$hyphenation2 = options.hyphenation) === null || _options$hyphenation2 === void 0 ? void 0 : _options$hyphenation2.consecutiveHyphenLimit) !== void 0) this.root.push(new NumberValueElement(\"w:consecutiveHyphenLimit\", options.hyphenation.consecutiveHyphenLimit));\n\t\tif (((_options$hyphenation3 = options.hyphenation) === null || _options$hyphenation3 === void 0 ? void 0 : _options$hyphenation3.hyphenationZone) !== void 0) this.root.push(new NumberValueElement(\"w:hyphenationZone\", options.hyphenation.hyphenationZone));\n\t\tif (((_options$hyphenation4 = options.hyphenation) === null || _options$hyphenation4 === void 0 ? void 0 : _options$hyphenation4.doNotHyphenateCaps) !== void 0) this.root.push(new OnOffElement(\"w:doNotHyphenateCaps\", options.hyphenation.doNotHyphenateCaps));\n\t\tif (options.evenAndOddHeaders !== void 0) this.root.push(new OnOffElement(\"w:evenAndOddHeaders\", options.evenAndOddHeaders));\n\t\tif (options.updateFields !== void 0) this.root.push(new OnOffElement(\"w:updateFields\", options.updateFields));\n\t\tthis.root.push(new Compatibility(_objectSpread2(_objectSpread2({}, (_options$compatibilit = options.compatibility) !== null && _options$compatibilit !== void 0 ? _options$compatibilit : {}), {}, { version: (_ref = (_options$compatibilit2 = (_options$compatibilit3 = options.compatibility) === null || _options$compatibilit3 === void 0 ? void 0 : _options$compatibilit3.version) !== null && _options$compatibilit2 !== void 0 ? _options$compatibilit2 : options.compatibilityModeVersion) !== null && _ref !== void 0 ? _ref : 15 })));\n\t}\n};\n// src/file/styles/style/components.ts\n/**\n* Style components module for WordprocessingML documents.\n*\n* Provides common elements used in style definitions.\n*\n* Reference: http://officeopenxml.com/WPstyleGenProps.php\n*\n* @module\n*/\n/**\n* Represents component attributes with a value.\n*\n* @internal\n*/\nvar ComponentAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { val: \"w:val\" });\n\t}\n};\n/**\n* Represents the name element of a style.\n*\n* This element specifies the display name of a style as shown in the user interface.\n*\n* Reference: http://officeopenxml.com/WPstyleGenProps.php\n*\n* @example\n* ```typescript\n* // Typically used internally by Style class\n* new Name(\"Heading 1\");\n* ```\n*/\nvar Name = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:name\");\n\t\tthis.root.push(new ComponentAttributes({ val: value }));\n\t}\n};\n/**\n* Represents the UI priority of a style.\n*\n* This element specifies the sort order priority for displaying the style in the user interface.\n* Lower numbers appear first in style lists.\n*\n* Reference: http://officeopenxml.com/WPstyleGenProps.php\n*\n* @example\n* ```typescript\n* // Typically used internally by Style class\n* new UiPriority(99);\n* ```\n*/\nvar UiPriority = class extends XmlComponent {\n\tconstructor(value) {\n\t\tsuper(\"w:uiPriority\");\n\t\tthis.root.push(new ComponentAttributes({ val: decimalNumber(value) }));\n\t}\n};\n// src/file/styles/style/style.ts\n/**\n* Style definition module for WordprocessingML documents.\n*\n* Provides base style functionality for paragraph and character styles.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* @module\n*/\n/**\n* Represents style attributes for XML serialization.\n*\n* @internal\n*/\nvar StyleAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\ttype: \"w:type\",\n\t\t\tstyleId: \"w:styleId\",\n\t\t\tdefault: \"w:default\",\n\t\t\tcustomStyle: \"w:customStyle\"\n\t\t});\n\t}\n};\n/**\n* Represents a base style definition in a WordprocessingML document.\n*\n* This is the base class for paragraph and character styles. It defines common\n* style properties such as name, inheritance (basedOn), UI priority, and visibility.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Style\">\n* <xsd:sequence>\n* <xsd:element name=\"name\" type=\"CT_String\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"aliases\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"basedOn\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"next\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"link\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"autoRedefine\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"hidden\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"uiPriority\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"semiHidden\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"unhideWhenUsed\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"qFormat\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"locked\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"personal\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"personalCompose\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"personalReply\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"rsid\" type=\"CT_LongHexNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"pPr\" type=\"CT_PPrGeneral\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"rPr\" type=\"CT_RPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblPr\" type=\"CT_TblPrBase\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"trPr\" type=\"CT_TrPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tcPr\" type=\"CT_TcPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"tblStylePr\" type=\"CT_TblStylePr\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"type\" type=\"ST_StyleType\" use=\"optional\"/>\n* <xsd:attribute name=\"styleId\" type=\"s:ST_String\" use=\"optional\"/>\n* <xsd:attribute name=\"default\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"customStyle\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // This is typically extended by StyleForParagraph or StyleForCharacter\n* // See those classes for usage examples\n* ```\n*/\nvar Style = class extends XmlComponent {\n\tconstructor(attributes, options) {\n\t\tsuper(\"w:style\");\n\t\tthis.root.push(new StyleAttributes(attributes));\n\t\tif (options.name) this.root.push(new Name(options.name));\n\t\tif (options.basedOn && options.basedOn !== attributes.styleId) this.root.push(new StringValueElement(\"w:basedOn\", options.basedOn));\n\t\tif (options.next) this.root.push(new StringValueElement(\"w:next\", options.next));\n\t\tif (options.link) this.root.push(new StringValueElement(\"w:link\", options.link));\n\t\tif (options.uiPriority !== void 0) this.root.push(new UiPriority(options.uiPriority));\n\t\tif (options.semiHidden !== void 0) this.root.push(new OnOffElement(\"w:semiHidden\", options.semiHidden));\n\t\tif (options.unhideWhenUsed !== void 0) this.root.push(new OnOffElement(\"w:unhideWhenUsed\", options.unhideWhenUsed));\n\t\tif (options.quickFormat !== void 0) this.root.push(new OnOffElement(\"w:qFormat\", options.quickFormat));\n\t}\n};\n// src/file/styles/style/paragraph-style.ts\n/**\n* Paragraph style module for WordprocessingML documents.\n*\n* Paragraph styles define formatting that applies to entire paragraphs.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* @module\n*/\n/**\n* Represents a paragraph style in a WordprocessingML document.\n*\n* Paragraph styles apply formatting to entire paragraphs, including both\n* paragraph-level properties (spacing, alignment, indentation) and\n* run-level properties (font, size, color) for text within the paragraph.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Style\">\n* <xsd:sequence>\n* <!-- Style elements including pPr for paragraph properties -->\n* <xsd:element name=\"pPr\" type=\"CT_PPrGeneral\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"rPr\" type=\"CT_RPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"type\" type=\"ST_StyleType\" use=\"optional\"/>\n* <xsd:attribute name=\"styleId\" type=\"s:ST_String\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a custom heading style\n* new StyleForParagraph({\n* id: \"CustomHeading\",\n* name: \"Custom Heading\",\n* basedOn: \"Normal\",\n* paragraph: {\n* spacing: { before: 240, after: 120 },\n* alignment: AlignmentType.LEFT\n* },\n* run: {\n* size: 28,\n* bold: true,\n* color: \"2E74B5\"\n* }\n* });\n* ```\n*/\nvar StyleForParagraph = class extends Style {\n\tconstructor(options) {\n\t\tsuper({\n\t\t\ttype: \"paragraph\",\n\t\t\tstyleId: options.id\n\t\t}, options);\n\t\t_defineProperty(this, \"paragraphProperties\", void 0);\n\t\t_defineProperty(this, \"runProperties\", void 0);\n\t\tthis.paragraphProperties = new ParagraphProperties(options.paragraph, {\n\t\t\timplicitListParagraphStyle: false,\n\t\t\tinListOrder: false\n\t\t});\n\t\tthis.runProperties = new RunProperties(options.run);\n\t\tthis.root.push(this.paragraphProperties);\n\t\tthis.root.push(this.runProperties);\n\t}\n};\n// src/file/styles/style/character-style.ts\n/**\n* Character style module for WordprocessingML documents.\n*\n* Character styles define formatting that applies to individual text runs.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* @module\n*/\n/**\n* Represents a character style in a WordprocessingML document.\n*\n* Character styles apply formatting to individual runs of text within a paragraph,\n* such as font, size, color, bold, italic, and other text-level formatting.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Style\">\n* <xsd:sequence>\n* <!-- Style elements including rPr for run properties -->\n* <xsd:element name=\"rPr\" type=\"CT_RPr\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"type\" type=\"ST_StyleType\" use=\"optional\"/>\n* <xsd:attribute name=\"styleId\" type=\"s:ST_String\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create a custom character style for highlighting\n* new StyleForCharacter({\n* id: \"Highlight\",\n* name: \"Highlight Text\",\n* basedOn: \"DefaultParagraphFont\",\n* run: {\n* color: \"FF0000\",\n* bold: true\n* }\n* });\n* ```\n*/\nvar StyleForCharacter = class extends Style {\n\tconstructor(options) {\n\t\tsuper({\n\t\t\ttype: \"character\",\n\t\t\tstyleId: options.id\n\t\t}, _objectSpread2({\n\t\t\tuiPriority: 99,\n\t\t\tunhideWhenUsed: true\n\t\t}, options));\n\t\t_defineProperty(this, \"runProperties\", void 0);\n\t\tthis.runProperties = new RunProperties(options.run);\n\t\tthis.root.push(this.runProperties);\n\t}\n};\n// src/file/styles/style/default-styles.ts\n/**\n* Default styles module for WordprocessingML documents.\n*\n* Provides pre-configured style classes for common document elements like headings,\n* hyperlinks, and footnotes.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* @module\n*/\n/**\n* Base class for heading styles.\n*\n* Provides common configuration for heading styles, including basedOn=\"Normal\"\n* and quickFormat enabled.\n*\n* @example\n* ```typescript\n* // Typically extended by specific heading classes\n* new HeadingStyle({\n* id: \"CustomHeading\",\n* name: \"Custom Heading\",\n* run: { bold: true, size: 28 }\n* });\n* ```\n*/\nvar HeadingStyle = class extends StyleForParagraph {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tbasedOn: \"Normal\",\n\t\t\tnext: \"Normal\",\n\t\t\tquickFormat: true\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Title paragraph style.\n*\n* Used for document titles with larger font size and emphasis.\n*\n* @example\n* ```typescript\n* new TitleStyle({\n* run: { size: 56, bold: true }\n* });\n* ```\n*/\nvar TitleStyle = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Title\",\n\t\t\tname: \"Title\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Heading 1 paragraph style.\n*\n* First-level heading style for major document sections.\n*\n* @example\n* ```typescript\n* new Heading1Style({\n* run: { size: 32, color: \"2E74B5\" }\n* });\n* ```\n*/\nvar Heading1Style = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Heading1\",\n\t\t\tname: \"Heading 1\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Heading 2 paragraph style.\n*\n* Second-level heading style for subsections.\n*/\nvar Heading2Style = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Heading2\",\n\t\t\tname: \"Heading 2\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Heading 3 paragraph style.\n*\n* Third-level heading style for sub-subsections.\n*/\nvar Heading3Style = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Heading3\",\n\t\t\tname: \"Heading 3\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Heading 4 paragraph style.\n*\n* Fourth-level heading style for nested sections.\n*/\nvar Heading4Style = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Heading4\",\n\t\t\tname: \"Heading 4\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Heading 5 paragraph style.\n*\n* Fifth-level heading style for deeply nested sections.\n*/\nvar Heading5Style = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Heading5\",\n\t\t\tname: \"Heading 5\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Heading 6 paragraph style.\n*\n* Sixth-level heading style for the deepest nested sections.\n*/\nvar Heading6Style = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Heading6\",\n\t\t\tname: \"Heading 6\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Strong paragraph style.\n*\n* Used for emphasizing important paragraphs with bold formatting.\n*/\nvar StrongStyle = class extends HeadingStyle {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Strong\",\n\t\t\tname: \"Strong\"\n\t\t}, options));\n\t}\n};\n/**\n* Represents the List Paragraph style.\n*\n* Used for paragraphs within numbered or bulleted lists.\n*/\nvar ListParagraph = class extends StyleForParagraph {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"ListParagraph\",\n\t\t\tname: \"List Paragraph\",\n\t\t\tbasedOn: \"Normal\",\n\t\t\tquickFormat: true\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Caption paragraph style.\n*\n* Word gives the captions it inserts (References > Insert Caption) the paragraph style named \"caption\", and this is that\n* style as Word writes it: small italic text in the theme's second dark color, with space after it.\n*/\nvar CaptionStyle = class extends StyleForParagraph {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Caption\",\n\t\t\tname: \"caption\",\n\t\t\tbasedOn: \"Normal\",\n\t\t\tnext: \"Normal\",\n\t\t\tuiPriority: 35,\n\t\t\tsemiHidden: true,\n\t\t\tunhideWhenUsed: true,\n\t\t\tquickFormat: true,\n\t\t\tparagraph: { spacing: { after: 200 } },\n\t\t\trun: {\n\t\t\t\titalics: true,\n\t\t\t\tcolor: { theme: \"dark2\" },\n\t\t\t\tsize: 18\n\t\t\t}\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Bibliography paragraph style.\n*\n* Word gives the paragraphs of the bibliographies it writes (References > Bibliography) the paragraph style named\n* \"Bibliography\", and this is that style as Word writes it. It has no formatting of its own: each style of citation,\n* such as APA, indents the paragraphs of its bibliography itself.\n*/\nvar BibliographyStyle = class extends StyleForParagraph {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Bibliography\",\n\t\t\tname: \"Bibliography\",\n\t\t\tbasedOn: \"Normal\",\n\t\t\tnext: \"Normal\",\n\t\t\tuiPriority: 37,\n\t\t\tunhideWhenUsed: true\n\t\t}, options));\n\t}\n};\nvar tableOfContentsStyles = /* @__PURE__ */ new WeakSet();\n/**\n* Whether a formatted style is one of docx's TOC 1 to TOC 9 styles, which a style with its name replaces, such as one in\n* a template saved by Word in another language, with an id of its own.\n*/\nvar isDefaultTableOfContentsStyle = (style) => tableOfContentsStyles.has(style);\n/**\n* Represents a TOC 1 to TOC 9 paragraph style, the style of the entries at a level of a table of contents.\n*\n* Word gives the entries it writes the paragraph styles named \"toc 1\" to \"toc 9\", and adds the styles when the\n* document doesn't have them: with 5 points of space after, and each level indented by the size of the Normal style's\n* font more than the level above. Without them, LibreOffice indents no level once it updates the table. Like Word's,\n* they are hidden until they are used.\n*/\nvar TableOfContentsStyle = class extends StyleForParagraph {\n\t/**\n\t* @param level - The level of the entries, 1 to 9\n\t* @param levelIndent - How much more each level is indented than the level above, in twips\n\t*/\n\tconstructor(level, levelIndent) {\n\t\tsuper({\n\t\t\tid: `TOC${level}`,\n\t\t\tname: `toc ${level}`,\n\t\t\tbasedOn: \"Normal\",\n\t\t\tnext: \"Normal\",\n\t\t\tuiPriority: 39,\n\t\t\tsemiHidden: true,\n\t\t\tunhideWhenUsed: true,\n\t\t\tparagraph: _objectSpread2({ spacing: { after: 100 } }, level > 1 ? { indent: { left: (level - 1) * levelIndent } } : {})\n\t\t});\n\t}\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\ttableOfContentsStyles.add(xml);\n\t\treturn xml;\n\t}\n};\n/**\n* Represents the Footnote Text paragraph style.\n*\n* Used for the text content of footnotes with smaller font size and tighter spacing.\n*/\nvar FootnoteText = class extends StyleForParagraph {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"FootnoteText\",\n\t\t\tname: \"footnote text\",\n\t\t\tlink: \"FootnoteTextChar\",\n\t\t\tbasedOn: \"Normal\",\n\t\t\tuiPriority: 99,\n\t\t\tsemiHidden: true,\n\t\t\tunhideWhenUsed: true,\n\t\t\tparagraph: { spacing: {\n\t\t\t\tafter: 0,\n\t\t\t\tline: 240,\n\t\t\t\tlineRule: LineRuleType.AUTO\n\t\t\t} },\n\t\t\trun: { size: 20 }\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Footnote Reference character style.\n*\n* Used for footnote reference numbers in the main text, displayed as superscript.\n*/\nvar FootnoteReferenceStyle = class extends StyleForCharacter {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"FootnoteReference\",\n\t\t\tname: \"footnote reference\",\n\t\t\tbasedOn: \"DefaultParagraphFont\",\n\t\t\tsemiHidden: true,\n\t\t\trun: { superScript: true }\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Footnote Text Char character style.\n*\n* Character style linked to FootnoteText paragraph style for consistent formatting.\n*/\nvar FootnoteTextChar = class extends StyleForCharacter {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"FootnoteTextChar\",\n\t\t\tname: \"Footnote Text Char\",\n\t\t\tbasedOn: \"DefaultParagraphFont\",\n\t\t\tlink: \"FootnoteText\",\n\t\t\tsemiHidden: true,\n\t\t\trun: { size: 20 }\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Endnote Text paragraph style.\n*\n* Used for the text content of endnotes with smaller font size and tighter spacing.\n*/\nvar EndnoteText = class extends StyleForParagraph {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"EndnoteText\",\n\t\t\tname: \"endnote text\",\n\t\t\tlink: \"EndnoteTextChar\",\n\t\t\tbasedOn: \"Normal\",\n\t\t\tuiPriority: 99,\n\t\t\tsemiHidden: true,\n\t\t\tunhideWhenUsed: true,\n\t\t\tparagraph: { spacing: {\n\t\t\t\tafter: 0,\n\t\t\t\tline: 240,\n\t\t\t\tlineRule: LineRuleType.AUTO\n\t\t\t} },\n\t\t\trun: { size: 20 }\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Endnote Reference character style.\n*\n* Used for endnote reference numbers in the main text, displayed as superscript.\n*/\nvar EndnoteReferenceStyle = class extends StyleForCharacter {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"EndnoteReference\",\n\t\t\tname: \"endnote reference\",\n\t\t\tbasedOn: \"DefaultParagraphFont\",\n\t\t\tsemiHidden: true,\n\t\t\trun: { superScript: true }\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Endnote Text Char character style.\n*\n* Character style linked to EndnoteText paragraph style for consistent formatting.\n*/\nvar EndnoteTextChar = class extends StyleForCharacter {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"EndnoteTextChar\",\n\t\t\tname: \"Endnote Text Char\",\n\t\t\tbasedOn: \"DefaultParagraphFont\",\n\t\t\tlink: \"EndnoteText\",\n\t\t\tsemiHidden: true,\n\t\t\trun: { size: 20 }\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Hyperlink character style.\n*\n* Used for hyperlinks with blue color and single underline formatting.\n*/\nvar HyperlinkStyle = class extends StyleForCharacter {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"Hyperlink\",\n\t\t\tname: \"Hyperlink\",\n\t\t\tbasedOn: \"DefaultParagraphFont\",\n\t\t\trun: {\n\t\t\t\tcolor: \"0563C1\",\n\t\t\t\tunderline: { type: UnderlineType.SINGLE }\n\t\t\t}\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Line Number character style.\n*\n* Word draws a section's line numbers in the character style named \"line number\", whatever its id, so this style\n* formats them. Like Word's, it has no formatting of its own, so line numbers take the document defaults.\n*/\nvar LineNumberStyle = class extends StyleForCharacter {\n\tconstructor(options) {\n\t\tsuper(_objectSpread2({\n\t\t\tid: \"LineNumber\",\n\t\t\tname: \"line number\",\n\t\t\tbasedOn: \"DefaultParagraphFont\",\n\t\t\tsemiHidden: true\n\t\t}, options));\n\t}\n};\n/**\n* Represents the Normal Table style, the default style of tables.\n*\n* It gives cells the margins Word gives the tables it makes: 108 twips (0.075 inches) on the left and right. Without a\n* default table style, Word gives cells no margins, so their text touches the borders, where LibreOffice and other\n* applications use these margins.\n*/\nvar NormalTableStyle = class extends Style {\n\tconstructor() {\n\t\tsuper({\n\t\t\ttype: \"table\",\n\t\t\tstyleId: \"TableNormal\",\n\t\t\tdefault: true\n\t\t}, {\n\t\t\tname: \"Normal Table\",\n\t\t\tuiPriority: 99,\n\t\t\tsemiHidden: true,\n\t\t\tunhideWhenUsed: true\n\t\t});\n\t\tthis.root.push(new TableProperties({\n\t\t\tindent: {\n\t\t\t\tsize: 0,\n\t\t\t\ttype: WidthType.DXA\n\t\t\t},\n\t\t\tcellMargin: {\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 108,\n\t\t\t\tbottom: 0,\n\t\t\t\tright: 108\n\t\t\t}\n\t\t}));\n\t}\n};\n// src/file/styles/styles.ts\n/** The name of a formatted element, such as `w:style`, or `_attr` for its parent's attributes */\nvar nameOf$1 = (child) => typeof child === \"object\" ? Object.keys(child)[0] : void 0;\n/** The attributes of a formatted `w:style` */\nvar attributesOf = (style) => {\n\tvar _flat$find;\n\treturn (_flat$find = [style[\"w:style\"]].flat().find((part) => part._attr)) === null || _flat$find === void 0 ? void 0 : _flat$find._attr;\n};\n/** The id of a formatted `w:style` */\nvar styleIdOf = (style) => {\n\tvar _attributesOf;\n\treturn (_attributesOf = attributesOf(style)) === null || _attributesOf === void 0 ? void 0 : _attributesOf[\"w:styleId\"];\n};\n/** The name of a formatted `w:style`, in lower case, as Word compares the names of its built-in styles */\nvar styleNameOf = (style) => {\n\tvar _flat$find2;\n\tconst name = (_flat$find2 = [style[\"w:style\"]].flat().find((part) => nameOf$1(part) === \"w:name\")) === null || _flat$find2 === void 0 || (_flat$find2 = _flat$find2[\"w:name\"]) === null || _flat$find2 === void 0 || (_flat$find2 = _flat$find2._attr) === null || _flat$find2 === void 0 ? void 0 : _flat$find2[\"w:val\"];\n\treturn name === void 0 ? void 0 : String(name).toLowerCase();\n};\n/** Whether a formatted element is a paragraph style, as a `w:style` is when its type isn't given */\nvar isParagraphStyle = (child) => {\n\tvar _attributesOf$wType, _attributesOf2;\n\treturn nameOf$1(child) === \"w:style\" && ((_attributesOf$wType = (_attributesOf2 = attributesOf(child)) === null || _attributesOf2 === void 0 ? void 0 : _attributesOf2[\"w:type\"]) !== null && _attributesOf$wType !== void 0 ? _attributesOf$wType : \"paragraph\") === \"paragraph\";\n};\n/** Whether a formatted element is a paragraph style marked as the default for paragraphs */\nvar isDefaultParagraphStyle = (child) => {\n\tconst attributes = isParagraphStyle(child) ? attributesOf(child) : void 0;\n\treturn (attributes === null || attributes === void 0 ? void 0 : attributes[\"w:default\"]) !== void 0 && ![\n\t\t\"0\",\n\t\t\"false\",\n\t\t\"off\"\n\t].includes(String(attributes[\"w:default\"]));\n};\n/** A formatted `w:style`, marked as the default for its type */\nvar markedAsDefault = (style) => ({ \"w:style\": [style[\"w:style\"]].flat().map((part) => part._attr ? { _attr: _objectSpread2(_objectSpread2({}, part._attr), {}, { \"w:default\": \"1\" }) } : part) });\n/**\n* Represents the styles definitions in a WordprocessingML document.\n*\n* The styles element contains document defaults, latent styles, and\n* individual style definitions for paragraphs and characters. Styles provide\n* a way to define consistent formatting across a document.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Styles\">\n* <xsd:sequence>\n* <xsd:element name=\"docDefaults\" type=\"CT_DocDefaults\" minOccurs=\"0\"/>\n* <xsd:element name=\"latentStyles\" type=\"CT_LatentStyles\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"style\" type=\"CT_Style\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create styles with custom paragraph and character styles\n* new Styles({\n* paragraphStyles: [{\n* id: \"CustomHeading\",\n* name: \"Custom Heading\",\n* basedOn: \"Normal\",\n* run: { bold: true, size: 28 }\n* }],\n* characterStyles: [{\n* id: \"Highlight\",\n* name: \"Highlight\",\n* run: { color: \"FF0000\" }\n* }]\n* });\n* ```\n*/\nvar Styles = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:styles\");\n\t\tif (options.initialStyles) this.root.push(options.initialStyles);\n\t\tif (options.importedStyles) for (const style of options.importedStyles) this.root.push(style);\n\t\tif (options.paragraphStyles) for (const style of options.paragraphStyles) this.root.push(new StyleForParagraph(style));\n\t\tif (options.characterStyles) for (const style of options.characterStyles) this.root.push(new StyleForCharacter(style));\n\t}\n\t/**\n\t* Writes the styles in the schema's order: the document defaults, the latent styles, then the styles. A style id\n\t* can only be used once, so a style replaces an earlier one with its id. That way external styles replace docx's\n\t* default styles, and paragraph and character styles replace the default and imported ones. docx's TOC 1 to TOC 9\n\t* styles are also replaced by a paragraph style with their name, such as a template's in another language, with an id\n\t* of its own. Of several document defaults, or several latent styles, the last is kept. Normal is marked as the\n\t* default paragraph style when no style is.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\tconst children = xml[\"w:styles\"];\n\t\tif (!Array.isArray(children)) return xml;\n\t\tconst named = (name) => children.filter((child) => nameOf$1(child) === name);\n\t\tconst ids = children.map((child) => nameOf$1(child) === \"w:style\" ? styleIdOf(child) : void 0);\n\t\tconst unique = children.filter((child, index) => ![\n\t\t\t\"_attr\",\n\t\t\t\"w:docDefaults\",\n\t\t\t\"w:latentStyles\"\n\t\t].includes(nameOf$1(child)) && (ids[index] === void 0 || ids.lastIndexOf(ids[index]) === index));\n\t\tconst otherNames = new Set(unique.filter((child) => isParagraphStyle(child) && !isDefaultTableOfContentsStyle(child)).map(styleNameOf));\n\t\tconst kept = unique.filter((child) => !isDefaultTableOfContentsStyle(child) || !otherNames.has(styleNameOf(child)));\n\t\tconst styles = kept.some(isDefaultParagraphStyle) ? kept : kept.map((child) => isParagraphStyle(child) && styleIdOf(child) === \"Normal\" ? markedAsDefault(child) : child);\n\t\treturn { \"w:styles\": [\n\t\t\t...named(\"_attr\"),\n\t\t\t...named(\"w:docDefaults\").slice(-1),\n\t\t\t...named(\"w:latentStyles\").slice(-1),\n\t\t\t...styles\n\t\t] };\n\t}\n};\n// src/file/styles/defaults/paragraph-properties.ts\n/**\n* Represents default paragraph properties in a WordprocessingML document.\n*\n* This element defines the default paragraph formatting properties that apply\n* to all paragraphs in the document unless overridden.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_PPrDefault\">\n* <xsd:sequence>\n* <xsd:element name=\"pPr\" type=\"CT_PPrGeneral\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Set default paragraph spacing\n* new ParagraphPropertiesDefaults({\n* spacing: { after: 200, line: 276 }\n* });\n* ```\n*/\nvar ParagraphPropertiesDefaults = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:pPrDefault\");\n\t\tthis.root.push(new ParagraphProperties(options, {\n\t\t\timplicitListParagraphStyle: false,\n\t\t\tinListOrder: false\n\t\t}));\n\t}\n};\n// src/file/styles/defaults/run-properties.ts\n/**\n* Represents default run properties in a WordprocessingML document.\n*\n* This element defines the default text run formatting properties that apply\n* to all text runs in the document unless overridden by styles or direct formatting.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_RPrDefault\">\n* <xsd:sequence>\n* <xsd:element name=\"rPr\" type=\"CT_RPr\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Set default font and size\n* new RunPropertiesDefaults({\n* font: \"Calibri\",\n* size: 22\n* });\n* ```\n*/\nvar RunPropertiesDefaults = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:rPrDefault\");\n\t\tthis.root.push(new RunProperties(options));\n\t}\n};\n// src/file/styles/defaults/document-defaults.ts\n/**\n* Represents document-wide default formatting in a WordprocessingML document.\n*\n* Document defaults define the base formatting properties that apply to all\n* paragraphs and runs in a document unless overridden by a style or direct formatting.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_DocDefaults\">\n* <xsd:sequence>\n* <xsd:element name=\"rPrDefault\" type=\"CT_RPrDefault\" minOccurs=\"0\"/>\n* <xsd:element name=\"pPrDefault\" type=\"CT_PPrDefault\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Set default font and spacing for the document\n* new DocumentDefaults({\n* run: {\n* font: \"Calibri\",\n* size: 22\n* },\n* paragraph: {\n* spacing: { after: 200, line: 276 }\n* }\n* });\n* ```\n*/\nvar DocumentDefaults = class extends XmlComponent {\n\tconstructor(options) {\n\t\tsuper(\"w:docDefaults\");\n\t\t_defineProperty(this, \"runPropertiesDefaults\", void 0);\n\t\t_defineProperty(this, \"paragraphPropertiesDefaults\", void 0);\n\t\tthis.runPropertiesDefaults = new RunPropertiesDefaults(options.run);\n\t\tthis.paragraphPropertiesDefaults = new ParagraphPropertiesDefaults(options.paragraph);\n\t\tthis.root.push(this.runPropertiesDefaults);\n\t\tthis.root.push(this.paragraphPropertiesDefaults);\n\t}\n};\n// src/file/styles/external-styles-factory.ts\n/**\n* External styles factory module for WordprocessingML documents.\n*\n* Provides functionality to import and parse styles from external XML sources.\n*\n* Reference: http://officeopenxml.com/WPstyles.php\n*\n* @module\n*/\n/**\n* Factory for creating styles from external XML sources.\n*\n* This factory parses styles from XML (typically from a styles.xml file)\n* and converts them into Styles components that can be used in the document.\n*\n* @example\n* ```typescript\n* // Import styles from an external styles.xml file\n* const factory = new ExternalStylesFactory();\n* const xmlData = '<?xml version=\"1.0\"?><w:styles>...</w:styles>';\n* const styles = factory.newInstance(xmlData);\n* ```\n*/\nvar ExternalStylesFactory = class {\n\t/**\n\t* Creates new Styles based on the given XML data.\n\t*\n\t* Parses the styles XML and converts them to XmlComponent instances.\n\t*\n\t* Example content from styles.xml:\n\t* ```xml\n\t* <?xml version=\"1.0\"?>\n\t* <w:styles xmlns:mc=\"some schema\" ...>\n\t* <w:style w:type=\"paragraph\" w:styleId=\"Heading1\">\n\t* <w:name w:val=\"heading 1\"/>\n\t* ...\n\t* </w:style>\n\t* <w:style w:type=\"paragraph\" w:styleId=\"Heading2\">\n\t* <w:name w:val=\"heading 2\"/>\n\t* ...\n\t* </w:style>\n\t* <w:docDefaults>...</w:docDefaults>\n\t* </w:styles>\n\t* ```\n\t*\n\t* @param xmlData - XML string containing styles data from styles.xml\n\t* @returns Styles object containing all parsed styles\n\t* @throws Error if styles element cannot be found in the XML\n\t*/\n\tnewInstance(xmlData) {\n\t\tconst xmlObj = parseXml(xmlData);\n\t\tlet stylesXmlElement;\n\t\tfor (const xmlElm of xmlObj.elements || []) if (xmlElm.name === \"w:styles\") stylesXmlElement = xmlElm;\n\t\tif (stylesXmlElement === void 0) throw new Error(\"can not find styles element\");\n\t\tconst stylesElements = stylesXmlElement.elements || [];\n\t\treturn {\n\t\t\tinitialStyles: new ImportedRootElementAttributes(stylesXmlElement.attributes),\n\t\t\timportedStyles: stylesElements.map((childElm) => convertToXmlComponent(childElm))\n\t\t};\n\t}\n};\n// src/file/styles/factory.ts\n/**\n* How much more Word indents each level of a table of contents than the level above, in twips: the size of the Normal\n* style's font. docx's Normal has no formatting, so that is the document's default size, or 10 points without one.\n*/\nvar tableOfContentsLevelIndentOf = (options) => {\n\tvar _options$document;\n\tconst size = (_options$document = options.document) === null || _options$document === void 0 || (_options$document = _options$document.run) === null || _options$document === void 0 ? void 0 : _options$document.size;\n\tif (size === void 0) return 200;\n\treturn Math.round(typeof size === \"number\" ? size * 10 : universalMeasureToTwips(size));\n};\n/** The styles of the entries at each level of a table of contents, as Word adds them */\nvar createTableOfContentsStyles = (levelIndent) => ({\n\ttableOfContents1: new TableOfContentsStyle(1, levelIndent),\n\ttableOfContents2: new TableOfContentsStyle(2, levelIndent),\n\ttableOfContents3: new TableOfContentsStyle(3, levelIndent),\n\ttableOfContents4: new TableOfContentsStyle(4, levelIndent),\n\ttableOfContents5: new TableOfContentsStyle(5, levelIndent),\n\ttableOfContents6: new TableOfContentsStyle(6, levelIndent),\n\ttableOfContents7: new TableOfContentsStyle(7, levelIndent),\n\ttableOfContents8: new TableOfContentsStyle(8, levelIndent),\n\ttableOfContents9: new TableOfContentsStyle(9, levelIndent)\n});\n/**\n* docx's default styles, each under the option of `styles.default` that configures it, and Normal, the default table\n* style and the TOC 1 to TOC 9 styles.\n*\n* @internal\n*/\nvar createDefaultStyles = (options = {}) => {\n\tvar _options$document2;\n\treturn _objectSpread2(_objectSpread2({\n\t\tnormal: new StyleForParagraph({\n\t\t\tid: \"Normal\",\n\t\t\tname: \"Normal\",\n\t\t\tquickFormat: true\n\t\t}),\n\t\tnormalTable: new NormalTableStyle(),\n\t\tdocument: new DocumentDefaults((_options$document2 = options.document) !== null && _options$document2 !== void 0 ? _options$document2 : {}),\n\t\ttitle: new TitleStyle(_objectSpread2({ run: { size: 56 } }, options.title)),\n\t\theading1: new Heading1Style(_objectSpread2({ run: {\n\t\t\tcolor: \"2E74B5\",\n\t\t\tsize: 32\n\t\t} }, options.heading1)),\n\t\theading2: new Heading2Style(_objectSpread2({ run: {\n\t\t\tcolor: \"2E74B5\",\n\t\t\tsize: 26\n\t\t} }, options.heading2)),\n\t\theading3: new Heading3Style(_objectSpread2({ run: {\n\t\t\tcolor: \"1F4D78\",\n\t\t\tsize: 24\n\t\t} }, options.heading3)),\n\t\theading4: new Heading4Style(_objectSpread2({ run: {\n\t\t\tcolor: \"2E74B5\",\n\t\t\titalics: true\n\t\t} }, options.heading4)),\n\t\theading5: new Heading5Style(_objectSpread2({ run: { color: \"2E74B5\" } }, options.heading5)),\n\t\theading6: new Heading6Style(_objectSpread2({ run: { color: \"1F4D78\" } }, options.heading6)),\n\t\tstrong: new StrongStyle(_objectSpread2({ run: { bold: true } }, options.strong)),\n\t\tlistParagraph: new ListParagraph(options.listParagraph || {}),\n\t\tcaption: new CaptionStyle(options.caption || {}),\n\t\tbibliography: new BibliographyStyle(options.bibliography || {})\n\t}, createTableOfContentsStyles(tableOfContentsLevelIndentOf(options))), {}, {\n\t\thyperlink: new HyperlinkStyle(options.hyperlink || {}),\n\t\tfootnoteReference: new FootnoteReferenceStyle(options.footnoteReference || {}),\n\t\tfootnoteText: new FootnoteText(options.footnoteText || {}),\n\t\tfootnoteTextChar: new FootnoteTextChar(options.footnoteTextChar || {}),\n\t\tendnoteReference: new EndnoteReferenceStyle(options.endnoteReference || {}),\n\t\tendnoteText: new EndnoteText(options.endnoteText || {}),\n\t\tendnoteTextChar: new EndnoteTextChar(options.endnoteTextChar || {}),\n\t\tlineNumber: new LineNumberStyle(options.lineNumber || {})\n\t});\n};\n/**\n* Factory for creating default document styles.\n*\n* This factory creates a complete set of default styles for common document elements\n* such as headings, hyperlinks, and footnotes with sensible default formatting.\n*\n* @example\n* ```typescript\n* // Create default styles with custom heading colors\n* const factory = new DefaultStylesFactory();\n* const styles = factory.newInstance({\n* heading1: {\n* run: { color: \"FF0000\", size: 32 }\n* },\n* heading2: {\n* run: { color: \"00FF00\", size: 26 }\n* }\n* });\n* ```\n*/\nvar DefaultStylesFactory = class {\n\tnewInstance(options = {}) {\n\t\treturn {\n\t\t\tinitialStyles: new DocumentAttributes([\n\t\t\t\t\"mc\",\n\t\t\t\t\"r\",\n\t\t\t\t\"w\",\n\t\t\t\t\"w14\",\n\t\t\t\t\"w15\"\n\t\t\t], \"w14 w15\"),\n\t\t\timportedStyles: Object.values(createDefaultStyles(options))\n\t\t};\n\t}\n};\n// src/file/theme/font-scheme.ts\n/**\n* Font scheme module for DrawingML themes.\n*\n* The two fonts of a document's theme: one for headings and one for body text. Styles and text that use a theme font\n* change when the theme's fonts change.\n*\n* Reference: http://officeopenxml.com/drwTheme.php\n*\n* @module\n*/\nvar OFFICE_FONTS = {\n\theadings: {\n\t\tlatin: \"Calibri Light\",\n\t\tpanose: \"020F0302020204030204\"\n\t},\n\tbody: {\n\t\tlatin: \"Calibri\",\n\t\tpanose: \"020F0502020204030204\"\n\t}\n};\nvar OFFICE_SCRIPT_FONTS = [\n\t[\n\t\t\"Jpan\",\n\t\t\"游ゴシック Light\",\n\t\t\"游明朝\"\n\t],\n\t[\"Hang\", \"맑은 고딕\"],\n\t[\n\t\t\"Hans\",\n\t\t\"等线 Light\",\n\t\t\"等线\"\n\t],\n\t[\"Hant\", \"新細明體\"],\n\t[\n\t\t\"Arab\",\n\t\t\"Times New Roman\",\n\t\t\"Arial\"\n\t],\n\t[\n\t\t\"Hebr\",\n\t\t\"Times New Roman\",\n\t\t\"Arial\"\n\t],\n\t[\n\t\t\"Thai\",\n\t\t\"Angsana New\",\n\t\t\"Cordia New\"\n\t],\n\t[\"Ethi\", \"Nyala\"],\n\t[\"Beng\", \"Vrinda\"],\n\t[\"Gujr\", \"Shruti\"],\n\t[\n\t\t\"Khmr\",\n\t\t\"MoolBoran\",\n\t\t\"DaunPenh\"\n\t],\n\t[\"Knda\", \"Tunga\"],\n\t[\"Guru\", \"Raavi\"],\n\t[\"Cans\", \"Euphemia\"],\n\t[\"Cher\", \"Plantagenet Cherokee\"],\n\t[\"Yiii\", \"Microsoft Yi Baiti\"],\n\t[\"Tibt\", \"Microsoft Himalaya\"],\n\t[\"Thaa\", \"MV Boli\"],\n\t[\"Deva\", \"Mangal\"],\n\t[\"Telu\", \"Gautami\"],\n\t[\"Taml\", \"Latha\"],\n\t[\"Syrc\", \"Estrangelo Edessa\"],\n\t[\"Orya\", \"Kalinga\"],\n\t[\"Mlym\", \"Kartika\"],\n\t[\"Laoo\", \"DokChampa\"],\n\t[\"Sinh\", \"Iskoola Pota\"],\n\t[\"Mong\", \"Mongolian Baiti\"],\n\t[\n\t\t\"Viet\",\n\t\t\"Times New Roman\",\n\t\t\"Arial\"\n\t],\n\t[\"Uigh\", \"Microsoft Uighur\"],\n\t[\"Geor\", \"Sylfaen\"],\n\t[\"Armn\", \"Arial\"],\n\t[\"Bugi\", \"Leelawadee UI\"],\n\t[\"Bopo\", \"Microsoft JhengHei\"],\n\t[\"Java\", \"Javanese Text\"],\n\t[\"Lisu\", \"Segoe UI\"],\n\t[\"Mymr\", \"Myanmar Text\"],\n\t[\"Nkoo\", \"Ebrima\"],\n\t[\"Olck\", \"Nirmala UI\"],\n\t[\"Osma\", \"Ebrima\"],\n\t[\"Phag\", \"Phagspa\"],\n\t[\"Syrn\", \"Estrangelo Edessa\"],\n\t[\"Syrj\", \"Estrangelo Edessa\"],\n\t[\"Syre\", \"Estrangelo Edessa\"],\n\t[\"Sora\", \"Nirmala UI\"],\n\t[\"Tale\", \"Microsoft Tai Le\"],\n\t[\"Talu\", \"Microsoft New Tai Lue\"],\n\t[\"Tfng\", \"Ebrima\"]\n];\nvar createTextFont = (name, typeface, panose) => new BuilderElement({\n\tname,\n\tattributes: {\n\t\ttypeface: {\n\t\t\tkey: \"typeface\",\n\t\t\tvalue: typeface\n\t\t},\n\t\tpanose: {\n\t\t\tkey: \"panose\",\n\t\t\tvalue: panose\n\t\t}\n\t}\n});\n/**\n* The Latin font of one of a theme's fonts, as given or as Office's.\n*/\nvar themeLatinFont = (use, fonts) => {\n\tconst font = fonts[use];\n\tconst latin = typeof font === \"string\" ? font : font === null || font === void 0 ? void 0 : font.latin;\n\treturn latin !== null && latin !== void 0 ? latin : OFFICE_FONTS[use].latin;\n};\n/**\n* The font for each script of one of a theme's fonts: Office's, in Office's order, with those given in their place, and\n* then the scripts Office has no font for, in the order given.\n*/\nvar themeScriptFonts = (use, scripts = {}) => {\n\tconst office = OFFICE_SCRIPT_FONTS.map(([script, headings, body = headings]) => {\n\t\tvar _scripts$script;\n\t\treturn [script, (_scripts$script = scripts[script]) !== null && _scripts$script !== void 0 ? _scripts$script : use === \"headings\" ? headings : body];\n\t});\n\tconst officeScripts = new Set(office.map(([script]) => script));\n\treturn [...office, ...Object.entries(scripts).filter(([script]) => !officeScripts.has(script))];\n};\nvar createFontCollection = (use, fonts) => {\n\tconst font = fonts[use];\n\tconst { eastAsia = \"\", complexScript = \"\", scripts } = typeof font === \"object\" ? font : {};\n\tconst latin = themeLatinFont(use, fonts);\n\tconst office = OFFICE_FONTS[use];\n\treturn new BuilderElement({\n\t\tname: use === \"headings\" ? \"a:majorFont\" : \"a:minorFont\",\n\t\tchildren: [\n\t\t\tcreateTextFont(\"a:latin\", latin, latin === office.latin ? office.panose : void 0),\n\t\t\tcreateTextFont(\"a:ea\", eastAsia),\n\t\t\tcreateTextFont(\"a:cs\", complexScript),\n\t\t\t...themeScriptFonts(use, scripts).map(([script, typeface]) => new BuilderElement({\n\t\t\t\tname: \"a:font\",\n\t\t\t\tattributes: {\n\t\t\t\t\tscript: {\n\t\t\t\t\t\tkey: \"script\",\n\t\t\t\t\t\tvalue: script\n\t\t\t\t\t},\n\t\t\t\t\ttypeface: {\n\t\t\t\t\t\tkey: \"typeface\",\n\t\t\t\t\t\tvalue: typeface\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}))\n\t\t]\n\t});\n};\n/**\n* Creates a theme's font scheme, with Office's fonts in place of those not given.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FontScheme\">\n* <xsd:sequence>\n* <xsd:element name=\"majorFont\" type=\"CT_FontCollection\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"minorFont\" type=\"CT_FontCollection\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\"/>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_FontCollection\">\n* <xsd:sequence>\n* <xsd:element name=\"latin\" type=\"CT_TextFont\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"ea\" type=\"CT_TextFont\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"cs\" type=\"CT_TextFont\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"font\" type=\"CT_SupplementalFont\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*/\nvar createFontScheme = (name, fonts = {}) => new BuilderElement({\n\tname: \"a:fontScheme\",\n\tattributes: { name: {\n\t\tkey: \"name\",\n\t\tvalue: name\n\t} },\n\tchildren: [createFontCollection(\"headings\", fonts), createFontCollection(\"body\", fonts)]\n});\n// src/file/theme/format-scheme.ts\n/**\n* Format scheme module for DrawingML themes.\n*\n* The fills, lines and effects that shapes styled by the theme use, as Office's theme has them.\n*\n* Reference: http://officeopenxml.com/drwTheme.php\n*\n* @module\n*/\n/**\n* The color a style is used with (`phClr`), changed by each of `changes` in turn.\n*/\nvar createStyleColor = (changes = []) => new BuilderElement({\n\tname: \"a:schemeClr\",\n\tattributes: { value: {\n\t\tkey: \"val\",\n\t\tvalue: \"phClr\"\n\t} },\n\tchildren: changes.map(([name, value]) => new BuilderElement({\n\t\tname: `a:${name}`,\n\t\tattributes: { value: {\n\t\t\tkey: \"val\",\n\t\t\tvalue\n\t\t} }\n\t}))\n});\nvar createSolidFill = (changes) => new BuilderElement({\n\tname: \"a:solidFill\",\n\tchildren: [createStyleColor(changes)]\n});\n/**\n* A gradient from top to bottom, with a stop at the start, the middle and the end.\n*/\nvar createGradientFill = (stops) => new BuilderElement({\n\tname: \"a:gradFill\",\n\tattributes: { rotateWithShape: {\n\t\tkey: \"rotWithShape\",\n\t\tvalue: true\n\t} },\n\tchildren: [new BuilderElement({\n\t\tname: \"a:gsLst\",\n\t\tchildren: stops.map((changes, index) => new BuilderElement({\n\t\t\tname: \"a:gs\",\n\t\t\tattributes: { position: {\n\t\t\t\tkey: \"pos\",\n\t\t\t\tvalue: index * 5e4\n\t\t\t} },\n\t\t\tchildren: [createStyleColor(changes)]\n\t\t}))\n\t}), new BuilderElement({\n\t\tname: \"a:lin\",\n\t\tattributes: {\n\t\t\tangle: {\n\t\t\t\tkey: \"ang\",\n\t\t\t\tvalue: 54e5\n\t\t\t},\n\t\t\tscaled: {\n\t\t\t\tkey: \"scaled\",\n\t\t\t\tvalue: false\n\t\t\t}\n\t\t}\n\t})]\n});\n/**\n* A solid line of the given width in EMUs.\n*/\nvar createLine = (width) => new BuilderElement({\n\tname: \"a:ln\",\n\tattributes: {\n\t\twidth: {\n\t\t\tkey: \"w\",\n\t\t\tvalue: width\n\t\t},\n\t\tcap: {\n\t\t\tkey: \"cap\",\n\t\t\tvalue: \"flat\"\n\t\t},\n\t\tcompound: {\n\t\t\tkey: \"cmpd\",\n\t\t\tvalue: \"sng\"\n\t\t},\n\t\talignment: {\n\t\t\tkey: \"algn\",\n\t\t\tvalue: \"ctr\"\n\t\t}\n\t},\n\tchildren: [\n\t\tcreateSolidFill(),\n\t\tnew BuilderElement({\n\t\t\tname: \"a:prstDash\",\n\t\t\tattributes: { value: {\n\t\t\t\tkey: \"val\",\n\t\t\t\tvalue: \"solid\"\n\t\t\t} }\n\t\t}),\n\t\tnew BuilderElement({\n\t\t\tname: \"a:miter\",\n\t\t\tattributes: { limit: {\n\t\t\t\tkey: \"lim\",\n\t\t\t\tvalue: 8e5\n\t\t\t} }\n\t\t})\n\t]\n});\nvar createEffectStyle = (effects) => new BuilderElement({\n\tname: \"a:effectStyle\",\n\tchildren: [new BuilderElement({\n\t\tname: \"a:effectLst\",\n\t\tchildren: effects\n\t})]\n});\nvar createShadow = () => new BuilderElement({\n\tname: \"a:outerShdw\",\n\tattributes: {\n\t\tblurRadius: {\n\t\t\tkey: \"blurRad\",\n\t\t\tvalue: 57150\n\t\t},\n\t\tdistance: {\n\t\t\tkey: \"dist\",\n\t\t\tvalue: 19050\n\t\t},\n\t\tdirection: {\n\t\t\tkey: \"dir\",\n\t\t\tvalue: 54e5\n\t\t},\n\t\talignment: {\n\t\t\tkey: \"algn\",\n\t\t\tvalue: \"ctr\"\n\t\t},\n\t\trotateWithShape: {\n\t\t\tkey: \"rotWithShape\",\n\t\t\tvalue: false\n\t\t}\n\t},\n\tchildren: [new BuilderElement({\n\t\tname: \"a:srgbClr\",\n\t\tattributes: { value: {\n\t\t\tkey: \"val\",\n\t\t\tvalue: \"000000\"\n\t\t} },\n\t\tchildren: [new BuilderElement({\n\t\t\tname: \"a:alpha\",\n\t\t\tattributes: { value: {\n\t\t\t\tkey: \"val\",\n\t\t\t\tvalue: 63e3\n\t\t\t} }\n\t\t})]\n\t})]\n});\n/**\n* Creates Office's format scheme: from Office 2016 to 2021, the three fills, lines, effects and backgrounds that\n* shapes styled by the theme use, from subtle to intense.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_StyleMatrix\">\n* <xsd:sequence>\n* <xsd:element name=\"fillStyleLst\" type=\"CT_FillStyleList\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"lnStyleLst\" type=\"CT_LineStyleList\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"effectStyleLst\" type=\"CT_EffectStyleList\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"bgFillStyleLst\" type=\"CT_BackgroundFillStyleList\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"optional\" default=\"\"/>\n* </xsd:complexType>\n* ```\n*/\nvar createFormatScheme = () => new BuilderElement({\n\tname: \"a:fmtScheme\",\n\tattributes: { name: {\n\t\tkey: \"name\",\n\t\tvalue: \"Office\"\n\t} },\n\tchildren: [\n\t\tnew BuilderElement({\n\t\t\tname: \"a:fillStyleLst\",\n\t\t\tchildren: [\n\t\t\t\tcreateSolidFill(),\n\t\t\t\tcreateGradientFill([\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"lumMod\", 11e4],\n\t\t\t\t\t\t[\"satMod\", 105e3],\n\t\t\t\t\t\t[\"tint\", 67e3]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"lumMod\", 105e3],\n\t\t\t\t\t\t[\"satMod\", 103e3],\n\t\t\t\t\t\t[\"tint\", 73e3]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"lumMod\", 105e3],\n\t\t\t\t\t\t[\"satMod\", 109e3],\n\t\t\t\t\t\t[\"tint\", 81e3]\n\t\t\t\t\t]\n\t\t\t\t]),\n\t\t\t\tcreateGradientFill([\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"satMod\", 103e3],\n\t\t\t\t\t\t[\"lumMod\", 102e3],\n\t\t\t\t\t\t[\"tint\", 94e3]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"satMod\", 11e4],\n\t\t\t\t\t\t[\"lumMod\", 1e5],\n\t\t\t\t\t\t[\"shade\", 1e5]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"lumMod\", 99e3],\n\t\t\t\t\t\t[\"satMod\", 12e4],\n\t\t\t\t\t\t[\"shade\", 78e3]\n\t\t\t\t\t]\n\t\t\t\t])\n\t\t\t]\n\t\t}),\n\t\tnew BuilderElement({\n\t\t\tname: \"a:lnStyleLst\",\n\t\t\tchildren: [\n\t\t\t\tcreateLine(6350),\n\t\t\t\tcreateLine(12700),\n\t\t\t\tcreateLine(19050)\n\t\t\t]\n\t\t}),\n\t\tnew BuilderElement({\n\t\t\tname: \"a:effectStyleLst\",\n\t\t\tchildren: [\n\t\t\t\tcreateEffectStyle([]),\n\t\t\t\tcreateEffectStyle([]),\n\t\t\t\tcreateEffectStyle([createShadow()])\n\t\t\t]\n\t\t}),\n\t\tnew BuilderElement({\n\t\t\tname: \"a:bgFillStyleLst\",\n\t\t\tchildren: [\n\t\t\t\tcreateSolidFill(),\n\t\t\t\tcreateSolidFill([[\"tint\", 95e3], [\"satMod\", 17e4]]),\n\t\t\t\tcreateGradientFill([\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"tint\", 93e3],\n\t\t\t\t\t\t[\"satMod\", 15e4],\n\t\t\t\t\t\t[\"shade\", 98e3],\n\t\t\t\t\t\t[\"lumMod\", 102e3]\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"tint\", 98e3],\n\t\t\t\t\t\t[\"satMod\", 13e4],\n\t\t\t\t\t\t[\"shade\", 9e4],\n\t\t\t\t\t\t[\"lumMod\", 103e3]\n\t\t\t\t\t],\n\t\t\t\t\t[[\"shade\", 63e3], [\"satMod\", 12e4]]\n\t\t\t\t])\n\t\t\t]\n\t\t})\n\t]\n});\n// src/file/theme/theme.ts\n/**\n* Theme module for WordprocessingML documents.\n*\n* A document's theme (`word/theme/theme1.xml`) gives it a set of colors, a font for headings and one for body text,\n* and the fills, lines and effects of shapes styled by the theme. Text, tables and shapes that use the theme's colors\n* and fonts change when the theme changes, as they do in Word's Design tab.\n*\n* Reference: http://officeopenxml.com/drwTheme.php\n*\n* @module\n*/\n/**\n* Represents the theme of a document, written to `word/theme/theme1.xml`.\n*\n* Every document has one: Office's theme, from Office 2016 to 2021, with the colors and fonts the options give.\n*\n* Reference: http://officeopenxml.com/drwTheme.php\n*\n* ## XSD Schema\n* ```xml\n* <xsd:element name=\"theme\" type=\"CT_OfficeStyleSheet\"/>\n*\n* <xsd:complexType name=\"CT_OfficeStyleSheet\">\n* <xsd:sequence>\n* <xsd:element name=\"themeElements\" type=\"CT_BaseStyles\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"objectDefaults\" type=\"CT_ObjectStyleDefaults\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extraClrSchemeLst\" type=\"CT_ColorSchemeList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"custClrLst\" type=\"CT_CustomColorList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"optional\" default=\"\"/>\n* </xsd:complexType>\n*\n* <xsd:complexType name=\"CT_BaseStyles\">\n* <xsd:sequence>\n* <xsd:element name=\"clrScheme\" type=\"CT_ColorScheme\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"fontScheme\" type=\"CT_FontScheme\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"fmtScheme\" type=\"CT_StyleMatrix\" minOccurs=\"1\" maxOccurs=\"1\"/>\n* <xsd:element name=\"extLst\" type=\"CT_OfficeArtExtensionList\" minOccurs=\"0\" maxOccurs=\"1\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // A document whose theme has a green accent and Georgia for headings\n* const doc = new Document({\n* theme: { colors: { accent1: \"2E7D32\" }, fonts: { headings: \"Georgia\" } },\n* sections: [],\n* });\n* ```\n*/\nvar Theme = class extends XmlComponent {\n\tconstructor({ name = \"Office Theme\", colors, fonts } = {}) {\n\t\tsuper(\"a:theme\");\n\t\t_defineProperty(this, \"colors\", void 0);\n\t\tthis.colors = themeColorValues(colors);\n\t\tthis.root.push(new NextAttributeComponent({\n\t\t\tnamespace: {\n\t\t\t\tkey: \"xmlns:a\",\n\t\t\t\tvalue: \"http://schemas.openxmlformats.org/drawingml/2006/main\"\n\t\t\t},\n\t\t\tname: {\n\t\t\t\tkey: \"name\",\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t}));\n\t\tthis.root.push(new BuilderElement({\n\t\t\tname: \"a:themeElements\",\n\t\t\tchildren: [\n\t\t\t\tcreateColorScheme(colors ? name : \"Office\", colors),\n\t\t\t\tcreateFontScheme(fonts ? name : \"Office\", fonts),\n\t\t\t\tcreateFormatScheme()\n\t\t\t]\n\t\t}));\n\t\tthis.root.push(new BuilderElement({ name: \"a:objectDefaults\" }));\n\t\tthis.root.push(new BuilderElement({ name: \"a:extraClrSchemeLst\" }));\n\t}\n\t/**\n\t* The hex color of each of the theme's colors. The system's window text and window colors are black and white.\n\t*/\n\tget Colors() {\n\t\treturn this.colors;\n\t}\n};\n// src/util/package-paths.ts\n/**\n* The paths of a package's parts, such as word/document.xml in a .docx file, and the targets of the relationships\n* between them.\n*\n* @module\n*/\n/**\n* The path of a part's relationships part, such as word/_rels/document.xml.rels for word/document.xml.\n*/\nvar relationshipsPathOf = (path) => {\n\tconst slash = path.lastIndexOf(\"/\");\n\treturn `${path.slice(0, slash + 1)}_rels/${path.slice(slash + 1)}.rels`;\n};\n/**\n* The part a relationships part belongs to, or \"\" for the package's own (_rels/.rels), whose targets are from its root.\n*/\nvar sourceOfRelationships = (path) => path.replace(/(^|\\/)_rels\\/([^/]*)\\.rels$/, \"$1$2\");\nvar folderOf = (path) => path.slice(0, path.lastIndexOf(\"/\") + 1);\n/**\n* The path of the part a relationship's target refers to: relative to the folder of the part the relationship belongs\n* to, or from the package's root if it starts with \"/\". Backslashes, which some applications write, are read as slashes.\n*\n* @param from - The path of the part the relationship belongs to\n*/\nvar resolveTarget = (from, target) => {\n\tconst normalized = target.replace(/\\\\/g, \"/\");\n\treturn (normalized.startsWith(\"/\") ? normalized : `${folderOf(from)}${normalized}`).split(\"/\").reduce((segments, segment) => {\n\t\tif (segment === \"\" || segment === \".\") return segments;\n\t\treturn segment === \"..\" ? segments.slice(0, -1) : [...segments, segment];\n\t}, []).join(\"/\");\n};\n/**\n* A relationship's target for a part, relative to the folder of the part the relationship belongs to, such as\n* \"../embeddings/Microsoft_Excel_Worksheet1.xlsx\" from word/charts/chart1.xml.\n*\n* @param from - The path of the part the relationship belongs to\n* @param to - The path of the part it refers to\n*/\nvar relativeTarget = (from, to) => {\n\tconst folders = folderOf(from).split(\"/\").filter(Boolean);\n\tconst segments = to.split(\"/\");\n\tconst common = folders.findIndex((folder, index) => index >= segments.length - 1 || segments[index] !== folder);\n\tconst shared = common === -1 ? folders.length : common;\n\treturn [...folders.slice(shared).map(() => \"..\"), ...segments.slice(shared)].join(\"/\");\n};\n/**\n* Whether two paths are the same part's. Part names are compared without regard to case, as the Open Packaging\n* Conventions compare them, so a relationship's target such as \"Theme/THEME1.xml\" from word/document.xml names\n* word/theme/theme1.xml.\n*/\nvar isSamePart = (path, other) => path.toLowerCase() === other.toLowerCase();\n// node_modules/fflate/esm/browser.js\nvar u8 = Uint8Array;\nvar u16 = Uint16Array;\nvar i32 = Int32Array;\nvar fleb = new u8([\n\t0,\n\t0,\n\t0,\n\t0,\n\t0,\n\t0,\n\t0,\n\t0,\n\t1,\n\t1,\n\t1,\n\t1,\n\t2,\n\t2,\n\t2,\n\t2,\n\t3,\n\t3,\n\t3,\n\t3,\n\t4,\n\t4,\n\t4,\n\t4,\n\t5,\n\t5,\n\t5,\n\t5,\n\t0,\n\t0,\n\t0,\n\t0\n]);\nvar fdeb = new u8([\n\t0,\n\t0,\n\t0,\n\t0,\n\t1,\n\t1,\n\t2,\n\t2,\n\t3,\n\t3,\n\t4,\n\t4,\n\t5,\n\t5,\n\t6,\n\t6,\n\t7,\n\t7,\n\t8,\n\t8,\n\t9,\n\t9,\n\t10,\n\t10,\n\t11,\n\t11,\n\t12,\n\t12,\n\t13,\n\t13,\n\t0,\n\t0\n]);\nvar clim = new u8([\n\t16,\n\t17,\n\t18,\n\t0,\n\t8,\n\t7,\n\t9,\n\t6,\n\t10,\n\t5,\n\t11,\n\t4,\n\t12,\n\t3,\n\t13,\n\t2,\n\t14,\n\t1,\n\t15\n]);\nvar freb = function(eb, start) {\n\tvar b = new u16(31);\n\tfor (var i = 0; i < 31; ++i) b[i] = start += 1 << eb[i - 1];\n\tvar r = new i32(b[30]);\n\tfor (var i = 1; i < 30; ++i) for (var j = b[i]; j < b[i + 1]; ++j) r[j] = j - b[i] << 5 | i;\n\treturn {\n\t\tb,\n\t\tr\n\t};\n};\nvar _a = freb(fleb, 2);\nvar fl = _a.b;\nvar revfl = _a.r;\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0);\nvar fd = _b.b;\nvar revfd = _b.r;\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n\tvar x = (i & 43690) >> 1 | (i & 21845) << 1;\n\tx = (x & 52428) >> 2 | (x & 13107) << 2;\n\tx = (x & 61680) >> 4 | (x & 3855) << 4;\n\trev[i] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1;\n}\nvar hMap = (function(cd, mb, r) {\n\tvar s = cd.length;\n\tvar i = 0;\n\tvar l = new u16(mb);\n\tfor (; i < s; ++i) if (cd[i]) ++l[cd[i] - 1];\n\tvar le = new u16(mb);\n\tfor (i = 1; i < mb; ++i) le[i] = le[i - 1] + l[i - 1] << 1;\n\tvar co;\n\tif (r) {\n\t\tco = new u16(1 << mb);\n\t\tvar rvb = 15 - mb;\n\t\tfor (i = 0; i < s; ++i) if (cd[i]) {\n\t\t\tvar sv = i << 4 | cd[i];\n\t\t\tvar r_1 = mb - cd[i];\n\t\t\tvar v = le[cd[i] - 1]++ << r_1;\n\t\t\tfor (var m = v | (1 << r_1) - 1; v <= m; ++v) co[rev[v] >> rvb] = sv;\n\t\t}\n\t} else {\n\t\tco = new u16(s);\n\t\tfor (i = 0; i < s; ++i) if (cd[i]) co[i] = rev[le[cd[i] - 1]++] >> 15 - cd[i];\n\t}\n\treturn co;\n});\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i) flt[i] = 8;\nfor (var i = 144; i < 256; ++i) flt[i] = 9;\nfor (var i = 256; i < 280; ++i) flt[i] = 7;\nfor (var i = 280; i < 288; ++i) flt[i] = 8;\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i) fdt[i] = 5;\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0);\nvar flrm = /*#__PURE__*/ hMap(flt, 9, 1);\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0);\nvar fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\nvar max = function(a) {\n\tvar m = a[0];\n\tfor (var i = 1; i < a.length; ++i) if (a[i] > m) m = a[i];\n\treturn m;\n};\nvar bits = function(d, p, m) {\n\tvar o = p / 8 | 0;\n\treturn (d[o] | d[o + 1] << 8) >> (p & 7) & m;\n};\nvar bits16 = function(d, p) {\n\tvar o = p / 8 | 0;\n\treturn (d[o] | d[o + 1] << 8 | d[o + 2] << 16) >> (p & 7);\n};\nvar shft = function(p) {\n\treturn (p + 7) / 8 | 0;\n};\nvar slc = function(v, s, e) {\n\tif (s == null || s < 0) s = 0;\n\tif (e == null || e > v.length) e = v.length;\n\treturn new u8(v.subarray(s, e));\n};\nvar ec = [\n\t\"unexpected EOF\",\n\t\"invalid block type\",\n\t\"invalid length/literal\",\n\t\"invalid distance\",\n\t\"stream finished\",\n\t\"no stream handler\",\n\t,\n\t\"no callback\",\n\t\"invalid UTF-8 data\",\n\t\"extra field too long\",\n\t\"date not in range 1980-2099\",\n\t\"filename too long\",\n\t\"stream finishing\",\n\t\"invalid zip data\"\n];\nvar err = function(ind, msg, nt) {\n\tvar e = new Error(msg || ec[ind]);\n\te.code = ind;\n\tif (Error.captureStackTrace) Error.captureStackTrace(e, err);\n\tif (!nt) throw e;\n\treturn e;\n};\nvar inflt = function(dat, st, buf, dict) {\n\tvar sl = dat.length, dl = dict ? dict.length : 0;\n\tif (!sl || st.f && !st.l) return buf || new u8(0);\n\tvar noBuf = !buf;\n\tvar resize = noBuf || st.i != 2;\n\tvar noSt = st.i;\n\tif (noBuf) buf = new u8(sl * 3);\n\tvar cbuf = function(l) {\n\t\tvar bl = buf.length;\n\t\tif (l > bl) {\n\t\t\tvar nbuf = new u8(Math.max(bl * 2, l));\n\t\t\tnbuf.set(buf);\n\t\t\tbuf = nbuf;\n\t\t}\n\t};\n\tvar final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n\tvar tbts = sl * 8;\n\tdo {\n\t\tif (!lm) {\n\t\t\tfinal = bits(dat, pos, 1);\n\t\t\tvar type = bits(dat, pos + 1, 3);\n\t\t\tpos += 3;\n\t\t\tif (!type) {\n\t\t\t\tvar s = shft(pos) + 4, l = dat[s - 4] | dat[s - 3] << 8, t = s + l;\n\t\t\t\tif (t > sl) {\n\t\t\t\t\tif (noSt) err(0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (resize) cbuf(bt + l);\n\t\t\t\tbuf.set(dat.subarray(s, t), bt);\n\t\t\t\tst.b = bt += l, st.p = pos = t * 8, st.f = final;\n\t\t\t\tcontinue;\n\t\t\t} else if (type == 1) lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n\t\t\telse if (type == 2) {\n\t\t\t\tvar hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n\t\t\t\tvar tl = hLit + bits(dat, pos + 5, 31) + 1;\n\t\t\t\tpos += 14;\n\t\t\t\tvar ldt = new u8(tl);\n\t\t\t\tvar clt = new u8(19);\n\t\t\t\tfor (var i = 0; i < hcLen; ++i) clt[clim[i]] = bits(dat, pos + i * 3, 7);\n\t\t\t\tpos += hcLen * 3;\n\t\t\t\tvar clb = max(clt), clbmsk = (1 << clb) - 1;\n\t\t\t\tvar clm = hMap(clt, clb, 1);\n\t\t\t\tfor (var i = 0; i < tl;) {\n\t\t\t\t\tvar r = clm[bits(dat, pos, clbmsk)];\n\t\t\t\t\tpos += r & 15;\n\t\t\t\t\tvar s = r >> 4;\n\t\t\t\t\tif (s < 16) ldt[i++] = s;\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar c = 0, n = 0;\n\t\t\t\t\t\tif (s == 16) n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n\t\t\t\t\t\telse if (s == 17) n = 3 + bits(dat, pos, 7), pos += 3;\n\t\t\t\t\t\telse if (s == 18) n = 11 + bits(dat, pos, 127), pos += 7;\n\t\t\t\t\t\twhile (n--) ldt[i++] = c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n\t\t\t\tlbt = max(lt);\n\t\t\t\tdbt = max(dt);\n\t\t\t\tlm = hMap(lt, lbt, 1);\n\t\t\t\tdm = hMap(dt, dbt, 1);\n\t\t\t} else err(1);\n\t\t\tif (pos > tbts) {\n\t\t\t\tif (noSt) err(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (resize) cbuf(bt + 131072);\n\t\tvar lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n\t\tvar lpos = pos;\n\t\tfor (;; lpos = pos) {\n\t\t\tvar c = lm[bits16(dat, pos) & lms], sym = c >> 4;\n\t\t\tpos += c & 15;\n\t\t\tif (pos > tbts) {\n\t\t\t\tif (noSt) err(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!c) err(2);\n\t\t\tif (sym < 256) buf[bt++] = sym;\n\t\t\telse if (sym == 256) {\n\t\t\t\tlpos = pos, lm = null;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tvar add = sym - 254;\n\t\t\t\tif (sym > 264) {\n\t\t\t\t\tvar i = sym - 257, b = fleb[i];\n\t\t\t\t\tadd = bits(dat, pos, (1 << b) - 1) + fl[i];\n\t\t\t\t\tpos += b;\n\t\t\t\t}\n\t\t\t\tvar d = dm[bits16(dat, pos) & dms], dsym = d >> 4;\n\t\t\t\tif (!d) err(3);\n\t\t\t\tpos += d & 15;\n\t\t\t\tvar dt = fd[dsym];\n\t\t\t\tif (dsym > 3) {\n\t\t\t\t\tvar b = fdeb[dsym];\n\t\t\t\t\tdt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n\t\t\t\t}\n\t\t\t\tif (pos > tbts) {\n\t\t\t\t\tif (noSt) err(0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (resize) cbuf(bt + 131072);\n\t\t\t\tvar end = bt + add;\n\t\t\t\tif (bt < dt) {\n\t\t\t\t\tvar shift = dl - dt, dend = Math.min(dt, end);\n\t\t\t\t\tif (shift + bt < 0) err(3);\n\t\t\t\t\tfor (; bt < dend; ++bt) buf[bt] = dict[shift + bt];\n\t\t\t\t}\n\t\t\t\tfor (; bt < end; ++bt) buf[bt] = buf[bt - dt];\n\t\t\t}\n\t\t}\n\t\tst.l = lm, st.p = lpos, st.b = bt, st.f = final;\n\t\tif (lm) final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n\t} while (!final);\n\treturn bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);\n};\nvar wbits = function(d, p, v) {\n\tv <<= p & 7;\n\tvar o = p / 8 | 0;\n\td[o] |= v;\n\td[o + 1] |= v >> 8;\n};\nvar wbits16 = function(d, p, v) {\n\tv <<= p & 7;\n\tvar o = p / 8 | 0;\n\td[o] |= v;\n\td[o + 1] |= v >> 8;\n\td[o + 2] |= v >> 16;\n};\nvar hTree = function(d, mb) {\n\tvar t = [];\n\tfor (var i = 0; i < d.length; ++i) if (d[i]) t.push({\n\t\ts: i,\n\t\tf: d[i]\n\t});\n\tvar s = t.length;\n\tvar t2 = t.slice();\n\tif (!s) return {\n\t\tt: et,\n\t\tl: 0\n\t};\n\tif (s == 1) {\n\t\tvar v = new u8(t[0].s + 1);\n\t\tv[t[0].s] = 1;\n\t\treturn {\n\t\t\tt: v,\n\t\t\tl: 1\n\t\t};\n\t}\n\tt.sort(function(a, b) {\n\t\treturn a.f - b.f;\n\t});\n\tt.push({\n\t\ts: -1,\n\t\tf: 25001\n\t});\n\tvar l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n\tt[0] = {\n\t\ts: -1,\n\t\tf: l.f + r.f,\n\t\tl,\n\t\tr\n\t};\n\twhile (i1 != s - 1) {\n\t\tl = t[t[i0].f < t[i2].f ? i0++ : i2++];\n\t\tr = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n\t\tt[i1++] = {\n\t\t\ts: -1,\n\t\t\tf: l.f + r.f,\n\t\t\tl,\n\t\t\tr\n\t\t};\n\t}\n\tvar maxSym = t2[0].s;\n\tfor (var i = 1; i < s; ++i) if (t2[i].s > maxSym) maxSym = t2[i].s;\n\tvar tr = new u16(maxSym + 1);\n\tvar mbt = ln(t[i1 - 1], tr, 0);\n\tif (mbt > mb) {\n\t\tvar i = 0, dt = 0;\n\t\tvar lft = mbt - mb, cst = 1 << lft;\n\t\tt2.sort(function(a, b) {\n\t\t\treturn tr[b.s] - tr[a.s] || a.f - b.f;\n\t\t});\n\t\tfor (; i < s; ++i) {\n\t\t\tvar i2_1 = t2[i].s;\n\t\t\tif (tr[i2_1] > mb) {\n\t\t\t\tdt += cst - (1 << mbt - tr[i2_1]);\n\t\t\t\ttr[i2_1] = mb;\n\t\t\t} else break;\n\t\t}\n\t\tdt >>= lft;\n\t\twhile (dt > 0) {\n\t\t\tvar i2_2 = t2[i].s;\n\t\t\tif (tr[i2_2] < mb) dt -= 1 << mb - tr[i2_2]++ - 1;\n\t\t\telse ++i;\n\t\t}\n\t\tfor (; i >= 0 && dt; --i) {\n\t\t\tvar i2_3 = t2[i].s;\n\t\t\tif (tr[i2_3] == mb) {\n\t\t\t\t--tr[i2_3];\n\t\t\t\t++dt;\n\t\t\t}\n\t\t}\n\t\tmbt = mb;\n\t}\n\treturn {\n\t\tt: new u8(tr),\n\t\tl: mbt\n\t};\n};\nvar ln = function(n, l, d) {\n\treturn n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d;\n};\nvar lc = function(c) {\n\tvar s = c.length;\n\twhile (s && !c[--s]);\n\tvar cl = new u16(++s);\n\tvar cli = 0, cln = c[0], cls = 1;\n\tvar w = function(v) {\n\t\tcl[cli++] = v;\n\t};\n\tfor (var i = 1; i <= s; ++i) if (c[i] == cln && i != s) ++cls;\n\telse {\n\t\tif (!cln && cls > 2) {\n\t\t\tfor (; cls > 138; cls -= 138) w(32754);\n\t\t\tif (cls > 2) {\n\t\t\t\tw(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305);\n\t\t\t\tcls = 0;\n\t\t\t}\n\t\t} else if (cls > 3) {\n\t\t\tw(cln), --cls;\n\t\t\tfor (; cls > 6; cls -= 6) w(8304);\n\t\t\tif (cls > 2) w(cls - 3 << 5 | 8208), cls = 0;\n\t\t}\n\t\twhile (cls--) w(cln);\n\t\tcls = 1;\n\t\tcln = c[i];\n\t}\n\treturn {\n\t\tc: cl.subarray(0, cli),\n\t\tn: s\n\t};\n};\nvar clen = function(cf, cl) {\n\tvar l = 0;\n\tfor (var i = 0; i < cl.length; ++i) l += cf[i] * cl[i];\n\treturn l;\n};\nvar wfblk = function(out, pos, dat) {\n\tvar s = dat.length;\n\tvar o = shft(pos + 2);\n\tout[o] = s & 255;\n\tout[o + 1] = s >> 8;\n\tout[o + 2] = out[o] ^ 255;\n\tout[o + 3] = out[o + 1] ^ 255;\n\tfor (var i = 0; i < s; ++i) out[o + i + 4] = dat[i];\n\treturn (o + 4 + s) * 8;\n};\nvar wblk = function(dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n\twbits(out, p++, final);\n\t++lf[256];\n\tvar _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;\n\tvar _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;\n\tvar _c = lc(dlt), lclt = _c.c, nlc = _c.n;\n\tvar _d = lc(ddt), lcdt = _d.c, ndc = _d.n;\n\tvar lcfreq = new u16(19);\n\tfor (var i = 0; i < lclt.length; ++i) ++lcfreq[lclt[i] & 31];\n\tfor (var i = 0; i < lcdt.length; ++i) ++lcfreq[lcdt[i] & 31];\n\tvar _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;\n\tvar nlcc = 19;\n\tfor (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc);\n\tvar flen = bl + 5 << 3;\n\tvar ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n\tvar dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];\n\tif (bs >= 0 && flen <= ftlen && flen <= dtlen) return wfblk(out, p, dat.subarray(bs, bs + bl));\n\tvar lm, ll, dm, dl;\n\twbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n\tif (dtlen < ftlen) {\n\t\tlm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n\t\tvar llm = hMap(lct, mlcb, 0);\n\t\twbits(out, p, nlc - 257);\n\t\twbits(out, p + 5, ndc - 1);\n\t\twbits(out, p + 10, nlcc - 4);\n\t\tp += 14;\n\t\tfor (var i = 0; i < nlcc; ++i) wbits(out, p + 3 * i, lct[clim[i]]);\n\t\tp += 3 * nlcc;\n\t\tvar lcts = [lclt, lcdt];\n\t\tfor (var it = 0; it < 2; ++it) {\n\t\t\tvar clct = lcts[it];\n\t\t\tfor (var i = 0; i < clct.length; ++i) {\n\t\t\t\tvar len = clct[i] & 31;\n\t\t\t\twbits(out, p, llm[len]), p += lct[len];\n\t\t\t\tif (len > 15) wbits(out, p, clct[i] >> 5 & 127), p += clct[i] >> 12;\n\t\t\t}\n\t\t}\n\t} else lm = flm, ll = flt, dm = fdm, dl = fdt;\n\tfor (var i = 0; i < li; ++i) {\n\t\tvar sym = syms[i];\n\t\tif (sym > 255) {\n\t\t\tvar len = sym >> 18 & 31;\n\t\t\twbits16(out, p, lm[len + 257]), p += ll[len + 257];\n\t\t\tif (len > 7) wbits(out, p, sym >> 23 & 31), p += fleb[len];\n\t\t\tvar dst = sym & 31;\n\t\t\twbits16(out, p, dm[dst]), p += dl[dst];\n\t\t\tif (dst > 3) wbits16(out, p, sym >> 5 & 8191), p += fdeb[dst];\n\t\t} else wbits16(out, p, lm[sym]), p += ll[sym];\n\t}\n\twbits16(out, p, lm[256]);\n\treturn p + ll[256];\n};\nvar deo = /*#__PURE__*/ new i32([\n\t65540,\n\t131080,\n\t131088,\n\t131104,\n\t262176,\n\t1048704,\n\t1048832,\n\t2114560,\n\t2117632\n]);\nvar et = /*#__PURE__*/ new u8(0);\nvar dflt = function(dat, lvl, plvl, pre, post, st) {\n\tvar s = st.z || dat.length;\n\tvar o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7e3)) + post);\n\tvar w = o.subarray(pre, o.length - post);\n\tvar lst = st.l;\n\tvar pos = (st.r || 0) & 7;\n\tif (lvl) {\n\t\tif (pos) w[0] = st.r >> 3;\n\t\tvar opt = deo[lvl - 1];\n\t\tvar n = opt >> 13, c = opt & 8191;\n\t\tvar msk_1 = (1 << plvl) - 1;\n\t\tvar prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);\n\t\tvar bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n\t\tvar hsh = function(i) {\n\t\t\treturn (dat[i] ^ dat[i + 1] << bs1_1 ^ dat[i + 2] << bs2_1) & msk_1;\n\t\t};\n\t\tvar syms = new i32(25e3);\n\t\tvar lf = new u16(288), df = new u16(32);\n\t\tvar lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;\n\t\tfor (; i + 2 < s; ++i) {\n\t\t\tvar hv = hsh(i);\n\t\t\tvar imod = i & 32767, pimod = head[hv];\n\t\t\tprev[imod] = pimod;\n\t\t\thead[hv] = imod;\n\t\t\tif (wi <= i) {\n\t\t\t\tvar rem = s - i;\n\t\t\t\tif ((lc_1 > 7e3 || li > 24576) && (rem > 423 || !lst)) {\n\t\t\t\t\tpos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n\t\t\t\t\tli = lc_1 = eb = 0, bs = i;\n\t\t\t\t\tfor (var j = 0; j < 286; ++j) lf[j] = 0;\n\t\t\t\t\tfor (var j = 0; j < 30; ++j) df[j] = 0;\n\t\t\t\t}\n\t\t\t\tvar l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;\n\t\t\t\tif (rem > 2 && hv == hsh(i - dif)) {\n\t\t\t\t\tvar maxn = Math.min(n, rem) - 1;\n\t\t\t\t\tvar maxd = Math.min(32767, i);\n\t\t\t\t\tvar ml = Math.min(258, rem);\n\t\t\t\t\twhile (dif <= maxd && --ch_1 && imod != pimod) {\n\t\t\t\t\t\tif (dat[i + l] == dat[i + l - dif]) {\n\t\t\t\t\t\t\tvar nl = 0;\n\t\t\t\t\t\t\tfor (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl);\n\t\t\t\t\t\t\tif (nl > l) {\n\t\t\t\t\t\t\t\tl = nl, d = dif;\n\t\t\t\t\t\t\t\tif (nl > maxn) break;\n\t\t\t\t\t\t\t\tvar mmd = Math.min(dif, nl - 2);\n\t\t\t\t\t\t\t\tvar md = 0;\n\t\t\t\t\t\t\t\tfor (var j = 0; j < mmd; ++j) {\n\t\t\t\t\t\t\t\t\tvar ti = i - dif + j & 32767;\n\t\t\t\t\t\t\t\t\tvar cd = ti - prev[ti] & 32767;\n\t\t\t\t\t\t\t\t\tif (cd > md) md = cd, pimod = ti;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\timod = pimod, pimod = prev[imod];\n\t\t\t\t\t\tdif += imod - pimod & 32767;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (d) {\n\t\t\t\t\tsyms[li++] = 268435456 | revfl[l] << 18 | revfd[d];\n\t\t\t\t\tvar lin = revfl[l] & 31, din = revfd[d] & 31;\n\t\t\t\t\teb += fleb[lin] + fdeb[din];\n\t\t\t\t\t++lf[257 + lin];\n\t\t\t\t\t++df[din];\n\t\t\t\t\twi = i + l;\n\t\t\t\t\t++lc_1;\n\t\t\t\t} else {\n\t\t\t\t\tsyms[li++] = dat[i];\n\t\t\t\t\t++lf[dat[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = Math.max(i, wi); i < s; ++i) {\n\t\t\tsyms[li++] = dat[i];\n\t\t\t++lf[dat[i]];\n\t\t}\n\t\tpos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n\t\tif (!lst) {\n\t\t\tst.r = pos & 7 | w[pos / 8 | 0] << 3;\n\t\t\tpos -= 7;\n\t\t\tst.h = head, st.p = prev, st.i = i, st.w = wi;\n\t\t}\n\t} else {\n\t\tfor (var i = st.w || 0; i < s + lst; i += 65535) {\n\t\t\tvar e = i + 65535;\n\t\t\tif (e >= s) {\n\t\t\t\tw[pos / 8 | 0] = lst;\n\t\t\t\te = s;\n\t\t\t}\n\t\t\tpos = wfblk(w, pos + 1, dat.subarray(i, e));\n\t\t}\n\t\tst.i = s;\n\t}\n\treturn slc(o, 0, pre + shft(pos) + post);\n};\nvar crct = /*#__PURE__*/ (function() {\n\tvar t = /* @__PURE__ */ new Int32Array(256);\n\tfor (var i = 0; i < 256; ++i) {\n\t\tvar c = i, k = 9;\n\t\twhile (--k) c = (c & 1 && -306674912) ^ c >>> 1;\n\t\tt[i] = c;\n\t}\n\treturn t;\n})();\nvar crc = function() {\n\tvar c = -1;\n\treturn {\n\t\tp: function(d) {\n\t\t\tvar cr = c;\n\t\t\tfor (var i = 0; i < d.length; ++i) cr = crct[cr & 255 ^ d[i]] ^ cr >>> 8;\n\t\t\tc = cr;\n\t\t},\n\t\td: function() {\n\t\t\treturn ~c;\n\t\t}\n\t};\n};\nvar dopt = function(dat, opt, pre, post, st) {\n\tif (!st) {\n\t\tst = { l: 1 };\n\t\tif (opt.dictionary) {\n\t\t\tvar dict = opt.dictionary.subarray(-32768);\n\t\t\tvar newDat = new u8(dict.length + dat.length);\n\t\t\tnewDat.set(dict);\n\t\t\tnewDat.set(dat, dict.length);\n\t\t\tdat = newDat;\n\t\t\tst.w = dict.length;\n\t\t}\n\t}\n\treturn dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20 : 12 + opt.mem, pre, post, st);\n};\nvar mrg = function(a, b) {\n\tvar o = {};\n\tfor (var k in a) o[k] = a[k];\n\tfor (var k in b) o[k] = b[k];\n\treturn o;\n};\nvar b2 = function(d, b) {\n\treturn d[b] | d[b + 1] << 8;\n};\nvar b4 = function(d, b) {\n\treturn (d[b] | d[b + 1] << 8 | d[b + 2] << 16 | d[b + 3] << 24) >>> 0;\n};\nvar b8 = function(d, b) {\n\treturn b4(d, b) + b4(d, b + 4) * 4294967296;\n};\nvar wbytes = function(d, b, v) {\n\tfor (; v; ++b) d[b] = v, v >>>= 8;\n};\n/**\n* Compresses data with DEFLATE without any wrapper\n* @param data The data to compress\n* @param opts The compression options\n* @returns The deflated version of the data\n*/\nfunction deflateSync(data, opts) {\n\treturn dopt(data, opts || {}, 0, 0);\n}\nfunction inflateSync(data, opts) {\n\treturn inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\nvar fltn = function(d, p, t, o) {\n\tfor (var k in d) {\n\t\tvar val = d[k], n = p + k, op = o;\n\t\tif (Array.isArray(val)) op = mrg(o, val[1]), val = val[0];\n\t\tif (ArrayBuffer.isView(val)) t[n] = [val, op];\n\t\telse {\n\t\t\tt[n += \"/\"] = [new u8(0), op];\n\t\t\tfltn(val, n, t, o);\n\t\t}\n\t}\n};\nvar te = typeof TextEncoder != \"undefined\" && /*#__PURE__*/ new TextEncoder();\nvar td = typeof TextDecoder != \"undefined\" && /*#__PURE__*/ new TextDecoder();\ntry {\n\ttd.decode(et, { stream: true });\n} catch (e) {}\nvar dutf8 = function(d) {\n\tfor (var r = \"\", i = 0;;) {\n\t\tvar c = d[i++];\n\t\tvar eb = (c > 127) + (c > 223) + (c > 239);\n\t\tif (i + eb > d.length) return {\n\t\t\ts: r,\n\t\t\tr: slc(d, i - 1)\n\t\t};\n\t\tif (!eb) r += String.fromCharCode(c);\n\t\telse if (eb == 3) c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | d[i++] & 63) - 65536, r += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023);\n\t\telse if (eb & 1) r += String.fromCharCode((c & 31) << 6 | d[i++] & 63);\n\t\telse r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | d[i++] & 63);\n\t}\n};\n/**\n* Converts a string into a Uint8Array for use with compression/decompression methods\n* @param str The string to encode\n* @param latin1 Whether or not to interpret the data as Latin-1. This should\n* not need to be true unless decoding a binary string.\n* @returns The string encoded in UTF-8/Latin-1 binary\n*/\nfunction strToU8(str, latin1) {\n\tif (latin1) {\n\t\tvar ar_1 = new u8(str.length);\n\t\tfor (var i = 0; i < str.length; ++i) ar_1[i] = str.charCodeAt(i);\n\t\treturn ar_1;\n\t}\n\tif (te) return te.encode(str);\n\tvar l = str.length;\n\tvar ar = new u8(str.length + (str.length >> 1));\n\tvar ai = 0;\n\tvar w = function(v) {\n\t\tar[ai++] = v;\n\t};\n\tfor (var i = 0; i < l; ++i) {\n\t\tif (ai + 5 > ar.length) {\n\t\t\tvar n = new u8(ai + 8 + (l - i << 1));\n\t\t\tn.set(ar);\n\t\t\tar = n;\n\t\t}\n\t\tvar c = str.charCodeAt(i);\n\t\tif (c < 128 || latin1) w(c);\n\t\telse if (c < 2048) w(192 | c >> 6), w(128 | c & 63);\n\t\telse if (c > 55295 && c < 57344) c = 65536 + (c & 1047552) | str.charCodeAt(++i) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);\n\t\telse w(224 | c >> 12), w(128 | c >> 6 & 63), w(128 | c & 63);\n\t}\n\treturn slc(ar, 0, ai);\n}\n/**\n* Converts a Uint8Array to a string\n* @param dat The data to decode to string\n* @param latin1 Whether or not to interpret the data as Latin-1. This should\n* not need to be true unless encoding to binary string.\n* @returns The original UTF-8/Latin-1 string\n*/\nfunction strFromU8(dat, latin1) {\n\tif (latin1) {\n\t\tvar r = \"\";\n\t\tfor (var i = 0; i < dat.length; i += 16384) r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n\t\treturn r;\n\t} else if (td) return td.decode(dat);\n\telse {\n\t\tvar _a = dutf8(dat), s = _a.s, r = _a.r;\n\t\tif (r.length) err(8);\n\t\treturn s;\n\t}\n}\nvar slzh = function(d, b) {\n\treturn b + 30 + b2(d, b + 26) + b2(d, b + 28);\n};\nvar zh = function(d, b, z) {\n\tvar fnl = b2(d, b + 28), efl = b2(d, b + 30), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl;\n\tvar _a = z64hs(d, es, efl, z, b4(d, b + 20), b4(d, b + 24), b4(d, b + 42)), sc = _a[0], su = _a[1], off = _a[2];\n\treturn [\n\t\tb2(d, b + 10),\n\t\tsc,\n\t\tsu,\n\t\tfn,\n\t\tes + efl + b2(d, b + 32),\n\t\toff\n\t];\n};\nvar z64hs = function(d, b, l, z, sc, su, off) {\n\tvar nsc = sc == 4294967295, nsu = su == 4294967295, noff = off == 4294967295, e = b + l;\n\tvar nf = nsc + nsu + noff;\n\tif (z && nf) {\n\t\tfor (; b + 4 < e; b += 4 + b2(d, b + 2)) if (b2(d, b) == 1) return [\n\t\t\tnsc ? b8(d, b + 4 + 8 * nsu) : sc,\n\t\t\tnsu ? b8(d, b + 4) : su,\n\t\t\tnoff ? b8(d, b + 4 + 8 * (nsu + nsc)) : off,\n\t\t\t1\n\t\t];\n\t\tif (z < 2) err(13);\n\t}\n\treturn [\n\t\tsc,\n\t\tsu,\n\t\toff,\n\t\t0\n\t];\n};\nvar exfl = function(ex) {\n\tvar le = 0;\n\tif (ex) for (var k in ex) {\n\t\tvar l = ex[k].length;\n\t\tif (l > 65535) err(9);\n\t\tle += l + 4;\n\t}\n\treturn le;\n};\nvar wzh = function(d, b, f, fn, u, c, ce, co) {\n\tvar fl = fn.length, ex = f.extra, col = co && co.length;\n\tvar exl = exfl(ex);\n\twbytes(d, b, ce != null ? 33639248 : 67324752), b += 4;\n\tif (ce != null) d[b++] = 20, d[b++] = f.os;\n\td[b] = 20, b += 2;\n\td[b++] = f.flag << 1 | (c < 0 && 8), d[b++] = u && 8;\n\td[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n\tvar dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n\tif (y < 0 || y > 119) err(10);\n\twbytes(d, b, y << 25 | dt.getMonth() + 1 << 21 | dt.getDate() << 16 | dt.getHours() << 11 | dt.getMinutes() << 5 | dt.getSeconds() >> 1), b += 4;\n\tif (c != -1) {\n\t\twbytes(d, b, f.crc);\n\t\twbytes(d, b + 4, c < 0 ? -c - 2 : c);\n\t\twbytes(d, b + 8, f.size);\n\t}\n\twbytes(d, b + 12, fl);\n\twbytes(d, b + 14, exl), b += 16;\n\tif (ce != null) {\n\t\twbytes(d, b, col);\n\t\twbytes(d, b + 6, f.attrs);\n\t\twbytes(d, b + 10, ce), b += 14;\n\t}\n\td.set(fn, b);\n\tb += fl;\n\tif (exl) for (var k in ex) {\n\t\tvar exf = ex[k], l = exf.length;\n\t\twbytes(d, b, +k);\n\t\twbytes(d, b + 2, l);\n\t\td.set(exf, b + 4), b += 4 + l;\n\t}\n\tif (col) d.set(co, b), b += col;\n\treturn b;\n};\nvar wzf = function(o, b, c, d, e) {\n\twbytes(o, b, 101010256);\n\twbytes(o, b + 8, c);\n\twbytes(o, b + 10, c);\n\twbytes(o, b + 12, d);\n\twbytes(o, b + 16, e);\n};\n/**\n* Synchronously creates a ZIP file. Prefer using `zip` for better performance\n* with more than one file.\n* @param data The directory structure for the ZIP archive\n* @param opts The main options, merged with per-file options\n* @returns The generated ZIP archive\n*/\nfunction zipSync(data, opts) {\n\tif (!opts) opts = {};\n\tvar r = {};\n\tvar files = [];\n\tfltn(data, \"\", r, opts);\n\tvar o = 0;\n\tvar tot = 0;\n\tfor (var fn in r) {\n\t\tvar _a = r[fn], file = _a[0], p = _a[1];\n\t\tvar compression = p.level == 0 ? 0 : 8;\n\t\tvar f = strToU8(fn), s = f.length;\n\t\tvar com = p.comment, m = com && strToU8(com), ms = m && m.length;\n\t\tvar exl = exfl(p.extra);\n\t\tif (s > 65535) err(11);\n\t\tvar d = compression ? deflateSync(file, p) : file, l = d.length;\n\t\tvar c = crc();\n\t\tc.p(file);\n\t\tfiles.push(mrg(p, {\n\t\t\tsize: file.length,\n\t\t\tcrc: c.d(),\n\t\t\tc: d,\n\t\t\tf,\n\t\t\tm,\n\t\t\tu: s != fn.length || m && com.length != ms,\n\t\t\to,\n\t\t\tcompression\n\t\t}));\n\t\to += 30 + s + exl + l;\n\t\ttot += 76 + 2 * (s + exl) + (ms || 0) + l;\n\t}\n\tvar out = new u8(tot + 22), oe = o, cdl = tot - o;\n\tfor (var i = 0; i < files.length; ++i) {\n\t\tvar f = files[i];\n\t\twzh(out, f.o, f, f.f, f.u, f.c.length);\n\t\tvar badd = 30 + f.f.length + exfl(f.extra);\n\t\tout.set(f.c, f.o + badd);\n\t\twzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n\t}\n\twzf(out, o, files.length, cdl, oe);\n\treturn out;\n}\n/**\n* Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n* performance with more than one file.\n* @param data The raw compressed ZIP file\n* @param opts The ZIP extraction options\n* @returns The decompressed files\n*/\nfunction unzipSync(data, opts) {\n\tvar files = {};\n\tvar e = data.length - 22;\n\tfor (; b4(data, e) != 101010256; --e) if (!e || data.length - e > 65558) err(13);\n\tvar c = b2(data, e + 8);\n\tif (!c) return {};\n\tvar o = b4(data, e + 16);\n\tvar z = b4(data, e - 20) == 117853008;\n\tif (z) {\n\t\tvar ze = b4(data, e - 12);\n\t\tz = b4(data, ze) == 101075792;\n\t\tif (z) {\n\t\t\tc = b4(data, ze + 32);\n\t\t\to = b4(data, ze + 48);\n\t\t}\n\t}\n\tvar fltr = opts && opts.filter;\n\tfor (var i = 0; i < c; ++i) {\n\t\tvar _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n\t\to = no;\n\t\tif (!fltr || fltr({\n\t\t\tname: fn,\n\t\t\tsize: sc,\n\t\t\toriginalSize: su,\n\t\t\tcompression: c_2\n\t\t})) {\n\t\t\tif (!c_2) files[fn] = slc(data, b, b + sc);\n\t\t\telse if (c_2 == 8) files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });\n\t\t\telse err(14, \"unknown compression type \" + c_2);\n\t\t}\n\t}\n\treturn files;\n}\n// src/util/zip.ts\n/**\n* Zips and unzips packages, such as .docx files, and gives a zip file in the output types of `Packer` and\n* `patchDocument`.\n*\n* @module\n*/\n/**\n* The bytes of a file in a package. Bytes from another realm, such as a vm context's Buffer, are read through this\n* realm's `Uint8Array`, as fflate tells a file's bytes from a folder of files by `instanceof Uint8Array`.\n*/\nvar bytesOf$2 = (data) => typeof data === \"string\" ? encodeUtf8(data) : ArrayBuffer.isView(data) ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength) : new Uint8Array(data);\n/**\n* Zips a package's files, each compressed with DEFLATE, in the order they are given. A path given twice keeps its first\n* place and its last data, so a file can be replaced.\n*/\nvar zipFiles = (files) => zipSync(Object.fromEntries([...files].map(([path, data]) => [path, bytesOf$2(data)])));\nvar MAX_DEFLATE_RATIO = 1032;\nvar wrongSize = (path) => /* @__PURE__ */ new Error(`Corrupted zip: ${path} isn't the size the zip file gives it`);\n/**\n* The files in a zip file by their paths, in the zip file's order. Its folders, which hold nothing, are left out, and so\n* are the files `include` leaves out, which aren't inflated.\n*\n* A file must be as large as the zip file says, as JSZip, which docx used to unzip with, checked. fflate takes room for\n* that size before inflating a file, so sizes that can't be are refused before it does: compressed data that together\n* is larger than the zip file it's in, or a size more than DEFLATE can inflate a file's compressed data to. That keeps\n* the room taken to what DEFLATE can give for the zip file. fflate cuts a file short at a size smaller than its data,\n* which only parsing the zip file again would show.\n*/\nvar unzipFiles = (data, include = () => true) => {\n\tconst sizes = /* @__PURE__ */ new Map();\n\tlet compressed = 0;\n\tconst files = unzipSync(data, { filter: ({ name, size, originalSize }) => {\n\t\tif (name.endsWith(\"/\") || !include(name)) return false;\n\t\tcompressed += size;\n\t\tif (compressed > data.length || originalSize > size * MAX_DEFLATE_RATIO) throw wrongSize(name);\n\t\tsizes.set(name, originalSize);\n\t\treturn true;\n\t} });\n\tconst wrong = Object.entries(files).find(([path, file]) => file.length !== sizes.get(path));\n\tif (wrong !== void 0) throw wrongSize(wrong[0]);\n\treturn new Map(Object.entries(files));\n};\n/** A zip file as a string with a character for each byte, as JSZip, which docx used to zip with, gave it */\nvar binaryStringOf = (data) => {\n\tlet text = \"\";\n\tfor (let start = 0; start < data.length; start += 32768) text += String.fromCharCode(...data.subarray(start, start + 32768));\n\treturn text;\n};\nvar unsupported = (type) => /* @__PURE__ */ new Error(`${type} is not supported by this platform`);\nvar OUTPUTS = {\n\tuint8array: (data) => data,\n\tarraybuffer: (data) => data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength),\n\tarray: (data) => Array.from(data),\n\tstring: binaryStringOf,\n\tbinarystring: binaryStringOf,\n\tbase64: (data) => btoa(binaryStringOf(data)),\n\tblob: (data, mimeType) => {\n\t\tif (typeof Blob === \"undefined\") throw unsupported(\"blob\");\n\t\treturn new Blob([data], { type: mimeType });\n\t},\n\tnodebuffer: (data) => {\n\t\tif (typeof Buffer === \"undefined\") throw unsupported(\"nodebuffer\");\n\t\treturn Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n\t},\n\ttext: () => {\n\t\tthrow unsupported(\"text\");\n\t}\n};\n/**\n* A zip file in one of the output types of `Packer` and `patchDocument`. The type's case doesn't matter, as it didn't\n* to JSZip.\n*\n* @param mimeType - The type a Blob is given\n*/\nvar zipOutput = (data, type, mimeType) => {\n\tconst output = Object.prototype.hasOwnProperty.call(OUTPUTS, type.toLowerCase()) ? OUTPUTS[type.toLowerCase()] : void 0;\n\tif (output === void 0) throw unsupported(type);\n\treturn output(data, mimeType);\n};\n// src/file/theme/read-theme.ts\n/**\n* Reads themes: the theme of a Word document or template, of another Office file, or of a theme file, as the options of\n* a document's `theme`, so a document `docx` writes can have it, and the colors of a document's theme for the patcher.\n*\n* @module\n*/\nvar COLOR_NAMES = /* @__PURE__ */ new Map([\n\t[\"dk1\", \"dark1\"],\n\t[\"lt1\", \"light1\"],\n\t[\"dk2\", \"dark2\"],\n\t[\"lt2\", \"light2\"],\n\t[\"accent1\", \"accent1\"],\n\t[\"accent2\", \"accent2\"],\n\t[\"accent3\", \"accent3\"],\n\t[\"accent4\", \"accent4\"],\n\t[\"accent5\", \"accent5\"],\n\t[\"accent6\", \"accent6\"],\n\t[\"hlink\", \"hyperlink\"],\n\t[\"folHlink\", \"followedHyperlink\"]\n]);\nvar DEFAULT_SYSTEM_COLORS = /* @__PURE__ */ new Map([[\"dark1\", \"windowText\"], [\"light1\", \"window\"]]);\nvar MAIN_PART_TYPES = /* @__PURE__ */ new Set([\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\", \"http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument\"]);\nvar THEME_TYPES = /* @__PURE__ */ new Set([\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\", \"http://purl.oclc.org/ooxml/officeDocument/relationships/theme\"]);\nvar localName$1 = (element) => {\n\tvar _element$name$slice, _element$name;\n\treturn (_element$name$slice = element === null || element === void 0 || (_element$name = element.name) === null || _element$name === void 0 ? void 0 : _element$name.slice(element.name.indexOf(\":\") + 1)) !== null && _element$name$slice !== void 0 ? _element$name$slice : \"\";\n};\nvar childElements = (element) => {\n\tvar _element$elements$fil, _element$elements;\n\treturn (_element$elements$fil = element === null || element === void 0 || (_element$elements = element.elements) === null || _element$elements === void 0 ? void 0 : _element$elements.filter((item) => item.type === \"element\")) !== null && _element$elements$fil !== void 0 ? _element$elements$fil : [];\n};\nvar child = (element, name) => childElements(element).find((item) => localName$1(item) === name);\nvar attribute = (element, name) => {\n\tvar _element$attributes;\n\tconst value = element === null || element === void 0 || (_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes[name];\n\treturn value === void 0 ? void 0 : String(value);\n};\nvar isZip = (bytes) => bytes[0] === 80 && bytes[1] === 75 && bytes[2] === 3 && bytes[3] === 4;\nvar decode$1 = (bytes) => new TextDecoder(bytes[0] === 255 && bytes[1] === 254 ? \"utf-16le\" : bytes[0] === 254 && bytes[1] === 255 ? \"utf-16be\" : \"utf-8\").decode(bytes);\nvar defined = (object) => Object.fromEntries(Object.entries(object).filter(([, value]) => value !== void 0));\n/**\n* The part that a part's relationship of one of `types` refers to, such as the package's main part, which the package\n* itself (`\"\"`) refers to.\n*/\nvar relatedPart = (files, from, types) => {\n\tconst relationships = files.get(relationshipsPathOf(from));\n\tconst target = attribute(relationships && childElements(child(parseXml(decode$1(relationships)), \"Relationships\")).find((item) => {\n\t\tvar _attribute;\n\t\treturn types.has((_attribute = attribute(item, \"Type\")) !== null && _attribute !== void 0 ? _attribute : \"\");\n\t}), \"Target\");\n\treturn target === void 0 ? void 0 : resolveTarget(from, target);\n};\n/**\n* The path of the theme a part of a package refers to, such as word/theme/theme1.xml for a Word document's\n* word/document.xml.\n*/\nvar themePathOf = (files, part) => relatedPart(files, part, THEME_TYPES);\n/**\n* The XML of a package's theme: the theme its main part refers to, such as word/theme/theme1.xml in a Word document.\n*\n* @throws If the package has no main part, or its main part has no theme\n*/\nvar packageThemeXml = (bytes) => {\n\tconst relationships = unzipFiles(bytes, (path) => path.endsWith(\".rels\"));\n\tconst mainPart = relatedPart(relationships, \"\", MAIN_PART_TYPES);\n\tif (mainPart === void 0) throw new Error(\"Invalid file: a zip file that isn't a Word, PowerPoint or Excel file or an Office theme (.thmx)\");\n\tconst themePath = themePathOf(relationships, mainPart);\n\tconst theme = themePath === void 0 ? void 0 : [...unzipFiles(bytes, (path) => isSamePart(path, themePath)).values()][0];\n\tif (theme === void 0) throw new Error(`The file has no theme: its main part, ${mainPart}, refers to none`);\n\treturn decode$1(theme);\n};\n/**\n* A theme color's 6-digit hex color: an RGB color's value, or a system color's last value. Unless `withSystemColors`,\n* the first dark and light colors are left out when they are the system's window text and window colors, as `docx`\n* writes them then.\n*/\nvar colorValue = (name, color, withSystemColors) => {\n\tconst [value] = childElements(color);\n\tconst hex = localName$1(value) === \"srgbClr\" ? attribute(value, \"val\") : localName$1(value) === \"sysClr\" && (withSystemColors || attribute(value, \"val\") !== DEFAULT_SYSTEM_COLORS.get(name)) ? attribute(value, \"lastClr\") : void 0;\n\treturn hex !== void 0 && /^[0-9A-Fa-f]{6}$/.test(hex) ? hex.toUpperCase() : void 0;\n};\nvar readColors = (scheme, withSystemColors = false) => Object.fromEntries(childElements(scheme).flatMap((color) => {\n\tconst name = COLOR_NAMES.get(localName$1(color));\n\tconst value = name && colorValue(name, color, withSystemColors);\n\treturn name && value ? [[name, value]] : [];\n}));\n/**\n* The colors of a theme's XML, each a 6-digit hex color, with the first dark and light colors as their last values when\n* they are system colors. The patcher writes theme colors in patches with the hex colors they come to in them.\n*/\nvar readThemeColorValues = (xml) => {\n\tconst [root] = childElements(parseXml(xml));\n\tconst scheme = localName$1(root) === \"theme\" ? child(child(root, \"themeElements\"), \"clrScheme\") : void 0;\n\treturn scheme ? readColors(scheme, true) : {};\n};\nvar typefaceOf = (font) => attribute(font, \"typeface\") || void 0;\nvar readFont = (collection) => {\n\tconst scripts = childElements(collection).filter((font) => localName$1(font) === \"font\").flatMap((font) => {\n\t\tconst script = attribute(font, \"script\");\n\t\tconst typeface = attribute(font, \"typeface\");\n\t\treturn script && typeface !== void 0 ? [[script, typeface]] : [];\n\t});\n\treturn defined({\n\t\tlatin: typefaceOf(child(collection, \"latin\")),\n\t\teastAsia: typefaceOf(child(collection, \"ea\")),\n\t\tcomplexScript: typefaceOf(child(collection, \"cs\")),\n\t\tscripts: scripts.length > 0 ? Object.fromEntries(scripts) : void 0\n\t});\n};\nvar readFonts = (scheme) => ({\n\theadings: readFont(child(scheme, \"majorFont\")),\n\tbody: readFont(child(scheme, \"minorFont\"))\n});\n/**\n* The XML of the theme the data is or has: the XML itself, as text or bytes, or the theme of a package.\n*/\nvar xmlOf = (data) => {\n\tif (typeof data === \"string\") return data;\n\tconst bytes = ArrayBuffer.isView(data) ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength) : new Uint8Array(data);\n\treturn isZip(bytes) ? packageThemeXml(bytes) : decode$1(bytes);\n};\n/**\n* Reads a theme, such as the theme of a Word document or template, as the options of a document's `theme`. The new\n* document then has the theme's colors and fonts, so the styles, tables and text that use them look as they do in the\n* file the theme came from:\n*\n* - its name;\n* - its colors, each an RGB color or a system color's last value;\n* - its fonts for headings and body text, with their fonts for East Asian text, complex scripts and each other script.\n*\n* The fills, lines and effects of shapes styled by the theme are Office's in the new document, as `docx` writes them.\n*\n* It reads the colors or fonts Word saves on their own too, from Design > Colors > Customize Colors or Design > Fonts >\n* Customize Fonts, as the theme's `colors` or `fonts`.\n*\n* @param data - A Word document or template (.docx, .docm, .dotx or .dotm), a PowerPoint presentation (.pptx), an Excel\n* workbook (.xlsx), an Office theme (.thmx), or the XML of a theme, such as a document's word/theme/theme1.xml, or of a\n* theme's colors or fonts, as text or bytes\n* @returns The theme's options, to give `Document`'s `theme`, or to change before giving it\n* @throws If the data isn't one of those, or the file has no theme\n*\n* @example\n* ```typescript\n* import * as fs from \"fs\";\n* import { Document, readTheme } from \"docx\";\n*\n* // The template's styles, and its theme, whose colors and fonts its styles use\n* const doc = new Document({\n* theme: readTheme(fs.readFileSync(\"template.dotx\")),\n* externalStyles: fs.readFileSync(\"styles.xml\", \"utf-8\"),\n* sections: [],\n* });\n* ```\n*/\nvar readTheme = (data) => {\n\tconst [root] = childElements(parseXml(xmlOf(data)));\n\tif (localName$1(root) === \"clrScheme\") return { colors: readColors(root) };\n\tif (localName$1(root) === \"fontScheme\") return { fonts: readFonts(root) };\n\tif (localName$1(root) !== \"theme\") {\n\t\tvar _root$name;\n\t\tthrow new Error(`Invalid theme: expected the XML of a theme, such as a document's word/theme/theme1.xml, but its root element is ${(_root$name = root === null || root === void 0 ? void 0 : root.name) !== null && _root$name !== void 0 ? _root$name : \"missing\"}`);\n\t}\n\tconst elements = child(root, \"themeElements\");\n\tconst colorScheme = child(elements, \"clrScheme\");\n\tconst fontScheme = child(elements, \"fontScheme\");\n\treturn defined({\n\t\tname: attribute(root, \"name\") || void 0,\n\t\tcolors: colorScheme && readColors(colorScheme),\n\t\tfonts: fontScheme && readFonts(fontScheme)\n\t});\n};\n// src/file/file.ts\n/**\n* File module for WordprocessingML documents.\n*\n* The File class is the main entry point for creating DOCX documents.\n* It manages all document parts including content, styles, numbering, and media.\n*\n* @module\n*/\nvar COMPOUND_FILE_SIGNATURE = [\n\t208,\n\t207,\n\t17,\n\t224,\n\t161,\n\t177,\n\t26,\n\t225\n];\n/**\n* Represents a Word document file.\n*\n* The File class (exported as `Document`) is the main entry point for creating DOCX documents.\n* It manages all document components including content, styles, numbering, headers/footers,\n* and media. Documents are organized into sections, each of which can have its own page\n* settings, headers, and footers.\n*\n* This class handles the assembly of all OOXML parts required for a valid .docx file,\n* including relationships, content types, and document properties.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* // Simple document with one section\n* const doc = new Document({\n* sections: [{\n* children: [\n* new Paragraph(\"Hello World\"),\n* ],\n* }],\n* });\n*\n* // Document with multiple sections and headers/footers\n* const doc = new Document({\n* creator: \"John Doe\",\n* sections: [\n* {\n* headers: {\n* default: new Header({\n* children: [new Paragraph(\"Header Text\")],\n* }),\n* },\n* children: [\n* new Paragraph(\"Section 1 content\"),\n* ],\n* },\n* {\n* children: [\n* new Paragraph(\"Section 2 content\"),\n* ],\n* },\n* ],\n* });\n*\n* // Document with custom styles and numbering\n* const doc = new Document({\n* styles: {\n* paragraphStyles: [\n* {\n* id: \"MyHeading\",\n* name: \"My Heading\",\n* basedOn: \"Heading1\",\n* run: { bold: true, color: \"FF0000\" },\n* },\n* ],\n* },\n* numbering: {\n* config: [\n* {\n* reference: \"my-numbering\",\n* levels: [\n* { level: 0, format: \"decimal\", text: \"%1.\", alignment: \"left\" },\n* ],\n* },\n* ],\n* },\n* sections: [{\n* children: [new Paragraph(\"Content\")],\n* }],\n* });\n* ```\n*/\nvar File = class {\n\tconstructor(options) {\n\t\tvar _options$creator, _options$revision, _options$lastModified, _options$comments, _options$customProper, _this$macros, _options$features, _options$features2, _options$fonts, _options$hyphenation, _options$hyphenation2, _options$hyphenation3, _options$hyphenation4, _options$fonts2;\n\t\t_defineProperty(this, \"currentRelationshipId\", 1);\n\t\t_defineProperty(this, \"documentWrapper\", void 0);\n\t\t_defineProperty(this, \"headers\", []);\n\t\t_defineProperty(this, \"footers\", []);\n\t\t_defineProperty(this, \"coreProperties\", void 0);\n\t\t_defineProperty(this, \"numbering\", void 0);\n\t\t_defineProperty(this, \"media\", void 0);\n\t\t_defineProperty(this, \"fileRelationships\", void 0);\n\t\t_defineProperty(this, \"footnotesWrapper\", void 0);\n\t\t_defineProperty(this, \"endnotesWrapper\", void 0);\n\t\t_defineProperty(this, \"settings\", void 0);\n\t\t_defineProperty(this, \"contentTypes\", void 0);\n\t\t_defineProperty(this, \"customProperties\", void 0);\n\t\t_defineProperty(this, \"appProperties\", void 0);\n\t\t_defineProperty(this, \"styles\", void 0);\n\t\t_defineProperty(this, \"comments\", void 0);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** Extended comment data for reply threading and resolved state (word/commentsExtended.xml). */\n\t\t\t\"commentsExtended\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** Durable comment id mapping (word/commentsIds.xml). */\n\t\t\t\"commentsIds\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(this, \"fontWrapper\", void 0);\n\t\t_defineProperty(this, \"theme\", void 0);\n\t\t_defineProperty(this, \"packageParts\", void 0);\n\t\t_defineProperty(this, \"macros\", void 0);\n\t\t_defineProperty(this, \"bibliography\", void 0);\n\t\tif (options.macros !== void 0) {\n\t\t\tconst { project, events = [] } = options.macros;\n\t\t\tconst bytes = project instanceof Uint8Array ? project : new Uint8Array(project);\n\t\t\tif (!COMPOUND_FILE_SIGNATURE.every((byte, index) => bytes[index] === byte)) throw new Error(\"macros.project isn't a VBA project. Use createMacros from docx/macros, or the word/vbaProject.bin in a .docm rather than the .docm itself\");\n\t\t\tconst relationships = new Relationships();\n\t\t\tif (events.length > 0) relationships.addRelationship(1, \"http://schemas.microsoft.com/office/2006/relationships/wordVbaData\", \"vbaData.xml\");\n\t\t\tthis.macros = {\n\t\t\t\tproject: bytes,\n\t\t\t\tevents: events.length > 0 ? createMacroEvents(events) : void 0,\n\t\t\t\trelationships\n\t\t\t};\n\t\t}\n\t\tthis.coreProperties = new CoreProperties(_objectSpread2(_objectSpread2({}, options), {}, {\n\t\t\tcreator: (_options$creator = options.creator) !== null && _options$creator !== void 0 ? _options$creator : \"Un-named\",\n\t\t\trevision: (_options$revision = options.revision) !== null && _options$revision !== void 0 ? _options$revision : 1,\n\t\t\tlastModifiedBy: (_options$lastModified = options.lastModifiedBy) !== null && _options$lastModified !== void 0 ? _options$lastModified : \"Un-named\"\n\t\t}));\n\t\tthis.numbering = new Numbering(options.numbering ? options.numbering : { config: [] });\n\t\tthis.comments = new Comments((_options$comments = options.comments) !== null && _options$comments !== void 0 ? _options$comments : { children: [] });\n\t\tif (this.comments.ThreadData) this.commentsExtended = new CommentsExtended(this.comments.ThreadData);\n\t\tif (this.comments.CommentIdsData) this.commentsIds = new CommentsIds(this.comments.CommentIdsData);\n\t\tthis.fileRelationships = new Relationships();\n\t\tthis.customProperties = new CustomProperties((_options$customProper = options.customProperties) !== null && _options$customProper !== void 0 ? _options$customProper : []);\n\t\tthis.appProperties = new AppProperties();\n\t\tthis.footnotesWrapper = new FootnotesWrapper();\n\t\tthis.endnotesWrapper = new EndnotesWrapper();\n\t\tthis.contentTypes = new ContentTypes({ macros: this.macros !== void 0 });\n\t\tif (((_this$macros = this.macros) === null || _this$macros === void 0 ? void 0 : _this$macros.events) !== void 0) this.contentTypes.addOverride(\"application/vnd.ms-word.vbaData+xml\", \"/word/vbaData.xml\");\n\t\tif (options.bibliography !== void 0) {\n\t\t\tconst relationships = new Relationships();\n\t\t\trelationships.addRelationship(1, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps\", \"itemProps1.xml\");\n\t\t\tthis.bibliography = {\n\t\t\t\tsources: options.bibliography.sources,\n\t\t\t\tproperties: createSourcesProperties(`{${uniqueUuid().toUpperCase()}}`),\n\t\t\t\trelationships\n\t\t\t};\n\t\t\tthis.contentTypes.addOverride(\"application/vnd.openxmlformats-officedocument.customXmlProperties+xml\", \"/customXml/itemProps1.xml\");\n\t\t}\n\t\tthis.packageParts = new PackageParts(this.contentTypes);\n\t\tthis.documentWrapper = new DocumentWrapper({\n\t\t\tbackground: options.background,\n\t\t\tpageNumbers: options.pageNumbers\n\t\t});\n\t\tthis.settings = new Settings({\n\t\t\tcompatibilityModeVersion: options.compatabilityModeVersion,\n\t\t\tcompatibility: options.compatibility,\n\t\t\tevenAndOddHeaders: options.evenAndOddHeaderAndFooters ? true : false,\n\t\t\ttrackRevisions: (_options$features = options.features) === null || _options$features === void 0 ? void 0 : _options$features.trackRevisions,\n\t\t\tupdateFields: (_options$features2 = options.features) === null || _options$features2 === void 0 ? void 0 : _options$features2.updateFields,\n\t\t\tembedFonts: ((_options$fonts = options.fonts) === null || _options$fonts === void 0 ? void 0 : _options$fonts.length) ? true : void 0,\n\t\t\tdefaultTabStop: options.defaultTabStop,\n\t\t\tprotection: options.protection,\n\t\t\thyphenation: {\n\t\t\t\tautoHyphenation: (_options$hyphenation = options.hyphenation) === null || _options$hyphenation === void 0 ? void 0 : _options$hyphenation.autoHyphenation,\n\t\t\t\thyphenationZone: (_options$hyphenation2 = options.hyphenation) === null || _options$hyphenation2 === void 0 ? void 0 : _options$hyphenation2.hyphenationZone,\n\t\t\t\tconsecutiveHyphenLimit: (_options$hyphenation3 = options.hyphenation) === null || _options$hyphenation3 === void 0 ? void 0 : _options$hyphenation3.consecutiveHyphenLimit,\n\t\t\t\tdoNotHyphenateCaps: (_options$hyphenation4 = options.hyphenation) === null || _options$hyphenation4 === void 0 ? void 0 : _options$hyphenation4.doNotHyphenateCaps\n\t\t\t}\n\t\t});\n\t\tthis.media = new Media();\n\t\tif (options.externalStyles !== void 0) {\n\t\t\tvar _options$styles$defau, _options$styles, _options$styles2, _options$styles3;\n\t\t\tconst given = (_options$styles$defau = (_options$styles = options.styles) === null || _options$styles === void 0 ? void 0 : _options$styles.default) !== null && _options$styles$defau !== void 0 ? _options$styles$defau : {};\n\t\t\tconst defaultStyles = Object.entries(createDefaultStyles(given));\n\t\t\tconst isGiven = ([key]) => given[key] !== void 0;\n\t\t\tconst externalStyles = new ExternalStylesFactory().newInstance(options.externalStyles);\n\t\t\tthis.styles = new Styles(_objectSpread2(_objectSpread2({}, externalStyles), {}, {\n\t\t\t\tparagraphStyles: (_options$styles2 = options.styles) === null || _options$styles2 === void 0 ? void 0 : _options$styles2.paragraphStyles,\n\t\t\t\tcharacterStyles: (_options$styles3 = options.styles) === null || _options$styles3 === void 0 ? void 0 : _options$styles3.characterStyles,\n\t\t\t\timportedStyles: [\n\t\t\t\t\t...defaultStyles.filter((entry) => !isGiven(entry)).map(([, style]) => style),\n\t\t\t\t\t...externalStyles.importedStyles,\n\t\t\t\t\t...defaultStyles.filter(isGiven).map(([, style]) => style)\n\t\t\t\t]\n\t\t\t}));\n\t\t} else if (options.styles) {\n\t\t\tconst defaultStyles = new DefaultStylesFactory().newInstance(options.styles.default);\n\t\t\tthis.styles = new Styles(_objectSpread2(_objectSpread2({}, defaultStyles), options.styles));\n\t\t} else {\n\t\t\tconst stylesFactory = new DefaultStylesFactory();\n\t\t\tthis.styles = new Styles(stylesFactory.newInstance());\n\t\t}\n\t\tthis.addDefaultRelationships();\n\t\tfor (const section of options.sections) this.addSection(section);\n\t\tif (options.footnotes) for (const key in options.footnotes) this.footnotesWrapper.View.createFootNote(parseFloat(key), options.footnotes[key].children);\n\t\tif (options.endnotes) for (const key in options.endnotes) this.endnotesWrapper.View.createEndnote(parseFloat(key), options.endnotes[key].children);\n\t\tthis.fontWrapper = new FontWrapper((_options$fonts2 = options.fonts) !== null && _options$fonts2 !== void 0 ? _options$fonts2 : []);\n\t\tthis.theme = new Theme(options.theme);\n\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\", \"theme/theme1.xml\");\n\t\tif (this.macros !== void 0) this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.microsoft.com/office/2006/relationships/vbaProject\", \"vbaProject.bin\");\n\t\tif (this.bibliography !== void 0) this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml\", \"../customXml/item1.xml\");\n\t}\n\taddSection({ headers = {}, footers = {}, children, properties }) {\n\t\tthis.documentWrapper.View.Body.addSection(_objectSpread2(_objectSpread2({}, properties), {}, {\n\t\t\theaderWrapperGroup: {\n\t\t\t\tdefault: headers.default ? this.createHeader(headers.default) : void 0,\n\t\t\t\tfirst: headers.first ? this.createHeader(headers.first) : void 0,\n\t\t\t\teven: headers.even ? this.createHeader(headers.even) : void 0\n\t\t\t},\n\t\t\tfooterWrapperGroup: {\n\t\t\t\tdefault: footers.default ? this.createFooter(footers.default) : void 0,\n\t\t\t\tfirst: footers.first ? this.createFooter(footers.first) : void 0,\n\t\t\t\teven: footers.even ? this.createFooter(footers.even) : void 0\n\t\t\t}\n\t\t}));\n\t\tfor (const child of children) this.documentWrapper.View.add(child);\n\t}\n\tcreateHeader(header) {\n\t\tconst wrapper = new HeaderWrapper(this.media, this.currentRelationshipId++);\n\t\tfor (const child of header.options.children) wrapper.add(child);\n\t\tthis.addHeaderToDocument(wrapper);\n\t\treturn wrapper;\n\t}\n\tcreateFooter(footer) {\n\t\tconst wrapper = new FooterWrapper(this.media, this.currentRelationshipId++);\n\t\tfor (const child of footer.options.children) wrapper.add(child);\n\t\tthis.addFooterToDocument(wrapper);\n\t\treturn wrapper;\n\t}\n\taddHeaderToDocument(header, type = HeaderFooterReferenceType.DEFAULT) {\n\t\tthis.headers.push({\n\t\t\theader,\n\t\t\ttype\n\t\t});\n\t\tthis.documentWrapper.Relationships.addRelationship(header.View.ReferenceId, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header\", `header${this.headers.length}.xml`);\n\t\tthis.contentTypes.addHeader(this.headers.length);\n\t}\n\taddFooterToDocument(footer, type = HeaderFooterReferenceType.DEFAULT) {\n\t\tthis.footers.push({\n\t\t\tfooter,\n\t\t\ttype\n\t\t});\n\t\tthis.documentWrapper.Relationships.addRelationship(footer.View.ReferenceId, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer\", `footer${this.footers.length}.xml`);\n\t\tthis.contentTypes.addFooter(this.footers.length);\n\t}\n\taddDefaultRelationships() {\n\t\tthis.fileRelationships.addRelationship(1, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\", \"word/document.xml\");\n\t\tthis.fileRelationships.addRelationship(2, \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\", \"docProps/core.xml\");\n\t\tthis.fileRelationships.addRelationship(3, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\", \"docProps/app.xml\");\n\t\tthis.fileRelationships.addRelationship(4, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties\", \"docProps/custom.xml\");\n\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\", \"styles.xml\");\n\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering\", \"numbering.xml\");\n\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes\", \"footnotes.xml\");\n\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes\", \"endnotes.xml\");\n\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings\", \"settings.xml\");\n\t\tif (!this.comments.IsEmpty) {\n\t\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments\", \"comments.xml\");\n\t\t\tthis.contentTypes.addComments();\n\t\t}\n\t\tif (this.commentsExtended) {\n\t\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.microsoft.com/office/2011/relationships/commentsExtended\", \"commentsExtended.xml\");\n\t\t\tthis.contentTypes.addCommentsExtended();\n\t\t}\n\t\tif (this.commentsIds) {\n\t\t\tthis.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++, \"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds\", \"commentsIds.xml\");\n\t\t\tthis.contentTypes.addCommentsIds();\n\t\t}\n\t}\n\tget Document() {\n\t\treturn this.documentWrapper;\n\t}\n\tget Styles() {\n\t\treturn this.styles;\n\t}\n\tget CoreProperties() {\n\t\treturn this.coreProperties;\n\t}\n\tget Numbering() {\n\t\treturn this.numbering;\n\t}\n\tget Media() {\n\t\treturn this.media;\n\t}\n\tget FileRelationships() {\n\t\treturn this.fileRelationships;\n\t}\n\tget Headers() {\n\t\treturn this.headers.map((item) => item.header);\n\t}\n\tget Footers() {\n\t\treturn this.footers.map((item) => item.footer);\n\t}\n\tget ContentTypes() {\n\t\treturn this.contentTypes;\n\t}\n\tget CustomProperties() {\n\t\treturn this.customProperties;\n\t}\n\tget AppProperties() {\n\t\treturn this.appProperties;\n\t}\n\tget FootNotes() {\n\t\treturn this.footnotesWrapper;\n\t}\n\tget Endnotes() {\n\t\treturn this.endnotesWrapper;\n\t}\n\tget Settings() {\n\t\treturn this.settings;\n\t}\n\tget Comments() {\n\t\treturn this.comments;\n\t}\n\t/** Extended comments part for reply threading. Undefined when no comment threads exist. */\n\tget CommentsExtended() {\n\t\treturn this.commentsExtended;\n\t}\n\t/** Durable comment id part. Undefined when no comment carries a durableId. */\n\tget CommentsIds() {\n\t\treturn this.commentsIds;\n\t}\n\tget FontTable() {\n\t\treturn this.fontWrapper;\n\t}\n\t/** The document's theme (word/theme/theme1.xml). */\n\tget Theme() {\n\t\treturn this.theme;\n\t}\n\t/** The parts that drawings, such as charts, add to the package when it is written. */\n\tget PackageParts() {\n\t\treturn this.packageParts;\n\t}\n\t/**\n\t* The document's macros, when it has any: its VBA project (word/vbaProject.bin), the events of the document it\n\t* handles (word/vbaData.xml), and the project's relationships, to the events.\n\t*/\n\tget Macros() {\n\t\treturn this.macros;\n\t}\n\t/**\n\t* The document's sources, when it has a bibliography: the part they're in (customXml/item1.xml), its properties\n\t* (customXml/itemProps1.xml), and its relationships, to its properties.\n\t*/\n\tget Bibliography() {\n\t\treturn this.bibliography;\n\t}\n};\n// src/file/table-of-contents/sdt-properties.ts\n/**\n* Structured Document Tag Properties module.\n*\n* This module represents the properties of a structured document tag,\n* such as aliases and other metadata.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_sdtPr-1.html\n*\n* @module\n*/\n/**\n* Represents the properties of a Structured Document Tag.\n*\n* The StructuredDocumentTagProperties defines metadata for a structured document tag,\n* including display names (aliases), tags, and content control types.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_sdtPr-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtPr\">\n* <xsd:sequence>\n* <xsd:element name=\"rPr\" type=\"CT_RPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"alias\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"tag\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"id\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"lock\" type=\"CT_Lock\" minOccurs=\"0\"/>\n* <xsd:element name=\"placeholder\" type=\"CT_Placeholder\" minOccurs=\"0\"/>\n* <xsd:element name=\"temporary\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"showingPlcHdr\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"dataBinding\" type=\"CT_DataBinding\" minOccurs=\"0\"/>\n* <xsd:element name=\"label\" type=\"CT_DecimalNumber\" minOccurs=\"0\"/>\n* <xsd:element name=\"tabIndex\" type=\"CT_UnsignedDecimalNumber\" minOccurs=\"0\"/>\n* <xsd:choice minOccurs=\"0\" maxOccurs=\"1\">\n* <xsd:element name=\"equation\" type=\"CT_Empty\"/>\n* <xsd:element name=\"comboBox\" type=\"CT_SdtComboBox\"/>\n* <xsd:element name=\"date\" type=\"CT_SdtDate\"/>\n* ...\n* </xsd:choice>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Create properties with an alias\n* new StructuredDocumentTagProperties(\"Table of Contents\");\n* ```\n*/\nvar StructuredDocumentTagProperties = class extends XmlComponent {\n\tconstructor(alias) {\n\t\tsuper(\"w:sdtPr\");\n\t\tif (alias) this.root.push(new StringValueElement(\"w:alias\", alias));\n\t}\n};\n/**\n* Creates the document part properties of a Structured Document Tag, which make it one of Word's building blocks of the\n* gallery named, such as \"Table of Contents\". Word then shows the content control with the gallery's commands, such as\n* Update Table for a table of contents. It is unique, so inserting another from the gallery replaces it.\n*\n* Reference: http://www.datypic.com/sc/ooxml/e-w_docPartObj-1.html\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtDocPart\">\n* <xsd:sequence>\n* <xsd:element name=\"docPartGallery\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"docPartCategory\" type=\"CT_String\" minOccurs=\"0\"/>\n* <xsd:element name=\"docPartUnique\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* createDocumentPartObject(\"Table of Contents\");\n* ```\n*/\nvar createDocumentPartObject = (gallery) => new BuilderElement({\n\tname: \"w:docPartObj\",\n\tchildren: [new StringValueElement(\"w:docPartGallery\", gallery), new BuilderElement({ name: \"w:docPartUnique\" })]\n});\n// src/file/table-of-contents/table-of-contents.ts\n/**\n* Table of Contents module for WordprocessingML documents.\n*\n* This module provides support for generating a table of contents\n* based on heading styles in the document.\n*\n* Reference: http://officeopenxml.com/WPtableOfContents.php\n*\n* @module\n*/\nvar _excluded$2 = [\n\t\"contentChildren\",\n\t\"cachedEntries\",\n\t\"beginDirty\",\n\t\"tabLeader\"\n];\n/**\n* Represents a Table of Contents in a WordprocessingML document.\n*\n* TableOfContents creates an auto-generated list of document headings\n* with page numbers. It uses a TOC field code to generate entries.\n*\n* Unless it is given `cachedEntries` or `contentChildren`, it is written with an\n* entry for each heading its options include, linked to a bookmark on the heading,\n* so it isn't empty before Word updates it or in applications that don't update it.\n* The page numbers are left for Word to fill in when it updates the field, unless the document's `pageNumbers`\n* writes them.\n*\n* It is written in a content control of Word's Table of Contents gallery, as Word writes its own, so Word shows it as a\n* table of contents, with Update Table, rather than as a content control named by its alias.\n*\n* Reference: http://officeopenxml.com/WPtableOfContents.php\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtBlock\">\n* <xsd:sequence>\n* <xsd:element name=\"sdtPr\" type=\"CT_SdtPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"sdtEndPr\" type=\"CT_SdtEndPr\" minOccurs=\"0\"/>\n* <xsd:element name=\"sdtContent\" type=\"CT_SdtContentBlock\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* new TableOfContents(\"Contents\", {\n* hyperlink: true,\n* headingStyleRange: \"1-3\",\n* });\n* ```\n*/\nvar TableOfContents = class extends FileChild {\n\tconstructor(alias = \"Table of Contents\", _ref = {}) {\n\t\tlet { contentChildren = [], cachedEntries = [], beginDirty, tabLeader = LeaderType.DOT } = _ref, properties = _objectWithoutProperties(_ref, _excluded$2);\n\t\tsuper(\"w:sdt\");\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** What it is filled in with from the headings, when it isn't given its content */\n\t\t\t\"fromHeadings\",\n\t\t\tvoid 0\n\t\t);\n\t\tconst sdtProperties = new StructuredDocumentTagProperties(alias);\n\t\tsdtProperties.addChildElement(createDocumentPartObject(\"Table of Contents\"));\n\t\tthis.root.push(sdtProperties);\n\t\tconst content = new StructuredDocumentTagContent();\n\t\tconst beginParagraphMandatoryChildren = [new Run({ children: [\n\t\t\tbeginOf(beginDirty),\n\t\t\tnew FieldInstruction(properties),\n\t\t\tcreateSeparate()\n\t\t] })];\n\t\tconst endParagraphMandatoryChildren = [new Run({ children: [createEnd()] })];\n\t\tif (cachedEntries !== void 0 && cachedEntries.length > 0) {\n\t\t\tconst { stylesWithLevels } = properties;\n\t\t\tconst cachedParagraphs = cachedEntries.map((entry, i) => {\n\t\t\t\tvar _stylesWithLevels$fin, _stylesWithLevels$fin2;\n\t\t\t\tconst contentChild = this.buildCachedContentParagraphChild(entry, properties);\n\t\t\t\tconst style = (_stylesWithLevels$fin = stylesWithLevels === null || stylesWithLevels === void 0 || (_stylesWithLevels$fin2 = stylesWithLevels.find((s) => s.level === entry.level)) === null || _stylesWithLevels$fin2 === void 0 ? void 0 : _stylesWithLevels$fin2.styleName) !== null && _stylesWithLevels$fin !== void 0 ? _stylesWithLevels$fin : `TOC${entry.level}`;\n\t\t\t\tconst children = i === 0 ? [...beginParagraphMandatoryChildren, contentChild] : i === cachedEntries.length - 1 ? [contentChild, ...endParagraphMandatoryChildren] : [contentChild];\n\t\t\t\treturn new Paragraph({\n\t\t\t\t\tstyle,\n\t\t\t\t\ttabStops: this.getTabStopsForLevel(entry.level, tabLeader),\n\t\t\t\t\tchildren\n\t\t\t\t});\n\t\t\t});\n\t\t\tlet paragraphs = cachedParagraphs;\n\t\t\tif (cachedEntries.length <= 1) paragraphs = [...cachedParagraphs, new Paragraph({ children: endParagraphMandatoryChildren })];\n\t\t\tfor (const paragraph of paragraphs) content.addChildElement(paragraph);\n\t\t} else {\n\t\t\tconst beginParagraph = new Paragraph({ children: beginParagraphMandatoryChildren });\n\t\t\tcontent.addChildElement(beginParagraph);\n\t\t\tfor (const child of contentChildren) content.addChildElement(child);\n\t\t\tconst endParagraph = new Paragraph({ children: endParagraphMandatoryChildren });\n\t\t\tcontent.addChildElement(endParagraph);\n\t\t\tif (contentChildren.length === 0) this.fromHeadings = {\n\t\t\t\tproperties,\n\t\t\t\tbeginDirty,\n\t\t\t\ttabLeader\n\t\t\t};\n\t\t}\n\t\tthis.root.push(content);\n\t}\n\t/**\n\t* Written empty, and filled in from the headings once the body it is in is written, unless it was given its content.\n\t* The page numbers are aligned to the right of the text in its section.\n\t*/\n\tprepForXml(context) {\n\t\tconst xml = super.prepForXml(context);\n\t\trecordTableOfContents(xml, this.fromHeadings && _objectSpread2(_objectSpread2({}, this.fromHeadings), {}, { textWidth: this.textWidthIn(context) }));\n\t\treturn xml;\n\t}\n\t/** The width of the text in the section it is in */\n\ttextWidthIn(context) {\n\t\tvar _context$file$Documen, _context$file;\n\t\treturn (_context$file$Documen = (_context$file = context.file) === null || _context$file === void 0 || (_context$file = _context$file.Document) === null || _context$file === void 0 || (_context$file = _context$file.View.Body.getSectionPropertiesFor(this)) === null || _context$file === void 0 ? void 0 : _context$file.AvailableTextWidth) !== null && _context$file$Documen !== void 0 ? _context$file$Documen : DEFAULT_AVAILABLE_WIDTH;\n\t}\n\tgetTabStopsForLevel(level, leader, pageWidth = 9025) {\n\t\treturn [{\n\t\t\ttype: \"clear\",\n\t\t\tposition: pageWidth + 1 - (level - 1) * 240\n\t\t}, {\n\t\t\ttype: \"right\",\n\t\t\tposition: pageWidth,\n\t\t\tleader\n\t\t}];\n\t}\n\tbuildCachedContentRun(entry, properties) {\n\t\tvar _entry$page$toString, _entry$page;\n\t\treturn new Run({\n\t\t\tstyle: (properties === null || properties === void 0 ? void 0 : properties.hyperlink) && entry.href !== void 0 ? \"IndexLink\" : void 0,\n\t\t\tchildren: [\n\t\t\t\tnew Text({ text: entry.title }),\n\t\t\t\tnew Tab(),\n\t\t\t\tnew Text({ text: (_entry$page$toString = (_entry$page = entry.page) === null || _entry$page === void 0 ? void 0 : _entry$page.toString()) !== null && _entry$page$toString !== void 0 ? _entry$page$toString : \"\" })\n\t\t\t]\n\t\t});\n\t}\n\tbuildCachedContentParagraphChild(entry, properties) {\n\t\tconst run = this.buildCachedContentRun(entry, properties);\n\t\tif ((properties === null || properties === void 0 ? void 0 : properties.hyperlink) && entry.href !== void 0) return new InternalHyperlink({\n\t\t\tanchor: entry.href,\n\t\t\tchildren: [run]\n\t\t});\n\t\treturn run;\n\t}\n};\n// src/file/table-of-contents/table-of-contents-properties.ts\n/**\n* Table of Contents Properties module.\n*\n* This module defines configuration options for table of contents generation,\n* including field switches and style mappings.\n*\n* Reference: http://officeopenxml.com/WPtableOfContents.php\n*\n* @module\n*/\n/**\n* Represents a style-to-level mapping for table of contents entries.\n*\n* StyleLevel associates a paragraph style name with a TOC level, allowing\n* custom styles to be included in the table of contents at specific levels.\n*\n* @publicApi\n*/\nvar StyleLevel = class {\n\tconstructor(styleName, level) {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The name of the paragraph style. */\n\t\t\t\"styleName\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** The TOC level (1-9) to assign to this style. */\n\t\t\t\"level\",\n\t\t\tvoid 0\n\t\t);\n\t\tthis.styleName = styleName;\n\t\tthis.level = level;\n\t}\n};\n// src/file/header.ts\n/**\n* Represents a document header.\n*\n* Headers appear at the top of each page in a section and can contain\n* paragraphs, tables, images, and other content.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* const header = new Header({\n* children: [\n* new Paragraph({ children: [new TextRun(\"Company Name\")] }),\n* ],\n* });\n* ```\n*/\nvar Header = class {\n\tconstructor(options = { children: [] }) {\n\t\t_defineProperty(this, \"options\", void 0);\n\t\tthis.options = options;\n\t}\n};\n/**\n* Represents a document footer.\n*\n* Footers appear at the bottom of each page in a section and can contain\n* paragraphs, tables, images, and other content.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* const footer = new Footer({\n* children: [\n* new Paragraph({ children: [new TextRun(\"Page \"), PageNumber.CURRENT] }),\n* ],\n* });\n* ```\n*/\nvar Footer = class {\n\tconstructor(options = { children: [] }) {\n\t\t_defineProperty(this, \"options\", void 0);\n\t\tthis.options = options;\n\t}\n};\n// src/file/footnotes/footnote/run/reference-run.ts\n/**\n* Represents the attributes for a footnote reference element.\n*\n* @internal\n*/\nvar FootNoteReferenceRunAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { id: \"w:id\" });\n\t}\n};\n/**\n* Represents a footnote reference element in WordprocessingML.\n*\n* FootnoteReference creates the link between the main document text\n* and the footnote content by using a unique identifier.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_FtnEdnRef\">\n* <xsd:attribute name=\"customMarkFollows\" type=\"s:ST_OnOff\" use=\"optional\"/>\n* <xsd:attribute name=\"id\" use=\"required\" type=\"ST_DecimalNumber\"/>\n* </xsd:complexType>\n* ```\n*\n* @internal\n*/\nvar FootnoteReference = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:footnoteReference\");\n\t\tthis.root.push(new FootNoteReferenceRunAttributes({ id }));\n\t}\n};\n/**\n* Represents a footnote reference run in a WordprocessingML document.\n*\n* FootnoteReferenceRun creates a run containing a footnote reference marker\n* (typically a superscript number) that appears in the main document text.\n* Clicking this marker navigates to the corresponding footnote content.\n*\n* It refers to one of the document's `footnotes` by its id, or is given its footnote's content, for a footnote of its\n* own, which is added to the document's footnotes when the run is written. Content made before the document it goes\n* in, such as by a function that makes paragraphs, then brings its footnotes with it.\n*\n* Reference: http://officeopenxml.com/WPfootnotes.php\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* // Add a footnote reference in a paragraph\n* new Paragraph({\n* children: [\n* new TextRun(\"This text has a footnote\"),\n* new FootnoteReferenceRun(1),\n* ],\n* });\n*\n* // Or with the footnote's content\n* new Paragraph({\n* children: [\n* new TextRun(\"This text has a footnote of its own\"),\n* new FootnoteReferenceRun({ children: [new Paragraph(\"The footnote.\")] }),\n* ],\n* });\n* ```\n*/\nvar FootnoteReferenceRun = class extends Run {\n\t/**\n\t* Creates a new footnote reference run.\n\t*\n\t* @param footnote - The id of one of the document's `footnotes`, or the footnote's content, for a footnote of the\n\t* run's own. Word has footnotes only in a document's body, so a run with its footnote's content is left out of\n\t* headers, footers, comments and notes\n\t*/\n\tconstructor(footnote) {\n\t\tsuper({ style: \"FootnoteReference\" });\n\t\t_defineProperty(this, \"footnote\", void 0);\n\t\tif (typeof footnote === \"number\") this.root.push(new FootnoteReference(footnote));\n\t\telse this.footnote = footnote;\n\t}\n\t/**\n\t* Formats the run, with its own footnote added to the document's footnotes, and referred to by the id it has there.\n\t*/\n\tprepForXml(context) {\n\t\tvar _context$file;\n\t\tif (this.footnote === void 0) return super.prepForXml(context);\n\t\tconst id = (_context$file = context.file) === null || _context$file === void 0 ? void 0 : _context$file.FootNotes.View.idOf(this, this.footnote, context);\n\t\tif (id === void 0) return;\n\t\tthis.root.push(new FootnoteReference(id));\n\t\ttry {\n\t\t\treturn super.prepForXml(context);\n\t\t} finally {\n\t\t\tthis.root.pop();\n\t\t}\n\t}\n};\n// src/file/endnotes/endnote/run/reference-run.ts\nvar EndnoteReferenceRunAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", { id: \"w:id\" });\n\t}\n};\nvar EndnoteIdReference = class extends XmlComponent {\n\tconstructor(id) {\n\t\tsuper(\"w:endnoteReference\");\n\t\tthis.root.push(new EndnoteReferenceRunAttributes({ id }));\n\t}\n};\n/**\n* A run with an endnote's reference mark, its number, in the document's text.\n*\n* It refers to one of the document's `endnotes` by its id, or is given its endnote's content, for an endnote of its\n* own, which is added to the document's endnotes when the run is written.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* new Paragraph({\n* children: [new TextRun(\"A claim\"), new EndnoteReferenceRun({ children: [new Paragraph(\"Its source.\")] })],\n* });\n* ```\n*/\nvar EndnoteReferenceRun = class extends Run {\n\t/**\n\t* @param endnote - The id of one of the document's `endnotes`, or the endnote's content, for an endnote of the run's\n\t* own. Word has endnotes only in a document's body, so a run with its endnote's content is left out of headers,\n\t* footers, comments and notes\n\t*/\n\tconstructor(endnote) {\n\t\tsuper({ style: \"EndnoteReference\" });\n\t\t_defineProperty(this, \"endnote\", void 0);\n\t\tif (typeof endnote === \"number\") this.root.push(new EndnoteIdReference(endnote));\n\t\telse this.endnote = endnote;\n\t}\n\t/**\n\t* Formats the run, with its own endnote added to the document's endnotes, and referred to by the id it has there.\n\t*/\n\tprepForXml(context) {\n\t\tvar _context$file;\n\t\tif (this.endnote === void 0) return super.prepForXml(context);\n\t\tconst id = (_context$file = context.file) === null || _context$file === void 0 ? void 0 : _context$file.Endnotes.View.idOf(this, this.endnote, context);\n\t\tif (id === void 0) return;\n\t\tthis.root.push(new EndnoteIdReference(id));\n\t\ttry {\n\t\t\treturn super.prepForXml(context);\n\t\t} finally {\n\t\t\tthis.root.pop();\n\t\t}\n\t}\n};\n// src/file/checkbox/checkbox-symbol.ts\n/**\n* CheckBox symbol module for WordprocessingML documents.\n*\n* Provides XML components for checkbox symbol states.\n*\n* @module\n*/\n/**\n* Attributes for a checkbox symbol element.\n*\n* Represents the font and value attributes for checkbox states.\n*\n* @property val - Hexadecimal character code for the symbol\n* @property symbolfont - Font family for rendering the symbol\n*/\nvar CheckboxSymbolAttributes = class extends XmlAttributeComponent {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\t_defineProperty(this, \"xmlKeys\", {\n\t\t\tval: \"w14:val\",\n\t\t\tsymbolfont: \"w14:font\"\n\t\t});\n\t}\n};\n/**\n* Represents a checkbox symbol element (checked or unchecked state).\n*\n* This element defines the appearance of a checkbox in a particular state,\n* specifying the Unicode character and font to render.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtCheckboxSymbol\">\n* <xsd:attribute name=\"font\" type=\"w:ST_String\"/>\n* <xsd:attribute name=\"val\" type=\"w:ST_ShortHexNumber\"/>\n* </xsd:complexType>\n* ```\n*\n* @example\n* ```typescript\n* // Checked state symbol\n* new CheckBoxSymbolElement(\"w14:checkedState\", \"2612\", \"MS Gothic\");\n*\n* // Unchecked state symbol\n* new CheckBoxSymbolElement(\"w14:uncheckedState\", \"2610\", \"MS Gothic\");\n*\n* // Symbol without explicit font\n* new CheckBoxSymbolElement(\"w14:checked\", \"1\");\n* ```\n*/\nvar CheckBoxSymbolElement = class extends XmlComponent {\n\tconstructor(name, val, font) {\n\t\tsuper(name);\n\t\tif (font) this.root.push(new CheckboxSymbolAttributes({\n\t\t\tval: shortHexNumber(val),\n\t\t\tsymbolfont: font\n\t\t}));\n\t\telse this.root.push(new CheckboxSymbolAttributes({ val }));\n\t}\n};\n// src/file/checkbox/checkbox-util.ts\n/**\n* CheckBox utility module for WordprocessingML documents.\n*\n* Provides the internal XML structure for checkbox content controls.\n*\n* @module\n*/\n/**\n* Represents the checkbox element within a structured document tag.\n*\n* This class generates the w14:checkbox element that defines the checkbox behavior,\n* including its checked state and the symbols used for checked and unchecked states.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtCheckbox\">\n* <xsd:sequence>\n* <xsd:element name=\"checked\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"checkedState\" type=\"CT_SdtCheckboxSymbol\" minOccurs=\"0\"/>\n* <xsd:element name=\"uncheckedState\" type=\"CT_SdtCheckboxSymbol\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* <xsd:element name=\"checkbox\" type=\"CT_SdtCheckbox\"/>\n* ```\n*\n* @example\n* ```typescript\n* // Default checkbox (unchecked with default symbols)\n* new CheckBoxUtil();\n*\n* // Checked checkbox with defaults\n* new CheckBoxUtil({ checked: true });\n*\n* // Custom symbols\n* new CheckBoxUtil({\n* checked: false,\n* checkedState: { value: \"2611\", font: \"Wingdings\" },\n* uncheckedState: { value: \"2610\", font: \"Wingdings\" },\n* });\n* ```\n*/\nvar CheckBoxUtil = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$checkedState, _options$checkedState2, _options$checkedState3, _options$checkedState4, _options$uncheckedSta, _options$uncheckedSta2, _options$uncheckedSta3, _options$uncheckedSta4;\n\t\tsuper(\"w14:checkbox\");\n\t\t_defineProperty(this, \"DEFAULT_UNCHECKED_SYMBOL\", \"2610\");\n\t\t_defineProperty(this, \"DEFAULT_CHECKED_SYMBOL\", \"2612\");\n\t\t_defineProperty(this, \"DEFAULT_FONT\", \"MS Gothic\");\n\t\tconst value = (options === null || options === void 0 ? void 0 : options.checked) ? \"1\" : \"0\";\n\t\tlet symbol;\n\t\tlet font;\n\t\tthis.root.push(new CheckBoxSymbolElement(\"w14:checked\", value));\n\t\tsymbol = (options === null || options === void 0 || (_options$checkedState = options.checkedState) === null || _options$checkedState === void 0 ? void 0 : _options$checkedState.value) ? options === null || options === void 0 || (_options$checkedState2 = options.checkedState) === null || _options$checkedState2 === void 0 ? void 0 : _options$checkedState2.value : this.DEFAULT_CHECKED_SYMBOL;\n\t\tfont = (options === null || options === void 0 || (_options$checkedState3 = options.checkedState) === null || _options$checkedState3 === void 0 ? void 0 : _options$checkedState3.font) ? options === null || options === void 0 || (_options$checkedState4 = options.checkedState) === null || _options$checkedState4 === void 0 ? void 0 : _options$checkedState4.font : this.DEFAULT_FONT;\n\t\tthis.root.push(new CheckBoxSymbolElement(\"w14:checkedState\", symbol, font));\n\t\tsymbol = (options === null || options === void 0 || (_options$uncheckedSta = options.uncheckedState) === null || _options$uncheckedSta === void 0 ? void 0 : _options$uncheckedSta.value) ? options === null || options === void 0 || (_options$uncheckedSta2 = options.uncheckedState) === null || _options$uncheckedSta2 === void 0 ? void 0 : _options$uncheckedSta2.value : this.DEFAULT_UNCHECKED_SYMBOL;\n\t\tfont = (options === null || options === void 0 || (_options$uncheckedSta3 = options.uncheckedState) === null || _options$uncheckedSta3 === void 0 ? void 0 : _options$uncheckedSta3.font) ? options === null || options === void 0 || (_options$uncheckedSta4 = options.uncheckedState) === null || _options$uncheckedSta4 === void 0 ? void 0 : _options$uncheckedSta4.font : this.DEFAULT_FONT;\n\t\tthis.root.push(new CheckBoxSymbolElement(\"w14:uncheckedState\", symbol, font));\n\t}\n};\n// src/file/checkbox/checkbox.ts\n/**\n* CheckBox module for WordprocessingML documents.\n*\n* This module provides interactive checkbox controls using\n* structured document tags (content controls).\n*\n* @module\n*/\n/**\n* Represents an interactive checkbox in a WordprocessingML document.\n*\n* CheckBox creates a content control with checkbox functionality,\n* displaying a checked or unchecked symbol based on its state. The checkbox\n* is implemented using structured document tags (w:sdt) with checkbox-specific\n* properties.\n*\n* @publicApi\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_SdtCheckbox\">\n* <xsd:sequence>\n* <xsd:element name=\"checked\" type=\"CT_OnOff\" minOccurs=\"0\"/>\n* <xsd:element name=\"checkedState\" type=\"CT_SdtCheckboxSymbol\" minOccurs=\"0\"/>\n* <xsd:element name=\"uncheckedState\" type=\"CT_SdtCheckboxSymbol\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* <xsd:element name=\"checkbox\" type=\"CT_SdtCheckbox\"/>\n* ```\n*\n* @example\n* ```typescript\n* // Simple checkbox\n* new CheckBox({ checked: true });\n*\n* // Checkbox with custom alias\n* new CheckBox({\n* checked: false,\n* alias: \"Accept Terms\",\n* });\n*\n* // Checkbox with custom symbols\n* new CheckBox({\n* checked: true,\n* checkedState: { value: \"2611\", font: \"Wingdings\" },\n* uncheckedState: { value: \"2610\", font: \"Wingdings\" },\n* });\n* ```\n*/\nvar CheckBox = class extends XmlComponent {\n\tconstructor(options) {\n\t\tvar _options$checkedState, _options$checkedState2, _options$uncheckedSta, _options$uncheckedSta2;\n\t\tsuper(\"w:sdt\");\n\t\t_defineProperty(this, \"DEFAULT_UNCHECKED_SYMBOL\", \"2610\");\n\t\t_defineProperty(this, \"DEFAULT_CHECKED_SYMBOL\", \"2612\");\n\t\t_defineProperty(this, \"DEFAULT_FONT\", \"MS Gothic\");\n\t\tconst properties = new StructuredDocumentTagProperties(options === null || options === void 0 ? void 0 : options.alias);\n\t\tproperties.addChildElement(new CheckBoxUtil(options));\n\t\tthis.root.push(properties);\n\t\tconst content = new StructuredDocumentTagContent();\n\t\tconst checkedFont = options === null || options === void 0 || (_options$checkedState = options.checkedState) === null || _options$checkedState === void 0 ? void 0 : _options$checkedState.font;\n\t\tconst checkedText = options === null || options === void 0 || (_options$checkedState2 = options.checkedState) === null || _options$checkedState2 === void 0 ? void 0 : _options$checkedState2.value;\n\t\tconst uncheckedFont = options === null || options === void 0 || (_options$uncheckedSta = options.uncheckedState) === null || _options$uncheckedSta === void 0 ? void 0 : _options$uncheckedSta.font;\n\t\tconst uncheckedText = options === null || options === void 0 || (_options$uncheckedSta2 = options.uncheckedState) === null || _options$uncheckedSta2 === void 0 ? void 0 : _options$uncheckedSta2.value;\n\t\tlet symbolFont;\n\t\tlet char;\n\t\tif (options === null || options === void 0 ? void 0 : options.checked) {\n\t\t\tsymbolFont = checkedFont ? checkedFont : this.DEFAULT_FONT;\n\t\t\tchar = checkedText ? checkedText : this.DEFAULT_CHECKED_SYMBOL;\n\t\t} else {\n\t\t\tsymbolFont = uncheckedFont ? uncheckedFont : this.DEFAULT_FONT;\n\t\t\tchar = uncheckedText ? uncheckedText : this.DEFAULT_UNCHECKED_SYMBOL;\n\t\t}\n\t\tconst initialRenderedChar = new SymbolRun({\n\t\t\tchar,\n\t\t\tsymbolfont: symbolFont\n\t\t});\n\t\tcontent.addChildElement(initialRenderedChar);\n\t\tthis.root.push(content);\n\t}\n};\n// src/file/vml/vml-values.ts\n/**\n* Converts a boolean into the VML `t`/`f` representation.\n*\n* Undefined values are passed through so that optional attributes are omitted\n* from the generated XML.\n*\n* @param value - The boolean to convert\n* @returns `\"t\"` for true, `\"f\"` for false, or `undefined` when no value was given\n*\n* @example\n* ```typescript\n* vmlTrueFalse(true); // \"t\"\n* vmlTrueFalse(false); // \"f\"\n* vmlTrueFalse(undefined); // undefined\n* ```\n*/\nvar vmlTrueFalse = (value) => value === void 0 ? void 0 : value ? \"t\" : \"f\";\n// src/file/vml/pict/pict.ts\n/**\n* Picture element module for WordprocessingML documents.\n*\n* Provides functionality for creating pict (picture) elements that contain VML content.\n*\n* @module\n*/\n/**\n* Creates a picture element containing VML content.\n*\n* The picture element (w:pict) is the container for VML (Vector Markup Language) content\n* within WordprocessingML documents. It is used for text boxes, watermarks and other\n* legacy drawing objects. A picture element typically holds an optional `v:shapetype`\n* followed by one or more `v:shape` elements.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Picture\">\n* <xsd:sequence>\n* <xsd:sequence maxOccurs=\"unbounded\">\n* <xsd:any processContents=\"lax\" namespace=\"urn:schemas-microsoft-com:vml\" minOccurs=\"0\"\n* maxOccurs=\"unbounded\"/>\n* <xsd:any processContents=\"lax\" namespace=\"urn:schemas-microsoft-com:office:office\"\n* minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:element name=\"movie\" type=\"CT_Rel\" minOccurs=\"0\"/>\n* <xsd:element name=\"control\" type=\"CT_Control\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @param options - Configuration options containing the VML children\n* @returns An XmlComponent representing the w:pict element\n*\n* @example\n* ```typescript\n* const pict = createPict({\n* children: [createVmlShape({ id: \"shape1\", style: { width: 100, height: 50 } })],\n* });\n* ```\n*/\nvar createPict = ({ children }) => new BuilderElement({\n\tname: \"w:pict\",\n\tchildren\n});\n// src/file/vml/shape/vml-shape-style.ts\n/**\n* Maps VmlShapeStyle property names to their corresponding CSS-style property names.\n* Used internally for converting TypeScript-friendly property names to VML style attributes.\n*/\nvar STYLE_KEY_MAP = {\n\tflip: \"flip\",\n\theight: \"height\",\n\tleft: \"left\",\n\tmarginBottom: \"margin-bottom\",\n\tmarginLeft: \"margin-left\",\n\tmarginRight: \"margin-right\",\n\tmarginTop: \"margin-top\",\n\tpositionHorizontal: \"mso-position-horizontal\",\n\tpositionHorizontalRelative: \"mso-position-horizontal-relative\",\n\tpositionVertical: \"mso-position-vertical\",\n\tpositionVerticalRelative: \"mso-position-vertical-relative\",\n\twrapDistanceBottom: \"mso-wrap-distance-bottom\",\n\twrapDistanceLeft: \"mso-wrap-distance-left\",\n\twrapDistanceRight: \"mso-wrap-distance-right\",\n\twrapDistanceTop: \"mso-wrap-distance-top\",\n\twrapEdited: \"mso-wrap-edited\",\n\twrapStyle: \"mso-wrap-style\",\n\tposition: \"position\",\n\trotation: \"rotation\",\n\ttop: \"top\",\n\tvisibility: \"visibility\",\n\twidth: \"width\",\n\tzIndex: \"z-index\"\n};\n/**\n* Formats a VmlShapeStyle object into the CSS-like string used by the VML `style` attribute.\n*\n* Properties whose value is `undefined` are skipped so that callers can build\n* the style object from optional inputs without leaking `undefined` into the output.\n*\n* @param style - The VmlShapeStyle object to format\n* @returns A CSS-style string (e.g., \"width:100pt;height:50pt\") or undefined if no style provided\n*\n* @example\n* ```typescript\n* formatVmlShapeStyle({ width: \"3in\", height: \"1in\", position: \"absolute\" });\n* // \"width:3in;height:1in;position:absolute\"\n* ```\n*/\nvar formatVmlShapeStyle = (style) => style ? Object.entries(style).filter(([, value]) => value !== void 0).map(([key, value]) => `${STYLE_KEY_MAP[key]}:${value}`).join(\";\") : void 0;\n// src/file/vml/shape/vml-shape.ts\n/**\n* VML shape module for WordprocessingML documents.\n*\n* Provides functionality for creating VML shape elements with customizable styling and positioning.\n* The shape is the fundamental building block of VML drawings: text boxes, WordArt, pictures\n* and free-form drawings are all shapes with different types and children.\n*\n* References:\n* - https://c-rex.net/samples/ooxml/e1/Part3/OOXML_P3_Primer_OfficeArt_topic_ID0ELU5O.html\n* - http://webapp.docx4java.org/OnlineDemo/ecma376/VML/shape.html\n*\n* @module\n*/\n/**\n* Creates a VML shape element.\n*\n* The VML shape element (v:shape) represents a vector graphics shape in WordprocessingML documents.\n* The shape's appearance is determined by its type (a reference to a `v:shapetype`), its style,\n* and its children.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Shape\">\n* <xsd:choice maxOccurs=\"unbounded\">\n* <xsd:group ref=\"EG_ShapeElements\"/>\n* <xsd:element ref=\"o:ink\"/>\n* <xsd:element ref=\"pvml:iscomment\"/>\n* <xsd:element ref=\"o:equationxml\"/>\n* </xsd:choice>\n* <xsd:attributeGroup ref=\"AG_AllCoreAttributes\"/>\n* <xsd:attributeGroup ref=\"AG_AllShapeAttributes\"/>\n* <xsd:attributeGroup ref=\"AG_Type\"/>\n* <xsd:attributeGroup ref=\"AG_Adj\"/>\n* <xsd:attributeGroup ref=\"AG_Path\"/>\n* <xsd:attribute ref=\"o:gfxdata\"/>\n* <xsd:attribute name=\"equationxml\" type=\"xsd:string\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @param options - Configuration options for the shape\n* @returns An XmlComponent representing the v:shape element\n*\n* Text boxes are drawn with it, and so are the watermarks in `docx/watermarks`.\n*\n* @example\n* ```typescript\n* const shape = createVmlShape({\n* id: \"box\",\n* type: \"#_x0000_t202\",\n* style: { position: \"absolute\", width: \"200pt\", height: \"50pt\", rotation: 10 },\n* fillColor: \"silver\",\n* stroked: false,\n* });\n* ```\n*/\nvar createVmlShape = ({ id, type, style, coordinateSize, adjustment, path, presetShapeType, allowInCell, alt, title, fillColor, filled, stroked, strokeColor, strokeWeight, children = [] }) => new BuilderElement({\n\tname: \"v:shape\",\n\tattributes: {\n\t\tid: {\n\t\t\tkey: \"id\",\n\t\t\tvalue: id\n\t\t},\n\t\ttype: {\n\t\t\tkey: \"type\",\n\t\t\tvalue: type\n\t\t},\n\t\tstyle: {\n\t\t\tkey: \"style\",\n\t\t\tvalue: formatVmlShapeStyle(style)\n\t\t},\n\t\tcoordinateSize: {\n\t\t\tkey: \"coordsize\",\n\t\t\tvalue: coordinateSize\n\t\t},\n\t\tadjustment: {\n\t\t\tkey: \"adj\",\n\t\t\tvalue: adjustment\n\t\t},\n\t\tpath: {\n\t\t\tkey: \"path\",\n\t\t\tvalue: path\n\t\t},\n\t\tpresetShapeType: {\n\t\t\tkey: \"o:spt\",\n\t\t\tvalue: presetShapeType\n\t\t},\n\t\tallowInCell: {\n\t\t\tkey: \"o:allowincell\",\n\t\t\tvalue: vmlTrueFalse(allowInCell)\n\t\t},\n\t\talt: {\n\t\t\tkey: \"alt\",\n\t\t\tvalue: alt\n\t\t},\n\t\ttitle: {\n\t\t\tkey: \"title\",\n\t\t\tvalue: title\n\t\t},\n\t\tfillColor: {\n\t\t\tkey: \"fillcolor\",\n\t\t\tvalue: fillColor\n\t\t},\n\t\tfilled: {\n\t\t\tkey: \"filled\",\n\t\t\tvalue: vmlTrueFalse(filled)\n\t\t},\n\t\tstroked: {\n\t\t\tkey: \"stroked\",\n\t\t\tvalue: vmlTrueFalse(stroked)\n\t\t},\n\t\tstrokeColor: {\n\t\t\tkey: \"strokecolor\",\n\t\t\tvalue: strokeColor\n\t\t},\n\t\tstrokeWeight: {\n\t\t\tkey: \"strokeweight\",\n\t\t\tvalue: strokeWeight\n\t\t}\n\t},\n\tchildren\n});\n// src/file/textbox/pict-element/pict-element.ts\n/**\n* Picture element module for WordprocessingML documents.\n*\n* Provides functionality for creating pict (picture) elements that contain VML shapes.\n*\n* @module\n*/\n/**\n* Creates a picture element containing a VML shape.\n*\n* The picture element (w:pict) is a container for VML (Vector Markup Language) content\n* within WordprocessingML documents, commonly used for textboxes and other drawing objects.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Picture\">\n* <xsd:sequence>\n* <xsd:sequence maxOccurs=\"unbounded\">\n* <xsd:any processContents=\"lax\" namespace=\"urn:schemas-microsoft-com:vml\" minOccurs=\"0\"\n* maxOccurs=\"unbounded\"/>\n* <xsd:any processContents=\"lax\" namespace=\"urn:schemas-microsoft-com:office:office\"\n* minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n* </xsd:sequence>\n* <xsd:element name=\"movie\" type=\"CT_Rel\" minOccurs=\"0\"/>\n* <xsd:element name=\"control\" type=\"CT_Control\" minOccurs=\"0\"/>\n* </xsd:sequence>\n* </xsd:complexType>\n* ```\n*\n* @param options - Configuration options containing the VML shape\n* @returns An XmlComponent representing the w:pict element\n*\n* @example\n* ```typescript\n* const pictElement = createPictElement({\n* shape: createShape({\n* id: \"shape1\",\n* children: [new TextRun(\"Hello\")]\n* })\n* });\n* ```\n*/\nvar createPictElement = ({ shape }) => createPict({ children: [shape] });\n// src/file/textbox/texbox-content/textbox-content.ts\n/**\n* Creates a textbox content element containing block-level content.\n*\n* The textbox content element (w:txbxContent) represents the content container within a VML textbox.\n* It can contain block-level elements such as paragraphs and tables.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_TxbxContent\">\n* <xsd:group ref=\"EG_BlockLevelElts\" minOccurs=\"1\" maxOccurs=\"unbounded\"/>\n* </xsd:complexType>\n* ```\n*\n* @param options - Configuration options\n* @param options.children - The paragraphs and tables in the textbox content\n* @returns An XmlComponent representing the w:txbxContent element\n*\n* @example\n* ```typescript\n* const content = createTextboxContent({\n* children: [new Paragraph(\"Hello World\")]\n* });\n* ```\n*/\nvar createTextboxContent = ({ children = [] }) => new BuilderElement({\n\tname: \"w:txbxContent\",\n\tchildren\n});\n// src/file/textbox/vml-textbox/vml-texbox.ts\n/**\n* Creates a VML textbox element.\n*\n* The VML textbox element (v:textbox) defines a text container within a VML shape.\n* It supports custom styling and inset margins to control text positioning within the shape.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Textbox\">\n* <xsd:choice>\n* <xsd:element ref=\"w:txbxContent\" minOccurs=\"0\"/>\n* <xsd:any namespace=\"##local\" processContents=\"skip\"/>\n* </xsd:choice>\n* <xsd:attributeGroup ref=\"AG_Id\"/>\n* <xsd:attributeGroup ref=\"AG_Style\"/>\n* <xsd:attribute name=\"inset\" type=\"xsd:string\" use=\"optional\"/>\n* <xsd:attribute ref=\"o:singleclick\"/>\n* <xsd:attribute ref=\"o:insetmode\"/>\n* </xsd:complexType>\n* ```\n*\n* @param options - Configuration options for the VML textbox\n* @returns An XmlComponent representing the v:textbox element\n*\n* @example\n* ```typescript\n* const vmlTextbox = createVmlTextbox({\n* style: \"mso-fit-shape-to-text:t;\",\n* children: [new Paragraph(\"Hello World\")],\n* inset: {\n* top: \"0.1in\",\n* left: \"0.1in\",\n* bottom: \"0.1in\",\n* right: \"0.1in\"\n* }\n* });\n* ```\n*/\nvar createVmlTextbox = ({ style, children, inset }) => new BuilderElement({\n\tname: \"v:textbox\",\n\tattributes: {\n\t\tstyle: {\n\t\t\tkey: \"style\",\n\t\t\tvalue: style\n\t\t},\n\t\tinset: {\n\t\t\tkey: \"inset\",\n\t\t\tvalue: inset ? `${inset.left}, ${inset.top}, ${inset.right}, ${inset.bottom}` : void 0\n\t\t}\n\t},\n\tchildren: [createTextboxContent({ children })]\n});\n// src/file/textbox/shape/shape.ts\n/** Identifier of the text box shape type as referenced by shapes. */\nvar SHAPE_TYPE = \"#_x0000_t202\";\n/**\n* Creates a VML shape element with textbox content.\n*\n* The VML shape element (v:shape) represents a vector graphics shape in WordprocessingML documents.\n* This function creates shapes configured for text display (textbox shapes), which are commonly\n* used for creating floating text boxes with custom positioning and styling.\n*\n* ## XSD Schema\n* ```xml\n* <xsd:complexType name=\"CT_Shape\">\n* <xsd:choice maxOccurs=\"unbounded\">\n* <xsd:group ref=\"EG_ShapeElements\"/>\n* <xsd:element ref=\"o:ink\"/>\n* <xsd:element ref=\"pvml:iscomment\"/>\n* <xsd:element ref=\"o:equationxml\"/>\n* </xsd:choice>\n* <xsd:attributeGroup ref=\"AG_AllCoreAttributes\"/>\n* <xsd:attributeGroup ref=\"AG_AllShapeAttributes\"/>\n* <xsd:attributeGroup ref=\"AG_Type\"/>\n* <xsd:attributeGroup ref=\"AG_Adj\"/>\n* <xsd:attributeGroup ref=\"AG_Path\"/>\n* <xsd:attribute ref=\"o:gfxdata\"/>\n* <xsd:attribute name=\"equationxml\" type=\"xsd:string\" use=\"optional\"/>\n* </xsd:complexType>\n* ```\n*\n* @param options - Configuration options for the shape\n* @returns An XmlComponent representing the v:shape element\n*\n* @example\n* ```typescript\n* const shape = createShape({\n* id: \"textbox1\",\n* children: [new Paragraph(\"Hello World\")],\n* style: {\n* width: \"3in\",\n* height: \"1in\",\n* position: \"absolute\",\n* left: \"1in\",\n* top: \"1in\"\n* }\n* });\n* ```\n*/\nvar createShape = ({ id, children, type = SHAPE_TYPE, style }) => createVmlShape({\n\tid,\n\ttype,\n\tstyle,\n\tchildren: [createVmlTextbox({\n\t\tstyle: \"mso-fit-shape-to-text:t;\",\n\t\tchildren\n\t})]\n});\n// src/file/textbox/textbox.ts\n/**\n* Textbox module for WordprocessingML documents.\n*\n* This module provides support for text boxes using VML shapes. Textboxes allow for\n* creating floating text containers with custom positioning and styling.\n*\n* @module\n*/\nvar _excluded$1 = [\"style\", \"children\"];\n/**\n* Represents a textbox in a WordprocessingML document.\n*\n* A Textbox creates a floating text container using VML shapes that can be positioned\n* anywhere on the page. Unlike regular paragraphs, textboxes support absolute positioning,\n* custom dimensions, and text wrapping control.\n*\n* The textbox is implemented as a paragraph with a run containing a picture element (w:pict)\n* with a VML shape (v:shape) that contains a VML textbox (v:textbox) with the actual content.\n* In a paragraph's children, the textbox is only the run, in that paragraph, and its own\n* paragraph options, such as its alignment, don't apply.\n*\n* @publicApi\n*\n* ## XSD Schema\n* The Textbox combines multiple OOXML elements:\n* - w:p (paragraph container)\n* - w:r (run containing the picture)\n* - w:pict (picture element containing VML)\n* - v:shape (VML shape with styling)\n* - v:textbox (VML textbox content container)\n* - w:txbxContent (WordprocessingML textbox content)\n*\n* @example\n* ```typescript\n* // Simple textbox with text\n* new Textbox({\n* children: [new Paragraph(\"Hello World\")],\n* style: {\n* width: \"3in\",\n* height: \"1in\"\n* }\n* });\n*\n* // Positioned textbox with wrapping\n* new Textbox({\n* children: [\n* new Paragraph({\n* children: [\n* new TextRun({ text: \"Floating Text\", bold: true }),\n* new TextRun({ text: \" in a textbox\", break: 1 })\n* ]\n* })\n* ],\n* style: {\n* width: \"2.5in\",\n* height: \"1.5in\",\n* position: \"absolute\",\n* left: \"1in\",\n* top: \"2in\",\n* wrapStyle: \"square\"\n* }\n* });\n*\n* // Textbox in a paragraph, after its text\n* new Paragraph({\n* children: [\n* new TextRun(\"See the note: \"),\n* new Textbox({\n* children: [new Paragraph(\"A note\")],\n* style: { width: \"2in\", height: \"auto\" }\n* })\n* ]\n* });\n* ```\n*/\nvar Textbox = class extends FileChild {\n\tconstructor(_ref) {\n\t\tlet { style, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$1);\n\t\tsuper(\"w:p\");\n\t\t_defineProperty(this, \"run\", void 0);\n\t\tthis.root.push(new ParagraphProperties(rest));\n\t\tthis.run = new BuilderElement({\n\t\t\tname: \"w:r\",\n\t\t\tchildren: [createPictElement({ shape: createShape({\n\t\t\t\tchildren,\n\t\t\t\tid: uniqueId(),\n\t\t\t\tstyle\n\t\t\t}) })]\n\t\t});\n\t\tthis.root.push(this.run);\n\t}\n\tprepForXml(context) {\n\t\treturn elementOf(context.stack[context.stack.length - 1]) === \"w:p\" ? this.run.prepForXml(context) : super.prepForXml(context);\n\t}\n};\n// src/file/fonts/obfuscate-ttf-to-odttf.ts\n/**\n* Font obfuscation module for embedding fonts in WordprocessingML documents.\n*\n* This module implements the OOXML font obfuscation algorithm used to embed\n* fonts in DOCX documents. Obfuscation is required by the OOXML specification\n* to prevent simple extraction of embedded font files.\n*\n* Reference: ECMA-376 Part 2, Section 11.1 (Font Embedding)\n*\n* @module\n*/\n/** Start offset for obfuscation in the font file */\nvar obfuscatedStartOffset = 0;\n/** End offset for obfuscation (first 32 bytes are obfuscated) */\nvar obfuscatedEndOffset = 32;\n/** Expected GUID size (32 hex characters without dashes) */\nvar guidSize = 32;\n/**\n* Obfuscates a TrueType font file for embedding in OOXML documents.\n*\n* The obfuscation algorithm XORs the first 32 bytes of the font file\n* with a reversed byte sequence derived from the font's GUID key.\n* This prevents simple extraction while maintaining font functionality.\n*\n* @param buf - The original font file as a byte array\n* @param fontKey - The GUID key for the font (with or without dashes)\n* @returns The obfuscated font data\n* @throws Error if the fontKey is not a valid 32-character GUID\n*\n* @example\n* ```typescript\n* const fontData = readFileSync(\"font.ttf\");\n* const fontKey = \"00000000-0000-0000-0000-000000000000\";\n* const obfuscatedData = obfuscate(fontData, fontKey);\n* ```\n*\n* @internal\n*/\nvar obfuscate = (buf, fontKey) => {\n\tconst guid = fontKey.replace(/-/g, \"\");\n\tif (guid.length !== guidSize) throw new Error(`Error: Cannot extract GUID from font filename: ${fontKey}`);\n\tconst hexNumbers = guid.replace(/(..)/g, \"$1 \").trim().split(\" \").map((hexString) => parseInt(hexString, 16));\n\thexNumbers.reverse();\n\tconst obfuscatedBytes = buf.slice(obfuscatedStartOffset, obfuscatedEndOffset).map((byte, i) => byte ^ hexNumbers[i % hexNumbers.length]);\n\tconst out = new Uint8Array(obfuscatedStartOffset + obfuscatedBytes.length + Math.max(0, buf.length - obfuscatedEndOffset));\n\tout.set(buf.slice(0, obfuscatedStartOffset));\n\tout.set(obfuscatedBytes, obfuscatedStartOffset);\n\tout.set(buf.slice(obfuscatedEndOffset), obfuscatedStartOffset + obfuscatedBytes.length);\n\treturn out;\n};\n// src/export/formatter.ts\n/**\n* Converts XML components into serializable objects ready for XML generation.\n*\n* The Formatter is responsible for preparing XML components for serialization by calling\n* their prepForXml method with the appropriate context. This is a critical step in the\n* export pipeline that transforms the declarative API objects into XML-compatible structures.\n*\n* @example\n* ```typescript\n* const formatter = new Formatter();\n* const paragraph = new Paragraph(\"Hello World\");\n* const xmlObject = formatter.format(paragraph, context);\n* ```\n*/\nvar Formatter = class {\n\t/**\n\t* Formats an XML component into a serializable object.\n\t*\n\t* @param input - The XML component to format\n\t* @param context - The context containing file state and relationships\n\t* @returns A serializable XML object structure\n\t* @throws Error if the component cannot be formatted correctly\n\t*/\n\tformat(input, context = { stack: [] }) {\n\t\tconst output = input.prepForXml(context);\n\t\tif (output) return output;\n\t\telse throw Error(\"XMLComponent did not format correctly\");\n\t}\n};\n// src/export/packer/placeholders.ts\n/**\n* Placeholder module for the `{key}` tokens docx writes before it knows an image's or a list's id.\n*\n* @module\n*/\nvar PLACEHOLDER = /\\{([^{}]+)\\}/g;\n/**\n* Replaces each `{key}` in the XML whose key has a value, in one pass over the XML. Other text in braces, such as a\n* font's key, is left as it is.\n*\n* @param xmlData - The XML string containing placeholders\n* @param values - The value to write for each key\n* @returns XML string with the placeholders replaced\n*/\nvar replacePlaceholders = (xmlData, values) => values.size === 0 ? xmlData : xmlData.replace(PLACEHOLDER, (placeholder, key) => {\n\tvar _values$get;\n\treturn (_values$get = values.get(key)) !== null && _values$get !== void 0 ? _values$get : placeholder;\n});\n/**\n* Finds the keys of the `{key}` placeholders in the XML, in one pass over the XML.\n*\n* @param xmlData - The XML string to search\n* @returns The key of every placeholder in the XML\n*/\nvar findPlaceholders = (xmlData) => new Set(Array.from(xmlData.matchAll(PLACEHOLDER), ([, key]) => key));\n// src/export/packer/image-replacer.ts\n/**\n* Replaces image placeholders with relationship IDs in XML content.\n*\n* During document compilation, images are referenced using placeholder tokens\n* like {image1.png}. This class replaces those placeholders with the actual\n* relationship IDs used in the OOXML structure.\n*\n* @example\n* ```typescript\n* const replacer = new ImageReplacer();\n* const mediaData = replacer.getMediaData(xmlString, media);\n* const updatedXml = replacer.replace(xmlString, mediaData, 1);\n* ```\n*/\nvar ImageReplacer = class {\n\t/**\n\t* Replaces image placeholder tokens with relationship IDs.\n\t*\n\t* @param xmlData - The XML string containing image placeholders\n\t* @param mediaData - Array of media data to replace\n\t* @param offset - Starting offset for relationship IDs\n\t* @returns XML string with placeholders replaced by relationship IDs\n\t*/\n\treplace(xmlData, mediaData, offset) {\n\t\treturn replacePlaceholders(xmlData, new Map(mediaData.map((image, i) => [image.fileName, (offset + i).toString()])));\n\t}\n\t/**\n\t* Extracts media data referenced in the XML content.\n\t*\n\t* @param xmlData - The XML string to search for media references\n\t* @param media - The media collection to search within\n\t* @returns Array of media data found in the XML\n\t*/\n\tgetMediaData(xmlData, media) {\n\t\tconst placeholders = findPlaceholders(xmlData);\n\t\treturn media.Array.filter((image) => placeholders.has(image.fileName));\n\t}\n};\n// src/export/packer/numbering-replacer.ts\n/**\n* Replaces numbering instance placeholders with actual numbering IDs in XML content.\n*\n* Numbering instances (for bullets and numbered lists) use placeholder tokens during\n* compilation. This class replaces those placeholders with the final numbering IDs\n* that reference the numbering definitions in numbering.xml.\n*\n* @example\n* ```typescript\n* const replacer = new NumberingReplacer();\n* const updatedXml = replacer.replace(xmlString, concreteNumberings);\n* ```\n*/\nvar NumberingReplacer = class {\n\t/**\n\t* Replaces numbering placeholder tokens with actual numbering IDs.\n\t*\n\t* Placeholder format: {reference-instance} where reference identifies the\n\t* numbering definition and instance is the specific usage.\n\t*\n\t* @param xmlData - The XML string containing numbering placeholders\n\t* @param concreteNumberings - Array of concrete numbering instances to replace\n\t* @returns XML string with placeholders replaced by numbering IDs\n\t*/\n\treplace(xmlData, concreteNumberings) {\n\t\treturn replacePlaceholders(xmlData, new Map(concreteNumberings.map(({ reference, instance, restartedListId, numId }) => [listKey(reference, instance, restartedListId), numId.toString()])));\n\t}\n};\n// src/export/packer/package-part-writer.ts\nvar formatter$4 = new Formatter();\n/**\n* Formats a part's XML, with the relationships that anything in it that refers to other parts adds to.\n*/\nvar xmlifyPart = (file, content, prettify, relationships, standalone = true) => stringifyXmlable(formatter$4.format(content, {\n\tviewWrapper: {\n\t\tView: content,\n\t\tRelationships: relationships\n\t},\n\tfile,\n\tstack: []\n}), {\n\tindent: prettify,\n\tdeclaration: standalone ? {\n\t\tstandalone: \"yes\",\n\t\tencoding: \"UTF-8\"\n\t} : { encoding: \"UTF-8\" }\n});\nvar xmlifyPackagePart = (file, part, path, prettify) => {\n\tconst { content } = part.options;\n\tif (content instanceof Uint8Array) return [{\n\t\tdata: content,\n\t\tpath: `word/${path}`\n\t}];\n\tif (\"files\" in content) return [{\n\t\tdata: zipFiles(content.files.map(({ path: filePath, content: fileContent }) => [filePath, fileContent instanceof Uint8Array ? fileContent : xmlifyPart(file, fileContent, prettify, new Relationships())])),\n\t\tpath: `word/${path}`\n\t}];\n\tconst relationships = file.PackageParts.createRelationships(path);\n\tconst data = xmlifyPart(file, content, prettify, relationships);\n\tconst folder = path.slice(0, path.lastIndexOf(\"/\"));\n\tconst name = path.slice(path.lastIndexOf(\"/\") + 1);\n\treturn [{\n\t\tdata,\n\t\tpath: `word/${path}`\n\t}, ...relationships.RelationshipCount > 0 ? [{\n\t\tdata: xmlifyPart(file, relationships, prettify, relationships, false),\n\t\tpath: `word/${folder}/_rels/${name}.rels`\n\t}] : []];\n};\n/**\n* Writes the parts added to the package while the document's parts were written, such as charts. A part's XML can add\n* parts of its own, such as a chart's embedded workbook, so the parts added meanwhile are written after.\n*\n* @param from - How many of the parts have been written\n*/\nvar xmlifyPackageParts = (file, prettify, from = 0) => {\n\tconst parts = file.PackageParts.Array.slice(from);\n\tif (parts.length === 0) return [];\n\treturn [...parts.flatMap(({ part, path }) => xmlifyPackagePart(file, part, path, prettify)), ...xmlifyPackageParts(file, prettify, from + parts.length)];\n};\n// src/export/packer/next-compiler.ts\nvar _excluded = [\"PackageParts\"];\n/**\n* Compiles File objects into the files of OOXML-compliant packages.\n*\n* The Compiler is responsible for converting the internal document representation\n* into the complete set of XML files required for a .docx document, managing\n* relationships, images, fonts, and all other document components.\n*\n* @example\n* ```typescript\n* const compiler = new Compiler();\n* const files = compiler.compile(file, PrettifyType.WITH_2_BLANKS);\n* ```\n*/\nvar Compiler = class {\n\t/**\n\t* Creates a new Compiler instance.\n\t*\n\t* Initializes the formatter and replacer utilities used during compilation.\n\t*/\n\tconstructor() {\n\t\t_defineProperty(this, \"formatter\", void 0);\n\t\t_defineProperty(this, \"imageReplacer\", void 0);\n\t\t_defineProperty(this, \"numberingReplacer\", void 0);\n\t\tthis.formatter = new Formatter();\n\t\tthis.imageReplacer = new ImageReplacer();\n\t\tthis.numberingReplacer = new NumberingReplacer();\n\t}\n\t/**\n\t* Compiles a File object into the files of the complete OOXML package, which the Packer zips.\n\t*\n\t* This method orchestrates the entire compilation process:\n\t* - Converts all document components to XML\n\t* - Manages image and numbering placeholder replacements\n\t* - Creates relationship files\n\t* - Packages fonts and media files\n\t*\n\t* @param file - The document to compile\n\t* @param prettifyXml - Optional XML formatting style\n\t* @param overrides - Optional custom XML file overrides\n\t* @returns The package's files by their paths, in the order they are zipped\n\t*/\n\tcompile(file, prettifyXml, overrides = []) {\n\t\tconst _this$xmlifyFile = this.xmlifyFile(file, prettifyXml), { PackageParts: packageParts } = _this$xmlifyFile, xmlifiedFileMapping = _objectWithoutProperties(_this$xmlifyFile, _excluded);\n\t\tconst xmlifiedFiles = Object.values(xmlifiedFileMapping).flatMap((obj) => Array.isArray(obj) ? obj : [obj]);\n\t\treturn new Map([\n\t\t\t...xmlifiedFiles.map(({ path, data }) => [path, data]),\n\t\t\t...packageParts.map(({ path, data }) => [path, data]),\n\t\t\t...overrides.map(({ path, data }) => [path, data]),\n\t\t\t...file.Macros === void 0 ? [] : [[\"word/vbaProject.bin\", file.Macros.project]],\n\t\t\t...file.Media.Array.flatMap((data) => data.type !== \"svg\" ? [[`word/media/${data.fileName}`, data.data]] : [[`word/media/${data.fileName}`, data.data], [`word/media/${data.fallback.fileName}`, data.fallback.data]]),\n\t\t\t...file.FontTable.files.map(({ data: buffer, fontKey }, i) => [`word/fonts/font${i + 1}.odttf`, obfuscate(buffer, fontKey)])\n\t\t]);\n\t}\n\txmlifyFile(file, prettify) {\n\t\tvar _file$Macros;\n\t\tconst documentXmlData = stringifyXmlable(this.formatter.format(file.Document.View, {\n\t\t\tviewWrapper: file.Document,\n\t\t\tfile,\n\t\t\tstack: []\n\t\t}), {\n\t\t\tindent: prettify,\n\t\t\tdeclaration: {\n\t\t\t\tstandalone: \"yes\",\n\t\t\t\tencoding: \"UTF-8\"\n\t\t\t}\n\t\t});\n\t\tconst commentXmlData = stringifyXmlable(this.formatter.format(file.Comments, {\n\t\t\tviewWrapper: {\n\t\t\t\tView: file.Comments,\n\t\t\t\tRelationships: file.Comments.Relationships\n\t\t\t},\n\t\t\tfile,\n\t\t\tstack: []\n\t\t}), {\n\t\t\tindent: prettify,\n\t\t\tdeclaration: {\n\t\t\t\tstandalone: \"yes\",\n\t\t\t\tencoding: \"UTF-8\"\n\t\t\t}\n\t\t});\n\t\tconst footnoteXmlData = stringifyXmlable(this.formatter.format(file.FootNotes.View, {\n\t\t\tviewWrapper: file.FootNotes,\n\t\t\tfile,\n\t\t\tstack: []\n\t\t}), {\n\t\t\tindent: prettify,\n\t\t\tdeclaration: {\n\t\t\t\tstandalone: \"yes\",\n\t\t\t\tencoding: \"UTF-8\"\n\t\t\t}\n\t\t});\n\t\tconst endnoteXmlData = stringifyXmlable(this.formatter.format(file.Endnotes.View, {\n\t\t\tviewWrapper: file.Endnotes,\n\t\t\tfile,\n\t\t\tstack: []\n\t\t}), {\n\t\t\tindent: prettify,\n\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t});\n\t\tconst documentRelationshipCount = file.Document.Relationships.RelationshipCount + 1;\n\t\tconst commentRelationshipCount = file.Comments.Relationships.RelationshipCount + 1;\n\t\tconst footnoteRelationshipCount = file.FootNotes.Relationships.RelationshipCount + 1;\n\t\tconst endnoteRelationshipCount = file.Endnotes.Relationships.RelationshipCount + 1;\n\t\tconst documentMediaDatas = this.imageReplacer.getMediaData(documentXmlData, file.Media);\n\t\tconst commentMediaDatas = this.imageReplacer.getMediaData(commentXmlData, file.Media);\n\t\tconst footnoteMediaDatas = this.imageReplacer.getMediaData(footnoteXmlData, file.Media);\n\t\tconst endnoteMediaDatas = this.imageReplacer.getMediaData(endnoteXmlData, file.Media);\n\t\treturn _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({\n\t\t\tRelationships: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst relationships = Relationships.copy(file.Document.Relationships);\n\t\t\t\t\tdocumentMediaDatas.forEach((mediaData, i) => {\n\t\t\t\t\t\trelationships.addRelationship(documentRelationshipCount + i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${mediaData.fileName}`);\n\t\t\t\t\t});\n\t\t\t\t\trelationships.addRelationship(relationships.RelationshipCount + 1, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable\", \"fontTable.xml\");\n\t\t\t\t\treturn stringifyXmlable(this.formatter.format(relationships, {\n\t\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t\t});\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/_rels/document.xml.rels\"\n\t\t\t},\n\t\t\tDocument: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst xmlData = this.imageReplacer.replace(documentXmlData, documentMediaDatas, documentRelationshipCount);\n\t\t\t\t\treturn this.numberingReplacer.replace(xmlData, file.Numbering.ConcreteNumbering);\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/document.xml\"\n\t\t\t},\n\t\t\tStyles: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst xmlStyles = stringifyXmlable(this.formatter.format(file.Styles, {\n\t\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn this.numberingReplacer.replace(xmlStyles, file.Numbering.ConcreteNumbering);\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/styles.xml\"\n\t\t\t},\n\t\t\tProperties: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.CoreProperties, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"docProps/core.xml\"\n\t\t\t},\n\t\t\tFileRelationships: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.FileRelationships, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t}),\n\t\t\t\tpath: \"_rels/.rels\"\n\t\t\t},\n\t\t\tHeaderRelationships: file.Headers.map((headerWrapper, index) => {\n\t\t\t\tconst xmlData = stringifyXmlable(this.formatter.format(headerWrapper.View, {\n\t\t\t\t\tviewWrapper: headerWrapper,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t});\n\t\t\t\tconst mediaDatas = this.imageReplacer.getMediaData(xmlData, file.Media);\n\t\t\t\tconst relationships = Relationships.copy(headerWrapper.Relationships);\n\t\t\t\tmediaDatas.forEach((mediaData, i) => {\n\t\t\t\t\trelationships.addRelationship(i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${mediaData.fileName}`);\n\t\t\t\t});\n\t\t\t\treturn {\n\t\t\t\t\tdata: stringifyXmlable(this.formatter.format(relationships, {\n\t\t\t\t\t\tviewWrapper: headerWrapper,\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t\t}),\n\t\t\t\t\tpath: `word/_rels/header${index + 1}.xml.rels`\n\t\t\t\t};\n\t\t\t}),\n\t\t\tFooterRelationships: file.Footers.map((footerWrapper, index) => {\n\t\t\t\tconst xmlData = stringifyXmlable(this.formatter.format(footerWrapper.View, {\n\t\t\t\t\tviewWrapper: footerWrapper,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t});\n\t\t\t\tconst mediaDatas = this.imageReplacer.getMediaData(xmlData, file.Media);\n\t\t\t\tconst relationships = Relationships.copy(footerWrapper.Relationships);\n\t\t\t\tmediaDatas.forEach((mediaData, i) => {\n\t\t\t\t\trelationships.addRelationship(i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${mediaData.fileName}`);\n\t\t\t\t});\n\t\t\t\treturn {\n\t\t\t\t\tdata: stringifyXmlable(this.formatter.format(relationships, {\n\t\t\t\t\t\tviewWrapper: footerWrapper,\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t\t}),\n\t\t\t\t\tpath: `word/_rels/footer${index + 1}.xml.rels`\n\t\t\t\t};\n\t\t\t}),\n\t\t\tHeaders: file.Headers.map((headerWrapper, index) => {\n\t\t\t\tconst tempXmlData = stringifyXmlable(this.formatter.format(headerWrapper.View, {\n\t\t\t\t\tviewWrapper: headerWrapper,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t});\n\t\t\t\tconst mediaDatas = this.imageReplacer.getMediaData(tempXmlData, file.Media);\n\t\t\t\tconst xmlData = this.imageReplacer.replace(tempXmlData, mediaDatas, 0);\n\t\t\t\treturn {\n\t\t\t\t\tdata: this.numberingReplacer.replace(xmlData, file.Numbering.ConcreteNumbering),\n\t\t\t\t\tpath: `word/header${index + 1}.xml`\n\t\t\t\t};\n\t\t\t}),\n\t\t\tFooters: file.Footers.map((footerWrapper, index) => {\n\t\t\t\tconst tempXmlData = stringifyXmlable(this.formatter.format(footerWrapper.View, {\n\t\t\t\t\tviewWrapper: footerWrapper,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t});\n\t\t\t\tconst mediaDatas = this.imageReplacer.getMediaData(tempXmlData, file.Media);\n\t\t\t\tconst xmlData = this.imageReplacer.replace(tempXmlData, mediaDatas, 0);\n\t\t\t\treturn {\n\t\t\t\t\tdata: this.numberingReplacer.replace(xmlData, file.Numbering.ConcreteNumbering),\n\t\t\t\t\tpath: `word/footer${index + 1}.xml`\n\t\t\t\t};\n\t\t\t}),\n\t\t\tCustomProperties: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.CustomProperties, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"docProps/custom.xml\"\n\t\t\t},\n\t\t\tAppProperties: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.AppProperties, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"docProps/app.xml\"\n\t\t\t},\n\t\t\tFootNotes: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst xmlData = this.imageReplacer.replace(footnoteXmlData, footnoteMediaDatas, footnoteRelationshipCount);\n\t\t\t\t\treturn this.numberingReplacer.replace(xmlData, file.Numbering.ConcreteNumbering);\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/footnotes.xml\"\n\t\t\t},\n\t\t\tFootNotesRelationships: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst relationships = Relationships.copy(file.FootNotes.Relationships);\n\t\t\t\t\tfootnoteMediaDatas.forEach((mediaData, i) => {\n\t\t\t\t\t\trelationships.addRelationship(footnoteRelationshipCount + i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${mediaData.fileName}`);\n\t\t\t\t\t});\n\t\t\t\t\treturn stringifyXmlable(this.formatter.format(relationships, {\n\t\t\t\t\t\tviewWrapper: file.FootNotes,\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t\t});\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/_rels/footnotes.xml.rels\"\n\t\t\t},\n\t\t\tEndnotes: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst xmlData = this.imageReplacer.replace(endnoteXmlData, endnoteMediaDatas, endnoteRelationshipCount);\n\t\t\t\t\treturn this.numberingReplacer.replace(xmlData, file.Numbering.ConcreteNumbering);\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/endnotes.xml\"\n\t\t\t},\n\t\t\tEndnotesRelationships: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst relationships = Relationships.copy(file.Endnotes.Relationships);\n\t\t\t\t\tendnoteMediaDatas.forEach((mediaData, i) => {\n\t\t\t\t\t\trelationships.addRelationship(endnoteRelationshipCount + i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${mediaData.fileName}`);\n\t\t\t\t\t});\n\t\t\t\t\treturn stringifyXmlable(this.formatter.format(relationships, {\n\t\t\t\t\t\tviewWrapper: file.Endnotes,\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t\t});\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/_rels/endnotes.xml.rels\"\n\t\t\t},\n\t\t\tSettings: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Settings, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"word/settings.xml\"\n\t\t\t}\n\t\t}, file.Comments.IsEmpty ? {} : {\n\t\t\tComments: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst xmlData = this.imageReplacer.replace(commentXmlData, commentMediaDatas, commentRelationshipCount);\n\t\t\t\t\treturn this.numberingReplacer.replace(xmlData, file.Numbering.ConcreteNumbering);\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/comments.xml\"\n\t\t\t},\n\t\t\tCommentsRelationships: {\n\t\t\t\tdata: (() => {\n\t\t\t\t\tconst relationships = Relationships.copy(file.Comments.Relationships);\n\t\t\t\t\tcommentMediaDatas.forEach((mediaData, i) => {\n\t\t\t\t\t\trelationships.addRelationship(commentRelationshipCount + i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${mediaData.fileName}`);\n\t\t\t\t\t});\n\t\t\t\t\treturn stringifyXmlable(this.formatter.format(relationships, {\n\t\t\t\t\t\tviewWrapper: {\n\t\t\t\t\t\t\tView: file.Comments,\n\t\t\t\t\t\t\tRelationships: file.Comments.Relationships\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\tstack: []\n\t\t\t\t\t}), {\n\t\t\t\t\t\tindent: prettify,\n\t\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t\t});\n\t\t\t\t})(),\n\t\t\t\tpath: \"word/_rels/comments.xml.rels\"\n\t\t\t}\n\t\t}), file.CommentsExtended ? { CommentsExtended: {\n\t\t\tdata: stringifyXmlable(this.formatter.format(file.CommentsExtended, {\n\t\t\t\tviewWrapper: {\n\t\t\t\t\tView: file.CommentsExtended,\n\t\t\t\t\tRelationships: file.Comments.Relationships\n\t\t\t\t},\n\t\t\t\tfile,\n\t\t\t\tstack: []\n\t\t\t}), {\n\t\t\t\tindent: prettify,\n\t\t\t\tdeclaration: {\n\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t}\n\t\t\t}),\n\t\t\tpath: \"word/commentsExtended.xml\"\n\t\t} } : {}), file.CommentsIds ? { CommentsIds: {\n\t\t\tdata: stringifyXmlable(this.formatter.format(file.CommentsIds, {\n\t\t\t\tviewWrapper: {\n\t\t\t\t\tView: file.CommentsIds,\n\t\t\t\t\tRelationships: file.Comments.Relationships\n\t\t\t\t},\n\t\t\t\tfile,\n\t\t\t\tstack: []\n\t\t\t}), {\n\t\t\t\tindent: prettify,\n\t\t\t\tdeclaration: {\n\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t}\n\t\t\t}),\n\t\t\tpath: \"word/commentsIds.xml\"\n\t\t} } : {}), {}, {\n\t\t\tFontTable: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.FontTable.View, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"word/fontTable.xml\"\n\t\t\t},\n\t\t\tFontTableRelationships: {\n\t\t\t\tdata: (() => stringifyXmlable(this.formatter.format(file.FontTable.Relationships, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t}))(),\n\t\t\t\tpath: \"word/_rels/fontTable.xml.rels\"\n\t\t\t},\n\t\t\tTheme: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Theme, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"word/theme/theme1.xml\"\n\t\t\t}\n\t\t}, ((_file$Macros = file.Macros) === null || _file$Macros === void 0 ? void 0 : _file$Macros.events) ? {\n\t\t\tMacroEvents: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Macros.events, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"word/vbaData.xml\"\n\t\t\t},\n\t\t\tMacroRelationships: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Macros.relationships, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t}),\n\t\t\t\tpath: \"word/_rels/vbaProject.bin.rels\"\n\t\t\t}\n\t\t} : {}), file.Bibliography ? {\n\t\t\tBibliographySources: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Bibliography.sources, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"customXml/item1.xml\"\n\t\t\t},\n\t\t\tBibliographySourcesProperties: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Bibliography.properties, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"no\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"customXml/itemProps1.xml\"\n\t\t\t},\n\t\t\tBibliographySourcesRelationships: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Bibliography.relationships, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"customXml/_rels/item1.xml.rels\"\n\t\t\t}\n\t\t} : {}), {}, {\n\t\t\tPackageParts: xmlifyPackageParts(file, prettify),\n\t\t\tNumbering: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.Numbering, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstandalone: \"yes\",\n\t\t\t\t\t\tencoding: \"UTF-8\"\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tpath: \"word/numbering.xml\"\n\t\t\t},\n\t\t\tContentTypes: {\n\t\t\t\tdata: stringifyXmlable(this.formatter.format(file.ContentTypes, {\n\t\t\t\t\tviewWrapper: file.Document,\n\t\t\t\t\tfile,\n\t\t\t\t\tstack: []\n\t\t\t\t}), {\n\t\t\t\t\tindent: prettify,\n\t\t\t\t\tdeclaration: { encoding: \"UTF-8\" }\n\t\t\t\t}),\n\t\t\t\tpath: \"[Content_Types].xml\"\n\t\t\t}\n\t\t});\n\t}\n};\n// src/export/packer/stream.ts\nvar import_events = (/* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar R = typeof Reflect === \"object\" ? Reflect : null;\n\tvar ReflectApply = R && typeof R.apply === \"function\" ? R.apply : function ReflectApply(target, receiver, args) {\n\t\treturn Function.prototype.apply.call(target, receiver, args);\n\t};\n\tvar ReflectOwnKeys;\n\tif (R && typeof R.ownKeys === \"function\") ReflectOwnKeys = R.ownKeys;\n\telse if (Object.getOwnPropertySymbols) ReflectOwnKeys = function ReflectOwnKeys(target) {\n\t\treturn Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));\n\t};\n\telse ReflectOwnKeys = function ReflectOwnKeys(target) {\n\t\treturn Object.getOwnPropertyNames(target);\n\t};\n\tfunction ProcessEmitWarning(warning) {\n\t\tif (console && console.warn) console.warn(warning);\n\t}\n\tvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n\t\treturn value !== value;\n\t};\n\tfunction EventEmitter() {\n\t\tEventEmitter.init.call(this);\n\t}\n\tmodule.exports = EventEmitter;\n\tmodule.exports.once = once;\n\tEventEmitter.EventEmitter = EventEmitter;\n\tEventEmitter.prototype._events = void 0;\n\tEventEmitter.prototype._eventsCount = 0;\n\tEventEmitter.prototype._maxListeners = void 0;\n\tvar defaultMaxListeners = 10;\n\tfunction checkListener(listener) {\n\t\tif (typeof listener !== \"function\") throw new TypeError(\"The \\\"listener\\\" argument must be of type Function. Received type \" + typeof listener);\n\t}\n\tObject.defineProperty(EventEmitter, \"defaultMaxListeners\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn defaultMaxListeners;\n\t\t},\n\t\tset: function(arg) {\n\t\t\tif (typeof arg !== \"number\" || arg < 0 || NumberIsNaN(arg)) throw new RangeError(\"The value of \\\"defaultMaxListeners\\\" is out of range. It must be a non-negative number. Received \" + arg + \".\");\n\t\t\tdefaultMaxListeners = arg;\n\t\t}\n\t});\n\tEventEmitter.init = function() {\n\t\tif (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {\n\t\t\tthis._events = Object.create(null);\n\t\t\tthis._eventsCount = 0;\n\t\t}\n\t\tthis._maxListeners = this._maxListeners || void 0;\n\t};\n\tEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n\t\tif (typeof n !== \"number\" || n < 0 || NumberIsNaN(n)) throw new RangeError(\"The value of \\\"n\\\" is out of range. It must be a non-negative number. Received \" + n + \".\");\n\t\tthis._maxListeners = n;\n\t\treturn this;\n\t};\n\tfunction _getMaxListeners(that) {\n\t\tif (that._maxListeners === void 0) return EventEmitter.defaultMaxListeners;\n\t\treturn that._maxListeners;\n\t}\n\tEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n\t\treturn _getMaxListeners(this);\n\t};\n\tEventEmitter.prototype.emit = function emit(type) {\n\t\tvar args = [];\n\t\tfor (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n\t\tvar doError = type === \"error\";\n\t\tvar events = this._events;\n\t\tif (events !== void 0) doError = doError && events.error === void 0;\n\t\telse if (!doError) return false;\n\t\tif (doError) {\n\t\t\tvar er;\n\t\t\tif (args.length > 0) er = args[0];\n\t\t\tif (er instanceof Error) throw er;\n\t\t\tvar err = /* @__PURE__ */ new Error(\"Unhandled error.\" + (er ? \" (\" + er.message + \")\" : \"\"));\n\t\t\terr.context = er;\n\t\t\tthrow err;\n\t\t}\n\t\tvar handler = events[type];\n\t\tif (handler === void 0) return false;\n\t\tif (typeof handler === \"function\") ReflectApply(handler, this, args);\n\t\telse {\n\t\t\tvar len = handler.length;\n\t\t\tvar listeners = arrayClone(handler, len);\n\t\t\tfor (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args);\n\t\t}\n\t\treturn true;\n\t};\n\tfunction _addListener(target, type, listener, prepend) {\n\t\tvar m;\n\t\tvar events;\n\t\tvar existing;\n\t\tcheckListener(listener);\n\t\tevents = target._events;\n\t\tif (events === void 0) {\n\t\t\tevents = target._events = Object.create(null);\n\t\t\ttarget._eventsCount = 0;\n\t\t} else {\n\t\t\tif (events.newListener !== void 0) {\n\t\t\t\ttarget.emit(\"newListener\", type, listener.listener ? listener.listener : listener);\n\t\t\t\tevents = target._events;\n\t\t\t}\n\t\t\texisting = events[type];\n\t\t}\n\t\tif (existing === void 0) {\n\t\t\texisting = events[type] = listener;\n\t\t\t++target._eventsCount;\n\t\t} else {\n\t\t\tif (typeof existing === \"function\") existing = events[type] = prepend ? [listener, existing] : [existing, listener];\n\t\t\telse if (prepend) existing.unshift(listener);\n\t\t\telse existing.push(listener);\n\t\t\tm = _getMaxListeners(target);\n\t\t\tif (m > 0 && existing.length > m && !existing.warned) {\n\t\t\t\texisting.warned = true;\n\t\t\t\tvar w = /* @__PURE__ */ new Error(\"Possible EventEmitter memory leak detected. \" + existing.length + \" \" + String(type) + \" listeners added. Use emitter.setMaxListeners() to increase limit\");\n\t\t\t\tw.name = \"MaxListenersExceededWarning\";\n\t\t\t\tw.emitter = target;\n\t\t\t\tw.type = type;\n\t\t\t\tw.count = existing.length;\n\t\t\t\tProcessEmitWarning(w);\n\t\t\t}\n\t\t}\n\t\treturn target;\n\t}\n\tEventEmitter.prototype.addListener = function addListener(type, listener) {\n\t\treturn _addListener(this, type, listener, false);\n\t};\n\tEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\tEventEmitter.prototype.prependListener = function prependListener(type, listener) {\n\t\treturn _addListener(this, type, listener, true);\n\t};\n\tfunction onceWrapper() {\n\t\tif (!this.fired) {\n\t\t\tthis.target.removeListener(this.type, this.wrapFn);\n\t\t\tthis.fired = true;\n\t\t\tif (arguments.length === 0) return this.listener.call(this.target);\n\t\t\treturn this.listener.apply(this.target, arguments);\n\t\t}\n\t}\n\tfunction _onceWrap(target, type, listener) {\n\t\tvar state = {\n\t\t\tfired: false,\n\t\t\twrapFn: void 0,\n\t\t\ttarget,\n\t\t\ttype,\n\t\t\tlistener\n\t\t};\n\t\tvar wrapped = onceWrapper.bind(state);\n\t\twrapped.listener = listener;\n\t\tstate.wrapFn = wrapped;\n\t\treturn wrapped;\n\t}\n\tEventEmitter.prototype.once = function once(type, listener) {\n\t\tcheckListener(listener);\n\t\tthis.on(type, _onceWrap(this, type, listener));\n\t\treturn this;\n\t};\n\tEventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {\n\t\tcheckListener(listener);\n\t\tthis.prependListener(type, _onceWrap(this, type, listener));\n\t\treturn this;\n\t};\n\tEventEmitter.prototype.removeListener = function removeListener(type, listener) {\n\t\tvar list, events, position, i, originalListener;\n\t\tcheckListener(listener);\n\t\tevents = this._events;\n\t\tif (events === void 0) return this;\n\t\tlist = events[type];\n\t\tif (list === void 0) return this;\n\t\tif (list === listener || list.listener === listener) {\n\t\t\tif (--this._eventsCount === 0) this._events = Object.create(null);\n\t\t\telse {\n\t\t\t\tdelete events[type];\n\t\t\t\tif (events.removeListener) this.emit(\"removeListener\", type, list.listener || listener);\n\t\t\t}\n\t\t} else if (typeof list !== \"function\") {\n\t\t\tposition = -1;\n\t\t\tfor (i = list.length - 1; i >= 0; i--) if (list[i] === listener || list[i].listener === listener) {\n\t\t\t\toriginalListener = list[i].listener;\n\t\t\t\tposition = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (position < 0) return this;\n\t\t\tif (position === 0) list.shift();\n\t\t\telse spliceOne(list, position);\n\t\t\tif (list.length === 1) events[type] = list[0];\n\t\t\tif (events.removeListener !== void 0) this.emit(\"removeListener\", type, originalListener || listener);\n\t\t}\n\t\treturn this;\n\t};\n\tEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\tEventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {\n\t\tvar listeners, events = this._events, i;\n\t\tif (events === void 0) return this;\n\t\tif (events.removeListener === void 0) {\n\t\t\tif (arguments.length === 0) {\n\t\t\t\tthis._events = Object.create(null);\n\t\t\t\tthis._eventsCount = 0;\n\t\t\t} else if (events[type] !== void 0) {\n\t\t\t\tif (--this._eventsCount === 0) this._events = Object.create(null);\n\t\t\t\telse delete events[type];\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (arguments.length === 0) {\n\t\t\tvar keys = Object.keys(events);\n\t\t\tvar key;\n\t\t\tfor (i = 0; i < keys.length; ++i) {\n\t\t\t\tkey = keys[i];\n\t\t\t\tif (key === \"removeListener\") continue;\n\t\t\t\tthis.removeAllListeners(key);\n\t\t\t}\n\t\t\tthis.removeAllListeners(\"removeListener\");\n\t\t\tthis._events = Object.create(null);\n\t\t\tthis._eventsCount = 0;\n\t\t\treturn this;\n\t\t}\n\t\tlisteners = events[type];\n\t\tif (typeof listeners === \"function\") this.removeListener(type, listeners);\n\t\telse if (listeners !== void 0) for (i = listeners.length - 1; i >= 0; i--) this.removeListener(type, listeners[i]);\n\t\treturn this;\n\t};\n\tfunction _listeners(target, type, unwrap) {\n\t\tvar events = target._events;\n\t\tif (events === void 0) return [];\n\t\tvar evlistener = events[type];\n\t\tif (evlistener === void 0) return [];\n\t\tif (typeof evlistener === \"function\") return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\t\treturn unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n\t}\n\tEventEmitter.prototype.listeners = function listeners(type) {\n\t\treturn _listeners(this, type, true);\n\t};\n\tEventEmitter.prototype.rawListeners = function rawListeners(type) {\n\t\treturn _listeners(this, type, false);\n\t};\n\tEventEmitter.listenerCount = function(emitter, type) {\n\t\tif (typeof emitter.listenerCount === \"function\") return emitter.listenerCount(type);\n\t\telse return listenerCount.call(emitter, type);\n\t};\n\tEventEmitter.prototype.listenerCount = listenerCount;\n\tfunction listenerCount(type) {\n\t\tvar events = this._events;\n\t\tif (events !== void 0) {\n\t\t\tvar evlistener = events[type];\n\t\t\tif (typeof evlistener === \"function\") return 1;\n\t\t\telse if (evlistener !== void 0) return evlistener.length;\n\t\t}\n\t\treturn 0;\n\t}\n\tEventEmitter.prototype.eventNames = function eventNames() {\n\t\treturn this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n\t};\n\tfunction arrayClone(arr, n) {\n\t\tvar copy = new Array(n);\n\t\tfor (var i = 0; i < n; ++i) copy[i] = arr[i];\n\t\treturn copy;\n\t}\n\tfunction spliceOne(list, index) {\n\t\tfor (; index + 1 < list.length; index++) list[index] = list[index + 1];\n\t\tlist.pop();\n\t}\n\tfunction unwrapListeners(arr) {\n\t\tvar ret = new Array(arr.length);\n\t\tfor (var i = 0; i < ret.length; ++i) ret[i] = arr[i].listener || arr[i];\n\t\treturn ret;\n\t}\n\tfunction once(emitter, name) {\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tfunction errorListener(err) {\n\t\t\t\temitter.removeListener(name, resolver);\n\t\t\t\treject(err);\n\t\t\t}\n\t\t\tfunction resolver() {\n\t\t\t\tif (typeof emitter.removeListener === \"function\") emitter.removeListener(\"error\", errorListener);\n\t\t\t\tresolve([].slice.call(arguments));\n\t\t\t}\n\t\t\teventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n\t\t\tif (name !== \"error\") addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n\t\t});\n\t}\n\tfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n\t\tif (typeof emitter.on === \"function\") eventTargetAgnosticAddListener(emitter, \"error\", handler, flags);\n\t}\n\tfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n\t\tif (typeof emitter.on === \"function\") {\n\t\t\tif (flags.once) emitter.once(name, listener);\n\t\t\telse emitter.on(name, listener);\n\t\t} else if (typeof emitter.addEventListener === \"function\") emitter.addEventListener(name, function wrapListener(arg) {\n\t\t\tif (flags.once) emitter.removeEventListener(name, wrapListener);\n\t\t\tlistener(arg);\n\t\t});\n\t\telse throw new TypeError(\"The \\\"emitter\\\" argument must be of type EventEmitter. Received type \" + typeof emitter);\n\t}\n})))();\n/**\n* @license MIT\n* Adapted from stream-browserify 3.0.0's base Stream and pipe implementation (MIT).\n* Copyright Joyent, Inc. and other Node contributors.\n* Copyright (c) James Halliday\n*\n* Permission is hereby granted, free of charge, to any person obtaining a\n* copy of this software and associated documentation files (the\n* \"Software\"), to deal in the Software without restriction, including\n* without limitation the rights to use, copy, modify, merge, publish,\n* distribute, sublicense, and/or sell copies of the Software, and to permit\n* persons to whom the Software is furnished to do so, subject to the\n* following conditions:\n*\n* The above copyright notice and this permission notice shall be included\n* in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n* USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n/** The legacy event stream used by Packer, without unused Readable/Writable implementations. */\nvar Stream = class extends import_events.EventEmitter {\n\tpipe(destination, options) {\n\t\tconst source = this;\n\t\tconst dest = destination;\n\t\tconst ondata = (chunk) => {\n\t\t\tif (dest.writable) {\n\t\t\t\tif (false === dest.write(chunk) && source.pause) source.pause();\n\t\t\t}\n\t\t};\n\t\tsource.on(\"data\", ondata);\n\t\tconst ondrain = () => {\n\t\t\tif (source.readable && source.resume) source.resume();\n\t\t};\n\t\tdest.on(\"drain\", ondrain);\n\t\tif (!dest._isStdio && (!options || options.end !== false)) {\n\t\t\tsource.on(\"end\", onend);\n\t\t\tsource.on(\"close\", onclose);\n\t\t}\n\t\tlet didOnEnd = false;\n\t\tfunction onend() {\n\t\t\tif (didOnEnd) return;\n\t\t\tdidOnEnd = true;\n\t\t\tdest.end();\n\t\t}\n\t\tfunction onclose() {\n\t\t\tif (didOnEnd) return;\n\t\t\tdidOnEnd = true;\n\t\t\tif (typeof dest.destroy === \"function\") dest.destroy();\n\t\t}\n\t\tfunction onerror(error) {\n\t\t\tcleanup();\n\t\t\tif (import_events.EventEmitter.listenerCount(this, \"error\") === 0) throw error;\n\t\t}\n\t\tsource.on(\"error\", onerror);\n\t\tdest.on(\"error\", onerror);\n\t\tfunction cleanup() {\n\t\t\tsource.removeListener(\"data\", ondata);\n\t\t\tdest.removeListener(\"drain\", ondrain);\n\t\t\tsource.removeListener(\"end\", onend);\n\t\t\tsource.removeListener(\"close\", onclose);\n\t\t\tsource.removeListener(\"error\", onerror);\n\t\t\tdest.removeListener(\"error\", onerror);\n\t\t\tsource.removeListener(\"end\", cleanup);\n\t\t\tsource.removeListener(\"close\", cleanup);\n\t\t\tdest.removeListener(\"close\", cleanup);\n\t\t}\n\t\tsource.on(\"end\", cleanup);\n\t\tsource.on(\"close\", cleanup);\n\t\tdest.on(\"close\", cleanup);\n\t\tdest.emit(\"pipe\", source);\n\t\treturn dest;\n\t}\n};\n// \\0@oxc-project+runtime@0.155.0/helpers/esm/asyncToGenerator.js\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) {\n\ttry {\n\t\tvar i = n[a](c), u = i.value;\n\t} catch (n) {\n\t\te(n);\n\t\treturn;\n\t}\n\ti.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n\treturn function() {\n\t\tvar t = this, e = arguments;\n\t\treturn new Promise(function(r, o) {\n\t\t\tvar a = n.apply(t, e);\n\t\t\tfunction _next(n) {\n\t\t\t\tasyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n\t\t\t}\n\t\t\tfunction _throw(n) {\n\t\t\t\tasyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n\t\t\t}\n\t\t\t_next(void 0);\n\t\t});\n\t};\n}\n// src/export/packer/packer.ts\n/**\n* Prettify options for formatting XML output.\n*\n* Controls the indentation style used when formatting the generated XML.\n* Prettified output is more human-readable but results in larger file sizes.\n*\n* @publicApi\n*/\nvar PrettifyType = {\n\t/** No prettification (smallest file size) */\n\tNONE: \"\",\n\t/** Indent with 2 spaces */\n\tWITH_2_BLANKS: \" \",\n\t/** Indent with 4 spaces */\n\tWITH_4_BLANKS: \" \",\n\t/** Indent with tab character */\n\tWITH_TAB: \"\t\"\n};\nvar convertPrettifyType = (prettify) => prettify === true ? PrettifyType.WITH_2_BLANKS : prettify === false ? void 0 : prettify;\nvar mimeTypeOf = (file) => file.Macros === void 0 ? \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" : \"application/vnd.ms-word.document.macroEnabled.12\";\n/**\n* Exports documents to various output formats.\n*\n* The Packer class provides static methods to convert a File object into different\n* output formats such as Buffer, Blob, string, or stream. It handles the compilation\n* of the document structure into OOXML format and compression into a .docx ZIP archive.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* // Export to buffer (Node.js)\n* const buffer = await Packer.toBuffer(doc);\n*\n* // Export to blob (browser)\n* const blob = await Packer.toBlob(doc);\n*\n* // Export with prettified XML\n* const buffer = await Packer.toBuffer(doc, PrettifyType.WITH_2_BLANKS);\n* ```\n*/\nvar Packer = class Packer {\n\t/**\n\t* Exports a document to the specified output format.\n\t*\n\t* @param file - The document to export\n\t* @param type - The output format type (e.g., \"nodebuffer\", \"blob\", \"string\")\n\t* @param prettify - Whether to prettify the XML output (boolean or PrettifyType)\n\t* @param overrides - Optional array of file overrides for custom XML content\n\t* @returns A promise resolving to the exported document in the specified format\n\t*/\n\tstatic pack(_x, _x2, _x3) {\n\t\tvar _this = this;\n\t\treturn _asyncToGenerator(function* (file, type, prettify, overrides = []) {\n\t\t\treturn zipOutput(zipFiles(_this.compiler.compile(file, convertPrettifyType(prettify), overrides)), type, mimeTypeOf(file));\n\t\t}).apply(this, arguments);\n\t}\n\t/**\n\t* Exports a document to a string representation.\n\t*\n\t* @param file - The document to export\n\t* @param prettify - Whether to prettify the XML output\n\t* @param overrides - Optional array of file overrides\n\t* @returns A promise resolving to the document as a string\n\t*/\n\tstatic toString(file, prettify, overrides = []) {\n\t\treturn Packer.pack(file, \"string\", prettify, overrides);\n\t}\n\t/**\n\t* Exports a document to a Node.js Buffer.\n\t*\n\t* @param file - The document to export\n\t* @param prettify - Whether to prettify the XML output\n\t* @param overrides - Optional array of file overrides\n\t* @returns A promise resolving to the document as a Buffer\n\t*/\n\tstatic toBuffer(file, prettify, overrides = []) {\n\t\treturn Packer.pack(file, \"nodebuffer\", prettify, overrides);\n\t}\n\t/**\n\t* Exports a document to a base64-encoded string.\n\t*\n\t* @param file - The document to export\n\t* @param prettify - Whether to prettify the XML output\n\t* @param overrides - Optional array of file overrides\n\t* @returns A promise resolving to the document as a base64 string\n\t*/\n\tstatic toBase64String(file, prettify, overrides = []) {\n\t\treturn Packer.pack(file, \"base64\", prettify, overrides);\n\t}\n\t/**\n\t* Exports a document to a Blob (for browser environments).\n\t*\n\t* @param file - The document to export\n\t* @param prettify - Whether to prettify the XML output\n\t* @param overrides - Optional array of file overrides\n\t* @returns A promise resolving to the document as a Blob\n\t*/\n\tstatic toBlob(file, prettify, overrides = []) {\n\t\treturn Packer.pack(file, \"blob\", prettify, overrides);\n\t}\n\t/**\n\t* Exports a document to an ArrayBuffer.\n\t*\n\t* @param file - The document to export\n\t* @param prettify - Whether to prettify the XML output\n\t* @param overrides - Optional array of file overrides\n\t* @returns A promise resolving to the document as an ArrayBuffer\n\t*/\n\tstatic toArrayBuffer(file, prettify, overrides = []) {\n\t\treturn Packer.pack(file, \"arraybuffer\", prettify, overrides);\n\t}\n\t/**\n\t* Exports a document to a Node.js Stream.\n\t*\n\t* The stream gives the document as one Node.js Buffer, then ends. Where there's no Buffer, as in a browser, it\n\t* emits an `error` event instead, so use `toBlob` there.\n\t*\n\t* @param file - The document to export\n\t* @param prettify - Whether to prettify the XML output\n\t* @param overrides - Optional array of file overrides\n\t* @returns A readable stream containing the document data\n\t*/\n\tstatic toStream(file, prettify, overrides = []) {\n\t\tconst stream = new Stream();\n\t\tconst files = this.compiler.compile(file, convertPrettifyType(prettify), overrides);\n\t\tnew Promise((resolve) => setTimeout(resolve)).then(() => zipOutput(zipFiles(files), \"nodebuffer\", mimeTypeOf(file))).then((data) => {\n\t\t\tstream.emit(\"data\", data);\n\t\t\tstream.emit(\"end\");\n\t\t}, (error) => stream.emit(\"error\", error));\n\t\treturn stream;\n\t}\n};\n_defineProperty(Packer, \"compiler\", new Compiler());\n// src/patcher/bookmark-ids.ts\nvar bookmarkIdOf = (element) => {\n\tvar _element$attributes;\n\tif (element.name !== \"w:bookmarkStart\" && element.name !== \"w:bookmarkEnd\") return;\n\tconst id = Number((_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes[\"w:id\"]);\n\treturn Number.isInteger(id) ? id : void 0;\n};\n/**\n* Finds the id of every bookmark in an element, at any depth.\n*\n* @param element - The element to search, such as a part's root\n* @returns The ids, once for each bookmarkStart and bookmarkEnd\n*/\nvar findBookmarkIds = (element) => {\n\tvar _element$elements;\n\tconst id = bookmarkIdOf(element);\n\treturn [...id === void 0 ? [] : [id], ...((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).flatMap(findBookmarkIds)];\n};\n/**\n* Creates a function that renumbers the bookmarks in content being inserted, so none takes an id the document\n* already uses. Bookmark ids must be unique within a document, but a bookmark's id is chosen when it is created,\n* without knowing which ids the template has.\n*\n* A bookmark keeps its id if nothing in the document uses it yet, and otherwise gets the next unused one. An id is\n* renumbered the same way each time, so a bookmark's start and end still share one, even in separate patches.\n*\n* @param idsInDocument - The ids of the bookmarks already in the document\n* @returns A function that returns the elements with their bookmarks renumbered\n*/\nvar renumberBookmarksAvoiding = (idsInDocument) => {\n\tconst usedIds = new Set(idsInDocument);\n\tconst newIds = /* @__PURE__ */ new Map();\n\tlet highestId = idsInDocument.reduce((highest, id) => Math.max(highest, id), 0);\n\tconst newIdFor = (id) => {\n\t\tconst knownId = newIds.get(id);\n\t\tif (knownId !== void 0) return knownId;\n\t\tconst newId = usedIds.has(id) ? highestId + 1 : id;\n\t\thighestId = Math.max(highestId, newId);\n\t\tusedIds.add(newId);\n\t\tnewIds.set(id, newId);\n\t\treturn newId;\n\t};\n\tconst renumber = (element) => {\n\t\tconst id = bookmarkIdOf(element);\n\t\treturn _objectSpread2(_objectSpread2(_objectSpread2({}, element), id === void 0 ? {} : { attributes: _objectSpread2(_objectSpread2({}, element.attributes), {}, { \"w:id\": String(newIdFor(id)) }) }), element.elements === void 0 ? {} : { elements: element.elements.map(renumber) });\n\t};\n\treturn (elements) => elements.map(renumber);\n};\n// src/patcher/util.ts\n/**\n* Utility functions for XML manipulation in document patching.\n*\n* @module\n*/\nvar formatter$3 = new Formatter();\n/**\n* The text of a part, which is UTF-8. A byte order mark at its start is kept, as JSZip, which docx used to unzip with,\n* kept it.\n*\n* @param bytes - The part's bytes\n* @returns The part's text\n*/\nvar decodeUtf8 = (bytes) => new TextDecoder(\"utf-8\", { ignoreBOM: true }).decode(bytes);\n/**\n* Converts XML string to JSON element structure.\n*\n* Parses XML text into a JavaScript object representation that can be\n* manipulated programmatically. Preserves spaces between elements for\n* accurate text handling.\n*\n* @param xmlData - The XML string to parse\n* @returns Parsed XML as an Element object\n*\n* @example\n* ```typescript\n* const element = toJson('<w:p><w:r><w:t>Hello</w:t></w:r></w:p>');\n* ```\n*/\nvar toJson = (xmlData) => {\n\treturn parseXml(xmlData, { keepWhitespaceText: true });\n};\n/**\n* Creates text element contents from a text string.\n*\n* Generates the XML element structure for a text node (w:t) by formatting\n* a Text component and extracting its element contents. Used when creating\n* new text runs during replacement operations.\n*\n* @param text - The text content to wrap in element structure\n* @returns Array of XML elements representing the text\n*\n* @example\n* ```typescript\n* const elements = createTextElementContents(\"Hello World\");\n* // Returns XML elements for <w:t>Hello World</w:t>\n* ```\n*/\nvar createTextElementContents = (text) => {\n\tvar _textJson$elements$0$;\n\treturn (_textJson$elements$0$ = toJson(stringifyXmlable(formatter$3.format(new Text({ text })))).elements[0].elements) !== null && _textJson$elements$0$ !== void 0 ? _textJson$elements$0$ : [];\n};\n/**\n* Adds xml:space=\"preserve\" attribute to an element.\n*\n* The xml:space attribute instructs XML processors to preserve whitespace\n* in the element's content. This is important when text contains leading\n* or trailing spaces that must be maintained.\n*\n* @param element - The element to patch\n* @returns New element with xml:space attribute added\n*\n* @example\n* ```typescript\n* const patched = patchSpaceAttribute(textElement);\n* // Adds xml:space=\"preserve\" to maintain whitespace\n* ```\n*/\nvar patchSpaceAttribute = (element) => _objectSpread2(_objectSpread2({}, element), {}, { attributes: { \"xml:space\": \"preserve\" } });\n/**\n* Retrieves first-level child elements by parent element name.\n*\n* Finds the first element with the specified name and returns its children, which elements can be added to.\n* Used to access collections like relationship elements or content type definitions.\n*\n* @param relationships - The parent XML element to search\n* @param id - The element name to find\n* @returns Array of child elements\n*\n* @example\n* ```typescript\n* const rels = getFirstLevelElements(relationshipsXml, \"Relationships\");\n* // Returns array of Relationship elements\n* ```\n*/\nvar getFirstLevelElements = (relationships, id) => {\n\tvar _relationships$elemen, _parent$elements;\n\tconst parent = (_relationships$elemen = relationships.elements) === null || _relationships$elemen === void 0 ? void 0 : _relationships$elemen.find((e) => e.name === id);\n\tif (parent === void 0) return [];\n\t(_parent$elements = parent.elements) !== null && _parent$elements !== void 0 || (parent.elements = []);\n\treturn parent.elements;\n};\n// src/patcher/content-types-manager.ts\n/**\n* Appends a content type definition to the [Content_Types].xml structure.\n*\n* The [Content_Types].xml file declares the MIME types for all file extensions\n* in the OOXML package. This function adds a new content type if it doesn't\n* already exist, ensuring that newly added media files are properly declared.\n*\n* @param element - The [Content_Types].xml root element\n* @param contentType - The MIME type (e.g., \"image/png\")\n* @param extension - The file extension (e.g., \"png\")\n*\n* @example\n* ```typescript\n* appendContentType(contentTypesElement, \"image/png\", \"png\");\n* appendContentType(contentTypesElement, \"image/jpeg\", \"jpg\");\n* ```\n*/\nvar appendContentType = (element, contentType, extension) => {\n\tconst relationshipElements = getFirstLevelElements(element, \"Types\");\n\tif (relationshipElements.some((el) => {\n\t\tvar _el$attributes, _el$attributes2;\n\t\treturn el.type === \"element\" && el.name === \"Default\" && (el === null || el === void 0 || (_el$attributes = el.attributes) === null || _el$attributes === void 0 ? void 0 : _el$attributes.ContentType) === contentType && (el === null || el === void 0 || (_el$attributes2 = el.attributes) === null || _el$attributes2 === void 0 ? void 0 : _el$attributes2.Extension) === extension;\n\t})) return;\n\trelationshipElements.push({\n\t\tattributes: {\n\t\t\tContentType: contentType,\n\t\t\tExtension: extension\n\t\t},\n\t\tname: \"Default\",\n\t\ttype: \"element\"\n\t});\n};\n/**\n* Appends a content type for one part of the package to the [Content_Types].xml structure, such as a chart a patch\n* adds, unless the part already has one.\n*\n* @param element - The [Content_Types].xml root element\n* @param contentType - The part's MIME type (e.g., \"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\")\n* @param partName - The part's path in the package (e.g., \"/word/charts/chart1.xml\")\n*/\nvar appendContentTypeOverride = (element, contentType, partName) => {\n\tconst contentTypeElements = getFirstLevelElements(element, \"Types\");\n\tif (contentTypeElements.some((el) => {\n\t\tvar _el$attributes3;\n\t\treturn el.type === \"element\" && el.name === \"Override\" && ((_el$attributes3 = el.attributes) === null || _el$attributes3 === void 0 ? void 0 : _el$attributes3.PartName) === partName;\n\t})) return;\n\tcontentTypeElements.push({\n\t\tattributes: {\n\t\t\tContentType: contentType,\n\t\t\tPartName: partName\n\t\t},\n\t\tname: \"Override\",\n\t\ttype: \"element\"\n\t});\n};\n/**\n* Removes the content type of one part of the package from the [Content_Types].xml structure, such as a part a patch\n* removes. Part names are compared without case.\n*\n* @param element - The [Content_Types].xml root element\n* @param partName - The part's path in the package (e.g., \"/word/embeddings/Microsoft_Excel_Worksheet1.xlsx\")\n*/\nvar removeContentTypeOverride = (element, partName) => {\n\tvar _element$elements;\n\tconst types = (_element$elements = element.elements) === null || _element$elements === void 0 ? void 0 : _element$elements.find((el) => el.name === \"Types\");\n\tif ((types === null || types === void 0 ? void 0 : types.elements) === void 0) return;\n\ttypes.elements = types.elements.filter((el) => {\n\t\tvar _el$attributes$PartNa, _el$attributes4;\n\t\treturn !(el.name === \"Override\" && String((_el$attributes$PartNa = (_el$attributes4 = el.attributes) === null || _el$attributes4 === void 0 ? void 0 : _el$attributes4.PartName) !== null && _el$attributes$PartNa !== void 0 ? _el$attributes$PartNa : \"\").toLowerCase() === partName.toLowerCase());\n\t});\n};\n// src/patcher/relationship-manager.ts\n/**\n* Extracts the numeric ID from a relationship ID string.\n*\n* @param relationshipId - Relationship ID in format \"rId123\"\n* @returns The numeric portion of the ID\n*/\nvar getIdFromRelationshipId = (relationshipId) => {\n\tconst output = parseInt(relationshipId.substring(3), 10);\n\treturn isNaN(output) ? 0 : output;\n};\n/**\n* Determines the next available relationship ID number.\n*\n* Scans all existing relationships and returns the next sequential ID number\n* to use when adding a new relationship.\n*\n* @param relationships - The relationships XML element\n* @returns The next available relationship ID number\n*\n* @example\n* ```typescript\n* const nextId = getNextRelationshipIndex(relationshipsElement);\n* // If highest existing ID is rId5, returns 6\n* ```\n*/\nvar getNextRelationshipIndex = (relationships) => {\n\treturn getFirstLevelElements(relationships, \"Relationships\").map((e) => {\n\t\tvar _e$attributes$Id$toSt, _e$attributes;\n\t\treturn getIdFromRelationshipId((_e$attributes$Id$toSt = (_e$attributes = e.attributes) === null || _e$attributes === void 0 || (_e$attributes = _e$attributes.Id) === null || _e$attributes === void 0 ? void 0 : _e$attributes.toString()) !== null && _e$attributes$Id$toSt !== void 0 ? _e$attributes$Id$toSt : \"\");\n\t}).reduce((acc, curr) => Math.max(acc, curr), 0) + 1;\n};\n/**\n* Appends a new relationship to a .rels file structure.\n*\n* Relationships define connections between parts of an OOXML package,\n* such as linking documents to images, hyperlinks, or other resources.\n*\n* @param relationships - The relationships XML element\n* @param id - The relationship ID (number or string)\n* @param type - The relationship type URI\n* @param target - The target path or URI\n* @param targetMode - Optional target mode (Internal or External)\n* @returns The updated relationship elements array\n*\n* @example\n* ```typescript\n* appendRelationship(\n* relationshipsElement,\n* 6,\n* \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n* \"media/image1.png\"\n* );\n* ```\n*/\nvar appendRelationship = (relationships, id, type, target, targetMode) => {\n\tconst relationshipElements = getFirstLevelElements(relationships, \"Relationships\");\n\trelationshipElements.push({\n\t\tattributes: {\n\t\t\tId: `rId${id}`,\n\t\t\tType: type,\n\t\t\tTarget: target,\n\t\t\tTargetMode: targetMode\n\t\t},\n\t\tname: \"Relationship\",\n\t\ttype: \"element\"\n\t});\n\treturn relationshipElements;\n};\n/**\n* Creates an empty relationships part, for a part that has none.\n*/\nvar createRelationshipFile = () => ({\n\tdeclaration: { attributes: {\n\t\tversion: \"1.0\",\n\t\tencoding: \"UTF-8\",\n\t\tstandalone: \"yes\"\n\t} },\n\telements: [{\n\t\ttype: \"element\",\n\t\tname: \"Relationships\",\n\t\tattributes: { xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\" },\n\t\telements: []\n\t}]\n});\n// src/patcher/core-properties.ts\nvar CORE_PROPERTIES_RELATIONSHIP_TYPE = \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\";\nvar CORE_PROPERTIES_CONTENT_TYPE = \"application/vnd.openxmlformats-package.core-properties+xml\";\nvar PACKAGE_RELATIONSHIPS_PATH = \"_rels/.rels\";\nvar CORE_PROPERTIES_PATH = \"docProps/core.xml\";\nvar NAMESPACES = {\n\tcp: \"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\",\n\tdc: \"http://purl.org/dc/elements/1.1/\"\n};\nvar ELEMENTS = {\n\ttitle: {\n\t\tnamespace: \"dc\",\n\t\tname: \"title\"\n\t},\n\tsubject: {\n\t\tnamespace: \"dc\",\n\t\tname: \"subject\"\n\t},\n\tcreator: {\n\t\tnamespace: \"dc\",\n\t\tname: \"creator\"\n\t},\n\tkeywords: {\n\t\tnamespace: \"cp\",\n\t\tname: \"keywords\"\n\t},\n\tdescription: {\n\t\tnamespace: \"dc\",\n\t\tname: \"description\"\n\t},\n\tlastModifiedBy: {\n\t\tnamespace: \"cp\",\n\t\tname: \"lastModifiedBy\"\n\t},\n\trevision: {\n\t\tnamespace: \"cp\",\n\t\tname: \"revision\"\n\t}\n};\nvar textOf = (value) => value === \"\" ? [] : [{\n\ttype: \"text\",\n\ttext: String(value)\n}];\nvar localName = (element) => {\n\tvar _element$name;\n\treturn (_element$name = element.name) === null || _element$name === void 0 ? void 0 : _element$name.slice(element.name.indexOf(\":\") + 1);\n};\n/**\n* The prefix, with its colon, that the root gives a namespace, or none if it's the default one. A root without the\n* namespace is given it with its usual prefix.\n*/\nvar prefixOf = (root, namespace) => {\n\tvar _Object$entries$find;\n\tconst declaration = (_Object$entries$find = Object.entries(_objectSpread2({}, root.attributes)).find(([name, value]) => (name === \"xmlns\" || name.startsWith(\"xmlns:\")) && value === NAMESPACES[namespace])) === null || _Object$entries$find === void 0 ? void 0 : _Object$entries$find[0];\n\tif (declaration === void 0) {\n\t\troot.attributes = _objectSpread2(_objectSpread2({}, root.attributes), {}, { [`xmlns:${namespace}`]: NAMESPACES[namespace] });\n\t\treturn `${namespace}:`;\n\t}\n\treturn declaration === \"xmlns\" ? \"\" : `${declaration.slice(6)}:`;\n};\n/**\n* The text of a part, in UTF-16, from its byte order mark, or else in UTF-8.\n*/\nvar decode = (bytes) => {\n\tconst encoding = bytes[0] === 255 && bytes[1] === 254 ? \"utf-16le\" : bytes[0] === 254 && bytes[1] === 255 ? \"utf-16be\" : \"utf-8\";\n\treturn new TextDecoder(encoding).decode(bytes);\n};\n/**\n* The package's part at a path, if it has one. The patcher keeps a part in UTF-16, or one whose name doesn't end in\n* .xml, with its other parts, as it found it, so that is read and moved to its XML parts, to be written in UTF-8 with\n* them, rather than written over them as it was.\n*/\nvar readPart = (parts, binaryParts, path) => {\n\tvar _part$declaration;\n\tconst bytes = binaryParts.get(path);\n\tif (bytes === void 0) return parts.get(path);\n\tconst part = toJson(decode(bytes));\n\tif ((_part$declaration = part.declaration) === null || _part$declaration === void 0 ? void 0 : _part$declaration.attributes) part.declaration.attributes.encoding = \"UTF-8\";\n\tbinaryParts.delete(path);\n\tparts.set(path, part);\n\treturn part;\n};\n/**\n* The path of the package's core properties part, found from its relationships. A package without one is given a\n* relationship to docProps/core.xml.\n*/\nvar corePropertiesPathOf = (parts) => {\n\tvar _parts$get, _getFirstLevelElement;\n\tconst relationships = (_parts$get = parts.get(PACKAGE_RELATIONSHIPS_PATH)) !== null && _parts$get !== void 0 ? _parts$get : createRelationshipFile();\n\tconst target = (_getFirstLevelElement = getFirstLevelElements(relationships, \"Relationships\").find((relationship) => {\n\t\tvar _relationship$attribu;\n\t\treturn ((_relationship$attribu = relationship.attributes) === null || _relationship$attribu === void 0 ? void 0 : _relationship$attribu.Type) === CORE_PROPERTIES_RELATIONSHIP_TYPE;\n\t})) === null || _getFirstLevelElement === void 0 || (_getFirstLevelElement = _getFirstLevelElement.attributes) === null || _getFirstLevelElement === void 0 ? void 0 : _getFirstLevelElement.Target;\n\tif (typeof target === \"string\") return resolveTarget(\"\", target);\n\tappendRelationship(relationships, getNextRelationshipIndex(relationships), CORE_PROPERTIES_RELATIONSHIP_TYPE, CORE_PROPERTIES_PATH);\n\tparts.set(PACKAGE_RELATIONSHIPS_PATH, relationships);\n\treturn CORE_PROPERTIES_PATH;\n};\n/**\n* Sets the given properties of a document in its core properties part, replacing the template's, and leaves the\n* others as they are. A template without the part is given one.\n*\n* @param parts - The package's XML parts, by their paths, which the part is set in\n* @param binaryParts - The package's other parts, by their paths, which the part is taken from if it's one of them\n* @param addContentTypeOverride - Adds the content type of the part, if it's new\n*/\nvar patchCoreProperties = (parts, binaryParts, properties, { addContentTypeOverride }) => {\n\tvar _part$elements, _root$elements;\n\tconst path = corePropertiesPathOf(parts);\n\tconst existing = readPart(parts, binaryParts, path);\n\tconst part = existing !== null && existing !== void 0 ? existing : {\n\t\tdeclaration: { attributes: {\n\t\t\tversion: \"1.0\",\n\t\t\tencoding: \"UTF-8\",\n\t\t\tstandalone: \"yes\"\n\t\t} },\n\t\telements: [{\n\t\t\ttype: \"element\",\n\t\t\tname: \"cp:coreProperties\",\n\t\t\tattributes: { \"xmlns:cp\": NAMESPACES.cp },\n\t\t\telements: []\n\t\t}]\n\t};\n\tif (existing === void 0) {\n\t\tparts.set(path, part);\n\t\taddContentTypeOverride(CORE_PROPERTIES_CONTENT_TYPE, `/${path}`);\n\t}\n\tconst root = (_part$elements = part.elements) === null || _part$elements === void 0 ? void 0 : _part$elements.find((element) => localName(element) === \"coreProperties\");\n\tif (root === void 0) throw new Error(`Could not find the core properties in ${path}`);\n\t(_root$elements = root.elements) !== null && _root$elements !== void 0 || (root.elements = []);\n\tfor (const [key, { namespace, name }] of Object.entries(ELEMENTS)) {\n\t\tconst value = properties[key];\n\t\tif (value === void 0) continue;\n\t\tconst element = root.elements.find((item) => localName(item) === name);\n\t\tif (element) element.elements = textOf(value);\n\t\telse root.elements.push({\n\t\t\ttype: \"element\",\n\t\t\tname: `${prefixOf(root, namespace)}${name}`,\n\t\t\telements: textOf(value)\n\t\t});\n\t}\n};\n// src/patcher/drawing-ids.ts\nvar DRAWINGS = /* @__PURE__ */ new Set([\"wp:inline\", \"wp:anchor\"]);\nvar ID_ELEMENTS = /* @__PURE__ */ new Set([\n\t\"wp:docPr\",\n\t\"wps:cNvPr\",\n\t\"wpg:cNvPr\"\n]);\nvar REFERENCE_ELEMENTS = /* @__PURE__ */ new Set([\"a:stCxn\", \"a:endCxn\"]);\nvar idOf$1 = (element, names) => {\n\tvar _element$name, _element$attributes;\n\tif (!names.has((_element$name = element.name) !== null && _element$name !== void 0 ? _element$name : \"\")) return;\n\tconst id = Number((_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes.id);\n\treturn Number.isInteger(id) ? id : void 0;\n};\n/**\n* Finds the id of every drawing in an element, at any depth, and of the shapes in them, such as in a group.\n*\n* @param element - The element to search, such as a part's root\n* @returns The ids, once for each element that has one\n*/\nvar findDrawingIds = (element) => {\n\tvar _element$elements;\n\tconst id = idOf$1(element, ID_ELEMENTS);\n\treturn [...id === void 0 ? [] : [id], ...((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).flatMap(findDrawingIds)];\n};\nvar ownIdsOf = (drawing) => {\n\tconst idsIn = (element) => {\n\t\tvar _element$elements2;\n\t\tconst id = idOf$1(element, ID_ELEMENTS);\n\t\treturn [...id === void 0 ? [] : [id], ...((_element$elements2 = element.elements) !== null && _element$elements2 !== void 0 ? _element$elements2 : []).flatMap((child) => {\n\t\t\tvar _child$name;\n\t\t\treturn DRAWINGS.has((_child$name = child.name) !== null && _child$name !== void 0 ? _child$name : \"\") ? [] : idsIn(child);\n\t\t})];\n\t};\n\treturn idsIn(drawing);\n};\n/**\n* Creates a function that renumbers the drawings in content being inserted, so none has an id another drawing in the\n* document has. Word finds a document whose drawings share an id unreadable, even when they are in different parts,\n* such as a header and the body. A drawing's id is chosen when it is created, without knowing which ids the template\n* has, and content inserted more than once would have the same ids each time.\n*\n* A drawing keeps its ids if nothing in the document has them yet, and otherwise gets the next unused ones. The\n* connectors in a drawing then still join the shapes they did.\n*\n* @param idsInDocument - The ids of the drawings already in the document, and of the shapes in them\n* @returns A function that returns the elements with their drawings renumbered\n*/\nvar renumberDrawingsAvoiding = (idsInDocument) => {\n\tconst usedIds = new Set(idsInDocument);\n\tlet highestId = idsInDocument.reduce((highest, id) => Math.max(highest, id), 0);\n\tconst newIdFor = (id) => {\n\t\tconst newId = usedIds.has(id) ? highestId + 1 : id;\n\t\thighestId = Math.max(highestId, newId);\n\t\tusedIds.add(newId);\n\t\treturn newId;\n\t};\n\tconst renumberDrawing = (drawing) => {\n\t\tconst newIds = new Map([...new Set(ownIdsOf(drawing))].map((id) => [id, newIdFor(id)]));\n\t\tconst renumberIn = (element) => {\n\t\t\tvar _element$name2, _idOf;\n\t\t\tif (element !== drawing && DRAWINGS.has((_element$name2 = element.name) !== null && _element$name2 !== void 0 ? _element$name2 : \"\")) return renumberDrawing(element);\n\t\t\tconst id = (_idOf = idOf$1(element, ID_ELEMENTS)) !== null && _idOf !== void 0 ? _idOf : idOf$1(element, REFERENCE_ELEMENTS);\n\t\t\tconst newId = id === void 0 ? void 0 : newIds.get(id);\n\t\t\treturn _objectSpread2(_objectSpread2(_objectSpread2({}, element), newId === void 0 ? {} : { attributes: _objectSpread2(_objectSpread2({}, element.attributes), {}, { id: String(newId) }) }), element.elements === void 0 ? {} : { elements: element.elements.map(renumberIn) });\n\t\t};\n\t\treturn renumberIn(drawing);\n\t};\n\tconst renumber = (element) => {\n\t\tvar _element$name3;\n\t\treturn DRAWINGS.has((_element$name3 = element.name) !== null && _element$name3 !== void 0 ? _element$name3 : \"\") ? renumberDrawing(element) : _objectSpread2(_objectSpread2({}, element), element.elements === void 0 ? {} : { elements: element.elements.map(renumber) });\n\t};\n\treturn (elements) => elements.map(renumber);\n};\n// src/patcher/patch-type.ts\n/**\n* The types of patch `patchDocument` applies.\n*\n* @module\n*/\n/**\n* Patch type enumeration.\n*\n* Determines how the replacement content should be inserted into the document.\n*\n* @publicApi\n*/\nvar PatchType = {\n\t/** Replace entire file-level elements (e.g., whole paragraphs) */\n\tDOCUMENT: \"file\",\n\t/** Replace content within paragraphs (inline replacement) */\n\tPARAGRAPH: \"paragraph\",\n\t/**\n\t* Repeat the rows of a table that hold the placeholder's fields, such as `{{items.name}}`, once for each row of\n\t* data. See {@link TableRowsPatch}\n\t*/\n\tTABLE_ROWS: \"tableRows\",\n\t/**\n\t* Change a drawing whose alt text holds the placeholder, and the parts it refers to, such as the data of a chart made\n\t* in Word. See {@link DrawingPatch}\n\t*/\n\tDRAWING: \"drawing\"\n};\n// src/patcher/drawing-patch.ts\n/**\n* Patches for drawings in a template whose alt text holds a placeholder, such as a chart made in Word whose data a patch\n* replaces, and the parts of the template's package they read and change.\n*\n* Reference: http://officeopenxml.com/anatomyofOOXML.php\n*\n* @module\n*/\n/**\n* A patch for a drawing in a template whose alt text holds the placeholder, such as `{{sales}}`, rather than for the\n* placeholder in text. It changes the drawing, and the parts it refers to, in place. {@link ImagePatch} is one: it\n* replaces a picture's image. So is `ChartDataPatch` from `docx/charts`, which replaces the data of a chart made in Word.\n*\n* A drawing's alt text is its description (`descr`) or title. A drawing patch leaves the placeholder in text as it is.\n*\n* @publicApi\n*/\nvar DrawingPatch = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"type\", PatchType.DRAWING);\n\t}\n};\nvar DRAWING_PROPERTIES = /* @__PURE__ */ new Map([\n\t[\"wp:inline\", \"wp:docPr\"],\n\t[\"wp:anchor\", \"wp:docPr\"],\n\t[\"wpg:graphicFrame\", \"wpg:cNvPr\"],\n\t[\"wpc:graphicFrame\", \"wpg:cNvPr\"]\n]);\n/**\n* Each drawing in an element, in document order, including drawings in text boxes and in both a choice and its\n* fallback (`mc:AlternateContent`).\n*/\nvar findDrawings = (element) => {\n\tvar _element$elements;\n\treturn ((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).flatMap((child) => {\n\t\tvar _child$elements;\n\t\tconst name = child.name === void 0 ? void 0 : DRAWING_PROPERTIES.get(child.name);\n\t\tconst properties = name === void 0 ? void 0 : (_child$elements = child.elements) === null || _child$elements === void 0 ? void 0 : _child$elements.find((e) => e.name === name);\n\t\treturn [...properties ? [{\n\t\t\telement: child,\n\t\t\tproperties\n\t\t}] : [], ...findDrawings(child)];\n\t});\n};\n/**\n* A drawing's alt text: its description, then its title.\n*/\nvar altTextOf = (properties) => {\n\tvar _properties$attribute, _properties$attribute2;\n\treturn [(_properties$attribute = properties.attributes) === null || _properties$attribute === void 0 ? void 0 : _properties$attribute.descr, (_properties$attribute2 = properties.attributes) === null || _properties$attribute2 === void 0 ? void 0 : _properties$attribute2.title].flatMap((text) => text === void 0 ? [] : [String(text)]);\n};\nvar CONTENT_TYPES$1 = \"[Content_Types].xml\";\n/**\n* A relationships part's relationships, which can be added to. A part without the `Relationships` element is given one.\n*/\nvar relationshipsIn = (relationships) => {\n\tvar _relationships$elemen;\n\tif (!((_relationships$elemen = relationships.elements) === null || _relationships$elemen === void 0 ? void 0 : _relationships$elemen.some((element) => element.name === \"Relationships\"))) {\n\t\tvar _relationships$elemen2;\n\t\trelationships.elements = [...(_relationships$elemen2 = relationships.elements) !== null && _relationships$elemen2 !== void 0 ? _relationships$elemen2 : [], ...createRelationshipFile().elements];\n\t}\n\treturn getFirstLevelElements(relationships, \"Relationships\");\n};\nvar RELATIONSHIPS_NAMESPACE = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\";\n/**\n* The prefixes an element and its descendants give the relationships namespace, with \"r\", which Word uses.\n*/\nvar relationshipPrefixesIn = (element) => {\n\tvar _element$attributes, _element$elements2;\n\treturn /* @__PURE__ */ new Set([\n\t\t\"r\",\n\t\t...Object.entries((_element$attributes = element.attributes) !== null && _element$attributes !== void 0 ? _element$attributes : {}).flatMap(([name, value]) => name.startsWith(\"xmlns:\") && value === RELATIONSHIPS_NAMESPACE ? [name.slice(6)] : []),\n\t\t...((_element$elements2 = element.elements) !== null && _element$elements2 !== void 0 ? _element$elements2 : []).flatMap((child) => [...relationshipPrefixesIn(child)])\n\t]);\n};\n/**\n* The ids of the relationships an element and its descendants refer to, such as a picture's `r:embed`.\n*\n* @param prefixes - The prefixes of the relationships namespace in the element's part\n*/\nvar relationshipIdsIn = (element, prefixes) => {\n\tvar _element$attributes2, _element$elements3;\n\treturn /* @__PURE__ */ new Set([...Object.entries((_element$attributes2 = element.attributes) !== null && _element$attributes2 !== void 0 ? _element$attributes2 : {}).flatMap(([name, value]) => name.includes(\":\") && prefixes.has(name.slice(0, name.indexOf(\":\"))) ? [String(value)] : []), ...((_element$elements3 = element.elements) !== null && _element$elements3 !== void 0 ? _element$elements3 : []).flatMap((child) => [...relationshipIdsIn(child, prefixes)])]);\n};\n/**\n* Reads and changes the template's parts and the relationships between them.\n*\n* @param parts - The template's XML parts, parsed, by their paths, which are changed in place\n* @param binaryParts - The template's other parts, by their paths\n*/\nvar contentsOf = (parts, binaryParts) => {\n\tconst has = (path) => parts.has(path) || binaryParts.has(path);\n\tconst findPath = (path) => {\n\t\tif (has(path)) return path;\n\t\tconst decoded = (() => {\n\t\t\ttry {\n\t\t\t\treturn decodeURI(path);\n\t\t\t} catch (_unused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t})();\n\t\tif (decoded !== void 0 && has(decoded)) return decoded;\n\t\tconst lower = path.toLowerCase();\n\t\treturn [...parts.keys(), ...binaryParts.keys()].find((key) => key.toLowerCase() === lower);\n\t};\n\tconst findRelationship = (from, id) => {\n\t\tconst relationships = parts.get(relationshipsPathOf(from));\n\t\treturn relationships === void 0 ? void 0 : getFirstLevelElements(relationships, \"Relationships\").find((relationship) => {\n\t\t\tvar _relationship$attribu;\n\t\t\treturn relationship.name === \"Relationship\" && ((_relationship$attribu = relationship.attributes) === null || _relationship$attribu === void 0 ? void 0 : _relationship$attribu.Id) === id;\n\t\t});\n\t};\n\tconst pathOf = (from, relationship) => {\n\t\tvar _relationship$attribu2, _relationship$attribu3;\n\t\tconst target = (_relationship$attribu2 = relationship.attributes) === null || _relationship$attribu2 === void 0 ? void 0 : _relationship$attribu2.Target;\n\t\treturn ((_relationship$attribu3 = relationship.attributes) === null || _relationship$attribu3 === void 0 ? void 0 : _relationship$attribu3.TargetMode) === \"External\" || target === void 0 ? void 0 : findPath(resolveTarget(from, String(target)));\n\t};\n\tconst isReferenced = (path) => [...parts].some(([relationshipsPath, relationships]) => relationshipsPath.endsWith(\".rels\") && getFirstLevelElements(relationships, \"Relationships\").some((relationship) => pathOf(sourceOfRelationships(relationshipsPath), relationship) === path));\n\tconst removeIfUnreferenced = (from, path) => {\n\t\tif (path === void 0 || path === from || path === CONTENT_TYPES$1 || path.endsWith(\".rels\") || isReferenced(path)) return;\n\t\tconst relationships = parts.get(relationshipsPathOf(path));\n\t\tparts.delete(path);\n\t\tbinaryParts.delete(path);\n\t\tparts.delete(relationshipsPathOf(path));\n\t\tconst contentTypes = parts.get(CONTENT_TYPES$1);\n\t\tif (contentTypes !== void 0) removeContentTypeOverride(contentTypes, `/${path}`);\n\t\tfor (const relationship of relationships === void 0 ? [] : getFirstLevelElements(relationships, \"Relationships\")) removeIfUnreferenced(path, pathOf(path, relationship));\n\t};\n\tconst removeRelationships = (from, ids) => {\n\t\tvar _parts$get, _relationships$elemen3;\n\t\tconst relationships = (_parts$get = parts.get(relationshipsPathOf(from))) === null || _parts$get === void 0 || (_parts$get = _parts$get.elements) === null || _parts$get === void 0 ? void 0 : _parts$get.find((element) => element.name === \"Relationships\");\n\t\tconst removed = ((_relationships$elemen3 = relationships === null || relationships === void 0 ? void 0 : relationships.elements) !== null && _relationships$elemen3 !== void 0 ? _relationships$elemen3 : []).filter((relationship) => {\n\t\t\tvar _relationship$attribu4;\n\t\t\treturn relationship.name === \"Relationship\" && ids.has(String((_relationship$attribu4 = relationship.attributes) === null || _relationship$attribu4 === void 0 ? void 0 : _relationship$attribu4.Id));\n\t\t});\n\t\tif (relationships === void 0 || removed.length === 0) return;\n\t\trelationships.elements = relationships.elements.filter((element) => !removed.includes(element));\n\t\tfor (const relationship of removed) removeIfUnreferenced(from, pathOf(from, relationship));\n\t};\n\treturn {\n\t\tfindRelationship,\n\t\tpathOf,\n\t\tremoveIfUnreferenced,\n\t\tremoveRelationships\n\t};\n};\n/**\n* The template's package, as a patch reads and changes it.\n*\n* @param parts - The template's XML parts, parsed, by their paths, which are changed in place\n* @param contents - Reads and changes the template's parts and the relationships between them\n* @param context - The context to format XML with\n*/\nvar createTemplatePackage = (parts, { findRelationship, pathOf, removeIfUnreferenced }, file, context) => {\n\tconst formatter = new Formatter();\n\treturn {\n\t\tgetRelatedPart: (from, relationshipId) => {\n\t\t\tconst relationship = findRelationship(from.path, relationshipId);\n\t\t\tconst path = relationship === void 0 ? void 0 : pathOf(from.path, relationship);\n\t\t\treturn path === void 0 ? void 0 : {\n\t\t\t\tpath,\n\t\t\t\txml: parts.get(path)\n\t\t\t};\n\t\t},\n\t\treplaceRelatedPart: (from, relationshipId, part) => {\n\t\t\tconst path = `word/${file.PackageParts.add(part)}`;\n\t\t\tconst { relationshipType } = part.options;\n\t\t\tconst target = relativeTarget(from.path, path);\n\t\t\tconst relationship = relationshipId === void 0 ? void 0 : findRelationship(from.path, relationshipId);\n\t\t\tif (relationship === void 0) {\n\t\t\t\tvar _parts$get2;\n\t\t\t\tconst relationshipsPath = relationshipsPathOf(from.path);\n\t\t\t\tconst relationships = (_parts$get2 = parts.get(relationshipsPath)) !== null && _parts$get2 !== void 0 ? _parts$get2 : createRelationshipFile();\n\t\t\t\tparts.set(relationshipsPath, relationships);\n\t\t\t\tconst id = relationshipId !== null && relationshipId !== void 0 ? relationshipId : `rId${getNextRelationshipIndex(relationships)}`;\n\t\t\t\trelationshipsIn(relationships).push({\n\t\t\t\t\ttype: \"element\",\n\t\t\t\t\tname: \"Relationship\",\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tId: id,\n\t\t\t\t\t\tType: relationshipType,\n\t\t\t\t\t\tTarget: target\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn id;\n\t\t\t}\n\t\t\tconst previous = pathOf(from.path, relationship);\n\t\t\trelationship.attributes = _objectSpread2(_objectSpread2({}, Object.fromEntries(Object.entries(relationship.attributes).filter(([name]) => name !== \"TargetMode\"))), {}, {\n\t\t\t\tType: relationshipType,\n\t\t\t\tTarget: target\n\t\t\t});\n\t\t\tremoveIfUnreferenced(from.path, previous);\n\t\t\treturn String(relationship.attributes.Id);\n\t\t},\n\t\tformat: (content) => toJson(stringifyXmlable(formatter.format(content, context))).elements[0]\n\t};\n};\n/**\n* Applies the patches for drawings whose alt text holds their placeholder, such as charts. Every drawing is found\n* before any is patched, so a patch only sees the template's own alt text.\n*\n* @param parts - The template's XML parts, parsed, by their paths, which are changed in place\n* @param binaryParts - The template's other parts, by their paths, which parts can be removed from\n* @param patches - Each drawing patch, by its key\n* @param createContext - Creates the context to format XML for a part with\n* @throws If a drawing's alt text holds the placeholders of more than one patch, or a patch throws\n*/\nvar patchDrawings = ({ parts, binaryParts, file, patches, delimiters }, createContext) => {\n\tconst placeholders = patches.map(([key, patch]) => ({\n\t\tplaceholder: `${delimiters.start}${key}${delimiters.end}`,\n\t\tpatch\n\t}));\n\tconst found = [...parts].filter(([path]) => path.startsWith(\"word/\") && !path.endsWith(\".rels\")).flatMap(([path, xmlPart]) => findDrawings(xmlPart).flatMap((drawing) => {\n\t\tconst altText = altTextOf(drawing.properties);\n\t\tconst matches = placeholders.filter(({ placeholder }) => altText.some((text) => text.includes(placeholder)));\n\t\tif (matches.length > 1) {\n\t\t\tvar _drawing$properties$a, _drawing$properties$a2;\n\t\t\tthrow new Error(`The drawing \"${(_drawing$properties$a = (_drawing$properties$a2 = drawing.properties.attributes) === null || _drawing$properties$a2 === void 0 ? void 0 : _drawing$properties$a2.name) !== null && _drawing$properties$a !== void 0 ? _drawing$properties$a : \"\"}\" in ${path} has the placeholders ${matches.map(({ placeholder }) => placeholder).join(\" and \")} in its alt text. A drawing can only be patched once`);\n\t\t}\n\t\treturn matches.map(({ placeholder, patch }) => ({\n\t\t\tdrawing: _objectSpread2(_objectSpread2({ placeholder }, drawing), {}, { part: {\n\t\t\t\tpath,\n\t\t\t\txml: xmlPart\n\t\t\t} }),\n\t\t\tpatch\n\t\t}));\n\t}));\n\tconst contents = contentsOf(parts, binaryParts);\n\tfor (const { drawing, patch } of found) {\n\t\tconst referenced = relationshipIdsIn(drawing.element, relationshipPrefixesIn(drawing.part.xml));\n\t\tpatch.patch(drawing, createTemplatePackage(parts, contents, file, createContext(drawing.part.path)));\n\t\tconst used = relationshipIdsIn(drawing.part.xml, relationshipPrefixesIn(drawing.part.xml));\n\t\tcontents.removeRelationships(drawing.part.path, new Set([...referenced].filter((id) => !used.has(id))));\n\t}\n};\n// src/patcher/load-zip.ts\nvar isStream = (data) => typeof data === \"object\" && data !== null && \"on\" in data && typeof data.on === \"function\";\nvar isZipArchive = (data) => typeof data === \"object\" && data !== null && \"generateAsync\" in data && typeof data.generateAsync === \"function\";\nvar isBlob = (data) => [\"[object Blob]\", \"[object File]\"].includes(Object.prototype.toString.call(data));\n/**\n* Reads a stream to its end, as a zip file lists its files at its end.\n*\n* It listens for the stream's events, rather than iterating it, so that a stream with no iterator also works, such\n* as `Packer.toStream`'s. A chunk is usually a run of bytes, but a stream made with `Readable.from` of a `Uint8Array`\n* gives each byte as a number of its own. Those are kept as numbers, not wrapped in an array each.\n*/\nvar readStream = (stream) => new Promise((resolve, reject) => {\n\tconst chunks = [];\n\tstream.on(\"data\", (chunk) => {\n\t\tif (ArrayBuffer.isView(chunk)) chunks.push(new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength));\n\t\telse if (typeof chunk === \"number\") chunks.push(chunk);\n\t\telse reject(/* @__PURE__ */ new TypeError(`A template stream must give bytes, but it gave a ${typeof chunk}. A stream with an encoding set gives text, so do not set one.`));\n\t});\n\tstream.on(\"error\", reject);\n\tstream.on(\"end\", () => {\n\t\tconst bytes = new Uint8Array(chunks.reduce((length, chunk) => length + (typeof chunk === \"number\" ? 1 : chunk.length), 0));\n\t\tchunks.reduce((offset, chunk) => {\n\t\t\tif (typeof chunk === \"number\") {\n\t\t\t\tbytes[offset] = chunk;\n\t\t\t\treturn offset + 1;\n\t\t\t}\n\t\t\tbytes.set(chunk, offset);\n\t\t\treturn offset + chunk.length;\n\t\t}, 0);\n\t\tresolve(bytes);\n\t});\n});\n/** The bytes of a template's zip file, from any of the forms `patchDocument` and `patchDetector` take it in */\nvar bytesOf$1 = function() {\n\tvar _ref = _asyncToGenerator(function* (data) {\n\t\tif (isZipArchive(data)) return data.generateAsync({ type: \"uint8array\" });\n\t\tif (isStream(data)) return readStream(data);\n\t\tif (isBlob(data)) return new Uint8Array(yield data.arrayBuffer());\n\t\tif (typeof data === \"string\") return Uint8Array.from({ length: data.length }, (_, index) => data.charCodeAt(index));\n\t\tif (Array.isArray(data)) return Uint8Array.from(data);\n\t\treturn ArrayBuffer.isView(data) ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength) : new Uint8Array(data);\n\t});\n\treturn function bytesOf(_x) {\n\t\treturn _ref.apply(this, arguments);\n\t};\n}();\n/**\n* The files in the zip file of a template, from any of the forms `patchDocument` and `patchDetector` take it in\n*\n* @param include - Which files to read, by their paths. The others aren't inflated.\n*/\nvar loadZip = function() {\n\tvar _ref2 = _asyncToGenerator(function* (data, include) {\n\t\treturn unzipFiles(yield bytesOf$1(data), include);\n\t});\n\treturn function loadZip(_x2, _x3) {\n\t\treturn _ref2.apply(this, arguments);\n\t};\n}();\n// src/patcher/notes.ts\n/**\n* Footnotes and endnotes for content inserted into an existing document.\n*\n* @module\n*/\nvar formatter$2 = new Formatter();\nvar DOCUMENT_PATH$1 = \"word/document.xml\";\nvar FOOTNOTES = {\n\tpath: \"word/footnotes.xml\",\n\trootName: \"w:footnotes\",\n\tnoteName: \"w:footnote\",\n\treferenceName: \"w:footnoteReference\",\n\tcontentType: \"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\",\n\trelationshipType: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes\",\n\tcreate: {\n\t\tpart: () => new FootNotes(),\n\t\tmark: () => new FootnoteRefRun(),\n\t\tstyles: () => [\n\t\t\tnew FootnoteText({}),\n\t\t\tnew FootnoteTextChar({}),\n\t\t\tnew FootnoteReferenceStyle({})\n\t\t]\n\t}\n};\nvar ENDNOTES = {\n\tpath: \"word/endnotes.xml\",\n\trootName: \"w:endnotes\",\n\tnoteName: \"w:endnote\",\n\treferenceName: \"w:endnoteReference\",\n\tcontentType: \"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\",\n\trelationshipType: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes\",\n\tcreate: {\n\t\tpart: () => new Endnotes(),\n\t\tmark: () => new EndnoteRefRun(),\n\t\tstyles: () => [\n\t\t\tnew EndnoteText({}),\n\t\t\tnew EndnoteTextChar({}),\n\t\t\tnew EndnoteReferenceStyle({})\n\t\t]\n\t}\n};\nvar formatElement$1 = (component, context) => toJson(stringifyXmlable(formatter$2.format(component, context))).elements[0];\nvar findIds = (element, names) => {\n\tvar _element$name, _element$attributes, _element$elements;\n\tconst id = names.includes((_element$name = element.name) !== null && _element$name !== void 0 ? _element$name : \"\") ? Number((_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes[\"w:id\"]) : NaN;\n\treturn [...Number.isInteger(id) ? [id] : [], ...((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).flatMap((child) => findIds(child, names))];\n};\nvar withMark = (paragraph, mark) => {\n\tvar _paragraph$elements, _elements$;\n\tconst elements = (_paragraph$elements = paragraph.elements) !== null && _paragraph$elements !== void 0 ? _paragraph$elements : [];\n\tconst index = ((_elements$ = elements[0]) === null || _elements$ === void 0 ? void 0 : _elements$.name) === \"w:pPr\" ? 1 : 0;\n\treturn _objectSpread2(_objectSpread2({}, paragraph), {}, { elements: [\n\t\t...elements.slice(0, index),\n\t\tmark,\n\t\t...elements.slice(index)\n\t] });\n};\nvar patchNotesOfKind = (kind, notes, parts, { createContext, addContentTypeOverride, renumberBookmarks, renumberDrawings, renumberLists, useStyles }) => {\n\tconst givenNotes = new Map(Object.entries(notes).map(([id, note]) => [Number(id), note]));\n\tconst carriedIds = /* @__PURE__ */ new Map();\n\tlet highestGivenId = [...givenNotes.keys()].filter(Number.isFinite).reduce((highest, id) => Math.max(highest, Math.floor(id)), 0);\n\tconst noteOfId = /* @__PURE__ */ new Map();\n\tlet highestId;\n\tconst renumber = (element) => {\n\t\tvar _element$attributes2, _highestId;\n\t\tconst note = element.name === kind.referenceName ? givenNotes.get(Number((_element$attributes2 = element.attributes) === null || _element$attributes2 === void 0 ? void 0 : _element$attributes2[\"w:id\"])) : void 0;\n\t\tif (note === void 0) return element.elements === void 0 ? element : _objectSpread2(_objectSpread2({}, element), {}, { elements: element.elements.map(renumber) });\n\t\thighestId = ((_highestId = highestId) !== null && _highestId !== void 0 ? _highestId : [...parts.values()].flatMap((part) => findIds(part, [kind.noteName, kind.referenceName])).reduce((highest, id) => Math.max(highest, id), 0)) + 1;\n\t\tnoteOfId.set(highestId, note);\n\t\treturn _objectSpread2(_objectSpread2({}, element), {}, { attributes: _objectSpread2(_objectSpread2({}, element.attributes), {}, { \"w:id\": String(highestId) }) });\n\t};\n\tconst findOrAddPart = () => {\n\t\tvar _parts$get;\n\t\tconst relationship = getFirstLevelElements((_parts$get = parts.get(relationshipsPathOf(DOCUMENT_PATH$1))) !== null && _parts$get !== void 0 ? _parts$get : {}, \"Relationships\").find((element) => {\n\t\t\tvar _element$attributes3;\n\t\t\treturn ((_element$attributes3 = element.attributes) === null || _element$attributes3 === void 0 ? void 0 : _element$attributes3.Type) === kind.relationshipType;\n\t\t});\n\t\tconst path = relationship ? resolveTarget(DOCUMENT_PATH$1, String(relationship.attributes.Target)) : kind.path;\n\t\tif (!parts.has(path)) {\n\t\t\tparts.set(path, {\n\t\t\t\tdeclaration: { attributes: {\n\t\t\t\t\tversion: \"1.0\",\n\t\t\t\t\tencoding: \"UTF-8\",\n\t\t\t\t\tstandalone: \"yes\"\n\t\t\t\t} },\n\t\t\t\telements: [formatElement$1(kind.create.part(), createContext(path))]\n\t\t\t});\n\t\t\taddContentTypeOverride(kind.contentType, `/${path}`);\n\t\t}\n\t\tif (!relationship) createContext(DOCUMENT_PATH$1).viewWrapper.Relationships.addRelationship(uniqueId(), kind.relationshipType, relativeTarget(DOCUMENT_PATH$1, path));\n\t\treturn path;\n\t};\n\tconst write = () => {\n\t\tif (noteOfId.size === 0) return;\n\t\tconst path = findOrAddPart();\n\t\tconst context = createContext(path);\n\t\tconst contentOfNote = new Map([...new Set(noteOfId.values())].map((note) => {\n\t\t\tconst mark = formatElement$1(kind.create.mark(), context);\n\t\t\treturn [note, useStyles(renumberLists(renumberBookmarks(note.children.map((paragraph) => formatElement$1(paragraph, context)).map((paragraph, index) => index === 0 ? withMark(paragraph, mark) : paragraph))))];\n\t\t}));\n\t\tgetFirstLevelElements(parts.get(path), kind.rootName).push(...[...noteOfId].map(([id, note]) => ({\n\t\t\ttype: \"element\",\n\t\t\tname: kind.noteName,\n\t\t\tattributes: { \"w:id\": String(id) },\n\t\t\telements: [...renumberDrawings(contentOfNote.get(note))]\n\t\t})));\n\t\tconst stylesPart = parts.get(\"word/styles.xml\");\n\t\tif (stylesPart) {\n\t\t\tconst styles = getFirstLevelElements(stylesPart, \"w:styles\");\n\t\t\tconst styleIds = new Set(styles.map((style) => {\n\t\t\t\tvar _style$attributes;\n\t\t\t\treturn (_style$attributes = style.attributes) === null || _style$attributes === void 0 ? void 0 : _style$attributes[\"w:styleId\"];\n\t\t\t}));\n\t\t\tstyles.push(...kind.create.styles().map((style) => formatElement$1(style, context)).filter((style) => {\n\t\t\t\tvar _style$attributes2;\n\t\t\t\treturn !styleIds.has((_style$attributes2 = style.attributes) === null || _style$attributes2 === void 0 ? void 0 : _style$attributes2[\"w:styleId\"]);\n\t\t\t}));\n\t\t}\n\t};\n\tconst carry = (reference, note) => {\n\t\tconst existing = carriedIds.get(reference);\n\t\tif (existing !== void 0) return existing;\n\t\thighestGivenId++;\n\t\tgivenNotes.set(highestGivenId, note);\n\t\tcarriedIds.set(reference, highestGivenId);\n\t\treturn highestGivenId;\n\t};\n\treturn {\n\t\trenumber: (elements) => elements.map(renumber),\n\t\twrite,\n\t\tcarry\n\t};\n};\n/**\n* Creates the writer of the footnotes and endnotes that patches refer to.\n*\n* A patch refers to a note with a reference run, such as `new FootnoteReferenceRun(1)`, whose id is the note's in\n* `footnotes`, or with a run that brings its note with it, such as `new FootnoteReferenceRun({ children })`, which is\n* given an id with `carry` as it is written. Only references to these notes are renumbered, and only the notes that\n* are referred to are written.\n*\n* @param notes - The footnotes and endnotes, by the id the patches' reference runs are given\n* @param parts - The document's XML parts, parsed, by their paths, which the notes are written to\n* @param helpers - The patcher's helpers for what the notes refer to\n*/\nvar patchNotes = ({ footnotes = {}, endnotes = {} }, parts, helpers) => {\n\tconst patchers = {\n\t\tfootnotes: patchNotesOfKind(FOOTNOTES, footnotes, parts, helpers),\n\t\tendnotes: patchNotesOfKind(ENDNOTES, endnotes, parts, helpers)\n\t};\n\treturn {\n\t\tcarry: (kind, reference, note) => patchers[kind].carry(reference, note),\n\t\trenumber: (elements) => Object.values(patchers).reduce((renumbered, patcher) => patcher.renumber(renumbered), elements),\n\t\twrite: () => {\n\t\t\tfor (const patcher of Object.values(patchers)) patcher.write();\n\t\t}\n\t};\n};\n// src/patcher/numbering.ts\n/**\n* Lists in content inserted into an existing document.\n*\n* @module\n*/\nvar formatter$1 = new Formatter();\nvar DOCUMENT_PATH = \"word/document.xml\";\nvar NUMBERING_PATH = \"word/numbering.xml\";\nvar NUMBERING_CONTENT_TYPE = \"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\";\nvar NUMBERING_RELATIONSHIP = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering\";\nvar BULLET_REFERENCE = \"default-bullet-numbering\";\nvar BULLET_NUM_ID = \"1\";\nvar formatElement = (component, context) => toJson(stringifyXmlable(formatter$1.format(component, context))).elements[0];\nvar highestOf = (ids) => ids.reduce((highest, id) => Math.max(highest, id), 0);\n/**\n* Creates the writer of the lists that patches use.\n*\n* A paragraph in a patch is put in a list as in a Document, with `numbering: { reference, level }` for one of the\n* numbering's references, or with `bullet`. It is written with a placeholder for its list's id, or for a bullet, with\n* the id a Document's bullet list has, which a template's lists may have too.\n*\n* @param numbering - The numbering the patches' paragraphs add their lists to as they are written\n* @param parts - The document's XML parts, parsed, by their paths, which the lists are written to\n* @param helpers - The patcher's helpers for the numbering part\n*/\nvar patchNumbering = (numbering, parts, { createContext, addContentTypeOverride }) => {\n\tconst newNumIds = /* @__PURE__ */ new Map();\n\tlet highestNumId;\n\tconst numberingRelationship = () => {\n\t\tvar _parts$get;\n\t\treturn getFirstLevelElements((_parts$get = parts.get(relationshipsPathOf(DOCUMENT_PATH))) !== null && _parts$get !== void 0 ? _parts$get : {}, \"Relationships\").find((element) => {\n\t\t\tvar _element$attributes;\n\t\t\treturn ((_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes.Type) === NUMBERING_RELATIONSHIP;\n\t\t});\n\t};\n\tconst numberingPath = (relationship = numberingRelationship()) => relationship ? resolveTarget(DOCUMENT_PATH, String(relationship.attributes.Target)) : NUMBERING_PATH;\n\tconst idsInTemplate = (name, attribute) => {\n\t\tvar _parts$get2;\n\t\treturn getFirstLevelElements((_parts$get2 = parts.get(numberingPath())) !== null && _parts$get2 !== void 0 ? _parts$get2 : {}, \"w:numbering\").filter((element) => element.name === name).map((element) => Number(element.attributes[attribute]));\n\t};\n\tconst listOf = (numId) => {\n\t\tif (numId === BULLET_NUM_ID) return numbering.ConcreteNumbering.find(({ reference }) => reference === BULLET_REFERENCE);\n\t\tif (!numId.startsWith(\"{\")) return;\n\t\tconst list = numbering.ConcreteNumbering.find(({ reference, instance }) => numId === `{${reference}-${instance}}`);\n\t\tif (!list) {\n\t\t\tconst reference = numId.slice(1, -1).replace(/-\\d+$/, \"\");\n\t\t\tthrow new Error(`A paragraph in a patch uses the numbering \"${reference}\", which isn't in the numbering option of patchDocument. Add it there with its levels, as in a Document`);\n\t\t}\n\t\treturn list;\n\t};\n\tconst newNumIdOf = (list) => {\n\t\tvar _highestNumId;\n\t\tconst knownId = newNumIds.get(list.numId);\n\t\tif (knownId !== void 0) return knownId;\n\t\thighestNumId = ((_highestNumId = highestNumId) !== null && _highestNumId !== void 0 ? _highestNumId : highestOf(idsInTemplate(\"w:num\", \"w:numId\"))) + 1;\n\t\tnewNumIds.set(list.numId, highestNumId);\n\t\treturn highestNumId;\n\t};\n\tconst renumber = (element) => {\n\t\tconst list = element.name === \"w:numId\" ? listOf(String(element.attributes[\"w:val\"])) : void 0;\n\t\tif (list === void 0) return element.elements === void 0 ? element : _objectSpread2(_objectSpread2({}, element), {}, { elements: element.elements.map(renumber) });\n\t\treturn _objectSpread2(_objectSpread2({}, element), {}, { attributes: _objectSpread2(_objectSpread2({}, element.attributes), {}, { \"w:val\": String(newNumIdOf(list)) }) });\n\t};\n\tconst findOrAddPart = (written) => {\n\t\tconst relationship = numberingRelationship();\n\t\tconst path = numberingPath(relationship);\n\t\tif (!parts.has(path)) {\n\t\t\tparts.set(path, {\n\t\t\t\tdeclaration: { attributes: {\n\t\t\t\t\tversion: \"1.0\",\n\t\t\t\t\tencoding: \"UTF-8\",\n\t\t\t\t\tstandalone: \"yes\"\n\t\t\t\t} },\n\t\t\t\telements: [_objectSpread2(_objectSpread2({}, written), {}, { elements: [] })]\n\t\t\t});\n\t\t\taddContentTypeOverride(NUMBERING_CONTENT_TYPE, `/${path}`);\n\t\t}\n\t\tif (!relationship) createContext(DOCUMENT_PATH).viewWrapper.Relationships.addRelationship(uniqueId(), NUMBERING_RELATIONSHIP, relativeTarget(DOCUMENT_PATH, path));\n\t\treturn path;\n\t};\n\tconst write = () => {\n\t\tvar _root$attributes$mcI, _root$attributes;\n\t\tif (newNumIds.size === 0) return;\n\t\tconst written = formatElement(numbering, createContext(numberingPath()));\n\t\tconst abstractNumIdOf = (list) => Number(list.elements.find((element) => element.name === \"w:abstractNumId\").attributes[\"w:val\"]);\n\t\tconst lists = written.elements.filter((element) => element.name === \"w:num\" && newNumIds.has(Number(element.attributes[\"w:numId\"])));\n\t\tconst highestAbstractNumId = highestOf(idsInTemplate(\"w:abstractNum\", \"w:abstractNumId\"));\n\t\tconst newAbstractNumIds = new Map([...new Set(lists.map(abstractNumIdOf))].map((id, index) => [id, highestAbstractNumId + index + 1]));\n\t\tconst abstractLists = written.elements.flatMap((element) => {\n\t\t\tconst newId = element.name === \"w:abstractNum\" ? newAbstractNumIds.get(Number(element.attributes[\"w:abstractNumId\"])) : void 0;\n\t\t\treturn newId === void 0 ? [] : [_objectSpread2(_objectSpread2({}, element), {}, { attributes: _objectSpread2(_objectSpread2({}, element.attributes), {}, { \"w:abstractNumId\": String(newId) }) })];\n\t\t});\n\t\tconst path = findOrAddPart(written);\n\t\tconst root = parts.get(path).elements.find((element) => element.name === \"w:numbering\");\n\t\troot.attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, Object.fromEntries(Object.entries(written.attributes).filter(([name]) => name.startsWith(\"xmlns:\")))), root.attributes), {}, { \"mc:Ignorable\": [.../* @__PURE__ */ new Set([...String((_root$attributes$mcI = (_root$attributes = root.attributes) === null || _root$attributes === void 0 ? void 0 : _root$attributes[\"mc:Ignorable\"]) !== null && _root$attributes$mcI !== void 0 ? _root$attributes$mcI : \"\").split(\" \"), ...String(written.attributes[\"mc:Ignorable\"]).split(\" \")])].filter((prefix) => prefix !== \"\").join(\" \") });\n\t\tconst elements = getFirstLevelElements(parts.get(path), \"w:numbering\");\n\t\tconst firstIndexOf = (names) => {\n\t\t\tconst index = elements.findIndex((element) => names.includes(element.name));\n\t\t\treturn index === -1 ? elements.length : index;\n\t\t};\n\t\telements.splice(firstIndexOf([\"w:num\", \"w:numIdMacAtCleanup\"]), 0, ...abstractLists);\n\t\telements.splice(firstIndexOf([\"w:numIdMacAtCleanup\"]), 0, ...lists.map((list) => _objectSpread2(_objectSpread2({}, list), {}, {\n\t\t\tattributes: _objectSpread2(_objectSpread2({}, list.attributes), {}, { \"w:numId\": String(newNumIds.get(Number(list.attributes[\"w:numId\"]))) }),\n\t\t\telements: list.elements.map((element) => element.name === \"w:abstractNumId\" ? _objectSpread2(_objectSpread2({}, element), {}, { attributes: { \"w:val\": String(newAbstractNumIds.get(abstractNumIdOf(list))) } }) : element)\n\t\t})));\n\t};\n\treturn {\n\t\trenumber: (elements) => elements.map(renumber),\n\t\twrite\n\t};\n};\n// src/patcher/page-numbers.ts\n/**\n* Page numbers written into a template's fields once `patchDocument` has patched it, from an estimate of its pages, as\n* a document's are when it is written with `pageNumbers`.\n*\n* @module\n*/\n/** The elements of a template, as `parseXml` reads them */\nvar PARSED = {\n\tnameOf: (element) => element.type === \"element\" ? element.name : void 0,\n\tcontentOf: (element) => element.elements,\n\tattributeOf: (element, attribute) => {\n\t\tvar _element$attributes;\n\t\treturn (_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes[attribute];\n\t},\n\ttextOf: (element) => {\n\t\tvar _element$elements;\n\t\treturn ((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).filter(({ type }) => type === \"text\").map(({ text }) => String(text)).join(\"\");\n\t},\n\ttextElement: (text) => ({\n\t\ttype: \"element\",\n\t\tname: \"w:t\",\n\t\tattributes: { \"xml:space\": \"preserve\" },\n\t\telements: [{\n\t\t\ttype: \"text\",\n\t\t\ttext\n\t\t}]\n\t}),\n\twriteClean: (begin, instruction) => {\n\t\tvar _begin$attributes;\n\t\tif (/^\\s*(PAGEREF|TOC)\\b/i.test(instruction) && ((_begin$attributes = begin.attributes) === null || _begin$attributes === void 0 ? void 0 : _begin$attributes[\"w:dirty\"]) !== void 0) begin.attributes = Object.fromEntries(Object.entries(begin.attributes).filter(([key]) => key !== \"w:dirty\"));\n\t},\n\tsetSimpleFieldResult: (element, text) => {\n\t\telement.elements = [{\n\t\t\ttype: \"element\",\n\t\t\tname: \"w:r\",\n\t\t\telements: [PARSED.textElement(text)]\n\t\t}];\n\t}\n};\nvar DOCUMENT = \"word/document.xml\";\nvar IMPORT = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk\";\nvar ZIP = [\n\t80,\n\t75,\n\t3,\n\t4\n];\n/** A package's parts, from a zip file: its XML parts parsed, as patchDocument parses a template's, and the rest as bytes */\nvar readPackage = function() {\n\tvar _ref = _asyncToGenerator(function* (data) {\n\t\tif (!ZIP.every((byte, index) => data[index] === byte)) return;\n\t\ttry {\n\t\t\tconst parts = /* @__PURE__ */ new Map();\n\t\t\tconst binaryParts = /* @__PURE__ */ new Map();\n\t\t\tfor (const [path, file] of unzipFiles(data)) if (/\\.(xml|rels)$/.test(path)) parts.set(path, toJson(decodeUtf8(file)));\n\t\t\telse binaryParts.set(path, file);\n\t\t\tconst importedDocuments = yield readImportedDocuments(parts, binaryParts);\n\t\t\treturn _objectSpread2({\n\t\t\t\tparts,\n\t\t\t\tbinaryParts\n\t\t\t}, importedDocuments.size > 0 ? { importedDocuments } : {});\n\t\t} catch (_unused) {\n\t\t\treturn;\n\t\t}\n\t});\n\treturn function readPackage(_x) {\n\t\treturn _ref.apply(this, arguments);\n\t};\n}();\n/**\n* Each .docx the parts of a package import (`w:altChunk`), by its path: the parts the relationships of each part refer to\n* as imported, which are zip files that can be read. Those in other formats, such as HTML, are left to the layout.\n*/\nvar readImportedDocuments = function() {\n\tvar _ref2 = _asyncToGenerator(function* (parts, binaryParts) {\n\t\tconst imported = /* @__PURE__ */ new Map();\n\t\tfor (const [path, relationships] of parts) {\n\t\t\tvar _rootOf$elements, _rootOf;\n\t\t\tif (!path.endsWith(\".rels\")) continue;\n\t\t\tfor (const { attributes = {} } of (_rootOf$elements = (_rootOf = rootOf(relationships)) === null || _rootOf === void 0 ? void 0 : _rootOf.elements) !== null && _rootOf$elements !== void 0 ? _rootOf$elements : []) {\n\t\t\t\tconst target = resolveTarget(sourceOfRelationships(path), String(attributes.Target));\n\t\t\t\tconst data = binaryParts.get(target);\n\t\t\t\tconst read = attributes.Type === IMPORT && attributes.TargetMode !== \"External\" && data ? yield readPackage(data) : void 0;\n\t\t\t\tif (read) imported.set(target, read);\n\t\t\t}\n\t\t}\n\t\treturn imported;\n\t});\n\treturn function readImportedDocuments(_x2, _x3) {\n\t\treturn _ref2.apply(this, arguments);\n\t};\n}();\n/** The root element of a part, such as `w:document` */\nvar rootOf = (part) => {\n\tvar _part$elements;\n\treturn part === null || part === void 0 || (_part$elements = part.elements) === null || _part$elements === void 0 ? void 0 : _part$elements.find(({ type }) => type === \"element\");\n};\n/**\n* Writes the page numbers the estimator works out for a patched template into the fields of its body, headers and\n* footers that show them: its PAGEREF fields, in its tables of contents and elsewhere, and its NUMPAGES and SECTIONPAGES\n* fields. The results a field was written with are those of the template before it was patched, so a field whose number\n* the estimator doesn't work out is left blank, as it is in a document written with `pageNumbers`. Page references and\n* tables of contents are written clean, as they are in a document written with `pageNumbers`, so Word shows their numbers\n* as they are and doesn't ask to update the fields.\n*\n* The documents it imports (`w:altChunk`) as .docx files are unzipped for the estimator to read, as Word turns them into\n* paragraphs and tables of the template's own when it opens it.\n*\n* @param parts - The template's XML parts, parsed, by their paths, which are changed in place\n* @param binaryParts - Its other parts, by their paths, for the estimator to read the fonts it embeds and the documents\n* it imports\n*/\nvar fillTemplatePageNumbers = function() {\n\tvar _ref3 = _asyncToGenerator(function* (parts, estimator, binaryParts = /* @__PURE__ */ new Map()) {\n\t\tvar _rootOf$elements2, _rootOf2;\n\t\tconst document = rootOf(parts.get(DOCUMENT));\n\t\tif (!document) return;\n\t\tconst importedDocuments = yield readImportedDocuments(parts, binaryParts);\n\t\tconst estimate = estimator(_objectSpread2({\n\t\t\tparts,\n\t\t\tbinaryParts\n\t\t}, importedDocuments.size > 0 ? { importedDocuments } : {}));\n\t\tconst partPageCounts = fillBodyFields(PARSED, document, estimate, { blank: true });\n\t\tconst relationships = (_rootOf$elements2 = (_rootOf2 = rootOf(parts.get(relationshipsPathOf(DOCUMENT)))) === null || _rootOf2 === void 0 ? void 0 : _rootOf2.elements) !== null && _rootOf$elements2 !== void 0 ? _rootOf$elements2 : [];\n\t\tfor (const { attributes = {} } of relationships) {\n\t\t\tconst part = /\\/(header|footer)$/.test(String(attributes.Type)) ? rootOf(parts.get(resolveTarget(DOCUMENT, String(attributes.Target)))) : void 0;\n\t\t\tif (part) fillPartFields(PARSED, part, estimate, {\n\t\t\t\tblank: true,\n\t\t\t\tsectionPageCount: partPageCounts.get(String(attributes.Id))\n\t\t\t});\n\t\t}\n\t});\n\treturn function fillTemplatePageNumbers(_x4, _x5) {\n\t\treturn _ref3.apply(this, arguments);\n\t};\n}();\n// src/patcher/paragraph-split-inject.ts\nvar TokenNotFoundError = class extends Error {\n\tconstructor(token) {\n\t\tsuper(`Token ${token} not found`);\n\t\tthis.name = \"TokenNotFoundError\";\n\t}\n};\n/**\n* Finds the index of the run element containing a specific token.\n*\n* Searches through all run (w:r) elements in a paragraph to find which one\n* contains the specified token text. This is used to locate where new content\n* should be injected during replacement operations.\n*\n* @param paragraphElement - The paragraph element to search\n* @param token - The token text to find\n* @returns The index of the run element containing the token\n* @throws Error if the token is not found in any run\n*\n* @example\n* ```typescript\n* const index = findRunElementIndexWithToken(paragraph, \"ɵ\");\n* // Returns the index of the run containing the split token\n* ```\n*/\nvar findRunElementIndexWithToken = (paragraphElement, token) => {\n\tvar _paragraphElement$ele;\n\tfor (let i = 0; i < ((_paragraphElement$ele = paragraphElement.elements) !== null && _paragraphElement$ele !== void 0 ? _paragraphElement$ele : []).length; i++) {\n\t\tconst element = paragraphElement.elements[i];\n\t\tif (element.type === \"element\" && element.name === \"w:r\") {\n\t\t\tvar _element$elements;\n\t\t\tconst textElement = ((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).filter((e) => e.type === \"element\" && e.name === \"w:t\");\n\t\t\tfor (const text of textElement) {\n\t\t\t\tvar _text$elements, _text$elements$0$text;\n\t\t\t\tif (!((_text$elements = text.elements) === null || _text$elements === void 0 ? void 0 : _text$elements[0])) continue;\n\t\t\t\tif ((_text$elements$0$text = text.elements[0].text) === null || _text$elements$0$text === void 0 ? void 0 : _text$elements$0$text.includes(token)) return i;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TokenNotFoundError(token);\n};\n/**\n* Splits a run element at a token position into left and right parts.\n*\n* Divides a run element at the location of a token, creating two separate\n* runs. This allows new content to be injected between the split parts while\n* preserving the original run's formatting properties.\n*\n* @param runElement - The run element to split\n* @param token - The token text marking the split point\n* @returns Object containing the left and right run elements\n*\n* @example\n* ```typescript\n* const { left, right } = splitRunElement(run, \"ɵ\");\n* // If run contains \"Helloɵworld\", left contains \"Hello\" and right contains \"world\"\n* ```\n*/\nvar splitRunElement = (runElement, token) => {\n\tvar _runElement$elements$, _runElement$elements;\n\tlet splitIndex = -1;\n\tconst splitElements = (_runElement$elements$ = (_runElement$elements = runElement.elements) === null || _runElement$elements === void 0 ? void 0 : _runElement$elements.map((e, i) => {\n\t\tif (splitIndex !== -1) return e;\n\t\tif (e.type === \"element\" && e.name === \"w:t\") {\n\t\t\tvar _e$elements$0$text, _e$elements;\n\t\t\tconst splitText = ((_e$elements$0$text = (_e$elements = e.elements) === null || _e$elements === void 0 || (_e$elements = _e$elements[0]) === null || _e$elements === void 0 ? void 0 : _e$elements.text) !== null && _e$elements$0$text !== void 0 ? _e$elements$0$text : \"\").split(token);\n\t\t\tconst newElements = splitText.map((t) => _objectSpread2(_objectSpread2(_objectSpread2({}, e), patchSpaceAttribute(e)), {}, { elements: createTextElementContents(t) }));\n\t\t\tif (splitText.length > 1) splitIndex = i;\n\t\t\treturn newElements;\n\t\t} else return e;\n\t}).flat()) !== null && _runElement$elements$ !== void 0 ? _runElement$elements$ : [];\n\treturn {\n\t\tleft: _objectSpread2(_objectSpread2({}, JSON.parse(JSON.stringify(runElement))), {}, { elements: splitElements.slice(0, splitIndex + 1) }),\n\t\tright: _objectSpread2(_objectSpread2({}, JSON.parse(JSON.stringify(runElement))), {}, { elements: splitElements.slice(splitIndex + 1) })\n\t};\n};\n// src/patcher/paragraph-token-replacer.ts\n/**\n* Replacement modes for multi-run text replacement.\n*/\nvar ReplaceMode = {\n\t/** Looking for the start of the replacement text */\n\tSTART: 0,\n\t/** Processing runs in the middle of the replacement text */\n\tMIDDLE: 1,\n\t/** Reached the end of the replacement text */\n\tEND: 2\n};\n/**\n* Replaces a token with replacement text within a paragraph's run elements.\n*\n* Handles the complex case where placeholder text may span multiple runs\n* (text fragments) within a paragraph. Processes each run to replace the\n* appropriate portion of the token, handling start, middle, and end sections.\n*\n* @param paragraphElement - The paragraph XML element to modify\n* @param renderedParagraph - Pre-rendered paragraph structure with text positions\n* @param originalText - The token text to replace (e.g., \"{{name}}\")\n* @param replacementText - The text to replace it with (often a split token)\n* @param fromIndex - Where in the paragraph's text to start looking for the token (default: 0)\n* @returns The modified paragraph element\n*\n* @example\n* ```typescript\n* replaceTokenInParagraphElement({\n* paragraphElement,\n* renderedParagraph,\n* originalText: \"{{placeholder}}\",\n* replacementText: \"ɵ\",\n* });\n* ```\n*/\nvar replaceTokenInParagraphElement = ({ paragraphElement, renderedParagraph, originalText, replacementText, fromIndex = 0 }) => {\n\tconst startIndex = renderedParagraph.text.indexOf(originalText, fromIndex);\n\tconst endIndex = startIndex + originalText.length - 1;\n\tlet replaceMode = ReplaceMode.START;\n\tfor (const run of renderedParagraph.runs) for (const { text, index, start, end } of run.parts) switch (replaceMode) {\n\t\tcase ReplaceMode.START:\n\t\t\tif (startIndex >= start && startIndex <= end) {\n\t\t\t\tconst offsetStartIndex = startIndex - start;\n\t\t\t\tconst offsetEndIndex = Math.min(endIndex, end) - start;\n\t\t\t\tif (text.substring(offsetStartIndex, offsetEndIndex + 1) === \"\") continue;\n\t\t\t\tconst firstPart = text.substring(0, offsetStartIndex) + replacementText + text.substring(offsetEndIndex + 1);\n\t\t\t\tpatchTextElement(paragraphElement.elements[run.index].elements[index], firstPart);\n\t\t\t\treplaceMode = ReplaceMode.MIDDLE;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ReplaceMode.MIDDLE: if (endIndex <= end) {\n\t\t\tconst lastPart = text.substring(endIndex - start + 1);\n\t\t\tpatchTextElement(paragraphElement.elements[run.index].elements[index], lastPart);\n\t\t\tconst currentElement = paragraphElement.elements[run.index].elements[index];\n\t\t\tparagraphElement.elements[run.index].elements[index] = patchSpaceAttribute(currentElement);\n\t\t\treplaceMode = ReplaceMode.END;\n\t\t} else patchTextElement(paragraphElement.elements[run.index].elements[index], \"\");\n\t}\n\treturn paragraphElement;\n};\nvar patchTextElement = (element, text) => {\n\telement.elements = createTextElementContents(text);\n\treturn element;\n};\n// src/patcher/run-renderer.ts\n/**\n* Renders a paragraph element into a structured representation with text content.\n*\n* Extracts all text content from a paragraph (w:p) element by processing its\n* run (w:r) children. Calculates character positions for each text fragment\n* to enable precise text replacement operations.\n*\n* @param node - The paragraph element wrapper to render\n* @returns Rendered paragraph with text content, runs, and position information\n* @throws Error if the node is not a paragraph element\n*\n* @example\n* ```typescript\n* const rendered = renderParagraphNode(paragraphWrapper);\n* console.log(rendered.text); // \"Hello World\"\n* console.log(rendered.runs.length); // 2 (if text is in separate runs)\n* ```\n*/\nvar renderParagraphNode = (node) => {\n\tif (node.element.name !== \"w:p\") throw new Error(`Invalid node type: ${node.element.name}`);\n\tif (!node.element.elements) return {\n\t\ttext: \"\",\n\t\truns: [],\n\t\tindex: -1,\n\t\tpathToParagraph: []\n\t};\n\tlet currentRunStringLength = 0;\n\tconst runs = node.element.elements.map((element, i) => ({\n\t\telement,\n\t\ti\n\t})).filter(({ element }) => element.name === \"w:r\").map(({ element, i }) => {\n\t\tconst renderedRunNode = renderRunNode(element, i, currentRunStringLength);\n\t\tcurrentRunStringLength += renderedRunNode.text.length;\n\t\treturn renderedRunNode;\n\t}).filter((e) => !!e);\n\treturn {\n\t\ttext: runs.reduce((acc, curr) => acc + curr.text, \"\"),\n\t\truns,\n\t\tindex: node.index,\n\t\tpathToParagraph: buildNodePath(node)\n\t};\n};\nvar renderRunNode = (node, index, currentRunStringIndex) => {\n\tif (!node.elements) return {\n\t\ttext: \"\",\n\t\tparts: [],\n\t\tindex: -1,\n\t\tstart: currentRunStringIndex,\n\t\tend: currentRunStringIndex\n\t};\n\tlet currentTextStringIndex = currentRunStringIndex;\n\tconst parts = node.elements.map((element, i) => {\n\t\tvar _element$elements$0$t, _element$elements$0$t2;\n\t\tif (element.name !== \"w:t\" || !element.elements || element.elements.length === 0) return;\n\t\tconst partText = (_element$elements$0$t = (_element$elements$0$t2 = element.elements[0].text) === null || _element$elements$0$t2 === void 0 ? void 0 : _element$elements$0$t2.toString()) !== null && _element$elements$0$t !== void 0 ? _element$elements$0$t : \"\";\n\t\tconst start = currentTextStringIndex;\n\t\tcurrentTextStringIndex += partText.length;\n\t\treturn {\n\t\t\ttext: partText,\n\t\t\tindex: i,\n\t\t\tstart,\n\t\t\tend: start + partText.length - 1\n\t\t};\n\t}).filter((e) => !!e).map((e) => e);\n\treturn {\n\t\ttext: parts.reduce((acc, curr) => acc + curr.text, \"\"),\n\t\tparts,\n\t\tindex,\n\t\tstart: currentRunStringIndex,\n\t\tend: parts.length > 0 ? parts[parts.length - 1].end : currentRunStringIndex\n\t};\n};\nvar buildNodePath = (node) => node.parent ? [...buildNodePath(node.parent), node.index] : [node.index];\n// src/patcher/traverser.ts\nvar elementsToWrapper = (wrapper) => {\n\tvar _wrapper$element$elem, _wrapper$element$elem2;\n\treturn (_wrapper$element$elem = (_wrapper$element$elem2 = wrapper.element.elements) === null || _wrapper$element$elem2 === void 0 ? void 0 : _wrapper$element$elem2.map((e, i) => ({\n\t\telement: e,\n\t\tindex: i,\n\t\tparent: wrapper\n\t}))) !== null && _wrapper$element$elem !== void 0 ? _wrapper$element$elem : [];\n};\n/**\n* Traverses an XML document tree to find and render all paragraphs.\n*\n* Uses breadth-first search to walk through the XML structure, identifying\n* all paragraph elements (w:p) and rendering their text content along with\n* positional information. The replacer relies on this order: shallower\n* paragraphs come first, and at the same depth, earlier ones come first.\n*\n* @param node - The root XML element to traverse\n* @returns Array of rendered paragraph nodes with text content and positions\n*\n* @example\n* ```typescript\n* const paragraphs = traverse(documentElement);\n* paragraphs.forEach(p => console.log(p.text));\n* ```\n*/\nvar traverse = (node) => {\n\tlet renderedParagraphs = [];\n\tconst queue = [...elementsToWrapper({\n\t\telement: node,\n\t\tindex: 0,\n\t\tparent: void 0\n\t})];\n\tlet currentNode;\n\twhile (queue.length > 0) {\n\t\tcurrentNode = queue.shift();\n\t\tif (currentNode.element.name === \"w:p\") renderedParagraphs = [...renderedParagraphs, renderParagraphNode(currentNode)];\n\t\tqueue.push(...elementsToWrapper(currentNode));\n\t}\n\treturn renderedParagraphs;\n};\n/**\n* Finds all paragraphs containing specific text.\n*\n* Traverses the document and filters paragraphs to find those containing\n* the specified text string. Useful for locating placeholder text that\n* needs to be replaced.\n*\n* @param node - The root XML element to search\n* @param text - The text to search for\n* @returns Array of paragraph nodes containing the text\n*\n* @example\n* ```typescript\n* const matches = findLocationOfText(documentElement, \"{{name}}\");\n* // Returns all paragraphs containing \"{{name}}\"\n* ```\n*/\nvar findLocationOfText = (node, text) => traverse(node).filter((p) => p.text.includes(text));\n// src/patcher/replacer.ts\nvar SPLIT_TOKEN = \"\";\n/**\n* Replaces placeholder text in XML with new content from a patch.\n*\n* This function locates placeholder text within the XML structure and performs\n* the appropriate replacement based on the patch type (document or paragraph level).\n* It handles splitting runs, preserving styles, and injecting the new content.\n* Content the patch inserts is never searched, so it can contain its own placeholder.\n*\n* @param json - The XML element structure to search\n* @param patch - The patch definition containing replacement content\n* @param patchText - The placeholder text to find (e.g., \"{{name}}\")\n* @param context - The document context for formatting\n* @param keepOriginalStyles - Whether to preserve original text formatting\n* @param recursive - Whether to replace every occurrence in a paragraph, rather than only the first\n* @param renumberIds - Renumbers the bookmarks and note references the patch inserts, so they don't take an id the\n* document uses, and records the styles it uses\n* @returns Result containing the modified element and whether a replacement occurred\n*/\nvar replacer = ({ json, patch, patchText, context, keepOriginalStyles = true, recursive = true, renumberIds = (elements) => elements }) => {\n\tconst renderedParagraphs = findLocationOfText(json, patchText);\n\tif (renderedParagraphs.length === 0) return {\n\t\telement: json,\n\t\tdidFindOccurrence: false\n\t};\n\tconst paragraphsInPatchOrder = [...renderedParagraphs].reverse();\n\tconst paragraphsToPatch = patch.type === PatchType.DOCUMENT ? withoutNestedParagraphs(paragraphsInPatchOrder) : paragraphsInPatchOrder;\n\tfor (const renderedParagraph of paragraphsToPatch) switch (patch.type) {\n\t\tcase PatchType.DOCUMENT: {\n\t\t\tvar _children;\n\t\t\tconst parentElement = goToParentElementFromPath(json, renderedParagraph.pathToParagraph);\n\t\t\tconst elementIndex = getLastElementIndexFromPath(renderedParagraph.pathToParagraph);\n\t\t\tconst children = formatChildren(patch, context, renumberIds);\n\t\t\tconst endParagraph = parentElement.name === \"w:tc\" && elementIndex === parentElement.elements.length - 1 && ((_children = children[children.length - 1]) === null || _children === void 0 ? void 0 : _children.name) !== \"w:p\" ? [{\n\t\t\t\ttype: \"element\",\n\t\t\t\tname: \"w:p\"\n\t\t\t}] : [];\n\t\t\tparentElement.elements.splice(elementIndex, 1, ...children, ...endParagraph);\n\t\t\tbreak;\n\t\t}\n\t\tcase PatchType.PARAGRAPH:\n\t\tdefault: {\n\t\t\tconst paragraphElement = goToElementFromPath(json, renderedParagraph.pathToParagraph);\n\t\t\tlet paragraph = renderedParagraph;\n\t\t\tlet fromIndex = 0;\n\t\t\tdo {\n\t\t\t\tconst nextRunIndex = replaceOccurrenceInParagraph({\n\t\t\t\t\tparagraphElement,\n\t\t\t\t\trenderedParagraph: paragraph,\n\t\t\t\t\tpatchText,\n\t\t\t\t\tfromIndex,\n\t\t\t\t\tchildren: formatChildren(patch, context, renumberIds),\n\t\t\t\t\tkeepOriginalStyles\n\t\t\t\t});\n\t\t\t\tparagraph = renderParagraphNode({\n\t\t\t\t\telement: paragraphElement,\n\t\t\t\t\tindex: renderedParagraph.index,\n\t\t\t\t\tparent: void 0\n\t\t\t\t});\n\t\t\t\tfromIndex = paragraph.runs.filter((run) => run.index < nextRunIndex).reduce((length, run) => length + run.text.length, 0);\n\t\t\t} while (recursive && paragraph.text.includes(patchText, fromIndex));\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn {\n\t\telement: json,\n\t\tdidFindOccurrence: true\n\t};\n};\nvar formatChildren = (patch, context, renumberIds) => renumberIds(patch.children.flatMap((c) => {\n\tvar _c$writtenAs;\n\treturn (_c$writtenAs = c.writtenAs) !== null && _c$writtenAs !== void 0 ? _c$writtenAs : c;\n}).flatMap((c) => {\n\tconst formatted = c.prepForXml(context);\n\treturn formatted ? [toJson(stringifyXmlable(formatted)).elements[0]] : [];\n}));\n/**\n* Replaces the first occurrence of the placeholder from `fromIndex` on, splitting the run it starts in.\n*\n* @returns The index of the run after the inserted content\n*/\nvar replaceOccurrenceInParagraph = ({ paragraphElement, renderedParagraph, patchText, fromIndex, children, keepOriginalStyles }) => {\n\treplaceTokenInParagraphElement({\n\t\tparagraphElement,\n\t\trenderedParagraph,\n\t\toriginalText: patchText,\n\t\treplacementText: SPLIT_TOKEN,\n\t\tfromIndex\n\t});\n\tconst index = findRunElementIndexWithToken(paragraphElement, SPLIT_TOKEN);\n\tconst runElementToBeReplaced = paragraphElement.elements[index];\n\tconst { left, right } = splitRunElement(runElementToBeReplaced, SPLIT_TOKEN);\n\tconst runProperties = runElementToBeReplaced.elements.find((e) => e.type === \"element\" && e.name === \"w:rPr\");\n\tconst newRunElements = keepOriginalStyles && runProperties ? children.map((e) => withRunPropertiesOnRuns(e, runProperties)) : children;\n\tconst patchedRightElement = runProperties ? _objectSpread2(_objectSpread2({}, right), {}, { elements: [runProperties, ...right.elements] }) : right;\n\tparagraphElement.elements.splice(index, 1, left, ...newRunElements, patchedRightElement);\n\treturn index + 1 + newRunElements.length;\n};\n/**\n* Gives the runs of inserted content the placeholder's run properties. Content such as a hyperlink can't take run\n* properties itself, so its runs take them, and its text is formatted as the text around it is. Runs inside a run, such\n* as in its text box, are that content's own, and are left alone.\n*/\nvar withRunPropertiesOnRuns = (element, originalRunProperties) => {\n\tif (element.name === \"w:r\") return withRunProperties(element, originalRunProperties);\n\treturn element.elements ? _objectSpread2(_objectSpread2({}, element), {}, { elements: element.elements.map((e) => withRunPropertiesOnRuns(e, originalRunProperties)) }) : element;\n};\n/**\n* Gives a run the placeholder's run properties. A run can only have one w:rPr, so properties the run\n* sets itself are kept, and the placeholder's fill in the rest.\n*/\nvar withRunProperties = (runElement, originalRunProperties) => {\n\tconst ownRunProperties = childElementsOf(runElement).find((e) => e.type === \"element\" && e.name === \"w:rPr\");\n\tif (!ownRunProperties) return _objectSpread2(_objectSpread2({}, runElement), {}, { elements: [originalRunProperties, ...childElementsOf(runElement)] });\n\tconst ownPropertyNames = new Set(childElementsOf(ownRunProperties).map((e) => e.name));\n\tconst properties = [...childElementsOf(originalRunProperties).filter((e) => !ownPropertyNames.has(e.name)), ...childElementsOf(ownRunProperties)];\n\tconst mergedRunProperties = _objectSpread2(_objectSpread2({}, ownRunProperties), {}, { elements: [...properties].sort((a, b) => runPropertyRank(a) - runPropertyRank(b)) });\n\treturn _objectSpread2(_objectSpread2({}, runElement), {}, { elements: childElementsOf(runElement).map((e) => e === ownRunProperties ? mergedRunProperties : e) });\n};\n/**\n* The order Office's schema puts a run's properties in: CT_RPr's elements, then Word 2010's text effects and\n* OpenType features. ISO 29500 allows any order, but Office and the Open XML SDK validator don't.\n*/\nvar RUN_PROPERTY_ORDER = [\n\t\"w:rStyle\",\n\t\"w:rFonts\",\n\t\"w:b\",\n\t\"w:bCs\",\n\t\"w:i\",\n\t\"w:iCs\",\n\t\"w:caps\",\n\t\"w:smallCaps\",\n\t\"w:strike\",\n\t\"w:dstrike\",\n\t\"w:outline\",\n\t\"w:shadow\",\n\t\"w:emboss\",\n\t\"w:imprint\",\n\t\"w:noProof\",\n\t\"w:snapToGrid\",\n\t\"w:vanish\",\n\t\"w:webHidden\",\n\t\"w:color\",\n\t\"w:spacing\",\n\t\"w:w\",\n\t\"w:kern\",\n\t\"w:position\",\n\t\"w:sz\",\n\t\"w:szCs\",\n\t\"w:highlight\",\n\t\"w:u\",\n\t\"w:effect\",\n\t\"w:bdr\",\n\t\"w:shd\",\n\t\"w:fitText\",\n\t\"w:vertAlign\",\n\t\"w:rtl\",\n\t\"w:cs\",\n\t\"w:em\",\n\t\"w:lang\",\n\t\"w:eastAsianLayout\",\n\t\"w:specVanish\",\n\t\"w:oMath\",\n\t\"w14:glow\",\n\t\"w14:shadow\",\n\t\"w14:reflection\",\n\t\"w14:textOutline\",\n\t\"w14:textFill\",\n\t\"w14:scene3d\",\n\t\"w14:props3d\",\n\t\"w14:ligatures\",\n\t\"w14:numForm\",\n\t\"w14:numSpacing\",\n\t\"w14:stylisticSets\",\n\t\"w14:cntxtAlts\"\n];\nvar runPropertyRank = (element) => {\n\tvar _element$name;\n\tif (element.name === \"w:rPrChange\") return RUN_PROPERTY_ORDER.length + 1;\n\tconst index = RUN_PROPERTY_ORDER.indexOf((_element$name = element.name) !== null && _element$name !== void 0 ? _element$name : \"\");\n\treturn index === -1 ? RUN_PROPERTY_ORDER.length : index;\n};\nvar childElementsOf = (element) => {\n\tvar _element$elements;\n\treturn (_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : [];\n};\nvar isInsideElementAtPath = (path, ancestorPath) => path.length > ancestorPath.length && ancestorPath.every((index, i) => path[i] === index);\nvar withoutNestedParagraphs = (paragraphs) => paragraphs.filter((paragraph) => !paragraphs.some((other) => isInsideElementAtPath(paragraph.pathToParagraph, other.pathToParagraph)));\nvar goToElementFromPath = (json, path) => {\n\tlet element = json;\n\tfor (let i = 1; i < path.length; i++) {\n\t\tconst index = path[i];\n\t\telement = element.elements[index];\n\t}\n\treturn element;\n};\nvar goToParentElementFromPath = (json, path) => goToElementFromPath(json, path.slice(0, path.length - 1));\nvar getLastElementIndexFromPath = (path) => path[path.length - 1];\n// src/patcher/styles.ts\n/**\n* Styles of content inserted into an existing document.\n*\n* @module\n*/\nvar formatter = new Formatter();\nvar STYLES_PATH = \"word/styles.xml\";\nvar REFERENCES = /* @__PURE__ */ new Set([\n\t\"w:pStyle\",\n\t\"w:rStyle\",\n\t\"w:tblStyle\",\n\t\"w:basedOn\",\n\t\"w:next\",\n\t\"w:link\"\n]);\nvar idOf = (style) => {\n\tvar _style$attributes;\n\treturn String((_style$attributes = style.attributes) === null || _style$attributes === void 0 ? void 0 : _style$attributes[\"w:styleId\"]);\n};\nvar nameOf = (style) => {\n\tvar _style$elements;\n\tconst name = (_style$elements = style.elements) === null || _style$elements === void 0 || (_style$elements = _style$elements.find((element) => element.name === \"w:name\")) === null || _style$elements === void 0 || (_style$elements = _style$elements.attributes) === null || _style$elements === void 0 ? void 0 : _style$elements[\"w:val\"];\n\treturn name === void 0 ? void 0 : String(name).toLowerCase();\n};\nvar childOf$1 = (element, name) => {\n\tvar _element$elements;\n\treturn element === null || element === void 0 || (_element$elements = element.elements) === null || _element$elements === void 0 ? void 0 : _element$elements.find((child) => child.name === name);\n};\n/** The size of the font that run properties give, in half points, as Word writes it */\nvar sizeIn = (runProperties) => {\n\tvar _childOf;\n\tconst size = Number((_childOf = childOf$1(runProperties, \"w:sz\")) === null || _childOf === void 0 || (_childOf = _childOf.attributes) === null || _childOf === void 0 ? void 0 : _childOf[\"w:val\"]);\n\treturn Number.isNaN(size) ? void 0 : size;\n};\n/**\n* The size of the font of a template's Normal style, in half points: its own, or else the document's default. Word\n* indents each level of a table of contents by it, so docx's TOC styles are indented by it too. Normal is the style that\n* the styles added are based on: the template's with its id, or else with its name.\n*/\nvar normalSizeOf = (elements) => {\n\tvar _styles$find, _sizeIn;\n\tconst styles = elements.filter((element) => element.name === \"w:style\");\n\tconst normal = (_styles$find = styles.find((style) => idOf(style) === \"Normal\")) !== null && _styles$find !== void 0 ? _styles$find : styles.find((style) => {\n\t\tvar _style$attributes2;\n\t\treturn ((_style$attributes2 = style.attributes) === null || _style$attributes2 === void 0 ? void 0 : _style$attributes2[\"w:type\"]) === \"paragraph\" && nameOf(style) === \"normal\";\n\t});\n\tconst defaults = elements.find((element) => element.name === \"w:docDefaults\");\n\treturn (_sizeIn = sizeIn(childOf$1(normal, \"w:rPr\"))) !== null && _sizeIn !== void 0 ? _sizeIn : sizeIn(childOf$1(childOf$1(defaults, \"w:rPrDefault\"), \"w:rPr\"));\n};\nvar formatDefaultStyles = (context, normalSize) => new Map(Object.values(createDefaultStyles({ document: { run: { size: normalSize } } })).map((style) => toJson(stringifyXmlable(formatter.format(style, context))).elements[0]).filter((style) => style.name === \"w:style\").map((style) => [idOf(style), style]));\n/**\n* Creates the writer of the styles that patches use.\n*\n* A paragraph in a patch refers to its style by its id, such as `Heading1` for `HeadingLevel.HEADING_1`, which a\n* template may not have, as Word only saves the styles that a document uses. Word shows a paragraph whose style the\n* document doesn't have in the Normal style, and LibreOffice leaves out its number if it is in a list, so the styles of\n* docx's that the content uses are added to the document.\n*\n* @param parts - The document's XML parts, parsed, by their paths, whose styles part the styles are added to\n* @param createContext - Creates a context to format content for a part with\n*/\nvar patchStyles = (parts, createContext) => {\n\tvar _parts$get;\n\tconst templateElements = getFirstLevelElements((_parts$get = parts.get(STYLES_PATH)) !== null && _parts$get !== void 0 ? _parts$get : {}, \"w:styles\");\n\tconst templateStyles = templateElements.filter((element) => element.name === \"w:style\");\n\tconst templateIds = new Set(templateStyles.map(idOf));\n\tlet defaultStyles;\n\tconst defaultStyleOf = (id) => {\n\t\tvar _defaultStyles;\n\t\t(_defaultStyles = defaultStyles) !== null && _defaultStyles !== void 0 || (defaultStyles = formatDefaultStyles(createContext(STYLES_PATH), normalSizeOf(templateElements)));\n\t\treturn defaultStyles.get(id);\n\t};\n\tconst missingIds = /* @__PURE__ */ new Set();\n\tconst idsInDocument = /* @__PURE__ */ new Map();\n\tconst findIdInDocument = (id) => {\n\t\tconst style = templateIds.has(id) ? void 0 : defaultStyleOf(id);\n\t\tif (style === void 0) return id;\n\t\tconst sameStyle = templateStyles.find((templateStyle) => {\n\t\t\tvar _templateStyle$attrib, _style$attributes3;\n\t\t\treturn ((_templateStyle$attrib = templateStyle.attributes) === null || _templateStyle$attrib === void 0 ? void 0 : _templateStyle$attrib[\"w:type\"]) === ((_style$attributes3 = style.attributes) === null || _style$attributes3 === void 0 ? void 0 : _style$attributes3[\"w:type\"]) && nameOf(templateStyle) === nameOf(style);\n\t\t});\n\t\tif (sameStyle !== void 0) return idOf(sameStyle);\n\t\tmissingIds.add(id);\n\t\treturn id;\n\t};\n\tconst idInDocument = (id) => {\n\t\tif (!idsInDocument.has(id)) idsInDocument.set(id, findIdInDocument(id));\n\t\treturn idsInDocument.get(id);\n\t};\n\tconst withIdsInDocument = (element) => {\n\t\tvar _element$name;\n\t\tif (REFERENCES.has((_element$name = element.name) !== null && _element$name !== void 0 ? _element$name : \"\")) return _objectSpread2(_objectSpread2({}, element), {}, { attributes: _objectSpread2(_objectSpread2({}, element.attributes), {}, { \"w:val\": idInDocument(String(element.attributes[\"w:val\"])) }) });\n\t\treturn element.elements === void 0 ? element : _objectSpread2(_objectSpread2({}, element), {}, { elements: element.elements.map(withIdsInDocument) });\n\t};\n\tconst write = () => {\n\t\tconst stylesPart = parts.get(STYLES_PATH);\n\t\tif (!stylesPart) return;\n\t\tconst styles = getFirstLevelElements(stylesPart, \"w:styles\");\n\t\tconst ids = new Set(styles.map(idOf));\n\t\tfor (const id of missingIds) if (!ids.has(id)) {\n\t\t\tids.add(id);\n\t\t\tstyles.push(withIdsInDocument(defaultStyleOf(id)));\n\t\t}\n\t};\n\treturn {\n\t\tuse: (elements) => elements.map(withIdsInDocument),\n\t\twrite\n\t};\n};\n// src/patcher/table-rows.ts\nvar EMPTY = {\n\ttype: PatchType.PARAGRAPH,\n\tchildren: []\n};\n/**\n* Repeats the rows of the tables in an element that hold the patch's fields, such as `{{items.name}}` for the key\n* \"items\", once for each of the patch's rows, and patches the fields in each copy with the row's patches.\n*\n* @param json - The element to patch, such as a part's root\n* @param key - The patch's key, such as \"items\"\n* @param patch - The rows of data\n* @param delimiters - The placeholders' delimiters\n* @param patchPlaceholder - Patches a field in a copy of the rows, as `patchDocument` patches a placeholder\n* @param renumberDrawings - Gives the drawings in a copy of the rows ids no other drawing in the document has\n*/\nvar patchTableRows = ({ json, key, patch, delimiters: { start, end }, patchPlaceholder, renumberDrawings }) => {\n\tconst fieldStart = `${start}${key}.`;\n\tfor (const rows of findRowsToRepeat(json, fieldStart)) {\n\t\tconst fields = fieldsIn(rows.elements, fieldStart, end);\n\t\tconst copies = patch.rows.flatMap((row, index) => {\n\t\t\tconst copy = {\n\t\t\t\ttype: \"element\",\n\t\t\t\tname: \"w:tbl\",\n\t\t\t\telements: [...index === 0 ? rows.elements.map(copyOf) : renumberDrawings(withoutIds(rows.elements))]\n\t\t\t};\n\t\t\tconst fieldPatches = new Map(Object.entries(row).flatMap(([field, p]) => p === void 0 ? [] : [[field, p]]));\n\t\t\tfor (const [field, fieldPatch] of fieldPatches) patchPlaceholder(copy, `${key}.${field}`, fieldPatch);\n\t\t\tfor (const field of fields.filter((f) => !fieldPatches.has(f))) patchPlaceholder(copy, `${key}.${field}`, EMPTY);\n\t\t\treturn copy.elements;\n\t\t});\n\t\trows.parent.elements.splice(rows.parent.elements.indexOf(rows.elements[0]), rows.elements.length, ...copies);\n\t\tif (rows.table && !hasRows(rows.table.element)) rows.table.parent.elements.splice(rows.table.parent.elements.indexOf(rows.table.element), 1);\n\t}\n};\n/**\n* The rows that hold a field, grouped into the rows next to each other in a table, which are repeated together.\n*/\nvar findRowsToRepeat = (json, fieldStart) => {\n\tconst found = findLocationOfText(json, fieldStart).flatMap((paragraph) => {\n\t\tconst row = rowHolding(json, paragraph.pathToParagraph);\n\t\treturn row ? [row] : [];\n\t});\n\tconst rows = found.filter((row) => !found.some((other) => isInside(row.path, other.path))).filter((row, index, all) => all.findIndex((other) => other.row === row.row) === index);\n\treturn [...new Set(rows.map((row) => row.parent))].flatMap((parent) => {\n\t\tconst siblingRows = parent.elements.filter((e) => e.name === \"w:tr\");\n\t\tconst positions = rows.filter((row) => row.parent === parent).map((row) => siblingRows.indexOf(row.row)).sort((a, b) => a - b);\n\t\tconst { table } = rows.find((row) => row.parent === parent);\n\t\treturn positions.reduce((all, position) => {\n\t\t\tconst previous = all[all.length - 1];\n\t\t\treturn (previous === null || previous === void 0 ? void 0 : previous[previous.length - 1]) === position - 1 ? [...all.slice(0, -1), [...previous, position]] : [...all, [position]];\n\t\t}, []).map((group) => {\n\t\t\tconst first = parent.elements.indexOf(siblingRows[group[0]]);\n\t\t\tconst last = parent.elements.indexOf(siblingRows[group[group.length - 1]]);\n\t\t\treturn {\n\t\t\t\tparent,\n\t\t\t\ttable,\n\t\t\t\telements: parent.elements.slice(first, last + 1)\n\t\t\t};\n\t\t});\n\t});\n};\n/**\n* The row nearest to the paragraph at the end of the path that holds it, if it is in a table.\n*/\nvar rowHolding = (json, pathToParagraph) => {\n\tlet element = json;\n\tlet row;\n\tlet table;\n\tfor (let i = 1; i < pathToParagraph.length; i++) {\n\t\tconst child = element.elements[pathToParagraph[i]];\n\t\tif (child.name === \"w:tbl\") table = {\n\t\t\telement: child,\n\t\t\tparent: element\n\t\t};\n\t\tif (child.name === \"w:tr\") row = {\n\t\t\tparent: element,\n\t\t\ttable,\n\t\t\trow: child,\n\t\t\tpath: pathToParagraph.slice(0, i + 1)\n\t\t};\n\t\telement = child;\n\t}\n\treturn row;\n};\nvar isInside = (path, ancestorPath) => path.length > ancestorPath.length && ancestorPath.every((index, i) => path[i] === index);\nvar hasRows = (table) => {\n\tvar _table$elements;\n\treturn ((_table$elements = table.elements) !== null && _table$elements !== void 0 ? _table$elements : []).some((e) => e.name === \"w:tr\" || e.name !== \"w:tblPr\" && e.name !== \"w:tblGrid\" && hasRows(e));\n};\n/**\n* The names of the fields in the elements, such as \"name\" for `{{items.name}}`.\n*/\nvar fieldsIn = (elements, fieldStart, end) => {\n\tconst fields = findLocationOfText({ elements: [...elements] }, fieldStart).flatMap(({ text }) => text.split(fieldStart).slice(1).flatMap((after) => {\n\t\tconst fieldEnd = after.indexOf(end);\n\t\treturn fieldEnd > 0 ? [after.slice(0, fieldEnd)] : [];\n\t}));\n\treturn [...new Set(fields)];\n};\nvar copyOf = (element) => JSON.parse(JSON.stringify(element));\nvar ATTRIBUTES_TO_REMOVE = [\"w14:paraId\", \"w14:textId\"];\nvar ELEMENTS_TO_REMOVE = [\"w:bookmarkStart\", \"w:bookmarkEnd\"];\n/**\n* A copy of elements without what must be unique in a document, so they can be in the document more than once.\n*\n* @param parent - The elements' parent, as a content control's id is an element in its properties\n*/\nvar withoutIds = (elements, parent) => elements.filter((e) => {\n\tvar _e$name;\n\treturn !ELEMENTS_TO_REMOVE.includes((_e$name = e.name) !== null && _e$name !== void 0 ? _e$name : \"\") && !((parent === null || parent === void 0 ? void 0 : parent.name) === \"w:sdtPr\" && e.name === \"w:id\");\n}).map((e) => _objectSpread2(_objectSpread2(_objectSpread2({}, e), e.attributes === void 0 ? {} : { attributes: Object.fromEntries(Object.entries(e.attributes).filter(([name]) => !ATTRIBUTES_TO_REMOVE.includes(name))) }), e.elements === void 0 ? {} : { elements: [...withoutIds(e.elements, e)] }));\n// src/patcher/theme-colors.ts\n/**\n* Reads the colors of a document's theme, so that theme colors in patches are written with the hex color they come to\n* in the document's own theme.\n*\n* @module\n*/\nvar isUtf16 = (bytes) => bytes[0] === 255 && bytes[1] === 254 || bytes[0] === 254 && bytes[1] === 255;\n/**\n* Reads the colors of the document's theme. Colors it doesn't give, or gives in a way that isn't read, are Office's.\n*\n* @returns The theme's colors, or `undefined` if the document has no theme that can be read\n*/\nvar readThemeColors = (files) => {\n\tvar _find;\n\tconst path = themePathOf(files, \"word/document.xml\");\n\tconst theme = path === void 0 ? void 0 : (_find = [...files].find(([name]) => isSamePart(name, path))) === null || _find === void 0 ? void 0 : _find[1];\n\treturn theme === void 0 || isUtf16(theme) ? void 0 : themeColorValues(readThemeColorValues(decodeUtf8(theme)));\n};\n// src/patcher/trim-placeholders.ts\n/**\n* The first placeholder in a text, from an index on, with spaces inside its delimiters, whose key, without them, is\n* one to patch.\n*/\nvar findSpacedPlaceholder = (text, from, { start, end }, isKey) => {\n\tfor (let index = text.indexOf(start, from); index !== -1; index = text.indexOf(start, index + 1)) {\n\t\tconst endIndex = text.indexOf(end, index + start.length);\n\t\tif (endIndex === -1) return;\n\t\tconst content = text.slice(index + start.length, endIndex);\n\t\tconst key = content.trim();\n\t\tif (key !== content && isKey(key)) return {\n\t\t\tindex,\n\t\t\tplaceholder: text.slice(index, endIndex + end.length),\n\t\t\ttrimmed: `${start}${key}${end}`\n\t\t};\n\t}\n};\nvar trimInText = (text, delimiters, isKey) => {\n\tlet trimmed = text;\n\tfor (let found = findSpacedPlaceholder(trimmed, 0, delimiters, isKey); found !== void 0; found = findSpacedPlaceholder(trimmed, found.index + found.trimmed.length, delimiters, isKey)) trimmed = `${trimmed.slice(0, found.index)}${found.trimmed}${trimmed.slice(found.index + found.placeholder.length)}`;\n\treturn trimmed;\n};\nvar paragraphsIn = (element) => {\n\tvar _element$elements;\n\treturn ((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).flatMap((child) => [...child.name === \"w:p\" ? [child] : [], ...paragraphsIn(child)]);\n};\n/**\n* Takes the spaces out of each placeholder in a paragraph whose key is one to patch, even if it is split across runs.\n* The placeholder is left in its first run, as a patch would put its content there.\n*/\nvar trimInParagraph = (paragraph, delimiters, isKey) => {\n\tconst render = () => renderParagraphNode({\n\t\telement: paragraph,\n\t\tindex: 0,\n\t\tparent: void 0\n\t});\n\tfor (let rendered = render(), found = findSpacedPlaceholder(rendered.text, 0, delimiters, isKey); found !== void 0; rendered = render(), found = findSpacedPlaceholder(rendered.text, found.index + found.trimmed.length, delimiters, isKey)) replaceTokenInParagraphElement({\n\t\tparagraphElement: paragraph,\n\t\trenderedParagraph: rendered,\n\t\toriginalText: found.placeholder,\n\t\treplacementText: found.trimmed,\n\t\tfromIndex: found.index\n\t});\n};\n/**\n* Takes the spaces inside the delimiters out of the placeholders in a part that patches are for, such as `{{ name }}`\n* for the patch `name`, so the patches find them. Other text is left as it is, even if it looks like a placeholder.\n*\n* @param json - The part, which is changed in place\n* @param delimiters - The placeholders' delimiters\n* @param textKeys - The keys of the patches for placeholders in the text\n* @param tableRowsKeys - The keys of the patches that repeat the rows of a table, whose fields are `{{key.field}}`\n* @param drawingKeys - The keys of the patches for drawings whose alt text holds the placeholder\n*/\nvar trimPlaceholders = (json, { delimiters, textKeys, tableRowsKeys, drawingKeys }) => {\n\tconst isTextKey = (key) => textKeys.has(key) || tableRowsKeys.some((tableRowsKey) => key.startsWith(`${tableRowsKey}.`));\n\tfor (const paragraph of paragraphsIn(json)) trimInParagraph(paragraph, delimiters, isTextKey);\n\tconst isDrawingKey = (key) => drawingKeys.has(key);\n\tfor (const { properties } of findDrawings(json)) for (const name of [\"descr\", \"title\"]) {\n\t\tvar _properties$attribute;\n\t\tconst text = (_properties$attribute = properties.attributes) === null || _properties$attribute === void 0 ? void 0 : _properties$attribute[name];\n\t\tif (text !== void 0) properties.attributes[name] = trimInText(String(text), delimiters, isDrawingKey);\n\t}\n};\n// src/patcher/vml-shape-types.ts\nvar shapeTypeIdOf = (element) => {\n\tvar _element$attributes;\n\treturn element.name === \"v:shapetype\" && ((_element$attributes = element.attributes) === null || _element$attributes === void 0 ? void 0 : _element$attributes.id) !== void 0 ? String(element.attributes.id) : void 0;\n};\n/**\n* Finds the id of every VML shape type (`v:shapetype`) in an element, at any depth.\n*\n* @param element - The element to search, such as a part's root\n* @returns The ids, once for each shape type\n*/\nvar findShapeTypeIds = (element) => {\n\tvar _element$elements;\n\tconst id = shapeTypeIdOf(element);\n\treturn [...id === void 0 ? [] : [id], ...((_element$elements = element.elements) !== null && _element$elements !== void 0 ? _element$elements : []).flatMap(findShapeTypeIds)];\n};\n/**\n* Creates a function that leaves out of the content inserted into a part each VML shape type (`v:shapetype`) the part\n* has already, such as the picture frame (`_x0000_t75`) an embedded file or a picture watermark is drawn in. Content is\n* written with the shape types its shapes use, without knowing which the template has, but a part can't have two\n* elements with the same id. The shapes inserted use the part's own, which Word and LibreOffice find anywhere in the\n* part, as Word writes each shape type once in a part, in its first shape.\n*\n* A shape type with the id of one the part has is the same shape type: docx writes Office's preset ones, whose ids, such\n* as `_x0000_t75` for preset 75, name the preset.\n*\n* @param part - The root of the part the content is inserted into\n* @returns A function that returns the elements without the shape types the part has, including those inserted before\n*/\nvar removeShapeTypesIn = (part) => {\n\tconst idsInPart = new Set(findShapeTypeIds(part));\n\tconst remove = (element) => {\n\t\tconst id = shapeTypeIdOf(element);\n\t\tif (id !== void 0) {\n\t\t\tif (idsInPart.has(id)) return [];\n\t\t\tidsInPart.add(id);\n\t\t\treturn [element];\n\t\t}\n\t\treturn [element.elements === void 0 ? element : _objectSpread2(_objectSpread2({}, element), {}, { elements: element.elements.flatMap(remove) })];\n\t};\n\treturn (elements) => elements.flatMap(remove);\n};\n// src/patcher/image-patch.ts\n/**\n* Replaces the image of a picture in a template, such as a placeholder logo, with `patchDocument`, keeping its look.\n*\n* Reference: http://officeopenxml.com/drwPic.php\n*\n* @module\n*/\nvar IMAGE_RELATIONSHIP = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\";\nvar CONTENT_TYPES = {\n\tpng: \"image/png\",\n\tjpg: \"image/jpeg\",\n\tgif: \"image/gif\",\n\tbmp: \"image/bmp\",\n\tsvg: \"image/svg+xml\"\n};\nvar REGULAR_TYPES = [\n\t\"png\",\n\t\"jpg\",\n\t\"gif\",\n\t\"bmp\"\n];\nvar EMUS_PER_PIXEL = 9525;\nvar SVG_EXTENSION = \"{96DAC541-7B7A-43D3-8B79-37D633B846F1}\";\nvar IMAGE_PROPERTIES_EXTENSION = \"{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}\";\nvar childOf = (element, name) => {\n\tvar _element$elements;\n\treturn element === null || element === void 0 || (_element$elements = element.elements) === null || _element$elements === void 0 ? void 0 : _element$elements.find((child) => child.name === name);\n};\n/** The bytes of image data, as an `ImageRun` takes it */\nvar bytesOf = (data) => {\n\tconst standardized = standardizeData(data);\n\treturn ArrayBuffer.isView(standardized) ? new Uint8Array(standardized.buffer, standardized.byteOffset, standardized.byteLength) : new Uint8Array(standardized);\n};\nvar imagePart = (type, data) => new PackagePart({\n\tfolder: \"media\",\n\tname: \"image\",\n\textension: type,\n\tcontentType: CONTENT_TYPES[type],\n\trelationshipType: IMAGE_RELATIONSHIP,\n\tcontent: bytesOf(data)\n});\n/**\n* The part for a PNG, JPEG, GIF or BMP image, whose type is read from its data when JavaScript leaves it out.\n*\n* @throws If its type isn't one of those, or isn't given and its data isn't one of those formats\n*/\nvar regularImagePart = (options, name) => {\n\tconst type = imageTypeOf(options, name);\n\tif (!REGULAR_TYPES.includes(type)) throw new Error(`${name}: invalid type \"${type}\". Expected \"png\", \"jpg\", \"gif\", \"bmp\" or, with a fallback, \"svg\"`);\n\treturn imagePart(type, options.data);\n};\nvar NOT_PICTURES = /* @__PURE__ */ new Map([\n\t[\"c:chart\", \"It is a chart, not a picture. Give a chart new data with ChartDataPatch from docx/charts\"],\n\t[\"cx:chart\", \"It is a chart, not a picture. Give a chart new data with ChartDataPatch from docx/charts\"],\n\t[\"wpg:wgp\", \"It is a group of drawings. Ungroup the picture in Word, and put the placeholder in its alt text\"],\n\t[\"wpc:wpc\", \"It is a drawing canvas. Move the picture out of it in Word, and put the placeholder in its alt text\"],\n\t[\"wps:wsp\", \"It is a shape, not a picture\"]\n]);\n/**\n* The picture a drawing shows.\n*\n* @throws If the drawing isn't a picture, saying what it is\n*/\nvar pictureOf = (drawing, placeholder) => {\n\tvar _graphicData$elements, _NOT_PICTURES$get;\n\tconst graphicData = childOf(childOf(drawing, \"a:graphic\"), \"a:graphicData\");\n\tconst picture = childOf(graphicData, \"pic:pic\");\n\tif (picture !== void 0) return picture;\n\tconst content = graphicData === null || graphicData === void 0 || (_graphicData$elements = graphicData.elements) === null || _graphicData$elements === void 0 || (_graphicData$elements = _graphicData$elements.find((element) => element.type === \"element\")) === null || _graphicData$elements === void 0 ? void 0 : _graphicData$elements.name;\n\tthrow new Error(`Can't patch the picture ${placeholder}. ${(_NOT_PICTURES$get = NOT_PICTURES.get(content !== null && content !== void 0 ? content : \"\")) !== null && _NOT_PICTURES$get !== void 0 ? _NOT_PICTURES$get : \"It isn't a picture\"}`);\n};\n/**\n* The extensions of an image, without those for the template's image: an SVG version, which is replaced by the new\n* image's, if it has one, and the image before Word's artistic effects.\n*/\nvar withExtensions = (blip, svgId) => {\n\tvar _blip$elements, _list$elements;\n\tconst elements = (_blip$elements = blip.elements) !== null && _blip$elements !== void 0 ? _blip$elements : [];\n\tconst list = childOf(blip, \"a:extLst\");\n\tconst svg = svgId === void 0 ? [] : [{\n\t\ttype: \"element\",\n\t\tname: \"a:ext\",\n\t\tattributes: { uri: SVG_EXTENSION },\n\t\telements: [{\n\t\t\ttype: \"element\",\n\t\t\tname: \"asvg:svgBlip\",\n\t\t\tattributes: {\n\t\t\t\t\"xmlns:asvg\": \"http://schemas.microsoft.com/office/drawing/2016/SVG/main\",\n\t\t\t\t\"r:embed\": svgId\n\t\t\t}\n\t\t}]\n\t}];\n\tconst extensions = [...((_list$elements = list === null || list === void 0 ? void 0 : list.elements) !== null && _list$elements !== void 0 ? _list$elements : []).filter((extension) => {\n\t\tvar _extension$attributes;\n\t\treturn extension.name === \"a:ext\" && ![SVG_EXTENSION, IMAGE_PROPERTIES_EXTENSION].includes(String((_extension$attributes = extension.attributes) === null || _extension$attributes === void 0 ? void 0 : _extension$attributes.uri).toUpperCase());\n\t}), ...svg];\n\tconst newList = extensions.length === 0 ? [] : [_objectSpread2(_objectSpread2({}, list), {}, {\n\t\ttype: \"element\",\n\t\tname: \"a:extLst\",\n\t\telements: extensions\n\t})];\n\treturn [...elements.filter((element) => element !== list), ...newList];\n};\n/**\n* Sets the alt text of a picture's properties: the description and title given, or else the template's, without the\n* placeholder. An empty one is removed.\n*/\nvar setAltText = (properties, placeholder, altText) => {\n\tvar _altText$description, _altText$title;\n\tconst without = (name) => {\n\t\tvar _properties$attribute;\n\t\tconst text = (_properties$attribute = properties.attributes) === null || _properties$attribute === void 0 ? void 0 : _properties$attribute[name];\n\t\treturn text === void 0 ? void 0 : String(text).split(placeholder).join(\"\").trim();\n\t};\n\tconst description = (_altText$description = altText === null || altText === void 0 ? void 0 : altText.description) !== null && _altText$description !== void 0 ? _altText$description : without(\"descr\");\n\tconst title = (_altText$title = altText === null || altText === void 0 ? void 0 : altText.title) !== null && _altText$title !== void 0 ? _altText$title : without(\"title\");\n\tproperties.attributes = Object.fromEntries(Object.entries(_objectSpread2(_objectSpread2({}, properties.attributes), {}, {\n\t\tdescr: description || void 0,\n\t\ttitle: title || void 0\n\t})).filter(([, value]) => value !== void 0));\n};\nvar resize = (element, { width, height }) => {\n\tif (element !== void 0) element.attributes = _objectSpread2(_objectSpread2({}, element.attributes), {}, {\n\t\tcx: Math.round(width * EMUS_PER_PIXEL),\n\t\tcy: Math.round(height * EMUS_PER_PIXEL)\n\t});\n};\n/**\n* Replaces the image of a picture in a template, found by a placeholder in its alt text, such as `{{logo}}`, keeping\n* its look: its size, position, text wrapping, border, shape, effects and link. Give it as a patch to `patchDocument`,\n* with the placeholder's key.\n*\n* - The new image fills the picture, stretched to its size, unless a new `transformation` is given. Word's crop of the\n* template's image is removed.\n* - The placeholder is taken out of the alt text, unless new alt text is given.\n* - The template's image is removed, unless something else, such as another picture, shows it.\n*\n* Put the placeholder in the picture's alt text in Word, in \"Alt Text\" or \"Edit Alt Text\". Every picture whose alt text\n* holds it is patched, wherever it is: in the document, a table, a header, a footer or a note. A placeholder in the\n* document's text is left as it is: use an `ImageRun` in a `PatchType.PARAGRAPH` patch for it.\n*\n* @publicApi\n*\n* @example\n* ```typescript\n* await patchDocument({\n* outputType: \"nodebuffer\",\n* data: template,\n* patches: {\n* logo: new ImagePatch({ type: \"png\", data: fs.readFileSync(\"logo.png\") }),\n* },\n* });\n* ```\n*/\nvar ImagePatch = class extends DrawingPatch {\n\t/**\n\t* @throws If the image's type isn't one an `ImageRun` takes, an SVG image has no fallback, or the size isn't a number\n\t* of pixels greater than 0\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\t_defineProperty(this, \"image\", void 0);\n\t\t_defineProperty(this, \"svg\", void 0);\n\t\t_defineProperty(this, \"transformation\", void 0);\n\t\t_defineProperty(this, \"altText\", void 0);\n\t\tif (options.type === \"svg\") {\n\t\t\tif (options.fallback === void 0) throw new Error(\"ImagePatch: an SVG image needs a fallback, a PNG, JPEG, GIF or BMP image for applications that can't show SVG\");\n\t\t\tthis.image = regularImagePart(options.fallback, \"ImagePatch fallback\");\n\t\t\tthis.svg = imagePart(\"svg\", options.data);\n\t\t} else this.image = regularImagePart(options, \"ImagePatch\");\n\t\tconst { transformation } = options;\n\t\tif (transformation !== void 0) {\n\t\t\tfor (const name of [\"width\", \"height\"]) {\n\t\t\t\tconst value = transformation[name];\n\t\t\t\tif (!(typeof value === \"number\" && value > 0 && Number.isFinite(value))) throw new Error(`ImagePatch: invalid ${name} ${String(value)}. Expected a number of pixels greater than 0`);\n\t\t\t}\n\t\t\tthis.transformation = {\n\t\t\t\twidth: transformation.width,\n\t\t\t\theight: transformation.height\n\t\t\t};\n\t\t}\n\t\tthis.altText = options.altText && _objectSpread2({}, options.altText);\n\t}\n\t/**\n\t* Replaces the picture's image, and sets its size and alt text.\n\t*\n\t* @throws If the drawing isn't a picture, such as a chart, a shape or a group, or has no image\n\t*/\n\tpatch({ element, properties, placeholder, part }, template) {\n\t\tvar _blip$attributes;\n\t\tconst picture = pictureOf(element, placeholder);\n\t\tconst fill = childOf(picture, \"pic:blipFill\");\n\t\tconst blip = childOf(fill, \"a:blip\");\n\t\tif (fill === void 0 || blip === void 0) throw new Error(`Can't patch the picture ${placeholder}. It has no image: it has no a:blip`);\n\t\tconst id = template.replaceRelatedPart(part, void 0, this.image);\n\t\tconst svgId = this.svg && template.replaceRelatedPart(part, void 0, this.svg);\n\t\tblip.attributes = _objectSpread2({ \"r:embed\": id }, Object.fromEntries(Object.entries((_blip$attributes = blip.attributes) !== null && _blip$attributes !== void 0 ? _blip$attributes : {}).filter(([name]) => !/^[^:]+:(embed|link)$/.test(name))));\n\t\tblip.elements = [...withExtensions(blip, svgId)];\n\t\tfill.elements = fill.elements.filter((child) => child.name !== \"a:srcRect\");\n\t\tif (this.transformation !== void 0) {\n\t\t\tresize(childOf(element, \"wp:extent\"), this.transformation);\n\t\t\tresize(childOf(childOf(childOf(picture, \"pic:spPr\"), \"a:xfrm\"), \"a:ext\"), this.transformation);\n\t\t}\n\t\tsetAltText(properties, placeholder, this.altText);\n\t\tconst pictureProperties = childOf(childOf(picture, \"pic:nvPicPr\"), \"pic:cNvPr\");\n\t\tif (pictureProperties !== void 0) setAltText(pictureProperties, placeholder, this.altText);\n\t}\n};\n// src/patcher/from-docx.ts\n/**\n* Throws if a patch, or a patch for a field of one of its rows, isn't one `patchDocument` can apply, such as a patch\n* from JavaScript without its children.\n*\n* @param key - The patch's key, such as \"items\", or for a field of a row, such as \"items.name\"\n* @param inTableRow - Whether the patch is for a field of a row, where a drawing patch can't be\n*/\nvar assertValidPatch = (key, patch, { inTableRow }) => {\n\tif ((patch === null || patch === void 0 ? void 0 : patch.type) === PatchType.TABLE_ROWS && Array.isArray(patch.rows)) {\n\t\tfor (const row of patch.rows) {\n\t\t\tif (typeof row !== \"object\" || row === null) throw new Error(`Invalid patch \"${key}\". Expected each of its rows to be an object of patches, by the name of their field`);\n\t\t\tfor (const [field, fieldPatch] of Object.entries(row)) if (fieldPatch !== void 0) assertValidPatch(`${key}.${field}`, fieldPatch, { inTableRow: true });\n\t\t}\n\t\treturn;\n\t}\n\tif (!((patch === null || patch === void 0 ? void 0 : patch.type) === PatchType.DRAWING ? !inTableRow && typeof patch.patch === \"function\" : (patch === null || patch === void 0 ? void 0 : patch.type) !== PatchType.TABLE_ROWS && Array.isArray(patch === null || patch === void 0 ? void 0 : patch.children))) throw new Error(`Invalid patch \"${key}\". Expected { type: PatchType.PARAGRAPH or PatchType.DOCUMENT, children: [...] }, ${inTableRow ? \"or { type: PatchType.TABLE_ROWS, rows: [...] }\" : \"{ type: PatchType.TABLE_ROWS, rows: [...] }, or a drawing patch such as ImagePatch, or ChartDataPatch from docx/charts\"}`);\n};\nvar imageReplacer = new ImageReplacer();\nvar UTF16LE = new Uint8Array([255, 254]);\nvar UTF16BE = new Uint8Array([254, 255]);\nvar PATCHED_PART_ROOTS = /* @__PURE__ */ new Set([\n\t\"w:document\",\n\t\"w:hdr\",\n\t\"w:ftr\",\n\t\"w:footnotes\",\n\t\"w:endnotes\",\n\t\"w:comments\"\n]);\nvar compareByteArrays = (a, b) => {\n\tif (a.length !== b.length) return false;\n\tfor (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n\treturn true;\n};\n/**\n* Patches an existing .docx document by replacing placeholders with new content.\n*\n* This function opens an existing Word document, searches for placeholder text\n* (e.g., {{name}}), and replaces it with the provided content while preserving\n* the original document structure and optionally the original formatting.\n*\n* @param options - Configuration options for patching\n* @returns A promise resolving to the patched document in the specified output format\n*\n* @example\n* ```typescript\n* // Patch with paragraph content\n* const buffer = await patchDocument({\n* outputType: \"nodebuffer\",\n* data: templateBuffer,\n* patches: {\n* name: {\n* type: PatchType.PARAGRAPH,\n* children: [new TextRun({ text: \"John Doe\", bold: true })],\n* },\n* },\n* });\n*\n* // Patch with custom delimiters\n* const buffer = await patchDocument({\n* outputType: \"nodebuffer\",\n* data: templateBuffer,\n* patches: { ... },\n* placeholderDelimiters: { start: \"<<\", end: \">>\" },\n* });\n* ```\n*\n* @publicApi\n*/\nvar patchDocument = function() {\n\tvar _ref = _asyncToGenerator(function* ({ outputType, data, patches, keepOriginalStyles, placeholderDelimiters = {\n\t\tstart: \"{{\",\n\t\tend: \"}}\"\n\t}, recursive = true, trimPlaceholders: trimPlaceholders$1 = false, footnotes, endnotes, numbering = { config: [] }, pageNumbers, properties }) {\n\t\tconst zipContent = yield loadZip(data);\n\t\tconst contexts = /* @__PURE__ */ new Map();\n\t\tconst themeColors = readThemeColors(zipContent);\n\t\tconst contentTypeOverrides = [];\n\t\tconst file = {\n\t\t\tMedia: new Media(),\n\t\t\tNumbering: new Numbering(numbering),\n\t\t\tTheme: themeColors && { Colors: themeColors },\n\t\t\tFootNotes: { View: { idOf: (reference, note, context) => carryNote(\"footnotes\", reference, note, context) } },\n\t\t\tEndnotes: { View: { idOf: (reference, note, context) => carryNote(\"endnotes\", reference, note, context) } },\n\t\t\tPackageParts: new PackageParts({ addOverride: (contentType, partName) => contentTypeOverrides.push({\n\t\t\t\tcontentType,\n\t\t\t\tpartName\n\t\t\t}) }, new Set([...zipContent.keys()].filter((path) => path.startsWith(\"word/\")).map((path) => path.slice(5))))\n\t\t};\n\t\tconst map = /* @__PURE__ */ new Map();\n\t\tconst imageRelationshipAdditions = [];\n\t\tconst relationshipAdditions = [];\n\t\tlet hasMedia = false;\n\t\tconst binaryContentMap = /* @__PURE__ */ new Map();\n\t\tif (!(placeholderDelimiters === null || placeholderDelimiters === void 0 ? void 0 : placeholderDelimiters.start.trim()) || !(placeholderDelimiters === null || placeholderDelimiters === void 0 ? void 0 : placeholderDelimiters.end.trim())) throw new Error(\"Both start and end delimiters must be non-empty strings.\");\n\t\tconst { start, end } = placeholderDelimiters;\n\t\tfor (const [key, patch] of Object.entries(patches)) assertValidPatch(key, patch, { inTableRow: false });\n\t\tfor (const [key, binaryValue] of zipContent) {\n\t\t\tvar _json$elements;\n\t\t\tconst startBytes = binaryValue.slice(0, 2);\n\t\t\tif (compareByteArrays(startBytes, UTF16LE) || compareByteArrays(startBytes, UTF16BE)) {\n\t\t\t\tbinaryContentMap.set(key, binaryValue);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!key.endsWith(\".xml\") && !key.endsWith(\".rels\")) {\n\t\t\t\tbinaryContentMap.set(key, binaryValue);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst json = toJson(decodeUtf8(binaryValue));\n\t\t\tconst root = (_json$elements = json.elements) === null || _json$elements === void 0 ? void 0 : _json$elements.find((i) => {\n\t\t\t\tvar _i$name;\n\t\t\t\treturn PATCHED_PART_ROOTS.has((_i$name = i.name) !== null && _i$name !== void 0 ? _i$name : \"\");\n\t\t\t});\n\t\t\tif (root && root.attributes) {\n\t\t\t\tfor (const ns of [\n\t\t\t\t\t\"mc\",\n\t\t\t\t\t\"wp\",\n\t\t\t\t\t\"r\",\n\t\t\t\t\t\"w15\",\n\t\t\t\t\t\"m\",\n\t\t\t\t\t\"v\",\n\t\t\t\t\t\"o\"\n\t\t\t\t]) root.attributes[`xmlns:${ns}`] = DocumentAttributeNamespaces[ns];\n\t\t\t\troot.attributes[\"mc:Ignorable\"] = `${root.attributes[\"mc:Ignorable\"] || \"\"} w15`.trim();\n\t\t\t}\n\t\t\tmap.set(key, json);\n\t\t}\n\t\tconst renumberBookmarks = renumberBookmarksAvoiding([...map.values()].flatMap(findBookmarkIds));\n\t\tconst renumberDrawings = renumberDrawingsAvoiding([...map.values()].flatMap(findDrawingIds));\n\t\tconst viewWrappers = /* @__PURE__ */ new Map();\n\t\tconst viewWrapperOf = (key) => {\n\t\t\tconst existing = viewWrappers.get(key);\n\t\t\tif (existing) return existing;\n\t\t\tconst viewWrapper = { Relationships: { addRelationship: (id, type, target, targetMode) => {\n\t\t\t\trelationshipAdditions.push({\n\t\t\t\t\tkey,\n\t\t\t\t\tid,\n\t\t\t\t\ttype,\n\t\t\t\t\ttarget,\n\t\t\t\t\ttargetMode\n\t\t\t\t});\n\t\t\t} } };\n\t\t\tviewWrappers.set(key, viewWrapper);\n\t\t\treturn viewWrapper;\n\t\t};\n\t\tconst createContext = (key) => ({\n\t\t\tfile,\n\t\t\tviewWrapper: viewWrapperOf(key),\n\t\t\tstack: []\n\t\t});\n\t\tconst addContentTypeOverride = (contentType, partName) => {\n\t\t\tcontentTypeOverrides.push({\n\t\t\t\tcontentType,\n\t\t\t\tpartName\n\t\t\t});\n\t\t};\n\t\tconst styles = patchStyles(map, createContext);\n\t\tconst lists = patchNumbering(file.Numbering, map, {\n\t\t\tcreateContext,\n\t\t\taddContentTypeOverride\n\t\t});\n\t\tconst notes = patchNotes({\n\t\t\tfootnotes,\n\t\t\tendnotes\n\t\t}, map, {\n\t\t\tcreateContext,\n\t\t\taddContentTypeOverride,\n\t\t\trenumberBookmarks,\n\t\t\trenumberDrawings,\n\t\t\trenumberLists: lists.renumber,\n\t\t\tuseStyles: styles.use\n\t\t});\n\t\tconst carryNote = (kind, reference, note, context) => context.viewWrapper === viewWrapperOf(\"word/document.xml\") ? notes.carry(kind, reference, note) : void 0;\n\t\tif (trimPlaceholders$1) {\n\t\t\tconst keysWhere = (test) => Object.entries(patches).flatMap(([key, patch]) => test(patch.type) ? [key] : []);\n\t\t\tconst keys = {\n\t\t\t\tdelimiters: {\n\t\t\t\t\tstart,\n\t\t\t\t\tend\n\t\t\t\t},\n\t\t\t\ttextKeys: new Set(keysWhere((type) => type !== PatchType.TABLE_ROWS && type !== PatchType.DRAWING)),\n\t\t\t\ttableRowsKeys: keysWhere((type) => type === PatchType.TABLE_ROWS),\n\t\t\t\tdrawingKeys: new Set(keysWhere((type) => type === PatchType.DRAWING))\n\t\t\t};\n\t\t\tfor (const [key, json] of map) if (key.startsWith(\"word/\") && !key.endsWith(\".rels\")) trimPlaceholders(json, keys);\n\t\t}\n\t\tpatchDrawings({\n\t\t\tparts: map,\n\t\t\tbinaryParts: binaryContentMap,\n\t\t\tfile,\n\t\t\tpatches: Object.entries(patches).flatMap(([key, patch]) => patch.type === PatchType.DRAWING ? [[key, patch]] : []),\n\t\t\tdelimiters: {\n\t\t\t\tstart,\n\t\t\t\tend\n\t\t\t}\n\t\t}, createContext);\n\t\tconst textPatches = Object.entries(patches).flatMap(([key, patch]) => patch.type === PatchType.DRAWING ? [] : [[key, patch]]);\n\t\tconst patchesInOrder = [...textPatches.filter(([, patch]) => patch.type === PatchType.TABLE_ROWS), ...textPatches.filter(([, patch]) => patch.type !== PatchType.TABLE_ROWS)];\n\t\tfor (const [key, json] of [...map]) {\n\t\t\tif (!key.startsWith(\"word/\") || key.endsWith(\".xml.rels\")) continue;\n\t\t\tconst context = createContext(key);\n\t\t\tcontexts.set(key, context);\n\t\t\tconst removeShapeTypes = removeShapeTypesIn(json);\n\t\t\tconst patchPlaceholder = (element, patchKey, patchValue) => {\n\t\t\t\tif (patchValue.type === PatchType.TABLE_ROWS) {\n\t\t\t\t\tpatchTableRows({\n\t\t\t\t\t\tjson: element,\n\t\t\t\t\t\tkey: patchKey,\n\t\t\t\t\t\tpatch: patchValue,\n\t\t\t\t\t\tdelimiters: {\n\t\t\t\t\t\t\tstart,\n\t\t\t\t\t\t\tend\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpatchPlaceholder,\n\t\t\t\t\t\trenumberDrawings\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst hyperlinkRelationships = [];\n\t\t\t\tconst { didFindOccurrence } = replacer({\n\t\t\t\t\tjson: element,\n\t\t\t\t\tpatch: _objectSpread2(_objectSpread2({}, patchValue), {}, { children: patchValue.children.flatMap((child) => child instanceof Bookmark ? child.writtenAs : [child]).map((child) => {\n\t\t\t\t\t\tif (child instanceof ExternalHyperlink) {\n\t\t\t\t\t\t\tconst { target, anchor } = externalHyperlinkTarget(child.options.link);\n\t\t\t\t\t\t\tconst concreteHyperlink = new ConcreteHyperlink(child.options.children, uniqueId(), anchor, child.options.link);\n\t\t\t\t\t\t\thyperlinkRelationships.push({\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tid: concreteHyperlink.linkId,\n\t\t\t\t\t\t\t\ttype: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",\n\t\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\t\ttargetMode: TargetModeType.EXTERNAL\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn concreteHyperlink;\n\t\t\t\t\t\t} else return child;\n\t\t\t\t\t}) }),\n\t\t\t\t\tpatchText: `${start}${patchKey}${end}`,\n\t\t\t\t\tcontext,\n\t\t\t\t\tkeepOriginalStyles,\n\t\t\t\t\trecursive,\n\t\t\t\t\trenumberIds: (elements) => styles.use(lists.renumber(notes.renumber(renumberBookmarks(renumberDrawings(removeShapeTypes(elements))))))\n\t\t\t\t});\n\t\t\t\tif (didFindOccurrence) relationshipAdditions.push(...hyperlinkRelationships);\n\t\t\t};\n\t\t\tfor (const [patchKey, patchValue] of patchesInOrder) patchPlaceholder(json, patchKey, patchValue);\n\t\t}\n\t\tnotes.write();\n\t\tlists.write();\n\t\tstyles.write();\n\t\tfor (const [key, json] of map) {\n\t\t\tif (!key.startsWith(\"word/\") || key.endsWith(\".xml.rels\")) continue;\n\t\t\tconst mediaDatas = imageReplacer.getMediaData(JSON.stringify(json), file.Media);\n\t\t\tif (mediaDatas.length > 0) {\n\t\t\t\thasMedia = true;\n\t\t\t\timageRelationshipAdditions.push({\n\t\t\t\t\tkey,\n\t\t\t\t\tmediaDatas\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tfor (const { key, mediaDatas } of imageRelationshipAdditions) {\n\t\t\tvar _map$get;\n\t\t\tconst relationshipKey = relationshipsPathOf(key);\n\t\t\tconst relationshipsJson = (_map$get = map.get(relationshipKey)) !== null && _map$get !== void 0 ? _map$get : createRelationshipFile();\n\t\t\tmap.set(relationshipKey, relationshipsJson);\n\t\t\tconst index = getNextRelationshipIndex(relationshipsJson);\n\t\t\tconst newJson = imageReplacer.replace(JSON.stringify(map.get(key)), mediaDatas, index);\n\t\t\tmap.set(key, JSON.parse(newJson));\n\t\t\tfor (let i = 0; i < mediaDatas.length; i++) {\n\t\t\t\tconst { fileName } = mediaDatas[i];\n\t\t\t\tappendRelationship(relationshipsJson, index + i, \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\", `media/${fileName}`);\n\t\t\t}\n\t\t}\n\t\tfor (const { key, id, type, target, targetMode } of relationshipAdditions) {\n\t\t\tvar _map$get2;\n\t\t\tconst relationshipKey = relationshipsPathOf(key);\n\t\t\tconst relationshipsJson = (_map$get2 = map.get(relationshipKey)) !== null && _map$get2 !== void 0 ? _map$get2 : createRelationshipFile();\n\t\t\tmap.set(relationshipKey, relationshipsJson);\n\t\t\tappendRelationship(relationshipsJson, id, type, target, targetMode);\n\t\t}\n\t\tif (pageNumbers) yield fillTemplatePageNumbers(map, pageNumbers, binaryContentMap);\n\t\tif (properties) patchCoreProperties(map, binaryContentMap, properties, { addContentTypeOverride });\n\t\tconst packageParts = xmlifyPackageParts(file, void 0);\n\t\tif (hasMedia || contentTypeOverrides.length > 0) {\n\t\t\tconst contentTypesJson = map.get(\"[Content_Types].xml\");\n\t\t\tif (!contentTypesJson) throw new Error(\"Could not find content types file\");\n\t\t\tif (hasMedia) {\n\t\t\t\tappendContentType(contentTypesJson, \"image/png\", \"png\");\n\t\t\t\tappendContentType(contentTypesJson, \"image/jpeg\", \"jpeg\");\n\t\t\t\tappendContentType(contentTypesJson, \"image/jpeg\", \"jpg\");\n\t\t\t\tappendContentType(contentTypesJson, \"image/bmp\", \"bmp\");\n\t\t\t\tappendContentType(contentTypesJson, \"image/gif\", \"gif\");\n\t\t\t\tappendContentType(contentTypesJson, \"image/svg+xml\", \"svg\");\n\t\t\t}\n\t\t\tfor (const { contentType, partName } of contentTypeOverrides) appendContentTypeOverride(contentTypesJson, contentType, partName);\n\t\t}\n\t\treturn zipOutput(zipFiles([\n\t\t\t...[...map].map(([key, value]) => [key, stringifyElement(value)]),\n\t\t\t...binaryContentMap,\n\t\t\t...file.Media.Array.map(({ data: media, fileName }) => [`word/media/${fileName}`, media]),\n\t\t\t...packageParts.map(({ path, data: partData }) => [path, partData])\n\t\t]), outputType, \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\");\n\t});\n\treturn function patchDocument(_x) {\n\t\treturn _ref.apply(this, arguments);\n\t};\n}();\n// src/patcher/patch-detector.ts\n/**\n* Patch detector for discovering placeholders in document templates.\n*\n* @module\n*/\nvar isSearched = (path) => path.startsWith(\"word/\") && /\\.(xml|rels)$/.test(path) && !path.endsWith(\".xml.rels\");\n/**\n* Detects all placeholders present in a document template.\n*\n* Scans through all XML content in a .docx file to find placeholder text\n* enclosed in delimiters (default: {{placeholder}}), and placeholders in the\n* alt text of drawings, such as a chart for `docx/charts`' `ChartDataPatch`.\n* This is useful for discovering what patches a template expects before\n* performing replacement.\n*\n* @param options - Patch detector configuration\n* @returns Array of placeholder keys found in the document\n*\n* @example\n* ```typescript\n* const placeholders = await patchDetector({ data: templateBuffer });\n* // Returns: [\"name\", \"date\", \"address\"] if template contains {{name}}, {{date}}, {{address}}\n*\n* // Use detected placeholders to create patches\n* const patches = {};\n* placeholders.forEach(key => {\n* patches[key] = {\n* type: PatchType.PARAGRAPH,\n* children: [new TextRun(getUserData(key))],\n* };\n* });\n* ```\n*/\nvar patchDetector = function() {\n\tvar _ref = _asyncToGenerator(function* ({ data, trimPlaceholders = false }) {\n\t\tconst zipContent = yield loadZip(data, isSearched);\n\t\tconst patches = /* @__PURE__ */ new Set();\n\t\tfor (const [, value] of zipContent) {\n\t\t\tconst json = toJson(decodeUtf8(value));\n\t\t\t[...traverse(json).map((p) => p.text), ...findDrawings(json).flatMap(({ properties }) => altTextOf(properties))].flatMap((text) => findPatchKeys(text)).map((patch) => trimPlaceholders ? patch.trim() : patch).filter((patch) => patch !== \"\").forEach((patch) => patches.add(patch));\n\t\t}\n\t\treturn Array.from(patches);\n\t});\n\treturn function patchDetector(_x) {\n\t\treturn _ref.apply(this, arguments);\n\t};\n}();\n/**\n* Extracts placeholder keys from text using regex pattern.\n*\n* @param text - Text to search for placeholders\n* @returns Array of placeholder keys (without delimiters)\n*/\nvar findPatchKeys = (text) => {\n\tvar _text$match;\n\tconst pattern = new RegExp(\"(?<=\\\\{\\\\{).+?(?=\\\\}\\\\})\", \"gs\");\n\treturn (_text$match = text.match(pattern)) !== null && _text$match !== void 0 ? _text$match : [];\n};\nexport { AbstractNumbering, AlignmentType, AnnotationReference, Attributes, BaseXmlComponent, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, CarriageReturn, CellMerge, CellMergeAttributes, CharacterSet, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, CommentsExtended, CommentsIds, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, File as Document, File, DocumentAttributeNamespaces, DocumentAttributes, DocumentBackground, DocumentBackgroundAttributes, DocumentDefaults, DocumentGridType, DocumentProtectionType, Drawing, DrawingPatch, DropCapType, EMPTY_OBJECT, EditableRangeEnd, EditableRangeStart, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnotePosition, EndnoteReference, EndnoteReferenceRun, EndnoteReferenceRunAttributes, Endnotes, ExternalHyperlink, FileChild, FootNoteReferenceRunAttributes, FootNotes, Footer, FooterWrapper, FootnotePosition, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HpsMeasureElement, HyperlinkType, IgnoreIfEmptyXmlComponent, ImagePatch, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathCurlyBrackets, MathDegree, MathDenominator, MathFraction, MathFunction, MathFunctionName, MathFunctionProperties, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathNumerator, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, NextAttributeComponent, NoBreakHyphen, NonVisualDrawingProperties, NoteNumberRestart, NumberFormat, NumberProperties, NumberValueElement, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OnOffElement, OverlapType, PackagePart, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, PrettifyType, RelativeHorizontalPosition, RelativeVerticalPosition, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, SchemeColor, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SoftHyphen, SpaceType, StringContainer, StringEnumValueElement, StringValueElement, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TableRow, TableRowProperties, TableRowPropertiesChange, TextDirection, TextEffect, TextRun, TextWrappingSide, TextWrappingType, Textbox, ThematicBreak, Theme, TwoLinesInOneBrackets, UnderlineType, VerticalAlign, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WidthType, WpgGroupRun, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, bookmarkUniqueNumericId, bookmarkUniqueNumericIdGen, commentIdToParaId, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createColumns, createDocumentGrid, createDotEmphasisMark, createEastAsianLayout, createEmphasisMark, createEndnoteProperties, createFitText, createFootnoteProperties, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccentCharacter, createMathBase, createMathLimitLocation, createMathNAryProperties, createMathPreSubSuperScriptProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createVmlShape, createWrapNone, createWrapSquare, createWrapThrough, createWrapTight, createWrapTopAndBottom, dateTimeValue, decimalNumber, docPropertiesUniqueNumericId, docPropertiesUniqueNumericIdGen, eighthPointMeasureValue, elementOf, encodeUtf8, fillPageNumbers, fillPartPageNumbers, fillSequenceNumbers, fitTextUniqueNumericId, hashedId, hexColorValue, hpsMeasureValue, isXmlComponent, longHexNumber, measurementOrPercentValue, patchDetector, patchDocument, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, readTheme, sectionMarginDefaults, sectionPageSizeDefaults, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, standardizeData, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureToTwips, universalMeasureValue, unsignedDecimalNumber };\n","/**\n * Markdown → Word (.docx), in the browser.\n *\n * Loaded on demand (`api/documents.ts` imports it dynamically), so the `docx`\n * library is not part of the app's first load. It maps the GFM syntax tree onto\n * Word's own structures: real headings (so the navigation pane and a table of\n * contents work), real lists, real tables, monospace code with shading.\n */\n\nimport {\n AlignmentType,\n BorderStyle,\n Document,\n ExternalHyperlink,\n HeadingLevel,\n LevelFormat,\n Packer,\n Paragraph,\n ShadingType,\n Table,\n TableCell,\n TableRow,\n TextRun,\n WidthType,\n type ParagraphChild,\n} from \"docx\";\nimport type { List, ListItem, PhrasingContent, RootContent, Table as MdTable } from \"mdast\";\n\nimport { exportableUrl, parseMarkdown } from \"./markdown\";\n\n// Present on Windows, macOS and every Office install, unlike Consolas.\nconst MONO = \"Courier New\";\nconst CODE_FILL = \"F2F2F2\";\nconst ORDERED = \"cfx-ordered\";\nconst HEADINGS = [\n HeadingLevel.HEADING_1,\n HeadingLevel.HEADING_2,\n HeadingLevel.HEADING_3,\n HeadingLevel.HEADING_4,\n HeadingLevel.HEADING_5,\n HeadingLevel.HEADING_6,\n];\n\ninterface Marks {\n bold?: boolean;\n italics?: boolean;\n strike?: boolean;\n /** A character style, e.g. \"Hyperlink\" for runs inside a link. */\n style?: string;\n}\n\ninterface Block {\n /** Nesting depth inside lists (0 at the top). */\n listLevel: number;\n /** Inside a blockquote: indented, with a bar on the left. */\n quote: boolean;\n}\n\n/** One numbering instance per ordered list, so each list restarts at 1. */\nclass Numbering {\n private next = 1;\n take(): number {\n return this.next++;\n }\n}\n\nfunction inline(nodes: PhrasingContent[], marks: Marks = {}): ParagraphChild[] {\n const out: ParagraphChild[] = [];\n for (const node of nodes) {\n switch (node.type) {\n case \"text\":\n // A newline inside a paragraph is a soft break: a space, not a new line.\n out.push(new TextRun({ text: node.value.replace(/\\n/g, \" \"), ...marks }));\n break;\n case \"strong\":\n out.push(...inline(node.children, { ...marks, bold: true }));\n break;\n case \"emphasis\":\n out.push(...inline(node.children, { ...marks, italics: true }));\n break;\n case \"delete\":\n out.push(...inline(node.children, { ...marks, strike: true }));\n break;\n case \"inlineCode\":\n out.push(\n new TextRun({\n text: node.value,\n ...marks,\n font: MONO,\n shading: { type: ShadingType.CLEAR, fill: CODE_FILL, color: \"auto\" },\n }),\n );\n break;\n case \"break\":\n out.push(new TextRun({ break: 1 }));\n break;\n case \"link\": {\n const url = exportableUrl(node.url);\n if (url) {\n // The rendered runs, not a flattened string: an image inside the\n // link keeps its \"[image: alt]\" text.\n const runs = inline(node.children, { ...marks, style: \"Hyperlink\" });\n out.push(\n new ExternalHyperlink({\n link: url,\n children: runs.length ? runs : [new TextRun({ text: url, ...marks, style: \"Hyperlink\" })],\n }),\n );\n } else {\n out.push(...inline(node.children, marks));\n }\n break;\n }\n case \"image\":\n out.push(new TextRun({ text: `[image${node.alt ? `: ${node.alt}` : \"\"}]`, ...marks, italics: true }));\n break;\n case \"html\":\n out.push(new TextRun({ text: node.value, ...marks }));\n break;\n case \"footnoteReference\":\n out.push(new TextRun({ text: `[^${node.identifier}]`, ...marks, superScript: true }));\n break;\n default:\n // References are resolved into links and images by parseMarkdown.\n if (\"children\" in node) out.push(...inline(node.children as PhrasingContent[], marks));\n else if (\"value\" in node) out.push(new TextRun({ text: String(node.value), ...marks }));\n }\n }\n return out;\n}\n\n/** Indentation for a paragraph inside a list item or a blockquote. */\nfunction blockStyle(ctx: Block) {\n if (ctx.quote) {\n return {\n indent: { left: 360 + ctx.listLevel * 720 },\n border: { left: { style: BorderStyle.SINGLE, size: 12, color: \"BBBBBB\", space: 8 } },\n };\n }\n return ctx.listLevel > 0 ? { indent: { left: ctx.listLevel * 720 } } : {};\n}\n\nfunction blocks(nodes: RootContent[], ctx: Block, numbering: Numbering): Array<Paragraph | Table> {\n const out: Array<Paragraph | Table> = [];\n for (const node of nodes) {\n switch (node.type) {\n case \"heading\":\n out.push(new Paragraph({ heading: HEADINGS[node.depth - 1], children: inline(node.children) }));\n break;\n case \"paragraph\":\n out.push(new Paragraph({ children: inline(node.children), ...blockStyle(ctx) }));\n break;\n case \"blockquote\":\n out.push(...blocks(node.children, { ...ctx, quote: true }, numbering));\n break;\n case \"code\": {\n const lines = node.value.split(\"\\n\");\n out.push(\n new Paragraph({\n shading: { type: ShadingType.CLEAR, fill: CODE_FILL, color: \"auto\" },\n spacing: { before: 60, after: 120 },\n children: lines.map(\n (line, i) => new TextRun({ text: line, font: MONO, size: 19, break: i > 0 ? 1 : undefined }),\n ),\n }),\n );\n break;\n }\n case \"list\":\n out.push(...list(node, ctx, numbering));\n break;\n case \"table\":\n out.push(table(node));\n break;\n case \"thematicBreak\":\n out.push(\n new Paragraph({\n children: [],\n border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: \"BBBBBB\", space: 1 } },\n }),\n );\n break;\n case \"html\":\n out.push(new Paragraph({ children: [new TextRun({ text: node.value, font: MONO })] }));\n break;\n case \"footnoteDefinition\": {\n // The label joins the first paragraph; any other first block (a\n // heading, code) gets the label on a line of its own and stays whole.\n const label = new TextRun({ text: `[^${node.identifier}] `, superScript: true });\n const [first, ...rest] = node.children;\n if (first && first.type === \"paragraph\") {\n out.push(new Paragraph({ children: [label, ...inline(first.children)] }), ...blocks(rest, ctx, numbering));\n } else {\n out.push(new Paragraph({ children: [label] }), ...blocks(node.children, ctx, numbering));\n }\n break;\n }\n default:\n // definition, yaml and the like: nothing to show.\n break;\n }\n }\n return out;\n}\n\nfunction list(node: List, ctx: Block, numbering: Numbering): Array<Paragraph | Table> {\n const out: Array<Paragraph | Table> = [];\n const level = Math.min(ctx.listLevel, 8);\n // Word numbering restarts per instance; a list that starts elsewhere than 1\n // gets its numbers written out instead.\n const instance = node.ordered && (node.start ?? 1) === 1 ? numbering.take() : null;\n node.children.forEach((item: ListItem, index) => {\n const [first, ...rest] = item.children;\n const marker =\n item.checked === true ? \"☒ \" : item.checked === false ? \"☐ \" : \"\";\n const manual = node.ordered && instance === null ? `${(node.start ?? 1) + index}. ` : \"\";\n const lead = manual || marker ? [new TextRun({ text: manual + marker })] : [];\n const bulletOrNumber = !node.ordered\n ? { bullet: { level } }\n : instance !== null\n ? { numbering: { reference: ORDERED, level, instance } }\n : { indent: { left: 360 * (level + 1) } };\n if (first && first.type === \"paragraph\") {\n out.push(new Paragraph({ ...bulletOrNumber, children: [...lead, ...inline(first.children)] }));\n } else {\n out.push(new Paragraph({ ...bulletOrNumber, children: lead }));\n if (first) out.push(...blocks([first], { ...ctx, listLevel: ctx.listLevel + 1 }, numbering));\n }\n out.push(...blocks(rest, { ...ctx, listLevel: ctx.listLevel + 1 }, numbering));\n });\n return out;\n}\n\nfunction table(node: MdTable): Table {\n const align = node.align ?? [];\n const alignment = (i: number) =>\n align[i] === \"center\" ? AlignmentType.CENTER : align[i] === \"right\" ? AlignmentType.RIGHT : AlignmentType.LEFT;\n return new Table({\n width: { size: 100, type: WidthType.PERCENTAGE },\n rows: node.children.map(\n (row, r) =>\n new TableRow({\n tableHeader: r === 0,\n children: row.children.map(\n (cell, i) =>\n new TableCell({\n shading: r === 0 ? { type: ShadingType.CLEAR, fill: \"EDEDED\", color: \"auto\" } : undefined,\n children: [\n new Paragraph({\n alignment: alignment(i),\n children: inline(cell.children, r === 0 ? { bold: true } : {}),\n }),\n ],\n }),\n ),\n }),\n ),\n });\n}\n\nexport function markdownToDocxDocument(markdown: string, title: string): Document {\n const numbering = new Numbering();\n const children = blocks(parseMarkdown(markdown).children, { listLevel: 0, quote: false }, numbering);\n return new Document({\n title,\n creator: \"Cerefox\",\n styles: {\n default: { document: { run: { font: \"Calibri\", size: 22 }, paragraph: { spacing: { after: 120, line: 276 } } } },\n },\n numbering: {\n config: [\n {\n reference: ORDERED,\n levels: Array.from({ length: 9 }, (_, level) => ({\n level,\n format: LevelFormat.DECIMAL,\n text: `%${level + 1}.`,\n alignment: AlignmentType.START,\n style: { paragraph: { indent: { left: 720 * (level + 1), hanging: 360 } } },\n })),\n },\n ],\n },\n sections: [{ children: children.length ? children : [new Paragraph({ children: [] })] }],\n });\n}\n\nexport function markdownToDocx(markdown: string, title: string): Promise<Blob> {\n return Packer.toBlob(markdownToDocxDocument(markdown, title));\n}\n"],"ignoreList":[0],"mappings":"A,0EACA,IAAIE,GAAiB,EAAI,SAAeC,IAAQC,GAAI,EAAM,CAAE,QAAS,CAAC,CAAE,EAAA,CAAG,QAASD,EAAKA,EAAI,OAAO,EAAG,EAAK,MAAOA,EAAI,SAEvH,SAASE,EAAQ,EAAG,CACnB,0BACA,MAAO,GAAwB,OAAO,QAArB,YAA2C,OAAO,OAAO,UAA1B,SAAqC,SAAS,EAAG,CAChG,OAAO,OAAOC,CACf,EAAI,SAAS,EAAG,CACf,OAAOA,GAAmB,OAAO,QAArB,YAA+BA,EAAE,cAAgB,QAAUA,IAAM,OAAO,UAAY,SAAW,OAAOA,CACnH,EAAGD,EAAQC,CAAC,CACb,CAEA,SAASC,EAAY,EAAG,EAAG,CAC1B,GAAgBF,EAAQG,CAAC,GAArB,UAA0B,CAACA,EAAG,OAAOA,EACzC,IAAIC,EAAID,EAAE,OAAO,aACjB,GAAeC,IAAX,IAAK,GAAS,CACjB,IAAI,EAAIA,EAAE,KAAKD,EAAGE,GAAK,SAAS,EAChC,GAAgBL,EAAQ,CAAC,GAArB,SAAwB,OAAO,EACnC,MAAU,UAAU,8CAA8C,CACnE,CACA,OAAqBK,IAAb,SAAiB,OAAS,OAAA,CAAQF,CAAC,CAC5C,CAEA,SAASG,EAAc,EAAG,CACzB,IAAIC,EAAIL,EAAYC,EAAG,QAAQ,EAC/B,OAAmBH,EAAQO,CAAC,GAArB,SAAyBA,EAAIA,EAAI,EACzC,CAEA,SAASC,EAAgB,EAAG,EAAG,EAAG,CACjC,OAAQ,EAAIF,EAAcD,CAAC,KAAM,EAAI,OAAO,eAAe,EAAGA,EAAG,CAChE,MAAOF,EACP,WA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EAAQ,oCAAoC,KAAK,KAAK,KAAK,IAAIxE,EAAa,yBAA0BwE,EAAQ,kCAAkC,CAAC,EACjJA,EAAQ,qBAAqB,KAAK,KAAK,KAAK,IAAIxE,EAAa,wBAAyBwE,EAAQ,mBAAmB,CAAC,EAClHA,EAAQ,qBAAqB,KAAK,KAAK,KAAK,IAAIxE,EAAa,qBAAsBwE,EAAQ,mBAAmB,CAAC,EAC/GA,EAAQ,SAAS,KAAK,KAAK,KAAKmuB,GAA2BnuB,EAAQ,OAAO,CAAC,CAChF,CACD,EAWIsuB,GAAiC,IACjCC,GAAsB,GACtBC,GAAgB,CACnB,MACA,KACA,MACA,MACA,KACA,KACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,KACD,EACIC,GAAoB,CACvB,CACC,MACA,MACA,MACA,MACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,MACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,KACA,KACA,KACA,MACA,KACD,EACA,CACC,IACA,KACA,KACA,KACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,MACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,MACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,MACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,KACA,KACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,MACA,MACA,MACA,KACD,EACA,CACC,MACA,MACA,KACA,KACA,KACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,IACA,KACA,KACA,IACD,EACA,CACC,MACA,MACA,MACA,MACA,KACA,MACA,KACD,EACA,CACC,MACA,MACA,MACA,MACA,MACA,MACA,IACD,EACA,CACC,MACA,MACA,MACA,MACA,IACA,KACA,IACD,EACA,CACC,KACA,KACA,MACA,MACA,KACA,KACA,KACD,CACD,EACIC,GAAgB,GAAU77B,GAAS,GAAK,EAAIA,GAAS,EAAI,MAOzD87B,GAAqB,GAAa,CACrC,IAAMtrB,EAAQurB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