@mcpjam/inspector 3.12.8 → 3.13.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.
Files changed (48) hide show
  1. package/bin/start.js +32 -6
  2. package/dist/client/assets/OAuthDesktopReturnNotice-BZEaGzn6.css +2 -0
  3. package/dist/client/assets/{OAuthDesktopReturnNotice-DABzFg0y.js → OAuthDesktopReturnNotice-D5tJNqny.js} +5 -5
  4. package/dist/client/assets/{app-bootstrap-C2vVITe1.js → app-bootstrap-baadQQNk.js} +354 -371
  5. package/dist/client/assets/button-DHPqnOj6.js +3 -0
  6. package/dist/client/assets/chunk-D32TOXHM-BPB6AqSK.js +160 -0
  7. package/dist/client/assets/dead-clicks-autocapture-Cbczl2El.js +3 -0
  8. package/dist/client/assets/error-reporting-B4hGM_ob.js +1 -0
  9. package/dist/client/assets/error-reporting-CORfsjyM.js +120 -0
  10. package/dist/client/assets/{exception-autocapture-DDYbbF4x.js → exception-autocapture-CMOUrnel.js} +4 -4
  11. package/dist/client/assets/{failed-request-tracker-DTcEBfel.js → failed-request-tracker-DoQRXuIy.js} +2 -2
  12. package/dist/client/assets/highlighted-body-KQOG7T2V-_ljE4u1k.js +3 -0
  13. package/dist/client/assets/index-BBr8TZVx.js +4 -0
  14. package/dist/client/assets/{jszip.min-CUbyF_hU.js → jszip.min-C-vIQbxH.js} +2 -2
  15. package/dist/client/assets/mermaid-MCJ5UELQ-DTJaEEBm.js +1 -0
  16. package/dist/client/assets/posthog-recorder-Dby9Z8HR.js +110 -0
  17. package/dist/client/assets/preload-helper-Dvt1a6xa.js +3 -0
  18. package/dist/client/assets/react-CD7Pk4KS.js +3 -0
  19. package/dist/client/assets/{rolldown-runtime-DFaaNfet.js → rolldown-runtime-mzU9SaVm.js} +1 -1
  20. package/dist/client/assets/surveys-DYqpu8xl.js +3 -0
  21. package/dist/client/assets/trace-timeline-PnE1ouRj.js +71 -0
  22. package/dist/client/assets/trace-timeline-WXINST5z.js +1 -0
  23. package/dist/client/assets/{web-vitals-DGvwJdv7.js → web-vitals-BLq6M5vx.js} +2 -2
  24. package/dist/client/index.html +8 -7
  25. package/dist/server/{chunk-ER75CVTG.js → chunk-2FVSBJQF.js} +1470 -890
  26. package/dist/server/chunk-I7ZVTBZP.js +3100 -0
  27. package/dist/server/{chunk-SH24KJBI.js → chunk-MBS3EZ3U.js} +13 -2
  28. package/dist/server/{chunk-4PYR7GMQ.js → chunk-QHYREDE3.js} +4 -4
  29. package/dist/server/{consent-lifetime-M7PS6RUU.js → consent-lifetime-TYLDY64H.js} +3 -3
  30. package/dist/server/harness-install-cli.js +23 -6
  31. package/dist/server/index.js +17396 -14802
  32. package/dist/server/{local-turn-SXHFOZVA.js → local-turn-VQDSTY6T.js} +4 -4
  33. package/package.json +39 -39
  34. package/dist/client/assets/OAuthDesktopReturnNotice-B_x9xTE-.css +0 -2
  35. package/dist/client/assets/button-CR0c6NYb.js +0 -3
  36. package/dist/client/assets/chunk-YOKDWASO-C2OuyPZY.js +0 -145
  37. package/dist/client/assets/dead-clicks-autocapture-DuT1rKSM.js +0 -3
  38. package/dist/client/assets/error-reporting-CpBaShLK.js +0 -102
  39. package/dist/client/assets/error-reporting-DGKAyE3H.js +0 -1
  40. package/dist/client/assets/highlighted-body-KPVGNVTW-BTjtAEXQ.js +0 -3
  41. package/dist/client/assets/index-Cp_KMvUf.js +0 -4
  42. package/dist/client/assets/mermaid-HWGCJPDP-CmCtP4Dv.js +0 -1
  43. package/dist/client/assets/posthog-recorder-D05rTwSB.js +0 -110
  44. package/dist/client/assets/preload-helper-Bbq9_x_H.js +0 -3
  45. package/dist/client/assets/surveys-C6jQxZ__.js +0 -3
  46. package/dist/client/assets/trace-timeline-B4-o8QjE.js +0 -1
  47. package/dist/client/assets/trace-timeline-DuWo46vf.js +0 -137
  48. package/dist/server/chunk-HHMYIKER.js +0 -2876
