@fnndsc/argus 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Settings-BMJaDptb.js → Settings-CA_Y9_tD.js} +1 -1
- package/dist/assets/{Texture-DMlqpdeR.js → Texture-CiCQeubr.js} +1 -1
- package/dist/assets/__vite-browser-external-D7Ct-6yo.js +1 -0
- package/dist/assets/{addVolumesToViewports-Df-xtrvy.js → addVolumesToViewports-DMbI2RL0.js} +1 -1
- package/dist/assets/asciidoc-CY89DR7y.js +1 -0
- package/dist/assets/cornerstoneEngine-DOq401ca.js +2 -0
- package/dist/assets/documentEngines-DVCBo-Z6.js +1960 -0
- package/dist/assets/field-DLtY8hYm.js +2 -0
- package/dist/assets/index-BQPxeCl8.js +1 -0
- package/dist/assets/{index-B6zltrBv.js → index-BQltAD7K.js} +1 -1
- package/dist/assets/index-BtxxK29d.js +13 -0
- package/dist/assets/{index-M_ElGUhd.js → index-BuNudOlE.js} +245 -245
- package/dist/assets/index-CH0i1dT3.js +1 -0
- package/dist/assets/{index-CumqcIR1.js → index-CPY1fYxX.js} +5 -5
- package/dist/assets/index-CRipsi7X.js +1 -0
- package/dist/assets/{index-CbXrICMA.js → index-CewxfqE7.js} +1 -1
- package/dist/assets/index-D6WqGtsG.js +27876 -0
- package/dist/assets/{index-BlsRHH5_.js → index-D6nj2sGK.js} +2 -2
- package/dist/assets/index-D9307TXO.js +3 -0
- package/dist/assets/{index-DPOsCEOj.js → index-DAPJ1asE.js} +1 -1
- package/dist/assets/index-DBDbe82G.js +1 -0
- package/dist/assets/index-DTiNKN3t.js +1 -0
- package/dist/assets/index-Da39IMz6.css +1 -0
- package/dist/assets/{index-BDdjtqhe.js → index-dGoK1HyL.js} +2 -2
- package/dist/assets/{niivueEngine-CxKW1mDW.js → niivueEngine-GirHHMsU.js} +2 -2
- package/dist/assets/{slabScene-CYO8ilc7.js → slabScene-DZaFF3AA.js} +2 -2
- package/dist/assets/syntax-1x8StFCS.js +15 -0
- package/dist/build.json +1 -1
- package/dist/index.html +2 -2
- package/dist/notes.json +1 -1
- package/package.json +4 -1
- package/dist/assets/cornerstoneEngine-CCys6hXi.js +0 -2
- package/dist/assets/field-Gyij1-2V.js +0 -12
- package/dist/assets/index-B2I3zHKh.js +0 -1
- package/dist/assets/index-CdJijRXE.js +0 -1
- package/dist/assets/index-CgllecgK.js +0 -3
- package/dist/assets/index-DQZiM6Ic.css +0 -1
- package/dist/assets/index-DvIjGJJA.js +0 -13
- package/dist/assets/index-LXTkv5wy.js +0 -1
- package/dist/assets/index-dqYVVnOj.js +0 -1
- package/dist/assets/index-edPOjgBj.js +0 -1
|
@@ -0,0 +1,1960 @@
|
|
|
1
|
+
import{_ as St}from"./index-BuNudOlE.js";function An(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Re=An();function zo(r){Re=r}var ye={exec:()=>null};function je(r){let t=[];return e=>{let i=Math.max(0,Math.min(3,e-1)),s=t[i];return s||(s=r(i),t[i]=s),s}}function P(r,t=""){let e=typeof r=="string"?r:r.source,i={replace:(s,n)=>{let o=typeof n=="string"?n:n.source;return o=o.replace(ut.caret,"$1"),e=e.replace(s,o),i},getRegex:()=>new RegExp(e,t)};return i}var ll=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),ut={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:je(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:je(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:je(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:je(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:je(r=>new RegExp(`^ {0,${r}}(?:</?(?:${_i})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:je(r=>new RegExp(`^ {0,${r}}>`))},cl=/^(?:[ \t]*(?:\n|$))+/,ul=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$i=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,jo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bo=P(jo).replace(/bull/g,vn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),pl=P(jo).replace(/bull/g,vn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,dl=/^[^\n]+/,Tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ml=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gl=P(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,vn).getRegex(),_i="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ln=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bl=P("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ln).replace("tag",_i).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wo=r=>P(Sn).replace("hr",$i).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",_i).getRegex(),$l=Wo(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),_l=Wo(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),yl=P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_l).getRegex(),En={blockquote:yl,code:ul,def:ml,fences:hl,heading:fl,hr:$i,html:bl,lheading:Bo,list:gl,newline:cl,paragraph:$l,table:ye,text:dl},Sr=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$i).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",_i).getRegex(),wl={...En,lheading:pl,table:Sr,paragraph:P(Sn).replace("hr",$i).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Sr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",_i).getRegex()},kl={...En,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ln).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ye,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(Sn).replace("hr",$i).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",Bo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Al=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Uo=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,vl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qt=/[\p{P}\p{S}]/u,Ve=/[\s\p{P}\p{S}]/u,yi=/[^\s\p{P}\p{S}]/u,Sl=P(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ve).getRegex(),Tl=/[\p{Pi}\p{Ps}"']/u,Fo=/(?!~)[\p{P}\p{S}]/u,Ll=/(?!~)[\s\p{P}\p{S}]/u,El=/(?:[^\s\p{P}\p{S}]|~)/u,Rl=P(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ll?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qo=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Il=P(qo,"u").replace(/punct/g,qt).getRegex(),Ol=P(qo,"u").replace(/punct/g,Fo).getRegex(),Cl=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Dl=P(Cl,"u").replace(/openQuote/g,Tl).replace(/punct/g,qt).getRegex(),Ho="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ml=P(Ho,"gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,Ve).replace(/punct/g,qt).getRegex(),Pl=P(Ho,"gu").replace(/notPunctSpace/g,El).replace(/punctSpace/g,Ll).replace(/punct/g,Fo).getRegex(),Nl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",zl=P(Nl,"gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,Ve).replace(/punct/g,qt).getRegex(),jl=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,Ve).replace(/punct/g,qt).getRegex(),Bl="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Wl=P(Bl,"gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,Ve).replace(/punct/g,qt).getRegex(),Ul=P(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,qt).getRegex(),Fl="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ql=P(Fl,"gu").replace(/notPunctSpace/g,yi).replace(/punctSpace/g,Ve).replace(/punct/g,qt).getRegex(),Hl=P(/\\(punct)/,"gu").replace(/punct/g,qt).getRegex(),Vl=P(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,qt).getRegex(),Gl=P(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Yl=P(Ln).replace("(?:-->|$)","-->").getRegex(),Xl=P("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Yl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vo=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Gi=P(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Vo).getRegex(),Ql=P(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Gi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Kl=P(/^!?\[(label)\]\[(ref)\]/).replace("label",Gi).replace("ref",Tn).getRegex(),Zl=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tn).getRegex(),Tr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Jl=P(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Vo).getRegex(),tc=P("reflink|nolink(?!\\()","g").replace("reflink",P(/^!?\[(label)\]\[(ref)\]/).replace("label",Jl).replace("ref",Tr).getRegex()).replace("nolink",P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tr).getRegex()).getRegex(),Lr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ec=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,ic=P(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,ec).getRegex(),Rn={_backpedal:ye,anyPunctuation:Hl,anyPunctuationOutsideCode:Vl,autolink:Gl,blockSkip:Rl,br:Uo,code:Al,del:ye,delLDelim:ye,delRDelim:ye,emStrongLDelim:Il,emStrongRDelimAst:Ml,emStrongRDelimUnd:jl,escape:xl,link:Ql,nolink:Zl,punctuation:Sl,reflink:Kl,reflinkSearch:tc,tag:Xl,text:vl,url:ye},sc={...Rn,emStrongLDelim:Dl,emStrongRDelimAst:zl,emStrongRDelimUnd:Wl,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",Gi).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Gi).getRegex()},nn={...Rn,emStrongRDelimAst:Pl,emStrongLDelim:Ol,delLDelim:Ul,delRDelim:ql,url:P(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",ic).replace("protocol",Lr).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:P(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Lr).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},nc={...nn,br:P(Uo).replace("{2,}","*").getRegex(),text:P(nn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ci={normal:En,gfm:wl,pedantic:kl},Ze={normal:Rn,gfm:nn,breaks:nc,pedantic:sc},rc={"&":"&","<":"<",">":">",'"':""","'":"'"},Er=r=>rc[r];function Tt(r,t){if(t){if(ut.escapeTest.test(r))return r.replace(ut.escapeReplace,Er)}else if(ut.escapeTestNoEncode.test(r))return r.replace(ut.escapeReplaceNoEncode,Er);return r}function oc(r){return ut.numericCharacterReference.test(r)?r.replace(ut.numericCharacterReferenceOrAmpersand,(t,e,i)=>{if(e===void 0&&i===void 0)return"&";let s=e===void 0?Number.parseInt(i,16):Number.parseInt(e,10);return s===0||s>1114111||s>=55296&&s<=57343?"�":s===38?"&":String.fromCodePoint(s)}):r}function Rr(r){try{r=encodeURI(r).replace(ut.percentDecode,"%")}catch{return null}return r}function Ir(r,t){let e=r.replace(ut.findPipe,(n,o,l)=>{let a=!1,c=o;for(;--c>=0&&l[c]==="\\";)a=!a;return a?"|":" |"}),i=e.split(ut.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(ut.slashPipe,"|");return i}function re(r,t,e){let i=r.length;if(i===0)return"";let s=0;for(;s<i&&r.charAt(i-s-1)===t;)s++;return r.slice(0,i-s)}function Or(r){let t=r.split(`
|
|
3
|
+
`),e=t.length-1;for(;e>=0&&ut.blankLine.test(t[e]);)e--;return t.length-e<=2?r:t.slice(0,e+1).join(`
|
|
4
|
+
`)}function Yi(r){return r.trim().toLowerCase().toUpperCase().toLowerCase()}function Cr(r,t){if(r.indexOf(t[0])===-1&&r.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===t[0])e++;else if(r[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1}function Rs(r,t=0){let e=t,i="";for(let s of r)if(s===" "){let n=4-e%4;i+=" ".repeat(n),e+=n}else i+=s,e++;return i}function Dr(r,t,e,i,s){let n=t.href,o=t.title||null,l=r[1].replace(s.other.outputLinkReplace,"$1"),a=r[0].charAt(0)==="!",c=i.state.inLink,u=i.state.linkEmitted,f=i.state.inRawBlock;i.state.inLink=!0,i.state.linkEmitted=!1;let h=i.inlineTokens(l),p=i.state.linkEmitted;if(i.state.linkEmitted=u,i.state.inLink=c,!a){if(p){i.state.inRawBlock=f;return}i.state.linkEmitted=!0}return{type:a?"image":"link",raw:e,href:n,title:o,text:l,tokens:h}}function ac(r,t,e){let i=r.match(e.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
5
|
+
`).map(n=>{let o=n.match(e.other.beginningSpace);if(o===null)return n;let[l]=o;return n.slice(Math.min(l.length,s.length))}).join(`
|
|
6
|
+
`)}function Mr(r,t,e,i){if(!t.includes("<"))return!1;for(let s=0;s<t.length;s++){if(t[s]==="\\"){s++;continue}if(t[s]==="`"){let l=i.inline.code.exec(t.slice(s));if(l){s+=l[0].length-1;continue}}if(t[s]!=="<")continue;let n=r.slice(e+s),o=i.inline.tag.exec(n)||i.inline.autolink.exec(n);if(o){if(o[0].length>t.length-s)return!0;s+=o[0].length-1}}return!1}var Xi=class{options;rules;lexer;constructor(r){this.options=r||Re}space(r){let t=this.rules.block.newline.exec(r);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(r){let t=this.rules.block.code.exec(r);if(t){let e=this.options.pedantic?t[0]:Or(t[0]),i=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:i}}}fences(r){let t=this.rules.block.fences.exec(r);if(t){let e=t[0],i=ac(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(r){let t=this.rules.block.heading.exec(r);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let i=re(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceTabChar.test(i))&&(e=i.trim())}return{type:"heading",raw:re(t[0],`
|
|
7
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(r){let t=this.rules.block.hr.exec(r);if(t)return{type:"hr",raw:re(t[0],`
|
|
8
|
+
`)}}blockquote(r){let t=this.rules.block.blockquote.exec(r);if(t){let e=re(t[0],`
|
|
9
|
+
`).split(`
|
|
10
|
+
`),i="",s="",n=[];for(;e.length>0;){let o=!1,l=[],a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))l.push(e[a]),o=!0;else if(!o)l.push(e[a]);else break;e=e.slice(a);let c=l.join(`
|
|
11
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
12
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
13
|
+
${c}`:c,s=s?`${s}
|
|
14
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=f,e.length===0)break;let h=n.at(-1);if(h?.type==="code"||h?.type==="heading"||h?.type==="hr"||h?.type==="html")break;if(h?.type==="blockquote"){let p=h,d=e.join(`
|
|
15
|
+
`),m=p.raw+`
|
|
16
|
+
`+d.replace(this.rules.other.blockquoteSetextReplace2,""),b=this.blockquote(m);n[n.length-1]=b;let _=m.substring(b.raw.length).replace(/^\n/,""),$=_?_.split(`
|
|
17
|
+
`).length:0,E=$?e.slice(0,-$):e;E.length>0&&(i=`${i}
|
|
18
|
+
${E.join(`
|
|
19
|
+
`)}`),s=s.substring(0,s.length-p.text.length)+b.text;break}else if(h?.type==="list"){let p=h,d=p.raw+`
|
|
20
|
+
`+e.join(`
|
|
21
|
+
`),m=this.list(d);n[n.length-1]=m,i=i.substring(0,i.length-h.raw.length)+m.raw,s=s.substring(0,s.length-p.raw.length)+m.raw,e=d.substring(n.at(-1).raw.length).split(`
|
|
22
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:n,text:s}}}list(r){let t=this.rules.block.list.exec(r);if(t){let e=r,i=()=>e.length-r.length,s=t[1].trim(),n=s.length>1,o={type:"list",raw:"",ordered:n,start:n?+s.slice(0,-1):"",loose:!1,items:[]};s=n?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=n?s:"[*+-]");let l=this.rules.other.listItemRegex(s),a=!1;for(;r;){let u=!1,f="";if(!(t=l.exec(r))||this.rules.block.hr.test(r))break;let h=i();r=r.substring(t[0].length);let p=t[2].split(`
|
|
23
|
+
`,1)[0],d=t[1].length,m=this.options.pedantic?Rs(p,d):p.replace(this.rules.other.leadingSpaceTab,k=>Rs(k,d)),b=r.split(`
|
|
24
|
+
`,1)[0],_=!m.trim(),$=0;if(this.options.pedantic?($=2,f=m.trimStart()):_?$=d+1:($=m.search(this.rules.other.nonSpaceChar),$=$>4?1:$,f=m.slice($),$+=d),_&&this.rules.other.blankLine.test(b)&&(r=r.substring(b.length+1),u=!0),!u){let k=this.rules.other.nextBulletRegex($),v=this.rules.other.hrRegex($),L=this.rules.other.fencesBeginRegex($),R=this.rules.other.headingBeginRegex($),I=this.rules.other.htmlBeginRegex($),C=this.rules.other.blockquoteBeginRegex($);for(;r;){let W=r.split(`
|
|
25
|
+
`,1)[0],D;if(b=W,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),D=b):D=b.replace(this.rules.other.leadingSpaceTab,F=>Rs(F)),L.test(b)||R.test(b)||I.test(b)||C.test(b)||k.test(b)||v.test(b))break;if(D.search(this.rules.other.nonSpaceChar)>=$||!b.trim())f+=`
|
|
26
|
+
`+D.slice($);else{if(_||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(m)||R.test(m)||v.test(m))break;f+=`
|
|
27
|
+
`+b}_=!b.trim(),r=r.substring(W.length+1),m=D.slice($)}}let E=e.slice(h,i());o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(E)&&(a=!0)),o.items.push({type:"list_item",raw:E,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]})}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=e.slice(0,i()).trimEnd();for(let u of o.items)if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),!o.loose){let f=u.tokens.filter(p=>p.type==="space"),h=f.length>0&&f.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=h}for(let u of o.items){let f=u.tokens[0];if(u.task&&(f?.type==="text"||f?.type==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let h=this.rules.other.listTaskCheckbox.exec(u.raw);if(h){let p={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};u.checked=p.checked,o.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=p.raw+u.tokens[0].raw,u.tokens[0].text=p.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(p)):u.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):u.tokens.unshift(p)}}else u.task&&(u.task=!1)}if(o.loose)for(let u of o.items){u.loose=!0;for(let f of u.tokens)f.type==="text"&&(f.type="paragraph")}return o}}html(r){let t=this.rules.block.html.exec(r);if(t){let e=Or(t[0]);return{type:"html",block:!0,raw:e,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:e}}}def(r){let t=this.rules.block.def.exec(r);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&Cr(t[2],"()")!==-1)return;let e=Yi(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:re(t[0],`
|
|
28
|
+
`),href:i,title:s}}}table(r){let t=this.rules.block.table.exec(r);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=Ir(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
29
|
+
`):[],n={type:"table",raw:re(t[0],`
|
|
30
|
+
`),header:[],align:[],rows:[]};if(e.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<e.length;o++)n.header.push({text:e[o],tokens:this.lexer.inline(e[o]),header:!0,align:n.align[o]});for(let o of s)n.rows.push(Ir(o,n.header.length).map((l,a)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:n.align[a]})));return n}}lheading(r){let t=this.rules.block.lheading.exec(r);if(t){let e=t[1].trim();return{type:"heading",raw:re(t[0],`
|
|
31
|
+
`),depth:t[2].charAt(0)==="="?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(r){let t=this.rules.block.paragraph.exec(r);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
32
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(r){let t=this.rules.block.text.exec(r);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(r){let t=this.rules.inline.escape.exec(r);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(r){let t=this.rules.inline.tag.exec(r);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(r);if(t){let e=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Mr(r,t[1],e,this.rules))return;let i=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=re(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Cr(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],n="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],n=o[3])}else n=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Dr(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(r,t){let e;if((e=this.rules.inline.reflink.exec(r))||(e=this.rules.inline.nolink.exec(r))){let i=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Mr(r,e[1],i,this.rules))return;let s=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[Yi(s)];if(!n){let o=e[0].charAt(0);return{type:"text",raw:o,text:o}}return Dr(e,n,e[0],this.lexer,this.rules)}}emStrong(r,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(r);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!e||this.rules.inline.punctuation.exec(e))){let s=[...i[0]].length-1,n,o,l=s,a=0,c=i[0][0],u=e===c,f=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*r.length+s);(i=f.exec(t))!==null;){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(o=[...n].length,i[3]||i[4]){l+=o;continue}else if(i[5]||i[6]){if(s%3&&!((s+o)%3)){a+=o;continue}if(u)break}if(l-=o,l>0)continue;o=Math.min(o,o+l+a);let h=[...i[0]][0].length,p=r.slice(0,s+i.index+h+o);if(Math.min(s,o)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){let t=this.rules.inline.code.exec(r);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(r){let t=this.rules.inline.br.exec(r);if(t)return{type:"br",raw:t[0]}}del(r,t,e=""){let i=this.rules.inline.delLDelim.exec(r);if(i&&(!i[1]||!e||this.rules.inline.punctuation.exec(e))){let s=[...i[0]].length-1,n,o,l=s,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*r.length+s);(i=a.exec(t))!==null;){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n||(o=[...n].length,o!==s))continue;if(i[3]||i[4]){l+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l);let c=[...i[0]][0].length,u=r.slice(0,s+i.index+c+o),f=u.slice(s,-s);return{type:"del",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(r){let t=this.rules.inline.autolink.exec(r);if(t){let e,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,autolink:!0,tokens:[{type:"text",raw:e,text:e}]}}}url(r){let t;if(t=this.rules.inline.url.exec(r)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:e,href:i,autolink:!0,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(r){let t=this.rules.inline.text.exec(r);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:e?t[0]:oc(t[0]),escaped:e}}}},Pt=class rn{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Re,this.options.tokenizer=this.options.tokenizer||new Xi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let e={other:ut,block:Ci.normal,inline:Ze.normal};this.options.pedantic?(e.block=Ci.pedantic,e.inline=Ze.pedantic):this.options.gfm&&(e.block=Ci.gfm,this.options.breaks?e.inline=Ze.breaks:e.inline=Ze.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ci,inline:Ze}}static lex(t,e){return new rn(e).lex(t)}static lexInline(t,e){return new rn(e).inlineTokens(t)}lex(t){t=t.replace(ut.carriageReturn,`
|
|
33
|
+
`),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(ut.tabCharGlobal," ").replace(ut.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(l=>(n=l.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let l=e.at(-1);n.raw.length===1&&l!==void 0?l.raw+=`
|
|
34
|
+
`:e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let l=e.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
35
|
+
`)?"":`
|
|
36
|
+
`)+n.raw,l.text+=`
|
|
37
|
+
`+n.text,this.inlineQueue.at(-1).src=l.text):e.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let l=e.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
38
|
+
`)?"":`
|
|
39
|
+
`)+n.raw,l.text+=`
|
|
40
|
+
`+n.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},e.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),e.push(n);continue}let o=t;if(this.options.extensions?.startBlock){let l=1/0,a=t.slice(1),c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},a),typeof c=="number"&&c>=0&&(l=Math.min(l,c))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){let l=e.at(-1);i&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
41
|
+
`)?"":`
|
|
42
|
+
`)+n.raw,l.text+=`
|
|
43
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):e.push(n),i=o.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let l=e.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
44
|
+
`)?"":`
|
|
45
|
+
`)+n.raw,l.text+=`
|
|
46
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):e.push(n);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}linkInText(t){if(!t.includes("["))return!1;let e=this.tokenizer.rules.inline.link;for(let i of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(e.test(i[0])&&t.charAt(i.index-1)!=="!")return!0;for(let i of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let s=i[0],n=s.lastIndexOf("[");if(!(s.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Yi(s.slice(n+1,-1))))&&!(n>1&&this.linkInText(s.slice(1,n-1))))return!0}return!1}inlineTokens(t,e=[]){this.tokenizer.lexer=this;let i=this.state.linkParenPossible;this.state.linkParenPossible=i&&t.includes(")");try{return this.#t(t,e)}finally{this.state.linkParenPossible=i}}#t(t,e){let i=t;if(this.tokens.links&&t.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,a=c=>{let u=c.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Yi(c.slice(u+1,-1))))return c;if(u>1&&c.charAt(0)!=="!"){let f=c.slice(1,u-1);if(this.linkInText(f))return"["+f.replace(l,a)+"]["+"a".repeat(c.length-u-2)+"]"}return"["+"a".repeat(c.length-2)+"]"};i=i.replace(l,a)}i=i.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(l,a,c)=>c?"+".repeat(l.length):a?a+l.slice(a.length,-a.length).replace(/`/g,"+")+a:l),i=i.replace(this.tokenizer.rules.inline.blockSkip,(l,a,c)=>{let u=c?c.length:0;return l.slice(0,u)+"["+"a".repeat(l.length-u-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,n="",o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}s||(n=""),s=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},t,e))?(t=t.substring(l.raw.length),e.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let c=e.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):e.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.del(t,i,n)){t=t.substring(l.raw.length),e.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),e.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),e.push(l);continue}let a=t;if(this.options.extensions?.startInline){let c=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(a=t.substring(0,c+1))}if(l=this.tokenizer.inlineText(a)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),s=!0;let c=e.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):e.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return e}infiniteLoopError(t){let e="Infinite loop on byte: "+t;if(this.options.silent)console.error(e);else throw new Error(e)}},Qi=class{options;parser;constructor(r){this.options=r||Re}space(r){return""}code({text:r,lang:t,escaped:e}){let i=(t||"").match(ut.notSpaceStart)?.[0],s=r?r.replace(ut.endingNewline,"")+`
|
|
47
|
+
`:"";return i?'<pre><code class="language-'+Tt(i)+'">'+(e?s:Tt(s,!0))+`</code></pre>
|
|
48
|
+
`:"<pre><code>"+(e?s:Tt(s,!0))+`</code></pre>
|
|
49
|
+
`}blockquote({tokens:r}){return`<blockquote>
|
|
50
|
+
${this.parser.parse(r)}</blockquote>
|
|
51
|
+
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:t}){return`<h${t}>${this.parser.parseInline(r)}</h${t}>
|
|
52
|
+
`}hr(r){return`<hr>
|
|
53
|
+
`}list(r){let t=r.ordered,e=r.start,i="";for(let o=0;o<r.items.length;o++){let l=r.items[o];i+=this.listitem(l)}let s=t?"ol":"ul",n=t&&e!==1?' start="'+e+'"':"";return"<"+s+n+`>
|
|
54
|
+
`+i+"</"+s+`>
|
|
55
|
+
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
56
|
+
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
57
|
+
`}table(r){let t="",e="";for(let s=0;s<r.header.length;s++)e+=this.tablecell(r.header[s]);t+=this.tablerow({text:e});let i="";for(let s=0;s<r.rows.length;s++){let n=r.rows[s];e="";for(let o=0;o<n.length;o++)e+=this.tablecell(n[o]);i+=this.tablerow({text:e})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
58
|
+
<thead>
|
|
59
|
+
`+t+`</thead>
|
|
60
|
+
`+i+`</table>
|
|
61
|
+
`}tablerow({text:r}){return`<tr>
|
|
62
|
+
${r}</tr>
|
|
63
|
+
`}tablecell(r){let t=this.parser.parseInline(r.tokens),e=r.header?"th":"td";return(r.align?`<${e} align="${r.align}">`:`<${e}>`)+t+`</${e}>
|
|
64
|
+
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Tt(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:t,text:e,tokens:i,autolink:s}){let n=s?Tt(e,!0):this.parser.parseInline(i),o=Rr(r);if(o===null)return n;r=Tt(o,s);let l='<a href="'+r+'"';return t&&(l+=' title="'+Tt(t)+'"'),l+=">"+n+"</a>",l}image({href:r,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let s=Rr(r);if(s===null)return Tt(e);r=s;let n=`<img src="${Tt(r)}" alt="${Tt(e)}"`;return t&&(n+=` title="${Tt(t)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:Tt(r.text)}},In=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},Nt=class on{options;renderer;textRenderer;constructor(t){this.options=t||Re,this.options.renderer=this.options.renderer||new Qi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new In}static parse(t,e){return new on(e).parse(t)}static parseInline(t,e){return new on(e).parseInline(t)}parse(t){this.renderer.parser=this;let e="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let o=s,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){e+=l||"";continue}}let n=s;switch(n.type){case"space":{e+=this.renderer.space(n);break}case"hr":{e+=this.renderer.hr(n);break}case"heading":{e+=this.renderer.heading(n);break}case"code":{e+=this.renderer.code(n);break}case"table":{e+=this.renderer.table(n);break}case"blockquote":{e+=this.renderer.blockquote(n);break}case"list":{e+=this.renderer.list(n);break}case"checkbox":{e+=this.renderer.checkbox(n);break}case"html":{e+=this.renderer.html(n);break}case"def":{e+=this.renderer.def(n);break}case"paragraph":{e+=this.renderer.paragraph(n);break}case"text":{e+=this.renderer.text(n);break}default:{let o='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return e}parseInline(t,e=this.renderer){this.renderer.parser=this;let i="";for(let s=0;s<t.length;s++){let n=t[s];if(this.options.extensions?.renderers?.[n.type]){let l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){i+=l||"";continue}}let o=n;switch(o.type){case"escape":{i+=e.text(o);break}case"html":{i+=e.html(o);break}case"link":{i+=e.link(o);break}case"image":{i+=e.image(o);break}case"checkbox":{i+=e.checkbox(o);break}case"strong":{i+=e.strong(o);break}case"em":{i+=e.em(o);break}case"codespan":{i+=e.codespan(o);break}case"br":{i+=e.br(o);break}case"del":{i+=e.del(o);break}case"text":{i+=e.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},li=class{options;block;constructor(r){this.options=r||Re}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?Pt.lex:Pt.lexInline}provideParser(r=this.block){return r?Nt.parse:Nt.parseInline}};function de(r,t){if(Array.isArray(t))for(let e=0;e<t.length;e++)r.push(t[e]);else r.push(t)}var lc=class{defaults=An();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Nt;Renderer=Qi;TextRenderer=In;Lexer=Pt;Tokenizer=Xi;Hooks=li;constructor(...r){this.use(...r)}walkTokens(r,t){let e=[];for(let i of r)switch(de(e,t.call(this,i)),i.type){case"table":{let s=i;for(let n of s.header)de(e,this.walkTokens(n.tokens,t));for(let n of s.rows)for(let o of n)de(e,this.walkTokens(o.tokens,t));break}case"list":{let s=i;de(e,this.walkTokens(s.items,t));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(n=>{let o=s[n].flat(1/0);de(e,this.walkTokens(o,t))}):s.tokens&&de(e,this.walkTokens(s.tokens,t))}}return e}use(...r){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(e=>{let i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let n=t.renderers[s.name];n?t.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=t[s.level];n?n.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),i.extensions=t),e.renderer){let s=this.defaults.renderer||new Qi(this.defaults);for(let n in e.renderer){if(!(n in s))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=e.renderer[o],a=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=a.apply(s,c)),u||""}}i.renderer=s}if(e.tokenizer){let s=this.defaults.tokenizer||new Xi(this.defaults);for(let n in e.tokenizer){if(!(n in s))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=e.tokenizer[o],a=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=a.apply(s,c)),u}}i.tokenizer=s}if(e.hooks){let s=this.defaults.hooks||new li;for(let n in e.hooks){if(!(n in s))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=e.hooks[o],a=s[o];li.passThroughHooks.has(n)?s[o]=c=>{if(this.defaults.async&&li.passThroughHooksRespectAsync.has(n))return(async()=>{let f=await l.call(s,c);return a.call(s,f)})();let u=l.call(s,c);return a.call(s,u)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,c);return f===!1&&(f=await a.apply(s,c)),f})();let u=l.apply(s,c);return u===!1&&(u=a.apply(s,c)),u}}i.hooks=s}if(e.walkTokens){let s=this.defaults.walkTokens,n=e.walkTokens;i.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),s&&de(l,s.call(this,o)),l}}this.defaults={...this.defaults,...i}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,t){return Pt.lex(r,t??this.defaults)}parser(r,t){return Nt.parse(r,t??this.defaults)}parseMarkdown(r){return(t,e)=>{let i={...e},s={...this.defaults,...i},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=r),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(t):t,l=await(s.hooks?await s.hooks.provideLexer(r):r?Pt.lex:Pt.lexInline)(o,s),a=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(a,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(r):r?Nt.parse:Nt.parseInline)(a,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(t=s.hooks.preprocess(t));let o=(s.hooks?s.hooks.provideLexer(r):r?Pt.lex:Pt.lexInline)(t,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser(r):r?Nt.parse:Nt.parseInline)(o,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(o){return n(o)}}}onError(r,t){return e=>{if(e.message+=`
|
|
65
|
+
Please report this to https://github.com/markedjs/marked.`,r){let i="<p>An error occurred:</p><pre>"+Tt(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},Se=new lc;function V(r,t){return Se.parse(r,t)}V.options=V.setOptions=function(r){return Se.setOptions(r),V.defaults=Se.defaults,zo(V.defaults),V};V.getDefaults=An;V.defaults=Re;function cc(...r){return Se.use(...r),V.defaults=Se.defaults,zo(V.defaults),V}V.use=cc;V.walkTokens=function(r,t){return Se.walkTokens(r,t)};V.parseInline=Se.parseInline;V.Parser=Nt;V.parser=Nt.parse;V.Renderer=Qi;V.TextRenderer=In;V.Lexer=Pt;V.lexer=Pt.lex;V.Tokenizer=Xi;V.Hooks=li;V.parse=V;V.options;V.setOptions;V.walkTokens;V.parseInline;Nt.parse;Pt.lex;function Pr(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,i=Array(t);e<t;e++)i[e]=r[e];return i}function uc(r){if(Array.isArray(r))return r}function hc(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var i,s,n,o,l=[],a=!0,c=!1;try{if(n=(e=e.call(r)).next,t!==0)for(;!(a=(i=n.call(e)).done)&&(l.push(i.value),l.length!==t);a=!0);}catch(u){c=!0,s=u}finally{try{if(!a&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(c)throw s}}return l}}function fc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pc(r,t){return uc(r)||hc(r,t)||dc(r,t)||fc()}function dc(r,t){if(r){if(typeof r=="string")return Pr(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Pr(r,t):void 0}}const Go=Object.entries,Nr=Object.setPrototypeOf,mc=Object.isFrozen,Yo=Object.getPrototypeOf,Xo=Object.getOwnPropertyDescriptor;let ht=Object.freeze,dt=Object.seal,We=Object.create,Qo=typeof Reflect<"u"&&Reflect,an=Qo.apply,ln=Qo.construct;ht||(ht=function(t){return t});dt||(dt=function(t){return t});an||(an=function(t,e){for(var i=arguments.length,s=new Array(i>2?i-2:0),n=2;n<i;n++)s[n-2]=arguments[n];return t.apply(e,s)});ln||(ln=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return new t(...i)});const Gt=Q(Array.prototype.forEach),gc=Q(Array.prototype.lastIndexOf),zr=Q(Array.prototype.pop),Je=Q(Array.prototype.push),bc=Q(Array.prototype.slice),$c=Q(Array.prototype.splice),He=Array.isArray,Is=Ko(Set),Os=Q(Set.prototype.add),ti=Q(Set.prototype.has),_e=Q(String.prototype.toLowerCase),Cs=Q(String.prototype.toString),jr=Q(String.prototype.match),ei=Q(String.prototype.replace),Br=Q(String.prototype.indexOf),_c=Q(String.prototype.trim),yc=Q(Number.prototype.toString),wc=Q(Boolean.prototype.toString),Wr=typeof BigInt>"u"?null:Q(BigInt.prototype.toString),Ur=typeof Symbol>"u"?null:Q(Symbol.prototype.toString),At=Q(Object.prototype.hasOwnProperty),ii=Q(Object.prototype.toString),pt=Q(RegExp.prototype.test),Yt=Ko(TypeError);function Q(r){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return an(r,t,i)}}function Ko(r){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return ln(r,e)}}function U(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_e;if(Nr&&Nr(r,null),!He(t))return r;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const n=e(s);n!==s&&(mc(t)||(t[i]=n),s=n)}r[s]=!0}return r}function kc(r){for(let t=0;t<r.length;t++)At(r,t)||(r[t]=null);return r}function Lt(r){const t=We(null);for(const i of Go(r)){var e=pc(i,2);const s=e[0],n=e[1];At(r,s)&&(He(n)?t[s]=kc(n):n&&typeof n=="object"&&n.constructor===Object?t[s]=Lt(n):t[s]=n)}return t}function xc(r){switch(typeof r){case"string":return r;case"number":return yc(r);case"boolean":return wc(r);case"bigint":return Wr?Wr(r):"0";case"symbol":return Ur?Ur(r):"Symbol()";case"undefined":return ii(r);case"function":case"object":{if(r===null)return ii(r);const t=r,e=It(t,"toString");if(typeof e=="function"){const i=e(t);return typeof i=="string"?i:ii(i)}return ii(r)}default:return ii(r)}}function It(r,t){for(;r!==null;){const i=Xo(r,t);if(i){if(i.get)return Q(i.get);if(typeof i.value=="function")return Q(i.value)}r=Yo(r)}function e(){return null}return e}function Ac(r,t){for(;r!==null;){const e=Xo(r,t);if(e)return e.get?Q(e.get):null;r=Yo(r)}return null}function vc(r){try{return pt(r,""),!0}catch{return!1}}const Fr=ht(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ds=ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ms=ht(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sc=ht(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ps=ht(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Tc=ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qr=ht(["#text"]),Hr=ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ns=ht(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Vr=ht(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Di=ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Lc=dt(/{{[\w\W]*|^[\w\W]*}}/g),Ec=dt(/<%[\w\W]*|^[\w\W]*%>/g),Rc=dt(/\${[\w\W]*/g),Ic=dt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Oc=dt(/^aria-[\-\w]+$/),Gr=dt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Cc=dt(/^(?:\w+script|data):/i),Dc=dt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mc=dt(/^html$/i),Pc=dt(/^[a-z][.\w]*(-[.\w]+)+$/i),zs=dt(/<[/\w!]/g),Yr=dt(/<[/\w]/g),Nc=dt(/<\/no(script|embed|frames)/i),Xr=dt(/\/>/i),st={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},zc=ht(U({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),jc=function(){return typeof window>"u"?null:window},Bc=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(i=e.getAttribute(s));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},Qr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},oe=function(t,e,i,s){return At(t,e)&&He(t[e])?U(s.base?Lt(s.base):{},t[e],s.transform):i},js=function(t,e,i){const s=At(t,e)?t[e]:void 0;return s&&typeof s=="object"?Lt(s):i()};function Zo(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jc();const t=T=>Zo(T);if(t.version="3.4.17",t.removed=[],!r||!r.document||r.document.nodeType!==st.document||!r.Element)return t.isSupported=!1,t;let e=r.document;const i=e,s=i.currentScript;r.DocumentFragment;const n=r.HTMLTemplateElement,o=r.Node,l=r.Element,a=r.NodeFilter;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const c=r.DOMParser,u=r.trustedTypes,f=l.prototype,h=It(f,"cloneNode"),p=It(f,"remove"),d=It(f,"removeAttributeNode"),m=It(f,"nextSibling"),b=It(f,"childNodes"),_=It(f,"parentNode"),$=It(f,"shadowRoot"),E=It(f,"attributes"),k=o&&o.prototype?It(o.prototype,"nodeType"):null,v=o&&o.prototype?It(o.prototype,"nodeName"):null,L=o&&o.prototype?It(o.prototype,"ownerDocument"):null,R=function(g){return k?k(g):g.nodeType},I=function(g){return v?v(g):g.nodeName},C=Ac(f,"namespaceURI"),W=function(g){return C?C(g):g.namespaceURI};if(typeof n=="function"){const T=e.createElement("template");T.content&&T.content.ownerDocument&&(e=T.content.ownerDocument)}let D,F="",yt,it=!1,Et=0;const Ht=function(){if(Et>0)throw Yt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},jt=function(g){Ht(),Et++;try{return D.createHTML(g)}finally{Et--}},Ra=function(g){Ht(),Et++;try{return D.createScriptURL(g)}finally{Et--}},Ia=function(){return it||(yt=Bc(u,s),it=!0),yt},xi=e,as=xi.implementation,Qn=xi.createNodeIterator,Oa=xi.createDocumentFragment,Ca=xi.getElementsByTagName,Da=i.importNode;let G=Qr();t.isSupported=typeof Go=="function"&&typeof _=="function"&&as&&as.createHTMLDocument!==void 0;const Ma=Lc,Pa=Ec,Na=Rc,za=Ic,ja=Oc,Ba=Cc,Kn=Dc,Wa=Pc;let Zn=Gr,Y=null;const ls=U({},[...Fr,...Ds,...Ms,...Ps,...qr]);let X=null;const cs=U({},[...Hr,...Ns,...Vr,...Di]);let Bt=Object.seal(We(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ye=null,Jn=null;const ie=Object.seal(We(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let tr=!0,us=!0,er=!1,hs=!0,Vt=!1,ue=!0,he=!1,fs=!1,Ai=null,vi=null,ps=!1,Oe=!1,Si=!1,Ti=!1,ir=!0,sr=!1;const nr="user-content-";let ds=!0,ms=!1,fe=null,Ce={},pe=null;const rr=U({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let or=null;const ar=U({},["audio","video","img","source","image","track"]);let lr=null;const cr=U({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Li="http://www.w3.org/1998/Math/MathML",Ei="http://www.w3.org/2000/svg",Wt="http://www.w3.org/1999/xhtml";let De=Wt,gs=!1,bs=null;const Ua=U({},[Li,Ei,Wt],Cs),ur=ht(["mi","mo","mn","ms","mtext"]);let $s=U({},ur);const hr=ht(["annotation-xml"]);let _s=U({},hr);const Fa=U({},["title","style","font","a","script"]);let Xe=null;const qa=["application/xhtml+xml","text/html"],Ha="text/html";let tt=null,Me=null;const Va=e.createElement("form"),fr=function(g){return g instanceof RegExp||g instanceof Function},ys=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Me&&Me===g)return;(!g||typeof g!="object")&&(g={}),g=Lt(g),Xe=qa.indexOf(g.PARSER_MEDIA_TYPE)===-1?Ha:g.PARSER_MEDIA_TYPE,tt=Xe==="application/xhtml+xml"?Cs:_e,Y=oe(g,"ALLOWED_TAGS",ls,{transform:tt}),X=oe(g,"ALLOWED_ATTR",cs,{transform:tt}),bs=oe(g,"ALLOWED_NAMESPACES",Ua,{transform:Cs}),lr=oe(g,"ADD_URI_SAFE_ATTR",cr,{transform:tt,base:cr}),or=oe(g,"ADD_DATA_URI_TAGS",ar,{transform:tt,base:ar}),pe=oe(g,"FORBID_CONTENTS",rr,{transform:tt}),Ye=oe(g,"FORBID_TAGS",Lt({}),{transform:tt}),Jn=oe(g,"FORBID_ATTR",Lt({}),{transform:tt}),Ce=At(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?Lt(g.USE_PROFILES):g.USE_PROFILES:!1,tr=g.ALLOW_ARIA_ATTR!==!1,us=g.ALLOW_DATA_ATTR!==!1,er=g.ALLOW_UNKNOWN_PROTOCOLS||!1,hs=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Vt=g.SAFE_FOR_TEMPLATES||!1,ue=g.SAFE_FOR_XML!==!1,he=g.WHOLE_DOCUMENT||!1,Oe=g.RETURN_DOM||!1,Si=g.RETURN_DOM_FRAGMENT||!1,Ti=g.RETURN_TRUSTED_TYPE||!1,ps=g.FORCE_BODY||!1,ir=g.SANITIZE_DOM!==!1,sr=g.SANITIZE_NAMED_PROPS||!1,ds=g.KEEP_CONTENT!==!1,ms=g.IN_PLACE||!1,Zn=vc(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Gr,De=typeof g.NAMESPACE=="string"?g.NAMESPACE:Wt,$s=js(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>U({},ur)),_s=js(g,"HTML_INTEGRATION_POINTS",()=>U({},hr));const y=js(g,"CUSTOM_ELEMENT_HANDLING",()=>We(null));if(Bt=We(null),At(y,"tagNameCheck")&&fr(y.tagNameCheck)&&(Bt.tagNameCheck=y.tagNameCheck),At(y,"attributeNameCheck")&&fr(y.attributeNameCheck)&&(Bt.attributeNameCheck=y.attributeNameCheck),At(y,"allowCustomizedBuiltInElements")&&typeof y.allowCustomizedBuiltInElements=="boolean"&&(Bt.allowCustomizedBuiltInElements=y.allowCustomizedBuiltInElements),dt(Bt),Vt&&(us=!1),Si&&(Oe=!0),Ce&&(Y=U({},qr),X=We(null),Ce.html===!0&&(U(Y,Fr),U(X,Hr)),Ce.svg===!0&&(U(Y,Ds),U(X,Ns),U(X,Di)),Ce.svgFilters===!0&&(U(Y,Ms),U(X,Ns),U(X,Di)),Ce.mathMl===!0&&(U(Y,Ps),U(X,Vr),U(X,Di))),ie.tagCheck=null,ie.attributeCheck=null,At(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?ie.tagCheck=g.ADD_TAGS:He(g.ADD_TAGS)&&(Y===ls&&(Y=Lt(Y)),U(Y,g.ADD_TAGS,tt))),At(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?ie.attributeCheck=g.ADD_ATTR:He(g.ADD_ATTR)&&(X===cs&&(X=Lt(X)),U(X,g.ADD_ATTR,tt))),At(g,"ADD_FORBID_CONTENTS")&&He(g.ADD_FORBID_CONTENTS)&&(pe===rr&&(pe=Lt(pe)),U(pe,g.ADD_FORBID_CONTENTS,tt)),ds&&(Y["#text"]=!0),he&&U(Y,["html","head","body"]),Y.table&&(U(Y,["tbody"]),delete Ye.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const x=D;D=g.TRUSTED_TYPES_POLICY;try{F=jt("")}catch(A){throw D=x,A}}else g.TRUSTED_TYPES_POLICY===null?(D=void 0,F=""):(D===void 0&&(D=Ia()),D&&typeof F=="string"&&(F=jt("")));ht&&ht(g),Me=g},pr=U({},[...Ds,...Ms,...Sc]),dr=U({},[...Ps,...Tc]),Ga=function(g,y,x){return y.namespaceURI===Wt?g==="svg":y.namespaceURI===Li?g==="svg"&&(x==="annotation-xml"||$s[x]):!!pr[g]},Ya=function(g,y,x){return y.namespaceURI===Wt?g==="math":y.namespaceURI===Ei?g==="math"&&_s[x]:!!dr[g]},Xa=function(g,y,x){return y.namespaceURI===Ei&&!_s[x]||y.namespaceURI===Li&&!$s[x]?!1:!dr[g]&&(Fa[g]||!pr[g])},Qa=function(g){const y=W(g),x=_e(I(g)),A=_(g);let O,M;return A&&R(A)===st.element?(O={namespaceURI:W(A)},M=_e(I(A))):(O={namespaceURI:De},M="template"),bs[y]?y===Ei?Ga(x,O,M):y===Li?Ya(x,O,M):y===Wt?Xa(x,O,M):!!(Xe==="application/xhtml+xml"&&bs[y]):!1},se=function(g){Je(t.removed,{element:g});try{_(g).removeChild(g)}catch{if(p(g),!_(g))throw Yt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mr=function(g,y,x){try{d(g,y)}catch{try{g.removeAttribute(x)}catch{}}},ws=function(g){xs(g);const y=b(g);y&&Gt(bc(y),A=>{try{p(A)}catch{}});const x=R(g)===st.element?E(g):null;if(x)for(let A=x.length-1;A>=0;--A){const O=x[A],M=O&&O.name;typeof M=="string"&&mr(g,O,M)}},Pe=function(g,y,x){if(!x)try{x=y.getAttributeNode(g)}catch{x=null}Je(t.removed,{attribute:x||null,from:y});try{x?d(y,x):y.removeAttribute(g)}catch{try{y.removeAttribute(g)}catch{}}if(g==="is")if(Oe||Si)try{se(y)}catch{}else try{y.setAttribute(g,"")}catch{}},gr=function(g){const y=E(g);if(y)for(let x=y.length-1;x>=0;--x){const A=y[x],O=A&&A.name;typeof O!="string"||X[tt(O)]||mr(g,A,O)}},ks=function(g,y){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const A=[g];for(;A.length>0;){const O=A.pop();if(y(O)===!1)continue;if(x&&R(O)===st.element){const z=$(O);ne(z)&&A.push(z)}const M=b(O);if(M)for(let z=M.length-1;z>=0;--z)A.push(M[z])}},xs=function(g){ks(g,y=>{R(y)===st.element&&gr(y)})},As=function(g){const y=[];return ks(g,x=>{y.push(x)},!0),y},Ka=function(g,y){const x=Is();Gt(As(g),A=>{R(A)===st.element&&Os(x,A)}),Gt(y,A=>{R(A)===st.element&&!ti(x,A)&&gr(A)})},br=function(g,y){let x=!1;return Gt(t.removed,A=>{A.element&&(x=x||A.element===g,xs(A.element))}),Ka(g,y),x},Za=8,Ja=function(g,y){const x=fe;let A=null;const O=()=>(A||(A=Is(),Gt(y,M=>{Os(A,M)})),A);for(let M=0;;M++){const z=As(g),lt=[g];let Ut=!1;if(Gt(z,bt=>{R(bt)===st.documentFragment?Je(lt,bt):!Ut&&!ti(x,bt)&&(Ut=ti(O(),bt))}),!Ut)return;if(M>=Za)throw Yt("the tree kept changing during in-place sanitization; refusing to return it");Gt(lt,(bt,wt)=>{tl(bt,wt>0,g,O())})}},tl=function(g,y,x,A){const O=vs(g);let M;for(;M=O.nextNode();)!ti(A,M)||ti(fe,M)||(y&&Dt(G.uponSanitizeShadowNode,M,null),Ts(M,x),Ls(M,x),ne(M.content)&&Ke(M.content))},el=function(g){fe&&Os(fe,g)},$r=function(g,y){return ue?g==="patchsrc"?!0:g==="for"&&y!=="label"&&y!=="output":!1},il=function(g){ue&&ks(g,y=>{const x=R(y);if(x===st.processingInstruction||x===st.comment&&pt(Yr,y.data)){try{p(y)}catch{}return!1}if(x===st.element){const A=y,O=tt(I(y));try{A.hasAttribute&&A.hasAttribute("patchsrc")&&A.removeAttribute("patchsrc"),A.hasAttribute&&A.hasAttribute("for")&&$r("for",O)&&A.removeAttribute("for")}catch{}}return!0})},_r=function(g){let y=null,x=null;if(ps)g="<remove></remove>"+g;else{const M=jr(g,/^[\r\n\t ]+/);x=M&&M[0]}Xe==="application/xhtml+xml"&&De===Wt&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const A=D?jt(g):g;if(De===Wt)try{y=new c().parseFromString(A,Xe)}catch{}if(!y||!y.documentElement){y=as.createDocument(De,"template",null);try{y.documentElement.innerHTML=gs?F:A}catch{}}const O=y.body||y.documentElement;return g&&x&&O.insertBefore(e.createTextNode(x),O.childNodes[0]||null),De===Wt?Ca.call(y,he?"html":"body")[0]:he?y.documentElement:O},vs=function(g){const y=L?L(g):g.ownerDocument;return Qn.call(y||g,g,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},Ri=function(g){return g=ei(g,Ma," "),g=ei(g,Pa," "),g=ei(g,Na," "),g},Ss=function(g){var y;yr(g);const x=(y=g.querySelectorAll)===null||y===void 0?void 0:y.call(g,"template");x&&Gt(x,A=>{ne(A.content)&&Ss(A.content)})},yr=function(g){g.normalize();const y=L?L(g):g.ownerDocument,x=Qn.call(y||g,g,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null);let A=x.nextNode();for(;A;)A.data=Ri(A.data),A=x.nextNode()},Ii=function(g){const y=v?v(g):null;return typeof y!="string"||tt(y)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==E(g)||typeof g.removeAttribute!="function"||typeof g.removeAttributeNode!="function"||typeof g.getAttributeNode!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==k(g)||g.childNodes!==b(g)},ne=function(g){if(!k||typeof g!="object"||g===null)return!1;try{return k(g)===st.documentFragment}catch{return!1}},Qe=function(g){if(!k||typeof g!="object"||g===null)return!1;try{return typeof k(g)=="number"}catch{return!1}};function Dt(T,g,y){T.length!==0&&Gt(T,x=>{x.call(t,g,y,Me)})}const sl=function(g,y){return!!(ue&&g.hasChildNodes()&&!Qe(g.firstElementChild)&&pt(zs,g.textContent)&&pt(zs,g.innerHTML)||ue&&zc[y]&&R(g)===st.element&&W(g)===Wt&&(Qe(g.firstElementChild)||typeof g.textContent=="string"&&pt(zs,g.textContent))||g.nodeType===st.processingInstruction||ue&&g.nodeType===st.comment&&pt(Yr,g.data))},Oi=function(g,y){if(g instanceof RegExp)return pt(g,y);if(g instanceof Function){for(var x=arguments.length,A=new Array(x>2?x-2:0),O=2;O<x;O++)A[O-2]=arguments[O];return!!g(y,...A)}return!1},nl=function(g,y,x){if(!Ye[y]&&xr(y)&&Oi(Bt.tagNameCheck,y))return!1;if(ds&&!pe[y]&&!pe[_e(y)]){const A=_(g),O=b(g);if(O&&A){const M=O.length;for(let z=M-1;z>=0;--z){const lt=g===x?h(O[z],!0):O[z];A.insertBefore(lt,m(g))}}}return se(g),!0},wr=function(g,y,x,A){return g.length===0?y:y===x||y===A?Lt(y):y},Ne=function(g,y){return g===y||_(g)!==null?!1:(ms&&xs(g),!0)},Ts=function(g,y){if(el(g),Dt(G.beforeSanitizeElements,g,null),Ne(g,y))return!0;if(Ii(g))return se(g),!0;const x=tt(I(g));if(Y=wr(G.uponSanitizeElement,Y,ls,Ai),Dt(G.uponSanitizeElement,g,{tagName:x,allowedTags:Y}),Ne(g,y))return!0;if(sl(g,x))return se(g),!0;if(Ye[x]||!(ie.tagCheck instanceof Function&&ie.tagCheck(x))&&!Y[x]){const A=nl(g,x,y);return A===!1&&(Dt(G.afterSanitizeElements,g,null),Ne(g,y))?!0:A}if(R(g)===st.element&&!Qa(g)||(x==="noscript"||x==="noembed"||x==="noframes")&&pt(Nc,g.innerHTML))return se(g),!0;if(Vt&&g.nodeType===st.text){const A=Ri(g.textContent);g.textContent!==A&&(Je(t.removed,{element:g.cloneNode()}),g.textContent=A)}return Dt(G.afterSanitizeElements,g,null),Ne(g,y)},kr=function(g,y,x){if(Jn[y]||$r(y,g)||ir&&(y==="id"||y==="name")&&(x in e||x in Va))return!1;const A=X[y]||ie.attributeCheck instanceof Function&&ie.attributeCheck(y,g);return us&&pt(za,y)||tr&&pt(ja,y)?!0:A?lr[y]||pt(Zn,ei(x,Kn,""))||(y==="src"||y==="xlink:href"||y==="href")&&g!=="script"&&Br(x,"data:")===0&&or[g]||er&&!pt(Ba,ei(x,Kn,""))?!0:!x:xr(g)&&Oi(Bt.tagNameCheck,g)&&Oi(Bt.attributeNameCheck,y,g)||y==="is"&&Bt.allowCustomizedBuiltInElements&&Oi(Bt.tagNameCheck,x)},rl=U({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),xr=function(g){return!rl[_e(g)]&&pt(Wa,g)},ol=function(g,y,x,A){if(D&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!x)switch(u.getAttributeType(g,y)){case"TrustedHTML":return jt(A);case"TrustedScriptURL":return Ra(A)}return A},al=function(g,y,x,A){try{return x?g.setAttributeNS(x,y,A):g.setAttribute(y,A),Ii(g)?(se(g),!1):!0}catch{return Pe(y,g),!1}},Ar=function(g,y){return ue&&pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,y)?!0:_e(g)==="attributename"&&jr(y,"href")!==null},Ls=function(g,y){if(Dt(G.beforeSanitizeAttributes,g,null),Ne(g,y))return;const x=g.attributes;if(!x||Ii(g))return;X=wr(G.uponSanitizeAttribute,X,cs,vi);const A={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let O=x.length;const M=tt(g.nodeName);for(;O--;){const z=x[O],lt=z.name,Ut=z.namespaceURI,bt=z.value,wt=tt(lt),ze=bt;let kt=lt==="value"?ze:_c(ze),vr=!1;if(A.attrName=wt,A.attrValue=kt,A.keepAttr=!0,A.forceKeepAttr=void 0,Dt(G.uponSanitizeAttribute,g,A),kt=A.attrValue,sr&&(wt==="id"||wt==="name")&&Br(kt,nr)!==0&&(Pe(lt,g,z),kt=nr+kt,vr=!0),Ar(lt,kt)){Pe(lt,g,z);continue}if(!A.forceKeepAttr){if(!A.keepAttr){Pe(lt,g,z);continue}if(!hs&&pt(Xr,kt)){Pe(lt,g,z);continue}if(Vt&&(kt=Ri(kt)),!kr(M,wt,kt)){Pe(lt,g,z);continue}kt=ol(M,wt,Ut,kt),kt!==ze&&al(g,lt,Ut,kt)&&vr&&zr(t.removed)}}Dt(G.afterSanitizeAttributes,g,null),Ne(g,y)},Ke=function(g){let y=null;const x=vs(g);for(Dt(G.beforeSanitizeShadowDOM,g,null);y=x.nextNode();)if(Dt(G.uponSanitizeShadowNode,y,null),Ts(y,g),Ls(y,g),ne(y.content)&&Ke(y.content),R(y)===st.element){const A=$(y);ne(A)&&(Es(A),Ke(A))}Vt&&yr(g),Dt(G.afterSanitizeShadowDOM,g,null)},Es=function(g){const y=[{node:g,shadow:null}];for(;y.length>0;){const x=y.pop();if(x.shadow){Ke(x.shadow);continue}const A=x.node,O=R(A)===st.element,M=b(A);if(M)for(let z=M.length-1;z>=0;--z)y.push({node:M[z],shadow:null});if(O){const z=v?v(A):null;if(typeof z=="string"&&tt(z)==="template"){const lt=A.content;ne(lt)&&y.push({node:lt,shadow:null})}}if(O){const z=$(A);ne(z)&&y.push({node:null,shadow:z},{node:z,shadow:null})}}};return t.sanitize=function(T){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=null,x=null,A=null,O=null;if(gs=!T,gs&&(T="<!-->"),typeof T!="string"&&!Qe(T)&&(T=xc(T),typeof T!="string"))throw Yt("dirty is not a string, aborting");if(!t.isSupported)return T;fs?(Y=Ai,X=vi):ys(g),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(Y=Lt(Y)),G.uponSanitizeAttribute.length>0&&(X=Lt(X)),t.removed=[];const M=ms&&typeof T!="string"&&Qe(T);let z=[];const lt=fe;if(M){il(T);const wt=I(T);if(typeof wt=="string"){const ze=tt(wt);if(!Y[ze]||Ye[ze])throw ws(T),Yt("root node is forbidden and cannot be sanitized in-place")}if(Ii(T))throw ws(T),Yt("root node is clobbered and cannot be sanitized in-place");z=As(T),fe=Is()}else if(Qe(T))y=_r("<!---->"),x=y.ownerDocument.importNode(T,!0),x.nodeType===st.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?y=x:y.appendChild(x),Es(y);else{if(!Oe&&!Vt&&!he&&T.indexOf("<")===-1)return D&&Ti?jt(T):T;if(y=_r(T),!y)return Oe?null:Ti?F:""}y&&ps&&se(y.firstChild);const Ut=M?T:y;try{M&&Es(T);const wt=vs(Ut);for(;A=wt.nextNode();)Ts(A,Ut),Ls(A,Ut),ne(A.content)&&Ke(A.content);M&&Ja(T,z)}catch(wt){throw M&&(ws(T),br(T,z)),wt}finally{fe=lt}if(M){if(br(T,z))throw Yt("a node selected for removal could not be safely returned; refusing to sanitize in place");return Vt&&Ss(T),T}if(Oe){if(Vt&&Ss(y),Si)for(O=Oa.call(y.ownerDocument);y.firstChild;)O.appendChild(y.firstChild);else O=y;return(X.shadowroot||X.shadowrootmode)&&(O=Da.call(i,O,!0)),O}let bt=he?y.outerHTML:y.innerHTML;return he&&Y["!doctype"]&&y.ownerDocument&&y.ownerDocument.doctype&&y.ownerDocument.doctype.name&&pt(Mc,y.ownerDocument.doctype.name)&&(bt="<!DOCTYPE "+y.ownerDocument.doctype.name+`>
|
|
67
|
+
`+bt),Vt&&(bt=Ri(bt)),D&&Ti?jt(bt):bt},t.setConfig=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ys(T),fs=!0,Ai=Y,vi=X},t.clearConfig=function(){Me=null,fs=!1,Ai=null,vi=null,D=yt,F=""},t.isValidAttribute=function(T,g,y){Me||ys({});const x=tt(T),A=tt(g);return typeof y=="string"&&(Ar(g,y)||!hs&&pt(Xr,y))?!1:kr(x,A,y)},t.addHook=function(T,g){typeof g=="function"&&At(G,T)&&Je(G[T],g)},t.removeHook=function(T,g){if(At(G,T)){if(g!==void 0){const y=gc(G[T],g);return y===-1?void 0:$c(G[T],y,1)[0]}return zr(G[T])}},t.removeHooks=function(T){At(G,T)&&(G[T]=[])},t.removeAllHooks=function(){G=Qr()},t}var Wc=Zo(),cn={},Uc="4.1.1";const Fc={version:Uc},ot="[\\s\\S]",qc=".",Jt="\\p{Alphabetic}",Jo="\\p{Alphabetic}",ta="\\p{Alphabetic}\\p{N}",On="[\\p{Alphabetic}\\p{N}]",N="\\p{Alphabetic}\\p{N}\\p{Pc}",J="[\\p{Alphabetic}\\p{N}\\p{Pc}]",rt="\\[([^\\[\\]]+)\\]",K=(r,t="")=>new RegExp(r,`u${t}`);function ea(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ia(r){const t=new Map;return new Proxy(Object.create(null),{get(e,i){if(typeof i=="string")return t.has(i)||t.set(i,r(i)),t.get(i)}})}const Hc=K(String.raw`^(${J}[${N}\-'.]*)(?: +(${J}[${N}\-'.]*))?`+String.raw`(?: +(${J}[${N}\-'.]*))?(?:[ ]+<([^>]+)>)?$`),Vc=/;(?: |$)/,Gc=/^(?:[^\d{]*(.*?),)? *(?!:)(.*?)(?: *(?!^),?: *(.*))?$/,Yc=/^(.+?) *\( *(.+?) *\)$/,Xc=/^(.+?) +- +(.+)$/,Qc=/^(\\)?(ifdef|ifndef|ifeval|endif)::(\S*?(?:([,+])\S*?)?)\[(.+)?\]$/,Kr=/^(.+?) *([=!><]=|[><]) *(.+)$/,Kc=/^(\\)?include::([^\s[](?:[^[]*[^\s[])?)\[(.+)?\]$/,Zc=/\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m,Bs=K(String.raw`^:(!?${J}[^:]*):(?:[ \t]+(.*))?$`),Jc=K(String.raw`[^${N}\-]`),un=/^pass:([a-z]+(?:,[a-z-]+)*)?\[([\s\S]*)\]$/,tu=K(String.raw`(\\)?\{(${J}[${N}\-]*|(set|counter2?):.*?)(\\)?\}`),eu=K(String.raw`^\[\[(?:|([${Jt}_:][${N}\-:.]*)(?:, *(.+))?)\]\]$`),iu=K(String.raw`^\[(|[${N}.#%{,"'].*)\]$`),si=K(String.raw`^\[(?:|[${N}.#%{,"'].*|\[(?:|[${Jt}_:][${N}\-:.]*(?:, *.+)?)\])\]$`),Zr=/^\.(\.?[^ \t.].*)$/,su=/^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):[ \t]+/,Jr=/^([ \t]+.*)$/,to=/^(=={0,5}|##{0,5})[ \t]+(.+?)(?:[ \t]+\1)?$/,Ws=K(String.raw`^((?!\.).*?${On}.*)$`),eo=K(String.raw` (\\)?\[\[([${Jt}_:][${N}\-:.]*)(?:, *(.+?))?\]\]$`),sa=K(String.raw`<[^>]+>|&(?:[a-z][a-z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-f][\da-f][\da-f]{0,3});|[^ ${N}\-.]+?`),nu=/^sect\d$/,io=/^(?:[ \t]*(?:-|\*\**|\.\.*|\u2022|\d+\.|[a-zA-Z]\.|[IVXivx]+\))[ \t]|(?!\/\/[^/])[ \t]*[^ \t].*?(?::::{0,2}|;;)(?:$|[ \t])|<(?:\d+|\.)>[ \t])/,na=/^[ \t]*(-|\*\**|\u2022)[ \t]+([\s\S]*)$/,ra=/^[ \t]*(\.\.*|\d+\.|[a-zA-Z]\.|[IVXivx]+\))[ \t]+([\s\S]*)$/,so={arabic:/\d+\./,loweralpha:/[a-z]\./,lowerroman:/[ivx]+\)/,upperalpha:/[A-Z]\./,upperroman:/[IVX]+\)/},ci=/^(?!\/\/[^/])[ \t]*([^ \t].*?)(:::{0,2}|;;)(?:$|[ \t]+([\s\S]*)$)/,ru={"::":/^(?!\/\/[^/])[ \t]*([^ \t].*?[^:]|[^ \t:])(::)(?:$|[ \t]+([\s\S]*)$)/,":::":/^(?!\/\/[^/])[ \t]*([^ \t].*?[^:]|[^ \t:])(:::)(?:$|[ \t]+([\s\S]*)$)/,"::::":/^(?!\/\/[^/])[ \t]*([^ \t].*?[^:]|[^ \t:])(::::)(?:$|[ \t]+([\s\S]*)$)/,";;":/^(?!\/\/[^/])[ \t]*([^ \t].*?)(;;)(?:$|[ \t]+([\s\S]*)$)/},hn=/^<(\d+|\.)>[ \t]+([\s\S]*)$/,ou=/((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/m,au="(\\\\)?<()([\\d]+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)",lu=ia(r=>{const t=r?`(${ea(r)} ?)?`:"()?";return new RegExp(`${t}${au}`,"m")}),no=/\\?<!?(|--)(\d+|\.)\1>(?=(?: ?\\?<!?\1(?:\d+|\.)\1>)*$)/m,cu=/((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/m,uu="(\\\\)?<()([\\d]+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)",hu=ia(r=>{const t=r?`(${ea(r)} ?)?`:"()?";return new RegExp(`${t}${uu}`,"m")}),ni={ulist:na,olist:ra,dlist:ci,colist:hn},fu=/^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/,pu=/^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/,du=/[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/,mu=K(String.raw`^(${J}[${N}\-]*)::(|\S|\S.*?\S)\[(.+)?\]$`),gu=/^(image|video|audio)::(\S|\S.*?\S)\[(.+)?\]$/,bu=/^toc::\[(.+)?\]$/,$u=K(String.raw`(\\)?(?:\[\[([${Jt}_:][${N}\-:.]*)(?:, *(.+?))? ?\]\]`+String.raw`|anchor:([${Jt}_:][${N}\-:.]*)\[(?:\]|([\s\S]*?[^\\])\]))`),ro=K(String.raw`(?:^|[^\\\[])\[\[([${Jt}_:][${N}\-:.]*)(?:, *(.+?))? ?\]\]`+String.raw`|(?:^|[^\\])anchor:([${Jt}_:][${N}\-:.]*)\[(?:\]|(.*?[^\\])\])`),ui=K(String.raw`^\[\[([${Jt}_:][${N}\-:.]*)(?:, *(.+?))?\]\]`),oa=K(String.raw`^\[\[\[([${Jt}_:][${N}\-:.]*)(?:, *(.+?))?\]\]\]`),_u=K(String.raw`([\\>:/])?${J}(?:&|[${N}\-.%+])*`+String.raw`@${On}[${ta}_\-.]*\.[a-zA-Z]{2,5}\b`),yu=K(String.raw`\\?footnote(?:(ref):|:([${N}\-]+)?)\[(?:|([\s\S]*?[^\\]))\](?!</a>)`),wu=/\\?i(?:mage|con):([^:\s[](?:[^\n[]*[^\s[])?)\[(|[\s\S]*?[^\\])\]/,ku=/\\?(?:(indexterm2?):\[([\s\S]*?[^\\])\]|\(\(([\s\S]+?)\)\)(?!\)))/,xu=/(\\)?(kbd|btn):\[([\s\S]*?[^\\])\]/,Au=/(^|link:|[ \t\u00a0]|\\?<(?=\\?(?:https?|file|ftp|irc)(:))|[>()[\];"'])(\\?(?:https?|file|ftp|irc):\/\/)(?:([^\s[\]]+)\[(|[\s\S]*?[^\\])\]|(?!\2)([^\s]+?)>|([^\s[\]<]*([^\s,.?![\]<)])))/m,vu=/\\?(?:link|(mailto)):(|[^:\s[][^\s[]*)\[(|[\s\S]*?[^\\])\]/,aa=K(String.raw`^${J}[${N}\-]*$`),Su=/\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\[([\s\S]*?[^\\])\]/,Tu=K(String.raw`\\?menu:(${J}|[${N}&][^\n\[]*[^\s\[])`+String.raw`\[ *(?:|([\s\S]*?[^\\]))\]`),Lu=K(String.raw`\\?"([${N}&][^"]*?[ \n]+>[ \n]+[^"]*)"`),Eu={false:["+","-]",K(String.raw`((?:^|[^${N};:\\])(?=(\[)|\+)|\\(?=\[)|(?=\\\+))`+String.raw`(?:\2(x-|[^\[\]]+ x-)\]|(?:`+rt+String.raw`)?(?=(\\)?\+))`+String.raw`(\5?(\+|`+"`"+String.raw`)(\S|\S`+ot+String.raw`*?\S)\7)(?!${J})`,"m")],true:["`",null,K(String.raw`(^|[^`+"`"+String.raw`${N}])(?:($)()|(?:`+rt+String.raw`)(?=(\\?)))?`+String.raw`(\5?(`+"`"+String.raw`)([^`+"`"+String.raw`\s]|[^`+"`"+String.raw`\s]`+ot+String.raw`*?\S)\7)(?![`+"`"+String.raw`${N}])`,"m")]},Ru=new RegExp(`(?:(?:(\\\\?)${rt})?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)([\\s\\S]*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|[\\s\\S]*?[^\\\\])\\])`),Iu=K(String.raw`\\?(?:<<([${N}#/.:{]`+ot+String.raw`*?)>>`+String.raw`|xref:([${N}#/.:{]`+ot+String.raw`*?)\[(?:\]|(`+ot+String.raw`*?[^\\])\]))`),Ou=/^(.*) \+$/m,Cu=/^ {0,3}([-*_])( *)\1\2\1$/,Du=/^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/,Mu=/\n{2,}/,Pu=/\\([ \t\n])/g,la=/[&']|--|\.\.\.|\([CRT]M?\)/,Nu=/([^\\])[ \t\n]+/g,zu=/[+-]/,ju=/\d+$/,xe=K(String.raw`^${Jo}[${ta}.+\-]+:\/{0,2}`),Te=/<[^>]+>/g,ct=(r,t="")=>new RegExp(r,`u${t}`),oo={0:"unsafe",1:"safe",10:"server",20:"secure"},at={UNSAFE:0,SAFE:1,SERVER:10,SECURE:20,valueForName(r){const t=String(r).toUpperCase(),e=at[t];return typeof e=="number"?e:void 0},getValueForName(r){return this.valueForName(r)},nameForValue(r){return oo[r]},getNameForValue(r){return this.nameForValue(r)},names(){return Object.values(oo)},getNames(){return this.names()}};let Bu="",Wu="",Uu="",ca="";try{Wu=new URL(""+new URL("index-D6WqGtsG.js",import.meta.url).href,import.meta.url).pathname.replace(/\/$/,""),Bu=new URL(""+new URL("index-D6WqGtsG.js",import.meta.url).href,import.meta.url).pathname.replace(/\/$/,""),Uu=new URL("../../data",import.meta.url).pathname,typeof process<"u"&&(ca=cn.HOME||cn.USERPROFILE||(process.cwd?process.cwd():""))}catch{}const S=`
|
|
68
|
+
`,ao="\0",Fu=9007199254740991,Us="article",lo="html5",Cn=new Set(["","DEFAULT"]),qu="asciidoctor.css",ua={html:"html5",docbook:"docbook5"},Hu={docbook:425},Vu={html:".html",docbook:".xml",pdf:".pdf",epub:".epub",manpage:".man",asciidoc:".adoc"},ha={".adoc":!0,".asciidoc":!0,".asc":!0,".ad":!0,".txt":!0},co={"=":0,"-":1,"~":2,"^":3,"+":4},fn=new Set(["NOTE","TIP","IMPORTANT","WARNING","CAUTION"]),Gu=new Set([...fn].map(r=>r[0])),Yu=new Set(["comment","example","literal","listing","normal","open","pass","quote","sidebar","source","verse","abstract","partintro"]),Xu=new Set(["literal","listing","source","verse"]),Dn={"--":["open",new Set(["comment","example","literal","listing","pass","quote","sidebar","source","verse","admonition","abstract","partintro"])],"----":["listing",new Set(["literal","source"])],"....":["literal",new Set(["listing","source"])],"====":["example",new Set(["admonition"])],"****":["sidebar",new Set],____:["quote",new Set(["verse"])],"++++":["pass",new Set(["stem","latexmath","asciimath"])],"|===":["table",new Set],",===":["table",new Set],":===":["table",new Set],"!===":["table",new Set],"~~~~":["open",new Set(["abstract","partintro"])],"////":["comment",new Set],"```":["fenced_code",new Set]},Qu=Object.fromEntries(Object.keys(Dn).map(r=>[r.slice(0,2),!0])),uo=Object.fromEntries(Object.keys(Dn).filter(r=>r.length===4).map(r=>[r,r[r.length-1]])),qi={example:"example-caption",figure:"figure-caption",listing:"listing-caption",table:"table-caption"},Ku={"'":"thematic_break","<":"page_break"},fa={"-":"thematic_break","*":"thematic_break",_:"thematic_break"},Zu={...Ku,...fa},Fs=["ulist","olist","dlist"],qs=["arabic","loweralpha","lowerroman","upperalpha","upperroman"],Ju={loweralpha:"a",lowerroman:"i",upperalpha:"A",upperroman:"I"},nt="{",Ki="+",ho=" +",th=" \\",eh=" +",Ae={asciimath:["\\$","\\$"],latexmath:["\\[","\\]"]},pn={asciimath:["\\$","\\$"],latexmath:["\\(","\\)"]},pa=new Proxy({latexmath:"latexmath",latex:"latexmath",tex:"latexmath"},{get:(r,t)=>Object.hasOwn(r,t)?r[t]:"asciimath"}),ih="4.7.0",sh="7.3.1",fo="9.18.3",da="2.7.9",nh={"appendix-caption":"Appendix","appendix-refsig":"Appendix","caution-caption":"Caution","chapter-refsig":"Chapter","example-caption":"Example","figure-caption":"Figure","important-caption":"Important","last-update-label":"Last updated","note-caption":"Note","part-refsig":"Part",prewrap:"",sectids:"","section-refsig":"Section","table-caption":"Table","tip-caption":"Tip","toc-placement":"auto","toc-title":"Table of Contents","untitled-label":"Untitled","version-label":"Version","warning-caption":"Warning"},rh=["sectnums"],po={startsb:"[",endsb:"]",vbar:"|",caret:"^",asterisk:"*",tilde:"~",plus:"+",backslash:"\\",backtick:"`",blank:"",empty:"",sp:" ","two-colons":"::","two-semicolons":";;",nbsp:" ",deg:"°",zwsp:"​",quot:""",apos:"'",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",wj:"⁠",brvbar:"¦",pp:"++",cpp:"C++",cxx:"C++",amp:"&",lt:"<",gt:">"},mt="`",ma=[["strong","unconstrained",ct(String.raw`\\?(?:${rt})?\*\*(${ot}+?)\*\*`)],["strong","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?\*(\S|\S${ot}*?\S)\*(?!${J})`,"m")],["double","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?"${mt}(\S|\S${ot}*?\S)${mt}"(?!${J})`,"m")],["single","constrained",ct(String.raw`(^|[^${N};:${mt}}])(?:${rt})?'${mt}(\S|\S${ot}*?\S)${mt}'(?!${J})`,"m")],["monospaced","unconstrained",ct(String.raw`\\?(?:${rt})?${mt}${mt}(${ot}+?)${mt}${mt}`)],["monospaced","constrained",ct(String.raw`(^|[^${N};:"'${mt}}])(?:${rt})?${mt}(\S|\S${ot}*?\S)${mt}(?![${N}"'${mt}])`,"m")],["emphasis","unconstrained",ct(String.raw`\\?(?:${rt})?__(${ot}+?)__`)],["emphasis","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?_(\S|\S${ot}*?\S)_(?!${J})`,"m")],["mark","unconstrained",ct(String.raw`\\?(?:${rt})?##(${ot}+?)##`)],["mark","constrained",ct(String.raw`(^|[^${N}&;:}])(?:${rt})?#(\S|\S${ot}*?\S)#(?!${J})`,"m")],["superscript","unconstrained",ct(String.raw`\\?(?:${rt})?\^(\S+?)\^`)],["subscript","unconstrained",ct(String.raw`\\?(?:${rt})?~(\S+?)~`)]],Ge=[...ma];Ge[2]=["double","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?${mt}${mt}(\S|\S${ot}*?\S)''(?!${J})`,"m")];Ge[3]=["single","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?${mt}(\S|\S${ot}*?\S)'(?!${J})`,"m")];Ge[4]=["monospaced","unconstrained",ct(String.raw`\\?(?:${rt})?\+\+(${ot}+?)\+\+`)];Ge[5]=["monospaced","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?\+(\S|\S${ot}*?\S)\+(?!${J})`,"m")];Ge.splice(3,0,["emphasis","constrained",ct(String.raw`(^|[^${N};:}])(?:${rt})?'(\S|\S${ot}*?\S)'(?!${J})`,"m")]);const oh={false:ma,true:Ge},ah=[[/\\?\(C\)/,"©","none"],[/\\?\(R\)/,"®","none"],[/\\?\(TM\)/,"™","none"],[/(?: |\n|^|\\)--(?: |\n|$)/m," — ","none"],[ct(String.raw`(${J})\\?--(?=${J})`),"—​","leading"],[/\\?\.\.\./,"…​","none"],[/\\?`'/,"’","none"],[ct(String.raw`(${On})\\?'(?=${Jo})`),"’","leading"],[/\\?->/,"→","none"],[/\\?=>/,"⇒","none"],[/\\?<-/,"←","none"],[/\\?<=/,"⇐","none"],[/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/,"","bounding"]],Mt=Object.freeze(["specialcharacters"]),Ot=Object.freeze(["specialcharacters","quotes","attributes","replacements","macros","post_replacements"]),q={DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4,UNKNOWN:5},ga=["DEBUG","INFO","WARN","ERROR","FATAL","ANY"],lh={WARN:"WARNING",FATAL:"FAILED"};function Mn(r){return typeof r=="number"?r:typeof r=="string"?q[r.toUpperCase()]??q.UNKNOWN:r??q.UNKNOWN}let Pn=null,Hs=null;async function ch(){return Hs===null&&(Hs=typeof process<"u"?St(async()=>{const{AsyncLocalStorage:r}=await import("./__vite-browser-external-D7Ct-6yo.js").then(t=>t._);return{AsyncLocalStorage:r}},[],import.meta.url).then(({AsyncLocalStorage:r})=>{const t=new r;return Pn=t,t}).catch(()=>null):Promise.resolve(null)),Hs}function uh(){return Pn?.getStore()??null}async function hh(r,t){const e=await ch();if(e)return e.run(r,t);const i=Zt.logger;r!==i&&(Zt.logger=r);try{return await t()}finally{r!==i&&(Zt.logger=i)}}class _t{constructor(t={}){this.progname=t.progname??"asciidoctor",this.level=t.level??q.WARN,this._maxSeverity=null,this._formatter=t.formatter??new _t.BasicFormatter,this._pipe=t.pipe??null}get formatter(){return this._formatter}set formatter(t){this._formatter=t}get maxSeverity(){return this._maxSeverity}getLevel(){return this.level}setLevel(t){this.level=t}getFormatter(){return this._formatter}setFormatter(t){this._formatter=t}getProgramName(){return this.progname}setProgramName(t){this.progname=t}getMaxSeverity(){return this._maxSeverity}isDebugEnabled(){return this.level<=q.DEBUG}isInfoEnabled(){return this.level<=q.INFO}isWarnEnabled(){return this.level<=q.WARN}isErrorEnabled(){return this.level<=q.ERROR}isFatalEnabled(){return this.level<=q.FATAL}isDebug(){return this.level<=q.DEBUG}isInfo(){return this.level<=q.INFO}add(t,e=null,i=null){if(t=Mn(t),(this._maxSeverity===null||t>this._maxSeverity)&&(this._maxSeverity=t),t<this.level)return!0;const s=e??(typeof i=="function"?i():i),n=ga[t]??"ANY",o=this._formatter.call(n,null,this.progname,s);return this._writeln(o,t),!0}log(t,e,i){return this.add(t,e,i)}debug(t,e){return this.add(q.DEBUG,t,e)}info(t,e){return this.add(q.INFO,t,e)}warn(t,e){return this.add(q.WARN,t,e)}error(t,e){return this.add(q.ERROR,t,e)}fatal(t,e){return this.add(q.FATAL,t,e)}unknown(t,e){return this.add(q.UNKNOWN,t,e)}_writeln(t,e){this._pipe?typeof this._pipe.write=="function"?this._pipe.write(t):this._pipe(t,e):typeof process<"u"&&process.stderr?.write?process.stderr.write(t):console.error(t.replace(/\n$/,""))}}_t.BasicFormatter=class{call(r,t,e,i){const s=typeof r=="number"?ga[r]??"ANY":r,n=lh[s]??s,o=typeof i=="string"?i:i?.inspect?.()??String(i);return`${e}: ${n}: ${o}
|
|
69
|
+
`}};_t.AutoFormattingMessage={attach(r){return r.inspect=function(){const t=this.source_location,e=this.include_location;let i=t?`${t}: ${this.text}`:this.text;return e&&(i+=` (${e})`),i},r.toString=r.inspect,r}};class Nn extends _t{constructor(){super(),this.level=q.UNKNOWN,this._maxSeverity=null}static create(){return new Nn}get maxSeverity(){return this._maxSeverity}getMaxSeverity(){return this._maxSeverity}add(t){const e=Mn(t);return(this._maxSeverity===null||e>this._maxSeverity)&&(this._maxSeverity=e),!0}log(t){return this.add(t)}debug(){return this.add(q.DEBUG)}info(){return this.add(q.INFO)}warn(){return this.add(q.WARN)}error(){return this.add(q.ERROR)}fatal(){return this.add(q.FATAL)}unknown(){return this.add(q.UNKNOWN)}}const Zt=(()=>{let r=_t,t=null;return{get loggerClass(){return r},set loggerClass(e){r=e},get logger(){return t||(t=new r),t},set logger(e){t=e??new r},getLogger(){return this.logger},setLogger(e){this.logger=e},newFormatter(e,i){return{call:i.call.bind(i)}},newLogger(e,i){const s=new _t;if(i.add){const n=i.add;s.add=function(o,l=null,a=null){const c=Mn(o);return(this._maxSeverity===null||c>this._maxSeverity)&&(this._maxSeverity=c),n.call(this,c,l,a)};for(const[o,l]of[["debug",q.DEBUG],["info",q.INFO],["warn",q.WARN],["error",q.ERROR],["fatal",q.FATAL],["unknown",q.UNKNOWN]])s[o]=(a,c)=>s.add(l,a,c);s.log=(o,l,a)=>s.add(o,l,a)}return i.postConstruct&&i.postConstruct.call(s),s}}})();function wi(r){Object.defineProperty(r,"logger",{get(){return Pn?.getStore()??Zt.logger},configurable:!0}),r.getLogger=function(){return this.logger},r.messageWithContext=(t,e={})=>_t.AutoFormattingMessage.attach({text:t,...e}),r.createLogMessage=r.messageWithContext}const ba="\uFEFF",$a=r=>r.replace(/[ \t\r\n\f\v]+$/,"");function fh(r,t=!0){return r.length?(r[0].startsWith(ba)?r[0]=r[0].slice(1):r[0].charCodeAt(0)===239&&r[0].charCodeAt(1)===187&&r[0].charCodeAt(2)===191&&(r[0]=r[0].slice(3)),t?r.map($a):r.map(e=>e.replace(/\r?\n$/,"").replace(/\r$/,""))):[]}function hi(r,t=!0){if(!r)return[];r.startsWith(ba)?r=r.slice(1):r.charCodeAt(0)===239&&r.charCodeAt(1)===187&&r.charCodeAt(2)===191&&(r=r.slice(3)),r.includes("\r")&&(r=r.replace(/\r\n/g,`
|
|
70
|
+
`).replace(/\r/g,`
|
|
71
|
+
`)),r.endsWith(`
|
|
72
|
+
`)&&(r=r.slice(0,-1));const e=r.split(`
|
|
73
|
+
`);return t?e.map($a):e}function vt(r){return r.includes(":")&&xe.test(r)}function Vs(r){return encodeURIComponent(r).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16)}`)}function Gs(r){return r.includes(" ")?r.replaceAll(" ","%20"):r}function ph(r){const t=r.lastIndexOf(".");return t<0||r.indexOf("/",t)>=0?r:r.slice(0,t)}function ss(r,t=null){const e=r.replace(/[/\\]+$/,"").split(/[/\\]/).pop()??r;if(!t)return e;const i=t===!0?Le(e):t;return i&&e.endsWith(i)?e.slice(0,-i.length):e}function dn(r){const t=r.lastIndexOf(".");return t>=0&&r.indexOf("/",t)<0}function Le(r,t=""){const e=r.lastIndexOf(".");return e<0||r.indexOf("/",e)>=0||r.indexOf("\\",e)>=0?t:r.slice(e)}async function ft(r,t,e){const i=t.flags.includes("g")?t:new RegExp(t.source,`${t.flags}g`),s=[...r.matchAll(i)];if(s.length===0)return r;const n=[];let o=0;for(const l of s)n.push(r.slice(o,l.index)),n.push(await e(...l,l.index,r)),o=l.index+l[0].length;return n.push(r.slice(o)),n.join("")}async function Ys(r){const{mkdir:t}=await St(async()=>{const{mkdir:e}=await import("./__vite-browser-external-D7Ct-6yo.js").then(i=>i._);return{mkdir:e}},[],import.meta.url);await t(r,{recursive:!0})}const dh=[["M",1e3],["CM",900],["D",500],["CD",400],["C",100],["XC",90],["L",50],["XL",40],["X",10],["IX",9],["V",5],["IV",4],["I",1]],mh={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3};function mn(r){let t="";for(const[e,i]of dh){const s=Math.floor(r/i);r%=i,t+=e.repeat(s)}return t}function mo(r){const t=[...r].map(i=>mh[i]);let e=0;for(let i=0;i<t.length;i++){const s=t[i],n=t[i+1];e+=n&&n>s?-s:s}return e}function gh(r){if(typeof r=="number")return r+1;const t=parseInt(r,10);if(String(t)===String(r))return t+1;const e=[...r];let i=!1;for(let s=e.length-1;s>=0;s--){const n=e[s].codePointAt(0),o=n>=97&&n<=122,l=n>=65&&n<=90,a=n>=48&&n<=57;if(!o&&!l&&!a)continue;if(i=!0,!(o&&n===122||l&&n===90||a&&n===57))return e[s]=String.fromCodePoint(n+1),e.join("");e[s]=o?"a":l?"A":"0";let u=!1;for(let f=s-1;f>=0;f--){const h=e[f].codePointAt(0),p=h>=97&&h<=122,d=h>=65&&h<=90,m=h>=48&&h<=57;if(!p&&!d&&!m)continue;if(!(p&&h===122||d&&h===90||m&&h===57)){e[f]=String.fromCodePoint(h+1),u=!0;break}e[f]=p?"a":d?"A":"0"}return u?e.join(""):(o?"a":l?"A":"1")+e.join("")}if(!i){const s=e.length-1,n=e[s].codePointAt(0);return e[s]=String.fromCodePoint(n+1),e.join("")}return r}class bh{async read(t){return fetch(t)}}class $h extends bh{#t=new Map;async read(t){const e=this.#t.get(t);if(e)return new Response(e.buffer.slice(0),{status:e.status,statusText:e.statusText,headers:e.headers});const i=await fetch(t);if(i.ok){const s=await i.arrayBuffer(),n=Object.fromEntries(i.headers.entries());return this.#t.set(t,{buffer:s,status:i.status,statusText:i.statusText,headers:n}),new Response(s.slice(0),{status:i.status,statusText:i.statusText,headers:n})}return i}}const go=new WeakMap,_h={_cache:null,setCache(r){this._cache=r},getCache(){return this._cache},getCacheForDocument(r){if(this._cache)return this._cache;let t=go.get(r);return t||(t=new $h,go.set(r,t)),t}};function gn(r,t){return t.hasAttribute("cache-uri")?_h.getCacheForDocument(t).read(r):fetch(r)}let Ue,zn,bo;async function mi(){return Ue!==void 0||(bo??=(async()=>{try{const r=await St(()=>import("./__vite-browser-external-D7Ct-6yo.js").then(t=>t._),[],import.meta.url);zn=(await St(async()=>{const{constants:t}=await import("./__vite-browser-external-D7Ct-6yo.js").then(e=>e._);return{constants:t}},[],import.meta.url)).constants,Ue=r}catch{Ue=null}})(),await bo),Ue}function yh(){return!!Ue}async function wh(r){const t=await mi();if(!t)return!1;try{return await t.access(r,zn.F_OK),!0}catch{return!1}}async function $o(r){const t=await mi();if(!t)return!1;try{return await t.access(r,zn.R_OK),!0}catch{return!1}}class Ie{_convertedReftext;constructor(t,e,i={}){e==="document"?this.document=this:t&&(this._parent=t,this.document=t.document),this.context=e,this.nodeName=String(e),this.id=null;const s=i.attributes;this.attributes=s?{...s}:{},this.passthroughs=[]}get parent(){return this._parent}set parent(t){this._parent=t,this.document=t.document}get role(){return this.attributes.role}set role(t){this.attributes.role=Array.isArray(t)?t.join(" "):t}get roles(){const t=this.attributes.role;return t?t.split(" "):[]}isBlock(){throw new Error("NotImplementedError")}isInline(){throw new Error("NotImplementedError")}get converter(){return this.document.converter}getAttribute(t,e=null,i=null){const s=String(t),n=this.attributes[s];if(n!=null)return n;if(i&&this._parent){const o=String(i===!0?t:i),l=this.document.attributes[o];if(l!=null)return l}return e}hasAttribute(t,e=null,i=null){const s=String(t);if(e){const n=this.attributes[s]??(i&&this._parent?this.document.attributes[String(i===!0?t:i)]:null);return e===n}return s in this.attributes||!!(i&&this._parent&&String(i===!0?t:i)in this.document.attributes)}setAttribute(t,e="",i=!0){return i===!1&&t in this.attributes?!1:(this.attributes[t]=e,!0)}isAttribute(t,e=null){return e!=null?this.getAttribute(t)===e:t in this.attributes}removeAttribute(t){const e=this.attributes[t];return delete this.attributes[t],e}hasOption(t){return`${t}-option`in this.attributes}setOption(t){this.attributes[`${t}-option`]=""}enabledOptions(){const t=new Set;for(const e of Object.keys(this.attributes))e.endsWith("-option")&&t.add(e.slice(0,e.length-7));return t}updateAttributes(t){return Object.assign(this.attributes,t)}hasRoleAttribute(t=null){return t!=null?t===this.attributes.role:"role"in this.attributes}hasRole(t){const e=this.attributes.role;return e?` ${e} `.includes(` ${t} `):!1}addRole(t){const e=this.attributes.role;return e?` ${e} `.includes(` ${t} `)?!1:(this.attributes.role=`${e} ${t}`,!0):(this.attributes.role=t,!0)}removeRole(t){const e=this.attributes.role;if(!e)return!1;const i=e.split(" "),s=i.indexOf(t);return s<0?!1:(i.splice(s,1),i.length===0?delete this.attributes.role:this.attributes.role=i.join(" "),!0)}get reftext(){return this._convertedReftext!==void 0?this._convertedReftext:this.attributes.reftext??null}async precomputeReftext(){const t=this.attributes.reftext;this._convertedReftext=t!=null?await this.applyReftextSubs(t):null}hasReftext(){return"reftext"in this.attributes}isReftext(){return this.hasAttribute("reftext")||!!this.title}async iconUri(t){let e;return this.hasAttribute("icon")?(e=this.getAttribute("icon"),dn(e)||(e=`${e}.${this.document.getAttribute("icontype","png")}`)):e=`${t}.${this.document.getAttribute("icontype","png")}`,this.imageUri(e,"iconsdir")}async imageUri(t,e="imagesdir"){if(t.startsWith("data:"))return Gs(t);const i=this.document;if(i.safe<at.SECURE&&i.hasAttribute("data-uri")){let s;return vt(t)&&(t=Gs(t))||e&&(s=this.getAttribute(e,null,!0))&&vt(s)&&(t=this.normalizeWebPath(t,s,!1))?i.hasAttribute("allow-uri-read")?this.generateDataUriFromUri(t):t:this.generateDataUri(t,e)}return this.normalizeWebPath(t,e?this.getAttribute(e,null,!0):null)}mediaUri(t,e="imagesdir"){return this.normalizeWebPath(t,e?this.getAttribute(e,null,!0):null)}async generateDataUri(t,e=null){const i=Le(t,null),s=i?i===".svg"?"image/svg+xml":`image/${i.slice(1)}`:"application/octet-stream",n=e?this.normalizeSystemPath(t,this.getAttribute(e,null,!0),null,{targetName:"image"}):this.normalizeSystemPath(t);if(vt(n))return await this.generateDataUriFromUri(n);if(await $o(n)){const l=await(await mi()).readFile(n);return`data:${s};base64,${l.toString("base64")}`}return this.logger.warn(`image to embed not found or not readable: ${n}`),`data:${s};base64,`}async generateDataUriFromUri(t){try{const e=this.document,i=await gn(t,e);if(i.ok){const s=(i.headers.get("content-type")||"application/octet-stream").split(";")[0].trim(),n=await i.arrayBuffer(),o=btoa(Array.from(new Uint8Array(n),l=>String.fromCharCode(l)).join(""));return`data:${s};base64,${o}`}else{const s=Le(t,null),n=s?s===".svg"?"image/svg+xml":`image/${s.slice(1)}`:"application/octet-stream";return this.logger.warn(`image to embed not found or not readable: ${t}`),`data:${n};base64,`}}catch{return this.logger.warn(`could not retrieve image data from URI: ${t}`),t}}normalizeAssetPath(t,e="path",i=!0){return this.normalizeSystemPath(t,this.document.baseDir,null,{targetName:e,recover:i})}normalizeSystemPath(t,e=null,i=null,s={}){const n=this.document;return n.safe<at.SAFE?e?n.pathResolver.root(e)||(e=`${n.baseDir}/${e}`):e=n.baseDir:(e=e??n.baseDir,i=i??n.baseDir),n.pathResolver.systemPath(t,e,i,s)}normalizeWebPath(t,e=null,i=!0){return i&&vt(t)?Gs(t):this.document.pathResolver.webPath(t,e)}async readAsset(t,e={}){if((typeof e!="object"||e===null)&&(e={warnOnFailure:e!==!1}),vt(t)){const{readBrowserAsset:i}=await Promise.resolve().then(function(){return Df}),s=await i(t);if(s!=null)return e.normalize?hi(s).join(S):s;if(e.warnOnFailure){const n=this.document.getAttribute("docfile")||"<stdin>",o=e.label||"file";this.logger.warn(`${n}: ${o} does not exist or cannot be read: ${t}`)}return null}if(await $o(t)){const i=await mi();return e.normalize?hi(await i.readFile(t,"utf8")).join(S):i.readFile(t,"utf8")}if(e.warnOnFailure){const i=this.document.getAttribute("docfile")||"<stdin>",s=e.label||"file";this.logger.warn(`${i}: ${s} does not exist or cannot be read: ${t}`)}return null}async readContents(t,e={}){const i=this.document,s=e.label||"asset";let n,o=t;const l=e.start,a=e.warnOnFailure!==!1;if(vt(t)||l&&vt(l)&&(o=i.pathResolver.webPath(t,l)))if(i.hasAttribute("allow-uri-read"))try{const u=await(await gn(o,i)).text();n=e.normalize?hi(u).join(S):u}catch{a&&this.logger.warn(`could not retrieve contents of ${s} at URI: ${o}`)}else a&&this.logger.warn(`cannot retrieve contents of ${s} at URI: ${o} (allow-uri-read attribute not enabled)`);else o=this.normalizeSystemPath(t,e.start,null,{targetName:s}),n=await this.readAsset(o,{normalize:e.normalize,warnOnFailure:a,label:s});return n!=null&&e.warnIfEmpty&&n.length===0&&this.logger.warn(`contents of ${s} is empty: ${o}`),n}isUri(t){return vt(t)}get logger(){return this.document?.logger??console}getLogger(){return this.logger}getRole(){return this.role}setRole(...t){return this.role=t.length===1?t[0]:t,this.attributes.role}getRoles(){return this.roles}getAttributes(){return this.attributes}getDocument(){return this.document}getParent(){return this._parent}setParent(t){this._parent=t,this.document=t.document}getNodeName(){return this.nodeName}getId(){return this.id??void 0}setId(t){this.id=t}getContext(){return this.context}getConverter(){return this.converter}getIconUri(t){return this.iconUri(t)}getMediaUri(t,e="imagesdir"){return this.mediaUri(t,e)}getImageUri(t,e=null){return this.imageUri(t,e)}getReftext(){return this.reftext??void 0}}class me extends Error{}class te extends Ie{#t=null;#e=null;#s=null;subs;defaultSubs;numeral;sourceLocation;_nextSectionIndex;_nextSectionOrdinal;constructor(t,e,i={}){super(t,e,i),this.contentModel="compound",this.blocks=[],this.subs=[],this.#t=null,this.#s=null,this.numeral=null,this.style=null,this.defaultSubs=null,this.sourceLocation=null,e==="document"||e==="section"?(this.level=0,this._nextSectionIndex=0,this._nextSectionOrdinal=1):t instanceof te?this.level=t.level:this.level=null}isBlock(){return!0}isInline(){return!1}get title(){return this.#e!=null?this.#e:this.#t==null?null:this.applyHeaderSubs(this.#t)}async precomputeTitle(){if(this.#t&&this.#e==null&&!this._computingTitle){this._computingTitle=!0;try{this.#e=await this.applyTitleSubs(this.#t)}finally{this._computingTitle=!1}}}get rawTitle(){return this.#t}get attrSubstitutedTitle(){const t=this.#t;return t==null?null:t.includes("{")?this.subAttributes(t):t}set title(t){this.#e=null,this.#t=t}hasTitle(){return!!this.#t}get caption(){return this.context==="admonition"?this.attributes.textlabel:this.#s}set caption(t){this.#s=t}get file(){return this.sourceLocation?.file}get lineno(){return this.sourceLocation?.lineno}setContext(t){this.context=t,this.nodeName=String(t)}get number(){const t=parseInt(this.numeral,10);return String(t)===String(this.numeral)?t:this.numeral}set number(t){this.numeral=String(t)}async convert(){return this.document.playbackAttributes(this.attributes),this.converter.convert(this)}render(){return this.convert()}async content(){const t=[];for(const e of this.blocks)t.push(await e.convert());return t.join(S)}getContent(){return this.content()}append(t){return t.getParent()!==this&&(t.parent=this),this.blocks.push(t),this}hasBlocks(){return this.blocks.length>0}hasSections(){return!1}sections(){return this.blocks.filter(t=>t.context==="section")}alt(){const t=this.attributes.alt;if(t){if(t===this.attributes["default-alt"])return this.subSpecialchars(t);const e=this.subSpecialchars(t);return la.test(e)?this.subReplacements(e):e}return""}getAlt(){return this.alt()}captionedTitle(){return`${this.caption||""}${this.title||""}`}listMarkerKeyword(t=null){return Ju[t||this.style]}hasSub(t){return this.subs.includes(t)}removeSub(t){const e=this.subs.indexOf(t);e>=0&&this.subs.splice(e,1)}async xreftext(t=null){const e=this.reftext;if(e&&e.length>0)return e;if(t&&this.#t&&this.#s){if(t==="full"){const i=this.document.compatMode?"``%s''":'"`%s`"',s=this.subPlaceholder(await this.subQuotes(i),this.title);if(this.numeral){const o=qi[this.context];if(o){const l=this.document.attributes[o];if(l)return`${l} ${this.numeral}, ${s}`}}const n=this.#s;return`${n.endsWith(". ")?n.slice(0,-2):n}, ${s}`}else if(t==="short"){if(this.numeral){const s=qi[this.context];if(s){const n=this.document.attributes[s];if(n)return`${n} ${this.numeral}`}}const i=this.#s;return i.endsWith(". ")?i.slice(0,-2):i}}return this.title}assignCaption(t=null,e=this.context){if(this.#s!=null||!this.#t)return;const i=this.document.attributes.caption;if(t!=null||i!=null)this.#s=t??i;else{const s=qi[e];if(s){const n=this.document.attributes[s];n&&(this.numeral=this.document.incrementAndStoreCounter(`${e}-number`,this),this.#s=`${n} ${this.numeral}. `)}}}assignNumeral(t){t.index=this._nextSectionIndex,this._nextSectionIndex=t.index+1;const e=t.numbered;if(e){const i=t.sectname;if(i==="appendix"){t.numeral=this.document.counter("appendix-number","A");const s=this.document.attributes["appendix-caption"];t.caption=s?`${s} ${t.numeral}: `:`${t.numeral}. `}else i==="chapter"||e==="chapter"?t.numeral=String(this.document.counter("chapter-number",1)):(t.numeral=i==="part"?mn(this._nextSectionOrdinal):String(this._nextSectionOrdinal),this._nextSectionOrdinal++)}}reindexSections(){this._nextSectionIndex=0,this._nextSectionOrdinal=1;for(const t of this.blocks)t.context==="section"&&(this.assignNumeral(t),t.reindexSections())}findBy(t={},e=null){const i=[],s=t&&typeof t=="object"&&!Array.isArray(t)?t:{},n=typeof e=="function"?e:typeof t=="function"?t:null;try{this.#i(s,i,n)}catch(o){if(!(o instanceof me))throw o}return i}query(t={},e=null){return this.findBy(t,e)}nextAdjacentBlock(){if(this.context==="document")return null;const t=this.getParent();if(t.context==="dlist"&&this.context==="list_item"){const s=t.getItems().findIndex(([o,l])=>o.includes(this)||l===this),n=t.getItems()[s+1];return n||t.nextAdjacentBlock()}const e=t.blocks.indexOf(this),i=t.blocks[e+1];return i||t.nextAdjacentBlock()}#i(t,e,i){const s=t.context??null,n=!s,o=t.style??null,l=t.role??null,a=t.id??null;if((n||s===this.context)&&(!o||o===this.style)&&(!l||this.hasRole(l))&&(!a||a===this.id)){if(i){const c=i(this);if(c)if(c==="prune"){if(e.push(this),a)throw new me;return e}else if(c==="reject"){if(a)throw new me;return e}else{if(c==="stop")throw new me;if(e.push(this),a)throw new me}else if(a)throw new me}else if(e.push(this),a)throw new me}if(this.context==="document"){if(s!=="document"){this.hasHeader?.()&&(n||s==="section")&&this.header.#i(t,e,i);for(const c of this.blocks)s==="section"&&c.context!=="section"||c.#i(t,e,i)}}else if(this.context==="dlist"){if(n||s!=="section")for(const c of this.blocks.flat(1/0))c&&c.#i(t,e,i)}else if(this.context==="table")if(t.traverseDocuments){for(const u of this.rows.head)for(const f of u)f.#i(t,e,i);const c=s==="inner_document"?{...t,context:"document"}:t;for(const u of[...this.rows.body,...this.rows.foot])for(const f of u)f.#i(c,e,i),f.style==="asciidoc"&&f.innerDocument.#i(c,e,i)}else for(const c of[...this.rows.head,...this.rows.body,...this.rows.foot])for(const u of c)u.#i(t,e,i);else for(const c of this.blocks)s==="section"&&c.context!=="section"||c.#i(t,e,i);return e}getContext(){return this.context}getContentModel(){return this.contentModel}setContentModel(t){this.contentModel=t}getNodeName(){return this.nodeName}getBlocks(){return this.blocks}getSections(){return this.sections()}getTitle(){return this.title}setTitle(t){this.title=t??null}getCaption(){return this.caption??void 0}setCaption(t){this.caption=t}getCaptionedTitle(){return this.captionedTitle()}getStyle(){return this.style}setStyle(t){this.style=t}getLevel(){return this.level}setLevel(t){this.level=t}getFile(){return this.file??void 0}getLineNumber(){return this.lineno??void 0}async getXrefText(t=null){return this.xreftext(t)}getSourceLocation(){return this.sourceLocation??void 0}getSubstitutions(){return this.subs}hasSubstitution(t){return this.hasSub(t)}addSubstitution(t){this.subs.includes(t)||this.subs.push(t)}removeSubstitution(t){this.removeSub(t)}}const ce={strictVerbatimParagraphs:!0,attributeMissing:"skip",attributeUndefined:"drop-line",shorthandPropertySyntax:!0,uniqueIdStartIndex:2};class Ct extends te{static create(t=null,e=null,i=!1,s={}){return new Ct(t,e,i,s)}constructor(t=null,e=null,i=!1,s={}){super(t,"section",s),t instanceof Ct?(this.level=e??t.level+1,this.special=t.special):(this.level=e??1,this.special=!1),this.numbered=i,this.index=0,this.sectname=null}get name(){return this.title}hasSections(){return this._nextSectionIndex>0}generateId(){return Ct.generateId(this.title,this.document)}sectnum(t=".",e=null){const i=e!==null?e===!1?"":e:t;return this.level>1&&this.getParent()instanceof Ct?`${this.getParent().sectnum(t,t)}${this.numeral??""}${i}`:`${this.numeral??""}${i}`}async xreftext(t=null){const e=this.reftext;if(e&&e.length>0)return e;if(this._computingTitle)return null;if(await this.precomputeTitle(),t)if(this.numbered){const i=this.sectname;switch(t){case"full":{let s;if(i==="chapter"||i==="appendix")s=this.subPlaceholder(await this.subQuotes("_%s_"),this.title);else{const o=this.document.compatMode?"``%s''":'"`%s`"';s=this.subPlaceholder(await this.subQuotes(o),this.title)}const n=this.document.attributes[`${i}-refsig`];return n?`${n} ${this.sectnum(".",",")} ${s}`:`${this.sectnum(".",",")} ${s}`}case"short":{const s=this.document.attributes[`${this.sectname}-refsig`];return s?`${s} ${this.sectnum(".","")}`:this.sectnum(".","")}default:{const s=this.sectname;return s==="chapter"||s==="appendix"?this.subPlaceholder(await this.subQuotes("_%s_"),this.title):this.title}}}else{const i=this.sectname;return i==="chapter"||i==="appendix"?this.subPlaceholder(await this.subQuotes("_%s_"),this.title):this.title}return this.title}append(t){return t.context==="section"&&this.assignNumeral(t),super.append(t)}getName(){return this.name}getSectionName(){return this.sectname??void 0}setSectionName(t){this.sectname=t}getIndex(){return this.index}setIndex(t){this.index=t}isNumbered(){return this.numbered}isSpecial(){return this.special}setSpecial(t){this.special=t}getNumeral(){return this.numeral}setNumeral(t){this.numeral=t}getSectionNumeral(){return this.sectnum()}getSectionNumber(){return this.sectnum()}toString(){if(this._title){const t=this.numbered?`${this.sectnum()} ${this._title}`:this._title;return`#<Section {level: ${this.level}, title: ${JSON.stringify(t)}, blocks: ${this.blocks.length}}>`}return super.toString()}static generateId(t,e){const i=e.attributes,s=i.idprefix??"_";let n,o,l;const a=i.idseparator;a!=null?a.length===0?(l=!0,n="",o=null):(n=a.length===1?a:i.idseparator=a[0],n==="-"||n==="."?o=" .-":o=` ${n}.-`):(n="_",o=" _.-");let c=`${s}${t.toLowerCase().replace(new RegExp(sa.source,"gu"),"")}`;l?c=c.replace(/ /g,""):(c=kh(c,o,n),c.endsWith(n)&&(c=c.slice(0,-n.length)),s===""&&c.startsWith(n)&&(c=c.slice(n.length)));const u=e.catalog?.refs;if(u&&c in u){let f=ce.uniqueIdStartIndex,h;do h=`${c}${n}${f}`,f++;while(h in u);return h}return c}}function kh(r,t,e){const i=new Set([...t]);let s="",n=!1;for(const o of r)i.has(o)?(n||(s+=e),n=!0):(s+=o,n=!1);return s}class B extends Ie{id;type;target;text;constructor(t,e,i=null,s={}){super(t,e,s),this.nodeName=`inline_${e}`,this.text=i,this.id=s.id??null,this.type=s.type??null,this.target=s.target??null}isBlock(){return!1}isInline(){return!0}async convert(){return this.converter.convert(this)}render(){return this.convert()}content(){return this.text}get alt(){return this.getAttribute("alt")||""}hasReftext(){return!!(this.text&&(this.type==="ref"||this.type==="bibref"))}get reftext(){return this._convertedReftext!==void 0?this._convertedReftext:this.text??null}async precomputeReftext(){const t=this.text;this._convertedReftext=t!=null?await this.applyReftextSubs(t):null}xreftext(t=null){return this.reftext}getText(){return this.text}getType(){return this.type}getTarget(){return this.target}getAlt(){return this.alt}getReftext(){return this.reftext}}class xh{constructor(){this._lists=[],this._listIndex=0,this.nextList()}register(t){const e=this._generateNextCalloutId();return this.getCurrentList().push({ordinal:parseInt(t,10),id:e}),this._coIndex++,e}readNextId(){const t=this.getCurrentList(),e=this._coIndex<=t.length?t[this._coIndex-1].id:null;return this._coIndex++,e}getCalloutIds(t){return this.getCurrentList().filter(i=>i.ordinal===t).map(i=>i.id).join(" ")}getCurrentList(){return this._lists[this._listIndex-1]}getLists(){return this._lists}getListIndex(){return this._listIndex}nextList(){this._listIndex++,this._lists.length<this._listIndex&&this._lists.push([]),this._coIndex=1}rewind(){this._listIndex=1,this._coIndex=1}_generateNextCalloutId(){return`CO${this._listIndex}-${this._coIndex}`}}const Ah=".",ge="..",ri="./",$t="/",Mi="\\",_o="//",yo="uri:classloader:",vh=/^(?:[a-zA-Z]:)?[\\/]/;class jn{constructor(t=null,e=null){this.fileSeparator=t??Sh(),e?this.workingDir=this.root(e)?this.posixify(e):Th(e):this.workingDir=typeof process<"u"?process.cwd():"/",this._partitionPathSys={},this._partitionPathWeb={}}absolutePath(t){return t.startsWith($t)||this.fileSeparator===Mi&&vh.test(t)||xe.test(t)}root(t){return this.absolutePath(t)}unc(t){return t.startsWith(_o)}webRoot(t){return t.startsWith($t)}descendsFrom(t,e){return e===t?0:e===$t?t.startsWith($t)?1:!1:t.startsWith(e+$t)?e.length+1:!1}relativePath(t,e){if(this.root(t)){const i=this.posixify(e),s=this.descendsFrom(t,i);if(s!==!1)return t.slice(s);try{return Lh(t,i)}catch{return t}}return t}posixify(t){return t?this.fileSeparator===Mi&&t.includes(Mi)?t.replace(/\\/g,$t):t:""}expandPath(t){const[e,i]=this.partitionPath(t);if(t.includes(ge)){const s=[];for(const n of e)n===ge?s.pop():s.push(n);return this.joinPath(s,i)}return this.joinPath(e,i)}partitionPath(t,e=!1){const i=e?this._partitionPathWeb:this._partitionPathSys;if(i[t])return i[t];const s=this.posixify(t);let n=null;if(e)this.webRoot(s)?n=$t:s.startsWith(ri)&&(n=ri);else if(this.root(s))if(this.unc(s))n=_o;else if(s.startsWith($t))n=$t;else if(s.startsWith(yo))n=yo;else{const c=this._extractUriPrefix(s);n=Array.isArray(c)?c[1]:s.slice(0,s.indexOf($t)+1)}else s.startsWith(ri)&&(n=ri);const l=(n?s.slice(n.length):s).split($t).filter(c=>c!==Ah);for(;l.length&&l[l.length-1]==="";)l.pop();const a=[l,n];return i[t]=a,a}joinPath(t,e=null){return e?`${e}${t.join($t)}`:t.join($t)}systemPath(t,e=null,i=null,s={}){const n=s.recover!==!1,o=s.targetName??s.target_name??"path";if(i){if(!this.root(i))throw new Error(`Jail is not an absolute path: ${i}`);i=this.posixify(i)}let l;if(t){if(this.root(t)){const h=this.expandPath(t);if(i&&this.descendsFrom(h,i)===!1){if(!n)throw new Pi(`${o} ${t} is outside of jail: ${i} (disallowed in safe mode)`);this.logger.warn(`${o} is outside of jail; recovering automatically`);const[p]=this.partitionPath(h),[d,m]=this.partitionPath(i);return this.joinPath(d.concat(p),m)}return h}[l]=this.partitionPath(t)}else l=[];let a,c,u;if(l.length===0)if(e)if(this.root(e)){if(!i)return this.expandPath(e);e=this.posixify(e)}else[l]=this.partitionPath(e),e=i??this.workingDir;else return i??this.workingDir;else e?this.root(e)?i&&(e=this.posixify(e)):e=`${(i??this.workingDir).replace(/\/$/,"")}/${e}`:e=i??this.workingDir;if(i&&(u=this.descendsFrom(e,i)===!1)&&this.fileSeparator===Mi){const[h,p]=this.partitionPath(e),[d,m]=this.partitionPath(i);if(p!==m){if(!n)throw new Pi(`start path for ${o} ${e} refers to location outside jail root: ${i} (disallowed in safe mode)`);this.logger.warn(`start path for ${o} is outside of jail root; recovering automatically`),a=d,c=m,u=!1}else[a,c]=[h,p]}else[a,c]=this.partitionPath(e);let f=a.concat(l);if(f.includes(ge)){const h=f;if(f=[],i){let p;[p]=this.partitionPath(i);let d=!1;for(const m of h)if(m===ge)if(f.length>p.length)f.pop();else if(n)d||(this.logger.warn(`${o} has illegal reference to ancestor of jail; recovering automatically`),d=!0);else throw new Pi(`${o} ${t} refers to location outside jail: ${i} (disallowed in safe mode)`);else f.push(m)}else for(const p of h)p===ge?f.pop():f.push(p)}if(u){const h=this.joinPath(f,c);if(this.descendsFrom(h,i)!==!1)return h;if(n){this.logger.warn(`${o} is outside of jail; recovering automatically`);const[p]=this.partitionPath(i);return this.joinPath(p.concat(l),c)}else throw new Pi(`${o} ${t} is outside of jail: ${i} (disallowed in safe mode)`)}return this.joinPath(f,c)}webPath(t,e=null){t=this.posixify(t),e=this.posixify(e);let i=null;if(e&&!this.webRoot(t)){const a=`${e}${e.endsWith($t)?"":$t}${t}`,c=this._extractUriPrefix(a);Array.isArray(c)?[t,i]=c:t=c}const[s,n]=this.partitionPath(t,!0),o=[];for(const a of s)a===ge?o.length===0?(!n||n===ri)&&o.push(a):o[o.length-1]===ge?o.push(a):o.pop():o.push(a);let l=this.joinPath(o,n);return l.includes(" ")&&(l=l.replace(/ /g,"%20")),i?`${i}${l}`:l}_extractUriPrefix(t){if(t.includes(":")){const e=t.match(xe);if(e)return[t.slice(e[0].length),e[0]]}return t}get logger(){return Zt.logger}getLogger(){return this.logger}messageWithContext(t,e={}){return _t.AutoFormattingMessage.attach({text:t,...e})}createLogMessage(t,e={}){return this.messageWithContext(t,e)}}wi(jn.prototype);function Sh(){return typeof process<"u"&&process.platform==="win32"?"\\":"/"}function Th(r){if(typeof process>"u")return r;const e=`${process.cwd().replace(/\\/g,"/")}/${r.replace(/\\/g,"/")}`;let i,s;if(e.startsWith("//"))i="//",s=e.slice(2);else if(e.startsWith("/"))i="/",s=e.slice(1);else{const o=e.indexOf("/");i=e.slice(0,o+1),s=e.slice(o+1)}const n=[];for(const o of s.split("/"))o===".."?n.pop():o&&o!=="."&&n.push(o);return i+n.join("/")}function Lh(r,t){const e=r.split("/").filter(Boolean),i=t.split("/").filter(Boolean);let s=0;for(;s<e.length&&s<i.length&&e[s]===i[s];)s++;const n=i.length-s,o=e.slice(s);return[...Array(n).fill(".."),...o].join("/")||"."}class Pi extends Error{constructor(t){super(t),this.name="SecurityError"}}function Bn(r){r._backendTraits=null;const t=(e,i)=>{const s=Object.getOwnPropertyDescriptor(r,e);s&&typeof s.value!="function"||(r[e]=i)};t("basebackend",function(e=null){if(e){const i=this._backendTraits??={};i.basebackend=e;const s=gi(e);return i.outfilesuffix||(i.outfilesuffix=s.outfilesuffix),i.filetype||(i.filetype=s.filetype),s.htmlsyntax&&!i.htmlsyntax&&(i.htmlsyntax=s.htmlsyntax),e}return this._getBackendTraits().basebackend}),t("filetype",function(e=null){return e?this._getBackendTraits().filetype=e:this._getBackendTraits().filetype}),t("htmlsyntax",function(e=null){return e?this._getBackendTraits().htmlsyntax=e:this._getBackendTraits().htmlsyntax}),t("outfilesuffix",function(e=null){return e?this._getBackendTraits().outfilesuffix=e:this._getBackendTraits().outfilesuffix}),r.supportsTemplates=function(e=!0){this._getBackendTraits().supportsTemplates=e},r.supportsTemplates.call=(e=!0)=>r.supportsTemplates(e),r.hasSupportsTemplates=function(){return!!this._getBackendTraits().supportsTemplates},r.initBackendTraits=function(e=null){this._backendTraits=e??{}},r._getBackendTraits=function(e=null){return this._backendTraits??=gi(this.backend,e)},r.backendInfo=r._getBackendTraits}function gi(r,t=null){if(!r)return{};const e=t??r.replace(ju,"");let i=Vu[e],s;i?s=i.slice(1):(s=e,i=`.${s}`);const n={basebackend:e,filetype:s,outfilesuffix:i};return s==="html"&&(n.htmlsyntax="html"),n}function _a(r,t){if(!r||typeof r._getBackendTraits=="function")return r;let e=null;return r.backendTraits&&typeof r.backendTraits=="object"?e={...r.backendTraits}:(r.basebackend||r.outfilesuffix||r.filetype||r.htmlsyntax)&&(e={},r.basebackend&&(e.basebackend=r.basebackend),r.outfilesuffix&&(e.outfilesuffix=r.outfilesuffix),r.filetype&&(e.filetype=r.filetype),r.htmlsyntax&&(e.htmlsyntax=r.htmlsyntax)),Bn(r),e?r._backendTraits=e:t&&!("backend"in r)&&(r._backendTraits=gi(t)),r}let ya=class{constructor(t=null){if(this._registry={},this._catchAll=null,t){const e=t["*"];delete t["*"],e&&(this._catchAll=e),Object.assign(this._registry,t)}}register(t,...e){e.length===1&&Array.isArray(e[0])&&(e=e[0]);for(const i of e)i==="*"?this._catchAll=t:this._registry[i]=t}for(t){return this._registry[t]??this._catchAll??void 0}createSync(t,e={}){let i=this.for(t);return i?(typeof i=="function"&&i.prototype&&(i=new i(t,e)),_a(i,t)):null}async create(t,e={}){let i=this.for(t);if(i){typeof i=="function"&&i.prototype&&(i=new i(t,e));const n=e.template_dirs;if(n&&typeof i.hasSupportsTemplates=="function"&&i.hasSupportsTemplates()){const{CompositeConverter:o}=await Promise.resolve().then(function(){return xn}),{TemplateConverter:l}=await Promise.resolve().then(function(){return di});return new o(t,await l.create(t,n,e),i,{backendTraitsSource:i})}return i}const s=e.template_dirs;if(s){const n=e.delegate_backend;if(n){let l=this.for(n);if(l){typeof l=="function"&&l.prototype&&(l=new l(n,e));const{CompositeConverter:a}=await Promise.resolve().then(function(){return xn}),{TemplateConverter:c}=await Promise.resolve().then(function(){return di});return new a(t,await c.create(t,s,e),l,{backendTraitsSource:l})}}const{TemplateConverter:o}=await Promise.resolve().then(function(){return di});return await o.create(t,s,e)}return null}converters(){return{...this._registry}}unregisterAll(){this._registry={},this._catchAll=null}};async function Eh(r){return r==="html5"?Promise.resolve().then(function(){return Of}):r==="semantic-html5"?Promise.resolve().then(function(){return Wf}):r==="docbook5"?Promise.resolve().then(function(){return Xf}):r==="manpage"?Promise.resolve().then(function(){return ap}):null}let Rh=class extends ya{constructor(){super(),this._defaultRegistry={}}register(t,...e){e.length===1&&Array.isArray(e[0])&&(e=e[0]);for(const i of e)i==="*"?this._catchAll=t:this._registry[i]=t}for(t){return this._registry[t]??this._defaultRegistry[t]??this._catchAll??void 0}getRegistry(){return{...this._defaultRegistry,...this._registry}}getDefault(){return this}createSync(t,e={}){let i=this._registry[t]??this._defaultRegistry[t]??this._catchAll;return i?(typeof i=="function"&&i.prototype&&(i=new i(t,e)),_a(i,t)):null}async create(t,e={}){let i=this._registry[t]??this._defaultRegistry[t];if(!i){const n=await Eh(t);n&&(i=n.default??Object.values(n)[0],i&&(this._defaultRegistry[t]=i))}if(i||(i=this._catchAll),!i){const n=e.template_dirs;if(n){const{TemplateConverter:o}=await Promise.resolve().then(function(){return di});return await o.create(t,n,e)}return null}typeof i=="function"&&i.prototype&&(i=new i(t,e));const s=e.template_dirs;if(s&&typeof i.hasSupportsTemplates=="function"&&i.hasSupportsTemplates()){const{CompositeConverter:n}=await Promise.resolve().then(function(){return xn}),{TemplateConverter:o}=await Promise.resolve().then(function(){return di});return new n(t,await o.create(t,s,e),i,{backendTraitsSource:i})}return i}unregisterAll(){this._registry={},this._catchAll=null}};const bi=new Rh;bi.deriveBackendTraits=gi;class ns{constructor(t,e={}){this.backend=t,Bn(this),wi(this)}get logger(){return Zt.logger}getLogger(){return this.logger}messageWithContext(t,e={}){return _t.AutoFormattingMessage.attach({text:t,...e})}createLogMessage(t,e={}){return this.messageWithContext(t,e)}convert(t,e=null,i=null){const s=`convert_${e??t.nodeName}`;return typeof this[s]=="function"?i?this[s](t,i):this[s](t):(this.logger.warn(`missing convert handler for ${e??t.nodeName} node in ${this.backend} backend (${this.constructor.name})`),null)}handles(t){return typeof this[`convert_${t}`]=="function"}async contentOnly(t){return t.content()}skip(t){}static registerFor(...t){bi.register(this,...t.map(String))}}class wa{constructor(t,e="html5",i={}){this.name=t,this._preClass=t}hasDocinfo(t){return!1}docinfo(t,e,i){throw new Error(`${this.constructor.name} must implement docinfo() since hasDocinfo() returns true`)}handlesHighlighting(){return!1}highlight(t,e,i,s){throw new Error(`${this.constructor.name} must implement highlight() since handlesHighlighting() returns true`)}format(t,e,i){const s=i.nowrap?`${this._preClass} highlight nowrap`:`${this._preClass} highlight`;return t.content().then(n=>{const o=i.transformContent?i.transformContent(n):n,l=i.transform;if(l){const a={class:s},c=e?{"data-lang":e}:{};l(a,c);const u=c["data-lang"];delete c["data-lang"],u&&(c["data-lang"]=u);const f=Object.entries(a).map(([p,d])=>` ${p}="${d}"`).join(""),h=Object.entries(c).map(([p,d])=>` ${p}="${d}"`).join("");return`<pre${f}><code${h}>${o}</code></pre>`}return`<pre class="${s}"><code${e?` data-lang="${e}"`:""}>${o}</code></pre>`})}writeStylesheet(t){return!1}writeStylesheetToDisk(t,e){throw new Error(`${this.constructor.name} must implement writeStylesheetToDisk() since writeStylesheet() returns true`)}}class ka{constructor(t=null){this._registry=t?{...t}:{}}register(t,...e){for(const i of e)this._registry[i]=t}for(t){return this._registry[t]??null}create(t,e="html5",i={}){let s=this.for(t);if(!s)return null;if(typeof s=="function"&&s.prototype&&(s=new s(t,e,i)),!s.name)throw new Error(`${s.constructor.name} must specify a value for 'name'`);return s}}class Ih extends ka{constructor(t,e){super(t),this._fallback=e}for(t){return Object.hasOwn(this._registry,t)?this._registry[t]:this._fallback.for(t)}}class Oh extends ka{constructor(){super(),this._defaultRegistry={}}register(t,...e){for(const i of e)this._defaultRegistry[i]=t}for(t){return this._registry[t]??this._defaultRegistry[t]??null}get(t){return this.for(t)??void 0}create(t,e="html5",i={}){let s=this.for(t);if(!s)return null;if(typeof s=="function"&&s.prototype&&(s=new s(t,e,i)),!s.name)throw new Error(`${s.constructor.name} must specify a value for 'name'`);return s}unregisterAll(){this._registry={}}}const Zi=new Oh;function wo(r,t,e){const i=r._document,s=t.includes(" ")?`pass:c[${t}]`:t,n=i.hasAttribute("compat-mode")?e??"":`role=include${e?`,${e}`:""}`;return`link:${s}[${n}]`}function Ch(r,t,e){const i=r._document,s=i.pathResolver,n=t.replace(/\\/g,"/"),o=i.baseDir,l=r.includeStack.length===0,a=l?o:r._dir;let c,u;if(n.startsWith("file://"))c=u=n;else if(vt(n)){if(s.descendsFrom(n,o)===!1&&!i.hasAttribute("allow-uri-read"))return r.replaceNextLine(wo(r,t,e));c=u=n}else if(s.absolutePath(n))c=u=`file://${n.startsWith("/")?"":"/"}${n}`;else if(a===".")c=u=n;else if(a.startsWith("file://")||!vt(a))if(c=`${a}/${n}`,l)u=n;else{const f=s.descendsFrom(c,o);o==="."||f===!1?u=c:u=c.slice(f)}else if(l)c=`${a}/${u=n}`;else{const f=s.descendsFrom(a,o);if(f!==!1||i.hasAttribute("allow-uri-read"))c=`${a}/${n}`,u=f!==!1?c.slice(f):n;else return r.replaceNextLine(wo(r,t,e))}return[c,u]}function Ji(r){if(!r)return".";const t=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));return t<0?".":t===0?"/":r.slice(0,t)}function bn(r){const t=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));return r?r.slice(t+1):""}function Dh(r,t,e=0){if(r.length===0)return;let i=null;for(const s of r){if(s==="")continue;const n=s.length-s.trimStart().length;if(n===0){i=null;break}(i===null||n<i)&&(i=n)}if(t===0){if(i)for(let s=0;s<r.length;s++)r[s]!==""&&(r[s]=r[s].slice(i))}else{const s=" ".repeat(t);for(let n=0;n<r.length;n++)r[n]!==""&&(r[n]=i?s+r[n].slice(i):s+r[n])}}class Qt{constructor(t,e=null,i=null,s=1){this.file=t,this.dir=e,this.path=i,this.lineno=s}advance(t){this.lineno+=t}get lineInfo(){return`${this.path}: line ${this.lineno}`}toString(){return this.lineInfo}getLineNumber(){return this.lineno}getFile(){return this.file??void 0}getDirectory(){return this.dir}getPath(){return this.path}getLineInfo(){return this.lineInfo}}class Kt{_dir;_document;_lines;_lookAhead;_unescapeNextLine;_saved;#t=null;constructor(t=null,e=null,i={}){e?typeof e=="string"?(this.file=e,this._dir=Ji(e),this.path=bn(e),this.lineno=1):((this.file=e.file)?(this._dir=e.dir||Ji(this.file),this.path=e.path||bn(this.file)):(this._dir=e.dir||".",this.path=e.path||"<stdin>"),this.lineno=e.lineno||1):(this.file=null,this._dir=".",this.path="<stdin>",this.lineno=1),i.document&&(this._document=i.document),this.sourceLines=this._prepareLines(t,i),this._lines=this.sourceLines.slice().reverse(),this._lookAhead=0,this.processLines=!0,this._unescapeNextLine=!1,this.unterminated=null,this._saved=null}hasMoreLines(){return this._lines.length===0?(this._lookAhead=0,!1):!0}empty(){return this._lines.length===0?(this._lookAhead=0,!0):!1}eof(){return this.empty()}async nextLineEmpty(){return!await this.peekLine()}async isNextLineEmpty(){return await this.nextLineEmpty()}async peekLine(t=!1){for(;;){const e=this._lines[this._lines.length-1];if(t||this._lookAhead>0)return this._unescapeNextLine?e.slice(1):e;if(e!==void 0){const i=await this.processLine(e);if(i!=null)return i}else{this._lookAhead=0;return}}}async peekLines(t=null,e=!1){const i=this._lookAhead,s=[],n=t??Fu;for(let o=0;o<n;o++){const l=e?this._shift():await this.readLine();if(l!==void 0)s.push(l);else{e&&this.lineno--;break}}return s.length>0&&(this._unshiftAll(s),e&&(this._lookAhead=i)),s}async readLine(){return this._lookAhead>0||await this.hasMoreLines()?this._shift():void 0}async readLines(){const t=[];for(;await this.hasMoreLines();)t.push(this._shift());return t}async readlines(){return await this.readLines()}async read(){return(await this.readLines()).join(S)}async advance(){return this._shift()!==void 0}unshiftLine(t){this._unshift(t)}restoreLine(t){this._unshift(t)}unshiftLines(t){this._unshiftAll(t)}restoreLines(t){this._unshiftAll(t)}replaceNextLine(t){return this._shift(),this._unshift(t),!0}replaceLine(t){return this.replaceNextLine(t)}async skipBlankLines(){if(await this.empty())return;let t=0,e;for(;(e=await this.peekLine())!==void 0;){if(String(e)!=="")return t;this._shift(),t++}}async skipCommentLines(){if(await this.empty())return;let t;for(;(t=await this.peekLine())!==void 0&&t!==""&&t.startsWith("//");)if(t.startsWith("///")){const e=t.length;if(!(e>3&&t==="/".repeat(e)))break;await this.readLinesUntil({terminator:t,skipFirstLine:!0,readLastLine:!0,skipProcessing:!0,context:"comment"})}else this._shift()}async skipLineComments(){if(await this.empty())return[];const t=[];let e;for(;(e=await this.peekLine())!==void 0&&e!==""&&e.startsWith("//");)t.push(this._shift());return t}terminate(){this.lineno+=this._lines.length,this._lines.length=0,this._lookAhead=0}async readLinesUntil(t={},e=null){const i=[];let s=!1;this.processLines&&(t.skipProcessing||t.skip_processing)&&(this.processLines=!1,s=!0);const n=t.terminator??null;let o,l,a;n?(o=t.cursor||this.cursor,l=!1,a=!1):(l=t.breakOnBlankLines||t.break_on_blank_lines||!1,a=t.breakOnListContinuation||t.break_on_list_continuation||!1);const c=t.skipLineComments||t.skip_line_comments||!1;let u=!1,f=!1,h;for((t.skipFirstLine||t.skip_first_line)&&this._shift();(h=await this.readLine())!==void 0;){let p=!1;if(n?p=h===n:l&&h===""?p=!0:a&&u&&h===Ki?(t.preserveLastLine=t.preserve_last_line=!0,p=!0):e?.(h)&&(p=!0),p){(t.readLastLine||t.read_last_line)&&i.push(h),(t.preserveLastLine||t.preserve_last_line)&&(this._unshift(h),f=!0);break}c&&h.startsWith("//")&&!h.startsWith("///")||(i.push(h),u=!0)}if(s&&(this.processLines=!0,f&&!n&&this._lookAhead--),n&&n!==h){const p="context"in t?t.context:n;if(p){const d=o==="at_mark"?this.cursorAtMark():o;this._logWarn(`unterminated ${p} block`,{sourceLocation:d}),this.unterminated=!0}}return i}get cursor(){return new Qt(this.file,this._dir,this.path,this.lineno)}cursorAtLine(t){return new Qt(this.file,this._dir,this.path,t)}cursorAtMark(){return this.#t?new Qt(...this.#t):this.cursor}cursorBeforeMark(){if(this.#t){const[t,e,i,s]=this.#t;return new Qt(t,e,i,s-1)}return new Qt(this.file,this._dir,this.path,this.lineno-1)}cursorAtPrevLine(){return new Qt(this.file,this._dir,this.path,this.lineno-1)}mark(){this.#t=[this.file,this._dir,this.path,this.lineno]}lineInfo(){return`${this.path}: line ${this.lineno}`}get lines(){const t=this._lines,e=t.slice().reverse();return new Proxy(e,{set(i,s,n){i[s]=n;const o=parseInt(s,10);return!Number.isNaN(o)&&o>=0&&o<t.length&&(t[t.length-1-o]=n),!0}})}string(){return this._lines.slice().reverse().join(S)}source(){return this.sourceLines.join(S)}save(){this._saved={file:this.file,dir:this._dir,path:this.path,lineno:this.lineno,lines:[...this._lines],mark:this.#t,lookAhead:this._lookAhead,processLines:this.processLines,unescapeNextLine:this._unescapeNextLine,unterminated:this.unterminated}}restoreSave(){if(!this._saved)return;const t=this._saved;this.file=t.file,this._dir=t.dir,this.path=t.path,this.lineno=t.lineno,this._lines=t.lines,this.#t=t.mark,this._lookAhead=t.lookAhead,this.processLines=t.processLines,this._unescapeNextLine=t.unescapeNextLine,this.unterminated=t.unterminated,this._saved=null}discardSave(){this._saved=null}toString(){return`#<Reader {path: ${JSON.stringify(this.path)}, line: ${this.lineno}}>`}_shift(){return this.lineno++,this._lookAhead>0&&this._lookAhead--,this._lines.pop()}_unshift(t){this.lineno--,this._lookAhead++,this._lines.push(t)}_unshiftAll(t){this.lineno-=t.length,this._lookAhead+=t.length,this._lines.push(...t.slice().reverse())}processLine(t){return this.processLines&&this._lookAhead++,t}_prepareLines(t,e={}){const i=e.normalize;if(i){const s=i!=="chomp";return Array.isArray(t)?fh(t,s):hi(t!=null?String(t):"",s)}if(Array.isArray(t))return[...t];if(t!=null){let s=String(t);return s.includes("\r")&&(s=s.replace(/\r\n/g,`
|
|
74
|
+
`).replace(/\r/g,`
|
|
75
|
+
`)),s.replace(/\n$/,"").split(`
|
|
76
|
+
`)}return[]}getCursor(){return this.cursor}getLines(){return this.sourceLines}getString(){return this.source()}getLogger(){return this._document?.logger??Zt.logger}createLogMessage(t,e={}){return _t.AutoFormattingMessage.attach({text:t,...e})}get logger(){return this._document?.logger??console}_logWarn(t,e={}){this.logger.warn(this._messageWithContext(t,e))}_logError(t,e={}){this.logger.error(this._messageWithContext(t,e))}_logInfo(t,e={}){this.logger.info(this._messageWithContext(t,e))}_messageWithContext(t,{sourceLocation:e,includeLocation:i}={}){return!e&&!i?t:_t.AutoFormattingMessage.attach({text:t,source_location:e??null,include_location:i??null})}}class $n extends Kt{#t;#e;#s;#i;#n;#r;constructor(t,e=null,i=null,s={}){"skip-front-matter"in t.attributes&&!("skipFrontMatter"in s)&&(s={...s,skipFrontMatter:!0}),s.document||(s={...s,document:t}),super(e,i,s),this._document=t,this.#t=t.sourcemap;const n=parseInt(t.attributes["max-include-depth"]??64,10);this.#e=n>0?{abs:n,curr:n,rel:n}:null,this.includeStack=[],this.#s=t.catalog.includes,this.#i=!1,this.#n=[],this.#r=null}get logger(){return this._document?.logger??console}async hasMoreLines(){return await this.peekLine()!==void 0}async empty(){return await this.peekLine()===void 0}async eof(){return await this.empty()}async peekLine(t=!1){const e=await super.peekLine(t);if(e!==void 0)return e;if(this.includeStack.length===0){let i=null;this.#n=this.#n.filter(s=>{const n=s.sourceLocation||(i??=this.cursorAtPrevLine());return this._logError(`detected unterminated preprocessor conditional directive: ${s.name}::${s.target||""}[${s.expr||""}]`,{sourceLocation:n}),!1});return}return this.#c(),await this.peekLine(t)}_shift(){return this._unescapeNextLine?(this._unescapeNextLine=!1,super._shift().slice(1)):super._shift()}pushInclude(t,e=null,i=null,s=1,n={}){if(this.includeStack.push([this._lines,this.file,this._dir,this.path,this.lineno,this.#e,this.processLines]),this.file=e){this._dir=Ji(String(e)),this.path=i||bn(String(e));const o=String(e);if(this.processLines=Object.keys(ha).some(l=>o.endsWith(l))){const l=this.path.slice(0,this.path.lastIndexOf("."));this.#s[l]??="partial-option"in n?null:!0}}else this._dir=".",this.processLines=!0,(this.path=i)?this.#s[ph(this.path)]??="partial-option"in n?null:!0:this.path="<stdin>";if(this.lineno=s,this.#e&&"depth"in n){const o=parseInt(n.depth,10);if(o>0){const l=this.#e.abs;let a=this.includeStack.length+o,c=o;a>l&&(a=c=l),this.#e={abs:l,curr:a,rel:c}}else this.#e={abs:this.#e.abs,curr:this.includeStack.length,rel:0}}if(this._lines=this._prepareLines(t,{include:!0,normalize:this.processLines||"chomp",indent:n.indent,skipFrontMatter:"skip-front-matter-option"in n}),this._lines.length===0)this.#c();else if("leveloffset"in n){const o=this._document.getAttribute("leveloffset"),l=o?`:leveloffset: ${o}`:":leveloffset!:",a=`:leveloffset: ${n.leveloffset}`;this._lines=[l,"",...this._lines.slice().reverse(),"",a],this.lineno-=2}else this._lines.reverse();return this._lookAhead=0,this}get includeDepth(){return this.includeStack.length}exceedsMaxDepth(){return this.#e&&this.includeStack.length>=this.#e.curr&&this.#e.rel}exceededMaxDepth(){return this.exceedsMaxDepth()}hasIncludeProcessors(){if(this.#r===null){const t=this._document.extensions;if(t&&(this.#r=t.includeProcessors?.()))return!0;this.#r=!1}return this.#r!==!1}createIncludeCursor(t,e,i){return new Qt(String(t),Ji(String(t)),e,i)}toString(){return`#<PreprocessorReader {path: ${JSON.stringify(this.path)}, line: ${this.lineno}, include depth: ${this.includeStack.length}}>`}save(){super.save(),Object.assign(this._saved,{maxdepth:this.#e,skipping:this.#i,conditionalStack:this.#n.map(t=>({...t})),includeStack:[...this.includeStack]})}restoreSave(){this._saved&&(this.#e=this._saved.maxdepth,this.#i=this._saved.skipping,this.#n=this._saved.conditionalStack,this.includeStack=this._saved.includeStack,super.restoreSave())}_prepareLines(t,e={}){const i=super._prepareLines(t,e);if(e.skipFrontMatter){const s=this._skipFrontMatter(i);s!==null&&!e.include&&(this._document.attributes["front-matter"]=s.join(S))}if(e.include){if(e.indent!=null){const s=parseInt(e.indent,10)||0,n=parseInt(this._document.getAttribute("tabsize")??0,10);Dh(i,s,n)}}else for(;i.length>0&&i[i.length-1]==="";)i.pop();return i}async processLine(t){if(!this.processLines)return t;if(t===""){if(this.#i){super._shift();return}return this._lookAhead++,t}if(t.endsWith("]")&&!t.startsWith("[")&&t.includes("::")){if(t.includes("if")){const e=Qc.exec(t);if(e){const[,i,s,n,o,l]=e;if(i==="\\")return this._unescapeNextLine=!0,this._lookAhead++,t.slice(1);if(this.#h(s,n||"",o||null,l||null)){super._shift();return}return this._lookAhead++,t}}if(this.#i){super._shift();return}if(t.startsWith("inc")||t.startsWith("\\inc")){const e=Kc.exec(t);if(e){const[,i,s,n]=e;return i==="\\"?(this._unescapeNextLine=!0,this._lookAhead++,t.slice(1)):await this.#a(s,n??null)?void 0:(this._lookAhead++,t)}}return this._lookAhead++,t}if(this.#i){super._shift();return}return this._lookAhead++,t}#h(t,e,i,s){const n=e==="";if(n||(e=e.toLowerCase()),t==="endif"){if(s)this._logError(`malformed preprocessor directive - text not permitted: endif::${e}[${s}]`,{sourceLocation:this.cursor});else if(this.#n.length===0)this._logError(`unmatched preprocessor directive: endif::${e}[]`,{sourceLocation:this.cursor});else{const l=this.#n[this.#n.length-1];n||e===l.target?(this.#n.pop(),this.#i=this.#n.length===0?!1:this.#n[this.#n.length-1].skipping):this._logError(`mismatched preprocessor directive: endif::${e}[], expected endif::${l.target||""}[]`,{sourceLocation:this.cursor})}return!0}let o;if(this.#i){if(t==="ifeval"){if(!(n&&s&&Kr.test(s.trim())))return!0}else if(n)return!0;o=!1}else{const l=this._document.attributes;if(t==="ifdef"){if(n)return this._logError(`malformed preprocessor directive - missing target: ifdef::[${s}]`,{sourceLocation:this.cursor}),!0;o=i===","?!e.split(",").some(a=>a in l):i==="+"?e.split("+").some(a=>!(a in l)):!(e in l)}else if(t==="ifndef"){if(n)return this._logError(`malformed preprocessor directive - missing target: ifndef::[${s}]`,{sourceLocation:this.cursor}),!0;o=i===","?e.split(",").some(a=>a in l):i==="+"?e.split("+").every(a=>a in l):e in l}else if(t==="ifeval"){if(!n)return this._logError(`malformed preprocessor directive - target not permitted: ifeval::${e}[${s}]`,{sourceLocation:this.cursor}),!0;const a=s&&Kr.exec(s.trim());if(a)try{o=!this.#m(this.#p(a[1]),a[2],this.#p(a[3]))}catch{o=!0}else return this._logError(`malformed preprocessor directive - ${s?"invalid expression":"missing expression"}: ifeval::[${s}]`,{sourceLocation:this.cursor}),!0}}return t==="ifeval"?(o&&(this.#i=!0),this.#n.push({name:t,expr:s,skip:o,skipping:this.#i,sourceLocation:this.#t?this.cursor:null})):s?!this.#i&&!o&&(this.replaceNextLine(s.trimEnd()),this._lines.push(""),s.startsWith("include::")&&this._lookAhead--):(o&&(this.#i=!0),this.#n.push({name:t,target:e,skip:o,skipping:this.#i,sourceLocation:this.#t?this.cursor:null})),!0}async#a(t,e){const i=await mi(),s=this._document;let n=t;if(n.includes(nt)){const p=s.attributes["attribute-missing"]||ce.attribute_missing;if(n=s.subAttributes(t,{attributeMissing:p==="warn"?"drop-line":p}),n==="")return"optional-option"in(e?await s.parseAttributes(e,[],{subInput:!0}):{})?(this._logInfo(`optional include dropped because resolved target is blank: include::${t}[${e??""}]`,{sourceLocation:this.cursor}),super._shift(),!0):p==="drop-line"?(this._logInfo(`include dropped due to missing attribute: include::${t}[${e??""}]`,{sourceLocation:this.cursor}),super._shift(),!0):(this._logWarn(`include dropped because resolved target is blank: include::${t}[${e??""}]`,{sourceLocation:this.cursor}),this.replaceNextLine(`Unresolved directive in ${this.path} - include::${t}[${e??""}]`))}if(this.hasIncludeProcessors()){const p=this.#r.find(d=>d.instance.handles(s,n));if(p){super._shift();const d=e?await s.parseAttributes(e,[],{subInput:!0}):{};return await p.processMethod(s,this,n,d),!0}}if(s.safe>=at.SECURE){const p=n.includes(" ")?`pass:c[${n}]`:n,d=s.hasAttribute("compat-mode")?e??"":`role=include${e?`,${e}`:""}`;return this.replaceNextLine(`link:${p}[${d}]`)}if(!this.#e)return;if(this.includeStack.length>=this.#e.curr){this._logError(`maximum include depth of ${this.#e.rel} exceeded`,{sourceLocation:this.cursor});return}const o=e?await s.parseAttributes(e,[],{subInput:!0}):{},l=await this.#f(n,e,o);if(!Array.isArray(l))return l;const[a,c,u]=l;let f=null,h=null;if(e){if("lines"in o&&o.lines!==""){f=[];for(const p of this.#d(o.lines))if(p.includes("..")){const d=p.indexOf(".."),m=parseInt(p.slice(0,d),10),b=p.slice(d+2);if(b===""||parseInt(b,10)<0)f.push(m,1/0);else{const _=parseInt(b,10);for(let $=m;$<=_;$++)f.push($)}}else f.push(parseInt(p,10));f=f.length>0?[...new Set(f)].sort((p,d)=>p-d):null}else if("tag"in o){const p=o.tag;p&&p!=="!"&&(h=p.startsWith("!")?{[p.slice(1)]:!1}:{[p]:!0})}else if("tags"in o){h=Object.create(null);for(const p of this.#d(o.tags))p&&p!=="!"&&(h[p.startsWith("!")?p.slice(1):p]=!p.startsWith("!"));Object.keys(h).length===0&&(h=null)}}if(c==="uri"){let p;try{const d=await gn(a,this._document);if(!d.ok)throw new Error(`HTTP ${d.status} ${d.statusText}`);p=await d.text(),super._shift()}catch(d){return"optional-option"in o?(this._logInfo(`optional include dropped because include URI not readable: ${a}`,{sourceLocation:this.cursor}),super._shift(),!0):(this._logError(`include URI not readable: ${a} (${d.message})`,{sourceLocation:this.cursor}),this.replaceNextLine(`Unresolved directive in ${this.path} - include::${n}[${e??""}]`))}if(f){const{incLines:d,incOffset:m}=this.#o(p.split(`
|
|
77
|
+
`),f);m!==null&&(o["partial-option"]="",this.pushInclude(d,a,u,m,o))}else if(h){const{incLines:d,incOffset:m}=this.#u(p.split(`
|
|
78
|
+
`),a,n,c,h,o);m!==null&&this.pushInclude(d,a,u,m,o)}else this.pushInclude(p,a,u,1,o);return!0}try{if(f){const p=(await i.readFile(a,"utf8")).split(`
|
|
79
|
+
`);super._shift();const{incLines:d,incOffset:m}=this.#o(p,f);m!==null&&(o["partial-option"]="",this.pushInclude(d,a,u,m,o))}else if(h){const p=(await i.readFile(a,"utf8")).split(`
|
|
80
|
+
`);super._shift();const{incLines:d,incOffset:m}=this.#u(p,a,n,c,h,o);m!==null&&this.pushInclude(d,a,u,m,o)}else{let p;try{p=await i.readFile(a,"utf8"),super._shift()}catch{return this._logError(`include ${c} not readable: ${a}`,{sourceLocation:this.cursor}),this.replaceNextLine(`Unresolved directive in ${this.path} - include::${n}[${e??""}]`)}this.pushInclude(p,a,u,1,o)}}catch{return this._logError(`include ${c} not readable: ${a}`,{sourceLocation:this.cursor}),this.replaceNextLine(`Unresolved directive in ${this.path} - include::${n}[${e??""}]`)}return!0}#l(){if(!yh())return!0;const t=this._document.baseDir;return!!t&&t!=="."&&(t.startsWith("file://")||vt(t))}async#f(t,e,i){const s=this._document;if(this.#l()){const l=Ch(this,t,e);if(!Array.isArray(l))return l;const[a,c]=l;return[a,"uri",c]}if(vt(t)||typeof this._dir!="string"){if(!s.hasAttribute("allow-uri-read")){this._logWarn(`cannot include contents of URI: ${t} (allow-uri-read attribute not enabled)`,{sourceLocation:this.cursor});const l=t.includes(" ")?`pass:c[${t}]`:t,a=s.hasAttribute("compat-mode")?e??"":`role=include${e?`,${e}`:""}`;return this.replaceNextLine(`link:${l}[${a}]`)}return[t,"uri",t]}const n=s.normalizeSystemPath(t,this._dir,null,{targetName:"include file"});if(!await wh(n))return"optional-option"in i?(this._logInfo(`optional include dropped because include file not found: ${n}`,{sourceLocation:this.cursor}),super._shift(),!0):(this._logError(`include file not found: ${n}`,{sourceLocation:this.cursor}),this.replaceNextLine(`Unresolved directive in ${this.path} - include::${t}[${e??""}]`));const o=s.pathResolver.relativePath(n,s.baseDir);return[n,"file",o]}#c(){this.includeStack.length!==0&&([this._lines,this.file,this._dir,this.path,this.lineno,this.#e,this.processLines]=this.includeStack.pop(),this._lookAhead=0)}#o(t,e){const i=[...e],s=[];let n=null,o=!1;for(let l=0;l<t.length;l++){const a=l+1,c=t[l]+(l<t.length-1?`
|
|
81
|
+
`:"");if(o||i[0]===1/0&&(o=!0))n??=a,s.push(c);else if(i[0]===a&&(n??=a,s.push(c),i.shift(),i.length===0))break}return{incLines:s,incOffset:n}}#u(t,e,i,s,n,o){const l={...n};let a,c,u;"**"in l?(a=c=l["**"],delete l["**"],"*"in l?(u=l["*"],delete l["*"]):!a&&Object.values(l)[0]===!1&&(u=!0)):"*"in l?(Object.keys(l)[0]==="*"?a=c=!(u=l["*"]):(a=c=!1,u=l["*"]),delete l["*"]):a=c=!Object.values(l).includes(!0);const f=[];let h=null;const p=[],d=new Set;let m=null;for(let _=0;_<t.length;_++){const $=_+1,E=t[_]+(_<t.length-1?`
|
|
82
|
+
`:"");if(E.includes("::")&&E.includes("[]")){const k=Zc.exec(E);if(k){const[,v,L]=k;if(v){if(L===m)p.pop(),[m,a]=p.length===0?[null,c]:p[p.length-1];else if(Object.hasOwn(l,L)){const R=this.createIncludeCursor(e,i,$),I=p.findLastIndex(([C])=>C===L);I>=0?(p.splice(I,1),this._logWarn(`mismatched end tag (expected '${m}' but found '${L}') at line ${$} of include ${s}: ${e}`,{sourceLocation:this.cursor,includeLocation:R})):this._logWarn(`unexpected end tag '${L}' at line ${$} of include ${s}: ${e}`,{sourceLocation:this.cursor,includeLocation:R})}}else Object.hasOwn(l,L)?((a=l[L])&&d.add(L),p.push([m=L,a,$])):u!==void 0&&(a=m&&!a?!1:u,p.push([m=L,a,$]));continue}}a&&(h??=$,f.push(E))}for(const[_,,$]of p){const E=this.createIncludeCursor(e,i,$);this._logWarn(`detected unclosed tag '${_}' starting at line ${$} of include ${s}: ${e}`,{sourceLocation:this.cursor,includeLocation:E})}const b=Object.entries(l).filter(([,_])=>_).map(([_])=>_).filter(_=>!d.has(_));return b.length>0&&this._logWarn(`tag${b.length>1?"s":""} '${b.join(", ")}' not found in include ${s}: ${e}`,{sourceLocation:this.cursor}),(!c||u===!1||Object.keys(l).length>0)&&(o["partial-option"]=""),{incLines:f,incOffset:h}}_skipFrontMatter(t,e=!0){const i=t[0];if(i!=="---"&&i!=="+++")return null;const s=[...t];t.shift();const n=[];e&&this.lineno++;let o=!1;for(;!(o=t.length===0)&&t[0]!==i;)n.push(t.shift()),e&&this.lineno++;return o?(t.length=0,t.push(...s),e&&(this.lineno-=s.length),null):(t.shift(),e&&this.lineno++,n)}#p(t){let e=!1;return(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(e=!0,t=t.slice(1,t.length-1)),t.includes(nt)&&(t=this._document.subAttributes(t,{attributeMissing:"drop"})),e?t:t===""?null:t==="true"?!0:t==="false"?!1:t.trimEnd()===""?" ":t.includes(".")?parseFloat(t):parseInt(t,10)}#m(t,e,i){if(typeof t=="boolean"!=(typeof i=="boolean"))throw new TypeError("incompatible operand types");return e==="=="?t===i:e==="!="?t!==i:e==="<"?t<i:e===">"?t>i:e==="<="?t<=i:e===">="?t>=i:!1}#d(t){return t.includes(",")?t.split(","):t.split(";")}getIncludeDepth(){return this.includeDepth}}const Mh=new Proxy({audio:"empty",image:"empty",listing:"verbatim",literal:"verbatim",stem:"raw",open:"compound",page_break:"empty",pass:"raw",thematic_break:"empty",video:"empty"},{get:(r,t)=>Object.hasOwn(r,t)?r[t]:"simple"});class et extends te{lines;defaultSubs;static create(t,e,i={}){return new et(t,e,i)}constructor(t,e,i={}){if(super(t,e,i),this.contentModel=i.content_model??Mh[e],"subs"in i){const n=i.subs;n?(n==="default"?this.defaultSubs=i.default_subs??null:Array.isArray(n)?(this.defaultSubs=[...n],delete this.attributes.subs):(this.defaultSubs=null,this.attributes.subs=String(n)),this.commitSubs()):(this.defaultSubs=[],delete this.attributes.subs)}else this.defaultSubs=null;const s=i.source;!s&&s!==0?this.lines=[]:typeof s=="string"?this.lines=hi(s):this.lines=[...s]}get blockname(){return this.context}async content(){switch(this.contentModel){case"compound":return super.content();case"simple":return this.applySubs(this.lines.join(S),this.subs);case"verbatim":case"raw":{const t=await this.applySubs(this.lines,this.subs);if(t.length<2)return t[0]??"";for(;t.length>0&&t[0].trimEnd()==="";)t.shift();for(;t.length>0&&t[t.length-1].trimEnd()==="";)t.pop();return t.join(S)}default:return this.contentModel!=="empty"&&this.logger.warn(`unknown content model '${this.contentModel}' for block: ${this}`),null}}getSourceLines(){return this.lines}get source(){return this.lines.join(S)}getSource(){return this.source}getBlockName(){return this.blockname}toString(){const t=this.contentModel==="compound"?`blocks: ${this.blocks.length}`:`lines: ${this.lines.length}`;return`#<Block {context: '${this.context}', content_model: '${this.contentModel}', style: ${JSON.stringify(this.style??null)}, ${t}}>`}}class fi extends te{constructor(t,e,i={}){super(t,e,i)}async content(){return this.blocks}get items(){return this.blocks}hasItems(){return this.blocks.length>0}outline(){return this.context==="ulist"||this.context==="olist"}async convert(){const t=await super.convert();return this.context==="colist"&&this.document.callouts.nextList(),t}render(){return this.convert()}getItems(){return this.blocks}toString(){return`#<List {context: '${this.context}', style: ${JSON.stringify(this.style??null)}, items: ${this.blocks.length}}>`}}class Hi extends te{marker;_text;_convertedText;_subsSnapshot;constructor(t,e=null){super(t,"list_item"),this._text=e,this.level=t.level,this.subs=[...Ot],this.marker=null}get list(){return this.getParent()}get text(){if(this._convertedText!=null&&this._subsSnapshot!=null){const t=this.subs;if(t.length!==this._subsSnapshot.length||t.some((e,i)=>e!==this._subsSnapshot[i]))return this._text??null}return this._convertedText==null?this._text??null:this.document._converting?(this._convertedText=this.document._resolveFootnotePlaceholdersIn(this._convertedText),this._convertedText):this.document._previewFootnotePlaceholdersIn(this._convertedText)}set text(t){this._text=t,this._convertedText=null,this._subsSnapshot=null}hasText(){return!!(this._text&&this._text.length>0)}async precomputeText(){this._text!=null&&this._convertedText==null&&(this._convertedText=await this.applySubs(this._text,this.subs),this._subsSnapshot=[...this.subs])}simple(){return this.blocks.length===0||this.blocks.length===1&&this.blocks[0]instanceof fi&&this.blocks[0].outline()}compound(){return!this.simple()}foldFirst(){const t=this.blocks.shift().source;this._text=!this._text||this._text.length===0?t:`${this._text}${S}${t}`}getList(){return this.list}getMarker(){return this.marker}getText(){return this.text}setText(t){this.text=t}toString(){return`#<ListItem {list_context: '${this.getParent().context}', text: ${JSON.stringify(this._text)}, blocks: ${(this.blocks??[]).length}}>`}}function pi(r,t){const e=10**t;return Math.trunc(r*e)/e}function Xs(r,t){const e=t+t;for(;r.includes(e);)r=r.replaceAll(e,t);return r}const ko=4;class gt extends te{constructor(t,e){super(t,"table"),this.rows=new gt.Rows,this.columns=[],this.hasHeaderOption=!1;let i=100;const s=e.width;if(s!=null){let o=parseInt(s,10);Number.isNaN(o)&&(o=0),(o>100||o<1)&&(o===0&&(s==="0"||s==="0%")||(o=100)),i=o}this.attributes.tablepcwidth=i;const n=this.document.attributes.pagewidth;if(n!=null){const o=pi(i/100*parseFloat(n),ko);this.attributes.tableabswidth=o===Math.trunc(o)?Math.trunc(o):o}"rotate-option"in e&&(this.attributes.orientation="landscape")}headerRow(){const t=this.hasHeaderOption;return t&&this.rows.body.length===0?t:!1}createColumns(t){const e=[];let i=null,s=0;for(const o of t){const l=o.width;e.push(new gt.Column(this,e.length,o)),l<0?(i??=[]).push(e[e.length-1]):s+=l}this.columns=e;const n=e.length;if(n>0){this.attributes.colcount=n;const o=s>0||i?s:null;this.assignColumnWidths(o,i)}}assignColumnWidths(t=null,e=null){const i=ko;let s=0,n=0;if(t!=null){if(e){let o;t>100?(o=0,this.logger.warn(`total column width must not exceed 100% when using autowidth columns; got ${t}%`)):(o=pi((100-t)/e.length,i),Math.trunc(o)===o&&(o=Math.trunc(o)),t=100);const l={width:o,"autowidth-option":""};for(const a of e)a.updateAttributes(l)}for(const o of this.columns)s+=n=o.assignWidth(null,t,i)}else{n=pi(100/this.columns.length,i),Math.trunc(n)===n&&(n=Math.trunc(n));for(const o of this.columns)s+=o.assignWidth(n,null,i)}if(s!==100){const o=+(100-s+n).toFixed(i);this.columns[this.columns.length-1].assignWidth(o,null,i)}}async partitionHeaderFooter(t){const e=this.rows.body;let i=this.attributes.rowcount=e.length;i>0&&(this.hasHeaderOption===!0?(this.rows.head=[await Promise.all(e.shift().map(s=>s.reinitialize(!0)))],i--):this.hasHeaderOption===null&&(this.hasHeaderOption=!1,e.unshift(await Promise.all(e.shift().map(s=>s.reinitialize(!1)))))),i>0&&"footer-option"in t&&(this.rows.foot=[e.pop()])}}gt.Rows=class{constructor(t=[],e=[],i=[]){this.head=t,this.foot=e,this.body=i}bySection(){return[["head",this.head],["body",this.body],["foot",this.foot]]}toObject(){return{head:this.head,body:this.body,foot:this.foot}}};gt.Column=class extends Ie{constructor(t,e,i={}){super(t,"table_column"),this.style=i.style??null,i.colnumber=e+1,"width"in i||(i.width=1),"halign"in i||(i.halign="left"),"valign"in i||(i.valign="top"),this.updateAttributes(i)}get table(){return this.getParent()}assignWidth(t,e,i){e!=null&&(t=pi(parseFloat(this.attributes.width)*100/e,i),Math.trunc(t)===t&&(t=Math.trunc(t)));const s=this.getParent().attributes.tableabswidth;if(s!=null){const n=pi(t/100*s,i);this.attributes.colabswidth=n===Math.trunc(n)?Math.trunc(n):n}return this.attributes.colpcwidth=t,t}isBlock(){return!1}isInline(){return!1}getTable(){return this.table}};class Ph extends te{static get DOUBLE_LF(){return S+S}_reinitializeArgs;_innerDocSetup;_subs;_text;_cellbgcolor;_convertedText;constructor(t,e,i={},s={}){super(t,"table_cell"),this._cursor=null,this._reinitializeArgs=null,this.document.sourcemap&&s.cursor&&(this.sourceLocation=Object.assign({},s.cursor));let n=null,o=!1,l=!1,a=!1,c=!1,u=null;if(t){if(o=t.table.headerRow(),o){if(o==="implicit"){const f=t.style??i?.style;(f==="asciidoc"||f==="literal")&&(this._reinitializeArgs=[t,e,i&&{...i},s]),n=null}}else n=t.style??null;this.updateAttributes(t.attributes)}if(i!=null)switch(Object.keys(i).length===0?(this.colspan=null,this.rowspan=null):(this.colspan=i.colspan?parseInt(i.colspan,10):null,this.rowspan=i.rowspan?parseInt(i.rowspan,10):null,delete i.colspan,delete i.rowspan,o||(n=i.style??n),this.updateAttributes(i)),n){case"asciidoc":{if(l=!0,u=s.cursor,e=e.trimEnd(),e.startsWith(S)){let f=0;for(;e.startsWith(S);)e=e.slice(1),f++;u&&typeof u.advance=="function"&&u.advance(f)}else e=e.trimStart();break}case"literal":for(a=!0,e=e.trimEnd();e.startsWith(S);)e=e.slice(1);break;default:c=!0,e=e!=null?e.trim():""}else this.colspan=null,this.rowspan=null,n==="asciidoc"&&(l=!0);if(l){const f=this.document;this._innerDocSetup={lines:e.split(S,-1),parentDoc:f,parentDoctitle:f.attributes.doctitle,options:{safe:f.safe,backend:f.backend,header_footer:!1,parent:f,cursor:u}},delete f.attributes.doctitle,this._subs=null}else a?(this.contentModel="verbatim",this._subs=[...Mt]):(c&&(o?this._cursor=s.cursor??null:this._catalogInlineAnchor(e,s.cursor)),this.contentModel="simple",this._subs=[...Ot]);this._text=e,this.style=n}get column(){return this.getParent()}static async create(t,e,i={},s={}){const n=new gt.Cell(t,e,i,s);if(n._innerDocSetup){const{lines:o,parentDoc:l,parentDoctitle:a,options:c}=n._innerDocSetup;if(n._innerDocSetup=null,o.length>0&&o[0].includes("::")){const f=o[0],p=await new $n(l,[f],c.cursor).readLines();p.length===1&&p[0]===f||(o.shift(),p.length>0&&o.unshift(...p))}const u=await l.constructor.create(o,c);a&&(l.attributes.doctitle=a),n._innerDocument=u}return n}async reinitialize(t){if(t)this._reinitializeArgs=null;else{if(this._reinitializeArgs)return gt.Cell.create(...this._reinitializeArgs);this.style=this.attributes.style??null}return this._cursor&&this._catalogInlineAnchor(),this}_catalogInlineAnchor(t=this._text,e=null){if(e||(e=this._cursor,this._cursor=null),!t.startsWith("[["))return;const i=t.match(ui);if(!i)return;const s=this.document;let n=i[2]??null;n?.includes(nt)&&(n=s.subAttributes(n)),s.register("refs",[i[1],new B(this,"anchor",n,{type:"ref",id:i[1]})])}get text(){return this._convertedText==null?this._text??null:this.document._converting?(this._convertedText=this.document._resolveFootnotePlaceholdersIn(this._convertedText),this._convertedText):this.document._previewFootnotePlaceholdersIn(this._convertedText)}async precomputeText(){this._subs&&this._convertedText==null&&(this._convertedText=await this.applySubs(this._text,this._subs),this._cellbgcolor=this.document.attributes.cellbgcolor)}set text(t){this._text=t,this._convertedText=null}async content(){if(this.style==="asciidoc")return this._innerContent??"";if(this._text.includes(gt.Cell.DOUBLE_LF)){const i=[];for(const s of this.text.split(Mu)){const n=s.trim();if(!n)continue;const o=this.style;i.push(o&&o!=="header"?await new B(this.getParent(),"quoted",n,{type:o}).convert():n)}return i}const t=this.text;if(!t)return[];const e=this.style;return e&&e!=="header"?[await new B(this.getParent(),"quoted",t,{type:e}).convert()]:[t]}lines(){return this._text.split(S)}source(){return this._text}get innerDocument(){return this._innerDocument??null}get file(){return this.sourceLocation?.file??null}get lineno(){return this.sourceLocation?.lineno??null}toString(){return`${super.toString()} - [text: ${this._text}, colspan: ${this.colspan??1}, rowspan: ${this.rowspan??1}, attributes: ${JSON.stringify(this.attributes)}]`}getText(){return this.text}setText(t){this.text=t}getInnerDocument(){return this.innerDocument}getFile(){return this.file}getLineNumber(){return this.lineno}}gt.Cell=Ph;gt.ParserContext=class _n{static get FORMATS(){return new Set(["psv","csv","dsv","tsv"])}static get DELIMITERS(){return{psv:["|",/\|/],csv:[",",/,/],dsv:[":",/:/],tsv:[" ",/\t/],"!sv":["!",/!/]}}constructor(t,e,i={}){this._reader=t,this._startCursor=t.cursor,t.mark(),this.table=e,this.buffer="";let s;"format"in i?(s=i.format,_n.FORMATS.has(s)?s==="tsv"?this.format="csv":(this.format=s,s==="psv"&&e.document.nested()&&(s="!sv")):(this.logger.error(this.messageWithContext(`illegal table format: ${s}`,{source_location:t.cursorAtPrevLine()})),this.format="psv",s=e.document.nested()?"!sv":"psv")):(this.format="psv",s=e.document.nested()?"!sv":"psv");const n=_n.DELIMITERS;if("separator"in i){const o=i.separator;o?o==="\\t"?[this.delimiter,this.delimiterRe]=n.tsv:(this.delimiter=o,this.delimiterRe=new RegExp(o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))):[this.delimiter,this.delimiterRe]=n[s]}else[this.delimiter,this.delimiterRe]=n[s];this.colcount=e.columns.length===0?-1:e.columns.length,this._cellspecs=[],this._cellOpen=!1,this._activeRowspans=[0],this._columnVisits=0,this._currentRow=[],this._linenum=-1}startsWith(t){return t.startsWith(this.delimiter)}matchDelimiter(t){return t.match(this.delimiterRe)}skipPastDelimiter(t){this.buffer=`${this.buffer}${t}${this.delimiter}`}skipPastEscapedDelimiter(t){this.buffer=`${this.buffer}${t.slice(0,-1)}${this.delimiter}`}bufferHasUnclosedQuotesInText(t,e='"'){let i=t.trim();if(i===e)return!0;if(!i.startsWith(e))return!1;const s=e+e,n=i.endsWith(e);return n&&i.endsWith(s)||i.startsWith(s)?(i=Xs(i,e),i.startsWith(e)&&!i.endsWith(e)):!n}bufferHasUnclosedQuotes(t=null,e='"'){const i=(t?this.buffer+t:this.buffer).trim();if(!i.startsWith(e))return!1;let s=1;for(;s<i.length;)if(i[s]===e)if(s+1<i.length&&i[s+1]===e)s+=2;else return!1;else s++;return!0}takeCellspec(){return this._cellspecs.shift()??null}pushCellspec(t={}){this._cellspecs.push(t??{})}keepCellOpen(){this._cellOpen=!0}markCellClosed(){this._cellOpen=!1}isCellOpen(){return this._cellOpen}isCellClosed(){return!this._cellOpen}async closeOpenCell(t={}){this.pushCellspec(t),this.isCellOpen()&&await this.closeCell(!0),this._advance()}async closeCell(t=!1){let e,i,s;if(this.format==="psv")e=this.buffer,this.buffer="",i=this.takeCellspec(),i?(s=i.repeatcol??1,delete i.repeatcol):(this.logger.error(this.messageWithContext("table missing leading separator; recovering automatically",{source_location:this._startCursor})),i={},s=1);else if(e=this.buffer.trim(),this.buffer="",i=null,s=1,this.format==="csv"&&e&&e.includes('"'))if(e.startsWith('"'))if(e.length>1&&e.endsWith('"')&&!this.bufferHasUnclosedQuotesInText(e,'"')){const o=e.slice(1,e.length-1);e=Xs(o.trim(),'"')}else this.logger.error(this.messageWithContext("unclosed quote in CSV data; setting cell to empty",{source_location:this._reader.cursorAtPrevLine()})),e="";else e=Xs(e,'"');for(let n=1;n<=s;n++){let o;if(this.colcount===-1){if(this.table.columns.push(o=new gt.Column(this.table,this.table.columns.length+n-1)),i&&"colspan"in i){const u=parseInt(i.colspan,10)-1;if(u>0){const f=this.table.columns.length;for(let h=0;h<u;h++)this.table.columns.push(new gt.Column(this.table,f+h))}}}else o=this.table.columns[this._currentRow.length]??null;const l=this._reader.cursorBeforeMark();this._reader.mark();const a=await gt.Cell.create(o,e,i,{cursor:l});a.rowspan&&a.rowspan!==1&&this._activateRowspan(a.rowspan,a.colspan??1),this._columnVisits+=a.colspan??1,this._currentRow.push(a);const c=this._endOfRow();c>-1&&(this.colcount!==-1||this._linenum>0||t&&n===s)&&(c>0?(this.logger.error(this.messageWithContext("dropping cell because it exceeds specified number of columns",{source_location:l})),this._closeRow(!0)):this._closeRow())}this._cellOpen=!1}closeTable(){this._columnVisits!==0&&this.logger.error(this.messageWithContext("dropping cells from incomplete row detected end of table",{source_location:this._reader.cursorBeforeMark()}))}_closeRow(t=!1){t||this.table.rows.body.push(this._currentRow),this.colcount===-1&&(this.colcount=this._columnVisits),this._columnVisits=0,this._currentRow=[],this._activeRowspans.shift(),this._activeRowspans[0]??=0}_activateRowspan(t,e){for(let i=1;i<t;i++)this._activeRowspans[i]=(this._activeRowspans[i]??0)+e}_endOfRow(){if(this.colcount===-1)return 0;const t=this._columnVisits+(this._activeRowspans[0]??0);return t<this.colcount?-1:t===this.colcount?0:1}_advance(){this._linenum++}get logger(){return this.table?.document?.logger??Zt.logger}getLogger(){return this.logger}messageWithContext(t,e={}){return _t.AutoFormattingMessage.attach({text:t,...e})}createLogMessage(t,e={}){return this.messageWithContext(t,e)}};wi(gt.ParserContext.prototype);const Fe="'",Nh="\\",ts='"',xo={[ts]:/.*?[^\\](?=")/,[Fe]:/.*?[^\\](?=')/,",":/.*?(?=[ \t]*(,|$))/},zh={[ts]:'\\"',[Fe]:"\\'"},jh={",":/[ \t]*(,|$)/},Bh=new RegExp(`${J}[${N}\\-]*`,"u"),Wh=/[ \t]+/;class Uh{#t;#e=0;#s=0;#i=new Map;constructor(t){this.#t=t}get source(){return this.#t}eos(){return this.#e>=this.#t.length}peek(t){return this.#t.slice(this.#e,this.#e+t)}getByte(){if(this.#e>=this.#t.length){this.#s=0;return}return this.#s=1,this.#t[this.#e++]}unscan(){this.#e-=this.#s,this.#s=0}skip(t){const e=this.#n(t);return e?e[0].length:0}scan(t){const e=this.#n(t);return e?e[0]:null}#n(t){let e=this.#i.get(t);if(!e){const s=t.flags.includes("y")?t.flags:`${t.flags}y`;e=new RegExp(t.source,s),this.#i.set(t,e)}e.lastIndex=this.#e;const i=e.exec(this.#t);return i?(this.#s=i[0].length,this.#e+=i[0].length,i):(this.#s=0,null)}}class zt{#t;#e;#s;#i;#n;#r=null;constructor(t,e=null,i=","){this.#t=new Uh(t),this.#e=e,this.#s=i,this.#i=jh[i],this.#n=xo[i]}async parseInto(t,e=[]){return Object.assign(t,await this.parse(e))}async parse(t=[]){if(this.#r)return this.#r;this.#r={};let e=0;for(;await this.#h(e,t)&&!this.#t.eos();)this.#f(),e++;return this.#r}rekey(t){return zt.rekey(this.#r,t)}static rekey(t,e){for(let i=0;i<e.length;i++){const s=e[i];if(s){const n=t[i+1];n!=null&&(t[s]=n)}}return t}async#h(t,e){let i=!0;this.#l();const s=this.#t.peek(1);let n,o,l;if(s===ts)n=this.#a(this.#t.getByte());else if(s===Fe)n=this.#a(this.#t.getByte()),n.startsWith(Fe)||(l=!0);else{n=this.#c();const a=n!==null&&this.#l()||0;if(this.#t.eos()){if(!n&&!this.#t.source.trimEnd().endsWith(this.#s))return!1;i=!1}else{const c=this.#t.getByte();if(c===this.#s)this.#t.unscan();else if(n)if(c==="="){this.#l();const u=this.#t.getByte();if(u===ts)o=this.#a(u);else if(u===Fe)o=this.#a(u),o.startsWith(Fe)||(l=!0);else if(u===this.#s)o="",this.#t.unscan();else if(u===void 0)o="";else if(o=`${u}${this.#o()??""}`,o==="None")return!0}else n=`${n}${" ".repeat(a)}${c}${this.#o()??""}`;else n=`${c}${this.#o()??""}`}}if(o!==void 0)if(n==="options"||n==="opts")if(o.includes(",")){o.includes(" ")&&(o=o.replace(/ /g,""));for(const a of o.split(","))a&&(this.#r[`${a}-option`]="")}else o&&(this.#r[`${o}-option`]="");else l&&this.#e?n==="title"||n==="reftext"?this.#r[n]=o:this.#r[n]=await this.#e.applySubs(o):this.#r[n]=o;else{l&&this.#e&&(n=await this.#e.applySubs(n));const a=e[t];a&&n!=null&&(this.#r[a]=n),this.#r[t+1]=n}return i}#a(t){if(this.#t.peek(1)===t)return this.#t.getByte(),"";const e=this.#u(t);return e!==null?(this.#t.getByte(),e.includes(Nh)?e.replaceAll(zh[t],t):e):`${t}${this.#o()??""}`}#l(){return this.#t.skip(Wh)}#f(){return this.#t.skip(this.#i)}#c(){return this.#t.scan(Bh)}#o(){return this.#t.scan(this.#n)}#u(t){return this.#t.scan(xo[t])}}const Wn=Symbol("attribute_entries");function Fh(r){return r[Wn]}class Vi{constructor(t,e,i=null){this.name=t,this.value=e,this.negate=i??e==null}saveTo(t){return(t[Wn]??=[]).push(this),this}}class Un extends String{}function be(r){return r instanceof Un}const Ao=new Un(""),vo=new Un(Ki),Qs=new Set(["author","authorinitials","firstname","middlename","lastname","email"]),Ni={"<":"left",">":"right","^":"center"},zi={"<":"top",">":"bottom","^":"middle"},ji={d:"none",s:"strong",e:"emphasis",m:"monospaced",h:"header",l:"literal",a:"asciidoc"};class w{constructor(){throw new Error("Parser cannot be instantiated")}static async parse(t,e,i={}){const s=i.header_only??!1;let n=await w.parseDocumentHeader(t,e,s);if(!s)for(;await t.hasMoreLines();){const[o,l]=await w.nextSection(t,e,n);n=l,o&&(e.assignNumeral(o),e.blocks.push(o))}return e}static async parseDocumentHeader(t,e,i=!1){let s=await t.skipBlankLines()!=null?await w.parseBlockMetadataLines(t,e):{};const n=e.attributes,o=await w.isNextLineDoctitle(t,s,n.leveloffset);if(o&&(s.title||s.style))return n.authorcount=0,e.finalizeHeader(s,!1);let l=null;const a=n.doctitle;if(a&&a!==""&&(e.title=l=a),o){const c=e.sourcemap?t.cursor:null,[u,,f,,h]=await w.parseSectionTitle(t,e);let p=f;if(l)p=null;else{e.title=p;let b=e.subSpecialchars(p);b.includes(nt)&&(b=e.subAttributes(b,{attribute_missing:"skip"})),n.doctitle=l=b}c&&e.header&&(e.header.sourceLocation=c),!h&&!e.isAttributeLocked("compat-mode")&&(n["compat-mode"]=""),s.separator&&!e.isAttributeLocked("title-separator")&&(n["title-separator"]=s.separator);const d=s.id;d&&(e.id=d),s.role&&(n.role=s.role),s.reftext&&(n.reftext=s.reftext),s={};const m=e._attributesModified;if(m.delete("doctitle"),await w.parseHeaderMetadata(t,e,null),m.has("doctitle")){const b=n.doctitle;!b||b===""||b===l?n.doctitle=l:e.title=b}else p||m.add("doctitle");d&&e.register("refs",[d,e])}else if(n.author){const c=w.processAuthors(n.author,!0,!1);n.authorinitials&&delete c.authorinitials,Object.assign(n,c)}else if(n.authors){const c=w.processAuthors(n.authors,!0);Object.assign(n,c)}else n.authorcount=0;return e.doctype==="manpage"&&await w.parseManpageHeader(t,e,s,i),e.finalizeHeader(s)}static async parseManpageHeader(t,e,i,s=!1){const n=e.attributes,o=n.doctitle||"",l=o.match(Yc);let a;if(l){a=n.manvolnum=l[2];let u=l[1];u.includes(nt)&&(u=e.subAttributes(u)),n.mantitle=u.toLowerCase()}else w.logger.error(w.messageWithContext("non-conforming manpage title",{source_location:t.cursorAtLine(1)})),n.mantitle=o||n.docname||"command",a=n.manvolnum="1";const c=n.manname;if(c&&n.manpurpose)n["manname-title"]??="Name",n.mannames=[c],e.backend==="manpage"&&(n.docname=c,n.outfilesuffix=`.${a}`);else if(!s){await t.skipBlankLines(),t.save(),Object.assign(i,await w.parseBlockMetadataLines(t,e));const u=await w.isNextLineSection(t,{});if(u!=null)if(u===1){const f=await w.initializeSection(t,e,{}),p=(await t.readLinesUntil({break_on_blank_lines:!0,skip_line_comments:!0})).map(m=>m.trimStart()).join(" ").match(Xc);let d=null;if(p){let m=p[1];m.includes(nt)&&(m=e.subAttributes(m));let b;m.includes(",")?(b=m.split(",").map($=>$.trimStart()),m=b[0]):b=[m];let _=p[2];_.includes(nt)&&(_=e.subAttributes(_)),n["manname-title"]??=f.title,f.id&&(n["manname-id"]=f.id),n.manname=m,n.mannames=b,n.manpurpose=_,e.backend==="manpage"&&(n.docname=m,n.outfilesuffix=`.${a}`)}else d="non-conforming name section body";if(d){t.restoreSave(),w.logger.error(w.messageWithContext(d,{source_location:t.cursor}));const m=n.docname||"command";n.manname=m,n.mannames=[m],e.backend==="manpage"&&(n.docname=m,n.outfilesuffix=`.${a}`)}else t.discardSave()}else t.restoreSave(),w.logger.error(w.messageWithContext("name section must be at level 1",{source_location:t.cursor}));else{t.restoreSave(),w.logger.error(w.messageWithContext("name section expected",{source_location:t.cursor}));const f=n.docname||"command";n.manname=f,n.mannames=[f],e.backend==="manpage"&&(n.docname=f,n.outfilesuffix=`.${a}`)}}}static async nextSection(t,e,i={}){let s=null,n=null,o=!1;const l=e.context==="document";let a,c,u,f,h,p;if(l&&e.blocks.length===0&&(e.hasHeader()||"invalid-header"in i&&i["invalid-header"]&&delete i["invalid-header"]!==void 0||typeof await w.isNextLineSection(t,i)!="number"))p=e,h=p.doctype==="book",(e.hasHeader()||h&&i[1]!=="abstract")&&(s=n=new et(e,"preamble",{content_model:"compound"}),h&&e.hasAttribute("preface-title")&&(s.title=e.getAttribute("preface-title")),e.blocks.push(s)),a=e,c=0,"fragment"in e.attributes?u=-1:h?(u=1,f=0):u=1;else{p=e.document,h=p.doctype==="book",a=await w.initializeSection(t,e,i);const d=i.title;if(i=d?{title:d}:{},c=a.level,u=c+1,c===0)o=h;else if(c===1&&a.special){const m=a.sectname;m!=="appendix"&&m!=="preface"&&m!=="abstract"&&(u=null)}}for(await t.skipBlankLines();await t.hasMoreLines();){await w.parseBlockMetadataLines(t,p,i);let d=await w.isNextLineSection(t,i);if(d!=null&&d!==!1){const m=p.getAttribute("leveloffset");if(m&&(d+=parseInt(m,10),d<0&&(d=0)),d>c){if(u!=null){if(d!==u&&!(f!=null&&d===f)&&u>=0){const $=f!=null?`expected levels ${f} or ${u}`:`expected level ${u}`;w.logger.warn(w.messageWithContext(`section title out of sequence: ${$}, got level ${d}`,{source_location:t.cursor}))}}else w.logger.error(w.messageWithContext(`${a.sectname} sections do not support nested sections`,{source_location:t.cursor}));const[b,_]=await w.nextSection(t,a,i);i=_,a.assignNumeral(b),a.blocks.push(b)}else if(d===0&&a===p){h||w.logger.error(w.messageWithContext("level 0 sections can only be used when doctype is book",{source_location:t.cursor}));const[b,_]=await w.nextSection(t,a,i);i=_,a.assignNumeral(b),a.blocks.push(b)}else break}else{const m=t.cursor,b=await w.nextBlock(t,n??a,i,{parse_metadata:!1});if(b){if(o){if(!a.hasBlocks())b.style!=="partintro"?b.style==="open"&&b.context==="open"?b.style="partintro":(b.parent=n=new et(a,"open",{content_model:"compound"}),n.style="partintro",a.blocks.push(n)):b.contentModel==="simple"&&(b.contentModel="compound",b.append(new et(b,"paragraph",{source:b.lines,subs:b.subs})),b.lines.length=0,b.subs.length=0);else if(a.blocks.length===1){const _=a.blocks[0];!n&&_.contentModel==="compound"?w.logger.error(w.messageWithContext("illegal block content outside of partintro block",{source_location:m})):_.contentModel!=="compound"&&(b.parent=n=new et(a,"open",{content_model:"compound"}),_.style===(n.style="partintro")&&(_.context="paragraph",_.style=null),a.blocks.shift(),n.append(_),a.blocks.push(n))}}(n??a).blocks.push(b);for(const _ of Reflect.ownKeys(i))delete i[_]}}if(await t.skipBlankLines()==null)break}if(o)(!a.hasBlocks()||a.blocks[a.blocks.length-1].context!=="section")&&w.logger.error(w.messageWithContext("invalid part, must have at least one section (e.g., chapter, appendix, etc.)",{source_location:t.cursor}));else if(s)if(s.hasBlocks())if(h||p.blocks[1])p.sourcemap&&(s.sourceLocation=s.blocks[0].sourceLocation);else for(p.blocks.shift();s.blocks.length>0;)p.append(s.blocks.shift());else p.blocks.shift();return[a===e?null:a,{...i}]}static async nextBlock(t,e,i={},s={}){const n=await t.skipBlankLines();if(n==null)return null;let o=s.text_only??null;o&&n>0&&(delete s.text_only,o=null);const l=e.document;if(s.parse_metadata!==!1){for(;await w.parseBlockMetadataLine(t,l,i,s);)if(await t.readLine(),await t.skipBlankLines()==null)return null}const c=l.extensions,u=c?.hasBlocks?.(),f=c?.hasBlockMacros?.();t.mark();const h=await t.readLine();if(h===void 0)return null;const p=l.attributes,d=i[1]??null;let m=null,b=null,_=null,$=null;const E=w.isDelimitedBlock(h,!0);if(E&&(b=_=E.context,$=E.terminator,d?d!==b&&(E.masq.has(d)?b=d:E.masq.has("admonition")&&fn.has(d)?b="admonition":u&&c.registeredForBlock(d,b)?b=d:w.logger.isDebug()&&w.logger.debug(w.messageWithContext(`unknown style for ${b} block: ${d}`,{source_location:t.cursor}))):i.style=b),!E)do{if(d&&ce.strictVerbatimParagraphs&&Xu.has(d)){b=d,_="paragraph",t.unshiftLine(h);break}let v,L;if(h.startsWith(" ")){v=!0,L=" ";{const I=h.trimStart()[0];if(fa[I]&&Cu.test(h)){m=new et(e,"thematic_break",{content_model:"empty"});break}}}else if(h.startsWith(" "))v=!0,L=" ";else{v=!1,L=h[0];const R=Zu;if(!o&&R[L]&&(h.length,Du.test(h))){m=new et(e,R[L],{content_model:"empty"});break}if(h.endsWith("]")&&h.includes("::")){if(L==="i"||h.startsWith("video:")||h.startsWith("audio:")){const I=h.match(gu);if(I){const[,C,W,D]=I,F=C;m=new et(e,F,{content_model:"empty"});let yt=W;if(D){let it=[];F==="video"?it=["poster","width","height"]:F==="image"&&(it=["alt","width","height"]),await m.parseAttributes(D,it,{sub_input:!0,into:i})}if(delete i.style,yt.includes(nt)){const it=m.subAttributes(yt,{returnDropSentinel:!0});if(it===null){for(const Et of Object.keys(i))delete i[Et];return null}yt=it}if(F==="image"){l.register("images",yt),i.imagesdir??=p.imagesdir,i.alt??=d??(i["default-alt"]=ss(yt,!0).replace(/[_-]/g," "));let it=i.scaledwidth;it&&(delete i.scaledwidth,it.match(/\D/)||(it+="%"),i.scaledwidth=it),i.title&&(m.title=i.title,delete i.title,m.assignCaption(i.caption,"figure"),delete i.caption)}i.target=yt;break}}if(L==="t"&&h.startsWith("toc:")){const I=h.match(bu);if(I){m=new et(e,"toc",{content_model:"empty"}),I[1]&&await m.parseAttributes(I[1],[],{sub_input:!0,into:i});break}}if(f){const I=h.match(mu);if(I){const C=c.registeredForBlockMacro(I[1]);if(C){let W=I[2];const D=I[3];if(W.includes(nt)){const Ht=e.subAttributes(W,{returnDropSentinel:!0});if(Ht===null){for(const jt of Object.keys(i))delete i[jt];return null}W=Ht}const F=C.config;(F.contentModel??F.content_model)==="attributes"?D&&await l.parseAttributes(D,F.positionalAttrs??F.positional_attrs??F.posAttrs??F.pos_attrs??[],{sub_input:!0,into:i}):i.text=D??"";const it=F.defaultAttrs??F.default_attrs;if(it)for(const[Ht,jt]of Object.entries(it))i[Ht]??=jt;const Et=await C.processMethod(e,W,i);if(Et&&Et!==e){Object.assign(i,Et.attributes),m=Et;break}for(const Ht of Object.keys(i))delete i[Ht];return null}}}}}if(!v&&(L??h[0])==="<"){const R=h.match(hn);if(R){t.unshiftLine(h),m=await w.parseCalloutList(t,R,e,l.callouts),i.style="arabic";break}}if(na.test(h)){t.unshiftLine(h),!d&&e instanceof Ct&&e.sectname==="bibliography"&&(i.style="bibliography"),m=await w.parseList(t,"ulist",e,d??i.style??null);break}if(ra.test(h)){t.unshiftLine(h);const R="start"in i?i.start:null;delete i.start,m=await w.parseList(t,"olist",e,d,{start:R}),m.style&&(i.style=m.style);break}if(h.includes("::")||h.includes(";;")){const R=h.match(ci);if(R){t.unshiftLine(h),m=await w.parseDescriptionList(t,R,e);break}}if((d==="float"||d==="discrete")&&w.isSectionTitle(h,await t.peekLine())!=null){t.unshiftLine(h);const[R,I,C,W]=await w.parseSectionTitle(t,l,i.id);I&&(i.reftext=I),m=new et(e,"floating_title",{content_model:"empty"}),m.title=C,delete i.title,C.includes(nt)&&await m.precomputeTitle(),R?m.id=R:"sectids"in p&&(await m.precomputeTitle(),m.id=Ct.generateId(m.title,l)),m.level=W;break}if(d&&d!=="normal"){if(Yu.has(d)){b=d,_="paragraph",t.unshiftLine(h);break}if(fn.has(d)){b="admonition",_="paragraph",t.unshiftLine(h);break}if(u&&c.registeredForBlock(d,"paragraph")){b=d,_="paragraph",t.unshiftLine(h);break}d&&w.logger.isDebug()&&w.logger.debug(w.messageWithContext(`unknown style for paragraph: ${d}`,{source_location:t.cursor}))}if(t.unshiftLine(h),v&&!d){const R=n===0?s.list_type:null,I=await w.readParagraphLines(t,R,{skip_line_comments:!!o});w.adjustIndentation(I),o||R==="dlist"?m=new et(e,"paragraph",{content_model:"simple",source:I,attributes:i}):m=new et(e,"literal",{content_model:"verbatim",source:I,attributes:i})}else{const R=await w.readParagraphLines(t,n===0&&s.list_type,{skip_line_comments:!0});if(o)v&&d==="normal"&&w.adjustIndentation(R),m=new et(e,"paragraph",{content_model:"simple",source:R,attributes:i});else if(Gu.has(L)&&h.includes(":")){const I=h.match(su);if(I){R[0]=h.slice(I[0].length);const C=I[1].toLowerCase();i.name=C,i.style=I[1],i.textlabel=i.caption??p[`${C}-caption`],delete i.caption,m=new et(e,"admonition",{content_model:"simple",source:R,attributes:i})}else v&&d==="normal"&&w.adjustIndentation(R),m=new et(e,"paragraph",{content_model:"simple",source:R,attributes:i})}else if(L===">"&&h.startsWith("> ")){const I=R.map(D=>D===">"?D.slice(1):D.startsWith("> ")?D.slice(2):D);let C=null;if(I[I.length-1]?.startsWith("-- "))for(C=I.pop().slice(3);I.length>0&&I[I.length-1]==="";)I.pop();i.style="quote";const W=Kt;if(m=await w.buildBlock("quote","compound",!1,e,new W(I),i),C){const D=await m.applySubs(C,["specialcharacters","quotes","attributes","replacements","macros","post_replacements"]),F=D.indexOf(", "),yt=F!==-1?D.slice(0,F):D,it=F!==-1?D.slice(F+2):null;yt&&(i.attribution=yt),it&&(i.citetitle=it)}}else if(L==='"'&&R.length>1&&R[R.length-1].startsWith("-- ")&&R[R.length-2].endsWith('"')){R[0]=h.slice(1);const I=R.pop().slice(3);for(;R.length>0&&R[R.length-1]==="";)R.pop();R[R.length-1]=R[R.length-1].slice(0,-1),i.style="quote",m=new et(e,"quote",{content_model:"simple",source:R,attributes:i});const C=await m.applySubs(I,["specialcharacters","quotes","attributes","replacements","macros","post_replacements"]),W=C.indexOf(", "),D=W!==-1?C.slice(0,W):C,F=W!==-1?C.slice(W+2):null;D&&(i.attribution=D),F&&(i.citetitle=F)}else v&&d==="normal"&&w.adjustIndentation(R),m=new et(e,"paragraph",{content_model:"simple",source:R,attributes:i});w.catalogInlineAnchors(R.join(S),m,l,t)}}while(!1);if(!m)switch(b){case"listing":case"source":{const v=b!=="source"&&!i[1]?i[2]??p["source-language"]:null;v?(i.style="source",i.language=v,zt.rekey(i,[null,null,"linenums"])):b==="source"&&(zt.rekey(i,[null,"language","linenums"]),"source-language"in p&&!("language"in i)&&(i.language=p["source-language"]),_!=="listing"&&(i["cloaked-context"]=_)),!("linenums-option"in i)&&("linenums"in i||"source-linenums-option"in p)&&(i["linenums-option"]=""),!("indent"in i)&&"source-indent"in p&&(i.indent=p["source-indent"]),m=await w.buildBlock("listing","verbatim",$,e,t,i);break}case"fenced_code":{i.style="source";const v=h.length;let L=null;if(v>3){const R=h.slice(3),I=R.indexOf(",");I>=0?(I>0&&(L=R.slice(0,I).trim()),I<v-4&&(i.linenums="")):L=R.trimStart()}L?i.language=L:"source-language"in p&&(i.language=p["source-language"]),i["cloaked-context"]=_,!("linenums-option"in i)&&("linenums"in i||"source-linenums-option"in p)&&(i["linenums-option"]=""),!("indent"in i)&&"source-indent"in p&&(i.indent=p["source-indent"]),$=$.slice(0,3),m=await w.buildBlock("listing","verbatim",$,e,t,i);break}case"table":{const v=t.cursor,L=Kt,R=new L(await t.readLinesUntil({terminator:$,skip_line_comments:!0,context:"table",cursor:"at_mark"}),v);!$.startsWith("|")&&!$.startsWith("!")&&(i.format??=$.startsWith(",")?"csv":"dsv"),m=await w.parseTable(R,e,i);break}case"sidebar":m=await w.buildBlock(b,"compound",$,e,t,i);break;case"admonition":{const v=i.style??b;i.name=v.toLowerCase(),i.textlabel=i.caption??p[`${i.name}-caption`],delete i.caption,m=await w.buildBlock(b,"compound",$,e,t,i);break}case"open":case"abstract":case"partintro":m=await w.buildBlock("open","compound",$,e,t,i);break;case"literal":m=await w.buildBlock(b,"verbatim",$,e,t,i);break;case"example":"collapsible-option"in i&&(i.caption??=""),m=await w.buildBlock(b,"compound",$,e,t,i);break;case"quote":case"verse":zt.rekey(i,[null,"attribution","citetitle"]),m=await w.buildBlock(b,b==="verse"?"verbatim":"compound",$,e,t,i);break;case"stem":case"latexmath":case"asciimath":b==="stem"&&(i.style=pa[i[2]??p.stem]),m=await w.buildBlock("stem","raw",$,e,t,i);break;case"pass":m=await w.buildBlock(b,"raw",$,e,t,i);break;case"comment":await w.buildBlock(b,"skip",$,e,t,i);for(const v of Object.keys(i))delete i[v];return null;default:{if(!u||!c.registeredForBlock(b,_))throw new Error(`Unsupported block type ${b} at ${t.cursor}`);const v=c.registeredForBlock(b,_),L=v.config,R=L.contentModel??L.content_model;if(R!=="skip"){const I=L.positionalAttrs??L.positional_attrs??L.posAttrs??L.pos_attrs;I&&I.length>0&&zt.rekey(i,[null,...I]);const C=L.defaultAttrs??L.default_attrs;if(C)for(const[W,D]of Object.entries(C))i[W]??=D;i["cloaked-context"]=_}if(m=await w.buildBlock(b,R,$,e,t,i,{extension:v}),!m){for(const I of Object.keys(i))delete i[I];return null}}}if(!m)return null;if(l.sourcemap&&(m.sourceLocation=t.cursorAtMark()),i.title){const v=i.title;m.title=v,delete i.title,v.includes(nt)&&await m.precomputeTitle(),qi[m.context]&&(m.assignCaption(i.caption),delete i.caption)}m.style=i.style??null;const k=m.id??(m.id=i.id??null);return k&&(l.register("refs",[k,m])||w.logger.warn(w.messageWithContext(`id assigned to block already in use: ${k}`,{source_location:t.cursorAtMark()}))),Reflect.ownKeys(i).length>0&&m.updateAttributes(i),m.commitSubs(),m.hasSub("callouts")&&(w.catalogCallouts(m.source,l)||m.removeSub("callouts")),m}static async buildBlock(t,e,i,s,n,o,l={}){let a,c;e==="skip"?(a=!0,c="simple"):e==="raw"?(a=!1,c="simple"):(a=!1,c=e);let u=null,f=null;if(i==null)c==="verbatim"?u=await n.readLinesUntil({break_on_blank_lines:!0,break_on_list_continuation:!0}):(e==="compound"&&(e="simple"),u=await w.readParagraphLines(n,!1,{skip_line_comments:!0,skip_processing:a}));else if(c!=="compound")u=await n.readLinesUntil({terminator:i,skip_processing:a,context:t,cursor:"at_mark"});else if(i===!1)f=n;else{const p=n.cursor,d=Kt;f=new d(await n.readLinesUntil({terminator:i,skip_processing:a,context:t,cursor:"at_mark"}),p,{document:s.document})}if(e==="verbatim"){const p=parseInt(o.tabsize??s.document.attributes.tabsize??"0",10),d=o.indent;d!=null?w.adjustIndentation(u,parseInt(d,10),p):p>0&&w.adjustIndentation(u,-1,p)}else if(e==="skip")return null;let h;if(l.extension){const p=l.extension;delete o.style;const d=Kt,m=await p.processMethod(s,f??new d(u,null,{document:s.document}),{...o});if(!m||m===s)return null;h=m,Object.assign(o,h.attributes),h.contentModel==="compound"&&h instanceof et&&h.lines.length>0&&(e="compound",f=new d(h.lines))}else h=new et(s,t,{content_model:e,source:u,attributes:o});return e==="compound"&&await w.parseBlocks(f,h),h}static async parseBlocks(t,e,i=null){for(;;){const s=await w.nextBlock(t,e,i?{...i}:{});if(s&&e.blocks.push(s),!await t.hasMoreLines())break}}static async parseList(t,e,i,s=null,n={}){const o=n.start!=null?parseInt(n.start,10):null,l=o!=null&&o!==1?{start:o}:null,a=new fi(i,e,l?{attributes:l}:{}),c=ni[e];for(;await t.hasMoreLines()&&c.test(await t.peekLine());){const u=(await t.peekLine()).match(c),f=await w.parseListItem(t,a,u,u[1],s);if(f&&a.blocks.push(f),await t.skipBlankLines()==null)break}return a}static catalogCallouts(t,e){if(!t.includes("<"))return!1;let i=!1,s=0;const n=new RegExp(no.source,`${no.flags}g`);let o;for(;(o=n.exec(t))!==null;)o[0].startsWith("\\")||e.callouts.register(o[2]==="."?String(++s):o[2]),i=!0;return i}static catalogInlineAnchor(t,e,i,s,n=i.document){e?.includes(nt)&&(e=n.subAttributes(e));const o=s?.cursor?s.cursor:s;n.register("refs",[t,new B(i,"anchor",e,{type:"ref",id:t})])||w.logger.warn(w.messageWithContext(`id assigned to anchor already in use: ${t}`,{source_location:o}))}static catalogInlineAnchors(t,e,i,s){if(!t.includes("[[")&&!t.includes("anchor:"))return;let n;ro.lastIndex=0;const o=new RegExp(ro.source,"gu");for(;(n=o.exec(t))!==null;){let l,a;if(n[1]){if(l=n[1],a=n[2],a?.includes(nt)&&(a=i.subAttributes(a),!a))continue}else l=n[3],a=n[4],a&&(a.includes("]")&&(a=a.replace(/\\]/g,"]")),a.includes(nt)&&(a=i.subAttributes(a),a||(a=null)));i.register("refs",[l,new B(e,"anchor",a,{type:"ref",id:l})])||w.logger.warn(w.messageWithContext(`id assigned to anchor already in use: ${l}`,{source_location:s.cursorAtMark()}))}}static catalogInlineBiblioAnchor(t,e,i,s){const n=e!=null?`[${e}]`:null;i.document.register("refs",[t,new B(i,"anchor",n,{type:"bibref",id:t})])||w.logger.warn(w.messageWithContext(`id assigned to bibliography anchor already in use: ${t}`,{source_location:s.cursor}))}static async parseDescriptionList(t,e,i){const s=new fi(i,"dlist"),n=ru[e[2]];let o=await w.parseListItem(t,s,e,n);for(s.blocks.push(o);await t.hasMoreLines();){const a=(await t.peekLine()).match(n);if(!a)break;const c=await w.parseListItem(t,s,a,n);o[1]?s.blocks.push(o=c):(o[0].push(c[0][0]),o[1]=c[1])}return s}static async parseCalloutList(t,e,i,s){const n=new fi(i,"colist");let o=1,l=0;for(;;){if(!e){const u=await t.peekLine();if(!u)break;const f=u.match(hn);if(!f)break;e=f,t.mark()}let a=e[1];a==="."&&(a=String(++l)),a!==String(o)&&w.logger.warn(w.messageWithContext(`callout list item index: expected ${o}, got ${a}`,{source_location:t.cursorAtMark()}));const c=await w.parseListItem(t,n,e,"<1>");if(c){n.blocks.push(c);const u=s.getCalloutIds(n.blocks.length);u?c.attributes.coids=u:w.logger.warn(w.messageWithContext(`no callout found for <${n.blocks.length}>`,{source_location:t.cursorAtMark()}))}o++,e=null}return s.nextList(),n}static async parseListItem(t,e,i,s,n=null){const o=e.context,l=o==="dlist";let a,c,u,f;if(l){const b=i[1];if(a=new Hi(e,b),b.startsWith("[[")){const $=b.match(ui);$&&w.catalogInlineAnchor($[1],$[2]??b.slice($[0].length).trimStart(),a,t)}const _=i[3]??null;u=!!_,c=new Hi(e,_),e.document.sourcemap&&(a.sourceLocation=t.cursor,u?c.sourceLocation=a.sourceLocation:f=!0)}else{u=!0;const b=i[2];if(c=new Hi(e,b),e.document.sourcemap&&(c.sourceLocation=t.cursor),o==="ulist"){if(c.marker=s,b.startsWith("["))if(n&&n==="bibliography"){const _=b.match(oa);_&&w.catalogInlineBiblioAnchor(_[1],_[2],c,t)}else if(b.startsWith("[[")){const _=b.match(ui);_&&w.catalogInlineAnchor(_[1],_[2],c,t)}else(b.startsWith("[ ] ")||b.startsWith("[x] ")||b.startsWith("[*] "))&&(e.attributes["checklist-option"]="",c.attributes.checkbox="",b.startsWith("[ ")||(c.attributes.checked=""),c.setText(b.slice(4)))}else if(o==="olist"){const _=e.blocks.length,$=_===0;let E=!0;const k=e.attributes.start;let v=_;if(k!=null)v+=parseInt(k,10)-1;else if($){const I=w.resolveOrderedListStart(s);I!==1&&(e.attributes.start=I,v+=I-1,E=!1)}const[L,R]=w.resolveOrderedListMarker(s,v,E,t);if(c.marker=L,$&&!n&&(e.style=R??qs[L.length-1]??"arabic"),b.startsWith("[[")){const I=b.match(ui);I&&w.catalogInlineAnchor(I[1],I[2],c,t)}}else if(c.marker=s,b.startsWith("[[")){const _=b.match(ui);_&&w.catalogInlineAnchor(_[1],_[2],c,t)}}await t.readLine();const h=t.cursor,p=Kt,d=await w.readLinesForListItem(t,o,s,u),m=new p(d,h);if(await m.hasMoreLines()){f&&(c.sourceLocation=h);const b=await m.skipLineComments(),_=await m.peekLine();if(_!=null){b.length>0&&m.unshiftLines(b);let $=!1;String(_)!==""&&($=!0,l||(u=null));const E=await w.nextBlock(m,c,{},{text_only:u?null:!0,list_type:o});for(E&&c.blocks.push(E);await m.hasMoreLines();){const k=await w.nextBlock(m,c,{},{list_type:o});k&&c.blocks.push(k)}$&&c.blocks.length>0&&c.blocks[0].context==="paragraph"&&c.foldFirst()}}return l?[[a],c.hasText()||c.blocks.length>0?c:null]:c}static async readLinesForListItem(t,e,i=null,s=!0){const n=[];let o="inactive",l=!1,a=null;const c=e==="dlist";let u=null;for(;await t.hasMoreLines()&&(u=await t.readLine(),!w.isSiblingListItem(u,e,i));){u===Ki&&(u=vo);const f=n.length>0?n[n.length-1]:null;if(be(f)&&(o==="inactive"&&(o="active",s=!0,l||(n[n.length-1]=Ao)),be(u))){o!=="frozen"&&(o="frozen",n.push(u)),u=null;continue}const h=w.isDelimitedBlock(u,!0);if(h){if(o!=="active")break;n.push(u);const p=await t.readLinesUntil({terminator:h.terminator,read_last_line:!0,context:h.context});n.push(...p),o="inactive"}else if(c&&o!=="active"&&u.startsWith("[")&&si.test(u)){const p=[u];let d=!1;for(;;){const m=await t.peekLine();if(m==null)break;if(w.isDelimitedBlock(m)){d=!0;break}if(m===""||m.startsWith("[")&&si.test(m))p.push(await t.readLine());else if(io.test(m)&&!w.isSiblingListItem(m,e,i)){n.push(...p);break}else{d=!0;break}}if(d){u=null,t.unshiftLines(p);break}}else if(o==="active"&&u!=="")if(Jr.test(u)){if(t.unshiftLine(u),c){const p=await t.readLinesUntil({preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0},d=>w.isSiblingListItem(d,e,i));n.push(...p)}else{const p=await t.readLinesUntil({preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0});n.push(...p)}o="inactive"}else if(u[0]==="."&&Zr.test(u)||u[0]==="["&&si.test(u)||u[0]===":"&&Bs.test(u))n.push(u);else{if(!l){const p=Fs.find(d=>ni[d].test(u));p&&(l=!0,p==="dlist"&&!u.match(ci)?.[3]&&(s=!1))}n.push(u),o="inactive"}else if(f!==null&&f===""){if(u===""){if(await t.skipBlankLines()==null){u=null;break}if(u=await t.readLine(),u==null||w.isSiblingListItem(u,e,i))break}if(String(u)===Ki)a=n.length,n.push(vo);else if(s){if(w.isSiblingListItem(u,e,i))break;const p=Fs.find(d=>ni[d].test(u));if(p)n.push(u),l=!0,p==="dlist"&&!u.match(ci)?.[3]&&(s=!1);else if(Jr.test(u))if(t.unshiftLine(u),c){const d=await t.readLinesUntil({preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0},m=>w.isSiblingListItem(m,e,i));n.push(...d)}else{const d=await t.readLinesUntil({preserve_last_line:!0,break_on_blank_lines:!0,break_on_list_continuation:!0});n.push(...d)}else break}else l||n.pop(),n.push(u),s=!0}else if(be(u))s=!0,n.push(u);else{if(u!==""){s=!0;const p=(l?["dlist"]:Fs).find(d=>ni[d].test(u));p&&(l=!0,p==="dlist"&&!u.match(ci)?.[3]&&(s=!1))}n.push(u)}u=null}for(u!=null&&t.unshiftLine(u),a!=null&&(n[a]=Ao);n.length>0;){const f=n[n.length-1];if(be(f)){n.pop();break}if(f==="")n.pop();else break}return n}static async initializeSection(t,e,i={}){const s=e.document,n=s.doctype,o=n==="book",l=s.sourcemap?t.cursor:null,a=i[1]??null,[c,u,f,h,p]=await w.parseSectionTitle(t,s,i.id);let d=h,m,b=!1,_=!1;a?o&&a==="abstract"?m="chapter":a.startsWith("sect")&&nu.test(a)?m="section":(m=a,b=!0,o&&d===0&&(d=1),_=m==="appendix"):o?m=d===0?"part":d>1?"section":"chapter":n==="manpage"&&f.toLowerCase()==="synopsis"?(m="synopsis",b=!0):m="section",u&&(i.reftext=u);const $=new Ct(e,d);$.id=c??null,$.title=f,$.sectname=m,$.sourceLocation=l,b?($.special=!0,_?$.numbered=!0:s.attributes.sectnums==="all"&&($.numbered=o&&d===1?"chapter":!0)):"sectnums"in s.attributes&&d>0?$.numbered=$.special?e.numbered&&!0:!0:o&&d===0&&"partnums"in s.attributes&&($.numbered=!0);let E=$.id;if(E!=null?E===""?$.id=E=null:f.includes(nt)&&await $.precomputeTitle():"sectids"in s.attributes&&(await $.precomputeTitle(),$.id=E=Ct.generateId($.title,s)),E&&!s.register("refs",[E,$])){const k=t.lineno-(p?1:2);w.logger.warn(w.messageWithContext(`id assigned to section already in use: ${E}`,{source_location:t.cursorAtLine(k)}))}return $.updateAttributes(i),await t.skipBlankLines(),$}static async isNextLineSection(t,e){const i=e[1];if(i&&(i==="discrete"||i==="float"))return null;{const s=await t.peekLines(2,i&&i==="comment");return w.isSectionTitle(s[0]??"",s[1]??null)}}static async isNextLineDoctitle(t,e,i){const s=await w.isNextLineSection(t,e);return s==null||s===!1?!1:i?s+parseInt(i,10)===0:s===0}static isSectionTitle(t,e=null){const i=w.atxSectionTitle(t);return i??(e?w.setextSectionTitle(t,e):null)}static atxSectionTitle(t){const e=to;if(!(t.startsWith("=")||t.startsWith("#")))return null;const i=t.match(e);return i?i[1].length-1:null}static setextSectionTitle(t,e){const i=e[0],s=co[i];return s==null||!Bi(e,i,e.length)||!Ws.test(t)||Math.abs(t.length-e.length)>=2?null:s}static async parseSectionTitle(t,e,i=null){let s=null,n,o,l;const a=await t.readLine(),c=to;if((a.startsWith("=")||a.startsWith("#"))&&c.test(a)){const f=a.match(c);if(o=f[1].length-1,n=f[2],l=!0,!i&&n.endsWith("]]")){const h=n.match(eo);h&&!h[1]&&(n=n.slice(0,n.length-h[0].length),i=h[2],s=h[3]??null)}}else{const f=await t.peekLine(!0);if(f){const h=f[0],p=co[h];if(p!=null&&Bi(f,h,f.length)&&Ws.test(a)&&Math.abs(a.length-f.length)<2){o=p;const d=a.match(Ws);if(n=d?d[1]:a,l=!1,!i&&n.endsWith("]]")){const m=n.match(eo);m&&!m[1]&&(n=n.slice(0,n.length-m[0].length),i=m[2],s=m[3]??null)}await t.readLine()}}}if(n==null)throw new Error(`Unrecognized section at ${t.cursorAtPrevLine()}`);const u=e.getAttribute("leveloffset");return u&&(o+=parseInt(u,10),o<0&&(o=0)),[i,s,n,o,l]}static async parseHeaderMetadata(t,e=null,i=!0){const s=e?.attributes;await w.processAttributeEntries(t,e);let n={},o=null,l=null,a=null,c=null;if(await t.hasMoreLines()&&!await t.isNextLineEmpty()){const f=await t.readLine(),h=w.processAuthors(f);if(o=h.authorcount,delete h.authorcount,n=h,n.authorcount=o,e&&s&&(s.authorcount=o,o>0)){for(const[p,d]of Object.entries(h))p in s||(s[p]=await e.applyHeaderSubs(d));l=s.author,a=s.authorinitials,c=s.authors}if(await w.processAttributeEntries(t,e),await t.hasMoreLines()&&!await t.isNextLineEmpty()){const p=await t.readLine(),d=p.match(Gc);if(d){const m={};if(d[1]&&(m.revnumber=d[1].trimEnd()),d[2]){const b=d[2].trim();b!==""&&(!d[1]&&b.startsWith("v")?m.revnumber=b.slice(1):m.revdate=b)}if(d[3]&&(m.revremark=d[3].trimEnd()),e&&s&&Object.keys(m).length>0)for(const[b,_]of Object.entries(m))b in s||(s[b]=await e.applyHeaderSubs(_));Object.assign(n,m)}else t.unshiftLine(p)}await w.processAttributeEntries(t,e),await t.skipBlankLines()}let u=null;if(e){if("author"in s&&s.author!==l)u=w.processAuthors(s.author,!0,!1),s.authorinitials!==a&&delete u.authorinitials;else if("authors"in s&&s.authors!==c)u=w.processAuthors(s.authors,!0);else{const f=[];let h=1,p="author_1",d=!1,m=!1;for(;p in s;){const b=s[p];b===n[p]?(f.push(null),m=!0):(f.push(b),d=!0),p=`author_${++h}`}if(d){if(m)for(let b=0;b<f.length;b++){if(f[b]!=null)continue;const _=b+1,$=[n[`firstname_${_}`],n[`middlename_${_}`],n[`lastname_${_}`]].filter(Boolean).map(E=>E.replace(/ /g,"_"));f[b]=$.join(" ")}u=w.processAuthors(f,!0,!1)}else u={authorcount:0}}u.authorcount===0?o!=null?u=null:s.authorcount=0:(Object.assign(s,u),!("email"in s)&&"email_1"in s&&(s.email=s.email_1))}return i?Object.assign({},n,u??{}):null}static processAuthors(t,e=!1,i=!0){const s={};let n=0;const o=i&&String(t).includes(";")?String(t).split(Vc):[].concat(t);for(const l of o){const a=String(l);if(a==="")continue;n++;const c={};if(n===1)for(const f of Qs)c[f]=f;else for(const f of Qs)c[f]=`${f}_${n}`;let u=null;if(e){let f=a;a.includes("<")&&(s[c.author]=a.replace(/_/g," "),f=a.replace(Te,""));const h=f.split(/\s+/).filter(Boolean),p=h.length>3?[...h.slice(0,2),h.slice(2).join(" ")]:h;if(p.length===3){const d=p.pop();p.push(d.replace(/ {2,}/g," "))}u=p}else{const f=a.match(Hc);f&&(u=f.slice(1))}if(u){const f=u[0].replace(/_/g," ");s[c.firstname]=f,s[c.authorinitials]=f[0];let h=f;if(u[1])if(u[2]){const p=u[1].replace(/_/g," "),d=u[2].replace(/_/g," ");s[c.middlename]=p,s[c.lastname]=d,h=`${f} ${p} ${d}`,s[c.authorinitials]=`${f[0]}${p[0]}${d[0]}`}else{const p=u[1].replace(/_/g," ");s[c.lastname]=p,h=`${f} ${p}`,s[c.authorinitials]=`${f[0]}${p[0]}`}s[c.author]??=h,!e&&u[3]&&(s[c.email]=u[3])}else{const f=a.replace(/ {2,}/g," ").trim();s[c.author]=f,s[c.firstname]=f,s[c.authorinitials]=f[0]}if(n===1)s.authors=s[c.author];else{if(n===2)for(const f of Qs)f in s&&(s[`${f}_1`]=s[f]);s.authors=`${s.authors}, ${s[c.author]}`}}return s.authorcount=n,s}static async parseBlockMetadataLines(t,e,i={},s={}){for(;await w.parseBlockMetadataLine(t,e,i,s)&&(await t.readLine(),await t.skipBlankLines()!=null););return i}static async parseBlockMetadataLine(t,e,i,s={}){const n=await t.peekLine();if(!n)return null;const o=s.text_only,l=!o&&(n.startsWith("[")||n.startsWith(".")||n.startsWith("/")||n.startsWith(":"));if(!(o?n.startsWith("[")||n.startsWith("/"):l))return null;if(n.startsWith("[")){if(n.startsWith("[[")){if(n.endsWith("]]")){const c=n.match(eu);if(c){if(i.id=c[1],c[2]){const u=c[2];i.reftext=u.includes(nt)?e.subAttributes(u):u}return!0}}}else if(n.endsWith("]")){const c=n.match(iu);if(c){const u=i[1];return(await e.parseAttributes(c[1],[],{sub_input:!0,sub_result:!0,into:i}))[1]&&(i[1]=w.parseStyleAttribute(i,t)??u),!0}}}else if(l&&n.startsWith(".")){const c=n.match(Zr);if(c)return i.title=c[1],!0}else if(!l||n.startsWith("/")){if(n==="//")return!0;if(l&&n.startsWith("//")&&Bi(n,"/",n.length)){if(n.length!==3)return await t.readLinesUntil({terminator:n,skip_first_line:!0,preserve_last_line:!0,skip_processing:!0,context:"comment"}),!0}else if(n.startsWith("//")&&!n.startsWith("///"))return!0}else if(l&&n.startsWith(":")){const c=n.match(Bs);if(c)return await w.processAttributeEntry(t,e,i,c),!0}return null}static async processAttributeEntries(t,e,i=null){for(await t.skipCommentLines();await w.processAttributeEntry(t,e,i);)await t.readLine(),await t.skipCommentLines()}static async processAttributeEntry(t,e,i=null,s=null){if(!s){if(!await t.hasMoreLines())return!1;const o=await t.peekLine(),l=o?o.match(Bs):null;if(!l)return!1;s=l}let n=s[2]??"";if(n===""||n==null)n="";else if(n.endsWith(th)||n.endsWith(eh)){const o=n.slice(-2);for(n=n.slice(0,-2).trimEnd();await t.advance();){const l=await t.peekLine()??"";if(l==="")break;let a=l.trimStart();const c=a.endsWith(o);if(c&&(a=a.slice(0,-2).trimEnd()),n=`${n}${n.endsWith(" +")?S:" "}${a}`,!c)break}}return e&&n!==""&&n.match(un)?(n=await e._applyAttributeEntryValueSubs(n),w.storeAttribute(s[1],n,e,i,{skipSubs:!0}),!0):(w.storeAttribute(s[1],n,e,i),!0)}static storeAttribute(t,e,i=null,s=null,n={}){if(t.endsWith("!")?(t=t.slice(0,-1),e=null):t.startsWith("!")&&(t=t.slice(1),e=null),t=w.sanitizeAttributeName(t),t==="numbered"?t="sectnums":t==="hardbreaks"?t="hardbreaks-option":t==="showtitle"&&w.storeAttribute("notitle",e!==null?null:"",i,s),i)if(e!=null){if(e!==""&&t==="leveloffset"){const l=parseInt(i.getAttribute("leveloffset",0),10)||0;e.startsWith("+")?e=String(l+parseInt(e.slice(1),10)):e.startsWith("-")&&(e=String(l-parseInt(e.slice(1),10)))}const o=n.skipSubs?i._setAttributeRaw(t,e):i.setAttribute(t,e);o!=null&&(e=o,s&&new Vi(t,e).saveTo(s))}else i.deleteAttribute(t)&&s&&new Vi(t,e).saveTo(s);else s&&new Vi(t,e).saveTo(s);return[t,e]}static async readParagraphLines(t,e,i={}){i.break_on_blank_lines=!0,i.break_on_list_continuation=!0,i.preserve_last_line=!0;const s=o=>be(o)&&String(o)==="";let n=null;return e?n=o=>s(o)||w.isDelimitedBlock(o)||o.startsWith("[")&&si.test(o)||io.test(o):n=o=>s(o)||o.startsWith("[")&&si.test(o)||w.isDelimitedBlock(o),await t.readLinesUntil(i,n)}static isDelimitedBlock(t,e=!1){let i=t.length;if(i<2||!Qu[t.slice(0,2)])return null;let s,n;if(i===2)s=t,n=2;else if(n=i<5?i:4,s=t.slice(0,n),s.startsWith("`")){if(n===4){if(s==="````"||(s=s.slice(0,3),s!=="```"))return null;t=s,i=n=3}else if(s!=="```")return null}else if(n===3)return null;const o=Dn[s];if(!o)return null;const[l,a]=o;return i===n||uo[s]!=null&&Bi(t.slice(1),uo[s],i-1)?e?{context:l,masq:a,tip:s,terminator:t}:!0:null}static resolveListMarker(t,e){return t==="ulist"?e:t==="olist"?w.resolveOrderedListMarker(e)[0]:"<1>"}static resolveOrderedListMarker(t,e=null,i=!1,s=null){if(t.startsWith("."))return[t];const n=qs.find(c=>so[c].test(t));let o,l,a;switch(n){case"arabic":i&&(l=String(e+1),a=String(parseInt(t,10))),o="1.";break;case"loweralpha":i&&(l=String.fromCharCode(97+e),a=t.slice(0,-1)),o="a.";break;case"upperalpha":i&&(l=String.fromCharCode(65+e),a=t.slice(0,-1)),o="A.";break;case"lowerroman":i&&(l=mn(e+1).toLowerCase(),a=t.slice(0,-1)),o="i)";break;case"upperroman":i&&(l=mn(e+1),a=t.slice(0,-1)),o="I)";break;default:o=t}return e!=null?(i&&l!==a&&w.logger.warn(w.messageWithContext(`list item index: expected ${l}, got ${a}`,{source_location:s?.cursor})),[o,n]):[o]}static resolveOrderedListStart(t){if(t.startsWith("."))return 1;switch(qs.find(i=>so[i].test(t))){case"arabic":return parseInt(t,10);case"loweralpha":return t.slice(0,-1).charCodeAt(0)-96;case"upperalpha":return t.slice(0,-1).charCodeAt(0)-64;case"lowerroman":return mo(t.slice(0,-1).toUpperCase());case"upperroman":return mo(t.slice(0,-1));default:return 1}}static isSiblingListItem(t,e,i){if(i instanceof RegExp)return i.test(t);const s=t.match(ni[e]);return s?w.resolveListMarker(e,i)===w.resolveListMarker(e,s[1]):!1}static async parseTable(t,e,i){const s=new gt(e,i);let n=!1;if("cols"in i){const h=w.parseColspecs(i.cols);h.length>0&&(s.createColumns(h),n=!0)}const o=await t.skipBlankLines()??0;"header-option"in i?s.hasHeaderOption=!0:o===0&&!("noheader-option"in i)&&(s.hasHeaderOption="implicit");let l=s.hasHeaderOption==="implicit";const a=new gt.ParserContext(t,s,i),c=a.format;let u=-1,f=null;for(;;){let h=await t.readLine();if(h==null)break;const p=++u>0;if(p&&h==="")h=null,f!=null&&f++;else if(c==="psv")if(a.startsWith(h))h=h.slice(1),await a.closeOpenCell(),f!=null&&(f=null);else{const[d,m]=w.parseCellspec(h,"start",a.delimiter);d!=null?(await a.closeOpenCell(d),f!=null&&(f=null)):f!=null&&f===u&&(s.hasHeaderOption=l=f=null),h=m}for(p||(t.mark(),l&&(await t.hasMoreLines()&&await t.peekLine()===""?f=1:s.hasHeaderOption=l=null));;)if(h!=null){const d=h.match(a.delimiterRe);if(d){const m=h.slice(0,d.index),b=h.slice(d.index+d[0].length);if(c==="csv"){if(a.bufferHasUnclosedQuotes(m)){if(a.skipPastDelimiter(m),h=b,h==="")break;continue}a.buffer+=m}else if(c==="dsv"){if(m.endsWith("\\")){if(a.skipPastEscapedDelimiter(m),b===""){a.buffer+=S,a.keepCellOpen();break}h=b;continue}a.buffer+=m}else{if(m.endsWith("\\")){if(a.skipPastEscapedDelimiter(m),b===""){a.buffer+=S,a.keepCellOpen();break}h=b;continue}const[_,$]=w.parseCellspec(m);a.pushCellspec(_),a.buffer+=$}h=b||null,await a.closeCell(),b===""&&(c==="csv"||c==="dsv"?await a.closeCell(!0):c==="psv"&&a.keepCellOpen())}else{a.buffer+=h+S,c==="csv"?a.bufferHasUnclosedQuotes()?(f!=null&&u===0&&(s.hasHeaderOption=l=f=null),a.keepCellOpen()):await a.closeCell(!0):c==="dsv"?await a.closeCell(!0):a.keepCellOpen();break}}else{c==="psv"&&a.buffer!==""?(a.buffer+=S,a.keepCellOpen()):c==="csv"&&a.isCellOpen()&&(a.buffer+=S);break}if(a.isCellOpen())await t.hasMoreLines()||await a.closeCell(!0);else if(await t.skipBlankLines()==null)break}return await a.closeTable(),(s.attributes.colcount??=s.columns.length)!==0&&!n&&s.assignColumnWidths(),l&&(s.hasHeaderOption=!0),await s.partitionHeaderFooter(i),s}static parseColspecs(t){if(t=t.replace(/ /g,""),!t)return[];if(t===String(parseInt(t,10)))return Array.from({length:parseInt(t,10)},()=>({width:1}));const e=[],i=t.includes(",")?t.split(","):t.split(";");for(const s of i)if(s==="")e.push({width:1});else{const n=s.match(fu);if(!n)continue;const o={};if(n[2]){const[a,c]=n[2].split(".");a&&Ni[a]&&(o.halign=Ni[a]),c&&zi[c]&&(o.valign=zi[c])}o.width=n[3]?n[3]==="~"?-1:parseInt(n[3],10):1,n[4]&&ji[n[4]]&&(o.style=ji[n[4]]);const l=n[1]?parseInt(n[1],10):1;for(let a=0;a<l;a++)e.push({...o})}return e}static parseCellspec(t,e="end",i=null){let s,n="";if(e==="start"){if(!t.includes(i))return[null,t];const l=t.indexOf(i),a=t.slice(0,l);if(n=t.slice(l+i.length),s=a.match(pu),!s)return[null,t];if(s[0]==="")return[{},n];if(a.trim()==="")return[null,t]}else{if(s=t.match(du),!s)return[{},t];if(s[0].trimStart()==="")return[{},t.trimEnd()];n=t.slice(0,s.index)}const o={};if(s[1]){const[l,a]=s[1].split("."),c=l?parseInt(l,10):1,u=a?parseInt(a,10):1;s[2]==="+"?(c!==1&&(o.colspan=c),u!==1&&(o.rowspan=u)):s[2]==="*"&&c!==1&&(o.repeatcol=c)}if(s[3]){const[l,a]=s[3].split(".");l&&Ni[l]&&(o.halign=Ni[l]),a&&zi[a]&&(o.valign=zi[a])}return s[4]&&ji[s[4]]&&(o.style=ji[s[4]]),[o,n]}static parseStyleAttribute(t,e=null){const i=t[1];if(!i||i.includes(" "))return t.style=i;let s=null,n="";const o={};for(const l of i)l==="."?(w._yieldBufferedAttribute(o,s,n,e),n="",s="role"):l==="#"?(w._yieldBufferedAttribute(o,s,n,e),n="",s="id"):l==="%"?(w._yieldBufferedAttribute(o,s,n,e),n="",s="option"):n+=l;if(s){if(w._yieldBufferedAttribute(o,s,n,e),o.style&&(t.style=o.style),"id"in o&&(t.id=o.id),"role"in o){const l=t.role;t.role=!l||l===""?o.role.join(" "):`${l} ${o.role.join(" ")}`}if("option"in o)for(const l of o.option)t[`${l}-option`]="";return o.style??null}return t.style=i}static _yieldBufferedAttribute(t,e,i,s){if(e)if(i===""){const n=`invalid empty ${e} detected in style attribute`;s?w.logger.warn(w.messageWithContext(n,{source_location:s.cursorAtPrevLine()})):w.logger.warn(n)}else if(e==="id"){if("id"in t){const n="multiple ids detected in style attribute";s?w.logger.warn(w.messageWithContext(n,{source_location:s.cursorAtPrevLine()})):w.logger.warn(n)}t.id=i}else(t[e]??=[]).push(i);else i!==""&&(t.style=i)}static adjustIndentation(t,e=0,i=0){if(!t||t.length===0)return;if(i>0&&t.some(n=>n.includes(" ")))for(let n=0;n<t.length;n++){const o=t[n];if(o===""||!o.includes(" "))continue;let l="",a=0,c=0;for(const u of o){if(u===" "){const f=c+a,h=i-f%i||i;a+=h-1,l+=" ".repeat(h)}else l+=u;c++}t[n]=l}if(e<0)return;let s=null;for(const n of t){if(String(n)==="")continue;const o=n.length-n.trimStart().length;if(o===0){s=null;break}(s==null||o<s)&&(s=o)}if(e===0){if(s)for(let n=0;n<t.length;n++)String(t[n])!==""&&!be(t[n])&&(t[n]=t[n].slice(s))}else{const n=" ".repeat(e);for(let o=0;o<t.length;o++)String(t[o])!==""&&!be(t[o])&&(t[o]=n+(s?t[o].slice(s):t[o]))}}static uniform(t,e,i){if(t.length!==i)return!1;for(const s of t)if(s!==e)return!1;return!0}static sanitizeAttributeName(t){return t.replace(new RegExp(Jc.source,"gu"),"").toLowerCase()}static get logger(){return Zt.logger}static getLogger(){return this.logger}static messageWithContext(t,e={}){return _t.AutoFormattingMessage.attach({text:t,...e})}static createLogMessage(t,e={}){return this.messageWithContext(t,e)}}wi(w);function Bi(r,t,e){return w.uniform(r,t,e)}const xa={option(r,t){this.config[r]=t},process(...r){if(r.length===1&&typeof r[0]=="function")this._processBlock=r[0].bind(this);else{if(this._processBlock!==void 0)return this._processBlock(...r);throw new Error(`${this.constructor.name} #process method called before being registered`)}},processBlockGiven(){return this._processBlock!==void 0}},ki={...xa,prefer(){this.option("position",">>")},prepend(){this.prefer()}},yn={...xa,named(r){this instanceof ee?this.name=r:this.option("name",r)},contentModel(r){this.option("contentModel",r)},parseContentAs(r){this.option("contentModel",r)},positionalAttributes(...r){this.option("positionalAttrs",r.flat().map(String))},namePositionalAttributes(...r){this.option("positionalAttrs",r.flat().map(String))},positionalAttrs(...r){this.option("positionalAttrs",r.flat().map(String))},defaultAttributes(r){this.option("defaultAttrs",r)},defaultAttrs(r){this.option("defaultAttrs",r)},resolveAttributes(...r){if(r.length<=1){const t=r.length===0?!0:r[0];typeof t=="string"||typeof t=="symbol"?r=[t]:r=t}if(r===!0)this.option("positionalAttrs",[]),this.option("defaultAttrs",{});else if(Array.isArray(r)){const t=[],e={};for(let i of r)if(i=String(i),i.includes("=")){const s=i.indexOf("=");let n=i.slice(0,s);const o=i.slice(s+1);if(n.includes(":")){const l=n.indexOf(":"),a=n.slice(0,l);n=n.slice(l+1);const c=a==="@"?t.length:parseInt(a,10);t[c]=n}e[n]=o}else if(i.includes(":")){const s=i.indexOf(":"),n=i.slice(0,s),o=i.slice(s+1),l=n==="@"?t.length:parseInt(n,10);t[l]=o}else t.push(i);this.option("positionalAttrs",t.filter(i=>i!=null)),this.option("defaultAttrs",e)}else if(typeof r=="object"&&r!==null){const t=[],e={};for(const[i,s]of Object.entries(r)){let n=String(i);if(n.includes(":")){const o=n.indexOf(":"),l=n.slice(0,o);n=n.slice(o+1);const a=l==="@"?t.length:parseInt(l,10);t[a]=n}s&&(e[n]=s)}this.option("positionalAttrs",t.filter(i=>i!=null)),this.option("defaultAttrs",e)}else throw new Error(`unsupported attributes specification for macro: ${r}`)},resolvesAttributes(...r){this.resolveAttributes(...r)}},qh={...ki,handles(...r){if(r.length===1&&typeof r[0]=="function"){const t=r[0];this._handlesBlock=t.length===1?(e,i)=>t(i):t.bind(this)}else return this._handlesBlock!==void 0?this._handlesBlock(r[0],r[1]):!0}},Hh={...ki,atLocation(r){this.option("location",r)}},Vh={...yn,contexts(...r){this.option("contexts",new Set(r.flat()))},onContexts(...r){this.contexts(...r)},onContext(...r){this.contexts(...r)},bindTo(...r){this.contexts(...r)}},Aa={...yn,resolveAttributes(...r){r.length===1&&!r[0]?this.option("contentModel","text"):(yn.resolveAttributes.call(this,...r),this.option("contentModel","attributes"))},resolvesAttributes(...r){this.resolveAttributes(...r)}},Gh={...Aa,format(r){this.option("format",r)},matchFormat(r){this.option("format",r)},usingFormat(r){this.option("format",r)},match(r){this.option("regexp",r)}},Yh={content_model:"contentModel",positional_attrs:"positionalAttrs",pos_attrs:"positionalAttrs",default_attrs:"defaultAttrs"};function Ks(r){for(const[t,e]of Object.entries(Yh))r[e]===void 0&&r[t]!==void 0&&(r[e]=r[t]);return r}class ee{static get config(){return Object.hasOwn(this,"_config")||(this._config={}),this._config}static set config(t){this._config=t}static option(t,e){this.config[t]=e}static enableDsl(){const t=this.DSL;t&&Object.assign(this.prototype,t)}static useDsl(){this.enableDsl()}constructor(t={}){this.config={...Ks({...this.constructor.config}),...Ks({...t})}}updateConfig(t){Object.assign(this.config,Ks({...t}))}process(...t){throw new Error(`${this.constructor.name} subclass must implement the process method`)}createSection(t,e,i,s={}){const n=t.document,o=n.doctype,l=o==="book",a=s.level??t.level+1;let c,u=!1;const f=i.style;f?(delete i.style,l&&f==="abstract"?(c="chapter",Object.defineProperty(s,"_level",{value:1})):(c=f,u=!0)):l?c=a===0?"part":a>1?"section":"chapter":o==="manpage"&&e.toLowerCase()==="synopsis"?(c="synopsis",u=!0):c="section";const h=f&&l&&f==="abstract"||f&&u&&a===0?1:a,p=new Ct(t,h);return p.title=e,p.sectname=c,u?(p.special=!0,("numbered"in s?s.numbered:f==="appendix")?p.numbered=!0:!("numbered"in s)&&n.hasAttribute("sectnums","all")&&(p.numbered=l&&h===1?"chapter":!0)):h>0?("numbered"in s?s.numbered:n.hasAttribute("sectnums"))&&(p.numbered=p.special?!!t.numbered:!0):("numbered"in s?s.numbered:l&&n.hasAttribute("partnums"))&&(p.numbered=!0),i.id===!1?delete i.id:p.id=i.id=i.id||(n.hasAttribute("sectids")?Ct.generateId(p.title,n):null),p.updateAttributes(i),p}createBlock(t,e,i,s,n={}){return new et(t,e,{source:i,attributes:s,...n})}createList(t,e,i=null){const s=new fi(t,e);return i&&s.updateAttributes(i),s}createListItem(t,e=null){return new Hi(t,e)}createImageBlock(t,e,i={}){const s=e.target;if(!s)throw new Error("Unable to create an image block, target attribute is required");e.alt||(e.alt=e["default-alt"]=ss(s,!0).replace(/[_-]/g," "));const n="title"in e?e.title:null;n!==null&&delete e.title;const o=this.createBlock(t,"image",null,e,i);if(n){o.title=n;const l=e.caption;delete e.caption,o.assignCaption(l,"figure")}return o}createInline(t,e,i,s={}){const n=e==="quoted"?{type:"unquoted",...s}:s;return new B(t,e,i,n)}async parseContent(t,e,i=null){const s=e instanceof Kt?e:new Kt(e);return await w.parseBlocks(s,t,i),t}async parseAttributes(t,e,i={}){return!e||e.length===0?{}:(i.sub_attributes&&e.includes(nt)&&(e=t.subAttributes(e)),new zt(e).parse(i.positional_attributes||[]))}createParagraph(t,...e){return this.createBlock(t,"paragraph",...e)}createOpenBlock(t,...e){return this.createBlock(t,"open",...e)}createExampleBlock(t,...e){return this.createBlock(t,"example",...e)}createPassBlock(t,...e){return this.createBlock(t,"pass",...e)}createListingBlock(t,...e){return this.createBlock(t,"listing",...e)}createLiteralBlock(t,...e){return this.createBlock(t,"literal",...e)}createAnchor(t,...e){return this.createInline(t,"anchor",...e)}createInlinePass(t,...e){return this.createInline(t,"quoted",...e)}}class Fn extends ee{process(t,e){throw new Error(`${this.constructor.name} must implement the process method`)}}Fn.DSL=ki;class qn extends ee{process(t){throw new Error(`${this.constructor.name} must implement the process method`)}}qn.DSL=ki;class Hn extends ee{process(t,e){throw new Error(`${this.constructor.name} must implement the process method`)}}Hn.DSL=ki;class Vn extends ee{process(t,e,i,s){throw new Error(`${this.constructor.name} must implement the process method`)}handles(t,e){return!0}}Vn.DSL=qh;class Gn extends ee{constructor(t={}){super(t),this.config.location??="head"}process(t){throw new Error(`${this.constructor.name} must implement the process method`)}}Gn.DSL=Hh;class Yn extends ee{constructor(t=null,e={}){super(e),this.name=t||this.config.name||null;const i=this.config.contexts;i==null?this.config.contexts=new Set(["open","paragraph"]):typeof i=="string"?this.config.contexts=new Set([i]):Array.isArray(i)&&(this.config.contexts=new Set(i)),this.config.contentModel??="compound"}process(t,e,i){throw new Error(`${this.constructor.name} must implement the process method`)}}Yn.DSL=Vh;class va extends ee{constructor(t=null,e={}){super(e),this.name=t||this.config.name||null,this.config.contentModel??="attributes"}process(t,e,i){throw new Error(`${this.constructor.name} must implement the process method`)}}class Xn extends va{get name(){if(this._name!=null&&!aa.test(String(this._name)))throw new Error(`invalid name for block macro: ${this._name}`);return this._name}set name(t){this._name=t}process(t,e,i){return super.process(t,e,i)}}Xn.DSL=Aa;class ve extends va{static rxCache=new Map;get regexp(){return this.config.regexp??=this.resolveRegexp(String(this.name),this.config.format)}process(t,e,i){return super.process(t,e,i)}resolveRegexp(t,e){if(!aa.test(t))throw new Error(`invalid name for inline macro: ${t}`);const i=`${t}:${e}`;if(!ve.rxCache.has(i)){const s=e==="short"?"(){0}":"(\\S+?)";ve.rxCache.set(i,new RegExp(`\\\\?${t}:${s}\\[(|(?:${qc})*?(?<!\\\\))\\]`))}return ve.rxCache.get(i)}}ve.DSL=Gh;class Xh{constructor(t,e,i){this.kind=t,this.instance=e,this.config=i}}class Zs extends Xh{constructor(t,e,i=null){super(t,e,e.config),this.processMethod=i||((...s)=>e.process(...s)),this._direct=!1}}const Qh={preprocessor:Fn,tree_processor:qn,postprocessor:Hn,include_processor:Vn,docinfo_processor:Gn},Kh={block:Yn,block_macro:Xn,inline_macro:ve};class wn{constructor(t={}){this.groups=t,this._activating=!1,this._reset()}activate(t){this.document&&this._reset(),this.document=t;const e=[...Object.values(Sa.groups()),...Object.values(this.groups)];this._activating=!0;try{for(const i of e)typeof i=="function"?i.prototype&&typeof i.prototype.activate=="function"?new i().activate(this):i.length===0?i.call(this):i(this):i&&typeof i.activate=="function"&&i.activate(this)}finally{this._activating=!1}return this}preprocessor(...t){return this._addDocumentProcessor("preprocessor",t)}preprocessors(){return this._preprocessor_extensions}hasPreprocessors(){return!!this._preprocessor_extensions}get preprocessor_extensions(){return this._preprocessor_extensions}treeProcessor(...t){return this._addDocumentProcessor("tree_processor",t)}treeprocessor(...t){return this.treeProcessor(...t)}tree_processor(...t){return this.treeProcessor(...t)}treeProcessors(){return this._tree_processor_extensions}hasTreeProcessors(){return!!this._tree_processor_extensions}hasTeeProcessors(){return!!this._tree_processor_extensions}treeprocessors(){return this._tree_processor_extensions}get tree_processor_extensions(){return this._tree_processor_extensions}postprocessor(...t){return this._addDocumentProcessor("postprocessor",t)}postprocessors(){return this._postprocessor_extensions}hasPostprocessors(){return!!this._postprocessor_extensions}get postprocessor_extensions(){return this._postprocessor_extensions}includeProcessor(...t){return this._addDocumentProcessor("include_processor",t)}includeProcessors(){return this._include_processor_extensions}hasIncludeProcessors(){return!!this._include_processor_extensions}include_processor(...t){return this.includeProcessor(...t)}get include_processor_extensions(){return this._include_processor_extensions}docinfoProcessor(...t){return this._addDocumentProcessor("docinfo_processor",t)}hasDocinfoProcessors(t=null){return this._docinfo_processor_extensions?t?this._docinfo_processor_extensions.some(e=>e.config.location===t):!0:!1}docinfoProcessors(t=null){return this._docinfo_processor_extensions?t?this._docinfo_processor_extensions.filter(e=>e.config.location===t):this._docinfo_processor_extensions:[]}docinfo_processor(...t){return this.docinfoProcessor(...t)}get docinfo_processor_extensions(){return this._docinfo_processor_extensions}block(...t){return this._addSyntaxProcessor("block",t)}hasBlocks(){return!!this._block_extensions}blocks(){return this._block_extensions?Object.values(this._block_extensions):[]}registeredForBlock(t,e){const i=this._block_extensions?.[String(t)];return i?i.config.contexts.has(e)&&i:!1}findBlockExtension(t){return this._block_extensions?.[String(t)]??null}blockMacro(...t){return this._addSyntaxProcessor("block_macro",t)}block_macro(...t){return this.blockMacro(...t)}hasBlockMacros(){return!!this._block_macro_extensions}blockMacros(){return this._block_macro_extensions?Object.values(this._block_macro_extensions):[]}registeredForBlockMacro(t){return this._block_macro_extensions?.[String(t)]||!1}findBlockMacroExtension(t){return this._block_macro_extensions?.[String(t)]??null}inlineMacro(...t){return this._addSyntaxProcessor("inline_macro",t)}inline_macro(...t){return this.inlineMacro(...t)}hasInlineMacros(){return!!this._inline_macro_extensions}registeredForInlineMacro(t){return this._inline_macro_extensions?.[String(t)]||!1}findInlineMacroExtension(t){return this._inline_macro_extensions?.[String(t)]??null}inlineMacros(){return this._inline_macro_extensions?Object.values(this._inline_macro_extensions):[]}prefer(...t){const e=t.shift();let i;e instanceof Zs?i=e:i=this[e](...t);const s=`_${i.kind}_extensions`,n=this[s];if(Array.isArray(n)){const o=n.indexOf(i);o>-1&&n.splice(o,1),n.unshift(i)}return i}getGroups(){return this.groups}getPreprocessors(){return this.preprocessors()}getTreeProcessors(){return this.treeProcessors()}getIncludeProcessors(){return this.includeProcessors()}getPostprocessors(){return this.postprocessors()}getDocinfoProcessors(t=null){return this.docinfoProcessors(t)}getBlocks(){return this.blocks()}getBlockMacros(){return this.blockMacros()}getInlineMacros(){return this.inlineMacros()}getInlineMacroFor(t){return this.registeredForInlineMacro(t)}getBlockFor(t,e){return this.registeredForBlock(t,e)}getBlockMacroFor(t){return this.registeredForBlockMacro(t)}_addDocumentProcessor(t,e){const i=t.replace(/_/g," "),s=Qh[t];this[`_${t}_extensions`]||(this[`_${t}_extensions`]=[]);const n=this[`_${t}_extensions`],o=e[e.length-1],l=e.length>0&&typeof o=="function"&&!!(Object.getOwnPropertyDescriptor(o,"prototype")?.writable??!0);let a;if(l){const u=e.pop(),f=this._resolveArgs(e,1),h=new s(f);if(Object.assign(h,s.DSL),u.length===0?u.call(h):u(h),!h.processBlockGiven())throw new Error(`No block specified to process ${i} extension`);a=h}else{const[u,f]=this._resolveArgs(e,2);if(typeof u=="function"){if(!(u.prototype instanceof s))throw new Error(`Invalid type for ${i} extension: ${u}`);a=new u(f)}else if(u instanceof s)u.updateConfig(f),a=u;else throw new Error(`Invalid arguments specified for registering ${i} extension: ${e}`)}if(t==="include_processor"){const u=a.handles;if(typeof u=="function"&&u.length===1){const f=u.bind(a);a.handles=(h,p)=>f(p)}}const c=new Zs(t,a);return c._direct=!this._activating,c.config.position===">>"?n.unshift(c):n.push(c),c}_addSyntaxProcessor(t,e){const i=t.replace(/_/g," "),s=Kh[t];this[`_${t}_extensions`]||(this[`_${t}_extensions`]=Object.create(null));const n=this[`_${t}_extensions`],o=e[e.length-1],l=e.length>0&&typeof o=="function"&&!!(Object.getOwnPropertyDescriptor(o,"prototype")?.writable??!0);let a,c;if(l){const u=e.pop(),[f,h]=this._resolveArgs(e,2),p=new s(this._asSymbol(f),h);if(Object.assign(p,s.DSL),u.length===0?u.call(p):u(p),c=this._asSymbol(p.name),!c)throw new Error(`No name specified for ${i} extension`);if(!p.processBlockGiven())throw new Error(`No block specified to process ${i} extension`);a=p}else{const[u,f,h]=this._resolveArgs(e,3);if(typeof u=="function"){if(!(u.prototype instanceof s))throw new Error(`Class specified for ${i} extension does not inherit from ${s.name}: ${u}`);if(a=new u(this._asSymbol(f),h),c=this._asSymbol(a.name),!c)throw new Error(`No name specified for ${i} extension: ${u}`)}else if(u instanceof s){if(u.updateConfig(h),c=f?u.name=this._asSymbol(f):this._asSymbol(u.name),!c)throw new Error(`No name specified for ${i} extension: ${u}`);a=u}else throw new Error(`Invalid arguments specified for registering ${i} extension: ${e}`)}return n[c]=new Zs(t,a),n[c]._direct=!this._activating,n[c]}_reset(){const t=i=>{const s=i?.filter(n=>n._direct)??[];return s.length?s:null},e=i=>{if(!i)return null;const s=Object.create(null);for(const[n,o]of Object.entries(i))o._direct&&(s[n]=o);return Object.keys(s).length?s:null};this._preprocessor_extensions=t(this._preprocessor_extensions),this._tree_processor_extensions=t(this._tree_processor_extensions),this._postprocessor_extensions=t(this._postprocessor_extensions),this._include_processor_extensions=t(this._include_processor_extensions),this._docinfo_processor_extensions=t(this._docinfo_processor_extensions),this._block_extensions=e(this._block_extensions),this._block_macro_extensions=e(this._block_macro_extensions),this._inline_macro_extensions=e(this._inline_macro_extensions),this.document=null}_resolveArgs(t,e){const i=t[t.length-1],s=t.length>0&&i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof ee)?t.pop():{};if(e===1)return s;const n=e-1-t.length;if(n>0)for(let o=0;o<n;o++)t.push(void 0);else n<0&&t.splice(t.length+n,-n);return t.push(s),t}_asSymbol(t){return t!=null?String(t):null}}let Zh=-1;const oi=Object.create(null),Sa={generateName(){return`extgrp${this.nextAutoId()}`},nextAutoId(){return++Zh},groups(){return oi},getGroups(){return this.groups()},create(r=null,t=null){return t?new wn({[r||this.generateName()]:t}):new wn},register(...r){const t=r.length;if(t===0)throw new Error("Extension group to register not specified");const e=r.pop();if(!e)throw new Error("Extension group to register not specified");const i=r.pop()??this.generateName();if(r.length>0)throw new Error(`Wrong number of arguments (${t} for 1..2)`);return oi[String(i)]=e,e},unregisterAll(){for(const r of Object.keys(oi))delete oi[r]},unregister(...r){for(const t of r)delete oi[String(t)]},_buildProcessorClass(r,t,e){arguments.length===2&&(e=t,t=null);const i=class extends r{};return t&&Object.defineProperty(i,"name",{value:t}),Object.assign(i.prototype,e),i},createPreprocessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(Fn,r,t)},newPreprocessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createPreprocessor(r,t))},createTreeProcessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(qn,r,t)},newTreeProcessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createTreeProcessor(r,t))},createPostprocessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(Hn,r,t)},newPostprocessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createPostprocessor(r,t))},createIncludeProcessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(Vn,r,t)},newIncludeProcessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createIncludeProcessor(r,t))},createDocinfoProcessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(Gn,r,t)},newDocinfoProcessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createDocinfoProcessor(r,t))},createBlockProcessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(Yn,r,t)},newBlockProcessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createBlockProcessor(r,t))},createInlineMacroProcessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(ve,r,t)},newInlineMacroProcessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createInlineMacroProcessor(r,t))},createBlockMacroProcessor(r,t){return arguments.length===1&&(t=r,r=null),this._buildProcessorClass(Xn,r,t)},newBlockMacroProcessor(r,t){return arguments.length===1&&(t=r,r=null),new(this.createBlockMacroProcessor(r,t))}};class kn{constructor(t,e,i){this.index=t,this.id=e??null,this.text=i}getIndex(){return this.index}getId(){return this.id}getText(){return this.text}}class Jh{constructor(t,e){this.target=t,this.imagesdir=e}getTarget(){return this.target}getImagesDirectory(){return this.imagesdir}toString(){return this.target}}const Wi="",So=/\x01\x01fn:\d+\x01\x01/g;class tf{constructor(t,e={}){this._sanitized=!!(e.sanitize&&t.includes("<")),this._sanitized&&(t=t.replace(Te,"").replace(/ {2,}/g," ").trim());const i=e.separator??":",s=i?`${i} `:null;if(!s||!t.includes(s))this.main=t,this.subtitle=null;else{const n=t.lastIndexOf(s);this.main=t.slice(0,n),this.subtitle=t.slice(n+s.length)}this.combined=t}get title(){return this.main}isSanitized(){return this._sanitized}hasSubtitle(){return this.subtitle!=null}getMain(){return this.main}getCombined(){return this.combined}getSubtitle(){return this.subtitle}toString(){return this.combined}}class To{constructor(t,e,i,s,n,o){this.name=t,this.firstname=e,this.middlename=i,this.lastname=s,this.initials=n,this.email=o}getName(){return this.name}getFirstName(){return this.firstname}getMiddleName(){return this.middlename}getLastName(){return this.lastname}getInitials(){return this.initials}getEmail(){return this.email}}class ef{constructor(t,e,i){this._number=t??null,this._date=e??null,this._remark=i??null}isEmpty(){return!this._number&&!this._date&&!this._remark}getNumber(){return this._number}getDate(){return this._date}getRemark(){return this._remark}}class Ee extends te{_converter;_maxAttributeValueSize;_docinfoProcessorExtensions;_attributesModified;_counters;_footnotesDeferred=!1;_footnotePlaceholderSeq=0;_converting=!1;_headerAttributes;_reftexts;_parsed;_inputMtime;_parentDoctype;_initializeExtensions;_timings;_attributeOverrides;reader;doctype;baseDir;backend;safe;compatMode;get converter(){return this._converter}set converter(t){this._converter=t}constructor(t=null,e={}){super(null,"document",e),this._parent=this,this.document=this;const i=e.parent??null;if(delete e.parent,i){this.parentDocument=i,e.base_dir??=i.baseDir,i.options.catalog_assets&&(e.catalog_assets=!0),i.options.to_dir&&(e.to_dir=i.options.to_dir),this.catalog={...i.catalog,footnotes:[]},this._attributeOverrides={...i._attributeOverrides,...i.attributes};const u=this._attributeOverrides;delete u["compat-mode"];const f=u.doctype;delete u.doctype,delete u.notitle,delete u.showtitle,delete u.toc,this.attributes["toc-placement"]=u["toc-placement"]??"auto",delete u["toc-placement"],delete u["toc-position"],this.safe=i.safe,this.compatMode=i.compatMode,this.compatMode&&(this.attributes["compat-mode"]=""),this.outfilesuffix=i.outfilesuffix,this.sourcemap=i.sourcemap,this._timings=null,this.pathResolver=i.pathResolver,this.converter=i.converter,this.extensions=i.extensions,this.syntaxHighlighter=i.syntaxHighlighter,this._initializeExtensions=null,this._parentDoctype=f}else{this.parentDocument=null,this.catalog={ids:{},refs:{},footnotes:[],links:[],images:[],callouts:new xh,includes:{}},this._attributeOverrides={};const u=this._attributeOverrides;for(let[h,p]of Object.entries(e.attributes??{}))h.endsWith("@")?h.startsWith("!")?(h=h.slice(1,-1),p=!1):h.endsWith("!@")?(h=h.slice(0,-2),p=!1):(h=h.slice(0,-1),p=`${p}@`):h.startsWith("!")?(h=h.slice(1),p=p==="@"?!1:null):h.endsWith("!")&&(h=h.slice(0,-1),p=p==="@"?!1:null),u[h.toLowerCase()]=p;typeof e.to_file=="string"&&(u.outfilesuffix=Le(e.to_file));const f=e.safe;if(f?typeof f=="number"?this.safe=f:this.safe=at.valueForName(f)??at.SECURE:this.safe=at.SECURE,this._inputMtime=e.input_mtime??null,delete e.input_mtime,this.compatMode="compat-mode"in u,this.sourcemap=e.sourcemap??!1,this._timings=e.timings??null,delete e.timings,this.pathResolver=new jn,e.extension_registry)this.extensions=e.extension_registry.activate(this);else{this.extensions=null;const h=Sa.groups();Object.keys(h).length>0&&(this.extensions=new wn,this.extensions.activate(this))}this.syntaxHighlighter=null,this._initializeExtensions=!0,this._parentDoctype=null,"header_footer"in e&&!("standalone"in e)&&(e.standalone=e.header_footer)}this._parsed=!1,this._reftexts=null,this.header=null,this._headerAttributes=null,this._counters={},this._attributesModified=new Set,this._docinfoProcessorExtensions={};const s=e.standalone??!1;this.options=Object.freeze({...e});const n=this.attributes;if(i||(n["attribute-undefined"]=ce.attributeUndefined,n["attribute-missing"]=ce.attributeMissing,Object.assign(n,nh)),s)delete this._attributeOverrides.embedded,n.copycss="",n["iconfont-remote"]="",n.stylesheet="",n.webfonts="";else{this._attributeOverrides.embedded="";const u=this._attributeOverrides,f=u.showtitle,h=u.notitle;"showtitle"in u&&["showtitle","notitle"].filter(p=>p in u).pop()==="showtitle"?u.notitle={null:"",false:"@","@":!1}[f]:"notitle"in u?u.showtitle={null:"",false:"@","@":!1}[h]:n.notitle=""}const o=this._attributeOverrides;o.asciidoctor="",o["asciidoctor-version"]=Fc.version;const l=at.nameForValue(this.safe);if(o["safe-mode-name"]=l,o[`safe-mode-${l}`]="",o["safe-mode-level"]=this.safe,o["max-include-depth"]??=64,o["allow-uri-read"]??=null,"numbered"in o){const u=o.numbered;delete o.numbered,o.sectnums=u}if("hardbreaks"in o){const u=o.hardbreaks;delete o.hardbreaks,o["hardbreaks-option"]=u}if(e.base_dir?this.baseDir=o.docdir=sf(e.base_dir):o.docdir?this.baseDir=o.docdir:this.baseDir=o.docdir=nf(),e.backend&&(o.backend=String(e.backend)),e.doctype&&(o.doctype=String(e.doctype)),this.safe>=at.SERVER){if(o.copycss??=null,o["source-highlighter"]??=null,o.backend??=lo,!i&&"docfile"in o){const u=o.docdir??"";o.docfile=o.docfile.slice(u.length+1)}o.docdir="",o["user-home"]??=".",this.safe>=at.SECURE&&("max-attribute-value-size"in o||(o["max-attribute-value-size"]=4096),o.linkcss??="",o.icons??=null)}else o["user-home"]??=ca;const a=o["max-attribute-value-size"]??=null;this._maxAttributeValueSize=a!=null?Math.abs(parseInt(a,10)):null;const c=[];for(const[u,f]of Object.entries(o))if(f!=null&&f!==!1){let h=f,p=!1;typeof f=="string"&&f.endsWith("@")&&(h=f.slice(0,-1),p=!0),n[u]=h,p&&c.push(u)}else delete n[u],f===!1&&c.push(u);for(const u of c)delete o[u];if(i){this.backend=n.backend;const u=this._parentDoctype;(this.doctype=n.doctype=u)!==Us&&this._updateDoctypeAttributes(Us),this.reader=new Kt(t,e.cursor,{document:this}),this.sourcemap&&(this.sourceLocation=this.reader.cursor)}else{this.backend=null;const u=n.backend||lo;u==="manpage"?this.doctype=n.doctype=o.doctype="manpage":this.doctype=n.doctype??=Us,this._updateBackendAttributes(u,!0),n.stylesdir??=".",n.iconsdir??=`${n.imagesdir??"./images"}/icons`,this._fillDatetimeAttributes(n,this._inputMtime),this.reader=new $n(this,t,new Qt(n.docfile??null,this.baseDir),{normalize:!0}),this.sourcemap&&(this.sourceLocation=this.reader.cursor)}}get references(){return this.catalog}nested(){return!!this.parentDocument}static async create(t,e={}){const i=new Ee(t,e);return await i.parse(),i}async parse(t=null){if(this._parsed)return this;if(t&&(this.reader=new $n(this,t,new Qt(this.attributes.docfile??null,this.baseDir),{normalize:!0}),this.sourcemap&&(this.sourceLocation=this.reader.cursor)),!this.parentDocument&&this.extensions?.hasPreprocessors?.())for(const i of this.extensions.preprocessors())this.reader=i.processMethod(this,this.reader)??this.reader;if(await w.parse(this.reader,this,{header_only:this.options.parse_header_only}),this.restoreAttributes(),!this.parentDocument&&this.extensions?.hasTreeProcessors?.())for(const i of this.extensions.treeProcessors()){const s=i.processMethod(this);if(s instanceof Ee&&s!==this)return s}const e={...this.attributes};await this._resolveAllTexts(this,!1),this._restoreAttributeSnapshot(e);for(const i of Object.values(this.catalog.refs))i&&typeof i.precomputeReftext=="function"&&await i.precomputeReftext();return await this._buildReftextsMap(),this._footnotesDeferred=!0,await this._resolveAllTexts(this,!0),this._footnotesDeferred=!1,this._restoreAttributeSnapshot(e),delete this.attributes["footnote-number"],delete this._counters["footnote-number"],this._parsed=!0,this}isParsed(){return this._parsed}counter(t,e=null){if(this.parentDocument)return this.parentDocument.counter(t,e);const i=this.isAttributeLocked(t);let s=this._counters[t],n;return i&&s!=null||(s=this.attributes[t])!=null&&s!==""?n=this._counters[t]=gh(s):e!=null?n=this._counters[t]=String(e)===String(parseInt(e,10))?parseInt(e,10):e:n=this._counters[t]=1,i||(this.attributes[t]=n),n}_deferFootnoteIndex(){return`${Wi}fn:${this._footnotePlaceholderSeq++}${Wi}`}_resolveFootnoteIndex(t){return typeof t.index!="number"&&(t.index=this.counter("footnote-number")),t.index}_resolveFootnotePlaceholdersIn(t){if(typeof t!="string"||!t.includes(Wi))return t;const e=new Map;return t.replace(So,i=>{if(e.has(i))return e.get(i);const s=this.catalog.footnotes.find(o=>o.index===i),n=s?String(this._resolveFootnoteIndex(s)):i;return e.set(i,n),n})}_previewFootnotePlaceholdersIn(t){return typeof t!="string"||!t.includes(Wi)?t:t.replace(So,"1")}incrementAndStoreCounter(t,e){return new Vi(t,this.counter(t)).saveTo(e.attributes).value}counterIncrement(t,e){return this.incrementAndStoreCounter(t,e)}register(t,e){switch(t){case"ids":{const i=e[0],s=new B(this,"anchor",e[1],{type:"ref",id:i});return this.catalog.refs[i]??=s,this._reftexts&&e[1]&&(this._reftexts[e[1]]??=i),s}case"refs":{const i=e[0];return i in this.catalog.refs?!1:(this.catalog.refs[i]=e[1],!0)}case"footnotes":this.catalog.footnotes.push(e);return;default:if(this.options.catalog_assets){const i=t==="images"?new Jh(e,this.attributes.imagesdir):e;this.catalog[t]?.push(i)}}}resolveId(t){if(this._reftexts)return this._reftexts[t]??null;for(const[e,i]of Object.entries(this.catalog.refs))if((i.reftext??null)===t)return e;return null}async _buildReftextsMap(){this._reftexts={};for(const[t,e]of Object.entries(this.catalog.refs)){const i=e.xreftext?await e.xreftext():null;i!=null&&(this._reftexts[i]??=t)}}hasSections(){return this._nextSectionIndex>0}isMultipart(){if(this.doctype==="book")return this.blocks.some(t=>t.context!=="section"?!1:t.level===0?!0:(t.special,!1))}hasFootnotes(){return this.catalog.footnotes.length>0}get footnotes(){return[...this.catalog.footnotes].sort((t,e)=>t.index-e.index)}get callouts(){return this.catalog.callouts}isNested(){return this.parentDocument!=null}isEmbedded(){return"embedded"in this.attributes}hasExtensions(){return this.extensions!=null}source(){return this.reader?.source?.()??null}sourceLines(){return this.reader?.sourceLines??null}basebackend(t){return this.attributes.basebackend===t}get title(){return this.doctitle()}set title(t){let e=this.header;e||(e=this.header=new Ct(this,0),e.sectname="header"),e.title=t}doctitle(t={}){let e=this.attributes.title;if(e==null){const i=this.firstSection();if(i?e=i.title:t.use_fallback&&(e=this.attributes["untitled-label"]),e==null)return null}if(t.partition){const i=t.partition===!0?this.attributes["title-separator"]:t.partition;return new tf(e,{...t,separator:i})}return t.sanitize&&e.includes("<")?e.replace(Te,"").replace(/ {2,}/g," ").trim():e}get name(){return this.doctitle()}xreftext(t=null){const e=this.reftext;return e&&e.length>0?e:this.title}get author(){return this.attributes.author??null}get revdate(){return this.attributes.revdate??null}authors(){const t=this.attributes;if(!("author"in t))return[];const e=[new To(t.author,t.firstname,t.middlename,t.lastname,t.authorinitials,t.email)],i=parseInt(t.authorcount??"0",10);for(let s=2;s<=i;s++)e.push(new To(t[`author_${s}`],t[`firstname_${s}`],t[`middlename_${s}`],t[`lastname_${s}`],t[`authorinitials_${s}`],t[`email_${s}`]));return e}isNotitle(){return"notitle"in this.attributes}isNoheader(){return"noheader"in this.attributes}isNofooter(){return"nofooter"in this.attributes}firstSection(){return this.header??this.blocks.find(t=>t.context==="section")??null}hasHeader(){return this.header!=null}append(t){return t.context==="section"&&this.assignNumeral(t),super.append(t)}finalizeHeader(t,e=!0){return this._clearPlaybackAttributes(t),this._saveAttributes(),e||(t["invalid-header"]=!0),t}playbackAttributes(t){const e=Fh(t);if(e)for(const i of e)i.negate?(delete this.attributes[i.name],i.name==="compat-mode"&&(this.compatMode=!1)):(this.attributes[i.name]=i.value,i.name==="compat-mode"&&(this.compatMode=!0))}setAttribute(t,e=""){return this._setAttributeInternal(t,e,!1)}deleteAttribute(t){return this.isAttributeLocked(t)?!1:(delete this.attributes[t],this._attributesModified.add(t),!0)}isAttributeLocked(t){return Object.hasOwn(this._attributeOverrides,t)}attributeLocked(t){return this.isAttributeLocked(t)}setHeaderAttribute(t,e="",i=!0){const s=this._headerAttributes??this.attributes;return!i&&t in s?!1:(s[t]=e,!0)}async convert(t={}){this._timings&&this._timings.start("convert"),await this.parse(),this._converting=!0;try{this.parentDocument||await this._convertAsciiDocCells(),this.safe<at.SERVER&&Object.keys(t).length>0&&(t.outfile?this.attributes.outfile=t.outfile:delete this.attributes.outfile,t.outdir?this.attributes.outdir=t.outdir:delete this.attributes.outdir);let e;if(this.doctype==="inline"){const i=this.blocks[0]??this.header;i&&(i.contentModel==="compound"||i.contentModel==="empty"?this.logger.warn("no inline candidate; use the inline doctype to convert a single paragraph, verbatim, or raw block"):e=await i.content())}else{let i;"standalone"in t?i=t.standalone?"document":"embedded":"header_footer"in t?i=t.header_footer?"document":"embedded":i=this.options.standalone?"document":"embedded",e=await this.converter.convert(this,i)}if(!this.parentDocument&&this.extensions?.hasPostprocessors?.())for(const i of this.extensions.postprocessors())e=i.processMethod(this,e);return e}finally{this._converting=!1,this._timings&&this._timings.record("convert")}}render(t={}){return this.convert(t)}async write(t,e){if(this._timings&&this._timings.start("write"),typeof this.converter.write=="function")this.converter.write(t,e);else{if(e&&typeof e.write=="function")t&&t.length>0&&(e.write(t.replace(/\n$/,"")),e.write(S));else try{const{writeFile:i}=await St(async()=>{const{writeFile:s}=await import("./__vite-browser-external-D7Ct-6yo.js").then(n=>n._);return{writeFile:s}},[],import.meta.url);await i(e,t??"","utf8")}catch{}this.backend==="manpage"&&typeof e=="string"&&typeof this.converter.constructor?.writeAlternatePages=="function"&&this.converter.constructor.writeAlternatePages(this.attributes.mannames,this.attributes.manvolnum,e)}this._timings&&this._timings.record("write")}async content(){return delete this.attributes.title,super.content()}async docinfo(t="head",e=null){let i=null;if(this.safe<at.SECURE){const s=t!=="head"?`-${t}`:"";e??=this.outfilesuffix;let n=this.attributes.docinfo;if(n?n=n.split(",").map(o=>o.trim()):"docinfo2"in this.attributes?n=["private","shared"]:"docinfo1"in this.attributes?n=["shared"]:n=n!=null?["private"]:null,n){i=[];const o=`docinfo${s}${e}`,l=this.attributes.docinfodir,a=this._resolveDocinfoSubs();if(n.includes("shared")||n.includes(`shared-${t}`)){const h=this.normalizeSystemPath(o,l),p=await this.readAsset(h,{normalize:!0});p&&i.push(await this.applySubs(p,a))}const u=this.attributes.docname;if(u&&(n.includes("private")||n.includes(`private-${t}`))){const h=this.normalizeSystemPath(`${u}-${o}`,l),p=await this.readAsset(h,{normalize:!0});p&&i.push(await this.applySubs(p,a))}}}if(this.extensions&&this.hasDocinfoProcessors(t)){const s=this._docinfoProcessorExtensions[t].map(n=>n.processMethod(this)).filter(Boolean);return(i??[]).concat(s).join(S)}return i?i.join(S):""}hasDocinfoProcessors(t="head"){if(t in this._docinfoProcessorExtensions)return this._docinfoProcessorExtensions[t]!==!1;if(this.extensions?.hasDocinfoProcessors?.(t)){const e=this.extensions.docinfoProcessors(t);return this._docinfoProcessorExtensions[t]=e||!1,!!e}return this._docinfoProcessorExtensions[t]=!1,!1}getTitle(){return this.title}setTitle(t){this.title=t}getDoctitle(t={}){return this.doctitle(t)}getDocumentTitle(t={}){return this.doctitle(t)}getCaptionedTitle(){return this.captionedTitle()}getDoctype(){return this.doctype}getBackend(){return this.backend}getSafe(){return this.safe}getCompatMode(){return this.compatMode}getSourcemap(){return this.sourcemap}setSourcemap(t){this.sourcemap=t}getOutfilesuffix(){return this.outfilesuffix}getOptions(){return this.options}getConverter(){return this.converter}setConverter(t){this.converter=t}getSource(){return this.source()}getSourceLines(){return this.sourceLines()}getReader(){return this.reader}getFootnotes(){return this.footnotes}getCallouts(){return this.callouts}getCatalog(){return this.catalog}getCounters(){return this._counters}getAuthor(){return this.author}getAuthors(){return this.authors()}getBaseDir(){return this.baseDir}getRevisionInfo(){const t=this.attributes;return new ef(t.revnumber??null,t.revdate??null,t.revremark??null)}getExtensions(){return this.extensions}getParentDocument(){return this.parentDocument??void 0}getParent(){}getSyntaxHighlighter(){return this.syntaxHighlighter}getRefs(){return this.catalog.refs}getImages(){return this.catalog.images}getLinks(){return this.catalog.links}getHeader(){return this.header}isBasebackend(){return!!this.attributes.basebackend}getReferences(){return this.catalog}getRevisionDate(){return this.attributes.revdate??void 0}getRevdate(){return this.attributes.revdate??void 0}getRevisionNumber(){return this.attributes.revnumber??void 0}getRevisionRemark(){return this.attributes.revremark??void 0}hasRevisionInfo(){return!this.getRevisionInfo().isEmpty()}getNotitle(){return this.isNotitle()}getNoheader(){return this.isNoheader()}getNofooter(){return this.isNofooter()}restoreAttributes(){this.parentDocument||this.catalog.callouts.rewind();const t=this._headerAttributes;if(t){for(const e of Object.keys(this.attributes))e in t||delete this.attributes[e];Object.assign(this.attributes,t)}}async getDocinfo(t="head",e=void 0){return this.docinfo(t,e)}removeAttribute(t){const e=this.attributes[t];return this.deleteAttribute(t),e}toString(){return`#<Document {doctype: '${this.doctype}', doctitle: ${JSON.stringify(this.header?.title??null)}, blocks: ${this.blocks.length}}>`}_setAttributeRaw(t,e=""){return this._setAttributeInternal(t,e,!0)}_setAttributeInternal(t,e,i){if(this.isAttributeLocked(t))return null;if(!i&&e&&e!==""&&(e=this._applyAttributeValueSubs(e)),this._headerAttributes)this.attributes[t]=e;else{switch(t){case"backend":this._updateBackendAttributes(e,this._attributesModified.delete("htmlsyntax")&&e===this.backend);break;case"doctype":this._updateDoctypeAttributes(e);break;default:this.attributes[t]=e}this._attributesModified.add(t)}return e}async _convertAsciiDocCells(t=this){for(const e of t.blocks??[])if(e.context==="table")for(const i of["head","body","foot"])for(const s of e.rows[i]??[])for(const n of s)n.style==="asciidoc"&&n._innerDocument&&n._innerContent==null&&(await this._convertAsciiDocCells(n._innerDocument),n._innerContent=await n._innerDocument.convert());else await this._convertAsciiDocCells(e)}_applyAttributeValueSubs(t){const e=t.match(un);if(e){let s=e[2]??"";if(e[1]){const n=this.resolvePassSubs(e[1]);if(n)for(const o of n)o==="specialcharacters"?s=this.subSpecialchars(s):o==="attributes"?s=this.subAttributes(s):o==="replacements"&&(s=this.subReplacements(s))}return this._maxAttributeValueSize!=null?Ui(s,this._maxAttributeValueSize):s}const i=this.applyHeaderSubs(t);return this._maxAttributeValueSize!=null?Ui(i,this._maxAttributeValueSize):i}async _applyAttributeEntryValueSubs(t){const e=t.match(un);if(e){let s=e[2]??"";if(e[1]){const n=this.resolvePassSubs(e[1]);n&&(s=await this.applySubs(s,n))}return this._maxAttributeValueSize!=null?Ui(s,this._maxAttributeValueSize):s}const i=this.applyHeaderSubs(t);return this._maxAttributeValueSize!=null?Ui(i,this._maxAttributeValueSize):i}_resolveDocinfoSubs(){return"docinfosubs"in this.attributes?this.resolveSubs(this.attributes.docinfosubs,"block",null,"docinfo"):["attributes"]}_restoreAttributeSnapshot(t){for(const e of Reflect.ownKeys(this.attributes))delete this.attributes[e];Object.assign(this.attributes,t)}async _resolveAllTexts(t,e){this.playbackAttributes(t.attributes),t===this&&this.header&&await this.header.precomputeTitle?.(),t.attributes?.id!==""&&await t.precomputeTitle?.(),await t.precomputeReftext?.();const i=t.context;if(i==="dlist")for(const[s,n]of t.blocks??[]){for(const o of s??[])e&&await o.precomputeText?.(),await this._resolveAllTexts(o,e);n&&(e&&await n.precomputeText?.(),await this._resolveAllTexts(n,e))}else if(i==="table")for(const s of[...t.rows?.head??[],...t.rows?.body??[],...t.rows?.foot??[]])for(const n of s)e&&await n.precomputeText?.(),await n.precomputeReftext?.();else for(const s of t.blocks??[])e&&await s.precomputeText?.(),await this._resolveAllTexts(s,e)}_createConverter(t,e){const i=this.options;if(!this.converter&&i._preCreatedConverter)return i._preCreatedConverter;const s={document:this,htmlsyntax:this.attributes.htmlsyntax};return(i.template_dirs||i.template_dir)&&(s.template_dirs=[].concat(i.template_dirs??i.template_dir),s.template_cache=i.template_cache??!0,s.template_engine=i.template_engine,s.template_engine_options=i.template_engine_options,s.eruby=i.eruby,s.safe=this.safe,e&&(s.delegate_backend=e)),i.converter?new ya({[t]:i.converter}).createSync(t,s):(i.converter_factory??bi).createSync(t,s)}_clearPlaybackAttributes(t){delete t[Wn]}_saveAttributes(){const t=this.attributes;if(!("doctitle"in t)){const s=this.doctitle();s&&(t.doctitle=s)}this.id??=t["css-signature"]??null;let e;if("toc2"in t?(delete t.toc2,e="left"):"toc"in t&&(e=t.toc,delete t.toc),e!=null){const s=t["toc-placement"]??"macro",n=s&&s!=="auto"?s:t["toc-position"];if(e!==""||n){const o="left";let l="toc2";const a=n||e||o;switch(t["toc-placement"]="auto",a){case"left":case"<":case"<":t["toc-position"]="left";break;case"right":case">":case">":t["toc-position"]="right";break;case"top":case"^":t["toc-position"]="top";break;case"bottom":case"v":t["toc-position"]="bottom";break;case"preamble":case"macro":t["toc-position"]="content",t["toc-placement"]=a,l=null;break;default:delete t["toc-position"],l=null}l&&(t["toc-class"]??=l)}t.toc=""}const i=t.icons;if(i!=null&&!("icontype"in t)&&i!==""&&i!=="font"&&(t.icons="",i!=="image"&&(t.icontype=i)),this.compatMode="compat-mode"in t,this.compatMode&&"language"in t&&(t["source-language"]=t.language),!this.parentDocument){const s=t.basebackend;if(s==="html"){const n=t["source-highlighter"];if(n&&!t[`${n}-unavailable`])try{const o=this.options.syntax_highlighter_factory,l=this.options.syntax_highlighters;o?this.syntaxHighlighter=o.create(n,this.backend,{document:this}):l?this.syntaxHighlighter=new Ih(l,Zi).create(n,this.backend,{document:this}):this.syntaxHighlighter=Zi.create(n,this.backend,{document:this})}catch{}}else s==="docbook"&&(!this.isAttributeLocked("toc")&&!this._attributesModified.has("toc")&&(t.toc=""),!this.isAttributeLocked("sectnums")&&!this._attributesModified.has("sectnums")&&(t.sectnums=""));this.outfilesuffix=t.outfilesuffix??null;for(const n of rh){const o=this._attributeOverrides[n];n in this._attributeOverrides&&o!=null&&o!==!1&&delete this._attributeOverrides[n]}}this._headerAttributes={...t}}_fillDatetimeAttributes(t,e){const i=typeof process<"u"?cn.SOURCE_DATE_EPOCH:null,s=i&&i!==""?new Date(parseInt(i,10)*1e3):new Date;let n=t.localdate;n?t.localyear??=n.length>=4?n.slice(0,4):null:(n=t.localdate=Lo(s),t.localyear??=String(s.getFullYear()));const o=t.localtime??=Eo(s);t.localdatetime??=`${n} ${o}`;const l=i&&i!==""?s:e instanceof Date?e:s;let a=t.docdate;a?t.docyear??=a.length>=4?a.slice(0,4):null:(a=t.docdate=Lo(l),t.docyear??=String(l.getFullYear()));const c=t.doctime??=Eo(l);t.docdatetime??=`${a} ${c}`}_updateBackendAttributes(t,e=!1){if(!e&&t===this.backend)return;const i=this.backend,s=this.attributes,n=s.basebackend,o=this.doctype;let l=null,a=null;if(t.includes(":")){const d=t.split(":");a=d[0],t=d[1]}t.startsWith("xhtml")?(s.htmlsyntax="xml",t=t.slice(1)):t.startsWith("html")&&(s.htmlsyntax??="html"),t=ua[t]??t,a&&(l=t,t=a),o?(i&&(delete s[`backend-${i}`],delete s[`backend-${i}-doctype-${o}`]),s[`backend-${t}-doctype-${o}`]="",s[`doctype-${o}`]=""):i&&delete s[`backend-${i}`],s[`backend-${t}`]="",this.backend=s.backend=t;const c=this._createConverter(t,l);let u,f;if(c&&typeof c._getBackendTraits=="function"){const d=c._getBackendTraits();u=d.basebackend,f=d.filetype;const m=d.htmlsyntax;m&&(s.htmlsyntax=m),e?s.outfilesuffix??=d.outfilesuffix:this.isAttributeLocked("outfilesuffix")||(s.outfilesuffix=d.outfilesuffix)}else if(c){const d=gi(t);u=d.basebackend,f=d.filetype,e?s.outfilesuffix??=d.outfilesuffix:this.isAttributeLocked("outfilesuffix")||(s.outfilesuffix=d.outfilesuffix)}else throw new Error(`asciidoctor: FAILED: missing converter for backend '${t}'. Processing aborted.`);this.converter=c;const h=s.filetype;h&&delete s[`filetype-${h}`],s.filetype=f,s[`filetype-${f}`]="";const p=Hu[u];return p?s.pagewidth=p:delete s.pagewidth,u!==n&&(o?(n&&(delete s[`basebackend-${n}`],delete s[`basebackend-${n}-doctype-${o}`]),s[`basebackend-${u}-doctype-${o}`]=""):n&&delete s[`basebackend-${n}`],s[`basebackend-${u}`]="",s.basebackend=u),t}_updateDoctypeAttributes(t){if(!t||t===this.doctype)return;const e=this.backend,i=this.attributes,s=i.basebackend,n=this.doctype;return n?(delete i[`doctype-${n}`],e&&(delete i[`backend-${e}-doctype-${n}`],i[`backend-${e}-doctype-${t}`]=""),s&&(delete i[`basebackend-${s}-doctype-${n}`],i[`basebackend-${s}-doctype-${t}`]="")):(e&&(i[`backend-${e}-doctype-${t}`]=""),s&&(i[`basebackend-${s}-doctype-${t}`]="")),i[`doctype-${t}`]="",this.doctype=i.doctype=t,t}messageWithContext(t,e={}){return _t.AutoFormattingMessage.attach({text:t,...e})}createLogMessage(t,e={}){return this.messageWithContext(t,e)}}function sf(r){const t=new jn,e=r.replace(/\\/g,"/");return t.absolutePath(e)?t.expandPath(e):t.expandPath(`${t.workingDir}/${e}`)}function nf(){return typeof process<"u"?process.cwd():"/"}function we(r){return String(r).padStart(2,"0")}function Lo(r){return`${r.getFullYear()}-${we(r.getMonth()+1)}-${we(r.getDate())}`}function Eo(r){const t=-r.getTimezoneOffset(),e=t>=0?"+":"-",i=Math.abs(t),s=we(Math.floor(i/60)),n=we(i%60);return`${we(r.getHours())}:${we(r.getMinutes())}:${we(r.getSeconds())} ${t===0?"UTC":`${e}${s}${n}`}`}function Ui(r,t){const e=new TextEncoder().encode(r);if(e.length<=t)return r;let i=t;for(;i>0&&(e[i-1]&192)===128;)i--;if(i>0&&(e[i-1]&128)!==0){const s=e[i-1],n=s>=240?4:s>=224?3:s>=192?2:1;i-1+n>t?i--:i=t}return new TextDecoder().decode(e.slice(0,i))}wi(Ee.prototype);Ee.Footnote=kn;const Fi={supported:!1},Ro=`pre.highlightjs{overflow-x:auto}
|
|
83
|
+
/* non-numbered emphasis: a full-width highlighted line */
|
|
84
|
+
pre.highlightjs .hljs-ln-highlight{display:inline-block;width:100%;background-color:rgba(255,229,100,.28)}
|
|
85
|
+
/* line numbers: a two-column grid (auto-sized gutter | code). The number is a CSS
|
|
86
|
+
counter on the gutter cell, so it is never selected/copied and the column sizes
|
|
87
|
+
itself to the widest number. The gutter cell stretches to the row height, so its
|
|
88
|
+
separator spans a wrapped line; the emphasis lives in the code column only, so it
|
|
89
|
+
never covers the number and its background fills the column width */
|
|
90
|
+
pre.highlightjs code.linenums{display:grid;grid-template-columns:auto 1fr}
|
|
91
|
+
pre.highlightjs .ln{counter-increment:line;grid-column:1;text-align:right;padding:0 .8ch;border-right:1px solid;opacity:.3;-webkit-user-select:none;user-select:none}
|
|
92
|
+
pre.highlightjs .ln::before{content:counter(line)}
|
|
93
|
+
pre.highlightjs .line{grid-column:2;padding-left:.8ch}
|
|
94
|
+
pre.highlightjs .line.hljs-ln-highlight{background-color:rgba(255,229,100,.28)}
|
|
95
|
+
/* nowrap blocks: the code column grows to its content so the whole grid (numbers
|
|
96
|
+
included) scrolls horizontally instead of wrapping */
|
|
97
|
+
pre.highlightjs.nowrap code.linenums{grid-template-columns:auto max-content}`;function rf(r){return r.split(`
|
|
98
|
+
`).map(t=>{let e=t.match(/^(.*<span class="line[ "].*)<\/span>(.+)$/);return e?.[2].includes('class="conum"')?`${e[1]}${e[2]}</span>`:t.includes("hljs-ln-highlight")?(e=t.match(/^(.*<span class="hljs-ln-highlight">.*)<\/span>(.+)$/),e?.[2].includes('class="conum"')?`${e[1]}${e[2]}</span>`:t):t}).join(`
|
|
99
|
+
`)}class of extends wa{constructor(...t){super(...t),this.name="highlightjs",this._preClass="highlightjs",this._document=t[2]?.document??null}_buildMode(){return this._document?.getAttribute("highlightjs-mode")!=="build"?!1:Fi.supported?!0:(this._warnedBuildUnsupported||(this._warnedBuildUnsupported=!0,this._document?.logger?.warn("highlightjs-mode=build is not supported in this environment (it requires a server runtime); falling back to client-side highlighting")),!1)}handlesHighlighting(){return this._buildMode()}async highlight(t,e,i,s){return Fi.highlight(e,i,s)}async format(t,e,i){const s=this._buildMode()&&t.hasOption("linenums"),n=(l,a)=>{if(t.hasAttribute("nohighlight-option")&&(l.class=l.class.replace(" highlight","")),a.class=`language-${e||"none"} hljs${s?" linenums":""}`,s){const c=parseInt(t.getAttribute("start",1),10)||1;a.style=`counter-reset:line ${c-1}`}},o=this._buildMode()?rf:void 0;return super.format(t,e,{...i,transform:n,transformContent:o})}hasDocinfo(t){return this._buildMode()?t==="head":!0}async docinfo(t,e,i){if(this._buildMode())return this._buildDocinfo(t,e,i);const s=e.getAttribute("highlightjsdir")??`${i.cdn_base_url}/highlight.js/${fo}`;if(t==="head"){const o=e.getAttribute("highlightjs-theme")??"github";return`<link rel="stylesheet" href="${s}/styles/${o}.min.css"${i.self_closing_tag_slash??""}>`}const n=e.getAttribute("highlightjs-languages")?e.getAttribute("highlightjs-languages").split(",").map(o=>`<script src="${s}/languages/${o.trimStart()}.min.js"><\/script>
|
|
100
|
+
`).join(""):"";return`<script src="${s}/highlight.min.js"><\/script>
|
|
101
|
+
${n}<script>
|
|
102
|
+
if (!hljs.initHighlighting.called) {
|
|
103
|
+
hljs.initHighlighting.called = true
|
|
104
|
+
;[].slice.call(document.querySelectorAll('pre.highlight > code[data-lang]')).forEach(function (el) { hljs.highlightBlock(el) })
|
|
105
|
+
}
|
|
106
|
+
<\/script>`}async _buildDocinfo(t,e,i){const s=e.getAttribute("highlightjs-theme")??"github";if((e.getAttribute("highlightjs-stylesheet")??"embed")!=="link"){const a=await Fi.readThemeStylesheet(s);if(a)return`<style>
|
|
107
|
+
${a}
|
|
108
|
+
${Ro}
|
|
109
|
+
</style>`;e?.logger?.warn(`highlightjs (build mode): could not read the '${s}' theme stylesheet from the installed highlight.js package; linking it from the CDN instead (check the highlightjs-theme attribute)`)}const o=await Fi.version()??fo;return`<link rel="stylesheet" href="${e.getAttribute("highlightjsdir")??`${i.cdn_base_url}/highlight.js/${o}`}/styles/${s}.min.css"${i.self_closing_tag_slash??""}>
|
|
110
|
+
<style>
|
|
111
|
+
${Ro}
|
|
112
|
+
</style>`}}class af extends wa{constructor(...t){super(...t),this.name="html-pipeline"}async format(t,e,i){return`<pre${e?` lang="${e}"`:""}><code>${await t.content()}</code></pre>`}}const lf=/[<&>]/g,cf={">":">","<":"<","&":"&"},uf={false:/[*_`#^~]/,true:/[*'_+#^~]/},Ta=Object.freeze([]),hf=Object.freeze(["specialcharacters","quotes","replacements"]),La=Object.freeze(["specialcharacters","callouts"]),ke={none:Ta,normal:Ot,verbatim:La,specialchars:Mt},Io={a:"attributes",m:"macros",n:"normal",p:"post_replacements",q:"quotes",r:"replacements",c:"specialcharacters",v:"verbatim"},ff={block:[...Object.keys(ke),...Ot,"callouts"],inline:[...Object.keys(ke),...Ot]},ae="",Xt="",Ft="",le="",pf=new RegExp(`${Ft}(\\d+)${le}`,"g"),df=new RegExp(`<span\\b[^>]*>${Ft}</span>[^\\d]*(\\d+)[^\\d]*<span\\b[^>]*>${le}</span>`,"g"),H="\\",xt="]",$e="\\]",mf="+";function ai(r,t){const e=r.indexOf(t);return e===-1?[r,"",""]:[r.slice(0,e),t,r.slice(e+t.length)]}function gf(r,t){const e=new Set(r);for(const i of t)e.add(i);return[...e]}function bf(r,t){const e=new Set(t),i=new Set;return r.filter(s=>!e.has(s)||i.has(s)?!1:(i.add(s),!0))}function Js(r,t){const e=new Set(t);return r.filter(i=>!e.has(i))}function Z(r){return r.global?r:new RegExp(r.source,`${r.flags}g`)}const $f={async applySubs(r,t=Ot){if((Array.isArray(r),r.length===0)||!t||t.length===0)return r;const i=Array.isArray(r);i&&(r=r.length>1?r.join(S):r[0]);let s,n=!1;t.includes("macros")&&(r=this.extractPassthroughs(r),this.passthroughs.length>0&&(s=this.passthroughs,this.passthroughsLocked||(this.passthroughsLocked=!0,n=!0)));for(const o of t)switch(o){case"specialcharacters":r=this.subSpecialchars(r);break;case"quotes":r=await this.subQuotes(r);break;case"attributes":r.includes(nt)&&(r=this.subAttributes(r));break;case"replacements":r=this.subReplacements(r);break;case"macros":r=await this.subMacros(r);break;case"highlight":r=await this.highlightSource(r,t.includes("callouts"));break;case"callouts":t.includes("highlight")||(r=await this.subCallouts(r));break;case"post_replacements":r=await this.subPostReplacements(r);break;default:this.logger.warn(`unknown substitution type ${o}`)}return s&&(r=await this.restorePassthroughs(r),n&&(s.length=0,this.passthroughsLocked=null)),i?r.split(S):r},async applyNormalSubs(r){return this.applySubs(r,Ot)},applyHeaderSubs(r){return this.subAttributes(this.subSpecialchars(r))},async applyTitleSubs(r,t=Ot){return this.applySubs(r,t)},async applyReftextSubs(r){return this.applySubs(r,hf)},subSpecialchars(r){return r.includes(">")||r.includes("&")||r.includes("<")?r.replace(lf,t=>cf[t]):r},subSpecialcharacters(r){return this.subSpecialchars(r)},async subQuotes(r){const t=this.document.compatMode;if(uf[t].test(r))for(const[e,i,s]of oh[t])r=await ft(r,Z(s),async(...n)=>this.convertQuotedText(n,e,i));return r},subAttributes(r,t={}){const e=this.document.attributes;let i=!1,s=!1,n=null,o=!1,l=null,a=null;if(r=r.replace(Z(tu),(c,u,f,h,p)=>{if(u===H||p===H)return`{${f}}`;if(h){const m=f.split(":",3),b=m.shift();if(b==="set"){const[,_]=w.storeAttribute(m[0],m[1]||"",this.document);return _!=null||(l||=e["attribute-undefined"]||ce.attributeUndefined)!=="drop-line"?(i=!0,o=!0,Xt):(i=!0,s=!0,ae)}else return b==="counter2"?(this.document.counter(...m),i=!0,o=!0,Xt):this.document.counter(...m)}const d=f.toLowerCase();if(Object.hasOwn(e,d))return e[d];if(Object.hasOwn(po,d))return po[d];switch(a||=t.attributeMissing||e["attribute-missing"]||ce.attributeMissing){case"drop":return i=!0,o=!0,Xt;case"drop-line":return n||=t.dropLineSeverity||"info",n==="info"&&this.logger.info(`dropping line containing reference to missing attribute: ${d}`),i=!0,s=!0,ae;case"warn":return this.logger.warn(`skipping reference to missing attribute: ${d}`),c;default:return c}}),i)if(o){const c=r.replace(new RegExp(`${Xt}+`,"g"),Xt).split(S);return s?c.filter(u=>u!==Xt&&u!==ae&&!u.startsWith(ae)&&!u.includes(ae)).join(S).split(Xt).join(""):c.filter(u=>u!==Xt).join(S).split(Xt).join("")}else return r.includes(S)?r.split(S).filter(c=>c!==ae&&!c.startsWith(ae)&&!c.includes(ae)).join(S):t.returnDropSentinel?null:"";return r},subReplacements(r){if(la.test(r))for(const[t,e,i]of ah)r=r.replace(Z(t),(...s)=>this.doReplacement(s,e,i));return r},async subMacros(r){const t=r.includes("["),e=r.includes(":"),i=t&&e,s=i&&r.includes(":["),n=this.document,o=n.attributes,l=n.extensions;if(l?.inlineMacros())for(const a of l.inlineMacros())r=await ft(r,Z(a.instance.regexp),async(...c)=>{const u=c[0];if(u.startsWith(H))return u.slice(1);const f=typeof c[c.length-1]=="object"&&c[c.length-1]!==null?c[c.length-1]:null;let h,p;!f||Object.keys(f).length===0?(h=c[1],p=c[2]):(h=f.target??null,p=f.content??null);const d=a.config,m=d.defaultAttrs||d.default_attrs,b=m?{...m}:{},_=d.contentModel||d.content_model;p!=null&&(p?(p=this.normalizeText(p,!0,!0),_==="attributes"?await this.parseAttributes(p,d.positionalAttrs||d.positional_attrs||d.posAttrs||d.pos_attrs||[],{into:b}):b.text=p):_!=="attributes"&&(b.text=p),h=h??(d.format==="short"?p:null));const $=a.processMethod(this,h,b);if($ instanceof B){const E=$.attributes.subs;if(E){const k=this.expandSubs(E,"custom inline macro");k&&($.text=await this.applySubs($.text,k)),delete $.attributes.subs}return $.convert()}else if($)return this.logger.info(`expected substitution value for custom inline macro to be of type Inline; got ${$.constructor.name}: ${u}`),$;return""});return o.experimental!==void 0&&(s&&(r.includes("kbd:")||r.includes("btn:"))&&(r=await ft(r,Z(xu),async(a,c,u,f)=>{if(c)return a.slice(1);if(u==="kbd"){let h=f.trim();if(h.includes(xt)&&(h=h.split($e).join(xt)),h.length>1){let p=h.indexOf(",",1);const d=h.indexOf("+",1);if(p!==-1&&d!==-1?p=Math.min(p,d):p===-1&&(p=d),p!==-1){const m=h.charAt(p);h.endsWith(m)?(h=h.slice(0,-1).split(m).map(b=>b.trim()),h[h.length-1]+=m):h=h.split(m).map(b=>b.trim())}else h=[h]}else h=[h];return new B(this,"kbd",null,{attributes:{keys:h}}).convert()}else return new B(this,"button",this.normalizeText(f,!0,!0)).convert()})),i&&r.includes("menu:")&&(r=await ft(r,Z(Tu),async(a,c,u)=>{if(a.startsWith(H))return a.slice(1);const f=c;let h,p;if(u){const d=u.includes(xt)?u.split($e).join(xt):u;let m=null;if(d.includes(">")?m=">":d.includes(",")&&(m=","),m){const b=d.split(m).map(_=>_.trim());p=b.pop(),h=b}else h=[],p=d.trimEnd()}else h=[],p=null;return new B(this,"menu",null,{attributes:{menu:f,submenus:h,menuitem:p}}).convert()})),r.includes('"')&&r.includes(">")&&(r=await ft(r,Z(Lu),async(a,c)=>{if(a.startsWith(H))return a.slice(1);const u=c.split(">").map(d=>d.trim()),f=u.shift(),h=u.pop()??null,p=u;return new B(this,"menu",null,{attributes:{menu:f,submenus:p,menuitem:h}}).convert()}))),i&&(r.includes("image:")||r.includes("icon:"))&&(r=await ft(r,Z(wu),async(a,c,u)=>{if(a.startsWith(H))return a.slice(1);let f,h;a.startsWith("icon:")?(f="icon",h=["size"]):(f="image",h=["alt","width","height"]);const p=c,d=await this.parseAttributes(u,h,{unescapeInput:!0});let m;return f!=="icon"&&(m=d.id,n.register("images",p),d.imagesdir=d.imagesdir??o.imagesdir),d.alt=d.alt??(d["default-alt"]=ss(p,!0).replace(/[_-]/g," ")),new B(this,"image",null,{type:f,target:p,id:m,attributes:d}).convert()})),(r.includes("((")&&r.includes("))")||s&&r.includes("dexterm"))&&(r=await ft(r,Z(ku),async(a,c,u,f)=>{switch(c){case"indexterm":{if(a.startsWith(H))return a.slice(1);const h=this.normalizeText(u,!0,!0);let p;if(h.includes("=")){const d=await new zt(h,this).parse(),m=d[1];if(m){const b=[m],_=d[2];if(_){b.push(_);const $=d[3];$&&b.push($)}if(p={...d,terms:b},p["see-also"]){const $=p["see-also"];p["see-also"]=$.includes(",")?$.split(",").map(E=>E.trimStart()):[$]}}else p={terms:h}}else p={terms:this.splitSimpleCsv(h)};return new B(this,"indexterm",null,{attributes:p}).convert()}case"indexterm2":{if(a.startsWith(H))return a.slice(1);let h=this.normalizeText(u,!0,!0),p=null;if(h.includes("=")){const d=await new zt(h,this).parse();h=d[1]||h,d[1]?(p=d,p["see-also"]&&(p["see-also"]=p["see-also"].includes(",")?p["see-also"].split(",").map(m=>m.trimStart()):[p["see-also"]])):p=null}return new B(this,"indexterm",h,{attributes:p,type:"visible"}).convert()}default:{let h=f,p=!0,d=null,m=null;if(a.startsWith(H))if(h.startsWith("(")&&h.endsWith(")"))h=h.slice(1,-1),p=!0,d="(",m=")";else return a.slice(1);else h.startsWith("(")?h.endsWith(")")?(h=h.slice(1,-1),p=!1):(h=h.slice(1),d="(",m=""):h.endsWith(")")&&(h=h.slice(0,-1),d="",m=")");let b;if(p){let _=this.normalizeText(h,!0),$=null;if(_.includes(";&")){if(_.includes(" >> ")){const[E,,k]=ai(_," >> ");_=E,$={see:k}}else if(_.includes(" &> ")){const E=_.split(" &> ");_=E.shift(),$={"see-also":E}}}b=await new B(this,"indexterm",_,{attributes:$,type:"visible"}).convert()}else{const _={};let $=this.normalizeText(h,!0);if($.includes(";&")){if($.includes(" >> ")){const[E,,k]=ai($," >> ");$=E,_.see=k}else if($.includes(" &> ")){const E=$.split(" &> ");$=E.shift(),_["see-also"]=E}}_.terms=this.splitSimpleCsv($),b=await new B(this,"indexterm",null,{attributes:_}).convert()}return d!==null?`${d}${b}${m}`:b}}})),e&&r.includes("://")&&(r=await ft(r,Z(Au),async(a,c,u,f,h,p,d,m,b)=>{if(u&&p==null){if(c.startsWith(H))return a.slice(1);if(f.startsWith(H))return c+a.slice(c.length+1);if(!d)return a;const _=f+d;n.register("links",_);const $=o["hide-uri-scheme"]!==void 0?_.replace(xe,""):_;return new B(this,"anchor",$,{type:"link",target:_,attributes:{role:"bare"}}).convert()}else{if(f.startsWith(H))return c+a.slice(c.length+1);let _=c,$=f+(h||m||""),E="",k;if(p!=null)_==="link:"&&(_=""),k=p||null;else{switch(_){case"link:":case'"':case"'":return a}switch(b){case";":if($=$.slice(0,-1),$.endsWith(")")?($=$.slice(0,-1),E=");"):E=";",$===f)return a;break;case":":if($=$.slice(0,-1),$.endsWith(")")?($=$.slice(0,-1),E="):"):E=":",$===f)return a;break}k=null}const v={type:"link"};let L=null,R=!1;if(k!==null){let I=k.includes(xt)?k.split($e).join(xt):k;if(k=I,!n.compatMode&&k.includes("=")){const[C,W]=await this.extractAttributesFromText(k,"");k=C,I=C,L=W,v.id=L?.id}k.endsWith("^")&&(I=k=k.slice(0,-1),L?L.window=L.window??"_blank":L={window:"_blank"}),I!=null&&I===""&&(k=o["hide-uri-scheme"]!==void 0?$.replace(xe,""):$,R=!0)}else k=o["hide-uri-scheme"]!==void 0?$.replace(xe,""):$,R=!0;return R&&(L?L.role="role"in(L||{})?`bare ${L.role}`:"bare":L={role:"bare"}),v.target=$,n.register("links",$),L&&(v.attributes=L),`${_}${await new B(this,"anchor",k,v).convert()}${E}`}})),i&&(r.includes("link:")||r.includes("ilto:"))&&(r=await ft(r,Z(vu),async(a,c,u,f)=>{if(a.startsWith(H))return a.slice(1);let h,p;c?(p=u,h=`mailto:${p}`):h=u;let d=null;const m={type:"link"};let b=f;if(b){if(b=b.includes(xt)?b.split($e).join(xt):b,c){if(!n.compatMode&&b.includes(",")){const[_,$]=await this.extractAttributesFromText(b,"");b=_,d=$,m.id=d?.id,d?.[2]&&(d[3]?h=`${h}?subject=${Vs(d[2])}&body=${Vs(d[3])}`:h=`${h}?subject=${Vs(d[2])}`)}}else if(!n.compatMode&&b.includes("=")){const[_,$]=await this.extractAttributesFromText(b,"");b=_,d=$,m.id=d?.id}b.endsWith("^")&&(b=b.slice(0,-1),d?d.window=d.window??"_blank":d={window:"_blank"})}return b||(c?b=p:(o["hide-uri-scheme"]!==void 0?b=h.replace(xe,"")||h:b=h,d?d.role="role"in d?`bare ${d.role}`:"bare":d={role:"bare"})),m.target=h,n.register("links",h),d&&(m.attributes=d),new B(this,"anchor",b,m).convert()})),r.includes("@")&&(r=await ft(r,Z(_u),async(a,c)=>{if(c)return c===H?a.slice(1):a;const u=a,f=`mailto:${u}`;return n.register("links",f),new B(this,"anchor",u,{type:"link",target:f}).convert()})),t&&this.context==="list_item"&&this.getParent().style==="bibliography"&&(r=await ft(r,oa,async(a,c,u)=>new B(this,"anchor",u,{type:"bibref",id:c}).convert())),(t&&r.includes("[[")||i&&r.includes("or:"))&&(r=await ft(r,Z($u),async(a,c,u,f,h,p)=>{if(c)return a.slice(1);let d,m;return u?(d=u,m=f):(d=h,m=p?p.includes(xt)?p.split($e).join(xt):p:null),new B(this,"anchor",m,{type:"ref",id:d}).convert()})),(r.includes("&")&&r.includes(";&l")||i&&r.includes("xref:"))&&(r=await ft(r,Z(Iu),async(a,c,u,f)=>{if(a.startsWith(H))return a.slice(1);const h={};let p,d,m,b,_,$,E;if(c){if(p=c,p.includes(",")){const k=p.indexOf(","),v=p.slice(k+1).trimStart();p=p.slice(0,k),d=v||null}}else if(m=!0,p=u,f&&(d=f.includes(xt)?f.split($e).join(xt):f,!n.compatMode&&d.includes("="))){const[k,v]=await this.extractAttributesFromText(d);d=k,Object.assign(h,v)}if(n.compatMode)_=p;else{const k=p.indexOf("#");k!==-1&&(k===0||p[k-1]!=="&")?k>0?(p.length-1-k>0?(b=p.slice(0,k),_=p.slice(k+1)):b=p.slice(0,-1),m?b.endsWith(".adoc")?E=b=b.slice(0,-5):dn(b)||(E=b):Object.keys(ha).some(L=>b.endsWith(L))?E=b=b.slice(0,b.lastIndexOf(".")):E=b):($=p,_=p.slice(1)):m?p.endsWith(".adoc")?E=b=p.slice(0,-5):dn(p)?b=p:_=p:_=p}if($)p=_,this.logger.isInfo?.()&&!n.catalog.refs[p]&&this.logger.info(`possible invalid reference: ${p}`);else if(b)if(E&&(n.attributes.docname===b||n.catalog.includes[b]))_?(p=_,b=null,$=`#${_}`,this.logger.isInfo?.()&&!n.catalog.refs[p]&&this.logger.info(`possible invalid reference: ${p}`)):(p=null,b=null,$="#");else{const k=n.attributes.relfileprefix||"",v=E?n.attributes.relfilesuffix??n.outfilesuffix:"",L=`${k}${b}${v}`;p=b,b=L,_?(p=`${p}#${_}`,$=`${b}#${_}`):$=b}else n.compatMode?(p=_,$=`#${_}`,this.logger.isInfo?.()&&!n.catalog.refs[p]&&this.logger.info(`possible invalid reference: ${p}`)):n.catalog.refs[_]?(p=_,$=`#${_}`):(_.includes(" ")||_.toLowerCase()!==_)&&(p=await n.resolveId(_))?(_=p,$=`#${p}`):(p=_,$=`#${_}`,this.logger.isInfo?.()&&this.logger.info(`possible invalid reference: ${p}`));return b!=null&&(h.path=b),_!=null&&(h.fragment=_),h.refid=p,new B(this,"anchor",d,{type:"xref",target:$,attributes:h}).convert()})),i&&r.includes("tnote")&&(r=await ft(r,Z(yu),async(a,c,u,f)=>{if(a.startsWith(H))return a.slice(1);let h,p,d,m;if(c)if(f){const _=f.indexOf(",");_>=0?(h=f.slice(0,_),p=f.slice(_+1)):h=f,n.compatMode||this.logger.warn(`found deprecated footnoteref macro: ${a}; use footnote macro with target instead`)}else return a;else h=u,p=f;let b;if(h){const _=n.catalog.footnotes.find($=>$.id===h);_?(b=n._footnotesDeferred?_.index:n._resolveFootnoteIndex(_),p=_.text,d="xref",m=h,h=null):p?(p=await this.restorePassthroughs(this.normalizeText(p,!0,!0)),b=n._footnotesDeferred?n._deferFootnoteIndex():n.counter("footnote-number"),n.register("footnotes",new kn(b,h,p)),d="ref",m=null):(this.logger.warn(`invalid footnote reference: ${h}`),d="xref",m=h,p=h,h=null)}else if(p)p=await this.restorePassthroughs(this.normalizeText(p,!0,!0)),b=n._footnotesDeferred?n._deferFootnoteIndex():n.counter("footnote-number"),n.register("footnotes",new kn(b,h,p)),d=null,m=null;else return a;return new B(this,"footnote",p,{attributes:{index:b},id:h,target:m,type:d}).convert()})),r},async subPostReplacements(r){if("hardbreaks-option"in this.attributes||"hardbreaks-option"in this.document.attributes){const t=r.split(S);if(t.length<2)return r;const e=t.pop();return[...await Promise.all(t.map(s=>new B(this,"break",s.endsWith(ho)?s.slice(0,-2):s,{type:"line"}).convert())),e].join(S)}else if(r.includes(mf)&&r.includes(ho))return ft(r,Z(Ou),async(t,e)=>new B(this,"break",e,{type:"line"}).convert());return r},async subSource(r,t){return t?await this.subCallouts(this.subSpecialchars(r)):this.subSpecialchars(r)},async subCallouts(r){const t=this.hasAttribute("line-comment")?hu[this.getAttribute("line-comment")]:cu;let e=0;return ft(r,Z(t),async(i,s,n,o,l)=>{if(n)return i.replace(H,"");const a=s||(o==="--"?["<!--","-->"]:null),c=l==="."?String(++e):l;return new B(this,"callout",c,{id:this.document.callouts.readNextId(),attributes:{guard:a}}).convert()})},async highlightSource(r,t){const e=this.document.syntaxHighlighter;if(!e?.handlesHighlighting())return this.subSource(r,t);let i;t&&([r,i]=this.extractCallouts(r));const s=this.document.attributes,n=e.name;let o=null,l=null;this.hasOption("linenums")&&(o=s[`${n}-linenums-mode`]||"table",l=parseInt(this.getAttribute("start",1),10),l<1&&(l=1));let a=null;this.hasAttribute("highlight")&&(a=this.resolveLinesToHighlight(r,this.getAttribute("highlight"),l));const c=await e.highlight(this,r,this.getAttribute("language"),{callouts:i,cssMode:s[`${n}-css`]||"class",highlightLines:a,numberLines:o,startLineNumber:l,style:s[`${n}-style`]}),[u,f]=Array.isArray(c)?c:[c,void 0];let h=u;return this.passthroughs.length>0&&(h=h.replace(Z(df),`${Ft}$1${le}`)),!i||Object.keys(i).length===0?h:await this.restoreCallouts(h,i,f)},resolveLinesToHighlight(r,t,e=null){let i=[];t.includes(" ")&&(t=t.split(" ").join(""));const s=t.includes(",")?t.split(","):t.split(";");for(let n of s){let o=!1;n.startsWith("!")&&(n=n.slice(1),o=!0);const l=n.includes("..")?"..":n.includes("-")?"-":null;if(l){const[a,,c]=ai(n,l),u=parseInt(a,10);let f;(!c||(f=parseInt(c,10))<0)&&(f=r.split(S).length+1);const h=Array.from({length:f-u+1},(p,d)=>u+d);o?i=Js(i,h):i=gf(i,h)}else if(o){const a=parseInt(n,10);i=i.filter(c=>c!==a)}else{const a=parseInt(n,10);i.includes(a)||i.push(a)}}if(e){const n=e-1;n!==0&&(i=i.map(o=>o-n))}return i.sort((n,o)=>n-o)},extractPassthroughs(r){const t=this.document.compatMode,e=this.passthroughs;(r.includes("++")||r.includes("$$")||r.includes("ss:"))&&(r=r.replace(Z(Ru),(o,l,a,c,u,f,h,p,d)=>{const m=u;if(m){if(t&&m==="++")return`${a?`${l}[${a}]${c}`:`${l}${c}`}++${this.extractPassthroughs(f)}++`;let b,_,$;if(a){const v=a,L=c.length;if(L>0)return`${l}[${v}]${H.repeat(L-1)}${m}${f}${m}`;l===H?$=`[${v}]`:m==="++"?v==="x-"?(_=!0,b={}):v.endsWith(" x-")?(_=!0,b=this.parseQuotedTextAttributes(v.slice(0,-3))):b=this.parseQuotedTextAttributes(v):b=this.parseQuotedTextAttributes(v)}else{const v=c.length;if(v>0)return`${H.repeat(v-1)}${m}${f}${m}`}const E=m==="+++"?[]:[...Mt];let k;return b?_?e[k=e.length]={text:f,subs:Ot,type:"monospaced",attributes:b}:e[k=e.length]={text:f,subs:E,type:"unquoted",attributes:b}:e[k=e.length]={text:f,subs:E},`${$||""}${Ft}${k}${le}`}else{if(h===H)return o.slice(1);let b;return p?e[b=e.length]={text:this.normalizeText(d,null,!0),subs:this.resolvePassSubs(p)}:e[b=e.length]={text:this.normalizeText(d,null,!0),subs:[]},`${Ft}${b}${le}`}}));const[i,s,n]=Eu[t];return(r.includes(i)||s&&r.includes(s))&&(r=r.replace(Z(n),(o,l,a,c,u,f,h,p,d)=>{const m=l,b=u||c,_=!!f,$=h,E=p,k=d;let v,L,R;if(t?v=!0:b&&(b==="x-"||b.endsWith(" x-"))&&(v=!0,L=!0),b){if(_)return`${m}[${b}]${$.slice(1)}`;if(m===H){if(L&&E==="`")return`${m}[${b}]${$}`;if(t&&E==="`"){let C;return e[C=e.length]={text:k,subs:Mt,type:"monospaced"},`[${b}]${Ft}${C}${le}`}return`[${b}]${$}`}else L?R=b==="x-"?{}:this.parseQuotedTextAttributes(b.slice(0,-3)):R=this.parseQuotedTextAttributes(b)}else{if(_)return`${m}${$.slice(1)}`;if(t&&m===H)return $}let I;if(t)e[I=e.length]={text:k,subs:Mt,attributes:R,type:"monospaced"};else if(R)if(v){const C=E==="`"?Mt:Ot;e[I=e.length]={text:k,subs:C,attributes:R,type:"monospaced"}}else e[I=e.length]={text:k,subs:Mt,attributes:R,type:"unquoted"};else e[I=e.length]={text:k,subs:Mt};return`${m||""}${Ft}${I}${le}`})),r.includes(":")&&(r.includes("stem:")||r.includes("math:"))&&(r=r.replace(Z(Su),(o,l,a,c)=>{if(o.startsWith(H))return o.slice(1);let u=l;u==="stem"&&(u=pa[this.document.attributes.stem]);let f=this.normalizeText(c,null,!0);u==="latexmath"&&f.startsWith("$")&&f.endsWith("$")&&(f=f.slice(1,-1));const h=a?this.resolvePassSubs(a,"stem macro"):this.document.basebackend("html")?Mt:null,p=e.length;return e[p]={text:f,subs:h,type:u},`${Ft}${p}${le}`})),r},async restorePassthroughs(r){if(!r.includes(Ft))return r;const t=this.passthroughs;return ft(r,Z(pf),async(e,i)=>{const s=t[parseInt(i,10)];if(s){let n=await this.applySubs(s.text,s.subs);const o=s.type;if(o){const l=s.attributes,a=l?.id;n=await new B(this,"quoted",n,{type:o,id:a,attributes:l}).convert()}return n.includes(Ft)?this.restorePassthroughs(n):n}else return this.logger.error(`unresolved passthrough detected: ${r}`),"??pass??"})},resolveSubs(r,t="block",e=null,i=null){if(!r||r.length===0)return;let s=null;r.includes(" ")&&(r=r.split(" ").join(""));const n=zu.test(r);for(let a of r.split(",")){let c=null;if(n){const f=a.charAt(0);f==="+"?(c="append",a=a.slice(1)):f==="-"?(c="remove",a=a.slice(1)):a.endsWith("+")&&(c="prepend",a=a.slice(0,-1))}let u;if(t==="inline"&&(a==="verbatim"||a==="v"))u=Mt;else if(a in ke)u=ke[a];else if(t==="inline"&&a.length===1&&a in Io){const f=Io[a];u=ke[f]||[f]}else u=[a];if(c)switch(s=s??(e?[...e]:[]),c){case"append":s=[...s,...u];break;case"prepend":s=[...u,...s];break;case"remove":s=Js(s,u);break}else s=s??[],s=[...s,...u]}if(!s)return;const o=bf(s,ff[t]),l=Js(s,o);return l.length>0&&this.logger.warn(`invalid substitution type${l.length>1?"s":""}${i?" for ":""}${i||""}: ${l.join(", ")}`),o},resolveBlockSubs(r,t,e){return this.resolveSubs(r,"block",t,e)},resolvePassSubs(r,t="passthrough macro"){return this.resolveSubs(r,"inline",null,t)},expandSubs(r,t=null){if(typeof r=="string")return r==="none"?null:ke[r]||[r];if(Array.isArray(r)){const e=[];for(const i of r)if(i!=="none"){const s=ke[i];s?e.push(...s):e.push(i)}return e.length===0?null:e}else return this.resolveSubs(r,"inline",null,t)},commitSubs(){let r=this.defaultSubs;if(!r)switch(this.contentModel){case"simple":r=Ot;break;case"verbatim":r=this.context==="verse"?Ot:La;break;case"raw":r=this.context==="stem"?Mt:Ta;break;default:return this.subs}const t=this.attributes.subs;if(t?this.subs=this.resolveBlockSubs(t,r,this.context)||[]:this.subs=[...r],this.context==="listing"&&this.style==="source"&&this.document.syntaxHighlighter?.handlesHighlighting()){const e=this.subs.indexOf("specialcharacters");e!==-1&&(this.subs[e]="highlight")}return null},async parseAttributes(r,t=[],e={}){if(!r||r.length===0)return{};e.unescapeInput&&(r=this.normalizeText(r,!0,!0)),(e.subInput||e.sub_input)&&r.includes(nt)&&(r=this.document.subAttributes(r));const i=e.subResult||e.sub_result?this:null,s=new zt(r,i);return e.into?s.parseInto(e.into,t):s.parse(t)},async extractAttributesFromText(r,t=null){const e=r.includes(S)?r.split(S).join(" "):r,i=await new zt(e,this).parse(),s=i[1];return s!=null?s===e?(Object.keys(i).forEach(n=>{delete i[n]}),[r,i]):[s,i]:[t,i]},extractCallouts(r){const t={};let e=0,i=0,s=null;const n=this.hasAttribute("line-comment")?lu[this.getAttribute("line-comment")]:ou;let l=r.split(S).map(a=>(i++,a.replace(Z(n),(c,u,f,h,p)=>{if(f)return c.replace(H,"");const d=u||(h==="--"?["<!--","-->"]:null),m=p==="."?String(++e):p;return(t[i]=t[i]||[]).push([d,m]),s=i,""}))).join(S);if(s!==null)s===i&&(l=`${l}${S}`);else return[l,null];return[l,t]},async restoreCallouts(r,t,e=null){let i="";e!==null&&(i=r.slice(0,e),r=r.slice(e));let s=0;const n=await Promise.all(r.split(S).map(async o=>{const l=t[++s];if(l)if(delete t[s],l.length===1){const[a,c]=l[0];return`${o}${await new B(this,"callout",c,{id:this.document.callouts.readNextId(),attributes:{guard:a}}).convert()}`}else{const a=await Promise.all(l.map(([c,u])=>new B(this,"callout",u,{id:this.document.callouts.readNextId(),attributes:{guard:c}}).convert()));return`${o}${a.join(" ")}`}return o}));return i+n.join(S)},async convertQuotedText(r,t,e){const i=r[0];if(i.startsWith(H)){if(e==="constrained"){const s=r[2];if(s)return`[${s}]${await new B(this,"quoted",r[3],{type:t}).convert()}`}return i.slice(1)}if(e==="constrained"){const s=r[2];let n,o;return s&&(o=this.parseQuotedTextAttributes(s),n=o.id,t==="mark"&&(t="unquoted")),`${r[1]||""}${await new B(this,"quoted",r[3],{type:t,id:n,attributes:o}).convert()}`}else{const s=r[1];let n,o;return s&&(o=this.parseQuotedTextAttributes(s),n=o.id,t==="mark"&&(t="unquoted")),new B(this,"quoted",r[2],{type:t,id:n,attributes:o}).convert()}},doReplacement(r,t,e){const i=r[0];if(i.includes(H))return i.replace(H,"");switch(e){case"none":return t;case"bounding":return r[1]+t+r[2];default:return r[1]+t}},subPlaceholder(r,...t){let e=0;return r.replace(/%s/g,()=>String(t[e++]??""))},parseQuotedTextAttributes(r){if(r.includes(nt)&&(r=this.subAttributes(r)),r.includes(",")&&(r=r.slice(0,r.indexOf(","))),r=r.trim(),!r)return{};if((r.startsWith(".")||r.startsWith("#"))&&ce.shorthandPropertySyntax){const[t,,e]=ai(r,"#"),i={};if(!e)t.length>1&&(i.role=t.slice(1).split(".").join(" ").trimStart());else{const[s,,n]=ai(e,".");s&&(i.id=s),n?t.length>1?i.role=`${t}.${n}`.slice(1).split(".").join(" ").trimStart():i.role=n.split(".").join(" "):t.length>1&&(i.role=t.slice(1).split(".").join(" ").trimStart())}return i}return{role:r}},normalizeText(r,t=null,e=null){return r&&r.length>0&&(t&&(r=r.trim().split(S).join(" ")),e&&r.includes(xt)&&(r=r.split($e).join(xt))),r},splitSimpleCsv(r){if(!r||r.length===0)return[];if(r.includes('"')){const t=[];let e="",i=!1;for(const s of r)s===","?i?e+=s:(t.push(e.trim()),e=""):s==='"'?i=!i:e+=s;return t.push(e.trim()),t}return r.split(",").map(t=>t.trim())}};Object.assign(Ie.prototype,$f);Zi.register(of,"highlightjs","highlight.js");Zi.register(af,"html-pipeline");async function Oo(r,t={}){if(t=Object.assign({},t),"logger"in t){const e=t.logger??new Nn;return delete t.logger,hh(e,()=>Co(r,t,e))}return Co(r,t)}async function Co(r,t,e=null){const i=t.timings??null;i&&i.start("read");let s=t.attributes;if(!s)s={};else if(typeof s=="string")s=_f(s);else if(Array.isArray(s))s=yf(s);else if(typeof s=="object")s=Object.assign({},s);else throw new TypeError(`illegal type for attributes option: ${typeof s}`);let n;if(r&&typeof r=="object"&&typeof r.read=="function"){if(r.path){const a=await kf(),c=a.resolve(r.path);r.mtime&&(t.input_mtime=r.mtime),s.docfile=c,s.docdir=a.dirname(c);const u=Le(c);s.docfilesuffix=u,s.docname=ss(c,u)}n=await wf(r)}else if(r instanceof Uint8Array)n=new TextDecoder("utf-8").decode(r);else if(typeof r=="string")n=r;else if(Array.isArray(r))n=r.slice();else if(r)throw new TypeError(`unsupported input type: ${typeof r}`);i&&(i.record("read"),i.start("parse")),t.attributes=s;let o;try{let a=String(s.backend||t.backend||"html5");if(a.endsWith("@")&&(a=a.slice(0,-1)),a.startsWith("xhtml")&&(a=`html${a.slice(5)}`),a=ua[a]??a,await bi.create(a,{}),t.template_dir||t.template_dirs){const u={template_dirs:[].concat(t.template_dirs??t.template_dir),template_cache:t.template_cache??!0,template_engine:t.template_engine,template_engine_options:t.template_engine_options};t._preCreatedConverter=await bi.create(a,u)}t.parse!==!1?o=await Ee.create(n,t):o=new Ee(n,t)}catch(a){const u=`asciidoctor: FAILED: ${s.docfile||"<stdin>"}: Failed to load AsciiDoc document`;let f;try{f=new Error(`${u} - ${a.message}`),f.stack=a.stack,f.cause=a}catch{f=a}throw f}i&&i.record("parse");const l=uh()??e;return l&&Object.defineProperty(o,"logger",{get:()=>l,configurable:!0}),o}function _f(r){const t=r.replace(Nu,`$1${ao}`).replace(Pu,"$1"),e={};for(const i of t.split(ao)){if(!i)continue;const s=i.indexOf("=");s<0?e[i]="":e[i.slice(0,s)]=i.slice(s+1)}return e}function yf(r){const t={};for(const e of r){const i=e.indexOf("=");i<0?t[e]="":t[e.slice(0,i)]=e.slice(i+1)}return t}async function wf(r){const t=r.read();return t instanceof Promise?t:Promise.resolve(t??"")}async function kf(){return St(()=>import("./__vite-browser-external-D7Ct-6yo.js").then(r=>r._),[],import.meta.url)}const tn=`/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
|
|
113
|
+
/* Uncomment the following line when using as a custom stylesheet */
|
|
114
|
+
/* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CNoto+Sans+Mono:400,700"; */
|
|
115
|
+
html{font-family:sans-serif;-webkit-text-size-adjust:100%}
|
|
116
|
+
a{background:none}
|
|
117
|
+
a:focus{outline:thin dotted}
|
|
118
|
+
a:active,a:hover{outline:0}
|
|
119
|
+
h1{font-size:2em;margin:.67em 0}
|
|
120
|
+
b,strong{font-weight:bold}
|
|
121
|
+
abbr{font-size:.9em}
|
|
122
|
+
abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
|
|
123
|
+
dfn{font-style:italic}
|
|
124
|
+
hr{height:0}
|
|
125
|
+
mark{background:#ff0;color:#000}
|
|
126
|
+
code,kbd,pre,samp{font-family:monospace;font-size:1em}
|
|
127
|
+
pre{white-space:pre-wrap}
|
|
128
|
+
q{quotes:"\\201C" "\\201D" "\\2018" "\\2019"}
|
|
129
|
+
small{font-size:80%}
|
|
130
|
+
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
|
131
|
+
sup{top:-.5em}
|
|
132
|
+
sub{bottom:-.25em}
|
|
133
|
+
img{border:0}
|
|
134
|
+
svg:not(:root){overflow:hidden}
|
|
135
|
+
figure{margin:0}
|
|
136
|
+
audio,video{display:inline-block}
|
|
137
|
+
audio:not([controls]){display:none;height:0}
|
|
138
|
+
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
|
|
139
|
+
legend{border:0;padding:0}
|
|
140
|
+
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
|
|
141
|
+
button,input{line-height:normal}
|
|
142
|
+
button,select{text-transform:none}
|
|
143
|
+
button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
|
|
144
|
+
button[disabled],html input[disabled]{cursor:default}
|
|
145
|
+
input[type=checkbox],input[type=radio]{padding:0}
|
|
146
|
+
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
|
|
147
|
+
textarea{overflow:auto;vertical-align:top}
|
|
148
|
+
table{border-collapse:collapse;border-spacing:0}
|
|
149
|
+
*,::before,::after{box-sizing:border-box}
|
|
150
|
+
html,body{font-size:100%}
|
|
151
|
+
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
|
152
|
+
a:hover{cursor:pointer}
|
|
153
|
+
img,object,embed{max-width:100%;height:auto}
|
|
154
|
+
object,embed{height:100%}
|
|
155
|
+
img{-ms-interpolation-mode:bicubic}
|
|
156
|
+
.left{float:left!important}
|
|
157
|
+
.right{float:right!important}
|
|
158
|
+
.text-left{text-align:left!important}
|
|
159
|
+
.text-right{text-align:right!important}
|
|
160
|
+
.text-center{text-align:center!important}
|
|
161
|
+
.text-justify{text-align:justify!important}
|
|
162
|
+
.hide{display:none}
|
|
163
|
+
img,object,svg{display:inline-block;vertical-align:middle}
|
|
164
|
+
textarea{height:auto;min-height:50px}
|
|
165
|
+
select{width:100%}
|
|
166
|
+
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
|
|
167
|
+
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
|
|
168
|
+
a{color:#2156a5;text-decoration:underline;line-height:inherit}
|
|
169
|
+
a:hover,a:focus{color:#1d4b8f}
|
|
170
|
+
a img{border:0}
|
|
171
|
+
p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
|
|
172
|
+
p aside{font-size:.875em;line-height:1.35;font-style:italic}
|
|
173
|
+
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
|
|
174
|
+
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
|
|
175
|
+
h1{font-size:2.125em}
|
|
176
|
+
h2{font-size:1.6875em}
|
|
177
|
+
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
|
|
178
|
+
h4,h5{font-size:1.125em}
|
|
179
|
+
h6{font-size:1em}
|
|
180
|
+
hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
|
|
181
|
+
em,i{font-style:italic;line-height:inherit}
|
|
182
|
+
strong,b{font-weight:bold;line-height:inherit}
|
|
183
|
+
small{font-size:60%;line-height:inherit}
|
|
184
|
+
code{font-family:"Noto Sans Mono","Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
|
|
185
|
+
ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
|
|
186
|
+
ul,ol{margin-left:1.5em}
|
|
187
|
+
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
|
|
188
|
+
ul.circle{list-style-type:circle}
|
|
189
|
+
ul.disc{list-style-type:disc}
|
|
190
|
+
ul.square{list-style-type:square}
|
|
191
|
+
ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
|
|
192
|
+
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
|
|
193
|
+
dl dt{margin-bottom:.3125em;font-weight:bold}
|
|
194
|
+
dl dd{margin-bottom:1.25em}
|
|
195
|
+
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
|
|
196
|
+
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
|
|
197
|
+
@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
|
|
198
|
+
h1{font-size:2.75em}
|
|
199
|
+
h2{font-size:2.3125em}
|
|
200
|
+
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
|
|
201
|
+
h4{font-size:1.4375em}}
|
|
202
|
+
table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
|
|
203
|
+
table thead,table tfoot{background:#f7f8f7}
|
|
204
|
+
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
|
|
205
|
+
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
|
|
206
|
+
table tr.even,table tr.alt{background:#f8f8f7}
|
|
207
|
+
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
|
|
208
|
+
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
|
|
209
|
+
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
|
|
210
|
+
.center{margin-left:auto;margin-right:auto}
|
|
211
|
+
.stretch{width:100%}
|
|
212
|
+
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
|
|
213
|
+
.clearfix::after,.float-group::after{clear:both}
|
|
214
|
+
:not(pre).nobreak{word-wrap:normal}
|
|
215
|
+
:not(pre).nowrap{white-space:nowrap}
|
|
216
|
+
:not(pre).pre-wrap{white-space:pre-wrap}
|
|
217
|
+
:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
|
|
218
|
+
pre{color:rgba(0,0,0,.9);font-family:"Noto Sans Mono","Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
|
|
219
|
+
pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
|
|
220
|
+
pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
|
|
221
|
+
em em{font-style:normal}
|
|
222
|
+
strong strong{font-weight:400}
|
|
223
|
+
.keyseq{color:rgba(51,51,51,.8)}
|
|
224
|
+
kbd{font-family:"Noto Sans Mono","Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
|
|
225
|
+
.keyseq kbd:first-child{margin-left:0}
|
|
226
|
+
.keyseq kbd:last-child{margin-right:0}
|
|
227
|
+
.menuseq,.menuref{color:#000}
|
|
228
|
+
.menuseq b:not(.caret),.menuref{font-weight:inherit}
|
|
229
|
+
.menuseq{word-spacing:-.02em}
|
|
230
|
+
.menuseq b.caret{font-size:1.25em;line-height:.8}
|
|
231
|
+
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
|
|
232
|
+
b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
|
|
233
|
+
b.button::before{content:"[";padding:0 3px 0 2px}
|
|
234
|
+
b.button::after{content:"]";padding:0 2px 0 3px}
|
|
235
|
+
p a>code:hover{color:rgba(0,0,0,.9)}
|
|
236
|
+
#header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
|
|
237
|
+
#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
|
|
238
|
+
#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
|
|
239
|
+
#content{margin-top:1.25em}
|
|
240
|
+
#content::before{content:none}
|
|
241
|
+
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
|
|
242
|
+
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
|
|
243
|
+
#header>h1:only-child{border-bottom:1px solid #dddddf;padding-bottom:8px}
|
|
244
|
+
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
|
|
245
|
+
#header .details span:first-child{margin-left:-.125em}
|
|
246
|
+
#header .details span.email a{color:rgba(0,0,0,.85)}
|
|
247
|
+
#header .details br{display:none}
|
|
248
|
+
#header .details br+span::before{content:"\\00a0\\2013\\00a0"}
|
|
249
|
+
#header .details br+span.author::before{content:"\\00a0\\22c5\\00a0";color:rgba(0,0,0,.85)}
|
|
250
|
+
#header .details br+span#revremark::before{content:"\\00a0|\\00a0"}
|
|
251
|
+
#header #revnumber{text-transform:capitalize}
|
|
252
|
+
#header #revnumber::after{content:"\\00a0"}
|
|
253
|
+
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
|
|
254
|
+
#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
|
|
255
|
+
#toc>ul{margin-left:.125em}
|
|
256
|
+
#toc ul.sectlevel0>li>a{font-style:italic}
|
|
257
|
+
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
|
|
258
|
+
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
|
|
259
|
+
#toc li{line-height:1.3334;margin-top:.3334em}
|
|
260
|
+
#toc a{text-decoration:none}
|
|
261
|
+
#toc a:active{text-decoration:underline}
|
|
262
|
+
#toctitle{color:#7a2518;font-size:1.2em}
|
|
263
|
+
@media screen and (min-width:768px){#toctitle{font-size:1.375em}
|
|
264
|
+
body.toc2{padding-left:15em;padding-right:0}
|
|
265
|
+
body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
|
|
266
|
+
#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
|
|
267
|
+
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
|
|
268
|
+
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
|
|
269
|
+
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
|
|
270
|
+
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
|
|
271
|
+
body.toc2.toc-right{padding-left:0;padding-right:15em}
|
|
272
|
+
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
|
|
273
|
+
@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
|
|
274
|
+
#toc.toc2{width:20em}
|
|
275
|
+
#toc.toc2 #toctitle{font-size:1.375em}
|
|
276
|
+
#toc.toc2>ul{font-size:.95em}
|
|
277
|
+
#toc.toc2 ul ul{padding-left:1.25em}
|
|
278
|
+
body.toc2.toc-right{padding-left:0;padding-right:20em}}
|
|
279
|
+
#content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
|
|
280
|
+
#content #toc>:first-child{margin-top:0}
|
|
281
|
+
#content #toc>:last-child{margin-bottom:0}
|
|
282
|
+
#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
|
|
283
|
+
#footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
|
|
284
|
+
#content{margin-bottom:.625em}
|
|
285
|
+
.sect1{padding-bottom:.625em}
|
|
286
|
+
@media screen and (min-width:768px){#content{margin-bottom:1.25em}
|
|
287
|
+
.sect1{padding-bottom:1.25em}}
|
|
288
|
+
.sect1:last-child{padding-bottom:0}
|
|
289
|
+
.sect1+.sect1{border-top:1px solid #e7e7e9}
|
|
290
|
+
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
|
|
291
|
+
#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\\00A7";font-size:.85em;display:block;padding-top:.1em}
|
|
292
|
+
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
|
|
293
|
+
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
|
|
294
|
+
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
|
|
295
|
+
details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
|
|
296
|
+
details{margin-left:1.25rem}
|
|
297
|
+
details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
|
|
298
|
+
details>summary::-webkit-details-marker{display:none}
|
|
299
|
+
details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
|
|
300
|
+
details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
|
|
301
|
+
details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
|
|
302
|
+
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
|
|
303
|
+
table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
|
|
304
|
+
.paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
|
|
305
|
+
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
|
|
306
|
+
.admonitionblock>table td.icon{text-align:center;width:80px}
|
|
307
|
+
.admonitionblock>table td.icon img{max-width:none}
|
|
308
|
+
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
|
|
309
|
+
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
|
|
310
|
+
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
|
311
|
+
.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
|
|
312
|
+
.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
|
|
313
|
+
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
|
314
|
+
.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
|
|
315
|
+
.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
|
316
|
+
.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
|
317
|
+
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
|
318
|
+
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
|
319
|
+
.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
|
|
320
|
+
.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
|
|
321
|
+
.listingblock>.content{position:relative}
|
|
322
|
+
.listingblock pre>code{display:block}
|
|
323
|
+
.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
|
|
324
|
+
.listingblock:hover code[data-lang]::before{display:block}
|
|
325
|
+
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
|
|
326
|
+
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
|
|
327
|
+
.listingblock pre.highlightjs{padding:0}
|
|
328
|
+
.listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
|
|
329
|
+
.listingblock pre.prettyprint{border-width:0}
|
|
330
|
+
.prettyprint{background:#f7f7f8}
|
|
331
|
+
pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
|
|
332
|
+
pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
|
|
333
|
+
pre.prettyprint li code[data-lang]::before{opacity:1}
|
|
334
|
+
pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
|
|
335
|
+
table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
|
|
336
|
+
table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
|
|
337
|
+
table.linenotable td.code{padding-left:.75em}
|
|
338
|
+
table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
|
|
339
|
+
pre.pygments span.linenos{display:inline-block;margin-right:.75em}
|
|
340
|
+
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
|
|
341
|
+
.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
|
|
342
|
+
.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
|
|
343
|
+
.quoteblock blockquote{margin:0;padding:0;border:0}
|
|
344
|
+
.quoteblock blockquote::before{content:"\\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
|
|
345
|
+
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
|
|
346
|
+
.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
|
|
347
|
+
.verseblock{margin:0 1em 1.25em}
|
|
348
|
+
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
|
|
349
|
+
.verseblock pre strong{font-weight:400}
|
|
350
|
+
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
|
|
351
|
+
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
|
|
352
|
+
.quoteblock .attribution br,.verseblock .attribution br{display:none}
|
|
353
|
+
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
|
|
354
|
+
.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
|
|
355
|
+
.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
|
|
356
|
+
.quoteblock.abstract{margin:0 1em 1.25em;display:block}
|
|
357
|
+
.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
|
|
358
|
+
.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
|
|
359
|
+
.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
|
|
360
|
+
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
|
|
361
|
+
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
|
|
362
|
+
p.tableblock:last-child{margin-bottom:0}
|
|
363
|
+
td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
|
|
364
|
+
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
|
|
365
|
+
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
|
|
366
|
+
table.grid-all>*>tr>*{border-width:1px}
|
|
367
|
+
table.grid-cols>*>tr>*{border-width:0 1px}
|
|
368
|
+
table.grid-rows>*>tr>*{border-width:1px 0}
|
|
369
|
+
table.frame-all{border-width:1px}
|
|
370
|
+
table.frame-ends{border-width:1px 0}
|
|
371
|
+
table.frame-sides{border-width:0 1px}
|
|
372
|
+
table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
|
|
373
|
+
table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
|
|
374
|
+
table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
|
|
375
|
+
table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
|
|
376
|
+
table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
|
|
377
|
+
th.halign-left,td.halign-left{text-align:left}
|
|
378
|
+
th.halign-right,td.halign-right{text-align:right}
|
|
379
|
+
th.halign-center,td.halign-center{text-align:center}
|
|
380
|
+
th.valign-top,td.valign-top{vertical-align:top}
|
|
381
|
+
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
|
|
382
|
+
th.valign-middle,td.valign-middle{vertical-align:middle}
|
|
383
|
+
table thead th,table tfoot th{font-weight:bold}
|
|
384
|
+
tbody tr th{background:#f7f8f7}
|
|
385
|
+
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
|
|
386
|
+
p.tableblock>code:only-child{background:none;padding:0}
|
|
387
|
+
p.tableblock{font-size:1em}
|
|
388
|
+
ol{margin-left:1.75em}
|
|
389
|
+
ul li ol{margin-left:1.5em}
|
|
390
|
+
dl dd{margin-left:1.125em}
|
|
391
|
+
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
|
|
392
|
+
li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
|
|
393
|
+
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
|
|
394
|
+
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
|
|
395
|
+
ul.unstyled,ol.unstyled{margin-left:0}
|
|
396
|
+
li>p:empty:only-child::before{content:"";display:inline-block}
|
|
397
|
+
ul.checklist>li>p:first-child{margin-left:-1em}
|
|
398
|
+
ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
|
|
399
|
+
ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
|
|
400
|
+
ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
|
|
401
|
+
ul.inline>li{margin-left:1.25em}
|
|
402
|
+
.unstyled dl dt{font-weight:400;font-style:normal}
|
|
403
|
+
ol.arabic{list-style-type:decimal}
|
|
404
|
+
ol.decimal{list-style-type:decimal-leading-zero}
|
|
405
|
+
ol.loweralpha{list-style-type:lower-alpha}
|
|
406
|
+
ol.upperalpha{list-style-type:upper-alpha}
|
|
407
|
+
ol.lowerroman{list-style-type:lower-roman}
|
|
408
|
+
ol.upperroman{list-style-type:upper-roman}
|
|
409
|
+
ol.lowergreek{list-style-type:lower-greek}
|
|
410
|
+
.hdlist>table,.colist>table{border:0;background:none}
|
|
411
|
+
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
|
|
412
|
+
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
|
|
413
|
+
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
|
|
414
|
+
td.hdlist2{word-wrap:anywhere}
|
|
415
|
+
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
|
|
416
|
+
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
|
|
417
|
+
.colist td:not([class]):first-child img{max-width:none}
|
|
418
|
+
.colist td:not([class]):last-child{padding:.25em 0}
|
|
419
|
+
.thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
|
|
420
|
+
.imageblock.left{margin:.25em .625em 1.25em 0}
|
|
421
|
+
.imageblock.right{margin:.25em 0 1.25em .625em}
|
|
422
|
+
.imageblock>.title{margin-bottom:0}
|
|
423
|
+
.imageblock.thumb,.imageblock.th{border-width:6px}
|
|
424
|
+
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
|
|
425
|
+
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
|
|
426
|
+
.image.left{margin-right:.625em}
|
|
427
|
+
.image.right{margin-left:.625em}
|
|
428
|
+
a.image{text-decoration:none;display:inline-block}
|
|
429
|
+
a.image object{pointer-events:none}
|
|
430
|
+
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
|
|
431
|
+
sup.footnote a,sup.footnoteref a{text-decoration:none}
|
|
432
|
+
sup.footnote a:active,sup.footnoteref a:active,#footnotes .footnote a:first-of-type:active{text-decoration:underline}
|
|
433
|
+
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
|
|
434
|
+
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
|
|
435
|
+
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
|
|
436
|
+
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
|
|
437
|
+
#footnotes .footnote:last-of-type{margin-bottom:0}
|
|
438
|
+
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
|
|
439
|
+
div.page-break{display:none}
|
|
440
|
+
div.unbreakable{page-break-inside:avoid}
|
|
441
|
+
.big{font-size:larger}
|
|
442
|
+
.small{font-size:smaller}
|
|
443
|
+
.underline{text-decoration:underline}
|
|
444
|
+
.overline{text-decoration:overline}
|
|
445
|
+
.line-through{text-decoration:line-through}
|
|
446
|
+
.aqua{color:#00bfbf}
|
|
447
|
+
.aqua-background{background:#00fafa}
|
|
448
|
+
.black{color:#000}
|
|
449
|
+
.black-background{background:#000}
|
|
450
|
+
.blue{color:#0000bf}
|
|
451
|
+
.blue-background{background:#0000fa}
|
|
452
|
+
.fuchsia{color:#bf00bf}
|
|
453
|
+
.fuchsia-background{background:#fa00fa}
|
|
454
|
+
.gray{color:#606060}
|
|
455
|
+
.gray-background{background:#7d7d7d}
|
|
456
|
+
.green{color:#006000}
|
|
457
|
+
.green-background{background:#007d00}
|
|
458
|
+
.lime{color:#00bf00}
|
|
459
|
+
.lime-background{background:#00fa00}
|
|
460
|
+
.maroon{color:#600000}
|
|
461
|
+
.maroon-background{background:#7d0000}
|
|
462
|
+
.navy{color:#000060}
|
|
463
|
+
.navy-background{background:#00007d}
|
|
464
|
+
.olive{color:#606000}
|
|
465
|
+
.olive-background{background:#7d7d00}
|
|
466
|
+
.purple{color:#600060}
|
|
467
|
+
.purple-background{background:#7d007d}
|
|
468
|
+
.red{color:#bf0000}
|
|
469
|
+
.red-background{background:#fa0000}
|
|
470
|
+
.silver{color:#909090}
|
|
471
|
+
.silver-background{background:#bcbcbc}
|
|
472
|
+
.teal{color:#006060}
|
|
473
|
+
.teal-background{background:#007d7d}
|
|
474
|
+
.white{color:#bfbfbf}
|
|
475
|
+
.white-background{background:#fafafa}
|
|
476
|
+
.yellow{color:#bfbf00}
|
|
477
|
+
.yellow-background{background:#fafa00}
|
|
478
|
+
span.icon>.fa{cursor:default}
|
|
479
|
+
a span.icon>.fa{cursor:inherit}
|
|
480
|
+
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
|
|
481
|
+
.admonitionblock td.icon .icon-note::before{content:"\\f05a";color:#19407c}
|
|
482
|
+
.admonitionblock td.icon .icon-tip::before{content:"\\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
|
|
483
|
+
.admonitionblock td.icon .icon-warning::before{content:"\\f071";color:#bf6900}
|
|
484
|
+
.admonitionblock td.icon .icon-caution::before{content:"\\f06d";color:#bf3400}
|
|
485
|
+
.admonitionblock td.icon .icon-important::before{content:"\\f06a";color:#bf0000}
|
|
486
|
+
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
|
|
487
|
+
.conum[data-value] *{color:#fff!important}
|
|
488
|
+
.conum[data-value]+b{display:none}
|
|
489
|
+
.conum[data-value]::after{content:attr(data-value)}
|
|
490
|
+
pre .conum[data-value]{position:relative;top:-.125em}
|
|
491
|
+
b.conum *{color:inherit!important}
|
|
492
|
+
.conum:not([data-value]):empty{display:none}
|
|
493
|
+
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
|
494
|
+
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
|
|
495
|
+
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
|
496
|
+
p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
|
|
497
|
+
p{margin-bottom:1.25rem}
|
|
498
|
+
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
|
499
|
+
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
|
500
|
+
.print-only{display:none!important}
|
|
501
|
+
@page{margin:1.25cm .75cm}
|
|
502
|
+
@media print{*{box-shadow:none!important;text-shadow:none!important}
|
|
503
|
+
html{font-size:80%}
|
|
504
|
+
a{color:inherit!important;text-decoration:underline!important}
|
|
505
|
+
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
|
|
506
|
+
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
|
|
507
|
+
abbr[title]{border-bottom:1px dotted}
|
|
508
|
+
abbr[title]::after{content:" (" attr(title) ")"}
|
|
509
|
+
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
|
|
510
|
+
div.page-break{display:block;page-break-after:always}
|
|
511
|
+
thead{display:table-header-group}
|
|
512
|
+
svg{max-width:100%}
|
|
513
|
+
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
|
|
514
|
+
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
|
|
515
|
+
#header,#content,#footnotes,#footer{max-width:none}
|
|
516
|
+
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
|
|
517
|
+
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
|
|
518
|
+
body.book #header{text-align:center}
|
|
519
|
+
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
|
|
520
|
+
body.book #header .details{border:0!important;display:block;padding:0!important}
|
|
521
|
+
body.book #header .details span:first-child{margin-left:0!important}
|
|
522
|
+
body.book #header .details br{display:block}
|
|
523
|
+
body.book #header .details br+span::before{content:none!important}
|
|
524
|
+
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
|
|
525
|
+
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
|
|
526
|
+
.listingblock code[data-lang]::before{display:block}
|
|
527
|
+
#footer{padding:0 .9375em}
|
|
528
|
+
.hide-on-print{display:none!important}
|
|
529
|
+
.print-only{display:block!important}
|
|
530
|
+
.hide-for-print{display:none!important}
|
|
531
|
+
.show-for-print{display:inherit!important}}
|
|
532
|
+
@media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
|
|
533
|
+
.sect1{padding:0!important}
|
|
534
|
+
.sect1+.sect1{border:0}
|
|
535
|
+
#footer{background:none}
|
|
536
|
+
#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
|
|
537
|
+
@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}`,en=`/*! Asciidoctor semantic HTML5 default stylesheet | MIT License | https://asciidoctor.org */
|
|
538
|
+
|
|
539
|
+
/* ── Tokens ──────────────────────────────────────────────────────────────── */
|
|
540
|
+
|
|
541
|
+
:root {
|
|
542
|
+
color-scheme: light dark;
|
|
543
|
+
--asciidoctor-bg: #fdfdfc;
|
|
544
|
+
--asciidoctor-surface: #f6f5f3;
|
|
545
|
+
--asciidoctor-fg: #23282e;
|
|
546
|
+
--asciidoctor-muted: #5c646e;
|
|
547
|
+
--asciidoctor-line: #e5e3df;
|
|
548
|
+
--asciidoctor-link: #0958b0;
|
|
549
|
+
--asciidoctor-mark: #fff2ae;
|
|
550
|
+
--asciidoctor-note: #0969da;
|
|
551
|
+
--asciidoctor-tip: #1a7f37;
|
|
552
|
+
--asciidoctor-important: #8250df;
|
|
553
|
+
--asciidoctor-warning: #9a6700;
|
|
554
|
+
--asciidoctor-caution: #cf222e;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
@media (prefers-color-scheme: dark) {
|
|
558
|
+
:root {
|
|
559
|
+
--asciidoctor-bg: #16181c;
|
|
560
|
+
--asciidoctor-surface: #1e2126;
|
|
561
|
+
--asciidoctor-fg: #e6e7e9;
|
|
562
|
+
--asciidoctor-muted: #9aa2ac;
|
|
563
|
+
--asciidoctor-line: #2c313a;
|
|
564
|
+
--asciidoctor-link: #6cb0f5;
|
|
565
|
+
--asciidoctor-mark: #6b5d1a;
|
|
566
|
+
--asciidoctor-note: #4493f8;
|
|
567
|
+
--asciidoctor-tip: #3fb950;
|
|
568
|
+
--asciidoctor-important: #ab7df8;
|
|
569
|
+
--asciidoctor-warning: #d29922;
|
|
570
|
+
--asciidoctor-caution: #f85149;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* ── Base ────────────────────────────────────────────────────────────────── */
|
|
575
|
+
|
|
576
|
+
*,
|
|
577
|
+
*::before,
|
|
578
|
+
*::after {
|
|
579
|
+
box-sizing: border-box;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
body {
|
|
583
|
+
margin: 0 auto;
|
|
584
|
+
max-width: 47rem;
|
|
585
|
+
padding: 1.5rem 1.25rem 3rem;
|
|
586
|
+
background: var(--asciidoctor-bg);
|
|
587
|
+
color: var(--asciidoctor-fg);
|
|
588
|
+
font-family:
|
|
589
|
+
system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
|
|
590
|
+
font-size: 1.0625rem;
|
|
591
|
+
line-height: 1.7;
|
|
592
|
+
-webkit-text-size-adjust: 100%;
|
|
593
|
+
overflow-wrap: break-word;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
h1,
|
|
597
|
+
h2,
|
|
598
|
+
h3,
|
|
599
|
+
h4,
|
|
600
|
+
h5,
|
|
601
|
+
h6 {
|
|
602
|
+
line-height: 1.25;
|
|
603
|
+
letter-spacing: -0.01em;
|
|
604
|
+
font-weight: 600;
|
|
605
|
+
margin: 2em 0 0.6em;
|
|
606
|
+
text-wrap: balance;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
h1 {
|
|
610
|
+
font-size: 2rem;
|
|
611
|
+
}
|
|
612
|
+
h2 {
|
|
613
|
+
font-size: 1.5rem;
|
|
614
|
+
}
|
|
615
|
+
h3 {
|
|
616
|
+
font-size: 1.25rem;
|
|
617
|
+
}
|
|
618
|
+
h4 {
|
|
619
|
+
font-size: 1.0625rem;
|
|
620
|
+
}
|
|
621
|
+
h5,
|
|
622
|
+
h6 {
|
|
623
|
+
font-size: 1rem;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
p {
|
|
627
|
+
margin: 0 0 1em;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
a {
|
|
631
|
+
color: var(--asciidoctor-link);
|
|
632
|
+
text-decoration: none;
|
|
633
|
+
}
|
|
634
|
+
a:hover {
|
|
635
|
+
text-decoration: underline;
|
|
636
|
+
}
|
|
637
|
+
a:focus-visible {
|
|
638
|
+
outline: 2px solid var(--asciidoctor-link);
|
|
639
|
+
outline-offset: 2px;
|
|
640
|
+
border-radius: 2px;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
code,
|
|
644
|
+
kbd,
|
|
645
|
+
pre,
|
|
646
|
+
samp {
|
|
647
|
+
font-family:
|
|
648
|
+
ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
code {
|
|
652
|
+
font-size: 0.875em;
|
|
653
|
+
background: var(--asciidoctor-surface);
|
|
654
|
+
padding: 0.1em 0.3em;
|
|
655
|
+
border-radius: 4px;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
pre {
|
|
659
|
+
margin: 0;
|
|
660
|
+
padding: 1rem 1.25rem;
|
|
661
|
+
overflow-x: auto;
|
|
662
|
+
font-size: 0.875rem;
|
|
663
|
+
line-height: 1.6;
|
|
664
|
+
background: var(--asciidoctor-surface);
|
|
665
|
+
border-radius: 8px;
|
|
666
|
+
}
|
|
667
|
+
pre code {
|
|
668
|
+
background: none;
|
|
669
|
+
padding: 0;
|
|
670
|
+
font-size: inherit;
|
|
671
|
+
border-radius: 0;
|
|
672
|
+
}
|
|
673
|
+
pre.no-wrap {
|
|
674
|
+
white-space: pre;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
mark {
|
|
678
|
+
background: var(--asciidoctor-mark);
|
|
679
|
+
color: inherit;
|
|
680
|
+
padding: 0 0.15em;
|
|
681
|
+
border-radius: 2px;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
hr {
|
|
685
|
+
border: 0;
|
|
686
|
+
border-top: 1px solid var(--asciidoctor-line);
|
|
687
|
+
margin: 2.5rem 0;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
img,
|
|
691
|
+
svg,
|
|
692
|
+
video {
|
|
693
|
+
max-width: 100%;
|
|
694
|
+
height: auto;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
sub,
|
|
698
|
+
sup {
|
|
699
|
+
font-size: 0.75em;
|
|
700
|
+
line-height: 0;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/* ── Document header ─────────────────────────────────────────────────────── */
|
|
704
|
+
|
|
705
|
+
body > header {
|
|
706
|
+
margin-bottom: 2.5rem;
|
|
707
|
+
padding-bottom: 1.25rem;
|
|
708
|
+
border-bottom: 1px solid var(--asciidoctor-line);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
body > header h1 {
|
|
712
|
+
margin: 0 0 0.25rem;
|
|
713
|
+
font-size: 2.25rem;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
body > header h1 .subtitle {
|
|
717
|
+
display: block;
|
|
718
|
+
font-size: 0.55em;
|
|
719
|
+
font-weight: 400;
|
|
720
|
+
color: var(--asciidoctor-muted);
|
|
721
|
+
letter-spacing: 0;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.byline {
|
|
725
|
+
margin: 0.5rem 0 0;
|
|
726
|
+
color: var(--asciidoctor-muted);
|
|
727
|
+
font-size: 0.9375rem;
|
|
728
|
+
}
|
|
729
|
+
ul.byline {
|
|
730
|
+
list-style: none;
|
|
731
|
+
padding: 0;
|
|
732
|
+
display: flex;
|
|
733
|
+
flex-wrap: wrap;
|
|
734
|
+
gap: 0.25rem 1.5rem;
|
|
735
|
+
}
|
|
736
|
+
ul.byline li {
|
|
737
|
+
margin: 0;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
table.revision {
|
|
741
|
+
margin-top: 0.75rem;
|
|
742
|
+
font-size: 0.8125rem;
|
|
743
|
+
color: var(--asciidoctor-muted);
|
|
744
|
+
border-collapse: collapse;
|
|
745
|
+
}
|
|
746
|
+
table.revision thead {
|
|
747
|
+
position: absolute;
|
|
748
|
+
width: 1px;
|
|
749
|
+
height: 1px;
|
|
750
|
+
overflow: hidden;
|
|
751
|
+
clip-path: inset(50%);
|
|
752
|
+
}
|
|
753
|
+
table.revision td {
|
|
754
|
+
padding: 0 1.25rem 0 0;
|
|
755
|
+
}
|
|
756
|
+
table.revision td:empty {
|
|
757
|
+
display: none;
|
|
758
|
+
}
|
|
759
|
+
table.revision td::before {
|
|
760
|
+
content: attr(data-title) " ";
|
|
761
|
+
}
|
|
762
|
+
table.revision td[data-title=""]::before,
|
|
763
|
+
table.revision td[data-title="Date"]::before,
|
|
764
|
+
table.revision td[data-title="Remark"]::before {
|
|
765
|
+
content: none;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/* ── Page footer ─────────────────────────────────────────────────────────── */
|
|
769
|
+
|
|
770
|
+
body > footer {
|
|
771
|
+
margin-top: 3rem;
|
|
772
|
+
padding-top: 1rem;
|
|
773
|
+
border-top: 1px solid var(--asciidoctor-line);
|
|
774
|
+
font-size: 0.8125rem;
|
|
775
|
+
color: var(--asciidoctor-muted);
|
|
776
|
+
display: flex;
|
|
777
|
+
flex-wrap: wrap;
|
|
778
|
+
gap: 0.25rem 1.5rem;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/* ── Sections ────────────────────────────────────────────────────────────── */
|
|
782
|
+
|
|
783
|
+
.sect-num {
|
|
784
|
+
color: var(--asciidoctor-muted);
|
|
785
|
+
font-weight: 500;
|
|
786
|
+
margin-right: 0.25em;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/* :sectanchors: — reveal the anchor on heading hover, and on keyboard focus.
|
|
790
|
+
Hidden with opacity rather than visibility: the anchor is a real permalink
|
|
791
|
+
named by its aria-label, so it must stay focusable and reachable. */
|
|
792
|
+
a.anchor {
|
|
793
|
+
float: left;
|
|
794
|
+
margin-left: -1.1em;
|
|
795
|
+
width: 1.1em;
|
|
796
|
+
opacity: 0;
|
|
797
|
+
font-weight: 400;
|
|
798
|
+
}
|
|
799
|
+
a.anchor::before {
|
|
800
|
+
content: "§";
|
|
801
|
+
}
|
|
802
|
+
h1:hover a.anchor,
|
|
803
|
+
h2:hover a.anchor,
|
|
804
|
+
h3:hover a.anchor,
|
|
805
|
+
h4:hover a.anchor,
|
|
806
|
+
h5:hover a.anchor,
|
|
807
|
+
h6:hover a.anchor,
|
|
808
|
+
a.anchor:focus-visible {
|
|
809
|
+
opacity: 1;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/* :sectlinks: — self-links keep the heading color */
|
|
813
|
+
h1 > a.link,
|
|
814
|
+
h2 > a.link,
|
|
815
|
+
h3 > a.link,
|
|
816
|
+
h4 > a.link,
|
|
817
|
+
h5 > a.link,
|
|
818
|
+
h6 > a.link {
|
|
819
|
+
color: inherit;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/* ── Block titles ────────────────────────────────────────────────────────── */
|
|
823
|
+
|
|
824
|
+
strong.title {
|
|
825
|
+
display: block;
|
|
826
|
+
margin-bottom: 0.25em;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/* ── Table of contents ───────────────────────────────────────────────────── */
|
|
830
|
+
|
|
831
|
+
nav.toc {
|
|
832
|
+
margin: 1.5rem 0;
|
|
833
|
+
padding: 1rem 1.25rem;
|
|
834
|
+
background: var(--asciidoctor-surface);
|
|
835
|
+
border: 1px solid var(--asciidoctor-line);
|
|
836
|
+
border-radius: 8px;
|
|
837
|
+
}
|
|
838
|
+
nav.toc > .title {
|
|
839
|
+
font-size: 0.75rem;
|
|
840
|
+
font-weight: 600;
|
|
841
|
+
text-transform: uppercase;
|
|
842
|
+
letter-spacing: 0.1em;
|
|
843
|
+
color: var(--asciidoctor-muted);
|
|
844
|
+
margin-bottom: 0.5rem;
|
|
845
|
+
}
|
|
846
|
+
nav.toc ol {
|
|
847
|
+
list-style: none;
|
|
848
|
+
margin: 0;
|
|
849
|
+
padding: 0;
|
|
850
|
+
}
|
|
851
|
+
nav.toc ol ol {
|
|
852
|
+
padding-left: 1rem;
|
|
853
|
+
}
|
|
854
|
+
nav.toc li {
|
|
855
|
+
margin: 0.2em 0;
|
|
856
|
+
}
|
|
857
|
+
nav.toc a {
|
|
858
|
+
color: var(--asciidoctor-fg);
|
|
859
|
+
font-size: 0.9375rem;
|
|
860
|
+
}
|
|
861
|
+
nav.toc a:hover {
|
|
862
|
+
color: var(--asciidoctor-link);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/* ── Admonitions ─────────────────────────────────────────────────────────── */
|
|
866
|
+
|
|
867
|
+
aside.admonition {
|
|
868
|
+
--asciidoctor-admonition: var(--asciidoctor-muted);
|
|
869
|
+
margin: 1.5rem 0;
|
|
870
|
+
padding: 0.5rem 1.25rem;
|
|
871
|
+
border-left: 0.25rem solid var(--asciidoctor-admonition);
|
|
872
|
+
}
|
|
873
|
+
aside.admonition.note {
|
|
874
|
+
--asciidoctor-admonition: var(--asciidoctor-note);
|
|
875
|
+
}
|
|
876
|
+
aside.admonition.tip {
|
|
877
|
+
--asciidoctor-admonition: var(--asciidoctor-tip);
|
|
878
|
+
}
|
|
879
|
+
aside.admonition.important {
|
|
880
|
+
--asciidoctor-admonition: var(--asciidoctor-important);
|
|
881
|
+
}
|
|
882
|
+
aside.admonition.warning {
|
|
883
|
+
--asciidoctor-admonition: var(--asciidoctor-warning);
|
|
884
|
+
}
|
|
885
|
+
aside.admonition.caution {
|
|
886
|
+
--asciidoctor-admonition: var(--asciidoctor-caution);
|
|
887
|
+
}
|
|
888
|
+
/* Admonition glyphs for :icons: font. The converter emits a neutral slot
|
|
889
|
+
(\`icon-<name>\`); the code points below are Font Awesome 7 Free, set through
|
|
890
|
+
its \`--fa\` custom property. Another provider remaps these five rules. */
|
|
891
|
+
aside.admonition > .icon-note {
|
|
892
|
+
--fa: "\\f05a"; /* circle-info */
|
|
893
|
+
}
|
|
894
|
+
aside.admonition > .icon-tip {
|
|
895
|
+
--fa: "\\f0eb"; /* lightbulb */
|
|
896
|
+
}
|
|
897
|
+
aside.admonition > .icon-important {
|
|
898
|
+
--fa: "\\f06a"; /* circle-exclamation */
|
|
899
|
+
}
|
|
900
|
+
aside.admonition > .icon-caution {
|
|
901
|
+
--fa: "\\f06d"; /* fire */
|
|
902
|
+
}
|
|
903
|
+
aside.admonition > .icon-warning {
|
|
904
|
+
--fa: "\\f071"; /* triangle-exclamation */
|
|
905
|
+
}
|
|
906
|
+
aside.admonition > .label,
|
|
907
|
+
aside.admonition > .icon,
|
|
908
|
+
aside.admonition > i {
|
|
909
|
+
display: block;
|
|
910
|
+
color: var(--asciidoctor-admonition);
|
|
911
|
+
font-weight: 600;
|
|
912
|
+
margin-bottom: 0.25em;
|
|
913
|
+
}
|
|
914
|
+
aside.admonition > p:last-child {
|
|
915
|
+
margin-bottom: 0;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/* ── Sidebar ─────────────────────────────────────────────────────────────── */
|
|
919
|
+
|
|
920
|
+
aside.sidebar {
|
|
921
|
+
margin: 1.5rem 0;
|
|
922
|
+
padding: 1rem 1.25rem;
|
|
923
|
+
background: var(--asciidoctor-surface);
|
|
924
|
+
border-radius: 8px;
|
|
925
|
+
}
|
|
926
|
+
aside.sidebar > :last-child {
|
|
927
|
+
margin-bottom: 0;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/* ── Figures ─────────────────────────────────────────────────────────────── */
|
|
931
|
+
|
|
932
|
+
figure {
|
|
933
|
+
margin: 1.5rem 0;
|
|
934
|
+
}
|
|
935
|
+
figcaption {
|
|
936
|
+
font-size: 0.875rem;
|
|
937
|
+
color: var(--asciidoctor-muted);
|
|
938
|
+
margin: 0.4rem 0;
|
|
939
|
+
}
|
|
940
|
+
figcaption .label {
|
|
941
|
+
font-weight: 600;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
figure.listing figcaption,
|
|
945
|
+
figure.literal figcaption,
|
|
946
|
+
figure.example figcaption,
|
|
947
|
+
figure.stem figcaption {
|
|
948
|
+
margin-top: 0;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
figure.example {
|
|
952
|
+
padding: 1rem 1.25rem;
|
|
953
|
+
border: 1px solid var(--asciidoctor-line);
|
|
954
|
+
border-radius: 8px;
|
|
955
|
+
}
|
|
956
|
+
figure.example > :last-child {
|
|
957
|
+
margin-bottom: 0;
|
|
958
|
+
}
|
|
959
|
+
figure.example > figcaption {
|
|
960
|
+
margin: -0.25rem 0 0.75rem;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
figure.stem {
|
|
964
|
+
text-align: center;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/* collapsible example */
|
|
968
|
+
details {
|
|
969
|
+
margin: 1.5rem 0;
|
|
970
|
+
padding: 0.75rem 1.25rem;
|
|
971
|
+
border: 1px solid var(--asciidoctor-line);
|
|
972
|
+
border-radius: 8px;
|
|
973
|
+
}
|
|
974
|
+
details > summary {
|
|
975
|
+
cursor: pointer;
|
|
976
|
+
font-weight: 600;
|
|
977
|
+
}
|
|
978
|
+
details[open] > summary {
|
|
979
|
+
margin-bottom: 0.5rem;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/* ── Quote and verse ─────────────────────────────────────────────────────── */
|
|
983
|
+
|
|
984
|
+
blockquote {
|
|
985
|
+
margin: 1.5rem 0;
|
|
986
|
+
padding: 0.25rem 0 0.25rem 1.25rem;
|
|
987
|
+
border-left: 0.25rem solid var(--asciidoctor-line);
|
|
988
|
+
}
|
|
989
|
+
blockquote.quote {
|
|
990
|
+
font-style: italic;
|
|
991
|
+
}
|
|
992
|
+
blockquote footer {
|
|
993
|
+
margin-top: 0.5rem;
|
|
994
|
+
font-style: normal;
|
|
995
|
+
font-size: 0.875rem;
|
|
996
|
+
color: var(--asciidoctor-muted);
|
|
997
|
+
}
|
|
998
|
+
blockquote pre {
|
|
999
|
+
background: none;
|
|
1000
|
+
padding: 0;
|
|
1001
|
+
font-family: inherit;
|
|
1002
|
+
font-size: inherit;
|
|
1003
|
+
white-space: pre-wrap;
|
|
1004
|
+
}
|
|
1005
|
+
figure.quote > blockquote,
|
|
1006
|
+
figure.verse > blockquote {
|
|
1007
|
+
margin: 0.5rem 0 0;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/* ── Lists ───────────────────────────────────────────────────────────────── */
|
|
1011
|
+
|
|
1012
|
+
ul,
|
|
1013
|
+
ol,
|
|
1014
|
+
dl {
|
|
1015
|
+
margin: 0 0 1em;
|
|
1016
|
+
}
|
|
1017
|
+
li > p,
|
|
1018
|
+
dd > p {
|
|
1019
|
+
margin-bottom: 0.25em;
|
|
1020
|
+
}
|
|
1021
|
+
dt {
|
|
1022
|
+
font-weight: 600;
|
|
1023
|
+
}
|
|
1024
|
+
dd {
|
|
1025
|
+
margin: 0 0 0.5em 1.25rem;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
ul.checklist {
|
|
1029
|
+
list-style: none;
|
|
1030
|
+
padding-left: 1.5rem;
|
|
1031
|
+
}
|
|
1032
|
+
/* :icons: font markers — the glyph is mapped here (Font Awesome 7 Free code
|
|
1033
|
+
points, via its \`--fa\` custom property) rather than taken from the icon
|
|
1034
|
+
font's own class names, so swapping in another icon set is a stylesheet
|
|
1035
|
+
change, not a markup change. --fa-style: 400 selects the regular (outline)
|
|
1036
|
+
face, matching the unfilled checkbox the text mode draws with ❏. */
|
|
1037
|
+
ul.checklist .checked {
|
|
1038
|
+
--fa: "\\f14a"; /* square-check */
|
|
1039
|
+
--fa-style: 400;
|
|
1040
|
+
}
|
|
1041
|
+
ul.checklist .unchecked {
|
|
1042
|
+
--fa: "\\f0c8"; /* square */
|
|
1043
|
+
--fa-style: 400;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/* qanda — number the questions with a counter */
|
|
1047
|
+
dl.qanda {
|
|
1048
|
+
counter-reset: question;
|
|
1049
|
+
}
|
|
1050
|
+
dl.qanda dt::before {
|
|
1051
|
+
counter-increment: question;
|
|
1052
|
+
content: counter(question) ". ";
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/* horizontal dlist — two-column grid */
|
|
1056
|
+
dl.horizontal {
|
|
1057
|
+
display: grid;
|
|
1058
|
+
grid-template-columns: minmax(6rem, max-content) 1fr;
|
|
1059
|
+
gap: 0.25em 1.5rem;
|
|
1060
|
+
}
|
|
1061
|
+
dl.horizontal dt {
|
|
1062
|
+
grid-column: 1;
|
|
1063
|
+
}
|
|
1064
|
+
dl.horizontal dd {
|
|
1065
|
+
grid-column: 2;
|
|
1066
|
+
margin: 0;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/* ── Callouts ────────────────────────────────────────────────────────────── */
|
|
1070
|
+
|
|
1071
|
+
/* One badge, drawn in two places: the marker inside a verbatim block carries
|
|
1072
|
+
its number in \`data-value\`, the callout list numbers itself with a CSS
|
|
1073
|
+
counter. Declared together so the two renderings cannot drift apart.
|
|
1074
|
+
|
|
1075
|
+
Both align on the baseline of the text they annotate: the flex box takes its
|
|
1076
|
+
baseline from the digit, so the disc lands on the lowercase band whatever the
|
|
1077
|
+
surrounding font size. Inline layout offers no steadier anchor — \`middle\`
|
|
1078
|
+
keys off the parent's x-height, which varies far more than the baseline, and
|
|
1079
|
+
grid or flex cannot reach inside a line of preformatted text. */
|
|
1080
|
+
i.callout-num[data-value],
|
|
1081
|
+
ol.callout-list > li::before {
|
|
1082
|
+
display: inline-flex;
|
|
1083
|
+
align-items: center;
|
|
1084
|
+
justify-content: center;
|
|
1085
|
+
min-width: 1.4em;
|
|
1086
|
+
height: 1.4em;
|
|
1087
|
+
border-radius: 50%;
|
|
1088
|
+
background: var(--asciidoctor-muted);
|
|
1089
|
+
color: var(--asciidoctor-bg);
|
|
1090
|
+
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
1091
|
+
font-size: 0.75rem;
|
|
1092
|
+
font-weight: 600;
|
|
1093
|
+
font-style: normal;
|
|
1094
|
+
/* the flex box centers the digit; a line-height of its own would fight it */
|
|
1095
|
+
line-height: normal;
|
|
1096
|
+
}
|
|
1097
|
+
ol.callout-list > li::before {
|
|
1098
|
+
/* a digit has no descender, so the box it is centered in has slack at the
|
|
1099
|
+
bottom it never uses: take that slack back */
|
|
1100
|
+
padding-bottom: 0.075em;
|
|
1101
|
+
}
|
|
1102
|
+
i.callout-num[data-value]::after {
|
|
1103
|
+
content: attr(data-value);
|
|
1104
|
+
}
|
|
1105
|
+
/* the parenthesized number is the fallback when this stylesheet is not loaded */
|
|
1106
|
+
i.callout-num[data-value] + b {
|
|
1107
|
+
display: none;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/* two columns, so the badge hangs beside the text and wrapped lines stay
|
|
1111
|
+
aligned with the first one; baseline alignment puts the number on the
|
|
1112
|
+
baseline of the text it labels */
|
|
1113
|
+
ol.callout-list {
|
|
1114
|
+
list-style: none;
|
|
1115
|
+
counter-reset: callout;
|
|
1116
|
+
padding-left: 0;
|
|
1117
|
+
font-size: 0.9375rem;
|
|
1118
|
+
}
|
|
1119
|
+
ol.callout-list > li {
|
|
1120
|
+
counter-increment: callout;
|
|
1121
|
+
display: grid;
|
|
1122
|
+
grid-template-columns: auto 1fr;
|
|
1123
|
+
align-items: baseline;
|
|
1124
|
+
gap: 0 0.5rem;
|
|
1125
|
+
margin: 0.25em 0;
|
|
1126
|
+
}
|
|
1127
|
+
ol.callout-list > li::before {
|
|
1128
|
+
content: counter(callout);
|
|
1129
|
+
grid-column: 1;
|
|
1130
|
+
}
|
|
1131
|
+
ol.callout-list > li > * {
|
|
1132
|
+
grid-column: 2;
|
|
1133
|
+
}
|
|
1134
|
+
/* image icons: the marker the author supplied is already in the content */
|
|
1135
|
+
ol.callout-list > li:has(> p > img:first-child)::before {
|
|
1136
|
+
content: none;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/* ── Tables ──────────────────────────────────────────────────────────────── */
|
|
1140
|
+
|
|
1141
|
+
table {
|
|
1142
|
+
border-collapse: collapse;
|
|
1143
|
+
margin: 1.5rem 0;
|
|
1144
|
+
font-size: 0.9375rem;
|
|
1145
|
+
}
|
|
1146
|
+
table caption {
|
|
1147
|
+
text-align: left;
|
|
1148
|
+
font-size: 0.875rem;
|
|
1149
|
+
color: var(--asciidoctor-muted);
|
|
1150
|
+
margin-bottom: 0.4rem;
|
|
1151
|
+
}
|
|
1152
|
+
th,
|
|
1153
|
+
td {
|
|
1154
|
+
padding: 0.4rem 0.75rem;
|
|
1155
|
+
text-align: left;
|
|
1156
|
+
vertical-align: top;
|
|
1157
|
+
}
|
|
1158
|
+
thead th {
|
|
1159
|
+
font-weight: 600;
|
|
1160
|
+
}
|
|
1161
|
+
td > p:last-child {
|
|
1162
|
+
margin-bottom: 0;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
table.stretch {
|
|
1166
|
+
width: 100%;
|
|
1167
|
+
}
|
|
1168
|
+
table.fit-content {
|
|
1169
|
+
width: fit-content;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
/* frame */
|
|
1173
|
+
table.frame-all {
|
|
1174
|
+
border: 1px solid var(--asciidoctor-line);
|
|
1175
|
+
}
|
|
1176
|
+
table.frame-ends {
|
|
1177
|
+
border-top: 1px solid var(--asciidoctor-line);
|
|
1178
|
+
border-bottom: 1px solid var(--asciidoctor-line);
|
|
1179
|
+
}
|
|
1180
|
+
table.frame-sides {
|
|
1181
|
+
border-left: 1px solid var(--asciidoctor-line);
|
|
1182
|
+
border-right: 1px solid var(--asciidoctor-line);
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/* grid */
|
|
1186
|
+
table[class*="grid-"] > * > tr > th,
|
|
1187
|
+
table[class*="grid-"] > * > tr > td {
|
|
1188
|
+
border: 0 solid var(--asciidoctor-line);
|
|
1189
|
+
}
|
|
1190
|
+
table.grid-all > * > tr > th,
|
|
1191
|
+
table.grid-all > * > tr > td {
|
|
1192
|
+
border-width: 1px;
|
|
1193
|
+
}
|
|
1194
|
+
table.grid-rows > * > tr > th,
|
|
1195
|
+
table.grid-rows > * > tr > td {
|
|
1196
|
+
border-width: 1px 0;
|
|
1197
|
+
}
|
|
1198
|
+
table.grid-cols > * > tr > th,
|
|
1199
|
+
table.grid-cols > * > tr > td {
|
|
1200
|
+
border-width: 0 1px;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
/* stripes */
|
|
1204
|
+
table.stripes-all > tbody > tr,
|
|
1205
|
+
table.stripes-even > tbody > tr:nth-of-type(even),
|
|
1206
|
+
table.stripes-odd > tbody > tr:nth-of-type(odd) {
|
|
1207
|
+
background: var(--asciidoctor-surface);
|
|
1208
|
+
}
|
|
1209
|
+
table.stripes-hover > tbody > tr:hover {
|
|
1210
|
+
background: var(--asciidoctor-surface);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/* cell alignment */
|
|
1214
|
+
th.halign-center,
|
|
1215
|
+
td.halign-center {
|
|
1216
|
+
text-align: center;
|
|
1217
|
+
}
|
|
1218
|
+
th.halign-right,
|
|
1219
|
+
td.halign-right {
|
|
1220
|
+
text-align: right;
|
|
1221
|
+
}
|
|
1222
|
+
th.valign-middle,
|
|
1223
|
+
td.valign-middle {
|
|
1224
|
+
vertical-align: middle;
|
|
1225
|
+
}
|
|
1226
|
+
th.valign-bottom,
|
|
1227
|
+
td.valign-bottom {
|
|
1228
|
+
vertical-align: bottom;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/* ── Footnotes ───────────────────────────────────────────────────────────── */
|
|
1232
|
+
|
|
1233
|
+
sup.footnote-ref {
|
|
1234
|
+
font-size: 0.75em;
|
|
1235
|
+
}
|
|
1236
|
+
section.footnotes {
|
|
1237
|
+
margin-top: 3rem;
|
|
1238
|
+
font-size: 0.875rem;
|
|
1239
|
+
color: var(--asciidoctor-muted);
|
|
1240
|
+
}
|
|
1241
|
+
section.footnotes > hr {
|
|
1242
|
+
width: 8rem;
|
|
1243
|
+
margin: 0 0 1rem;
|
|
1244
|
+
}
|
|
1245
|
+
ol.footnotes {
|
|
1246
|
+
padding-left: 1.5rem;
|
|
1247
|
+
}
|
|
1248
|
+
a.footnote-backref {
|
|
1249
|
+
text-decoration: none;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/* ── Inline UI macros ────────────────────────────────────────────────────── */
|
|
1253
|
+
|
|
1254
|
+
kbd {
|
|
1255
|
+
display: inline-block;
|
|
1256
|
+
font-size: 0.75em;
|
|
1257
|
+
line-height: 1.4;
|
|
1258
|
+
padding: 0.1em 0.45em;
|
|
1259
|
+
border: 1px solid var(--asciidoctor-line);
|
|
1260
|
+
border-bottom-width: 2px;
|
|
1261
|
+
border-radius: 4px;
|
|
1262
|
+
background: var(--asciidoctor-surface);
|
|
1263
|
+
}
|
|
1264
|
+
.key-seq kbd {
|
|
1265
|
+
margin: 0 0.1em;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
.button {
|
|
1269
|
+
font-weight: 600;
|
|
1270
|
+
font-size: 0.875em;
|
|
1271
|
+
padding: 0.05em 0.5em;
|
|
1272
|
+
border: 1px solid var(--asciidoctor-line);
|
|
1273
|
+
border-radius: 6px;
|
|
1274
|
+
background: var(--asciidoctor-surface);
|
|
1275
|
+
white-space: nowrap;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
.menu-seq b {
|
|
1279
|
+
font-weight: 600;
|
|
1280
|
+
}
|
|
1281
|
+
.menu-seq b.caret {
|
|
1282
|
+
color: var(--asciidoctor-muted);
|
|
1283
|
+
font-weight: 400;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/* ── Media ───────────────────────────────────────────────────────────────── */
|
|
1287
|
+
|
|
1288
|
+
audio {
|
|
1289
|
+
width: 100%;
|
|
1290
|
+
max-width: 30rem;
|
|
1291
|
+
}
|
|
1292
|
+
iframe {
|
|
1293
|
+
border: 0;
|
|
1294
|
+
max-width: 100%;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
/* ── Alignment and float roles ───────────────────────────────────────────── */
|
|
1298
|
+
|
|
1299
|
+
.text-left {
|
|
1300
|
+
text-align: left;
|
|
1301
|
+
}
|
|
1302
|
+
.text-center {
|
|
1303
|
+
text-align: center;
|
|
1304
|
+
}
|
|
1305
|
+
.text-right {
|
|
1306
|
+
text-align: right;
|
|
1307
|
+
}
|
|
1308
|
+
/* a bare <img> carries the alignment role itself — align via auto margins */
|
|
1309
|
+
img.text-left,
|
|
1310
|
+
img.text-center,
|
|
1311
|
+
img.text-right {
|
|
1312
|
+
display: block;
|
|
1313
|
+
}
|
|
1314
|
+
img.text-center {
|
|
1315
|
+
margin-inline: auto;
|
|
1316
|
+
}
|
|
1317
|
+
img.text-right {
|
|
1318
|
+
margin-left: auto;
|
|
1319
|
+
}
|
|
1320
|
+
img.left,
|
|
1321
|
+
figure.left {
|
|
1322
|
+
float: left;
|
|
1323
|
+
margin: 0.25rem 1.25rem 0.75rem 0;
|
|
1324
|
+
}
|
|
1325
|
+
img.right,
|
|
1326
|
+
figure.right {
|
|
1327
|
+
float: right;
|
|
1328
|
+
margin: 0.25rem 0 0.75rem 1.25rem;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
/* ── General-purpose roles ───────────────────────────────────────────────── */
|
|
1332
|
+
|
|
1333
|
+
.underline {
|
|
1334
|
+
text-decoration: underline;
|
|
1335
|
+
}
|
|
1336
|
+
.overline {
|
|
1337
|
+
text-decoration: overline;
|
|
1338
|
+
}
|
|
1339
|
+
.line-through {
|
|
1340
|
+
text-decoration: line-through;
|
|
1341
|
+
}
|
|
1342
|
+
.nobreak {
|
|
1343
|
+
hyphens: none;
|
|
1344
|
+
word-wrap: normal;
|
|
1345
|
+
}
|
|
1346
|
+
.nowrap {
|
|
1347
|
+
white-space: nowrap;
|
|
1348
|
+
}
|
|
1349
|
+
.pre-wrap {
|
|
1350
|
+
white-space: pre-wrap;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
.unstyled {
|
|
1354
|
+
list-style: none;
|
|
1355
|
+
padding-left: 0;
|
|
1356
|
+
}
|
|
1357
|
+
ul.no-bullet,
|
|
1358
|
+
ol.unnumbered {
|
|
1359
|
+
list-style: none;
|
|
1360
|
+
padding-left: 1.25rem;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/* ── Print ───────────────────────────────────────────────────────────────── */
|
|
1364
|
+
|
|
1365
|
+
@media print {
|
|
1366
|
+
:root {
|
|
1367
|
+
--asciidoctor-bg: #fff;
|
|
1368
|
+
--asciidoctor-surface: #f4f4f4;
|
|
1369
|
+
--asciidoctor-fg: #000;
|
|
1370
|
+
--asciidoctor-muted: #444;
|
|
1371
|
+
--asciidoctor-line: #bbb;
|
|
1372
|
+
--asciidoctor-link: #000;
|
|
1373
|
+
}
|
|
1374
|
+
body {
|
|
1375
|
+
max-width: none;
|
|
1376
|
+
font-size: 10.5pt;
|
|
1377
|
+
}
|
|
1378
|
+
a[href^="http"]::after {
|
|
1379
|
+
content: " (" attr(href) ")";
|
|
1380
|
+
font-size: 0.85em;
|
|
1381
|
+
color: var(--asciidoctor-muted);
|
|
1382
|
+
}
|
|
1383
|
+
nav.toc a::after,
|
|
1384
|
+
a.footnote-backref::after,
|
|
1385
|
+
sup.footnote-ref a::after,
|
|
1386
|
+
a.anchor::after,
|
|
1387
|
+
h1 > a.link::after,
|
|
1388
|
+
h2 > a.link::after,
|
|
1389
|
+
h3 > a.link::after,
|
|
1390
|
+
h4 > a.link::after,
|
|
1391
|
+
h5 > a.link::after,
|
|
1392
|
+
h6 > a.link::after {
|
|
1393
|
+
content: none;
|
|
1394
|
+
}
|
|
1395
|
+
hr.page-break {
|
|
1396
|
+
border: 0;
|
|
1397
|
+
margin: 0;
|
|
1398
|
+
break-after: page;
|
|
1399
|
+
}
|
|
1400
|
+
figure,
|
|
1401
|
+
blockquote,
|
|
1402
|
+
aside.admonition,
|
|
1403
|
+
aside.sidebar,
|
|
1404
|
+
table,
|
|
1405
|
+
pre {
|
|
1406
|
+
break-inside: avoid;
|
|
1407
|
+
}
|
|
1408
|
+
h1,
|
|
1409
|
+
h2,
|
|
1410
|
+
h3,
|
|
1411
|
+
h4,
|
|
1412
|
+
h5,
|
|
1413
|
+
h6 {
|
|
1414
|
+
break-after: avoid;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
@media not print {
|
|
1419
|
+
hr.page-break {
|
|
1420
|
+
border: 0;
|
|
1421
|
+
margin: 2.5rem auto;
|
|
1422
|
+
text-align: center;
|
|
1423
|
+
}
|
|
1424
|
+
hr.page-break::after {
|
|
1425
|
+
content: "· · ·";
|
|
1426
|
+
color: var(--asciidoctor-muted);
|
|
1427
|
+
letter-spacing: 0.5em;
|
|
1428
|
+
}
|
|
1429
|
+
}`;class qe{static DEFAULT_STYLESHEET_NAME="asciidoctor.css";static SEMANTIC_STYLESHEET_NAME="asciidoctor-semantic.css";get primaryStylesheetName(){return qe.DEFAULT_STYLESHEET_NAME}async primaryStylesheetData(){return tn}async embedPrimaryStylesheet(){return`<style>
|
|
1430
|
+
${tn}
|
|
1431
|
+
</style>`}async writePrimaryStylesheet(t){return this._writeStylesheet(t,qe.DEFAULT_STYLESHEET_NAME,tn)}get semanticStylesheetName(){return qe.SEMANTIC_STYLESHEET_NAME}async semanticStylesheetData(){return en}async embedSemanticStylesheet(){return`<style>
|
|
1432
|
+
${en}
|
|
1433
|
+
</style>`}async writeSemanticStylesheet(t){return this._writeStylesheet(t,qe.SEMANTIC_STYLESHEET_NAME,en)}async _writeStylesheet(t,e,i){try{const{writeFile:s}=await St(async()=>{const{writeFile:o}=await import("./__vite-browser-external-D7Ct-6yo.js").then(l=>l._);return{writeFile:o}},[],import.meta.url),{join:n}=await St(async()=>{const{join:o}=await import("./__vite-browser-external-D7Ct-6yo.js").then(l=>l._);return{join:o}},[],import.meta.url);return await s(n(t,e),i,"utf8"),!0}catch{return!1}}}const es={instance:new qe};async function xf(r,t={}){t=Object.assign({},t),delete t.parse;const e=t.to_dir;delete t.to_dir;const i=t.mkdirs;delete t.mkdirs;let s=t.to_file;delete t.to_file;let n=null,o=null,l=!1;if(s===!0||s==null)o=e||null,!o&&r&&typeof r=="object"&&r.path&&(n=(await Be()).resolve(r.path)),s=null;else if(s===!1)s=null;else{if(s==="/dev/null")return Oo(r,t);typeof s=="object"&&typeof s.write=="function"?l=!0:(t.to_file=s,o=s)}if("standalone"in t||(n||o?t.standalone="header_footer"in t?t.header_footer:!0:"header_footer"in t&&(t.standalone=t.header_footer)),n){const h=await Be();t.to_dir=h.dirname(n)}else if(o){const h=await Be();e?s?t.to_dir=h.dirname(h.resolve(e,s)):t.to_dir=h.resolve(e):s&&(t.to_dir=h.dirname(h.resolve(s)))}const a=await Oo(r,t);let c,u;if(n){const h=await Be();if(u=h.dirname(n),c=h.join(u,`${a.attributes.docname}${a.outfilesuffix}`),c===n)throw new Error(`input file and output file cannot be the same: ${c}`)}else if(o){const h=await Be(),p=t.base_dir?h.resolve(t.base_dir):process.cwd(),d=a.safe>=at.SAFE?p:null;if(e?(u=a.normalizeSystemPath(e,p,d,{targetName:"to_dir",recover:!1}),s?(c=a.normalizeSystemPath(s,u,null,{targetName:"to_dir",recover:!1}),u=h.dirname(c)):c=h.join(u,`${a.attributes.docname}${a.outfilesuffix}`)):s&&(c=a.normalizeSystemPath(s,p,d,{targetName:"to_dir",recover:!1}),u=h.dirname(c)),r&&typeof r=="object"&&r.path){const m=h.resolve(r.path);if(h.normalize(c)===h.normalize(m))throw new Error(`input file and output file cannot be the same: ${c}`)}if(i)await Ys(u);else if(!await sn(u))throw new Error(`target directory does not exist: ${e} (hint: set mkdirs option)`)}else c=l?s:null,u=null;let f;if(c&&!l?f=await a.convert({outfile:c,outdir:u}):f=await a.convert(),c){if(await a.write(f,c),!l&&a.safe<at.SECURE&&a.hasAttribute("linkcss")&&a.hasAttribute("copycss")&&a.basebackend("html")&&!(a.getAttribute("stylesdir")&&vt(a.getAttribute("stylesdir")))){let h=!1,p=!1;const d=a.getAttribute("stylesheet");d!=null&&(Cn.has(d)?h=!0:vt(d)||(p=!0));const m=a.syntaxHighlighter,b=m?.writeStylesheet(a);if(h||p||b){const _=a.getAttribute("stylesdir"),$=a.normalizeSystemPath(_,u,a.safe>=at.SAFE?u:null);if(i)await Ys($);else if(!await sn($))throw new Error(`target stylesheet directory does not exist: ${$} (hint: set mkdirs option)`);if(h)await es.instance.writePrimaryStylesheet($)||a.logger.info("skipping default stylesheet copy: filesystem writes are not supported in this environment");else if(p){let E=a.getAttribute("copycss");E===""||E===!0?E=a.normalizeSystemPath(d):E=a.normalizeSystemPath(String(E));const k=a.normalizeSystemPath(d,$,a.safe>=at.SAFE?u:null);if(E!==k){const v=!await Af(k),L=await a.readAsset(E,{warnOnFailure:v,label:"stylesheet"});if(L){const{writeFile:R}=await St(async()=>{const{writeFile:W}=await import("./__vite-browser-external-D7Ct-6yo.js").then(D=>D._);return{writeFile:W}},[],import.meta.url),C=(await Be()).dirname(k);if(C!==$&&!await sn(C)){if(!i)throw new Error(`target stylesheet directory does not exist: ${C} (hint: set mkdirs option)`);await Ys(C)}await R(k,L,"utf8")}}}b&&await m.writeStylesheetToDisk(a,$)}}return a}else return f}async function Be(){return St(()=>import("./__vite-browser-external-D7Ct-6yo.js").then(r=>r._),[],import.meta.url)}async function sn(r){try{const{stat:t}=await St(async()=>{const{stat:e}=await import("./__vite-browser-external-D7Ct-6yo.js").then(i=>i._);return{stat:e}},[],import.meta.url);return(await t(r)).isDirectory()}catch{return!1}}async function Af(r){try{const{stat:t}=await St(async()=>{const{stat:e}=await import("./__vite-browser-external-D7Ct-6yo.js").then(i=>i._);return{stat:e}},[],import.meta.url);return(await t(r)).isFile()}catch{return!1}}const Do=/<(?:a\b[^>]*|\/a)>/g,vf=/^(?:<a id="[^"]+"><\/a>)+/,Sf=/ *\\\n(?:\\?\n)*|\n\n+/g,Tf=/^[\s\S]*?(?=<svg[\s>])/,Lf=/^<svg(?:\s[^>]*)?>/,Ef=/\s(?:width|height|style)=(["'])[\s\S]*?\1/g,Rf={monospaced:["<code>","</code>",!0],emphasis:["<em>","</em>",!0],strong:["<strong>","</strong>",!0],double:["“","”"],single:["‘","’"],mark:["<mark>","</mark>",!0],superscript:["<sup>","</sup>",!0],subscript:["<sub>","</sub>",!0],asciimath:["\\$","\\$"],latexmath:["\\(","\\)"]},If=["",""];class rs extends ns{static create(t="html5",e={}){return new this(t,e)}constructor(t,e={}){super(t,e);let i;e.htmlsyntax==="xml"?(i="xml",this._xmlMode=!0,this._voidSlash="/"):(i="html",this._xmlMode=!1,this._voidSlash=""),this.initBackendTraits({basebackend:"html",filetype:"html",htmlsyntax:i,outfilesuffix:".html",supportsTemplates:!0})}async convert_document(t){const e=this._voidSlash,i=`<br${e}>`;let s=t.getAttribute("asset-uri-scheme","https");s&&(s=`${s}:`);const n=`${s}//cdnjs.cloudflare.com/ajax/libs`,o=t.hasAttribute("linkcss"),l=t.hasAttribute("max-width")?` style="max-width: ${t.getAttribute("max-width")};"`:"",a=["<!DOCTYPE html>"],c=t.hasAttribute("nolang")?"":` lang="${t.getAttribute("lang","en")}"`;a.push(`<html${this._xmlMode?' xmlns="http://www.w3.org/1999/xhtml"':""}${c}>`),a.push(`<head>
|
|
1434
|
+
<meta charset="${t.getAttribute("encoding","UTF-8")}"${e}>
|
|
1435
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge"${e}>
|
|
1436
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"${e}>`);let u;if((u=t.hasAttribute("reproducible"))||a.push(`<meta name="generator" content="Asciidoctor.js ${t.getAttribute("asciidoctor-version")}"${e}>`),t.hasAttribute("app-name")&&a.push(`<meta name="application-name" content="${t.getAttribute("app-name")}"${e}>`),t.hasAttribute("description")&&a.push(`<meta name="description" content="${t.getAttribute("description")}"${e}>`),t.hasAttribute("keywords")&&a.push(`<meta name="keywords" content="${t.getAttribute("keywords")}"${e}>`),t.hasAttribute("authors")){let k=t.subReplacements(t.getAttribute("authors"));k.includes("<")&&(k=k.replace(Te,"")),a.push(`<meta name="author" content="${k}"${e}>`)}if(t.hasAttribute("copyright")&&a.push(`<meta name="copyright" content="${t.getAttribute("copyright")}"${e}>`),t.hasAttribute("favicon")){let k="favicon"in t.attributes?t.attributes.favicon:"",v;if(!k)k="favicon.ico",v="image/x-icon";else{const L=Le(k,null);L?v=L===".ico"?"image/x-icon":`image/${L.slice(1)}`:v="image/x-icon"}a.push(`<link rel="icon" type="${v}" href="${k}"${e}>`)}a.push(`<title>${t.doctitle({sanitize:!0,use_fallback:!0})}</title>`);const f="stylesheet"in t.attributes?t.attributes.stylesheet:null;if(Cn.has(f)){if(t.hasAttribute("webfonts")){const v=(t.attributes.webfonts??"")||"Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CNoto+Sans+Mono:400,700";a.push(`<link rel="stylesheet" href="${s}//fonts.googleapis.com/css?family=${v}"${e}>`)}o?a.push(`<link rel="stylesheet" href="${t.normalizeWebPath(qu,t.getAttribute("stylesdir"),!1)}"${e}>`):a.push(`<style>
|
|
1437
|
+
${await es.instance.primaryStylesheetData()}
|
|
1438
|
+
</style>`)}else if(t.hasAttribute("stylesheet"))if(o)a.push(`<link rel="stylesheet" href="${t.normalizeWebPath(t.getAttribute("stylesheet"),t.getAttribute("stylesdir"))}"${e}>`);else{const k=t.normalizeSystemPath(t.getAttribute("stylesheet"),t.getAttribute("stylesdir")),v=await t.readAsset(k,{warnOnFailure:!0,label:"stylesheet"})??"";a.push(`<style>
|
|
1439
|
+
${v}
|
|
1440
|
+
</style>`)}if(t.hasAttribute("icons","font"))if(t.hasAttribute("iconfont-remote")){const k=t.getAttribute("iconfont-cdn")??`${n}/font-awesome/${ih}/css/font-awesome.min.css`;a.push(`<link rel="stylesheet" href="${k}"${e}>`)}else{const k=`${t.getAttribute("iconfont-name","font-awesome")}.css`;a.push(`<link rel="stylesheet" href="${t.normalizeWebPath(k,t.getAttribute("stylesdir"),!1)}"${e}>`)}const h=t.syntaxHighlighter;let p;h&&(p=a.length,a.push(""));const d=await t.docinfo();d&&a.push(d),a.push("</head>");const m=t.id?` id="${t.id}"`:"",b=t.hasSections();let _;b&&t.hasAttribute("toc-class")&&t.hasAttribute("toc")&&t.hasAttribute("toc-placement","auto")?_=[t.doctype,t.getAttribute("toc-class"),`toc-${t.getAttribute("toc-position","header")}`]:_=[t.doctype],t.role&&_.push(t.role),a.push(`<body${m} class="${_.join(" ")}">`);const $=await t.docinfo("header");if($&&a.push($),!t.isNoheader()){if(a.push(`<div id="header"${l}>`),t.doctype==="manpage")a.push(`<h1>${t.doctitle()} Manual Page</h1>`),b&&t.hasAttribute("toc")&&t.hasAttribute("toc-placement","auto")&&a.push(`<div id="toc" class="${t.getAttribute("toc-class","toc")}">
|
|
1441
|
+
<div id="toctitle">${t.getAttribute("toc-title")}</div>
|
|
1442
|
+
${await t.converter.convert(t,"outline")}
|
|
1443
|
+
</div>`),t.hasAttribute("manpurpose")&&a.push(this._generateMannameSection(t));else{if(t.hasHeader()){t.isNotitle()||a.push(`<h1>${t.header.title}</h1>`);const k=[];let v=1;for(const L of t.authors())k.push(`<span id="author${v>1?v:""}" class="author">${t.subReplacements(L.name)}</span>${i}`),L.email&&k.push(`<span id="email${v>1?v:""}" class="email">${await t.subMacros(L.email)}</span>${i}`),v++;if(t.hasAttribute("revnumber")){const L=(t.getAttribute("version-label")||"").toLowerCase();k.push(`<span id="revnumber">${L} ${t.getAttribute("revnumber")}${t.hasAttribute("revdate")?",":""}</span>`)}t.hasAttribute("revdate")&&k.push(`<span id="revdate">${t.getAttribute("revdate")}</span>`),t.hasAttribute("revremark")&&k.push(`${i}<span id="revremark">${t.getAttribute("revremark")}</span>`),k.length>0&&(a.push('<div class="details">'),a.push(...k),a.push("</div>"))}b&&t.hasAttribute("toc")&&t.hasAttribute("toc-placement","auto")&&a.push(`<div id="toc" class="${t.getAttribute("toc-class","toc")}">
|
|
1444
|
+
<div id="toctitle">${t.getAttribute("toc-title")}</div>
|
|
1445
|
+
${await t.converter.convert(t,"outline")}
|
|
1446
|
+
</div>`)}a.push("</div>")}if(a.push(`<div id="content"${l}>
|
|
1447
|
+
${await t.content()}
|
|
1448
|
+
</div>`),t.hasFootnotes()&&!t.hasAttribute("nofootnotes")){a.push(`<div id="footnotes"${l}>
|
|
1449
|
+
<hr${e}>`);for(const k of t.footnotes)a.push(`<div class="footnote" id="_footnotedef_${k.index}">
|
|
1450
|
+
<a href="#_footnoteref_${k.index}">${k.index}</a>. ${k.text}
|
|
1451
|
+
</div>`);a.push("</div>")}if(t.isNofooter()||(a.push(`<div id="footer"${l}>`),a.push('<div id="footer-text">'),t.hasAttribute("revnumber")&&a.push(`${t.getAttribute("version-label")} ${t.getAttribute("revnumber")}${i}`),t.hasAttribute("last-update-label")&&!u&&a.push(`${t.getAttribute("last-update-label")} ${t.getAttribute("docdatetime")}`),a.push("</div>"),a.push("</div>")),h&&(h.hasDocinfo("head")?a[p]=await h.docinfo("head",t,{cdn_base_url:n,linkcss:o,self_closing_tag_slash:e}):a.splice(p,1),h.hasDocinfo("footer")&&a.push(await h.docinfo("footer",t,{cdn_base_url:n,linkcss:o,self_closing_tag_slash:e}))),t.hasAttribute("stem")){let k=t.getAttribute("eqnums","none");k||(k="AMS");const v=` equationNumbers: { autoNumber: "${k}" } `;a.push(`<script type="text/x-mathjax-config">
|
|
1452
|
+
MathJax.Hub.Config({
|
|
1453
|
+
messageStyle: "none",
|
|
1454
|
+
tex2jax: {
|
|
1455
|
+
inlineMath: [${JSON.stringify(pn.latexmath)}],
|
|
1456
|
+
displayMath: [${JSON.stringify(Ae.latexmath)}],
|
|
1457
|
+
ignoreClass: "nostem|nolatexmath"
|
|
1458
|
+
},
|
|
1459
|
+
asciimath2jax: {
|
|
1460
|
+
delimiters: [${JSON.stringify(Ae.asciimath)}],
|
|
1461
|
+
ignoreClass: "nostem|noasciimath"
|
|
1462
|
+
},
|
|
1463
|
+
TeX: {${v}}
|
|
1464
|
+
})
|
|
1465
|
+
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
|
|
1466
|
+
MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
|
|
1467
|
+
if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stemblock")) {
|
|
1468
|
+
data.math.root.display = "block"
|
|
1469
|
+
}
|
|
1470
|
+
return data
|
|
1471
|
+
})
|
|
1472
|
+
})
|
|
1473
|
+
<\/script>
|
|
1474
|
+
<script src="${n}/mathjax/${da}/MathJax.js?config=TeX-MML-AM_CHTML"><\/script>`)}const E=await t.docinfo("footer");return E&&a.push(E),a.push("</body>"),a.push("</html>"),a.join(S)}async convert_embedded(t){const e=[];if(t.doctype==="manpage"){if(!t.isNotitle()){const i=t.id?` id="${t.id}"`:"";e.push(`<h1${i}>${t.doctitle()} Manual Page</h1>`)}t.hasAttribute("manpurpose")&&e.push(this._generateMannameSection(t))}else if(t.hasHeader()&&!t.isNotitle()){const i=t.id?` id="${t.id}"`:"";e.push(`<h1${i}>${t.header.title}</h1>`)}if(t.hasSections()&&t.hasAttribute("toc")){const i=t.getAttribute("toc-placement");i!=="macro"&&i!=="preamble"&&e.push(`<div id="toc" class="toc">
|
|
1475
|
+
<div id="toctitle">${t.getAttribute("toc-title")}</div>
|
|
1476
|
+
${await t.converter.convert(t,"outline")}
|
|
1477
|
+
</div>`)}if(e.push(await t.content()),t.hasFootnotes()&&!t.hasAttribute("nofootnotes")){e.push(`<div id="footnotes">
|
|
1478
|
+
<hr${this._voidSlash}>`);for(const i of t.footnotes)e.push(`<div class="footnote" id="_footnotedef_${i.index}">
|
|
1479
|
+
<a href="#_footnoteref_${i.index}">${i.index}</a>. ${i.text}
|
|
1480
|
+
</div>`);e.push("</div>")}return e.join(S)}async convert_outline(t,e={}){if(!t.hasSections())return null;const i=t.sections(),s=t.context==="document"&&t.isMultipart(),n=s?0:i[0].level,o=e.sectnumlevels??parseInt(t.document.attributes.sectnumlevels||3,10);let l=e.toclevels??null;if(l==null){const c=t.document.attributes.toclevels;c?(l=parseInt(c,10),l<1&&!s&&(l=1)):l=2}const a=[`<ul class="sectlevel${n}">`];for(const c of i){const u=c.level,f=c.hasAttribute("toclevels")?parseInt(c.getAttribute("toclevels"),10):l;if(u>f)continue;let h;if(c.caption)h=c.captionedTitle();else if(c.numbered&&u<=o)if(u<2&&t.document.doctype==="book"){const d=c.sectname;if(d==="chapter"){const m=t.document.attributes["chapter-signifier"];h=`${m?`${m} `:""}${c.sectnum()} ${c.title}`}else if(d==="part"){const m=t.document.attributes["part-signifier"];h=`${m?`${m} `:""}${c.sectnum(null,":")} ${c.title}`}else h=`${c.sectnum()} ${c.title}`}else h=`${c.sectnum()} ${c.title}`;else h=c.title;h?.includes("<a")&&(h=h.replace(new RegExp(Do.source,"g"),""));const p=u===n?"<li>":`<li class="sectlevel${u}">`;if(u<f){const d=await this.convert_outline(c,{toclevels:f,sectnumlevels:o});if(d){a.push(`${p}<a href="#${c.id}">${h}</a>`),a.push(d),a.push("</li>");continue}}a.push(`${p}<a href="#${c.id}">${h}</a></li>`)}return a.push("</ul>"),a.join(S)}async convert_section(t){const e=t.document.attributes,i=t.level;let s;if(t.caption)s=t.captionedTitle();else if(t.numbered&&i<=parseInt(e.sectnumlevels||3,10))if(i<2&&t.document.doctype==="book"){const l=t.sectname;if(l==="chapter"){const a=e["chapter-signifier"];s=`${a?`${a} `:""}${t.sectnum()} ${t.title}`}else if(l==="part"){const a=e["part-signifier"];s=`${a?`${a} `:""}${t.sectnum(null,":")} ${t.title}`}else s=`${t.sectnum()} ${t.title}`}else s=`${t.sectnum()} ${t.title}`;else s=t.title;let n="";if(t.id){const l=t.id;if(n=` id="${l}"`,"sectlinks"in e){let a;s.startsWith("<a ")&&(a=s.match(vf))?s=`${a[0]}<a class="link" href="#${l}">${s.slice(a[0].length)}</a>`:s=`<a class="link" href="#${l}">${s}</a>`}"sectanchors"in e&&(e.sectanchors==="after"?s=`${s}<a class="anchor" href="#${l}"></a>`:s=`<a class="anchor" href="#${l}"></a>${s}`)}const o=t.role;return i===0?`<h1${n} class="sect0${o?` ${o}`:""}">${s}</h1>
|
|
1481
|
+
${await t.content()}`:`<div class="sect${i}${o?` ${o}`:""}">
|
|
1482
|
+
<h${i+1}${n}>${s}</h${i+1}>
|
|
1483
|
+
${i===1?`<div class="sectionbody">
|
|
1484
|
+
${await t.content()}
|
|
1485
|
+
</div>`:await t.content()}
|
|
1486
|
+
</div>`}async convert_admonition(t){const e=t.id?` id="${t.id}"`:"",i=t.getAttribute("name"),s=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1487
|
+
`:"";let n;return t.document.hasAttribute("icons")?t.document.hasAttribute("icons","font")&&!t.hasAttribute("icon")?n=`<i class="fa icon-${i}" title="${t.getAttribute("textlabel")}"></i>`:n=`<img src="${await t.iconUri(i)}" alt="${t.getAttribute("textlabel")}"${this._voidSlash}>`:n=`<div class="title">${t.getAttribute("textlabel")}</div>`,`<div${e} class="admonitionblock ${i}${t.role?` ${t.role}`:""}">
|
|
1488
|
+
<table>
|
|
1489
|
+
<tr>
|
|
1490
|
+
<td class="icon">
|
|
1491
|
+
${n}
|
|
1492
|
+
</td>
|
|
1493
|
+
<td class="content">
|
|
1494
|
+
${s}${await t.content()}
|
|
1495
|
+
</td>
|
|
1496
|
+
</tr>
|
|
1497
|
+
</table>
|
|
1498
|
+
</div>`}async convert_audio(t){const e=this._xmlMode,i=t.id?` id="${t.id}"`:"",n=` class="${["audioblock",t.role].filter(Boolean).join(" ")}"`,o=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1499
|
+
`:"",l=t.getAttribute("start"),a=t.getAttribute("end"),c=l||a?`#t=${l||""}${a?`,${a}`:""}`:"";return`<div${i}${n}>
|
|
1500
|
+
${o}<div class="content">
|
|
1501
|
+
<audio src="${t.mediaUri(t.getAttribute("target"))}${c}"${t.hasOption("autoplay")?this._appendBooleanAttr("autoplay",e):""}${t.hasOption("nocontrols")?"":this._appendBooleanAttr("controls",e)}${t.hasOption("loop")?this._appendBooleanAttr("loop",e):""}>
|
|
1502
|
+
Your browser does not support the audio tag.
|
|
1503
|
+
</audio>
|
|
1504
|
+
</div>
|
|
1505
|
+
</div>`}async convert_colist(t){const e=[],i=t.id?` id="${t.id}"`:"",n=` class="${["colist",t.style,t.role].filter(Boolean).join(" ")}"`;if(e.push(`<div${i}${n}>`),t.hasTitle()&&e.push(`<div class="title">${t.title}</div>`),t.document.hasAttribute("icons")){e.push("<table>");const o=t.document.hasAttribute("icons","font");let l=0;for(const a of t.getItems()){l++;let c;o?c=`<i class="conum" data-value="${l}"></i><b>${l}</b>`:c=`<img src="${await t.iconUri(`callouts/${l}`)}" alt="${l}"${this._voidSlash}>`,e.push(`<tr>
|
|
1506
|
+
<td>${c}</td>
|
|
1507
|
+
<td>${a.getText()}${a.hasBlocks()?S+await a.content():""}</td>
|
|
1508
|
+
</tr>`)}e.push("</table>")}else{e.push("<ol>");for(const o of t.getItems())e.push(`<li>
|
|
1509
|
+
<p>${o.getText()}</p>${o.hasBlocks()?S+await o.content():""}
|
|
1510
|
+
</li>`);e.push("</ol>")}return e.push("</div>"),e.join(S)}async convert_dlist(t){const e=[],i=t.id?` id="${t.id}"`:"";let s;switch(t.style){case"qanda":s=["qlist","qanda",t.role];break;case"horizontal":s=["hdlist",t.role];break;default:s=["dlist",t.style,t.role]}const n=` class="${s.filter(Boolean).join(" ")}"`;switch(e.push(`<div${i}${n}>`),t.hasTitle()&&e.push(`<div class="title">${t.title}</div>`),t.style){case"qanda":e.push("<ol>");for(const[o,l]of t.getItems()){e.push("<li>");for(const a of o)e.push(`<p><em>${a.getText()}</em></p>`);l&&(l.hasText()&&e.push(`<p>${l.getText()}</p>`),l.hasBlocks()&&e.push(await l.content())),e.push("</li>")}e.push("</ol>");break;case"horizontal":{const o=this._voidSlash;if(e.push("<table>"),t.hasAttribute("labelwidth")||t.hasAttribute("itemwidth")){e.push("<colgroup>");const l=t.hasAttribute("labelwidth")?` width="${t.getAttribute("labelwidth").replace(/%$/,"")}%"`:"";e.push(`<col${l}${o}>`);const a=t.hasAttribute("itemwidth")?` width="${t.getAttribute("itemwidth").replace(/%$/,"")}%"`:"";e.push(`<col${a}${o}>`),e.push("</colgroup>")}for(const[l,a]of t.getItems()){e.push("<tr>"),e.push(`<td class="hdlist1${t.hasOption("strong")?" strong":""}">`);let c=!0;for(const u of l)c||e.push(`<br${o}>`),e.push(u.getText()),c=!1;e.push("</td>"),e.push('<td class="hdlist2">'),a&&(a.hasText()&&e.push(`<p>${a.getText()}</p>`),a.hasBlocks()&&e.push(await a.content())),e.push("</td>"),e.push("</tr>")}e.push("</table>");break}default:{e.push("<dl>");const o=t.style?"":' class="hdlist1"';for(const[l,a]of t.getItems()){for(const c of l)e.push(`<dt${o}>${c.getText()}</dt>`);a&&(e.push("<dd>"),a.hasText()&&e.push(`<p>${a.getText()}</p>`),a.hasBlocks()&&e.push(await a.content()),e.push("</dd>"))}e.push("</dl>")}}return e.push("</div>"),e.join(S)}async convert_example(t){const e=t.id?` id="${t.id}"`:"";if(t.hasOption("collapsible")){const n=t.role?` class="${t.role}"`:"",o=t.hasTitle()?`<summary class="title">${t.title}</summary>`:'<summary class="title">Details</summary>';return`<details${e}${n}${t.hasOption("open")?" open":""}>
|
|
1511
|
+
${o}
|
|
1512
|
+
<div class="content">
|
|
1513
|
+
${await t.content()}
|
|
1514
|
+
</div>
|
|
1515
|
+
</details>`}const i=t.hasTitle()?`<div class="title">${t.captionedTitle()}</div>
|
|
1516
|
+
`:"",s=t.role;return`<div${e} class="exampleblock${s?` ${s}`:""}">
|
|
1517
|
+
${i}<div class="content">
|
|
1518
|
+
${await t.content()}
|
|
1519
|
+
</div>
|
|
1520
|
+
</div>`}async convert_floating_title(t){const e=`h${t.level+1}`,i=t.id?` id="${t.id}"`:"",s=[t.style,t.role].filter(Boolean);return`<${e}${i} class="${s.join(" ")}">${t.title}</${e}>`}async convert_image(t){const e=t.getAttribute("target"),i=t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:"",s=t.hasAttribute("height")?` height="${t.getAttribute("height")}"`:"",n=this._voidSlash;let o,l;if((t.hasAttribute("format","svg")||e.includes(".svg")||e.startsWith("data:image/svg+xml"))&&t.document.safe<at.SECURE)if(t.hasOption("inline"))o=await this.readSvgContents(t,e)||`<span class="alt">${t.getAlt()}</span>`;else if(t.hasOption("interactive")){const h=t.hasAttribute("fallback")?`<img src="${await t.imageUri(t.getAttribute("fallback"))}" alt="${this._encodeAttrValue(t.getAlt())}"${i}${s}${n}>`:`<span class="alt">${t.getAlt()}</span>`;l=await t.imageUri(e),o=`<object type="image/svg+xml" data="${l}"${i}${s}>${h}</object>`}else l=await t.imageUri(e),o=`<img src="${l}" alt="${this._encodeAttrValue(t.getAlt())}"${i}${s}${n}>`;else l=await t.imageUri(e),o=`<img src="${l}" alt="${this._encodeAttrValue(t.getAlt())}"${i}${s}${n}>`;if(t.hasAttribute("link")){let h=t.getAttribute("link");h==="self"&&(h=l),h&&(o=`<a class="image" href="${h}"${this._appendLinkConstraintAttrs(t).join("")}>${o}</a>`)}const a=t.id?` id="${t.id}"`:"",c=["imageblock"];t.hasAttribute("float")&&c.push(t.getAttribute("float")),t.hasAttribute("align")&&c.push(`text-${t.getAttribute("align")}`),t.role&&c.push(t.role);const u=` class="${c.join(" ")}"`,f=t.hasTitle()?`
|
|
1521
|
+
<div class="title">${t.captionedTitle()}</div>`:"";return`<div${a}${u}>
|
|
1522
|
+
<div class="content">
|
|
1523
|
+
${o}
|
|
1524
|
+
</div>${f}
|
|
1525
|
+
</div>`}async convert_listing(t){const e=t.hasOption("nowrap")||!t.document.hasAttribute("prewrap");let i,s,n,o,l;if(t.style==="source")if(o=t.getAttribute("language"),n=t.document.syntaxHighlighter,n){if(n.handlesHighlighting()){const h=t.document.attributes;l={css_mode:h[`${n.name}-css`]||"class",style:h[`${n.name}-style`]}}else l={};l.nowrap=e}else i=`<pre class="highlight${e?" nowrap":""}"><code${o?` class="language-${o}" data-lang="${o}"`:""}>`,s="</code></pre>";else i=`<pre${e?' class="nowrap"':""}>`,s="</pre>";const a=t.id?` id="${t.id}"`:"",c=t.hasTitle()?`<div class="title">${t.captionedTitle()}</div>
|
|
1526
|
+
`:"",u=t.role,f=n?await n.format(t,o,l):`${i}${await t.content()}${s}`;return`<div${a} class="listingblock${u?` ${u}`:""}">
|
|
1527
|
+
${c}<div class="content">
|
|
1528
|
+
${f}
|
|
1529
|
+
</div>
|
|
1530
|
+
</div>`}async convert_literal(t){const e=t.id?` id="${t.id}"`:"",i=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1531
|
+
`:"",s=!t.document.hasAttribute("prewrap")||t.hasOption("nowrap"),n=t.role;return`<div${e} class="literalblock${n?` ${n}`:""}">
|
|
1532
|
+
${i}<div class="content">
|
|
1533
|
+
<pre${s?' class="nowrap"':""}>${await t.content()}</pre>
|
|
1534
|
+
</div>
|
|
1535
|
+
</div>`}async convert_stem(t){const e=t.id?` id="${t.id}"`:"",i=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1536
|
+
`:"",s=t.style,[n,o]=Ae[s]??["",""];let l=await t.content();if(l){if(s==="asciimath"&&l.includes(S)){const c=`${S}<br${this._voidSlash}>`;l=l.replace(Sf,u=>{const f=(u.match(/\n/g)||[]).length,h=u[0]===`
|
|
1537
|
+
`?f:f-1;return`${o}${c.repeat(h)}${S}${n}`})}(!l.startsWith(n)||!l.endsWith(o))&&(l=`${n}${l}${o}`)}else l="";const a=t.role;return`<div${e} class="stemblock${a?` ${a}`:""}">
|
|
1538
|
+
${i}<div class="content">
|
|
1539
|
+
${l}
|
|
1540
|
+
</div>
|
|
1541
|
+
</div>`}async convert_olist(t){const e=[],i=t.id?` id="${t.id}"`:"",n=` class="${["olist",t.style,t.role].filter(Boolean).join(" ")}"`;e.push(`<div${i}${n}>`),t.hasTitle()&&e.push(`<div class="title">${t.title}</div>`);const o=t.listMarkerKeyword(),l=o?` type="${o}"`:"",a=t.hasAttribute("start")?` start="${t.getAttribute("start")}"`:"",c=t.hasOption("reversed")?this._appendBooleanAttr("reversed",this._xmlMode):"";e.push(`<ol class="${t.style}"${l}${a}${c}>`);for(const u of t.getItems())u.id?e.push(`<li id="${u.id}"${u.role?` class="${u.role}"`:""}>`):u.role?e.push(`<li class="${u.role}">`):e.push("<li>"),e.push(`<p>${u.getText()}</p>`),u.hasBlocks()&&e.push(await u.content()),e.push("</li>");return e.push("</ol>"),e.push("</div>"),e.join(S)}async convert_open(t){const e=t.style;if(e==="abstract"){if(t.getParent()===t.document&&t.document.doctype==="book")return this.logger.warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content."),"";const o=t.id?` id="${t.id}"`:"",l=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1542
|
+
`:"",a=t.role;return`<div${o} class="quoteblock abstract${a?` ${a}`:""}">
|
|
1543
|
+
${l}<blockquote>
|
|
1544
|
+
${await t.content()}
|
|
1545
|
+
</blockquote>
|
|
1546
|
+
</div>`}if(e==="partintro"&&(t.level>0||t.getParent().context!=="section"||t.document.doctype!=="book"))return this.logger.error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."),"";const i=t.id?` id="${t.id}"`:"",s=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1547
|
+
`:"",n=t.role;return`<div${i} class="openblock${e&&e!=="open"?` ${e}`:""}${n?` ${n}`:""}">
|
|
1548
|
+
${s}<div class="content">
|
|
1549
|
+
${await t.content()}
|
|
1550
|
+
</div>
|
|
1551
|
+
</div>`}async convert_page_break(t){return'<div class="page-break"></div>'}async convert_paragraph(t){let e;return t.role?e=`${t.id?` id="${t.id}"`:""} class="paragraph ${t.role}"`:t.id?e=` id="${t.id}" class="paragraph"`:e=' class="paragraph"',t.hasTitle()?`<div${e}>
|
|
1552
|
+
<div class="title">${t.title}</div>
|
|
1553
|
+
<p>${await t.content()}</p>
|
|
1554
|
+
</div>`:`<div${e}>
|
|
1555
|
+
<p>${await t.content()}</p>
|
|
1556
|
+
</div>`}async convert_pass(t){return this.contentOnly(t)}async convert_preamble(t){let e="";const i=t.document;return i.hasAttribute("toc-placement","preamble")&&i.hasSections()&&i.hasAttribute("toc")&&(e=`
|
|
1557
|
+
<div id="toc" class="${i.getAttribute("toc-class","toc")}">
|
|
1558
|
+
<div id="toctitle">${i.getAttribute("toc-title")}</div>
|
|
1559
|
+
${await i.converter.convert(i,"outline")}
|
|
1560
|
+
</div>`),`<div id="preamble">
|
|
1561
|
+
<div class="sectionbody">
|
|
1562
|
+
${await t.content()}
|
|
1563
|
+
</div>${e}
|
|
1564
|
+
</div>`}async convert_quote(t){const e=t.id?` id="${t.id}"`:"",s=` class="${["quoteblock",t.role].filter(Boolean).join(" ")}"`,n=t.hasTitle()?`
|
|
1565
|
+
<div class="title">${t.title}</div>`:"",o=t.hasAttribute("attribution")?t.getAttribute("attribution"):null,l=t.hasAttribute("citetitle")?t.getAttribute("citetitle"):null;let a="";if(o||l){const c=l?`<cite>${l}</cite>`:"";a=`
|
|
1566
|
+
<div class="attribution">
|
|
1567
|
+
${o?`— ${o}${l?`<br${this._voidSlash}>
|
|
1568
|
+
`:""}`:""}${c}
|
|
1569
|
+
</div>`}return`<div${e}${s}>${n}
|
|
1570
|
+
<blockquote>
|
|
1571
|
+
${await t.content()}
|
|
1572
|
+
</blockquote>${a}
|
|
1573
|
+
</div>`}async convert_thematic_break(t){return`<hr${t.role?` class="${t.role}"`:""}${this._voidSlash}>`}async convert_sidebar(t){const e=t.id?` id="${t.id}"`:"",i=t.hasTitle()?`<div class="title">${t.title}</div>
|
|
1574
|
+
`:"",s=t.role;return`<div${e} class="sidebarblock${s?` ${s}`:""}">
|
|
1575
|
+
<div class="content">
|
|
1576
|
+
${i}${await t.content()}
|
|
1577
|
+
</div>
|
|
1578
|
+
</div>`}async convert_table(t){const e=[],i=t.id?` id="${t.id}"`:"";let s=t.getAttribute("frame","all","table-frame");s==="topbot"&&(s="ends");const n=["tableblock",`frame-${s}`,`grid-${t.getAttribute("grid","all","table-grid")}`],o=t.getAttribute("stripes",null,"table-stripes");o&&n.push(`stripes-${o}`);let l="";const a=t.hasOption("autowidth");if(a&&!t.hasAttribute("width"))n.push("fit-content");else{const u=t.getAttribute("tablepcwidth");Number(u)===100?n.push("stretch"):l=` width="${u}%"`}t.hasAttribute("float")&&n.push(t.getAttribute("float")),t.role&&n.push(t.role);const c=` class="${n.join(" ")}"`;if(e.push(`<table${i}${c}${l}>`),t.hasTitle()&&e.push(`<caption class="title">${t.captionedTitle()}</caption>`),t.getAttribute("rowcount")>0){const u=this._voidSlash;if(e.push("<colgroup>"),a)for(let f=0;f<t.columns.length;f++)e.push(`<col${u}>`);else for(const f of t.columns)e.push(f.hasOption("autowidth")?`<col${u}>`:`<col width="${f.getAttribute("colpcwidth")}%"${u}>`);e.push("</colgroup>");for(const[f,h]of t.rows.bySection())if(h.length!==0){e.push(`<t${f}>`);for(const p of h){e.push("<tr>");for(const d of p){let m;if(f==="head")m=d.text;else switch(d.style){case"asciidoc":m=`<div class="content">${await d.content()}</div>`;break;case"literal":m=`<div class="literal"><pre>${d.text}</pre></div>`;break;default:{const L=await d.content();m=L.length===0?"":`<p class="tableblock">${L.join(`</p>
|
|
1579
|
+
<p class="tableblock">`)}</p>`}}const b=f==="head"||d.style==="header"?"th":"td",_=` class="tableblock halign-${d.getAttribute("halign")} valign-${d.getAttribute("valign")}"`,$=d.colspan?` colspan="${d.colspan}"`:"",E=d.rowspan?` rowspan="${d.rowspan}"`:"",k="_cellbgcolor"in d?d._cellbgcolor:t.document.attributes.cellbgcolor,v=k?` style="background-color: ${k};"`:"";e.push(`<${b}${_}${$}${E}${v}>${m}</${b}>`)}e.push("</tr>")}e.push(`</t${f}>`)}}return e.push("</table>"),e.join(S)}async convert_toc(t){const e=t.document;if(!e.hasAttribute("toc-placement","macro")||!e.hasSections()||!e.hasAttribute("toc"))return"<!-- toc disabled -->";let i,s;t.id?(i=` id="${t.id}"`,s=` id="${t.id}title"`):(i=' id="toc"',s=' id="toctitle"');const n=t.hasTitle()?t.title:e.getAttribute("toc-title"),o=t.hasAttribute("levels")?parseInt(t.getAttribute("levels"),10):null,l=t.hasRoleAttribute()?t.role:e.getAttribute("toc-class","toc");return`<div${i} class="${l}">
|
|
1580
|
+
<div${s} class="title">${n}</div>
|
|
1581
|
+
${await e.converter.convert(e,"outline",o!=null?{toclevels:o}:{})}
|
|
1582
|
+
</div>`}async convert_ulist(t){const e=[],i=t.id?` id="${t.id}"`:"",s=["ulist",t.style,t.role].filter(Boolean);let n="",o="",l;const a=t.hasOption("checklist");a?(s.splice(1,0,"checklist"),l=' class="checklist"',t.hasOption("interactive")?this._xmlMode?(n='<input type="checkbox" data-item-complete="1" checked="checked"/> ',o='<input type="checkbox" data-item-complete="0"/> '):(n='<input type="checkbox" data-item-complete="1" checked> ',o='<input type="checkbox" data-item-complete="0"> '):t.document.hasAttribute("icons","font")?(n='<i class="fa fa-check-square-o"></i> ',o='<i class="fa fa-square-o"></i> '):(n="✓ ",o="❏ ")):l=t.style?` class="${t.style}"`:"",e.push(`<div${i} class="${s.join(" ")}">`),t.hasTitle()&&e.push(`<div class="title">${t.title}</div>`),e.push(`<ul${l}>`);for(const c of t.getItems())c.id?e.push(`<li id="${c.id}"${c.role?` class="${c.role}"`:""}>`):c.role?e.push(`<li class="${c.role}">`):e.push("<li>"),a&&c.hasAttribute("checkbox")?e.push(`<p>${c.hasAttribute("checked")?n:o}${c.getText()}</p>`):e.push(`<p>${c.getText()}</p>`),c.hasBlocks()&&e.push(await c.content()),e.push("</li>");return e.push("</ul>"),e.push("</div>"),e.join(S)}async convert_verse(t){const e=t.id?` id="${t.id}"`:"",s=` class="${["verseblock",t.role].filter(Boolean).join(" ")}"`,n=t.hasTitle()?`
|
|
1583
|
+
<div class="title">${t.title}</div>`:"",o=t.hasAttribute("attribution")?t.getAttribute("attribution"):null,l=t.hasAttribute("citetitle")?t.getAttribute("citetitle"):null;let a="";if(o||l){const c=l?`<cite>${l}</cite>`:"";a=`
|
|
1584
|
+
<div class="attribution">
|
|
1585
|
+
${o?`— ${o}${l?`<br${this._voidSlash}>
|
|
1586
|
+
`:""}`:""}${c}
|
|
1587
|
+
</div>`}return`<div${e}${s}>${n}
|
|
1588
|
+
<pre class="content">${await t.content()}</pre>${a}
|
|
1589
|
+
</div>`}async convert_video(t){const e=this._xmlMode,i=t.id?` id="${t.id}"`:"",s=["videoblock"];t.hasAttribute("float")&&s.push(t.getAttribute("float")),t.hasAttribute("align")&&s.push(`text-${t.getAttribute("align")}`),t.role&&s.push(t.role);const n=` class="${s.join(" ")}"`,o=t.hasTitle()?`
|
|
1590
|
+
<div class="title">${t.title}</div>`:"",l=t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:"",a=t.hasAttribute("height")?` height="${t.getAttribute("height")}"`:"";switch(t.getAttribute("poster")){case"vimeo":{let c=t.document.getAttribute("asset-uri-scheme","https");c&&(c=`${c}:`);const u=t.hasAttribute("start")?`#at=${t.getAttribute("start")}`:"",f=["?"];let[h,p]=t.getAttribute("target").split("/",2);p||=t.getAttribute("hash");const d=p?`${f.pop()||"&"}h=${p}`:"",m=t.hasOption("autoplay")?`${f.pop()||"&"}autoplay=1`:"",b=t.hasOption("loop")?`${f.pop()||"&"}loop=1`:"",_=t.hasOption("muted")?`${f.pop()||"&"}muted=1`:"";return`<div${i}${n}>${o}
|
|
1591
|
+
<div class="content">
|
|
1592
|
+
<iframe${l}${a} src="${c}//player.vimeo.com/video/${h}${d}${m}${b}${_}${u}" frameborder="0"${t.hasOption("nofullscreen")?"":this._appendBooleanAttr("allowfullscreen",e)}></iframe>
|
|
1593
|
+
</div>
|
|
1594
|
+
</div>`}case"youtube":{let c=t.document.getAttribute("asset-uri-scheme","https");c&&(c=`${c}:`);const u=t.hasOption("related")?1:0,f=t.hasAttribute("start")?`&start=${t.getAttribute("start")}`:"",h=t.hasAttribute("end")?`&end=${t.getAttribute("end")}`:"",p=t.hasOption("autoplay")?"&autoplay=1":"",d=t.hasOption("loop"),m=d?"&loop=1":"",b=t.hasOption("muted")?"&mute=1":"",_=t.hasOption("nocontrols")?"&controls=0":"";let $,E;t.hasOption("nofullscreen")?($="&fs=0",E=""):($="",E=this._appendBooleanAttr("allowfullscreen",e));const k=t.hasOption("modest")?"&modestbranding=1":"",v=t.hasAttribute("theme")?`&theme=${t.getAttribute("theme")}`:"",L=t.hasAttribute("lang")?`&hl=${t.getAttribute("lang")}`:"";let[R,I]=t.getAttribute("target").split("/",2);I||=t.getAttribute("list");let C;if(I)C=`&list=${I}`;else{let W;const D=R.split(",");R=D[0],W=D.length>1?D.slice(1).join(","):null,W||=t.getAttribute("playlist"),W?C=`&playlist=${R},${W}`:C=d?`&playlist=${R}`:""}return`<div${i}${n}>${o}
|
|
1595
|
+
<div class="content">
|
|
1596
|
+
<iframe${l}${a} src="${c}//www.youtube.com/embed/${R}?rel=${u}${f}${h}${p}${m}${b}${_}${C}${$}${k}${v}${L}" frameborder="0"${E}></iframe>
|
|
1597
|
+
</div>
|
|
1598
|
+
</div>`}case"wistia":{let c=t.document.getAttribute("asset-uri-scheme","https");c&&(c=`${c}:`);const u=["?"],f=t.hasAttribute("start")?`${u.pop()||"&"}time=${t.getAttribute("start")}`:"",h=t.hasOption("loop")?`${u.pop()||"&"}endVideoBehavior=loop`:t.hasOption("reset")?`${u.pop()||"&"}endVideoBehavior=reset`:"",p=t.getAttribute("target"),d=t.hasOption("autoplay")?`${u.pop()||"&"}autoPlay=true`:"",m=t.hasOption("muted")?`${u.pop()||"&"}muted=true`:"";return`<div${i}${n}>${o}
|
|
1599
|
+
<div class="content">
|
|
1600
|
+
<iframe${l}${a} src="${c}//fast.wistia.com/embed/iframe/${p}${f}${d}${h}${m}" frameborder="0"${t.hasOption("nofullscreen")?"":this._appendBooleanAttr("allowfullscreen",e)} class="wistia_embed" name="wistia_embed"></iframe>
|
|
1601
|
+
</div>
|
|
1602
|
+
</div>`}default:{const c=t.getAttribute("poster"),u=c?` poster="${t.mediaUri(c)}"`:"",f=t.getAttribute("preload"),h=f?` preload="${f}"`:"",p=t.getAttribute("start"),d=t.getAttribute("end"),m=p||d?`#t=${p||""}${d?`,${d}`:""}`:"";return`<div${i}${n}>${o}
|
|
1603
|
+
<div class="content">
|
|
1604
|
+
<video src="${t.mediaUri(t.getAttribute("target"))}${m}"${l}${a}${u}${t.hasOption("autoplay")?this._appendBooleanAttr("autoplay",e):""}${t.hasOption("muted")?this._appendBooleanAttr("muted",e):""}${t.hasOption("nocontrols")?"":this._appendBooleanAttr("controls",e)}${t.hasOption("loop")?this._appendBooleanAttr("loop",e):""}${h}>
|
|
1605
|
+
Your browser does not support the video tag.
|
|
1606
|
+
</video>
|
|
1607
|
+
</div>
|
|
1608
|
+
</div>`}}}async convert_inline_anchor(t){switch(t.type){case"xref":{let e,i;if(t.attributes.path)e=this._appendLinkConstraintAttrs(t,t.role?[` class="${t.role}"`]:[]).join(""),i=t.text||t.attributes.path;else if(e=t.role?` class="${t.role}"`:"",!(i=t.text)){const s=this._refs??=t.document.catalog.refs,n=t.attributes.refid;let o;const l=s[n]??(n?null:o=this._getRootDocument(t));if(l instanceof Ie){const a=this._resolvingXrefs??=new Set;if(a.has(n))i=o?"[^top]":`[${n}]`;else{a.add(n);const c=await l.xreftext(t.getAttribute("xrefstyle",null,!0));a.delete(n),c?i=c.includes("<a")?c.replace(new RegExp(Do.source,"g"),""):c:i=o?"[^top]":`[${n}]`}}else i=`[${n}]`}return`<a href="${t.target}"${e}>${i}</a>`}case"ref":return`<a id="${t.id}"></a>`;case"link":{const e=t.id?[` id="${t.id}"`]:[];return t.role&&e.push(` class="${t.role}"`),t.hasAttribute("title")&&e.push(` title="${t.getAttribute("title")}"`),`<a href="${t.target}"${this._appendLinkConstraintAttrs(t,e).join("")}>${t.text??""}</a>`}case"bibref":return`<a id="${t.id}"></a>[${t.reftext||t.id}]`;default:return this.logger.warn(`unknown anchor type: ${t.type}`),null}}async convert_inline_break(t){return`${t.text}<br${this._voidSlash}>`}async convert_inline_button(t){return`<b class="button">${t.text}</b>`}async convert_inline_callout(t){if(t.document.hasAttribute("icons","font"))return`<i class="conum" data-value="${t.text}"></i><b>(${t.text})</b>`;if(t.document.hasAttribute("icons"))return`<img src="${await t.iconUri(`callouts/${t.text}`)}" alt="${t.text}"${this._voidSlash}>`;const e=t.attributes.guard;return Array.isArray(e)?`<!--<b class="conum">(${t.text})</b>-->`:`${e??""}<b class="conum">(${t.text})</b>`}async convert_inline_footnote(t){const e=t.getAttribute("index");return e?t.type==="xref"?`<sup class="footnoteref">[<a class="footnote" href="#_footnotedef_${e}" title="View footnote.">${e}</a>]</sup>`:`<sup class="footnote"${t.id?` id="_footnote_${t.id}"`:""}>[<a id="_footnoteref_${e}" class="footnote" href="#_footnotedef_${e}" title="View footnote.">${e}</a>]</sup>`:t.type==="xref"?`<sup class="footnoteref red" title="Unresolved footnote reference.">[${t.text}]</sup>`:null}async convert_inline_image(t){const e=t.target,i=t.type||"image";let s,n;if(i==="icon"){const c=t.document.getAttribute("icons");if(c==="font"){let u=`fa fa-${e}`;t.hasAttribute("size")&&(u+=` fa-${t.getAttribute("size")}`),t.hasAttribute("flip")?u+=` fa-flip-${t.getAttribute("flip")}`:t.hasAttribute("rotate")&&(u+=` fa-rotate-${t.getAttribute("rotate")}`);const f=t.hasAttribute("title")?` title="${t.getAttribute("title")}"`:"";s=`<i class="${u}"${f}></i>`}else if(c!=null){let u=t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:"";t.hasAttribute("height")&&(u+=` height="${t.getAttribute("height")}"`),t.hasAttribute("title")&&(u+=` title="${t.getAttribute("title")}"`),s=`<img src="${await t.iconUri(e)}" alt="${this._encodeAttrValue(t.getAlt())}"${u}${this._voidSlash}>`}else s=`[${t.getAlt()}]`}else{let c=t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:"";if(t.hasAttribute("height")&&(c+=` height="${t.getAttribute("height")}"`),t.hasAttribute("title")&&(c+=` title="${t.getAttribute("title")}"`),(t.hasAttribute("format","svg")||e.includes(".svg")||e.startsWith("data:image/svg+xml"))&&t.document.safe<at.SECURE)if(t.hasOption("inline"))s=await this.readSvgContents(t,e)||`<span class="alt">${t.getAlt()}</span>`;else if(t.hasOption("interactive")){const u=t.hasAttribute("fallback")?`<img src="${await t.imageUri(t.getAttribute("fallback"))}" alt="${this._encodeAttrValue(t.getAlt())}"${c}${this._voidSlash}>`:`<span class="alt">${t.getAlt()}</span>`;n=await t.imageUri(e),s=`<object type="image/svg+xml" data="${n}"${c}>${u}</object>`}else n=await t.imageUri(e),s=`<img src="${n}" alt="${this._encodeAttrValue(t.getAlt())}"${c}${this._voidSlash}>`;else n=await t.imageUri(e),s=`<img src="${n}" alt="${this._encodeAttrValue(t.getAlt())}"${c}${this._voidSlash}>`}if(t.hasAttribute("link")){let c=t.getAttribute("link");c==="self"&&(c=n),c&&(s=`<a class="image" href="${c}"${this._appendLinkConstraintAttrs(t).join("")}>${s}</a>`)}const o=t.id?` id="${t.id}"`:"";let l=i;const a=t.role;return a?l=t.hasAttribute("float")?`${l} ${t.getAttribute("float")} ${a}`:`${l} ${a}`:t.hasAttribute("float")&&(l=`${l} ${t.getAttribute("float")}`),`<span${o} class="${l}">${s}</span>`}async convert_inline_indexterm(t){return t.type==="visible"?t.text:""}async convert_inline_kbd(t){const e=t.getAttribute("keys");return e.length===1?`<kbd>${e[0]}</kbd>`:`<span class="keyseq"><kbd>${e.join("</kbd>+<kbd>")}</kbd></span>`}async convert_inline_menu(t){const e=t.document.hasAttribute("icons","font")?' <i class="fa fa-angle-right caret"></i> ':' <b class="caret">›</b> ',i=`</b>${e}<b class="submenu">`,s=t.getAttribute("menu"),n=t.getAttribute("submenus");if(!n||n.length===0){const o=t.getAttribute("menuitem");return o?`<span class="menuseq"><b class="menu">${s}</b>${e}<b class="menuitem">${o}</b></span>`:`<b class="menuref">${s}</b>`}return`<span class="menuseq"><b class="menu">${s}</b>${e}<b class="submenu">${n.join(i)}</b>${e}<b class="menuitem">${t.getAttribute("menuitem")}</b></span>`}async convert_inline_quoted(t){const[e,i,s]=Rf[t.type]??If;if(t.id){const n=t.role?` class="${t.role}"`:"";return s?`${e.slice(0,-1)} id="${t.id}"${n}>${t.text}${i}`:`<span id="${t.id}"${n}>${e}${t.text}${i}</span>`}return t.role?s?`${e.slice(0,-1)} class="${t.role}">${t.text}${i}`:`<span class="${t.role}">${e}${t.text}${i}</span>`:`${e}${t.text}${i}`}async readSvgContents(t,e){let i=e.startsWith("data:")?this._decodeDataUri(e):await t.readContents(e,{start:t.document.getAttribute("imagesdir"),normalize:!0,label:"SVG",warnIfEmpty:!0});if(!i)return null;i.startsWith("<svg")||(i=i.replace(Tf,"")),i=i.replace(/^(<svg\b[^<>]*?)(\s*<[^/!])/s,(l,a,c)=>`${a.trimEnd()}>${c}`);let s=null,n=null,o=null;for(const l of["width","height"])if(t.hasAttribute(l)){if(!n){if(o===null&&(o=i.match(Lf)||!1),!o)continue;s=o[0],n=s.replace(new RegExp(Ef.source,"g"),"")}n=`${n.slice(0,-1)} ${l}="${t.getAttribute(l)}">`}return n&&(i=`${n}${i.slice(s.length)}`),i}_decodeDataUri(t){const e=t.indexOf(",");if(e===-1)return null;const i=t.slice(5,e),s=t.slice(e+1);if(/;base64\b/i.test(i)){const n=Uint8Array.from(atob(s),o=>o.charCodeAt(0));return new TextDecoder("utf-8").decode(n)}return decodeURIComponent(s)}_appendBooleanAttr(t,e){return e?` ${t}="${t}"`:` ${t}`}_appendLinkConstraintAttrs(t,e=[]){const i=t.hasOption("nofollow")?"nofollow":null,s=t.attributes.window;return s?(e.push(` target="${s}"`),(s==="_blank"||t.hasOption("noopener"))&&e.push(i?` rel="${i} noopener"`:' rel="noopener"')):i&&e.push(` rel="${i}"`),e}_encodeAttrValue(t){return t.includes('"')?t.replace(/"/g,"""):t}_generateMannameSection(t){let e=t.getAttribute("manname-title","Name");const i=t.sections();if(i.length>0){const o=i[0].title;o===o.toUpperCase()&&(e=e.toUpperCase())}const s=t.getAttribute("manname-id");return`<h2${s?` id="${s}"`:""}>${e}</h2>
|
|
1609
|
+
<div class="sectionbody">
|
|
1610
|
+
<p>${t.getAttribute("mannames").join(", ")} - ${t.getAttribute("manpurpose")}</p>
|
|
1611
|
+
</div>`}_getRootDocument(t){for(;(t=t.document).isNested();)t=t.parentDocument;return t}}rs.registerFor("html5");const Of=Object.freeze({__proto__:null,default:rs});async function Cf(r){try{const t=await fetch(r);return t.ok?t.text():null}catch{return null}}const Df=Object.freeze({__proto__:null,readBrowserAsset:Cf});class Mf{constructor(t,...e){let i={};e.length>0&&e[e.length-1]!==null&&typeof e[e.length-1]=="object"&&!e[e.length-1].convert&&(i=e.pop()),this.backend=t,this.converters=e,Bn(this);for(const s of this.converters)typeof s.composed=="function"&&s.composed(this);i.backendTraitsSource&&this.initBackendTraits(i.backendTraitsSource.backendInfo()),this._converterCache=new Map}convert(t,e=null,i=null){const s=e??t.nodeName;return this.converterFor(s).convert(t,s,i)}converterFor(t){if(this._converterCache.has(t))return this._converterCache.get(t);const e=this._findConverter(t);return this._converterCache.set(t,e),e}_findConverter(t){for(const e of this.converters)if(typeof e.handles=="function"&&e.handles(t))return e;throw new Error(`Could not find a converter to handle transform: ${t}`)}}const xn=Object.freeze({__proto__:null,CompositeConverter:Mf});class Pf{static async create(){throw new Error("TemplateConverter is not supported in browser environments")}}const di=Object.freeze({__proto__:null,TemplateConverter:Pf}),Nf=/<(?:a\b[^>]*|\/a)>/g,zf=/<span id="[^"]*"><\/span>/g,jf=/^(?:<span id="[^"]+"><\/span>)+/,Bf=/ *\\\n(?:\\?\n)*|\n\n+/g,Mo=["january","february","march","april","may","june","july","august","september","october","november","december"];class os extends ns{static create(t="semantic-html5",e={}){return new this(t,e)}constructor(t,e={}){super(t,e);let i;e.htmlsyntax==="xml"?(i="xml",this._xmlMode=!0,this._voidSlash="/"):(i="html",this._xmlMode=!1,this._voidSlash=""),this.initBackendTraits({basebackend:"html",filetype:"html",htmlsyntax:i,outfilesuffix:".html",supportsTemplates:!0})}async convert_document(t){const e=this._voidSlash;let i=t.getAttribute("asset-uri-scheme","https");i&&(i=`${i}:`);const s=`${i}//cdnjs.cloudflare.com/ajax/libs`,n=t.hasAttribute("linkcss"),o=["<!DOCTYPE html>"],l=t.hasAttribute("nolang")?"":` lang="${t.getAttribute("lang","en")}"`;o.push(`<html${this._xmlMode?' xmlns="http://www.w3.org/1999/xhtml"':""}${l}>`),o.push(`<head>
|
|
1612
|
+
<meta charset="${t.getAttribute("encoding","UTF-8")}"${e}>
|
|
1613
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"${e}>`);let a;if((a=t.hasAttribute("reproducible"))||o.push(`<meta name="generator" content="Asciidoctor.js ${t.getAttribute("asciidoctor-version")}"${e}>`),t.hasAttribute("app-name")&&o.push(`<meta name="application-name" content="${t.getAttribute("app-name")}"${e}>`),t.hasAttribute("description")&&o.push(`<meta name="description" content="${t.getAttribute("description")}"${e}>`),t.hasAttribute("keywords")&&o.push(`<meta name="keywords" content="${t.getAttribute("keywords")}"${e}>`),t.hasAttribute("authors")){let k=t.subReplacements(t.getAttribute("authors"));k.includes("<")&&(k=k.replace(Te,"")),o.push(`<meta name="author" content="${k}"${e}>`)}if(t.hasAttribute("copyright")&&o.push(`<meta name="copyright" content="${t.getAttribute("copyright")}"${e}>`),t.hasAttribute("favicon")){let k="favicon"in t.attributes?t.attributes.favicon:"",v;if(!k)k="favicon.ico",v="image/x-icon";else{const L=Le(k,null);v=L&&L!==".ico"?`image/${L.slice(1)}`:"image/x-icon"}o.push(`<link rel="icon" type="${v}" href="${k}"${e}>`)}o.push(`<title>${t.doctitle({sanitize:!0,use_fallback:!0})}</title>`);const c="stylesheet"in t.attributes?t.attributes.stylesheet:null;if(Cn.has(c))n?o.push(`<link rel="stylesheet" href="${t.normalizeWebPath(es.instance.semanticStylesheetName,t.getAttribute("stylesdir"),!1)}"${e}>`):o.push(`<style>
|
|
1614
|
+
${await es.instance.semanticStylesheetData()}
|
|
1615
|
+
</style>`);else if(t.hasAttribute("stylesheet"))if(n)o.push(`<link rel="stylesheet" href="${t.normalizeWebPath(t.getAttribute("stylesheet"),t.getAttribute("stylesdir"))}"${e}>`);else{const k=t.normalizeSystemPath(t.getAttribute("stylesheet"),t.getAttribute("stylesdir")),v=await t.readAsset(k,{warnOnFailure:!0,label:"stylesheet"})??"";o.push(`<style>
|
|
1616
|
+
${v}
|
|
1617
|
+
</style>`)}if(t.hasAttribute("icons","font"))if(t.hasAttribute("iconfont-remote")){const k=t.getAttribute("iconfont-cdn")??`${s}/font-awesome/${sh}/css/all.min.css`;o.push(`<link rel="stylesheet" href="${k}"${e}>`)}else{const k=`${t.getAttribute("iconfont-name","font-awesome")}.css`;o.push(`<link rel="stylesheet" href="${t.normalizeWebPath(k,t.getAttribute("stylesdir"),!1)}"${e}>`)}const u=t.syntaxHighlighter;let f;u&&(f=o.length,o.push(""));const h=await t.docinfo();h&&o.push(h),o.push("</head>");const p=t.id?` id="${t.id}"`:"",d=[t.doctype];t.role&&d.push(t.role),o.push(`<body${p} class="${d.join(" ")}">`);const m=await t.docinfo("header");m&&o.push(m);const b=await this._generateHeader(t);b&&o.push(b),o.push("<main>");const _=this._hasAutoToc(t)?await this._generateToc(t):null;_&&o.push(_),o.push(await t.content());const $=this._generateFootnotes(t);if($&&o.push($),o.push("</main>"),t.isNofooter()||(o.push("<footer>"),t.hasAttribute("revnumber")&&o.push(`<span class="rev-number">${t.getAttribute("version-label")} ${t.getAttribute("revnumber")}</span>`),t.hasAttribute("last-update-label")&&!a&&o.push(`<span class="last-updated">${t.getAttribute("last-update-label")} ${t.getAttribute("docdatetime")}</span>`),o.push("</footer>")),u&&(u.hasDocinfo("head")?o[f]=u.docinfo("head",t,{cdn_base_url:s,linkcss:n,self_closing_tag_slash:e}):o.splice(f,1),u.hasDocinfo("footer")&&o.push(u.docinfo("footer",t,{cdn_base_url:s,linkcss:n,self_closing_tag_slash:e}))),t.hasAttribute("stem")){let k=t.getAttribute("eqnums","none");k||(k="AMS");const v=` equationNumbers: { autoNumber: "${k}" } `;o.push(`<script type="text/x-mathjax-config">
|
|
1618
|
+
MathJax.Hub.Config({
|
|
1619
|
+
messageStyle: "none",
|
|
1620
|
+
tex2jax: {
|
|
1621
|
+
inlineMath: [${JSON.stringify(pn.latexmath)}],
|
|
1622
|
+
displayMath: [${JSON.stringify(Ae.latexmath)}],
|
|
1623
|
+
ignoreClass: "nostem|nolatexmath"
|
|
1624
|
+
},
|
|
1625
|
+
asciimath2jax: {
|
|
1626
|
+
delimiters: [${JSON.stringify(Ae.asciimath)}],
|
|
1627
|
+
ignoreClass: "nostem|noasciimath"
|
|
1628
|
+
},
|
|
1629
|
+
TeX: {${v}}
|
|
1630
|
+
})
|
|
1631
|
+
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
|
|
1632
|
+
MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data, node) {
|
|
1633
|
+
if ((node = data.script.parentNode) && (node = node.parentNode) && node.classList.contains("stem")) {
|
|
1634
|
+
data.math.root.display = "block"
|
|
1635
|
+
}
|
|
1636
|
+
return data
|
|
1637
|
+
})
|
|
1638
|
+
})
|
|
1639
|
+
<\/script>
|
|
1640
|
+
<script src="${s}/mathjax/${da}/MathJax.js?config=TeX-MML-AM_CHTML"><\/script>`)}const E=await t.docinfo("footer");return E&&o.push(E),o.push("</body>"),o.push("</html>"),o.join(S)}async convert_embedded(t){const e=[],i=await this._generateHeader(t);if(i&&e.push(i),this._hasAutoToc(t)){const n=await this._generateToc(t);n&&e.push(n)}e.push(await t.content());const s=this._generateFootnotes(t);return s&&e.push(s),e.join(S)}async convert_section(t){const e=t.document.attributes;let i,s;t.caption?i=t.captionedTitle():(s=this._generateSectionNumbering(t))?i=`${s} ${t.title}`:i=t.title;const n=t.id;if(e.sectlinks!=null){let c;i.startsWith("<span ")&&(c=i.match(jf))?i=`${c[0]}<a class="link" href="#${n}">${i.slice(c[0].length)}</a>`:i=`<a class="link" href="#${n}">${i}</a>`}if(e.sectanchors!=null){const c=`<a class="anchor" rel="bookmark" href="#${n}" aria-label="${this._sanitizeTitle(i)}"></a>`;i=e.sectanchors==="after"?`${i}${c}`:`${c}${i}`}const o=this._commonHtmlAttributes(n,t.role),l=t.level,a=[];return a.push(`<section${o}>`),a.push(`<h${l+1}>${i}</h${l+1}>`),t.hasBlocks()&&a.push(await t.content()),a.push("</section>"),a.join(S)}async convert_paragraph(t){const e=this._commonHtmlAttributes(t.id,t.role);return t.hasTitle()?`<p${e}>
|
|
1641
|
+
<strong class="title">${t.title}</strong>
|
|
1642
|
+
${await t.content()}
|
|
1643
|
+
</p>`:`<p${e}>
|
|
1644
|
+
${await t.content()}
|
|
1645
|
+
</p>`}async convert_listing(t){const e=t.caption?`<span class="label">${t.caption.trimEnd()}</span> `:"",i=t.hasTitle()?`<figcaption>${e}${t.title}</figcaption>
|
|
1646
|
+
`:"",s=this._commonHtmlAttributes(t.id,t.role,"listing"),n=t.hasOption("nowrap")||!t.document.hasAttribute("prewrap");let o;if(t.style==="source"){const l=t.getAttribute("language"),a=t.document.syntaxHighlighter;if(a){let c;if(a.handlesHighlighting()){const u=t.document.attributes;c={css_mode:u[`${a.name}-css`]||"class",style:u[`${a.name}-style`]}}else c={};return c.nowrap=n,`<figure${s}>
|
|
1647
|
+
${i}${await a.format(t,l,c)}
|
|
1648
|
+
</figure>`}o=`<code${l?` data-lang="${l}"`:""}>${await t.content()||""}</code>`}else o=await t.content()||"";return`<figure${s}>
|
|
1649
|
+
${i}<pre${n?' class="no-wrap"':""}>${o}</pre>
|
|
1650
|
+
</figure>`}async convert_thematic_break(t){return`<hr${t.role?` class="${t.role}"`:""}${this._voidSlash}>`}async convert_page_break(t){return`<hr class="page-break"${this._voidSlash}>`}async convert_admonition(t){const e=t.getAttribute("name"),i=this._commonHtmlAttributes(t.id,t.role,`admonition ${e}`),s=t.hasTitle()?`<strong class="title">${t.title}</strong>
|
|
1651
|
+
`:"";let n;return t.document.hasAttribute("icons")?t.document.hasAttribute("icons","font")&&!t.hasAttribute("icon")?n=`<i class="${this._iconPrefix(t.document)} icon-${e}" title="${t.getAttribute("textlabel")}"></i>`:n=`<img class="icon" src="${await t.iconUri(e)}" alt="${t.getAttribute("textlabel")}"${this._voidSlash}>`:n=`<strong class="label">${t.getAttribute("textlabel")}</strong>`,`<aside${i} role="note">
|
|
1652
|
+
${n}
|
|
1653
|
+
${s}${await t.content()}
|
|
1654
|
+
</aside>`}async convert_example(t){if(t.hasOption("collapsible")){const s=this._commonHtmlAttributes(t.id,t.role),n=t.hasTitle()?t.title:"Details";return`<details${s}${t.hasOption("open")?this._boolAttr("open"):""}>
|
|
1655
|
+
<summary>${n}</summary>
|
|
1656
|
+
${await t.content()}
|
|
1657
|
+
</details>`}const e=this._commonHtmlAttributes(t.id,t.role,"example"),i=t.hasTitle()?`<figcaption>${t.captionedTitle()}</figcaption>
|
|
1658
|
+
`:"";return`<figure${e}>
|
|
1659
|
+
${i}${await t.content()}
|
|
1660
|
+
</figure>`}async convert_sidebar(t){const e=this._commonHtmlAttributes(t.id,t.role,"sidebar"),i=t.hasTitle()?`<strong class="title">${t.title}</strong>
|
|
1661
|
+
`:"";return`<aside${e}>
|
|
1662
|
+
${i}${await t.content()}
|
|
1663
|
+
</aside>`}async convert_open(t){const e=t.style;if(e==="abstract"){if(t.getParent()===t.document&&t.document.doctype==="book")return this.logger.warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content."),""}else if(e==="partintro"&&(t.level>0||t.getParent().context!=="section"||t.document.doctype!=="book"))return this.logger.error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."),"";const i=this._commonHtmlAttributes(t.id,t.role,e&&e!=="open"?e:null),s=t.hasTitle()?`<strong class="title">${t.title}</strong>
|
|
1664
|
+
`:"";return`<div${i}>
|
|
1665
|
+
${s}${await t.content()}
|
|
1666
|
+
</div>`}async convert_quote(t){const e=this._generateAttribution(t),i=`<blockquote${t.hasTitle()?"":this._commonHtmlAttributes(t.id,t.role,"quote")}>
|
|
1667
|
+
${await t.content()}${e}
|
|
1668
|
+
</blockquote>`;return t.hasTitle()?`<figure${this._commonHtmlAttributes(t.id,t.role,"quote")}>
|
|
1669
|
+
<figcaption>${t.title}</figcaption>
|
|
1670
|
+
${i}
|
|
1671
|
+
</figure>`:i}async convert_verse(t){const e=this._generateAttribution(t),i=`<blockquote${t.hasTitle()?"":this._commonHtmlAttributes(t.id,t.role,"verse")}>
|
|
1672
|
+
<pre>${await t.content()}</pre>${e}
|
|
1673
|
+
</blockquote>`;return t.hasTitle()?`<figure${this._commonHtmlAttributes(t.id,t.role,"verse")}>
|
|
1674
|
+
<figcaption>${t.title}</figcaption>
|
|
1675
|
+
${i}
|
|
1676
|
+
</figure>`:i}async convert_literal(t){const e=t.hasTitle()?`<figcaption>${t.title}</figcaption>
|
|
1677
|
+
`:"",i=this._commonHtmlAttributes(t.id,t.role,"literal"),s=!t.document.hasAttribute("prewrap")||t.hasOption("nowrap");return`<figure${i}>
|
|
1678
|
+
${e}<pre${s?' class="no-wrap"':""}>${await t.content()}</pre>
|
|
1679
|
+
</figure>`}async convert_stem(t){const e=t.hasTitle()?`<figcaption>${t.title}</figcaption>
|
|
1680
|
+
`:"",i=this._commonHtmlAttributes(t.id,t.role,"stem"),s=t.style,[n,o]=Ae[s]??["",""];let l=await t.content()??"";if(l){if(s==="asciimath"&&l.includes(S)){const a=`${S}<br${this._voidSlash}>`;l=l.replace(Bf,c=>{const u=(c.match(/\n/g)||[]).length,f=c[0]===`
|
|
1681
|
+
`?u:u-1;return`${o}${a.repeat(f)}${S}${n}`})}(!l.startsWith(n)||!l.endsWith(o))&&(l=`${n}${l}${o}`)}return`<figure${i}>
|
|
1682
|
+
${e}${l}
|
|
1683
|
+
</figure>`}async convert_pass(t){return this.contentOnly(t)}async convert_preamble(t){const e=t.document;let i="";return e.hasAttribute("toc-placement","preamble")&&e.hasSections()&&e.hasAttribute("toc")&&(i=`
|
|
1684
|
+
${await this._generateToc(e)}`),`${await t.content()}${i}`}async convert_floating_title(t){const e=`h${t.level+1}`,i=this._commonHtmlAttributes(t.id,t.role,t.style);return`<${e}${i}>${t.title}</${e}>`}async convert_ulist(t){const e=[],i=t.hasOption("checklist"),s=i?"checklist":t.style,n=t.hasTitle()?this._commonHtmlAttributes(null,null,s):this._commonHtmlAttributes(t.id,t.role,s);let o="",l="";if(i)if(t.hasOption("interactive"))this._xmlMode?(o='<input type="checkbox" data-item-complete="1" checked="checked"/> ',l='<input type="checkbox" data-item-complete="0"/> '):(o='<input type="checkbox" data-item-complete="1" checked> ',l='<input type="checkbox" data-item-complete="0"> ');else if(t.document.hasAttribute("icons","font")){const a=this._iconPrefix(t.document);o=`<i class="${a} checked"></i> `,l=`<i class="${a} unchecked"></i> `}else o="✓ ",l="❏ ";e.push(`<ul${n}>`);for(const a of t.getItems())e.push(`<li${this._commonHtmlAttributes(a.id,a.role)}>`),i&&a.hasAttribute("checkbox")?e.push(`<p>${a.hasAttribute("checked")?o:l}${a.getText()}</p>`):e.push(`<p>${a.getText()}</p>`),a.hasBlocks()&&e.push(await a.content()),e.push("</li>");return e.push("</ul>"),this._wrapInFigureWithTitle(t,e.join(S))}async convert_olist(t){const e=[],i=t.hasTitle()?this._commonHtmlAttributes(null,null,t.style):this._commonHtmlAttributes(t.id,t.role,t.style),s=t.listMarkerKeyword(),n=s?` type="${s}"`:"",o=t.hasAttribute("start")?` start="${t.getAttribute("start")}"`:"",l=t.hasOption("reversed")?this._boolAttr("reversed"):"";e.push(`<ol${i}${n}${o}${l}>`);for(const a of t.getItems())e.push(`<li${this._commonHtmlAttributes(a.id,a.role)}>`),e.push(`<p>${a.getText()}</p>`),a.hasBlocks()&&e.push(await a.content()),e.push("</li>");return e.push("</ol>"),this._wrapInFigureWithTitle(t,e.join(S))}async convert_dlist(t){const e=[],i=t.style,s=t.hasTitle()?this._commonHtmlAttributes(null,null,i):this._commonHtmlAttributes(t.id,t.role,i);e.push(`<dl${s}>`);for(const[n,o]of t.getItems()){for(const l of n)e.push(`<dt>${l.getText()}</dt>`);o&&(e.push("<dd>"),o.hasText()&&e.push(`<p>${o.getText()}</p>`),o.hasBlocks()&&e.push(await o.content()),e.push("</dd>"))}return e.push("</dl>"),this._wrapInFigureWithTitle(t,e.join(S))}async convert_colist(t){const e=[],i=t.hasTitle()?this._commonHtmlAttributes(null,null,"callout-list"):this._commonHtmlAttributes(t.id,t.role,"callout-list");e.push(`<ol${i}>`);const s=t.document.hasAttribute("icons")&&!t.document.hasAttribute("icons","font");let n=0;for(const o of t.getItems()){n++;let l="";s&&(l=`<img src="${await t.iconUri(`callouts/${n}`)}" alt="${n}"${this._voidSlash}> `),e.push(`<li>
|
|
1685
|
+
<p>${l}${o.getText()}</p>${o.hasBlocks()?S+await o.content():""}
|
|
1686
|
+
</li>`)}return e.push("</ol>"),this._wrapInFigureWithTitle(t,e.join(S))}async convert_table(t){const e=[];let i=t.getAttribute("frame","all","table-frame");i==="topbot"&&(i="ends");const s=[`frame-${i}`,`grid-${t.getAttribute("grid","all","table-grid")}`],n=t.getAttribute("stripes",null,"table-stripes");n&&s.push(`stripes-${n}`);let o="";const l=t.hasOption("autowidth");if(l&&!t.hasAttribute("width"))s.push("fit-content");else{const c=t.getAttribute("tablepcwidth");Number(c)===100?s.push("stretch"):o=` style="width: ${c}%;"`}t.hasAttribute("float")&&s.push(t.getAttribute("float")),t.role&&s.push(t.role);const a=t.id?` id="${t.id}"`:"";if(e.push(`<table${a} class="${s.join(" ")}"${o}>`),t.hasTitle()&&e.push(`<caption>${t.captionedTitle()}</caption>`),t.getAttribute("rowcount")>0){if(e.push("<colgroup>"),l)for(let c=0;c<t.columns.length;c++)e.push(`<col${this._voidSlash}>`);else for(const c of t.columns)e.push(c.hasOption("autowidth")?`<col${this._voidSlash}>`:`<col style="width: ${c.getAttribute("colpcwidth")}%;"${this._voidSlash}>`);e.push("</colgroup>");for(const[c,u]of t.rows.bySection())if(u.length!==0){e.push(`<t${c}>`);for(const f of u){e.push("<tr>");for(const h of f){let p;if(c==="head")p=h.text;else switch(h.style){case"asciidoc":p=await h.content();break;case"literal":p=`<pre>${h.text}</pre>`;break;default:{const R=await h.content();p=R.length===0?"":`<p>${R.join(`</p>
|
|
1687
|
+
<p>`)}</p>`}}const d=c==="head"||h.style==="header"?"th":"td",m=[],b=h.getAttribute("halign");b!=="left"&&m.push(`halign-${b}`);const _=h.getAttribute("valign");_!=="top"&&m.push(`valign-${_}`);const $=m.length?` class="${m.join(" ")}"`:"",E=h.colspan?` colspan="${h.colspan}"`:"",k=h.rowspan?` rowspan="${h.rowspan}"`:"",v="_cellbgcolor"in h?h._cellbgcolor:t.document.attributes.cellbgcolor,L=v?` style="background-color: ${v};"`:"";e.push(`<${d}${$}${E}${k}${L}>${p}</${d}>`)}e.push("</tr>")}e.push(`</t${c}>`)}}return e.push("</table>"),e.join(S)}async convert_toc(t){const e=t.document;if(!e.hasAttribute("toc-placement","macro")||!e.hasSections()||!e.hasAttribute("toc"))return"<!-- toc disabled -->";const i=t.hasAttribute("levels")?parseInt(t.getAttribute("levels"),10):null;return this._generateToc(e,{id:t.id,title:t.hasTitle()?t.title:null,role:t.hasRoleAttribute()?t.role:null,toclevels:i})}async convert_outline(t,e={}){if(!t.hasSections())return null;const i=t.sections(),s=t.context==="document"&&t.isMultipart(),n=s?0:i[0].level,o=e.sectnumlevels??parseInt(t.document.attributes.sectnumlevels||3,10);let l=e.toclevels??null;if(l==null){const c=t.document.attributes.toclevels;c?(l=parseInt(c,10),l<1&&!s&&(l=1)):l=2}const a=[`<ol class="sect-level-${n}">`];for(const c of i){const u=c.level,f=c.hasAttribute("toclevels")?parseInt(c.getAttribute("toclevels"),10):l;if(u>f)continue;let h;if(c.caption)h=c.captionedTitle();else if(c.numbered&&u<=o)if(u<2&&t.document.doctype==="book"){const p=c.sectname;if(p==="chapter"){const d=t.document.attributes["chapter-signifier"];h=`${d?`${d} `:""}${c.sectnum()} ${c.title}`}else if(p==="part"){const d=t.document.attributes["part-signifier"];h=`${d?`${d} `:""}${c.sectnum(null,":")} ${c.title}`}else h=`${c.sectnum()} ${c.title}`}else h=`${c.sectnum()} ${c.title}`;else h=c.title;if(h?.includes("<")&&(h=this._dropAnchors(h)),u<f){const p=await this.convert_outline(c,{toclevels:f,sectnumlevels:o});if(p){a.push(`<li><a href="#${c.id}">${h}</a>`),a.push(p),a.push("</li>");continue}}a.push(`<li><a href="#${c.id}">${h}</a></li>`)}return a.push("</ol>"),a.join(S)}async convert_video(t){const e=[];t.role&&e.push(t.role),t.hasAttribute("align")&&e.push(`text-${t.getAttribute("align")}`),t.hasAttribute("float")&&e.push(t.getAttribute("float"));const i=t.hasTitle()?"":this._commonHtmlAttributes(t.id,e.join(" ")||null),s=t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:"",n=t.hasAttribute("height")?` height="${t.getAttribute("height")}"`:"";let o;switch(t.getAttribute("poster")){case"vimeo":{let l=t.document.getAttribute("asset-uri-scheme","https");l&&(l=`${l}:`);const a=t.hasAttribute("start")?`#at=${t.getAttribute("start")}`:"",c=["?"];let[u,f]=t.getAttribute("target").split("/",2);f||=t.getAttribute("hash");const h=f?`${c.pop()||"&"}h=${f}`:"",p=t.hasOption("autoplay")?`${c.pop()||"&"}autoplay=1`:"",d=t.hasOption("loop")?`${c.pop()||"&"}loop=1`:"",m=t.hasOption("muted")?`${c.pop()||"&"}muted=1`:"";o=`<iframe${i}${s}${n} src="${l}//player.vimeo.com/video/${u}${h}${p}${d}${m}${a}" frameborder="0"${t.hasOption("nofullscreen")?"":this._boolAttr("allowfullscreen")}></iframe>`;break}case"youtube":{let l=t.document.getAttribute("asset-uri-scheme","https");l&&(l=`${l}:`);const a=t.hasOption("related")?1:0,c=t.hasAttribute("start")?`&start=${t.getAttribute("start")}`:"",u=t.hasAttribute("end")?`&end=${t.getAttribute("end")}`:"",f=t.hasOption("autoplay")?"&autoplay=1":"",h=t.hasOption("loop"),p=h?"&loop=1":"",d=t.hasOption("muted")?"&mute=1":"",m=t.hasOption("nocontrols")?"&controls=0":"";let b,_;t.hasOption("nofullscreen")?(b="&fs=0",_=""):(b="",_=this._boolAttr("allowfullscreen"));const $=t.hasOption("modest")?"&modestbranding=1":"",E=t.hasAttribute("theme")?`&theme=${t.getAttribute("theme")}`:"",k=t.hasAttribute("lang")?`&hl=${t.getAttribute("lang")}`:"";let[v,L]=t.getAttribute("target").split("/",2);L||=t.getAttribute("list");let R;if(L)R=`&list=${L}`;else{const I=v.split(",");v=I[0];let C=I.length>1?I.slice(1).join(","):null;C||=t.getAttribute("playlist"),C?R=`&playlist=${v},${C}`:R=h?`&playlist=${v}`:""}o=`<iframe${i}${s}${n} src="${l}//www.youtube.com/embed/${v}?rel=${a}${c}${u}${f}${p}${d}${m}${R}${b}${$}${E}${k}" frameborder="0"${_}></iframe>`;break}default:{const l=t.getAttribute("poster"),a=l?` poster="${t.mediaUri(l)}"`:"",c=t.getAttribute("preload"),u=c?` preload="${c}"`:"",f=t.getAttribute("start"),h=t.getAttribute("end"),p=f||h?`#t=${f||""}${h?`,${h}`:""}`:"";o=`<video${i} src="${t.mediaUri(t.getAttribute("target"))}${p}"${s}${n}${a}${t.hasOption("autoplay")?this._boolAttr("autoplay"):""}${t.hasOption("muted")?this._boolAttr("muted"):""}${t.hasOption("nocontrols")?"":this._boolAttr("controls")}${t.hasOption("loop")?this._boolAttr("loop"):""}${u}>
|
|
1688
|
+
Your browser does not support the video tag.
|
|
1689
|
+
</video>`}}return t.hasTitle()?`<figure${this._commonHtmlAttributes(t.id,e.join(" ")||null)}>
|
|
1690
|
+
${o}
|
|
1691
|
+
<figcaption>${t.captionedTitle()}</figcaption>
|
|
1692
|
+
</figure>`:o}async convert_audio(t){const e=t.hasTitle()?"":this._commonHtmlAttributes(t.id,t.role),i=t.getAttribute("start"),s=t.getAttribute("end"),n=i||s?`#t=${i||""}${s?`,${s}`:""}`:"",o=`<audio${e} src="${t.mediaUri(t.getAttribute("target"))}${n}"${t.hasOption("autoplay")?this._boolAttr("autoplay"):""}${t.hasOption("nocontrols")?"":this._boolAttr("controls")}${t.hasOption("loop")?this._boolAttr("loop"):""}>
|
|
1693
|
+
Your browser does not support the audio tag.
|
|
1694
|
+
</audio>`;return t.hasTitle()?`<figure${this._commonHtmlAttributes(t.id,t.role)}>
|
|
1695
|
+
${o}
|
|
1696
|
+
<figcaption>${t.captionedTitle()}</figcaption>
|
|
1697
|
+
</figure>`:o}async convert_image(t){const e=[];t.role&&e.push(t.role),t.hasAttribute("align")&&e.push(`text-${t.getAttribute("align")}`),t.hasAttribute("float")&&e.push(t.getAttribute("float"));const i=e.join(" "),s=this._commonHtmlAttributes(t.id,i||null),n=this._voidSlash,o=`${t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:""}${t.hasAttribute("height")?` height="${t.getAttribute("height")}"`:""}`,l=t.getAttribute("target"),a=t.hasTitle()?o:`${s}${o}`;let c,u;if((t.hasAttribute("format","svg")||l.includes(".svg")||l.startsWith("data:image/svg+xml"))&&t.document.safe<at.SECURE)if(t.hasOption("inline"))c=await this.readSvgContents(t,l)||`<span class="alt">${t.alt()}</span>`;else if(t.hasOption("interactive")){const f=t.hasAttribute("fallback")?`<img src="${await t.imageUri(t.getAttribute("fallback"))}" alt="${this._encodeAttributeValue(t.alt())}"${o}${n}>`:`<span class="alt">${t.alt()}</span>`;u=await t.imageUri(l),c=`<object type="image/svg+xml" data="${u}"${a}>${f}</object>`}else u=await t.imageUri(l),c=`<img src="${u}" alt="${this._encodeAttributeValue(t.alt())}"${a}${n}>`;else u=await t.imageUri(l),c=`<img src="${u}" alt="${this._encodeAttributeValue(t.alt())}"${a}${n}>`;if(t.hasAttribute("link")){let f=t.getAttribute("link");f==="self"&&(f=u),f&&(c=`<a href="${f}"${this._appendLinkConstraintAttrs(t).join("")}>${c}</a>`)}return t.hasTitle()?`<figure${s}>
|
|
1698
|
+
${c}
|
|
1699
|
+
<figcaption>${t.captionedTitle()}</figcaption>
|
|
1700
|
+
</figure>`:c}async convert_inline_image(t){const e=[];t.role&&e.push(t.role),t.hasAttribute("align")&&e.push(`text-${t.getAttribute("align")}`),t.hasAttribute("float")&&e.push(t.getAttribute("float"));const i=e.join(" "),s=this._commonHtmlAttributes(t.id,i||null),n=this._voidSlash,o=`${t.hasAttribute("width")?` width="${t.getAttribute("width")}"`:""}${t.hasAttribute("height")?` height="${t.getAttribute("height")}"`:""}`,l=t.hasAttribute("title")?` title="${t.getAttribute("title")}"`:"",a=t.target;let c,u;if((t.type||"image")==="icon"){const f=t.document.getAttribute("icons");let h=a,p=null;const d=h.lastIndexOf("@");d>0&&(p=h.slice(d+1),h=h.slice(0,d));let m=t.alt;if(p&&m===a&&(m=h),f==="font"){const b=this._iconPrefix(t.document);let $=`${this._iconSet(t,p,b)} ${b}-${h}`;t.hasAttribute("size")&&($+=` ${b}-${t.getAttribute("size")}`),t.hasAttribute("flip")?$+=` ${b}-flip-${t.getAttribute("flip")}`:t.hasAttribute("rotate")&&($+=` ${b}-rotate-${t.getAttribute("rotate")}`),i&&($+=` ${i}`),c=`<i${t.id?` id="${t.id}"`:""} class="${$}"${l}></i>`}else f!=null?(u=await t.iconUri(h),c=`<img src="${u}" alt="${this._encodeAttributeValue(m)}"${l}${s}${o}${n}>`):c=`[${m}]`}else if((t.hasAttribute("format","svg")||a.includes(".svg")||a.startsWith("data:image/svg+xml"))&&t.document.safe<at.SECURE)if(t.hasOption("inline"))c=await this.readSvgContents(t,a)||`<span class="alt">${t.alt}</span>`;else if(t.hasOption("interactive")){const f=t.hasAttribute("fallback")?`<img src="${await t.imageUri(t.getAttribute("fallback"))}" alt="${this._encodeAttributeValue(t.alt)}"${o}${n}>`:`<span class="alt">${t.alt}</span>`;u=await t.imageUri(a),c=`<object type="image/svg+xml" data="${u}"${l}${s}${o}>${f}</object>`}else u=await t.imageUri(a),c=`<img src="${u}" alt="${this._encodeAttributeValue(t.alt)}"${l}${s}${o}${n}>`;else u=await t.imageUri(a),c=`<img src="${u}" alt="${this._encodeAttributeValue(t.alt)}"${l}${s}${o}${n}>`;if(t.hasAttribute("link")){let f=t.getAttribute("link");f==="self"&&(f=u),f&&(c=`<a href="${f}"${this._appendLinkConstraintAttrs(t).join("")}>${c}</a>`)}return c}async convert_inline_anchor(t){switch(t.type){case"link":{const e=t.id?[` id="${t.id}"`]:[];return t.role&&e.push(` class="${t.role}"`),t.hasAttribute("title")&&e.push(` title="${t.getAttribute("title")}"`),`<a href="${t.target}"${this._appendLinkConstraintAttrs(t,e).join("")}>${t.text??""}</a>`}case"xref":{let e,i;if(t.attributes.path)e=this._appendLinkConstraintAttrs(t,t.role?[` class="${t.role}"`]:[]).join(""),i=t.text||t.attributes.path;else if(e=t.role?` class="${t.role}"`:"",!(i=t.text)){const s=this._refs??=t.document.catalog.refs,n=t.attributes.refid;let o;const l=s[n]??(n?null:o=this._getRootDocument(t));if(l instanceof Ie){const a=this._resolvingXrefs??=new Set;if(a.has(n))i=o?"[^top]":`[${n}]`;else{a.add(n);const c=await l.xreftext(t.getAttribute("xrefstyle",null,!0));a.delete(n),c?i=c.includes("<")?this._dropAnchors(c):c:i=o?"[^top]":`[${n}]`}}else i=`[${n}]`}return`<a href="${t.target}"${e}>${i}</a>`}case"ref":return`<span id="${t.id}"></span>`;case"bibref":return`<span id="${t.id}"></span>[${t.reftext||t.id}]`;default:return this.logger.warn(`unknown anchor type: ${t.type}`),null}}async convert_inline_callout(t){return t.document.hasAttribute("icons")&&!t.document.hasAttribute("icons","font")?`<img src="${await t.iconUri(`callouts/${t.text}`)}" alt="${t.text}"${this._voidSlash}>`:`<i class="callout-num" data-value="${t.text}"></i><b>(${t.text})</b>`}async convert_inline_footnote(t){const e=t.getAttribute("index");return e?t.type==="xref"?`<sup class="footnote-ref"><a class="footnote" href="#_footnotedef_${e}" title="View footnote." role="doc-noteref">${e}</a></sup>`:`<sup class="footnote-ref"${t.id?` id="_footnote_${t.id}"`:""}><a id="_footnoteref_${e}" class="footnote" href="#_footnotedef_${e}" title="View footnote." role="doc-noteref">${e}</a></sup>`:t.type==="xref"?`<sup class="footnote-ref red" title="Unresolved footnote reference.">[${t.text}]</sup>`:null}async convert_inline_indexterm(t){return t.type==="visible"?t.text:""}async convert_inline_kbd(t){const e=t.getAttribute("keys");return e.length===1?`<kbd>${e[0]}</kbd>`:`<span class="key-seq"><kbd>${e.join("</kbd>+<kbd>")}</kbd></span>`}async convert_inline_quoted(t){let e=this._commonHtmlAttributes(t.id,t.role);switch(t.type){case"strong":return`<strong${e}>${t.text}</strong>`;case"emphasis":return`<em${e}>${t.text}</em>`;case"monospaced":return`<code${e}>${t.text}</code>`;case"mark":return`<mark${e}>${t.text}</mark>`;case"superscript":return`<sup${e}>${t.text}</sup>`;case"subscript":return`<sub${e}>${t.text}</sub>`;case"single":return e=this._commonHtmlAttributes(t.id,t.role,"single-quote"),`<span${e}>‘${t.text}’</span>`;case"double":return e=this._commonHtmlAttributes(t.id,t.role,"double-quote"),`<span${e}>“${t.text}”</span>`;case"asciimath":case"latexmath":{const[i,s]=pn[t.type];return`${i}${t.text}${s}`}default:return`<span${e}>${t.text}</span>`}}async convert_inline_break(t){return`${t.text}<br${this._voidSlash}>`}async convert_inline_button(t){return`<span class="button">${t.text}</span>`}async convert_inline_menu(t){const e=' <b class="caret">›</b> ',i=`</b>${e}<b class="submenu">`,s=t.getAttribute("menu"),n=t.getAttribute("submenus");if(n.length===0){const o=t.getAttribute("menuitem");return o?`<span class="menu-seq"><b class="menu">${s}</b>${e}<b class="menu-item">${o}</b></span>`:`<span class="menu-seq"><b class="menu">${s}</b></span>`}return`<span class="menu-seq"><b class="menu">${s}</b>${e}<b class="submenu">${n.join(i)}</b>${e}<b class="menu-item">${t.getAttribute("menuitem")}</b></span>`}_generateSectionNumbering(t){const e=t.level,i=t.document.attributes;if(!(t.numbered&&e<=parseInt(i.sectnumlevels||3,10)))return null;if(e<2&&t.document.doctype==="book"){let s;switch(t.sectname){case"chapter":return s=i["chapter-signifier"],`${s?`${s} `:""}<span class="sect-num">${t.sectnum()}</span>`;case"part":return s=i["part-signifier"],`${s?`${s} `:""}<span class="sect-num">${t.sectnum(null,":")}</span>`;default:return`<span class="sect-num">${t.sectnum()}</span>`}}return`<span class="sect-num">${t.sectnum()}</span>`}async _generateHeader(t){if(!(t.hasHeader()&&!t.isNoheader()))return null;const e=[this._generateDocumentTitle(t),await this._generateAuthors(t),this._generateRevision(t)].filter(Boolean);return e.length===0?null:["<header>",...e,"</header>"].join(S)}_generateDocumentTitle(t){if(t.isNotitle())return null;const e=t.doctitle({partition:!0,sanitize:!0});return`<h1${this._commonHtmlAttributes(t.id,t.role)}>${e.main}${e.hasSubtitle()?` <small class="subtitle">${e.subtitle}</small>`:""}</h1>`}async _generateAuthors(t){const e=t.authors();if(e.length===0)return null;if(e.length===1)return`<p class="byline">
|
|
1701
|
+
${await this._formatAuthor(t,e[0])}
|
|
1702
|
+
</p>`;const i=['<ul class="byline">'];for(const s of e)i.push(`<li>${await this._formatAuthor(t,s)}</li>`);return i.push("</ul>"),i.join(S)}_generateRevision(t){if(!(t.hasAttribute("revnumber")||t.hasAttribute("revdate")||t.hasAttribute("revremark")))return null;let e="";const i=t.getAttribute("revdate");if(i){const s=this._parseRevdate(i);e=s.length?`<time datetime="${s.join("-")}">${i}</time>`:i}return`<table class="revision">
|
|
1703
|
+
<thead>
|
|
1704
|
+
<tr>
|
|
1705
|
+
<th>Version</th>
|
|
1706
|
+
<th>Date</th>
|
|
1707
|
+
<th>Remark</th>
|
|
1708
|
+
</tr>
|
|
1709
|
+
</thead>
|
|
1710
|
+
<tbody>
|
|
1711
|
+
<tr>
|
|
1712
|
+
<td data-title="${t.getAttribute("version-label")??""}">${t.getAttribute("revnumber")??""}</td>
|
|
1713
|
+
<td data-title="Date">${e}</td>
|
|
1714
|
+
<td data-title="Remark">${t.getAttribute("revremark")??""}</td>
|
|
1715
|
+
</tr>
|
|
1716
|
+
</tbody>
|
|
1717
|
+
</table>`}async _formatAuthor(t,e){return this._inContext("author",async()=>{const i=e.email?` ${await t.subMacros(e.email)}`:"";return`<span class="author">${t.subReplacements(e.name)}${i}</span>`})}async _inContext(t,e){(this._convertContext??=[]).push(t);const i=await e();return this._convertContext.pop(),i}_wrapInFigureWithTitle(t,e){return t.hasTitle()?`<figure${this._commonHtmlAttributes(t.id,t.role)}>
|
|
1718
|
+
<figcaption>${t.title}</figcaption>
|
|
1719
|
+
${e}
|
|
1720
|
+
</figure>`:e}_generateAttribution(t){const e=t.hasAttribute("attribution")?t.getAttribute("attribution"):null,i=t.hasAttribute("citetitle")?t.getAttribute("citetitle"):null;if(!e&&!i)return"";const s=i?`<cite>${i}</cite>`:"";return`
|
|
1721
|
+
<footer>— ${e?`<span class="attribution">${e}</span>${i?", ":""}`:""}${s}</footer>`}_hasAutoToc(t){if(!(t.hasSections()&&t.hasAttribute("toc")))return!1;const e=t.getAttribute("toc-placement");return e!=="macro"&&e!=="preamble"}async _generateToc(t,e={}){const i=await t.converter.convert(t,"outline",e.toclevels!=null?{toclevels:e.toclevels}:{});if(!i)return null;const s=e.id??"toc",n=e.title??t.getAttribute("toc-title"),o=e.role??t.getAttribute("toc-class","toc");return`<nav id="${s}" class="${o}">
|
|
1722
|
+
<strong class="title" id="${s==="toc"?"toctitle":`${s}title`}">${n}</strong>
|
|
1723
|
+
${i}
|
|
1724
|
+
</nav>`}_generateFootnotes(t){if(!(t.hasFootnotes()&&!t.hasAttribute("nofootnotes")))return null;const e=['<section class="footnotes" role="doc-endnotes">',`<hr${this._voidSlash}>`];e.push('<ol class="footnotes">');for(const i of t.footnotes)e.push(`<li id="_footnotedef_${i.index}" role="doc-endnote">${i.text} <a class="footnote-backref" href="#_footnoteref_${i.index}" role="doc-backlink">↩</a></li>`);return e.push("</ol>"),e.push("</section>"),e.join(S)}_getRootDocument(t){for(;(t=t.document).isNested();)t=t.parentDocument;return t}_parseRevdate(t){let e;if(e=t.match(/\b(\d{4})-(\d{1,2})-(\d{1,2})\b/))return[e[1],e[2].padStart(2,"0"),e[3].padStart(2,"0")];let i=null,s=null,n=null;(e=t.match(/\b(\d{4})\b/))&&(i=e[1]);const o=new RegExp(`\\b(${Mo.join("|")})\\b`,"i");(e=t.match(o))&&(s=String(Mo.indexOf(e[1].toLowerCase())+1).padStart(2,"0")),(e=t.match(/\b(\d{1,2})(?:st|nd|rd|th)?\b/))&&(n=e[1].padStart(2,"0"));const l=[];return i&&l.push(i),s&&l.push(s),n&&l.push(n),l}_commonHtmlAttributes(t,e,i=null){const s=i?[i]:[];return e&&s.push(e),`${t?` id="${t}"`:""}${s.length?` class="${s.join(" ")}"`:""}`}_appendLinkConstraintAttrs(t,e=[]){const i=[];(this._convertContext??[]).at(-1)==="author"&&i.push("author"),t.hasOption("nofollow")&&i.push("nofollow");const s=t.attributes.window;return s&&(e.push(` target="${s}"`),(s==="_blank"||t.hasOption("noopener"))&&i.push("noopener")),i.length&&e.push(` rel="${i.join(" ")}"`),e}_iconPrefix(t){return t.getAttribute("iconfont-prefix","fa")}_iconSet(t,e,i){return e||(t.hasAttribute("set")?t.getAttribute("set"):t.document.getAttribute("icon-set")??i)}_dropAnchors(t){return t.replace(Nf,"").replace(zf,"")}_sanitizeTitle(t){const e=t.includes("<")?t.replace(Te,"").replace(/ {2,}/g," ").trim():t;return this._encodeAttributeValue(e)}_boolAttr(t){return this._xmlMode?` ${t}="${t}"`:` ${t}`}_encodeAttributeValue(t){return t.includes('"')?t.replace(/"/g,"""):t}}os.prototype.readSvgContents=rs.prototype.readSvgContents;os.prototype._decodeDataUri=rs.prototype._decodeDataUri;os.registerFor("semantic-html5");const Wf=Object.freeze({__proto__:null,default:os}),Rt=`
|
|
1725
|
+
`,Uf={qanda:{list:"qandaset",entry:"qandaentry",label:"question",term:"simpara",item:"answer"},glossary:{list:null,entry:"glossentry",term:"glossterm",item:"glossdef"}},Ff={list:"variablelist",entry:"varlistentry",term:"term",item:"listitem"},qf={monospaced:["<literal>","</literal>"],emphasis:["<emphasis>","</emphasis>",!0],strong:['<emphasis role="strong">',"</emphasis>",!0],double:['<quote role="double">',"</quote>",!0],single:['<quote role="single">',"</quote>",!0],mark:['<emphasis role="marked">',"</emphasis>"],superscript:["<superscript>","</superscript>"],subscript:["<subscript>","</subscript>"]},Hf=["","",!0],Vf={section:"refsection",synopsis:"refsynopsisdiv"},Gf=["dbhtml","dbfo","dblatex"],Yf=/^(.+?)(?: ((?:\d{4}-)?\d{4}))?$/;class Po extends ns{constructor(t,e={}){super(t,e)}async convert_document(t){const e=['<?xml version="1.0" encoding="UTF-8"?>'];t.hasAttribute("toc")&&e.push(t.hasAttribute("toclevels")?`<?asciidoc-toc maxdepth="${t.getAttribute("toclevels")}"?>`:"<?asciidoc-toc?>"),t.hasAttribute("sectnums")&&e.push(t.hasAttribute("sectnumlevels")?`<?asciidoc-numbered maxdepth="${t.getAttribute("sectnumlevels")}"?>`:"<?asciidoc-numbered?>");const i=t.hasAttribute("nolang")?"":` xml:lang="${t.getAttribute("lang","en")}"`;let s=t.doctype,n=!1;s==="manpage"&&(n=!0,s="article");const o=e.length,l=t.id,a=this._findRootAbstract(t);if(t.isNoheader()||e.push(await this._documentInfoTag(t,a)),n){if(e.push("<refentry>"),e.push("<refmeta>"),t.hasAttribute("mantitle")&&e.push(`<refentrytitle>${await t.applyReftextSubs(t.getAttribute("mantitle"))}</refentrytitle>`),t.hasAttribute("manvolnum")&&e.push(`<manvolnum>${t.getAttribute("manvolnum")}</manvolnum>`),e.push(`<refmiscinfo class="source">${t.getAttribute("mansource"," ")}</refmiscinfo>`),e.push(`<refmiscinfo class="manual">${t.getAttribute("manmanual"," ")}</refmiscinfo>`),e.push("</refmeta>"),e.push("<refnamediv>"),t.hasAttribute("mannames"))for(const p of t.getAttribute("mannames"))e.push(`<refname>${p}</refname>`);t.hasAttribute("manpurpose")&&e.push(`<refpurpose>${t.getAttribute("manpurpose")}</refpurpose>`),e.push("</refnamediv>")}const c=await t.docinfo("header");c&&e.push(c);const u=a?this._extractAbstract(t,a):null;if(t.hasBlocks()){const p=[];for(const d of t.blocks)p.push(await d.convert());e.push(p.filter(d=>d!=null).join(Rt))}u&&this._restoreAbstract(u);const f=await t.docinfo("footer");f&&e.push(f),n&&e.push("</refentry>");const h=l??t.id??this._rootDocId;return e.splice(o,0,`<${s} xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0"${i}${this._commonAttributes(h)}>`),e.push(`</${s}>`),e.join(Rt)}async convert_embedded(t){let e=null;this.backend==="docbook5"&&(e=this._findRootAbstract(t),e&&this._extractAbstract(t,e));const i=[];for(const n of t.blocks)i.push(await n.convert());const s=i.filter(n=>n!=null).join(Rt);return e&&this._restoreAbstract(e),s}async convert_section(t){let e=t.sectname;t.document.doctype==="manpage"&&(e=Vf[e]??e);const i=t.special&&(t.hasOption("notitle")||t.hasOption("untitled"))?"":`<title>${t.title}</title>
|
|
1726
|
+
`;return`<${e}${this._commonAttributes(t.id,t.role,t.reftext)}>
|
|
1727
|
+
${i}${await t.content()}
|
|
1728
|
+
</${e}>`}async convert_admonition(t){const e=t.getAttribute("name");return`<${e}${this._commonAttributes(t.id,t.role,t.reftext)}>
|
|
1729
|
+
${this._titleTag(t)}${await this._encloseContent(t)}
|
|
1730
|
+
</${e}>`}async convert_audio(t){return""}async convert_colist(t){const e=[];e.push(`<calloutlist${this._commonAttributes(t.id,t.role,t.reftext)}>`),t.hasTitle()&&e.push(`<title>${t.title}</title>`);for(const i of t.getItems())e.push(`<callout arearefs="${i.getAttribute("coids")}">`),e.push(`<para>${i.getText()}</para>`),i.hasBlocks()&&e.push(await i.content()),e.push("</callout>");return e.push("</calloutlist>"),e.join(Rt)}async convert_dlist(t){const e=[];if(t.style==="horizontal"){const i=t.hasTitle()?"table":"informaltable";e.push(`<${i}${this._commonAttributes(t.id,t.role,t.reftext)} tabstyle="horizontal" frame="none" colsep="0" rowsep="0">`),e.push(`${this._titleTag(t)}<tgroup cols="2">`),e.push(`<colspec colwidth="${t.getAttribute("labelwidth",15)}*"/>`),e.push(`<colspec colwidth="${t.getAttribute("itemwidth",85)}*"/>`),e.push('<tbody valign="top">');for(const[s,n]of t.getItems()){e.push(`<row>
|
|
1731
|
+
<entry>`);for(const o of s)e.push(`<simpara>${o.getText()}</simpara>`);e.push(`</entry>
|
|
1732
|
+
<entry>`),n&&(n.hasText()&&e.push(`<simpara>${n.getText()}</simpara>`),n.hasBlocks()&&e.push(await n.content())),e.push(`</entry>
|
|
1733
|
+
</row>`)}e.push(`</tbody>
|
|
1734
|
+
</tgroup>
|
|
1735
|
+
</${i}>`)}else{const i=Uf[t.style]??Ff,{list:s,entry:n,label:o,term:l,item:a}=i;s&&(e.push(`<${s}${this._commonAttributes(t.id,t.role,t.reftext)}>`),t.hasTitle()&&e.push(`<title>${t.title}</title>`));for(const[c,u]of t.getItems()){e.push(`<${n}>`),o&&e.push(`<${o}>`);for(const f of c)e.push(`<${l}>${f.getText()}</${l}>`);o&&e.push(`</${o}>`),e.push(`<${a}>`),u&&(u.hasText()&&e.push(`<simpara>${u.getText()}</simpara>`),u.hasBlocks()&&e.push(await u.content())),e.push(`</${a}>`),e.push(`</${n}>`)}s&&e.push(`</${s}>`)}return e.join(Rt)}async convert_example(t){const e=this._commonAttributes(t.id,t.role,t.reftext);return t.hasTitle()?`<example${e}>
|
|
1736
|
+
<title>${t.title}</title>
|
|
1737
|
+
${await this._encloseContent(t)}
|
|
1738
|
+
</example>`:`<informalexample${e}>
|
|
1739
|
+
${await this._encloseContent(t)}
|
|
1740
|
+
</informalexample>`}async convert_floating_title(t){return`<bridgehead${this._commonAttributes(t.id,t.role,t.reftext)} renderas="sect${t.level}">${t.title}</bridgehead>`}async convert_image(t){const e=t.hasAttribute("align")?` align="${t.getAttribute("align")}"`:"",i=`<mediaobject>
|
|
1741
|
+
<imageobject>
|
|
1742
|
+
<imagedata fileref="${await t.imageUri(t.getAttribute("target"))}"${this._imageSizeAttributes(t.attributes)}${e}/>
|
|
1743
|
+
</imageobject>
|
|
1744
|
+
<textobject><phrase>${t.getAlt()}</phrase></textobject>
|
|
1745
|
+
</mediaobject>`,s=this._commonAttributes(t.id,t.role,t.reftext);return t.hasTitle()?`<figure${s}>
|
|
1746
|
+
<title>${t.title}</title>
|
|
1747
|
+
${i}
|
|
1748
|
+
</figure>`:`<informalfigure${s}>
|
|
1749
|
+
${i}
|
|
1750
|
+
</informalfigure>`}async convert_listing(t){const e=!t.hasTitle(),i=this._commonAttributes(t.id,t.role,t.reftext);let s;if(t.style==="source"){const n=t.attributes;let o;t.hasOption("linenums")?o="start"in n?` linenumbering="numbered" startinglinenumber="${parseInt(n.start,10)}"`:' linenumbering="numbered"':o=' linenumbering="unnumbered"',"language"in n?s=`<programlisting${e?i:""} language="${n.language}"${o}>${await t.content()}</programlisting>`:s=`<screen${e?i:""}${o}>${await t.content()}</screen>`}else s=`<screen${e?i:""}>${await t.content()}</screen>`;return e?s:`<formalpara${i}>
|
|
1751
|
+
<title>${t.title}</title>
|
|
1752
|
+
<para>
|
|
1753
|
+
${s}
|
|
1754
|
+
</para>
|
|
1755
|
+
</formalpara>`}async convert_literal(t){const e=this._commonAttributes(t.id,t.role,t.reftext);return t.hasTitle()?`<formalpara${e}>
|
|
1756
|
+
<title>${t.title}</title>
|
|
1757
|
+
<para>
|
|
1758
|
+
<literallayout class="monospaced">${await t.content()}</literallayout>
|
|
1759
|
+
</para>
|
|
1760
|
+
</formalpara>`:`<literallayout${e} class="monospaced">${await t.content()}</literallayout>`}async convert_pass(t){return await t.content()}async convert_stem(t){let e;const i=t.subs?t.subs.indexOf("specialcharacters"):-1;i!==-1?(t.subs.splice(i,1),e=await t.content(),t.subs.splice(i,0,"specialcharacters")):e=await t.content();let s;t.style==="asciimath"?s=`<mathphrase><![CDATA[${e}]]></mathphrase>`:s=`<alt><![CDATA[${e}]]></alt>
|
|
1761
|
+
<mathphrase><![CDATA[${e}]]></mathphrase>`;const n=this._commonAttributes(t.id,t.role,t.reftext);return t.hasTitle()?`<equation${n}>
|
|
1762
|
+
<title>${t.title}</title>
|
|
1763
|
+
${s}
|
|
1764
|
+
</equation>`:`<informalequation${n}>
|
|
1765
|
+
${s}
|
|
1766
|
+
</informalequation>`}async convert_olist(t){const e=[],i=t.style?` numeration="${t.style}"`:"",s=t.hasAttribute("start")?` startingnumber="${t.getAttribute("start")}"`:"";e.push(`<orderedlist${this._commonAttributes(t.id,t.role,t.reftext)}${i}${s}>`),t.hasTitle()&&e.push(`<title>${t.title}</title>`);for(const n of t.getItems())e.push(`<listitem${this._commonAttributes(n.id,n.role)}>`),e.push(`<simpara>${n.getText()}</simpara>`),n.hasBlocks()&&e.push(await n.content()),e.push("</listitem>");return e.push("</orderedlist>"),e.join(Rt)}async convert_open(t){const e=t.id,i=t.role,s=t.reftext;switch(t.style){case"abstract":{if(t.getParent()===t.document&&t.document.doctype==="book")return this.logger.warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content."),"";let n=`<abstract>
|
|
1767
|
+
${this._titleTag(t)}${await this._encloseContent(t)}
|
|
1768
|
+
</abstract>`;const o=t.getParent();return this.backend==="docbook5"&&!t.hasOption("root")&&(o.context==="open"?o.style==="partintro":o.context==="section"&&o.sectname==="partintro")&&o.blocks[0]===t&&(n=`<info>
|
|
1769
|
+
${n}
|
|
1770
|
+
</info>`),n}case"partintro":return t.level===0&&t.getParent().context==="section"&&t.document.doctype==="book"?`<partintro${this._commonAttributes(e,i,s)}>
|
|
1771
|
+
${this._titleTag(t)}${await this._encloseContent(t)}
|
|
1772
|
+
</partintro>`:(this.logger.error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."),"");default:{if(t.hasTitle()){const n=t.contentModel==="compound"?Rt:"";return`<formalpara${this._commonAttributes(e,i,s)}>
|
|
1773
|
+
<title>${t.title}</title>
|
|
1774
|
+
<para>${n}${await t.content()}${n}</para>
|
|
1775
|
+
</formalpara>`}else if(e||i)return t.contentModel==="compound"?`<para${this._commonAttributes(e,i,s)}>
|
|
1776
|
+
${await t.content()}
|
|
1777
|
+
</para>`:`<simpara${this._commonAttributes(e,i,s)}>${await t.content()}</simpara>`;return await this._encloseContent(t)}}}async convert_page_break(t){return"<simpara><?asciidoc-pagebreak?></simpara>"}async convert_paragraph(t){const e=this._commonAttributes(t.id,t.role,t.reftext);return t.hasTitle()?`<formalpara${e}>
|
|
1778
|
+
<title>${t.title}</title>
|
|
1779
|
+
<para>${await t.content()}</para>
|
|
1780
|
+
</formalpara>`:`<simpara${e}>${await t.content()}</simpara>`}async convert_preamble(t){return t.document.doctype==="book"?`<preface${this._commonAttributes(t.id,t.role,t.reftext)}>
|
|
1781
|
+
${this._titleTag(t,!1)}${await t.content()}
|
|
1782
|
+
</preface>`:await t.content()}async convert_quote(t){return await this._blockquoteTag(t,t.hasRole("epigraph")?"epigraph":null,async()=>await this._encloseContent(t))}async convert_thematic_break(t){return"<simpara><?asciidoc-hr?></simpara>"}async convert_sidebar(t){return`<sidebar${this._commonAttributes(t.id,t.role,t.reftext)}>
|
|
1783
|
+
${this._titleTag(t)}${await this._encloseContent(t)}
|
|
1784
|
+
</sidebar>`}async convert_table(t){let e=!1;const i=[],s=t.hasOption("pgwide")?' pgwide="1"':"";let n=t.getAttribute("frame","all","table-frame");n==="ends"&&(n="topbot");const o=t.getAttribute("grid",null,"table-grid"),l=t.hasTitle()?"table":"informaltable",a=t.hasAttribute("orientation","landscape","table-orientation")?' orient="land"':"";i.push(`<${l}${this._commonAttributes(t.id,t.role,t.reftext)}${s} frame="${n}" rowsep="${["none","cols"].includes(o)?0:1}" colsep="${["none","rows"].includes(o)?0:1}"${a}>`),t.hasOption("unbreakable")?i.push('<?dbfo keep-together="always"?>'):t.hasOption("breakable")&&i.push('<?dbfo keep-together="auto"?>'),l==="table"&&i.push(`<title>${t.title}</title>`);let c;const u=t.hasAttribute("width")?t.getAttribute("width"):null;if(u){for(const f of Gf)i.push(`<?${f} table-width="${u}"?>`);c="colabswidth"}else c="colpcwidth";i.push(`<tgroup cols="${t.getAttribute("colcount")}">`);for(const f of t.columns)i.push(`<colspec colname="col_${f.getAttribute("colnumber")}" colwidth="${f.getAttribute(c)}*"/>`);for(const[f,h]of t.rows.bySection())if(!(!h||h.length===0)){f==="body"&&(e=!0),i.push(`<t${f}>`);for(const p of h){i.push("<row>");for(const d of p){const m=d.colspan?` namest="col_${d.column.getAttribute("colnumber")}" nameend="col_${d.column.getAttribute("colnumber")+d.colspan-1}"`:"",b=d.rowspan?` morerows="${d.rowspan-1}"`:"",_=`<entry align="${d.getAttribute("halign")}" valign="${d.getAttribute("valign")}"${m}${b}>`;let $;if(f==="head")$=d.text;else switch(d.style){case"asciidoc":$=await d.content();break;case"literal":$=`<literallayout class="monospaced">${d.text}</literallayout>`;break;case"header":{const k=await d.content();$=k.length===0?"":`<simpara><emphasis role="strong">${k.join('</emphasis></simpara><simpara><emphasis role="strong">')}</emphasis></simpara>`;break}default:{const k=await d.content();$=k.length===0?"":`<simpara>${k.join("</simpara><simpara>")}</simpara>`}}const E=t.document.hasAttribute("cellbgcolor")?`<?dbfo bgcolor="${t.document.getAttribute("cellbgcolor")}"?></entry>`:"</entry>";i.push(`${_}${$}${E}`)}i.push("</row>")}i.push(`</t${f}>`)}return i.push("</tgroup>"),i.push(`</${l}>`),e||this.logger.warn("tables must have at least one body row"),i.join(Rt)}async convert_toc(t){return""}async convert_ulist(t){const e=[];if(t.style==="bibliography"){e.push(`<bibliodiv${this._commonAttributes(t.id,t.role,t.reftext)}>`),t.hasTitle()&&e.push(`<title>${t.title}</title>`);for(const i of t.getItems())e.push("<bibliomixed>"),e.push(`<bibliomisc>${i.getText()}</bibliomisc>`),i.hasBlocks()&&e.push(await i.content()),e.push("</bibliomixed>");e.push("</bibliodiv>")}else{const i=t.hasOption("checklist"),s=i?"none":t.style,n=s?` mark="${s}"`:"";e.push(`<itemizedlist${this._commonAttributes(t.id,t.role,t.reftext)}${n}>`),t.hasTitle()&&e.push(`<title>${t.title}</title>`);for(const o of t.getItems()){const l=i&&o.hasAttribute("checkbox")?o.hasAttribute("checked")?"✓ ":"❏ ":"";e.push(`<listitem${this._commonAttributes(o.id,o.role)}>`),e.push(`<simpara>${l}${o.getText()}</simpara>`),o.hasBlocks()&&e.push(await o.content()),e.push("</listitem>")}e.push("</itemizedlist>")}return e.join(Rt)}async convert_verse(t){return await this._blockquoteTag(t,t.hasRole("epigraph")?"epigraph":null,async()=>`<literallayout>${await t.content()}</literallayout>`)}async convert_video(t){return""}async convert_inline_anchor(t){switch(t.type){case"ref":return`<anchor${this._commonAttributes(t.id,null,t.reftext||`[${t.id}]`)}/>`;case"xref":{const e=t.attributes.path;if(e)return`<link xl:href="${t.target}">${t.text||e}</link>`;let i=t.attributes.refid;if(!i){const s=this._getRootDocument(t);i=s.id??(this._rootDocId??=this._generateDocumentId(s))}return t.text?`<link linkend="${i}">${t.text}</link>`:`<xref linkend="${i}"/>`}case"link":return`<link xl:href="${t.target}">${t.text}</link>`;case"bibref":{const e=`[${t.reftext||t.id}]`;return`<anchor${this._commonAttributes(t.id,null,e)}/>${e}`}default:return this.logger.warn(`unknown anchor type: ${t.type}`),null}}async convert_inline_break(t){return`${t.text}<?asciidoc-br?>`}async convert_inline_button(t){return`<guibutton>${t.text}</guibutton>`}async convert_inline_callout(t){return`<co${this._commonAttributes(t.id)}/>`}async convert_inline_footnote(t){return t.type==="xref"?`<footnoteref linkend="${t.target}"/>`:`<footnote${this._commonAttributes(t.id)}><simpara>${t.text}</simpara></footnote>`}async convert_inline_image(t){const e=t.type==="icon"?await t.iconUri(t.target):await t.imageUri(t.target),i=`<inlinemediaobject${this._commonAttributes(t.id,t.role)}>
|
|
1785
|
+
<imageobject>
|
|
1786
|
+
<imagedata fileref="${e}"${this._imageSizeAttributes(t.attributes)}/>
|
|
1787
|
+
</imageobject>
|
|
1788
|
+
<textobject><phrase>${t.getAlt()}</phrase></textobject>
|
|
1789
|
+
</inlinemediaobject>`;if(t.type!=="icon"&&t.hasAttribute("link")){const s=t.getAttribute("link");return`<link xl:href="${s==="self"?e:s}">${i}</link>`}return i}async convert_inline_indexterm(t){let e="";const i=t.getAttribute("see");if(i)e=`
|
|
1790
|
+
<see>${i}</see>`;else{const l=t.getAttribute("see-also");l&&(e=l.map(a=>`
|
|
1791
|
+
<seealso>${a}</seealso>`).join(""))}if(t.type==="visible")return`<indexterm>
|
|
1792
|
+
<primary>${t.text}</primary>${e}
|
|
1793
|
+
</indexterm>${t.text}`;const s=t.getAttribute("terms"),n=s.length,o=t.document.hasOption("indexterm-promotion");return n>2?`<indexterm>
|
|
1794
|
+
<primary>${s[0]}</primary><secondary>${s[1]}</secondary><tertiary>${s[2]}</tertiary>${e}
|
|
1795
|
+
</indexterm>${o?`
|
|
1796
|
+
<indexterm>
|
|
1797
|
+
<primary>${s[1]}</primary><secondary>${s[2]}</secondary>
|
|
1798
|
+
</indexterm>
|
|
1799
|
+
<indexterm>
|
|
1800
|
+
<primary>${s[2]}</primary>
|
|
1801
|
+
</indexterm>`:""}`:n>1?`<indexterm>
|
|
1802
|
+
<primary>${s[0]}</primary><secondary>${s[1]}</secondary>${e}
|
|
1803
|
+
</indexterm>${o?`
|
|
1804
|
+
<indexterm>
|
|
1805
|
+
<primary>${s[1]}</primary>
|
|
1806
|
+
</indexterm>`:""}`:`<indexterm>
|
|
1807
|
+
<primary>${s[0]}</primary>${e}
|
|
1808
|
+
</indexterm>`}async convert_inline_kbd(t){const e=t.getAttribute("keys");return e.length===1?`<keycap>${e[0]}</keycap>`:`<keycombo><keycap>${e.join("</keycap><keycap>")}</keycap></keycombo>`}async convert_inline_menu(t){const e=t.getAttribute("menu"),i=t.getAttribute("submenus");if(!i||i.length===0){const s=t.getAttribute("menuitem");return s?`<menuchoice><guimenu>${e}</guimenu> <guimenuitem>${s}</guimenuitem></menuchoice>`:`<guimenu>${e}</guimenu>`}return`<menuchoice><guimenu>${e}</guimenu> <guisubmenu>${i.join("</guisubmenu> <guisubmenu>")}</guisubmenu> <guimenuitem>${t.getAttribute("menuitem")}</guimenuitem></menuchoice>`}async convert_inline_quoted(t){const e=t.type;if(e==="asciimath"||e==="latexmath"){const a=t.text;return e==="asciimath"?`<inlineequation><mathphrase><![CDATA[${a}]]></mathphrase></inlineequation>`:`<inlineequation><alt><![CDATA[${a}]]></alt><mathphrase><![CDATA[${a}]]></mathphrase></inlineequation>`}const[i,s,n]=qf[e]??Hf,o=t.text;let l;return t.role?n?l=`${i}<phrase role="${t.role}">${o}</phrase>${s}`:l=`${i.slice(0,-1)} role="${t.role}">${o}${s}`:l=`${i}${o}${s}`,t.id?`<anchor${this._commonAttributes(t.id)}/>${l}`:l}_commonAttributes(t,e=null,i=null){let s="";if(t?s=` xml:id="${t}"${e?` role="${e}"`:""}`:e&&(s=` role="${e}"`),i){let n=i;return n.includes("<")&&(n=n.replace(Te,""),n.includes(" ")&&(n=n.replace(/ {2,}/g," ").trim())),n.includes('"')&&(n=n.replace(/"/g,""")),`${s} xreflabel="${n}"`}return s}_imageSizeAttributes(t){if("scaledwidth"in t)return` width="${t.scaledwidth}"`;if("scale"in t)return` scale="${t.scale}"`;const e="width"in t?` contentwidth="${t.width}"`:"",i="height"in t?` contentdepth="${t.height}"`:"";return`${e}${i}`}_authorTag(t,e){const i=["<author>","<personname>"];return e.firstname&&i.push(`<firstname>${t.subReplacements(e.firstname)}</firstname>`),e.middlename&&i.push(`<othername>${t.subReplacements(e.middlename)}</othername>`),e.lastname&&i.push(`<surname>${t.subReplacements(e.lastname)}</surname>`),i.push("</personname>"),e.email&&i.push(`<email>${e.email}</email>`),i.push("</author>"),i.join(Rt)}async _documentInfoTag(t,e){const i=["<info>"];if(!t.isNotitle()){const n=t.doctitle({partition:!0,use_fallback:!0});n?.subtitle?i.push(`<title>${n.main}</title>
|
|
1809
|
+
<subtitle>${n.subtitle}</subtitle>`):n&&i.push(`<title>${n}</title>`)}const s=t.hasAttribute("revdate")?t.getAttribute("revdate"):t.hasAttribute("reproducible")?null:t.getAttribute("docdate");if(s&&i.push(`<date>${s}</date>`),t.hasAttribute("copyright")){const n=Yf.exec(t.getAttribute("copyright"));n&&(i.push("<copyright>"),i.push(`<holder>${n[1]}</holder>`),n[2]&&i.push(`<year>${n[2]}</year>`),i.push("</copyright>"))}if(t.hasHeader()){const n=t.authors();if(n.length>0)if(n.length>1){i.push("<authorgroup>");for(const l of n)i.push(this._authorTag(t,l));i.push("</authorgroup>")}else{const l=n[0];i.push(this._authorTag(t,l)),l.initials&&i.push(`<authorinitials>${l.initials}</authorinitials>`)}if(t.hasAttribute("revdate")&&(t.hasAttribute("revnumber")||t.hasAttribute("revremark"))&&(i.push(`<revhistory>
|
|
1810
|
+
<revision>`),t.hasAttribute("revnumber")&&i.push(`<revnumber>${t.getAttribute("revnumber")}</revnumber>`),t.hasAttribute("revdate")&&i.push(`<date>${t.getAttribute("revdate")}</date>`),t.hasAttribute("authorinitials")&&i.push(`<authorinitials>${t.getAttribute("authorinitials")}</authorinitials>`),t.hasAttribute("revremark")&&i.push(`<revremark>${t.getAttribute("revremark")}</revremark>`),i.push(`</revision>
|
|
1811
|
+
</revhistory>`)),t.hasAttribute("front-cover-image")||t.hasAttribute("back-cover-image")){const l=await this._coverTag(t,"back");if(l)i.push(await this._coverTag(t,"front",!0)),i.push(l);else{const a=await this._coverTag(t,"front");a&&i.push(a)}}t.hasAttribute("orgname")&&i.push(`<orgname>${t.getAttribute("orgname")}</orgname>`);const o=await t.docinfo();o&&i.push(o)}return e&&(e.setAttribute("root-option",""),i.push(await this.convert(e,e.nodeName)),e.removeAttribute("root-option")),i.push("</info>"),i.join(Rt)}_findRootAbstract(t){if(!t.hasBlocks())return null;let e=t.blocks[0];if(e.context==="preamble"){if(!e.hasBlocks())return null;e=e.blocks[0]}else if(e.context==="section"){if(e.sectname==="abstract")return e;if(e.sectname!=="preface"||!e.hasBlocks())return null;e=e.blocks[0]}return e.style==="abstract"&&e.context==="open"?e:null}_extractAbstract(t,e){let i=e.getParent(),s=e;for(;i!==t&&i.blocks.length===1;)s=i,i=i.getParent();return i.blocks.splice(i.blocks.indexOf(s),1),e}_restoreAbstract(t){t.getParent().blocks.unshift(t)}_getRootDocument(t){let e=t.document;for(;e.isNested();)e=e.parentDocument;return e}_generateDocumentId(t){return`__${t.doctype}-root__`}async _encloseContent(t){return t.contentModel==="compound"?await t.content():`<simpara>${await t.content()}</simpara>`}_titleTag(t,e=!0){return e&&!t.hasTitle()?"":`<title>${t.title??""}</title>
|
|
1812
|
+
`}async _coverTag(t,e,i=!1){const s=t.getAttribute(`${e}-cover-image`);if(s){let n=s;const o="";if(s.includes(":")){const l=/^image::?(\S|\S.*?\S)\[(.*?)?\]$/.exec(s);l&&(n=await t.imageUri(l[1]))}return`<cover role="${e}">
|
|
1813
|
+
<mediaobject>
|
|
1814
|
+
<imageobject>
|
|
1815
|
+
<imagedata fileref="${n}"${o}/>
|
|
1816
|
+
</imageobject>
|
|
1817
|
+
</mediaobject>
|
|
1818
|
+
</cover>`}return i?`<cover role="${e}"/>`:null}async _blockquoteTag(t,e,i){const s=e||"blockquote",n=[`<${s}${this._commonAttributes(t.id,t.role,t.reftext)}>`];return t.hasTitle()&&n.push(`<title>${t.title}</title>`),(t.hasAttribute("attribution")||t.hasAttribute("citetitle"))&&(n.push("<attribution>"),t.hasAttribute("attribution")&&n.push(t.getAttribute("attribution")),t.hasAttribute("citetitle")&&n.push(`<citetitle>${t.getAttribute("citetitle")}</citetitle>`),n.push("</attribution>")),n.push(await i()),n.push(`</${s}>`),n.join(Rt)}}const Xf=Object.freeze({__proto__:null,DocBook5Converter:Po,default:Po}),Qf=" ".repeat(8),is="\x1B",j=`${is}\\`,No=`${is}.`,Kf=/^\\|(\u001b)?\\/g,Zf=/^\./gm,Jf=/^(?:\u001b\\c\n)?\u001b\.((?:URL|MTO) ".*?" ".*?" )( |[^\s]*)(.*?)(?: *\u001b\\c)?$/gm,tp=/(\u001b\\c) (\u001b\.(?:URL|MTO) )/g,ep=/<\/?([\u001b]\\[^>]+)>/g,ip=/—(?:​)?/g,sp=/…(?:​)?/g,np=/[ \t]*\n[ \t]*/g,rp=/&#?[a-z\d]+;|</,op=/(&#?[a-z\d]+;|<\u001b\\f\(CR[\s\S]*?<\/\u001b\\fP>|<[^>]+>)|([^&<]+)/g;class Ea extends ns{constructor(t,e={}){super(t,e),this.initBackendTraits({basebackend:"manpage",filetype:"man",outfilesuffix:".man",supportsTemplates:!0})}async convert_document(t){if(!t.hasAttribute("mantitle"))throw new Error("asciidoctor: ERROR: doctype must be set to manpage when using manpage backend");const e=t.getAttribute("mantitle").replace(sa,""),i=t.getAttribute("manvolnum","1"),s=t.getAttribute("manname",e),n=t.getAttribute("manmanual"),o=t.getAttribute("mansource"),l=t.hasAttribute("reproducible")?null:t.getAttribute("docdate"),a=[`'\\" t
|
|
1819
|
+
.\\" Title: ${e}
|
|
1820
|
+
.\\" Author: ${t.hasAttribute("authors")?t.getAttribute("authors"):'[see the "AUTHOR(S)" section]'}
|
|
1821
|
+
.\\" Generator: Asciidoctor.js ${t.getAttribute("asciidoctor-version")}`];if(l&&a.push(`.\\" Date: ${l}`),a.push(`.\\" Manual: ${n?n.replace(/[\n\t ]+/g," "):"\\ \\&"}
|
|
1822
|
+
.\\" Source: ${o?o.replace(/[\n\t ]+/g," "):"\\ \\&"}
|
|
1823
|
+
.\\" Language: English
|
|
1824
|
+
.\\"`),a.push(`.TH "${this.manify(s.toUpperCase())}" "${i}" "${l??""}" "${o?this.manify(o):"\\ \\&"}" "${n?this.manify(n):"\\ \\&"}"`),a.push(".ie \\n(.g .ds Aq \\(aq"),a.push(".el .ds Aq '"),a.push(".ss \\n[.ss] 0"),a.push(".nh"),a.push(".ad l"),a.push(`.de URL
|
|
1825
|
+
\\fI\\\\$2\\fP <\\\\$1>\\\\$3
|
|
1826
|
+
..
|
|
1827
|
+
.als MTO URL
|
|
1828
|
+
.if \\n[.g] \\{\\
|
|
1829
|
+
. mso www.tmac
|
|
1830
|
+
. am URL
|
|
1831
|
+
. ad l
|
|
1832
|
+
. .
|
|
1833
|
+
. am MTO
|
|
1834
|
+
. ad l
|
|
1835
|
+
. .`),a.push(`. LINKSTYLE ${t.getAttribute("man-linkstyle","blue R < >")}`),a.push(".\\}"),!t.isNoheader()&&t.hasAttribute("manpurpose")){const u=t.getAttribute("mannames",[s]);a.push(`.SH "${t.getAttribute("manname-title","NAME").toUpperCase()}"
|
|
1836
|
+
${u.map(f=>this.manify(f).replace(/\\-/g,"-")).join(", ")} \\- ${this.manify(t.getAttribute("manpurpose"),{whitespace:"normalize"})}`)}a.push(await t.content()),this._appendFootnotes(a,t);const c=t.authors();if(c.length>0)if(c.length>1){a.push('.SH "AUTHORS"');for(const u of c)a.push(`.sp
|
|
1837
|
+
${u.name}`)}else a.push(`.SH "AUTHOR"
|
|
1838
|
+
.sp
|
|
1839
|
+
${c[0].name}`);return a.join(S)}async convert_embedded(t){const e=[await t.content()];return this._appendFootnotes(e,t),e.join(S)}async convert_section(t){let e,i;return t.level>1?(e="SS",i=t.captionedTitle()):(e="SH",i=this._uppercasePcdata(t.title)),`.${e} "${this.manify(i)}"
|
|
1840
|
+
${await t.content()}`}async convert_admonition(t){const e=t.hasTitle()?`\\fP: ${this.manify(t.title)}`:"";return`.if n .sp
|
|
1841
|
+
.RS 4
|
|
1842
|
+
.it 1 an-trap
|
|
1843
|
+
.nr an-no-space-flag 1
|
|
1844
|
+
.nr an-break-flag 1
|
|
1845
|
+
.br
|
|
1846
|
+
.ps +1
|
|
1847
|
+
.B ${t.getAttribute("textlabel")}${e}
|
|
1848
|
+
.ps -1
|
|
1849
|
+
.br
|
|
1850
|
+
${await this._encloseContent(t)}
|
|
1851
|
+
.sp .5v
|
|
1852
|
+
.RE`}async convert_colist(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1853
|
+
.B ${this.manify(t.title)}
|
|
1854
|
+
.br`),e.push(`.TS
|
|
1855
|
+
tab(:);
|
|
1856
|
+
r lw(\\n(.lu*75u/100u).`);let i=0;for(const s of t.getItems())e.push(`\\fB(${++i})\\fP\\h'-2n':T{`),e.push(this.manify(s.getText(),{whitespace:"normalize"})),s.hasBlocks()&&e.push(await s.content()),e.push("T}");return e.push(".TE"),e.join(S)}async convert_dlist(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1857
|
+
.B ${this.manify(t.title)}
|
|
1858
|
+
.br`);let i=0;for(const[s,n]of t.getItems()){if(i++,t.style==="qanda"?e.push(`.sp
|
|
1859
|
+
${i}. ${this.manify(s.map(o=>o.getText()).join(" "))}
|
|
1860
|
+
.RS 4`):e.push(`.sp
|
|
1861
|
+
${this.manify(s.map(o=>o.getText()).join(", "),{whitespace:"normalize"})}
|
|
1862
|
+
.RS 4`),n){let o=!1;if(n.hasText()&&(e.push(this.manify(n.getText(),{whitespace:"normalize"})),o=!0),n.hasBlocks()){let l=await n.content();!o&&l.startsWith(`.sp
|
|
1863
|
+
`)&&(l=l.slice(4)),e.push(l)}}e.push(".RE")}return e.join(S)}async convert_example(t){return`${t.hasTitle()?`.sp
|
|
1864
|
+
.B ${this.manify(t.captionedTitle())}
|
|
1865
|
+
.br`:".sp"}
|
|
1866
|
+
.RS 4
|
|
1867
|
+
${await this._encloseContent(t)}
|
|
1868
|
+
.RE`}async convert_floating_title(t){return`.SS "${this.manify(t.title)}"`}async convert_image(t){return`${t.hasTitle()?`.sp
|
|
1869
|
+
.B ${this.manify(t.captionedTitle())}
|
|
1870
|
+
.br`:".sp"}
|
|
1871
|
+
[${this.manify(t.getAttribute("alt"))}]`}async convert_listing(t){const e=[];return t.hasTitle()&&e.push(`.sp
|
|
1872
|
+
.B ${this.manify(t.captionedTitle())}
|
|
1873
|
+
.br`),e.push(`.sp
|
|
1874
|
+
.if n .RS 4
|
|
1875
|
+
.nf
|
|
1876
|
+
.fam C
|
|
1877
|
+
${this.manify(await t.content(),{whitespace:"preserve"})}
|
|
1878
|
+
.fam
|
|
1879
|
+
.fi
|
|
1880
|
+
.if n .RE`),e.join(S)}async convert_literal(t){const e=[];return t.hasTitle()&&e.push(`.sp
|
|
1881
|
+
.B ${this.manify(t.title)}
|
|
1882
|
+
.br`),e.push(`.sp
|
|
1883
|
+
.if n .RS 4
|
|
1884
|
+
.nf
|
|
1885
|
+
.fam C
|
|
1886
|
+
${this.manify(await t.content(),{whitespace:"preserve"})}
|
|
1887
|
+
.fam
|
|
1888
|
+
.fi
|
|
1889
|
+
.if n .RE`),e.join(S)}async convert_sidebar(t){return`${t.hasTitle()?`.sp
|
|
1890
|
+
.B ${this.manify(t.title)}
|
|
1891
|
+
.br`:".sp"}
|
|
1892
|
+
.RS 4
|
|
1893
|
+
${await this._encloseContent(t)}
|
|
1894
|
+
.RE`}async convert_olist(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1895
|
+
.B ${this.manify(t.title)}
|
|
1896
|
+
.br`);const i=parseInt(t.getAttribute("start",1),10);let s=0;for(const n of t.getItems()){const o=s+i,l=this.manify(n.getText(),{whitespace:"normalize"});if(e.push(`.sp
|
|
1897
|
+
.RS 4
|
|
1898
|
+
.ie n \\{\\
|
|
1899
|
+
\\h'-04' ${o}.\\h'+01'\\c
|
|
1900
|
+
.\\}
|
|
1901
|
+
.el \\{\\
|
|
1902
|
+
. sp -1
|
|
1903
|
+
. IP " ${o}." 4.2
|
|
1904
|
+
.\\}${l===""?"":S+l}`),n.hasBlocks()){let a=await n.content();l===""&&a.startsWith(`.sp
|
|
1905
|
+
`)&&(a=a.slice(4)),e.push(a)}e.push(".RE"),s++}return e.join(S)}async convert_open(t){return t.style==="abstract"||t.style==="partintro"?this._encloseContent(t):await t.content()}async convert_page_break(t){return".bp"}async convert_paragraph(t){return t.hasTitle()?`.sp
|
|
1906
|
+
.B ${this.manify(t.title)}
|
|
1907
|
+
.br
|
|
1908
|
+
${this.manify(await t.content(),{whitespace:"normalize"})}`:`.sp
|
|
1909
|
+
${this.manify(await t.content(),{whitespace:"normalize"})}`}async convert_pass(t){return this.contentOnly(t)}async convert_preamble(t){return this.contentOnly(t)}async convert_quote(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1910
|
+
.RS 3
|
|
1911
|
+
.B ${this.manify(t.title)}
|
|
1912
|
+
.br
|
|
1913
|
+
.RE`);let i=t.hasAttribute("citetitle")?`${t.getAttribute("citetitle")} `:null;return t.hasAttribute("attribution")?i=`${i??""}\\(em ${t.getAttribute("attribution")}`:i=null,e.push(`.RS 3
|
|
1914
|
+
.ll -.6i
|
|
1915
|
+
${await this._encloseContent(t)}
|
|
1916
|
+
.br
|
|
1917
|
+
.RE
|
|
1918
|
+
.ll`),i&&e.push(`.RS 5
|
|
1919
|
+
.ll -.10i
|
|
1920
|
+
${i}
|
|
1921
|
+
.RE
|
|
1922
|
+
.ll`),e.join(S)}async convert_stem(t){const e=[];e.push(t.hasTitle()?`.sp
|
|
1923
|
+
.B ${this.manify(t.title)}
|
|
1924
|
+
.br`:".sp");const i=t.style,[s,n]=Ae[i]??["",""];let o=await t.content();return o.startsWith(s)&&o.endsWith(n)&&(o=o.slice(s.length,o.length-n.length)),e.push(`${this.manify(o,{whitespace:"preserve"})} (${i})`),e.join(S)}async convert_table(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1925
|
+
.it 1 an-trap
|
|
1926
|
+
.nr an-no-space-flag 1
|
|
1927
|
+
.nr an-break-flag 1
|
|
1928
|
+
.br
|
|
1929
|
+
.B ${this.manify(t.captionedTitle())}
|
|
1930
|
+
`),e.push(`.TS
|
|
1931
|
+
allbox tab(:);`);const i=[],s=[];let n=0;for(const[l,a]of t.rows.bySection())if(a.length!==0)for(const c of a){i[n]=i[n]??[],s[n]=s[n]??[];let u=c.length,f=0;for(const h of c){u--,i[n][f]=i[n][f]??[],JSON.stringify(i[n][f])===JSON.stringify(["^t"])&&s[n].push(`T{${S}T}:`),s[n].push(`T{${S}`);const p=(h.getAttribute("halign","left")??"left")[0];if(l==="body"){i[n].length===0||i[n][f].length===0?i[n][f].push(`${p}t`):(i[n][f+1]=i[n][f+1]??[],i[n][f+1].push(`${p}t`));let d;h.style==="asciidoc"?d=await h.content():h.style==="literal"?d=`.nf${S}${this.manify(h.text,{whitespace:"preserve"})}${S}.fi`:d=(await h.content()).map(m=>this.manify(m,{whitespace:"normalize"})).join(`${S}.sp${S}`),s[n].push(`${d}${S}`)}else i[n].length===0||i[n][f].length===0?i[n][f].push(`${p}tB`):(i[n][f+1]=i[n][f+1]??[],i[n][f+1].push(`${p}tB`)),s[n].push(`${this.manify(h.text,{whitespace:"normalize"})}${S}`);if(h.colspan&&h.colspan>1)for(let d=0;d<h.colspan-1;d++)i[n].length===0||i[n][f].length===0?i[n][f+d].push("st"):(i[n][f+1+d]=i[n][f+1+d]??[],i[n][f+1+d].push("st"));if(h.rowspan&&h.rowspan>1)for(let d=0;d<h.rowspan-1;d++)i[n+1+d]=i[n+1+d]??[],i[n+1+d].length===0||(i[n+1+d][f]??[]).length===0?(i[n+1+d][f]=i[n+1+d][f]??[],i[n+1+d][f].push("^t")):(i[n+1+d][f+1]=i[n+1+d][f+1]??[],i[n+1+d][f+1].push("^t"));u>=1?s[n].push("T}:"):s[n].push(`T}${S}`),f++}n++}let o=s;t.hasHeaderOption&&s[0]&&(e.push(`${S}${i[0].join(" ")}.`),e.push(`${S}${s[0].join("")}`),e.push(".T&"),o=s.slice(1)),e.push(`${S}${i[0].map(()=>"lt").join(" ")}.${S}`);for(const l of o)e.push(l.join(""));return e.push(`.TE${S}.sp`),e.join("")}async convert_thematic_break(t){return`.sp
|
|
1932
|
+
.ce
|
|
1933
|
+
\\l'\\n(.lu*25u/100u\\(ap'`}async convert_toc(t){}async convert_ulist(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1934
|
+
.B ${this.manify(t.title)}
|
|
1935
|
+
.br`);for(const i of t.getItems()){const s=this.manify(i.getText(),{whitespace:"normalize"});if(e.push(`.sp
|
|
1936
|
+
.RS 4
|
|
1937
|
+
.ie n \\{\\
|
|
1938
|
+
\\h'-04'\\(bu\\h'+03'\\c
|
|
1939
|
+
.\\}
|
|
1940
|
+
.el \\{\\
|
|
1941
|
+
. sp -1
|
|
1942
|
+
. IP \\(bu 2.3
|
|
1943
|
+
.\\}${s===""?"":S+s}`),i.hasBlocks()){let n=await i.content();s===""&&n.startsWith(`.sp
|
|
1944
|
+
`)&&(n=n.slice(4)),e.push(n)}e.push(".RE")}return e.join(S)}async convert_verse(t){const e=[];t.hasTitle()&&e.push(`.sp
|
|
1945
|
+
.B ${this.manify(t.title)}
|
|
1946
|
+
.br`);let i=t.hasAttribute("citetitle")?`${t.getAttribute("citetitle")} `:null;return t.hasAttribute("attribution")?i=`${i??""}\\(em ${t.getAttribute("attribution")}`:i=null,e.push(`.sp
|
|
1947
|
+
.nf
|
|
1948
|
+
${this.manify(await t.content(),{whitespace:"preserve"})}
|
|
1949
|
+
.fi
|
|
1950
|
+
.br`),i&&e.push(`.in +.5i
|
|
1951
|
+
.ll -.5i
|
|
1952
|
+
${i}
|
|
1953
|
+
.in
|
|
1954
|
+
.ll`),e.join(S)}async convert_video(t){const e=t.hasAttribute("start")?`&start=${t.getAttribute("start")}`:"",i=t.hasAttribute("end")?`&end=${t.getAttribute("end")}`:"";return`${t.hasTitle()?`.sp
|
|
1955
|
+
.B ${this.manify(t.title)}
|
|
1956
|
+
.br`:".sp"}
|
|
1957
|
+
<${t.mediaUri(t.getAttribute("target"))}${e}${i}> (video)`}async convert_inline_anchor(t){const e=t.target;switch(t.type){case"link":{let i,s=e;e.startsWith("mailto:")?(i="MTO",s=e.slice(7)):i="URL";let n=t.text;return n===s?n="":n=n.replace(/"/g,`${j}(dq`),i==="MTO"&&(s=s.replace("@",`${j}(at`)),`${j}c${S}${No}${i} "${s}" "${n}" `}case"xref":{let i=t.text;if(!i){const s=this._refs??=t.document.catalog.refs,n=t.attributes.refid;let o;const l=s[n]??(n?null:o=this._getRootDocument(t));if(l instanceof Ie){const a=this._resolvingXrefs??=new Set;if(a.has(n))i=o?"[^top]":`[${n}]`;else{a.add(n);const c=await l.xreftext(t.getAttribute("xrefstyle",null,!0));a.delete(n),c?(i=c,l.context==="section"&&l.level<2&&i===l.title&&(i=this._uppercasePcdata(i))):i=o?"[^top]":`[${n}]`}}else i=`[${n}]`}return i}case"ref":case"bibref":return"";default:return this.logger.warn(`unknown anchor type: ${t.type}`),null}}async convert_inline_break(t){return`${t.text}${S}${No}br`}async convert_inline_button(t){return`<${j}fB>[${j}0${t.text}${j}0]</${j}fP>`}async convert_inline_callout(t){return`<${j}fB>(${t.text})<${j}fP>`}async convert_inline_footnote(t){const e=t.getAttribute("index");return e?`[${e}]`:t.type==="xref"?`[${t.text}]`:null}async convert_inline_image(t){return t.hasAttribute("link")?`[${t.getAttribute("alt")}] <${t.getAttribute("link")}>`:`[${t.getAttribute("alt")}]`}async convert_inline_indexterm(t){return t.type==="visible"?t.text:""}async convert_inline_kbd(t){const e=t.getAttribute("keys");return`<${j}f(CR>${e.length===1?e[0]:e.join(`${j}0+${j}0`)}</${j}fP>`}async convert_inline_menu(t){const e=`${j}0${j}(fc${j}0`,i=t.getAttribute("menu"),s=t.getAttribute("submenus");if(s&&s.length>0){const n=s.map(o=>`<${j}fI>${o}</${j}fP>`).join(e);return`<${j}fI>${i}</${j}fP>${e}${n}${e}<${j}fI>${t.getAttribute("menuitem")}</${j}fP>`}else return t.getAttribute("menuitem")?`<${j}fI>${i}${e}${t.getAttribute("menuitem")}</${j}fP>`:`<${j}fI>${i}</${j}fP>`}async convert_inline_quoted(t){switch(t.type){case"emphasis":return`<${j}fI>${t.text}</${j}fP>`;case"strong":return`<${j}fB>${t.text}</${j}fP>`;case"monospaced":return`<${j}f(CR>${t.text}</${j}fP>`;case"single":return`<${j}(oq>${t.text}</${j}(cq>`;case"double":return`<${j}(lq>${t.text}</${j}(rq>`;default:return t.text}}static async writeAlternatePages(t,e,i){if(!t||t.length<=1)return;t=t.slice(1);const s=`.${e}`,{dirname:n,basename:o,join:l}=await St(async()=>{const{dirname:f,basename:h,join:p}=await import("./__vite-browser-external-D7Ct-6yo.js").then(d=>d._);return{dirname:f,basename:h,join:p}},[],import.meta.url),{writeFile:a}=await St(async()=>{const{writeFile:f}=await import("./__vite-browser-external-D7Ct-6yo.js").then(h=>h._);return{writeFile:f}},[],import.meta.url),c=n(i),u=o(i);for(const f of t)await a(l(c,`${f}${s}`),`.so ${u}`)}_appendFootnotes(t,e){if(!(!e.hasFootnotes()||e.hasAttribute("nofootnotes"))){t.push('.SH "NOTES"');for(const i of e.footnotes){t.push(`.IP [${i.index}]`);let s=i.text;s.includes(`${is}\\c ${is}.`)?s=this.manify(`${s.replace(tp,`$1${S}$2`)} `,{whitespace:"normalize"}).replace(/ $/,""):s=this.manify(s,{whitespace:"normalize"}),t.push(s)}}}manify(t,e={}){const i=e.whitespace??"collapse";return i==="preserve"?t=t.replace(/\t/g,Qf).replace(/ {2,}/g,(s,n,o)=>n===0||o[n-1]===`
|
|
1958
|
+
`?s:`${j}&${s}`):i==="normalize"?t=t.replace(np,S):t=t.replace(/[\n\t ]+/g," "),t=t.replace(Kf,(s,n)=>n?s:"\\(rs").replace(sp,".\\|.\\|.").replace(Zf,"\\&.").replace(Jf,(s,n,o,l)=>{const a=l.trimStart();return a===""?`.${n}"${o}"`:`.${n}"${o.trimEnd()}"
|
|
1959
|
+
${a}`}).replace(/-/g,"\\-").replace(/</g,"<").replace(/>/g,">").replace(/+/g,"+").replace(/ /g,"\\~").replace(/©/g,"\\(co").replace(/®/g,"\\(rg").replace(/™/g,"\\(tm").replace(/°/g,"\\(de").replace(/ /g," ").replace(/–/g,"\\(en").replace(ip,"\\(em").replace(/‘/g,"\\(oq").replace(/’/g,"\\(cq").replace(/“/g,"\\(lq").replace(/”/g,"\\(rq").replace(/←/g,"\\(<-").replace(/→/g,"\\(->").replace(/⇐/g,"\\(lA").replace(/⇒/g,"\\(rA").replace(/​/g,"\\:").replace(/&/g,"&").replace(/'/g,"\\*(Aq").replace(ep,"$1").replace(/\u001b\\/g,"\\").replace(/\u001b\./g,".").trimEnd(),e.append_newline?`${t}${S}`:t}_uppercasePcdata(t){return rp.test(t)?t.replace(op,(e,i,s)=>s?s.toUpperCase():i):t.toUpperCase()}async _encloseContent(t){return t.contentModel==="compound"?await t.content():`.sp
|
|
1960
|
+
${this.manify(await t.content(),{whitespace:"normalize"})}`}_getRootDocument(t){for(;(t=t.document).isNested();)t=t.parentDocument;return t}}Ea.registerFor("manpage");const ap=Object.freeze({__proto__:null,default:Ea}),lp=["style","form","input","button","textarea","select","iframe","object","embed","video","audio","link","meta","base"];async function dp(r,t){const e=t==="asciidoc"?String(await xf(r,{safe:"secure",standalone:!1,attributes:{showtitle:"",icons:null}})):await V.parse(r,{gfm:!0});return Wc.sanitize(e,{FORBID_TAGS:lp,FORBID_ATTR:["style"]})}export{dp as documentHtml_build};
|