@@ -0,0 +1,160 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-KQOG7T2V-_ljE4u1k.js","assets/rolldown-runtime-mzU9SaVm.js","assets/react-CD7Pk4KS.js","assets/preload-helper-Dvt1a6xa.js"])))=>i.map(i=>d[i]);
2
+ import{o as pn,r as cl,t as Sr}from"./rolldown-runtime-mzU9SaVm.js";import{t as xu}from"./react-CD7Pk4KS.js";import{a as Cu,i as Nu,n as ul,r as hl,t as fl}from"./preload-helper-Dvt1a6xa.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.13.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e46113d7-bdab-4b4e-9e65-78885bfab52c",e._sentryDebugIdIdentifier="sentry-dbid-e46113d7-bdab-4b4e-9e65-78885bfab52c")}catch{}})();var x=pn(xu(),1),Ii=pn(Cu(),1),T=Nu();function vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Rt=vi();function dl(e){Rt=e}var Nt={exec:()=>null};function Ft(e){let t=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=t[n];return i||(i=e(n),t[n]=i),i}}function Z(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(xe.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var Su=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),xe={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}));/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:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ft(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:</?(?:${vr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}>`))},Iu=/^(?:[ \t]*(?:\n|$))+/,vu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,wu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ir=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Lu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ml=Z(pl).replace(/bull/g,wi).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(),Ru=Z(pl).replace(/bull/g,wi).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(),Li=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ou=/^[^\n]+/,Ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Du=Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ri).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Pu=Z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wi).getRegex(),vr="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",Oi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Mu=Z("^ {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-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Oi).replace("tag",vr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gl=e=>Z(Li).replace("hr",Ir).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",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Bu=gl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Fu=gl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Di={blockquote:Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fu).getRegex(),code:vu,def:Du,fences:wu,heading:Lu,hr:Ir,html:Mu,lheading:ml,list:Pu,newline:Iu,paragraph:Bu,table:Nt,text:Ou},da=Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ir).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Hu={...Di,lheading:Ru,table:da,paragraph:Z(Li).replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",da).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex()},Uu={...Di,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oi).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:Nt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(Li).replace("hr",Ir).replace("heading",` *#{1,6} *[^
3
+ ]`).replace("lheading",ml).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$u=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ju=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,El=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,zu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,lt=/[\p{P}\p{S}]/u,Gt=/[\s\p{P}\p{S}]/u,wr=/[^\s\p{P}\p{S}]/u,Yu=Z(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gt).getRegex(),qu=/[\p{Pi}\p{Ps}"']/u,Tl=/(?!~)[\p{P}\p{S}]/u,Vu=/(?!~)[\s\p{P}\p{S}]/u,Wu=/(?:[^\s\p{P}\p{S}]|~)/u,Qu=Z(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Su?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Gu=Z(bl,"u").replace(/punct/g,lt).getRegex(),Ku=Z(bl,"u").replace(/punct/g,Tl).getRegex(),Xu=Z(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,qu).replace(/punct/g,lt).getRegex(),kl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zu=Z(kl,"gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),Ju=Z(kl,"gu").replace(/notPunctSpace/g,Wu).replace(/punctSpace/g,Vu).replace(/punct/g,Tl).getRegex(),eh=Z("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),th=Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),rh=Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),nh=Z(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,lt).getRegex(),ih=Z("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),ah=Z(/\\(punct)/,"gu").replace(/punct/g,lt).getRegex(),sh=Z(/^<(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(),lh=Z(Oi).replace("(?:-->|$)","-->").getRegex(),oh=Z("^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",lh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_l=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,rn=Z(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",_l).getRegex(),ch=Z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",rn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uh=Z(/^!?\[(label)\]\[(ref)\]/).replace("label",rn).replace("ref",Ri).getRegex(),hh=Z(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ri).getRegex(),pa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,fh=Z(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",_l).getRegex(),dh=Z("reflink|nolink(?!\\()","g").replace("reflink",Z(/^!?\[(label)\]\[(ref)\]/).replace("label",fh).replace("ref",pa).getRegex()).replace("nolink",Z(/^!?\[(ref)\](?:\[\])?/).replace("ref",pa).getRegex()).getRegex(),ma=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ph=Z(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Pi={_backpedal:Nt,anyPunctuation:ah,autolink:sh,blockSkip:Qu,br:El,code:ju,del:Nt,delLDelim:Nt,delRDelim:Nt,emStrongLDelim:Gu,emStrongRDelimAst:Zu,emStrongRDelimUnd:th,escape:$u,link:ch,nolink:hh,punctuation:Yu,reflink:uh,reflinkSearch:dh,tag:oh,text:zu,url:Nt},mh={...Pi,emStrongLDelim:Xu,emStrongRDelimAst:eh,emStrongRDelimUnd:rh,link:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",rn).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rn).getRegex()},ei={...Pi,emStrongRDelimAst:Ju,emStrongLDelim:Ku,delLDelim:nh,delRDelim:ih,url:Z(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",ph).replace("protocol",ma).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:Z(/^(?:[^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",ma).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},gh={...ei,br:Z(El).replace("{2,}","*").getRegex(),text:Z(ei.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zr={normal:Di,gfm:Hu,pedantic:Uu},sr={normal:Pi,gfm:ei,breaks:gh,pedantic:mh},Eh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ga=e=>Eh[e];function Ue(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,ga)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,ga);return e}function Th(e){return e.replace(xe.numericCharacterReference,(t,r,n)=>{let i=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return i===0||i>1114111||i>=55296&&i<=57343?"�":String.fromCodePoint(i)})}function Ea(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Ta(e,t){let r=e.replace(xe.findPipe,(i,a,s)=>{let l=!1,o=a;for(;--o>=0&&s[o]==="\\";)l=!l;return l?"|":" |"}).split(xe.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(xe.slashPipe,"|");return r}function ft(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n;){let a=e.charAt(n-i-1);if(a===t&&!r)i++;else if(a!==t&&r)i++;else break}return e.slice(0,n-i)}function ba(e){let t=e.split(`
4
+ `),r=t.length-1;for(;r>=0&&xe.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
5
+ `)}function nn(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function bh(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function ka(e,t=0){let r=t,n="";for(let i of e)if(i===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=i,r++;return n}function _a(e,t,r,n,i){let a=t.href,s=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1"),o=e[0].charAt(0)==="!";n.state.inLink=!0;let u=n.state.linkEmitted,h=n.state.inRawBlock;n.state.linkEmitted=!1;let f=n.inlineTokens(l),p=n.state.linkEmitted;if(n.state.linkEmitted=u,n.state.inLink=!1,!o){if(p){n.state.inRawBlock=h;return}n.state.linkEmitted=!0}return{type:o?"image":"link",raw:r,href:a,title:s,text:l,tokens:f}}function kh(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
6
+ `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[l]=s;return a.slice(Math.min(l.length,i.length))}).join(`
7
+ `)}function Aa(e,t,r,n){if(!t.includes("<"))return!1;for(let i=0;i<t.length;i++){if(t[i]==="\\"){i++;continue}if(t[i]==="`"){let l=n.inline.code.exec(t.slice(i));if(l){i+=l[0].length-1;continue}}if(t[i]!=="<")continue;let a=e.slice(r+i),s=n.inline.tag.exec(a)||n.inline.autolink.exec(a);if(s){if(s[0].length>t.length-i)return!0;i+=s[0].length-1}}return!1}var an=class{options;rules;lexer;constructor(e){this.options=e||Rt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=this.options.pedantic?t[0]:ba(t[0]);return{type:"code",raw:r,codeBlockStyle:"indented",text:r.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=kh(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=ft(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(r=n.trim())}return{type:"heading",raw:ft(t[0],`
8
+ `),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ft(t[0],`
9
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=ft(t[0],`
10
+ `).split(`
11
+ `),n="",i="",a=[];for(;r.length>0;){let s=!1,l=[],o=0;for(;o<r.length;o++)if(this.rules.other.blockquoteStart.test(r[o]))l.push(r[o]),s=!0;else if(!s)l.push(r[o]);else break;r=r.slice(o);let u=l.join(`
12
+ `),h=u.replace(this.rules.other.blockquoteSetextReplace,`
13
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
14
+ ${u}`:u,i=i?`${i}
15
+ ${h}`:h;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=f,r.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let d=p,g=r.join(`
16
+ `),N=d.raw+`
17
+ `+g.replace(this.rules.other.blockquoteSetextReplace2,""),C=this.blockquote(N);a[a.length-1]=C;let _=N.substring(C.raw.length).replace(/^\n/,""),v=_?_.split(`
18
+ `).length:0,y=v?r.slice(0,-v):r;y.length>0&&(n=`${n}
19
+ ${y.join(`
20
+ `)}`),i=i.substring(0,i.length-d.text.length)+C.text;break}else if(p?.type==="list"){let d=p,g=d.raw+`
21
+ `+r.join(`
22
+ `),N=this.list(g);a[a.length-1]=N,n=n.substring(0,n.length-p.raw.length)+N.raw,i=i.substring(0,i.length-d.raw.length)+N.raw,r=g.substring(a.at(-1).raw.length).split(`
23
+ `);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;e;){let o=!1,u="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let f=t[2].split(`
24
+ `,1)[0],p=t[1].length,d=this.options.pedantic?ka(f,p):f.replace(this.rules.other.leadingSpaceTab,_=>ka(_,p)),g=e.split(`
25
+ `,1)[0],N=!d.trim(),C=0;if(this.options.pedantic?(C=2,h=d.trimStart()):N?C=p+1:(C=d.search(this.rules.other.nonSpaceChar),C=C>4?1:C,h=d.slice(C),C+=p),N&&this.rules.other.blankLine.test(g)&&(u+=g+`
26
+ `,e=e.substring(g.length+1),o=!0),!o){let _=this.rules.other.nextBulletRegex(C),v=this.rules.other.hrRegex(C),y=this.rules.other.fencesBeginRegex(C),D=this.rules.other.headingBeginRegex(C),F=this.rules.other.htmlBeginRegex(C),w=this.rules.other.blockquoteBeginRegex(C);for(;e;){let $=e.split(`
27
+ `,1)[0],j;if(g=$,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),j=g):j=g.replace(this.rules.other.leadingSpaceTab,q=>q.replace(this.rules.other.tabCharGlobal," ")),y.test(g)||D.test(g)||F.test(g)||w.test(g)||_.test(g)||v.test(g))break;if(j.search(this.rules.other.nonSpaceChar)>=C||!g.trim())h+=`
28
+ `+j.slice(C);else{if(N||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(d)||D.test(d)||v.test(d))break;h+=`
29
+ `+g}N=!g.trim(),u+=$+`
30
+ `,e=e.substring($.length+1),d=j.slice(C)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=u}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items)if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),!i.loose){let u=o.tokens.filter(h=>h.type==="space");i.loose=u.length>0&&u.some(h=>this.rules.other.anyLine.test(h.raw))}for(let o of i.items){let u=o.tokens[0];if(o.task&&(u?.type==="text"||u?.type==="paragraph")){o.text=o.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}let h=this.rules.other.listTaskCheckbox.exec(o.raw);if(h){let f={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};o.checked=f.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=f.raw+o.tokens[0].raw,o.tokens[0].text=f.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(f)):o.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):o.tokens.unshift(f)}}else o.task&&(o.task=!1)}if(i.loose)for(let o of i.items){o.loose=!0;for(let u of o.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=ba(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=nn(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:ft(t[0],`
31
+ `),href:n,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Ta(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
+ `):[],a={type:"table",raw:ft(t[0],`
33
+ `),header:[],align:[],rows:[]};if(r.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<r.length;s++)a.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(Ta(s,a.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:ft(t[0],`
34
+ `),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
35
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);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(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Aa(e,t[1],r,this.rules))return;let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=ft(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=bh(t[2],"()");if(s===-2)return;if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let i=t[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),_a(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Aa(e,r[1],n,this.rules))return;let i=t[nn((r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "))];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return _a(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,l=i,o=0,u=n[0][0],h=r===u,f=u==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+i);(n=f.exec(t))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(s=[...a].length,n[3]||n[4]){l+=s;continue}else if(n[5]||n[6]){if(i%3&&!((i+s)%3)){o+=s;continue}if(h)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+o);let p=[...n[0]][0].length,d=e.slice(0,i+n.index+p+s);if(Math.min(i,s)%2){let N=d.slice(1,-1);return{type:"em",raw:d,text:N,tokens:this.lexer.inlineTokens(N)}}let g=d.slice(2,-2);return{type:"strong",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,l=i,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+i);(n=o.exec(t))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(s=[...a].length,s!==i))continue;if(n[3]||n[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let u=[...n[0]][0].length,h=e.slice(0,i+n.index+u+s),f=h.slice(i,-i);return{type:"del",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:r?t[0]:Th(t[0]),escaped:r}}}},ze=class ti{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Rt,this.options.tokenizer=this.options.tokenizer||new an,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let r={other:xe,block:zr.normal,inline:sr.normal};this.options.pedantic?(r.block=zr.pedantic,r.inline=sr.pedantic):this.options.gfm&&(r.block=zr.gfm,this.options.breaks?r.inline=sr.breaks:r.inline=sr.gfm),this.tokenizer.rules=r}static get rules(){return{block:zr,inline:sr}}static lex(t,r){return new ti(r).lex(t)}static lexInline(t,r){return new ti(r).inlineTokens(t)}lex(t){t=t.replace(xe.carriageReturn,`
36
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(xe.tabCharGlobal," ").replace(xe.spaceLine,""));let i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let a;if(this.options.extensions?.block?.some(l=>(a=l.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let l=r.at(-1);a.raw.length===1&&l!==void 0?l.raw+=`
37
+ `:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let l=r.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
38
+ `)?"":`
39
+ `)+a.raw,l.text+=`
40
+ `+a.text,this.inlineQueue.at(-1).src=l.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let l=r.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
41
+ `)?"":`
42
+ `)+a.raw,l.text+=`
43
+ `+a.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let s=t;if(this.options.extensions?.startBlock){let l=1/0,o=t.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},o),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(s=t.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let l=r.at(-1);n&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
44
+ `)?"":`
45
+ `)+a.raw,l.text+=`
46
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(a),n=s.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let l=r.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
47
+ `)?"":`
48
+ `)+a.raw,l.text+=`
49
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(a);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}linkInText(t){if(!t.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let n of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(n[0])&&t.charAt(n.index-1)!=="!")return!0;for(let n of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],a=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,nn(i.slice(a+1,-1))))&&!(a>1&&this.linkInText(i.slice(1,a-1))))return!0}return!1}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let n=t;if(this.tokens.links&&t.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,o=u=>{let h=u.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,nn(u.slice(h+1,-1))))return u;if(h>1&&u.charAt(0)!=="!"){let f=u.slice(1,h-1);if(this.linkInText(f))return"["+f.replace(l,o)+"]["+"a".repeat(u.length-h-2)+"]"}return"["+"a".repeat(u.length-2)+"]"};n=n.replace(l,o)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(l,o,u)=>{let h=u?u.length:0;return l.slice(0,h)+"["+"a".repeat(l.length-h-2)+"]"}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let i=!1,a="",s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}i||(a=""),i=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=r.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,a)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t,n,a)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let o=t;if(this.options.extensions?.startInline){let u=1/0,h=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(o=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(o)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),i=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(this.options.silent)console.error(r);else throw new Error(r)}},sn=class{options;parser;constructor(e){this.options=e||Rt}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(xe.notSpaceStart)?.[0],i=e?e.replace(xe.endingNewline,"")+`
50
+ `:"";return n?'<pre><code class="language-'+Ue(n)+'">'+(r?i:Ue(i,!0))+`</code></pre>
51
+ `:"<pre><code>"+(r?i:Ue(i,!0))+`</code></pre>
52
+ `}blockquote({tokens:e}){return`<blockquote>
53
+ ${this.parser.parse(e)}</blockquote>
54
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
55
+ `}hr(e){return`<hr>
56
+ `}list(e){let t=e.ordered,r=e.start,n="";for(let s=0;s<e.items.length;s++){let l=e.items[s];n+=this.listitem(l)}let i=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+i+a+`>
57
+ `+n+"</"+i+`>
58
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
59
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
60
+ `}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let a=e.rows[i];r="";for(let s=0;s<a.length;s++)r+=this.tablecell(a[s]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
61
+ <thead>
62
+ `+t+`</thead>
63
+ `+n+`</table>
64
+ `}tablerow({text:e}){return`<tr>
65
+ ${e}</tr>
66
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
67
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ue(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:r,tokens:n,autolink:i}){let a=i?Ue(r,!0):this.parser.parseInline(n),s=Ea(e);if(s===null)return a;e=Ue(s,i);let l='<a href="'+e+'"';return t&&(l+=' title="'+Ue(t)+'"'),l+=">"+a+"</a>",l}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=Ea(e);if(i===null)return Ue(r);e=i;let a=`<img src="${Ue(e)}" alt="${Ue(r)}"`;return t&&(a+=` title="${Ue(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ue(e.text)}},Mi=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Qe=class ri{options;renderer;textRenderer;constructor(t){this.options=t||Rt,this.options.renderer=this.options.renderer||new sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mi}static parse(t,r){return new ri(r).parse(t)}static parseInline(t,r){return new ri(r).parseInline(t)}parse(t){this.renderer.parser=this;let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let s=i,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){r+=l||"";continue}}let a=i;switch(a.type){case"space":r+=this.renderer.space(a);break;case"hr":r+=this.renderer.hr(a);break;case"heading":r+=this.renderer.heading(a);break;case"code":r+=this.renderer.code(a);break;case"table":r+=this.renderer.table(a);break;case"blockquote":r+=this.renderer.blockquote(a);break;case"list":r+=this.renderer.list(a);break;case"checkbox":r+=this.renderer.checkbox(a);break;case"html":r+=this.renderer.html(a);break;case"def":r+=this.renderer.def(a);break;case"paragraph":r+=this.renderer.paragraph(a);break;case"text":r+=this.renderer.text(a);break;default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(t,r=this.renderer){this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(a.type)){n+=l||"";continue}}let s=a;switch(s.type){case"escape":n+=r.text(s);break;case"html":n+=r.html(s);break;case"link":n+=r.link(s);break;case"image":n+=r.image(s);break;case"checkbox":n+=r.checkbox(s);break;case"strong":n+=r.strong(s);break;case"em":n+=r.em(s);break;case"codespan":n+=r.codespan(s);break;case"br":n+=r.br(s);break;case"del":n+=r.del(s);break;case"text":n+=r.text(s);break;default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},fr=class{options;block;constructor(e){this.options=e||Rt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ze.lex:ze.lexInline}provideParser(e=this.block){return e?Qe.parse:Qe.parseInline}},_h=class{defaults=vi();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Qe;Renderer=sn;TextRenderer=Mi;Lexer=ze;Tokenizer=an;Hooks=fr;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let i=n;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,t));for(let a of i.rows)for(let s of a)r=r.concat(this.walkTokens(s.tokens,t));break}case"list":{let i=n;r=r.concat(this.walkTokens(i.items,t));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new sn(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],o=i[s];i[s]=(...u)=>{let h=l.apply(i,u);return h===!1&&(h=o.apply(i,u)),h||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new an(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],o=i[s];i[s]=(...u)=>{let h=l.apply(i,u);return h===!1&&(h=o.apply(i,u)),h}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new fr;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],o=i[s];fr.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async&&fr.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(i,u);return o.call(i,f)})();let h=l.call(i,u);return o.call(i,h)}:i[s]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(i,u);return f===!1&&(f=await o.apply(i,u)),f})();let h=l.apply(i,u);return h===!1&&(h=o.apply(i,u)),h}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ze.lex(e,t??this.defaults)}parser(e,t){return Qe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,l=await(i.hooks?await i.hooks.provideLexer(e):e?ze.lex:ze.lexInline)(s,i),o=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(e):e?Qe.parse:Qe.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer(e):e?ze.lex:ze.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(e):e?Qe.parse:Qe.parseInline)(s,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=`
68
+ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+Ue(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},vt=new _h;function ue(e,t){return vt.parse(e,t)}ue.options=ue.setOptions=function(e){return vt.setOptions(e),ue.defaults=vt.defaults,dl(ue.defaults),ue};ue.getDefaults=vi;ue.defaults=Rt;function Ah(...e){return vt.use(...e),ue.defaults=vt.defaults,dl(ue.defaults),ue}ue.use=Ah;ue.walkTokens=function(e,t){return vt.walkTokens(e,t)};ue.parseInline=vt.parseInline;ue.Parser=Qe;ue.parser=Qe.parse;ue.Renderer=sn;ue.TextRenderer=Mi;ue.Lexer=ze;ue.lexer=ze.lex;ue.Tokenizer=an;ue.Hooks=fr;ue.parse=ue;var _y=ue.options,Ay=ue.setOptions,yy=ue.walkTokens,xy=ue.parseInline,Cy=Qe.parse,Ny=ze.lex,mn=(function(e){if(e==null)return Nh;if(typeof e=="function")return gn(e);if(typeof e=="object")return Array.isArray(e)?yh(e):xh(e);if(typeof e=="string")return Ch(e);throw new Error("Expected function, string, or object as test")});function yh(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=mn(e[r]);return gn(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function xh(e){const t=e;return gn(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Ch(e){return gn(t);function t(r){return r&&r.type===e}}function gn(e){return t;function t(r,n,i){return!!(Sh(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Nh(){return!0}function Sh(e){return e!==null&&typeof e=="object"&&"type"in e}var Al=[];var jt="skip";function En(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=mn(i),s=n?-1:1;l(e,void 0,[])();function l(o,u,h){const f=o&&typeof o=="object"?o:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Al,g,N,C;if((!t||a(o,u,h[h.length-1]||void 0))&&(d=Ih(r(o,h)),d[0]===!1))return d;if("children"in o&&o.children){const _=o;if(_.children&&d[0]!=="skip")for(N=(n?_.children.length:-1)+s,C=h.concat(_);N>-1&&N<_.children.length;){const v=_.children[N];if(g=l(v,N,C)(),g[0]===!1)return g;N=typeof g[1]=="number"?g[1]:N+s}}return d}}}function Ih(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?Al:[e]}function Ve(e,t,r,n){let i,a,s;typeof t=="function"&&typeof r!="function"?(a=void 0,s=t,i=r):(a=t,s=r,i=n),En(e,a,l,i);function l(o,u){const h=u[u.length-1],f=h?h.children.indexOf(o):void 0;return s(o,f,h)}}var Vt={indicator:"indicator",textOnly:"text-only",remove:"remove"};function vh({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:l=Vt.indicator,imageBlockPolicy:o=Vt.indicator}){const u=t.length&&!t.every(f=>f==="*"),h=r.length&&!r.every(f=>f==="*");if(!e&&(u||h))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const p=Ph(e,t,r,n,i,a,s,l,o);yl(f),Ve(f,p)}}function ya(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function wh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}var Lh=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Rh=new Set(["javascript:","data:","file:","vbscript:"]);function xa(e,t,r,n=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const o=e.substring(5);if(o&&o.length>0&&o!=="invalid")return e}}catch{return null}return null}const s=ya(e,r);if(!s||Rh.has(s.protocol)||!(Lh.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=wh(e);return s&&t.some(o=>{const u=ya(o,r);return!u||u.origin!==s.origin?!1:s.href.startsWith(u.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}function yl(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)yl(t)}}var Ln=Symbol("node-seen");function Oh(e,t,r){return t===Vt.remove?{type:"remove"}:t===Vt.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Dh(e,t,r){if(t===Vt.remove)return{type:"remove"};if(t===Vt.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}var Ph=(e,t,r,n,i,a,s,l,o)=>{const u=(h,f,p)=>{if(h.type!=="element"||h[Ln])return!0;if(h.tagName==="a"){const d=xa(h.properties.href,t,e,!1,!1,i);if(d===null){if(h[Ln]=!0,Ve(h,u),p&&typeof f=="number"){const g=Oh(h,l,s);if(g.type==="remove")return p.children.splice(f,1),[jt,f];p.children[f]=g.element}return jt}else return h.properties.href=d,h.properties.target="_blank",h.properties.rel="noopener noreferrer",!0}if(h.tagName==="img"){const d=xa(h.properties.src,r,e,n,!0,i);if(d===null){if(h[Ln]=!0,Ve(h,u),p&&typeof f=="number"){const g=Dh(h,o,a);if(g.type==="remove")return p.children.splice(f,1),[jt,f];p.children[f]=g.element}return jt}else return h.properties.src=d,!0}return!0};return u},Ca=typeof self=="object"?self:globalThis,Mh=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case 0:case-1:return r(s,i);case 1:{const l=r([],i);for(const o of s)l.push(n(o));return l}case 2:{const l=r({},i);for(const[o,u]of s)l[n(o)]=n(u);return l}case 3:return r(new Date(s),i);case 4:{const{source:l,flags:o}=s;return r(new RegExp(l,o),i)}case 5:{const l=r(new Map,i);for(const[o,u]of s)l.set(n(o),n(u));return l}case 6:{const l=r(new Set,i);for(const o of s)l.add(n(o));return l}case 7:{const{name:l,message:o}=s;return r(new Ca[l](o),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return r(new DataView(l),s)}}return r(new Ca[a](s),i)};return n},Na=e=>Mh(new Map,e)(0),Ht="",{toString:Bh}={},{keys:Fh}=Object,lr=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const r=Bh.call(e).slice(8,-1);switch(r){case"Array":return[1,Ht];case"Object":return[2,Ht];case"Date":return[3,Ht];case"RegExp":return[4,Ht];case"Map":return[5,Ht];case"Set":return[6,Ht];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},Yr=([e,t])=>e===0&&(t==="function"||t==="symbol"),Hh=(e,t,r,n)=>{const i=(s,l)=>{const o=n.push(s)-1;return r.set(l,o),o},a=s=>{if(r.has(s))return r.get(s);let[l,o]=lr(s);switch(l){case 0:{let h=s;switch(o){case"bigint":l=8,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([-1],s)}return i([l,h],s)}case 1:{if(o){let p=s;return o==="DataView"?p=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(s)),i([o,[...p]],s)}const h=[],f=i([l,h],s);for(const p of s)h.push(a(p));return f}case 2:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],f=i([l,h],s);for(const p of Fh(s))(e||!Yr(lr(s[p])))&&h.push([a(p),a(s[p])]);return f}case 3:return i([l,s.toISOString()],s);case 4:{const{source:h,flags:f}=s;return i([l,{source:h,flags:f}],s)}case 5:{const h=[],f=i([l,h],s);for(const[p,d]of s)(e||!(Yr(lr(p))||Yr(lr(d))))&&h.push([a(p),a(d)]);return f}case 6:{const h=[],f=i([l,h],s);for(const p of s)(e||!Yr(lr(p)))&&h.push(a(p));return f}}const{message:u}=s;return i([l,{name:o,message:u}],s)};return a},Sa=(e,{json:t,lossy:r}={})=>{const n=[];return Hh(!(t||r),!!t,new Map,n)(e),n},wt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Na(Sa(e,t)):structuredClone(e):(e,t)=>Na(Sa(e,t));var Lr=class{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}};Lr.prototype.normal={};Lr.prototype.property={};Lr.prototype.space=void 0;function xl(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Lr(r,n,t)}function yr(e){return e.toLowerCase()}var Be=class{constructor(e,t){this.attribute=t,this.property=e}};Be.prototype.attribute="";Be.prototype.booleanish=!1;Be.prototype.boolean=!1;Be.prototype.commaOrSpaceSeparated=!1;Be.prototype.commaSeparated=!1;Be.prototype.defined=!1;Be.prototype.mustUseProperty=!1;Be.prototype.number=!1;Be.prototype.overloadedBoolean=!1;Be.prototype.property="";Be.prototype.spaceSeparated=!1;Be.prototype.space=void 0;var ni=cl({boolean:()=>J,booleanish:()=>be,commaOrSpaceSeparated:()=>$e,commaSeparated:()=>Yt,number:()=>B,overloadedBoolean:()=>ii,spaceSeparated:()=>fe}),Uh=0,J=Ot(),be=Ot(),ii=Ot(),B=Ot(),fe=Ot(),Yt=Ot(),$e=Ot();function Ot(){return 2**++Uh}var Rn=Object.keys(ni),Bi=class extends Be{constructor(e,t,r,n){let i=-1;if(super(e,t),Ia(this,"space",n),typeof r=="number")for(;++i<Rn.length;){const a=Rn[i];Ia(this,Rn[i],(r&ni[a])===ni[a])}}};Bi.prototype.defined=!0;function Ia(e,t,r){r&&(e[t]=r)}function Kt(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new Bi(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[yr(n)]=n,r[yr(a.attribute)]=n}return new Lr(t,r,e.space)}var Cl=Kt({properties:{ariaActiveDescendant:null,ariaAtomic:be,ariaAutoComplete:null,ariaBusy:be,ariaChecked:be,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:fe,ariaCurrent:null,ariaDescribedBy:fe,ariaDetails:null,ariaDisabled:be,ariaDropEffect:fe,ariaErrorMessage:null,ariaExpanded:be,ariaFlowTo:fe,ariaGrabbed:be,ariaHasPopup:null,ariaHidden:be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fe,ariaLevel:B,ariaLive:null,ariaModal:be,ariaMultiLine:be,ariaMultiSelectable:be,ariaOrientation:null,ariaOwns:fe,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:be,ariaReadOnly:be,ariaRelevant:null,ariaRequired:be,ariaRoleDescription:fe,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:be,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nl(e,t){return t in e?e[t]:t}function Sl(e,t){return Nl(e,t.toLowerCase())}var $h=Kt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yt,acceptCharset:fe,accessKey:fe,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:fe,autoFocus:J,autoPlay:J,blocking:fe,capture:null,charSet:null,checked:J,cite:null,className:fe,cols:B,colSpan:null,content:null,contentEditable:be,controls:J,controlsList:fe,coords:B|Yt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:ii,draggable:be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:fe,height:B,hidden:ii,high:B,href:null,hrefLang:null,htmlFor:fe,httpEquiv:fe,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:fe,itemRef:fe,itemScope:J,itemType:fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:J,optimum:B,pattern:null,ping:fe,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:fe,required:J,reversed:J,rows:B,rowSpan:B,sandbox:fe,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:be,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fe,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:be,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:J,disableRemotePlayback:J,prefix:null,property:null,results:B,security:null,unselectable:null},space:"html",transform:Sl}),jh=Kt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$e,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Yt,g2:Yt,glyphName:Yt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:$e,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$e,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$e,rev:$e,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$e,requiredFeatures:$e,requiredFonts:$e,requiredFormats:$e,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:$e,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$e,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$e,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nl}),Il=Kt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),vl=Kt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Sl}),wl=Kt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zh={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Yh=/[A-Z]/g,va=/-[a-z]/g,qh=/^data[-\w.:]+$/i;function Tn(e,t){const r=yr(t);let n=t,i=Be;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&qh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(va,Wh);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!va.test(a)){let s=a.replace(Yh,Vh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Bi}return new i(n,t)}function Vh(e){return"-"+e.toLowerCase()}function Wh(e){return e.charAt(1).toUpperCase()}var Rr=xl([Cl,$h,Il,vl,wl],"html"),_t=xl([Cl,jh,Il,vl,wl],"svg");function wa(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();(s||!a)&&t.push(s),i=n+1,n=r.indexOf(",",i)}return t}function Ll(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var La=/[#.]/g;function Qh(e,t){const r=e||"",n={};let i=0,a,s;for(;i<r.length;){La.lastIndex=i;const l=La.exec(r),o=r.slice(i,l?l.index:r.length);o&&(a?a==="#"?n.id=o:Array.isArray(n.className)?n.className.push(o):n.className=[o]:s=o,i+=o.length),l&&(a=l[0],i++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function Ra(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Rl(e){return e.join(" ").trim()}function Ol(e,t,r){const n=r?Zh(r):void 0;function i(a,s,...l){let o;if(a==null){o={type:"root",children:[]};const u=s;l.unshift(u)}else{o=Qh(a,t);const u=o.tagName.toLowerCase(),h=n?n.get(u):void 0;if(o.tagName=h||u,Gh(s))l.unshift(s);else for(const[f,p]of Object.entries(s))Kh(e,o.properties,f,p)}for(const u of l)ai(o.children,u);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Gh(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Kh(e,t,r,n){const i=Tn(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=Ra(n):i.commaSeparated?a=wa(n):i.commaOrSpaceSeparated?a=Ra(wa(n).join(" ")):a=Oa(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?Xh(n):String(n);if(Array.isArray(a)){const s=[];for(const l of a)s.push(Oa(i,i.property,l));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function ai(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)ai(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?ai(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Oa(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||yr(r)===yr(t)))return!0}return r}function Xh(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function Zh(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}var Jh=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],ef=Ol(Rr,"div"),tf=Ol(_t,"g",Jh);function rf(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let l=r[s];if(l===void 0){const o=Da(t,r[s-1]);l=o===-1?t.length+1:o+1,r[s]=l}if(l>a)return{line:s+1,column:a-(s>0?r[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const l=r[r.length-1],o=Da(t,l),u=o===-1?t.length+1:o+1;if(l===u)break;r.push(u)}const s=(a.line>1?r[a.line-2]:0)+a.column-1;if(s<r[a.line-1])return s}}}function Da(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
69
+ `,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}var St={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Dl={}.hasOwnProperty,nf=Object.prototype;function af(e,t){const r=t||{};return Fi({file:r.file||void 0,location:!1,schema:r.space==="svg"?_t:Rr,verbose:r.verbose||!1},e)}function Fi(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},Xr(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:Pl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=rf(a),l=s.toPoint(0),o=s.toPoint(a.length);r.position={start:l,end:o}}return r}case"#documentType":{const n=t;return r={type:"doctype"},Xr(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},Xr(e,n,r),r}default:return r=sf(e,t),r}}function Pl(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=Fi(e,t[r]);n.push(i)}return n}function sf(e,t){const r=e.schema;e.schema=t.namespaceURI===St.svg?_t:Rr;let n=-1;const i={};for(;++n<t.attrs.length;){const s=t.attrs[n],l=(s.prefix?s.prefix+":":"")+s.name;Dl.call(nf,l)||(i[l]=s.value)}const a=(e.schema.space==="svg"?tf:ef)(t.tagName,i,Pl(e,t.childNodes));if(Xr(e,t,a),a.tagName==="template"){const s=t,l=s.sourceCodeLocation,o=l&&l.startTag&&zt(l.startTag),u=l&&l.endTag&&zt(l.endTag),h=Fi(e,s.content);o&&u&&e.file&&(h.position={start:o.end,end:u.start}),a.content=h}return e.schema=r,a}function Xr(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=lf(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function lf(e,t,r){const n=zt(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(r.attrs)for(s in r.attrs)Dl.call(r.attrs,s)&&(a[Tn(e.schema,s).property]=zt(r.attrs[s]));r.startTag;const l=zt(r.startTag),o=r.endTag?zt(r.endTag):void 0,u={opening:l};o&&(u.closing=o),u.properties=a,t.data={position:u}}}return n}function zt(e){const t=Pa({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=Pa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function Pa(e){return e.line&&e.column?e:void 0}var Ma={}.hasOwnProperty;function Ml(e,t){const r=t||{};function n(i,...a){let s=n.invalid;const l=n.handlers;if(i&&Ma.call(i,e)){const o=String(i[e]);s=Ma.call(l,o)?l[o]:n.unknown}if(s)return s.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var of={},cf={}.hasOwnProperty,Bl=Ml("type",{handlers:{root:hf,element:gf,text:pf,comment:mf,doctype:df}});function uf(e,t){const r=(t||of).space;return Bl(e,r==="svg"?_t:Rr)}function hf(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=Hi(e.children,r,t),Xt(e,r),r}function ff(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=Hi(e.children,r,t),Xt(e,r),r}function df(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xt(e,t),t}function pf(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xt(e,t),t}function mf(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xt(e,t),t}function gf(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=_t);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&cf.call(e.properties,a)){const o=Ef(n,a,e.properties[a]);o&&i.push(o)}}const s=n.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:St[s],childNodes:[],parentNode:null};return l.childNodes=Hi(e.children,l,n),Xt(e,l),e.tagName==="template"&&e.content&&(l.content=ff(e.content,n)),l}function Ef(e,t,r){const n=Tn(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?Ll(r):Rl(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=St[n.space]}return i}function Hi(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=Bl(e[n],r);a.parentNode=t,i.push(a)}return i}function Xt(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}var Tf=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],bf=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);var m;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(m||(m={}));var Pe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Fl(e){return e>=55296&&e<=57343}function kf(e){return e>=56320&&e<=57343}function _f(e,t){return(e-55296)*1024+9216+t}function Hl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ul(e){return e>=64976&&e<=65007||bf.has(e)}var R;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R||(R={}));var Af=65536,yf=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Af,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:r,col:n,offset:i}=this,a=n+t,s=i+t;return{code:e,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(kf(t))return this.pos++,this._addGap(),_f(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(R.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(t);return r===m.CARRIAGE_RETURN?m.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let e=this.html.charCodeAt(this.pos);return e===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):e===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Fl(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===m.LINE_FEED||e===m.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Hl(e)?this._err(R.controlCharacterInInputStream):Ul(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},ee;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ee||(ee={}));function $l(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var xf=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),On,Cf=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Sy=(On=String.fromCodePoint)!==null&&On!==void 0?On:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Nf(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Cf.get(e))!==null&&t!==void 0?t:e}var Ae;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ae||(Ae={}));var Sf=32,Tt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Tt||(Tt={}));function si(e){return e>=Ae.ZERO&&e<=Ae.NINE}function If(e){return e>=Ae.UPPER_A&&e<=Ae.UPPER_F||e>=Ae.LOWER_A&&e<=Ae.LOWER_F}function vf(e){return e>=Ae.UPPER_A&&e<=Ae.UPPER_Z||e>=Ae.LOWER_A&&e<=Ae.LOWER_Z||si(e)}function wf(e){return e===Ae.EQUALS||vf(e)}var _e;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(_e||(_e={}));var st;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(st||(st={}));var Lf=class{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=_e.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=st.Strict}startEntity(e){this.decodeMode=e,this.state=_e.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case _e.EntityStart:return e.charCodeAt(t)===Ae.NUM?(this.state=_e.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=_e.NamedEntity,this.stateNamedEntity(e,t));case _e.NumericStart:return this.stateNumericStart(e,t);case _e.NumericDecimal:return this.stateNumericDecimal(e,t);case _e.NumericHex:return this.stateNumericHex(e,t);case _e.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Sf)===Ae.LOWER_X?(this.state=_e.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=_e.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){const i=r-t;this.result=this.result*Math.pow(n,i)+Number.parseInt(e.substr(t,i),n),this.consumed+=i}}stateNumericHex(e,t){const r=t;for(;t<e.length;){const n=e.charCodeAt(t);if(si(n)||If(n))t+=1;else return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){const r=t;for(;t<e.length;){const n=e.charCodeAt(t);if(si(n))t+=1;else return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r;if(this.consumed<=t)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ae.SEMI)this.consumed+=1;else if(this.decodeMode===st.Strict)return 0;return this.emitCodePoint(Nf(this.result),this.consumed),this.errors&&(e!==Ae.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:r}=this;let n=r[this.treeIndex],i=(n&Tt.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const a=e.charCodeAt(t);if(this.treeIndex=Rf(r,n,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===st.Attribute&&(i===0||wf(a))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],i=(n&Tt.VALUE_LENGTH)>>14,i!==0){if(a===Ae.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==st.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,n=(r[t]&Tt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:n}=this;return this.emitCodePoint(t===1?n[e]&~Tt.VALUE_LENGTH:n[e+1],r),t===3&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case _e.NamedEntity:return this.result!==0&&(this.decodeMode!==st.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case _e.NumericDecimal:return this.emitNumericEntity(0,2);case _e.NumericHex:return this.emitNumericEntity(0,3);case _e.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case _e.EntityStart:return 0}}};function Rf(e,t,r,n){const i=(t&Tt.BRANCH_LENGTH)>>7,a=t&Tt.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const o=n-a;return o<0||o>=i?-1:e[r+o]-1}let s=r,l=s+i-1;for(;s<=l;){const o=s+l>>>1,u=e[o];if(u<n)s=o+1;else if(u>n)l=o-1;else return e[o+i]}return-1}var O;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(O||(O={}));var It;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(It||(It={}));var Ye;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ye||(Ye={}));var S;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(S||(S={}));var c;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));var Of=new Map([[S.A,c.A],[S.ADDRESS,c.ADDRESS],[S.ANNOTATION_XML,c.ANNOTATION_XML],[S.APPLET,c.APPLET],[S.AREA,c.AREA],[S.ARTICLE,c.ARTICLE],[S.ASIDE,c.ASIDE],[S.B,c.B],[S.BASE,c.BASE],[S.BASEFONT,c.BASEFONT],[S.BGSOUND,c.BGSOUND],[S.BIG,c.BIG],[S.BLOCKQUOTE,c.BLOCKQUOTE],[S.BODY,c.BODY],[S.BR,c.BR],[S.BUTTON,c.BUTTON],[S.CAPTION,c.CAPTION],[S.CENTER,c.CENTER],[S.CODE,c.CODE],[S.COL,c.COL],[S.COLGROUP,c.COLGROUP],[S.DD,c.DD],[S.DESC,c.DESC],[S.DETAILS,c.DETAILS],[S.DIALOG,c.DIALOG],[S.DIR,c.DIR],[S.DIV,c.DIV],[S.DL,c.DL],[S.DT,c.DT],[S.EM,c.EM],[S.EMBED,c.EMBED],[S.FIELDSET,c.FIELDSET],[S.FIGCAPTION,c.FIGCAPTION],[S.FIGURE,c.FIGURE],[S.FONT,c.FONT],[S.FOOTER,c.FOOTER],[S.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[S.FORM,c.FORM],[S.FRAME,c.FRAME],[S.FRAMESET,c.FRAMESET],[S.H1,c.H1],[S.H2,c.H2],[S.H3,c.H3],[S.H4,c.H4],[S.H5,c.H5],[S.H6,c.H6],[S.HEAD,c.HEAD],[S.HEADER,c.HEADER],[S.HGROUP,c.HGROUP],[S.HR,c.HR],[S.HTML,c.HTML],[S.I,c.I],[S.IMG,c.IMG],[S.IMAGE,c.IMAGE],[S.INPUT,c.INPUT],[S.IFRAME,c.IFRAME],[S.KEYGEN,c.KEYGEN],[S.LABEL,c.LABEL],[S.LI,c.LI],[S.LINK,c.LINK],[S.LISTING,c.LISTING],[S.MAIN,c.MAIN],[S.MALIGNMARK,c.MALIGNMARK],[S.MARQUEE,c.MARQUEE],[S.MATH,c.MATH],[S.MENU,c.MENU],[S.META,c.META],[S.MGLYPH,c.MGLYPH],[S.MI,c.MI],[S.MO,c.MO],[S.MN,c.MN],[S.MS,c.MS],[S.MTEXT,c.MTEXT],[S.NAV,c.NAV],[S.NOBR,c.NOBR],[S.NOFRAMES,c.NOFRAMES],[S.NOEMBED,c.NOEMBED],[S.NOSCRIPT,c.NOSCRIPT],[S.OBJECT,c.OBJECT],[S.OL,c.OL],[S.OPTGROUP,c.OPTGROUP],[S.OPTION,c.OPTION],[S.P,c.P],[S.PARAM,c.PARAM],[S.PLAINTEXT,c.PLAINTEXT],[S.PRE,c.PRE],[S.RB,c.RB],[S.RP,c.RP],[S.RT,c.RT],[S.RTC,c.RTC],[S.RUBY,c.RUBY],[S.S,c.S],[S.SCRIPT,c.SCRIPT],[S.SEARCH,c.SEARCH],[S.SECTION,c.SECTION],[S.SELECT,c.SELECT],[S.SOURCE,c.SOURCE],[S.SMALL,c.SMALL],[S.SPAN,c.SPAN],[S.STRIKE,c.STRIKE],[S.STRONG,c.STRONG],[S.STYLE,c.STYLE],[S.SUB,c.SUB],[S.SUMMARY,c.SUMMARY],[S.SUP,c.SUP],[S.TABLE,c.TABLE],[S.TBODY,c.TBODY],[S.TEMPLATE,c.TEMPLATE],[S.TEXTAREA,c.TEXTAREA],[S.TFOOT,c.TFOOT],[S.TD,c.TD],[S.TH,c.TH],[S.THEAD,c.THEAD],[S.TITLE,c.TITLE],[S.TR,c.TR],[S.TRACK,c.TRACK],[S.TT,c.TT],[S.U,c.U],[S.UL,c.UL],[S.SVG,c.SVG],[S.VAR,c.VAR],[S.WBR,c.WBR],[S.XMP,c.XMP]]);function Zt(e){var t;return(t=Of.get(e))!==null&&t!==void 0?t:c.UNKNOWN}var P=c,Df={[O.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[O.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[O.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[O.XLINK]:new Set,[O.XML]:new Set,[O.XMLNS]:new Set},li=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]),Iy=new Set([S.STYLE,S.SCRIPT,S.XMP,S.IFRAME,S.NOEMBED,S.NOFRAMES,S.PLAINTEXT]),E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));var ge={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Pf(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function dr(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Mf(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function pt(e){return Mf(e)||dr(e)}function Ba(e){return pt(e)||Pf(e)}function qr(e){return e+32}function jl(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function Fa(e){return jl(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Bf(e){return e===m.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:Fl(e)?R.surrogateCharacterReference:Ul(e)?R.noncharacterCharacterReference:Hl(e)||e===m.CARRIAGE_RETURN?R.controlCharacterReference:null}var Ff=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yf(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Lf(xf,(r,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(r)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const n=Bf(r);n&&this._err(n,1)}}:void 0)}_err(e,t=0){var r,n;(n=(r=this.handler).onParseError)===null||n===void 0||n.call(r,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ee.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ee.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ee.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ee.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const r=this.currentToken;if($l(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const n=(e=(t=r.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Zt(e.tagName),e.type===ee.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ee.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case ee.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case ee.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ee.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=jl(e)?ee.WHITESPACE_CHARACTER:e===m.NULL?ee.NULL_CHARACTER:ee.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ee.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?st.Attribute:st.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case E.DATA:this._stateData(e);break;case E.RCDATA:this._stateRcdata(e);break;case E.RAWTEXT:this._stateRawtext(e);break;case E.SCRIPT_DATA:this._stateScriptData(e);break;case E.PLAINTEXT:this._statePlaintext(e);break;case E.TAG_OPEN:this._stateTagOpen(e);break;case E.END_TAG_OPEN:this._stateEndTagOpen(e);break;case E.TAG_NAME:this._stateTagName(e);break;case E.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case E.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case E.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case E.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case E.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case E.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case E.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case E.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case E.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case E.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case E.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case E.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case E.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case E.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case E.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case E.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case E.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case E.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case E.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case E.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case E.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case E.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case E.BOGUS_COMMENT:this._stateBogusComment(e);break;case E.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case E.COMMENT_START:this._stateCommentStart(e);break;case E.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case E.COMMENT:this._stateComment(e);break;case E.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case E.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case E.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case E.COMMENT_END:this._stateCommentEnd(e);break;case E.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case E.DOCTYPE:this._stateDoctype(e);break;case E.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case E.DOCTYPE_NAME:this._stateDoctypeName(e);break;case E.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case E.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case E.CDATA_SECTION:this._stateCdataSection(e);break;case E.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case E.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case E.CHARACTER_REFERENCE:this._stateCharacterReference();break;case E.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case m.LESS_THAN_SIGN:this.state=E.TAG_OPEN;break;case m.AMPERSAND:this._startCharacterReference();break;case m.NULL:this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break;case m.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case m.AMPERSAND:this._startCharacterReference();break;case m.LESS_THAN_SIGN:this.state=E.RCDATA_LESS_THAN_SIGN;break;case m.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case m.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case m.LESS_THAN_SIGN:this.state=E.RAWTEXT_LESS_THAN_SIGN;break;case m.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case m.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break;case m.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case m.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case m.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case m.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(pt(e))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(e);else switch(e){case m.EXCLAMATION_MARK:this.state=E.MARKUP_DECLARATION_OPEN;break;case m.SOLIDUS:this.state=E.END_TAG_OPEN;break;case m.QUESTION_MARK:this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(e);break;case m.EOF:this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(pt(e))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(e);else switch(e){case m.GREATER_THAN_SIGN:this._err(R.missingEndTagName),this.state=E.DATA;break;case m.EOF:this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this.state=E.BEFORE_ATTRIBUTE_NAME;break;case m.SOLIDUS:this.state=E.SELF_CLOSING_START_TAG;break;case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentTagToken();break;case m.NULL:this._err(R.unexpectedNullCharacter),t.tagName+="�";break;case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(dr(e)?qr(e):e)}}_stateRcdataLessThanSign(e){e===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){pt(e)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){pt(e)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case m.SOLIDUS:this.state=E.SCRIPT_DATA_END_TAG_OPEN;break;case m.EXCLAMATION_MARK:this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){pt(e)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case m.HYPHEN_MINUS:this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case m.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case m.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case m.HYPHEN_MINUS:this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case m.NULL:this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case m.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case m.HYPHEN_MINUS:this._emitChars("-");break;case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case m.GREATER_THAN_SIGN:this.state=E.SCRIPT_DATA,this._emitChars(">");break;case m.NULL:this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case m.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pt(e)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){pt(e)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&Fa(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Pe.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case m.HYPHEN_MINUS:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case m.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case m.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case m.HYPHEN_MINUS:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case m.NULL:this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case m.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case m.HYPHEN_MINUS:this._emitChars("-");break;case m.LESS_THAN_SIGN:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case m.GREATER_THAN_SIGN:this.state=E.SCRIPT_DATA,this._emitChars(">");break;case m.NULL:this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case m.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===m.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&Fa(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Pe.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case m.EQUALS_SIGN:this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case m.EQUALS_SIGN:this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break;case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case m.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(dr(e)?qr(e):e)}}_stateAfterAttributeName(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:this.state=E.SELF_CLOSING_START_TAG;break;case m.EQUALS_SIGN:this.state=E.BEFORE_ATTRIBUTE_VALUE;break;case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentTagToken();break;case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case m.APOSTROPHE:this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case m.GREATER_THAN_SIGN:this._err(R.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break;default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case m.QUOTATION_MARK:this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case m.AMPERSAND:this._startCharacterReference();break;case m.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case m.APOSTROPHE:this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case m.AMPERSAND:this._startCharacterReference();break;case m.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break;case m.AMPERSAND:this._startCharacterReference();break;case m.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break;case m.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break;case m.SOLIDUS:this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break;case m.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break;case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case m.GREATER_THAN_SIGN:{const t=this.currentToken;t.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentComment(t);break;case m.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case m.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Pe.DASH_DASH,!0)?(this._createCommentToken(Pe.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Pe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pe.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Pe.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(Pe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case m.HYPHEN_MINUS:this.state=E.COMMENT_START_DASH;break;case m.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=E.DATA;const t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=E.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case m.HYPHEN_MINUS:this.state=E.COMMENT_END;break;case m.GREATER_THAN_SIGN:this._err(R.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(t);break;case m.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=E.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case m.HYPHEN_MINUS:this.state=E.COMMENT_END_DASH;break;case m.LESS_THAN_SIGN:t.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break;case m.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;case m.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case m.EXCLAMATION_MARK:t.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break;case m.LESS_THAN_SIGN:t.data+="<";break;default:this.state=E.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==m.GREATER_THAN_SIGN&&e!==m.EOF&&this._err(R.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case m.HYPHEN_MINUS:this.state=E.COMMENT_END;break;case m.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=E.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentComment(t);break;case m.EXCLAMATION_MARK:this.state=E.COMMENT_END_BANG;break;case m.HYPHEN_MINUS:t.data+="-";break;case m.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=E.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case m.HYPHEN_MINUS:t.data+="--!",this.state=E.COMMENT_END_DASH;break;case m.GREATER_THAN_SIGN:this._err(R.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(t);break;case m.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=E.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this.state=E.BEFORE_DOCTYPE_NAME;break;case m.GREATER_THAN_SIGN:this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case m.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(dr(e))this._createDoctypeToken(String.fromCharCode(qr(e))),this.state=E.DOCTYPE_NAME;else switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:this._err(R.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=E.DOCTYPE_NAME;break;case m.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=E.DATA;break}case m.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=E.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this.state=E.AFTER_DOCTYPE_NAME;break;case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.NULL:this._err(R.unexpectedNullCharacter),t.name+="�";break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(dr(e)?qr(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Pe.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pe.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case m.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case m.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case m.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:t.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case m.APOSTROPHE:t.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case m.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case m.QUOTATION_MARK:this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case m.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case m.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case m.APOSTROPHE:this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case m.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case m.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case m.GREATER_THAN_SIGN:this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.QUOTATION_MARK:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case m.APOSTROPHE:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.QUOTATION_MARK:t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case m.APOSTROPHE:t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case m.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case m.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case m.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case m.APOSTROPHE:t.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case m.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(t);break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case m.QUOTATION_MARK:this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case m.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case m.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case m.APOSTROPHE:this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case m.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case m.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case m.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=E.DATA;break;case m.NULL:this._err(R.unexpectedNullCharacter);break;case m.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case m.RIGHT_SQUARE_BRACKET:this.state=E.CDATA_SECTION_BRACKET;break;case m.EOF:this._err(R.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case m.GREATER_THAN_SIGN:this.state=E.DATA;break;case m.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=E.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ba(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Ba(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===m.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},zl=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),Ha=new Set([...zl,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),ln=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Hf=new Set([...ln,c.OL,c.UL]),Uf=new Set([...ln,c.BUTTON]),Ua=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),$a=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),$f=new Set([c.TR,c.TEMPLATE,c.HTML]),jf=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),zf=new Set([c.TABLE,c.TEMPLATE,c.HTML]),Yf=new Set([c.TD,c.TH]),qf=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===O.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){const n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==O.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(li,O.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Yf,O.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(zf,O.HTML)}clearBackToTableBodyContext(){this.clearBackTo(jf,O.HTML)}clearBackToTableRowContext(){this.clearBackTo($f,O.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,t){for(let r=this.stackTop;r>=0;r--){const n=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case O.HTML:if(n===e)return!0;if(t.has(n))return!1;break;case O.SVG:if($a.has(n))return!1;break;case O.MATHML:if(Ua.has(n))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ln)}hasInListItemScope(e){return this.hasInDynamicScope(e,Hf)}hasInButtonScope(e){return this.hasInDynamicScope(e,Uf)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case O.HTML:if(li.has(t))return!0;if(ln.has(t))return!1;break;case O.SVG:if($a.has(t))return!1;break;case O.MATHML:if(Ua.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===O.HTML)switch(this.tagIDs[t]){case e:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===O.HTML)switch(this.tagIDs[e]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===O.HTML)switch(this.tagIDs[t]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&zl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ha.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Ha.has(this.currentTagId);)this.pop()}},Dn=3,et;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(et||(et={}));var ja={type:et.Marker},Vf=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const r=[],n=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===et.Marker)break;const{element:o}=l;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){const u=this.treeAdapter.getAttrList(o);u.length===n&&r.push({idx:s,attrs:u})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<Dn)return;const t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(r.length<Dn)return;const n=new Map(t.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const s=r[a];s.attrs.every(l=>n.get(l.name)===l.value)&&(i+=1,i>=Dn&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(ja)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:et.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:et.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(ja);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(r=>r.type===et.Marker||this.treeAdapter.getTagName(r.element)===e);return t&&t.type===et.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===et.Element&&t.element===e)}},mt={createDocument(){return{nodeName:"#document",mode:Ye.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};mt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(mt.isTextNode(r)){r.value+=t;return}}mt.appendChild(e,mt.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&mt.isTextNode(n)?n.value+=t:mt.insertBefore(e,mt.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Yl="html",Wf="about:legacy-compat",Qf="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ql=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Gf=[...ql,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Kf=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Vl=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Xf=[...Vl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function za(e,t){return t.some(r=>e.startsWith(r))}function Zf(e){return e.name===Yl&&e.publicId===null&&(e.systemId===null||e.systemId===Wf)}function Jf(e){if(e.name!==Yl)return Ye.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Qf)return Ye.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),Kf.has(r))return Ye.QUIRKS;let n=t===null?Gf:ql;if(za(r,n))return Ye.QUIRKS;if(n=t===null?Vl:Xf,za(r,n))return Ye.LIMITED_QUIRKS}return Ye.NO_QUIRKS}var Ya={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},ed="definitionurl",td="definitionURL",rd=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),nd=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:O.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:O.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:O.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:O.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:O.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:O.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:O.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:O.XML}],["xml:space",{prefix:"xml",name:"space",namespace:O.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:O.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:O.XMLNS}]]),id=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),ad=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function sd(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===It.COLOR||r===It.SIZE||r===It.FACE)||ad.has(t)}function Wl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===ed){e.attrs[t].name=td;break}}function Ql(e){for(let t=0;t<e.attrs.length;t++){const r=rd.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function Ui(e){for(let t=0;t<e.attrs.length;t++){const r=nd.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function ld(e){const t=id.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Zt(e.tagName))}function od(e,t){return t===O.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function cd(e,t,r){if(t===O.MATHML&&e===c.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===It.ENCODING){const i=r[n].value.toLowerCase();return i===Ya.TEXT_HTML||i===Ya.APPLICATION_XML}}return t===O.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function ud(e,t,r,n){return(!n||n===O.HTML)&&cd(e,t,r)||(!n||n===O.MATHML)&&od(e,t)}var hd="hidden",fd=8,dd=3,b;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(b||(b={}));var pd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Gl=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),qa={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mt,onParseError:null},Va=class{constructor(e,t,r=null,n=null){this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=b.INITIAL,this.originalInsertionMode=b.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...qa,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Ff(this.options,this),this.activeFormattingElements=new Vf(this.treeAdapter),this.fragmentContextID=r?Zt(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new qf(this.document,this.treeAdapter,this)}static parse(e,t){const r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){const r={...qa,...t};e!=null||(e=r.treeAdapter.createElement(S.TEMPLATE,O.HTML,[]));const n=r.treeAdapter.createElement("documentmock",O.HTML,[]),i=new this(r,n,e);return i.fragmentContextID===c.TEMPLATE&&i.tmplInsertionModeStack.unshift(b.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;const i=(n=e.location)!==null&&n!==void 0?n:pd,a={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(e,t,r){var n,i;(i=(n=this.treeAdapter).onItemPush)===null||i===void 0||i.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(n=(r=this.treeAdapter).onItemPop)===null||n===void 0||n.call(r,e,this.openElements.current),t){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(e,t){const r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===O.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,O.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=b.TEXT}switchToPlaintextParsing(){this.insertionMode=b.TEXT,this.originalInsertionMode=b.IN_BODY,this.tokenizer.state=ge.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===S.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==O.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:this.tokenizer.state=ge.RCDATA;break;case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:this.tokenizer.state=ge.RAWTEXT;break;case c.SCRIPT:this.tokenizer.state=ge.SCRIPT_DATA;break;case c.PLAINTEXT:this.tokenizer.state=ge.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){const i=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));i&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const r=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){const r=this.treeAdapter.createElement(e,O.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,O.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(S.HTML,O.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,t){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const n=this.treeAdapter.getChildNodes(t),i=n[(r?n.lastIndexOf(r):n.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:a,endCol:s,endOffset:l}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:a,endCol:s,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const r=t.location,n=this.treeAdapter.getTagName(e),i=t.type===ee.END_TAG&&n===t.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):{current:t,currentTagId:r}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(t)===S.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===O.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,t,O.HTML)}_processToken(e){switch(e.type){case ee.CHARACTER:this.onCharacter(e);break;case ee.NULL_CHARACTER:this.onNullCharacter(e);break;case ee.COMMENT:this.onComment(e);break;case ee.DOCTYPE:this.onDoctype(e);break;case ee.START_TAG:this._processStartTag(e);break;case ee.END_TAG:this.onEndTag(e);break;case ee.EOF:this.onEof(e);break;case ee.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,r){const n=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return ud(e,n,i,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(n=>n.type===et.Marker||this.openElements.contains(n.element)),r=t===-1?e-1:t-1;for(let n=r;n>=0;n--){const i=this.activeFormattingElements.entries[n];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=b.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case c.TR:this.insertionMode=b.IN_ROW;return;case c.TBODY:case c.THEAD:case c.TFOOT:this.insertionMode=b.IN_TABLE_BODY;return;case c.CAPTION:this.insertionMode=b.IN_CAPTION;return;case c.COLGROUP:this.insertionMode=b.IN_COLUMN_GROUP;return;case c.TABLE:this.insertionMode=b.IN_TABLE;return;case c.BODY:this.insertionMode=b.IN_BODY;return;case c.FRAMESET:this.insertionMode=b.IN_FRAMESET;return;case c.SELECT:this._resetInsertionModeForSelect(e);return;case c.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case c.HTML:this.insertionMode=this.headElement?b.AFTER_HEAD:b.BEFORE_HEAD;return;case c.TD:case c.TH:if(e>0){this.insertionMode=b.IN_CELL;return}break;case c.HEAD:if(e>0){this.insertionMode=b.IN_HEAD;return}}this.insertionMode=b.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const r=this.openElements.tagIDs[t];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=b.IN_SELECT_IN_TABLE;return}}this.insertionMode=b.IN_SELECT}_isElementCausesFosterParenting(e){return Gl.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===O.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case c.TABLE:{const r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const r=this.treeAdapter.getNamespaceURI(e);return Df[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Yp(this,e);return}switch(this.insertionMode){case b.INITIAL:or(this,e);break;case b.BEFORE_HTML:mr(this,e);break;case b.BEFORE_HEAD:gr(this,e);break;case b.IN_HEAD:Er(this,e);break;case b.IN_HEAD_NO_SCRIPT:Tr(this,e);break;case b.AFTER_HEAD:br(this,e);break;case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:Xl(this,e);break;case b.TEXT:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:Pn(this,e);break;case b.IN_TABLE_TEXT:no(this,e);break;case b.IN_COLUMN_GROUP:on(this,e);break;case b.AFTER_BODY:cn(this,e);break;case b.AFTER_AFTER_BODY:Zr(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zp(this,e);return}switch(this.insertionMode){case b.INITIAL:or(this,e);break;case b.BEFORE_HTML:mr(this,e);break;case b.BEFORE_HEAD:gr(this,e);break;case b.IN_HEAD:Er(this,e);break;case b.IN_HEAD_NO_SCRIPT:Tr(this,e);break;case b.AFTER_HEAD:br(this,e);break;case b.TEXT:this._insertCharacters(e);break;case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:Pn(this,e);break;case b.IN_COLUMN_GROUP:on(this,e);break;case b.AFTER_BODY:cn(this,e);break;case b.AFTER_AFTER_BODY:Zr(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){oi(this,e);return}switch(this.insertionMode){case b.INITIAL:case b.BEFORE_HTML:case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_TEMPLATE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:oi(this,e);break;case b.IN_TABLE_TEXT:cr(this,e);break;case b.AFTER_BODY:_d(this,e);break;case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:Ad(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case b.INITIAL:yd(this,e);break;case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:this._err(e,R.misplacedDoctype);break;case b.IN_TABLE_TEXT:cr(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?qp(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case b.INITIAL:or(this,e);break;case b.BEFORE_HTML:xd(this,e);break;case b.BEFORE_HEAD:Nd(this,e);break;case b.IN_HEAD:Xe(this,e);break;case b.IN_HEAD_NO_SCRIPT:vd(this,e);break;case b.AFTER_HEAD:Ld(this,e);break;case b.IN_BODY:Ie(this,e);break;case b.IN_TABLE:Wt(this,e);break;case b.IN_TABLE_TEXT:cr(this,e);break;case b.IN_CAPTION:Sp(this,e);break;case b.IN_COLUMN_GROUP:zi(this,e);break;case b.IN_TABLE_BODY:_n(this,e);break;case b.IN_ROW:An(this,e);break;case b.IN_CELL:wp(this,e);break;case b.IN_SELECT:so(this,e);break;case b.IN_SELECT_IN_TABLE:Rp(this,e);break;case b.IN_TEMPLATE:Dp(this,e);break;case b.AFTER_BODY:Mp(this,e);break;case b.IN_FRAMESET:Bp(this,e);break;case b.AFTER_FRAMESET:Hp(this,e);break;case b.AFTER_AFTER_BODY:$p(this,e);break;case b.AFTER_AFTER_FRAMESET:jp(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Vp(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case b.INITIAL:or(this,e);break;case b.BEFORE_HTML:Cd(this,e);break;case b.BEFORE_HEAD:Sd(this,e);break;case b.IN_HEAD:Id(this,e);break;case b.IN_HEAD_NO_SCRIPT:wd(this,e);break;case b.AFTER_HEAD:Rd(this,e);break;case b.IN_BODY:kn(this,e);break;case b.TEXT:Ep(this,e);break;case b.IN_TABLE:xr(this,e);break;case b.IN_TABLE_TEXT:cr(this,e);break;case b.IN_CAPTION:Ip(this,e);break;case b.IN_COLUMN_GROUP:vp(this,e);break;case b.IN_TABLE_BODY:ci(this,e);break;case b.IN_ROW:ao(this,e);break;case b.IN_CELL:Lp(this,e);break;case b.IN_SELECT:lo(this,e);break;case b.IN_SELECT_IN_TABLE:Op(this,e);break;case b.IN_TEMPLATE:Pp(this,e);break;case b.AFTER_BODY:co(this,e);break;case b.IN_FRAMESET:Fp(this,e);break;case b.AFTER_FRAMESET:Up(this,e);break;case b.AFTER_AFTER_BODY:Zr(this,e)}}onEof(e){switch(this.insertionMode){case b.INITIAL:or(this,e);break;case b.BEFORE_HTML:mr(this,e);break;case b.BEFORE_HEAD:gr(this,e);break;case b.IN_HEAD:Er(this,e);break;case b.IN_HEAD_NO_SCRIPT:Tr(this,e);break;case b.AFTER_HEAD:br(this,e);break;case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:to(this,e);break;case b.TEXT:Tp(this,e);break;case b.IN_TABLE_TEXT:cr(this,e);break;case b.IN_TEMPLATE:oo(this,e);break;case b.AFTER_BODY:case b.IN_FRAMESET:case b.AFTER_FRAMESET:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:ji(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===m.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.TEXT:case b.IN_COLUMN_GROUP:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:this._insertCharacters(e);break;case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:case b.AFTER_BODY:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:Kl(this,e);break;case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:Pn(this,e);break;case b.IN_TABLE_TEXT:ro(this,e)}}};function md(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):eo(e,t),r}function gd(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function Ed(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==r;a++,s=i){i=e.openElements.getCommonAncestor(s);const l=e.activeFormattingElements.getElementEntry(s),o=l&&a>=dd;!l||o?(o&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(s)):(s=Td(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(s,n),n=s)}return n}function Td(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function bd(e,t,r){const n=e.treeAdapter.getTagName(t),i=Zt(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===O.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function kd(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function $i(e,t){for(let r=0;r<fd;r++){const n=md(e,t);if(!n)break;const i=gd(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=Ed(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),s&&bd(e,s,a),kd(e,i,n)}}function oi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function _d(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Ad(e,t){e._appendCommentNode(t,e.document)}function ji(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function yd(e,t){e._setDocumentType(t);const r=t.forceQuirks?Ye.QUIRKS:Jf(t);Zf(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=b.BEFORE_HTML}function or(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ye.QUIRKS),e.insertionMode=b.BEFORE_HTML,e._processToken(t)}function xd(e,t){t.tagID===c.HTML?(e._insertElement(t,O.HTML),e.insertionMode=b.BEFORE_HEAD):mr(e,t)}function Cd(e,t){const r=t.tagID;(r===c.HTML||r===c.HEAD||r===c.BODY||r===c.BR)&&mr(e,t)}function mr(e,t){e._insertFakeRootElement(),e.insertionMode=b.BEFORE_HEAD,e._processToken(t)}function Nd(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.HEAD:e._insertElement(t,O.HTML),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD;break;default:gr(e,t)}}function Sd(e,t){const r=t.tagID;r===c.HEAD||r===c.BODY||r===c.HTML||r===c.BR?gr(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function gr(e,t){e._insertFakeElement(S.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD,e._processToken(t)}function Xe(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:e._appendElement(t,O.HTML),t.ackSelfClosing=!0;break;case c.TITLE:e._switchToTextParsing(t,ge.RCDATA);break;case c.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,ge.RAWTEXT):(e._insertElement(t,O.HTML),e.insertionMode=b.IN_HEAD_NO_SCRIPT);break;case c.NOFRAMES:case c.STYLE:e._switchToTextParsing(t,ge.RAWTEXT);break;case c.SCRIPT:e._switchToTextParsing(t,ge.SCRIPT_DATA);break;case c.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=b.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(b.IN_TEMPLATE);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:Er(e,t)}}function Id(e,t){switch(t.tagID){case c.HEAD:e.openElements.pop(),e.insertionMode=b.AFTER_HEAD;break;case c.BODY:case c.BR:case c.HTML:Er(e,t);break;case c.TEMPLATE:Dt(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Dt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function Er(e,t){e.openElements.pop(),e.insertionMode=b.AFTER_HEAD,e._processToken(t)}function vd(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:Xe(e,t);break;case c.NOSCRIPT:e._err(t,R.nestedNoscriptInHead);break;default:Tr(e,t)}}function wd(e,t){switch(t.tagID){case c.NOSCRIPT:e.openElements.pop(),e.insertionMode=b.IN_HEAD;break;case c.BR:Tr(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Tr(e,t){const r=t.type===ee.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=b.IN_HEAD,e._processToken(t)}function Ld(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.BODY:e._insertElement(t,O.HTML),e.framesetOk=!1,e.insertionMode=b.IN_BODY;break;case c.FRAMESET:e._insertElement(t,O.HTML),e.insertionMode=b.IN_FRAMESET;break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:e._err(t,R.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),Xe(e,t),e.openElements.remove(e.headElement);break;case c.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:br(e,t)}}function Rd(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:br(e,t);break;case c.TEMPLATE:Dt(e,t);break;default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function br(e,t){e._insertFakeElement(S.BODY,c.BODY),e.insertionMode=b.IN_BODY,bn(e,t)}function bn(e,t){switch(t.type){case ee.CHARACTER:Xl(e,t);break;case ee.WHITESPACE_CHARACTER:Kl(e,t);break;case ee.COMMENT:oi(e,t);break;case ee.START_TAG:Ie(e,t);break;case ee.END_TAG:kn(e,t);break;case ee.EOF:to(e,t)}}function Kl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Xl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Od(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Dd(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function Pd(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,O.HTML),e.insertionMode=b.IN_FRAMESET)}function Md(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,O.HTML)}function Bd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&li.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,O.HTML)}function Fd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,O.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Hd(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,O.HTML),r||(e.formElement=e.openElements.current))}function Ud(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===c.LI&&i===c.LI||(r===c.DD||r===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,O.HTML)}function $d(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,O.HTML),e.tokenizer.state=ge.PLAINTEXT}function jd(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML),e.framesetOk=!1}function zd(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(S.A);r&&($i(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Yd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qd(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&($i(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,O.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Vd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Wd(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ye.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,O.HTML),e.framesetOk=!1,e.insertionMode=b.IN_TABLE}function Zl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,O.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jl(e){const t=$l(e,It.TYPE);return t!=null&&t.toLowerCase()===hd}function Qd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,O.HTML),Jl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Gd(e,t){e._appendElement(t,O.HTML),t.ackSelfClosing=!0}function Kd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,O.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Xd(e,t){t.tagName=S.IMG,t.tagID=c.IMG,Zl(e,t)}function Zd(e,t){e._insertElement(t,O.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ge.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=b.TEXT}function Jd(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ge.RAWTEXT)}function ep(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ge.RAWTEXT)}function Wa(e,t){e._switchToTextParsing(t,ge.RAWTEXT)}function tp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===b.IN_TABLE||e.insertionMode===b.IN_CAPTION||e.insertionMode===b.IN_TABLE_BODY||e.insertionMode===b.IN_ROW||e.insertionMode===b.IN_CELL?b.IN_SELECT_IN_TABLE:b.IN_SELECT}function rp(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML)}function np(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,O.HTML)}function ip(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,O.HTML)}function ap(e,t){e._reconstructActiveFormattingElements(),Wl(t),Ui(t),t.selfClosing?e._appendElement(t,O.MATHML):e._insertElement(t,O.MATHML),t.ackSelfClosing=!0}function sp(e,t){e._reconstructActiveFormattingElements(),Ql(t),Ui(t),t.selfClosing?e._appendElement(t,O.SVG):e._insertElement(t,O.SVG),t.ackSelfClosing=!0}function Qa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,O.HTML)}function Ie(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:Yd(e,t);break;case c.A:zd(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Bd(e,t);break;case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:Md(e,t);break;case c.LI:case c.DD:case c.DT:Ud(e,t);break;case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:Zl(e,t);break;case c.HR:Kd(e,t);break;case c.RB:case c.RTC:np(e,t);break;case c.RT:case c.RP:ip(e,t);break;case c.PRE:case c.LISTING:Fd(e,t);break;case c.XMP:Jd(e,t);break;case c.SVG:sp(e,t);break;case c.HTML:Od(e,t);break;case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:Xe(e,t);break;case c.BODY:Dd(e,t);break;case c.FORM:Hd(e,t);break;case c.NOBR:qd(e,t);break;case c.MATH:ap(e,t);break;case c.TABLE:Wd(e,t);break;case c.INPUT:Qd(e,t);break;case c.PARAM:case c.TRACK:case c.SOURCE:Gd(e,t);break;case c.IMAGE:Xd(e,t);break;case c.BUTTON:jd(e,t);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:Vd(e,t);break;case c.IFRAME:ep(e,t);break;case c.SELECT:tp(e,t);break;case c.OPTION:case c.OPTGROUP:rp(e,t);break;case c.NOEMBED:case c.NOFRAMES:Wa(e,t);break;case c.FRAMESET:Pd(e,t);break;case c.TEXTAREA:Zd(e,t);break;case c.NOSCRIPT:e.options.scriptingEnabled?Wa(e,t):Qa(e,t);break;case c.PLAINTEXT:$d(e,t);break;case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:Qa(e,t)}}function lp(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=b.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function op(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=b.AFTER_BODY,co(e,t))}function cp(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function up(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):r&&e.openElements.remove(r))}function hp(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(S.P,c.P),e._closePElement()}function fp(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function dp(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function pp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function mp(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function gp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(S.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function eo(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(n===s&&(n!==c.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function kn(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:$i(e,t);break;case c.P:hp(e);break;case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:cp(e,t);break;case c.LI:fp(e);break;case c.DD:case c.DT:dp(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:pp(e);break;case c.BR:gp(e);break;case c.BODY:lp(e,t);break;case c.HTML:op(e,t);break;case c.FORM:up(e);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:mp(e,t);break;case c.TEMPLATE:Dt(e,t);break;default:eo(e,t)}}function to(e,t){e.tmplInsertionModeStack.length>0?oo(e,t):ji(e,t)}function Ep(e,t){var r;t.tagID===c.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Tp(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Pn(e,t){if(e.openElements.currentTagId!==void 0&&Gl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=b.IN_TABLE_TEXT,t.type){case ee.CHARACTER:no(e,t);break;case ee.WHITESPACE_CHARACTER:ro(e,t)}else Or(e,t)}function bp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,O.HTML),e.insertionMode=b.IN_CAPTION}function kp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,O.HTML),e.insertionMode=b.IN_COLUMN_GROUP}function _p(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.COLGROUP,c.COLGROUP),e.insertionMode=b.IN_COLUMN_GROUP,zi(e,t)}function Ap(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,O.HTML),e.insertionMode=b.IN_TABLE_BODY}function yp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.TBODY,c.TBODY),e.insertionMode=b.IN_TABLE_BODY,_n(e,t)}function xp(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Cp(e,t){Jl(t)?e._appendElement(t,O.HTML):Or(e,t),t.ackSelfClosing=!0}function Np(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,O.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Wt(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:yp(e,t);break;case c.STYLE:case c.SCRIPT:case c.TEMPLATE:Xe(e,t);break;case c.COL:_p(e,t);break;case c.FORM:Np(e,t);break;case c.TABLE:xp(e,t);break;case c.TBODY:case c.TFOOT:case c.THEAD:Ap(e,t);break;case c.INPUT:Cp(e,t);break;case c.CAPTION:bp(e,t);break;case c.COLGROUP:kp(e,t);break;default:Or(e,t)}}function xr(e,t){switch(t.tagID){case c.TABLE:e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break;case c.TEMPLATE:Dt(e,t);break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Or(e,t)}}function Or(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,bn(e,t),e.fosterParentingEnabled=r}function ro(e,t){e.pendingCharacterTokens.push(t)}function no(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function cr(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Or(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var io=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Sp(e,t){const r=t.tagID;io.has(r)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_TABLE,Wt(e,t)):Ie(e,t)}function Ip(e,t){const r=t.tagID;switch(r){case c.CAPTION:case c.TABLE:e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_TABLE,r===c.TABLE&&xr(e,t));break;case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:kn(e,t)}}function zi(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.COL:e._appendElement(t,O.HTML),t.ackSelfClosing=!0;break;case c.TEMPLATE:Xe(e,t);break;default:on(e,t)}}function vp(e,t){switch(t.tagID){case c.COLGROUP:e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=b.IN_TABLE);break;case c.TEMPLATE:Dt(e,t);break;case c.COL:break;default:on(e,t)}}function on(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=b.IN_TABLE,e._processToken(t))}function _n(e,t){switch(t.tagID){case c.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,O.HTML),e.insertionMode=b.IN_ROW;break;case c.TH:case c.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(S.TR,c.TR),e.insertionMode=b.IN_ROW,An(e,t);break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE,Wt(e,t));break;default:Wt(e,t)}}function ci(e,t){const r=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE);break;case c.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE,xr(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:xr(e,t)}}function An(e,t){switch(t.tagID){case c.TH:case c.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,O.HTML),e.insertionMode=b.IN_CELL,e.activeFormattingElements.insertMarker();break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,_n(e,t));break;default:Wt(e,t)}}function ao(e,t){switch(t.tagID){case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY);break;case c.TABLE:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,ci(e,t));break;case c.TBODY:case c.TFOOT:case c.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,ci(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:xr(e,t)}}function wp(e,t){const r=t.tagID;io.has(r)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),An(e,t)):Ie(e,t)}function Lp(e,t){const r=t.tagID;switch(r){case c.TD:case c.TH:e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_ROW);break;case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(r)&&(e._closeTableCell(),ao(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:kn(e,t)}}function so(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,O.HTML);break;case c.OPTGROUP:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,O.HTML);break;case c.HR:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,O.HTML),t.ackSelfClosing=!0;break;case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break;case c.SCRIPT:case c.TEMPLATE:Xe(e,t)}}function lo(e,t){switch(t.tagID){case c.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break;case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break;case c.TEMPLATE:Dt(e,t)}}function Rp(e,t){const r=t.tagID;r===c.CAPTION||r===c.TABLE||r===c.TBODY||r===c.TFOOT||r===c.THEAD||r===c.TR||r===c.TD||r===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):so(e,t)}function Op(e,t){const r=t.tagID;r===c.CAPTION||r===c.TABLE||r===c.TBODY||r===c.TFOOT||r===c.THEAD||r===c.TR||r===c.TD||r===c.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):lo(e,t)}function Dp(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:Xe(e,t);break;case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.tmplInsertionModeStack[0]=b.IN_TABLE,e.insertionMode=b.IN_TABLE,Wt(e,t);break;case c.COL:e.tmplInsertionModeStack[0]=b.IN_COLUMN_GROUP,e.insertionMode=b.IN_COLUMN_GROUP,zi(e,t);break;case c.TR:e.tmplInsertionModeStack[0]=b.IN_TABLE_BODY,e.insertionMode=b.IN_TABLE_BODY,_n(e,t);break;case c.TD:case c.TH:e.tmplInsertionModeStack[0]=b.IN_ROW,e.insertionMode=b.IN_ROW,An(e,t);break;default:e.tmplInsertionModeStack[0]=b.IN_BODY,e.insertionMode=b.IN_BODY,Ie(e,t)}}function Pp(e,t){t.tagID===c.TEMPLATE&&Dt(e,t)}function oo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ji(e,t)}function Mp(e,t){t.tagID===c.HTML?Ie(e,t):cn(e,t)}function co(e,t){var r;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=b.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else cn(e,t)}function cn(e,t){e.insertionMode=b.IN_BODY,bn(e,t)}function Bp(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.FRAMESET:e._insertElement(t,O.HTML);break;case c.FRAME:e._appendElement(t,O.HTML),t.ackSelfClosing=!0;break;case c.NOFRAMES:Xe(e,t)}}function Fp(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=b.AFTER_FRAMESET))}function Hp(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.NOFRAMES:Xe(e,t)}}function Up(e,t){t.tagID===c.HTML&&(e.insertionMode=b.AFTER_AFTER_FRAMESET)}function $p(e,t){t.tagID===c.HTML?Ie(e,t):Zr(e,t)}function Zr(e,t){e.insertionMode=b.IN_BODY,bn(e,t)}function jp(e,t){switch(t.tagID){case c.HTML:Ie(e,t);break;case c.NOFRAMES:Xe(e,t)}}function zp(e,t){t.chars="�",e._insertCharacters(t)}function Yp(e,t){e._insertCharacters(t),e.framesetOk=!1}function uo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==O.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function qp(e,t){if(sd(t))uo(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===O.MATHML?Wl(t):n===O.SVG&&(ld(t),Ql(t)),Ui(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function Vp(e,t){if(t.tagID===c.P||t.tagID===c.BR){uo(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===O.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}var vy=new Set([S.AREA,S.BASE,S.BASEFONT,S.BGSOUND,S.BR,S.COL,S.EMBED,S.FRAME,S.HR,S.IMG,S.INPUT,S.KEYGEN,S.LINK,S.META,S.PARAM,S.SOURCE,S.TRACK,S.WBR]),yn=ho("end"),tt=ho("start");function ho(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function fo(e){const t=tt(e),r=yn(e);if(t&&r)return{start:t,end:r}}var Wp=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Qp=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ga={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function po(e,t){const r=im(e),n=Ml("type",{handlers:{root:Gp,element:Kp,text:Xp,comment:go,doctype:Zp,raw:em},unknown:tm}),i={parser:r?new Va(Ga):Va.getFragmentParser(void 0,Ga),handle(l){n(l,i)},stitches:!1,options:t||{}};n(e,i),Jt(i,tt());const a=r?i.parser.document:i.parser.getFragment(),s=af(a,{file:i.options.file});return i.stitches&&Ve(s,"comment",function(l,o,u){const h=l;if(h.value.stitch&&u&&o!==void 0){const f=u.children;return f[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function mo(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function Gp(e,t){mo(e.children,t)}function Kp(e,t){rm(e,t),mo(e.children,t),nm(e,t)}function Xp(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:ee.CHARACTER,chars:e.value,location:Dr(e)};Jt(t,tt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Zp(e,t){const r={type:ee.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Dr(e)};Jt(t,tt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Jp(e,t){t.stitches=!0;const r=am(e);"children"in e&&"children"in r&&(r.children=po({type:"root",children:e.children},t.options).children),go({type:"comment",value:{stitch:r}},t)}function go(e,t){const r=e.value,n={type:ee.COMMENT,data:r,location:Dr(e)};Jt(t,tt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function em(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Eo(t,tt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Wp,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function tm(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))Jp(r,t);else{let n="";throw Qp.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function Jt(e,t){Eo(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ge.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Eo(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function rm(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ge.PLAINTEXT)return;Jt(t,tt(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:St.html;i===St.html&&r==="svg"&&(i=St.svg);const a=uf({...e,children:[]},{space:i===St.svg?"svg":"html"}),s={type:ee.START_TAG,tagName:r,tagID:Zt(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Dr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function nm(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Tf.includes(r)||t.parser.tokenizer.state===ge.PLAINTEXT)return;Jt(t,yn(e));const n={type:ee.END_TAG,tagName:r,tagID:Zt(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Dr(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ge.RCDATA||t.parser.tokenizer.state===ge.RAWTEXT||t.parser.tokenizer.state===ge.SCRIPT_DATA)&&(t.parser.tokenizer.state=ge.DATA)}function im(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Dr(e){const t=tt(e)||{line:void 0,column:void 0,offset:void 0},r=yn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function am(e){return"children"in e?wt({...e,children:[]}):wt(e)}function ui(e){return function(t,r){return po(t,{...e,file:r})}}var xt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],gt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...xt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...xt],h2:[["className","sr-only"]],img:[...xt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...xt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...xt],table:[...xt],ul:[...xt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Et={}.hasOwnProperty;function sm(e,t){let r={type:"root",children:[]};const n=To({schema:t?{...gt,...t}:gt,stack:[]},e);return n&&(Array.isArray(n)?n.length===1?r=n[0]:r.children=n:r=n),r}function To(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return lm(e,r);case"doctype":return om(e,r);case"element":return cm(e,r);case"root":return um(e,r);case"text":return hm(e,r)}}}function lm(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),i={type:"comment",value:n<0?r:r.slice(0,n)};return Pr(i,t),i}}function om(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Pr(r,t),r}}function cm(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=bo(e,t.children),i=fm(e,t.properties);e.stack.pop();let a=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(a=!0,e.schema.ancestors&&Et.call(e.schema.ancestors,r))){const l=e.schema.ancestors[r];let o=-1;for(a=!1;++o<l.length;)e.stack.includes(l[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const s={type:"element",tagName:r,properties:i,children:n};return Pr(s,t),s}function um(e,t){const r={type:"root",children:bo(e,t.children)};return Pr(r,t),r}function hm(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Pr(r,t),r}function bo(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const a=To(e,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function fm(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,a=n&&Et.call(n,r)?n[r]:void 0,s=n&&Et.call(n,"*")?n["*"]:void 0,l=t&&typeof t=="object"?t:{},o={};let u;for(u in l)if(Et.call(l,u)){const h=l[u];let f=Ka(e,Xa(a,u),u,h);f==null&&(f=Ka(e,Xa(s,u),u,h)),f!=null&&(o[u]=f)}if(i&&Et.call(i,r)){const h=i[r];for(u in h)Et.call(h,u)&&!Et.call(o,u)&&(o[u]=h[u])}return o}function Ka(e,t,r,n){return t?Array.isArray(n)?dm(e,t,r,n):ko(e,t,r,n):void 0}function dm(e,t,r,n){let i=-1;const a=[];for(;++i<n.length;){const s=ko(e,t,r,n[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function ko(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&pm(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(n))){i=!0;break}}else if(s===n){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function pm(e,t,r){const n=e.schema.protocols&&Et.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const i=String(r),a=i.indexOf(":"),s=i.indexOf("?"),l=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||l>-1&&a>l)return!0;let u=-1;for(;++u<n.length;){const h=n[u];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Pr(e,t){const r=fo(t);t.data&&(e.data=wt(t.data)),r&&(e.position=r)}function Xa(e,t){let r,n=-1;if(e)for(;++n<e.length;){const i=e[n],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(r=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function _o(e){return function(t){return sm(t,e)}}function Za(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}var Oe=At(/[A-Za-z]/),Se=At(/[\dA-Za-z]/),mm=At(/[#-'*+\--9=?A-Z^-~]/);function un(e){return e!==null&&(e<32||e===127)}var hi=At(/\d/),gm=At(/[\dA-Fa-f]/),Em=At(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}var xn=At(new RegExp("\\p{P}|\\p{S}","u")),Lt=At(/\s/);function At(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Tm(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bm(e,t,r){const n=mn((r||{}).ignore||[]),i=km(t);let a=-1;for(;++a<i.length;)En(e,"text",s);function s(o,u){let h=-1,f;for(;++h<u.length;){const p=u[h],d=f?f.children:void 0;if(n(p,d?d.indexOf(p):void 0,f))return;f=p}if(f)return l(o,u)}function l(o,u){const h=u[u.length-1],f=i[a][0],p=i[a][1];let d=0;const g=h.children.indexOf(o);let N=!1,C=[];f.lastIndex=0;let _=f.exec(o.value);for(;_;){const v=_.index,y={index:_.index,input:_.input,stack:[...u,o]};let D=p(..._,y);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?f.lastIndex=v+1:(d!==v&&C.push({type:"text",value:o.value.slice(d,v)}),Array.isArray(D)?C.push(...D):D&&C.push(D),d=v+_[0].length,N=!0),!f.global)break;_=f.exec(o.value)}return N?(d<o.value.length&&C.push({type:"text",value:o.value.slice(d)}),h.children.splice(g,1,...C)):C=[o],g+C.length}}function km(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([_m(i[0]),Am(i[1])])}return t}function _m(e){return typeof e=="string"?new RegExp(Tm(e),"g"):e}function Am(e){return typeof e=="function"?e:function(){return e}}var Mn="phrasing",Bn=["autolink","link","image","label"];function ym(){return{transforms:[wm],enter:{literalAutolink:Cm,literalAutolinkEmail:Fn,literalAutolinkHttp:Fn,literalAutolinkWww:Fn},exit:{literalAutolink:vm,literalAutolinkEmail:Im,literalAutolinkHttp:Nm,literalAutolinkWww:Sm}}}function xm(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mn,notInConstruct:Bn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mn,notInConstruct:Bn},{character:":",before:"[ps]",after:"\\/",inConstruct:Mn,notInConstruct:Bn}]}}function Cm(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fn(e){this.config.enter.autolinkProtocol.call(this,e)}function Nm(e){this.config.exit.autolinkProtocol.call(this,e)}function Sm(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Im(e){this.config.exit.autolinkEmail.call(this,e)}function vm(e){this.exit(e)}function wm(e){bm(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Lm],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Rm]],{ignore:["link","linkReference"]})}function Lm(e,t,r,n,i){let a="";if(!Ao(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!Om(r)))return!1;const s=Dm(r+n);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function Rm(e,t,r,n){return!Ao(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Om(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Dm(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Za(e,"(");let a=Za(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function Ao(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Lt(r)||xn(r))&&(!t||r!==47)}function Ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}yo.peek=zm;function Pm(){this.buffer()}function Mm(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Bm(){this.buffer()}function Fm(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Hm(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ge(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Um(e){this.exit(e)}function $m(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ge(this.sliceSerialize(e)).toLowerCase(),r.label=t}function jm(e){this.exit(e)}function zm(){return"["}function yo(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const s=r.enter("footnoteReference"),l=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function Ym(){return{enter:{gfmFootnoteCallString:Pm,gfmFootnoteCall:Mm,gfmFootnoteDefinitionLabelString:Bm,gfmFootnoteDefinition:Fm},exit:{gfmFootnoteCallString:Hm,gfmFootnoteCall:Um,gfmFootnoteDefinitionLabelString:$m,gfmFootnoteDefinition:jm}}}function qm(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:yo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,s){const l=a.createTracker(s);let o=l.move("[^");const u=a.enter("footnoteDefinition"),h=a.enter("label");return o+=l.move(a.safe(a.associationId(n),{before:o,after:"]"})),h(),o+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),o+=l.move((t?`
70
+ `:" ")+a.indentLines(a.containerFlow(n,l.current()),t?xo:Vm))),u(),o}}function Vm(e,t,r){return t===0?e:xo(e,t,r)}function xo(e,t,r){return(r?"":" ")+e}var Wm=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Co.peek=Zm;function Qm(){return{canContainEols:["delete"],enter:{strikethrough:Km},exit:{strikethrough:Xm}}}function Gm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Wm}],handlers:{delete:Co}}}function Km(e){this.enter({type:"delete",children:[]},e)}function Xm(e){this.exit(e)}function Co(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let s=i.move("~~");return s+=r.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Zm(){return"~"}function Jm(e){return e.length}function eg(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||Jm,a=[],s=[],l=[],o=[];let u=0,h=-1;for(;++h<e.length;){const N=[],C=[];let _=-1;for(e[h].length>u&&(u=e[h].length);++_<e[h].length;){const v=tg(e[h][_]);if(r.alignDelimiters!==!1){const y=i(v);C[_]=y,(o[_]===void 0||y>o[_])&&(o[_]=y)}N.push(v)}s[h]=N,l[h]=C}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<u;)a[f]=Ja(n[f]);else{const N=Ja(n);for(;++f<u;)a[f]=N}f=-1;const p=[],d=[];for(;++f<u;){const N=a[f];let C="",_="";N===99?(C=":",_=":"):N===108?C=":":N===114&&(_=":");let v=r.alignDelimiters===!1?1:Math.max(1,o[f]-C.length-_.length);const y=C+"-".repeat(v)+_;r.alignDelimiters!==!1&&(v=C.length+v+_.length,v>o[f]&&(o[f]=v),d[f]=v),p[f]=y}s.splice(1,0,p),l.splice(1,0,d),h=-1;const g=[];for(;++h<s.length;){const N=s[h],C=l[h];f=-1;const _=[];for(;++f<u;){const v=N[f]||"";let y="",D="";if(r.alignDelimiters!==!1){const F=o[f]-(C[f]||0),w=a[f];w===114?y=" ".repeat(F):w===99?F%2?(y=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(y=" ".repeat(F/2),D=y):D=" ".repeat(F)}r.delimiterStart!==!1&&!f&&_.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&v==="")&&(r.delimiterStart!==!1||f)&&_.push(" "),r.alignDelimiters!==!1&&_.push(y),_.push(v),r.alignDelimiters!==!1&&_.push(D),r.padding!==!1&&_.push(" "),(r.delimiterEnd!==!1||f!==u-1)&&_.push("|")}g.push(r.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return g.join(`
71
+ `)}function tg(e){return e==null?"":String(e)}function Ja(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function rg(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const s=r.indentLines(r.containerFlow(e,a.current()),ng);return i(),s}function ng(e,t,r){return">"+(r?"":" ")+e}function ig(e,t){return es(e,t.inConstruct,!0)&&!es(e,t.notInConstruct,!1)}function es(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function ts(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
72
+ `&&ig(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
73
+ `}function ag(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>s&&(s=a):a=1,i=n+t.length,n=r.indexOf(t,i);return s}function sg(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lg(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function og(e,t,r,n){const i=lg(r),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(sg(e,r)){const f=r.enter("codeIndented"),p=r.indentLines(a,cg);return f(),p}const l=r.createTracker(n),o=i.repeat(Math.max(ag(a,i)+1,3)),u=r.enter("codeFenced");let h=l.move(o);if(e.lang){const f=r.enter(`codeFencedLang${s}`);h+=l.move(r.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${s}`);h+=l.move(" "),h+=l.move(r.safe(e.meta,{before:h,after:`
74
+ `,encode:["`"],...l.current()})),f()}return h+=l.move(`
75
+ `),a&&(h+=l.move(a+`
76
+ `)),h+=l.move(o),u(),h}function cg(e,t,r){return(r?"":" ")+e}function Yi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ug(e,t,r,n){const i=Yi(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("definition");let l=r.enter("label");const o=r.createTracker(n);let u=o.move("[");return u+=o.move(r.safe(r.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":`
77
+ `,...o.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),s(),u}function hg(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Cr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qt(e){if(e===null||he(e)||Lt(e))return 1;if(xn(e))return 2}function hn(e,t,r){const n=Qt(e),i=Qt(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}No.peek=fg;function No(e,t,r,n){const i=hg(r),a=r.enter("emphasis"),s=r.createTracker(n),l=s.move(i);let o=s.move(r.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=o.charCodeAt(0),h=hn(n.before.charCodeAt(n.before.length-1),u,i);h.inside&&(o=Cr(u)+o.slice(1));const f=o.charCodeAt(o.length-1),p=hn(n.after.charCodeAt(0),f,i);p.inside&&(o=o.slice(0,-1)+Cr(f));const d=s.move(i);return a(),r.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+o+d}function fg(e,t,r){return r.options.emphasis||"*"}var dg={};function qi(e,t){const r=t||dg;return So(e,typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,typeof r.includeHtml=="boolean"?r.includeHtml:!0)}function So(e,t,r){if(pg(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rs(e.children,t,r)}return Array.isArray(e)?rs(e,t,r):""}function rs(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=So(e[i],t,r);return n.join("")}function pg(e){return!!(e&&typeof e=="object")}function mg(e,t){let r=!1;return Ve(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,!1}),!!((!e.depth||e.depth<3)&&qi(e)&&(t.options.setext||r))}function gg(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(mg(e,r)){const h=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(e,{...a.current(),before:`
78
+ `,after:`
79
+ `});return f(),h(),p+`
80
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
81
+ `))+1))}const s="#".repeat(i),l=r.enter("headingAtx"),o=r.enter("phrasing");a.move(s+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
82
+ `,...a.current()});return/^[\t ]/.test(u)&&(u=Cr(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,r.options.closeAtx&&(u+=" "+s),o(),l(),u}Io.peek=Eg;function Io(e){return e.value||""}function Eg(){return"<"}vo.peek=Tg;function vo(e,t,r,n){const i=Yi(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("image");let l=r.enter("label");const o=r.createTracker(n);let u=o.move("![");return u+=o.move(r.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),s(),u}function Tg(){return"!"}wo.peek=bg;function wo(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let s=r.enter("label");const l=r.createTracker(n);let o=l.move("![");const u=r.safe(e.alt,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),s();const h=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:o,after:"]",...l.current()});return s(),r.stack=h,a(),i==="full"||!u||u!==f?o+=l.move(f+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function bg(){return"!"}Lo.peek=kg;function Lo(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const s=r.unsafe[a],l=r.compilePattern(s);let o;if(s.atBreak)for(;o=l.exec(n);){let u=o.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(o.index+1)}}return i+n+i}function kg(){return"`"}function Ro(e,t){const r=qi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Oo.peek=_g;function Oo(e,t,r,n){const i=Yi(r),a=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let l,o;if(Ro(e,r)){const h=r.stack;r.stack=[],l=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),r.stack=h,f}l=r.enter("link"),o=r.enter("label");let u=s.move("[");return u+=s.move(r.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(r.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(o=r.enter("destinationRaw"),u+=s.move(r.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=r.enter(`title${a}`),u+=s.move(" "+i),u+=s.move(r.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),o()),u+=s.move(")"),l(),u}function _g(e,t,r){return Ro(e,r)?"<":"["}Do.peek=Ag;function Do(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let s=r.enter("label");const l=r.createTracker(n);let o=l.move("[");const u=r.containerPhrasing(e,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),s();const h=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:o,after:"]",...l.current()});return s(),r.stack=h,a(),i==="full"||!u||u!==f?o+=l.move(f+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function Ag(){return"["}function Vi(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yg(e){const t=Vi(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function xg(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Po(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Cg(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let s=e.ordered?xg(r):Vi(r);const l=e.ordered?s==="."?")":".":yg(r);let o=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(o=!0),Po(r)===s&&h){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=l),r.bulletCurrent=s;const u=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=a,i(),u}function Ng(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Sg(e,t,r,n){const i=Ng(r);let a=r.bulletCurrent||Vi(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=r.createTracker(n);l.move(a+" ".repeat(s-a.length)),l.shift(s);const o=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,l.current()),h);return o(),u;function h(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?a:a+" ".repeat(s-a.length))+f}}function Ig(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),s=r.containerPhrasing(e,n);return a(),i(),s}var vg=mn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wg(e,t,r,n){return(e.children.some(function(i){return vg(i)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function Lg(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mo.peek=Rg;function Mo(e,t,r,n){const i=Lg(r),a=r.enter("strong"),s=r.createTracker(n),l=s.move(i+i);let o=s.move(r.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=o.charCodeAt(0),h=hn(n.before.charCodeAt(n.before.length-1),u,i);h.inside&&(o=Cr(u)+o.slice(1));const f=o.charCodeAt(o.length-1),p=hn(n.after.charCodeAt(0),f,i);p.inside&&(o=o.slice(0,-1)+Cr(f));const d=s.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+o+d}function Rg(e,t,r){return r.options.strong||"*"}function Og(e,t,r,n){return r.safe(e.value,n)}function Dg(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Pg(e,t,r){const n=(Po(r)+(r.options.ruleSpaces?" ":"")).repeat(Dg(r));return r.options.ruleSpaces?n.slice(0,-1):n}var Bo={blockquote:rg,break:ts,code:og,definition:ug,emphasis:No,hardBreak:ts,heading:gg,html:Io,image:vo,imageReference:wo,inlineCode:Lo,link:Oo,linkReference:Do,list:Cg,listItem:Sg,paragraph:Ig,root:wg,strong:Mo,text:Og,thematicBreak:Pg},ns=document.createElement("i");function Wi(e){const t="&"+e+";";ns.innerHTML=t;const r=ns.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Fo(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}var Mg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bg(e){return e.replace(Mg,Fg)}function Fg(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),i=n===120||n===88;return Fo(r.slice(i?2:1),i?16:10)}return Wi(r)||e}function Hg(){return{enter:{table:Ug,tableData:is,tableHeader:is,tableRow:jg},exit:{codeText:zg,table:$g,tableData:Hn,tableHeader:Hn,tableRow:Hn}}}function Ug(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function $g(e){this.exit(e),this.data.inTable=void 0}function jg(e){this.enter({type:"tableRow",children:[]},e)}function Hn(e){this.exit(e)}function is(e){this.enter({type:"tableCell",children:[]},e)}function zg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Yg));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Yg(e,t){return t==="|"?t:e}function qg(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
83
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:o,tableRow:l}};function s(d,g,N,C){return u(h(d,N,C),d.align)}function l(d,g,N,C){const _=u([f(d,N,C)]);return _.slice(0,_.indexOf(`
84
+ `))}function o(d,g,N,C){const _=N.enter("tableCell"),v=N.enter("phrasing"),y=N.containerPhrasing(d,{...C,before:a,after:a});return v(),_(),y}function u(d,g){return eg(d,{align:g,alignDelimiters:n,padding:r,stringLength:i})}function h(d,g,N){const C=d.children;let _=-1;const v=[],y=g.enter("table");for(;++_<C.length;)v[_]=f(C[_],g,N);return y(),v}function f(d,g,N){const C=d.children;let _=-1;const v=[],y=g.enter("tableRow");for(;++_<C.length;)v[_]=o(C[_],d,g,N);return y(),v}function p(d,g,N){let C=Bo.inlineCode(d,g,N);return N.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Vg(){return{exit:{taskListCheckValueChecked:as,taskListCheckValueUnchecked:as,paragraph:Qg}}}function Wg(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Gg}}}function as(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Qg(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Gg(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=r.createTracker(n);a&&l.move(s);let o=Bo.listItem(e,t,r,{...n,...l.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(h){return h+s}}function Kg(){return[ym(),Ym(),Qm(),Hg(),Vg()]}function Xg(e){return{extensions:[xm(),qm(e),Gm(),qg(e),Wg()]}}function je(e,t,r,n){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);a<n.length;)s=n.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function qe(e,t){return e.length>0?(je(e,e.length,0,t),e):t}var ss={}.hasOwnProperty;function Ho(e){const t={};let r=-1;for(;++r<e.length;)Zg(t,e[r]);return t}function Zg(e,t){let r;for(r in t){const n=(ss.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){ss.call(n,a)||(n[a]=[]);const s=i[a];Jg(n[a],Array.isArray(s)?s:s?[s]:[])}}}function Jg(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);je(e,0,0,n)}var eE={tokenize:sE,partial:!0},Uo={tokenize:lE,partial:!0},$o={tokenize:oE,partial:!0},jo={tokenize:cE,partial:!0},tE={tokenize:uE,partial:!0},zo={name:"wwwAutolink",tokenize:iE,previous:qo},Yo={name:"protocolAutolink",tokenize:aE,previous:Vo},ot={name:"emailAutolink",tokenize:nE,previous:Wo},rt={};function rE(){return{text:rt}}var Ct=48;for(;Ct<123;)rt[Ct]=ot,Ct++,Ct===58?Ct=65:Ct===91&&(Ct=97);rt[43]=ot;rt[45]=ot;rt[46]=ot;rt[95]=ot;rt[72]=[ot,Yo];rt[104]=[ot,Yo];rt[87]=[ot,zo];rt[119]=[ot,zo];function nE(e,t,r){const n=this;let i,a;return s;function s(f){return!fi(f)||!Wo.call(n,n.previous)||Qi(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(f))}function l(f){return fi(f)?(e.consume(f),l):f===64?(e.consume(f),o):r(f)}function o(f){return f===46?e.check(tE,h,u)(f):f===45||f===95||Se(f)?(a=!0,e.consume(f),o):h(f)}function u(f){return e.consume(f),i=!0,o}function h(f){return a&&i&&Oe(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function iE(e,t,r){const n=this;return i;function i(s){return s!==87&&s!==119||!qo.call(n,n.previous)||Qi(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(eE,e.attempt(Uo,e.attempt($o,a),r),r)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function aE(e,t,r){const n=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&Vo.call(n,n.previous)&&!Qi(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),l):r(f)}function l(f){if(Oe(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),l;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),o}return r(f)}function o(f){return f===47?(e.consume(f),a?u:(a=!0,o)):r(f)}function u(f){return f===null||un(f)||he(f)||Lt(f)||xn(f)?r(f):e.attempt(Uo,e.attempt($o,h),r)(f)}function h(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function sE(e,t,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),i):s===46&&n===3?(e.consume(s),a):r(s)}function a(s){return s===null?r(s):t(s)}}function lE(e,t,r){let n,i,a;return s;function s(u){return u===46||u===95?e.check(jo,o,l)(u):u===null||he(u)||Lt(u)||u!==45&&xn(u)?o(u):(a=!0,e.consume(u),s)}function l(u){return u===95?n=!0:(i=n,n=void 0),e.consume(u),s}function o(u){return i||n||!a?r(u):t(u)}}function oE(e,t){let r=0,n=0;return i;function i(s){return s===40?(r++,e.consume(s),i):s===41&&n<r?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(jo,t,a)(s):s===null||he(s)||Lt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&n++,e.consume(s),i}}function cE(e,t,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),n):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||he(l)||Lt(l)?t(l):r(l)}function i(l){return l===null||l===40||l===91||he(l)||Lt(l)?t(l):n(l)}function a(l){return Oe(l)?s(l):r(l)}function s(l){return l===59?(e.consume(l),n):Oe(l)?(e.consume(l),s):r(l)}}function uE(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Se(a)?r(a):t(a)}}function qo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function Vo(e){return!Oe(e)}function Wo(e){return!(e===47||fi(e))}function fi(e){return e===43||e===45||e===46||e===95||Se(e)}function Qi(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function er(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let s="";if(a===37&&Se(e.charCodeAt(r+1))&&Se(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(r+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function Cn(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}var di={name:"attention",resolveAll:hE,tokenize:fE};function hE(e,t){let r=-1,n,i,a,s,l,o,u,h;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;o=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[n][1].end},p={...e[r][1].start};ls(f,-o),ls(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},l={type:o>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[n][1].end={...s.start},e[r][1].start={...l.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=qe(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=qe(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),u=qe(u,Cn(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=qe(u,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(h=2,u=qe(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):h=0,je(e,n-1,r-n+3,u),r=n+u.length-h-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function fE(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Qt(n);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===a)return e.consume(o),l;const u=e.exit("attentionSequence"),h=Qt(o),f=!h||h===2&&i||r.includes(o),p=!i||i===2&&h||r.includes(n);return u._open=!!(a===42?f:f&&(i||!p)),u._close=!!(a===42?p:p&&(h||!f)),t(o)}}function ls(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var dE={name:"autolink",tokenize:pE};function pE(e,t,r){let n=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return Oe(d)?(e.consume(d),s):d===64?r(d):u(d)}function s(d){return d===43||d===45||d===46||Se(d)?(n=1,l(d)):u(d)}function l(d){return d===58?(e.consume(d),n=0,o):(d===43||d===45||d===46||Se(d))&&n++<32?(e.consume(d),l):(n=0,u(d))}function o(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||un(d)?r(d):(e.consume(d),o)}function u(d){return d===64?(e.consume(d),h):mm(d)?(e.consume(d),u):r(d)}function h(d){return Se(d)?f(d):r(d)}function f(d){return d===46?(e.consume(d),n=0,h):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||Se(d))&&n++<63){const g=d===45?p:f;return e.consume(d),g}return r(d)}}function ae(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return re(o)?(e.enter(r),l(o)):t(o)}function l(o){return re(o)&&a++<i?(e.consume(o),l):(e.exit(r),t(o))}}var Mr={partial:!0,tokenize:mE};function mE(e,t,r){return n;function n(a){return re(a)?ae(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||G(a)?t(a):r(a)}}var Qo={continuation:{tokenize:EE},exit:TE,name:"blockQuote",tokenize:gE};function gE(e,t,r){const n=this;return i;function i(s){if(s===62){const l=n.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return r(s)}function a(s){return re(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function EE(e,t,r){const n=this;return i;function i(s){return re(s)?ae(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Qo,t,r)(s)}}function TE(e){e.exit("blockQuote")}var Go={name:"characterEscape",tokenize:bE};function bE(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Em(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var Ko={name:"characterReference",tokenize:kE};function kE(e,t,r){const n=this;let i=0,a,s;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),o}function o(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,s=Se,h(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=gm,h):(e.enter("characterReferenceValue"),a=7,s=hi,h(f))}function h(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===Se&&!Wi(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),h):r(f)}}var os={partial:!0,tokenize:AE},cs={concrete:!0,name:"codeFenced",tokenize:_E};function _E(e,t,r){const n=this,i={partial:!0,tokenize:F};let a=0,s=0,l;return o;function o(w){return u(w)}function u(w){const $=n.events[n.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,l=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===l?(s++,e.consume(w),h):s<3?r(w):(e.exit("codeFencedFenceSequence"),re(w)?ae(e,f,"whitespace")(w):f(w))}function f(w){return w===null||G(w)?(e.exit("codeFencedFence"),n.interrupt?t(w):e.check(os,N,D)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||G(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(w)):re(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ae(e,d,"whitespace")(w)):w===96&&w===l?r(w):(e.consume(w),p)}function d(w){return w===null||G(w)?f(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||G(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(w)):w===96&&w===l?r(w):(e.consume(w),g)}function N(w){return e.attempt(i,D,C)(w)}function C(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),_}function _(w){return a>0&&re(w)?ae(e,v,"linePrefix",a+1)(w):v(w)}function v(w){return w===null||G(w)?e.check(os,N,D)(w):(e.enter("codeFlowValue"),y(w))}function y(w){return w===null||G(w)?(e.exit("codeFlowValue"),v(w)):(e.consume(w),y)}function D(w){return e.exit("codeFenced"),t(w)}function F(w,$,j){let q=0;return I;function I(W){return w.enter("lineEnding"),w.consume(W),w.exit("lineEnding"),U}function U(W){return w.enter("codeFencedFence"),re(W)?ae(w,H,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):H(W)}function H(W){return W===l?(w.enter("codeFencedFenceSequence"),K(W)):j(W)}function K(W){return W===l?(q++,w.consume(W),K):q>=s?(w.exit("codeFencedFenceSequence"),re(W)?ae(w,ie,"whitespace")(W):ie(W)):j(W)}function ie(W){return W===null||G(W)?(w.exit("codeFencedFence"),$(W)):j(W)}}}function AE(e,t,r){const n=this;return i;function i(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}var Un={name:"codeIndented",tokenize:xE},yE={partial:!0,tokenize:CE};function xE(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),ae(e,a,"linePrefix",5)(u)}function a(u){const h=n.events[n.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(u):r(u)}function s(u){return u===null?o(u):G(u)?e.attempt(yE,s,o)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||G(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function o(u){return e.exit("codeIndented"),t(u)}}function CE(e,t,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ae(e,a,"linePrefix",5)(s)}function a(s){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):G(s)?i(s):r(s)}}var NE={name:"codeText",previous:IE,resolve:SE,tokenize:vE};function SE(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function IE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vE(e,t,r){let n=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),o(f))}function o(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),o):f===96?(a=e.enter("codeTextSequence"),i=0,h(f)):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||G(f)?(e.exit("codeTextData"),o(f)):(e.consume(f),u)}function h(f){return f===96?(e.consume(f),i++,h):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",u(f))}}var wE=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const n=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return r&&ur(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ur(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ur(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);ur(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ur(this.left,t.reverse())}}};function ur(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function Xo(e){const t={};let r=-1,n,i,a,s,l,o,u;const h=new wE(e);for(;++r<h.length;){for(;r in t;)r=t[r];if(n=h.get(r),r&&n[1].type==="chunkFlow"&&h.get(r-1)[1].type==="listItemPrefix"&&(o=n[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,LE(h,r)),r=t[r],u=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...h.get(i)[1].start},l=h.slice(i,r),l.unshift(n),h.splice(i,r-i+1,l))}}return je(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!u}function LE(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,o=[],u={};let h,f,p=-1,d=r,g=0,N=0;const C=[N];for(;d;){for(;e.get(++i)[1]!==d;);a.push(i),d._tokenizer||(h=n.sliceStream(d),d.next||h.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=r;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(N=p+1,C.push(N),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):C.pop(),p=C.length;p--;){const _=l.slice(C[p],C[p+1]),v=a.pop();o.push([v,v+_.length-1]),e.splice(v,2,_)}for(o.reverse(),p=-1;++p<o.length;)u[g+o[p][0]]=g+o[p][1],g+=o[p][1]-o[p][0]-1;return u}var RE={resolve:DE,tokenize:PE},OE={partial:!0,tokenize:ME};function DE(e){return Xo(e),e}function PE(e,t){let r;return n;function n(l){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):G(l)?e.check(OE,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function ME(e,t,r){const n=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ae(e,a,"linePrefix")}function a(s){if(s===null||G(s))return r(s);const l=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function Zo(e,t,r,n,i,a,s,l,o){const u=o||Number.POSITIVE_INFINITY;let h=0;return f;function f(_){return _===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||un(_)?r(_):(e.enter(n),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),N(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||G(_)?r(_):(e.consume(_),_===92?g:d)}function g(_){return _===60||_===62||_===92?(e.consume(_),d):d(_)}function N(_){return!h&&(_===null||_===41||he(_))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(n),t(_)):h<u&&_===40?(e.consume(_),h++,N):_===41?(e.consume(_),h--,N):_===null||_===32||_===40||un(_)?r(_):(e.consume(_),_===92?C:N)}function C(_){return _===40||_===41||_===92?(e.consume(_),N):N(_)}}function Jo(e,t,r,n,i,a){const s=this;let l=0,o;return u;function u(d){return e.enter(n),e.enter(i),e.consume(d),e.exit(i),e.enter(a),h}function h(d){return l>999||d===null||d===91||d===93&&!o||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):d===93?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):G(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||G(d)||l++>999?(e.exit("chunkString"),h(d)):(e.consume(d),o||(o=!re(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),l++,f):f(d)}}function ec(e,t,r,n,i,a){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,o):r(p)}function o(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(a),u(p))}function u(p){return p===s?(e.exit(a),o(s)):p===null?r(p):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ae(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===s||p===null||G(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:h)}function f(p){return p===s||p===92?(e.consume(p),h):h(p)}}function kr(e,t){let r;return n;function n(i){return G(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):re(i)?ae(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}var BE={name:"definition",tokenize:HE},FE={partial:!0,tokenize:UE};function HE(e,t,r){const n=this;let i;return a;function a(d){return e.enter("definition"),s(d)}function s(d){return Jo.call(n,e,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=Ge(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),o):r(d)}function o(d){return he(d)?kr(e,u)(d):u(d)}function u(d){return Zo(e,h,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function h(d){return e.attempt(FE,f,f)(d)}function f(d){return re(d)?ae(e,p,"whitespace")(d):p(d)}function p(d){return d===null||G(d)?(e.exit("definition"),n.parser.defined.push(i),t(d)):r(d)}}function UE(e,t,r){return n;function n(l){return he(l)?kr(e,i)(l):r(l)}function i(l){return ec(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return re(l)?ae(e,s,"whitespace")(l):s(l)}function s(l){return l===null||G(l)?t(l):r(l)}}var $E={name:"hardBreakEscape",tokenize:jE};function jE(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return G(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var zE={name:"headingAtx",resolve:YE,tokenize:qE};function YE(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},je(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function qE(e,t,r){let n=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&n++<6?(e.consume(h),s):h===null||he(h)?(e.exit("atxHeadingSequence"),l(h)):r(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||G(h)?(e.exit("atxHeading"),t(h)):re(h)?ae(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||he(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}var VE=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],us=["pre","script","style","textarea"],WE={concrete:!0,name:"htmlFlow",resolveTo:KE,tokenize:XE},QE={partial:!0,tokenize:JE},GE={partial:!0,tokenize:ZE};function KE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function XE(e,t,r){const n=this;let i,a,s,l,o;return u;function u(A){return h(A)}function h(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),f}function f(A){return A===33?(e.consume(A),p):A===47?(e.consume(A),a=!0,N):A===63?(e.consume(A),i=3,n.interrupt?t:k):Oe(A)?(e.consume(A),s=String.fromCharCode(A),C):r(A)}function p(A){return A===45?(e.consume(A),i=2,d):A===91?(e.consume(A),i=5,l=0,g):Oe(A)?(e.consume(A),i=4,n.interrupt?t:k):r(A)}function d(A){return A===45?(e.consume(A),n.interrupt?t:k):r(A)}function g(A){return A==="CDATA[".charCodeAt(l++)?(e.consume(A),l===6?n.interrupt?t:H:g):r(A)}function N(A){return Oe(A)?(e.consume(A),s=String.fromCharCode(A),C):r(A)}function C(A){if(A===null||A===47||A===62||he(A)){const Ne=A===47,Te=s.toLowerCase();return!Ne&&!a&&us.includes(Te)?(i=1,n.interrupt?t(A):H(A)):VE.includes(s.toLowerCase())?(i=6,Ne?(e.consume(A),_):n.interrupt?t(A):H(A)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(A):a?v(A):y(A))}return A===45||Se(A)?(e.consume(A),s+=String.fromCharCode(A),C):r(A)}function _(A){return A===62?(e.consume(A),n.interrupt?t:H):r(A)}function v(A){return re(A)?(e.consume(A),v):I(A)}function y(A){return A===47?(e.consume(A),I):A===58||A===95||Oe(A)?(e.consume(A),D):re(A)?(e.consume(A),y):I(A)}function D(A){return A===45||A===46||A===58||A===95||Se(A)?(e.consume(A),D):F(A)}function F(A){return A===61?(e.consume(A),w):re(A)?(e.consume(A),F):y(A)}function w(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(e.consume(A),o=A,$):re(A)?(e.consume(A),w):j(A)}function $(A){return A===o?(e.consume(A),o=null,q):A===null||G(A)?r(A):(e.consume(A),$)}function j(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||he(A)?F(A):(e.consume(A),j)}function q(A){return A===47||A===62||re(A)?y(A):r(A)}function I(A){return A===62?(e.consume(A),U):r(A)}function U(A){return A===null||G(A)?H(A):re(A)?(e.consume(A),U):r(A)}function H(A){return A===45&&i===2?(e.consume(A),Y):A===60&&i===1?(e.consume(A),z):A===62&&i===4?(e.consume(A),Ce):A===63&&i===3?(e.consume(A),k):A===93&&i===5?(e.consume(A),Ee):G(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(QE,we,K)(A)):A===null||G(A)?(e.exit("htmlFlowData"),K(A)):(e.consume(A),H)}function K(A){return e.check(GE,ie,we)(A)}function ie(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),W}function W(A){return A===null||G(A)?K(A):(e.enter("htmlFlowData"),H(A))}function Y(A){return A===45?(e.consume(A),k):H(A)}function z(A){return A===47?(e.consume(A),s="",se):H(A)}function se(A){if(A===62){const Ne=s.toLowerCase();return us.includes(Ne)?(e.consume(A),Ce):H(A)}return Oe(A)&&s.length<8?(e.consume(A),s+=String.fromCharCode(A),se):H(A)}function Ee(A){return A===93?(e.consume(A),k):H(A)}function k(A){return A===62?(e.consume(A),Ce):A===45&&i===2?(e.consume(A),k):H(A)}function Ce(A){return A===null||G(A)?(e.exit("htmlFlowData"),we(A)):(e.consume(A),Ce)}function we(A){return e.exit("htmlFlow"),t(A)}}function ZE(e,t,r){const n=this;return i;function i(s){return G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function JE(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Mr,t,r)}}var eT={name:"htmlText",tokenize:tT};function tT(e,t,r){const n=this;let i,a,s;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),F):k===63?(e.consume(k),y):Oe(k)?(e.consume(k),j):r(k)}function u(k){return k===45?(e.consume(k),h):k===91?(e.consume(k),a=0,g):Oe(k)?(e.consume(k),v):r(k)}function h(k){return k===45?(e.consume(k),d):r(k)}function f(k){return k===null?r(k):k===45?(e.consume(k),p):G(k)?(s=f,z(k)):(e.consume(k),f)}function p(k){return k===45?(e.consume(k),d):f(k)}function d(k){return k===62?Y(k):k===45?p(k):f(k)}function g(k){return k==="CDATA[".charCodeAt(a++)?(e.consume(k),a===6?N:g):r(k)}function N(k){return k===null?r(k):k===93?(e.consume(k),C):G(k)?(s=N,z(k)):(e.consume(k),N)}function C(k){return k===93?(e.consume(k),_):N(k)}function _(k){return k===62?Y(k):k===93?(e.consume(k),_):N(k)}function v(k){return k===null||k===62?Y(k):G(k)?(s=v,z(k)):(e.consume(k),v)}function y(k){return k===null?r(k):k===63?(e.consume(k),D):G(k)?(s=y,z(k)):(e.consume(k),y)}function D(k){return k===62?Y(k):y(k)}function F(k){return Oe(k)?(e.consume(k),w):r(k)}function w(k){return k===45||Se(k)?(e.consume(k),w):$(k)}function $(k){return G(k)?(s=$,z(k)):re(k)?(e.consume(k),$):Y(k)}function j(k){return k===45||Se(k)?(e.consume(k),j):k===47||k===62||he(k)?q(k):r(k)}function q(k){return k===47?(e.consume(k),Y):k===58||k===95||Oe(k)?(e.consume(k),I):G(k)?(s=q,z(k)):re(k)?(e.consume(k),q):Y(k)}function I(k){return k===45||k===46||k===58||k===95||Se(k)?(e.consume(k),I):U(k)}function U(k){return k===61?(e.consume(k),H):G(k)?(s=U,z(k)):re(k)?(e.consume(k),U):q(k)}function H(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),i=k,K):G(k)?(s=H,z(k)):re(k)?(e.consume(k),H):(e.consume(k),ie)}function K(k){return k===i?(e.consume(k),i=void 0,W):k===null?r(k):G(k)?(s=K,z(k)):(e.consume(k),K)}function ie(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||he(k)?q(k):(e.consume(k),ie)}function W(k){return k===47||k===62||he(k)?q(k):r(k)}function Y(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function z(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),se}function se(k){return re(k)?ae(e,Ee,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):Ee(k)}function Ee(k){return e.enter("htmlTextData"),s(k)}}var Gi={name:"labelEnd",resolveAll:aT,resolveTo:sT,tokenize:lT},rT={tokenize:oT},nT={tokenize:cT},iT={tokenize:uT};function aT(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&je(e,0,e.length,r),e}function sT(e,t){let r=e.length,n=0,i,a,s,l;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",o,t],["enter",u,t]],l=qe(l,e.slice(a+1,a+n+3)),l=qe(l,[["enter",h,t]]),l=qe(l,Cn(t.parser.constructs.insideSpan.null,e.slice(a+n+4,s-3),t)),l=qe(l,[["exit",h,t],e[s-2],e[s-1],["exit",u,t]]),l=qe(l,e.slice(s+1)),l=qe(l,[["exit",o,t]]),je(e,a,e.length,l),e}function lT(e,t,r){const n=this;let i=n.events.length,a,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return l;function l(p){return a?a._inactive?f(p):(s=n.parser.defined.includes(Ge(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):r(p)}function o(p){return p===40?e.attempt(rT,h,s?h:f)(p):p===91?e.attempt(nT,h,s?u:f)(p):s?h(p):f(p)}function u(p){return e.attempt(iT,h,f)(p)}function h(p){return t(p)}function f(p){return a._balanced=!0,r(p)}}function oT(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return he(f)?kr(e,a)(f):a(f)}function a(f){return f===41?h(f):Zo(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return he(f)?kr(e,o)(f):h(f)}function l(f){return r(f)}function o(f){return f===34||f===39||f===40?ec(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function u(f){return he(f)?kr(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function cT(e,t,r){const n=this;return i;function i(l){return Jo.call(n,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return n.parser.defined.includes(Ge(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(l):r(l)}function s(l){return r(l)}}function uT(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var hT={name:"labelStartImage",resolveAll:Gi.resolveAll,tokenize:fT};function fT(e,t,r){const n=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):r(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):t(l)}}var dT={name:"labelStartLink",resolveAll:Gi.resolveAll,tokenize:pT};function pT(e,t,r){const n=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var $n={name:"lineEnding",tokenize:mT};function mT(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ae(e,t,"linePrefix")}}var Jr={name:"thematicBreak",tokenize:gT};function gT(e,t,r){let n=0,i;return a;function a(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):n>=3&&(u===null||G(u))?(e.exit("thematicBreak"),t(u)):r(u)}function o(u){return u===i?(e.consume(u),n++,o):(e.exit("thematicBreakSequence"),re(u)?ae(e,l,"whitespace")(u):l(u))}}var Me={continuation:{tokenize:kT},exit:AT,name:"list",tokenize:bT},ET={partial:!0,tokenize:yT},TT={partial:!0,tokenize:_T};function bT(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(d){const g=n.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!n.containerState.marker||d===n.containerState.marker:hi(d)){if(n.containerState.type||(n.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Jr,r,u)(d):u(d);if(!n.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(d)}return r(d)}function o(d){return hi(d)&&++s<10?(e.consume(d),o):(!n.interrupt||s<2)&&(n.containerState.marker?d===n.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):r(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||d,e.check(Mr,n.interrupt?r:h,e.attempt(ET,p,f))}function h(d){return n.containerState.initialBlankLine=!0,a++,p(d)}function f(d){return re(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):r(d)}function p(d){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function kT(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Mr,i,a);function i(l){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ae(e,t,"listItemIndent",n.containerState.size+1)(l)}function a(l){return n.containerState.furtherBlankLines||!re(l)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(l)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(TT,t,s)(l))}function s(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,ae(e,e.attempt(Me,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function _T(e,t,r){const n=this;return ae(e,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(a):r(a)}}function AT(e){e.exit(this.containerState.type)}function yT(e,t,r){const n=this;return ae(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!re(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var hs={name:"setextUnderline",resolveTo:xT,tokenize:CT};function xT(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function CT(e,t,r){const n=this;let i;return a;function a(u){let h=n.events.length,f;for(;h--;)if(n.events[h][1].type!=="lineEnding"&&n.events[h][1].type!=="linePrefix"&&n.events[h][1].type!=="content"){f=n.events[h][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):r(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),re(u)?ae(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||G(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}var NT={tokenize:DT,partial:!0};function ST(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:LT,continuation:{tokenize:RT},exit:OT}},text:{91:{name:"gfmFootnoteCall",tokenize:wT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:IT,resolveTo:vT}}}}function IT(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;i--;){const o=n.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return l;function l(o){if(!s||!s._balanced)return r(o);const u=Ge(n.sliceSerialize({start:s.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function vT(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...l),e}function wT(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,s;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),o}function o(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(a>999||f===93&&!s||f===null||f===91||he(f))return r(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Ge(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return he(f)||(s=!0),a++,e.consume(f),f===92?h:u}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,u):u(f)}}function LT(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,s=0,l;return o;function o(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):r(g)}function h(g){if(s>999||g===93&&!l||g===null||g===91||he(g))return r(g);if(g===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return a=Ge(n.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return he(g)||(l=!0),s++,e.consume(g),g===92?f:h}function f(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),ae(e,d,"gfmFootnoteDefinitionWhitespace")):r(g)}function d(g){return t(g)}}function RT(e,t,r){return e.check(Mr,t,e.attempt(NT,t,r))}function OT(e){e.exit("gfmFootnoteDefinition")}function DT(e,t,r){const n=this;return ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):r(a)}}function PT(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:n};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function n(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let o=l;for(;o--;)if(a[o][0]==="exit"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[o][1].end.offset-a[o][1].start.offset){a[l][1].type="strikethroughSequence",a[o][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[o][1].start),end:Object.assign({},a[l][1].end)},h={type:"strikethroughText",start:Object.assign({},a[o][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",u,s],["enter",a[o][1],s],["exit",a[o][1],s],["enter",h,s]],p=s.parser.constructs.insideSpan.null;p&&je(f,f.length,0,Cn(p,a.slice(o+1,l),s)),je(f,f.length,0,[["exit",h,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),je(a,o-1,l-o+3,f),l=o+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const o=this.previous,u=this.events;let h=0;return f;function f(d){return o===126&&u[u.length-1][1].type!=="characterEscape"?l(d):(a.enter("strikethroughSequenceTemporary"),p(d))}function p(d){const g=Qt(o);if(d===126)return h>1?l(d):(a.consume(d),h++,p);if(h<2&&!t)return l(d);const N=a.exit("strikethroughSequenceTemporary"),C=Qt(d);return N._open=!C||C===2&&!!g,N._close=!g||g===2&&!!C,s(d)}}}var MT=class{constructor(){this.map=[]}add(e,t,r){BT(this,e,t,r)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push(e.slice()),e.length=0;let n=r.pop();for(;n;){for(const i of n)e.push(i);n=r.pop()}this.map.length=0}};function BT(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function FT(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function HT(){return{flow:{null:{name:"table",tokenize:UT,resolveAll:$T}}}}function UT(e,t,r){const n=this;let i=0,a=0,s;return l;function l(I){let U=n.events.length-1;for(;U>-1;){const ie=n.events[U][1].type;if(ie==="lineEnding"||ie==="linePrefix")U--;else break}const H=U>-1?n.events[U][1].type:null,K=H==="tableHead"||H==="tableRow"?w:o;return K===w&&n.parser.lazy[n.now().line]?r(I):K(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(s=!0,a+=1),h(I)}function h(I){return I===null?r(I):G(I)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),d):r(I):re(I)?ae(e,h,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||he(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?p:f)}function p(I){return I===92||I===124?(e.consume(I),f):f(I)}function d(I){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(I):(e.enter("tableDelimiterRow"),s=!1,re(I)?ae(e,g,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?C(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),N):F(I)}function N(I){return re(I)?ae(e,C,"whitespace")(I):C(I)}function C(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),_):I===45?(a+=1,_(I)):I===null||G(I)?D(I):F(I)}function _(I){return I===45?(e.enter("tableDelimiterFiller"),v(I)):F(I)}function v(I){return I===45?(e.consume(I),v):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(I))}function y(I){return re(I)?ae(e,D,"whitespace")(I):D(I)}function D(I){return I===124?g(I):I===null||G(I)?!s||i!==a?F(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):F(I)}function F(I){return r(I)}function w(I){return e.enter("tableRow"),$(I)}function $(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),$):I===null||G(I)?(e.exit("tableRow"),t(I)):re(I)?ae(e,$,"whitespace")(I):(e.enter("data"),j(I))}function j(I){return I===null||I===124||he(I)?(e.exit("data"),$(I)):(e.consume(I),I===92?q:j)}function q(I){return I===92||I===124?(e.consume(I),j):j(I)}}function $T(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,o=0,u,h,f;const p=new MT;for(;++r<e.length;){const d=e[r],g=d[1];d[0]==="enter"?g.type==="tableHead"?(l=!1,o!==0&&(fs(p,t,o,u,h),h=void 0,o=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(n=!0,f=void 0,a=[0,0,0,0],s=[0,r+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",h,t]])),i=g.type==="tableDelimiterRow"?2:h?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=Vr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=r)):g.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(s[0]=s[1],f=Vr(p,t,a,i,void 0,f)),a=s,s=[a[1],r,0,0])):g.type==="tableHead"?(l=!0,o=r):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=r,a[1]!==0?(s[0]=s[1],f=Vr(p,t,a,i,r,f)):s[1]!==0&&(f=Vr(p,t,s,i,r,f)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=r)}for(o!==0&&fs(p,t,o,u,h),p.consume(t.events),r=-1;++r<t.events.length;){const d=t.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=FT(t.events,r))}return e}function Vr(e,t,r,n,i,a){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(a.end=Object.assign({},$t(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const o=$t(t.events,r[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const u=$t(t.events,r[2]),h=$t(t.events,r[3]),f={type:l,start:Object.assign({},u),end:Object.assign({},h)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const p=t.events[r[2]],d=t.events[r[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const g=r[2]+1,N=r[3]-r[2]-1;e.add(g,N,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},$t(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function fs(e,t,r,n,i){const a=[],s=$t(t.events,r);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),n.end=Object.assign({},s),a.push(["exit",n,t]),e.add(r+1,0,a)}function $t(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var jT={name:"tasklistCheck",tokenize:YT};function zT(){return{text:{91:jT}}}function YT(e,t,r){const n=this;return i;function i(o){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return he(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):r(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):r(o)}function l(o){return G(o)?t(o):re(o)?e.check({tokenize:qT},t,r)(o):r(o)}}function qT(e,t,r){return ae(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function VT(e){return Ho([rE(),ST(),PT(e),HT(),zT()])}var WT={};function QT(e){const t=this,r=e||WT,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(VT(r)),a.push(Kg()),s.push(Xg(r))}var GT=Object.defineProperty,KT=Object.defineProperties,XT=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,ZT=Object.prototype.hasOwnProperty,JT=Object.prototype.propertyIsEnumerable,ps=(e,t,r)=>t in e?GT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tc=(e,t)=>{for(var r in t||(t={}))ZT.call(t,r)&&ps(e,r,t[r]);if(ds)for(var r of ds(t))JT.call(t,r)&&ps(e,r,t[r]);return e},rc=(e,t)=>KT(e,XT(t)),de={PROSE:0,FENCE_MARKER:1,FENCE_INFO:2,FENCE_BODY:3,CODE_SPAN:4,CODE_SPAN_OPEN:5},eb=/^(`{3,}|~{3,})(.*)$/,tb=e=>e!==void 0&&e>="0"&&e<="9",rb=(e,t)=>{let r=t;if(e[r]==="-"||e[r]==="*"||e[r]==="+")r+=1;else{for(;tb(e[r])&&r-t<9;)r+=1;if(r===t||e[r]!=="."&&e[r]!==")")return-1;r+=1}return e[r]===" "?r+1:-1},nb=(e,t,r)=>{let n=0,i=t,a=!1,s=t;for(;;){for(;s<r&&e[s]===" ";)s+=1;if(e[s]===">"){n+=1,s+=e[s+1]===" "?2:1,i=s,a=!1;continue}let l=s<r?rb(e,s):-1;if(l===-1)return{contentStart:s,listIndent:a?s-i:0,quoteDepth:n};s=l,a=!0}},ib=(e,t,r,n)=>{let i=t;for(let a=0;a<n;a+=1){for(;i<r&&e[i]===" ";)i+=1;if(e[i]!==">")return-1;i+=1,e[i]===" "&&(i+=1)}return i},ab=(e,t,r,n,i)=>{let a=t+n;e.fill(de.FENCE_MARKER,a,a+i),e.fill(de.FENCE_INFO,a+i,Math.min(r+1,e.length))},sb=(e,t,r,n)=>{let i=t;for(;i<r&&e[i]===" ";)i+=1;let a=0;for(;i<r&&e[i]===n.char;)i+=1,a+=1;if(a<n.length)return!1;for(;i<r;){if(e[i]!==" "&&e[i]!==" "&&e[i]!=="\r")return!1;i+=1}return!0},lb=(e,t,r,n)=>{let i=n>r&&e[n-1]==="\r"?n-1:n,a=nb(e,r,i),s=e.slice(a.contentStart,i).match(eb);if(!s)return null;let[,l,o]=s,u=l[0];return u==="`"&&o.includes("`")?null:(ab(t,r,n,a.contentStart-r,l.length),{char:u,length:l.length,listIndent:a.listIndent,quoteDepth:a.quoteDepth})},ob=(e,t,r,n)=>{let i=ib(e,t,r,n.quoteDepth);if(i===-1||n.listIndent===0)return i;let a=i;for(;a<r&&e[a]===" ";)a+=1;return a===r||e[a]==="\r"&&a+1===r||a-i>=n.listIndent?i:-1},cb=(e,t)=>{let r=e.length,n=null,i=0;for(;i<r;){let a=e.indexOf(`
85
+ `,i);a===-1&&(a=r);let s=n?ob(e,i,a,n):-1;n&&s===-1&&(n=null),n?sb(e,s,a,n)?(t.fill(de.FENCE_MARKER,i,a),n=null):t.fill(de.FENCE_BODY,i,Math.min(a+1,r)):n=lb(e,t,i,a),i=a+1}return n},ms=(e,t)=>{let r=t+1;for(;r<e.length&&e[r]==="`";)r+=1;return r},ub=(e,t)=>{let r=t+1;for(;r<e.length&&(e[r]===" "||e[r]===" "||e[r]==="\r");)r+=1;return r<e.length&&e[r]===`
86
+ `},hb=(e,t,r)=>{let n=r;for(;;){let i=e.indexOf("`",n);if(i===-1)return-1;let a=i>n&&e[i-1]==="\\"&&t[i-1]===de.PROSE;if(t[i]===de.PROSE&&!a)return i;n=i+1}},fb=(e,t)=>{let r=e.length,n=-1,i=0,a=0;for(;a<r;){if(n<0){if(a=hb(e,t,a),a===-1)break;let l=ms(e,a);n=a,i=l-a,a=l;continue}if(t[a]!==de.PROSE){t.fill(de.CODE_SPAN_OPEN,n,a),n=-1,a+=1;continue}if(e[a]===`
87
+ `&&ub(e,a)){n=-1,a+=1;continue}if(e[a]!=="`"){a+=1;continue}let s=ms(e,a);s-a===i&&(t.fill(de.CODE_SPAN,n,s),n=-1),a=s}return n>=0?(t.fill(de.CODE_SPAN_OPEN,n,r),{start:n,runLength:i}):null},db=e=>{let t=new Uint8Array(e.length);return{text:e,regions:t,openFence:cb(e,t),openSpan:fb(e,t),mathMask:null,linkUrlMask:null,htmlTagMask:null}},pi=null,en=null,We=e=>{if(en!==null&&e===pi)return en;let t=db(e);return pi=e,en=t,t},pb=()=>{pi=null,en=null},mb=(e,t)=>t>=e.regions.length?e.openFence!==null||e.openSpan!==null:t<0?!1:e.regions[t]!==de.PROSE,gb=(e,t)=>e.regions[t]===de.CODE_SPAN,Ki=(e,t)=>{let r=We(e),n=t+t,i=0;for(let a=e.indexOf(n);a!==-1;a=e.indexOf(n,a))r.regions[a]===de.PROSE?(i+=1,a+=2):a+=1;return i},Xi=new Uint8Array(0),Eb=e=>e==="inlineLatex"||e==="blockLatex",Tb=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,bb=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",kb=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),_b=(e,t,r)=>{let n=e[t+1];if(e[t]==="\\"){if(n==="$")return{context:r,length:2};let i=Tb(r,n);return i===null?null:{context:i,length:2}}if(e[t]==="$"&&!Eb(r)){let i=n==="$";return{context:bb(r,i),length:i?2:1}}return null},Ab=e=>{let{text:t,regions:r}=e,n=t.length,i=new Uint8Array(n),a="none",s=0;for(;s<n;){i[s]=a==="none"?0:1;let l=r[s]===de.PROSE?_b(t,s,a):null;if(l===null){s+=1;continue}a=l.context,l.length===2&&(i[s+1]=a==="none"?0:1),s+=l.length}return i},tr=(e,t)=>t<0||t>=e.text.length?!1:(e.mathMask===null&&(e.mathMask=kb(e.text)?Ab(e):Xi),e.mathMask[t]===1),yb=(e,t,r,n)=>{let{text:i,regions:a}=e,s=new Uint8Array(r-t),l=0;for(let u=r-1;u>=t;u-=1)i[u]===")"&&a[u]===de.PROSE&&(l=1),s[u-t]=l;let o=!1;for(let u=t;u<r;u+=1)o&&s[u-t]===1&&(n[u]=1),a[u]===de.PROSE&&(i[u]===")"?o=!1:i[u]==="("&&(o=u>0&&i[u-1]==="]"))},xb=e=>{let{text:t}=e,r=t.length,n=new Uint8Array(r),i=0;for(;i<r;){let a=t.indexOf(`
88
+ `,i);a===-1&&(a=r),yb(e,i,a,n),i=a+1}return n},Zi=(e,t)=>t<0||t>=e.text.length?!1:(e.linkUrlMask===null&&(e.linkUrlMask=e.text.includes("](")?xb(e):Xi),e.linkUrlMask[t]===1),Cb=e=>{let{text:t,regions:r}=e,n=t.length,i=new Uint8Array(n),a=!1;for(let s=0;s<n;s+=1){if(t[s]===`
89
+ `){a=!1;continue}if(i[s]=a?1:0,r[s]===de.PROSE){if(t[s]===">")a=!1;else if(t[s]==="<"){let l=t[s+1];a=l!==void 0&&(l>="a"&&l<="z"||l>="A"&&l<="Z"||l==="/")}}}return i},nc=(e,t)=>t<0||t>=e.text.length?!1:(e.htmlTagMask===null&&(e.htmlTagMask=e.text.includes("<")?Cb(e):Xi),e.htmlTagMask[t]===1),De=(e,t)=>mb(We(e),t),bt=(e,t)=>gb(We(e),t),Nb=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Sb=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Nb,(t,r,n,i)=>De(e,i)?t:`${r}\\>${n}`),kt=(e,{delimiter:t,markerLength:r,regex:n})=>{let i=e.lastIndexOf(t,e.length-2),a=i===-1?e.length-1:i;return e.slice(Math.max(0,a-r+1)).match(n)},Ib={delimiter:"*",markerLength:2,regex:/(\*\*)([^*]*\*?)$/},vb={delimiter:"_",markerLength:2,regex:/(__)([^_]*?)$/},wb={delimiter:"*",markerLength:3,regex:/(\*\*\*)([^*]*?)$/},Lb={delimiter:"*",markerLength:1,regex:/(\*)([^*]*?)$/},Rb={delimiter:"_",markerLength:1,regex:/(_)([^_]*?)$/},Ob={delimiter:"~",markerLength:2,regex:/(~~)([^~]*?)$/},Db={delimiter:"_",markerLength:2,regex:/(__)([^_]+)_$/},Pb={delimiter:"~",markerLength:2,regex:/(~~)([^~]+)~$/},Pt=/^[\s_~*`]*$/,ic=/^[\s]*[-*+][\s]+$/,Mb=/[\p{L}\p{N}_]/u,Bb=/^\*{4,}$/,Ke=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Mb.test(e)},Fb=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},ac=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},Hb=(e,t)=>tr(We(e),t),Nn=(e,t,r)=>{let n=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
90
+ `){n=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
91
+ `){i=o;break}let a=e.substring(n,i),s=0,l=!1;for(let o of a)if(o===r)s+=1;else if(o!==" "&&o!==" "){l=!0;break}return s>=3&&!l},Ub=(e,t,r,n)=>r==="\\"||tr(e,t)?!0:r!=="*"&&n==="*"?(t<e.text.length-2?e.text[t+2]:"")!=="*":r==="*"||(!r||r===" "||r===" "||r===`
92
+ `)&&(!n||n===" "||n===" "||n===`
93
+ `),fn=e=>e===" "||e===" "||e===`
94
+ `,$b=(e,t)=>!!(e&&t&&Ke(e)&&Ke(t)),jb=(e,t,r,n)=>{let i=$b(e,t),a=!!t&&!fn(t),s=!!e&&!fn(e);return i&&r%2===0&&!n?{count:!1}:s&&r%2===1||a?{count:!0,inWordAsteriskChain:i}:{count:!1}},sc=e=>{let t=We(e),r=0,n=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]!=="*"||t.regions[a]!==de.PROSE){Ke(e[a])||(n=!1);continue}let s=a>0?e[a-1]:"",l=a<i-1?e[a+1]:"";if(Ub(t,a,s,l))continue;let o=jb(s,l,r,n);o.count&&(r+=1,n=o.inWordAsteriskChain)}return r},zb=(e,t,r,n)=>!!(r==="\\"||tr(e,t)||Zi(e,t)||nc(e,t)||r==="_"||n==="_"||r&&n&&Ke(r)&&Ke(n)),Yb=e=>{let t=We(e),r=0,n=e.length;for(let i=0;i<n;i+=1){if(e[i]!=="_"||t.regions[i]!==de.PROSE)continue;let a=i>0?e[i-1]:"",s=i<n-1?e[i+1]:"";zb(t,i,a,s)||(r+=1)}return r},qb=e=>{let t=We(e),r=0,n=0;for(let i=0;i<e.length;i+=1)e[i]==="*"&&t.regions[i]===de.PROSE?n+=1:(n>=3&&(r+=Math.floor(n/3)),n=0);return n>=3&&(r+=Math.floor(n/3)),r},Ji=e=>Ki(e,"*"),gs=e=>e===""||e===" "||e===" "||e===`
95
+ `,Vb=(e,t,r,n,i)=>{if(!(gs(r)&&gs(n)))return!1;if(t>i.lineEnd){let a=e.indexOf(`
96
+ `,t);i.lineEnd=a===-1?e.length:a,i.result=Nn(e,t,"_")}return i.result},Wb=(e,t,r,n)=>{let i=e.text,a=t,s=!1;a>0&&i[a-1]==="\\"&&(a+=1,s=!0);let l=r-a;if(l<2)return!1;let o=a>0?i[a-1]:"",u=s?"\\":o,h=r<i.length?i[r]:"";return Ke(u)&&Ke(h)||Vb(i,a,u,h,n)||tr(e,a)||Zi(e,a)||nc(e,a)?!1:Math.floor(l/2)%2===1},Es=e=>{let t=We(e),r=e.length,n={lineEnd:-1,result:!1},i=!1,a=0;for(;a<r;){if(e[a]!=="_"||t.regions[a]!==de.PROSE){a+=1;continue}let s=a,l=a+1;for(;l<r&&e[l]==="_"&&t.regions[l]===de.PROSE;)l+=1;a=l,Wb(t,s,l,n)&&(i=!i)}return i},Qb=(e,t,r)=>{if(!t||Pt.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
97
+ `),i=n===-1?0:n+1,a=e.substring(i,r);return ic.test(a)&&t.includes(`
98
+ `)?!0:Nn(e,r,"*")},Gb=e=>{let t=kt(e,Ib);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return De(e,n)||bt(e,n)||Qb(e,r,n)?e:Ji(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},Kb=(e,t,r)=>{if(!t||Pt.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
99
+ `),i=n===-1?0:n+1,a=e.substring(i,r);return ic.test(a)&&t.includes(`
100
+ `)?!0:Nn(e,r,"_")},Xb=e=>{let t=kt(e,vb);if(!t){let i=kt(e,Db);if(i){let a=e.lastIndexOf(i[1]);if(!(De(e,a)||bt(e,a))&&Es(e))return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return De(e,n)||bt(e,n)||Kb(e,r,n)?e:Es(e)?`${e}__`:e},Zb=(e,t)=>{let{text:r}=e;return r[t]==="*"&&e.regions[t]===de.PROSE&&r[t-1]!=="*"&&r[t+1]!=="*"&&r[t-1]!=="\\"&&!tr(e,t)},Jb=e=>{let t=We(e);for(let r=e.indexOf("*");r!==-1;r=e.indexOf("*",r+1)){if(!Zb(t,r))continue;let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"",a=!n||fn(n),s=!i||fn(i);if(!(a&&s)&&!(n&&i&&Ke(n)&&Ke(i))&&!s)return r}return-1},ek=e=>{if(!kt(e,Lb))return e;let t=Jb(e);if(t===-1||De(e,t)||bt(e,t))return e;let r=e.substring(t+1);return!r||Pt.test(r)?e:sc(e)%2===1?`${e}*`:e},lc=e=>{let t=We(e);for(let r=e.indexOf("_");r!==-1;r=e.indexOf("_",r+1))if(t.regions[r]===de.PROSE&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!tr(t,r)&&!Zi(t,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if(n&&i&&Ke(n)&&Ke(i))continue;return r}return-1},tk=e=>{let t=e.length;for(;t>0&&e[t-1]===`
101
+ `;)t-=1;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},rk=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Ji(t)%2!==1)return null;let r=t.indexOf("**"),n=lc(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},nk=e=>{if(!kt(e,Rb))return e;let t=lc(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Pt.test(r)||De(e,t)||bt(e,t))return e;if(Yb(e)%2===1){let n=rk(e);return n!==null?n:tk(e)}return e},ik=e=>{let t=Ji(e),r=sc(e);return t%2===0&&r%2===0},ak=(e,t,r)=>!t||Pt.test(t)||De(e,r)||bt(e,r)?!0:Nn(e,r,"*"),sk=e=>{if(Bb.test(e))return e;let t=kt(e,wb);if(!t)return e;let r=t[2];return ak(e,r,e.lastIndexOf(t[1]))?e:qb(e)%2===1?ik(e)?e:`${e}***`:e},lk=/<[a-zA-Z/][^>]*$/,ok=/[a-zA-Z/]/,ck=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),uk=(e,t)=>{let r=e[t+1];return r!==void 0&&ok.test(r)},hk=e=>{let t=e.match(lk);if(!t||t.index===void 0)return e;let r=ck(e);for(let n=t.index;n<e.length;n+=1)if(!(e[n]!=="<"||!uk(e,n))&&!De(e,n)&&!(r&&Hb(e,n)))return e.substring(0,n).trimEnd();return e},fk=e=>{let t=We(e);if(t.openFence)return e;let r=t.openSpan;if(!r)return e;let n=e.slice(r.start+r.runLength);if(!n||Pt.test(n))return e;let i=0,a=e.length-1;for(;a>=0&&e[a]==="`";)i+=1,a-=1;return i>=r.runLength?e:e+"`".repeat(r.runLength-i)},dk=e=>Ki(e,"$"),pk=e=>{let t=We(e),r=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}t.regions[n]===de.PROSE&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:r+=1)}return r},mk=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
102
+ `,t)!==-1&&!e.endsWith(`
103
+ `)?`${e}
104
+ $$`:`${e}$$`},gk=e=>dk(e)%2===0?e:mk(e),Ek=e=>pk(e)%2===1?`${e}$`:e,mi="streamdown:incomplete-image",Tk=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=Fb(e,t);if(n===-1||De(e,n))return null;let i=n>0&&e[n-1]==="!",a=i?n-1:n,s=e.substring(0,a),l=e.substring(n+1,t);return i?`${s}![${l}](${mi})`:r==="text-only"?`${s}${l}`:`${s}[${l}](streamdown:incomplete-link)`},Ts=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!De(e,r)){if(r>0&&e[r-1]==="!")continue;let n=ac(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let i=e.indexOf(")",n+2);i!==-1&&(r=i)}}return t},bk=(e,t,r)=>{let n=t>0&&e[t-1]==="!",i=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(n)return`${a}![${e.substring(t+1)}](${mi})`;if(r==="text-only"){let s=Ts(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(ac(e,t)===-1){let a=e.substring(0,i);if(n)return`${a}![${e.substring(t+1)}](${mi})`;if(r==="text-only"){let s=Ts(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},kk=(e,t)=>{let r=e.lastIndexOf("](");if(r!==-1&&!De(e,r)){let n=Tk(e,r,t);if(n!==null)return n}for(let n=e.lastIndexOf("[");n!==-1;n=n===0?-1:e.lastIndexOf("[",n-1))if(!De(e,n)){let i=bk(e,n,t);if(i!==null)return i}return e},_k=32,oc=(e,t="protocol")=>{let r=e;for(let n=0;n<_k;n+=1){let i=kk(r,t);if(i.length>=r.length)return i;r=i}return r},Ak=/^-{1,2}$/,yk=/^[\s]*-{1,2}[\s]+$/,xk=/^={1,2}$/,Ck=/^[\s]*={1,2}[\s]+$/,Nk=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
105
+ `);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),i=r.trim();if(Ak.test(i)&&!r.match(yk)){let a=n.split(`
106
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(xk.test(i)&&!r.match(Ck)){let a=n.split(`
107
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},Sk=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,Ik=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(Sk,(t,r,n)=>De(e,n+r.length)?t:`${r}\\~`),bs=e=>Ki(e,"~"),vk=e=>{let t=kt(e,Ob);if(t){let r=t[2];if(!r||Pt.test(r))return e;let n=e.lastIndexOf(t[1]);if(De(e,n)||bt(e,n))return e;if(bs(e)%2===1)return`${e}~~`}else{let r=kt(e,Pb);if(r){let n=e.lastIndexOf(r[0].slice(0,2));if(De(e,n)||bt(e,n))return e;if(bs(e)%2===1)return`${e}~`}}return e},jn=e=>e!==!1,wk=e=>e===!0,Re={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},Lk=[{handler:{name:"singleTilde",handle:Ik,priority:Re.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Sb,priority:Re.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:hk,priority:Re.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Nk,priority:Re.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:oc,priority:Re.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")||e.endsWith("](streamdown:incomplete-image)")},{handler:{name:"boldItalic",handle:sk,priority:Re.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Gb,priority:Re.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Xb,priority:Re.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:ek,priority:Re.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:nk,priority:Re.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:fk,priority:Re.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:vk,priority:Re.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:gk,priority:Re.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Ek,priority:Re.INLINE_KATEX},optionKey:"inlineKatex"}],Rk=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return Lk.filter(({handler:n,optionKey:i})=>n.name==="links"?jn(e?.links)||jn(e?.images):n.name==="inlineKatex"?wk(e?.inlineKatex):jn(e?.[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:rc(tc({},n),{handle:a=>oc(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},Ok=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=Rk(t),a=((r=t?.handlers)!=null?r:[]).map(l=>{var o;return{handler:rc(tc({},l),{priority:(o=l.priority)!=null?o:Re.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((l,o)=>{var u,h;return((u=l.handler.priority)!=null?u:0)-((h=o.handler.priority)!=null?h:0)});try{for(let{handler:l,earlyReturn:o}of s)if(n=l.handle(n),o!=null&&o(n))return n;return n.endsWith(" ")&&!n.endsWith(" ")?n.slice(0,-1):n}finally{pb()}},Dk=Ok,Pk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bk={};function ks(e,t){return((t||Bk).jsx?Mk:Pk).test(e)}var Fk=/[ \t\n\f\r]/g;function Hk(e){return typeof e=="object"?e.type==="text"?_s(e.value):!1:_s(e)}function _s(e){return e.replace(Fk,"")===""}var Uk=Sr(((e,t)=>{var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,h=`
108
+ `,f="/",p="*",d="",g="comment",N="declaration";function C(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var D=1,F=1;function w(Y){var z=Y.match(n);z&&(D+=z.length);var se=Y.lastIndexOf(h);F=~se?Y.length-se:F+Y.length}function $(){var Y={line:D,column:F};return function(z){return z.position=new j(Y),U(),z}}function j(Y){this.start=Y,this.end={line:D,column:F},this.source=y.source}j.prototype.content=v;function q(Y){var z=new Error(y.source+":"+D+":"+F+": "+Y);if(z.reason=Y,z.filename=y.source,z.line=D,z.column=F,z.source=v,!y.silent)throw z}function I(Y){var z=Y.exec(v);if(z){var se=z[0];return w(se),v=v.slice(se.length),z}}function U(){I(i)}function H(Y){var z;for(Y=Y||[];z=K();)z!==!1&&Y.push(z);return Y}function K(){var Y=$();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var z=2;d!=v.charAt(z)&&(p!=v.charAt(z)||f!=v.charAt(z+1));)++z;if(z+=2,d===v.charAt(z-1))return q("End of comment missing");var se=v.slice(2,z-2);return F+=2,w(se),v=v.slice(z),F+=2,Y({type:g,comment:se})}}function ie(){var Y=$(),z=I(a);if(z){if(K(),!I(s))return q("property missing ':'");var se=I(l),Ee=Y({type:N,property:_(z[0].replace(r,d)),value:se?_(se[0].replace(r,d)):d});return I(o),Ee}}function W(){var Y=[];H(Y);for(var z;z=ie();)z!==!1&&(Y.push(z),H(Y));return Y}return U(),W()}function _(v){return v?v.replace(u,d):d}t.exports=C})),$k=Sr((e=>{var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var r=t(Uk());function n(i,a){let s=null;if(!i||typeof i!="string")return s;const l=(0,r.default)(i),o=typeof a=="function";return l.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:f}=u;o?a(h,f,u):f&&(s=s||{},s[h]=f)}),s}})),jk=Sr((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(h){return!h||n.test(h)||t.test(h)},l=function(h,f){return f.toUpperCase()},o=function(h,f){return"".concat(f,"-")},u=function(h,f){return f===void 0&&(f={}),s(h)?h:(h=h.toLowerCase(),f.reactCompat?h=h.replace(a,o):h=h.replace(i,o),h.replace(r,l))};e.camelCase=u})),zk=Sr(((e,t)=>{var r=(e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}})($k()),n=jk();function i(a,s){var l={};return!a||typeof a!="string"||(0,r.default)(a,function(o,u){o&&u&&(l[(0,n.camelCase)(o,s)]=u)}),l}i.default=i,t.exports=i}));function _r(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?As(e.position):"start"in e||"end"in e?As(e):"line"in e||"column"in e?gi(e):""}function gi(e){return ys(e&&e.line)+":"+ys(e&&e.column)}function As(e){return gi(e&&e.start)+"-"+gi(e&&e.end)}function ys(e){return e&&typeof e=="number"?e:1}var ve=class extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let n="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?n=e:!i.cause&&e&&(a=!0,n=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=s?s.line:void 0,this.name=_r(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;var Yk=pn(zk(),1),ea={}.hasOwnProperty,qk=new Map,Vk=/[A-Z]/g,Wk=new Set(["table","tbody","thead","tfoot","tr"]),Qk=new Set(["td","th"]),cc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=n_(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=r_(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_t:Rr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=uc(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function uc(e,t,r){if(t.type==="element")return Kk(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Xk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Jk(e,t,r);if(t.type==="mdxjsEsm")return Zk(e,t);if(t.type==="root")return e_(e,t,r);if(t.type==="text")return t_(e,t)}function Kk(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=_t,e.schema=i),e.ancestors.push(t);const a=fc(e,t.tagName,!1),s=i_(e,t);let l=ra(e,t);return Wk.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Hk(o):!0})),hc(e,s,a,t),ta(s,l),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function Xk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Nr(e,t.position)}function Zk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nr(e,t.position)}function Jk(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=_t,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:fc(e,t.name,!0),s=a_(e,t),l=ra(e,t);return hc(e,s,a,t),ta(s,l),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function e_(e,t,r){const n={};return ta(n,ra(e,t)),e.create(t,e.Fragment,n,r)}function t_(e,t){return t.value}function hc(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function ta(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function r_(e,t,r){return n;function n(i,a,s,l){const o=Array.isArray(s.children)?r:t;return l?o(a,s,l):o(a,s)}}function n_(e,t){return r;function r(n,i,a,s){const l=Array.isArray(a.children),o=tt(n);return t(i,a,s,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function i_(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&ea.call(t.properties,i)){const a=s_(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&Qk.has(t.tagName)?n=l:r[s]=l}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function a_(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Nr(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Nr(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function ra(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:qk;for(;++n<t.children.length;){const a=t.children[n];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const u=i.get(o)||0;s=o+"-"+u,i.set(o,u+1)}}const l=uc(e,a,s);l!==void 0&&r.push(l)}return r}function s_(e,t,r){const n=Tn(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?Ll(r):Rl(r)),n.property==="style"){let i=typeof r=="object"?r:l_(e,String(r));return e.stylePropertyNameCase==="css"&&(i=o_(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?zh[n.property]||n.property:n.attribute,r]}}function l_(e,t){try{return(0,Yk.default)(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=cc+"#cannot-parse-style-attribute",i}}function fc(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=ks(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}n=s}else n=ks(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return ea.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);Nr(e)}function Nr(e,t){const r=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=cc+"#cannot-handle-mdx-estrees-without-createevaluater",r}function o_(e){const t={};let r;for(r in e)ea.call(e,r)&&(t[c_(r)]=e[r]);return t}function c_(e){let t=e.replace(Vk,u_);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function u_(e){return"-"+e.toLowerCase()}var zn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},h_={tokenize:f_};function f_(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ae(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const o=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=o),r=o,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return G(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}var d_={tokenize:p_},xs={tokenize:m_};function p_(e){const t=this,r=[];let n=0,i,a,s;return l;function l(y){if(n<r.length){const D=r[n];return t.containerState=D[1],e.attempt(D[0].continuation,o,u)(y)}return u(y)}function o(y){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const D=t.events.length;let F=D,w;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){w=t.events[F][1].end;break}_(n);let $=D;for(;$<t.events.length;)t.events[$][1].end={...w},$++;return je(t.events,F+1,0,t.events.slice(D)),t.events.length=$,u(y)}return l(y)}function u(y){if(n===r.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return g(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xs,h,f)(y)}function h(y){return i&&v(),_(n),p(y)}function f(y){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,g(y)}function p(y){return t.containerState={},e.attempt(xs,d,g)(y)}function d(y){return n++,r.push([t.currentConstruct,t.containerState]),p(y)}function g(y){if(y===null){i&&v(),_(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),N(y)}function N(y){if(y===null){C(e.exit("chunkFlow"),!0),_(0),e.consume(y);return}return G(y)?(e.consume(y),C(e.exit("chunkFlow")),n=0,t.interrupt=void 0,l):(e.consume(y),N)}function C(y,D){const F=t.sliceStream(y);if(D&&F.push(null),y.previous=a,a&&(a.next=y),a=y,i.defineSkip(y.start),i.write(F),t.parser.lazy[y.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const $=t.events.length;let j=$,q,I;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(q){I=t.events[j][1].end;break}q=!0}for(_(n),w=$;w<t.events.length;)t.events[w][1].end={...I},w++;je(t.events,j+1,0,t.events.slice($)),t.events.length=w}}function _(y){let D=r.length;for(;D-- >y;){const F=r[D];t.containerState=F[1],F[0].exit.call(t,e)}r.length=y}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function m_(e,t,r){return ae(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var g_={tokenize:E_};function E_(e){const t=this,r=e.attempt(Mr,n,e.attempt(this.parser.constructs.flowInitial,i,ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(RE,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var T_={resolveAll:pc()},b_=dc("string"),k_=dc("text");function dc(e){return{resolveAll:pc(e==="text"?__:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,s,l);return s;function s(h){return u(h)?a(h):l(h)}function l(h){if(h===null){r.consume(h);return}return r.enter("data"),r.consume(h),o}function o(h){return u(h)?(r.exit("data"),a(h)):(r.consume(h),o)}function u(h){if(h===null)return!0;const f=i[h];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(n,n.previous))return!0}return!1}}}function pc(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function __(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,s=-1,l=0,o;for(;a--;){const u=i[a];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)o=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(l=0),l){const u={type:r===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}var A_=cl({attentionMarkers:()=>w_,contentInitial:()=>x_,disable:()=>L_,document:()=>y_,flow:()=>N_,flowInitial:()=>C_,insideSpan:()=>v_,string:()=>S_,text:()=>I_}),y_={42:Me,43:Me,45:Me,48:Me,49:Me,50:Me,51:Me,52:Me,53:Me,54:Me,55:Me,56:Me,57:Me,62:Qo},x_={91:BE},C_={[-2]:Un,[-1]:Un,32:Un},N_={35:zE,42:Jr,45:[hs,Jr],60:WE,61:hs,95:Jr,96:cs,126:cs},S_={38:Ko,92:Go},I_={[-5]:$n,[-4]:$n,[-3]:$n,33:hT,38:Ko,42:di,60:[dE,eT],91:dT,92:[$E,Go],93:Gi,95:di,96:NE},v_={null:[di,T_]},w_={null:[42,95]},L_={null:[]};function R_(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let s=[],l=[];const o={attempt:$(F),check:$(w),consume:v,enter:y,exit:D,interrupt:$(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:N,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:f};let h=t.tokenize.call(u,o);return t.resolveAll&&a.push(t),u;function f(U){return s=qe(s,U),C(),s[s.length-1]!==null?[]:(j(t,0),u.events=Cn(a,u.events,u),u.events)}function p(U,H){return D_(d(U),H)}function d(U){return O_(s,U)}function g(){const{_bufferIndex:U,_index:H,line:K,column:ie,offset:W}=n;return{_bufferIndex:U,_index:H,line:K,column:ie,offset:W}}function N(U){i[U.line]=U.column,I()}function C(){let U;for(;n._index<s.length;){const H=s[n._index];if(typeof H=="string")for(U=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===U&&n._bufferIndex<H.length;)_(H.charCodeAt(n._bufferIndex));else _(H)}}function _(U){h=h(U)}function v(U){G(U)?(n.line++,n.column=1,n.offset+=U===-3?2:1,I()):U!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=U}function y(U,H){const K=H||{};return K.type=U,K.start=g(),u.events.push(["enter",K,u]),l.push(K),K}function D(U){const H=l.pop();return H.end=g(),u.events.push(["exit",H,u]),H}function F(U,H){j(U,H.from)}function w(U,H){H.restore()}function $(U,H){return K;function K(ie,W,Y){let z,se,Ee,k;return Array.isArray(ie)?we(ie):"tokenize"in ie?we([ie]):Ce(ie);function Ce(me){return Fe;function Fe(ke){const Q=ke!==null&&me[ke],ce=ke!==null&&me.null;return we([...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(ce)?ce:ce?[ce]:[]])(ke)}}function we(me){return z=me,se=0,me.length===0?Y:A(me[se])}function A(me){return Fe;function Fe(ke){return k=q(),Ee=me,me.partial||(u.currentConstruct=me),me.name&&u.parser.constructs.disable.null.includes(me.name)?Te(ke):me.tokenize.call(H?Object.assign(Object.create(u),H):u,o,Ne,Te)(ke)}}function Ne(me){return U(Ee,k),W}function Te(me){return k.restore(),++se<z.length?A(z[se]):Y}}}function j(U,H){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&je(u.events,H,u.events.length-H,U.resolve(u.events.slice(H),u)),U.resolveTo&&(u.events=U.resolveTo(u.events,u))}function q(){const U=g(),H=u.previous,K=u.currentConstruct,ie=u.events.length,W=Array.from(l);return{from:ie,restore:Y};function Y(){n=U,u.previous=H,u.currentConstruct=K,u.events.length=ie,l=W,I()}}function I(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function O_(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,a)];else{if(s=e.slice(r,i),n>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(n):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function D_(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let s;if(typeof a=="string")s=a;else switch(a){case-5:s="\r";break;case-4:s=`
109
+ `;break;case-3:s=`\r
110
+ `;break;case-2:s=t?" ":" ";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(a)}i=a===-2,n.push(s)}return n.join("")}function P_(e){const t={constructs:Ho([A_,...(e||{}).extensions||[]]),content:r(h_),defined:[],document:r(d_),flow:r(g_),lazy:{},string:r(b_),text:r(k_)};return t;function r(n){return i;function i(a){return R_(t,n,a)}}}function M_(e){for(;!Xo(e););return e}var Cs=/[\0\t\n\r]/g;function B_(){let e=1,t="",r=!0,n;return i;function i(a,s,l){const o=[];let u,h,f,p,d;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(Cs.lastIndex=f,u=Cs.exec(a),p=u&&u.index!==void 0?u.index:a.length,d=a.charCodeAt(p),!u){t=a.slice(f);break}if(d===10&&f===p&&n)o.push(-3),n=void 0;else switch(n&&(o.push(-5),n=void 0),f<p&&(o.push(a.slice(f,p)),e+=p-f),d){case 0:o.push(65533),e++;break;case 9:for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break;case 10:o.push(-4),e=1;break;default:n=!0,e=1}f=p+1}return l&&(n&&o.push(-5),t&&o.push(t),o.push(null)),o}}var mc={}.hasOwnProperty;function F_(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),H_(r)(M_(P_(r).document().write(B_()(e,t,!0))))}function H_(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ut),autolinkProtocol:q,autolinkEmail:q,atxHeading:a(Ur),blockQuote:a(ce),characterEscape:q,characterReference:q,codeFenced:a(Le),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Le,s),codeText:a(ct,s),codeTextData:q,data:q,codeFlowValue:q,definition:a(yt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Hr),hardBreakEscape:a(rr),hardBreakTrailing:a(rr),htmlFlow:a(nr,s),htmlFlowData:q,htmlText:a(nr,s),htmlTextData:q,image:a($r),label:s,link:a(ut),listItem:a(In),listItemValue:p,listOrdered:a(jr,f),listUnordered:a(jr),paragraph:a(vn),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Ur),strong:a(wn),thematicBreak:a(le)},exit:{atxHeading:o(),atxHeadingSequence:F,autolink:o(),autolinkEmail:Q,autolinkProtocol:ke,blockQuote:o(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:me,characterReference:Fe,codeFenced:o(C),codeFencedFence:N,codeFencedFenceInfo:d,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:o(_),codeText:o(W),codeTextData:I,data:I,definition:o(),definitionDestinationString:D,definitionLabelString:v,definitionTitleString:y,emphasis:o(),hardBreakEscape:o(H),hardBreakTrailing:o(H),htmlFlow:o(K),htmlFlowData:I,htmlText:o(ie),htmlTextData:I,image:o(z),label:Ee,labelText:se,lineEnding:U,link:o(Y),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Ne,resourceDestinationString:k,resourceTitleString:Ce,resource:we,setextHeading:o(j),setextHeadingLineSequence:$,setextHeadingText:w,strong:o(),thematicBreak:o()}};gc(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(L){let M={type:"root",children:[]};const V={stack:[M],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:h,data:r},ne=[];let oe=-1;for(;++oe<L.length;)(L[oe][1].type==="listOrdered"||L[oe][1].type==="listUnordered")&&(L[oe][0]==="enter"?ne.push(oe):oe=i(L,ne.pop(),oe));for(oe=-1;++oe<L.length;){const ht=t[L[oe][0]];mc.call(ht,L[oe][1].type)&&ht[L[oe][1].type].call(Object.assign({sliceSerialize:L[oe][2].sliceSerialize},V),L[oe][1])}if(V.tokenStack.length>0){const ht=V.tokenStack[V.tokenStack.length-1];(ht[1]||Ns).call(V,void 0,ht[0])}for(M.position={start:dt(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:dt(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe<t.transforms.length;)M=t.transforms[oe](M)||M;return M}function i(L,M,V){let ne=M-1,oe=-1,ht=!1,Mt,it,ir,ar;for(;++ne<=V;){const He=L[ne];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":He[0]==="enter"?oe++:oe--,ar=void 0;break;case"lineEndingBlank":He[0]==="enter"&&(Mt&&!ar&&!oe&&!ir&&(ir=ne),ar=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ar=void 0}if(!oe&&He[0]==="enter"&&He[1].type==="listItemPrefix"||oe===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(Mt){let Bt=ne;for(it=void 0;Bt--;){const at=L[Bt];if(at[1].type==="lineEnding"||at[1].type==="lineEndingBlank"){if(at[0]==="exit")continue;it&&(L[it][1].type="lineEndingBlank",ht=!0),at[1].type="lineEnding",it=Bt}else if(!(at[1].type==="linePrefix"||at[1].type==="blockQuotePrefix"||at[1].type==="blockQuotePrefixWhitespace"||at[1].type==="blockQuoteMarker"||at[1].type==="listItemIndent"))break}ir&&(!it||ir<it)&&(Mt._spread=!0),Mt.end=Object.assign({},it?L[it][1].start:He[1].end),L.splice(it||ne,0,["exit",Mt,He[2]]),ne++,V++}if(He[1].type==="listItemPrefix"){const Bt={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};Mt=Bt,L.splice(ne,0,["enter",Bt,He[2]]),ne++,V++,ir=void 0,ar=!0}}}return L[M][1]._spread=ht,V}function a(L,M){return V;function V(ne){l.call(this,L(ne),ne),M&&M.call(this,ne)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(L,M,V){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([M,V||void 0]),L.position={start:dt(M.start),end:void 0}}function o(L){return M;function M(V){L&&L.call(this,V),u.call(this,V)}}function u(L,M){const V=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==L.type&&(M?M.call(this,L,ne[0]):(ne[1]||Ns).call(this,L,ne[0]));else throw new Error("Cannot close `"+L.type+"` ("+_r({start:L.start,end:L.end})+"): it’s not open");V.position.end=dt(L.end)}function h(){return qi(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(L){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function d(){const L=this.resume(),M=this.stack[this.stack.length-1];M.lang=L}function g(){const L=this.resume(),M=this.stack[this.stack.length-1];M.meta=L}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L.replace(/(\r?\n|\r)$/g,"")}function v(L){const M=this.resume(),V=this.stack[this.stack.length-1];V.label=M,V.identifier=Ge(this.sliceSerialize(L)).toLowerCase()}function y(){const L=this.resume(),M=this.stack[this.stack.length-1];M.title=L}function D(){const L=this.resume(),M=this.stack[this.stack.length-1];M.url=L}function F(L){const M=this.stack[this.stack.length-1];M.depth||(M.depth=this.sliceSerialize(L).length)}function w(){this.data.setextHeadingSlurpLineEnding=!0}function $(L){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function q(L){const M=this.stack[this.stack.length-1].children;let V=M[M.length-1];(!V||V.type!=="text")&&(V=X(),V.position={start:dt(L.start),end:void 0},M.push(V)),this.stack.push(V)}function I(L){const M=this.stack.pop();M.value+=this.sliceSerialize(L),M.position.end=dt(L.end)}function U(L){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const V=M.children[M.children.length-1];V.position.end=dt(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(q.call(this,L),I.call(this,L))}function H(){this.data.atHardBreak=!0}function K(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function ie(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function W(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function Y(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=M,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function z(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=M,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function se(L){const M=this.sliceSerialize(L),V=this.stack[this.stack.length-2];V.label=Bg(M),V.identifier=Ge(M).toLowerCase()}function Ee(){const L=this.stack[this.stack.length-1],M=this.resume(),V=this.stack[this.stack.length-1];this.data.inReference=!0,V.type==="link"?V.children=L.children:V.alt=M}function k(){const L=this.resume(),M=this.stack[this.stack.length-1];M.url=L}function Ce(){const L=this.resume(),M=this.stack[this.stack.length-1];M.title=L}function we(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function Ne(L){const M=this.resume(),V=this.stack[this.stack.length-1];V.label=M,V.identifier=Ge(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function Te(L){this.data.characterReferenceType=L.type}function me(L){const M=this.sliceSerialize(L),V=this.data.characterReferenceType;let ne;V?(ne=Fo(M,V==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Wi(M);const oe=this.stack[this.stack.length-1];oe.value+=ne}function Fe(L){const M=this.stack.pop();M.position.end=dt(L.end)}function ke(L){I.call(this,L);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(L)}function Q(L){I.call(this,L);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(L)}function ce(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function ct(){return{type:"inlineCode",value:""}}function yt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hr(){return{type:"emphasis",children:[]}}function Ur(){return{type:"heading",depth:0,children:[]}}function rr(){return{type:"break"}}function nr(){return{type:"html",value:""}}function $r(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function jr(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function In(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function vn(){return{type:"paragraph",children:[]}}function wn(){return{type:"strong",children:[]}}function X(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}function dt(e){return{line:e.line,column:e.column,offset:e.offset}}function gc(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?gc(e,n):U_(e,n)}}function U_(e,t){let r;for(r in t)if(mc.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Ns(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_r({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_r({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_r({start:t.start,end:t.end})+") is still open")}function $_(e){const t=this;t.parser=r;function r(n){return F_(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function j_(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function z_(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
111
+ `}]}function Y_(e,t){const r=t.value?t.value+`
112
+ `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function q_(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function V_(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function W_(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=er(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let s,l=e.footnoteCounts.get(n);l===void 0?(l=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(n,l);const o={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function Q_(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function G_(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Ec(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function K_(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Ec(e,t);const i={src:er(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function X_(e,t){const r={src:er(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function Z_(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function J_(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Ec(e,t);const i={href:er(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function eA(e,t){const r={href:er(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tA(e,t,r){const n=e.all(t),i=r?rA(r):Tc(t),a={},s=[];if(typeof t.checked=="boolean"){const h=n[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<n.length;){const h=n[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
113
+ `}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const o=n[n.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
114
+ `});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)}function rA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=Tc(r[n])}return t}function Tc(e){const t=e.spread;return t??e.children.length>1}function nA(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const s=n[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function iA(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aA(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function sA(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lA(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),i.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},l=tt(t.children[1]),o=yn(t.children[t.children.length-1]);l&&o&&(s.position={start:l,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function oA(e,t,r){const n=r?r.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,s=a?a.length:t.children.length;let l=-1;const o=[];for(;++l<s;){const h=t.children[l],f={},p=a?a[l]:void 0;p&&(f.align=p);let d={type:"element",tagName:i,properties:f,children:[]};h&&(d.children=e.all(h),e.patch(h,d),d=e.applyData(h,d)),o.push(d)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function cA(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var Ss=9,Is=32;function uA(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(vs(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(vs(t.slice(i),i>0,!1)),a.join("")}function vs(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===Ss||a===Is;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===Ss||a===Is;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function hA(e,t){const r={type:"text",value:uA(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function fA(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}var dA={blockquote:j_,break:z_,code:Y_,delete:q_,emphasis:V_,footnoteReference:W_,heading:Q_,html:G_,imageReference:K_,image:X_,inlineCode:Z_,linkReference:J_,link:eA,listItem:tA,list:nA,paragraph:iA,root:aA,strong:sA,table:lA,tableCell:cA,tableRow:oA,text:hA,thematicBreak:fA,toml:Wr,yaml:Wr,definition:Wr,footnoteDefinition:Wr};function Wr(){}function pA(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function mA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function gA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||pA,n=e.options.footnoteBackLabel||mA,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const h=e.all(u),f=String(u.identifier).toUpperCase(),p=er(f.toLowerCase());let d=0;const g=[],N=e.footnoteCounts.get(f);for(;N!==void 0&&++d<=N;){g.length>0&&g.push({type:"text",value:" "});let v=typeof r=="string"?r:r(o,d);typeof v=="string"&&(v={type:"text",value:v}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(o,d),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const v=C.children[C.children.length-1];v&&v.type==="text"?v.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else h.push(...g);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...wt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
115
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
116
+ `}]}}var Ei={}.hasOwnProperty,EA={};function TA(e,t){const r=t||EA,n=new Map,i=new Map,a={all:l,applyData:kA,definitionById:n,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...dA,...r.handlers},one:s,options:r,patch:bA,wrap:AA};return Ve(e,function(o){if(o.type==="definition"||o.type==="footnoteDefinition"){const u=o.type==="definition"?n:i,h=String(o.identifier).toUpperCase();u.has(h)||u.set(h,o)}}),a;function s(o,u){const h=o.type,f=a.handlers[h];if(Ei.call(a.handlers,h)&&f)return f(a,o,u);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in o){const{children:p,...d}=o,g=wt(d);return g.children=a.all(o),g}return wt(o)}return(a.options.unknownHandler||_A)(a,o,u)}function l(o){const u=[];if("children"in o){const h=o.children;let f=-1;for(;++f<h.length;){const p=a.one(h[f],o);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=ws(p.value)),!Array.isArray(p)&&p.type==="element")){const d=p.children[0];d&&d.type==="text"&&(d.value=ws(d.value))}Array.isArray(p)?u.push(...p):u.push(p)}}}return u}}function bA(e,t){e.position&&(t.position=fo(e))}function kA(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;typeof n=="string"&&(r.type==="element"?r.tagName=n:r={type:"element",tagName:n,properties:{},children:"children"in r?r.children:[r]}),r.type==="element"&&a&&Object.assign(r.properties,wt(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function _A(e,t){const r=t.data||{},n="value"in t&&!(Ei.call(r,"hProperties")||Ei.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AA(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
117
+ `});++n<e.length;)n&&r.push({type:"text",value:`
118
+ `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
119
+ `}),r}function ws(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Ls(e,t){const r=TA(e,t),n=r.one(e,void 0),i=gA(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in a,a.children.push({type:"text",value:`
120
+ `},i)),a}function yA(e,t){return e&&"run"in e?async function(r,n){const i=Ls(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Ls(r,{file:n,...e||t})}}function Rs(e){if(e)throw e}var xA=Sr(((e,t)=>{var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},l=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var p=r.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&r.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!d)return!1;var g;for(g in f);return typeof g>"u"||r.call(f,g)},o=function(f,p){i&&p.name==="__proto__"?i(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},u=function(f,p){if(p==="__proto__")if(r.call(f,p)){if(a)return a(f,p).value}else return;return f[p]};t.exports=function h(){var f,p,d,g,N,C,_=arguments[0],v=1,y=arguments.length,D=!1;for(typeof _=="boolean"&&(D=_,_=arguments[1]||{},v=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});v<y;++v)if(f=arguments[v],f!=null)for(p in f)d=u(_,p),g=u(f,p),_!==g&&(D&&g&&(l(g)||(N=s(g)))?(N?(N=!1,C=d&&s(d)?d:[]):C=d&&l(d)?d:{},o(_,{name:p,newValue:h(D,C,g)})):typeof g<"u"&&o(_,{name:p,newValue:g}));return _}})),Yn=pn(xA(),1);function Ti(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function CA(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(o,...u){const h=e[++a];let f=-1;if(o){s(o);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,h?NA(h,l)(...u):s(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function NA(e,t){let r;return n;function n(...s){const l=e.length>s.length;let o;l&&s.push(i);try{o=e.apply(this,s)}catch(u){const h=u;if(l&&r)throw h;return i(h)}l||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...l){r||(r=!0,t(s,...l))}function a(s){i(null,s)}}var Je={basename:SA,dirname:IA,extname:vA,join:wA,sep:"/"};function SA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Br(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(n=i):(l=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function IA(e){if(Br(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function vA(e){Br(e);let t=e.length,r=-1,n=0,i=-1,a=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function wA(...e){let t=-1,r;for(;++t<e.length;)Br(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":LA(r)}function LA(e){Br(e);const t=e.codePointAt(0)===47;let r=RA(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function RA(e,t){let r="",n=0,i=-1,a=0,s=-1,l,o;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(o=r.lastIndexOf("/"),o!==r.length-1){o<0?(r="",n=0):(r=r.slice(0,o),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else l===46&&a>-1?a++:a=-1}return r}function Br(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var OA={cwd:DA};function DA(){return"/"}function bi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function PA(e){if(typeof e=="string")e=new URL(e);else if(!bi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return MA(e)}function MA(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var qn=["history","path","basename","stem","extname","dirname"],BA=class{constructor(e){let t;e?bi(e)?t={path:e}:typeof e=="string"||FA(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":OA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qn.length;){const i=qn[r];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let n;for(n in t)qn.includes(n)||(this[n]=t[n])}get basename(){return typeof this.path=="string"?Je.basename(this.path):void 0}set basename(e){Wn(e,"basename"),Vn(e,"basename"),this.path=Je.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Je.dirname(this.path):void 0}set dirname(e){Os(this.basename,"dirname"),this.path=Je.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Je.extname(this.path):void 0}set extname(e){if(Vn(e,"extname"),Os(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Je.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){bi(e)&&(e=PA(e)),Wn(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Je.basename(this.path,this.extname):void 0}set stem(e){Wn(e,"stem"),Vn(e,"stem"),this.path=Je.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){const n=new ve(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Vn(e,t){if(e&&e.includes(Je.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Je.sep+"`")}function Wn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Os(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function FA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var HA=(function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n}),UA={}.hasOwnProperty,$A=class bc extends HA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CA()}copy(){const t=new bc;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data((0,Yn.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Kn("data",this.frozen),this.namespace[t]=r,this):UA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Qr(t),n=this.parser||this.Parser;return Qn("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Qn("process",this.parser||this.Parser),Gn("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,s){const l=Qr(t),o=n.parse(l);n.run(o,l,function(h,f,p){if(h||!f||!p)return u(h);const d=f,g=n.stringify(d,p);YA(g)?p.value=g:p.result=g,u(h,p)});function u(h,f){h||!f?s(h):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Qn("processSync",this.parser||this.Parser),Gn("processSync",this.compiler||this.Compiler),this.process(t,i),Ps("processSync","process",r),n;function i(a,s){r=!0,Rs(a),n=s}}run(t,r,n){Ds(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(s,l){const o=Qr(r);i.run(t,o,u);function u(h,f,p){const d=f||t;h?l(h):s?s(d):n(void 0,d,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Ps("runSync","run",n),i;function a(s,l){Rs(s),i=l,n=!0}}stringify(t,r){this.freeze();const n=Qr(r),i=this.compiler||this.Compiler;return Gn("stringify",i),Ds(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Kn("use",this.frozen),t!=null)if(typeof t=="function")o(t,r);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[h,...f]=u;o(h,f)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=(0,Yn.default)(!0,i.settings,u.settings))}function l(u){let h=-1;if(u!=null)if(Array.isArray(u))for(;++h<u.length;){const f=u[h];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,h){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===u){p=f;break}if(p===-1)n.push([u,...h]);else if(h.length>0){let[d,...g]=h;const N=n[p][1];Ti(N)&&Ti(d)&&(d=(0,Yn.default)(!0,N,d)),n[p]=[u,d,...g]}}}},jA=new $A().freeze();function Qn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ds(e){if(!Ti(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ps(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qr(e){return zA(e)?e:new BA(e)}function zA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function YA(e){return typeof e=="string"||qA(e)}function qA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var VA=300,WA="300px",QA=500;function GA(e={}){let{immediate:t=!1,debounceDelay:r=VA,rootMargin:n=WA,idleTimeout:i=QA}=e,[a,s]=(0,x.useState)(!1),l=(0,x.useRef)(null),o=(0,x.useRef)(null),u=(0,x.useRef)(null),h=(0,x.useMemo)(()=>d=>{let g=Date.now();return window.setTimeout(()=>{d({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),f=(0,x.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(d,g)=>window.requestIdleCallback(d,g):h,[h]),p=(0,x.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?d=>window.cancelIdleCallback(d):d=>{clearTimeout(d)},[]);return(0,x.useEffect)(()=>{if(t){s(!0);return}let d=l.current;if(!d)return;o.current&&(clearTimeout(o.current),o.current=null),u.current&&(p(u.current),u.current=null);let g=()=>{o.current&&(clearTimeout(o.current),o.current=null),u.current&&(p(u.current),u.current=null)},N=y=>{u.current=f(D=>{D.timeRemaining()>0||D.didTimeout?(s(!0),y.disconnect()):u.current=f(()=>{s(!0),y.disconnect()},{timeout:i/2})},{timeout:i})},C=y=>{g(),o.current=window.setTimeout(()=>{var D,F;let w=y.takeRecords();(w.length===0||(F=(D=w.at(-1))==null?void 0:D.isIntersecting)!=null&&F)&&N(y)},r)},_=(y,D)=>{y.isIntersecting?C(D):g()},v=new IntersectionObserver(y=>{for(let D of y)_(D,v)},{rootMargin:n,threshold:0});return v.observe(d),()=>{o.current&&clearTimeout(o.current),u.current&&p(u.current),v.disconnect()}},[t,r,n,i,p,f]),{shouldRender:a,containerRef:l}}var KA=320,XA=4,kc=()=>typeof performance>"u"?Date.now():performance.now();function Ms(e){var t,r;let n=(t=e?.now)!=null?t:kc,i=(r=e?.maxBacklogMs)!=null?r:KA,a=0,s=0;return{now:n,beginPass(l){s=Math.min(Math.max(a,l),l+i)},mark(){return s},rewind(l){s=l},take(l,o,u){if(l<=0)return{baseDelay:0,step:Math.max(0,o)};let h=Math.max(0,o),f=h===0?0:Math.min(h,XA),p=Math.max(s,u),d=u+i,g=p+Math.max(0,l-1)*h,N=h;if(g>d&&l>1)if(p<d){let _=d-p;N=Math.max(f,_/(l-1))}else N=f;let C=Math.max(0,Math.round(p-u));return s=p+l*N,{baseDelay:C,step:N}},commitPass(){a=s}}}var _c=/\s/,na=/^\s+$/,ZA=new Set(["pre","svg","math","annotation"]),JA=new Set(["img","hr"]),Fr=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ia=e=>e.some(t=>Fr(t)&&ZA.has(t.tagName)),e0=e=>{for(let t=e.length-1;t>=0;t--){let r=e[t];if(Fr(r)&&r.tagName==="li")return r}},t0=(e,t,r,n)=>{e.properties??={},e.properties["data-sd-animate-marker"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(r)}ms;--sd-marker-easing:${n}`},r0=new Set(["ul","ol","li"]),Ac=e=>{for(let t of e.children)if(Fr(t)){if(t.tagName==="input")return t;if(r0.has(t.tagName))continue;let r=Ac(t);if(r)return r}},yc=(e,t,r,n)=>{e.properties??={},e.properties["data-sd-animate"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${r}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(n)}ms`},n0=(e,t,r,n)=>{let i=Ac(e);i&&yc(i,t,r,n)},i0=(e,t,r,n,i,a)=>{if(ia(t))return;let s=n.prevContentLength,l=i.count;i.count+=1;let o=s>0&&l<s,u=o?0:a.baseDelay+i.newIndex++*a.step;yc(e,r,o?0:r.duration,u)},a0=e=>{var t;for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(Fr(n)){if((t=n.properties)!=null&&t["data-sd-animated"])break;n.properties={...n.properties,"data-sd-animated":!0}}}},xc=e=>{let t=[],r="",n=!1;for(let i of e){let a=_c.test(i);if(a!==n&&r){if(a){r+=i,n=!0;continue}t.push(r),r=""}r+=i,n=a}return r&&t.push(r),t},Cc=e=>{let t=[],r="";for(let n of e)_c.test(n)?t.length>0&&!na.test(t.at(-1))?t[t.length-1]+=n:r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&(t.length>0?t[t.length-1]+=r:t.push(r)),t},Bs=/^[^\s;:'"\\/](?:[^;:'"\\/\r\n]*[^\s;:'"\\/])?$/,s0=(e,t,r,n)=>{let i=`sd-${t.animation}`,a=`${r?0:t.duration}ms`,s;return t.styleObjects?(s={"--sd-animation":i,"--sd-duration":a,"--sd-easing":t.easing},n&&(s["--sd-delay"]=`${Math.round(n)}ms`)):(s=`--sd-animation:${i};--sd-duration:${a};--sd-easing:${t.easing}`,n&&(s+=`;--sd-delay:${Math.round(n)}ms`)),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s},children:[{type:"text",value:e}]}},Fs=(e,t)=>!(e>0&&t<e),ki=e=>Fr(e)&&JA.has(e.tagName),l0=(e,t,r)=>{let n=0,i=0;return En(e,a=>a.type==="text"||ki(a),(a,s)=>{if(ia(s))return jt;if(ki(a)){Fs(r,i)&&(n+=1),i+=1;return}let l=a.value;if(!l.trim()){i+=l.length;return}let o=t.sep==="char"?Cc(l):xc(l);for(let u of o){let h=i;i+=u.length,!na.test(u)&&Fs(r,h)&&(n+=1)}}),n},o0=(e,t,r,n,i,a)=>{var s;let l=t.at(-1);if(!(l&&"children"in l))return;if(ia(t))return jt;let o=l,u=o.children.indexOf(e);if(u===-1)return;let h=e.value;if(!h.trim()){i.count+=h.length;return}let f=r.sep==="char"?Cc(h):xc(h),p=n.prevContentLength,d=!1,g=e0(t),N=!!(g&&!((s=g.properties)!=null&&s["data-sd-animate-marker"])),C=!1,_=f.map(v=>{let y=i.count;if(i.count+=v.length,na.test(v))return{type:"text",value:v};let D=p>0&&y<p,F=D?0:a.baseDelay+i.newIndex++*a.step;if(d=!0,g&&N&&!C){let w=D?0:r.duration;t0(g,w,F,r.easing),n0(g,r,w,F),C=!0}return s0(v,r,D,F)});return d&&a0(t),o.children.splice(u,1,..._),u+_.length},c0=0;function u0(e){return Nc(e,!1)}var h0=e=>Nc(e,!0);function Nc(e,t){var r,n,i,a,s;let l=(r=e?.animation)!=null?r:"fadeIn",o=(n=e?.easing)!=null?n:"ease",u={animation:l,duration:(i=e?.duration)!=null?i:150,easing:o,sep:(a=e?.sep)!=null?a:"word",stagger:(s=e?.stagger)!=null?s:40,styleObjects:t&&Bs.test(l)&&Bs.test(o),timeline:e?.timeline},h={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},f=c0++,p=()=>d=>{var g;let N={count:0,newIndex:0};h.prevContentLength=h.committedCharCount;let C=u.timeline,_=(g=C?.now())!=null?g:kc();C&&(h.pendingMark===null?h.pendingMark=C.mark():C.rewind(h.pendingMark));let v=C?C.take(l0(d,u,h.prevContentLength),u.stagger,_):{baseDelay:0,step:u.stagger};En(d,y=>y.type==="text"||ki(y),(y,D)=>{if(y.type==="text")return o0(y,D,u,h,N,v);i0(y,D,u,h,N,v)}),h.lastRenderCharCount=N.count,h.prevContentLength=0};return Object.defineProperty(p,"name",{value:`rehypeAnimate$${f}`}),{name:"animate",type:"animate",rehypePlugin:p,setPrevContentLength(d){h.committedCharCount=d,h.prevContentLength=d},getLastRenderCharCount(){return h.lastRenderCharCount},commit(){h.committedCharCount=h.lastRenderCharCount,h.pendingMark=null}}}u0();var Sc=(0,x.createContext)(!1),Ic=()=>(0,x.useContext)(Sc),Sn=(...e)=>ul(hl(e)),f0=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},d0=e=>e?(...t)=>f0(e,ul(hl(t))):Sn,qt=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([n+t],{type:r}):t,a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},_i=(0,x.createContext)(Sn),te=()=>(0,x.useContext)(_i),p0=8,vc=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},wc=(e,t,r)=>{let n=(0,x.useRef)(null),i=(0,x.useRef)(!0),a=(0,x.useRef)(!1),s=(0,x.useRef)(null);return(0,x.useEffect)(()=>{let l=n.current;if(!(l&&t))return;let o=()=>{let u=l.scrollHeight-l.scrollTop-l.clientHeight<p0;i.current=u};return l.addEventListener("scroll",o,{passive:!0}),()=>l.removeEventListener("scroll",o)},[t]),(0,x.useEffect)(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),(0,x.useEffect)(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),(0,x.useEffect)(()=>{let l=n.current;!(l&&t&&e&&i.current)||s.current!==null||(s.current=requestAnimationFrame(()=>{s.current=null,i.current&&l.scrollTo({top:l.scrollHeight,behavior:"instant"})}))},[e,t,r]),n},m0=Sn("block"),g0=Sn("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),E0=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let i=r.slice(0,n).trim(),a=r.slice(n+1).trim();i&&a&&(t[i]=a)}}return t},T0=(0,x.memo)(({children:e,result:t,language:r,className:n,maxHeight:i,startLine:a,lineNumbers:s=!0,...l})=>{let o=te(),{isAnimating:u}=(0,x.useContext)(ye),h=vc(i),f=wc(u,!!h,t),p=(0,x.useMemo)(()=>o(g0),[o]),d=(0,x.useMemo)(()=>o(m0),[o]),g=(0,x.useMemo)(()=>{let N={};return t.bg&&(N["--sdm-bg"]=t.bg),t.fg&&(N["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(N,E0(t.rootStyle)),N},[t.bg,t.fg,t.rootStyle]);return(0,T.jsx)("div",{className:o(n,h?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",ref:f,style:h?{maxHeight:h}:void 0,...l,children:(0,T.jsx)("pre",{className:o(n,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:g,children:(0,T.jsx)("code",{className:s?o("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((N,C)=>(0,T.jsx)("span",{className:s?p:d,children:N.length===0||N.length===1&&N[0].content===""?`
121
+ `:N.map((_,v)=>{let y={},D=!!_.bgColor;if(_.color&&(y["--sdm-c"]=_.color),_.bgColor&&(y["--sdm-tbg"]=_.bgColor),_.htmlStyle)for(let[F,w]of Object.entries(_.htmlStyle))F==="color"?y["--sdm-c"]=w:F==="background-color"?(y["--sdm-tbg"]=w,D=!0):y[F]=w;return(0,T.jsx)("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",D&&"bg-[var(--sdm-tbg)]",D&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:y,..._.htmlAttrs,children:_.content},v)})},C))})})})}),b0=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=te();return(0,T.jsx)("div",{className:a("relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...i})},Lc=(0,x.createContext)({code:""}),Rc=()=>(0,x.useContext)(Lc),k0=({language:e})=>{let t=te();return(0,T.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,T.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},_0=e=>{let t=e.length;for(;t>0&&e[t-1]===`
122
+ `;)t--;return e.slice(0,t)},A0=(0,x.lazy)(()=>fl(()=>import("./highlighted-body-KQOG7T2V-_ljE4u1k.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),y0=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:s,...l})=>{let o=te(),{codeBlockMaxHeight:u}=(0,x.useContext)(ye),h=(0,x.useMemo)(()=>_0(e),[e]),f=(0,x.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
123
+ `).map(p=>[{content:p,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return(0,T.jsx)(Lc.Provider,{value:{code:e},children:(0,T.jsxs)(b0,{dir:"ltr",isIncomplete:i,language:t,children:[(0,T.jsx)(k0,{language:t}),n?(0,T.jsx)("div",{className:o("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:(0,T.jsx)("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,(0,T.jsx)(x.Suspense,{fallback:(0,T.jsx)(T0,{className:r,language:t,lineNumbers:s,maxHeight:u,result:f,startLine:a,...l}),children:(0,T.jsx)(A0,{className:r,code:h,isIncomplete:i,language:t,lineNumbers:s,maxHeight:u,raw:f,startLine:a,...l})})]})})},x0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),C0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),N0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),S0=e=>(0,T.jsxs)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,T.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),I0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),v0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),w0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),L0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),R0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),O0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),pr={CheckIcon:x0,CopyIcon:C0,DownloadIcon:N0,ExternalLinkIcon:L0,Loader2Icon:S0,Maximize2Icon:I0,RotateCcwIcon:v0,XIcon:w0,ZoomInIcon:R0,ZoomOutIcon:O0},Oc=(0,x.createContext)(pr),D0=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(i=>e[i]===t[i])},Hs=({icons:e,children:t})=>{let r=(0,x.useRef)(e),n=(0,x.useRef)(e?{...pr,...e}:pr);D0(r.current,e)||(r.current=e,n.current=e?{...pr,...e}:pr);let i=n.current;return(0,T.jsx)(Oc.Provider,{value:i,children:t})},Ze=()=>(0,x.useContext)(Oc),Dc={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Ai=(0,x.createContext)(Dc),nt=()=>(0,x.useContext)(Ai),yi=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let l=te(),[o,u]=(0,x.useState)(!1),h=(0,x.useRef)(0),{code:f}=Rc(),{isAnimating:p}=(0,x.useContext)(ye),d=nt(),g=a??f,N=async()=>{var v;if(typeof window>"u"||!((v=navigator?.clipboard)!=null&&v.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(g),u(!0),e?.(),h.current=window.setTimeout(()=>u(!1),r))}catch(y){t?.(y)}};(0,x.useEffect)(()=>()=>{window.clearTimeout(h.current)},[]);let C=Ze(),_=o?C.CheckIcon:C.CopyIcon;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{"aria-label":d.copyCode,className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:N,title:d.copyCode,type:"button",...s,children:n??(0,T.jsx)(_,{"aria-hidden":"true",size:14})}),o&&(0,T.jsx)("output",{"aria-live":"polite",className:"sr-only",children:d.copied})]})},aa=(e,t,r)=>{if(typeof e=="boolean")return r;let n=e[t];if(typeof n!="object")return r;let i=n.download;return typeof i!="object"?r:i.filename||r},Us=(e,t)=>{if(typeof e=="boolean")return{};let r=e[t];if(typeof r!="object")return{};let n=r.copy;return typeof n!="object"||n===null?{}:{onCopy:n.onCopy,onError:n.onError}},$s={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},P0=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let l=te(),{code:o}=Rc(),{isAnimating:u,controls:h}=(0,x.useContext)(ye),f=nt(),p=Ze(),d=a??o,g=r&&r in $s?$s[r]:"txt",N=`${aa(h,"code","file")}.${g}`,C="text/plain",_=()=>{try{qt(N,d,C),e?.()}catch(v){t?.(v)}};return(0,T.jsx)("button",{"aria-label":f.downloadFile,className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:_,title:f.downloadFile,type:"button",...s,children:n??(0,T.jsx)(p.DownloadIcon,{size:14})})},js=()=>{let{Loader2Icon:e}=Ze(),t=te();return(0,T.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,T.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,T.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,T.jsx)(e,{className:t("size-4 animate-spin")})})]})},M0=/\.[^/.]+$/,B0=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,showControls:s=!0,showDownloadControl:l=!0,...o})=>{let{DownloadIcon:u}=Ze(),h=te(),f=(0,x.useRef)(null),[p,d]=(0,x.useState)(!1),[g,N]=(0,x.useState)(!1),C=nt(),_=o.width!=null||o.height!=null,v=(p||_)&&!g&&s&&l,y=g&&!_;(0,x.useEffect)(()=>{let $=f.current;if($!=null&&$.complete){let j=$.naturalWidth>0;d(j),N(!j)}},[]);let D=(0,x.useCallback)($=>{d(!0),N(!1),i?.($)},[i]),F=(0,x.useCallback)($=>{d(!1),N(!0),a?.($)},[a]),w=async()=>{if(r)try{let $=await(await fetch(r)).blob(),j=new URL(r,window.location.origin).pathname.split("/").pop()||"",q=j.split(".").pop(),I=j.includes(".")&&q!==void 0&&q.length<=4,U="";if(I)U=j;else{let H=$.type,K="png";H.includes("jpeg")||H.includes("jpg")?K="jpg":H.includes("png")?K="png":H.includes("svg")?K="svg":H.includes("gif")?K="gif":H.includes("webp")&&(K="webp"),U=`${(n||j||"image").replace(M0,"")}.${K}`}qt(U,$,$.type)}catch{window.open(r,"_blank")}};return r?r==="streamdown:incomplete-image"?(0,T.jsx)("div",{className:h("group relative my-4 inline-block"),"data-incomplete":"true","data-streamdown":"image-wrapper",children:(0,T.jsx)("div",{className:h("h-24 w-48 animate-pulse rounded-lg bg-muted"),"data-streamdown":"image-placeholder"})}):(0,T.jsxs)("div",{className:h("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,T.jsx)("img",{alt:n,className:h("max-w-full rounded-lg",y&&"hidden",t),"data-streamdown":"image",onError:F,onLoad:D,ref:f,src:r,...o}),y&&(0,T.jsx)("span",{className:h("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:C.imageNotAvailable}),s&&(0,T.jsx)("div",{className:h("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),v&&(0,T.jsx)("button",{className:h("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:C.downloadImage,type:"button",children:(0,T.jsx)(u,{size:14})})]}):null},sa=e=>{let t=typeof e=="function"?e():e;return t??document.body},Ar=0,la=()=>{Ar+=1,Ar===1&&(document.body.style.overflow="hidden")},oa=()=>{Ar=Math.max(0,Ar-1),Ar===0&&(document.body.style.overflow="")},F0=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:l}=Ze(),o=te(),[u,h]=(0,x.useState)(!1),f=nt(),{portal:p}=(0,x.useContext)(ye),d=(0,x.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),2e3)}catch{}},[e]),g=(0,x.useCallback)(()=>{n(),r()},[n,r]);if((0,x.useEffect)(()=>{if(t){la();let C=_=>{_.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),oa()}}},[t,r]),!t||typeof document>"u")return null;let N=(0,T.jsx)("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:C=>{C.key==="Escape"&&r()},role:"button",tabIndex:0,children:(0,T.jsxs)("div",{className:o("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:[(0,T.jsx)("button",{className:o("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:(0,T.jsx)(l,{size:16})}),(0,T.jsxs)("div",{className:o("flex flex-col gap-2"),children:[(0,T.jsxs)("div",{className:o("flex items-center gap-2 font-semibold text-lg"),children:[(0,T.jsx)(s,{size:20}),(0,T.jsx)("span",{children:f.openExternalLink})]}),(0,T.jsx)("p",{className:o("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),(0,T.jsx)("div",{className:o("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,T.jsxs)("div",{className:o("flex gap-2"),children:[(0,T.jsx)("button",{className:o("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:d,type:"button",children:u?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(i,{size:14}),(0,T.jsx)("span",{children:f.copied})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(a,{size:14}),(0,T.jsx)("span",{children:f.copyLink})]})}),(0,T.jsxs)("button",{className:o("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:g,type:"button",children:[(0,T.jsx)(s,{size:14}),(0,T.jsx)("span",{children:f.openLink})]})]})]})});return(0,Ii.createPortal)(N,sa(p))},xi=(0,x.createContext)(null),ca=()=>(0,x.useContext)(xi),wy=()=>{var e;let t=ca();return(e=t?.code)!=null?e:null},ua=()=>{var e;let t=ca();return(e=t?.mermaid)!=null?e:null},H0=e=>{var t;let r=ca();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},Pc=/<svg\b[^>]*>/i,U0=/\bviewBox=(['"])(.*?)\1/i,$0=/[\s,]+/,j0=/\swidth=(['"]).*?\1/gi,z0=/\sheight=(['"]).*?\1/gi,zs=/\sstyle=(['"])(.*?)\1/i,Y0=/^width\s*:/i,q0=/^height\s*:/i,V0=/^max-width\s*:/i,Ys=/^<svg/i,Mc=e=>{let t=e.match(Pc);if(!t)return null;let r=t[0].match(U0),n=r?.[2];if(!n)return null;let i=n.trim().split($0).map(l=>Number.parseFloat(l));if(i.length<4||i.slice(0,4).some(Number.isNaN))return null;let a=i[2],s=i[3];return a>0&&s>0?{height:s,width:a}:null},W0=e=>{let t=e.match(Pc);if(!t)return e;try{let r=t[0],n=Mc(e);if(!n)return e;let{width:i,height:a}=n,s=r.replace(j0,"").replace(z0,""),l=s.match(zs),o=`width:${i}px;height:${a}px;max-width:none;`;if(l){let u=l[1],h=l[2].split(";").map(p=>p.trim()).filter(Boolean).filter(p=>!(Y0.test(p)||q0.test(p)||V0.test(p))).join(";"),f=`${o}${h?`${h};`:""}`;s=s.replace(zs,` style=${u}${f}${u}`)}else s=s.replace(Ys,`<svg style="${o}"`);return s=s.replace(Ys,`<svg width="${i}" height="${a}"`),e.replace(r,s)}catch{return e}},Q0=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},G0=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let o=document.createElement("canvas"),u=l.width*n,h=l.height*n;o.width=u,o.height=h;let f=o.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(l,0,0,u,h),o.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},l.onerror=()=>a(new Error("Failed to load SVG image")),l.src=s})},Bc=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let s=te(),[l,o]=(0,x.useState)(!1),u=(0,x.useRef)(null),{isAnimating:h,controls:f}=(0,x.useContext)(ye),p=Ze(),d=ua(),g=nt(),N=aa(f,"mermaid","diagram"),C=async _=>{try{if(_==="mmd"){qt(`${N}.mmd`,e,"text/plain"),o(!1),n?.(_);return}if(!d){a?.(new Error("Mermaid plugin not available"));return}let v=d.getMermaid(i),y=e.split("").reduce(($,j)=>($<<5)-$+j.charCodeAt(0)|0,0),D=`mermaid-${Math.abs(y)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:F}=await v.render(D,e);if(!F){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}let w=Q0(F);if(_==="svg"){qt(`${N}.svg`,w,"image/svg+xml"),o(!1),n?.(_);return}if(_==="png"){let $=await G0(w);qt(`${N}.png`,$,"image/png"),n?.(_),o(!1);return}}catch(v){a?.(v)}};return(0,x.useEffect)(()=>{let _=v=>{let y=v.composedPath();u.current&&!y.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),(0,T.jsxs)("div",{className:s("relative"),ref:u,children:[(0,T.jsx)("button",{"aria-label":g.downloadDiagram,className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:h,onClick:()=>o(!l),title:g.downloadDiagram,type:"button",children:t??(0,T.jsx)(p.DownloadIcon,{"aria-hidden":"true",size:14})}),l?(0,T.jsxs)("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,T.jsx)("button",{"aria-label":g.downloadDiagramAsSvg,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("svg"),title:g.downloadDiagramAsSvg,type:"button",children:g.mermaidFormatSvg}),(0,T.jsx)("button",{"aria-label":g.downloadDiagramAsPng,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("png"),title:g.downloadDiagramAsPng,type:"button",children:g.mermaidFormatPng}),(0,T.jsx)("button",{"aria-label":g.downloadDiagramAsMmd,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("mmd"),title:g.downloadDiagramAsMmd,type:"button",children:g.mermaidFormatMmd})]}):null]})},K0=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:s,XIcon:l}=Ze(),o=te(),[u,h]=(0,x.useState)(!1),{isAnimating:f,controls:p,portal:d}=(0,x.useContext)(ye),g=nt(),N=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),C=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.download!==!1})(),_=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.copy!==!1})(),v=()=>{h(!u)};return(0,x.useEffect)(()=>{if(u){la();let y=D=>{D.key==="Escape"&&h(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),oa()}}},[u]),(0,x.useEffect)(()=>{u?r?.():n&&n()},[u,r,n]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:f,onClick:v,title:g.viewFullscreen,type:"button",...a,"aria-label":g.viewFullscreen,children:(0,T.jsx)(s,{"aria-hidden":"true",size:14})}),u?(0,Ii.createPortal)((0,T.jsxs)("div",{"aria-label":g.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:v,onKeyDown:y=>{y.key==="Escape"&&v()},role:"dialog",children:[(0,T.jsxs)("div",{className:o("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[C?(0,T.jsx)(Bc,{chart:e,config:t}):null,_?(0,T.jsx)(yi,{code:e}):null,(0,T.jsx)("button",{"aria-label":g.exitFullscreen,className:o("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:v,title:g.exitFullscreen,type:"button",children:(0,T.jsx)(l,{"aria-hidden":"true",size:20})})]}),(0,T.jsx)("div",{className:o("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:(0,T.jsx)(Ey,{chart:e,className:o("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:N})})]}),sa(d)):null]})};function Ci(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let r=e;return r.tagName==="BR"?`
124
+ `:Array.from(r.childNodes).map(Ci).join("")}var Fc=e=>{let t=[],r=[],n=e.querySelectorAll("thead th");for(let a of n)t.push(Ci(a).trim());let i=e.querySelectorAll("tbody tr");for(let a of i){let s=[],l=a.querySelectorAll("td");for(let o of l)s.push(Ci(o).trim());r.push(s)}return{headers:t,rows:r}},Hc=e=>{var t;if(typeof e!="object")return",";let r=e.table;return typeof r!="object"?",":(t=r.csvSeparator)!=null?t:","},Uc=(e,t=",")=>{let r;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?r=";":r=",":r=t;let{headers:n,rows:i}=e,a=u=>{let h=!1;for(let f of u)if(f===r||f==='"'||f===`
125
+ `||f==="\r"){h=!0;break}return h?`"${u.replace(/"/g,'""')}"`:u},s=n.length>0?i.length+1:i.length,l=new Array(s),o=0;n.length>0&&(l[o]=n.map(a).join(r),o+=1);for(let u of i)l[o]=u.map(a).join(r),o+=1;return l.join(`
126
+ `)},X0=e=>{let{headers:t,rows:r}=e,n=l=>{let o=!1;for(let h of l)if(h===" "||h===`
127
+ `||h==="\r"){o=!0;break}if(!o)return l;let u=[];for(let h of l)h===" "?u.push("\\t"):h===`
128
+ `?u.push("\\n"):h==="\r"?u.push("\\r"):u.push(h);return u.join("")},i=t.length>0?r.length+1:r.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(n).join(" "),s+=1);for(let l of r)a[s]=l.map(n).join(" "),s+=1;return a.join(`
129
+ `)},Xn=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"||n===`
130
+ `||n==="&"||n==="<"||n===">"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):n===`
131
+ `?r.push("<br>"):n==="&"?r.push("&amp;"):n==="<"?r.push("&lt;"):n===">"?r.push("&gt;"):r.push(n);return r.join("")},$c=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,a=t.map(l=>Xn(l));n[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let l=0;l<t.length;l+=1)s[l]="---";n[i]=`| ${s.join(" | ")} |`,i+=1;for(let l of r)if(l.length<t.length){let o=new Array(t.length);for(let u=0;u<t.length;u+=1)o[u]=u<l.length?Xn(l[u]):"";n[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=l.map(u=>Xn(u));n[i]=`| ${o.join(" | ")} |`,i+=1}return n.join(`
132
+ `)},jc=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=te(),[s,l]=(0,x.useState)(!1),[o,u]=(0,x.useState)(!1),h=(0,x.useRef)(null),f=(0,x.useRef)(0),{isAnimating:p,controls:d}=(0,x.useContext)(ye),g=nt(),N=Hc(d),C=async y=>{var D,F;if(typeof window>"u"||!((D=navigator?.clipboard)!=null&&D.write)){n?.(new Error("Clipboard API not available"));return}try{let w=(F=h.current)==null?void 0:F.closest('[data-streamdown="table-wrapper"]'),$=w?.querySelector("table");if(!$){n?.(new Error("Table not found"));return}let j=Fc($),q="";y==="csv"?q=Uc(j,N):y==="tsv"?q=X0(j):q=$c(j);let I=new ClipboardItem({"text/plain":new Blob([q],{type:"text/plain"}),"text/html":new Blob([$.outerHTML],{type:"text/html"})});await navigator.clipboard.write([I]),u(!0),l(!1),r?.(y),f.current=window.setTimeout(()=>u(!1),i)}catch(w){n?.(w)}};(0,x.useEffect)(()=>{let y=D=>{let F=D.composedPath();h.current&&!F.includes(h.current)&&l(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y),window.clearTimeout(f.current)}},[]);let _=Ze(),v=o?_.CheckIcon:_.CopyIcon;return(0,T.jsxs)("div",{className:a("relative"),ref:h,children:[(0,T.jsx)("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>l(!s),title:g.copyTable,type:"button",children:e??(0,T.jsx)(v,{height:14,width:14})}),s?(0,T.jsxs)("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},zc=({children:e,className:t,onDownload:r,onError:n})=>{let i=te(),[a,s]=(0,x.useState)(!1),l=(0,x.useRef)(null),{isAnimating:o,controls:u}=(0,x.useContext)(ye),h=nt(),f=Ze(),p=Hc(u),d=g=>{var N;try{let C=(N=l.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),_=C?.querySelector("table");if(!_){n?.(new Error("Table not found"));return}let v=Fc(_),y=g==="csv"?Uc(v,p):$c(v),D=g==="csv"?"csv":"md";qt(`${aa(u,"table","table")}.${D}`,y,g==="csv"?"text/csv":"text/markdown"),s(!1),r?.(g)}catch(C){n?.(C)}};return(0,x.useEffect)(()=>{let g=N=>{let C=N.composedPath();l.current&&!C.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),(0,T.jsxs)("div",{className:i("relative"),ref:l,children:[(0,T.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>s(!a),title:h.downloadTable,type:"button",children:e??(0,T.jsx)(f.DownloadIcon,{size:14})}),a?(0,T.jsxs)("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,T.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),(0,T.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},Z0=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=Ze(),s=te(),[l,o]=(0,x.useState)(!1),{isAnimating:u,portal:h}=(0,x.useContext)(ye),f=nt(),p=()=>{o(!0)},d=()=>{o(!1)};return(0,x.useEffect)(()=>{if(l){la();let g=N=>{N.key==="Escape"&&o(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),oa()}}},[l]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:p,title:f.viewFullscreen,type:"button",children:(0,T.jsx)(i,{size:14})}),l?(0,Ii.createPortal)((0,T.jsx)("div",{"aria-label":f.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:d,onKeyDown:g=>{g.key==="Escape"&&d()},role:"dialog",children:(0,T.jsxs)("div",{className:s("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[(0,T.jsxs)("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[r?(0,T.jsx)(jc,{}):null,n?(0,T.jsx)(zc,{}):null,(0,T.jsx)("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:d,title:f.exitFullscreen,type:"button",children:(0,T.jsx)(a,{size:20})})]}),(0,T.jsx)("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,T.jsx)("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),sa(h)):null]})},J0=({children:e,className:t,maxHeight:r,showControls:n,showCopy:i=!0,showDownload:a=!0,showFullscreen:s=!0,...l})=>{let o=te(),{isAnimating:u}=(0,x.useContext)(ye),h=vc(r),f=wc(u,!!h,e),p=n&&i,d=n&&a,g=n&&s,N=p||d||g;return(0,T.jsxs)("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[N?(0,T.jsxs)("div",{className:o("flex items-center justify-end gap-1"),children:[p?(0,T.jsx)(jc,{}):null,d?(0,T.jsx)(zc,{}):null,g?(0,T.jsx)(Z0,{showCopy:p,showDownload:d,children:e}):null]}):null,(0,T.jsx)("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:f,style:h?{maxHeight:h}:void 0,children:(0,T.jsx)("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},e1=/startLine=(\d+)/,t1=/\bnoLineNumbers\b/,r1=(0,x.lazy)(()=>fl(()=>import("./mermaid-MCJ5UELQ-DTJaEEBm.js").then(e=>({default:e.Mermaid})),[])),n1=/language-([^\s]+)/,i1="node";function pe(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;let n=e,i=t;for(let a of r)if(a!==i1&&!Object.is(n[a],i[a]))return!1;return!0}function a1(e,t){var r,n;return((r=e?.properties)==null?void 0:r.metastring)===((n=t?.properties)==null?void 0:n.metastring)}var dn=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Zn=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},qs=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Gr=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},s1=(e,t)=>{if(typeof e=="boolean")return e;let r=e.image;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},ha=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>pe(e,t));ha.displayName="MarkdownOl";var Yc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{var i;let a=te(),s=Array.isArray(e)?e.filter(o=>o!==`
133
+ `&&o!==""):[e],l=s.length===1&&(0,x.isValidElement)(s[0])&&(s[0].type===fa||((i=s[0].props.node)==null?void 0:i.tagname)==="p")?s[0].props.children:e;return(0,T.jsx)("li",{className:a("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:l})},(e,t)=>pe(e,t));Yc.displayName="MarkdownLi";var qc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>pe(e,t));qc.displayName="MarkdownUl";var Vc=(0,x.memo)(({className:e,node:t,...r})=>{let n=te();return(0,T.jsx)("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>pe(e,t));Vc.displayName="MarkdownHr";var Wc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>pe(e,t));Wc.displayName="MarkdownStrong";var l1=({children:e,className:t,href:r,node:n,...i})=>{let a=te(),{linkSafety:s}=(0,x.useContext)(ye),[l,o]=(0,x.useState)(!1),u=r==="streamdown:incomplete-link",h=(0,x.useCallback)(async g=>{if(!(!(s!=null&&s.enabled&&r)||u)){if(g.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}o(!0)}},[s,r,u]),f=(0,x.useCallback)(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),p=(0,x.useCallback)(()=>{o(!1)},[]),d={url:r??"",isOpen:l,onClose:p,onConfirm:f};return s!=null&&s.enabled&&r?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:h,type:"button",children:e}),s.renderModal?s.renderModal(d):(0,T.jsx)(F0,{...d})]}):(0,T.jsx)("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},Qc=(0,x.memo)(l1,(e,t)=>pe(e,t));Qc.displayName="MarkdownA";var Gc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>pe(e,t));Gc.displayName="MarkdownH1";var Kc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>pe(e,t));Kc.displayName="MarkdownH2";var Xc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>pe(e,t));Xc.displayName="MarkdownH3";var Zc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>pe(e,t));Zc.displayName="MarkdownH4";var Jc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>pe(e,t));Jc.displayName="MarkdownH5";var eu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>pe(e,t));eu.displayName="MarkdownH6";var tu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let{controls:i,tableMaxHeight:a}=(0,x.useContext)(ye),s=dn(i,"table"),l=Zn(i,"copy"),o=Zn(i,"download"),u=Zn(i,"fullscreen");return(0,T.jsx)(J0,{className:t,maxHeight:a,showControls:s,showCopy:l,showDownload:o,showFullscreen:u,...n,children:e})},(e,t)=>pe(e,t));tu.displayName="MarkdownTable";var ru=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>pe(e,t));ru.displayName="MarkdownThead";var nu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>pe(e,t));nu.displayName="MarkdownTbody";var iu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>pe(e,t));iu.displayName="MarkdownTr";var au=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>pe(e,t));au.displayName="MarkdownTh";var su=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>pe(e,t));su.displayName="MarkdownTd";var lu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>pe(e,t));lu.displayName="MarkdownBlockquote";var ou=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>pe(e,t));ou.displayName="MarkdownSup";var cu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>pe(e,t));cu.displayName="MarkdownSub";var uu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=s=>{var l,o;if(!(0,x.isValidElement)(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,f=!1;for(let p of u)if(p){if(typeof p=="string")p.trim()!==""&&(h=!0);else if((0,x.isValidElement)(p))if(((l=p.props)==null?void 0:l["data-footnote-backref"])!==void 0)f=!0;else{let d=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of d){if(typeof g=="string"&&g.trim()!==""){h=!0;break}if((0,x.isValidElement)(g)&&((o=g.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return f&&!h},a=Array.isArray(e)?e.map(s=>{if(!(0,x.isValidElement)(s))return s;if(s.type===ha){let l=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return l.length===0?null:{...s,props:{...s.props,children:l}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?(0,T.jsx)("section",{className:t,...n,children:a}):null}return(0,T.jsx)("section",{className:t,...n,children:e})},(e,t)=>pe(e,t));uu.displayName="MarkdownSection";var o1=({node:e,className:t,children:r,...n})=>{var i,a;let s=te(),l=!("data-block"in n),{mermaid:o,controls:u,lineNumbers:h}=(0,x.useContext)(ye),f=ua(),p=Ic(),d=t?.match(n1),g=(i=d?.at(1))!=null?i:"",N=H0(g);if(l)return(0,T.jsx)("code",{className:s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let C=(a=e?.properties)==null?void 0:a.metastring,_=C?.match(e1),v=_?Number.parseInt(_[1],10):void 0,y=v!==void 0&&v>=1?v:void 0,D=!(C&&t1.test(C))&&h!==!1,F="";if((0,x.isValidElement)(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?F=r.props.children:typeof r=="string"&&(F=r),N){let U=N.component;return(0,T.jsx)(x.Suspense,{fallback:(0,T.jsx)(js,{}),children:(0,T.jsx)(U,{code:F,isIncomplete:p,language:g,meta:C})})}if(g==="mermaid"&&f){let U=dn(u,"mermaid"),H=Gr(u,"download"),K=Gr(u,"copy"),ie=Gr(u,"fullscreen"),W=Gr(u,"panZoom"),Y=U&&(H||K||ie);return(0,T.jsx)(x.Suspense,{fallback:(0,T.jsx)(js,{}),children:(0,T.jsxs)("div",{className:s("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[(0,T.jsx)("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:(0,T.jsx)("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?(0,T.jsx)("div",{className:s("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:(0,T.jsxs)("div",{className:s("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[H?(0,T.jsx)(Bc,{chart:F,config:o?.config}):null,K?(0,T.jsx)(yi,{code:F,...Us(u,"mermaid")}):null,ie?(0,T.jsx)(K0,{chart:F,config:o?.config}):null]})}):null,(0,T.jsx)("div",{className:s("overflow-hidden rounded-md border border-border bg-background"),children:(0,T.jsx)(r1,{chart:F,config:o?.config,showControls:W})})]})})}let w=dn(u,"code"),$=qs(u,"download"),j=qs(u,"copy"),{"data-block":q,...I}=n;return(0,T.jsx)(y0,{className:t,code:F,isIncomplete:p,language:g,lineNumbers:D,startLine:y,...I,children:w?(0,T.jsxs)(T.Fragment,{children:[$?(0,T.jsx)(P0,{code:F,language:g}):null,j?(0,T.jsx)(yi,{...Us(u,"code")}):null]}):null})},hu=(0,x.memo)(o1,(e,t)=>pe(e,t)&&a1(e.node,t.node));hu.displayName="MarkdownCode";var c1=({node:e,className:t,...r})=>{let{controls:n}=(0,x.useContext)(ye),i=dn(n,"image"),a=i&&s1(n,"download");return(0,T.jsx)(B0,{className:t,node:e,showControls:i,showDownloadControl:a,...r})},fu=(0,x.memo)(c1,(e,t)=>pe(e,t));fu.displayName="MarkdownImg";var fa=(0,x.memo)(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(n.length===1&&(0,x.isValidElement)(n[0])){let i=n[0].props.node,a=i?.tagName;if(a==="img")return(0,T.jsx)(T.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return(0,T.jsx)(T.Fragment,{children:e})}return(0,T.jsx)("p",{...r,children:e})},(e,t)=>pe(e,t));fa.displayName="MarkdownParagraph";var u1={ol:ha,li:Yc,ul:qc,hr:Vc,strong:Wc,a:Qc,h1:Gc,h2:Kc,h3:Xc,h4:Zc,h5:Jc,h6:eu,table:tu,thead:ru,tbody:nu,tr:iu,th:au,td:su,blockquote:lu,code:hu,img:fu,pre:({children:e})=>(0,x.isValidElement)(e)?(0,x.cloneElement)(e,{"data-block":"true"}):e,sup:ou,sub:cu,p:fa,section:uu},h1=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,f1=new RegExp("\\p{L}","u");function du(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),r,n=0,i=0;for(let a of t){if(h1.test(a)){r??="rtl",i+=1;continue}f1.test(a)&&(r??="ltr",n+=1)}return i>n?"rtl":n>i?"ltr":r??"ltr"}var d1=/^[ \t]{0,3}(`{3,}|~{3,})/,p1=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Vs=e=>{let t=e.split(`
134
+ `),r=null,n=0;for(let i of t){let a=d1.exec(i);if(r===null){if(a){let s=a[1];r=s[0],n=s.length}}else if(a){let s=a[1],l=s[0],o=s.length;l===r&&o>=n&&(r=null,n=0)}}return r!==null},m1=e=>{let t=e.split(`
135
+ `);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&p1.test(n))return!0}return!1},g1=()=>e=>{Ve(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},Ws=[],Qs={allowDangerousHtml:!0},Kr=new WeakMap,E1=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(r||n||i)){let o="default";return this.keyCache.set(e,o),o}let a=o=>{if(!o||o.length===0)return"";let u="";for(let h=0;h<o.length;h+=1){let f=o[h];if(h>0&&(u+=","),Array.isArray(f)){let[p,d]=f;if(typeof p=="function"){let g=Kr.get(p);g||(g=p.name,Kr.set(p,g)),u+=g}else u+=String(p);u+=":",u+=JSON.stringify(d)}else if(typeof f=="function"){let p=Kr.get(f);p||(p=f.name,Kr.set(f,p)),u+=p}else u+=String(f)}return u},s=a(r),l=`${a(n)}::${s}::${i?JSON.stringify(i):""}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},Gs=new E1,pu=e=>{let t=T1(e),r=e.children||"";return C1(t.runSync(t.parse(r),r),e)},T1=e=>{let t=Gs.get(e);if(t)return t;let r=k1(e);return Gs.set(e,r),r},b1=e=>e.some(t=>Array.isArray(t)?t[0]===ui:t===ui),k1=e=>{let t=e.rehypePlugins||Ws,r=e.remarkPlugins||Ws,n=b1(t)?r:[...r,g1],i=e.remarkRehypeOptions?{...Qs,...e.remarkRehypeOptions}:Qs;return jA().use($_).use(n).use(yA,i).use(t)},_1=e=>e,A1=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},y1=(e,t)=>{var r;for(let n in zn)if(Object.hasOwn(zn,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],a=zn[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},x1=(e,t,r,n,i,a)=>{let s=!1;return n?s=!n.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,r)),s},C1=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:l}=t;if(r||n||i||a||l){let o=l||_1;Ve(e,(u,h,f)=>{if(u.type==="raw"&&f&&typeof h=="number")return A1(f,h,a,u.value),h;if(u.type==="element"&&(y1(u,o),x1(u,h,f,n,i,r)&&f&&typeof h=="number"))return s&&u.children?f.children.splice(h,1,...u.children):f.children.splice(h,1),h})}return Gk(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},N1=/\[\^[\w-]{1,200}\](?!:)/,S1=/\[\^[\w-]{1,200}\]:/,I1=/<([A-Za-z][\w:-]*)[\s>/]/,v1=/^ {0,3}\[[^\]]+\]:/m,w1=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ks=new Map,Xs=new Map,L1=e=>{let t=e.toLowerCase(),r=Ks.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Ks.set(t,n),n},R1=e=>{let t=e.toLowerCase(),r=Xs.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Xs.set(t,n),n},Zs=(e,t)=>{if(w1.has(t.toLowerCase()))return 0;let r=e.match(L1(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},Js=(e,t)=>{let r=e.match(R1(t));return r?r.length:0},O1=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},D1=/\r\n|\r/g,mu=e=>new ze({gfm:!0}).blockTokens(e),Ut=null,P1=`
136
+
137
+ `,M1=e=>{for(let t=e.length-3;t>=0;t-=1)if(e[t].endsWith(P1))return t+1;return 0},B1=e=>` ${e}`.slice(1),gu=e=>e.map(B1),Eu=e=>{let t=[],r=[],n=!1;for(let i of e){let a=i.raw,s=t.length;if(r.length>0){t[s-1]+=a;let l=r.at(-1),o=Zs(a,l),u=Js(a,l);for(let h=0;h<o;h+=1)r.push(l);for(let h=0;h<u;h+=1)r.length>0&&r.at(-1)===l&&r.pop();continue}if(i.type==="html"&&i.block){let l=a.match(I1);if(l){let o=l[1];Zs(a,o)>Js(a,o)&&r.push(o)}}if(i.type==="space"&&s>0){t[s-1]+=a;continue}if(s>0&&!n){let l=t[s-1];if(O1(l)%2===1){t[s-1]=l+a;continue}}t.push(a),i.type!=="space"&&(n=i.type==="code")}return t},F1=(e,t)=>{if(t.length<=e.input.length||t.slice(0,e.input.length)!==e.input||v1.test(t))return null;let r=M1(e.blocks);if(r===0)return null;let n=e.verifiedCount,i=e.verifiedLength;if(n>r){n=r,i=0;for(let s=0;s<n;s+=1)i+=e.blocks[s].length}for(;n<r&&t.startsWith(e.blocks[n],i);)i+=e.blocks[n].length,n+=1;if(n!==r)return null;let a=gu(Eu(mu(t.slice(i))));return{input:t,blocks:e.blocks.slice(0,r).concat(a),verifiedCount:n,verifiedLength:i}},H1=e=>{let t=N1.test(e),r=S1.test(e);if(t||r)return[e];let n=e.includes("\r")?e.replace(D1,`
138
+ `):e;if(Ut?.input===n)return Ut.blocks;let i=Ut?F1(Ut,n):null,a=i??{input:n,blocks:gu(Eu(mu(n))),verifiedCount:0,verifiedLength:0};return Ut=a,a.blocks},U1=/^\n*/,$1=/\n*$/,Ni=/\n\n/g,j1=(e,t,r)=>t.includes(`
139
+ `)?`${e}${t.replace(Ni,`
140
+ <!---->
141
+ `).replace(U1,`
142
+
143
+ `).replace($1,`
144
+
145
+ `)}${r}
146
+
147
+ `:e+t+r,z1=(e,t)=>{let r=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),n="",i=0,a=r.exec(e);for(;a;){let s=a[0],l=a[1],o=a.index+s.length,u=e.slice(o);if(new RegExp(`</${l}\\s*>`,"i").test(u)){a=r.exec(e);continue}if(n+=e.slice(i,a.index),u.length===0){n+=s,i=o,a=r.exec(e);continue}if(u.startsWith(`
148
+
149
+ `)){let p=u.slice(2).replace(Ni,`
150
+ <!---->
151
+ `);n+=`${s}
152
+
153
+ ${p}`,i=e.length;break}if(!u.startsWith(`
154
+ `)){n+=s,i=o,a=r.exec(e);continue}let h=u.slice(1);if(h.trim().length===0){n+=s,i=o,a=r.exec(e);continue}let f=h.replace(Ni,`
155
+ <!---->
156
+ `);n+=`${s}
157
+
158
+ ${f}`,i=e.length;break}return i===0?e:n+e.slice(i)},Y1=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,s,l,o)=>j1(s,l,o)),r=z1(r,n)}return r},q1=/([\\`*_~[\]|])/g,V1=e=>e.replace(q1,"\\$1"),W1=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,s,l,o)=>s+V1(l).replace(/\n\n/g,"&#10;&#10;")+o)}return r},Q1=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),Tu=new Set(["code","kbd","pre","samp","var"]);function bu(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!Tu.has(t.tagName)?bu(t):"").join("")}function G1(){return e=>{Ve(e,"element",t=>{if(Tu.has(t.tagName)){t.properties??={},t.properties.dir="ltr";return}Q1.has(t.tagName)&&(t.properties??={},typeof t.properties.dir!="string"&&(t.properties.dir=du(bu(t))))})}}var ku=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(ku).join(""):"",K1=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));Ve(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=ku(n);n.children=i?[{type:"text",value:i}]:[]}})},X1=()=>e=>{Ve(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},Z1=/^([a-zA-Z][a-zA-Z\d+\-.]*:)/,J1=e=>new Set(e.map(t=>t.trim().toLowerCase()).filter(t=>t.length>0).map(t=>t.endsWith(":")?t:`${t}:`));function ey(e,t,r){var n,i;let a=(i=(n=e.position)==null?void 0:n.start)==null?void 0:i.offset;if(typeof a=="number"&&r.charCodeAt(a)===91||e.children.length!==1)return!1;let[s]=e.children;if(s.type!=="text")return!1;let l=Z1.exec(e.url);if(!l)return!1;let o=l[1].toLowerCase();return t.has(o)?o==="mailto:"?e.url===`mailto:${s.value}`:e.url===s.value||e.url===`${o}//${s.value}`:!1}var ty=(e=[])=>{let t=J1(e);return(r,n)=>{var i;if(t.size===0)return;let a=String((i=n.value)!=null?i:"");Ve(r,"link",(s,l,o)=>{if(!(!o||l===void 0)&&ey(s,t,a))return o.children.splice(l,1,...s.children),l})}},el="data-sd-caret-hidden",ry=e=>{let t=(0,x.useRef)(null),r=(0,x.useRef)(null),[n,i]=(0,x.useState)(!1);return(0,x.useEffect)(()=>i(!0),[]),(0,x.useLayoutEffect)(()=>{var a,s;let l=e&&(s=(a=t.current)==null?void 0:a.lastElementChild)!=null?s:null,o=r.current;o!==l&&(o?.removeAttribute(el),l?.setAttribute(el,""),r.current=l)}),{containerRef:t,showCaret:n||!e}},tl=/^[a-z]/,ny=/^[ \t]*<[\w!/?-]/,iy=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,ay=e=>typeof e!="string"||e.length===0||!ny.test(e)?e:e.replace(iy,"$1"),rl,nl,il,al,sl,ll,tn={...gt,clobberPrefix:"",protocols:{...gt.protocols,href:[...(nl=(rl=gt.protocols)==null?void 0:rl.href)!=null?nl:[],"tel","streamdown"],src:[...(al=(il=gt.protocols)==null?void 0:il.src)!=null?al:[],"streamdown"]},attributes:{...gt.attributes,code:[...(ll=(sl=gt.attributes)==null?void 0:sl.code)!=null?ll:[],"metastring"]}},Si={raw:ui,sanitize:[_o,tn],harden:[vh,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},sy={gfm:[QT,{}],codeMeta:X1},ol=Object.values(Si),ly=Object.values(sy),oy={block:" ▋",circle:" ●"},_u=["github-light","github-dark"],Au={enabled:!0},ye=(0,x.createContext)({codeBlockMaxHeight:400,shikiTheme:_u,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Au,portal:void 0,tableMaxHeight:300}),yu=(0,x.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:a,animatePlugin:s,...l})=>{(0,x.useLayoutEffect)(()=>{s?.commit()});let o=typeof e=="string"&&r?ay(e):e,u=(0,T.jsx)(pu,{...l,children:o});return(0,T.jsx)(Sc.Provider,{value:i,children:a?(0,T.jsx)("div",{dir:a,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});yu.displayName="Block";var cy=(0,x.memo)(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=ol,remarkPlugins:l=ly,className:o,shikiTheme:u,mermaid:h,codeBlockMaxHeight:f=400,controls:p=!0,isAnimating:d=!1,tableMaxHeight:g=300,animated:N,BlockComponent:C=yu,parseMarkdownIntoBlocksFn:_=H1,caret:v,plugins:y,remend:D,linkSafety:F=Au,portal:w,lineNumbers:$=!0,allowedTags:j,fallbackComponent:q,literalTagContent:I,disableAutolinkProtocols:U,translations:H,icons:K,prefix:ie,onAnimationStart:W,onAnimationEnd:Y,...z})=>{let se=(0,x.useId)(),Ee=(0,x.useMemo)(()=>d0(ie),[ie]),k=(0,x.useRef)(null),Ce=(0,x.useRef)(W),we=(0,x.useRef)(Y);Ce.current=W,we.current=Y,(0,x.useEffect)(()=>{var X,le,L;if(t==="static")return;let M=k.current;if(k.current=d,M===null){d&&((X=Ce.current)==null||X.call(Ce));return}d&&!M?(le=Ce.current)==null||le.call(Ce):!d&&M&&((L=we.current)==null||L.call(we))},[d,t]);let A=(0,x.useMemo)(()=>j?Object.keys(j):[],[j]),Ne=(0,x.useMemo)(()=>{if(typeof e!="string")return"";let X=t==="streaming"&&n?Dk(e,D):e;return I&&I.length>0&&(X=W1(X,I)),A.length>0&&(X=Y1(X,A)),X},[e,t,n,D,A,I]),Te=(0,x.useMemo)(()=>_(Ne),[Ne,_]),me=(0,x.useMemo)(()=>r==="auto"?Te.map(du):void 0,[Te,r]),Fe=(0,x.useMemo)(()=>Te.map((X,le)=>`${se}-${le}`),[Te.length,se]),ke=(0,x.useMemo)(()=>N===!0?"true":N?JSON.stringify(N):"",[N]),Q=(0,x.useRef)(null),ce=(0,x.useRef)([]),Le=(0,x.useRef)([]),ct=(0,x.useRef)(null),yt=(0,x.useRef)("");ke?(yt.current!==ke?(yt.current=ke,Q.current=Ms({maxBacklogMs:ke!=="true"?N.maxBacklogMs:void 0}),ce.current=[],Le.current=[]):Q.current||(Q.current=Ms()),d&&Q.current&&Q.current.beginPass(Q.current.now())):(Q.current=null,ce.current=[],Le.current=[],yt.current=""),(0,x.useLayoutEffect)(()=>{var X;d&&((X=Q.current)==null||X.commitPass())});let Hr=(0,x.useMemo)(()=>{var X,le;return{codeBlockMaxHeight:f,shikiTheme:(le=u??((X=y?.code)==null?void 0:X.getThemes()))!=null?le:_u,controls:p,isAnimating:d,lineNumbers:$,mode:t,mermaid:h,linkSafety:F,portal:w,tableMaxHeight:g}},[f,u,p,d,$,t,h,F,w,y?.code,g]),Ur=(0,x.useMemo)(()=>H?JSON.stringify(H):"",[H]),rr=(0,x.useMemo)(()=>({...Dc,...H}),[Ur]),nr=(0,x.useMemo)(()=>{let{inlineCode:X,...le}=a??{},L={...u1,...le};if(X){let M=L.code;L.code=V=>"data-block"in V?M?(0,x.createElement)(M,V):null:(0,x.createElement)(X,V)}if(q){if(j)for(let V of Object.keys(j))Object.hasOwn(L,V)||(L[V]=q);let M={configurable:!0,enumerable:!1,value:q,writable:!1};return new Proxy(L,{getOwnPropertyDescriptor(V,ne){let oe=Object.getOwnPropertyDescriptor(V,ne);if(oe)return oe;if(typeof ne=="string"&&tl.test(ne))return M},get(V,ne,oe){return typeof ne=="string"&&tl.test(ne)&&!Object.hasOwn(V,ne)?q:Reflect.get(V,ne,oe)}})}return L},[a,q,j]),$r=(0,x.useMemo)(()=>{let X=[];return y!=null&&y.cjk&&(X=[...X,...y.cjk.remarkPluginsBefore]),X=[...X,...l],U&&U.length>0&&(X=[...X,[ty,U]]),y!=null&&y.cjk&&(X=[...X,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(X=[...X,y.math.remarkPlugin]),X},[l,y?.math,y?.cjk,U]),ut=(0,x.useMemo)(()=>{var X;let le=s;if(j&&Object.keys(j).length>0&&s===ol){let L={...tn,tagNames:[...(X=tn.tagNames)!=null?X:[],...Object.keys(j)],attributes:{...tn.attributes,...j}};le=[Si.raw,[_o,L],Si.harden]}return I&&I.length>0&&(le=[...le,[K1,I]]),y!=null&&y.math&&(le=[...le,y.math.rehypePlugin]),r==="auto"&&t==="static"&&(le=[...le,G1]),le},[s,y?.math,j,I,r,t]),jr=(0,x.useMemo)(()=>v&&d?{"--streamdown-caret":`"${oy[v]}"`}:void 0,[v,d]),{containerRef:In,showCaret:vn}=ry((0,x.useMemo)(()=>{if(!d||Te.length===0)return!1;let X=Te.at(-1);return Vs(X)||m1(X)},[d,Te])),wn=X=>{let le=null;if(Q.current&&d){if(!ce.current[X]){let{maxBacklogMs:M,...V}=ke&&ke!=="true"?N:{};ce.current[X]=h0({...V,timeline:Q.current})}le=ce.current[X]}ct.current!==ut&&(Le.current=[],ct.current=ut),le&&!Le.current[X]&&(Le.current[X]=[...ut,le.rehypePlugin]);let L=le&&Le.current[X]?Le.current[X]:ut;return{blockAnimatePlugin:le,blockRehypePlugins:L}};return t==="static"?(0,T.jsx)(Ai.Provider,{value:rr,children:(0,T.jsx)(xi.Provider,{value:y??null,children:(0,T.jsx)(ye.Provider,{value:Hr,children:(0,T.jsx)(Hs,{icons:K,children:(0,T.jsx)(_i.Provider,{value:Ee,children:(0,T.jsx)("div",{className:Ee("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",o),dir:r==="auto"?void 0:r,children:(0,T.jsx)(pu,{components:nr,rehypePlugins:ut,remarkPlugins:$r,...z,children:Ne})})})})})})}):(0,T.jsx)(Ai.Provider,{value:rr,children:(0,T.jsx)(xi.Provider,{value:y??null,children:(0,T.jsx)(ye.Provider,{value:Hr,children:(0,T.jsx)(Hs,{icons:K,children:(0,T.jsx)(_i.Provider,{value:Ee,children:(0,T.jsxs)("div",{className:Ee("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",v&&vn?"[&>*:last-child:not([data-sd-caret-hidden])]:after:inline [&>*:last-child:not([data-sd-caret-hidden])]:after:align-baseline [&>*:last-child:not([data-sd-caret-hidden])]:after:content-[var(--streamdown-caret)]":null,o),ref:In,style:jr,children:[Te.length===0&&v&&d&&(0,T.jsx)("span",{}),Te.map((X,le)=>{var L;let M=le===Te.length-1,V=d&&M&&Vs(X),{blockAnimatePlugin:ne,blockRehypePlugins:oe}=wn(le);return(0,T.jsx)(C,{animatePlugin:ne,components:nr,content:X,dir:(L=me?.[le])!=null?L:r!=="auto"?r:void 0,index:le,isIncomplete:V,rehypePlugins:oe,remarkPlugins:$r,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...z},Fe[le])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&e.disableAutolinkProtocols===t.disableAutolinkProtocols&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir&&e.fallbackComponent===t.fallbackComponent);cy.displayName="Streamdown";var hr=e=>e>0?e:null,uy=(e,t)=>{if(e.endsWith("px"))return hr(Number.parseFloat(e));if(e.endsWith("rem")){let r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16");return hr(Number.parseFloat(e)*r)}if(e.endsWith("em")){let r=Number.parseFloat(getComputedStyle(t).fontSize||"16");return hr(Number.parseFloat(e)*r)}if(e.endsWith("vh"))return hr(Number.parseFloat(e)/100*window.innerHeight);if(e.endsWith("%")){let r=t.parentElement;return r&&r.clientHeight>0?hr(Number.parseFloat(e)/100*r.clientHeight):null}return null},Jn=(e,t)=>{let r=t.trim().toLowerCase();return!r||r==="none"||r==="auto"?null:uy(r,e)},hy=/^min\(\s*([^,]+)\s*,\s*([^)]+)\s*\)$/i,fy=(e,t)=>{let r=Jn(e,t);if(r!=null)return r;let n=t.trim().match(hy);if(!n)return null;let i=Jn(e,n[1].trim()),a=Jn(e,n[2].trim());return i==null||a==null?null:Math.min(i,a)},dy=(e,t,r)=>{let n=t.clientWidth;if(!(n>0))return null;if(r){let h=t.clientHeight;if(!(h>0))return null;let f=Math.min(n/e.width,h/e.height,1);return!(f>0)||Number.isNaN(f)?null:{fitZoom:f,viewportHeight:null}}let i=Math.min(n/e.width,1);if(!(i>0)||Number.isNaN(i))return null;let a=e.height*i,s=null,l=t;for(;l&&s==null;){let h=getComputedStyle(l);s=fy(l,h.maxHeight),l=l.parentElement}let o=s!=null?Math.min(a,s):a,u=Math.min(i,o/e.height,1);return!(u>0)||Number.isNaN(u)?null:{fitZoom:u,viewportHeight:o}},py=({children:e,className:t,contentSize:r,fitKey:n,minZoom:i=.5,maxZoom:a=3,zoomStep:s=.1,showControls:l=!0,initialZoom:o=1,isAutoFit:u=!1,fullscreen:h=!1})=>{let{RotateCcwIcon:f,ZoomInIcon:p,ZoomOutIcon:d}=Ze(),g=te(),N=nt(),C=(0,x.useRef)(null),_=(0,x.useRef)(null),v=(0,x.useRef)(!1),[y,D]=(0,x.useState)(o),[F,w]=(0,x.useState)(i),[$,j]=(0,x.useState)(o),[q,I]=(0,x.useState)({x:0,y:0}),[U,H]=(0,x.useState)(!1),[K,ie]=(0,x.useState)({x:0,y:0}),[W,Y]=(0,x.useState)({x:0,y:0}),[z,se]=(0,x.useState)(null),Ee=(0,x.useCallback)(Q=>{let ce=C.current;if(!ce)return;let Le=dy(Q,ce,h);if(!Le)return;let{fitZoom:ct,viewportHeight:yt}=Le;se(yt),D(ct),w(Math.min(i,ct)),v.current||(j(ct),I({x:0,y:0}))},[h,i]),k=(0,x.useCallback)(Q=>{j(ce=>Math.max(F,Math.min(a,ce+Q))),v.current=!0},[F,a]),Ce=(0,x.useCallback)(()=>{k(s)},[k,s]),we=(0,x.useCallback)(()=>{k(-s)},[k,s]),A=(0,x.useCallback)(()=>{j(y),I({x:0,y:0}),v.current=!1},[y]),Ne=(0,x.useCallback)(Q=>{Q.preventDefault();let ce=Q.deltaY>0?-s:s;k(ce)},[k,s]),Te=(0,x.useCallback)(Q=>{if(Q.button!==0||Q.isPrimary===!1)return;H(!0),v.current=!0,ie({x:Q.clientX,y:Q.clientY}),Y(q);let ce=Q.currentTarget;ce instanceof HTMLElement&&ce.setPointerCapture(Q.pointerId)},[q]),me=(0,x.useCallback)(Q=>{if(!U)return;Q.preventDefault();let ce=Q.clientX-K.x,Le=Q.clientY-K.y;I({x:W.x+ce,y:W.y+Le})},[U,K,W]),Fe=(0,x.useCallback)(Q=>{H(!1);let ce=Q.currentTarget;ce instanceof HTMLElement&&ce.releasePointerCapture(Q.pointerId)},[]);(0,x.useEffect)(()=>{w(i),u||(D(o),j(o),se(null))},[o,u,i]),(0,x.useLayoutEffect)(()=>{if(!(u&&r))return;Ee(r);let Q=C.current;if(!Q||typeof ResizeObserver>"u")return;let ce=new ResizeObserver(()=>{Ee(r)});return ce.observe(Q),()=>{ce.disconnect()}},[Ee,r,u]),(0,x.useEffect)(()=>{u&&(v.current=!1)},[n,u]),(0,x.useEffect)(()=>{let Q=C.current;if(Q)return Q.addEventListener("wheel",Ne,{passive:!1}),()=>{Q.removeEventListener("wheel",Ne)}},[Ne]),(0,x.useEffect)(()=>{let Q=_.current;if(Q&&U)return document.body.style.userSelect="none",Q.addEventListener("pointermove",me,{passive:!1}),Q.addEventListener("pointerup",Fe),Q.addEventListener("pointercancel",Fe),()=>{document.body.style.userSelect="",Q.removeEventListener("pointermove",me),Q.removeEventListener("pointerup",Fe),Q.removeEventListener("pointercancel",Fe)}},[U,me,Fe]);let ke=!h&&u&&z!=null?{height:z}:void 0;return(0,T.jsxs)("div",{className:g("relative flex flex-col",h?"h-full w-full":"min-h-28 w-full",t),ref:C,style:{cursor:U?"grabbing":"grab",...ke},children:[l?(0,T.jsxs)("div",{className:g("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",h?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,T.jsx)("button",{"aria-label":N.zoomIn,className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:$>=a,onClick:Ce,title:N.zoomIn,type:"button",children:(0,T.jsx)(p,{"aria-hidden":"true",size:16})}),(0,T.jsx)("button",{"aria-label":N.zoomOut,className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:$<=F,onClick:we,title:N.zoomOut,type:"button",children:(0,T.jsx)(d,{"aria-hidden":"true",size:16})}),(0,T.jsx)("button",{"aria-label":N.resetView,className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:A,title:N.resetView,type:"button",children:(0,T.jsx)(f,{"aria-hidden":"true",size:16})})]}):null,(0,T.jsx)("div",{className:g("flex h-full w-full flex-1 origin-center items-center justify-center transition-transform duration-150 ease-out"),onPointerDown:Te,ref:_,role:"application",style:{transform:`translate(${q.x}px, ${q.y}px) scale(${$})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},my=(e,t)=>new Promise(r=>{let n=setTimeout(r,e);t(()=>{clearTimeout(n),r()})}),gy=async(e,{chart:t,config:r},n)=>{try{let i=e.getMermaid(r),a=t.split("").reduce((u,h)=>(u<<5)-u+h.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(a)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await i.render(s,t),o=Mc(l);return{ok:!0,svg:n?l:W0(l),size:o}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Failed to render Mermaid chart"}}},Ey=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let a=te(),[s,l]=(0,x.useState)(null),[o,u]=(0,x.useState)(!1),[h,f]=(0,x.useState)(""),[p,d]=(0,x.useState)(null),[g,N]=(0,x.useState)(""),[C,_]=(0,x.useState)(0),{mermaid:v}=(0,x.useContext)(ye),y=ua(),D=v?.errorComponent,{shouldRender:F,containerRef:w}=GA({immediate:n}),$=(0,x.useRef)(null),j=(0,x.useRef)(!1),q=(0,x.useRef)(!1),I=Ic(),U=(0,x.useRef)(I),H=(0,x.useRef)(null);(0,x.useEffect)(()=>(q.current=!0,()=>{var W;q.current=!1,(W=H.current)==null||W.call(H)}),[]),(0,x.useEffect)(()=>{var W;U.current=I,I||(W=H.current)==null||W.call(H)},[I]);let K=async W=>{U.current&&(await my(W,Y=>{H.current=Y}),H.current=null)};if((0,x.useEffect)(()=>{if(!F)return;if(!y){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}if($.current={chart:e,config:r},j.current)return;let W=(Y,z)=>{z.ok?(f(z.svg),d(z.size),N(z.svg)):Y===$.current&&l(z.error)};(async()=>{j.current=!0,l(null),u(!0);try{let Y=$.current;for(;Y;){let z=performance.now(),se=await gy(y,Y,n);if(!q.current||(W(Y,se),se.ok&&await K(performance.now()-z),!q.current||Y===$.current))return;Y=$.current}}finally{j.current=!1,q.current&&u(!1)}})()},[e,r,C,F,y]),!(F||h||g))return(0,T.jsx)("div",{className:a("my-4 min-h-[200px]",t),ref:w});if(o&&!h&&!g)return(0,T.jsx)("div",{className:a("my-4 flex justify-center p-4",t),ref:w,children:(0,T.jsxs)("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[(0,T.jsx)("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,T.jsx)("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!h&&!g){let W=()=>_(Y=>Y+1);return D?(0,T.jsx)("div",{ref:w,children:(0,T.jsx)(D,{chart:e,error:s,retry:W})}):(0,T.jsxs)("div",{className:a("rounded-md bg-red-50 p-4",t),ref:w,children:[(0,T.jsxs)("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),(0,T.jsxs)("details",{className:a("mt-2"),children:[(0,T.jsx)("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,T.jsx)("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let ie=h||g;return(0,T.jsx)("div",{className:a(n?"size-full":"max-h-[min(70vh,40rem)] w-full",t),"data-streamdown":"mermaid",ref:w,children:(0,T.jsx)(py,{className:a(n?"size-full overflow-hidden":"max-h-[min(70vh,40rem)] overflow-hidden",t),contentSize:p,fitKey:e,fullscreen:n,isAutoFit:!0,maxZoom:3,minZoom:.1,showControls:i,zoomStep:.1,children:(0,T.jsx)("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:ie},role:"img"})})})};export{cy as a,T0 as i,_1 as n,Ey as o,ye as r,ue as s,wy as t};
159
+
160
+ //# sourceMappingURL=chunk-D32TOXHM-BPB6AqSK.js.map