@inkeep/open-knowledge 0.39.0-beta.10 → 0.39.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/{acp-harness-probe-D4ordxfH.mjs → acp-harness-probe-CAUPRqem.mjs} +2 -2
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/assets/skills/write-skill/SKILL.md +1 -1
  5. package/dist/cli.mjs +7 -7
  6. package/dist/constants-DjSx7Ebg.mjs +2 -0
  7. package/dist/{git-handle-YzX39hWc.mjs → git-handle-B30Z3S49.mjs} +2 -2
  8. package/dist/git-handle-RhB108wn.mjs +1 -0
  9. package/dist/index.mjs +1 -1
  10. package/dist/{init-k46RvSEs.mjs → init-D_IFjeNW.mjs} +3 -3
  11. package/dist/init-vjEAl4lP.mjs +1 -0
  12. package/dist/{launch-json-removal-DsEHim7H.mjs → launch-json-removal-B205O3NA.mjs} +2 -2
  13. package/dist/loader-UVB6FfiI.mjs +1 -0
  14. package/dist/{loader-BikkUXWa.mjs → loader-bUo9oEom.mjs} +2 -2
  15. package/dist/md-manager-DqdW_K1F.mjs +2 -0
  16. package/dist/{open-browser-kdF24mgk.mjs → open-browser-DFtApOUW.mjs} +2 -2
  17. package/dist/parse-worker.mjs +1 -1
  18. package/dist/preview-16KBm3fQ.mjs +1 -0
  19. package/dist/{preview-7xwALQvU.mjs → preview-D1dWTQ8k.mjs} +2 -2
  20. package/dist/public/assets/{ActivityModeContent-BQLss-BE.js → ActivityModeContent-D7IDAADR.js} +1 -1
  21. package/dist/public/assets/{AgentDiffPane-B_TmNOOS.js → AgentDiffPane-CKdCEnqD.js} +1 -1
  22. package/dist/public/assets/{AgentThreadClientBinder-Be-VMGZV.js → AgentThreadClientBinder-CBCAdG4p.js} +1 -1
  23. package/dist/public/assets/CodeMirrorPropInput-DqNDfEnD.js +3 -0
  24. package/dist/public/assets/{CopyButton-Cbumgow3.js → CopyButton-D0gTyMvW.js} +1 -1
  25. package/dist/public/assets/DocumentContext-C4Ar5jL6.js +38 -0
  26. package/dist/public/assets/{EnableSyncConfirmDialog-CbuJxerH.js → EnableSyncConfirmDialog-DrkGGVev.js} +1 -1
  27. package/dist/public/assets/FeedbackForm-CXXvUOWy.js +1 -0
  28. package/dist/public/assets/{GraphPanel-CDzcx7vs.js → GraphPanel-CG7ehFyf.js} +1 -1
  29. package/dist/public/assets/{ManagedArtifactProperties-Bd4rE8Ks.js → ManagedArtifactProperties-C2eNyJKF.js} +1 -1
  30. package/dist/public/assets/{McpConsentDialogBody-OqDOF7x4.js → McpConsentDialogBody-BEu_w4lu.js} +1 -1
  31. package/dist/public/assets/{MermaidDocEditor-B6KK6qX2.js → MermaidDocEditor-P9f8X7tU.js} +1 -1
  32. package/dist/public/assets/PropertyPanel-Bmem71bg.js +2 -0
  33. package/dist/public/assets/{ReportBugDialogBody-AEXnxadV.js → ReportBugDialogBody--5aXNg8I.js} +1 -1
  34. package/dist/public/assets/SettingsDialogBody-DzDGWXMf.js +7 -0
  35. package/dist/public/assets/{ShareBranchSwitchDialog-CzeHnBZ6.js → ShareBranchSwitchDialog-Dz3x9STZ.js} +1 -1
  36. package/dist/public/assets/{ShareReceiveDialog-DGTKtAY6.js → ShareReceiveDialog-B4PVwjNG.js} +1 -1
  37. package/dist/public/assets/{ShareReceiveMissDialog-BS5BCjjQ.js → ShareReceiveMissDialog-ByUnHZEP.js} +1 -1
  38. package/dist/public/assets/{SkillEditorActions-PVnPdxy2.js → SkillEditorActions-Dr52b0PZ.js} +1 -1
  39. package/dist/public/assets/{SourceEditor-YXhnts5y.js → SourceEditor-HYrhk_fF.js} +1 -1
  40. package/dist/public/assets/{TerminalPanel-DyJkPAsZ.js → TerminalPanel-BpSo4w0_.js} +3 -3
  41. package/dist/public/assets/{TerminalSessionsHost-CfucJ1z0.js → TerminalSessionsHost-DtGNhWg4.js} +2 -2
  42. package/dist/public/assets/{TerminalWindowApp-J6-xAbRj.js → TerminalWindowApp-DWqRcNhK.js} +1 -1
  43. package/dist/public/assets/ThreadView-CHP5Ra30.js +4 -0
  44. package/dist/public/assets/{TimelineDiffPane-B9PP3AzZ.js → TimelineDiffPane-Cc8rHqoV.js} +1 -1
  45. package/dist/public/assets/{agent-diff-store-BDu-qYpS.js → agent-diff-store-Bd0NDaYd.js} +1 -1
  46. package/dist/public/assets/{agent-visibility-BUmsS0vL.js → agent-visibility-bo7-lQPw.js} +1 -1
  47. package/dist/public/assets/auth-state-cache-UUKRA6mi.js +11 -0
  48. package/dist/public/assets/client-version-Ti93fR_U.js +1 -0
  49. package/dist/public/assets/{config-provider-BvPGEDTw.js → config-provider-BMeRatQe.js} +2 -2
  50. package/dist/public/assets/{dist-DRspkp5n.js → dist-2zkQMrQC.js} +1 -1
  51. package/dist/public/assets/{dist-CDKZLcnD.js → dist-df-v6kvy.js} +68 -68
  52. package/dist/public/assets/{doc-hash-r2oc1gt-.js → doc-hash-NyLrtNo2.js} +1 -1
  53. package/dist/public/assets/{documents-events-DNDUkpJM.js → documents-events-BHJB8gGz.js} +1 -1
  54. package/dist/public/assets/download-wdc_OGNY.js +1 -0
  55. package/dist/public/assets/{file-tree-adapter-DOr3Nip1.js → file-tree-adapter-BnZwo5Ls.js} +1 -1
  56. package/dist/public/assets/follow-file-Db721Zx6.js +1 -0
  57. package/dist/public/assets/form-J8CRFj8p.js +1 -0
  58. package/dist/public/assets/index-CJ7E0pG6.css +1 -0
  59. package/dist/public/assets/index-WhmMzp-C.js +1995 -0
  60. package/dist/public/assets/index.esm-DRU91WyY.js +1 -0
  61. package/dist/public/assets/{keyboard-shortcuts-maIyJzSw.js → keyboard-shortcuts-Ctc7xams.js} +1 -1
  62. package/dist/public/assets/{lint-config-client-C7TVN28Z.js → lint-config-client-BwIg_Zty.js} +1 -1
  63. package/dist/public/assets/{navigation-targets-DhXblHdl.js → navigation-targets-D1rdXyAI.js} +1 -1
  64. package/dist/public/assets/{open-managed-artifact-tab-DokRsPIe.js → open-managed-artifact-tab-MjzvjrV8.js} +1 -1
  65. package/dist/public/assets/{pending-receive-nav-store-DYgvjLiq.js → pending-receive-nav-store-XNS4eahL.js} +1 -1
  66. package/dist/public/assets/{prop-types-IOhQSrD8.js → prop-types-C0wWXvTx.js} +1 -1
  67. package/dist/public/assets/{receive-store-BwEPjiP1.js → receive-store-B3ygF-LA.js} +1 -1
  68. package/dist/public/assets/{selection-context-DOeF93Po.js → selection-context-z7qCoarT.js} +1 -1
  69. package/dist/public/assets/{skill-actions-D9Vn0ymW.js → skill-actions-DeZSwOo7.js} +1 -1
  70. package/dist/public/assets/{skills-api-CGbwE9vp.js → skills-api-vt4KnCX6.js} +1 -1
  71. package/dist/public/assets/{src-4ThOx6_s.js → src-BlUYczaV.js} +1 -1
  72. package/dist/public/assets/{target-navigation-intent-Beex9QTj.js → target-navigation-intent-DNrmu8Sx.js} +1 -1
  73. package/dist/public/assets/{telemetry-impl-C3Xj4Jzm.js → telemetry-impl-ThDnRQ01.js} +2 -2
  74. package/dist/public/assets/{telemetry-startup-mmznflLy.js → telemetry-startup-BYGi0S46.js} +1 -1
  75. package/dist/public/assets/{terminal-launch-events-C2tfnQr1.js → terminal-launch-events-vDhBoD8w.js} +1 -1
  76. package/dist/public/assets/{terminal-telemetry-zqEIM46I.js → terminal-telemetry-D1lMQO11.js} +1 -1
  77. package/dist/public/assets/thread-client-DH1Xs0By.js +1 -0
  78. package/dist/public/assets/{typing-burst-detector-D8mQRP5S.js → typing-burst-detector-BJJh89A5.js} +1 -1
  79. package/dist/public/assets/{use-activity-panel-CasauzqS.js → use-activity-panel-DddtATqP.js} +1 -1
  80. package/dist/public/assets/{use-apply-config-color-theme-Ccfxcl-K.js → use-apply-config-color-theme-R1RZkk5a.js} +1 -1
  81. package/dist/public/assets/{use-collab-url-Cf1srbbW.js → use-collab-url-B-LUA0g9.js} +1 -1
  82. package/dist/public/assets/{use-live-xterm-theme-BpGfJKio.js → use-live-xterm-theme-DW54zfIk.js} +1 -1
  83. package/dist/public/assets/{use-terminal-enabled-BEEp7vb7.js → use-terminal-enabled-C0F3SkCA.js} +1 -1
  84. package/dist/public/assets/{use-timeline-entry-diff-C1lHV9NQ.js → use-timeline-entry-diff-DTpDQjgI.js} +4 -4
  85. package/dist/public/assets/{use-workspace-C1D_I03G.js → use-workspace-0T1cdRp3.js} +1 -1
  86. package/dist/public/assets/{workspace-paths-BKmDPpqj.js → workspace-paths-nkXut9sM.js} +1 -1
  87. package/dist/public/assets/zod-BmQcPlGk.js +1 -0
  88. package/dist/public/index.html +47 -46
  89. package/dist/{repair-launch-json-DfkJdcaq.mjs → repair-launch-json-DzPuaSko.mjs} +2 -2
  90. package/dist/{repair-mcp-configs-x2RMcxiw.mjs → repair-mcp-configs-CiG5ovAF.mjs} +2 -2
  91. package/dist/{repair-skills-BaZcFu4I.mjs → repair-skills-El5WwJ1f.mjs} +2 -2
  92. package/dist/repair-skills-uKDdEY2S.mjs +1 -0
  93. package/dist/{server-lock-BiAmhJ19.mjs → server-lock-1KyShewk.mjs} +2 -2
  94. package/dist/server-lock-CmiibuTm.mjs +1 -0
  95. package/dist/{src-DhzHOoTy.mjs → src-CAXZLaEf.mjs} +1 -1
  96. package/dist/{src-CesCI8CT.mjs → src-DskEi1G1.mjs} +2 -2
  97. package/dist/{src-BTo9m5ju.mjs → src-FuRMJntf.mjs} +82 -82
  98. package/dist/{src-YSGKFci8.mjs → src-PY_3X_er.mjs} +291 -291
  99. package/dist/start-CLps31L_.mjs +1 -0
  100. package/dist/{start-CxEa6bz8.mjs → start-VX_dg_IU.mjs} +2 -2
  101. package/dist/{write-project-skill-Dt58S1kj.mjs → write-project-skill-BxG7sNjS.mjs} +2 -2
  102. package/package.json +4 -4
  103. package/dist/constants-urnmCsZ5.mjs +0 -2
  104. package/dist/git-handle-BGt8xT_1.mjs +0 -1
  105. package/dist/init-X89T3lvj.mjs +0 -1
  106. package/dist/loader-CumUhU8o.mjs +0 -1
  107. package/dist/md-manager-DPNbV4Up.mjs +0 -2
  108. package/dist/preview-DIGjTM6K.mjs +0 -1
  109. package/dist/public/assets/CodeMirrorPropInput-Sjp30pzp.js +0 -3
  110. package/dist/public/assets/DocumentContext-4RBN9Oik.js +0 -38
  111. package/dist/public/assets/FeedbackForm-DapI_sIz.js +0 -1
  112. package/dist/public/assets/PropertyPanel-BwdCsrPn.js +0 -2
  113. package/dist/public/assets/SettingsDialogBody-CAkmpKWt.js +0 -7
  114. package/dist/public/assets/ThreadView-BvgNNafC.js +0 -6
  115. package/dist/public/assets/auth-state-cache-DI5ppoto.js +0 -11
  116. package/dist/public/assets/client-version-CNNfEvD2.js +0 -1
  117. package/dist/public/assets/follow-file-grI1hNx7.js +0 -1
  118. package/dist/public/assets/form-CTttIps7.js +0 -1
  119. package/dist/public/assets/index-Caf1XN80.css +0 -1
  120. package/dist/public/assets/index-CiCCiYAG.js +0 -1995
  121. package/dist/public/assets/separator-Cvkbg_YK.js +0 -1
  122. package/dist/public/assets/thread-client-DyotU42S.js +0 -1
  123. package/dist/repair-skills-BunyY3Wb.mjs +0 -1
  124. package/dist/server-lock-BwO1WEYX.mjs +0 -1
  125. package/dist/start-BVHPtKb9.mjs +0 -1
  126. /package/dist/public/assets/{__vite-browser-external-CW7faKnP.js → __vite-browser-external-BScWdAeE.js} +0 -0
  127. /package/dist/public/assets/{calendar-p-DzPplr.js → calendar-iAmN3Ysf.js} +0 -0
  128. /package/dist/public/assets/{copy-DmfcimOx.js → copy-Dwat-rG5.js} +0 -0
  129. /package/dist/public/assets/{share-metadata-rows-C7rJ-Cd0.js → share-metadata-rows-Do2le589.js} +0 -0
@@ -136,70 +136,69 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
136
136
  `):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
137
137
  `),[i,a]=r_(r);if(i.length===0)return;let o=i_(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
138
138
  `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o_,this.editor.getAttributes(s_)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Gf({find:c_,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Gf({find:c_,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(s_)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),u_=/^\s*(\[([( |x])?\])\s$/,d_=ap.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,dd(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>rp(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=fd(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Gf({find:u_,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),f_=ap.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,dd(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
139
- `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=np(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=np(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Af.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(Hg.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Ug.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(e_.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(l_.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(d_.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(f_.configure(this.options.taskList)),e}});var p_=`&nbsp;`,m_=`\xA0`,h_=ap.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,dd(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===p_||n[0].text===p_||n[0].raw===m_||n[0].text===m_)&&r.length===1&&r[0].type===`text`&&(r[0].text===p_||r[0].text===m_)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?p_:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),g_=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,__=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,v_=xf.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,dd(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Hf({find:g_,type:this.type})]},addPasteRules(){return[op({find:__,type:this.type})]}}),y_=v_,b_=ap.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),x_=xf.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,dd(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function S_(e={}){return new oi({view(t){return new C_(t,e)}})}var C_=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(!t||i)return null;let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=Dr(this.editorView.state.doc,a,this.editorView.dragging.slice);e!=null&&(a=e)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);t!=null&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},w_=class e extends M{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):M.near(r)}content(){return j.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new T_(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!D_(e)||!O_(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!P.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};w_.prototype.visible=!1,w_.findFrom=w_.findGapCursorFrom,M.jsonID(`gapcursor`,w_);var T_=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return w_.valid(t)?new w_(t):M.near(t)}};function E_(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function D_(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||E_(e.type))return!0;if(e.inlineContent)return!1}}return!0}function O_(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||E_(e.type))return!0;if(e.inlineContent)return!1}}return!0}function k_(){return new oi({props:{decorations:P_,createSelectionBetween(e,t,n){return t.pos==n.pos&&w_.valid(n)?new w_(n):null},handleClick:M_,handleKeyDown:A_,handleDOMEvents:{beforeinput:N_}}})}const A_=Pl({ArrowLeft:j_(`horiz`,-1),ArrowRight:j_(`horiz`,1),ArrowUp:j_(`vert`,-1),ArrowDown:j_(`vert`,1)});function j_(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof N){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=w_.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new w_(c))),!0):!1}}function M_(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!w_.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&P.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new w_(r))),!0)}function N_(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof w_))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=A.empty;for(let e=r.length-1;e>=0;e--)i=A.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new j(i,0,0));return a.setSelection(N.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function P_(e){if(!(e.selection instanceof w_))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,Nc.create(e.doc,[Ac.widget(e.selection.head,t,{key:`gapcursor`})])}var F_=200,I_=function(){};I_.prototype.append=function(e){return e.length?(e=I_.from(e),!this.length&&e||e.length<F_&&this.leafAppend(e)||this.length<F_&&e.leafPrepend(this)||this.appendInner(e)):this},I_.prototype.prepend=function(e){return e.length?I_.from(e).append(this):this},I_.prototype.appendInner=function(e){return new R_(this,e)},I_.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?I_.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},I_.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},I_.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},I_.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},I_.from=function(e){return e instanceof I_?e:e&&e.length?new L_(e):I_.empty};var L_=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=F_)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=F_)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(I_);I_.empty=new L_([]);var R_=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(I_),z_=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new V_(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new V_(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new V_(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>U_&&(s=B_(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Gn;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new V_(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new V_(i,o,l))}else r.push(new V_(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new V_(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new V_(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(I_.from(i.reverse()),a)}};z_.empty=new z_(I_.empty,0);function B_(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var V_=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},H_=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}};const U_=20;function W_(e,t,n,r){let i=n.getMeta(Q_),a;if(i)return i.historyState;n.getMeta($_)&&(e=new H_(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(Q_))return o.getMeta(Q_).redo?new H_(e.done.addTransform(n,void 0,r,Z_(t)),e.undone,K_(n.mapping.maps),e.prevTime,e.prevComposition):new H_(e.done,e.undone.addTransform(n,void 0,r,Z_(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!G_(n,e.prevRanges)),s=o?q_(e.prevRanges,n.mapping):K_(n.mapping.maps);return new H_(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Z_(t)),z_.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new H_(e.done.rebased(n,a),e.undone.rebased(n,a),q_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new H_(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),q_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function G_(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function K_(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function q_(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function J_(e,t,n){let r=Z_(t),i=Q_.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new H_(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(Q_,{redo:n,historyState:c})}let Y_=!1,X_=null;function Z_(e){let t=e.plugins;if(X_!=t){Y_=!1,X_=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){Y_=!0;break}}return Y_}const Q_=new li(`history`),$_=new li(`closeHistory`);function ev(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new oi({key:Q_,state:{init(){return new H_(z_.empty,z_.empty,null,0,-1)},apply(t,n,r){return W_(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?nv:n==`historyRedo`?rv:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function tv(e,t){return(n,r)=>{let i=Q_.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=J_(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}const nv=tv(!1,!0),rv=tv(!0,!0);Af.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new oi({key:new li(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var iv=Af.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[S_(this.options)]}});Af.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new oi({key:new li(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return Nc.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(Ac.node(t,t+e.nodeSize,{class:this.options.className}))}),Nc.create(e,a)}}})]}});var av=Af.create({name:`gapCursor`,addProseMirrorPlugins(){return[k_()]},extendNodeSchema(e){return{allowGapCursor:ad(F(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),ov=`placeholder`;function sv(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}Af.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:ov,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${sv(this.options.dataAttribute)}`:`data-${ov}`;return[new oi({key:new li(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&zd(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=Ac.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),Nc.create(t,a)}}})]}}),Af.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new oi({key:new li(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Bd(n.selection)||e.view.dragging?null:Nc.create(n.doc,[Ac.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function cv({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var lv=Af.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new li(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new oi({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!cv({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!cv({node:r,types:n})}}})]}}),uv=Af.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>nv(e,t),redo:()=>({state:e,dispatch:t})=>rv(e,t)}},addProseMirrorPlugins(){return[ev(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),dv=Af.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(_p.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(Og.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(Hg.configure(this.options.bulletList)),this.options.code!==!1&&e.push(Mg.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(up.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Pg.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(iv.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(av.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Np.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Fp.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(uv.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Fg.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(Cp.configure(this.options.italic)),this.options.listItem!==!1&&e.push(Ug.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(e_.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(em.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(l_.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(h_.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(v_.configure(this.options.strike)),this.options.text!==!1&&e.push(b_.configure(this.options.text)),this.options.underline!==!1&&e.push(x_.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(lv.configure(this.options?.trailingNode)),e}});const fv=kg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),pv=Ng.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),mv=ap.create({name:`commentBlock`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}},sourceLayout:{default:`block`,parseHTML:e=>e.getAttribute(`data-source-layout`)===`inline`?`inline`:`block`,renderHTML:e=>e.sourceLayout===`inline`?{"data-source-layout":`inline`}:{}}}},parseHTML(){return[{tag:`aside[data-comment-block]`},{tag:`aside.comment-block`}]},renderHTML({HTMLAttributes:e}){return[`aside`,{"data-comment-block":``,"data-clipboard-omit":`true`,class:`comment-block`,style:`display: none;`,...e},0]},addCommands(){return{setCommentBlock:()=>({commands:e})=>e.wrapIn(this.name),toggleCommentBlock:()=>({commands:e})=>e.toggleWrap(this.name),unsetCommentBlock:()=>({commands:e})=>e.lift(this.name)}}}),hv=xf.create({name:`comment`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}}}},parseHTML(){return[{tag:`span[data-comment-mark]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-comment-mark":``,"data-clipboard-omit":`true`,class:`comment-mark`,style:`display: none;`,...e},0]},addCommands(){return{setComment:()=>({commands:e})=>e.setMark(this.name),toggleComment:()=>({commands:e})=>e.toggleMark(this.name),unsetComment:()=>({commands:e})=>e.unsetMark(this.name)}}}),gv=Af.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}}),_v=ap.create({name:`imageReference`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{alt:{default:``},label:{default:``},identifier:{default:``},referenceType:{default:`shortcut`}}},parseHTML(){return[{tag:`img[data-image-reference]`}]},renderHTML({node:e}){let{alt:t,label:n,referenceType:r}=e.attrs;return[`img`,{"data-image-reference":``,"data-reference-type":r,"data-label":n,alt:t||n}]}});function vv(e){for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return t;return null}function yv(e){let t=!1;return e.descendants(e=>t?!1:(e.type.name===`list`&&(t=!0),!t)),t}function bv(e){let{selection:t}=e;return t instanceof N?t.$cursor:null}function xv(e){let t=bv(e);if(!t||t.parentOffset!==0)return!1;let n=vv(t);if(n===null||t.depth!==n+1||t.index(n)!==0)return!1;let r=t.index(n-1);return r===0?!1:yv(t.node(n-1).child(r-1))}function Sv(e,t){for(let n=t-1;n>=0;n--){let t=e.node(n),r=e.index(n);if(r<t.childCount-1){let e=t.child(r+1),i=n+1;for(;e.type.name===`list`&&e.firstChild;)e=e.firstChild,i+=1;return e.type.name===`listItem`?i:null}}return null}function Cv(e){let t=bv(e);if(!t||t.parentOffset!==t.parent.content.size)return!1;let n=vv(t);if(n===null)return!1;for(let e=t.depth;e>n;e--)if(t.index(e-1)!==t.node(e-1).childCount-1)return!1;let r=Sv(t,n);return r!==null&&r<n}const wv=Af.create({name:`listBoundaryMerge`,addKeyboardShortcuts(){let e=()=>{let{editor:e}=this;if(!xv(e.state))return!1;if(e.commands.undoInputRule())return!0;let{state:t,view:n}=e;return pi(t,n.dispatch,n)},t=()=>{let{editor:e}=this;if(!Cv(e.state))return!1;let{state:t,view:n}=e;return mi(t,n.dispatch,n)};return{Backspace:e,"Mod-Backspace":e,Delete:t,"Mod-Delete":t}}}),Tv=new Map([[32,` `],[9,` `],[160,`\xA0`]]);function Ev(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r=n[0]===`x`||n[0]===`X`,i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function Dv(e){let t=Ev(e);return t!==null&&Tv.has(t)}function Ov(e){let t=Ev(e);return t===null?null:Tv.get(t)??null}const kv=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Av(e){kv.lastIndex=0;let t=e.match(kv);if(t===null||t.join(``)!==e)return null;let n=``;for(let e of t){let t=Ov(e);if(t===null)return null;n+=t}return n}const jv=xf.create({name:`sourceLiteral`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-source-literal]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-source-literal":``,...e},0]}});function Mv(e,t){if(typeof e!=`string`||typeof t!=`string`||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll(`\xA0`,` `),r=t.replaceAll(`\xA0`,` `);return n===r||Nv(n)===r?!0:Av(e)===t}function Nv(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}const Pv=y_.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),Fv=Eg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),Iv=dg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),Lv=fg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),Rv=ap.create({name:`tag`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e==`string`?!1:{value:e.getAttribute(`data-tag`)||``}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??``);return[`a`,{...t,"data-tag":n,href:`#tag/${n}`,class:`tag`},`#${n}`]},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:`tag`,attrs:{value:e}}).run()}}}),zv=/^(?:---|—-|___\s|\*\*\*\s)$/;function Bv(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}const Vv=Ig.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[Uf({find:zv,type:this.type,getAttributes:e=>({sourceRaw:Bv(e)})})]}});function Hv(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function Uv(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const Wv=ap.create({name:`wikiLink`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e==`string`?!1:{target:e.getAttribute(`data-target`)||``,alias:Hv(e.getAttribute(`data-alias`)),anchor:Hv(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:Hv(e.getAttribute(`data-alias`)),anchor:Hv(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=Hv(e.attrs.alias),i=Hv(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},Uv({target:n,alias:r,anchor:i})]}});function Gv(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function Kv(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const qv=[Hp,vm,Up,_m,Wv,ap.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}},parseHTML(){let e=e=>typeof e==`string`||!e.hasAttribute(`data-wiki-embed`)?!1:{target:e.getAttribute(`data-target`)||``,alias:Hv(e.getAttribute(`data-alias`)),anchor:Hv(e.getAttribute(`data-anchor`))};return[{tag:`img[data-wiki-embed]`,getAttrs:e,priority:100},{tag:`a[data-wiki-embed]`,getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=Hv(e.attrs.alias),i=Hv(e.attrs.anchor),a=Hv(e.attrs.resolvedSrc),o=Gv(n);if(s.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let c=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${c}#${i}`:c,target:`_blank`,rel:`noopener noreferrer`},Kv({target:n,alias:r,anchor:i})]}}),Rv,hm,gm,wp,Tp,Pv,pv,dp,fv,Ip,Vv,sm,Lp,cm,Pp,Ep,gv,jv,dv.configure({undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,listKeymap:{listTypes:[{itemName:`listItem`,wrapperNames:[`list`]}]},italic:!1,bold:!1,strike:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:`color-mix(in oklch, var(--primary) 50%, transparent)`,width:2}}),wv,Fv.configure({resizable:!0}),pg,Lv,Iv,Vp.configure({inline:!0}),_v,xm,hv,mv,Op,Dp];function Jv(e,t){switch(e){case`darwin`:return[`/opt/homebrew/bin`,`/usr/local/bin`,`/opt/local/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`];case`win32`:return[];default:return[`/usr/local/bin`,`/home/linuxbrew/.linuxbrew/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`]}}function Yv(e,t){let n=t.delimiter,r=(e??``).split(n).filter(e=>e.length>0),i=new Set(r),a=Jv(t.platform,t.homeDir).filter(e=>!i.has(e)&&t.isDir(e));return[...r,...a].join(n)}function Xv(e){return`'${e.replace(/'/g,`'\\''`)}'`}`${ft}`,[`delete`,`move`,`share_link`,`install`].map(e=>`mcp__${ft}__${e}`),`${Xv(`mcp_servers.${ft}.default_tools_approval_mode="approve"`)}`,3072-Zv("This is an OpenKnowledge project: load the `open-knowledge` skill and use the OpenKnowledge MCP tools for all markdown — don't probe for `.ok/` or use native file tools on `.md` / `.mdx`. ",`cursor`),new TextEncoder;function Zv(e,t){let n=encodeURIComponent(e);return t===`cursor`?encodeURIComponent(n).length:n.length}function Qv(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}const $v=new Set([`opencode.json`]);function ey(e){return e.split(`/`).some(e=>e.startsWith(`.`))?!0:$v.has(e.slice(e.lastIndexOf(`/`)+1))}function ty(e,t){let n=Qv(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const ny=T().superRefine(ty).optional(),ry=T().superRefine(ty),iy={agentId:T().optional(),agentName:T().optional(),colorSeed:T().optional(),clientName:T().optional(),clientVersion:T().optional(),label:T().optional()},ay=T().optional(),oy=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,sy=d(`kind`,[g({kind:E(`doc`),docPath:T().min(1)}).loose(),g({kind:E(`folder`),folderPath:T()}).loose()]),cy=c([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),ly=c([`current`,`stale`,`absent`]),uy=d(`ok`,[g({ok:E(!0),shareUrl:T().min(1),sharedUrl:T().min(1),branch:T().min(1),freshness:ly.optional().catch(void 0)}).loose(),g({ok:E(!1),error:cy,branch:T().min(1).optional()}).loose()]),dy=c([`user`,`org`]),fy=g({login:T().min(1),kind:dy,avatarUrl:T().optional()}).loose(),py=c([`auth-required`,`network`]),my=d(`ok`,[g({ok:E(!0),owners:m(fy)}).loose(),g({ok:E(!1),error:py}).loose()]),hy=d(`ok`,[g({ok:E(!0),available:p()}).loose(),g({ok:E(!1),error:py}).loose()]),gy=c([`public`,`private`]),_y=g({owner:T().min(1),name:T().min(1),visibility:gy,description:T().optional()}).loose(),vy=c([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),yy=d(`ok`,[g({ok:E(!0),ownerLogin:T().min(1),repoName:T().min(1),cloneUrl:T().min(1),defaultBranch:T().min(1)}).loose(),g({ok:E(!1),error:vy}).loose()]);function by(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const xy=e=>e.refine(by,`invalid branch name`);function Sy(e){if(e==null)return!1;let t=e instanceof Error?e.message:String(e);return/couldn'?t find remote ref|Remote branch .+ not found/i.test(t)}const Cy=[/could not read (username|password)/i,/terminal prompts disabled/i],wy=[/insufficient scopes/i,/missing.*scope/i,/required scope/i],Ty=[/permission denied.*\(publickey\)/i,/host key verification failed/i],Ey=[/\b(401|403)\b/,/authentication failed/i,/authorization failed/i,/invalid credentials/i,/credential helper/i,/bad credentials/i,/token.*expired/i,/expired.*token/i,/fatal:.*repository.*not found/i];function Dy(e){if(typeof e!=`object`||!e)return``;let t=e.git;return t==null?``:String(t)}function Oy(e){if(e==null)return{kind:`non-auth`};let t=`${e instanceof Error?e.message:String(e)}\n${Dy(e)}`;return Cy.some(e=>e.test(t))?{kind:`auth`,subclass:`no-credential`}:wy.some(e=>e.test(t))?{kind:`auth`,subclass:`scope-mismatch`}:Ty.some(e=>e.test(t))?{kind:`auth`,subclass:`ssh-auth`}:Ey.some(e=>e.test(t))?/\b401\b/.test(t)||/token.*expired/i.test(t)?{kind:`auth`,subclass:`401`}:/\b403\b/.test(t)?{kind:`auth`,subclass:`403`}:{kind:`auth`,subclass:`unknown-auth`}:{kind:`non-auth`}}function ky(e){return e.kind===`auth`?e.subclass===`no-credential`||e.subclass===`401`||e.subclass===`unknown-auth`:!1}const Ay={shareTargetExists:p(),dirtyConflicts:g({conflicts:p(),files:m(T().min(1))}).loose(),branchIsLocal:p(),shareTargetOnOriginBranch:p().optional()},jy=d(`detached`,[g({detached:E(!1),currentBranch:T().min(1).nullable(),currentHeadSha:D(),...Ay}).loose(),g({detached:E(!0),currentBranch:D(),currentHeadSha:T().min(1),...Ay}).loose()]),My=g({branch:xy(T().min(1)),principalId:T().optional(),fastForward:p().optional()}).loose(),Ny=c([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]),Py=d(`ok`,[g({ok:E(!0)}).loose(),g({ok:E(!1),reason:Ny,files:m(T().min(1)).optional(),otherWorktreePath:T().min(1).optional()}).loose()]);c([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]);const Fy=g({branch:xy(T().min(1)),path:T(),kind:c([`doc`,`folder`])}).loose(),Iy=d(`verdict`,[g({verdict:E(`on-origin`)}).loose(),g({verdict:E(`renamed`),renamedTo:T().min(1)}).loose(),g({verdict:E(`deleted`)}).loose(),g({verdict:E(`never-on-branch`)}).loose(),g({verdict:E(`changed-locally`)}).loose(),g({verdict:E(`unknown`)}).loose()]).catch({verdict:`unknown`}),Ly=g({startedAt:T().min(1),httpListenMs:S().nonnegative().optional(),seedWalkMs:S().nonnegative().optional(),indexesMs:S().nonnegative().optional(),readyMs:S().nonnegative().optional(),fileCount:S().nonnegative().optional()}),Ry=g({serverInstanceId:T().min(1),currentBranch:T().min(1).optional(),currentDiskAckSVs:v(T().min(1),T().min(1)).optional(),boot:Ly.optional()}).loose(),zy=g({id:T().min(1),display_name:T().min(1),display_email:T(),source:c([`git-config`,`synthesized`]),created_at:T().min(1)}).loose(),By=g({collabUrl:T().nullable(),previewUrl:T().nullable(),port:S(),singleFile:p().default(!1)}).loose(),Vy=c(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:no-conflict-tracked.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable`.split(`.`));function Hy(e){throw Error(`Unexpected ProblemType variant: ${JSON.stringify(e)}`)}const Uy=g({type:Vy,title:T().min(1),status:S().int().min(400).max(599),instance:T().regex(oy,`instance must be urn:uuid:<uuid>`).optional(),detail:T().optional()}).loose(),Wy=g({parentDocName:T().min(1),placement:c([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:T().min(1).optional(),agentName:T().min(1).optional()}).loose(),Gy=g({src:T().min(1),path:T().min(1).optional(),deduped:p().optional()}).loose(),Ky=g({url:T().min(1),dir:T().min(1),branch:T().min(1).refine(by,`invalid branch name`).optional()}).loose(),qy=g({type:E(`error`),problem:Uy}).loose();function Jy(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
140
- `)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}var Yy=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Yy.prototype.normal={},Yy.prototype.property={},Yy.prototype.space=void 0;function Xy(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Yy(n,r,t)}function Zy(e){return e.toLowerCase()}var Qy=class{constructor(e,t){this.attribute=t,this.property=e}};Qy.prototype.attribute=``,Qy.prototype.booleanish=!1,Qy.prototype.boolean=!1,Qy.prototype.commaOrSpaceSeparated=!1,Qy.prototype.commaSeparated=!1,Qy.prototype.defined=!1,Qy.prototype.mustUseProperty=!1,Qy.prototype.number=!1,Qy.prototype.overloadedBoolean=!1,Qy.prototype.property=``,Qy.prototype.spaceSeparated=!1,Qy.prototype.space=void 0;var $y=n({boolean:()=>I,booleanish:()=>tb,commaOrSpaceSeparated:()=>ab,commaSeparated:()=>ib,number:()=>L,overloadedBoolean:()=>nb,spaceSeparated:()=>rb});let eb=0;const I=ob(),tb=ob(),nb=ob(),L=ob(),rb=ob(),ib=ob(),ab=ob();function ob(){return 2**++eb}const sb=Object.keys($y);var cb=class extends Qy{constructor(e,t,n,r){let i=-1;if(super(e,t),lb(this,`space`,r),typeof n==`number`)for(;++i<sb.length;){let e=sb[i];lb(this,sb[i],(n&$y[e])===$y[e])}}};cb.prototype.defined=!0;function lb(e,t,n){n&&(e[t]=n)}function ub(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new cb(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zy(r)]=r,n[Zy(a.attribute)]=r}return new Yy(t,n,e.space)}const db=ub({properties:{ariaActiveDescendant:null,ariaAtomic:tb,ariaAutoComplete:null,ariaBusy:tb,ariaChecked:tb,ariaColCount:L,ariaColIndex:L,ariaColSpan:L,ariaControls:rb,ariaCurrent:null,ariaDescribedBy:rb,ariaDetails:null,ariaDisabled:tb,ariaDropEffect:rb,ariaErrorMessage:null,ariaExpanded:tb,ariaFlowTo:rb,ariaGrabbed:tb,ariaHasPopup:null,ariaHidden:tb,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rb,ariaLevel:L,ariaLive:null,ariaModal:tb,ariaMultiLine:tb,ariaMultiSelectable:tb,ariaOrientation:null,ariaOwns:rb,ariaPlaceholder:null,ariaPosInSet:L,ariaPressed:tb,ariaReadOnly:tb,ariaRelevant:null,ariaRequired:tb,ariaRoleDescription:rb,ariaRowCount:L,ariaRowIndex:L,ariaRowSpan:L,ariaSelected:tb,ariaSetSize:L,ariaSort:null,ariaValueMax:L,ariaValueMin:L,ariaValueNow:L,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function fb(e,t){return t in e?e[t]:t}function pb(e,t){return fb(e,t.toLowerCase())}const mb=ub({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ib,acceptCharset:rb,accessKey:rb,action:null,allow:null,allowFullScreen:I,allowPaymentRequest:I,allowUserMedia:I,alpha:I,alt:null,as:null,async:I,autoCapitalize:null,autoComplete:rb,autoFocus:I,autoPlay:I,blocking:rb,capture:null,charSet:null,checked:I,cite:null,className:rb,closedBy:null,colorSpace:null,cols:L,colSpan:L,command:null,commandFor:null,content:null,contentEditable:tb,controls:I,controlsList:rb,coords:L|ib,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I,defer:I,dir:null,dirName:null,disabled:I,download:nb,draggable:tb,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I,formTarget:null,headers:rb,height:L,hidden:nb,high:L,href:null,hrefLang:null,htmlFor:rb,httpEquiv:rb,id:null,imageSizes:null,imageSrcSet:null,inert:I,inputMode:null,integrity:null,is:null,isMap:I,itemId:null,itemProp:rb,itemRef:rb,itemScope:I,itemType:rb,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I,low:L,manifest:null,max:null,maxLength:L,media:null,method:null,min:null,minLength:L,multiple:I,muted:I,name:null,nonce:null,noModule:I,noValidate:I,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:I,optimum:L,pattern:null,ping:rb,placeholder:null,playsInline:I,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I,referrerPolicy:null,rel:rb,required:I,reversed:I,rows:L,rowSpan:L,sandbox:rb,scope:null,scoped:I,seamless:I,selected:I,shadowRootClonable:I,shadowRootCustomElementRegistry:I,shadowRootDelegatesFocus:I,shadowRootMode:null,shadowRootSerializable:I,shape:null,size:L,sizes:null,slot:null,span:L,spellCheck:tb,src:null,srcDoc:null,srcLang:null,srcSet:null,start:L,step:null,style:null,tabIndex:L,target:null,title:null,translate:null,type:null,typeMustMatch:I,useMap:null,value:tb,width:L,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rb,axis:null,background:null,bgColor:null,border:L,borderColor:null,bottomMargin:L,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I,declare:I,event:null,face:null,frame:null,frameBorder:null,hSpace:L,leftMargin:L,link:null,longDesc:null,lowSrc:null,marginHeight:L,marginWidth:L,noResize:I,noHref:I,noShade:I,noWrap:I,object:null,profile:null,prompt:null,rev:null,rightMargin:L,rules:null,scheme:null,scrolling:tb,standby:null,summary:null,text:null,topMargin:L,valueType:null,version:null,vAlign:null,vLink:null,vSpace:L,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:I,disablePictureInPicture:I,disableRemotePlayback:I,exportParts:ib,part:rb,prefix:null,property:null,results:L,security:null,unselectable:null},space:`html`,transform:pb}),hb=ub({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`,maskType:`mask-type`,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:ab,accentHeight:L,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:L,amplitude:L,arabicForm:null,ascent:L,attributeName:null,attributeType:null,azimuth:L,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:L,by:null,calcMode:null,capHeight:L,className:rb,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:L,diffuseConstant:L,direction:null,display:null,dur:null,divisor:L,dominantBaseline:null,download:I,dx:null,dy:null,edgeMode:null,editable:null,elevation:L,enableBackground:null,end:null,event:null,exponent:L,externalResourcesRequired:null,fill:null,fillOpacity:L,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:ib,g2:ib,glyphName:ib,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:L,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:L,horizOriginX:L,horizOriginY:L,id:null,ideographic:L,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:L,k:L,k1:L,k2:L,k3:L,k4:L,kernelMatrix:ab,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:L,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:L,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:L,overlineThickness:L,paintOrder:null,panose1:null,path:null,pathLength:L,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rb,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:L,pointsAtY:L,pointsAtZ:L,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ab,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ab,rev:ab,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ab,requiredFeatures:ab,requiredFonts:ab,requiredFormats:ab,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:L,specularExponent:L,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:L,strikethroughThickness:L,string:null,stroke:null,strokeDashArray:ab,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:L,strokeOpacity:L,strokeWidth:null,style:null,surfaceScale:L,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ab,tabIndex:L,tableValues:null,target:null,targetX:L,targetY:L,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ab,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:L,underlineThickness:L,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:L,values:null,vAlphabetic:L,vMathematical:L,vectorEffect:null,vHanging:L,vIdeographic:L,version:null,vertAdvY:L,vertOriginX:L,vertOriginY:L,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:L,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:fb}),gb=ub({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()}}),_b=ub({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:pb}),vb=ub({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),yb=/[A-Z]/g,bb=/-[a-z]/g,xb=/^data[-\w.:]+$/i;function Sb(e,t){let n=Zy(t),r=t,i=Qy;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&xb.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(bb,wb);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!bb.test(e)){let n=e.replace(yb,Cb);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=cb}return new i(r,t)}function Cb(e){return`-`+e.toLowerCase()}function wb(e){return e.charAt(1).toUpperCase()}const Tb=Xy([db,mb,gb,_b,vb],`html`),Eb=Xy([db,hb,gb,_b,vb],`svg`);function Db(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}const Ob=/[#.]/g;function kb(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Ob.lastIndex=i;let e=Ob.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Ab(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jb(e,t,n){let r=n?Lb(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=kb(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Mb(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Nb(e,o.properties,t,n)}for(let e of a)Pb(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Mb(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Nb(e,t,n,r){let i=Sb(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Ab(r):i.commaSeparated?Db(r):i.commaOrSpaceSeparated?Ab(Db(r).join(` `)):Fb(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Ib(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Fb(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Pb(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(let n of t)Pb(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Pb(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Fb(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Zy(n)===Zy(t)))return!0}return n}function Ib(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Lb(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}const Rb=`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`.split(`.`),zb=jb(Tb,`div`),Bb=jb(Eb,`g`,Rb);function Vb(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Hb(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Hb(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Hb(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
141
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ub={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/`},Wb={}.hasOwnProperty,Gb=Object.prototype;function Kb(e,t){let n=t||{};return qb({file:n.file||void 0,location:!1,schema:n.space===`svg`?Eb:Tb,verbose:n.verbose||!1},e)}function qb(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Xb(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:Jb(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Vb(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},Xb(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Xb(e,r,n),n}default:return n=Yb(e,t),n}}function Jb(e,t){let n=-1,r=[];for(;++n<t.length;){let i=qb(e,t[n]);r.push(i)}return r}function Yb(e,t){let n=e.schema;e.schema=t.namespaceURI===Ub.svg?Eb:Tb;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Wb.call(Gb,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Bb:zb)(t.tagName,i,Jb(e,t.childNodes));if(Xb(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Qb(r.startTag),o=r&&r.endTag&&Qb(r.endTag),s=qb(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function Xb(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Zb(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Zb(e,t,n){let r=Qb(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Wb.call(n.attrs,i)&&(r[Sb(e.schema,i).property]=Qb(n.attrs[i]));n.startTag;let a=Qb(n.startTag),o=n.endTag?Qb(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Qb(e){let t=$b({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=$b({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function $b(e){return e.line&&e.column?e:void 0}const ex=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 R;(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`})(R||={});const tx={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function nx(e){return e>=55296&&e<=57343}function rx(e){return e>=56320&&e<=57343}function ix(e,t){return(e-55296)*1024+9216+t}function ax(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ox(e){return e>=64976&&e<=65007||ex.has(e)}var z;(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`})(z||={});var sx=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=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(rx(t))return this.pos++,this._addGap(),ix(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,R.EOF;return this._err(z.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 t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,R.EOF;let n=this.html.charCodeAt(t);return n===R.CARRIAGE_RETURN?R.LINE_FEED:n}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,R.EOF;let e=this.html.charCodeAt(this.pos);return e===R.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,R.LINE_FEED):e===R.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,nx(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===R.LINE_FEED||e===R.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ax(e)?this._err(z.controlCharacterInInputStream):ox(e)&&this._err(z.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},cx;(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`})(cx||={});function lx(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const ux=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肻\xA0ଷ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))),dx=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]]);String.fromCodePoint;function fx(e){return e>=55296&&e<=57343||e>1114111?65533:dx.get(e)??e}var px;(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`})(px||={});var mx;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(mx||={});function hx(e){return e>=px.ZERO&&e<=px.NINE}function gx(e){return e>=px.UPPER_A&&e<=px.UPPER_F||e>=px.LOWER_A&&e<=px.LOWER_F}function _x(e){return e>=px.UPPER_A&&e<=px.UPPER_Z||e>=px.LOWER_A&&e<=px.LOWER_Z||hx(e)}function vx(e){return e===px.EQUALS||_x(e)}var yx;(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`})(yx||={});var bx;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(bx||={});var xx=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=yx.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bx.Strict}startEntity(e){this.decodeMode=e,this.state=yx.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case yx.EntityStart:return e.charCodeAt(t)===px.NUM?(this.state=yx.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=yx.NamedEntity,this.stateNamedEntity(e,t));case yx.NumericStart:return this.stateNumericStart(e,t);case yx.NumericDecimal:return this.stateNumericDecimal(e,t);case yx.NumericHex:return this.stateNumericHex(e,t);case yx.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|32)===px.LOWER_X?(this.state=yx.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=yx.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(hx(r)||gx(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(hx(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===px.SEMI)this.consumed+=1;else if(this.decodeMode===bx.Strict)return 0;return this.emitCodePoint(fx(this.result),this.consumed),this.errors&&(e!==px.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&mx.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=Sx(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===bx.Attribute&&(i===0||vx(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&mx.VALUE_LENGTH)>>14,i!==0){if(a===px.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==bx.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&mx.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~mx.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case yx.NamedEntity:return this.result!==0&&(this.decodeMode!==bx.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case yx.NumericDecimal:return this.emitNumericEntity(0,2);case yx.NumericHex:return this.emitNumericEntity(0,3);case yx.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case yx.EntityStart:return 0}}};function Sx(e,t,n,r){let i=(t&mx.BRANCH_LENGTH)>>7,a=t&mx.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var B;(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/`})(B||={});var Cx;(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`})(Cx||={});var wx;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(wx||={});var V;(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`})(V||={});var H;(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`})(H||={});const Tx=new Map([[V.A,H.A],[V.ADDRESS,H.ADDRESS],[V.ANNOTATION_XML,H.ANNOTATION_XML],[V.APPLET,H.APPLET],[V.AREA,H.AREA],[V.ARTICLE,H.ARTICLE],[V.ASIDE,H.ASIDE],[V.B,H.B],[V.BASE,H.BASE],[V.BASEFONT,H.BASEFONT],[V.BGSOUND,H.BGSOUND],[V.BIG,H.BIG],[V.BLOCKQUOTE,H.BLOCKQUOTE],[V.BODY,H.BODY],[V.BR,H.BR],[V.BUTTON,H.BUTTON],[V.CAPTION,H.CAPTION],[V.CENTER,H.CENTER],[V.CODE,H.CODE],[V.COL,H.COL],[V.COLGROUP,H.COLGROUP],[V.DD,H.DD],[V.DESC,H.DESC],[V.DETAILS,H.DETAILS],[V.DIALOG,H.DIALOG],[V.DIR,H.DIR],[V.DIV,H.DIV],[V.DL,H.DL],[V.DT,H.DT],[V.EM,H.EM],[V.EMBED,H.EMBED],[V.FIELDSET,H.FIELDSET],[V.FIGCAPTION,H.FIGCAPTION],[V.FIGURE,H.FIGURE],[V.FONT,H.FONT],[V.FOOTER,H.FOOTER],[V.FOREIGN_OBJECT,H.FOREIGN_OBJECT],[V.FORM,H.FORM],[V.FRAME,H.FRAME],[V.FRAMESET,H.FRAMESET],[V.H1,H.H1],[V.H2,H.H2],[V.H3,H.H3],[V.H4,H.H4],[V.H5,H.H5],[V.H6,H.H6],[V.HEAD,H.HEAD],[V.HEADER,H.HEADER],[V.HGROUP,H.HGROUP],[V.HR,H.HR],[V.HTML,H.HTML],[V.I,H.I],[V.IMG,H.IMG],[V.IMAGE,H.IMAGE],[V.INPUT,H.INPUT],[V.IFRAME,H.IFRAME],[V.KEYGEN,H.KEYGEN],[V.LABEL,H.LABEL],[V.LI,H.LI],[V.LINK,H.LINK],[V.LISTING,H.LISTING],[V.MAIN,H.MAIN],[V.MALIGNMARK,H.MALIGNMARK],[V.MARQUEE,H.MARQUEE],[V.MATH,H.MATH],[V.MENU,H.MENU],[V.META,H.META],[V.MGLYPH,H.MGLYPH],[V.MI,H.MI],[V.MO,H.MO],[V.MN,H.MN],[V.MS,H.MS],[V.MTEXT,H.MTEXT],[V.NAV,H.NAV],[V.NOBR,H.NOBR],[V.NOFRAMES,H.NOFRAMES],[V.NOEMBED,H.NOEMBED],[V.NOSCRIPT,H.NOSCRIPT],[V.OBJECT,H.OBJECT],[V.OL,H.OL],[V.OPTGROUP,H.OPTGROUP],[V.OPTION,H.OPTION],[V.P,H.P],[V.PARAM,H.PARAM],[V.PLAINTEXT,H.PLAINTEXT],[V.PRE,H.PRE],[V.RB,H.RB],[V.RP,H.RP],[V.RT,H.RT],[V.RTC,H.RTC],[V.RUBY,H.RUBY],[V.S,H.S],[V.SCRIPT,H.SCRIPT],[V.SEARCH,H.SEARCH],[V.SECTION,H.SECTION],[V.SELECT,H.SELECT],[V.SOURCE,H.SOURCE],[V.SMALL,H.SMALL],[V.SPAN,H.SPAN],[V.STRIKE,H.STRIKE],[V.STRONG,H.STRONG],[V.STYLE,H.STYLE],[V.SUB,H.SUB],[V.SUMMARY,H.SUMMARY],[V.SUP,H.SUP],[V.TABLE,H.TABLE],[V.TBODY,H.TBODY],[V.TEMPLATE,H.TEMPLATE],[V.TEXTAREA,H.TEXTAREA],[V.TFOOT,H.TFOOT],[V.TD,H.TD],[V.TH,H.TH],[V.THEAD,H.THEAD],[V.TITLE,H.TITLE],[V.TR,H.TR],[V.TRACK,H.TRACK],[V.TT,H.TT],[V.U,H.U],[V.UL,H.UL],[V.SVG,H.SVG],[V.VAR,H.VAR],[V.WBR,H.WBR],[V.XMP,H.XMP]]);function Ex(e){return Tx.get(e)??H.UNKNOWN}const U=H,Dx={[B.HTML]:new Set([U.ADDRESS,U.APPLET,U.AREA,U.ARTICLE,U.ASIDE,U.BASE,U.BASEFONT,U.BGSOUND,U.BLOCKQUOTE,U.BODY,U.BR,U.BUTTON,U.CAPTION,U.CENTER,U.COL,U.COLGROUP,U.DD,U.DETAILS,U.DIR,U.DIV,U.DL,U.DT,U.EMBED,U.FIELDSET,U.FIGCAPTION,U.FIGURE,U.FOOTER,U.FORM,U.FRAME,U.FRAMESET,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HEADER,U.HGROUP,U.HR,U.HTML,U.IFRAME,U.IMG,U.INPUT,U.LI,U.LINK,U.LISTING,U.MAIN,U.MARQUEE,U.MENU,U.META,U.NAV,U.NOEMBED,U.NOFRAMES,U.NOSCRIPT,U.OBJECT,U.OL,U.P,U.PARAM,U.PLAINTEXT,U.PRE,U.SCRIPT,U.SECTION,U.SELECT,U.SOURCE,U.STYLE,U.SUMMARY,U.TABLE,U.TBODY,U.TD,U.TEMPLATE,U.TEXTAREA,U.TFOOT,U.TH,U.THEAD,U.TITLE,U.TR,U.TRACK,U.UL,U.WBR,U.XMP]),[B.MATHML]:new Set([U.MI,U.MO,U.MN,U.MS,U.MTEXT,U.ANNOTATION_XML]),[B.SVG]:new Set([U.TITLE,U.FOREIGN_OBJECT,U.DESC]),[B.XLINK]:new Set,[B.XML]:new Set,[B.XMLNS]:new Set},Ox=new Set([U.H1,U.H2,U.H3,U.H4,U.H5,U.H6]);new Set([V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT]);var W;(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`})(W||={});const kx={DATA:W.DATA,RCDATA:W.RCDATA,RAWTEXT:W.RAWTEXT,SCRIPT_DATA:W.SCRIPT_DATA,PLAINTEXT:W.PLAINTEXT,CDATA_SECTION:W.CDATA_SECTION};function Ax(e){return e>=R.DIGIT_0&&e<=R.DIGIT_9}function jx(e){return e>=R.LATIN_CAPITAL_A&&e<=R.LATIN_CAPITAL_Z}function Mx(e){return e>=R.LATIN_SMALL_A&&e<=R.LATIN_SMALL_Z}function Nx(e){return Mx(e)||jx(e)}function Px(e){return Nx(e)||Ax(e)}function Fx(e){return e+32}function Ix(e){return e===R.SPACE||e===R.LINE_FEED||e===R.TABULATION||e===R.FORM_FEED}function Lx(e){return Ix(e)||e===R.SOLIDUS||e===R.GREATER_THAN_SIGN}function Rx(e){return e===R.NULL?z.nullCharacterReference:e>1114111?z.characterReferenceOutsideUnicodeRange:nx(e)?z.surrogateCharacterReference:ox(e)?z.noncharacterCharacterReference:ax(e)||e===R.CARRIAGE_RETURN?z.controlCharacterReference:null}var zx=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=W.DATA,this.returnState=W.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new sx(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new xx(ux,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(z.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(z.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Rx(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}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:cx.START_TAG,tagName:``,tagID:H.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:cx.END_TAG,tagName:``,tagID:H.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:cx.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:cx.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;let t=this.currentToken;if(lx(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(z.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=Ex(e.tagName),e.type===cx.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(z.endTagWithAttributes),e.selfClosing&&this._err(z.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 cx.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case cx.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case cx.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:cx.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){let t=Ix(e)?cx.WHITESPACE_CHARACTER:e===R.NULL?cx.NULL_CHARACTER:cx.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(cx.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=W.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?bx.Attribute:bx.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===W.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===W.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===W.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case W.DATA:this._stateData(e);break;case W.RCDATA:this._stateRcdata(e);break;case W.RAWTEXT:this._stateRawtext(e);break;case W.SCRIPT_DATA:this._stateScriptData(e);break;case W.PLAINTEXT:this._statePlaintext(e);break;case W.TAG_OPEN:this._stateTagOpen(e);break;case W.END_TAG_OPEN:this._stateEndTagOpen(e);break;case W.TAG_NAME:this._stateTagName(e);break;case W.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case W.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case W.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case W.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case W.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case W.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case W.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case W.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case W.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case W.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case W.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case W.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case W.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case W.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case W.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case W.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case W.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case W.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case W.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case W.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case W.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case W.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case W.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case W.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case W.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case W.BOGUS_COMMENT:this._stateBogusComment(e);break;case W.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case W.COMMENT_START:this._stateCommentStart(e);break;case W.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case W.COMMENT:this._stateComment(e);break;case W.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case W.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case W.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case W.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case W.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case W.COMMENT_END:this._stateCommentEnd(e);break;case W.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case W.DOCTYPE:this._stateDoctype(e);break;case W.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case W.DOCTYPE_NAME:this._stateDoctypeName(e);break;case W.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case W.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case W.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case W.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case W.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case W.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case W.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case W.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case W.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case W.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case W.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case W.CDATA_SECTION:this._stateCdataSection(e);break;case W.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case W.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case W.CHARACTER_REFERENCE:this._stateCharacterReference();break;case W.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case R.LESS_THAN_SIGN:this.state=W.TAG_OPEN;break;case R.AMPERSAND:this._startCharacterReference();break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitCodePoint(e);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case R.AMPERSAND:this._startCharacterReference();break;case R.LESS_THAN_SIGN:this.state=W.RCDATA_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case R.LESS_THAN_SIGN:this.state=W.RAWTEXT_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Nx(e))this._createStartTagToken(),this.state=W.TAG_NAME,this._stateTagName(e);else switch(e){case R.EXCLAMATION_MARK:this.state=W.MARKUP_DECLARATION_OPEN;break;case R.SOLIDUS:this.state=W.END_TAG_OPEN;break;case R.QUESTION_MARK:this._err(z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=W.BOGUS_COMMENT,this._stateBogusComment(e);break;case R.EOF:this._err(z.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(z.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=W.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Nx(e))this._createEndTagToken(),this.state=W.TAG_NAME,this._stateTagName(e);else switch(e){case R.GREATER_THAN_SIGN:this._err(z.missingEndTagName),this.state=W.DATA;break;case R.EOF:this._err(z.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=W.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_ATTRIBUTE_NAME;break;case R.SOLIDUS:this.state=W.SELF_CLOSING_START_TAG;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentTagToken();break;case R.NULL:this._err(z.unexpectedNullCharacter),t.tagName+=`�`;break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(jx(e)?Fx(e):e)}}_stateRcdataLessThanSign(e){e===R.SOLIDUS?this.state=W.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=W.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Nx(e)?(this.state=W.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=W.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=W.BEFORE_ATTRIBUTE_NAME,!1;case R.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=W.SELF_CLOSING_START_TAG,!1;case R.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=W.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===R.SOLIDUS?this.state=W.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=W.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Nx(e)?(this.state=W.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=W.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case R.SOLIDUS:this.state=W.SCRIPT_DATA_END_TAG_OPEN;break;case R.EXCLAMATION_MARK:this.state=W.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=W.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Nx(e)?(this.state=W.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===R.HYPHEN_MINUS?(this.state=W.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===R.HYPHEN_MINUS?(this.state=W.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case R.HYPHEN_MINUS:this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case R.GREATER_THAN_SIGN:this.state=W.SCRIPT_DATA,this._emitChars(`>`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===R.SOLIDUS?this.state=W.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Nx(e)?(this._emitChars(`<`),this.state=W.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Nx(e)?(this.state=W.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(tx.SCRIPT,!1)&&Lx(this.preprocessor.peek(tx.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tx.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case R.HYPHEN_MINUS:this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case R.GREATER_THAN_SIGN:this.state=W.SCRIPT_DATA,this._emitChars(`>`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===R.SOLIDUS?(this.state=W.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(tx.SCRIPT,!1)&&Lx(this.preprocessor.peek(tx.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tx.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=W.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.SOLIDUS:case R.GREATER_THAN_SIGN:case R.EOF:this.state=W.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case R.EQUALS_SIGN:this._err(z.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=W.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=W.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:case R.SOLIDUS:case R.GREATER_THAN_SIGN:case R.EOF:this._leaveAttrName(),this.state=W.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case R.EQUALS_SIGN:this._leaveAttrName(),this.state=W.BEFORE_ATTRIBUTE_VALUE;break;case R.QUOTATION_MARK:case R.APOSTROPHE:case R.LESS_THAN_SIGN:this._err(z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(jx(e)?Fx(e):e)}}_stateAfterAttributeName(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.SOLIDUS:this.state=W.SELF_CLOSING_START_TAG;break;case R.EQUALS_SIGN:this.state=W.BEFORE_ATTRIBUTE_VALUE;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentTagToken();break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=W.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:this.state=W.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case R.APOSTROPHE:this.state=W.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingAttributeValue),this.state=W.DATA,this.emitCurrentTagToken();break;default:this.state=W.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case R.QUOTATION_MARK:this.state=W.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case R.AMPERSAND:this._startCharacterReference();break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case R.APOSTROPHE:this.state=W.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case R.AMPERSAND:this._startCharacterReference();break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this._leaveAttrValue(),this.state=W.BEFORE_ATTRIBUTE_NAME;break;case R.AMPERSAND:this._startCharacterReference();break;case R.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=W.DATA,this.emitCurrentTagToken();break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case R.QUOTATION_MARK:case R.APOSTROPHE:case R.LESS_THAN_SIGN:case R.EQUALS_SIGN:case R.GRAVE_ACCENT:this._err(z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this._leaveAttrValue(),this.state=W.BEFORE_ATTRIBUTE_NAME;break;case R.SOLIDUS:this._leaveAttrValue(),this.state=W.SELF_CLOSING_START_TAG;break;case R.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=W.DATA,this.emitCurrentTagToken();break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this._err(z.missingWhitespaceBetweenAttributes),this.state=W.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case R.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=W.DATA,this.emitCurrentTagToken();break}case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this._err(z.unexpectedSolidusInTag),this.state=W.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentComment(t);break;case R.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case R.NULL:this._err(z.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(tx.DASH_DASH,!0)?(this._createCommentToken(tx.DASH_DASH.length+1),this.state=W.COMMENT_START):this._consumeSequenceIfMatch(tx.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tx.DOCTYPE.length+1),this.state=W.DOCTYPE):this._consumeSequenceIfMatch(tx.CDATA_START,!0)?this.inForeignNode?this.state=W.CDATA_SECTION:(this._err(z.cdataInHtmlContent),this._createCommentToken(tx.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=W.BOGUS_COMMENT):this._ensureHibernation()||(this._err(z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=W.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_START_DASH;break;case R.GREATER_THAN_SIGN:{this._err(z.abruptClosingOfEmptyComment),this.state=W.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=W.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_END;break;case R.GREATER_THAN_SIGN:this._err(z.abruptClosingOfEmptyComment),this.state=W.DATA,this.emitCurrentComment(t);break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=W.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_END_DASH;break;case R.LESS_THAN_SIGN:t.data+=`<`,this.state=W.COMMENT_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.data+=`�`;break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case R.EXCLAMATION_MARK:t.data+=`!`,this.state=W.COMMENT_LESS_THAN_SIGN_BANG;break;case R.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=W.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===R.HYPHEN_MINUS?this.state=W.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=W.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===R.HYPHEN_MINUS?this.state=W.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=W.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==R.GREATER_THAN_SIGN&&e!==R.EOF&&this._err(z.nestedComment),this.state=W.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_END;break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=W.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentComment(t);break;case R.EXCLAMATION_MARK:this.state=W.COMMENT_END_BANG;break;case R.HYPHEN_MINUS:t.data+=`-`;break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=W.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:t.data+=`--!`,this.state=W.COMMENT_END_DASH;break;case R.GREATER_THAN_SIGN:this._err(z.incorrectlyClosedComment),this.state=W.DATA,this.emitCurrentComment(t);break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=W.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_DOCTYPE_NAME;break;case R.GREATER_THAN_SIGN:this.state=W.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case R.EOF:{this._err(z.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(z.missingWhitespaceBeforeDoctypeName),this.state=W.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(jx(e))this._createDoctypeToken(String.fromCharCode(Fx(e))),this.state=W.DOCTYPE_NAME;else switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.NULL:this._err(z.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=W.DOCTYPE_NAME;break;case R.GREATER_THAN_SIGN:{this._err(z.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=W.DATA;break}case R.EOF:{this._err(z.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=W.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.AFTER_DOCTYPE_NAME;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.NULL:this._err(z.unexpectedNullCharacter),t.name+=`�`;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(jx(e)?Fx(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(tx.PUBLIC,!1)?this.state=W.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tx.SYSTEM,!1)?this.state=W.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(z.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case R.QUOTATION_MARK:this._err(z.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:this._err(z.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case R.QUOTATION_MARK:this.state=W.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.publicId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case R.APOSTROPHE:this.state=W.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.publicId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.QUOTATION_MARK:this._err(z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:this._err(z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.QUOTATION_MARK:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case R.QUOTATION_MARK:this._err(z.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:this._err(z.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case R.QUOTATION_MARK:this.state=W.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.systemId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case R.APOSTROPHE:this.state=W.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.systemId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case R.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.NULL:this._err(z.unexpectedNullCharacter);break;case R.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case R.RIGHT_SQUARE_BRACKET:this.state=W.CDATA_SECTION_BRACKET;break;case R.EOF:this._err(z.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===R.RIGHT_SQUARE_BRACKET?this.state=W.CDATA_SECTION_END:(this._emitChars(`]`),this.state=W.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case R.GREATER_THAN_SIGN:this.state=W.DATA;break;case R.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=W.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(R.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Px(this.preprocessor.peek(1))?W.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Px(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===R.SEMICOLON&&this._err(z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}};const Bx=new Set([H.DD,H.DT,H.LI,H.OPTGROUP,H.OPTION,H.P,H.RB,H.RP,H.RT,H.RTC]),Vx=new Set([...Bx,H.CAPTION,H.COLGROUP,H.TBODY,H.TD,H.TFOOT,H.TH,H.THEAD,H.TR]),Hx=new Set([H.APPLET,H.CAPTION,H.HTML,H.MARQUEE,H.OBJECT,H.TABLE,H.TD,H.TEMPLATE,H.TH]),Ux=new Set([...Hx,H.OL,H.UL]),Wx=new Set([...Hx,H.BUTTON]),Gx=new Set([H.ANNOTATION_XML,H.MI,H.MN,H.MO,H.MS,H.MTEXT]),Kx=new Set([H.DESC,H.FOREIGN_OBJECT,H.TITLE]),qx=new Set([H.TR,H.TEMPLATE,H.HTML]),Jx=new Set([H.TBODY,H.TFOOT,H.THEAD,H.TEMPLATE,H.HTML]),Yx=new Set([H.TABLE,H.TEMPLATE,H.HTML]),Xx=new Set([H.TD,H.TH]);var Zx=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=H.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===H.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===B.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(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===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])!==B.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ox,B.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Xx,B.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Yx,B.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Jx,B.HTML)}clearBackToTableRowContext(){this.clearBackTo(qx,B.HTML)}remove(e){let 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]===H.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===H.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case B.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case B.SVG:if(Kx.has(r))return!1;break;case B.MATHML:if(Gx.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Hx)}hasInListItemScope(e){return this.hasInDynamicScope(e,Ux)}hasInButtonScope(e){return this.hasInDynamicScope(e,Wx)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case B.HTML:if(Ox.has(t))return!0;if(Hx.has(t))return!1;break;case B.SVG:if(Kx.has(t))return!1;break;case B.MATHML:if(Gx.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case e:return!0;case H.TABLE:case H.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===B.HTML)switch(this.tagIDs[e]){case H.TBODY:case H.THEAD:case H.TFOOT:return!0;case H.TABLE:case H.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case e:return!0;case H.OPTION:case H.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Bx.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Vx.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Vx.has(this.currentTagId);)this.pop()}},Qx;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Qx||={});const $x={type:Qx.Marker};var eS=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Qx.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift($x)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Qx.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Qx.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf($x);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Qx.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Qx.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Qx.Element&&t.element===e)}};const tS={createDocument(){return{nodeName:`#document`,mode:wx.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};tS.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(tS.isTextNode(n)){n.value+=t;return}}tS.appendChild(e,tS.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tS.isTextNode(r)?r.value+=t:tS.insertBefore(e,tS.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},nS=`html`,rS=`+//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//`.split(`,`),iS=[...rS,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],aS=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),oS=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],sS=[...oS,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function cS(e,t){return t.some(t=>e.startsWith(t))}function lS(e){return e.name===nS&&e.publicId===null&&(e.systemId===null||e.systemId===`about:legacy-compat`)}function uS(e){if(e.name!==nS)return wx.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return wx.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),aS.has(n))return wx.QUIRKS;let e=t===null?iS:rS;if(cS(n,e))return wx.QUIRKS;if(e=t===null?oS:sS,cS(n,e))return wx.LIMITED_QUIRKS}return wx.NO_QUIRKS}const dS={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},fS=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`.split(`.`).map(e=>[e.toLowerCase(),e])),pS=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:B.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:B.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:B.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:B.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:B.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:B.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:B.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:B.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:B.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:B.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:B.XMLNS}]]),mS=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`.split(`.`).map(e=>[e.toLowerCase(),e])),hS=new Set([H.B,H.BIG,H.BLOCKQUOTE,H.BODY,H.BR,H.CENTER,H.CODE,H.DD,H.DIV,H.DL,H.DT,H.EM,H.EMBED,H.H1,H.H2,H.H3,H.H4,H.H5,H.H6,H.HEAD,H.HR,H.I,H.IMG,H.LI,H.LISTING,H.MENU,H.META,H.NOBR,H.OL,H.P,H.PRE,H.RUBY,H.S,H.SMALL,H.SPAN,H.STRONG,H.STRIKE,H.SUB,H.SUP,H.TABLE,H.TT,H.U,H.UL,H.VAR]);function gS(e){let t=e.tagID;return t===H.FONT&&e.attrs.some(({name:e})=>e===Cx.COLOR||e===Cx.SIZE||e===Cx.FACE)||hS.has(t)}function _S(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===`definitionurl`){e.attrs[t].name=`definitionURL`;break}}function vS(e){for(let t=0;t<e.attrs.length;t++){let n=fS.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yS(e){for(let t=0;t<e.attrs.length;t++){let n=pS.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function bS(e){let t=mS.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ex(e.tagName))}function xS(e,t){return t===B.MATHML&&(e===H.MI||e===H.MO||e===H.MN||e===H.MS||e===H.MTEXT)}function SS(e,t,n){if(t===B.MATHML&&e===H.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Cx.ENCODING){let t=n[e].value.toLowerCase();return t===dS.TEXT_HTML||t===dS.APPLICATION_XML}}return t===B.SVG&&(e===H.FOREIGN_OBJECT||e===H.DESC||e===H.TITLE)}function CS(e,t,n,r){return(!r||r===B.HTML)&&SS(e,t,n)||(!r||r===B.MATHML)&&xS(e,t)}var G;(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`})(G||={});const wS={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},TS=new Set([H.TABLE,H.TBODY,H.TFOOT,H.THEAD,H.TR]),ES={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tS,onParseError:null};var DS=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=G.INITIAL,this.originalInsertionMode=G.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={...ES,...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 zx(this.options,this),this.activeFormattingElements=new eS(this.treeAdapter),this.fragmentContextID=n?Ex(this.treeAdapter.getTagName(n)):H.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Zx(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...ES,...t};e??=n.treeAdapter.createElement(V.TEMPLATE,B.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,B.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===H.TEMPLATE&&i.tmplInsertionModeStack.unshift(G.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??wS,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===B.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,B.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=G.TEXT}switchToPlaintextParsing(){this.insertionMode=G.TEXT,this.originalInsertionMode=G.IN_BODY,this.tokenizer.state=kx.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)===V.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==B.HTML))switch(this.fragmentContextID){case H.TITLE:case H.TEXTAREA:this.tokenizer.state=kx.RCDATA;break;case H.STYLE:case H.XMP:case H.IFRAME:case H.NOEMBED:case H.NOFRAMES:case H.NOSCRIPT:this.tokenizer.state=kx.RAWTEXT;break;case H.SCRIPT:this.tokenizer.state=kx.SCRIPT_DATA;break;case H.PLAINTEXT:this.tokenizer.state=kx.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,B.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,B.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(V.HTML,B.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,H.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===cx.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===H.SVG&&this.treeAdapter.getTagName(t)===V.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===B.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===H.MGLYPH||e.tagID===H.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,B.HTML)}_processToken(e){switch(e.type){case cx.CHARACTER:this.onCharacter(e);break;case cx.NULL_CHARACTER:this.onNullCharacter(e);break;case cx.COMMENT:this.onComment(e);break;case cx.DOCTYPE:this.onDoctype(e);break;case cx.START_TAG:this._processStartTag(e);break;case cx.END_TAG:this.onEndTag(e);break;case cx.EOF:this.onEof(e);break;case cx.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return CS(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Qx.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=G.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(H.P),this.openElements.popUntilTagNamePopped(H.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case H.TR:this.insertionMode=G.IN_ROW;return;case H.TBODY:case H.THEAD:case H.TFOOT:this.insertionMode=G.IN_TABLE_BODY;return;case H.CAPTION:this.insertionMode=G.IN_CAPTION;return;case H.COLGROUP:this.insertionMode=G.IN_COLUMN_GROUP;return;case H.TABLE:this.insertionMode=G.IN_TABLE;return;case H.BODY:this.insertionMode=G.IN_BODY;return;case H.FRAMESET:this.insertionMode=G.IN_FRAMESET;return;case H.SELECT:this._resetInsertionModeForSelect(e);return;case H.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case H.HTML:this.insertionMode=this.headElement?G.AFTER_HEAD:G.BEFORE_HEAD;return;case H.TD:case H.TH:if(e>0){this.insertionMode=G.IN_CELL;return}break;case H.HEAD:if(e>0){this.insertionMode=G.IN_HEAD;return}break}this.insertionMode=G.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===H.TEMPLATE)break;if(e===H.TABLE){this.insertionMode=G.IN_SELECT_IN_TABLE;return}}this.insertionMode=G.IN_SELECT}_isElementCausesFosterParenting(e){return TS.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case H.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===B.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case H.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Dx[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Gw(this,e);return}switch(this.insertionMode){case G.INITIAL:BS(this,e);break;case G.BEFORE_HTML:US(this,e);break;case G.BEFORE_HEAD:KS(this,e);break;case G.IN_HEAD:XS(this,e);break;case G.IN_HEAD_NO_SCRIPT:$S(this,e);break;case G.AFTER_HEAD:nC(this,e);break;case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:aC(this,e);break;case G.TEXT:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:ew(this,e);break;case G.IN_TABLE_TEXT:pw(this,e);break;case G.IN_COLUMN_GROUP:bw(this,e);break;case G.AFTER_BODY:Iw(this,e);break;case G.AFTER_AFTER_BODY:Hw(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ww(this,e);return}switch(this.insertionMode){case G.INITIAL:BS(this,e);break;case G.BEFORE_HTML:US(this,e);break;case G.BEFORE_HEAD:KS(this,e);break;case G.IN_HEAD:XS(this,e);break;case G.IN_HEAD_NO_SCRIPT:$S(this,e);break;case G.AFTER_HEAD:nC(this,e);break;case G.TEXT:this._insertCharacters(e);break;case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:ew(this,e);break;case G.IN_COLUMN_GROUP:bw(this,e);break;case G.AFTER_BODY:Iw(this,e);break;case G.AFTER_AFTER_BODY:Hw(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){FS(this,e);return}switch(this.insertionMode){case G.INITIAL:case G.BEFORE_HTML:case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_TEMPLATE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:FS(this,e);break;case G.IN_TABLE_TEXT:mw(this,e);break;case G.AFTER_BODY:IS(this,e);break;case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:LS(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case G.INITIAL:zS(this,e);break;case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:this._err(e,z.misplacedDoctype);break;case G.IN_TABLE_TEXT:mw(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?qw(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case G.INITIAL:BS(this,e);break;case G.BEFORE_HTML:VS(this,e);break;case G.BEFORE_HEAD:WS(this,e);break;case G.IN_HEAD:qS(this,e);break;case G.IN_HEAD_NO_SCRIPT:ZS(this,e);break;case G.AFTER_HEAD:eC(this,e);break;case G.IN_BODY:RC(this,e);break;case G.IN_TABLE:lw(this,e);break;case G.IN_TABLE_TEXT:mw(this,e);break;case G.IN_CAPTION:gw(this,e);break;case G.IN_COLUMN_GROUP:vw(this,e);break;case G.IN_TABLE_BODY:xw(this,e);break;case G.IN_ROW:Cw(this,e);break;case G.IN_CELL:Tw(this,e);break;case G.IN_SELECT:Dw(this,e);break;case G.IN_SELECT_IN_TABLE:kw(this,e);break;case G.IN_TEMPLATE:jw(this,e);break;case G.AFTER_BODY:Pw(this,e);break;case G.IN_FRAMESET:Lw(this,e);break;case G.AFTER_FRAMESET:zw(this,e);break;case G.AFTER_AFTER_BODY:Vw(this,e);break;case G.AFTER_AFTER_FRAMESET:Uw(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?Jw(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case G.INITIAL:BS(this,e);break;case G.BEFORE_HTML:HS(this,e);break;case G.BEFORE_HEAD:GS(this,e);break;case G.IN_HEAD:JS(this,e);break;case G.IN_HEAD_NO_SCRIPT:QS(this,e);break;case G.AFTER_HEAD:tC(this,e);break;case G.IN_BODY:XC(this,e);break;case G.TEXT:QC(this,e);break;case G.IN_TABLE:uw(this,e);break;case G.IN_TABLE_TEXT:mw(this,e);break;case G.IN_CAPTION:_w(this,e);break;case G.IN_COLUMN_GROUP:yw(this,e);break;case G.IN_TABLE_BODY:Sw(this,e);break;case G.IN_ROW:ww(this,e);break;case G.IN_CELL:Ew(this,e);break;case G.IN_SELECT:Ow(this,e);break;case G.IN_SELECT_IN_TABLE:Aw(this,e);break;case G.IN_TEMPLATE:Mw(this,e);break;case G.AFTER_BODY:Fw(this,e);break;case G.IN_FRAMESET:Rw(this,e);break;case G.AFTER_FRAMESET:Bw(this,e);break;case G.AFTER_AFTER_BODY:Hw(this,e);break;default:}}onEof(e){switch(this.insertionMode){case G.INITIAL:BS(this,e);break;case G.BEFORE_HTML:US(this,e);break;case G.BEFORE_HEAD:KS(this,e);break;case G.IN_HEAD:XS(this,e);break;case G.IN_HEAD_NO_SCRIPT:$S(this,e);break;case G.AFTER_HEAD:nC(this,e);break;case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:ZC(this,e);break;case G.TEXT:$C(this,e);break;case G.IN_TABLE_TEXT:mw(this,e);break;case G.IN_TEMPLATE:Nw(this,e);break;case G.AFTER_BODY:case G.IN_FRAMESET:case G.AFTER_FRAMESET:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:RS(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===R.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 G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.TEXT:case G.IN_COLUMN_GROUP:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:this._insertCharacters(e);break;case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:case G.AFTER_BODY:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:iC(this,e);break;case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:ew(this,e);break;case G.IN_TABLE_TEXT:fw(this,e);break;default:}}};function OS(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):YC(e,t),n}function kS(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function AS(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=jS(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function jS(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function MS(e,t,n){let r=Ex(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===H.TEMPLATE&&i===B.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function NS(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function PS(e,t){for(let n=0;n<8;n++){let n=OS(e,t);if(!n)break;let r=kS(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=AS(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&MS(e,a,i),NS(e,r,n)}}function FS(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IS(e,t){e._appendCommentNode(t,e.openElements.items[0])}function LS(e,t){e._appendCommentNode(t,e.document)}function RS(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function zS(e,t){e._setDocumentType(t);let n=t.forceQuirks?wx.QUIRKS:uS(t);lS(t)||e._err(t,z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=G.BEFORE_HTML}function BS(e,t){e._err(t,z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,wx.QUIRKS),e.insertionMode=G.BEFORE_HTML,e._processToken(t)}function VS(e,t){t.tagID===H.HTML?(e._insertElement(t,B.HTML),e.insertionMode=G.BEFORE_HEAD):US(e,t)}function HS(e,t){let n=t.tagID;(n===H.HTML||n===H.HEAD||n===H.BODY||n===H.BR)&&US(e,t)}function US(e,t){e._insertFakeRootElement(),e.insertionMode=G.BEFORE_HEAD,e._processToken(t)}function WS(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.HEAD:e._insertElement(t,B.HTML),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD;break;default:KS(e,t)}}function GS(e,t){let n=t.tagID;n===H.HEAD||n===H.BODY||n===H.HTML||n===H.BR?KS(e,t):e._err(t,z.endTagWithoutMatchingOpenElement)}function KS(e,t){e._insertFakeElement(V.HEAD,H.HEAD),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD,e._processToken(t)}function qS(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.BASE:case H.BASEFONT:case H.BGSOUND:case H.LINK:case H.META:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.TITLE:e._switchToTextParsing(t,kx.RCDATA);break;case H.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,kx.RAWTEXT):(e._insertElement(t,B.HTML),e.insertionMode=G.IN_HEAD_NO_SCRIPT);break;case H.NOFRAMES:case H.STYLE:e._switchToTextParsing(t,kx.RAWTEXT);break;case H.SCRIPT:e._switchToTextParsing(t,kx.SCRIPT_DATA);break;case H.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=G.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(G.IN_TEMPLATE);break;case H.HEAD:e._err(t,z.misplacedStartTagForHeadElement);break;default:XS(e,t)}}function JS(e,t){switch(t.tagID){case H.HEAD:e.openElements.pop(),e.insertionMode=G.AFTER_HEAD;break;case H.BODY:case H.BR:case H.HTML:XS(e,t);break;case H.TEMPLATE:YS(e,t);break;default:e._err(t,z.endTagWithoutMatchingOpenElement)}}function YS(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==H.TEMPLATE&&e._err(t,z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(H.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,z.endTagWithoutMatchingOpenElement)}function XS(e,t){e.openElements.pop(),e.insertionMode=G.AFTER_HEAD,e._processToken(t)}function ZS(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.BASEFONT:case H.BGSOUND:case H.HEAD:case H.LINK:case H.META:case H.NOFRAMES:case H.STYLE:qS(e,t);break;case H.NOSCRIPT:e._err(t,z.nestedNoscriptInHead);break;default:$S(e,t)}}function QS(e,t){switch(t.tagID){case H.NOSCRIPT:e.openElements.pop(),e.insertionMode=G.IN_HEAD;break;case H.BR:$S(e,t);break;default:e._err(t,z.endTagWithoutMatchingOpenElement)}}function $S(e,t){let n=t.type===cx.EOF?z.openElementsLeftAfterEof:z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=G.IN_HEAD,e._processToken(t)}function eC(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.BODY:e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=G.IN_BODY;break;case H.FRAMESET:e._insertElement(t,B.HTML),e.insertionMode=G.IN_FRAMESET;break;case H.BASE:case H.BASEFONT:case H.BGSOUND:case H.LINK:case H.META:case H.NOFRAMES:case H.SCRIPT:case H.STYLE:case H.TEMPLATE:case H.TITLE:e._err(t,z.abandonedHeadElementChild),e.openElements.push(e.headElement,H.HEAD),qS(e,t),e.openElements.remove(e.headElement);break;case H.HEAD:e._err(t,z.misplacedStartTagForHeadElement);break;default:nC(e,t)}}function tC(e,t){switch(t.tagID){case H.BODY:case H.HTML:case H.BR:nC(e,t);break;case H.TEMPLATE:YS(e,t);break;default:e._err(t,z.endTagWithoutMatchingOpenElement)}}function nC(e,t){e._insertFakeElement(V.BODY,H.BODY),e.insertionMode=G.IN_BODY,rC(e,t)}function rC(e,t){switch(t.type){case cx.CHARACTER:aC(e,t);break;case cx.WHITESPACE_CHARACTER:iC(e,t);break;case cx.COMMENT:FS(e,t);break;case cx.START_TAG:RC(e,t);break;case cx.END_TAG:XC(e,t);break;case cx.EOF:ZC(e,t);break;default:}}function iC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function aC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function oC(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function sC(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function cC(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_FRAMESET)}function lC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML)}function uC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ox.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,B.HTML)}function dC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fC(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),n||(e.formElement=e.openElements.current))}function pC(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===H.LI&&r===H.LI||(n===H.DD||n===H.DT)&&(r===H.DD||r===H.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==H.ADDRESS&&r!==H.DIV&&r!==H.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML)}function mC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.tokenizer.state=kx.PLAINTEXT}function hC(e,t){e.openElements.hasInScope(H.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(H.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1}function gC(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(PS(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _C(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vC(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(H.NOBR)&&(PS(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bC(e,t){e.treeAdapter.getDocumentMode(e.document)!==wx.QUIRKS&&e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=G.IN_TABLE}function xC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function SC(e){let t=lx(e,Cx.TYPE);return t!=null&&t.toLowerCase()===`hidden`}function CC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),SC(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function wC(e,t){e._appendElement(t,B.HTML),t.ackSelfClosing=!0}function TC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function EC(e,t){t.tagName=V.IMG,t.tagID=H.IMG,xC(e,t)}function DC(e,t){e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kx.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=G.TEXT}function OC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kx.RAWTEXT)}function kC(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kx.RAWTEXT)}function AC(e,t){e._switchToTextParsing(t,kx.RAWTEXT)}function jC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===G.IN_TABLE||e.insertionMode===G.IN_CAPTION||e.insertionMode===G.IN_TABLE_BODY||e.insertionMode===G.IN_ROW||e.insertionMode===G.IN_CELL?G.IN_SELECT_IN_TABLE:G.IN_SELECT}function MC(e,t){e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function NC(e,t){e.openElements.hasInScope(H.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,B.HTML)}function PC(e,t){e.openElements.hasInScope(H.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(H.RTC),e._insertElement(t,B.HTML)}function FC(e,t){e._reconstructActiveFormattingElements(),_S(t),yS(t),t.selfClosing?e._appendElement(t,B.MATHML):e._insertElement(t,B.MATHML),t.ackSelfClosing=!0}function IC(e,t){e._reconstructActiveFormattingElements(),vS(t),yS(t),t.selfClosing?e._appendElement(t,B.SVG):e._insertElement(t,B.SVG),t.ackSelfClosing=!0}function LC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function RC(e,t){switch(t.tagID){case H.I:case H.S:case H.B:case H.U:case H.EM:case H.TT:case H.BIG:case H.CODE:case H.FONT:case H.SMALL:case H.STRIKE:case H.STRONG:_C(e,t);break;case H.A:gC(e,t);break;case H.H1:case H.H2:case H.H3:case H.H4:case H.H5:case H.H6:uC(e,t);break;case H.P:case H.DL:case H.OL:case H.UL:case H.DIV:case H.DIR:case H.NAV:case H.MAIN:case H.MENU:case H.ASIDE:case H.CENTER:case H.FIGURE:case H.FOOTER:case H.HEADER:case H.HGROUP:case H.DIALOG:case H.DETAILS:case H.ADDRESS:case H.ARTICLE:case H.SEARCH:case H.SECTION:case H.SUMMARY:case H.FIELDSET:case H.BLOCKQUOTE:case H.FIGCAPTION:lC(e,t);break;case H.LI:case H.DD:case H.DT:pC(e,t);break;case H.BR:case H.IMG:case H.WBR:case H.AREA:case H.EMBED:case H.KEYGEN:xC(e,t);break;case H.HR:TC(e,t);break;case H.RB:case H.RTC:NC(e,t);break;case H.RT:case H.RP:PC(e,t);break;case H.PRE:case H.LISTING:dC(e,t);break;case H.XMP:OC(e,t);break;case H.SVG:IC(e,t);break;case H.HTML:oC(e,t);break;case H.BASE:case H.LINK:case H.META:case H.STYLE:case H.TITLE:case H.SCRIPT:case H.BGSOUND:case H.BASEFONT:case H.TEMPLATE:qS(e,t);break;case H.BODY:sC(e,t);break;case H.FORM:fC(e,t);break;case H.NOBR:vC(e,t);break;case H.MATH:FC(e,t);break;case H.TABLE:bC(e,t);break;case H.INPUT:CC(e,t);break;case H.PARAM:case H.TRACK:case H.SOURCE:wC(e,t);break;case H.IMAGE:EC(e,t);break;case H.BUTTON:hC(e,t);break;case H.APPLET:case H.OBJECT:case H.MARQUEE:yC(e,t);break;case H.IFRAME:kC(e,t);break;case H.SELECT:jC(e,t);break;case H.OPTION:case H.OPTGROUP:MC(e,t);break;case H.NOEMBED:case H.NOFRAMES:AC(e,t);break;case H.FRAMESET:cC(e,t);break;case H.TEXTAREA:DC(e,t);break;case H.NOSCRIPT:e.options.scriptingEnabled?AC(e,t):LC(e,t);break;case H.PLAINTEXT:mC(e,t);break;case H.COL:case H.TH:case H.TD:case H.TR:case H.HEAD:case H.FRAME:case H.TBODY:case H.TFOOT:case H.THEAD:case H.CAPTION:case H.COLGROUP:break;default:LC(e,t)}}function zC(e,t){if(e.openElements.hasInScope(H.BODY)&&(e.insertionMode=G.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function BC(e,t){e.openElements.hasInScope(H.BODY)&&(e.insertionMode=G.AFTER_BODY,Fw(e,t))}function VC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function HC(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(H.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(H.FORM):n&&e.openElements.remove(n))}function UC(e){e.openElements.hasInButtonScope(H.P)||e._insertFakeElement(V.P,H.P),e._closePElement()}function WC(e){e.openElements.hasInListItemScope(H.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(H.LI),e.openElements.popUntilTagNamePopped(H.LI))}function GC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function KC(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function qC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function JC(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,H.BR),e.openElements.pop(),e.framesetOk=!1}function YC(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==H.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function XC(e,t){switch(t.tagID){case H.A:case H.B:case H.I:case H.S:case H.U:case H.EM:case H.TT:case H.BIG:case H.CODE:case H.FONT:case H.NOBR:case H.SMALL:case H.STRIKE:case H.STRONG:PS(e,t);break;case H.P:UC(e);break;case H.DL:case H.UL:case H.OL:case H.DIR:case H.DIV:case H.NAV:case H.PRE:case H.MAIN:case H.MENU:case H.ASIDE:case H.BUTTON:case H.CENTER:case H.FIGURE:case H.FOOTER:case H.HEADER:case H.HGROUP:case H.DIALOG:case H.ADDRESS:case H.ARTICLE:case H.DETAILS:case H.SEARCH:case H.SECTION:case H.SUMMARY:case H.LISTING:case H.FIELDSET:case H.BLOCKQUOTE:case H.FIGCAPTION:VC(e,t);break;case H.LI:WC(e);break;case H.DD:case H.DT:GC(e,t);break;case H.H1:case H.H2:case H.H3:case H.H4:case H.H5:case H.H6:KC(e);break;case H.BR:JC(e);break;case H.BODY:zC(e,t);break;case H.HTML:BC(e,t);break;case H.FORM:HC(e);break;case H.APPLET:case H.OBJECT:case H.MARQUEE:qC(e,t);break;case H.TEMPLATE:YS(e,t);break;default:YC(e,t)}}function ZC(e,t){e.tmplInsertionModeStack.length>0?Nw(e,t):RS(e,t)}function QC(e,t){var n;t.tagID===H.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $C(e,t){e._err(t,z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ew(e,t){if(e.openElements.currentTagId!==void 0&&TS.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=G.IN_TABLE_TEXT,t.type){case cx.CHARACTER:pw(e,t);break;case cx.WHITESPACE_CHARACTER:fw(e,t);break}else dw(e,t)}function tw(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_CAPTION}function nw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_COLUMN_GROUP}function rw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,H.COLGROUP),e.insertionMode=G.IN_COLUMN_GROUP,vw(e,t)}function iw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_TABLE_BODY}function aw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,H.TBODY),e.insertionMode=G.IN_TABLE_BODY,xw(e,t)}function ow(e,t){e.openElements.hasInTableScope(H.TABLE)&&(e.openElements.popUntilTagNamePopped(H.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function sw(e,t){SC(t)?e._appendElement(t,B.HTML):dw(e,t),t.ackSelfClosing=!0}function cw(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,B.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function lw(e,t){switch(t.tagID){case H.TD:case H.TH:case H.TR:aw(e,t);break;case H.STYLE:case H.SCRIPT:case H.TEMPLATE:qS(e,t);break;case H.COL:rw(e,t);break;case H.FORM:cw(e,t);break;case H.TABLE:ow(e,t);break;case H.TBODY:case H.TFOOT:case H.THEAD:iw(e,t);break;case H.INPUT:sw(e,t);break;case H.CAPTION:tw(e,t);break;case H.COLGROUP:nw(e,t);break;default:dw(e,t)}}function uw(e,t){switch(t.tagID){case H.TABLE:e.openElements.hasInTableScope(H.TABLE)&&(e.openElements.popUntilTagNamePopped(H.TABLE),e._resetInsertionMode());break;case H.TEMPLATE:YS(e,t);break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:case H.TBODY:case H.TD:case H.TFOOT:case H.TH:case H.THEAD:case H.TR:break;default:dw(e,t)}}function dw(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,rC(e,t),e.fosterParentingEnabled=n}function fw(e,t){e.pendingCharacterTokens.push(t)}function pw(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function mw(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)dw(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hw=new Set([H.CAPTION,H.COL,H.COLGROUP,H.TBODY,H.TD,H.TFOOT,H.TH,H.THEAD,H.TR]);function gw(e,t){let n=t.tagID;hw.has(n)?e.openElements.hasInTableScope(H.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(H.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,lw(e,t)):RC(e,t)}function _w(e,t){let n=t.tagID;switch(n){case H.CAPTION:case H.TABLE:e.openElements.hasInTableScope(H.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(H.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,n===H.TABLE&&uw(e,t));break;case H.BODY:case H.COL:case H.COLGROUP:case H.HTML:case H.TBODY:case H.TD:case H.TFOOT:case H.TH:case H.THEAD:case H.TR:break;default:XC(e,t)}}function vw(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.COL:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.TEMPLATE:qS(e,t);break;default:bw(e,t)}}function yw(e,t){switch(t.tagID){case H.COLGROUP:e.openElements.currentTagId===H.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE);break;case H.TEMPLATE:YS(e,t);break;case H.COL:break;default:bw(e,t)}}function bw(e,t){e.openElements.currentTagId===H.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE,e._processToken(t))}function xw(e,t){switch(t.tagID){case H.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_ROW;break;case H.TH:case H.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,H.TR),e.insertionMode=G.IN_ROW,Cw(e,t);break;case H.CAPTION:case H.COL:case H.COLGROUP:case H.TBODY:case H.TFOOT:case H.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,lw(e,t));break;default:lw(e,t)}}function Sw(e,t){let n=t.tagID;switch(t.tagID){case H.TBODY:case H.TFOOT:case H.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE);break;case H.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,uw(e,t));break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:case H.TD:case H.TH:case H.TR:break;default:uw(e,t)}}function Cw(e,t){switch(t.tagID){case H.TH:case H.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_CELL,e.activeFormattingElements.insertMarker();break;case H.CAPTION:case H.COL:case H.COLGROUP:case H.TBODY:case H.TFOOT:case H.THEAD:case H.TR:e.openElements.hasInTableScope(H.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,xw(e,t));break;default:lw(e,t)}}function ww(e,t){switch(t.tagID){case H.TR:e.openElements.hasInTableScope(H.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY);break;case H.TABLE:e.openElements.hasInTableScope(H.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,Sw(e,t));break;case H.TBODY:case H.TFOOT:case H.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(H.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,Sw(e,t));break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:case H.TD:case H.TH:break;default:uw(e,t)}}function Tw(e,t){let n=t.tagID;hw.has(n)?(e.openElements.hasInTableScope(H.TD)||e.openElements.hasInTableScope(H.TH))&&(e._closeTableCell(),Cw(e,t)):RC(e,t)}function Ew(e,t){let n=t.tagID;switch(n){case H.TD:case H.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_ROW);break;case H.TABLE:case H.TBODY:case H.TFOOT:case H.THEAD:case H.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ww(e,t));break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:break;default:XC(e,t)}}function Dw(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.OPTION:e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case H.OPTGROUP:e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e.openElements.currentTagId===H.OPTGROUP&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case H.HR:e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e.openElements.currentTagId===H.OPTGROUP&&e.openElements.pop(),e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.INPUT:case H.KEYGEN:case H.TEXTAREA:case H.SELECT:e.openElements.hasInSelectScope(H.SELECT)&&(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode(),t.tagID!==H.SELECT&&e._processStartTag(t));break;case H.SCRIPT:case H.TEMPLATE:qS(e,t);break;default:}}function Ow(e,t){switch(t.tagID){case H.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===H.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===H.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===H.OPTGROUP&&e.openElements.pop();break;case H.OPTION:e.openElements.currentTagId===H.OPTION&&e.openElements.pop();break;case H.SELECT:e.openElements.hasInSelectScope(H.SELECT)&&(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode());break;case H.TEMPLATE:YS(e,t);break;default:}}function kw(e,t){let n=t.tagID;n===H.CAPTION||n===H.TABLE||n===H.TBODY||n===H.TFOOT||n===H.THEAD||n===H.TR||n===H.TD||n===H.TH?(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Dw(e,t)}function Aw(e,t){let n=t.tagID;n===H.CAPTION||n===H.TABLE||n===H.TBODY||n===H.TFOOT||n===H.THEAD||n===H.TR||n===H.TD||n===H.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ow(e,t)}function jw(e,t){switch(t.tagID){case H.BASE:case H.BASEFONT:case H.BGSOUND:case H.LINK:case H.META:case H.NOFRAMES:case H.SCRIPT:case H.STYLE:case H.TEMPLATE:case H.TITLE:qS(e,t);break;case H.CAPTION:case H.COLGROUP:case H.TBODY:case H.TFOOT:case H.THEAD:e.tmplInsertionModeStack[0]=G.IN_TABLE,e.insertionMode=G.IN_TABLE,lw(e,t);break;case H.COL:e.tmplInsertionModeStack[0]=G.IN_COLUMN_GROUP,e.insertionMode=G.IN_COLUMN_GROUP,vw(e,t);break;case H.TR:e.tmplInsertionModeStack[0]=G.IN_TABLE_BODY,e.insertionMode=G.IN_TABLE_BODY,xw(e,t);break;case H.TD:case H.TH:e.tmplInsertionModeStack[0]=G.IN_ROW,e.insertionMode=G.IN_ROW,Cw(e,t);break;default:e.tmplInsertionModeStack[0]=G.IN_BODY,e.insertionMode=G.IN_BODY,RC(e,t)}}function Mw(e,t){t.tagID===H.TEMPLATE&&YS(e,t)}function Nw(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(H.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):RS(e,t)}function Pw(e,t){t.tagID===H.HTML?RC(e,t):Iw(e,t)}function Fw(e,t){if(t.tagID===H.HTML){if(e.fragmentContext||(e.insertionMode=G.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===H.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Iw(e,t)}function Iw(e,t){e.insertionMode=G.IN_BODY,rC(e,t)}function Lw(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.FRAMESET:e._insertElement(t,B.HTML);break;case H.FRAME:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.NOFRAMES:qS(e,t);break;default:}}function Rw(e,t){t.tagID===H.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==H.FRAMESET&&(e.insertionMode=G.AFTER_FRAMESET))}function zw(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.NOFRAMES:qS(e,t);break;default:}}function Bw(e,t){t.tagID===H.HTML&&(e.insertionMode=G.AFTER_AFTER_FRAMESET)}function Vw(e,t){t.tagID===H.HTML?RC(e,t):Hw(e,t)}function Hw(e,t){e.insertionMode=G.IN_BODY,rC(e,t)}function Uw(e,t){switch(t.tagID){case H.HTML:RC(e,t);break;case H.NOFRAMES:qS(e,t);break;default:}}function Ww(e,t){t.chars=`�`,e._insertCharacters(t)}function Gw(e,t){e._insertCharacters(t),e.framesetOk=!1}function Kw(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==B.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function qw(e,t){if(gS(t))Kw(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===B.MATHML?_S(t):r===B.SVG&&(bS(t),vS(t)),yS(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Jw(e,t){if(t.tagID===H.P||t.tagID===H.BR){Kw(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===B.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR]);function Yw(e,t){return DS.parse(e,t)}function Xw(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=DS.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function Zw(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}const Qw=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var $w=class{constructor(e){let t;t=e?Zw(e)?{path:e}:typeof e==`string`||rT(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:pe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Qw.length;){let e=Qw[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Qw.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?oe.basename(this.path):void 0}set basename(e){tT(e,`basename`),eT(e,`basename`),this.path=oe.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?oe.dirname(this.path):void 0}set dirname(e){nT(this.basename,`dirname`),this.path=oe.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?oe.extname(this.path):void 0}set extname(e){if(eT(e,`extname`),nT(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=oe.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Zw(e)&&(e=me(e)),tT(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?oe.basename(this.path,this.extname):void 0}set stem(e){tT(e,`stem`),eT(e,`stem`),this.path=oe.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new k(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function eT(e,t){if(e&&e.includes(oe.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+oe.sep+"`")}function tT(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nT(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function rT(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}const iT={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},aT=/-[a-z]/g,oT=/%c(?:([-+])(\d+))?/g,sT=/%x/g,cT={2:!0,1:!1,0:null},lT={};function uT(e,t){let n=t||lT,r=n.onerror,i=e instanceof $w?e:new $w(e),a=n.fragment?Xw:Yw,o=String(i);return Kb(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=dT(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=iT[a],o=new k(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=cT[c],o.note=l(n.description),o.url=n.url===!1?void 0:`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`+t,r(o)}function l(t){return t.replace(oT,n).replace(sT,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return pT(o.charAt(e.startOffset+i))}function r(){return mT(o.charCodeAt(e.startOffset))}}}}function dT(e){return e.replace(aT,fT)}function fT(e){return e.charAt(1).toUpperCase()}function pT(e){return e==="`"?"` ` `":e}function mT(e){return`0x`+e.toString(16).toUpperCase()}const hT=(function(e,t,n,r,i){let a=gT(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!hT(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return ST(e)?a.call(i,e,n,r):!1}),gT=(function(e){if(e==null)return xT;if(typeof e==`function`)return bT(e);if(typeof e==`object`)return Array.isArray(e)?_T(e):vT(e);if(typeof e==`string`)return yT(e);throw Error(`Expected function, string, or object as test`)});function _T(e){let t=[],n=-1;for(;++n<e.length;)t[n]=gT(e[n]);return bT(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function vT(e){let t=e;return bT(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function yT(e){return bT(t);function t(t){return t&&t.type===e}}function bT(e){return t;function t(t,n,r){return!!(ST(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function xT(){return!0}function ST(e){return typeof e==`object`&&!!e&&`type`in e}function CT(e){return`\x1B[33m`+e+`\x1B[39m`}const wT=[],TT=`skip`;function ET(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=gT(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+CT(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=wT,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=DT(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function DT(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?wT:[e]}function OT(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ET(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}const kT={};function AT(e,t){let n=t||kT;return jT(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function jT(e,t,n){if(NT(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return MT(e.children,t,n)}return Array.isArray(e)?MT(e,t,n):``}function MT(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=jT(e[i],t,n);return r.join(``)}function NT(e){return!!(e&&typeof e==`object`)}const PT=gT([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function FT(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const IT=GT(/[A-Za-z]/),LT=GT(/[\dA-Za-z]/),RT=GT(/[#-'*+\--9=?A-Z^-~]/);function zT(e){return e!==null&&(e<32||e===127)}const BT=GT(/\d/),VT=GT(/[\dA-Fa-f]/),HT=GT(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const UT=GT(/\p{P}|\p{S}/u),WT=GT(/\s/);function GT(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function KT(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function qT(e,t,n){let r=gT((n||{}).ignore||[]),i=JT(t),a=-1;for(;++a<i.length;)ET(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function JT(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([YT(e[0]),XT(e[1])])}return t}function YT(e){return typeof e==`string`?new RegExp(KT(e),`g`):e}function XT(e){return typeof e==`function`?e:function(){return e}}const ZT=`phrasing`,QT=[`autolink`,`link`,`image`,`label`];function $T(){return{transforms:[sE],enter:{literalAutolink:tE,literalAutolinkEmail:nE,literalAutolinkHttp:nE,literalAutolinkWww:nE},exit:{literalAutolink:oE,literalAutolinkEmail:aE,literalAutolinkHttp:rE,literalAutolinkWww:iE}}}function eE(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:ZT,notInConstruct:QT},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:ZT,notInConstruct:QT},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:ZT,notInConstruct:QT}]}}function tE(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function nE(e){this.config.enter.autolinkProtocol.call(this,e)}function rE(e){this.config.exit.autolinkProtocol.call(this,e)}function iE(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function aE(e){this.config.exit.autolinkEmail.call(this,e)}function oE(e){this.exit(e)}function sE(e){qT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cE],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,lE]],{ignore:[`link`,`linkReference`]})}function cE(e,t,n,r,i){let a=``;if(!fE(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!uE(n)))return!1;let o=dE(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function lE(e,t,n,r){return!fE(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function uE(e){let 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 dE(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=FT(e,`(`),a=FT(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function fE(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||WT(n)||UT(n))&&(!t||n!==47)}function pE(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}CE.peek=SE;function mE(){this.buffer()}function hE(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function gE(){this.buffer()}function _E(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function vE(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yE(e){this.exit(e)}function bE(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xE(e){this.exit(e)}function SE(){return`[`}function CE(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function wE(){return{enter:{gfmFootnoteCallString:mE,gfmFootnoteCall:hE,gfmFootnoteDefinitionLabelString:gE,gfmFootnoteDefinition:_E},exit:{gfmFootnoteCallString:vE,gfmFootnoteCall:yE,gfmFootnoteDefinitionLabelString:bE,gfmFootnoteDefinition:xE}}}function TE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:CE},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
142
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?DE:EE))),s(),o}}function EE(e,t,n){return t===0?e:DE(e,t,n)}function DE(e,t,n){return(n?``:` `)+e}const OE=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];NE.peek=PE;function kE(){return{canContainEols:[`delete`],enter:{strikethrough:jE},exit:{strikethrough:ME}}}function AE(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:OE}],handlers:{delete:NE}}}function jE(e){this.enter({type:`delete`,children:[]},e)}function ME(e){this.exit(e)}function NE(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function PE(){return`~`}function FE(e){return e.length}function IE(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||FE,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=LE(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=RE(r[d]);else{let e=RE(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
143
- `)}function LE(e){return e==null?``:String(e)}function RE(e){let 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}const zE={}.hasOwnProperty;function BE(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&zE.call(t,e)){let n=String(t[e]);i=zE.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const VE={}.hasOwnProperty;function HE(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)HE(e,t.extensions[n]);for(r in t)if(VE.call(t,r))switch(r){case`extensions`:break;case`unsafe`:UE(e[r],t[r]);break;case`join`:UE(e[r],t[r]);break;case`handlers`:WE(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function UE(e,t){t&&e.push(...t)}function WE(e,t){t&&Object.assign(e,t)}function GE(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),KE);return i(),o}function KE(e,t,n){return`>`+(n?``:` `)+e}function qE(e,t){return JE(e,t.inConstruct,!0)&&!JE(e,t.notInConstruct,!1)}function JE(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function YE(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
144
- `&&qE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
145
- `}function XE(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ZE(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 QE(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function $E(e,t,n,r){let i=QE(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ZE(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,eD);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(XE(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
139
+ `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=np(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=np(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Af.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(Hg.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Ug.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(e_.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(l_.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(d_.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(f_.configure(this.options.taskList)),e}});var p_=`&nbsp;`,m_=`\xA0`,h_=ap.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,dd(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===p_||n[0].text===p_||n[0].raw===m_||n[0].text===m_)&&r.length===1&&r[0].type===`text`&&(r[0].text===p_||r[0].text===m_)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?p_:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),g_=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,__=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,v_=xf.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,dd(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Hf({find:g_,type:this.type})]},addPasteRules(){return[op({find:__,type:this.type})]}}),y_=v_,b_=ap.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),x_=xf.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,dd(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function S_(e={}){return new oi({view(t){return new C_(t,e)}})}var C_=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(!t||i)return null;let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=Dr(this.editorView.state.doc,a,this.editorView.dragging.slice);e!=null&&(a=e)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);t!=null&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},w_=class e extends M{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):M.near(r)}content(){return j.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new T_(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!D_(e)||!O_(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!P.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};w_.prototype.visible=!1,w_.findFrom=w_.findGapCursorFrom,M.jsonID(`gapcursor`,w_);var T_=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return w_.valid(t)?new w_(t):M.near(t)}};function E_(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function D_(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||E_(e.type))return!0;if(e.inlineContent)return!1}}return!0}function O_(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||E_(e.type))return!0;if(e.inlineContent)return!1}}return!0}function k_(){return new oi({props:{decorations:P_,createSelectionBetween(e,t,n){return t.pos==n.pos&&w_.valid(n)?new w_(n):null},handleClick:M_,handleKeyDown:A_,handleDOMEvents:{beforeinput:N_}}})}const A_=Pl({ArrowLeft:j_(`horiz`,-1),ArrowRight:j_(`horiz`,1),ArrowUp:j_(`vert`,-1),ArrowDown:j_(`vert`,1)});function j_(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof N){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=w_.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new w_(c))),!0):!1}}function M_(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!w_.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&P.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new w_(r))),!0)}function N_(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof w_))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=A.empty;for(let e=r.length-1;e>=0;e--)i=A.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new j(i,0,0));return a.setSelection(N.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function P_(e){if(!(e.selection instanceof w_))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,Nc.create(e.doc,[Ac.widget(e.selection.head,t,{key:`gapcursor`})])}var F_=200,I_=function(){};I_.prototype.append=function(e){return e.length?(e=I_.from(e),!this.length&&e||e.length<F_&&this.leafAppend(e)||this.length<F_&&e.leafPrepend(this)||this.appendInner(e)):this},I_.prototype.prepend=function(e){return e.length?I_.from(e).append(this):this},I_.prototype.appendInner=function(e){return new R_(this,e)},I_.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?I_.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},I_.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},I_.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},I_.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},I_.from=function(e){return e instanceof I_?e:e&&e.length?new L_(e):I_.empty};var L_=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=F_)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=F_)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(I_);I_.empty=new L_([]);var R_=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(I_),z_=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new V_(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new V_(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new V_(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>U_&&(s=B_(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Gn;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new V_(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new V_(i,o,l))}else r.push(new V_(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new V_(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new V_(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(I_.from(i.reverse()),a)}};z_.empty=new z_(I_.empty,0);function B_(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var V_=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},H_=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}};const U_=20;function W_(e,t,n,r){let i=n.getMeta(Q_),a;if(i)return i.historyState;n.getMeta($_)&&(e=new H_(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(Q_))return o.getMeta(Q_).redo?new H_(e.done.addTransform(n,void 0,r,Z_(t)),e.undone,K_(n.mapping.maps),e.prevTime,e.prevComposition):new H_(e.done,e.undone.addTransform(n,void 0,r,Z_(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!G_(n,e.prevRanges)),s=o?q_(e.prevRanges,n.mapping):K_(n.mapping.maps);return new H_(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Z_(t)),z_.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new H_(e.done.rebased(n,a),e.undone.rebased(n,a),q_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new H_(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),q_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function G_(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function K_(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function q_(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function J_(e,t,n){let r=Z_(t),i=Q_.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new H_(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(Q_,{redo:n,historyState:c})}let Y_=!1,X_=null;function Z_(e){let t=e.plugins;if(X_!=t){Y_=!1,X_=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){Y_=!0;break}}return Y_}const Q_=new li(`history`),$_=new li(`closeHistory`);function ev(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new oi({key:Q_,state:{init(){return new H_(z_.empty,z_.empty,null,0,-1)},apply(t,n,r){return W_(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?nv:n==`historyRedo`?rv:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function tv(e,t){return(n,r)=>{let i=Q_.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=J_(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}const nv=tv(!1,!0),rv=tv(!0,!0);Af.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new oi({key:new li(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var iv=Af.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[S_(this.options)]}});Af.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new oi({key:new li(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return Nc.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(Ac.node(t,t+e.nodeSize,{class:this.options.className}))}),Nc.create(e,a)}}})]}});var av=Af.create({name:`gapCursor`,addProseMirrorPlugins(){return[k_()]},extendNodeSchema(e){return{allowGapCursor:ad(F(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),ov=`placeholder`;function sv(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}Af.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:ov,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${sv(this.options.dataAttribute)}`:`data-${ov}`;return[new oi({key:new li(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&zd(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=Ac.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),Nc.create(t,a)}}})]}}),Af.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new oi({key:new li(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Bd(n.selection)||e.view.dragging?null:Nc.create(n.doc,[Ac.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function cv({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var lv=Af.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new li(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new oi({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!cv({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!cv({node:r,types:n})}}})]}}),uv=Af.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>nv(e,t),redo:()=>({state:e,dispatch:t})=>rv(e,t)}},addProseMirrorPlugins(){return[ev(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),dv=Af.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(_p.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(Og.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(Hg.configure(this.options.bulletList)),this.options.code!==!1&&e.push(Mg.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(up.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Pg.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(iv.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(av.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Np.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Fp.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(uv.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Fg.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(Cp.configure(this.options.italic)),this.options.listItem!==!1&&e.push(Ug.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(e_.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(em.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(l_.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(h_.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(v_.configure(this.options.strike)),this.options.text!==!1&&e.push(b_.configure(this.options.text)),this.options.underline!==!1&&e.push(x_.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(lv.configure(this.options?.trailingNode)),e}});const fv=kg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),pv=Ng.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),mv=ap.create({name:`commentBlock`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}},sourceLayout:{default:`block`,parseHTML:e=>e.getAttribute(`data-source-layout`)===`inline`?`inline`:`block`,renderHTML:e=>e.sourceLayout===`inline`?{"data-source-layout":`inline`}:{}}}},parseHTML(){return[{tag:`aside[data-comment-block]`},{tag:`aside.comment-block`}]},renderHTML({HTMLAttributes:e}){return[`aside`,{"data-comment-block":``,"data-clipboard-omit":`true`,class:`comment-block`,style:`display: none;`,...e},0]},addCommands(){return{setCommentBlock:()=>({commands:e})=>e.wrapIn(this.name),toggleCommentBlock:()=>({commands:e})=>e.toggleWrap(this.name),unsetCommentBlock:()=>({commands:e})=>e.lift(this.name)}}}),hv=xf.create({name:`comment`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}}}},parseHTML(){return[{tag:`span[data-comment-mark]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-comment-mark":``,"data-clipboard-omit":`true`,class:`comment-mark`,style:`display: none;`,...e},0]},addCommands(){return{setComment:()=>({commands:e})=>e.setMark(this.name),toggleComment:()=>({commands:e})=>e.toggleMark(this.name),unsetComment:()=>({commands:e})=>e.unsetMark(this.name)}}}),gv=Af.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}}),_v=ap.create({name:`imageReference`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{alt:{default:``},label:{default:``},identifier:{default:``},referenceType:{default:`shortcut`}}},parseHTML(){return[{tag:`img[data-image-reference]`}]},renderHTML({node:e}){let{alt:t,label:n,referenceType:r}=e.attrs;return[`img`,{"data-image-reference":``,"data-reference-type":r,"data-label":n,alt:t||n}]}});function vv(e){for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return t;return null}function yv(e){let t=!1;return e.descendants(e=>t?!1:(e.type.name===`list`&&(t=!0),!t)),t}function bv(e){let{selection:t}=e;return t instanceof N?t.$cursor:null}function xv(e){let t=bv(e);if(!t||t.parentOffset!==0)return!1;let n=vv(t);if(n===null||t.depth!==n+1||t.index(n)!==0)return!1;let r=t.index(n-1);return r===0?!1:yv(t.node(n-1).child(r-1))}function Sv(e,t){for(let n=t-1;n>=0;n--){let t=e.node(n),r=e.index(n);if(r<t.childCount-1){let e=t.child(r+1),i=n+1;for(;e.type.name===`list`&&e.firstChild;)e=e.firstChild,i+=1;return e.type.name===`listItem`?i:null}}return null}function Cv(e){let t=bv(e);if(!t||t.parentOffset!==t.parent.content.size)return!1;let n=vv(t);if(n===null)return!1;for(let e=t.depth;e>n;e--)if(t.index(e-1)!==t.node(e-1).childCount-1)return!1;let r=Sv(t,n);return r!==null&&r<n}const wv=Af.create({name:`listBoundaryMerge`,addKeyboardShortcuts(){let e=()=>{let{editor:e}=this;if(!xv(e.state))return!1;if(e.commands.undoInputRule())return!0;let{state:t,view:n}=e;return pi(t,n.dispatch,n)},t=()=>{let{editor:e}=this;if(!Cv(e.state))return!1;let{state:t,view:n}=e;return mi(t,n.dispatch,n)};return{Backspace:e,"Mod-Backspace":e,Delete:t,"Mod-Delete":t}}}),Tv=new Map([[32,` `],[9,` `],[160,`\xA0`]]);function Ev(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r=n[0]===`x`||n[0]===`X`,i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function Dv(e){let t=Ev(e);return t!==null&&Tv.has(t)}function Ov(e){let t=Ev(e);return t===null?null:Tv.get(t)??null}const kv=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Av(e){kv.lastIndex=0;let t=e.match(kv);if(t===null||t.join(``)!==e)return null;let n=``;for(let e of t){let t=Ov(e);if(t===null)return null;n+=t}return n}const jv=xf.create({name:`sourceLiteral`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-source-literal]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-source-literal":``,...e},0]}});function Mv(e,t){if(typeof e!=`string`||typeof t!=`string`||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll(`\xA0`,` `),r=t.replaceAll(`\xA0`,` `);return n===r||Nv(n)===r?!0:Av(e)===t}function Nv(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}const Pv=y_.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),Fv=Eg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),Iv=dg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),Lv=fg.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),Rv=ap.create({name:`tag`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e==`string`?!1:{value:e.getAttribute(`data-tag`)||``}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??``);return[`a`,{...t,"data-tag":n,href:`#tag/${n}`,class:`tag`},`#${n}`]},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:`tag`,attrs:{value:e}}).run()}}}),zv=/^(?:---|—-|___\s|\*\*\*\s)$/;function Bv(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}const Vv=Ig.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[Uf({find:zv,type:this.type,getAttributes:e=>({sourceRaw:Bv(e)})})]}});function Hv(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function Uv(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const Wv=ap.create({name:`wikiLink`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e==`string`?!1:{target:e.getAttribute(`data-target`)||``,alias:Hv(e.getAttribute(`data-alias`)),anchor:Hv(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:Hv(e.getAttribute(`data-alias`)),anchor:Hv(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=Hv(e.attrs.alias),i=Hv(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},Uv({target:n,alias:r,anchor:i})]}});function Gv(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function Kv(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const qv=[Hp,vm,Up,_m,Wv,ap.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}},parseHTML(){let e=e=>typeof e==`string`||!e.hasAttribute(`data-wiki-embed`)?!1:{target:e.getAttribute(`data-target`)||``,alias:Hv(e.getAttribute(`data-alias`)),anchor:Hv(e.getAttribute(`data-anchor`))};return[{tag:`img[data-wiki-embed]`,getAttrs:e,priority:100},{tag:`a[data-wiki-embed]`,getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=Hv(e.attrs.alias),i=Hv(e.attrs.anchor),a=Hv(e.attrs.resolvedSrc),o=Gv(n);if(s.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let c=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${c}#${i}`:c,target:`_blank`,rel:`noopener noreferrer`},Kv({target:n,alias:r,anchor:i})]}}),Rv,hm,gm,wp,Tp,Pv,pv,dp,fv,Ip,Vv,sm,Lp,cm,Pp,Ep,gv,jv,dv.configure({undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,listKeymap:{listTypes:[{itemName:`listItem`,wrapperNames:[`list`]}]},italic:!1,bold:!1,strike:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:`color-mix(in oklch, var(--primary) 50%, transparent)`,width:2}}),wv,Fv.configure({resizable:!0}),pg,Lv,Iv,Vp.configure({inline:!0}),_v,xm,hv,mv,Op,Dp];function Jv(e,t){switch(e){case`darwin`:return[`/opt/homebrew/bin`,`/usr/local/bin`,`/opt/local/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`];case`win32`:return[];default:return[`/usr/local/bin`,`/home/linuxbrew/.linuxbrew/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`]}}function Yv(e,t){let n=t.delimiter,r=(e??``).split(n).filter(e=>e.length>0),i=new Set(r),a=Jv(t.platform,t.homeDir).filter(e=>!i.has(e)&&t.isDir(e));return[...r,...a].join(n)}function Xv(e){return`'${e.replace(/'/g,`'\\''`)}'`}`${ft}`,[`delete`,`move`,`share_link`,`install`].map(e=>`mcp__${ft}__${e}`),`${Xv(`mcp_servers.${ft}.default_tools_approval_mode="approve"`)}`,3072-Zv("This is an OpenKnowledge project: load the `open-knowledge` skill and use the OpenKnowledge MCP tools for all markdown — don't probe for `.ok/` or use native file tools on `.md` / `.mdx`. ",`cursor`),new TextEncoder;function Zv(e,t){let n=encodeURIComponent(e);return t===`cursor`?encodeURIComponent(n).length:n.length}function Qv(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}const $v=new Set([`opencode.json`]);function ey(e){return e.split(`/`).some(e=>e.startsWith(`.`))?!0:$v.has(e.slice(e.lastIndexOf(`/`)+1))}function ty(e,t){let n=Qv(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const ny=T().superRefine(ty).optional(),ry=T().superRefine(ty),iy={agentId:T().optional(),agentName:T().optional(),colorSeed:T().optional(),clientName:T().optional(),clientVersion:T().optional(),label:T().optional()},ay=T().optional(),oy=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,sy=d(`kind`,[g({kind:E(`doc`),docPath:T().min(1)}).loose(),g({kind:E(`folder`),folderPath:T()}).loose()]),cy=c([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),ly=c([`current`,`stale`,`absent`]),uy=d(`ok`,[g({ok:E(!0),shareUrl:T().min(1),sharedUrl:T().min(1),branch:T().min(1),freshness:ly.optional().catch(void 0)}).loose(),g({ok:E(!1),error:cy,branch:T().min(1).optional()}).loose()]),dy=c([`user`,`org`]),fy=g({login:T().min(1),kind:dy,avatarUrl:T().optional()}).loose(),py=c([`auth-required`,`network`]),my=d(`ok`,[g({ok:E(!0),owners:m(fy)}).loose(),g({ok:E(!1),error:py}).loose()]),hy=d(`ok`,[g({ok:E(!0),available:p()}).loose(),g({ok:E(!1),error:py}).loose()]),gy=c([`public`,`private`]),_y=g({owner:T().min(1),name:T().min(1),visibility:gy,description:T().optional()}).loose(),vy=c([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),yy=d(`ok`,[g({ok:E(!0),ownerLogin:T().min(1),repoName:T().min(1),cloneUrl:T().min(1),defaultBranch:T().min(1)}).loose(),g({ok:E(!1),error:vy}).loose()]);function by(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const xy=e=>e.refine(by,`invalid branch name`);function Sy(e){if(e==null)return!1;let t=e instanceof Error?e.message:String(e);return/couldn'?t find remote ref|Remote branch .+ not found/i.test(t)}const Cy=[/could not read (username|password)/i,/terminal prompts disabled/i],wy=[/insufficient scopes/i,/missing.*scope/i,/required scope/i],Ty=[/permission denied.*\(publickey\)/i,/host key verification failed/i],Ey=[/\b(401|403)\b/,/authentication failed/i,/authorization failed/i,/invalid credentials/i,/credential helper/i,/bad credentials/i,/token.*expired/i,/expired.*token/i,/fatal:.*repository.*not found/i];function Dy(e){if(typeof e!=`object`||!e)return``;let t=e.git;return t==null?``:String(t)}function Oy(e){if(e==null)return{kind:`non-auth`};let t=`${e instanceof Error?e.message:String(e)}\n${Dy(e)}`;return Cy.some(e=>e.test(t))?{kind:`auth`,subclass:`no-credential`}:wy.some(e=>e.test(t))?{kind:`auth`,subclass:`scope-mismatch`}:Ty.some(e=>e.test(t))?{kind:`auth`,subclass:`ssh-auth`}:Ey.some(e=>e.test(t))?/\b401\b/.test(t)||/token.*expired/i.test(t)?{kind:`auth`,subclass:`401`}:/\b403\b/.test(t)?{kind:`auth`,subclass:`403`}:{kind:`auth`,subclass:`unknown-auth`}:{kind:`non-auth`}}function ky(e){return e.kind===`auth`?e.subclass===`no-credential`||e.subclass===`401`||e.subclass===`unknown-auth`:!1}const Ay={shareTargetExists:p(),dirtyConflicts:g({conflicts:p(),files:m(T().min(1))}).loose(),branchIsLocal:p(),shareTargetOnOriginBranch:p().optional()},jy=d(`detached`,[g({detached:E(!1),currentBranch:T().min(1).nullable(),currentHeadSha:D(),...Ay}).loose(),g({detached:E(!0),currentBranch:D(),currentHeadSha:T().min(1),...Ay}).loose()]),My=g({branch:xy(T().min(1)),principalId:T().optional(),fastForward:p().optional()}).loose(),Ny=c([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]),Py=d(`ok`,[g({ok:E(!0)}).loose(),g({ok:E(!1),reason:Ny,files:m(T().min(1)).optional(),otherWorktreePath:T().min(1).optional()}).loose()]);c([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]);const Fy=g({branch:xy(T().min(1)),path:T(),kind:c([`doc`,`folder`])}).loose(),Iy=d(`verdict`,[g({verdict:E(`on-origin`)}).loose(),g({verdict:E(`renamed`),renamedTo:T().min(1)}).loose(),g({verdict:E(`deleted`)}).loose(),g({verdict:E(`never-on-branch`)}).loose(),g({verdict:E(`changed-locally`)}).loose(),g({verdict:E(`unknown`)}).loose()]).catch({verdict:`unknown`}),Ly=g({startedAt:T().min(1),httpListenMs:S().nonnegative().optional(),seedWalkMs:S().nonnegative().optional(),indexesMs:S().nonnegative().optional(),readyMs:S().nonnegative().optional(),fileCount:S().nonnegative().optional()}),Ry=g({serverInstanceId:T().min(1),currentBranch:T().min(1).optional(),currentDiskAckSVs:v(T().min(1),T().min(1)).optional(),boot:Ly.optional()}).loose(),zy=g({id:T().min(1),display_name:T().min(1),display_email:T(),source:c([`git-config`,`synthesized`]),created_at:T().min(1)}).loose(),By=g({collabUrl:T().nullable(),previewUrl:T().nullable(),port:S(),singleFile:p().default(!1)}).loose(),Vy=c(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:no-conflict-tracked.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable`.split(`.`));function Hy(e){throw Error(`Unexpected ProblemType variant: ${JSON.stringify(e)}`)}const Uy=g({type:Vy,title:T().min(1),status:S().int().min(400).max(599),instance:T().regex(oy,`instance must be urn:uuid:<uuid>`).optional(),detail:T().optional()}).loose(),Wy=g({parentDocName:T().min(1),placement:c([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:T().min(1).optional(),agentName:T().min(1).optional()}).loose(),Gy=g({src:T().min(1),path:T().min(1).optional(),deduped:p().optional()}).loose(),Ky=g({url:T().min(1),dir:T().min(1),branch:T().min(1).refine(by,`invalid branch name`).optional()}).loose(),qy=g({type:E(`error`),problem:Uy}).loose();var Jy=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Jy.prototype.normal={},Jy.prototype.property={},Jy.prototype.space=void 0;function Yy(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Jy(n,r,t)}function Xy(e){return e.toLowerCase()}var Zy=class{constructor(e,t){this.attribute=t,this.property=e}};Zy.prototype.attribute=``,Zy.prototype.booleanish=!1,Zy.prototype.boolean=!1,Zy.prototype.commaOrSpaceSeparated=!1,Zy.prototype.commaSeparated=!1,Zy.prototype.defined=!1,Zy.prototype.mustUseProperty=!1,Zy.prototype.number=!1,Zy.prototype.overloadedBoolean=!1,Zy.prototype.property=``,Zy.prototype.spaceSeparated=!1,Zy.prototype.space=void 0;var Qy=n({boolean:()=>I,booleanish:()=>eb,commaOrSpaceSeparated:()=>ib,commaSeparated:()=>rb,number:()=>L,overloadedBoolean:()=>tb,spaceSeparated:()=>nb});let $y=0;const I=ab(),eb=ab(),tb=ab(),L=ab(),nb=ab(),rb=ab(),ib=ab();function ab(){return 2**++$y}const ob=Object.keys(Qy);var sb=class extends Zy{constructor(e,t,n,r){let i=-1;if(super(e,t),cb(this,`space`,r),typeof n==`number`)for(;++i<ob.length;){let e=ob[i];cb(this,ob[i],(n&Qy[e])===Qy[e])}}};sb.prototype.defined=!0;function cb(e,t,n){n&&(e[t]=n)}function lb(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new sb(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Xy(r)]=r,n[Xy(a.attribute)]=r}return new Jy(t,n,e.space)}const ub=lb({properties:{ariaActiveDescendant:null,ariaAtomic:eb,ariaAutoComplete:null,ariaBusy:eb,ariaChecked:eb,ariaColCount:L,ariaColIndex:L,ariaColSpan:L,ariaControls:nb,ariaCurrent:null,ariaDescribedBy:nb,ariaDetails:null,ariaDisabled:eb,ariaDropEffect:nb,ariaErrorMessage:null,ariaExpanded:eb,ariaFlowTo:nb,ariaGrabbed:eb,ariaHasPopup:null,ariaHidden:eb,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nb,ariaLevel:L,ariaLive:null,ariaModal:eb,ariaMultiLine:eb,ariaMultiSelectable:eb,ariaOrientation:null,ariaOwns:nb,ariaPlaceholder:null,ariaPosInSet:L,ariaPressed:eb,ariaReadOnly:eb,ariaRelevant:null,ariaRequired:eb,ariaRoleDescription:nb,ariaRowCount:L,ariaRowIndex:L,ariaRowSpan:L,ariaSelected:eb,ariaSetSize:L,ariaSort:null,ariaValueMax:L,ariaValueMin:L,ariaValueNow:L,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function db(e,t){return t in e?e[t]:t}function fb(e,t){return db(e,t.toLowerCase())}const pb=lb({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:rb,acceptCharset:nb,accessKey:nb,action:null,allow:null,allowFullScreen:I,allowPaymentRequest:I,allowUserMedia:I,alpha:I,alt:null,as:null,async:I,autoCapitalize:null,autoComplete:nb,autoFocus:I,autoPlay:I,blocking:nb,capture:null,charSet:null,checked:I,cite:null,className:nb,closedBy:null,colorSpace:null,cols:L,colSpan:L,command:null,commandFor:null,content:null,contentEditable:eb,controls:I,controlsList:nb,coords:L|rb,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I,defer:I,dir:null,dirName:null,disabled:I,download:tb,draggable:eb,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I,formTarget:null,headers:nb,height:L,hidden:tb,high:L,href:null,hrefLang:null,htmlFor:nb,httpEquiv:nb,id:null,imageSizes:null,imageSrcSet:null,inert:I,inputMode:null,integrity:null,is:null,isMap:I,itemId:null,itemProp:nb,itemRef:nb,itemScope:I,itemType:nb,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I,low:L,manifest:null,max:null,maxLength:L,media:null,method:null,min:null,minLength:L,multiple:I,muted:I,name:null,nonce:null,noModule:I,noValidate:I,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:I,optimum:L,pattern:null,ping:nb,placeholder:null,playsInline:I,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I,referrerPolicy:null,rel:nb,required:I,reversed:I,rows:L,rowSpan:L,sandbox:nb,scope:null,scoped:I,seamless:I,selected:I,shadowRootClonable:I,shadowRootCustomElementRegistry:I,shadowRootDelegatesFocus:I,shadowRootMode:null,shadowRootSerializable:I,shape:null,size:L,sizes:null,slot:null,span:L,spellCheck:eb,src:null,srcDoc:null,srcLang:null,srcSet:null,start:L,step:null,style:null,tabIndex:L,target:null,title:null,translate:null,type:null,typeMustMatch:I,useMap:null,value:eb,width:L,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nb,axis:null,background:null,bgColor:null,border:L,borderColor:null,bottomMargin:L,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I,declare:I,event:null,face:null,frame:null,frameBorder:null,hSpace:L,leftMargin:L,link:null,longDesc:null,lowSrc:null,marginHeight:L,marginWidth:L,noResize:I,noHref:I,noShade:I,noWrap:I,object:null,profile:null,prompt:null,rev:null,rightMargin:L,rules:null,scheme:null,scrolling:eb,standby:null,summary:null,text:null,topMargin:L,valueType:null,version:null,vAlign:null,vLink:null,vSpace:L,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:I,disablePictureInPicture:I,disableRemotePlayback:I,exportParts:rb,part:nb,prefix:null,property:null,results:L,security:null,unselectable:null},space:`html`,transform:fb}),mb=lb({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`,maskType:`mask-type`,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:ib,accentHeight:L,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:L,amplitude:L,arabicForm:null,ascent:L,attributeName:null,attributeType:null,azimuth:L,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:L,by:null,calcMode:null,capHeight:L,className:nb,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:L,diffuseConstant:L,direction:null,display:null,dur:null,divisor:L,dominantBaseline:null,download:I,dx:null,dy:null,edgeMode:null,editable:null,elevation:L,enableBackground:null,end:null,event:null,exponent:L,externalResourcesRequired:null,fill:null,fillOpacity:L,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:rb,g2:rb,glyphName:rb,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:L,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:L,horizOriginX:L,horizOriginY:L,id:null,ideographic:L,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:L,k:L,k1:L,k2:L,k3:L,k4:L,kernelMatrix:ib,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:L,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:L,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:L,overlineThickness:L,paintOrder:null,panose1:null,path:null,pathLength:L,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nb,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:L,pointsAtY:L,pointsAtZ:L,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ib,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ib,rev:ib,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ib,requiredFeatures:ib,requiredFonts:ib,requiredFormats:ib,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:L,specularExponent:L,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:L,strikethroughThickness:L,string:null,stroke:null,strokeDashArray:ib,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:L,strokeOpacity:L,strokeWidth:null,style:null,surfaceScale:L,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ib,tabIndex:L,tableValues:null,target:null,targetX:L,targetY:L,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ib,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:L,underlineThickness:L,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:L,values:null,vAlphabetic:L,vMathematical:L,vectorEffect:null,vHanging:L,vIdeographic:L,version:null,vertAdvY:L,vertOriginX:L,vertOriginY:L,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:L,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:db}),hb=lb({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()}}),gb=lb({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:fb}),_b=lb({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),vb=/[A-Z]/g,yb=/-[a-z]/g,bb=/^data[-\w.:]+$/i;function xb(e,t){let n=Xy(t),r=t,i=Zy;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&bb.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(yb,Cb);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!yb.test(e)){let n=e.replace(vb,Sb);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=sb}return new i(r,t)}function Sb(e){return`-`+e.toLowerCase()}function Cb(e){return e.charAt(1).toUpperCase()}const wb=Yy([ub,pb,hb,gb,_b],`html`),Tb=Yy([ub,mb,hb,gb,_b],`svg`);function Eb(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}const Db=/[#.]/g;function Ob(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Db.lastIndex=i;let e=Db.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function kb(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ab(e,t,n){let r=n?Ib(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Ob(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,jb(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Mb(e,o.properties,t,n)}for(let e of a)Nb(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function jb(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Mb(e,t,n,r){let i=xb(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?kb(r):i.commaSeparated?Eb(r):i.commaOrSpaceSeparated?kb(Eb(r).join(` `)):Pb(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Fb(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Pb(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Nb(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(let n of t)Nb(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Nb(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Pb(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Xy(n)===Xy(t)))return!0}return n}function Fb(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Ib(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}const Lb=`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`.split(`.`),Rb=Ab(wb,`div`),zb=Ab(Tb,`g`,Lb);function Bb(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Vb(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Vb(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Vb(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
140
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Hb={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/`},Ub={}.hasOwnProperty,Wb=Object.prototype;function Gb(e,t){let n=t||{};return Kb({file:n.file||void 0,location:!1,schema:n.space===`svg`?Tb:wb,verbose:n.verbose||!1},e)}function Kb(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Yb(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:qb(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Bb(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},Yb(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Yb(e,r,n),n}default:return n=Jb(e,t),n}}function qb(e,t){let n=-1,r=[];for(;++n<t.length;){let i=Kb(e,t[n]);r.push(i)}return r}function Jb(e,t){let n=e.schema;e.schema=t.namespaceURI===Hb.svg?Tb:wb;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Ub.call(Wb,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?zb:Rb)(t.tagName,i,qb(e,t.childNodes));if(Yb(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Zb(r.startTag),o=r&&r.endTag&&Zb(r.endTag),s=Kb(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function Yb(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Xb(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Xb(e,t,n){let r=Zb(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Ub.call(n.attrs,i)&&(r[xb(e.schema,i).property]=Zb(n.attrs[i]));n.startTag;let a=Zb(n.startTag),o=n.endTag?Zb(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Zb(e){let t=Qb({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Qb({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Qb(e){return e.line&&e.column?e:void 0}const $b=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 R;(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`})(R||={});const ex={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function tx(e){return e>=55296&&e<=57343}function nx(e){return e>=56320&&e<=57343}function rx(e,t){return(e-55296)*1024+9216+t}function ix(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ax(e){return e>=64976&&e<=65007||$b.has(e)}var z;(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`})(z||={});var ox=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=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(nx(t))return this.pos++,this._addGap(),rx(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,R.EOF;return this._err(z.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 t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,R.EOF;let n=this.html.charCodeAt(t);return n===R.CARRIAGE_RETURN?R.LINE_FEED:n}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,R.EOF;let e=this.html.charCodeAt(this.pos);return e===R.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,R.LINE_FEED):e===R.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,tx(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===R.LINE_FEED||e===R.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ix(e)?this._err(z.controlCharacterInInputStream):ax(e)&&this._err(z.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},sx;(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`})(sx||={});function cx(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const lx=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肻\xA0ଷ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))),ux=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]]);String.fromCodePoint;function dx(e){return e>=55296&&e<=57343||e>1114111?65533:ux.get(e)??e}var fx;(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`})(fx||={});var px;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(px||={});function mx(e){return e>=fx.ZERO&&e<=fx.NINE}function hx(e){return e>=fx.UPPER_A&&e<=fx.UPPER_F||e>=fx.LOWER_A&&e<=fx.LOWER_F}function gx(e){return e>=fx.UPPER_A&&e<=fx.UPPER_Z||e>=fx.LOWER_A&&e<=fx.LOWER_Z||mx(e)}function _x(e){return e===fx.EQUALS||gx(e)}var vx;(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`})(vx||={});var yx;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(yx||={});var bx=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=vx.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yx.Strict}startEntity(e){this.decodeMode=e,this.state=vx.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case vx.EntityStart:return e.charCodeAt(t)===fx.NUM?(this.state=vx.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=vx.NamedEntity,this.stateNamedEntity(e,t));case vx.NumericStart:return this.stateNumericStart(e,t);case vx.NumericDecimal:return this.stateNumericDecimal(e,t);case vx.NumericHex:return this.stateNumericHex(e,t);case vx.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|32)===fx.LOWER_X?(this.state=vx.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=vx.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(mx(r)||hx(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(mx(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===fx.SEMI)this.consumed+=1;else if(this.decodeMode===yx.Strict)return 0;return this.emitCodePoint(dx(this.result),this.consumed),this.errors&&(e!==fx.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&px.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=xx(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===yx.Attribute&&(i===0||_x(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&px.VALUE_LENGTH)>>14,i!==0){if(a===fx.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yx.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&px.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~px.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case vx.NamedEntity:return this.result!==0&&(this.decodeMode!==yx.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case vx.NumericDecimal:return this.emitNumericEntity(0,2);case vx.NumericHex:return this.emitNumericEntity(0,3);case vx.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case vx.EntityStart:return 0}}};function xx(e,t,n,r){let i=(t&px.BRANCH_LENGTH)>>7,a=t&px.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var B;(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/`})(B||={});var Sx;(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`})(Sx||={});var Cx;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Cx||={});var V;(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`})(V||={});var H;(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`})(H||={});const wx=new Map([[V.A,H.A],[V.ADDRESS,H.ADDRESS],[V.ANNOTATION_XML,H.ANNOTATION_XML],[V.APPLET,H.APPLET],[V.AREA,H.AREA],[V.ARTICLE,H.ARTICLE],[V.ASIDE,H.ASIDE],[V.B,H.B],[V.BASE,H.BASE],[V.BASEFONT,H.BASEFONT],[V.BGSOUND,H.BGSOUND],[V.BIG,H.BIG],[V.BLOCKQUOTE,H.BLOCKQUOTE],[V.BODY,H.BODY],[V.BR,H.BR],[V.BUTTON,H.BUTTON],[V.CAPTION,H.CAPTION],[V.CENTER,H.CENTER],[V.CODE,H.CODE],[V.COL,H.COL],[V.COLGROUP,H.COLGROUP],[V.DD,H.DD],[V.DESC,H.DESC],[V.DETAILS,H.DETAILS],[V.DIALOG,H.DIALOG],[V.DIR,H.DIR],[V.DIV,H.DIV],[V.DL,H.DL],[V.DT,H.DT],[V.EM,H.EM],[V.EMBED,H.EMBED],[V.FIELDSET,H.FIELDSET],[V.FIGCAPTION,H.FIGCAPTION],[V.FIGURE,H.FIGURE],[V.FONT,H.FONT],[V.FOOTER,H.FOOTER],[V.FOREIGN_OBJECT,H.FOREIGN_OBJECT],[V.FORM,H.FORM],[V.FRAME,H.FRAME],[V.FRAMESET,H.FRAMESET],[V.H1,H.H1],[V.H2,H.H2],[V.H3,H.H3],[V.H4,H.H4],[V.H5,H.H5],[V.H6,H.H6],[V.HEAD,H.HEAD],[V.HEADER,H.HEADER],[V.HGROUP,H.HGROUP],[V.HR,H.HR],[V.HTML,H.HTML],[V.I,H.I],[V.IMG,H.IMG],[V.IMAGE,H.IMAGE],[V.INPUT,H.INPUT],[V.IFRAME,H.IFRAME],[V.KEYGEN,H.KEYGEN],[V.LABEL,H.LABEL],[V.LI,H.LI],[V.LINK,H.LINK],[V.LISTING,H.LISTING],[V.MAIN,H.MAIN],[V.MALIGNMARK,H.MALIGNMARK],[V.MARQUEE,H.MARQUEE],[V.MATH,H.MATH],[V.MENU,H.MENU],[V.META,H.META],[V.MGLYPH,H.MGLYPH],[V.MI,H.MI],[V.MO,H.MO],[V.MN,H.MN],[V.MS,H.MS],[V.MTEXT,H.MTEXT],[V.NAV,H.NAV],[V.NOBR,H.NOBR],[V.NOFRAMES,H.NOFRAMES],[V.NOEMBED,H.NOEMBED],[V.NOSCRIPT,H.NOSCRIPT],[V.OBJECT,H.OBJECT],[V.OL,H.OL],[V.OPTGROUP,H.OPTGROUP],[V.OPTION,H.OPTION],[V.P,H.P],[V.PARAM,H.PARAM],[V.PLAINTEXT,H.PLAINTEXT],[V.PRE,H.PRE],[V.RB,H.RB],[V.RP,H.RP],[V.RT,H.RT],[V.RTC,H.RTC],[V.RUBY,H.RUBY],[V.S,H.S],[V.SCRIPT,H.SCRIPT],[V.SEARCH,H.SEARCH],[V.SECTION,H.SECTION],[V.SELECT,H.SELECT],[V.SOURCE,H.SOURCE],[V.SMALL,H.SMALL],[V.SPAN,H.SPAN],[V.STRIKE,H.STRIKE],[V.STRONG,H.STRONG],[V.STYLE,H.STYLE],[V.SUB,H.SUB],[V.SUMMARY,H.SUMMARY],[V.SUP,H.SUP],[V.TABLE,H.TABLE],[V.TBODY,H.TBODY],[V.TEMPLATE,H.TEMPLATE],[V.TEXTAREA,H.TEXTAREA],[V.TFOOT,H.TFOOT],[V.TD,H.TD],[V.TH,H.TH],[V.THEAD,H.THEAD],[V.TITLE,H.TITLE],[V.TR,H.TR],[V.TRACK,H.TRACK],[V.TT,H.TT],[V.U,H.U],[V.UL,H.UL],[V.SVG,H.SVG],[V.VAR,H.VAR],[V.WBR,H.WBR],[V.XMP,H.XMP]]);function Tx(e){return wx.get(e)??H.UNKNOWN}const U=H,Ex={[B.HTML]:new Set([U.ADDRESS,U.APPLET,U.AREA,U.ARTICLE,U.ASIDE,U.BASE,U.BASEFONT,U.BGSOUND,U.BLOCKQUOTE,U.BODY,U.BR,U.BUTTON,U.CAPTION,U.CENTER,U.COL,U.COLGROUP,U.DD,U.DETAILS,U.DIR,U.DIV,U.DL,U.DT,U.EMBED,U.FIELDSET,U.FIGCAPTION,U.FIGURE,U.FOOTER,U.FORM,U.FRAME,U.FRAMESET,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HEADER,U.HGROUP,U.HR,U.HTML,U.IFRAME,U.IMG,U.INPUT,U.LI,U.LINK,U.LISTING,U.MAIN,U.MARQUEE,U.MENU,U.META,U.NAV,U.NOEMBED,U.NOFRAMES,U.NOSCRIPT,U.OBJECT,U.OL,U.P,U.PARAM,U.PLAINTEXT,U.PRE,U.SCRIPT,U.SECTION,U.SELECT,U.SOURCE,U.STYLE,U.SUMMARY,U.TABLE,U.TBODY,U.TD,U.TEMPLATE,U.TEXTAREA,U.TFOOT,U.TH,U.THEAD,U.TITLE,U.TR,U.TRACK,U.UL,U.WBR,U.XMP]),[B.MATHML]:new Set([U.MI,U.MO,U.MN,U.MS,U.MTEXT,U.ANNOTATION_XML]),[B.SVG]:new Set([U.TITLE,U.FOREIGN_OBJECT,U.DESC]),[B.XLINK]:new Set,[B.XML]:new Set,[B.XMLNS]:new Set},Dx=new Set([U.H1,U.H2,U.H3,U.H4,U.H5,U.H6]);new Set([V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT]);var W;(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`})(W||={});const Ox={DATA:W.DATA,RCDATA:W.RCDATA,RAWTEXT:W.RAWTEXT,SCRIPT_DATA:W.SCRIPT_DATA,PLAINTEXT:W.PLAINTEXT,CDATA_SECTION:W.CDATA_SECTION};function kx(e){return e>=R.DIGIT_0&&e<=R.DIGIT_9}function Ax(e){return e>=R.LATIN_CAPITAL_A&&e<=R.LATIN_CAPITAL_Z}function jx(e){return e>=R.LATIN_SMALL_A&&e<=R.LATIN_SMALL_Z}function Mx(e){return jx(e)||Ax(e)}function Nx(e){return Mx(e)||kx(e)}function Px(e){return e+32}function Fx(e){return e===R.SPACE||e===R.LINE_FEED||e===R.TABULATION||e===R.FORM_FEED}function Ix(e){return Fx(e)||e===R.SOLIDUS||e===R.GREATER_THAN_SIGN}function Lx(e){return e===R.NULL?z.nullCharacterReference:e>1114111?z.characterReferenceOutsideUnicodeRange:tx(e)?z.surrogateCharacterReference:ax(e)?z.noncharacterCharacterReference:ix(e)||e===R.CARRIAGE_RETURN?z.controlCharacterReference:null}var Rx=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=W.DATA,this.returnState=W.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new ox(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new bx(lx,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(z.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(z.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Lx(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}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:sx.START_TAG,tagName:``,tagID:H.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:sx.END_TAG,tagName:``,tagID:H.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:sx.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:sx.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;let t=this.currentToken;if(cx(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(z.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=Tx(e.tagName),e.type===sx.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(z.endTagWithAttributes),e.selfClosing&&this._err(z.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 sx.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case sx.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case sx.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:sx.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){let t=Fx(e)?sx.WHITESPACE_CHARACTER:e===R.NULL?sx.NULL_CHARACTER:sx.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(sx.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=W.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yx.Attribute:yx.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===W.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===W.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===W.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case W.DATA:this._stateData(e);break;case W.RCDATA:this._stateRcdata(e);break;case W.RAWTEXT:this._stateRawtext(e);break;case W.SCRIPT_DATA:this._stateScriptData(e);break;case W.PLAINTEXT:this._statePlaintext(e);break;case W.TAG_OPEN:this._stateTagOpen(e);break;case W.END_TAG_OPEN:this._stateEndTagOpen(e);break;case W.TAG_NAME:this._stateTagName(e);break;case W.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case W.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case W.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case W.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case W.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case W.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case W.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case W.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case W.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case W.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case W.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case W.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case W.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case W.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case W.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case W.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case W.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case W.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case W.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case W.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case W.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case W.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case W.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case W.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case W.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case W.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case W.BOGUS_COMMENT:this._stateBogusComment(e);break;case W.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case W.COMMENT_START:this._stateCommentStart(e);break;case W.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case W.COMMENT:this._stateComment(e);break;case W.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case W.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case W.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case W.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case W.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case W.COMMENT_END:this._stateCommentEnd(e);break;case W.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case W.DOCTYPE:this._stateDoctype(e);break;case W.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case W.DOCTYPE_NAME:this._stateDoctypeName(e);break;case W.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case W.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case W.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case W.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case W.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case W.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case W.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case W.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case W.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case W.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case W.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case W.CDATA_SECTION:this._stateCdataSection(e);break;case W.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case W.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case W.CHARACTER_REFERENCE:this._stateCharacterReference();break;case W.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case R.LESS_THAN_SIGN:this.state=W.TAG_OPEN;break;case R.AMPERSAND:this._startCharacterReference();break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitCodePoint(e);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case R.AMPERSAND:this._startCharacterReference();break;case R.LESS_THAN_SIGN:this.state=W.RCDATA_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case R.LESS_THAN_SIGN:this.state=W.RAWTEXT_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Mx(e))this._createStartTagToken(),this.state=W.TAG_NAME,this._stateTagName(e);else switch(e){case R.EXCLAMATION_MARK:this.state=W.MARKUP_DECLARATION_OPEN;break;case R.SOLIDUS:this.state=W.END_TAG_OPEN;break;case R.QUESTION_MARK:this._err(z.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=W.BOGUS_COMMENT,this._stateBogusComment(e);break;case R.EOF:this._err(z.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(z.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=W.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Mx(e))this._createEndTagToken(),this.state=W.TAG_NAME,this._stateTagName(e);else switch(e){case R.GREATER_THAN_SIGN:this._err(z.missingEndTagName),this.state=W.DATA;break;case R.EOF:this._err(z.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(z.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=W.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_ATTRIBUTE_NAME;break;case R.SOLIDUS:this.state=W.SELF_CLOSING_START_TAG;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentTagToken();break;case R.NULL:this._err(z.unexpectedNullCharacter),t.tagName+=`�`;break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Ax(e)?Px(e):e)}}_stateRcdataLessThanSign(e){e===R.SOLIDUS?this.state=W.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=W.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Mx(e)?(this.state=W.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=W.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=W.BEFORE_ATTRIBUTE_NAME,!1;case R.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=W.SELF_CLOSING_START_TAG,!1;case R.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=W.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===R.SOLIDUS?this.state=W.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=W.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Mx(e)?(this.state=W.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=W.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case R.SOLIDUS:this.state=W.SCRIPT_DATA_END_TAG_OPEN;break;case R.EXCLAMATION_MARK:this.state=W.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=W.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Mx(e)?(this.state=W.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===R.HYPHEN_MINUS?(this.state=W.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===R.HYPHEN_MINUS?(this.state=W.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=W.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case R.HYPHEN_MINUS:this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case R.GREATER_THAN_SIGN:this.state=W.SCRIPT_DATA,this._emitChars(`>`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===R.SOLIDUS?this.state=W.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mx(e)?(this._emitChars(`<`),this.state=W.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Mx(e)?(this.state=W.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(ex.SCRIPT,!1)&&Ix(this.preprocessor.peek(ex.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<ex.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=W.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case R.HYPHEN_MINUS:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case R.HYPHEN_MINUS:this._emitChars(`-`);break;case R.LESS_THAN_SIGN:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case R.GREATER_THAN_SIGN:this.state=W.SCRIPT_DATA,this._emitChars(`>`);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case R.EOF:this._err(z.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===R.SOLIDUS?(this.state=W.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(ex.SCRIPT,!1)&&Ix(this.preprocessor.peek(ex.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<ex.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=W.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=W.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.SOLIDUS:case R.GREATER_THAN_SIGN:case R.EOF:this.state=W.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case R.EQUALS_SIGN:this._err(z.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=W.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=W.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:case R.SOLIDUS:case R.GREATER_THAN_SIGN:case R.EOF:this._leaveAttrName(),this.state=W.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case R.EQUALS_SIGN:this._leaveAttrName(),this.state=W.BEFORE_ATTRIBUTE_VALUE;break;case R.QUOTATION_MARK:case R.APOSTROPHE:case R.LESS_THAN_SIGN:this._err(z.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Ax(e)?Px(e):e)}}_stateAfterAttributeName(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.SOLIDUS:this.state=W.SELF_CLOSING_START_TAG;break;case R.EQUALS_SIGN:this.state=W.BEFORE_ATTRIBUTE_VALUE;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentTagToken();break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=W.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:this.state=W.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case R.APOSTROPHE:this.state=W.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingAttributeValue),this.state=W.DATA,this.emitCurrentTagToken();break;default:this.state=W.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case R.QUOTATION_MARK:this.state=W.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case R.AMPERSAND:this._startCharacterReference();break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case R.APOSTROPHE:this.state=W.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case R.AMPERSAND:this._startCharacterReference();break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this._leaveAttrValue(),this.state=W.BEFORE_ATTRIBUTE_NAME;break;case R.AMPERSAND:this._startCharacterReference();break;case R.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=W.DATA,this.emitCurrentTagToken();break;case R.NULL:this._err(z.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case R.QUOTATION_MARK:case R.APOSTROPHE:case R.LESS_THAN_SIGN:case R.EQUALS_SIGN:case R.GRAVE_ACCENT:this._err(z.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this._leaveAttrValue(),this.state=W.BEFORE_ATTRIBUTE_NAME;break;case R.SOLIDUS:this._leaveAttrValue(),this.state=W.SELF_CLOSING_START_TAG;break;case R.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=W.DATA,this.emitCurrentTagToken();break;case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this._err(z.missingWhitespaceBetweenAttributes),this.state=W.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case R.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=W.DATA,this.emitCurrentTagToken();break}case R.EOF:this._err(z.eofInTag),this._emitEOFToken();break;default:this._err(z.unexpectedSolidusInTag),this.state=W.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentComment(t);break;case R.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case R.NULL:this._err(z.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(ex.DASH_DASH,!0)?(this._createCommentToken(ex.DASH_DASH.length+1),this.state=W.COMMENT_START):this._consumeSequenceIfMatch(ex.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ex.DOCTYPE.length+1),this.state=W.DOCTYPE):this._consumeSequenceIfMatch(ex.CDATA_START,!0)?this.inForeignNode?this.state=W.CDATA_SECTION:(this._err(z.cdataInHtmlContent),this._createCommentToken(ex.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=W.BOGUS_COMMENT):this._ensureHibernation()||(this._err(z.incorrectlyOpenedComment),this._createCommentToken(2),this.state=W.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_START_DASH;break;case R.GREATER_THAN_SIGN:{this._err(z.abruptClosingOfEmptyComment),this.state=W.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=W.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_END;break;case R.GREATER_THAN_SIGN:this._err(z.abruptClosingOfEmptyComment),this.state=W.DATA,this.emitCurrentComment(t);break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=W.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_END_DASH;break;case R.LESS_THAN_SIGN:t.data+=`<`,this.state=W.COMMENT_LESS_THAN_SIGN;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.data+=`�`;break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case R.EXCLAMATION_MARK:t.data+=`!`,this.state=W.COMMENT_LESS_THAN_SIGN_BANG;break;case R.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=W.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===R.HYPHEN_MINUS?this.state=W.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=W.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===R.HYPHEN_MINUS?this.state=W.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=W.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==R.GREATER_THAN_SIGN&&e!==R.EOF&&this._err(z.nestedComment),this.state=W.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:this.state=W.COMMENT_END;break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=W.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentComment(t);break;case R.EXCLAMATION_MARK:this.state=W.COMMENT_END_BANG;break;case R.HYPHEN_MINUS:t.data+=`-`;break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=W.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case R.HYPHEN_MINUS:t.data+=`--!`,this.state=W.COMMENT_END_DASH;break;case R.GREATER_THAN_SIGN:this._err(z.incorrectlyClosedComment),this.state=W.DATA,this.emitCurrentComment(t);break;case R.EOF:this._err(z.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=W.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_DOCTYPE_NAME;break;case R.GREATER_THAN_SIGN:this.state=W.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case R.EOF:{this._err(z.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(z.missingWhitespaceBeforeDoctypeName),this.state=W.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Ax(e))this._createDoctypeToken(String.fromCharCode(Px(e))),this.state=W.DOCTYPE_NAME;else switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.NULL:this._err(z.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=W.DOCTYPE_NAME;break;case R.GREATER_THAN_SIGN:{this._err(z.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=W.DATA;break}case R.EOF:{this._err(z.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=W.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.AFTER_DOCTYPE_NAME;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.NULL:this._err(z.unexpectedNullCharacter),t.name+=`�`;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Ax(e)?Px(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(ex.PUBLIC,!1)?this.state=W.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ex.SYSTEM,!1)?this.state=W.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(z.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case R.QUOTATION_MARK:this._err(z.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:this._err(z.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:t.publicId=``,this.state=W.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case R.QUOTATION_MARK:this.state=W.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.publicId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case R.APOSTROPHE:this.state=W.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.publicId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case R.GREATER_THAN_SIGN:this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.QUOTATION_MARK:this._err(z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:this._err(z.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.QUOTATION_MARK:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:this.state=W.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case R.QUOTATION_MARK:this._err(z.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:this._err(z.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case R.APOSTROPHE:t.systemId=``,this.state=W.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case R.GREATER_THAN_SIGN:this._err(z.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.DATA,this.emitCurrentDoctype(t);break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case R.QUOTATION_MARK:this.state=W.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.systemId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case R.APOSTROPHE:this.state=W.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case R.NULL:this._err(z.unexpectedNullCharacter),t.systemId+=`�`;break;case R.GREATER_THAN_SIGN:this._err(z.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.EOF:this._err(z.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(z.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=W.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case R.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=W.DATA;break;case R.NULL:this._err(z.unexpectedNullCharacter);break;case R.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case R.RIGHT_SQUARE_BRACKET:this.state=W.CDATA_SECTION_BRACKET;break;case R.EOF:this._err(z.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===R.RIGHT_SQUARE_BRACKET?this.state=W.CDATA_SECTION_END:(this._emitChars(`]`),this.state=W.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case R.GREATER_THAN_SIGN:this.state=W.DATA;break;case R.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=W.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(R.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Nx(this.preprocessor.peek(1))?W.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Nx(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===R.SEMICOLON&&this._err(z.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}};const zx=new Set([H.DD,H.DT,H.LI,H.OPTGROUP,H.OPTION,H.P,H.RB,H.RP,H.RT,H.RTC]),Bx=new Set([...zx,H.CAPTION,H.COLGROUP,H.TBODY,H.TD,H.TFOOT,H.TH,H.THEAD,H.TR]),Vx=new Set([H.APPLET,H.CAPTION,H.HTML,H.MARQUEE,H.OBJECT,H.TABLE,H.TD,H.TEMPLATE,H.TH]),Hx=new Set([...Vx,H.OL,H.UL]),Ux=new Set([...Vx,H.BUTTON]),Wx=new Set([H.ANNOTATION_XML,H.MI,H.MN,H.MO,H.MS,H.MTEXT]),Gx=new Set([H.DESC,H.FOREIGN_OBJECT,H.TITLE]),Kx=new Set([H.TR,H.TEMPLATE,H.HTML]),qx=new Set([H.TBODY,H.TFOOT,H.THEAD,H.TEMPLATE,H.HTML]),Jx=new Set([H.TABLE,H.TEMPLATE,H.HTML]),Yx=new Set([H.TD,H.TH]);var Xx=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=H.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===H.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===B.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(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===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])!==B.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Dx,B.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Yx,B.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Jx,B.HTML)}clearBackToTableBodyContext(){this.clearBackTo(qx,B.HTML)}clearBackToTableRowContext(){this.clearBackTo(Kx,B.HTML)}remove(e){let 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]===H.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===H.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case B.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case B.SVG:if(Gx.has(r))return!1;break;case B.MATHML:if(Wx.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Vx)}hasInListItemScope(e){return this.hasInDynamicScope(e,Hx)}hasInButtonScope(e){return this.hasInDynamicScope(e,Ux)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case B.HTML:if(Dx.has(t))return!0;if(Vx.has(t))return!1;break;case B.SVG:if(Gx.has(t))return!1;break;case B.MATHML:if(Wx.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case e:return!0;case H.TABLE:case H.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===B.HTML)switch(this.tagIDs[e]){case H.TBODY:case H.THEAD:case H.TFOOT:return!0;case H.TABLE:case H.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case e:return!0;case H.OPTION:case H.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&zx.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Bx.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Bx.has(this.currentTagId);)this.pop()}},Zx;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Zx||={});const Qx={type:Zx.Marker};var $x=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===Zx.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(Qx)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Zx.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Zx.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(Qx);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===Zx.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===Zx.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===Zx.Element&&t.element===e)}};const eS={createDocument(){return{nodeName:`#document`,mode:Cx.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};eS.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(eS.isTextNode(n)){n.value+=t;return}}eS.appendChild(e,eS.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&eS.isTextNode(r)?r.value+=t:eS.insertBefore(e,eS.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},tS=`html`,nS=`+//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//`.split(`,`),rS=[...nS,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],iS=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),aS=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],oS=[...aS,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function sS(e,t){return t.some(t=>e.startsWith(t))}function cS(e){return e.name===tS&&e.publicId===null&&(e.systemId===null||e.systemId===`about:legacy-compat`)}function lS(e){if(e.name!==tS)return Cx.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return Cx.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),iS.has(n))return Cx.QUIRKS;let e=t===null?rS:nS;if(sS(n,e))return Cx.QUIRKS;if(e=t===null?aS:oS,sS(n,e))return Cx.LIMITED_QUIRKS}return Cx.NO_QUIRKS}const uS={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},dS=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`.split(`.`).map(e=>[e.toLowerCase(),e])),fS=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:B.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:B.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:B.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:B.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:B.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:B.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:B.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:B.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:B.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:B.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:B.XMLNS}]]),pS=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`.split(`.`).map(e=>[e.toLowerCase(),e])),mS=new Set([H.B,H.BIG,H.BLOCKQUOTE,H.BODY,H.BR,H.CENTER,H.CODE,H.DD,H.DIV,H.DL,H.DT,H.EM,H.EMBED,H.H1,H.H2,H.H3,H.H4,H.H5,H.H6,H.HEAD,H.HR,H.I,H.IMG,H.LI,H.LISTING,H.MENU,H.META,H.NOBR,H.OL,H.P,H.PRE,H.RUBY,H.S,H.SMALL,H.SPAN,H.STRONG,H.STRIKE,H.SUB,H.SUP,H.TABLE,H.TT,H.U,H.UL,H.VAR]);function hS(e){let t=e.tagID;return t===H.FONT&&e.attrs.some(({name:e})=>e===Sx.COLOR||e===Sx.SIZE||e===Sx.FACE)||mS.has(t)}function gS(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===`definitionurl`){e.attrs[t].name=`definitionURL`;break}}function _S(e){for(let t=0;t<e.attrs.length;t++){let n=dS.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vS(e){for(let t=0;t<e.attrs.length;t++){let n=fS.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function yS(e){let t=pS.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Tx(e.tagName))}function bS(e,t){return t===B.MATHML&&(e===H.MI||e===H.MO||e===H.MN||e===H.MS||e===H.MTEXT)}function xS(e,t,n){if(t===B.MATHML&&e===H.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Sx.ENCODING){let t=n[e].value.toLowerCase();return t===uS.TEXT_HTML||t===uS.APPLICATION_XML}}return t===B.SVG&&(e===H.FOREIGN_OBJECT||e===H.DESC||e===H.TITLE)}function SS(e,t,n,r){return(!r||r===B.HTML)&&xS(e,t,n)||(!r||r===B.MATHML)&&bS(e,t)}var G;(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`})(G||={});const CS={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wS=new Set([H.TABLE,H.TBODY,H.TFOOT,H.THEAD,H.TR]),TS={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:eS,onParseError:null};var ES=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=G.INITIAL,this.originalInsertionMode=G.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={...TS,...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 Rx(this.options,this),this.activeFormattingElements=new $x(this.treeAdapter),this.fragmentContextID=n?Tx(this.treeAdapter.getTagName(n)):H.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Xx(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...TS,...t};e??=n.treeAdapter.createElement(V.TEMPLATE,B.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,B.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===H.TEMPLATE&&i.tmplInsertionModeStack.unshift(G.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??CS,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===B.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,B.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=G.TEXT}switchToPlaintextParsing(){this.insertionMode=G.TEXT,this.originalInsertionMode=G.IN_BODY,this.tokenizer.state=Ox.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)===V.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==B.HTML))switch(this.fragmentContextID){case H.TITLE:case H.TEXTAREA:this.tokenizer.state=Ox.RCDATA;break;case H.STYLE:case H.XMP:case H.IFRAME:case H.NOEMBED:case H.NOFRAMES:case H.NOSCRIPT:this.tokenizer.state=Ox.RAWTEXT;break;case H.SCRIPT:this.tokenizer.state=Ox.SCRIPT_DATA;break;case H.PLAINTEXT:this.tokenizer.state=Ox.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,B.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,B.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(V.HTML,B.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,H.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===sx.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===H.SVG&&this.treeAdapter.getTagName(t)===V.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===B.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===H.MGLYPH||e.tagID===H.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,B.HTML)}_processToken(e){switch(e.type){case sx.CHARACTER:this.onCharacter(e);break;case sx.NULL_CHARACTER:this.onNullCharacter(e);break;case sx.COMMENT:this.onComment(e);break;case sx.DOCTYPE:this.onDoctype(e);break;case sx.START_TAG:this._processStartTag(e);break;case sx.END_TAG:this.onEndTag(e);break;case sx.EOF:this.onEof(e);break;case sx.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return SS(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===Zx.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=G.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(H.P),this.openElements.popUntilTagNamePopped(H.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case H.TR:this.insertionMode=G.IN_ROW;return;case H.TBODY:case H.THEAD:case H.TFOOT:this.insertionMode=G.IN_TABLE_BODY;return;case H.CAPTION:this.insertionMode=G.IN_CAPTION;return;case H.COLGROUP:this.insertionMode=G.IN_COLUMN_GROUP;return;case H.TABLE:this.insertionMode=G.IN_TABLE;return;case H.BODY:this.insertionMode=G.IN_BODY;return;case H.FRAMESET:this.insertionMode=G.IN_FRAMESET;return;case H.SELECT:this._resetInsertionModeForSelect(e);return;case H.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case H.HTML:this.insertionMode=this.headElement?G.AFTER_HEAD:G.BEFORE_HEAD;return;case H.TD:case H.TH:if(e>0){this.insertionMode=G.IN_CELL;return}break;case H.HEAD:if(e>0){this.insertionMode=G.IN_HEAD;return}break}this.insertionMode=G.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===H.TEMPLATE)break;if(e===H.TABLE){this.insertionMode=G.IN_SELECT_IN_TABLE;return}}this.insertionMode=G.IN_SELECT}_isElementCausesFosterParenting(e){return wS.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case H.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===B.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case H.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Ex[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ww(this,e);return}switch(this.insertionMode){case G.INITIAL:zS(this,e);break;case G.BEFORE_HTML:HS(this,e);break;case G.BEFORE_HEAD:GS(this,e);break;case G.IN_HEAD:YS(this,e);break;case G.IN_HEAD_NO_SCRIPT:QS(this,e);break;case G.AFTER_HEAD:tC(this,e);break;case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:iC(this,e);break;case G.TEXT:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:$C(this,e);break;case G.IN_TABLE_TEXT:fw(this,e);break;case G.IN_COLUMN_GROUP:yw(this,e);break;case G.AFTER_BODY:Fw(this,e);break;case G.AFTER_AFTER_BODY:Vw(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Uw(this,e);return}switch(this.insertionMode){case G.INITIAL:zS(this,e);break;case G.BEFORE_HTML:HS(this,e);break;case G.BEFORE_HEAD:GS(this,e);break;case G.IN_HEAD:YS(this,e);break;case G.IN_HEAD_NO_SCRIPT:QS(this,e);break;case G.AFTER_HEAD:tC(this,e);break;case G.TEXT:this._insertCharacters(e);break;case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:$C(this,e);break;case G.IN_COLUMN_GROUP:yw(this,e);break;case G.AFTER_BODY:Fw(this,e);break;case G.AFTER_AFTER_BODY:Vw(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){PS(this,e);return}switch(this.insertionMode){case G.INITIAL:case G.BEFORE_HTML:case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_TEMPLATE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:PS(this,e);break;case G.IN_TABLE_TEXT:pw(this,e);break;case G.AFTER_BODY:FS(this,e);break;case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:IS(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case G.INITIAL:RS(this,e);break;case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:this._err(e,z.misplacedDoctype);break;case G.IN_TABLE_TEXT:pw(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,z.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Kw(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case G.INITIAL:zS(this,e);break;case G.BEFORE_HTML:BS(this,e);break;case G.BEFORE_HEAD:US(this,e);break;case G.IN_HEAD:KS(this,e);break;case G.IN_HEAD_NO_SCRIPT:XS(this,e);break;case G.AFTER_HEAD:$S(this,e);break;case G.IN_BODY:LC(this,e);break;case G.IN_TABLE:cw(this,e);break;case G.IN_TABLE_TEXT:pw(this,e);break;case G.IN_CAPTION:hw(this,e);break;case G.IN_COLUMN_GROUP:_w(this,e);break;case G.IN_TABLE_BODY:bw(this,e);break;case G.IN_ROW:Sw(this,e);break;case G.IN_CELL:ww(this,e);break;case G.IN_SELECT:Ew(this,e);break;case G.IN_SELECT_IN_TABLE:Ow(this,e);break;case G.IN_TEMPLATE:Aw(this,e);break;case G.AFTER_BODY:Nw(this,e);break;case G.IN_FRAMESET:Iw(this,e);break;case G.AFTER_FRAMESET:Rw(this,e);break;case G.AFTER_AFTER_BODY:Bw(this,e);break;case G.AFTER_AFTER_FRAMESET:Hw(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?qw(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case G.INITIAL:zS(this,e);break;case G.BEFORE_HTML:VS(this,e);break;case G.BEFORE_HEAD:WS(this,e);break;case G.IN_HEAD:qS(this,e);break;case G.IN_HEAD_NO_SCRIPT:ZS(this,e);break;case G.AFTER_HEAD:eC(this,e);break;case G.IN_BODY:YC(this,e);break;case G.TEXT:ZC(this,e);break;case G.IN_TABLE:lw(this,e);break;case G.IN_TABLE_TEXT:pw(this,e);break;case G.IN_CAPTION:gw(this,e);break;case G.IN_COLUMN_GROUP:vw(this,e);break;case G.IN_TABLE_BODY:xw(this,e);break;case G.IN_ROW:Cw(this,e);break;case G.IN_CELL:Tw(this,e);break;case G.IN_SELECT:Dw(this,e);break;case G.IN_SELECT_IN_TABLE:kw(this,e);break;case G.IN_TEMPLATE:jw(this,e);break;case G.AFTER_BODY:Pw(this,e);break;case G.IN_FRAMESET:Lw(this,e);break;case G.AFTER_FRAMESET:zw(this,e);break;case G.AFTER_AFTER_BODY:Vw(this,e);break;default:}}onEof(e){switch(this.insertionMode){case G.INITIAL:zS(this,e);break;case G.BEFORE_HTML:HS(this,e);break;case G.BEFORE_HEAD:GS(this,e);break;case G.IN_HEAD:YS(this,e);break;case G.IN_HEAD_NO_SCRIPT:QS(this,e);break;case G.AFTER_HEAD:tC(this,e);break;case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:XC(this,e);break;case G.TEXT:QC(this,e);break;case G.IN_TABLE_TEXT:pw(this,e);break;case G.IN_TEMPLATE:Mw(this,e);break;case G.AFTER_BODY:case G.IN_FRAMESET:case G.AFTER_FRAMESET:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:LS(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===R.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 G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.TEXT:case G.IN_COLUMN_GROUP:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:this._insertCharacters(e);break;case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:case G.AFTER_BODY:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:rC(this,e);break;case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:$C(this,e);break;case G.IN_TABLE_TEXT:dw(this,e);break;default:}}};function DS(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):JC(e,t),n}function OS(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function kS(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=AS(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function AS(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function jS(e,t,n){let r=Tx(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===H.TEMPLATE&&i===B.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function MS(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function NS(e,t){for(let n=0;n<8;n++){let n=DS(e,t);if(!n)break;let r=OS(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=kS(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&jS(e,a,i),MS(e,r,n)}}function PS(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function FS(e,t){e._appendCommentNode(t,e.openElements.items[0])}function IS(e,t){e._appendCommentNode(t,e.document)}function LS(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function RS(e,t){e._setDocumentType(t);let n=t.forceQuirks?Cx.QUIRKS:lS(t);cS(t)||e._err(t,z.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=G.BEFORE_HTML}function zS(e,t){e._err(t,z.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Cx.QUIRKS),e.insertionMode=G.BEFORE_HTML,e._processToken(t)}function BS(e,t){t.tagID===H.HTML?(e._insertElement(t,B.HTML),e.insertionMode=G.BEFORE_HEAD):HS(e,t)}function VS(e,t){let n=t.tagID;(n===H.HTML||n===H.HEAD||n===H.BODY||n===H.BR)&&HS(e,t)}function HS(e,t){e._insertFakeRootElement(),e.insertionMode=G.BEFORE_HEAD,e._processToken(t)}function US(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.HEAD:e._insertElement(t,B.HTML),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD;break;default:GS(e,t)}}function WS(e,t){let n=t.tagID;n===H.HEAD||n===H.BODY||n===H.HTML||n===H.BR?GS(e,t):e._err(t,z.endTagWithoutMatchingOpenElement)}function GS(e,t){e._insertFakeElement(V.HEAD,H.HEAD),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD,e._processToken(t)}function KS(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.BASE:case H.BASEFONT:case H.BGSOUND:case H.LINK:case H.META:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.TITLE:e._switchToTextParsing(t,Ox.RCDATA);break;case H.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ox.RAWTEXT):(e._insertElement(t,B.HTML),e.insertionMode=G.IN_HEAD_NO_SCRIPT);break;case H.NOFRAMES:case H.STYLE:e._switchToTextParsing(t,Ox.RAWTEXT);break;case H.SCRIPT:e._switchToTextParsing(t,Ox.SCRIPT_DATA);break;case H.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=G.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(G.IN_TEMPLATE);break;case H.HEAD:e._err(t,z.misplacedStartTagForHeadElement);break;default:YS(e,t)}}function qS(e,t){switch(t.tagID){case H.HEAD:e.openElements.pop(),e.insertionMode=G.AFTER_HEAD;break;case H.BODY:case H.BR:case H.HTML:YS(e,t);break;case H.TEMPLATE:JS(e,t);break;default:e._err(t,z.endTagWithoutMatchingOpenElement)}}function JS(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==H.TEMPLATE&&e._err(t,z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(H.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,z.endTagWithoutMatchingOpenElement)}function YS(e,t){e.openElements.pop(),e.insertionMode=G.AFTER_HEAD,e._processToken(t)}function XS(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.BASEFONT:case H.BGSOUND:case H.HEAD:case H.LINK:case H.META:case H.NOFRAMES:case H.STYLE:KS(e,t);break;case H.NOSCRIPT:e._err(t,z.nestedNoscriptInHead);break;default:QS(e,t)}}function ZS(e,t){switch(t.tagID){case H.NOSCRIPT:e.openElements.pop(),e.insertionMode=G.IN_HEAD;break;case H.BR:QS(e,t);break;default:e._err(t,z.endTagWithoutMatchingOpenElement)}}function QS(e,t){let n=t.type===sx.EOF?z.openElementsLeftAfterEof:z.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=G.IN_HEAD,e._processToken(t)}function $S(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.BODY:e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=G.IN_BODY;break;case H.FRAMESET:e._insertElement(t,B.HTML),e.insertionMode=G.IN_FRAMESET;break;case H.BASE:case H.BASEFONT:case H.BGSOUND:case H.LINK:case H.META:case H.NOFRAMES:case H.SCRIPT:case H.STYLE:case H.TEMPLATE:case H.TITLE:e._err(t,z.abandonedHeadElementChild),e.openElements.push(e.headElement,H.HEAD),KS(e,t),e.openElements.remove(e.headElement);break;case H.HEAD:e._err(t,z.misplacedStartTagForHeadElement);break;default:tC(e,t)}}function eC(e,t){switch(t.tagID){case H.BODY:case H.HTML:case H.BR:tC(e,t);break;case H.TEMPLATE:JS(e,t);break;default:e._err(t,z.endTagWithoutMatchingOpenElement)}}function tC(e,t){e._insertFakeElement(V.BODY,H.BODY),e.insertionMode=G.IN_BODY,nC(e,t)}function nC(e,t){switch(t.type){case sx.CHARACTER:iC(e,t);break;case sx.WHITESPACE_CHARACTER:rC(e,t);break;case sx.COMMENT:PS(e,t);break;case sx.START_TAG:LC(e,t);break;case sx.END_TAG:YC(e,t);break;case sx.EOF:XC(e,t);break;default:}}function rC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function aC(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function oC(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sC(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_FRAMESET)}function cC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML)}function lC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Dx.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,B.HTML)}function uC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function dC(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),n||(e.formElement=e.openElements.current))}function fC(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===H.LI&&r===H.LI||(n===H.DD||n===H.DT)&&(r===H.DD||r===H.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==H.ADDRESS&&r!==H.DIV&&r!==H.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML)}function pC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.tokenizer.state=Ox.PLAINTEXT}function mC(e,t){e.openElements.hasInScope(H.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(H.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1}function hC(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(NS(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _C(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(H.NOBR)&&(NS(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function yC(e,t){e.treeAdapter.getDocumentMode(e.document)!==Cx.QUIRKS&&e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=G.IN_TABLE}function bC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xC(e){let t=cx(e,Sx.TYPE);return t!=null&&t.toLowerCase()===`hidden`}function SC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),xC(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function CC(e,t){e._appendElement(t,B.HTML),t.ackSelfClosing=!0}function wC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TC(e,t){t.tagName=V.IMG,t.tagID=H.IMG,bC(e,t)}function EC(e,t){e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ox.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=G.TEXT}function DC(e,t){e.openElements.hasInButtonScope(H.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ox.RAWTEXT)}function OC(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ox.RAWTEXT)}function kC(e,t){e._switchToTextParsing(t,Ox.RAWTEXT)}function AC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===G.IN_TABLE||e.insertionMode===G.IN_CAPTION||e.insertionMode===G.IN_TABLE_BODY||e.insertionMode===G.IN_ROW||e.insertionMode===G.IN_CELL?G.IN_SELECT_IN_TABLE:G.IN_SELECT}function jC(e,t){e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function MC(e,t){e.openElements.hasInScope(H.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,B.HTML)}function NC(e,t){e.openElements.hasInScope(H.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(H.RTC),e._insertElement(t,B.HTML)}function PC(e,t){e._reconstructActiveFormattingElements(),gS(t),vS(t),t.selfClosing?e._appendElement(t,B.MATHML):e._insertElement(t,B.MATHML),t.ackSelfClosing=!0}function FC(e,t){e._reconstructActiveFormattingElements(),_S(t),vS(t),t.selfClosing?e._appendElement(t,B.SVG):e._insertElement(t,B.SVG),t.ackSelfClosing=!0}function IC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function LC(e,t){switch(t.tagID){case H.I:case H.S:case H.B:case H.U:case H.EM:case H.TT:case H.BIG:case H.CODE:case H.FONT:case H.SMALL:case H.STRIKE:case H.STRONG:gC(e,t);break;case H.A:hC(e,t);break;case H.H1:case H.H2:case H.H3:case H.H4:case H.H5:case H.H6:lC(e,t);break;case H.P:case H.DL:case H.OL:case H.UL:case H.DIV:case H.DIR:case H.NAV:case H.MAIN:case H.MENU:case H.ASIDE:case H.CENTER:case H.FIGURE:case H.FOOTER:case H.HEADER:case H.HGROUP:case H.DIALOG:case H.DETAILS:case H.ADDRESS:case H.ARTICLE:case H.SEARCH:case H.SECTION:case H.SUMMARY:case H.FIELDSET:case H.BLOCKQUOTE:case H.FIGCAPTION:cC(e,t);break;case H.LI:case H.DD:case H.DT:fC(e,t);break;case H.BR:case H.IMG:case H.WBR:case H.AREA:case H.EMBED:case H.KEYGEN:bC(e,t);break;case H.HR:wC(e,t);break;case H.RB:case H.RTC:MC(e,t);break;case H.RT:case H.RP:NC(e,t);break;case H.PRE:case H.LISTING:uC(e,t);break;case H.XMP:DC(e,t);break;case H.SVG:FC(e,t);break;case H.HTML:aC(e,t);break;case H.BASE:case H.LINK:case H.META:case H.STYLE:case H.TITLE:case H.SCRIPT:case H.BGSOUND:case H.BASEFONT:case H.TEMPLATE:KS(e,t);break;case H.BODY:oC(e,t);break;case H.FORM:dC(e,t);break;case H.NOBR:_C(e,t);break;case H.MATH:PC(e,t);break;case H.TABLE:yC(e,t);break;case H.INPUT:SC(e,t);break;case H.PARAM:case H.TRACK:case H.SOURCE:CC(e,t);break;case H.IMAGE:TC(e,t);break;case H.BUTTON:mC(e,t);break;case H.APPLET:case H.OBJECT:case H.MARQUEE:vC(e,t);break;case H.IFRAME:OC(e,t);break;case H.SELECT:AC(e,t);break;case H.OPTION:case H.OPTGROUP:jC(e,t);break;case H.NOEMBED:case H.NOFRAMES:kC(e,t);break;case H.FRAMESET:sC(e,t);break;case H.TEXTAREA:EC(e,t);break;case H.NOSCRIPT:e.options.scriptingEnabled?kC(e,t):IC(e,t);break;case H.PLAINTEXT:pC(e,t);break;case H.COL:case H.TH:case H.TD:case H.TR:case H.HEAD:case H.FRAME:case H.TBODY:case H.TFOOT:case H.THEAD:case H.CAPTION:case H.COLGROUP:break;default:IC(e,t)}}function RC(e,t){if(e.openElements.hasInScope(H.BODY)&&(e.insertionMode=G.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function zC(e,t){e.openElements.hasInScope(H.BODY)&&(e.insertionMode=G.AFTER_BODY,Pw(e,t))}function BC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function VC(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(H.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(H.FORM):n&&e.openElements.remove(n))}function HC(e){e.openElements.hasInButtonScope(H.P)||e._insertFakeElement(V.P,H.P),e._closePElement()}function UC(e){e.openElements.hasInListItemScope(H.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(H.LI),e.openElements.popUntilTagNamePopped(H.LI))}function WC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function GC(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function KC(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function qC(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,H.BR),e.openElements.pop(),e.framesetOk=!1}function JC(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==H.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function YC(e,t){switch(t.tagID){case H.A:case H.B:case H.I:case H.S:case H.U:case H.EM:case H.TT:case H.BIG:case H.CODE:case H.FONT:case H.NOBR:case H.SMALL:case H.STRIKE:case H.STRONG:NS(e,t);break;case H.P:HC(e);break;case H.DL:case H.UL:case H.OL:case H.DIR:case H.DIV:case H.NAV:case H.PRE:case H.MAIN:case H.MENU:case H.ASIDE:case H.BUTTON:case H.CENTER:case H.FIGURE:case H.FOOTER:case H.HEADER:case H.HGROUP:case H.DIALOG:case H.ADDRESS:case H.ARTICLE:case H.DETAILS:case H.SEARCH:case H.SECTION:case H.SUMMARY:case H.LISTING:case H.FIELDSET:case H.BLOCKQUOTE:case H.FIGCAPTION:BC(e,t);break;case H.LI:UC(e);break;case H.DD:case H.DT:WC(e,t);break;case H.H1:case H.H2:case H.H3:case H.H4:case H.H5:case H.H6:GC(e);break;case H.BR:qC(e);break;case H.BODY:RC(e,t);break;case H.HTML:zC(e,t);break;case H.FORM:VC(e);break;case H.APPLET:case H.OBJECT:case H.MARQUEE:KC(e,t);break;case H.TEMPLATE:JS(e,t);break;default:JC(e,t)}}function XC(e,t){e.tmplInsertionModeStack.length>0?Mw(e,t):LS(e,t)}function ZC(e,t){var n;t.tagID===H.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function QC(e,t){e._err(t,z.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function $C(e,t){if(e.openElements.currentTagId!==void 0&&wS.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=G.IN_TABLE_TEXT,t.type){case sx.CHARACTER:fw(e,t);break;case sx.WHITESPACE_CHARACTER:dw(e,t);break}else uw(e,t)}function ew(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_CAPTION}function tw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_COLUMN_GROUP}function nw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,H.COLGROUP),e.insertionMode=G.IN_COLUMN_GROUP,_w(e,t)}function rw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_TABLE_BODY}function iw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,H.TBODY),e.insertionMode=G.IN_TABLE_BODY,bw(e,t)}function aw(e,t){e.openElements.hasInTableScope(H.TABLE)&&(e.openElements.popUntilTagNamePopped(H.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ow(e,t){xC(t)?e._appendElement(t,B.HTML):uw(e,t),t.ackSelfClosing=!0}function sw(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,B.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function cw(e,t){switch(t.tagID){case H.TD:case H.TH:case H.TR:iw(e,t);break;case H.STYLE:case H.SCRIPT:case H.TEMPLATE:KS(e,t);break;case H.COL:nw(e,t);break;case H.FORM:sw(e,t);break;case H.TABLE:aw(e,t);break;case H.TBODY:case H.TFOOT:case H.THEAD:rw(e,t);break;case H.INPUT:ow(e,t);break;case H.CAPTION:ew(e,t);break;case H.COLGROUP:tw(e,t);break;default:uw(e,t)}}function lw(e,t){switch(t.tagID){case H.TABLE:e.openElements.hasInTableScope(H.TABLE)&&(e.openElements.popUntilTagNamePopped(H.TABLE),e._resetInsertionMode());break;case H.TEMPLATE:JS(e,t);break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:case H.TBODY:case H.TD:case H.TFOOT:case H.TH:case H.THEAD:case H.TR:break;default:uw(e,t)}}function uw(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,nC(e,t),e.fosterParentingEnabled=n}function dw(e,t){e.pendingCharacterTokens.push(t)}function fw(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function pw(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)uw(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const mw=new Set([H.CAPTION,H.COL,H.COLGROUP,H.TBODY,H.TD,H.TFOOT,H.TH,H.THEAD,H.TR]);function hw(e,t){let n=t.tagID;mw.has(n)?e.openElements.hasInTableScope(H.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(H.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,cw(e,t)):LC(e,t)}function gw(e,t){let n=t.tagID;switch(n){case H.CAPTION:case H.TABLE:e.openElements.hasInTableScope(H.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(H.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,n===H.TABLE&&lw(e,t));break;case H.BODY:case H.COL:case H.COLGROUP:case H.HTML:case H.TBODY:case H.TD:case H.TFOOT:case H.TH:case H.THEAD:case H.TR:break;default:YC(e,t)}}function _w(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.COL:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.TEMPLATE:KS(e,t);break;default:yw(e,t)}}function vw(e,t){switch(t.tagID){case H.COLGROUP:e.openElements.currentTagId===H.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE);break;case H.TEMPLATE:JS(e,t);break;case H.COL:break;default:yw(e,t)}}function yw(e,t){e.openElements.currentTagId===H.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE,e._processToken(t))}function bw(e,t){switch(t.tagID){case H.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_ROW;break;case H.TH:case H.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,H.TR),e.insertionMode=G.IN_ROW,Sw(e,t);break;case H.CAPTION:case H.COL:case H.COLGROUP:case H.TBODY:case H.TFOOT:case H.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,cw(e,t));break;default:cw(e,t)}}function xw(e,t){let n=t.tagID;switch(t.tagID){case H.TBODY:case H.TFOOT:case H.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE);break;case H.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,lw(e,t));break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:case H.TD:case H.TH:case H.TR:break;default:lw(e,t)}}function Sw(e,t){switch(t.tagID){case H.TH:case H.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,B.HTML),e.insertionMode=G.IN_CELL,e.activeFormattingElements.insertMarker();break;case H.CAPTION:case H.COL:case H.COLGROUP:case H.TBODY:case H.TFOOT:case H.THEAD:case H.TR:e.openElements.hasInTableScope(H.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,bw(e,t));break;default:cw(e,t)}}function Cw(e,t){switch(t.tagID){case H.TR:e.openElements.hasInTableScope(H.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY);break;case H.TABLE:e.openElements.hasInTableScope(H.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,xw(e,t));break;case H.TBODY:case H.TFOOT:case H.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(H.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,xw(e,t));break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:case H.TD:case H.TH:break;default:lw(e,t)}}function ww(e,t){let n=t.tagID;mw.has(n)?(e.openElements.hasInTableScope(H.TD)||e.openElements.hasInTableScope(H.TH))&&(e._closeTableCell(),Sw(e,t)):LC(e,t)}function Tw(e,t){let n=t.tagID;switch(n){case H.TD:case H.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_ROW);break;case H.TABLE:case H.TBODY:case H.TFOOT:case H.THEAD:case H.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Cw(e,t));break;case H.BODY:case H.CAPTION:case H.COL:case H.COLGROUP:case H.HTML:break;default:YC(e,t)}}function Ew(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.OPTION:e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case H.OPTGROUP:e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e.openElements.currentTagId===H.OPTGROUP&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case H.HR:e.openElements.currentTagId===H.OPTION&&e.openElements.pop(),e.openElements.currentTagId===H.OPTGROUP&&e.openElements.pop(),e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.INPUT:case H.KEYGEN:case H.TEXTAREA:case H.SELECT:e.openElements.hasInSelectScope(H.SELECT)&&(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode(),t.tagID!==H.SELECT&&e._processStartTag(t));break;case H.SCRIPT:case H.TEMPLATE:KS(e,t);break;default:}}function Dw(e,t){switch(t.tagID){case H.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===H.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===H.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===H.OPTGROUP&&e.openElements.pop();break;case H.OPTION:e.openElements.currentTagId===H.OPTION&&e.openElements.pop();break;case H.SELECT:e.openElements.hasInSelectScope(H.SELECT)&&(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode());break;case H.TEMPLATE:JS(e,t);break;default:}}function Ow(e,t){let n=t.tagID;n===H.CAPTION||n===H.TABLE||n===H.TBODY||n===H.TFOOT||n===H.THEAD||n===H.TR||n===H.TD||n===H.TH?(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ew(e,t)}function kw(e,t){let n=t.tagID;n===H.CAPTION||n===H.TABLE||n===H.TBODY||n===H.TFOOT||n===H.THEAD||n===H.TR||n===H.TD||n===H.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(H.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Dw(e,t)}function Aw(e,t){switch(t.tagID){case H.BASE:case H.BASEFONT:case H.BGSOUND:case H.LINK:case H.META:case H.NOFRAMES:case H.SCRIPT:case H.STYLE:case H.TEMPLATE:case H.TITLE:KS(e,t);break;case H.CAPTION:case H.COLGROUP:case H.TBODY:case H.TFOOT:case H.THEAD:e.tmplInsertionModeStack[0]=G.IN_TABLE,e.insertionMode=G.IN_TABLE,cw(e,t);break;case H.COL:e.tmplInsertionModeStack[0]=G.IN_COLUMN_GROUP,e.insertionMode=G.IN_COLUMN_GROUP,_w(e,t);break;case H.TR:e.tmplInsertionModeStack[0]=G.IN_TABLE_BODY,e.insertionMode=G.IN_TABLE_BODY,bw(e,t);break;case H.TD:case H.TH:e.tmplInsertionModeStack[0]=G.IN_ROW,e.insertionMode=G.IN_ROW,Sw(e,t);break;default:e.tmplInsertionModeStack[0]=G.IN_BODY,e.insertionMode=G.IN_BODY,LC(e,t)}}function jw(e,t){t.tagID===H.TEMPLATE&&JS(e,t)}function Mw(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(H.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):LS(e,t)}function Nw(e,t){t.tagID===H.HTML?LC(e,t):Fw(e,t)}function Pw(e,t){if(t.tagID===H.HTML){if(e.fragmentContext||(e.insertionMode=G.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===H.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Fw(e,t)}function Fw(e,t){e.insertionMode=G.IN_BODY,nC(e,t)}function Iw(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.FRAMESET:e._insertElement(t,B.HTML);break;case H.FRAME:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case H.NOFRAMES:KS(e,t);break;default:}}function Lw(e,t){t.tagID===H.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==H.FRAMESET&&(e.insertionMode=G.AFTER_FRAMESET))}function Rw(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.NOFRAMES:KS(e,t);break;default:}}function zw(e,t){t.tagID===H.HTML&&(e.insertionMode=G.AFTER_AFTER_FRAMESET)}function Bw(e,t){t.tagID===H.HTML?LC(e,t):Vw(e,t)}function Vw(e,t){e.insertionMode=G.IN_BODY,nC(e,t)}function Hw(e,t){switch(t.tagID){case H.HTML:LC(e,t);break;case H.NOFRAMES:KS(e,t);break;default:}}function Uw(e,t){t.chars=`�`,e._insertCharacters(t)}function Ww(e,t){e._insertCharacters(t),e.framesetOk=!1}function Gw(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==B.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Kw(e,t){if(hS(t))Gw(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===B.MATHML?gS(t):r===B.SVG&&(yS(t),_S(t)),vS(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function qw(e,t){if(t.tagID===H.P||t.tagID===H.BR){Gw(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===B.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR]);function Jw(e,t){return ES.parse(e,t)}function Yw(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=ES.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function Xw(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}const Zw=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var Qw=class{constructor(e){let t;t=e?Xw(e)?{path:e}:typeof e==`string`||nT(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:pe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Zw.length;){let e=Zw[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Zw.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?oe.basename(this.path):void 0}set basename(e){eT(e,`basename`),$w(e,`basename`),this.path=oe.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?oe.dirname(this.path):void 0}set dirname(e){tT(this.basename,`dirname`),this.path=oe.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?oe.extname(this.path):void 0}set extname(e){if($w(e,`extname`),tT(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=oe.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Xw(e)&&(e=me(e)),eT(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?oe.basename(this.path,this.extname):void 0}set stem(e){eT(e,`stem`),$w(e,`stem`),this.path=oe.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new k(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function $w(e,t){if(e&&e.includes(oe.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+oe.sep+"`")}function eT(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function tT(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function nT(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}const rT={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},iT=/-[a-z]/g,aT=/%c(?:([-+])(\d+))?/g,oT=/%x/g,sT={2:!0,1:!1,0:null},cT={};function lT(e,t){let n=t||cT,r=n.onerror,i=e instanceof Qw?e:new Qw(e),a=n.fragment?Yw:Jw,o=String(i);return Gb(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=uT(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=rT[a],o=new k(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=sT[c],o.note=l(n.description),o.url=n.url===!1?void 0:`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`+t,r(o)}function l(t){return t.replace(aT,n).replace(oT,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return fT(o.charAt(e.startOffset+i))}function r(){return pT(o.charCodeAt(e.startOffset))}}}}function uT(e){return e.replace(iT,dT)}function dT(e){return e.charAt(1).toUpperCase()}function fT(e){return e==="`"?"` ` `":e}function pT(e){return`0x`+e.toString(16).toUpperCase()}const mT=(function(e,t,n,r,i){let a=hT(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!mT(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return xT(e)?a.call(i,e,n,r):!1}),hT=(function(e){if(e==null)return bT;if(typeof e==`function`)return yT(e);if(typeof e==`object`)return Array.isArray(e)?gT(e):_T(e);if(typeof e==`string`)return vT(e);throw Error(`Expected function, string, or object as test`)});function gT(e){let t=[],n=-1;for(;++n<e.length;)t[n]=hT(e[n]);return yT(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function _T(e){let t=e;return yT(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function vT(e){return yT(t);function t(t){return t&&t.type===e}}function yT(e){return t;function t(t,n,r){return!!(xT(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function bT(){return!0}function xT(e){return typeof e==`object`&&!!e&&`type`in e}function ST(e){return`\x1B[33m`+e+`\x1B[39m`}const CT=[],wT=`skip`;function TT(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=hT(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+ST(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=CT,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=ET(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function ET(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?CT:[e]}function DT(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),TT(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}const OT={};function kT(e,t){let n=t||OT;return AT(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function AT(e,t,n){if(MT(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return jT(e.children,t,n)}return Array.isArray(e)?jT(e,t,n):``}function jT(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=AT(e[i],t,n);return r.join(``)}function MT(e){return!!(e&&typeof e==`object`)}const NT=hT([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function PT(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const FT=WT(/[A-Za-z]/),IT=WT(/[\dA-Za-z]/),LT=WT(/[#-'*+\--9=?A-Z^-~]/);function RT(e){return e!==null&&(e<32||e===127)}const zT=WT(/\d/),BT=WT(/[\dA-Fa-f]/),VT=WT(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const HT=WT(/\p{P}|\p{S}/u),UT=WT(/\s/);function WT(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function GT(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function KT(e,t,n){let r=hT((n||{}).ignore||[]),i=qT(t),a=-1;for(;++a<i.length;)TT(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function qT(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([JT(e[0]),YT(e[1])])}return t}function JT(e){return typeof e==`string`?new RegExp(GT(e),`g`):e}function YT(e){return typeof e==`function`?e:function(){return e}}const XT=`phrasing`,ZT=[`autolink`,`link`,`image`,`label`];function QT(){return{transforms:[oE],enter:{literalAutolink:eE,literalAutolinkEmail:tE,literalAutolinkHttp:tE,literalAutolinkWww:tE},exit:{literalAutolink:aE,literalAutolinkEmail:iE,literalAutolinkHttp:nE,literalAutolinkWww:rE}}}function $T(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:XT,notInConstruct:ZT},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:XT,notInConstruct:ZT},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:XT,notInConstruct:ZT}]}}function eE(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function tE(e){this.config.enter.autolinkProtocol.call(this,e)}function nE(e){this.config.exit.autolinkProtocol.call(this,e)}function rE(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function iE(e){this.config.exit.autolinkEmail.call(this,e)}function aE(e){this.exit(e)}function oE(e){KT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sE],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,cE]],{ignore:[`link`,`linkReference`]})}function sE(e,t,n,r,i){let a=``;if(!dE(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!lE(n)))return!1;let o=uE(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function cE(e,t,n,r){return!dE(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function lE(e){let 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 uE(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=PT(e,`(`),a=PT(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function dE(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||UT(n)||HT(n))&&(!t||n!==47)}function fE(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}SE.peek=xE;function pE(){this.buffer()}function mE(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function hE(){this.buffer()}function gE(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function _E(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vE(e){this.exit(e)}function yE(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bE(e){this.exit(e)}function xE(){return`[`}function SE(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function CE(){return{enter:{gfmFootnoteCallString:pE,gfmFootnoteCall:mE,gfmFootnoteDefinitionLabelString:hE,gfmFootnoteDefinition:gE},exit:{gfmFootnoteCallString:_E,gfmFootnoteCall:vE,gfmFootnoteDefinitionLabelString:yE,gfmFootnoteDefinition:bE}}}function wE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:SE},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
141
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?EE:TE))),s(),o}}function TE(e,t,n){return t===0?e:EE(e,t,n)}function EE(e,t,n){return(n?``:` `)+e}const DE=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];ME.peek=NE;function OE(){return{canContainEols:[`delete`],enter:{strikethrough:AE},exit:{strikethrough:jE}}}function kE(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:DE}],handlers:{delete:ME}}}function AE(e){this.enter({type:`delete`,children:[]},e)}function jE(e){this.exit(e)}function ME(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function NE(){return`~`}function PE(e){return e.length}function FE(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||PE,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=IE(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=LE(r[d]);else{let e=LE(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
142
+ `)}function IE(e){return e==null?``:String(e)}function LE(e){let 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}const RE={}.hasOwnProperty;function zE(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&RE.call(t,e)){let n=String(t[e]);i=RE.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const BE={}.hasOwnProperty;function VE(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)VE(e,t.extensions[n]);for(r in t)if(BE.call(t,r))switch(r){case`extensions`:break;case`unsafe`:HE(e[r],t[r]);break;case`join`:HE(e[r],t[r]);break;case`handlers`:UE(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function HE(e,t){t&&e.push(...t)}function UE(e,t){t&&Object.assign(e,t)}function WE(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),GE);return i(),o}function GE(e,t,n){return`>`+(n?``:` `)+e}function KE(e,t){return qE(e,t.inConstruct,!0)&&!qE(e,t.notInConstruct,!1)}function qE(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function JE(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
143
+ `&&KE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
144
+ `}function YE(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function XE(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 ZE(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function QE(e,t,n,r){let i=ZE(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(XE(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,$E);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(YE(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
146
145
  `,encode:["`"],...s.current()})),t()}return u+=s.move(`
147
146
  `),a&&(u+=s.move(a+`
148
- `)),u+=s.move(c),l(),u}function eD(e,t,n){return(n?``:` `)+e}function tD(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function nD(e,t,n,r){let i=tD(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
149
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function rD(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function iD(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function aD(e){if(e===null||q(e)||WT(e))return 1;if(UT(e))return 2}function oD(e,t,n){let r=aD(e),i=aD(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}sD.peek=cD;function sD(e,t,n,r){let i=rD(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=oD(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=iD(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=oD(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+iD(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function cD(e,t,n){return n.options.emphasis||`*`}function lD(e,t){let n=!1;return OT(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&AT(e)&&(t.options.setext||n))}function uD(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(lD(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
147
+ `)),u+=s.move(c),l(),u}function $E(e,t,n){return(n?``:` `)+e}function eD(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tD(e,t,n,r){let i=eD(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
148
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function nD(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function rD(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function iD(e){if(e===null||q(e)||UT(e))return 1;if(HT(e))return 2}function aD(e,t,n){let r=iD(e),i=iD(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}oD.peek=sD;function oD(e,t,n,r){let i=nD(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=aD(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=rD(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=aD(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+rD(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function sD(e,t,n){return n.options.emphasis||`*`}function cD(e,t){let n=!1;return DT(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&kT(e)&&(t.options.setext||n))}function lD(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(cD(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
150
149
  `,after:`
151
150
  `});return r(),t(),o+`
152
151
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
153
152
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
154
- `,...a.current()});return/^[\t ]/.test(l)&&(l=iD(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}dD.peek=fD;function dD(e){return e.value||``}function fD(){return`<`}pD.peek=mD;function pD(e,t,n,r){let i=tD(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function mD(){return`!`}hD.peek=gD;function hD(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function gD(){return`!`}_D.peek=vD;function _D(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function vD(){return"`"}function yD(e,t){let n=AT(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}bD.peek=xD;function bD(e,t,n,r){let i=tD(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(yD(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function xD(e,t,n){return yD(e,n)?`<`:`[`}SD.peek=CD;function SD(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function CD(){return`[`}function wD(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function TD(e){let t=wD(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ED(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function DD(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function OD(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?ED(n):wD(n),s=e.ordered?o===`.`?`)`:`.`:TD(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),DD(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function kD(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function AD(e,t,n,r){let i=kD(n),a=n.bulletCurrent||wD(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function jD(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function MD(e,t,n,r){return(e.children.some(function(e){return PT(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ND(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}PD.peek=FD;function PD(e,t,n,r){let i=ND(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=oD(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=iD(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=oD(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+iD(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function FD(e,t,n){return n.options.strong||`*`}function ID(e,t,n,r){return n.safe(e.value,r)}function LD(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function RD(e,t,n){let r=(DD(n)+(n.options.ruleSpaces?` `:``)).repeat(LD(n));return n.options.ruleSpaces?r.slice(0,-1):r}const zD={blockquote:GE,break:YE,code:$E,definition:nD,emphasis:sD,hardBreak:YE,heading:uD,html:dD,image:pD,imageReference:hD,inlineCode:_D,link:bD,linkReference:SD,list:OD,listItem:AD,paragraph:jD,root:MD,strong:PD,text:ID,thematicBreak:RD},BD=[VD];function VD(e,t,n,r){if(t.type===`code`&&ZE(t,r)&&(e.type===`list`||e.type===t.type&&ZE(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&lD(t,r))?void 0:+!!n.spread}const HD=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],UD=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
155
- `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:HD},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
156
- ]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:HD},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
157
- *])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:HD},{atBreak:!0,character:`+`,after:`(?:[ \r
153
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=rD(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}uD.peek=dD;function uD(e){return e.value||``}function dD(){return`<`}fD.peek=pD;function fD(e,t,n,r){let i=eD(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function pD(){return`!`}mD.peek=hD;function mD(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function hD(){return`!`}gD.peek=_D;function gD(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function _D(){return"`"}function vD(e,t){let n=kT(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}yD.peek=bD;function yD(e,t,n,r){let i=eD(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(vD(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function bD(e,t,n){return vD(e,n)?`<`:`[`}xD.peek=SD;function xD(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function SD(){return`[`}function CD(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wD(e){let t=CD(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function TD(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ED(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function DD(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?TD(n):CD(n),s=e.ordered?o===`.`?`)`:`.`:wD(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),ED(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function OD(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function kD(e,t,n,r){let i=OD(n),a=n.bulletCurrent||CD(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function AD(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function jD(e,t,n,r){return(e.children.some(function(e){return NT(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function MD(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ND.peek=PD;function ND(e,t,n,r){let i=MD(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=aD(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=rD(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=aD(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+rD(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function PD(e,t,n){return n.options.strong||`*`}function FD(e,t,n,r){return n.safe(e.value,r)}function ID(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function LD(e,t,n){let r=(ED(n)+(n.options.ruleSpaces?` `:``)).repeat(ID(n));return n.options.ruleSpaces?r.slice(0,-1):r}const RD={blockquote:WE,break:JE,code:QE,definition:tD,emphasis:oD,hardBreak:JE,heading:lD,html:uD,image:fD,imageReference:mD,inlineCode:gD,link:yD,linkReference:xD,list:DD,listItem:kD,paragraph:AD,root:jD,strong:ND,text:FD,thematicBreak:LD},zD=[BD];function BD(e,t,n,r){if(t.type===`code`&&XE(t,r)&&(e.type===`list`||e.type===t.type&&XE(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&cD(t,r))?void 0:+!!n.spread}const VD=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],HD=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
154
+ `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:VD},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
155
+ ]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:VD},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
156
+ *])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:VD},{atBreak:!0,character:`+`,after:`(?:[ \r
158
157
  ])`},{atBreak:!0,character:`-`,after:`(?:[ \r
159
158
  -])`},{atBreak:!0,before:`\\d+`,character:`.`,after:`(?:[ \r
160
- ]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:HD},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:HD},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:HD},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:HD},{atBreak:!0,character:`~`}],WD={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
161
- `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},GD={}.hasOwnProperty;function KD(e){return GD.call(WD,e)?WD[e]:!1}function qD(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}const JD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YD(e){return e.replace(JD,XD)}function XD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return qD(n.slice(t?2:1),t?16:10)}return KD(n)||e}function ZD(e){return e.label||!e.identifier?e.label||``:YD(e.identifier)}function QD(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function $D(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
162
- `)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=iD(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+iD(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function eO(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
159
+ ]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:VD},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:VD},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:VD},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:VD},{atBreak:!0,character:`~`}],UD={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
160
+ `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},WD={}.hasOwnProperty;function GD(e){return WD.call(UD,e)?UD[e]:!1}function KD(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}const qD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function JD(e){return e.replace(qD,YD)}function YD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return KD(n.slice(t?2:1),t?16:10)}return GD(n)||e}function XD(e){return e.label||!e.identifier?e.label||``:JD(e.identifier)}function ZD(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function QD(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
161
+ `)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=rD(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+rD(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function $D(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
163
162
  `,after:`
164
- `,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(tO(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function tO(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
163
+ `,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(eO(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function eO(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
165
164
  `.repeat(1+a);if(a===!1)return`
166
165
 
167
166
  <!---->
168
167
 
169
168
  `}return`
170
169
 
171
- `}const nO=/\r?\n|\r/g;function rO(e,t){let n=[],r=0,i=0,a;for(;a=nO.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function iO(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!qE(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(aO);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(oO(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(iD(r.charCodeAt(e))),c++))}return a.push(oO(r.slice(c,l),n.after)),a.join(``)}function aO(e,t){return e-t}function oO(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function sO(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function cO(e,t){let n=t||{},r={associationId:ZD,containerPhrasing:fO,containerFlow:pO,createTracker:sO,compilePattern:QD,enter:a,handlers:{...zD},handle:void 0,indentLines:rO,indexStack:[],join:[...BD],options:{},safe:mO,stack:[],unsafe:[...UD]};HE(r,n),r.options.tightDefinitions&&r.join.push(dO),r.handle=BE(`type`,{invalid:lO,unknown:uO,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
170
+ `}const tO=/\r?\n|\r/g;function nO(e,t){let n=[],r=0,i=0,a;for(;a=tO.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function rO(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!KE(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(iO);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(aO(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(rD(r.charCodeAt(e))),c++))}return a.push(aO(r.slice(c,l),n.after)),a.join(``)}function iO(e,t){return e-t}function aO(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function oO(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function sO(e,t){let n=t||{},r={associationId:XD,containerPhrasing:dO,containerFlow:fO,createTracker:oO,compilePattern:ZD,enter:a,handlers:{...RD},handle:void 0,indentLines:nO,indexStack:[],join:[...zD],options:{},safe:pO,stack:[],unsafe:[...HD]};VE(r,n),r.options.tightDefinitions&&r.join.push(uO),r.handle=zE(`type`,{invalid:cO,unknown:lO,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
172
171
  `,after:`
173
172
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
174
- `),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function lO(e){throw Error("Cannot handle value `"+e+"`, expected node")}function uO(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function dO(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function fO(e,t){return $D(e,this,t)}function pO(e,t){return eO(e,this,t)}function mO(e,t){return iO(this,e,t)}function hO(){return{enter:{table:gO,tableData:bO,tableHeader:bO,tableRow:vO},exit:{codeText:xO,table:_O,tableData:yO,tableHeader:yO,tableRow:yO}}}function gO(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function _O(e){this.exit(e),this.data.inTable=void 0}function vO(e){this.enter({type:`tableRow`,children:[]},e)}function yO(e){this.exit(e)}function bO(e){this.enter({type:`tableCell`,children:[]},e)}function xO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,SO));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function SO(e,t){return t===`|`?t:e}function CO(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
173
+ `),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function cO(e){throw Error("Cannot handle value `"+e+"`, expected node")}function lO(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function uO(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function dO(e,t){return QD(e,this,t)}function fO(e,t){return $D(e,this,t)}function pO(e,t){return rO(this,e,t)}function mO(){return{enter:{table:hO,tableData:yO,tableHeader:yO,tableRow:_O},exit:{codeText:bO,table:gO,tableData:vO,tableHeader:vO,tableRow:vO}}}function hO(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function gO(e){this.exit(e),this.data.inTable=void 0}function _O(e){this.enter({type:`tableRow`,children:[]},e)}function vO(e){this.exit(e)}function yO(e){this.enter({type:`tableCell`,children:[]},e)}function bO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xO));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function xO(e,t){return t===`|`?t:e}function SO(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
175
174
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
176
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return IE(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=zD.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function wO(){return{exit:{taskListCheckValueChecked:EO,taskListCheckValueUnchecked:EO,paragraph:DO}}}function TO(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:OO}}}function EO(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function DO(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function OO(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=zD.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function kO(){return[$T(),wE(),kE(),hO(),wO()]}function AO(e){return{extensions:[eE(),TE(e),AE(),CO(e),TO()]}}function jO(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function MO(e,t){return e.length>0?(jO(e,e.length,0,t),e):t}const NO={}.hasOwnProperty;function PO(e){let t={},n=-1;for(;++n<e.length;)FO(t,e[n]);return t}function FO(e,t){let n;for(n in t){let r=(NO.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){NO.call(r,a)||(r[a]=[]);let e=i[a];IO(r[a],Array.isArray(e)?e:e?[e]:[])}}}function IO(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);jO(e,0,0,r)}const LO={tokenize:ZO,partial:!0},RO={tokenize:QO,partial:!0},zO={tokenize:$O,partial:!0},BO={tokenize:ek,partial:!0},VO={tokenize:tk,partial:!0},HO={name:`wwwAutolink`,tokenize:YO,previous:nk},UO={name:`protocolAutolink`,tokenize:XO,previous:rk},WO={name:`emailAutolink`,tokenize:JO,previous:ik},GO={};function KO(){return{text:GO}}let qO=48;for(;qO<123;)GO[qO]=WO,qO++,qO===58?qO=65:qO===91&&(qO=97);GO[43]=WO,GO[45]=WO,GO[46]=WO,GO[95]=WO,GO[72]=[WO,UO],GO[104]=[WO,UO],GO[87]=[WO,HO],GO[119]=[WO,HO];function JO(e,t,n){let r=this,i,a;return o;function o(t){return!ak(t)||!ik.call(r,r.previous)||ok(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ak(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(VO,u,l)(t):t===45||t===95||LT(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&IT(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function YO(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!nk.call(r,r.previous)||ok(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(LO,e.attempt(RO,e.attempt(zO,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function XO(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&rk.call(r,r.previous)&&!ok(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(IT(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||zT(t)||q(t)||WT(t)||UT(t)?n(t):e.attempt(RO,e.attempt(zO,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ZO(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function QO(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(BO,c,s)(t):t===null||q(t)||WT(t)||t!==45&&UT(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function $O(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(BO,t,a)(o):o===null||q(o)||WT(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ek(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||q(o)||WT(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||q(e)||WT(e)?t(e):r(e)}function a(e){return IT(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):IT(t)?(e.consume(t),o):n(t)}}function tk(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return LT(e)?n(e):t(e)}}function nk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||q(e)}function rk(e){return!IT(e)}function ik(e){return!(e===47||ak(e))}function ak(e){return e===43||e===45||e===46||e===95||LT(e)}function ok(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function sk(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&LT(e.charCodeAt(n+1))&&LT(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ck(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const lk={name:`attention`,resolveAll:uk,tokenize:dk};function uk(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};fk(d,-c),fk(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=MO(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=MO(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=MO(l,ck(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=MO(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=MO(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,jO(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function dk(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=aD(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=aD(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function fk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pk={name:`autolink`,tokenize:mk};function mk(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return IT(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||LT(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||LT(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||zT(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):RT(t)?(e.consume(t),l):n(t)}function u(e){return LT(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||LT(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}const hk={partial:!0,tokenize:gk};function gk(e,t,n){return r;function r(t){return J(t)?Y(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}const _k={continuation:{tokenize:yk},exit:bk,name:`blockQuote`,tokenize:vk};function vk(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return J(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function yk(e,t,n){let r=this;return i;function i(t){return J(t)?Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(_k,t,n)(r)}}function bk(e){e.exit(`blockQuote`)}const xk={name:`characterEscape`,tokenize:Sk};function Sk(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return HT(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}const Ck={name:`characterReference`,tokenize:wk};function wk(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=LT,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=VT,u):(e.enter(`characterReferenceValue`),a=7,o=BT,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===LT&&!KD(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}const Tk={partial:!0,tokenize:Ok},Ek={concrete:!0,name:`codeFenced`,tokenize:Dk};function Dk(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Tk,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Y(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&J(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(Tk,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J(t)?Y(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ok(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const kk={name:`codeIndented`,tokenize:jk},Ak={partial:!0,tokenize:Mk};function jk(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Y(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):K(t)?e.attempt(Ak,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||K(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Mk(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Y(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):K(e)?i(e):n(e)}}const Nk={name:`codeText`,previous:Fk,resolve:Pk,tokenize:Ik};function Pk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Fk(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Ik(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Lk=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw 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){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Rk(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Rk(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Rk(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){let t=this.left.splice(e,1/0);Rk(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Rk(this.left,t.reverse())}}};function Rk(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function zk(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Lk(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Bk(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return jO(e,0,1/0,u.slice(0)),!l}function Bk(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}const Vk={resolve:Uk,tokenize:Wk},Hk={partial:!0,tokenize:Gk};function Uk(e){return zk(e),e}function Wk(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K(t)?e.check(Hk,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Gk(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,a,`linePrefix`)}function a(i){if(i===null||K(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Kk(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||zT(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||zT(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function qk(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Jk(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Yk(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}const Xk={name:`definition`,tokenize:Qk},Zk={partial:!0,tokenize:$k};function Qk(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return qk.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=pE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q(t)?Yk(e,l)(t):l(t)}function l(t){return Kk(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Zk,d,d)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function $k(e,t,n){return r;function r(t){return q(t)?Yk(e,i)(t):n(t)}function i(t){return Jk(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}const eA={name:`hardBreakEscape`,tokenize:tA};function tA(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}const nA={name:`headingAtx`,resolve:rA,tokenize:iA};function rA(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},jO(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function iA(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Y(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}const aA=`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`.split(`.`),oA=[`pre`,`script`,`style`,`textarea`],sA={concrete:!0,name:`htmlFlow`,resolveTo:uA,tokenize:dA},cA={partial:!0,tokenize:pA},lA={partial:!0,tokenize:fA};function uA(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 dA(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:se):IT(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):IT(a)?(e.consume(a),i=4,r.interrupt?t:se):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:se):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return IT(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&oA.includes(l)?(i=1,r.interrupt?t(s):D(s)):aA.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||LT(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||IT(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||LT(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||K(t)?D(t):J(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),se):t===93&&i===5?(e.consume(t),oe):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(cA,le,te)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(lA,ne,le)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||K(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),se):D(t)}function O(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return oA.includes(n)?(e.consume(t),ce):D(t)}return IT(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),se):D(t)}function se(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),se):D(t)}function ce(t){return t===null||K(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function fA(e,t,n){let r=this;return i;function i(t){return K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function pA(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(hk,t,n)}}const mA={name:`htmlText`,tokenize:hA};function hA(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):IT(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):IT(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):K(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return IT(t)?(e.consume(t),S):n(t)}function S(t){return t===45||LT(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,O(t)):J(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||LT(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||IT(t)?(e.consume(t),E):K(t)?(o=T,O(t)):J(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||LT(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):K(t)?(o=ee,O(t)):J(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):K(t)?(o=D,O(t)):J(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):K(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||q(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return J(t)?Y(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}const gA={name:`labelEnd`,resolveAll:bA,resolveTo:xA,tokenize:SA},_A={tokenize:CA},vA={tokenize:wA},yA={tokenize:TA};function bA(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&jO(e,0,e.length,n),e}function xA(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=MO(s,e.slice(a+1,a+r+3)),s=MO(s,[[`enter`,u,t]]),s=MO(s,ck(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=MO(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=MO(s,e.slice(o+1)),s=MO(s,[[`exit`,c,t]]),jO(e,a,e.length,s),e}function SA(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(pE(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(_A,u,o?u:d)(t):t===91?e.attempt(vA,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(yA,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function CA(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return q(t)?Yk(e,a)(t):a(t)}function a(t){return t===41?u(t):Kk(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q(t)?Yk(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Jk(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q(t)?Yk(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function wA(e,t,n){let r=this;return i;function i(t){return qk.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(pE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function TA(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}const EA={name:`labelStartImage`,resolveAll:gA.resolveAll,tokenize:DA};function DA(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const OA={name:`labelStartLink`,resolveAll:gA.resolveAll,tokenize:kA};function kA(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const AA={name:`lineEnding`,tokenize:jA};function jA(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}}const MA={name:`thematicBreak`,tokenize:NA};function NA(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Y(e,s,`whitespace`)(t):s(t))}}const PA={continuation:{tokenize:RA},exit:BA,name:`list`,tokenize:LA},FA={partial:!0,tokenize:VA},IA={partial:!0,tokenize:zA};function LA(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:BT(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(MA,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return BT(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(hk,r.interrupt?n:u,e.attempt(FA,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function RA(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(hk,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(IA,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(PA,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function zA(e,t,n){let r=this;return Y(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function BA(e){e.exit(this.containerState.type)}function VA(e,t,n){let r=this;return Y(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}const HA={name:`setextUnderline`,resolveTo:UA,tokenize:WA};function UA(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function WA(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}const GA={tokenize:$A,partial:!0};function KA(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:XA,continuation:{tokenize:ZA},exit:QA}},text:{91:{name:`gfmFootnoteCall`,tokenize:YA},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:qA,resolveTo:JA}}}}function qA(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=pE(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function JA(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function YA(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(pE(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function XA(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=pE(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function ZA(e,t,n){return e.check(hk,t,e.attempt(GA,t,n))}function QA(e){e.exit(`gfmFootnoteDefinition`)}function $A(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ej(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&jO(o,o.length,0,ck(s,e.slice(r+1,n),t)),jO(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),jO(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=aD(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=aD(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var tj=class{constructor(){this.map=[]}add(e,t,n){nj(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function nj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function rj(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ij(){return{flow:{null:{name:`table`,tokenize:aj,resolveAll:oj}}}}function aj(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function oj(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new tj;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(cj(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=sj(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=sj(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=sj(f,t,o,i,n,d)):(o[0]=o[1],d=sj(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&cj(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=rj(t.events,n))}return e}function sj(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},lj(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=lj(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=lj(t.events,n[2]),a=lj(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},lj(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function cj(e,t,n,r,i){let a=[],o=lj(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function lj(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const uj={name:`tasklistCheck`,tokenize:fj};function dj(){return{text:{91:uj}}}function fj(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):J(r)?e.check({tokenize:pj},t,n)(r):n(r)}}function pj(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function mj(e){return PO([KO(),KA(),ej(e),ij(),dj()])}const hj={};function gj(e){let t=this,n=e||hj,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(mj(n)),a.push(kO()),o.push(AO(n))}function _j(e){let t=this;t.compiler=n;function n(n){return cO(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function vj(e){if(e)throw e}var yj=t(r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function bj(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xj(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Sj(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Sj(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}const Cj=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),wj={}.hasOwnProperty,Tj=new class e extends Cj{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=xj()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,yj.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Oj(`data`,this.frozen),this.namespace[e]=t,this):wj.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Oj(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=jj(e),n=this.parser||this.Parser;return Ej(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Ej(`process`,this.parser||this.Parser),Dj(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=jj(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Nj(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Ej(`processSync`,this.parser||this.Parser),Dj(`processSync`,this.compiler||this.Compiler),this.process(e,r),Aj(`processSync`,`process`,t),n;function r(e,r){t=!0,vj(e),n=r}}run(e,t,n){kj(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=jj(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Aj(`runSync`,`run`,n),r;function i(e,t){vj(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=jj(t),r=this.compiler||this.Compiler;return Dj(`stringify`,r),kj(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Oj(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,yj.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];bj(o)&&bj(r)&&(r=(0,yj.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Ej(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Dj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Oj(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kj(e){if(!bj(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Aj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function jj(e){return Mj(e)?e:new $w(e)}function Mj(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Nj(e){return typeof e==`string`||Pj(e)}function Pj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function Fj(e){let t=[],n=0,r=()=>{t.length>0&&(n+=1)},i=e=>{for(;n>0;)t.push({type:`break`}),--n;t.push(e)},a=e=>{e.split(`
177
- `).forEach((e,t)=>{t>0&&r(),e.length>0&&i({type:`text`,value:e})})},o=e=>{let t=e.ordered===!0,n=typeof e.start==`number`?e.start:1,a=e.data,o=typeof a?.bulletMarker==`string`?a.bulletMarker:`-`,c=typeof a?.listMarkerDelimiter==`string`?a.listMarkerDelimiter:`.`;e.children.forEach((e,a)=>{a>0&&r(),i({type:`text`,value:t?`${n+a}${c} `:`${o} `}),e.children.forEach((e,t)=>{t>0&&r(),s(e)})})},s=e=>{switch(e.type){case`paragraph`:case`heading`:e.children.forEach(i);return;case`list`:o(e);return;case`code`:case`html`:a(e.value);return;case`thematicBreak`:i({type:`text`,value:e.data?.sourceRaw??`---`});return;default:{let t=e;if(Array.isArray(t.children)&&t.children.length>0){t.children.forEach((e,t)=>{t>0&&r(),s(e)});return}let n=e;if(typeof n.value==`string`){a(n.value);return}console.warn(JSON.stringify({event:`table-cell-flatten-dropped-block`,nodeType:e.type}))}}};return e.forEach((e,t)=>{t>0&&r(),s(e)}),t}function Ij(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Lj(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Lj(t.slice(i),i>0,!1)),a.join(``)}function Lj(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===9||t===32;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===9||t===32;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Rj(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return OT(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return Kj(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){let t=i?r[i-1]:void 0;if(t?.type===`break`&&t.data?.sourceStyle!==`html`){if(!Array.isArray(a)&&a.type===e.nodes.text){let t=Hj(a.text);a=t.length>0?e.text(t):void 0}else if(!Array.isArray(a)&&a.type!==e.nodes.text){let t=a.firstChild;if(t&&t.type===e.nodes.text){let n=Hj(t.text),r=A.from(a.content);a=a.copy(n.length>0?r.replaceChild(0,e.text(n)):r.cut(t.nodeSize))}}}}a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}}function zj(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function Bj(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(A.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(A.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function Vj(e){throw Error(`unknown markdown node: ${e.type}`)}function Hj(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Uj(){}function Wj(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function Gj(e,t,n,r){return BE(`tagName`,{handlers:e})(t,n,r)}function Kj(e,t,n,r,i,a){return BE(`type`,{invalid:Wj,unknown:Vj,handlers:{toml:Uj,yaml:Uj,definition:Uj,footnoteDefinition:Uj,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=uT(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?Gj(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=zj(Ij(String(t.value)));return n?e.text(n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return Bj(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function qj(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function Jj(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}const Yj=function(e,t){let n=Kj(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,Rj(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},Xj=function(e){this.compiler=function(t){return Yj(t,e)}};function Zj(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>hT(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){console.warn(`[mdast-util-from-prosemirror] degenerate mark partition; falling back to per-span rendering`,{spanCount:e.length,firstSpanMarks:e[0]?.marks.map(e=>e.type.name),lastSpanMarks:e[e.length-1]?.marks.map(e=>e.type.name)});let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function Qj(e,t){return Zj(t.nodeHandlers,t.markHandlers).one(e)}function $j(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function eM(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}function tM(e,t){let n=0;for(let r=0;r<t.length&&n<e.length;r++)e[n]===t[r]&&n++;return n===e.length}const nM=new Set([`sourceRaw`,`sourceDirty`,`position`]),rM=new Set([`jsxComponent`,`table`,`tableRow`,`tableCell`,`tableHeader`,`list`,`listItem`,`blockquote`,`codeBlock`,`heading`]),iM={type:`__br__`},aM=/^<br\s*\/?>$/i;function oM(e){let t=dM(e,oM);return(t.type===`tableCell`||t.type===`tableHeader`)&&t.content?{...t,content:sM(t.content)}:t}function sM(e){let t=[];for(let n of e){let e=cM(n);e.length!==0&&(t.length>0&&t.push(iM),t.push(...e))}return t}function cM(e){return e.text!==void 0||e.type===`hardBreak`||e.type===`jsxInline`?[e]:!e.content||e.content.length===0?[]:e.content.some(e=>e.text===void 0&&e.type!==`hardBreak`&&e.type!==`jsxInline`&&!!e.content)?sM(e.content):e.content}function lM(e){return e.type===`hardBreak`||e.type===iM.type||e.text!==void 0&&aM.test(e.text.trim())?iM:dM(e,lM)}const uM=[{label:`table-cell-block-flatten`,severity:`pm-model-caused`,rationale:`GFM table cells have no block spelling; a block placed in a cell is flattened to inline on serialize, so a cell-with-blocks and a cell-with-inline describe the same persisted document.`,proofPointer:`markdown/table-cell-flatten.ts flattenCellBlocks (table-cell-flatten-dropped-block event)`,canonicalize:oM},{label:`void-hardbreak-br`,severity:`serializer-caused`,rationale:`A void hardBreak inside a table cell or heading serializes to a literal <br /> that a fresh parse keeps as text; the node form and the literal form are the same break.`,proofPointer:`markdown/void-br-promoter.ts + markdown/to-markdown-handlers.ts break handler`,canonicalize:lM}];function dM(e,t){return e.content?{...e,content:e.content.map(t)}:e}function fM(e,t){let n={};e.type!==void 0&&(n.type=e.type),e.text!==void 0&&(n.text=e.text);let r=pM(e.attrs,t);return r&&(n.attrs=r),e.marks&&e.marks.length>0&&(n.marks=[...e.marks].map(e=>({type:e.type,attrs:pM(e.attrs,t)})).sort((e,t)=>hM(e).localeCompare(hM(t)))),e.content&&e.content.length>0&&(n.content=e.content.map(e=>fM(e,t))),n}function pM(e,t){if(!e)return null;let n={};for(let r of Object.keys(e).sort()){if(nM.has(r)||t?.(r))continue;let i=e[r];i!=null&&(n[r]=t?mM(i,t):i)}return Object.keys(n).length>0?n:null}function mM(e,t){if(Array.isArray(e))return e.map(e=>mM(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))t(r)||(n[r]=mM(i,t));return n}return e}function hM(e){return JSON.stringify(e,(e,t)=>{if(t&&typeof t==`object`&&!Array.isArray(t)){let e={};for(let n of Object.keys(t).sort())e[n]=t[n];return e}return t})}function gM(e){let t=``,n=e=>{if(e.text!==void 0&&(t+=e.text),e.content)for(let t of e.content)n(t)};return n(e),t.replace(/\s+/g,``)}function _M(e){let t=[],n=e=>{if(e.type&&rM.has(e.type)){let n=e.type===`jsxComponent`?String(e.attrs?.componentName??``):``;t.push(n?`${e.type}:${n}`:e.type)}if(e.content)for(let t of e.content)n(t)};return n(e),t.sort()}function vM(e){let t=e,n=[];for(let e of uM){let r=hM(t),i=e.canonicalize(t);hM(i)!==r&&n.push(e.label),t=i}return{normalized:t,fired:n}}function yM(e,t,n={}){let r=vM(e),i=vM(t),a=[...new Set([...r.fired,...i.fired])];if(!tM(gM(r.normalized),gM(i.normalized)))return{equivalent:!1,level:`L1`,reason:`content-loss`,appliedDegrades:a,detail:`authored text did not survive the round-trip`};let o=_M(r.normalized),s=_M(i.normalized);if(hM(o)!==hM(s))return{equivalent:!1,level:`L1`,reason:`structural-shatter`,appliedDegrades:a,detail:`container multiset diverged: [${o.join(`, `)}] vs [${s.join(`, `)}]`};let c=fM(r.normalized,n.ignoreAttrs),l=fM(i.normalized,n.ignoreAttrs);return hM(c)===hM(l)?{equivalent:!0,level:a.length>0?`L2`:`L1`,appliedDegrades:a}:{equivalent:!1,level:`L2`,reason:`structural-divergence`,appliedDegrades:a,detail:bM(c,l)}}function bM(e,t,n=`doc`){let r=e,i=t;if(!r||!i)return`${n}: node presence differs`;if(r.type!==i.type)return`${n}: type ${String(r.type)} vs ${String(i.type)}`;let a=r.content??[],o=i.content??[];if(a.length!==o.length)return`${n}(${String(r.type)}): child count ${a.length} vs ${o.length}`;for(let e=0;e<a.length;e++)if(hM(a[e])!==hM(o[e]))return bM(a[e],o[e],`${n}>${String(r.type)}[${e}]`);return`${n}(${String(r.type)}): attrs or marks differ`}function xM(e,t,n){return!yM(e,t,{ignoreAttrs:n}).equivalent}const SM=new Set([`src`,`href`,`size`]),CM=new Set([`WikiEmbedImage`,`WikiEmbedVideo`,`WikiEmbedAudio`,`WikiEmbedFile`]);function wM(e){if(Array.isArray(e))return e.map(e=>wM(e));if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))SM.has(n)||(t[n]=wM(r));return t}return e}function TM(e){return e.type===`jsxComponent`&&typeof e.attrs?.componentName==`string`&&CM.has(e.attrs.componentName)?wM(e):e.content?{...e,content:e.content.map(TM)}:e}function EM(e){if(Array.isArray(e))return e.map(e=>EM(e));if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))n!==`position`&&(t[n]=EM(r));return t}return e}function DM(e){if(e.type===`jsxComponent`)return e;if(e.content)for(let t of e.content){let e=DM(t);if(e)return e}}function OM(e){let t=e.cacheLimit??2048,n=new Map,r=r=>{let i=n.get(r);if(i!==void 0)return i;let a=DM(e.parse(r)),o=a?TM(EM(a)):null;if(n.size>=t){let e=n.keys().next().value;e!==void 0&&n.delete(e)}return n.set(r,o),o};return{isDiverged(e){if(e.type!==`jsxComponent`||!e.attrs||e.attrs.kind===`expression`)return!1;let t=e.attrs.sourceRaw;if(typeof t!=`string`||t.length===0)return!1;let n=r(t);return n?xM(n,TM(EM(e))):!1}}}function kM(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&AM(e.value.value,t))continue}let o=jM(e,t);r>=0?n[r]=o:n.push(o)}return n}function AM(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function jM(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function MM(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:kM(t,r),children:n.all(t),data:{}}}const NM=/^[A-Za-z0-9]{20,}$/,PM=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function FM(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function IM(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return NM.test(n)?n:null}function LM(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!FM(t.hostname))return null;let n=IM(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&PM.test(r)?r:null}}function RM(e){return LM(e)!==null}function zM(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function BM(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:zM(t.hostname)}const VM=/^[A-Za-z0-9_-]{11}$/;function HM(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function UM(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function WM(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return VM.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return VM.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function GM(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!HM(t.hostname))return null;let n=WM(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?UM(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}const KM=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],qM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:a,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],JM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],YM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:w,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(BM(e.src)||RM(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:a,hideWhen:e=>typeof e.src==`string`&&(BM(e.src)||RM(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&RM(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(BM(e.src)||RM(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(GM(e.src)!==null||BM(e.src)||RM(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],XM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:o,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],ZM=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],QM=[KM[0],KM[1],KM[4],KM[5],KM[6]],$M=[qM[0],qM[1],qM[7]],eN=[ZM[0],ZM[1],ZM[4],ZM[5]],tN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],nN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],rN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],iN=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],aN=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],oN=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],sN=[oN[0]],cN=[oN[0]],lN=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],uN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],dN=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],fN=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:l,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],pN=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],mN=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function hN(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function gN(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function _N(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}const vN=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:KM,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>MM(`Callout`,e,t,KM)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:qM,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>MM(`img`,e,t,qM)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:YM,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>MM(`video`,e,t,YM)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:XM,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>MM(`audio`,e,t,XM)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:fN,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>MM(`Pdf`,e,t,fN)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:dN,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>MM(`File`,e,t,dN)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:JM,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>MM(`Embed`,e,t,JM)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:ZM,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>MM(`Accordion`,e,t,ZM)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:iN,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
178
- <Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>MM(`Tabs`,e,t,iN)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:aN,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>MM(`Tab`,e,t,aN)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:oN,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>MM(`Math`,e,t,oN)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:lN,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:pN,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>MM(`Mirror`,e,t,pN)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:mN,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>MM(`MirrorSource`,e,t,mN)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:QM,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:$M,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (`![alt](src "title")`) — read-only compat. Preserves `![alt](src)` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:tN,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:_N},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:nN,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:_N},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:rN,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:_N},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:uN,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:_N},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:eN,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${hN(n.name)}"`:``,a=n?.id?` id="${hN(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${gN(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:sN,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:cN,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],yN={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>MM(e.attrs.componentName||`*`,e,t)};function bN(){let e=new Map;e.set(`*`,yN);for(let t of vN)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}function xN(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const SN={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function CN(){SN.parseFallback.blockLevel++}function wN(){SN.parseFallback.wholeDoc++}function TN(){SN.parseFallback.wholeDocBudget++}function EN(){let e=xN();return{parseFallback:{...SN.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...SN.jsxRenderFailure},jsxAutoConvertFailed:{...SN.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...SN.jsxAutoConvertSucceeded},jsxPropDropped:{...SN.jsxPropDropped},jsxMoveFailed:{...SN.jsxMoveFailed},jsxStuckCopyFailed:{...SN.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...SN.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...SN.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...SN.jsxKeyboardDeleteFailed},blockGripClickSelectFailed:{...SN.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...SN.jsxArrowNodeSelectFailed}}}const DN=/^(`{3,}|~{3,})/gm;function ON(e){let t=[],n=null;for(let r of e.matchAll(DN)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function kN(e,t){return t.some(([t,n])=>e>=t&&e<n)}const AN=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function jN(e){let t=ON(e),n=[];for(let r of e.matchAll(AN))kN(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
179
- `)}\n\n`:``}function MN(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return FN(e,t.parse,0,n)}function NN(e){return e.calls>=1e3?!0:(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=500}function PN(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split(`
175
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return FE(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=RD.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function CO(){return{exit:{taskListCheckValueChecked:TO,taskListCheckValueUnchecked:TO,paragraph:EO}}}function wO(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:DO}}}function TO(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function EO(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function DO(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=RD.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function OO(){return[QT(),CE(),OE(),mO(),CO()]}function kO(e){return{extensions:[$T(),wE(e),kE(),SO(e),wO()]}}function AO(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function jO(e,t){return e.length>0?(AO(e,e.length,0,t),e):t}const MO={}.hasOwnProperty;function NO(e){let t={},n=-1;for(;++n<e.length;)PO(t,e[n]);return t}function PO(e,t){let n;for(n in t){let r=(MO.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){MO.call(r,a)||(r[a]=[]);let e=i[a];FO(r[a],Array.isArray(e)?e:e?[e]:[])}}}function FO(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);AO(e,0,0,r)}const IO={tokenize:XO,partial:!0},LO={tokenize:ZO,partial:!0},RO={tokenize:QO,partial:!0},zO={tokenize:$O,partial:!0},BO={tokenize:ek,partial:!0},VO={name:`wwwAutolink`,tokenize:JO,previous:tk},HO={name:`protocolAutolink`,tokenize:YO,previous:nk},UO={name:`emailAutolink`,tokenize:qO,previous:rk},WO={};function GO(){return{text:WO}}let KO=48;for(;KO<123;)WO[KO]=UO,KO++,KO===58?KO=65:KO===91&&(KO=97);WO[43]=UO,WO[45]=UO,WO[46]=UO,WO[95]=UO,WO[72]=[UO,HO],WO[104]=[UO,HO],WO[87]=[UO,VO],WO[119]=[UO,VO];function qO(e,t,n){let r=this,i,a;return o;function o(t){return!ik(t)||!rk.call(r,r.previous)||ak(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return ik(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(BO,u,l)(t):t===45||t===95||IT(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&FT(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function JO(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!tk.call(r,r.previous)||ak(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(IO,e.attempt(LO,e.attempt(RO,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function YO(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&nk.call(r,r.previous)&&!ak(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(FT(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||RT(t)||q(t)||UT(t)||HT(t)?n(t):e.attempt(LO,e.attempt(RO,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function XO(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function ZO(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(zO,c,s)(t):t===null||q(t)||UT(t)||t!==45&&HT(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function QO(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(zO,t,a)(o):o===null||q(o)||UT(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function $O(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||q(o)||UT(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||q(e)||UT(e)?t(e):r(e)}function a(e){return FT(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):FT(t)?(e.consume(t),o):n(t)}}function ek(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return IT(e)?n(e):t(e)}}function tk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||q(e)}function nk(e){return!FT(e)}function rk(e){return!(e===47||ik(e))}function ik(e){return e===43||e===45||e===46||e===95||IT(e)}function ak(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function ok(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&IT(e.charCodeAt(n+1))&&IT(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function sk(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ck={name:`attention`,resolveAll:lk,tokenize:uk};function lk(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};dk(d,-c),dk(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=jO(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=jO(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=jO(l,sk(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=jO(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=jO(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,AO(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function uk(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=iD(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=iD(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function dk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fk={name:`autolink`,tokenize:pk};function pk(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return FT(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||IT(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||IT(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||RT(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):LT(t)?(e.consume(t),l):n(t)}function u(e){return IT(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||IT(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}const mk={partial:!0,tokenize:hk};function hk(e,t,n){return r;function r(t){return J(t)?Y(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}const gk={continuation:{tokenize:vk},exit:yk,name:`blockQuote`,tokenize:_k};function _k(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return J(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function vk(e,t,n){let r=this;return i;function i(t){return J(t)?Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(gk,t,n)(r)}}function yk(e){e.exit(`blockQuote`)}const bk={name:`characterEscape`,tokenize:xk};function xk(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return VT(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}const Sk={name:`characterReference`,tokenize:Ck};function Ck(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=IT,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=BT,u):(e.enter(`characterReferenceValue`),a=7,o=zT,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===IT&&!GD(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}const wk={partial:!0,tokenize:Dk},Tk={concrete:!0,name:`codeFenced`,tokenize:Ek};function Ek(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(wk,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Y(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&J(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(wk,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J(t)?Y(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Dk(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const Ok={name:`codeIndented`,tokenize:Ak},kk={partial:!0,tokenize:jk};function Ak(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Y(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):K(t)?e.attempt(kk,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||K(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function jk(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Y(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):K(e)?i(e):n(e)}}const Mk={name:`codeText`,previous:Pk,resolve:Nk,tokenize:Fk};function Nk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Pk(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Fk(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Ik=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw 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){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Lk(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Lk(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Lk(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){let t=this.left.splice(e,1/0);Lk(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Lk(this.left,t.reverse())}}};function Lk(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Rk(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Ik(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,zk(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return AO(e,0,1/0,u.slice(0)),!l}function zk(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}const Bk={resolve:Hk,tokenize:Uk},Vk={partial:!0,tokenize:Wk};function Hk(e){return Rk(e),e}function Uk(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K(t)?e.check(Vk,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Wk(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,a,`linePrefix`)}function a(i){if(i===null||K(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Gk(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||RT(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||RT(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Kk(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function qk(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Jk(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}const Yk={name:`definition`,tokenize:Zk},Xk={partial:!0,tokenize:Qk};function Zk(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Kk.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=fE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q(t)?Jk(e,l)(t):l(t)}function l(t){return Gk(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Xk,d,d)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Qk(e,t,n){return r;function r(t){return q(t)?Jk(e,i)(t):n(t)}function i(t){return qk(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}const $k={name:`hardBreakEscape`,tokenize:eA};function eA(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}const tA={name:`headingAtx`,resolve:nA,tokenize:rA};function nA(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},AO(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function rA(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Y(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}const iA=`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`.split(`.`),aA=[`pre`,`script`,`style`,`textarea`],oA={concrete:!0,name:`htmlFlow`,resolveTo:lA,tokenize:uA},sA={partial:!0,tokenize:fA},cA={partial:!0,tokenize:dA};function lA(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 uA(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:se):FT(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):FT(a)?(e.consume(a),i=4,r.interrupt?t:se):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:se):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return FT(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&aA.includes(l)?(i=1,r.interrupt?t(s):D(s)):iA.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||IT(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||FT(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||IT(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||K(t)?D(t):J(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),se):t===93&&i===5?(e.consume(t),oe):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(sA,le,te)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(cA,ne,le)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||K(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),se):D(t)}function O(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return aA.includes(n)?(e.consume(t),ce):D(t)}return FT(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),se):D(t)}function se(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),se):D(t)}function ce(t){return t===null||K(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function dA(e,t,n){let r=this;return i;function i(t){return K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function fA(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(mk,t,n)}}const pA={name:`htmlText`,tokenize:mA};function mA(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):FT(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):FT(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):K(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return FT(t)?(e.consume(t),S):n(t)}function S(t){return t===45||IT(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,O(t)):J(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||IT(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||FT(t)?(e.consume(t),E):K(t)?(o=T,O(t)):J(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||IT(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):K(t)?(o=ee,O(t)):J(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):K(t)?(o=D,O(t)):J(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):K(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||q(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return J(t)?Y(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}const hA={name:`labelEnd`,resolveAll:yA,resolveTo:bA,tokenize:xA},gA={tokenize:SA},_A={tokenize:CA},vA={tokenize:wA};function yA(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&AO(e,0,e.length,n),e}function bA(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=jO(s,e.slice(a+1,a+r+3)),s=jO(s,[[`enter`,u,t]]),s=jO(s,sk(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=jO(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=jO(s,e.slice(o+1)),s=jO(s,[[`exit`,c,t]]),AO(e,a,e.length,s),e}function xA(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(fE(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(gA,u,o?u:d)(t):t===91?e.attempt(_A,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(vA,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function SA(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return q(t)?Jk(e,a)(t):a(t)}function a(t){return t===41?u(t):Gk(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q(t)?Jk(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?qk(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q(t)?Jk(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function CA(e,t,n){let r=this;return i;function i(t){return Kk.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(fE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function wA(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}const TA={name:`labelStartImage`,resolveAll:hA.resolveAll,tokenize:EA};function EA(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const DA={name:`labelStartLink`,resolveAll:hA.resolveAll,tokenize:OA};function OA(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}const kA={name:`lineEnding`,tokenize:AA};function AA(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}}const jA={name:`thematicBreak`,tokenize:MA};function MA(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Y(e,s,`whitespace`)(t):s(t))}}const NA={continuation:{tokenize:LA},exit:zA,name:`list`,tokenize:IA},PA={partial:!0,tokenize:BA},FA={partial:!0,tokenize:RA};function IA(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:zT(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(jA,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return zT(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(mk,r.interrupt?n:u,e.attempt(PA,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function LA(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(mk,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(FA,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(NA,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function RA(e,t,n){let r=this;return Y(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function zA(e){e.exit(this.containerState.type)}function BA(e,t,n){let r=this;return Y(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}const VA={name:`setextUnderline`,resolveTo:HA,tokenize:UA};function HA(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function UA(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}const WA={tokenize:QA,partial:!0};function GA(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:YA,continuation:{tokenize:XA},exit:ZA}},text:{91:{name:`gfmFootnoteCall`,tokenize:JA},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:KA,resolveTo:qA}}}}function KA(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=fE(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function qA(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function JA(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(fE(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function YA(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=fE(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function XA(e,t,n){return e.check(mk,t,e.attempt(WA,t,n))}function ZA(e){e.exit(`gfmFootnoteDefinition`)}function QA(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function $A(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&AO(o,o.length,0,sk(s,e.slice(r+1,n),t)),AO(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),AO(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=iD(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=iD(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ej=class{constructor(){this.map=[]}add(e,t,n){tj(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function tj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function nj(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function rj(){return{flow:{null:{name:`table`,tokenize:ij,resolveAll:aj}}}}function ij(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function aj(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ej;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(sj(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=oj(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=oj(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=oj(f,t,o,i,n,d)):(o[0]=o[1],d=oj(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&sj(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=nj(t.events,n))}return e}function oj(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},cj(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=cj(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=cj(t.events,n[2]),a=cj(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},cj(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function sj(e,t,n,r,i){let a=[],o=cj(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function cj(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}const lj={name:`tasklistCheck`,tokenize:dj};function uj(){return{text:{91:lj}}}function dj(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):J(r)?e.check({tokenize:fj},t,n)(r):n(r)}}function fj(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function pj(e){return NO([GO(),GA(),$A(e),rj(),uj()])}const mj={};function hj(e){let t=this,n=e||mj,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(pj(n)),a.push(OO()),o.push(kO(n))}function gj(e){let t=this;t.compiler=n;function n(n){return sO(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function _j(e){if(e)throw e}var vj=t(r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function yj(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bj(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?xj(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function xj(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}const Sj=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Cj={}.hasOwnProperty,wj=new class e extends Sj{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=bj()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,vj.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Dj(`data`,this.frozen),this.namespace[e]=t,this):Cj.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Dj(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Aj(e),n=this.parser||this.Parser;return Tj(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Tj(`process`,this.parser||this.Parser),Ej(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Aj(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Mj(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Tj(`processSync`,this.parser||this.Parser),Ej(`processSync`,this.compiler||this.Compiler),this.process(e,r),kj(`processSync`,`process`,t),n;function r(e,r){t=!0,_j(e),n=r}}run(e,t,n){Oj(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Aj(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),kj(`runSync`,`run`,n),r;function i(e,t){_j(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Aj(t),r=this.compiler||this.Compiler;return Ej(`stringify`,r),Oj(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Dj(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,vj.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];yj(o)&&yj(r)&&(r=(0,vj.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Tj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Ej(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Dj(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oj(e){if(!yj(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function kj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Aj(e){return jj(e)?e:new Qw(e)}function jj(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Mj(e){return typeof e==`string`||Nj(e)}function Nj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function Pj(e){let t=[],n=0,r=()=>{t.length>0&&(n+=1)},i=e=>{for(;n>0;)t.push({type:`break`}),--n;t.push(e)},a=e=>{e.split(`
176
+ `).forEach((e,t)=>{t>0&&r(),e.length>0&&i({type:`text`,value:e})})},o=e=>{let t=e.ordered===!0,n=typeof e.start==`number`?e.start:1,a=e.data,o=typeof a?.bulletMarker==`string`?a.bulletMarker:`-`,c=typeof a?.listMarkerDelimiter==`string`?a.listMarkerDelimiter:`.`;e.children.forEach((e,a)=>{a>0&&r(),i({type:`text`,value:t?`${n+a}${c} `:`${o} `}),e.children.forEach((e,t)=>{t>0&&r(),s(e)})})},s=e=>{switch(e.type){case`paragraph`:case`heading`:e.children.forEach(i);return;case`list`:o(e);return;case`code`:case`html`:a(e.value);return;case`thematicBreak`:i({type:`text`,value:e.data?.sourceRaw??`---`});return;default:{let t=e;if(Array.isArray(t.children)&&t.children.length>0){t.children.forEach((e,t)=>{t>0&&r(),s(e)});return}let n=e;if(typeof n.value==`string`){a(n.value);return}console.warn(JSON.stringify({event:`table-cell-flatten-dropped-block`,nodeType:e.type}))}}};return e.forEach((e,t)=>{t>0&&r(),s(e)}),t}function Fj(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Ij(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ij(t.slice(i),i>0,!1)),a.join(``)}function Ij(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===9||t===32;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===9||t===32;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Lj(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return DT(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return Gj(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){let t=i?r[i-1]:void 0;if(t?.type===`break`&&t.data?.sourceStyle!==`html`){if(!Array.isArray(a)&&a.type===e.nodes.text){let t=Vj(a.text);a=t.length>0?e.text(t):void 0}else if(!Array.isArray(a)&&a.type!==e.nodes.text){let t=a.firstChild;if(t&&t.type===e.nodes.text){let n=Vj(t.text),r=A.from(a.content);a=a.copy(n.length>0?r.replaceChild(0,e.text(n)):r.cut(t.nodeSize))}}}}a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}}function Rj(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function zj(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(A.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(A.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function Bj(e){throw Error(`unknown markdown node: ${e.type}`)}function Vj(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Hj(){}function Uj(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function Wj(e,t,n,r){return zE(`tagName`,{handlers:e})(t,n,r)}function Gj(e,t,n,r,i,a){return zE(`type`,{invalid:Uj,unknown:Bj,handlers:{toml:Hj,yaml:Hj,definition:Hj,footnoteDefinition:Hj,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=lT(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?Wj(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=Rj(Fj(String(t.value)));return n?e.text(n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return zj(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function Kj(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function qj(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}const Jj=function(e,t){let n=Gj(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,Lj(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},Yj=function(e){this.compiler=function(t){return Jj(t,e)}};function Xj(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>mT(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){console.warn(`[mdast-util-from-prosemirror] degenerate mark partition; falling back to per-span rendering`,{spanCount:e.length,firstSpanMarks:e[0]?.marks.map(e=>e.type.name),lastSpanMarks:e[e.length-1]?.marks.map(e=>e.type.name)});let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function Zj(e,t){return Xj(t.nodeHandlers,t.markHandlers).one(e)}function Qj(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function $j(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}function eM(e,t){let n=0;for(let r=0;r<t.length&&n<e.length;r++)e[n]===t[r]&&n++;return n===e.length}const tM=new Set([`sourceRaw`,`sourceDirty`,`position`]),nM=new Set([`jsxComponent`,`table`,`tableRow`,`tableCell`,`tableHeader`,`list`,`listItem`,`blockquote`,`codeBlock`,`heading`]),rM={type:`__br__`},iM=/^<br\s*\/?>$/i;function aM(e){let t=uM(e,aM);return(t.type===`tableCell`||t.type===`tableHeader`)&&t.content?{...t,content:oM(t.content)}:t}function oM(e){let t=[];for(let n of e){let e=sM(n);e.length!==0&&(t.length>0&&t.push(rM),t.push(...e))}return t}function sM(e){return e.text!==void 0||e.type===`hardBreak`||e.type===`jsxInline`?[e]:!e.content||e.content.length===0?[]:e.content.some(e=>e.text===void 0&&e.type!==`hardBreak`&&e.type!==`jsxInline`&&!!e.content)?oM(e.content):e.content}function cM(e){return e.type===`hardBreak`||e.type===rM.type||e.text!==void 0&&iM.test(e.text.trim())?rM:uM(e,cM)}const lM=[{label:`table-cell-block-flatten`,severity:`pm-model-caused`,rationale:`GFM table cells have no block spelling; a block placed in a cell is flattened to inline on serialize, so a cell-with-blocks and a cell-with-inline describe the same persisted document.`,proofPointer:`markdown/table-cell-flatten.ts flattenCellBlocks (table-cell-flatten-dropped-block event)`,canonicalize:aM},{label:`void-hardbreak-br`,severity:`serializer-caused`,rationale:`A void hardBreak inside a table cell or heading serializes to a literal <br /> that a fresh parse keeps as text; the node form and the literal form are the same break.`,proofPointer:`markdown/void-br-promoter.ts + markdown/to-markdown-handlers.ts break handler`,canonicalize:cM}];function uM(e,t){return e.content?{...e,content:e.content.map(t)}:e}function dM(e,t){let n={};e.type!==void 0&&(n.type=e.type),e.text!==void 0&&(n.text=e.text);let r=fM(e.attrs,t);return r&&(n.attrs=r),e.marks&&e.marks.length>0&&(n.marks=[...e.marks].map(e=>({type:e.type,attrs:fM(e.attrs,t)})).sort((e,t)=>mM(e).localeCompare(mM(t)))),e.content&&e.content.length>0&&(n.content=e.content.map(e=>dM(e,t))),n}function fM(e,t){if(!e)return null;let n={};for(let r of Object.keys(e).sort()){if(tM.has(r)||t?.(r))continue;let i=e[r];i!=null&&(n[r]=t?pM(i,t):i)}return Object.keys(n).length>0?n:null}function pM(e,t){if(Array.isArray(e))return e.map(e=>pM(e,t));if(e&&typeof e==`object`){let n={};for(let[r,i]of Object.entries(e))t(r)||(n[r]=pM(i,t));return n}return e}function mM(e){return JSON.stringify(e,(e,t)=>{if(t&&typeof t==`object`&&!Array.isArray(t)){let e={};for(let n of Object.keys(t).sort())e[n]=t[n];return e}return t})}function hM(e){let t=``,n=e=>{if(e.text!==void 0&&(t+=e.text),e.content)for(let t of e.content)n(t)};return n(e),t.replace(/\s+/g,``)}function gM(e){let t=[],n=e=>{if(e.type&&nM.has(e.type)){let n=e.type===`jsxComponent`?String(e.attrs?.componentName??``):``;t.push(n?`${e.type}:${n}`:e.type)}if(e.content)for(let t of e.content)n(t)};return n(e),t.sort()}function _M(e){let t=e,n=[];for(let e of lM){let r=mM(t),i=e.canonicalize(t);mM(i)!==r&&n.push(e.label),t=i}return{normalized:t,fired:n}}function vM(e,t,n={}){let r=_M(e),i=_M(t),a=[...new Set([...r.fired,...i.fired])];if(!eM(hM(r.normalized),hM(i.normalized)))return{equivalent:!1,level:`L1`,reason:`content-loss`,appliedDegrades:a,detail:`authored text did not survive the round-trip`};let o=gM(r.normalized),s=gM(i.normalized);if(mM(o)!==mM(s))return{equivalent:!1,level:`L1`,reason:`structural-shatter`,appliedDegrades:a,detail:`container multiset diverged: [${o.join(`, `)}] vs [${s.join(`, `)}]`};let c=dM(r.normalized,n.ignoreAttrs),l=dM(i.normalized,n.ignoreAttrs);return mM(c)===mM(l)?{equivalent:!0,level:a.length>0?`L2`:`L1`,appliedDegrades:a}:{equivalent:!1,level:`L2`,reason:`structural-divergence`,appliedDegrades:a,detail:yM(c,l)}}function yM(e,t,n=`doc`){let r=e,i=t;if(!r||!i)return`${n}: node presence differs`;if(r.type!==i.type)return`${n}: type ${String(r.type)} vs ${String(i.type)}`;let a=r.content??[],o=i.content??[];if(a.length!==o.length)return`${n}(${String(r.type)}): child count ${a.length} vs ${o.length}`;for(let e=0;e<a.length;e++)if(mM(a[e])!==mM(o[e]))return yM(a[e],o[e],`${n}>${String(r.type)}[${e}]`);return`${n}(${String(r.type)}): attrs or marks differ`}function bM(e,t,n){return!vM(e,t,{ignoreAttrs:n}).equivalent}const xM=new Set([`src`,`href`,`size`]),SM=new Set([`WikiEmbedImage`,`WikiEmbedVideo`,`WikiEmbedAudio`,`WikiEmbedFile`]);function CM(e){if(Array.isArray(e))return e.map(e=>CM(e));if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))xM.has(n)||(t[n]=CM(r));return t}return e}function wM(e){return e.type===`jsxComponent`&&typeof e.attrs?.componentName==`string`&&SM.has(e.attrs.componentName)?CM(e):e.content?{...e,content:e.content.map(wM)}:e}function TM(e){if(Array.isArray(e))return e.map(e=>TM(e));if(e&&typeof e==`object`){let t={};for(let[n,r]of Object.entries(e))n!==`position`&&(t[n]=TM(r));return t}return e}function EM(e){if(e.type===`jsxComponent`)return e;if(e.content)for(let t of e.content){let e=EM(t);if(e)return e}}function DM(e){let t=e.cacheLimit??2048,n=new Map,r=r=>{let i=n.get(r);if(i!==void 0)return i;let a=EM(e.parse(r)),o=a?wM(TM(a)):null;if(n.size>=t){let e=n.keys().next().value;e!==void 0&&n.delete(e)}return n.set(r,o),o};return{isDiverged(e){if(e.type!==`jsxComponent`||!e.attrs||e.attrs.kind===`expression`)return!1;let t=e.attrs.sourceRaw;if(typeof t!=`string`||t.length===0)return!1;let n=r(t);return n?bM(n,wM(TM(e))):!1}}}function OM(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&kM(e.value.value,t))continue}let o=AM(e,t);r>=0?n[r]=o:n.push(o)}return n}function kM(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function AM(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function jM(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:OM(t,r),children:n.all(t),data:{}}}const MM=/^[A-Za-z0-9]{20,}$/,NM=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function PM(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function FM(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return MM.test(n)?n:null}function IM(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!PM(t.hostname))return null;let n=FM(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&NM.test(r)?r:null}}function LM(e){return IM(e)!==null}function RM(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function zM(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:RM(t.hostname)}const BM=/^[A-Za-z0-9_-]{11}$/;function VM(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function HM(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function UM(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return BM.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return BM.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function WM(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!VM(t.hostname))return null;let n=UM(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?HM(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}const GM=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],KM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:a,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],qM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],JM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:w,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(zM(e.src)||LM(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:a,hideWhen:e=>typeof e.src==`string`&&(zM(e.src)||LM(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&LM(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(zM(e.src)||LM(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(WM(e.src)!==null||zM(e.src)||LM(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],YM=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:o,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],XM=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],ZM=[GM[0],GM[1],GM[4],GM[5],GM[6]],QM=[KM[0],KM[1],KM[7]],$M=[XM[0],XM[1],XM[4],XM[5]],eN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],tN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],nN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],rN=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],iN=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],aN=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],oN=[aN[0]],sN=[aN[0]],cN=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],lN=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],uN=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],dN=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:l,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],fN=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],pN=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function mN(e){return e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function hN(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function gN(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}const _N=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:GM,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>jM(`Callout`,e,t,GM)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:KM,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>jM(`img`,e,t,KM)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:JM,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>jM(`video`,e,t,JM)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:YM,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>jM(`audio`,e,t,YM)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:dN,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>jM(`Pdf`,e,t,dN)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:uN,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>jM(`File`,e,t,uN)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:qM,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>jM(`Embed`,e,t,qM)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:XM,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>jM(`Accordion`,e,t,XM)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:rN,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
177
+ <Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>jM(`Tabs`,e,t,rN)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:iN,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>jM(`Tab`,e,t,iN)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:aN,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>jM(`Math`,e,t,aN)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:cN,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:fN,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>jM(`Mirror`,e,t,fN)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:pN,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>jM(`MirrorSource`,e,t,pN)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:ZM,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:QM,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (`![alt](src "title")`) — read-only compat. Preserves `![alt](src)` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:eN,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:gN},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:tN,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:gN},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:nN,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:gN},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:lN,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:gN},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:$M,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${mN(n.name)}"`:``,a=n?.id?` id="${mN(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${hN(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:oN,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:sN,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],vN={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>jM(e.attrs.componentName||`*`,e,t)};function yN(){let e=new Map;e.set(`*`,vN);for(let t of _N)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}function bN(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const xN={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function SN(){xN.parseFallback.blockLevel++}function CN(){xN.parseFallback.wholeDoc++}function wN(){xN.parseFallback.wholeDocBudget++}function TN(){let e=bN();return{parseFallback:{...xN.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...xN.jsxRenderFailure},jsxAutoConvertFailed:{...xN.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...xN.jsxAutoConvertSucceeded},jsxPropDropped:{...xN.jsxPropDropped},jsxMoveFailed:{...xN.jsxMoveFailed},jsxStuckCopyFailed:{...xN.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...xN.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...xN.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...xN.jsxKeyboardDeleteFailed},blockGripClickSelectFailed:{...xN.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...xN.jsxArrowNodeSelectFailed}}}const EN=/^(`{3,}|~{3,})/gm;function DN(e){let t=[],n=null;for(let r of e.matchAll(EN)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function ON(e,t){return t.some(([t,n])=>e>=t&&e<n)}const kN=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function AN(e){let t=DN(e),n=[];for(let r of e.matchAll(kN))ON(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
178
+ `)}\n\n`:``}function jN(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return PN(e,t.parse,0,n)}function MN(e){return e.calls>=1e3?!0:(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=500}function NN(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split(`
180
179
  `).slice(0,4).join(`
181
- `)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function FN(e,t,n,r){if(n>20)return wN(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),WN(e);if(r){if(NN(r))return TN(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),WN(e);r.calls+=1}try{return t(e)}catch(i){let a=IN(i),o=PN(i);if(a===void 0){if(n===0){let n=UN(e,t,i,r);if(n)return n}return wN(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),WN(e)}CN(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=VN(e,a),s=e.slice(0,i.start),c=e.slice(i.start,i.end),l=e.slice(i.end),u=s.trim()?FN(s,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?FN(jN(s)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:c?[{type:`text`,text:c}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){wN();let n=PN(t);return console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${n.message}`,recoveryPath:`block-split-then-rejoin`,error:n,originalError:o})),WN(e)}}}function IN(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function LN(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function RN(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function zN(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(kN(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+32768),l=!1,u=0,d=-1,f=!1;for(let t=s;t<c;t++){let n=e[t];if(l){n===`"`&&(l=!1),n===`\\`&&t+1<c&&t++;continue}if(n===`"`){l=!0;continue}if(n===`{`){u++;continue}if(n===`}`&&u>0){u--;continue}if(!(u>0)&&n===`>`){d=t,t>0&&e[t-1]===`/`&&(f=!0);break}}if(d===-1)continue;let p=d+1;a?n.push({kind:`close`,name:o,start:i,end:p}):f?n.push({kind:`self-close`,name:o,start:i,end:p}):n.push({kind:`open`,name:o,start:i,end:p})}return n}function BN(e){let t=zN(e,ON(e)),n=[],r=[];for(let i of t){if(i.kind===`self-close`)continue;if(i.kind===`open`){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(t!==-1){for(let a=n.length-1;a>t;a--){let t=n[a],o=RN(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,o),source:`unmatched`})}r.push({start:n[t].start,end:i.end,source:`pair`}),n.length=t}}for(let t of n){let n=RN(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function VN(e,t){let n=BN(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:LN(e,t)??0,end:RN(e,t)??e.length}}function HN(e){let t=ON(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;kN(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function UN(e,t,n,r){let i=HN(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&NN(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=jN(e.src);let r=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(r.length===0&&n.length>0){o=!0;continue}a.push(...r),o=!0}catch(t){CN();let r=t?.message?.slice(0,200)??`unknown block error`,i=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${i}`,blockError:r,blockErrorName:t?.name})),a.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return o?{type:`doc`,content:a.length>0?a:[{type:`paragraph`,content:[]}]}:null}function WN(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}var GN=t(r(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1);const KN=Object.assign(qN(Error),{eval:qN(EvalError),range:qN(RangeError),reference:qN(ReferenceError),syntax:qN(SyntaxError),type:qN(TypeError),uri:qN(URIError)});function qN(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,GN.default)(t,...n))}}const JN={}.hasOwnProperty,YN={yaml:`-`,toml:`+`};function XN(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=ZN(r[n]);return t}function ZN(e){let t=e;if(typeof t==`string`){if(!JN.call(YN,t))throw KN("Missing matter definition for `%s`",t);t={type:t,marker:YN[t]}}else if(typeof t!=`object`)throw KN("Expected matter to be an object, not `%j`",t);if(!JN.call(t,`type`))throw KN("Missing `type` in matter `%j`",t);if(!JN.call(t,`fence`)&&!JN.call(t,`marker`))throw KN("Missing `marker` or `fence` in matter `%j`",t);return t}function QN(e){let t=XN(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=eP(e,`open`).charCodeAt(0),a=$N(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function $N(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=eP(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),J(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return J(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return K(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=eP(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||K(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||K(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),J(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return J(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||K(i)?(e.exit(r),t(i)):n(i)}}}function eP(e,t){return e.marker?tP(e.marker,t).repeat(3):tP(e.fence,t)}function tP(e,t){return typeof e==`string`?e:e[t]}function nP(e){let t=XN(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=rP(e),r[e.type]=iP,r[e.type+`Value`]=aP}return{enter:n,exit:r}}function rP(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function iP(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function aP(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function oP(e){let t=[],n={},r=XN(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=sP(e);let a=cP(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:KT(a.charAt(1))})}return{unsafe:t,handlers:n}}function sP(e){let t=cP(e,`open`),n=cP(e,`close`);return r;function r(e){return t+(e.value?`
180
+ `)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function PN(e,t,n,r){if(n>20)return CN(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),UN(e);if(r){if(MN(r))return wN(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),UN(e);r.calls+=1}try{return t(e)}catch(i){let a=FN(i),o=NN(i);if(a===void 0){if(n===0){let n=HN(e,t,i,r);if(n)return n}return CN(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),UN(e)}SN(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=BN(e,a),s=e.slice(0,i.start),c=e.slice(i.start,i.end),l=e.slice(i.end),u=s.trim()?PN(s,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?PN(AN(s)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:c?[{type:`text`,text:c}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){CN();let n=NN(t);return console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${n.message}`,recoveryPath:`block-split-then-rejoin`,error:n,originalError:o})),UN(e)}}}function FN(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function IN(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function LN(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function RN(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(ON(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+32768),l=!1,u=0,d=-1,f=!1;for(let t=s;t<c;t++){let n=e[t];if(l){n===`"`&&(l=!1),n===`\\`&&t+1<c&&t++;continue}if(n===`"`){l=!0;continue}if(n===`{`){u++;continue}if(n===`}`&&u>0){u--;continue}if(!(u>0)&&n===`>`){d=t,t>0&&e[t-1]===`/`&&(f=!0);break}}if(d===-1)continue;let p=d+1;a?n.push({kind:`close`,name:o,start:i,end:p}):f?n.push({kind:`self-close`,name:o,start:i,end:p}):n.push({kind:`open`,name:o,start:i,end:p})}return n}function zN(e){let t=RN(e,DN(e)),n=[],r=[];for(let i of t){if(i.kind===`self-close`)continue;if(i.kind===`open`){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(t!==-1){for(let a=n.length-1;a>t;a--){let t=n[a],o=LN(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,o),source:`unmatched`})}r.push({start:n[t].start,end:i.end,source:`pair`}),n.length=t}}for(let t of n){let n=LN(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function BN(e,t){let n=zN(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:IN(e,t)??0,end:LN(e,t)??e.length}}function VN(e){let t=DN(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;ON(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function HN(e,t,n,r){let i=VN(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&MN(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=AN(e.src);let r=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(r.length===0&&n.length>0){o=!0;continue}a.push(...r),o=!0}catch(t){SN();let r=t?.message?.slice(0,200)??`unknown block error`,i=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${i}`,blockError:r,blockErrorName:t?.name})),a.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return o?{type:`doc`,content:a.length>0?a:[{type:`paragraph`,content:[]}]}:null}function UN(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}var WN=t(r(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1);const GN=Object.assign(KN(Error),{eval:KN(EvalError),range:KN(RangeError),reference:KN(ReferenceError),syntax:KN(SyntaxError),type:KN(TypeError),uri:KN(URIError)});function KN(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,WN.default)(t,...n))}}const qN={}.hasOwnProperty,JN={yaml:`-`,toml:`+`};function YN(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=XN(r[n]);return t}function XN(e){let t=e;if(typeof t==`string`){if(!qN.call(JN,t))throw GN("Missing matter definition for `%s`",t);t={type:t,marker:JN[t]}}else if(typeof t!=`object`)throw GN("Expected matter to be an object, not `%j`",t);if(!qN.call(t,`type`))throw GN("Missing `type` in matter `%j`",t);if(!qN.call(t,`fence`)&&!qN.call(t,`marker`))throw GN("Missing `marker` or `fence` in matter `%j`",t);return t}function ZN(e){let t=YN(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=$N(e,`open`).charCodeAt(0),a=QN(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function QN(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=$N(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),J(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return J(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return K(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=$N(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||K(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||K(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),J(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return J(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||K(i)?(e.exit(r),t(i)):n(i)}}}function $N(e,t){return e.marker?eP(e.marker,t).repeat(3):eP(e.fence,t)}function eP(e,t){return typeof e==`string`?e:e[t]}function tP(e){let t=YN(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=nP(e),r[e.type]=rP,r[e.type+`Value`]=iP}return{enter:n,exit:r}}function nP(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function rP(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function iP(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function aP(e){let t=[],n={},r=YN(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=oP(e);let a=sP(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:GT(a.charAt(1))})}return{unsafe:t,handlers:n}}function oP(e){let t=sP(e,`open`),n=sP(e,`close`);return r;function r(e){return t+(e.value?`
182
181
  `+e.value:``)+`
183
- `+n}}function cP(e,t){return e.marker?lP(e.marker,t).repeat(3):lP(e.fence,t)}function lP(e,t){return typeof e==`string`?e:e[t]}function uP(e){let t=this,n=e||`yaml`,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QN(n)),a.push(nP(n)),o.push(oP(n))}function dP(e){return e.charAt(0).toUpperCase()+e.slice(1)}const fP={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function pP(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}const mP=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=fP,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(OT(e,`blockquote`,(e,t,r)=>{let o=e.children[0];if(!o)return;let s=o.children?.[0];if(!s||(!(`value`in s)&&`children`in s&&s.children[0]&&(s=s.children[0]),s.type!==`text`))return;let l=s.value.match(c);if(!l)return;let u=l[1]?.toLowerCase(),d=l[2]?.trim()||(i[u]??dP(u)),f=n[u],p=`data:image/svg+xml;utf8,${pP(f)}`;t===void 0||!r||(s.value=s.value.slice(l[0].length).trimStart(),e.data={hName:`div`,hProperties:{class:`${a} ${a}-${u}`}},e.children=[{type:`paragraph`,data:{hName:`p`,hProperties:{class:`${a}-title`}},children:[{type:`span`,data:{hName:`span`,hProperties:{class:`octicon octicon-${u}`,style:`--oct-icon: url("${p}")`}}},{type:`text`,value:d}]},...e.children])}),e)};function hP(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function gP(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
184
- `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(XE(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
182
+ `+n}}function sP(e,t){return e.marker?cP(e.marker,t).repeat(3):cP(e.fence,t)}function cP(e,t){return typeof e==`string`?e:e[t]}function lP(e){let t=this,n=e||`yaml`,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ZN(n)),a.push(tP(n)),o.push(aP(n))}function uP(e){return e.charAt(0).toUpperCase()+e.slice(1)}const dP={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function fP(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}const pP=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=dP,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(DT(e,`blockquote`,(e,t,r)=>{let o=e.children[0];if(!o)return;let s=o.children?.[0];if(!s||(!(`value`in s)&&`children`in s&&s.children[0]&&(s=s.children[0]),s.type!==`text`))return;let l=s.value.match(c);if(!l)return;let u=l[1]?.toLowerCase(),d=l[2]?.trim()||(i[u]??uP(u)),f=n[u],p=`data:image/svg+xml;utf8,${fP(f)}`;t===void 0||!r||(s.value=s.value.slice(l[0].length).trimStart(),e.data={hName:`div`,hProperties:{class:`${a} ${a}-${u}`}},e.children=[{type:`paragraph`,data:{hName:`p`,hProperties:{class:`${a}-title`}},children:[{type:`span`,data:{hName:`span`,hProperties:{class:`octicon octicon-${u}`,style:`--oct-icon: url("${p}")`}}},{type:`text`,value:d}]},...e.children])}),e)};function mP(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function hP(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
183
+ `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(YE(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
185
184
  `,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
186
185
  `),i&&(c+=a.move(i+`
187
- `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}const _P={tokenize:yP,concrete:!0,name:`mathFlow`},vP={tokenize:bP,partial:!0};function yP(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),Y(e,l,`whitespace`)(t))}function l(t){return t===null||K(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(vP,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?Y(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):K(t)?e.attempt(vP,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||K(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),Y(e,c,`whitespace`)(t))}function c(r){return r===null||K(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function bP(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function xP(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:SP,previous:CP,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||K(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function SP(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function CP(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function wP(e){return{flow:{36:_P},text:{36:xP(e)}}}const TP={};function EP(e){let t=this,n=e||TP,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(wP(n)),a.push(hP()),o.push(gP(n))}const DP={tokenize:OP};function OP(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}const kP={tokenize:jP},AP={tokenize:MP};function jP(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return jO(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(AP,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(AP,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return K(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;jO(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function MP(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}const NP={tokenize:PP};function PP(e){let t=this,n=e.attempt(hk,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Vk,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}const FP={resolveAll:zP()},IP=RP(`string`),LP=RP(`text`);function RP(e){return{resolveAll:zP(e===`text`?BP:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function zP(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function BP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var VP=n({attentionMarkers:()=>YP,contentInitial:()=>UP,disable:()=>XP,document:()=>HP,flow:()=>GP,flowInitial:()=>WP,insideSpan:()=>JP,string:()=>KP,text:()=>qP});const HP={42:PA,43:PA,45:PA,48:PA,49:PA,50:PA,51:PA,52:PA,53:PA,54:PA,55:PA,56:PA,57:PA,62:_k},UP={91:Xk},WP={[-2]:kk,[-1]:kk,32:kk},GP={35:nA,42:MA,45:[HA,MA],60:sA,61:HA,95:MA,96:Ek,126:Ek},KP={38:Ck,92:xk},qP={[-5]:AA,[-4]:AA,[-3]:AA,33:EA,38:Ck,42:lk,60:[pk,mA],91:OA,92:[eA,xk],93:gA,95:lk,96:Nk},JP={null:[lk,FP]},YP={null:[42,95]},XP={null:[]};function ZP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=MO(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ck(a,l.events,l),l.events):[]}function f(e,t){return $P(p(e),t)}function p(e){return QP(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){K(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&jO(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function QP(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function $P(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
186
+ `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}const gP={tokenize:vP,concrete:!0,name:`mathFlow`},_P={tokenize:yP,partial:!0};function vP(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),Y(e,l,`whitespace`)(t))}function l(t){return t===null||K(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(_P,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?Y(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):K(t)?e.attempt(_P,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||K(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),Y(e,c,`whitespace`)(t))}function c(r){return r===null||K(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function yP(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function bP(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:xP,previous:SP,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||K(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function xP(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function SP(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function CP(e){return{flow:{36:gP},text:{36:bP(e)}}}const wP={};function TP(e){let t=this,n=e||wP,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(CP(n)),a.push(mP()),o.push(hP(n))}const EP={tokenize:DP};function DP(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}const OP={tokenize:AP},kP={tokenize:jP};function AP(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return AO(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kP,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(kP,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return K(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;AO(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function jP(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}const MP={tokenize:NP};function NP(e){let t=this,n=e.attempt(mk,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Bk,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}const PP={resolveAll:RP()},FP=LP(`string`),IP=LP(`text`);function LP(e){return{resolveAll:RP(e===`text`?zP:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function RP(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function zP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var BP=n({attentionMarkers:()=>JP,contentInitial:()=>HP,disable:()=>YP,document:()=>VP,flow:()=>WP,flowInitial:()=>UP,insideSpan:()=>qP,string:()=>GP,text:()=>KP});const VP={42:NA,43:NA,45:NA,48:NA,49:NA,50:NA,51:NA,52:NA,53:NA,54:NA,55:NA,56:NA,57:NA,62:gk},HP={91:Yk},UP={[-2]:Ok,[-1]:Ok,32:Ok},WP={35:tA,42:jA,45:[VA,jA],60:oA,61:VA,95:jA,96:Tk,126:Tk},GP={38:Sk,92:bk},KP={[-5]:kA,[-4]:kA,[-3]:kA,33:TA,38:Sk,42:ck,60:[fk,pA],91:DA,92:[$k,bk],93:hA,95:ck,96:Mk},qP={null:[ck,PP]},JP={null:[42,95]},YP={null:[]};function XP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=jO(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=sk(a,l.events,l),l.events):[]}function f(e,t){return QP(p(e),t)}function p(e){return ZP(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){K(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&AO(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ZP(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function QP(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
188
187
  `;break;case-3:o=`\r
189
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function eF(e){let t={constructs:PO([VP,...(e||{}).extensions||[]]),content:n(DP),defined:[],document:n(kP),flow:n(NP),lazy:{},string:n(IP),text:n(LP)};return t;function n(e){return n;function n(n){return ZP(t,e,n)}}}function tF(e){for(;!zk(e););return e}const nF=/[\0\t\n\r]/g;function rF(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(nF.lastIndex=u,c=nF.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const iF={}.hasOwnProperty;function aF(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),oF(n)(tF(eF(n).document().write(rF()(e,t,!0))))}function oF(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ee),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(k),blockQuote:a(_e),characterEscape:T,characterReference:T,codeFenced:a(ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ve,o),codeText:a(be,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(xe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Se),hardBreakEscape:a(Ce),hardBreakTrailing:a(Ce),htmlFlow:a(we,o),htmlFlowData:T,htmlText:a(we,o),htmlTextData:T,image:a(Te),label:o,link:a(Ee),listItem:a(Oe),listItemValue:f,listOrdered:a(De,d),listUnordered:a(De),paragraph:a(ke),reference:ue,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(k),strong:a(Ae),thematicBreak:a(Me)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(O),label:oe,labelText:ae,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};cF(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];iF.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||uF).call(a,void 0,e[0])}for(r.position={start:sF(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:sF(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:sF(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||uF).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+`): it’s not open`);n.position.end=sF(e.end)}function u(){return AT(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pE(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=je(),n.position={start:sF(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=sF(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=sF(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=YD(t),n.identifier=pE(t).toLowerCase()}function oe(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pE(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=qD(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=KD(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=sF(e.end)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function _e(){return{type:`blockquote`,children:[]}}function ve(){return{type:`code`,lang:null,meta:null,value:``}}function be(){return{type:`inlineCode`,value:``}}function xe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Se(){return{type:`emphasis`,children:[]}}function k(){return{type:`heading`,depth:0,children:[]}}function Ce(){return{type:`break`}}function we(){return{type:`html`,value:``}}function Te(){return{type:`image`,title:null,url:``,alt:null}}function Ee(){return{type:`link`,title:null,url:``,children:[]}}function De(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Oe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ke(){return{type:`paragraph`,children:[]}}function Ae(){return{type:`strong`,children:[]}}function je(){return{type:`text`,value:``}}function Me(){return{type:`thematicBreak`}}}function sF(e){return{line:e.line,column:e.column,offset:e.offset}}function cF(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?cF(e,r):lF(e,r)}}function lF(e,t){let n;for(n in t)if(iF.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function uF(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ye({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ye({start:t.start,end:t.end})+`) is still open`)}function dF(e){let t=this;t.parser=n;function n(n){return aF(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}const fF=[[``,``],[``,``],[``,``],[``,``],[``,``]],pF=/[\uE000-\uE004]/,mF=/[\uE005-\uE009]/;fF.map(([e,t])=>({from:e,to:t}));const hF=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,gF=/<!--[\s\S]*?-->/g,_F=/<\/([a-z][a-z0-9]*)\s*>/g,vF=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,yF=new Set([`img`,`video`,`audio`]),bF=new Set([`mark`]),xF=/<\/([A-Z][A-Za-z0-9.]*)>/g;function SF(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function CF(e){let t=new Map,n=new RegExp(xF.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function wF(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function TF(e){let t=[],n=e.indexOf(`/>`);for(;n!==-1;)t.push(n),n=e.indexOf(`/>`,n+2);return t}function EF(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}const DF=1024;function OF(e,t){if(t[e-1]!==`(`||t[e-2]!==`]`)return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&t[e]===`\\`;e--)r++;if(r%2==1)return!1;let i=!1,a=Math.max(0,n-DF);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
190
- `||n===`\r`||n==="`")return!1;if(n!==`[`&&n!==`]`)continue;let r=0;for(let n=e-1;n>=0&&t[n]===`\\`;n--)r++;if(r%2!=1){if(n===`]`||t[e+1]===`^`||t[e-1]===`]`)return!1;i=!0;break}}if(!i)return!1;let o=!1,s=-1,c=Math.min(t.length,e+1+DF);for(let n=e+1;n<c;n++){let e=t[n];if(e===`>`){s=n;break}if(e===`<`||e===`\\`||e===`
191
- `||e===`\r`||e===``||e===``||e===``||e===``||e===``)return!1;(e===` `||e===` `)&&(o=!0)}return s===-1||!o?!1:t[s+1]===`)`}function kF(e,t,n,r){let i=SF(n,e);if(i>=n.length)return!1;let a=n[i],o=SF(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function AF(e){let t=e;if(pF.test(t))for(let[e,n]of fF)t=t.replaceAll(e,n);t=t.replace(gF,e=>e.replace(/</g,``).replace(/>/g,``)),t=t.replace(hF,(e,t)=>`${t.replaceAll(`:`,``).replaceAll(`@`,``)}`),t=t.replace(_F,(e,t)=>bF.has(t)?e:e.replace(/</g,``).replace(/>/g,``)),t=t.replace(vF,(e,t)=>yF.has(t)&&e.endsWith(`/>`)||bF.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,``).replace(/>/g,``):e),t=t.replace(/<>/g,``);let n=CF(t),r=wF(t),i=TF(t),a=EF(t);t=t.replace(/</g,(e,o)=>{if(OF(o,t))return e;let s=t.slice(o,o+256);if(s[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(s)?e:``;let c=/^<([a-z][a-z0-9]*)/.exec(s);if(c&&yF.has(c[1])&&kF(o,t,a,r))return e;let l=/^<([a-z][a-z0-9]*)([\s/>])/.exec(s);if(l&&bF.has(l[1])){let n=l[1];return s.startsWith(`<${n}/>`)||t.indexOf(`</${n}>`,o)!==-1?e:``}let u=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(s);if(!u)return``;let d=u[1],f=SF(r,o),p=SF(i,f<r.length?r[f]:t.length);if(p>0){let n=i[p-1];if(n>o){let r=o+u[0].length-1;if(!t.slice(r,n).replace(/"[^"]*"|'[^']*'/g,``).includes(`/`))return e}}let m=n.get(d);return m&&SF(m,o)<m.length?e:``});{let e=[],n=[];for(let r=0;r<t.length;r++){if(t[r]===`
188
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function $P(e){let t={constructs:NO([BP,...(e||{}).extensions||[]]),content:n(EP),defined:[],document:n(OP),flow:n(MP),lazy:{},string:n(FP),text:n(IP)};return t;function n(e){return n;function n(n){return XP(t,e,n)}}}function eF(e){for(;!Rk(e););return e}const tF=/[\0\t\n\r]/g;function nF(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(tF.lastIndex=u,c=tF.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const rF={}.hasOwnProperty;function iF(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),aF(n)(eF($P(n).document().write(nF()(e,t,!0))))}function aF(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ee),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(k),blockQuote:a(_e),characterEscape:T,characterReference:T,codeFenced:a(ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ve,o),codeText:a(be,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(xe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Se),hardBreakEscape:a(Ce),hardBreakTrailing:a(Ce),htmlFlow:a(we,o),htmlFlowData:T,htmlText:a(we,o),htmlTextData:T,image:a(Te),label:o,link:a(Ee),listItem:a(Oe),listItemValue:f,listOrdered:a(De,d),listUnordered:a(De),paragraph:a(ke),reference:ue,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(k),strong:a(Ae),thematicBreak:a(Me)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(O),label:oe,labelText:ae,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};sF(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];rF.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||lF).call(a,void 0,e[0])}for(r.position={start:oF(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:oF(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:oF(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||lF).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+`): it’s not open`);n.position.end=oF(e.end)}function u(){return kT(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fE(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=je(),n.position={start:oF(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=oF(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=oF(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=JD(t),n.identifier=fE(t).toLowerCase()}function oe(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=fE(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=KD(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=GD(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=oF(e.end)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function _e(){return{type:`blockquote`,children:[]}}function ve(){return{type:`code`,lang:null,meta:null,value:``}}function be(){return{type:`inlineCode`,value:``}}function xe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Se(){return{type:`emphasis`,children:[]}}function k(){return{type:`heading`,depth:0,children:[]}}function Ce(){return{type:`break`}}function we(){return{type:`html`,value:``}}function Te(){return{type:`image`,title:null,url:``,alt:null}}function Ee(){return{type:`link`,title:null,url:``,children:[]}}function De(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Oe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ke(){return{type:`paragraph`,children:[]}}function Ae(){return{type:`strong`,children:[]}}function je(){return{type:`text`,value:``}}function Me(){return{type:`thematicBreak`}}}function oF(e){return{line:e.line,column:e.column,offset:e.offset}}function sF(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?sF(e,r):cF(e,r)}}function cF(e,t){let n;for(n in t)if(rF.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function lF(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ye({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ye({start:t.start,end:t.end})+`) is still open`)}function uF(e){let t=this;t.parser=n;function n(n){return iF(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}const dF=[[``,``],[``,``],[``,``],[``,``],[``,``]],fF=/[\uE000-\uE004]/,pF=/[\uE005-\uE009]/;dF.map(([e,t])=>({from:e,to:t}));const mF=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,hF=/<!--[\s\S]*?-->/g,gF=/<\/([a-z][a-z0-9]*)\s*>/g,_F=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,vF=new Set([`img`,`video`,`audio`]),yF=new Set([`mark`]),bF=/<\/([A-Z][A-Za-z0-9.]*)>/g;function xF(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function SF(e){let t=new Map,n=new RegExp(bF.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function CF(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function wF(e){let t=[],n=e.indexOf(`/>`);for(;n!==-1;)t.push(n),n=e.indexOf(`/>`,n+2);return t}function TF(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}const EF=1024;function DF(e,t){if(t[e-1]!==`(`||t[e-2]!==`]`)return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&t[e]===`\\`;e--)r++;if(r%2==1)return!1;let i=!1,a=Math.max(0,n-EF);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
189
+ `||n===`\r`||n==="`")return!1;if(n!==`[`&&n!==`]`)continue;let r=0;for(let n=e-1;n>=0&&t[n]===`\\`;n--)r++;if(r%2!=1){if(n===`]`||t[e+1]===`^`||t[e-1]===`]`)return!1;i=!0;break}}if(!i)return!1;let o=!1,s=-1,c=Math.min(t.length,e+1+EF);for(let n=e+1;n<c;n++){let e=t[n];if(e===`>`){s=n;break}if(e===`<`||e===`\\`||e===`
190
+ `||e===`\r`||e===``||e===``||e===``||e===``||e===``)return!1;(e===` `||e===` `)&&(o=!0)}return s===-1||!o?!1:t[s+1]===`)`}function OF(e,t,n,r){let i=xF(n,e);if(i>=n.length)return!1;let a=n[i],o=xF(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function kF(e){let t=e;if(fF.test(t))for(let[e,n]of dF)t=t.replaceAll(e,n);t=t.replace(hF,e=>e.replace(/</g,``).replace(/>/g,``)),t=t.replace(mF,(e,t)=>`${t.replaceAll(`:`,``).replaceAll(`@`,``)}`),t=t.replace(gF,(e,t)=>yF.has(t)?e:e.replace(/</g,``).replace(/>/g,``)),t=t.replace(_F,(e,t)=>vF.has(t)&&e.endsWith(`/>`)||yF.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,``).replace(/>/g,``):e),t=t.replace(/<>/g,``);let n=SF(t),r=CF(t),i=wF(t),a=TF(t);t=t.replace(/</g,(e,o)=>{if(DF(o,t))return e;let s=t.slice(o,o+256);if(s[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(s)?e:``;let c=/^<([a-z][a-z0-9]*)/.exec(s);if(c&&vF.has(c[1])&&OF(o,t,a,r))return e;let l=/^<([a-z][a-z0-9]*)([\s/>])/.exec(s);if(l&&yF.has(l[1])){let n=l[1];return s.startsWith(`<${n}/>`)||t.indexOf(`</${n}>`,o)!==-1?e:``}let u=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(s);if(!u)return``;let d=u[1],f=xF(r,o),p=xF(i,f<r.length?r[f]:t.length);if(p>0){let n=i[p-1];if(n>o){let r=o+u[0].length-1;if(!t.slice(r,n).replace(/"[^"]*"|'[^']*'/g,``).includes(`/`))return e}}let m=n.get(d);return m&&xF(m,o)<m.length?e:``});{let e=[],n=[];for(let r=0;r<t.length;r++){if(t[r]===`
192
191
  `){let i=t[r+1];if(i===`
193
192
  `||i===`>`){if(e.push(...n),n.length=0,i===`
194
193
  `)for(;t[r+1]===`
195
- `;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=t.split(``);for(let t of e)n[t]=``;t=n.join(``)}}return t}function jF(e){return pF.test(e)||mF.test(e)}function MF(){return e=>{OT(e,e=>{let t=e;typeof t.value==`string`&&jF(t.value)&&(t.value=NF(t.value)),typeof t.url==`string`&&jF(t.url)&&(t.url=NF(t.url)),typeof t.title==`string`&&jF(t.title)&&(t.title=NF(t.title)),typeof t.alt==`string`&&jF(t.alt)&&(t.alt=NF(t.alt)),typeof t.lang==`string`&&jF(t.lang)&&(t.lang=NF(t.lang)),typeof t.meta==`string`&&jF(t.meta)&&(t.meta=NF(t.meta))})}}function NF(e){let t=e.replaceAll(``,`<`).replaceAll(``,`>`).replaceAll(``,`:`).replaceAll(``,`@`).replaceAll(``,`{`);if(mF.test(t))for(let[e,n]of fF)t=t.replaceAll(n,e);return t}const PF=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function FF(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function IF(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||FF(e,r)%2==1?t:n(t))}function LF(e){return IF(e,PF,e=>`${e.slice(1,-1)}`)}const RF=RegExp(`([^]+)`,`g`);function zF(e){if(!e.includes(``))return{value:e,spans:[]};let t=[],n=``,r=0;RF.lastIndex=0;let i=RF.exec(e);for(;i!==null;){i.index>r&&(n+=e.slice(r,i.index));let a=`&${i[1]??``};`;t.push({offset:n.length,length:a.length,raw:a}),n+=a,r=i.index+i[0].length,i=RF.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function BF(){return e=>{OT(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){let{value:n,spans:r}=zF(t.value);if(t.value=n,e.type===`text`&&r.length>0){let t=e;t.data??={},t.data.entityRefSpans=r}}for(let e of[`url`,`title`,`alt`,`lang`,`meta`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=zF(n).value)}})}}const VF=/\\</g;function HF(e){return IF(e,VF,e=>`${e.slice(1)}`)}function UF(){return e=>{OT(e,e=>{let t=e;typeof t.value==`string`&&t.value.includes(``)&&(t.value=t.value.split(``).join(``));for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=n.split(``).join(``))}})}}const WF=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),GF={note:`note`,tip:`tip`,important:`important`,warning:`warning`,caution:`caution`,abstract:`abstract`,info:`info`,todo:`todo`,success:`success`,question:`question`,failure:`failure`,danger:`danger`,bug:`bug`,example:`example`,quote:`quote`,summary:`abstract`,tldr:`abstract`,check:`success`,done:`success`,help:`question`,faq:`question`,fail:`failure`,missing:`failure`,error:`danger`,cite:`quote`,idea:`tip`,hint:`tip`,warn:`warning`,attention:`warning`},KF=`ok-alert`,qF=RegExp(`(?:^|\\s)${KF}-(\\w+)(?:\\s|$)`),JF=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function YF(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
196
- `,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(JF);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function XF(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(qF);return n?n[1].toLowerCase():null}function ZF(e){return GF[e.toLowerCase()]??null}function QF(e,t,n,r,i=null){let a=[{type:`mdxJsxAttribute`,name:`type`,value:t}];n&&a.push({type:`mdxJsxAttribute`,name:`title`,value:n}),i&&a.push({type:`mdxJsxAttribute`,name:`data-authored-as`,value:i}),r!==null&&(a.push({type:`mdxJsxAttribute`,name:`collapsible`,value:null}),r===`+`?a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}):a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}}));let o=e.children.slice(1),s=e.position?.start.line;return{type:`mdxJsxFlowElement`,name:`GFMCallout`,attributes:a,children:n&&o.length>0&&s!==void 0&&$F(o[0],s)?o.slice(1):o,position:e.position}}function $F(e,t){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type!==`paragraph`)return!1;let r=n.position?.start?.line,i=n.position?.end?.line;return r===t&&i===t}function eI(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${KF}-title`)}function tI(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;OT(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=XF(e);if(!i)return;let a=ZF(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=YF(n,e.position.start.offset),s&&(o=s.title,a||=ZF(s.rawType)));let c=a??`note`,l=s&&WF.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=YF(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!eI(e.children[0]))return;let f=QF(e,c,o,l,d);r.children[t]=f})}}const nI={markers:`*`,classPrefix:KF,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>`})};function rI(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;)e[i]===`\\`&&i+1<e.length&&n[a]===e[i+1]?(i+=2,a+=1):(i+=1,a+=1);return i}function iI(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
197
- `?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function aI(e,t,n){return{start:iI(e,t),end:iI(e,n)}}function oI(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return aI(e,rI(e,i,t.value,n),rI(e,i,t.value,r))}const sI=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,cI=/<!--([\s\S]*?)-->/g;function lI(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;dI(e),OT(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`%%`)===-1&&i.indexOf(`<!--`)===-1)return;let a=uI(i);if(a.length===0)return;let o=[],s=0;for(let t of a){if(t.start>s){let r={type:`text`,value:i.slice(s,t.start)},a=oI(n,e,s,t.start);a&&(r.position=a),o.push(r)}let r={type:`comment`,children:[{type:`text`,value:t.body}],data:{sourceForm:t.sourceForm}},a=oI(n,e,t.start,t.end);a&&(r.position=a),o.push(r),s=t.end}if(s<i.length){let t={type:`text`,value:i.slice(s)},r=oI(n,e,s,i.length);r&&(t.position=r),o.push(t)}return r.children.splice(t,1,...o),[TT,t+o.length]})}}function uI(e){let t=[];sI.lastIndex=0;let n;for(;(n=sI.exec(e))!==null;)n[1].trim().length!==0&&t.push({start:n.index,end:n.index+n[0].length,body:n[1],sourceForm:`percent`});cI.lastIndex=0;let r;for(;(r=cI.exec(e))!==null;){let e=r[1].trim();e!==``&&t.push({start:r.index,end:r.index+r[0].length,body:e,sourceForm:`html`})}t.sort((e,t)=>e.start-t.start);let i=[],a=-1;for(let e of t)e.start<a||(i.push(e),a=e.end);return i}function dI(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type===`paragraph`){let r=fI(e);if(r!==null){let e=pI(r);if(e!==null){let r={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:e}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,1,r),n+=1;continue}let i=mI(r);if(i!==null){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:i}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}let i=hI(e);if(i!==null){let e={type:`commentBlock`,children:[i],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}let a=gI(e);if(a!==null){let e={type:`commentBlock`,children:[a],data:{sourceForm:`percent`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}if(e.type===`paragraph`&&vI(e)){let e=n+1;for(;e<t.length;){let n=t[e];if(n.type===`paragraph`&&vI(n))break;e+=1}if(e<t.length&&e>n+1){let r={type:`commentBlock`,children:t.slice(n+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,e-n+1,r),n+=1;continue}}n+=1}}function fI(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function pI(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function mI(e){let t=e.trim();if(!t.startsWith(`<!--`)||!t.endsWith(`-->`))return null;let n=t.slice(4,-3);if(n.includes(`-->`)||n.includes(`<!--`))return null;let r=n.trim();return r===``?null:r}function hI(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`<!--`))return null;let i=n.value.trimEnd();if(!i.endsWith(`-->`))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`text`)continue;let r=n.value;if(t===0){if(_I(r,`<!--`)>1||_I(r,`-->`)>0)return null}else if(t===e.children.length-1){if(_I(r,`<!--`)>0||_I(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let a=r.slice(4);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-3);o.endsWith(` `)&&(o=o.slice(0,-1));let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function gI(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`%%`)||r.startsWith(`%%%`))return null;let i=n.value.trimEnd();if(!i.endsWith(`%%`)||i.endsWith(`%%%`))return null;let a=r.slice(2);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-2);if(o.endsWith(` `)&&(o=o.slice(0,-1)),a.indexOf(`%%`)!==-1||o.indexOf(`%%`)!==-1)return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if(n.type===`text`&&n.value.indexOf(`%%`)!==-1)return null}if(!(e.children.slice(1,-1).some(e=>e.type===`text`?e.value.trim().length>0:!0)||a.trim().length>0||o.trim().length>0))return null;let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function _I(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function vI(e){let t=fI(e);return t===null?!1:t.trim()===`%%`}const yI=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,bI=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function xI(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
198
- `;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return bI.test(i)}return!1}function SI(e){if(!e.includes(`</`))return e;let t=ON(e),n=!1,r=e.replace(yI,(r,i,a,o,s)=>kN(s,t)||!xI(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}const CI=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,wI=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,TI=/^\s*<\/details>\s*$/;function EI(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function DI(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function OI(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function kI(e){return e.children[0].value??``}function AI(e){if(!OI(e))return null;let t=kI(e).match(CI);if(!t)return null;let{defaultOpen:n,name:r,id:i}=EI(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:DI({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function jI(e,t){let n=e[t];if(!OI(n))return null;let r=kI(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(wI);if(!i)return null;let{defaultOpen:a,name:o,id:s}=EI(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!OI(t))continue;let r=kI(t);if(TI.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function MI(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(OI(e)){let r=AI(e);if(r){t[n]=r,n++;continue}let i=jI(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:DI(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function NI(){return e=>{OT(e,e=>{`children`in e&&Array.isArray(e.children)&&MI(e)})}}const PI=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function FI(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function II(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?II(e.children[0]):null}function LI(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return LI(t[t.length-1])}return null}function RI(e,t,n){let r={type:`text`,value:e.value.slice(t,n)},i=e.data?.entityRefSpans;if(i?.length){let e=i.filter(e=>e.offset>=t&&e.offset+e.length<=n).map(e=>({...e,offset:e.offset-t}));e.length>0&&(r.data={entityRefSpans:e})}return r}function zI(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type!==`text`){n++;continue}let r=e.value,i=-1;for(let e=0;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61||e>0&&r.charCodeAt(e-1)===61)continue;let a;if(e+2<r.length)a=r.charAt(e+2);else{let e=t[n+1];if(!e)continue;a=II(e)}if(!(a===null||/\s/.test(a))){i=e;break}}if(i===-1){n++;continue}let a=-1,o=-1,s=!1;for(let e=i+3;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61)continue;let i=r.charAt(e-1);if(/[\s=]/.test(i))continue;let o;if(e+2<r.length)o=r.charAt(e+2);else{let e=t[n+1];o=e?e.type===`text`?e.value[0]??null:II(e):null}if(o!==`=`){a=-2;break}}if(a===-2){n++;continue}for(let e=n+1;e<t.length;e++){let n=t[e];if(n.type===`text`){for(let r=0;r<=n.value.length-2;r++){if(n.value.charCodeAt(r)!==61||n.value.charCodeAt(r+1)!==61)continue;let i;if(r>0)i=n.value.charAt(r-1);else{let n=t[e-1];i=LI(n)}if(i===null||/[\s=]/.test(i))continue;let c;if(r+2<n.value.length)c=n.value.charAt(r+2);else{let n=t[e+1];c=n?n.type===`text`?n.value[0]??null:II(n):null}if(c!==`=`){a=e,o=r,s=!0;break}}if(a>=0)break}else if(!FI(n))break}if(a<0){n++;continue}let c=t[a],l=r.slice(0,i),u=r.slice(i+2),d=c.value.slice(0,o),f=c.value.slice(o+2),p=[];u.length>0&&p.push(RI(e,i+2,r.length));for(let e=n+1;e<a;e++)p.push(t[e]);if(d.length>0&&p.push(RI(c,0,o)),!s){n++;continue}let m={type:`mark`,children:p},h=[];l.length>0&&h.push(RI(e,0,i)),h.push(m),f.length>0&&h.push(RI(c,o+2,c.value.length)),t.splice(n,a-n+1,...h),n+=+(l.length>0)+1}}function BI(e){if(`children`in e&&Array.isArray(e.children)){zI(e);for(let t of e.children)BI(t)}}function VI(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;OT(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;PI.lastIndex=0;let a=[],o;for(;(o=PI.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,i=r+t[0].length;if(r>c){let t=RI(e,c,r),i=oI(n,e,c,r);i&&(t.position=i),s.push(t)}let a=RI(e,r+2,i-2),o=oI(n,e,r+2,i-2);o&&(a.position=o);let l={type:`mark`,children:[a]},u=oI(n,e,r,i);u&&(l.position=u),s.push(l),c=i}if(c<i.length){let t=RI(e,c,i.length),r=oI(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[TT,t+s.length]}),BI(e),OT(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function HI(){return e=>{OT(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(!r||r.type!==`image`)return;let i=UI(r,e);n.children[t]=i})}}function UI(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}const WI=/^( {4}|\t)/;function GI(e){let t=e.split(`
199
- `),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!WI.test(e)))return!1;return n}function KI(e){return e.split(`
194
+ `;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=t.split(``);for(let t of e)n[t]=``;t=n.join(``)}}return t}function AF(e){return fF.test(e)||pF.test(e)}function jF(){return e=>{DT(e,e=>{let t=e;typeof t.value==`string`&&AF(t.value)&&(t.value=MF(t.value)),typeof t.url==`string`&&AF(t.url)&&(t.url=MF(t.url)),typeof t.title==`string`&&AF(t.title)&&(t.title=MF(t.title)),typeof t.alt==`string`&&AF(t.alt)&&(t.alt=MF(t.alt)),typeof t.lang==`string`&&AF(t.lang)&&(t.lang=MF(t.lang)),typeof t.meta==`string`&&AF(t.meta)&&(t.meta=MF(t.meta))})}}function MF(e){let t=e.replaceAll(``,`<`).replaceAll(``,`>`).replaceAll(``,`:`).replaceAll(``,`@`).replaceAll(``,`{`);if(pF.test(t))for(let[e,n]of dF)t=t.replaceAll(n,e);return t}const NF=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function PF(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function FF(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||PF(e,r)%2==1?t:n(t))}function IF(e){return FF(e,NF,e=>`${e.slice(1,-1)}`)}const LF=RegExp(`([^]+)`,`g`);function RF(e){if(!e.includes(``))return{value:e,spans:[]};let t=[],n=``,r=0;LF.lastIndex=0;let i=LF.exec(e);for(;i!==null;){i.index>r&&(n+=e.slice(r,i.index));let a=`&${i[1]??``};`;t.push({offset:n.length,length:a.length,raw:a}),n+=a,r=i.index+i[0].length,i=LF.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function zF(){return e=>{DT(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){let{value:n,spans:r}=RF(t.value);if(t.value=n,e.type===`text`&&r.length>0){let t=e;t.data??={},t.data.entityRefSpans=r}}for(let e of[`url`,`title`,`alt`,`lang`,`meta`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=RF(n).value)}})}}const BF=/\\</g;function VF(e){return FF(e,BF,e=>`${e.slice(1)}`)}function HF(){return e=>{DT(e,e=>{let t=e;typeof t.value==`string`&&t.value.includes(``)&&(t.value=t.value.split(``).join(``));for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(``)&&(t[e]=n.split(``).join(``))}})}}const UF=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),WF={note:`note`,tip:`tip`,important:`important`,warning:`warning`,caution:`caution`,abstract:`abstract`,info:`info`,todo:`todo`,success:`success`,question:`question`,failure:`failure`,danger:`danger`,bug:`bug`,example:`example`,quote:`quote`,summary:`abstract`,tldr:`abstract`,check:`success`,done:`success`,help:`question`,faq:`question`,fail:`failure`,missing:`failure`,error:`danger`,cite:`quote`,idea:`tip`,hint:`tip`,warn:`warning`,attention:`warning`},GF=`ok-alert`,KF=RegExp(`(?:^|\\s)${GF}-(\\w+)(?:\\s|$)`),qF=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function JF(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
195
+ `,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(qF);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function YF(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(KF);return n?n[1].toLowerCase():null}function XF(e){return WF[e.toLowerCase()]??null}function ZF(e,t,n,r,i=null){let a=[{type:`mdxJsxAttribute`,name:`type`,value:t}];n&&a.push({type:`mdxJsxAttribute`,name:`title`,value:n}),i&&a.push({type:`mdxJsxAttribute`,name:`data-authored-as`,value:i}),r!==null&&(a.push({type:`mdxJsxAttribute`,name:`collapsible`,value:null}),r===`+`?a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}):a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}}));let o=e.children.slice(1),s=e.position?.start.line;return{type:`mdxJsxFlowElement`,name:`GFMCallout`,attributes:a,children:n&&o.length>0&&s!==void 0&&QF(o[0],s)?o.slice(1):o,position:e.position}}function QF(e,t){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type!==`paragraph`)return!1;let r=n.position?.start?.line,i=n.position?.end?.line;return r===t&&i===t}function $F(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${GF}-title`)}function eI(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;DT(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=YF(e);if(!i)return;let a=XF(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=JF(n,e.position.start.offset),s&&(o=s.title,a||=XF(s.rawType)));let c=a??`note`,l=s&&UF.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=JF(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!$F(e.children[0]))return;let f=ZF(e,c,o,l,d);r.children[t]=f})}}const tI={markers:`*`,classPrefix:GF,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>`})};function nI(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;)e[i]===`\\`&&i+1<e.length&&n[a]===e[i+1]?(i+=2,a+=1):(i+=1,a+=1);return i}function rI(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
196
+ `?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function iI(e,t,n){return{start:rI(e,t),end:rI(e,n)}}function aI(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return iI(e,nI(e,i,t.value,n),nI(e,i,t.value,r))}const oI=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,sI=/<!--([\s\S]*?)-->/g;function cI(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;uI(e),DT(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`%%`)===-1&&i.indexOf(`<!--`)===-1)return;let a=lI(i);if(a.length===0)return;let o=[],s=0;for(let t of a){if(t.start>s){let r={type:`text`,value:i.slice(s,t.start)},a=aI(n,e,s,t.start);a&&(r.position=a),o.push(r)}let r={type:`comment`,children:[{type:`text`,value:t.body}],data:{sourceForm:t.sourceForm}},a=aI(n,e,t.start,t.end);a&&(r.position=a),o.push(r),s=t.end}if(s<i.length){let t={type:`text`,value:i.slice(s)},r=aI(n,e,s,i.length);r&&(t.position=r),o.push(t)}return r.children.splice(t,1,...o),[wT,t+o.length]})}}function lI(e){let t=[];oI.lastIndex=0;let n;for(;(n=oI.exec(e))!==null;)n[1].trim().length!==0&&t.push({start:n.index,end:n.index+n[0].length,body:n[1],sourceForm:`percent`});sI.lastIndex=0;let r;for(;(r=sI.exec(e))!==null;){let e=r[1].trim();e!==``&&t.push({start:r.index,end:r.index+r[0].length,body:e,sourceForm:`html`})}t.sort((e,t)=>e.start-t.start);let i=[],a=-1;for(let e of t)e.start<a||(i.push(e),a=e.end);return i}function uI(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type===`paragraph`){let r=dI(e);if(r!==null){let e=fI(r);if(e!==null){let r={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:e}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,1,r),n+=1;continue}let i=pI(r);if(i!==null){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:i}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}let i=mI(e);if(i!==null){let e={type:`commentBlock`,children:[i],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}let a=hI(e);if(a!==null){let e={type:`commentBlock`,children:[a],data:{sourceForm:`percent`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}if(e.type===`paragraph`&&_I(e)){let e=n+1;for(;e<t.length;){let n=t[e];if(n.type===`paragraph`&&_I(n))break;e+=1}if(e<t.length&&e>n+1){let r={type:`commentBlock`,children:t.slice(n+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,e-n+1,r),n+=1;continue}}n+=1}}function dI(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function fI(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function pI(e){let t=e.trim();if(!t.startsWith(`<!--`)||!t.endsWith(`-->`))return null;let n=t.slice(4,-3);if(n.includes(`-->`)||n.includes(`<!--`))return null;let r=n.trim();return r===``?null:r}function mI(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`<!--`))return null;let i=n.value.trimEnd();if(!i.endsWith(`-->`))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`text`)continue;let r=n.value;if(t===0){if(gI(r,`<!--`)>1||gI(r,`-->`)>0)return null}else if(t===e.children.length-1){if(gI(r,`<!--`)>0||gI(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let a=r.slice(4);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-3);o.endsWith(` `)&&(o=o.slice(0,-1));let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function hI(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`%%`)||r.startsWith(`%%%`))return null;let i=n.value.trimEnd();if(!i.endsWith(`%%`)||i.endsWith(`%%%`))return null;let a=r.slice(2);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-2);if(o.endsWith(` `)&&(o=o.slice(0,-1)),a.indexOf(`%%`)!==-1||o.indexOf(`%%`)!==-1)return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if(n.type===`text`&&n.value.indexOf(`%%`)!==-1)return null}if(!(e.children.slice(1,-1).some(e=>e.type===`text`?e.value.trim().length>0:!0)||a.trim().length>0||o.trim().length>0))return null;let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function gI(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function _I(e){let t=dI(e);return t===null?!1:t.trim()===`%%`}const vI=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,yI=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function bI(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
197
+ `;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return yI.test(i)}return!1}function xI(e){if(!e.includes(`</`))return e;let t=DN(e),n=!1,r=e.replace(vI,(r,i,a,o,s)=>ON(s,t)||!bI(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}const SI=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,CI=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,wI=/^\s*<\/details>\s*$/;function TI(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function EI(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function DI(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function OI(e){return e.children[0].value??``}function kI(e){if(!DI(e))return null;let t=OI(e).match(SI);if(!t)return null;let{defaultOpen:n,name:r,id:i}=TI(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:EI({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function AI(e,t){let n=e[t];if(!DI(n))return null;let r=OI(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(CI);if(!i)return null;let{defaultOpen:a,name:o,id:s}=TI(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!DI(t))continue;let r=OI(t);if(wI.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function jI(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(DI(e)){let r=kI(e);if(r){t[n]=r,n++;continue}let i=AI(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:EI(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function MI(){return e=>{DT(e,e=>{`children`in e&&Array.isArray(e.children)&&jI(e)})}}const NI=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function PI(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function FI(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?FI(e.children[0]):null}function II(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return II(t[t.length-1])}return null}function LI(e,t,n){let r={type:`text`,value:e.value.slice(t,n)},i=e.data?.entityRefSpans;if(i?.length){let e=i.filter(e=>e.offset>=t&&e.offset+e.length<=n).map(e=>({...e,offset:e.offset-t}));e.length>0&&(r.data={entityRefSpans:e})}return r}function RI(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type!==`text`){n++;continue}let r=e.value,i=-1;for(let e=0;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61||e>0&&r.charCodeAt(e-1)===61)continue;let a;if(e+2<r.length)a=r.charAt(e+2);else{let e=t[n+1];if(!e)continue;a=FI(e)}if(!(a===null||/\s/.test(a))){i=e;break}}if(i===-1){n++;continue}let a=-1,o=-1,s=!1;for(let e=i+3;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61)continue;let i=r.charAt(e-1);if(/[\s=]/.test(i))continue;let o;if(e+2<r.length)o=r.charAt(e+2);else{let e=t[n+1];o=e?e.type===`text`?e.value[0]??null:FI(e):null}if(o!==`=`){a=-2;break}}if(a===-2){n++;continue}for(let e=n+1;e<t.length;e++){let n=t[e];if(n.type===`text`){for(let r=0;r<=n.value.length-2;r++){if(n.value.charCodeAt(r)!==61||n.value.charCodeAt(r+1)!==61)continue;let i;if(r>0)i=n.value.charAt(r-1);else{let n=t[e-1];i=II(n)}if(i===null||/[\s=]/.test(i))continue;let c;if(r+2<n.value.length)c=n.value.charAt(r+2);else{let n=t[e+1];c=n?n.type===`text`?n.value[0]??null:FI(n):null}if(c!==`=`){a=e,o=r,s=!0;break}}if(a>=0)break}else if(!PI(n))break}if(a<0){n++;continue}let c=t[a],l=r.slice(0,i),u=r.slice(i+2),d=c.value.slice(0,o),f=c.value.slice(o+2),p=[];u.length>0&&p.push(LI(e,i+2,r.length));for(let e=n+1;e<a;e++)p.push(t[e]);if(d.length>0&&p.push(LI(c,0,o)),!s){n++;continue}let m={type:`mark`,children:p},h=[];l.length>0&&h.push(LI(e,0,i)),h.push(m),f.length>0&&h.push(LI(c,o+2,c.value.length)),t.splice(n,a-n+1,...h),n+=+(l.length>0)+1}}function zI(e){if(`children`in e&&Array.isArray(e.children)){RI(e);for(let t of e.children)zI(t)}}function BI(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;DT(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;NI.lastIndex=0;let a=[],o;for(;(o=NI.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,i=r+t[0].length;if(r>c){let t=LI(e,c,r),i=aI(n,e,c,r);i&&(t.position=i),s.push(t)}let a=LI(e,r+2,i-2),o=aI(n,e,r+2,i-2);o&&(a.position=o);let l={type:`mark`,children:[a]},u=aI(n,e,r,i);u&&(l.position=u),s.push(l),c=i}if(c<i.length){let t=LI(e,c,i.length),r=aI(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[wT,t+s.length]}),zI(e),DT(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function VI(){return e=>{DT(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(!r||r.type!==`image`)return;let i=HI(r,e);n.children[t]=i})}}function HI(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}const UI=/^( {4}|\t)/;function WI(e){let t=e.split(`
198
+ `),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!UI.test(e)))return!1;return n}function GI(e){return e.split(`
200
199
  `).map(e=>e.length===0?e:e.startsWith(` `)?e.slice(4):e.startsWith(` `)?e.slice(1):e).join(`
201
- `)}function qI(e,t){let n=e.position;if(!n||typeof n.start.offset!=`number`||typeof n.end.offset!=`number`)return null;let r=n.start.offset,i=n.end.offset;if(r<0||i>t.length||r>=i)return null;let a=r;for(;a>0&&t[a-1]!==`
202
- `;)a--;if(a===r)return null;let o=t.slice(a,r);if(!WI.test(o))return null;let s=t.slice(a,i);if(!GI(s))return null;let c={start:{line:n.start.line,column:1,offset:a},end:n.end};return{type:`code`,lang:null,meta:null,value:KI(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}const JI=function(){return(e,t)=>{let n=String(t.value??``);n&&OT(e,`paragraph`,(e,t,r)=>{if(!r||r.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=qI(e,n);a&&(r.children[t]=a)})}};function YI(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function XI(){return e=>{OT(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=YI(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),OT(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=YI(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}const ZI=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function QI(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;ZI.lastIndex=0;let a=[],o=0;for(;;){let n=ZI.exec(e);if(n===null)break;let s=n[0],c=n[1],l=n.index;if(l>o){let n={type:`text`,value:e.slice(o,l)},r=oI(t,i,o,l);r&&(n.position=r),a.push(n)}let u={type:`text`,value:c},d=oI(t,i,l+1,l+1+c.length);d&&(u.position=d);let f={type:`link`,url:c,title:null,children:[u],data:{sourceStyle:`autolink`}},p=oI(t,i,l,l+s.length);p&&(f.position=p),a.push(f),o=l+s.length,r=!0}if(a.length===0)n.push(i);else{if(o<e.length){let n={type:`text`,value:e.slice(o)},r=oI(t,i,o,e.length);r&&(n.position=r),a.push(n)}n.push(...a)}}r&&(e.children=n)}const $I=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function eL(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&r+1<e.length&&e[r+1]===`|`){n+=`${i}|`,r++;continue}if(i===`|`){t.push(n),n=``;continue}n+=i}return t.push(n),t}function tL(e,t,n=!1,r){if(!t)return;let i=e.position;if(!i||typeof i.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let a=i.start.offset,o=i.end?.offset??a;if(a<0||o>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${a} end=${o} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(a,o),r=e.value??``;if(n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&$I.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}n.endsWith(`\\`)&&r.endsWith(`\\`)&&(e.data.sourceRaw=n);break}case`emphasis`:{let n=t[a];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(a,a+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:{let n=t[a],i=t.slice(a,o);if(n===`#`){if(e.data.sourceStyle=`atx`,r?.type===`root`){let n=a;for(;n>0&&t[n-1]!==`
200
+ `)}function KI(e,t){let n=e.position;if(!n||typeof n.start.offset!=`number`||typeof n.end.offset!=`number`)return null;let r=n.start.offset,i=n.end.offset;if(r<0||i>t.length||r>=i)return null;let a=r;for(;a>0&&t[a-1]!==`
201
+ `;)a--;if(a===r)return null;let o=t.slice(a,r);if(!UI.test(o))return null;let s=t.slice(a,i);if(!WI(s))return null;let c={start:{line:n.start.line,column:1,offset:a},end:n.end};return{type:`code`,lang:null,meta:null,value:GI(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}const qI=function(){return(e,t)=>{let n=String(t.value??``);n&&DT(e,`paragraph`,(e,t,r)=>{if(!r||r.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=KI(e,n);a&&(r.children[t]=a)})}};function JI(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function YI(){return e=>{DT(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=JI(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),DT(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=JI(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}const XI=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function ZI(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;XI.lastIndex=0;let a=[],o=0;for(;;){let n=XI.exec(e);if(n===null)break;let s=n[0],c=n[1],l=n.index;if(l>o){let n={type:`text`,value:e.slice(o,l)},r=aI(t,i,o,l);r&&(n.position=r),a.push(n)}let u={type:`text`,value:c},d=aI(t,i,l+1,l+1+c.length);d&&(u.position=d);let f={type:`link`,url:c,title:null,children:[u],data:{sourceStyle:`autolink`}},p=aI(t,i,l,l+s.length);p&&(f.position=p),a.push(f),o=l+s.length,r=!0}if(a.length===0)n.push(i);else{if(o<e.length){let n={type:`text`,value:e.slice(o)},r=aI(t,i,o,e.length);r&&(n.position=r),a.push(n)}n.push(...a)}}r&&(e.children=n)}const QI=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function $I(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&r+1<e.length&&e[r+1]===`|`){n+=`${i}|`,r++;continue}if(i===`|`){t.push(n),n=``;continue}n+=i}return t.push(n),t}function eL(e,t,n=!1,r){if(!t)return;let i=e.position;if(!i||typeof i.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let a=i.start.offset,o=i.end?.offset??a;if(a<0||o>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${a} end=${o} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(a,o),r=e.value??``;if(n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&QI.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}n.endsWith(`\\`)&&r.endsWith(`\\`)&&(e.data.sourceRaw=n);break}case`emphasis`:{let n=t[a];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(a,a+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:{let n=t[a],i=t.slice(a,o);if(n===`#`){if(e.data.sourceStyle=`atx`,r?.type===`root`){let n=a;for(;n>0&&t[n-1]!==`
203
202
  `;)n--;let r=t.slice(n,a);r.length>=1&&r.length<=3&&/^ +$/.test(r)&&(e.data.sourceLeadingIndent=r.length)}let n=/^#+( {2,})[^ ]/.exec(i);n&&(e.data.sourceInteriorSpacing=n[1].length);let o=/^.*?[ \t](#+)[ \t]*$/.exec(i);o&&(e.data.sourceTrailingHashes=o[1].length)}else{let t=/\n(=+)[ \t]*$/.exec(i),n=/\n(-+)[ \t]*$/.exec(i),r=t??n;r?(e.data.sourceStyle=`setext`,e.data.sourceUnderlineLength=r[1].length):e.data.sourceStyle=`atx`}break}case`blockquote`:{let n=a;for(;n>0&&t[n-1]!==`
204
203
  `;)n--;let r=!1;for(let e=n;e<a;e++)if(t[e]===`>`){r=!0;break}let i=t.slice(a,o).split(`
205
204
  `),s=[];for(let e=0;e<i.length;e++){let t=i[e];if(t.trim().length===0)continue;if(r&&e>0)break;let n=t.replace(/^ {1,3}/,``);if(n[0]!==`>`){e>0&&t.trimStart()[0]!==`>`&&s.push(`lazy`);continue}if(n.slice(1).trimEnd()!==``)if(n[1]===` `)s.push(1);else{let e=0;for(;n[1+e]===` `;)e++;s.push(e)}}s.length>0&&(e.data.sourceMarkerSpacings=s);break}case`list`:{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];if(!e.ordered&&(n===`-`||n===`*`||n===`+`))e.data.bulletMarker=n;else if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}}break}case`listItem`:{let n=t.slice(a,o),r=/^(?:([-+*])|(\d{1,9})[.)])( *)/.exec(n);if(!r)break;let s=r[1]?1:(r[2]?.length??0)+1,c=r[3].length;c>=2&&c<=4&&(e.data.sourceMarkerSpacing=c),r[2]&&(e.data.sourceOrdinal=Number.parseInt(r[2],10)),e.checked!=null&&/^\[([xX])\] /.exec(n.slice(s+Math.max(c,1)))?.[1]===`X`&&(e.data.sourceCheckboxChar=`X`);let l=s+(c>=2&&c<=4?c:1),u=a;for(;u>0&&t[u-1]!==`
@@ -209,35 +208,36 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
209
208
  `),r=(e.value??``).split(`
210
209
  `);if(n.length===r.length){let t=[],i=!1,a=!0;for(let e=0;e<n.length;e++){let o=n[e],s=r[e];if(!o.endsWith(s)){a=!1;break}let c=o.slice(0,o.length-s.length);if(!/^[ \t]*$/.test(c)){a=!1;break}t.push(c),c!==(s.length>0?` `:``)&&(i=!0)}a&&i&&(e.data.sourceIndents=t)}}break}case`inlineCode`:{let n=t[a];if(n==="`"||n===`~`){e.data.sourceFenceChar=n;let r=0;for(;a+r<t.length&&t[a+r]===n;)r++;r>=1&&(e.data.sourceFenceLength=r);let i=t.slice(a+r,o-r),s=e.value??``;i!==s&&i===` ${s} `&&(e.data.sourcePadded=!0)}break}case`inlineMath`:if(t[a]===`$`){let n=0;for(;a+n<t.length&&t[a+n]===`$`;)n++;e.data.sourceDelimiter=`$`.repeat(n)}break;case`thematicBreak`:e.data.sourceRaw=t.slice(a,o);break;case`table`:{let n=t.slice(a,o),r=n.indexOf(`
211
210
  `);if(r===-1)break;let i=n.slice(r+1),s=i.indexOf(`
212
- `),c=s===-1?i:i.slice(0,s),l=c.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`),u=[];for(let e of l){let t=e.match(/-/g);u.push(t?t.length:0)}u.some(e=>e>0)&&(e.data.sourceDashCounts=u);{let t=c.trim(),n=eL(t);n.length>0&&n[0]===``&&t.startsWith(`|`)&&n.shift(),n.length>0&&n[n.length-1]===``&&t.endsWith(`|`)&&n.pop();let r=n.every(e=>/^[-: ]+$/.test(e)),i=[];for(let e of n){let t=0;for(;t<e.length&&e[t]===` `;)t++;let n=0;for(;n<e.length-t&&e[e.length-1-n]===` `;)n++;i.push({left:t,right:n})}r&&i.length>0&&(e.data.sourceAlignmentPadding=i)}{let t=n.split(`
211
+ `),c=s===-1?i:i.slice(0,s),l=c.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`),u=[];for(let e of l){let t=e.match(/-/g);u.push(t?t.length:0)}u.some(e=>e>0)&&(e.data.sourceDashCounts=u);{let t=c.trim(),n=$I(t);n.length>0&&n[0]===``&&t.startsWith(`|`)&&n.shift(),n.length>0&&n[n.length-1]===``&&t.endsWith(`|`)&&n.pop();let r=n.every(e=>/^[-: ]+$/.test(e)),i=[];for(let e of n){let t=0;for(;t<e.length&&e[t]===` `;)t++;let n=0;for(;n<e.length-t&&e[e.length-1-n]===` `;)n++;i.push({left:t,right:n})}r&&i.length>0&&(e.data.sourceAlignmentPadding=i)}{let t=n.split(`
213
212
  `).filter(e=>e.trim().length>0);if(t.length>=2){let n=t.map(e=>e.trimStart().startsWith(`|`)),r=t.map(e=>/(^|[^\\])\|$/.test(e.trimEnd())),i=n.every(e=>e===n[0]),a=r.every(e=>e===r[0]);if(i&&a){let t=n[0],i=r[0];(!t||!i)&&(e.data.sourceOuterPipes={leading:t,trailing:i})}}}for(let n of e.children??[]){if(n.type!==`tableRow`||!n.position)continue;let e=n.position.start.offset,r=n.position.end.offset;if(typeof e!=`number`||typeof r!=`number`)continue;let i=t.slice(e,r),a=i.indexOf(`
214
- `);a!==-1&&(i=i.slice(0,a));let o=eL(i);o.length>0&&o[0]===``&&i.startsWith(`|`)&&o.shift(),o.length>0&&o[o.length-1]===``&&i.endsWith(`|`)&&o.pop();let s=n.children??[],c=Math.min(s.length,o.length);for(let e=0;e<c;e++){let t=s[e];if(t.type!==`tableCell`)continue;let n=o[e],r=0;for(;r<n.length&&n[r]===` `;)r++;let i=0;for(;i<n.length-r&&n[n.length-1-i]===` `;)i++;t.data||={},t.data.sourcePadding={left:r,right:i}}}break}case`link`:case`linkReference`:if(`children`in e&&e.children.length===0&&(e.data.sourceRaw=t.slice(a,o)),e.type===`link`){let n=t[a];if(n!==`[`&&n!==`<`&&!e.title)e.data.sourceStyle=`gfm-autolink`;else if(n===`[`){let n=t.slice(a,o),r=n.lastIndexOf(`](`);if(r!==-1){let t=r+2;for(;t<n.length&&(n[t]===` `||n[t]===` `);)t++;if(n[t]===`<`&&(e.data.sourceUrlForm=`angle-bracketed`),e.title!==void 0&&e.title!==null&&n[n.length-1]===`)`){let t=n.length-2;for(;t>r+1&&(n[t]===` `||n[t]===` `||n[t]===`
213
+ `);a!==-1&&(i=i.slice(0,a));let o=$I(i);o.length>0&&o[0]===``&&i.startsWith(`|`)&&o.shift(),o.length>0&&o[o.length-1]===``&&i.endsWith(`|`)&&o.pop();let s=n.children??[],c=Math.min(s.length,o.length);for(let e=0;e<c;e++){let t=s[e];if(t.type!==`tableCell`)continue;let n=o[e],r=0;for(;r<n.length&&n[r]===` `;)r++;let i=0;for(;i<n.length-r&&n[n.length-1-i]===` `;)i++;t.data||={},t.data.sourcePadding={left:r,right:i}}}break}case`link`:case`linkReference`:if(`children`in e&&e.children.length===0&&(e.data.sourceRaw=t.slice(a,o)),e.type===`link`){let n=t[a];if(n!==`[`&&n!==`<`&&!e.title)e.data.sourceStyle=`gfm-autolink`;else if(n===`[`){let n=t.slice(a,o),r=n.lastIndexOf(`](`);if(r!==-1){let t=r+2;for(;t<n.length&&(n[t]===` `||n[t]===` `);)t++;if(n[t]===`<`&&(e.data.sourceUrlForm=`angle-bracketed`),e.title!==void 0&&e.title!==null&&n[n.length-1]===`)`){let t=n.length-2;for(;t>r+1&&(n[t]===` `||n[t]===` `||n[t]===`
215
214
  `);)t--;n[t]===`"`?e.data.sourceTitleMarker=`double`:n[t]===`'`?e.data.sourceTitleMarker=`single`:n[t]===`)`&&(e.data.sourceTitleMarker=`paren`)}}}}break;case`definition`:{let n=t.slice(a,o);if(e.data.sourceLayout=n.includes(`
216
- `)?`multiline`:`inline`,typeof e.title==`string`&&n.length>0){let t=n[n.length-1];t===`"`?e.data.sourceTitleMarker=`double`:t===`'`?e.data.sourceTitleMarker=`single`:t===`)`&&(e.data.sourceTitleMarker=`paren`)}break}case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(a,o);break;case`break`:if(e.data.sourceRaw)break;t.slice(a,o).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}function nL(){return RegExp(`(^|\\s)#([a-zA-Z][\\w/-]*)`,`g`)}const rL=nL();function iL(e,t){if(t<=0||e[t-1]!==`\\`)return!1;let n=t-1,r=0;for(;n>=0&&e[n]===`\\`;)r++,n--;return r%2==1}function aL(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value,a=typeof i.position?.start?.offset==`number`?i.position?.start?.offset??0:0;rL.lastIndex=0;let o=[],s=0;for(;;){let n=rL.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(t&&a>=0){let n=a,r=0,i=-1;for(;r<=u&&n<t.length;){let a=t[n]===`\\`&&n+1<t.length&&e[r]===t[n+1],o=a?n+1:n;if(r===u){i=o;break}n=a?n+2:n+1,r+=1}if(i>=0&&iL(t,i))continue}if(u>s){let n={type:`text`,value:e.slice(s,u)},r=oI(t,i,s,u);r&&(n.position=r),o.push(n)}let d={type:`tag`,value:l},f=oI(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}if(o.length===0)n.push(i);else{if(s<e.length){let n={type:`text`,value:e.slice(s)},r=oI(t,i,s,e.length);r&&(n.position=r),o.push(n)}n.push(...o)}}r&&(e.children=n)}const oL=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.wikiLinkEmbed.tag.math.inlineMath.mark.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function sL(e,t){if(!e||typeof e!=`object`)return null;if(typeof e.offset==`number`)return e.offset>=0&&e.offset<=t.length?e.offset:null;let{line:n,column:r}=e;if(typeof n!=`number`||typeof r!=`number`||n<1||r<1)return null;let i=0;for(let e=1;e<n;e++){let e=t.indexOf(`
215
+ `)?`multiline`:`inline`,typeof e.title==`string`&&n.length>0){let t=n[n.length-1];t===`"`?e.data.sourceTitleMarker=`double`:t===`'`?e.data.sourceTitleMarker=`single`:t===`)`&&(e.data.sourceTitleMarker=`paren`)}break}case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(a,o);break;case`break`:if(e.data.sourceRaw)break;t.slice(a,o).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}function tL(){return RegExp(`(^|\\s)#([a-zA-Z][\\w/-]*)`,`g`)}const nL=tL();function rL(e,t){if(t<=0||e[t-1]!==`\\`)return!1;let n=t-1,r=0;for(;n>=0&&e[n]===`\\`;)r++,n--;return r%2==1}function iL(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value,a=typeof i.position?.start?.offset==`number`?i.position?.start?.offset??0:0;nL.lastIndex=0;let o=[],s=0;for(;;){let n=nL.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(t&&a>=0){let n=a,r=0,i=-1;for(;r<=u&&n<t.length;){let a=t[n]===`\\`&&n+1<t.length&&e[r]===t[n+1],o=a?n+1:n;if(r===u){i=o;break}n=a?n+2:n+1,r+=1}if(i>=0&&rL(t,i))continue}if(u>s){let n={type:`text`,value:e.slice(s,u)},r=aI(t,i,s,u);r&&(n.position=r),o.push(n)}let d={type:`tag`,value:l},f=aI(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}if(o.length===0)n.push(i);else{if(s<e.length){let n={type:`text`,value:e.slice(s)},r=aI(t,i,s,e.length);r&&(n.position=r),o.push(n)}n.push(...o)}}r&&(e.children=n)}const aL=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.wikiLinkEmbed.tag.math.inlineMath.mark.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function oL(e,t){if(!e||typeof e!=`object`)return null;if(typeof e.offset==`number`)return e.offset>=0&&e.offset<=t.length?e.offset:null;let{line:n,column:r}=e;if(typeof n!=`number`||typeof r!=`number`||n<1||r<1)return null;let i=0;for(let e=1;e<n;e++){let e=t.indexOf(`
217
216
  `,i);if(e===-1)return null;i=e+1}let a=t.indexOf(`
218
- `,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function cL(e,t){if(!e)return null;let n=sL(e.start,t),r=sL(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function lL(e,t){let n=cL(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function uL(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`;OT(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!oL.has(e.type)){let r=lL(e,n);return i.children[t]=r,TT}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(QI(t,n),aL(t,n))}if(tL(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function dL(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function fL(){return e=>{OT(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=dL(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function pL(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}const mL=(e,t)=>{if(pL(e,t))return 0;let n=t.data?.sourcePrecedingBlankLines;if(typeof n==`number`&&n>=2)return n;let r=e.position,i=t.position;if(!r||!i)return;let a=i.start.line-r.end.line-1;return a>=1?a:void 0};function hL(){return{enter:{mdxFlowExpression:_L,mdxTextExpression:vL},exit:{mdxFlowExpression:yL,mdxFlowExpressionChunk:bL,mdxTextExpression:yL,mdxTextExpressionChunk:bL}}}function gL(){return{handlers:{mdxFlowExpression:xL,mdxTextExpression:xL},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function _L(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function vL(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function yL(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function bL(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function xL(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}const SL=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),CL={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function wL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function TL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function EL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function DL(e){return EL(e)||wL(e)}const OL=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function kL(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?DL:u===`decimal`?wL:TL;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&SL.includes(y)&&(_=y,v=KD(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?KD(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):DL(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(AL(e))h(7,S),C=`�`;else if(e in CL)h(6,S),C=CL[e];else{let t=``;jL(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,OL[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function AL(e){return e>=55296&&e<=57343||e>1114111}function jL(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}const ML=/["&'<>`]/g,NL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,PL=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,FL=/[|\\{}()[\]^$+*?.]/g,IL=new WeakMap;function LL(e,t){if(e=e.replace(t.subset?RL(t.subset):ML,r),t.subset||t.escapeOnly)return e;return e.replace(NL,n).replace(PL,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function RL(e){let t=IL.get(e);return t||(t=zL(e),IL.set(e,t)),t}function zL(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(FL,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function BL(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function VL(e,t){return LL(e,Object.assign({format:BL},t))}function HL(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new k("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new k(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new k("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=kL(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new k("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+ye(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new k("Expected a closing tag for `"+S(r)+"` ("+ye({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new k("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+ye(t.end)+") or another opening tag after the start of `"+t.type+"` ("+ye(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function UL(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=qL,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=KL(GL(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&FT(e,n)>FT(e,o)?o:n;s=t+VL(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+` `+m[e];b+=y.move(`
217
+ `,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function sL(e,t){if(!e)return null;let n=oL(e.start,t),r=oL(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function cL(e,t){let n=sL(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function lL(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`;DT(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!aL.has(e.type)){let r=cL(e,n);return i.children[t]=r,wT}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(ZI(t,n),iL(t,n))}if(eL(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function uL(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function dL(){return e=>{DT(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=uL(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function fL(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}const pL=(e,t)=>{if(fL(e,t))return 0;let n=t.data?.sourcePrecedingBlankLines;if(typeof n==`number`&&n>=2)return n;let r=e.position,i=t.position;if(!r||!i)return;let a=i.start.line-r.end.line-1;return a>=1?a:void 0};function mL(){return{enter:{mdxFlowExpression:gL,mdxTextExpression:_L},exit:{mdxFlowExpression:vL,mdxFlowExpressionChunk:yL,mdxTextExpression:vL,mdxTextExpressionChunk:yL}}}function hL(){return{handlers:{mdxFlowExpression:bL,mdxTextExpression:bL},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function gL(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function _L(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function vL(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function yL(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function bL(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}const xL=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),SL={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function CL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function wL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function TL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function EL(e){return TL(e)||CL(e)}const DL=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function OL(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?EL:u===`decimal`?CL:wL;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&xL.includes(y)&&(_=y,v=GD(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?GD(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):EL(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(kL(e))h(7,S),C=`�`;else if(e in SL)h(6,S),C=SL[e];else{let t=``;AL(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,DL[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function kL(e){return e>=55296&&e<=57343||e>1114111}function AL(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}const jL=/["&'<>`]/g,ML=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NL=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,PL=/[|\\{}()[\]^$+*?.]/g,FL=new WeakMap;function IL(e,t){if(e=e.replace(t.subset?LL(t.subset):jL,r),t.subset||t.escapeOnly)return e;return e.replace(ML,n).replace(NL,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function LL(e){let t=FL.get(e);return t||(t=RL(e),FL.set(e,t)),t}function RL(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(PL,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function zL(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function BL(e,t){return IL(e,Object.assign({format:zL},t))}function VL(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new k("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new k(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new k("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=OL(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new k("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+ye(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new k("Expected a closing tag for `"+S(r)+"` ("+ye({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new k("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+ye(t.end)+") or another opening tag after the start of `"+t.type+"` ("+ye(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function HL(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=KL,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=GL(WL(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&PT(e,n)>PT(e,o)?o:n;s=t+BL(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+` `+m[e];b+=y.move(`
219
218
  `+m.join(`
220
219
  `)+`
221
220
  `+d)}else v&&(b+=y.move(` `+v));return u&&(b+=y.move((i||_?``:` `)+`/`)),b+=y.move(`>`),e.children&&e.children.length>0&&(e.type===`mdxJsxTextElement`?b+=y.move(s.containerPhrasing(e,{...y.current(),before:`>`,after:`<`})):(y.shift(2),b+=y.move(`
222
- `),b+=y.move(WL(e,s,y.current())),b+=y.move(`
223
- `))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function WL(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=KL(GL(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
221
+ `),b+=y.move(UL(e,s,y.current())),b+=y.move(`
222
+ `))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function UL(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=GL(WL(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
224
223
  `,after:`
225
224
  `,...a.current()},u=t.handle(n,e,t,l),d=n.type===`mdxJsxFlowElement`?u:t.indentLines(u,function(e,t,n){return(n?``:o)+e});s.push(a.move(d)),n.type!==`list`&&(t.bulletLastUsed=void 0),c<i.length-1&&s.push(a.move(`
226
225
 
227
- `))}return r.pop(),s.join(``)}function GL(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function KL(e){return` `.repeat(e)}function qL(){return`<`}function JL(){return{enter:{mdxjsEsm:XL},exit:{mdxjsEsm:ZL,mdxjsEsmData:QL}}}function YL(){return{handlers:{mdxjsEsm:$L}}}function XL(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function ZL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function QL(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function $L(e){return e.value||``}function eR(){return[hL(),HL(),JL()]}function tR(e){return{extensions:[gL(),UL(e),YL()]}}function nR(e){return`\x1B[33m`+e+`\x1B[39m`}const rR={}.hasOwnProperty,iR=Symbol(`continue`),aR=Symbol(`exit`),oR=Symbol(`skip`);function sR(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return lR(e)&&(s.displayName=`node (`+nR(e.type)+`)`),s;function s(){let s=n?cR(n(e,t,a,o)):[];if(s[0]===aR)return s;if(s[0]!==oR){let t;for(t in e)if(rR.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(lR(r)){let e=i(r,t,a,n)();if(e[0]===aR)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(lR(r)){let e=i(r,t,void 0,n)();if(e[0]===aR)return e}}}return r?cR(r(e,t,a,o)):s}}}function cR(e){return Array.isArray(e)?e:typeof e==`number`?[iR,e]:[e]}function lR(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function uR(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=fR(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&dR(m);if(g&&!t.allowEmpty)throw new k(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(dR(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,sR(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=pR(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function dR(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function fR(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=mR(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function pR(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function mR(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
226
+ `))}return r.pop(),s.join(``)}function WL(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function GL(e){return` `.repeat(e)}function KL(){return`<`}function qL(){return{enter:{mdxjsEsm:YL},exit:{mdxjsEsm:XL,mdxjsEsmData:ZL}}}function JL(){return{handlers:{mdxjsEsm:QL}}}function YL(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function XL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function ZL(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function QL(e){return e.value||``}function $L(){return[mL(),VL(),qL()]}function eR(e){return{extensions:[hL(),HL(e),JL()]}}function tR(e){return`\x1B[33m`+e+`\x1B[39m`}const nR={}.hasOwnProperty,rR=Symbol(`continue`),iR=Symbol(`exit`),aR=Symbol(`skip`);function oR(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return cR(e)&&(s.displayName=`node (`+tR(e.type)+`)`),s;function s(){let s=n?sR(n(e,t,a,o)):[];if(s[0]===iR)return s;if(s[0]!==aR){let t;for(t in e)if(nR.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(cR(r)){let e=i(r,t,a,n)();if(e[0]===iR)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(cR(r)){let e=i(r,t,void 0,n)();if(e[0]===iR)return e}}}return r?sR(r(e,t,a,o)):s}}}function sR(e){return Array.isArray(e)?e:typeof e==`number`?[rR,e]:[e]}function cR(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function lR(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=dR(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&uR(m);if(g&&!t.allowEmpty)throw new k(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(uR(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,oR(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=fR(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function uR(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function dR(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=pR(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function fR(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function pR(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
228
227
  `;break;case-3:a=`\r
229
- `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function hR(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=gR(n.start,r[0]||t.start),a=gR(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function gR(e,t){if(e&&typeof e==`object`){let n=`line`in e?_R(e.line):void 0,r=`column`in e?_R(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:_R(t)}}}function _R(e){return typeof e==`number`&&e>-1?e:void 0}const vR=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,yR=`#unexpected-type-in-code-expected-an-object-spread-spread`;function bR(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new k("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=vR+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(K(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?xR.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||K(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new k("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=vR+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return J(t)?Y(e,_,`linePrefix`,3)(t):_(t)}}function xR(e,t,n,r,i,a,o){let s=uR(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=hR(e),n=new k("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=vR+yR,n}if(e.expression.properties[1]){let t=new k(`Unexpected extra content in spread: only a single spread is supported`,{place:hR(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=vR+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=hR(e.expression.properties[0]),n=new k("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=vR+yR,n}}if(s.error){let e=new k(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=vR+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function SR(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return bR.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||K(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return bR.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const CR=/[$_\p{ID_Start}]/u,wR=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,TR=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,ER={};function DR(e){return e?CR.test(String.fromCodePoint(e)):!1}function OR(e,t){let n=(t||ER).jsx?TR:wR;return e?n.test(String.fromCodePoint(e)):!1}const kR=`https://github.com/micromark/micromark-extension-mdx-jsx`;function AR(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,D,te,ne,re){let ie=this,O,ae;return oe;function oe(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),se}function se(e){return q(e)?n(e):(O=ce,je(e))}function ce(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),O=le,je;if(t===62)return Ae(t);if(t!==null&&t>=0&&DR(t))return e.enter(d),e.enter(f),e.consume(t),ue;Pe(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function le(t){if(t===62)return Ae(t);if(t!==null&&t>=0&&DR(t))return e.enter(d),e.enter(f),e.consume(t),ue;Pe(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ue(t){if(t!==null&&t>=0&&OR(t,{jsx:!0}))return e.consume(t),ue;if(t===46||t===47||t===58||t===62||t===123||q(t)||WT(t))return e.exit(f),O=de,je(t);Pe(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function de(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,je;if(t===58)return e.enter(h),e.consume(t),e.exit(h),O=he,je;if(t===47||t===62||t===123||t!==null&&t>=0&&DR(t))return e.exit(d),ve(t);Pe(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(t){if(t!==null&&t>=0&&DR(t))return e.enter(m),e.consume(t),pe;Pe(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(t){if(t!==null&&t>=0&&OR(t,{jsx:!0}))return e.consume(t),pe;if(t===46||t===47||t===62||t===123||q(t)||WT(t))return e.exit(m),O=me,je(t);Pe(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,je;if(t===47||t===62||t===123||t!==null&&t>=0&&DR(t))return e.exit(d),ve(t);Pe(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t!==null&&t>=0&&DR(t))return e.enter(g),e.consume(t),ge;Pe(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ge(t){if(t!==null&&t>=0&&OR(t,{jsx:!0}))return e.consume(t),ge;if(t===47||t===62||t===123||q(t)||WT(t))return e.exit(g),O=_e,je(t);Pe(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t===47||t===62||t===123||t!==null&&t>=0&&DR(t))return e.exit(d),ve(t);Pe(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ve(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),O=ke,je;if(t===62)return Ae(t);if(t===123)return bR.call(ie,e,ye,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&DR(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),be;Pe(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(e){return O=ve,je(e)}function be(t){if(t!==null&&t>=0&&OR(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===58||t===61||t===62||t===123||q(t)||WT(t))return e.exit(S),O=xe,je(t);Pe(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),O=Se,je;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),O=Te,je;if(t===47||t===62||t===123||q(t)||WT(t)||t!==null&&t>=0&&DR(t))return e.exit(x),e.exit(b),O=ve,je(t);Pe(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t!==null&&t>=0&&DR(t))return e.enter(w),e.consume(t),Ce;Pe(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t!==null&&t>=0&&OR(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===61||t===62||t===123||q(t)||WT(t))return e.exit(w),e.exit(x),O=we,je(t);Pe(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),O=Te,je;if(t===47||t===62||t===123||t!==null&&t>=0&&DR(t))return e.exit(b),ve(t);Pe(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t===34||t===39)return e.enter(E),e.enter(ee),e.consume(t),e.exit(ee),ae=t,De;if(t===123)return bR.call(ie,e,Ee,te,ne,re,r,i,a,!1,!1,o)(t);Pe(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Ee(t){return e.exit(b),O=ve,je(t)}function De(t){return t===null&&Pe(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ae)+"`"),t===ae?(e.enter(ee),e.consume(t),e.exit(ee),e.exit(E),e.exit(b),ae=void 0,O=ve,je):K(t)?(O=De,je(t)):(e.enter(D),Oe(t))}function Oe(t){return t===null||t===ae||K(t)?(e.exit(D),De(t)):(e.consume(t),Oe)}function ke(e){if(e===62)return Ae(e);Pe(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ae(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function je(t){return K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ne):J(t)||WT(t)?(e.enter(`esWhitespace`),Me(t)):O(t)}function Me(t){return K(t)?(e.exit(`esWhitespace`),je(t)):J(t)||WT(t)?(e.consume(t),Me):(e.exit(`esWhitespace`),O(t))}function Ne(e){if(!o&&ie.parser.lazy[ie.now().line]){let e=new k("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",ie.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=kR+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return je(e)}function Pe(e,t,n){let r=new k(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+jR(e)+`)`)+` `+t+`, expected `+n,ie.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=kR+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function jR(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function MR(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return AR.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function NR(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return AR.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return J(e)?Y(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||K(e)?r(e):i(e)}}}function PR(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:NR(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:MR(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function FR(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function IR(){return PO([SR(),PR(),FR()])}const LR=IR(),RR=eR(),zR=tR();function BR(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===LR)||t.push(LR);let n=e.fromMarkdownExtensions;n.some(e=>e===RR)||n.push(RR);let r=e.toMarkdownExtensions;r.some(e=>e===zR)||r.push(zR)}const VR=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function HR(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;OT(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;VR.lastIndex=0;let a=[],o;for(;(o=VR.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=oI(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`inlineMath`,value:t[1]},l=oI(n,e,r,a);l&&(o.position=l),s.push(o),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=oI(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[TT,t+s.length]})}}const UR=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]);function WR(e){if(!e||e.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function GR(e){if(!e||e.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}const KR=/[ \t]+$/,qR=/^[ \t]*$/;function JR(e){return e.some(e=>!(GR(e)&&qR.test(e.value)))}function YR(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(WR(n)){e.pop();continue}if(n&&UR.has(n.type)&&`children`in n){let t=n.children;if(YR(t,!0),t.length===0){e.pop();continue}}if(!t&&GR(n)&&KR.test(n.value)){let t=n.value.replace(KR,``);if(t.length>0){n.value=t;continue}if(JR(e.slice(0,-1))){e.pop();continue}if(e.every(e=>GR(e)&&qR.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}const XR=new Set([`paragraph`,`heading`,`tableCell`]);function ZR(e){let t=e=>{if(XR.has(e.type)&&`children`in e&&YR(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}const QR={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function $R(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===QR)||e.toMarkdownExtensions.push(QR)}const ez=/(?<!\uE102)<br[ \t]*\/?>/g,tz=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function nz(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;ez.lastIndex=0;let a=[],o=0;for(;;){let n=ez.exec(e);if(n===null)break;let s=n.index;if(s>o){let n={type:`text`,value:e.slice(o,s)},r=oI(t,i,o,s);r&&(n.position=r),a.push(n)}let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=oI(t,i,s,s+n[0].length);l&&(c.position=l),a.push(c),o=s+n[0].length,r=!0}if(a.length===0)n.push(i);else{if(o<e.length){let n={type:`text`,value:e.slice(o)},r=oI(t,i,o,e.length);r&&(n.position=r),a.push(n)}n.push(...a)}}r&&(e.children=n)}function rz(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;OT(e,e=>{if(tz.has(e.type))return TT;let t=e;Array.isArray(t.children)&&nz(e,n)})}}const iz={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===91?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===35?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===124?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===124?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},az={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===33?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===91?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===35?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===124?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===124?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),i++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),a++,d)}function f(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function oz(){return{text:{91:iz,33:az}}}function sz(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function cz(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function lz(e){return e.stack[e.stack.length-1]}function uz(e){let t=lz(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function dz(e){let t=lz(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function fz(e){let t=lz(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,t.data.alias!==null&&n!==r&&(t.data.sourceAlias=n)}function pz(e){let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function mz(e){pz(lz(this)),this.exit(e)}function hz(e){pz(lz(this)),this.exit(e)}const gz={enter:{wikiLink:sz,wikiLinkEmbed:cz},exit:{wikiLinkTarget:uz,wikiLinkAnchor:dz,wikiLinkAlias:fz,wikiLink:mz,wikiLinkEmbed:hz}};function _z(e,t){return typeof e==`string`&&e.trim()===t?e:t}const vz={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${_z(t.data?.sourceTarget,n)}`;return r&&(a+=`#${_z(t.data?.sourceAnchor,r)}`),i&&(a+=`|${_z(t.data?.sourceAlias,i)}`),`${a}]]`},wikiLinkEmbed:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`![[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},yz=oz();function bz(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===yz)||e.micromarkExtensions.push(yz),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===gz)||e.fromMarkdownExtensions.push(gz),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===vz)||e.toMarkdownExtensions.push(vz)}function xz(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}const Sz=[{name:`remark-parse`,plugin:dF},{name:`remark-mdx-agnostic`,plugin:BR},{name:`remark-gfm`,plugin:gj},{name:`remark-math`,plugin:EP,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:bz},{name:`remark-github-alerts`,plugin:mP,options:nI},{name:`callout-transformer`,plugin:tI},{name:`restore-from-mdx`,plugin:MF},{name:`void-br-promoter`,plugin:rz},{name:`restore-entity-refs`,plugin:BF},{name:`restore-backslash-escapes`,plugin:UF},{name:`details-accordion-promoter`,plugin:NI},{name:`image-promoter`,plugin:HI},{name:`indented-code-promoter`,plugin:JI},{name:`math-promoter`,plugin:XI},{name:`single-dollar-math-promoter`,plugin:HR},{name:`highlight-promoter`,plugin:VI},{name:`mermaid-promoter`,plugin:fL},{name:`comment-promoter`,plugin:lI},{name:`merged-post-parse-walker`,plugin:uL},{name:`ensure-non-empty-doc`,plugin:()=>xz}];function Cz(e){let t=Tj();for(let e of Sz)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(Xj,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function wz(e){let t=Tj().use(uP,[`yaml`]).use(gj,{tablePipeAlign:!1}).use(EP,{singleDollarTextMath:!1}).use(BR).use(bz).use($R).use(_j,{bullet:`-`,fences:!0,rule:`-`,join:[mL],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function Tz(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}const Ez=/^\n+$/,Dz=/^\n{2,}$/;function Oz(e,t,n){let r,i,a,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);Ez.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);Dz.test(e)&&(i=e)}let s=[],c=!1;for(let e=1;e<o.length;e++){let n=o[e-1]?.position?.end?.offset,r=o[e]?.position?.start?.offset,i=null;if(typeof n==`number`&&typeof r==`number`&&r>=n){let e=t.slice(n,r);RegExp(`^\\n{3,}$`).test(e)&&(i=e.length-1,c=!0)}s.push(i)}c&&(a=s)}if(!n&&r===void 0&&i===void 0&&!a)return;let s={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i},...a?{gapBlankLines:a}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function kz(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&Ez.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&Dz.test(t.trailing)&&(n.trailing=t.trailing),Array.isArray(t.gapBlankLines)&&t.gapBlankLines.every(e=>e===null||typeof e==`number`&&Number.isInteger(e)&&e>=2)&&(n.gapBlankLines=t.gapBlankLines),n.bom||n.leading||n.trailing||n.gapBlankLines?n:void 0}function Az(e,t){let{source:n,hadBom:r}=Tz(e),i=SI(n),a=new $w(LF(AF(HF(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a),c=Oz(s,i,r),l=t.stringify(s);return c?l.type.create({...l.attrs,sourceDocBoundary:c},l.content,l.marks):l}function jz(e,t){let{source:n,hadBom:r}=Tz(e),i=SI(n),a=new $w(LF(AF(HF(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a);return Oz(s,i,r),s}function Mz(e,t,n){let r=Qj(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});ZR(r);let i=kz(e.attrs?.sourceDocBoundary),a=i?.gapBlankLines;if(a&&a.length===r.children.length-1)for(let e=1;e<r.children.length;e++){let t=a[e-1];if(typeof t==`number`){let n=r.children[e];n.data??={},n.data.sourcePrecedingBlankLines=t}}let o=String(t.stringify(r));return i?.leading&&(o=i.leading+o),i?.trailing&&(o=o.replace(/\n+$/,``)+i.trailing),i?.bom&&(o=`\uFEFF${o}`),o}function Nz(){return typeof process>`u`||!process.env?!1:process.env.NODE_ENV===`development`||process.env.NODE_ENV===`test`}function Pz(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Fz(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function Iz(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!im(e))return e;let n=Fz(Pz(t),e);return n===``||n===`..`||n.startsWith(`../`)?(Nz()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}const Lz=Object.assign(aB,{peek:()=>`$`}),Rz=Object.assign(oB,{peek:()=>`~`}),zz=(()=>{for(let e of zR.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),Bz=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/,Vz={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&Mv(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=Zz(n,t.slice(o,e),{...r,before:r.before+a,after:`\\`})),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=Zz(n,t.slice(o),{...r,before:r.before+a})),a}return Zz(n,e.value??``,r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=nB(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=nB(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:Kz(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(Gz(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`![`);s+=i.move(n.safe(e.alt??``,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(Kz(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
230
- `:` `;l+=s.move(u);let d=String(e.url??``);if(!d||/[\0- ]/.test(d)){let e=n.enter(`destinationLiteral`);l+=s.move(`<`),l+=s.move(n.safe(d,{before:l,after:`>`,...s.current()})),l+=s.move(`>`),e()}else{let e=n.enter(`destinationRaw`);l+=s.move(Kz(d)),e()}if(e.title){let t=i===`multiline`?`
231
- `:` `;l+=s.move(Gz(e.title,a,t))}return o(),l},thematicBreak(e){return e.data?.sourceRaw??`---`},break(e,t,n){let r=e.data?.sourceRaw;return typeof r==`string`&&r.length>0?r:n.stack.includes(`tableCell`)||n.stack.includes(`okAtxHeading`)?`<br />`:e.data?.sourceStyle===`backslash`?`\\
228
+ `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function mR(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=hR(n.start,r[0]||t.start),a=hR(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function hR(e,t){if(e&&typeof e==`object`){let n=`line`in e?gR(e.line):void 0,r=`column`in e?gR(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:gR(t)}}}function gR(e){return typeof e==`number`&&e>-1?e:void 0}const _R=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,vR=`#unexpected-type-in-code-expected-an-object-spread-spread`;function yR(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new k("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=_R+`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,e}if(K(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?bR.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||K(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new k("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=_R+`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,e}return J(t)?Y(e,_,`linePrefix`,3)(t):_(t)}}function bR(e,t,n,r,i,a,o){let s=lR(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=mR(e),n=new k("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=_R+vR,n}if(e.expression.properties[1]){let t=new k(`Unexpected extra content in spread: only a single spread is supported`,{place:mR(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=_R+`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=mR(e.expression.properties[0]),n=new k("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=_R+vR,n}}if(s.error){let e=new k(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=_R+`#could-not-parse-expression-with-acorn`,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function xR(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return yR.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||K(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return yR.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}const SR=/[$_\p{ID_Start}]/u,CR=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,wR=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,TR={};function ER(e){return e?SR.test(String.fromCodePoint(e)):!1}function DR(e,t){let n=(t||TR).jsx?wR:CR;return e?n.test(String.fromCodePoint(e)):!1}const OR=`https://github.com/micromark/micromark-extension-mdx-jsx`;function kR(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,D,te,ne,re){let ie=this,O,ae;return oe;function oe(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),se}function se(e){return q(e)?n(e):(O=ce,je(e))}function ce(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),O=le,je;if(t===62)return Ae(t);if(t!==null&&t>=0&&ER(t))return e.enter(d),e.enter(f),e.consume(t),ue;Pe(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function le(t){if(t===62)return Ae(t);if(t!==null&&t>=0&&ER(t))return e.enter(d),e.enter(f),e.consume(t),ue;Pe(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ue(t){if(t!==null&&t>=0&&DR(t,{jsx:!0}))return e.consume(t),ue;if(t===46||t===47||t===58||t===62||t===123||q(t)||UT(t))return e.exit(f),O=de,je(t);Pe(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function de(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,je;if(t===58)return e.enter(h),e.consume(t),e.exit(h),O=he,je;if(t===47||t===62||t===123||t!==null&&t>=0&&ER(t))return e.exit(d),ve(t);Pe(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(t){if(t!==null&&t>=0&&ER(t))return e.enter(m),e.consume(t),pe;Pe(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(t){if(t!==null&&t>=0&&DR(t,{jsx:!0}))return e.consume(t),pe;if(t===46||t===47||t===62||t===123||q(t)||UT(t))return e.exit(m),O=me,je(t);Pe(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,je;if(t===47||t===62||t===123||t!==null&&t>=0&&ER(t))return e.exit(d),ve(t);Pe(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t!==null&&t>=0&&ER(t))return e.enter(g),e.consume(t),ge;Pe(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ge(t){if(t!==null&&t>=0&&DR(t,{jsx:!0}))return e.consume(t),ge;if(t===47||t===62||t===123||q(t)||UT(t))return e.exit(g),O=_e,je(t);Pe(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t===47||t===62||t===123||t!==null&&t>=0&&ER(t))return e.exit(d),ve(t);Pe(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ve(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),O=ke,je;if(t===62)return Ae(t);if(t===123)return yR.call(ie,e,ye,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&ER(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),be;Pe(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(e){return O=ve,je(e)}function be(t){if(t!==null&&t>=0&&DR(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===58||t===61||t===62||t===123||q(t)||UT(t))return e.exit(S),O=xe,je(t);Pe(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),O=Se,je;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),O=Te,je;if(t===47||t===62||t===123||q(t)||UT(t)||t!==null&&t>=0&&ER(t))return e.exit(x),e.exit(b),O=ve,je(t);Pe(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t!==null&&t>=0&&ER(t))return e.enter(w),e.consume(t),Ce;Pe(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t!==null&&t>=0&&DR(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===61||t===62||t===123||q(t)||UT(t))return e.exit(w),e.exit(x),O=we,je(t);Pe(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),O=Te,je;if(t===47||t===62||t===123||t!==null&&t>=0&&ER(t))return e.exit(b),ve(t);Pe(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t===34||t===39)return e.enter(E),e.enter(ee),e.consume(t),e.exit(ee),ae=t,De;if(t===123)return yR.call(ie,e,Ee,te,ne,re,r,i,a,!1,!1,o)(t);Pe(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Ee(t){return e.exit(b),O=ve,je(t)}function De(t){return t===null&&Pe(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ae)+"`"),t===ae?(e.enter(ee),e.consume(t),e.exit(ee),e.exit(E),e.exit(b),ae=void 0,O=ve,je):K(t)?(O=De,je(t)):(e.enter(D),Oe(t))}function Oe(t){return t===null||t===ae||K(t)?(e.exit(D),De(t)):(e.consume(t),Oe)}function ke(e){if(e===62)return Ae(e);Pe(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ae(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function je(t){return K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ne):J(t)||UT(t)?(e.enter(`esWhitespace`),Me(t)):O(t)}function Me(t){return K(t)?(e.exit(`esWhitespace`),je(t)):J(t)||UT(t)?(e.consume(t),Me):(e.exit(`esWhitespace`),O(t))}function Ne(e){if(!o&&ie.parser.lazy[ie.now().line]){let e=new k("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",ie.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=OR+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return je(e)}function Pe(e,t,n){let r=new k(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+AR(e)+`)`)+` `+t+`, expected `+n,ie.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=OR+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function AR(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function jR(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return kR.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function MR(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return kR.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return J(e)?Y(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||K(e)?r(e):i(e)}}}function NR(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:MR(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:jR(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function PR(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function FR(){return NO([xR(),NR(),PR()])}const IR=FR(),LR=$L(),RR=eR();function zR(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===IR)||t.push(IR);let n=e.fromMarkdownExtensions;n.some(e=>e===LR)||n.push(LR);let r=e.toMarkdownExtensions;r.some(e=>e===RR)||r.push(RR)}const BR=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function VR(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;DT(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;BR.lastIndex=0;let a=[],o;for(;(o=BR.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=aI(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`inlineMath`,value:t[1]},l=aI(n,e,r,a);l&&(o.position=l),s.push(o),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=aI(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[wT,t+s.length]})}}const HR=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]);function UR(e){if(!e||e.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function WR(e){if(!e||e.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}const GR=/[ \t]+$/,KR=/^[ \t]*$/;function qR(e){return e.some(e=>!(WR(e)&&KR.test(e.value)))}function JR(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(UR(n)){e.pop();continue}if(n&&HR.has(n.type)&&`children`in n){let t=n.children;if(JR(t,!0),t.length===0){e.pop();continue}}if(!t&&WR(n)&&GR.test(n.value)){let t=n.value.replace(GR,``);if(t.length>0){n.value=t;continue}if(qR(e.slice(0,-1))){e.pop();continue}if(e.every(e=>WR(e)&&KR.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}const YR=new Set([`paragraph`,`heading`,`tableCell`]);function XR(e){let t=e=>{if(YR.has(e.type)&&`children`in e&&JR(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}const ZR={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function QR(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===ZR)||e.toMarkdownExtensions.push(ZR)}const $R=/(?<!\uE102)<br[ \t]*\/?>/g,ez=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function tz(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;$R.lastIndex=0;let a=[],o=0;for(;;){let n=$R.exec(e);if(n===null)break;let s=n.index;if(s>o){let n={type:`text`,value:e.slice(o,s)},r=aI(t,i,o,s);r&&(n.position=r),a.push(n)}let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=aI(t,i,s,s+n[0].length);l&&(c.position=l),a.push(c),o=s+n[0].length,r=!0}if(a.length===0)n.push(i);else{if(o<e.length){let n={type:`text`,value:e.slice(o)},r=aI(t,i,o,e.length);r&&(n.position=r),a.push(n)}n.push(...a)}}r&&(e.children=n)}function nz(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;DT(e,e=>{if(ez.has(e.type))return wT;let t=e;Array.isArray(t.children)&&tz(e,n)})}}const rz={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===91?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===35?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===124?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===124?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},iz={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===33?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===91?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===91?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===35?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===124?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===124?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),i++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?a===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),a++,d)}function f(t){return t===93?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===93?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function az(){return{text:{91:rz,33:iz}}}function oz(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function sz(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function cz(e){return e.stack[e.stack.length-1]}function lz(e){let t=cz(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function uz(e){let t=cz(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function dz(e){let t=cz(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,t.data.alias!==null&&n!==r&&(t.data.sourceAlias=n)}function fz(e){let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function pz(e){fz(cz(this)),this.exit(e)}function mz(e){fz(cz(this)),this.exit(e)}const hz={enter:{wikiLink:oz,wikiLinkEmbed:sz},exit:{wikiLinkTarget:lz,wikiLinkAnchor:uz,wikiLinkAlias:dz,wikiLink:pz,wikiLinkEmbed:mz}};function gz(e,t){return typeof e==`string`&&e.trim()===t?e:t}const _z={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${gz(t.data?.sourceTarget,n)}`;return r&&(a+=`#${gz(t.data?.sourceAnchor,r)}`),i&&(a+=`|${gz(t.data?.sourceAlias,i)}`),`${a}]]`},wikiLinkEmbed:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`![[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},vz=az();function yz(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===vz)||e.micromarkExtensions.push(vz),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===hz)||e.fromMarkdownExtensions.push(hz),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===_z)||e.toMarkdownExtensions.push(_z)}function bz(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}const xz=[{name:`remark-parse`,plugin:uF},{name:`remark-mdx-agnostic`,plugin:zR},{name:`remark-gfm`,plugin:hj},{name:`remark-math`,plugin:TP,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:yz},{name:`remark-github-alerts`,plugin:pP,options:tI},{name:`callout-transformer`,plugin:eI},{name:`restore-from-mdx`,plugin:jF},{name:`void-br-promoter`,plugin:nz},{name:`restore-entity-refs`,plugin:zF},{name:`restore-backslash-escapes`,plugin:HF},{name:`details-accordion-promoter`,plugin:MI},{name:`image-promoter`,plugin:VI},{name:`indented-code-promoter`,plugin:qI},{name:`math-promoter`,plugin:YI},{name:`single-dollar-math-promoter`,plugin:VR},{name:`highlight-promoter`,plugin:BI},{name:`mermaid-promoter`,plugin:dL},{name:`comment-promoter`,plugin:cI},{name:`merged-post-parse-walker`,plugin:lL},{name:`ensure-non-empty-doc`,plugin:()=>bz}];function Sz(e){let t=wj();for(let e of xz)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(Yj,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function Cz(e){let t=wj().use(lP,[`yaml`]).use(hj,{tablePipeAlign:!1}).use(TP,{singleDollarTextMath:!1}).use(zR).use(yz).use(QR).use(gj,{bullet:`-`,fences:!0,rule:`-`,join:[pL],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function wz(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}const Tz=/^\n+$/,Ez=/^\n{2,}$/;function Dz(e,t,n){let r,i,a,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);Tz.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);Ez.test(e)&&(i=e)}let s=[],c=!1;for(let e=1;e<o.length;e++){let n=o[e-1]?.position?.end?.offset,r=o[e]?.position?.start?.offset,i=null;if(typeof n==`number`&&typeof r==`number`&&r>=n){let e=t.slice(n,r);RegExp(`^\\n{3,}$`).test(e)&&(i=e.length-1,c=!0)}s.push(i)}c&&(a=s)}if(!n&&r===void 0&&i===void 0&&!a)return;let s={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i},...a?{gapBlankLines:a}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function Oz(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&Tz.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&Ez.test(t.trailing)&&(n.trailing=t.trailing),Array.isArray(t.gapBlankLines)&&t.gapBlankLines.every(e=>e===null||typeof e==`number`&&Number.isInteger(e)&&e>=2)&&(n.gapBlankLines=t.gapBlankLines),n.bom||n.leading||n.trailing||n.gapBlankLines?n:void 0}function kz(e,t){let{source:n,hadBom:r}=wz(e),i=xI(n),a=new Qw(IF(kF(VF(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a),c=Dz(s,i,r),l=t.stringify(s);return c?l.type.create({...l.attrs,sourceDocBoundary:c},l.content,l.marks):l}function Az(e,t){let{source:n,hadBom:r}=wz(e),i=xI(n),a=new Qw(IF(kF(VF(i)))),o=t.parse(a);a.value=i;let s=t.runSync(o,a);return Dz(s,i,r),s}function jz(e,t,n){let r=Zj(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});XR(r);let i=Oz(e.attrs?.sourceDocBoundary),a=i?.gapBlankLines;if(a&&a.length===r.children.length-1)for(let e=1;e<r.children.length;e++){let t=a[e-1];if(typeof t==`number`){let n=r.children[e];n.data??={},n.data.sourcePrecedingBlankLines=t}}let o=String(t.stringify(r));return i?.leading&&(o=i.leading+o),i?.trailing&&(o=o.replace(/\n+$/,``)+i.trailing),i?.bom&&(o=`\uFEFF${o}`),o}function Mz(){return typeof process>`u`||!process.env?!1:process.env.NODE_ENV===`development`||process.env.NODE_ENV===`test`}function Nz(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Pz(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function Fz(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!im(e))return e;let n=Pz(Nz(t),e);return n===``||n===`..`||n.startsWith(`../`)?(Mz()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}const Iz=Object.assign(iB,{peek:()=>`$`}),Lz=Object.assign(aB,{peek:()=>`~`}),Rz=(()=>{for(let e of RR.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),zz=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/,Bz={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&Mv(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=Xz(n,t.slice(o,e),{...r,before:r.before+a,after:`\\`})),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=Xz(n,t.slice(o),{...r,before:r.before+a})),a}return Xz(n,e.value??``,r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=tB(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=tB(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:Gz(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(Wz(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`![`);s+=i.move(n.safe(e.alt??``,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(Gz(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
229
+ `:` `;l+=s.move(u);let d=String(e.url??``);if(!d||/[\0- ]/.test(d)){let e=n.enter(`destinationLiteral`);l+=s.move(`<`),l+=s.move(n.safe(d,{before:l,after:`>`,...s.current()})),l+=s.move(`>`),e()}else{let e=n.enter(`destinationRaw`);l+=s.move(Gz(d)),e()}if(e.title){let t=i===`multiline`?`
230
+ `:` `;l+=s.move(Wz(e.title,a,t))}return o(),l},thematicBreak(e){return e.data?.sourceRaw??`---`},break(e,t,n){let r=e.data?.sourceRaw;return typeof r==`string`&&r.length>0?r:n.stack.includes(`tableCell`)||n.stack.includes(`okAtxHeading`)?`<br />`:e.data?.sourceStyle===`backslash`?`\\
232
231
  `:`
233
232
  `},code(e,t){let n=e.value??``;if(e.data?.sourceStyle===`indented`){let t=n.split(`
234
233
  `),r=e.data.sourceIndents;return Array.isArray(r)&&r.length===t.length?t.map((e,t)=>`${r[t]??(e.length>0?` `:``)}${e}`).join(`
235
234
  `):t.map(e=>e.length>0?` ${e}`:e).join(`
236
- `)}let r=e.data?.sourceFenceChar===`~`?`~`:"`",i=Jy(r,n,e.data?.sourceFenceLength??3),a=e.data?.sourceClosingFenceLength,o=typeof a==`number`&&a>i?a:i,s=e.data?.sourceFenceIndent,c=typeof s==`number`&&s>=1&&s<=3?` `.repeat(s):``,l=e.data?.sourceInfoPadding,u=r.repeat(i),d=e.lang??``,f=d&&typeof l==`number`&&l>=1?` `.repeat(l):``,p=e.meta?` ${e.meta}`:``;if(e.data?.sourceUnclosedFence===!0&&t?.type===`root`&&t.children[t.children.length-1]===e){let e=`${u}${f}${d}${p}${n.length>0?`\n${n}`:``}`;return c?e.split(`
237
- `).map(e=>e.length>0?`${c}${e}`:e).join(`
238
- `):e}let m=`${u}${f}${d}${p}\n${n}\n${r.repeat(o)}`;return c?m.split(`
239
- `).map(e=>e.length>0?`${c}${e}`:e).join(`
240
- `):m},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?l.replace(/\|/g,`\\$&`):l},inlineMath:Lz,delete:Rz,heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
235
+ `)}let r=e.data?.sourceFenceChar===`~`?`~`:"`",i=Math.max(3,e.data?.sourceFenceLength??3),a=RegExp(`^ {0,3}(\\${r}+)[ \\t]*$`);for(let e of n.split(`
236
+ `)){let t=a.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}let o=e.data?.sourceClosingFenceLength,s=typeof o==`number`&&o>i?o:i,c=e.data?.sourceFenceIndent,l=typeof c==`number`&&c>=1&&c<=3?` `.repeat(c):``,u=e.data?.sourceInfoPadding,d=r.repeat(i),f=e.lang??``,p=f&&typeof u==`number`&&u>=1?` `.repeat(u):``,m=e.meta?` ${e.meta}`:``;if(e.data?.sourceUnclosedFence===!0&&t?.type===`root`&&t.children[t.children.length-1]===e){let e=`${d}${p}${f}${m}${n.length>0?`\n${n}`:``}`;return l?e.split(`
237
+ `).map(e=>e.length>0?`${l}${e}`:e).join(`
238
+ `):e}let h=`${d}${p}${f}${m}\n${n}\n${r.repeat(s)}`;return l?h.split(`
239
+ `).map(e=>e.length>0?`${l}${e}`:e).join(`
240
+ `):h},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?l.replace(/\|/g,`\\$&`):l},inlineMath:Iz,delete:Lz,heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
241
241
  `,after:`
242
242
  `}),i=e.data?.sourceUnderlineLength,o=typeof i==`number`&&i>=1?i:Math.max(t.length,3);return`${t}\n${(a===1?`=`:`-`).repeat(o)}`}let o=e.data?.sourceLeadingIndent,s=typeof o==`number`&&o>=1&&o<=3?` `.repeat(o):``,c=e.data?.sourceInteriorSpacing,l=typeof c==`number`&&c>=2?` `.repeat(c):` `,u=`#`.repeat(a),d=n.enter(`okAtxHeading`),f=n.containerPhrasing(e,{...r,before:`${u} `,after:`
243
243
  `});d();let p=e.data?.sourceTrailingHashes;if(typeof p==`number`&&p>0){let e=`#`.repeat(p);return f?`${s}${u}${l}${f} ${e}`:`${s}${u} ${e}`}return f?`${s}${u}${l}${f}`:`${s}${u}`},list(e,t,n,r){let i=n.options.bullet||`-`,a=!!e.ordered,o=n.bulletCurrent,s=n.bulletLastUsed;if(!a){let t=e.data?.bulletMarker;(t===`-`||t===`*`||t===`+`)&&(n.bulletCurrent=t)}let c=e.children||[],l=[],u=a?e.data?.listMarkerDelimiter??`.`:null,d=e.start??1;for(let t=0;t<c.length;t++){let o=c[t],s=o.data?.sourceOrdinal,f=typeof s==`number`&&s>=0?s:d+t,p=a?`${f}${u}`:e.data?.bulletMarker??i,m=o.data?.sourceMarkerSpacing,h=typeof m==`number`&&m>=2&&m<=4?m:1,g=` `.repeat(h),_=p;o.checked===!0?_+=`${g}[${o.data?.sourceCheckboxChar===`X`?`X`:`x`}]`:o.checked===!1&&(_+=`${g}[ ]`);let v=o.data?.sourceContinuationIndent,y=p.length+h,b=typeof v==`number`&&v>=y&&v<=y+3?v:y,x=` `.repeat(b),S=o.checked===null||o.checked===void 0?g:` `,C=o.children??[],w=C[0]?.type===`list`,T;if(w){let e=o.checked!==null&&o.checked!==void 0,t=n.containerFlow({...o,children:[C[0]]},r),i=C.slice(1),a=i.length?n.containerFlow({...o,children:i},r):``,s=t.split(`
@@ -251,10 +251,10 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
251
251
 
252
252
  `:`
253
253
  `;return l.join(f)},table(e,t,n,r){let i=n.enter(`table`),a=[],o=[],s=e.children??[];for(let e of s){let t=e.children??[],i=[],s=[];for(let e of t){let t=n.enter(`tableCell`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,{...r,before:` `,after:` `});a(),t(),i.push(o);let c=e.data?.sourcePadding;s.push(c&&typeof c.left==`number`&&typeof c.right==`number`?{left:c.left,right:c.right}:null)}a.push(i),o.push(s)}i();let c=e.align??[],l=e.data?.sourceDashCounts,u=a[0]?.length??0,d=a.slice(1).reduce((e,t)=>Math.max(e,t.length),0),f=Math.max(u,d,c.length);if(f===0)return console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:s.length})),``;let p=[];for(let e=0;e<f;e++){let t=c[e],n=``,r=``;t===`center`?(n=`:`,r=`:`):t===`left`?n=`:`:t===`right`&&(r=`:`);let i=l?.[e],a=typeof i==`number`&&i>=1?i:1;p.push(n+`-`.repeat(a)+r)}let m=(e,t)=>{let n=[];for(let r=0;r<f;r++){let i=e[r]??``,a=t[r]??{left:1,right:1};n.push(` `.repeat(a.left)+i+` `.repeat(a.right))}let r=v&&!v.leading?``:`|`,i=v&&!v.trailing?``:`|`;return`${r}${n.join(`|`)}${i}`},h=e.data?.sourceAlignmentPadding,g=Array.from({length:f},(e,t)=>{let n=h?.[t];return n&&typeof n.left==`number`&&typeof n.right==`number`?n:null}),_=e.data?.sourceOuterPipes,v=_&&f>=2&&a.every(e=>{let t=(e[0]??``).trim(),n=(e[f-1]??``).trim();return(_.leading||t.length>0)&&(_.trailing||n.length>0&&!n.endsWith(`\\`))})?_:null;if(a.length===0)return m(p,g);let y=[];y.push(m(a[0],o[0]??[])),y.push(m(p,g));for(let e=1;e<a.length;e++)y.push(m(a[e],o[e]??[]));return y.join(`
254
- `)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=Hz(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:zz({...i,attributes:(i.attributes??[]).map(Wz)},t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=nB(n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),r,`==`),o+=i.move(`==`),a(),o},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=Hz(e.attributes??[]);return r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>{if(n)return`>`;let r=c++,i=s?.[r];return i===`lazy`&&r>0&&!Bz.test(e)?e:i===`none`||i===0?`>${e}`:typeof i==`number`&&i>=2&&!e.startsWith(` `)?`>${` `.repeat(i)}${e}`:`> ${e}`})}};function Hz(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){n.value.includes(`"`)?t.push(`${e}={${Uz(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function Uz(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Wz(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:Uz(e.value)}}:e}function Gz(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function Kz(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function qz(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>Jz(t)?e:`\\${e}`)}function Jz(e){if(e.charCodeAt(0)!==35)return!1;let t=e[1]===`x`||e[1]===`X`?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return t===9||t===10||t===11||t===12||t===13||t===32||t===160}const Yz=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Xz(e){return e.replace(Yz,e=>Dv(e)?``+e.slice(1):e)}function Zz(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character===`!`&&e.after===`\\[`&&e.inConstruct===`phrasing`||e.character===`@`&&e.before===`[+\\-.\\w]`||e.character===`{`&&Array.isArray(e.inConstruct)&&e.inConstruct.includes(`phrasing`)||e.character==="`"||(e.character===`*`||e.character===`_`||e.character===`~`)&&e.inConstruct===`phrasing`||e.character===`=`&&e.atBreak===!0||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`)),e.unsafe=e.unsafe.map(e=>{if(e.character!==`)`||e.atBreak!==!0||e.before!==`\\d+`||e.after!==void 0)return e;let t={...e,after:`(?:[ \r
255
- ]|$)`};return delete t._compiled,t});let i;try{i=e.safe(Xz(t),n)}finally{e.unsafe=r}return i=i.replaceAll(``,`\\&`),qz(tB(i,n))}function Qz(e){if(Number.isNaN(e))return`ws`;let t=aD(e);return t===1?`ws`:t===2?`punct`:`other`}function $z(e,t,n){let r=Qz(t),i=Qz(n),a=i!==`ws`&&(i===`other`||r!==`other`),o=r!==`ws`&&(r===`other`||i!==`other`);return e===`_`?a&&(!o||r===`punct`)||o&&(!a||i===`punct`):a||o}function eB(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
256
- `||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function tB(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&eB(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=$z(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function nB(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);rB(i.charCodeAt(i.length-1),s,r)&&(o=iB(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return rB(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+iB(c)),o}function rB(e,t,n){return!(aD(t)!==1||n===`_`&&aD(e)===void 0)}function iB(e){return`&#x${e.toString(16).toUpperCase()};`}function aB(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!sB(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function oB(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=nB(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function sB(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function cB(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var lB=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=xd(e.extensions),this.handlers=yB(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?OM({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=bB(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Cz({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=wz({toMarkdownHandlers:Vz})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Az(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?jz(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?MN(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e,t){let n;try{n=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}let r=this.freshnessHolder.checker;t?.skipFreshnessDerive&&(this.freshnessHolder.checker=void 0);try{return Mz(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};const uB=bN();function dB(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function fB(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function pB(e,t){return e.attrs.sourceDirty||fB(e)?!0:t?t.isDiverged(e.toJSON()):!1}function mB(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function hB(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function gB(e,t){if(e.length===0)return hB({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return hB({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[gB(n.children,t)]}}return hB({type:`inlineCode`,value:_B(e)},t)}function _B(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=_B(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}const vB=s;function yB(e,t){let n=e.nodes,r=e.marks,a={};n.paragraph&&(a.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(a.blockquote=qj(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(a.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(a.tableRow=qj(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(a.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(a.image=e=>{let r=e.url??``,i=Iz(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?a.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):a.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(a.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i)return r.sourceLiteral?e.text(n,[r.sourceLiteral.create({sourceRaw:i})]):e.text(n);let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n);let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&Av(t.raw)!==null&&Dv(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=Av(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(a.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let o=r.strike??r.delete;if(o&&(a.delete=Jj(o,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(a.mark=Jj(r.highlight)),r.comment&&(a.comment=Jj(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(a.commentBlock=qj(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(a.emphasis=Jj(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(a.strong=Jj(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(a.heading=qj(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(a.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceUnclosedFence:t.data?.sourceUnclosedFence??!1,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(a.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(a.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(a.list=qj(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(a.listItem=qj(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;a.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},a.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(a.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let s=n.linkDefinition??n.linkRefDef;if(s){let e=!!s.spec.attrs?.url,t=!!s.spec.attrs?.href,n=!!s.spec.attrs?.identifier,r=!!s.spec.attrs?.sourceLayout,i=!!s.spec.attrs?.sourceTitleMarker;a.definition=a=>{let o={title:a.title??null};return n&&(o.identifier=a.identifier??``),o.label=a.label??a.identifier??``,e?o.url=a.url??``:t&&(o.href=a.url??``),r&&(o.sourceLayout=a.data?.sourceLayout??null),i&&(o.sourceTitleMarker=a.data?.sourceTitleMarker??null),s.createAndFill(o)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};a.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=uB.getOrWildcard(o),c=dB(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=Iz(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let i=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};a.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=i(t,`formula`)??``,r=i(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=i(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},a.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},a.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(a.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(a.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(a.wikiLinkEmbed=(a,o)=>{let s=a.data?.target??``,c=a.data?.alias??null,l=a.data?.anchor??null,d=Gv(s),{resolveEmbed:f,sourcePath:p}=t.current,m=f&&p?f(s,p)??null:null,h=m?`/${m}`:s,g=o?.type===`paragraph`&&Array.isArray(o.children)&&o.children.length===1;if(g&&vB.has(d)&&n.jsxComponent&&uB.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,alt:c??s,target:s,anchor:l,alias:c}});if(g&&i.has(d)&&n.jsxComponent&&uB.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,title:c??s,target:s,anchor:l,alias:c}});if(g&&C.has(d)&&n.jsxComponent&&uB.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,title:c??s,target:s,anchor:l,alias:c}});if(g&&u.has(d)&&n.jsxComponent&&uB.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&p?e(s,p)??null:null,i=r===null?null:cB(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,target:s,anchor:l,alias:c,size:i}})}let _=c||(l?`${s}#${l}`:s);if(r.link){let t=r.link.create({href:h,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:s,anchor:l,alias:c});return e.text(_,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(a.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),a.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},a.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?a.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):a.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?a.footnoteDefinition=qj(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):a.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},a.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},a}function bB(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=$j(`paragraph`)),i.blockquote&&(n.blockquote=$j(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),i.heading&&(n.heading=$j(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),i.codeBlock&&(n.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceUnclosedFence:e.attrs.sourceUnclosedFence===!0?!0:void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),i.thematicBreak&&(n.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),i.hardBreak&&(n.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),i.list&&(n.list=$j(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),i.listItem&&(n.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&mB(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),i.table&&(n.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),i.tableRow&&(n.tableRow=$j(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:Fj(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(i.tableCell&&(n.tableCell=(e,t,n)=>o(e,n.all(e))),i.tableHeader&&(n.tableHeader=(e,t,n)=>o(e,n.all(e))),i.image&&(n.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),i.imageReference&&(n.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),i.htmlBlock&&(n.htmlBlock=e=>({type:`html`,value:e.attrs.content})),i.linkDefinition??i.linkRefDef){let e=i.linkDefinition?`linkDefinition`:`linkRefDef`;n[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(i.jsxComponent&&(n.jsxComponent=(e,n,r)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let i=e.attrs.componentName||null,a=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!pB(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:uB.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:uB,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),i.rawMdxFallback&&(n.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),i.jsxInline&&(n.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),i.mathInline&&(n.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),i.wikiLink&&(n.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),i.tag&&(n.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),i.wikiLinkEmbed&&(n.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),a.emphasis&&(r.emphasis=eM(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=eM(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return gB(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=eM(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=eM(`mark`)),a.comment&&(r.comment=eM(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=$j(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),i.footnoteReference&&(n.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),i.footnoteDefinition&&(n.footnoteDefinition=$j(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),a.link&&(r.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),a.escapeMark&&(r.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),a.sourceLiteral&&(r.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return Mv(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:n,markHandlers:r}}const xB={default:!0,MD013:!1};function SB(e){return e??xB}const CB={access:se,accessSync:ce,readFile:le,readFileSync:ue},wB={EOL:de,homedir:fe};var TB=r(((e,t)=>{let{flatTokensSymbol:n,htmlFlowSymbol:r,newlineRe:i}=O();function a(e){return Object.hasOwn(e,r)}function o(e){let{text:t,type:n}=e;if(n===`htmlFlow`&&t.startsWith(`<!--`)&&t.endsWith(`-->`)){let e=t.slice(4,-3);return!e.startsWith(`>`)&&!e.startsWith(`->`)&&!e.endsWith(`-`)}return!1}function s(e,t,n){for(let r=t;r<=n;r++)e.add(r)}function c(e,t,n){let r=[],i=[{array:e,index:0}];for(;i.length>0;){let e=i[i.length-1],{array:a,index:o}=e;if(o<a.length){let o=a[e.index++];t(o)&&r.push(o);let{children:s}=o;if(s.length>0){let e=n?n(o):s;i.push({array:e,index:0})}}else i.pop()}return r}function l(e,t,r){let i=e=>t.includes(e.type)&&(r||!a(e)),o=e[n];return o?o.filter(i):c(e,i)}function u(e,t,n=1){return l(e,[`blockQuotePrefix`,`linePrefix`]).filter(e=>e.startLine===t).map(e=>e.text).join(``).trimEnd().concat(`
257
- `).repeat(n)}function d(e,t){let n=Array.isArray(e)?e:[e];for(let e of t){let t=t=>Array.isArray(e)?e.includes(t.type):e===t.type;n=n.flatMap(e=>e.children.filter(t))}return n}function f(e){let t=1,{text:n}=e.children.find(e=>[`atxHeadingSequence`,`setextHeadingLine`].includes(e.type));return n[0]===`#`?t=Math.min(n.length,6):n[0]===`-`&&(t=2),t}function p(e){return e.type===`setextHeading`?`setext`:e.children.filter(e=>e.type===`atxHeadingSequence`).length===1?`atx`:`atx_closed`}function m(e){return d(e,[[`atxHeadingText`,`setextHeadingText`]]).flatMap(e=>e.children.filter(e=>e.type!==`htmlText`)).map(e=>e.text).join(``).replace(i,` `)}function h(e){let t=/^<([^!>][^/\s>]*)/;if(e.type===`htmlText`){let n=t.exec(e.text);if(n){let e=n[1],t=e.startsWith(`/`);return{close:t,name:t?e.slice(1):e}}}return null}function g(e,t){let n=e;for(;(n=n.parent)&&!t.includes(n.type););return n}let _=/^#tab\//;function v(e){if(e?.type===`atxHeading`){let t=d(e,[`atxHeadingText`]);if(t.length===1&&t[0].children.length===1&&t[0].children[0].type===`link`){let e=l(t[0].children[0].children,[`resourceDestinationString`]);return e.length===1&&_.test(e[0].text)}}return!1}t.exports={addRangeToSet:s,filterByPredicate:c,filterByTypes:l,getBlockQuotePrefixText:u,getDescendantsByType:d,getHeadingLevel:f,getHeadingStyle:p,getHeadingText:m,getHtmlTagInfo:h,getParentOfType:g,inHtmlFlow:a,isDocfxTab:v,isHtmlFlowComment:o,nonContentTokens:new Set([`blockQuoteMarker`,`blockQuotePrefix`,`blockQuotePrefixWhitespace`,`gfmFootnoteDefinitionIndent`,`lineEnding`,`lineEndingBlank`,`linePrefix`,`listItemIndent`,`undefinedReference`,`undefinedReferenceCollapsed`,`undefinedReferenceFull`,`undefinedReferenceShortcut`])}})),X=t(r(((e,t)=>{let n=TB(),{newlineRe:r,nextLinesRe:i}=O();t.exports.newLineRe=r,t.exports.nextLinesRe=i,t.exports.frontMatterRe=/((^---[^\S\r\n\u2028\u2029]*$[\s\S]+?^---\s*)|(^\+\+\+[^\S\r\n\u2028\u2029]*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{[^\S\r\n\u2028\u2029]*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m;let a=/(<!--\s*markdownlint-(disable|enable|capture|restore|disable-file|enable-file|disable-line|disable-next-line|configure-file))(?:\s|-->)/gi;t.exports.inlineCommentStartRe=a,t.exports.endOfLineHtmlEntityRe=/&(?:#\d+|#[xX][\da-fA-F]+|[a-zA-Z]{2,31}|blk\d{2}|emsp1[34]|frac\d{2}|sup\d|there4);$/,t.exports.endOfLineGemojiCodeRe=/:(?:[abmovx]|[-+]1|100|1234|(?:1st|2nd|3rd)_place_medal|8ball|clock\d{1,4}|e-mail|non-potable_water|o2|t-rex|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7981|u7a7a|[a-z]{2,15}2?|[a-z]{1,14}(?:_[a-z\d]{1,16})+):$/;let o=`.,;:!?。,;:!?`;t.exports.allPunctuation=o,t.exports.allPunctuationNoQuestion=o.replace(/[??]/gu,``);function s(e){return typeof e==`number`}t.exports.isNumber=s;function c(e){return typeof e==`string`}t.exports.isString=c;function l(e){return e.length===0}t.exports.isEmptyString=l;function u(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}t.exports.isObject=u;function d(e){return!!e&&Object.getPrototypeOf(e)===URL.prototype}t.exports.isUrl=d;function f(e){return Array.isArray(e)?[...e]:e}t.exports.cloneIfArray=f;function p(e){return d(e)?new URL(e):e}t.exports.cloneIfUrl=p,t.exports.getHtmlAttributeRe=function(e){return RegExp(`\\s${e}\\s*=\\s*['"]?([^'"\\s>]*)`,`iu`)};function m(e){return!e||!e.trim()||!(e=>{for(;;){let t=e.indexOf(`<!--`),n=e.indexOf(`-->`);if(n!==-1&&(t===-1||n<t))e=e.slice(n+3);else if(t!==-1&&n!==-1)e=e.slice(0,t)+e.slice(n+3);else if(t!==-1&&n===-1)e=e.slice(0,t);else return e}})(e).replace(/>/g,``).trim()}t.exports.isBlankLine=m;let h=/^ *\|/,g=/[^\r\n]/g,_=/[^ \r\n]/g,v=/ +[\r\n]/g,y=e=>e.replace(g,`.`);t.exports.clearHtmlCommentText=function(e){let t=0;for(;(t=e.indexOf(`<!--`,t))!==-1;){let n=e.indexOf(`-->`,t+2);if(n===-1)break;if(n>t+4){let r=e.slice(t+4,n),i=e.lastIndexOf(`
254
+ `)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=Vz(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:Rz({...i,attributes:(i.attributes??[]).map(Uz)},t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=tB(n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),r,`==`),o+=i.move(`==`),a(),o},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=Vz(e.attributes??[]);return r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>{if(n)return`>`;let r=c++,i=s?.[r];return i===`lazy`&&r>0&&!zz.test(e)?e:i===`none`||i===0?`>${e}`:typeof i==`number`&&i>=2&&!e.startsWith(` `)?`>${` `.repeat(i)}${e}`:`> ${e}`})}};function Vz(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){n.value.includes(`"`)?t.push(`${e}={${Hz(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function Hz(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Uz(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:Hz(e.value)}}:e}function Wz(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function Gz(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function Kz(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>qz(t)?e:`\\${e}`)}function qz(e){if(e.charCodeAt(0)!==35)return!1;let t=e[1]===`x`||e[1]===`X`?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return t===9||t===10||t===11||t===12||t===13||t===32||t===160}const Jz=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Yz(e){return e.replace(Jz,e=>Dv(e)?``+e.slice(1):e)}function Xz(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character===`!`&&e.after===`\\[`&&e.inConstruct===`phrasing`||e.character===`@`&&e.before===`[+\\-.\\w]`||e.character===`{`&&Array.isArray(e.inConstruct)&&e.inConstruct.includes(`phrasing`)||e.character==="`"||(e.character===`*`||e.character===`_`||e.character===`~`)&&e.inConstruct===`phrasing`||e.character===`=`&&e.atBreak===!0||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`||e.character===` `&&e.inConstruct===`phrasing`&&e.after===`[\\r\\n]`)),e.unsafe=e.unsafe.map(e=>{if(e.character!==`)`||e.atBreak!==!0||e.before!==`\\d+`||e.after!==void 0)return e;let t={...e,after:`(?:[ \r
255
+ ]|$)`};return delete t._compiled,t});let i;try{i=e.safe(Yz(t),n)}finally{e.unsafe=r}return i=i.replaceAll(``,`\\&`),Kz(eB(i,n))}function Zz(e){if(Number.isNaN(e))return`ws`;let t=iD(e);return t===1?`ws`:t===2?`punct`:`other`}function Qz(e,t,n){let r=Zz(t),i=Zz(n),a=i!==`ws`&&(i===`other`||r!==`other`),o=r!==`ws`&&(r===`other`||i!==`other`);return e===`_`?a&&(!o||r===`punct`)||o&&(!a||i===`punct`):a||o}function $z(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
256
+ `||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function eB(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&$z(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=Qz(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function tB(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);nB(i.charCodeAt(i.length-1),s,r)&&(o=rB(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return nB(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+rB(c)),o}function nB(e,t,n){return!(iD(t)!==1||n===`_`&&iD(e)===void 0)}function rB(e){return`&#x${e.toString(16).toUpperCase()};`}function iB(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!oB(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function aB(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=tB(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function oB(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function sB(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var cB=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=xd(e.extensions),this.handlers=vB(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?DM({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=yB(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Sz({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=Cz({toMarkdownHandlers:Bz})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return kz(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Az(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?jN(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e,t){let n;try{n=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}let r=this.freshnessHolder.checker;t?.skipFreshnessDerive&&(this.freshnessHolder.checker=void 0);try{return jz(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};const lB=yN();function uB(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function dB(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function fB(e,t){return e.attrs.sourceDirty||dB(e)?!0:t?t.isDiverged(e.toJSON()):!1}function pB(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function mB(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function hB(e,t){if(e.length===0)return mB({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return mB({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[hB(n.children,t)]}}return mB({type:`inlineCode`,value:gB(e)},t)}function gB(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=gB(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}const _B=s;function vB(e,t){let n=e.nodes,r=e.marks,a={};n.paragraph&&(a.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(a.blockquote=Kj(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(a.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(a.tableRow=Kj(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(a.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(a.image=e=>{let r=e.url??``,i=Fz(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?a.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):a.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(a.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i)return r.sourceLiteral?e.text(n,[r.sourceLiteral.create({sourceRaw:i})]):e.text(n);let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n);let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&Av(t.raw)!==null&&Dv(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=Av(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(a.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let o=r.strike??r.delete;if(o&&(a.delete=qj(o,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(a.mark=qj(r.highlight)),r.comment&&(a.comment=qj(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(a.commentBlock=Kj(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(a.emphasis=qj(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(a.strong=qj(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(a.heading=Kj(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(a.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceUnclosedFence:t.data?.sourceUnclosedFence??!1,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(a.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(a.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(a.list=Kj(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(a.listItem=Kj(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;a.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},a.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(a.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let s=n.linkDefinition??n.linkRefDef;if(s){let e=!!s.spec.attrs?.url,t=!!s.spec.attrs?.href,n=!!s.spec.attrs?.identifier,r=!!s.spec.attrs?.sourceLayout,i=!!s.spec.attrs?.sourceTitleMarker;a.definition=a=>{let o={title:a.title??null};return n&&(o.identifier=a.identifier??``),o.label=a.label??a.identifier??``,e?o.url=a.url??``:t&&(o.href=a.url??``),r&&(o.sourceLayout=a.data?.sourceLayout??null),i&&(o.sourceTitleMarker=a.data?.sourceTitleMarker??null),s.createAndFill(o)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};a.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=lB.getOrWildcard(o),c=uB(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=Fz(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let i=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};a.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=i(t,`formula`)??``,r=i(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=i(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},a.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},a.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(a.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(a.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(a.wikiLinkEmbed=(a,o)=>{let s=a.data?.target??``,c=a.data?.alias??null,l=a.data?.anchor??null,d=Gv(s),{resolveEmbed:f,sourcePath:p}=t.current,m=f&&p?f(s,p)??null:null,h=m?`/${m}`:s,g=o?.type===`paragraph`&&Array.isArray(o.children)&&o.children.length===1;if(g&&_B.has(d)&&n.jsxComponent&&lB.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,alt:c??s,target:s,anchor:l,alias:c}});if(g&&i.has(d)&&n.jsxComponent&&lB.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,title:c??s,target:s,anchor:l,alias:c}});if(g&&C.has(d)&&n.jsxComponent&&lB.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,title:c??s,target:s,anchor:l,alias:c}});if(g&&u.has(d)&&n.jsxComponent&&lB.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&p?e(s,p)??null:null,i=r===null?null:sB(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:h,target:s,anchor:l,alias:c,size:i}})}let _=c||(l?`${s}#${l}`:s);if(r.link){let t=r.link.create({href:h,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:s,anchor:l,alias:c});return e.text(_,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(a.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),a.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},a.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?a.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):a.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?a.footnoteDefinition=Kj(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):a.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},a.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},a}function yB(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=Qj(`paragraph`)),i.blockquote&&(n.blockquote=Qj(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),i.heading&&(n.heading=Qj(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),i.codeBlock&&(n.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceUnclosedFence:e.attrs.sourceUnclosedFence===!0?!0:void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),i.thematicBreak&&(n.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),i.hardBreak&&(n.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),i.list&&(n.list=Qj(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),i.listItem&&(n.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&pB(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),i.table&&(n.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),i.tableRow&&(n.tableRow=Qj(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:Pj(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(i.tableCell&&(n.tableCell=(e,t,n)=>o(e,n.all(e))),i.tableHeader&&(n.tableHeader=(e,t,n)=>o(e,n.all(e))),i.image&&(n.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),i.imageReference&&(n.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),i.htmlBlock&&(n.htmlBlock=e=>({type:`html`,value:e.attrs.content})),i.linkDefinition??i.linkRefDef){let e=i.linkDefinition?`linkDefinition`:`linkRefDef`;n[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(i.jsxComponent&&(n.jsxComponent=(e,n,r)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let i=e.attrs.componentName||null,a=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!fB(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:lB.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:lB,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),i.rawMdxFallback&&(n.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),i.jsxInline&&(n.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),i.mathInline&&(n.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),i.wikiLink&&(n.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),i.tag&&(n.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),i.wikiLinkEmbed&&(n.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),a.emphasis&&(r.emphasis=$j(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=$j(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return hB(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=$j(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=$j(`mark`)),a.comment&&(r.comment=$j(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=Qj(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),i.footnoteReference&&(n.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),i.footnoteDefinition&&(n.footnoteDefinition=Qj(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),a.link&&(r.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),a.escapeMark&&(r.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),a.sourceLiteral&&(r.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return Mv(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:n,markHandlers:r}}const bB={default:!0,MD013:!1};function xB(e){return e??bB}const SB={access:se,accessSync:ce,readFile:le,readFileSync:ue},CB={EOL:de,homedir:fe};var wB=r(((e,t)=>{let{flatTokensSymbol:n,htmlFlowSymbol:r,newlineRe:i}=O();function a(e){return Object.hasOwn(e,r)}function o(e){let{text:t,type:n}=e;if(n===`htmlFlow`&&t.startsWith(`<!--`)&&t.endsWith(`-->`)){let e=t.slice(4,-3);return!e.startsWith(`>`)&&!e.startsWith(`->`)&&!e.endsWith(`-`)}return!1}function s(e,t,n){for(let r=t;r<=n;r++)e.add(r)}function c(e,t,n){let r=[],i=[{array:e,index:0}];for(;i.length>0;){let e=i[i.length-1],{array:a,index:o}=e;if(o<a.length){let o=a[e.index++];t(o)&&r.push(o);let{children:s}=o;if(s.length>0){let e=n?n(o):s;i.push({array:e,index:0})}}else i.pop()}return r}function l(e,t,r){let i=e=>t.includes(e.type)&&(r||!a(e)),o=e[n];return o?o.filter(i):c(e,i)}function u(e,t,n=1){return l(e,[`blockQuotePrefix`,`linePrefix`]).filter(e=>e.startLine===t).map(e=>e.text).join(``).trimEnd().concat(`
257
+ `).repeat(n)}function d(e,t){let n=Array.isArray(e)?e:[e];for(let e of t){let t=t=>Array.isArray(e)?e.includes(t.type):e===t.type;n=n.flatMap(e=>e.children.filter(t))}return n}function f(e){let t=1,{text:n}=e.children.find(e=>[`atxHeadingSequence`,`setextHeadingLine`].includes(e.type));return n[0]===`#`?t=Math.min(n.length,6):n[0]===`-`&&(t=2),t}function p(e){return e.type===`setextHeading`?`setext`:e.children.filter(e=>e.type===`atxHeadingSequence`).length===1?`atx`:`atx_closed`}function m(e){return d(e,[[`atxHeadingText`,`setextHeadingText`]]).flatMap(e=>e.children.filter(e=>e.type!==`htmlText`)).map(e=>e.text).join(``).replace(i,` `)}function h(e){let t=/^<([^!>][^/\s>]*)/;if(e.type===`htmlText`){let n=t.exec(e.text);if(n){let e=n[1],t=e.startsWith(`/`);return{close:t,name:t?e.slice(1):e}}}return null}function g(e,t){let n=e;for(;(n=n.parent)&&!t.includes(n.type););return n}let _=/^#tab\//;function v(e){if(e?.type===`atxHeading`){let t=d(e,[`atxHeadingText`]);if(t.length===1&&t[0].children.length===1&&t[0].children[0].type===`link`){let e=l(t[0].children[0].children,[`resourceDestinationString`]);return e.length===1&&_.test(e[0].text)}}return!1}t.exports={addRangeToSet:s,filterByPredicate:c,filterByTypes:l,getBlockQuotePrefixText:u,getDescendantsByType:d,getHeadingLevel:f,getHeadingStyle:p,getHeadingText:m,getHtmlTagInfo:h,getParentOfType:g,inHtmlFlow:a,isDocfxTab:v,isHtmlFlowComment:o,nonContentTokens:new Set([`blockQuoteMarker`,`blockQuotePrefix`,`blockQuotePrefixWhitespace`,`gfmFootnoteDefinitionIndent`,`lineEnding`,`lineEndingBlank`,`linePrefix`,`listItemIndent`,`undefinedReference`,`undefinedReferenceCollapsed`,`undefinedReferenceFull`,`undefinedReferenceShortcut`])}})),X=t(r(((e,t)=>{let n=wB(),{newlineRe:r,nextLinesRe:i}=O();t.exports.newLineRe=r,t.exports.nextLinesRe=i,t.exports.frontMatterRe=/((^---[^\S\r\n\u2028\u2029]*$[\s\S]+?^---\s*)|(^\+\+\+[^\S\r\n\u2028\u2029]*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{[^\S\r\n\u2028\u2029]*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m;let a=/(<!--\s*markdownlint-(disable|enable|capture|restore|disable-file|enable-file|disable-line|disable-next-line|configure-file))(?:\s|-->)/gi;t.exports.inlineCommentStartRe=a,t.exports.endOfLineHtmlEntityRe=/&(?:#\d+|#[xX][\da-fA-F]+|[a-zA-Z]{2,31}|blk\d{2}|emsp1[34]|frac\d{2}|sup\d|there4);$/,t.exports.endOfLineGemojiCodeRe=/:(?:[abmovx]|[-+]1|100|1234|(?:1st|2nd|3rd)_place_medal|8ball|clock\d{1,4}|e-mail|non-potable_water|o2|t-rex|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7981|u7a7a|[a-z]{2,15}2?|[a-z]{1,14}(?:_[a-z\d]{1,16})+):$/;let o=`.,;:!?。,;:!?`;t.exports.allPunctuation=o,t.exports.allPunctuationNoQuestion=o.replace(/[??]/gu,``);function s(e){return typeof e==`number`}t.exports.isNumber=s;function c(e){return typeof e==`string`}t.exports.isString=c;function l(e){return e.length===0}t.exports.isEmptyString=l;function u(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}t.exports.isObject=u;function d(e){return!!e&&Object.getPrototypeOf(e)===URL.prototype}t.exports.isUrl=d;function f(e){return Array.isArray(e)?[...e]:e}t.exports.cloneIfArray=f;function p(e){return d(e)?new URL(e):e}t.exports.cloneIfUrl=p,t.exports.getHtmlAttributeRe=function(e){return RegExp(`\\s${e}\\s*=\\s*['"]?([^'"\\s>]*)`,`iu`)};function m(e){return!e||!e.trim()||!(e=>{for(;;){let t=e.indexOf(`<!--`),n=e.indexOf(`-->`);if(n!==-1&&(t===-1||n<t))e=e.slice(n+3);else if(t!==-1&&n!==-1)e=e.slice(0,t)+e.slice(n+3);else if(t!==-1&&n===-1)e=e.slice(0,t);else return e}})(e).replace(/>/g,``).trim()}t.exports.isBlankLine=m;let h=/^ *\|/,g=/[^\r\n]/g,_=/[^ \r\n]/g,v=/ +[\r\n]/g,y=e=>e.replace(g,`.`);t.exports.clearHtmlCommentText=function(e){let t=0;for(;(t=e.indexOf(`<!--`,t))!==-1;){let n=e.indexOf(`-->`,t+2);if(n===-1)break;if(n>t+4){let r=e.slice(t+4,n),i=e.lastIndexOf(`
258
258
  `,t)+1,a=e.slice(i,t),o=a.trim().length===0,s=h.test(a)&&r.includes(`
259
259
  `);if(o||!(s||r.startsWith(`>`)||r.startsWith(`->`)||r.endsWith(`-`)||r.includes(`--`))){let i=r.replace(_,`.`).replace(v,y);e=e.slice(0,t+4)+i+e.slice(n)}}t=n+3}return e},t.exports.escapeForRegExp=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`)};function b(e,t,n){return e.length<=30||(e=t&&n?e.slice(0,15)+`...`+e.slice(-15):n?`...`+e.slice(-30):e.slice(0,30)+`...`),e}t.exports.ellipsify=b;function x(e,t,n,r,i,a){e({lineNumber:t,detail:n,context:r,range:i,fixInfo:a})}t.exports.addError=x;function S(e,t,n,r,i,a,o,s){n!==r&&x(e,t,`Expected: `+n+`; Actual: `+r+(i?`; `+i:``),a,o,s)}t.exports.addErrorDetailIf=S;function C(e,t,n,i,a,o,s){n=b(n.replace(r,`
260
260
  `),i,a),x(e,t,void 0,n,o,s)}t.exports.addErrorContext=C;let w=(e,t,n,r)=>e<n||e===n&&t<=r;t.exports.hasOverlap=function(e,t){let n=w(e.startLine,e.startColumn,t.startLine,t.startColumn),r=n?e:t,i=n?t:e;return w(i.startLine,i.startColumn,r.endLine,r.endColumn)},t.exports.frontMatterHasTitle=function(e,t){let n=t!==void 0&&!t,r=new RegExp(String(t||`^\\s*"?title"?\\s*[:=]`),`i`);return!n&&e.some(e=>r.test(e))};function T(e){let t=e=>e.toLowerCase().trim().replace(/\s+/g,` `),r=e=>e?.children.filter(e=>e.type!==`blockQuotePrefix`).map(e=>e.text).join(``),i=new Map,a=new Map,o=(e,n,r)=>{let o=[e.startLine-1,e.startColumn-1,e.text.length],s=t(n),c=r?a:i,l=c.get(s)||[];l.push(o),c.set(s,l)},s=new Map,c=[],l=[],u=n.filterByTypes(e,[`definition`,`gfmFootnoteDefinition`,`definitionLabelString`,`gfmFootnoteDefinitionLabelString`,`gfmFootnoteCall`,`image`,`link`,`undefinedReferenceCollapsed`,`undefinedReferenceFull`,`undefinedReferenceShortcut`]);for(let e of u){let i=``;switch(e.type){case`definition`:case`gfmFootnoteDefinition`:for(let t=e.startLine;t<=e.endLine;t++)c.push(t-1);break;case`gfmFootnoteDefinitionLabelString`:i=`^`;case`definitionLabelString`:{let r=t(`${i}${e.text}`);if(s.has(r))l.push([r,e.startLine-1]);else{let t=n.getParentOfType(e,[`definition`]),i=t&&n.getDescendantsByType(t,[`definitionDestination`,`definitionDestinationRaw`,`definitionDestinationString`])[0]?.text;s.set(r,[e.startLine-1,i||``])}break}case`gfmFootnoteCall`:case`image`:case`link`:{let t=e.children.length===1,i=e.children.length===2&&!e.children.some(e=>e.type===`resource`),[a]=n.getDescendantsByType(e,[`label`,`labelText`]),[s]=n.getDescendantsByType(e,[`reference`,`referenceString`]),c=r(a);if(!t&&!i){let[n,r]=e.children.filter(e=>[`gfmFootnoteCallMarker`,`gfmFootnoteCallString`].includes(e.type));n&&r&&(c=`${n.text}${r.text}`,t=!0)}(t||i)&&o(e,r(s)||c,t);break}case`undefinedReferenceCollapsed`:case`undefinedReferenceFull`:case`undefinedReferenceShortcut`:o(e,n.getDescendantsByType(e,[`undefinedReference`])[0].children.map(e=>e.text).join(``),e.type===`undefinedReferenceShortcut`);break}}return{references:i,shortcuts:a,definitions:s,duplicateDefinitions:l,definitionLineIndices:c}}t.exports.getReferenceLinkImageData=T;function E(e,t){let n=0,i=0,a=0,o=e.match(r)||[];for(let e of o)switch(e){case`\r`:n++;break;case`
@@ -262,47 +262,47 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
262
262
  `:a++;break}let s=null;return s=!n&&!i&&!a?t&&t.EOL||`
263
263
  `:i>=a&&i>=n?`
264
264
  `:a>=n?`\r
265
- `:`\r`,s}t.exports.getPreferredLineEnding=E;function ee(e,t){let n=t&&t.homedir&&t.homedir();return n?e.replace(/^~($|\/|\\)/,`${n}$1`):e}t.exports.expandTildePath=ee;function D(e){let t={ruleNames:[],lineNumber:-1};return e.filter((e,n,r)=>{delete e.fixInfo,delete e.severity;let i=r[n-1]||t;return e.ruleNames[0]!==i.ruleNames[0]||e.lineNumber!==i.lineNumber})}function te(e){for(let t of e)t.ruleName=t.ruleNames[0],t.ruleAlias=t.ruleNames[1]||t.ruleName,delete t.ruleNames;return e}function ne(e){let t={};for(let n of e){let e=n.ruleNames[0],r=t[e]||[];r.push(n.lineNumber),t[e]=r}return t}function re(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=t(i.map(e=>({...e})));return n}t.exports.convertToResultVersion0=function(e){return re(e,e=>ne(D(e)))},t.exports.convertToResultVersion1=function(e){return re(e,e=>te(D(e)))},t.exports.convertToResultVersion2=function(e){return re(e,D)},t.exports.formatLintResults=function(e){let t=[],n=Object.entries(e||{});n.sort((e,t)=>e[0].localeCompare(t[0]));for(let[e,r]of n)for(let n of r){let{lineNumber:r,ruleNames:i,ruleDescription:a,errorDetail:o,errorContext:s,errorRange:c,severity:l}=n,u=i.join(`/`),d=`:${r}`,f=c&&c[0]||0,p=f?`:${f}`:``,m=a,h=o?` [${o}]`:``,g=s?` [Context: "${s}"]`:``;t.push(`${e}${d}${p} ${l} ${u} ${m}${h}${g}`)}return t}}))(),1),Z=TB();const EB=new Map;let DB;function OB(e){EB.clear(),DB=e}function kB(){return DB?.parsers.micromark.tokens||[]}function AB(e,t){if(EB.has(e))return EB.get(e);let n=t();return EB.set(e,n),n}function Q(e,t){return AB(JSON.stringify(arguments),()=>(0,Z.filterByTypes)(kB(),e,t))}function jB(){return AB(jB.name,()=>(0,X.getReferenceLinkImageData)(kB()))}const MB=`0.41.1`;var NB=r(((e,t)=>{function n(){return ae()}t.exports={requireMarkdownItCjs:n}})),PB=r(((t,n)=>{let r=typeof __non_webpack_require__>`u`?e:__non_webpack_require__,i=(e,t,n=[])=>{let r=e.paths?.(``)||[];return e(t,{paths:[...n,...r]})};n.exports={resolveModule:(e,t)=>i(r.resolve,e,t),resolveModuleCustomResolve:i}})),FB=NB();PB();var IB={names:[`MD001`,`heading-increment`],description:`Heading levels should only increment by one level at a time`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=(0,X.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title)?1:2**53-1;for(let e of Q([`atxHeading`,`setextHeading`])){let r=(0,Z.getHeadingLevel)(e);r>n&&(0,X.addErrorDetailIf)(t,e.startLine,`h${n+1}`,`h${r}`),n=r}}},LB={names:[`MD003`,`heading-style`],description:`Heading style`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`);for(let e of Q([`atxHeading`,`setextHeading`])){let r=(0,Z.getHeadingStyle)(e);if(n===`consistent`&&(n=r),r!==n){let i=(0,Z.getHeadingLevel)(e)<=2;if(!(n===`setext_with_atx`&&(i&&r===`setext`||!i&&r===`atx`))&&!(n===`setext_with_atx_closed`&&(i&&r===`setext`||!i&&r===`atx_closed`))){let a=n;n===`setext_with_atx`?a=i?`setext`:`atx`:n===`setext_with_atx_closed`&&(a=i?`setext`:`atx_closed`),(0,X.addErrorDetailIf)(t,e.startLine,a,r)}}}}};const RB=e=>e===`-`?`dash`:e===`+`?`plus`:`asterisk`,zB=e=>e===`dash`?`-`:e===`plus`?`+`:`*`,BB=e=>e===`dash`?`plus`:e===`plus`?`asterisk`:`dash`,VB=new Set([`asterisk`,`consistent`,`dash`,`plus`,`sublist`]);var HB={names:[`MD004`,`ul-style`],description:`Unordered list style`,tags:[`bullet`,`ul`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`),r=VB.has(n)?n:`dash`,i=[];for(let e of Q([`listUnordered`])){let a=0;if(n===`sublist`){let t=e;for(;t=(0,Z.getParentOfType)(t,[`listOrdered`,`listUnordered`]);)a++}let o=(0,Z.getDescendantsByType)(e,[`listItemPrefix`,`listItemMarker`]);for(let e of o){let o=RB(e.text);n===`sublist`?(i[a]||(i[a]=o===i[a-1]?BB(o):o),r=i[a]):r===`consistent`&&(r=o);let s=e.startColumn,c=e.endColumn-e.startColumn;(0,X.addErrorDetailIf)(t,e.startLine,r,o,void 0,void 0,[s,c],{editColumn:s,deleteCount:c,insertText:zB(r)})}}}},UB={names:[`MD005`,`list-indent`],description:`Inconsistent indentation for list items at the same level`,tags:[`bullet`,`ul`,`indentation`],parser:`micromark`,function:function(e,t){for(let e of Q([`listOrdered`,`listUnordered`])){let n=e.startColumn-1,r=0,i=!1,a=e.children.filter(e=>e.type===`listItemPrefix`);for(let o of a){let a=o.startLine,s=o.startColumn-1,c=[1,o.endColumn-1];if(e.type===`listUnordered`)(0,X.addErrorDetailIf)(t,a,n,s,void 0,void 0,c);else{let e=o.text.trim().length,l=o.startColumn+e-1;if(r||=l,n!==s||i)if(r===l)i=!0;else{let o=i?`Expected: (${r}); Actual: (${l})`:`Expected: ${n}; Actual: ${s}`,u=i?r-e:n,d=i?l-e:s;(0,X.addError)(t,a,o,void 0,c,{editColumn:Math.min(d,u)+1,deleteCount:Math.max(d-u,0),insertText:``.padEnd(Math.max(u-d,0))})}}}}}};const WB=[`blockQuotePrefix`,`listItemPrefix`,`listUnordered`],GB=[`blockQuote`,`listOrdered`,`listUnordered`];var KB={names:[`MD007`,`ul-indent`],description:`Unordered list indentation`,tags:[`bullet`,`ul`,`indentation`],parser:`micromark`,function:function(e,t){let n=Number(e.config.indent||2),r=!!e.config.start_indented,i=Number(e.config.start_indent||n),a=new Map,o=null,s=Q(WB);for(let e of s){let{endColumn:s,parent:c,startColumn:l,startLine:u,type:d}=e;if(d===`blockQuotePrefix`)o=e;else if(d===`listUnordered`){let t=0,n=e;for(;n=(0,Z.getParentOfType)(n,GB);){if(n.type===`listUnordered`){t++;continue}else n.type===`listOrdered`&&(t=-1);break}t>=0&&a.set(e,t)}else{let d=a.get(c);if(d!==void 0){let a=((0,Z.getParentOfType)(e,[`gfmFootnoteDefinition`])?4:0)+(r?i:0)+d*n,c=o?.endLine===u?o.endColumn-1:0,f=l-1-c;(0,X.addErrorDetailIf)(t,u,a,f,void 0,void 0,[1,s-1],{editColumn:l-f,deleteCount:Math.max(f-a,0),insertText:``.padEnd(Math.max(a-f,0))})}}}}},qB={names:[`MD009`,`no-trailing-spaces`],description:`Trailing spaces`,tags:[`whitespace`],parser:`micromark`,function:function(e,t){let n=e.config.br_spaces;n=Number(n===void 0?2:n);let r=e.config.code_blocks,i=r===void 0?!1:!!r,a=!!e.config.list_item_empty_lines,o=!!e.config.strict,s=new Set;if(!i){for(let e of Q([`codeFenced`]))(0,Z.addRangeToSet)(s,e.startLine+1,e.endLine-1);for(let e of Q([`codeIndented`]))(0,Z.addRangeToSet)(s,e.startLine,e.endLine)}let c=new Set;if(a)for(let e of Q([`listOrdered`,`listUnordered`])){(0,Z.addRangeToSet)(c,e.startLine,e.endLine);let t=!0;for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];switch(r.type){case`content`:t=!1;break;case`listItemIndent`:t&&c.delete(r.startLine);break;case`listItemPrefix`:t=!0;break;default:break}}}let l=new Set,u=new Set;if(o){for(let e of Q([`paragraph`]))(0,Z.addRangeToSet)(l,e.startLine,e.endLine-1);for(let e of Q([`codeText`]))(0,Z.addRangeToSet)(u,e.startLine,e.endLine-1)}let d=n<2?0:n;for(let n=0;n<e.lines.length;n++){let r=e.lines[n],i=n+1,a=r.length-r.trimEnd().length;if(a&&!s.has(i)&&!c.has(i)&&(d!==a||o&&(!l.has(i)||u.has(i)))){let e=r.length-a+1;(0,X.addError)(t,i,`Expected: `+(d===0?``:`0 or `)+d+`; Actual: `+a,void 0,[e,a],{editColumn:e,deleteCount:a})}}}};const JB=/\t+/g;var YB={names:[`MD010`,`no-hard-tabs`],description:`Hard tabs`,tags:[`whitespace`,`hard_tab`],parser:`micromark`,function:function(e,t){let n=e.config.code_blocks,r=n===void 0?!0:!!n,i=new Set((e.config.ignore_code_languages||[]).map(e=>String(e).toLowerCase())),a=e.config.spaces_per_tab,o=a===void 0?1:Math.max(0,Number(a)),s=[];r?i.size>0&&s.push(`codeFenced`):s.push(`codeFenced`,`codeIndented`,`codeText`);let c=Q(s).filter(e=>e.type===`codeFenced`&&i.size>0?(0,Z.getDescendantsByType)(e,[`codeFencedFence`,`codeFencedFenceInfo`]).every(e=>i.has(e.text.toLowerCase())):!0).map(e=>{let{type:t,startLine:n,startColumn:r,endLine:i,endColumn:a}=e,o=t===`codeFenced`;return{startLine:n+ +!!o,startColumn:o?0:r,endLine:i-+!!o,endColumn:o?2**53-1:a}});for(let n=0;n<e.lines.length;n++){let r=e.lines[n],i=null;for(;(i=JB.exec(r))!==null;){let e=n+1,r=i.index+1,a=i[0].length,s={startLine:e,startColumn:r,endLine:e,endColumn:r+a-1};c.some(e=>(0,X.hasOverlap)(e,s))||(0,X.addError)(t,e,`Column: `+r,void 0,[r,a],{editColumn:r,deleteCount:a,insertText:``.padEnd(a*o)})}}}};const XB=/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)\](?!\()/g;var ZB={names:[`MD011`,`no-reversed-links`],description:`Reversed link syntax`,tags:[`links`],parser:`micromark`,function:function(e,t){let n=new Set;for(let e of Q([`codeFenced`,`codeIndented`,`mathFlow`]))(0,Z.addRangeToSet)(n,e.startLine,e.endLine);let r=Q([`codeText`,`mathText`]);for(let[i,a]of e.lines.entries()){let e=i+1;if(!n.has(e)){let n=null;for(;(n=XB.exec(a))!==null;){let[i,a,o,s]=n;if(!o.endsWith(`\\`)&&!s.endsWith(`\\`)){let c=n.index+a.length+1,l=n[0].length-a.length,u={startLine:e,startColumn:c,endLine:e,endColumn:c+l-1};r.some(e=>(0,X.hasOverlap)(e,u))||(0,X.addError)(t,e,i.slice(a.length),void 0,[c,l],{editColumn:c,deleteCount:l,insertText:`[${o}](${s})`})}}}}}},QB={names:[`MD012`,`no-multiple-blanks`],description:`Multiple consecutive blank lines`,tags:[`whitespace`,`blank_lines`],parser:`micromark`,function:function(e,t){let n=Number(e.config.maximum||1),{lines:r}=e,i=new Set;for(let e of Q([`codeFenced`,`codeIndented`]))(0,Z.addRangeToSet)(i,e.startLine,e.endLine);let a=0;for(let[e,o]of r.entries())a=i.has(e+1)||o.trim().length>0?0:a+1,n<a&&(0,X.addErrorDetailIf)(t,e+1,n,a,void 0,void 0,void 0,{deleteCount:-1})}};const $B=/^(?:[#>\s]*\s)?\S*$/;var eV={names:[`MD013`,`line-length`],description:`Line length`,tags:[`line_length`],parser:`micromark`,function:function(e,t){let n=Number(e.config.line_length||80),r=Number(e.config.heading_line_length||n),i=Number(e.config.code_block_line_length||n),a=!!e.config.strict,o=!!e.config.stern,s=e.config.code_blocks,c=s===void 0?!0:!!s,l=e.config.tables,u=l===void 0?!0:!!l,d=e.config.headings,f=d===void 0?!0:!!d,p=new Set;for(let e of Q([`atxHeading`,`setextHeading`]))(0,Z.addRangeToSet)(p,e.startLine,e.endLine);let m=new Set;for(let e of Q([`codeFenced`,`codeIndented`]))(0,Z.addRangeToSet)(m,e.startLine,e.endLine);let h=new Set;for(let e of Q([`table`]))(0,Z.addRangeToSet)(h,e.startLine,e.endLine);let g=new Set;for(let e of Q([`autolink`,`image`,`link`,`literalAutolink`]))(0,Z.addRangeToSet)(g,e.startLine,e.endLine);let _=new Set;for(let e of Q([`paragraph`]))for(let t of(0,Z.getDescendantsByType)(e,[`data`]))(0,Z.addRangeToSet)(_,t.startLine,t.endLine);let v=new Set;for(let e of g)_.has(e)||v.add(e);let y=new Set(jB().definitionLineIndices);for(let s=0;s<e.lines.length;s++){let l=e.lines[s],d=s+1,g=p.has(d),_=m.has(d),b=h.has(d),x=_?i:g?r:n,S=a||o?l:l.replace(/\S*$/u,`#`);x>0&&(c||!_)&&(u||!b)&&(f||!g)&&!y.has(s)&&(a||!(o&&$B.test(l))&&!v.has(d))&&S.length>x&&(0,X.addErrorDetailIf)(t,d,x,l.length,void 0,void 0,[x+1,l.length-x])}}};const tV=/^(\s*)(\$\s+)/;var nV={names:[`MD014`,`commands-show-output`],description:`Dollar signs used before commands without showing output`,tags:[`code`],parser:`micromark`,function:function(e,t){for(let e of Q([`codeFenced`,`codeIndented`])){let n=e.children.filter(e=>e.type===`codeFlowValue`),r=n.map(e=>({result:e.text.match(tV),startColumn:e.startColumn,startLine:e.startLine,text:e.text})).filter(e=>e.result);if(r.length===n.length)for(let e of r){let n=e.startColumn+e.result[1].length,r=e.result[2].length;(0,X.addErrorContext)(t,e.startLine,e.text,void 0,void 0,[n,r],{editColumn:n,deleteCount:r})}}}},rV={names:[`MD018`,`no-missing-space-atx`],description:`No space after hash on atx style heading`,tags:[`headings`,`atx`,`spaces`],parser:`micromark`,function:function(e,t){let{lines:n}=e,r=new Set;for(let e of Q([`codeFenced`,`codeIndented`,`htmlFlow`]))(0,Z.addRangeToSet)(r,e.startLine,e.endLine);for(let[e,i]of n.entries())if(!r.has(e+1)&&/^#+[^# \t]/.test(i)&&!/#\s*$/.test(i)&&!i.startsWith(`#️⃣`)){let n=/^#+/.exec(i)[0].length;(0,X.addErrorContext)(t,e+1,i.trim(),void 0,void 0,[1,n+1],{editColumn:n+1,insertText:` `})}}};function iV(e,t,n){let{children:r,startLine:i,text:a}=t,o=n>0?0:r.length-1;for(;r[o]&&r[o].type!==`atxHeadingSequence`;)o+=n;let s=r[o],c=r[o+n];if(s?.type===`atxHeadingSequence`&&c?.type===`whitespace`&&c.text.length>1){let t=c.startColumn+1,r=c.endColumn-t;(0,X.addErrorContext)(e,i,a.trim(),n>0,n<0,[t,r],{editColumn:t,deleteCount:r})}}var aV=[{names:[`MD019`,`no-multiple-space-atx`],description:`Multiple spaces after hash on atx style heading`,tags:[`headings`,`atx`,`spaces`],parser:`micromark`,function:function(e,t){let n=Q([`atxHeading`]).filter(e=>(0,Z.getHeadingStyle)(e)===`atx`);for(let e of n)iV(t,e,1)}},{names:[`MD021`,`no-multiple-space-closed-atx`],description:`Multiple spaces inside hashes on closed atx style heading`,tags:[`headings`,`atx_closed`,`spaces`],parser:`micromark`,function:function(e,t){let n=Q([`atxHeading`]).filter(e=>(0,Z.getHeadingStyle)(e)===`atx_closed`);for(let e of n)iV(t,e,1),iV(t,e,-1)}}],oV={names:[`MD020`,`no-missing-space-closed-atx`],description:`No space inside hashes on closed atx style heading`,tags:[`headings`,`atx_closed`,`spaces`],parser:`micromark`,function:function(e,t){let{lines:n}=e,r=new Set;for(let e of Q([`codeFenced`,`codeIndented`,`htmlFlow`]))(0,Z.addRangeToSet)(r,e.startLine,e.endLine);for(let[e,i]of n.entries())if(!r.has(e+1)){let n=/^(#+)([ \t]*)([^# \t\\]|[^# \t][^#]*?[^# \t\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(i);if(n){let[,r,{length:a},o,{length:s},c,l,{length:u}]=n,d=r.length,f=l.length,p=!a,m=!s||!!c,h=c?`${c} `:``;if(p||m){let n=p?[1,d+1]:[i.length-u-f,f+1];(0,X.addErrorContext)(t,e+1,i.trim(),p,m,n,{editColumn:1,deleteCount:i.length,insertText:`${r} ${o} ${h}${l}`})}}}}};const sV=e=>{if(Array.isArray(e)){let t=[,,,,,,].fill(1);for(let[n,r]of[...e.entries()].slice(0,6))t[n]=r;return e=>t[(0,Z.getHeadingLevel)(e)-1]}let t=e===void 0?1:Number(e);return()=>t},cV=(e,t,n,r)=>t>=0&&t<e.length?e[t]:r&&n.length>0&&t<0&&t>=-n.length?n[n.length+t]:``;var lV={names:[`MD022`,`blanks-around-headings`],description:`Headings should be surrounded by blank lines`,tags:[`headings`,`blank_lines`],parser:`micromark`,function:function(e,t){let n=sV(e.config.lines_above),r=sV(e.config.lines_below),i=!!e.config.include_front_matter,{lines:a,frontMatterLines:o}=e,s=Q([`blockQuotePrefix`,`linePrefix`]);for(let e of Q([`atxHeading`,`setextHeading`])){let{startLine:c,endLine:l}=e,u=a[c-1].trim(),d=n(e);if(d>=0){let e=0;for(let t=0;t<d&&(0,X.isBlankLine)(cV(a,c-2-t,o,i));t++)e++;(0,X.addErrorDetailIf)(t,c,d,e,`Above`,u,void 0,{insertText:(0,Z.getBlockQuotePrefixText)(s,c-1,d-e)})}let f=r(e);if(f>=0){let e=0;for(let t=0;t<f&&(0,X.isBlankLine)(cV(a,l+t,o,!1));t++)e++;(0,X.addErrorDetailIf)(t,c,f,e,`Below`,u,void 0,{lineNumber:l+1,insertText:(0,Z.getBlockQuotePrefixText)(s,l+1,f-e)})}}}},uV={names:[`MD023`,`heading-start-left`],description:`Headings must start at the beginning of the line`,tags:[`headings`,`spaces`],parser:`micromark`,function:function(e,t){let n=Q([`atxHeading`,`linePrefix`,`setextHeading`]);for(let r=0;r<n.length-1;r++)if(n[r].type===`linePrefix`&&n[r+1].type!==`linePrefix`&&n[r].startLine===n[r+1].startLine){let{endColumn:i,startColumn:a,startLine:o}=n[r],s=i-a;(0,X.addErrorContext)(t,o,e.lines[o-1],!0,!1,[a,s],{editColumn:a,deleteCount:s})}}},dV={names:[`MD024`,`no-duplicate-heading`],description:`Multiple headings with the same content`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=!!e.config.siblings_only,r=[null,[]],i=1,a=r[i];for(let e of Q([`atxHeading`,`setextHeading`])){let o=(0,Z.getHeadingText)(e);if(n){let t=(0,Z.getHeadingLevel)(e);for(;i<t;)i++,r[i]=[];for(;i>t;)r[i]=[],i--;a=r[t]}a.includes(o)?(0,X.addErrorContext)(t,e.startLine,o.trim()):a.push(o)}}},fV={names:[`MD025`,`single-title`,`single-h1`],description:`Multiple top-level headings in the same document`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=Number(e.config.level||1),{tokens:r}=e.parsers.micromark,i=Q([`atxHeading`,`setextHeading`]).filter(e=>n===(0,Z.getHeadingLevel)(e)&&!(0,Z.isDocfxTab)(e));if(i.length>0){let n=(0,X.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title),a=n;if(a||=r.slice(0,r.indexOf(i[0])).every(e=>Z.nonContentTokens.has(e.type)||(0,Z.isHtmlFlowComment)(e)),a)for(let e of i.slice(+!n))(0,X.addErrorContext)(t,e.startLine,(0,Z.getHeadingText)(e))}}},pV={names:[`MD026`,`no-trailing-punctuation`],description:`Trailing punctuation in heading`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=e.config.punctuation;n=String(n===void 0?X.allPunctuationNoQuestion:n);let r=RegExp(`\\s*[`+(0,X.escapeForRegExp)(n)+`]+$`),i=Q([`atxHeadingText`,`setextHeadingText`]);for(let e of i){let{endColumn:n,endLine:i,text:a}=e,o=r.exec(a);if(o&&!X.endOfLineHtmlEntityRe.test(a)&&!X.endOfLineGemojiCodeRe.test(a)){let e=o[0],r=e.length,a=n-r;(0,X.addError)(t,i,`Punctuation: '${e}'`,void 0,[a,r],{editColumn:a,deleteCount:r})}}}};const mV=[`listOrdered`,`listUnordered`];var hV={names:[`MD027`,`no-multiple-space-blockquote`],description:`Multiple spaces after blockquote symbol`,tags:[`blockquote`,`whitespace`,`indentation`],parser:`micromark`,function:function(e,t){let n=e.config.list_items,r=n===void 0?!0:!!n,{tokens:i}=e.parsers.micromark;for(let n of Q([`linePrefix`])){let a=n.parent,o=a?.type===`codeIndented`,s=a?.children||i;if(!o&&s[s.indexOf(n)-1]?.type===`blockQuotePrefix`&&(r||!mV.includes(s[s.indexOf(n)+1]?.type)&&!(0,Z.getParentOfType)(n,mV))){let{startColumn:r,startLine:i,text:a}=n,{length:o}=a,s=e.lines[i-1];(0,X.addErrorContext)(t,i,s,void 0,void 0,[r,o],{editColumn:r,deleteCount:o})}}}};const gV=new Set([`lineEnding`,`listItemIndent`,`linePrefix`]);var _V={names:[`MD028`,`no-blanks-blockquote`],description:`Blank line inside blockquote`,tags:[`blockquote`,`whitespace`],parser:`micromark`,function:function(e,t){for(let n of Q([`blockQuote`])){let r=[],i=n.parent?.children||e.parsers.micromark.tokens;for(let e=i.indexOf(n)+1;e<i.length;e++){let{startLine:n,type:a}=i[e];if(a===`lineEndingBlank`)r.push(n);else if(!gV.has(a))if(a===`blockQuote`){for(let e of r)(0,X.addError)(t,e);break}else break}}}};const vV={one:`1/1/1`,ordered:`1/2/3`,zero:`0/0/0`},yV=Object.keys(vV);function bV(e){let{startColumn:t,endColumn:n,text:r}=(0,Z.getDescendantsByType)(e,[`listItemValue`])[0];return{startColumn:t,endColumn:n,text:r,number:Number(r)}}var xV={names:[`MD029`,`ol-prefix`],description:`Ordered list item prefix`,tags:[`ol`],parser:`micromark`,function:function(e,t){let n=String(e.config.style);for(let e of Q([`listOrdered`])){let r=(0,Z.getDescendantsByType)(e,[`listItemPrefix`]),i=1,a=!1,o=!1,s=!1;if(r.length>0){let e=r[0].endColumn;if(o=r.every(t=>t.endColumn===e),r.length>1){let e=bV(r[0]);(bV(r[1]).number!==1||e.number===0)&&(a=!0,e.number===0&&(i=0)),s=e.text.startsWith(`0`)}}let c=yV.includes(n)?n:a?`ordered`:`one`;c===`zero`?i=0:c===`one`&&(i=1);for(let e of r){let n=i.toString(),{endColumn:r,startColumn:a,number:l}=bV(e),u=r-a,d={editColumn:a,deleteCount:u,insertText:o?n.padStart(u,s?`0`:` `):n};(0,X.addErrorDetailIf)(t,e.startLine,i,l,`Style: `+vV[c],void 0,[e.startColumn,e.endColumn-e.startColumn],d),c===`ordered`&&i++}}}},SV={names:[`MD030`,`list-marker-space`],description:`Spaces after list markers`,tags:[`ol`,`ul`,`whitespace`],parser:`micromark`,function:function(e,t){let n=Number(e.config.ul_single||1),r=Number(e.config.ol_single||1),i=Number(e.config.ul_multi||1),a=Number(e.config.ol_multi||1);for(let e of Q([`listOrdered`,`listUnordered`])){let o=e.type===`listOrdered`,s=e.children.filter(e=>e.type===`listItemPrefix`),c=e.endLine-e.startLine+1===s.length,l=o?c?r:a:c?n:i;for(let e of s){let n=[e.startColumn,e.endColumn-e.startColumn],r=e.children.filter(e=>e.type===`listItemPrefixWhitespace`);for(let e of r){let{endColumn:r,startColumn:i,startLine:a}=e,o=r-i;(0,X.addErrorDetailIf)(t,a,l,o,void 0,void 0,n,{editColumn:i,deleteCount:o,insertText:``.padEnd(l)})}}}}};const CV=/^(.*?)[`~]/;function wV(e,t,n,r){let i=t[n-1],[,a]=i.match(CV)||[],o=a===void 0?void 0:{lineNumber:n+ +!r,insertText:`${a.replace(/[^>]/g,` `).trim()}\n`};(0,X.addErrorContext)(e,n,i.trim(),void 0,void 0,void 0,o)}var TV={names:[`MD031`,`blanks-around-fences`],description:`Fenced code blocks should be surrounded by blank lines`,tags:[`code`,`blank_lines`],parser:`micromark`,function:function(e,t){let n=e.config.list_items,r=n===void 0?!0:!!n,{lines:i}=e;for(let e of Q([`codeFenced`]))(r||!(0,Z.getParentOfType)(e,[`listOrdered`,`listUnordered`]))&&((0,X.isBlankLine)(i[e.startLine-2])||wV(t,i,e.startLine,!0),!(0,X.isBlankLine)(i[e.endLine])&&!(0,X.isBlankLine)(i[e.endLine-1])&&wV(t,i,e.endLine,!1))}};const EV=e=>e.type===`listOrdered`||e.type===`listUnordered`;var DV={names:[`MD032`,`blanks-around-lists`],description:`Lists should be surrounded by blank lines`,tags:[`bullet`,`ul`,`ol`,`blank_lines`],parser:`micromark`,function:function(e,t){let{lines:n,parsers:r}=e,i=Q([`blockQuotePrefix`,`linePrefix`]),a=(0,Z.filterByPredicate)(r.micromark.tokens,EV,e=>EV(e)||e.type===`htmlFlow`?[]:e.children);for(let e of a){let r=e.startLine;(0,X.isBlankLine)(n[r-2])||(0,X.addErrorContext)(t,r,n[r-1].trim(),void 0,void 0,void 0,{insertText:(0,Z.getBlockQuotePrefixText)(i,r)});let a=(0,Z.filterByPredicate)(e.children,e=>!Z.nonContentTokens.has(e.type),e=>Z.nonContentTokens.has(e.type)?[]:e.children),o=(a.length>0?a[a.length-1]:e).endLine;(0,X.isBlankLine)(n[o])||(0,X.addErrorContext)(t,o,n[o-1].trim(),void 0,void 0,void 0,{lineNumber:o+1,insertText:(0,Z.getBlockQuotePrefixText)(i,o)})}}};const OV=e=>Array.isArray(e)?e.map(e=>String(e).toLowerCase()):[];var kV={names:[`MD033`,`no-inline-html`],description:`Inline HTML`,tags:[`html`],parser:`micromark`,function:function(e,t){let n=OV(e.config.allowed_elements),r=OV(e.config.table_allowed_elements||e.config.allowed_elements);for(let e of Q([`htmlText`],!0)){let i=(0,Z.getHtmlTagInfo)(e);if(i&&!i.close){let a=i?.name.toLowerCase(),o=!!(0,Z.getParentOfType)(e,[`table`]);if((o||!n.includes(a))&&(!o||!r.includes(a))){let n=[e.startColumn,e.text.replace(X.nextLinesRe,``).length];(0,X.addError)(t,e.startLine,`Element: `+i.name,void 0,n)}}}}},AV={names:[`MD034`,`no-bare-urls`],description:`Bare URL used`,tags:[`links`,`url`],parser:`micromark`,function:function(e,t){let n=e=>(0,Z.filterByPredicate)(e,e=>{if(e.type===`literalAutolink`&&!(0,Z.inHtmlFlow)(e)){let t=e.parent?.children,n=t?.indexOf(e),r=t?.at(n-1),i=t?.at(n+1);return!(r&&i&&r.type===`data`&&i.type===`data`&&r.text.endsWith(`<`)&&i.text.startsWith(`>`))}return!1},e=>{let{children:t}=e,n=[];for(let e=0;e<t.length;e++){let r=t[e],i=(0,Z.getHtmlTagInfo)(r);if(i&&!i.close){let n=1;for(let r=e+1;r<t.length;r++){let a=t[r],o=(0,Z.getHtmlTagInfo)(a);if(o&&i.name===o.name)if(o.close){if(n--,n===0){e=r;break}}else n++}}else n.push(r)}return n});for(let r of n(e.parsers.micromark.tokens)){let e=[r.startColumn,r.endColumn-r.startColumn],n={editColumn:e[0],deleteCount:e[1],insertText:`<${r.text}>`};(0,X.addErrorContext)(t,r.startLine,r.text,void 0,void 0,e,n)}}},jV={names:[`MD035`,`hr-style`],description:`Horizontal rule style`,tags:[`hr`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`).trim(),r=Q([`thematicBreak`]);for(let e of r){let{startLine:r,text:i}=e;n===`consistent`&&(n=i),(0,X.addErrorDetailIf)(t,r,n,i)}}};const MV=[[`emphasis`,`emphasisText`],[`strong`,`strongText`]],NV=e=>!(e.type===`htmlText`||e.type===`data`&&e.text.trim().length===0);var PV={names:[`MD036`,`no-emphasis-as-heading`],description:`Emphasis used instead of a heading`,tags:[`headings`,`emphasis`],parser:`micromark`,function:function(e,t){let n=e.config.punctuation;n=String(n===void 0?X.allPunctuation:n);let r=RegExp(`[`+n+`]$`),i=Q([`paragraph`],!0).filter(e=>e.parent?.type===`content`&&(!e.parent?.parent||e.parent?.parent?.type===`htmlFlow`&&!e.parent?.parent?.parent)&&e.children.filter(NV).length===1);for(let e of MV){let n=(0,Z.getDescendantsByType)(i,e);for(let e of n)e.children.length===1&&e.children[0].type===`data`&&!r.test(e.text)&&(0,X.addErrorContext)(t,e.startLine,e.text)}}},FV={names:[`MD037`,`no-space-in-emphasis`],description:`Spaces inside emphasis markers`,tags:[`whitespace`,`emphasis`],parser:`micromark`,function:function(e,t){let{lines:n,parsers:r}=e,i=new Map;for(let e of[`_`,`__`,`___`,`*`,`**`,`***`])i.set(e,[]);let a=(0,Z.filterByPredicate)(r.micromark.tokens,e=>e.children.some(e=>e.type===`data`));for(let e of a){for(let e of i.values())e.length=0;for(let t of e.children){let{text:e,type:n}=t;if(n===`data`&&e.length<=3){let n=i.get(e);n&&!(0,Z.inHtmlFlow)(t)&&n.push(t)}}for(let[e,r]of i)for(let i=0;i+1<r.length;i+=2){let a=r[i],o=n[a.startLine-1].slice(a.endColumn-1).match(/^\s+\S/);if(o){let[n]=o,r=`${e}${n}`,i=a.endColumn,s=n.length-1;(0,X.addError)(t,a.startLine,void 0,r,[i,s],{editColumn:i,deleteCount:s})}let s=r[i+1],c=n[s.startLine-1].slice(0,s.startColumn-1).match(/\S\s+$/);if(c){let[n]=c,r=`${n}${e}`,i=s.startColumn-(n.length-1),a=n.length-1;(0,X.addError)(t,s.startLine,void 0,r,[i,a],{editColumn:i,deleteCount:a})}}}}},IV={names:[`MD038`,`no-space-in-code`],description:`Spaces inside code span elements`,tags:[`whitespace`,`code`],parser:`micromark`,function:function(e,t){let n=Q([`codeText`]);for(let e of n){let n=(0,Z.getDescendantsByType)(e,[`codeTextData`]);if(n.length>0){let r=(0,Z.getDescendantsByType)(e,[`codeTextPadding`]),i=r[0],a=n[0],o=/^(\s+)(\S)/.exec(a.text)||[null,``,``],s=o[2]==="`",c=o[1].length-(s&&!i?1:0),l=c>0,u=r[r.length-1],d=n[n.length-1],f=/(\S)(\s+)$/.exec(d.text)||[null,``,``],p=f[1]==="`",m=f[2].length-(p&&!u?1:0),h=m>0,g=l&&h&&i&&u&&!s&&!p,_=e.text;if(l){let e=(g?i:a).startColumn,n=c+(g?i.text.length:0);(0,X.addErrorContext)(t,a.startLine,_,!0,!1,[e,n],{editColumn:e,deleteCount:n})}if(h){let e=(g?u:d).endColumn,n=m+(g?u.text.length:0);(0,X.addErrorContext)(t,d.endLine,_,!1,!0,[e-n,n],{editColumn:e-n,deleteCount:n})}}}}};function LV(e,t,n,r){let i=n.text.match(r?/^[^\S\r\n]+/:/[^\S\r\n]+$/),a=i?[r?n.startColumn:n.endColumn-i[0].length,i[0].length]:void 0;(0,X.addErrorContext)(e,r?n.startLine+ +!i:n.endLine-+!i,t.text.replace(/\s+/g,` `),r,!r,a,a?{editColumn:a[0],deleteCount:a[1]}:void 0)}var RV={names:[`MD039`,`no-space-in-links`],description:`Spaces inside link text`,tags:[`whitespace`,`links`],parser:`micromark`,function:function(e,t){let n=Q([`label`]).filter(e=>e.parent?.type===`link`);for(let e of n){let n=e.children.filter(e=>e.type===`labelText`);for(let r of n)r.text.trimStart().length!==r.text.length&&LV(t,e,r,!0),r.text.trimEnd().length!==r.text.length&&LV(t,e,r,!1)}}},zV={names:[`MD040`,`fenced-code-language`],description:`Fenced code blocks should have a language specified`,tags:[`code`,`language`],parser:`micromark`,function:function(e,t){let n=e.config.allowed_languages;n=Array.isArray(n)?n:[];let r=!!e.config.language_only,i=Q([`codeFenced`]);for(let e of i){let i=(0,Z.getDescendantsByType)(e,[`codeFencedFence`])[0],{startLine:a,text:o}=i,s=(0,Z.getDescendantsByType)(i,[`codeFencedFenceInfo`])[0]?.text;s?n.length>0&&!n.includes(s)&&(0,X.addError)(t,a,`"${s}" is not allowed`):(0,X.addErrorContext)(t,a,o),r&&(0,Z.getDescendantsByType)(i,[`codeFencedFenceMeta`]).length>0&&(0,X.addError)(t,a,`Info string contains more than language: "${o}"`)}}};const BV=/^h[1-6]$/;function VV(e){let{children:t,type:n}=e;if(n===`htmlFlow`){let e=(0,Z.filterByTypes)(t,[`htmlText`],!0),n=e.length>0&&(0,Z.getHtmlTagInfo)(e[0]);if(n)return n.name.toLowerCase()}return null}var HV={names:[`MD041`,`first-line-heading`,`first-line-h1`],description:`First line in a file should be a top-level heading`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=!!e.config.allow_preamble,r=Number(e.config.level||1),{tokens:i}=e.parsers.micromark;if(!(0,X.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title)){let a=0;for(let e of i){let{startLine:t,type:i}=e;if(!Z.nonContentTokens.has(i)&&!(0,Z.isHtmlFlowComment)(e)){let o=null;if(i===`atxHeading`||i===`setextHeading`){(0,Z.getHeadingLevel)(e)!==r&&(a=t);break}else if((o=VV(e))&&BV.test(o)){o!==`h${r}`&&(a=t);break}else if(!n){a=t;break}}}a>0&&(0,X.addErrorContext)(t,a,e.lines[a-1])}}},UV={names:[`MD042`,`no-empty-links`],description:`No empty links`,tags:[`links`],parser:`micromark`,function:function(e,t){let{definitions:n}=jB(),r=e=>{let t=n.get(e.text.trim());return!!(t&&t[1]===`#`)},i=Q([`link`]);for(let e of i){let n=(0,Z.getDescendantsByType)(e,[`label`,`labelText`]),i=(0,Z.getDescendantsByType)(e,[`reference`]),a=(0,Z.getDescendantsByType)(e,[`resource`]),o=(0,Z.getDescendantsByType)(i,[`referenceString`]),s=(0,Z.getDescendantsByType)(a,[`resourceDestination`,[`resourceDestinationLiteral`,`resourceDestinationRaw`],`resourceDestinationString`]),c=n.length>0,l=i.length>0,u=a.length>0,d=o.length>0,f=s.length>0,p=!1;c&&(!l&&!u||l&&!d)?p=r(n[0]):d&&!f?p=r(o[0]):!d&&f?p=s[0].text.trim()===`#`:!d&&!f&&(p=!0),p&&(0,X.addErrorContext)(t,e.startLine,e.text,void 0,void 0,[e.startColumn,e.endColumn-e.startColumn])}}},WV={names:[`MD043`,`required-headings`],description:`Required heading structure`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=e.config.headings;if(!Array.isArray(n))return;let r=e.config.match_case||!1,i=0,a=!1,o=!1,s=!1,c=()=>String(n[i++]||`[None]`),l=e=>r?e:e.toLowerCase();for(let e of Q([`atxHeading`,`setextHeading`]))if(!o){let n=(0,Z.getHeadingText)(e),r=(0,Z.getHeadingLevel)(e);s=!0;let u=`${``.padEnd(r,`#`)} ${n}`,d=c();d===`*`?l(c())!==l(u)&&(a=!0,i--):d===`+`?a=!0:d===`?`||(l(d)===l(u)?a=!1:a?i--:((0,X.addErrorDetailIf)(t,e.startLine,d,u),o=!0))}let u=n.length-i;!o&&(u>1||u===1&&n[i]!==`*`)&&(s||!n.every(e=>e===`*`))&&(0,X.addErrorContext)(t,e.lines.length,n[i])}};function GV(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h,g;return _;function _(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),v}function v(t){return t===35?(h=o,y(t)):t===46?(h=s,y(t)):m&&J(t)?Y(e,v,`whitespace`)(t):!m&&q(t)?Yk(e,v)(t):t===null||K(t)||WT(t)||UT(t)&&t!==45&&t!==95?ne(t):(e.enter(a),e.enter(c),e.consume(t),S)}function y(t){let n=h+`Marker`;return e.enter(a),e.enter(h),e.enter(n),e.consume(t),e.exit(n),b}function b(t){if(t===null||t===34||t===35||t===39||t===46||t===60||t===61||t===62||t===96||t===125||q(t))return n(t);let r=h+`Value`;return e.enter(r),e.consume(t),x}function x(t){if(t===null||t===34||t===39||t===60||t===61||t===62||t===96)return n(t);if(t===35||t===46||t===125||q(t)){let n=h+`Value`;return e.exit(n),e.exit(h),e.exit(a),v(t)}return e.consume(t),x}function S(t){return t===null||K(t)||WT(t)||UT(t)&&t!==45&&t!==46&&t!==58&&t!==95?(e.exit(c),m&&J(t)?Y(e,C,`whitespace`)(t):!m&&q(t)?Yk(e,C)(t):C(t)):(e.consume(t),S)}function C(t){return t===61?(e.enter(l),e.consume(t),e.exit(l),w):(e.exit(a),v(t))}function w(t){return t===null||t===60||t===61||t===62||t===96||t===125||m&&K(t)?n(t):t===34||t===39?(e.enter(u),e.enter(f),e.consume(t),e.exit(f),g=t,E):m&&J(t)?Y(e,w,`whitespace`)(t):!m&&q(t)?Yk(e,w)(t):(e.enter(d),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return t===null||t===34||t===39||t===60||t===61||t===62||t===96?n(t):t===125||q(t)?(e.exit(p),e.exit(d),e.exit(a),v(t)):(e.consume(t),T)}function E(t){return t===g?(e.enter(f),e.consume(t),e.exit(f),e.exit(u),e.exit(a),te):(e.enter(d),ee(t))}function ee(t){return t===g?(e.exit(d),E(t)):t===null?n(t):K(t)?m?n(t):Yk(e,ee)(t):(e.enter(p),e.consume(t),D)}function D(t){return t===g||t===null||K(t)?(e.exit(p),ee(t)):(e.consume(t),D)}function te(e){return e===125||q(e)?v(e):ne(e)}function ne(a){return a===125?(e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):n(a)}}function KV(e,t,n,r,i,a,o){let s=0,c=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d}function d(n){return n===93?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),f(n))}function f(t){if(t===93&&!c)return h(t);let n=e.enter(`chunkText`,{_contentTypeTextTrailing:!0,contentType:`text`,previous:l});return l&&(l.next=n),l=n,p(t)}function p(t){return t===null||s>999||t===91&&++c>32?n(t):t===93&&!c--?(e.exit(`chunkText`),h(t)):K(t)?o?n(t):(e.consume(t),e.exit(`chunkText`),f):(e.consume(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}function h(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function qV(e,t,n,r){let i=this;return a;function a(t){return t===null||K(t)||UT(t)||WT(t)?n(t):(e.enter(r),e.consume(t),o)}function o(a){return a===null||K(a)||WT(a)||UT(a)&&a!==45&&a!==95?(e.exit(r),i.previous===45||i.previous===95?n(a):t(a)):(e.consume(a),o)}}const JV={tokenize:QV,concrete:!0},YV={tokenize:$V,partial:!0},XV={tokenize:eH,partial:!0},ZV={tokenize:tH,partial:!0};function QV(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0,s;return c;function c(t){return e.enter(`directiveContainer`),e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),l(t)}function l(t){return t===58?(e.consume(t),o++,l):o<3?n(t):(e.exit(`directiveContainerSequence`),qV.call(r,e,u,n,`directiveContainerName`)(t))}function u(t){return t===91?e.attempt(YV,d,d)(t):d(t)}function d(t){return t===123?e.attempt(XV,f,f)(t):f(t)}function f(t){return Y(e,p,`whitespace`)(t)}function p(i){return e.exit(`directiveContainerFence`),i===null?C(i):K(i)?r.interrupt?t(i):e.attempt(ZV,m,C)(i):n(i)}function m(t){return t===null?C(t):K(t)?e.check(ZV,y,C)(t):(e.enter(`directiveContainerContent`),h(t))}function h(t){return e.attempt({tokenize:w,partial:!0},S,a?Y(e,g,`linePrefix`,a+1):g)(t)}function g(t){return t===null?S(t):K(t)?e.check(ZV,v,S)(t):v(t)}function _(t){if(t===null){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}return K(t)?e.check(ZV,b,x)(t):(e.consume(t),_)}function v(t){let n=e.enter(`chunkDocument`,{contentType:`document`,previous:s});return s&&(s.next=n),s=n,_(t)}function y(t){return e.enter(`directiveContainerContent`),h(t)}function b(t){e.consume(t);let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,h}function x(t){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}function S(t){return e.exit(`directiveContainerContent`),C(t)}function C(n){return e.exit(`directiveContainer`),t(n)}function w(e,t,n){let i=0;return Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),s(t)}function s(t){return t===58?(e.consume(t),i++,s):i<o?n(t):(e.exit(`directiveContainerSequence`),Y(e,c,`whitespace`)(t))}function c(r){return r===null||K(r)?(e.exit(`directiveContainerFence`),t(r)):n(r)}}}function $V(e,t,n){return KV(e,t,n,`directiveContainerLabel`,`directiveContainerLabelMarker`,`directiveContainerLabelString`,!0)}function eH(e,t,n){return GV(e,t,n,`directiveContainerAttributes`,`directiveContainerAttributesMarker`,`directiveContainerAttribute`,`directiveContainerAttributeId`,`directiveContainerAttributeClass`,`directiveContainerAttributeName`,`directiveContainerAttributeInitializerMarker`,`directiveContainerAttributeValueLiteral`,`directiveContainerAttributeValue`,`directiveContainerAttributeValueMarker`,`directiveContainerAttributeValueData`,!0)}function tH(e,t,n){let r=this;return i;function i(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const nH={tokenize:aH},rH={tokenize:oH,partial:!0},iH={tokenize:sH,partial:!0};function aH(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveLeaf`),e.enter(`directiveLeafSequence`),e.consume(t),a}function a(t){return t===58?(e.consume(t),e.exit(`directiveLeafSequence`),qV.call(r,e,o,n,`directiveLeafName`)):n(t)}function o(t){return t===91?e.attempt(rH,s,s)(t):s(t)}function s(t){return t===123?e.attempt(iH,c,c)(t):c(t)}function c(t){return Y(e,l,`whitespace`)(t)}function l(r){return r===null||K(r)?(e.exit(`directiveLeaf`),t(r)):n(r)}}function oH(e,t,n){return KV(e,t,n,`directiveLeafLabel`,`directiveLeafLabelMarker`,`directiveLeafLabelString`,!0)}function sH(e,t,n){return GV(e,t,n,`directiveLeafAttributes`,`directiveLeafAttributesMarker`,`directiveLeafAttribute`,`directiveLeafAttributeId`,`directiveLeafAttributeClass`,`directiveLeafAttributeName`,`directiveLeafAttributeInitializerMarker`,`directiveLeafAttributeValueLiteral`,`directiveLeafAttributeValue`,`directiveLeafAttributeValueMarker`,`directiveLeafAttributeValueData`,!0)}const cH={tokenize:fH,previous:dH},lH={tokenize:pH,partial:!0},uH={tokenize:mH,partial:!0};function dH(e){return e!==58||this.events[this.events.length-1][1].type===`characterEscape`}function fH(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveText`),e.enter(`directiveTextMarker`),e.consume(t),e.exit(`directiveTextMarker`),qV.call(r,e,a,n,`directiveTextName`)}function a(t){return t===58?n(t):t===91?e.attempt(lH,o,o)(t):o(t)}function o(t){return t===123?e.attempt(uH,s,s)(t):s(t)}function s(n){return e.exit(`directiveText`),t(n)}}function pH(e,t,n){return KV(e,t,n,`directiveTextLabel`,`directiveTextLabelMarker`,`directiveTextLabelString`)}function mH(e,t,n){return GV(e,t,n,`directiveTextAttributes`,`directiveTextAttributesMarker`,`directiveTextAttribute`,`directiveTextAttributeId`,`directiveTextAttributeClass`,`directiveTextAttributeName`,`directiveTextAttributeInitializerMarker`,`directiveTextAttributeValueLiteral`,`directiveTextAttributeValue`,`directiveTextAttributeValueMarker`,`directiveTextAttributeValueData`)}function hH(){return{text:{58:cH},flow:{58:[JV,nH]}}}var gH=O();function _H(){let e={...hH()};return delete e.text,e}function vH(e,t){return e.slice(t.start.offset,t.end.offset)}function yH(e,t={}){let n=[_H(),KO(),KA(),ij(),wP(),...t.extensions||[]],r=[],i=gA.tokenize;function a(t,n,a){let o=this,s=o.events;return i.call(o,t,n,t=>{let n=s.length;for(;--n>=0;){let[e,t]=s[n];if(e===`enter`){let{type:e}=t;if(e===`labelImage`||e===`labelLink`)break}}if(n>=0){let[,t]=s[n],[,i]=s[s.length-1],a={type:`undefinedReferenceShortcut`,start:t.start,end:i.end},c={type:`undefinedReference`,start:t.start,end:i.end},l=s.slice(n).filter(e=>{let[,t]=e,{type:n}=t;return n===`data`||n===`lineEnding`}),u=r.length>0&&r[r.length-1][0],d=u&&u[1];d&&d.end.line===a.start.line&&d.end.column===a.start.column&&(l.length===0?(d.type=`undefinedReferenceCollapsed`,d.end=i.end):(a.type=`undefinedReferenceFull`,a.start=d.start,r.pop()));let f=l.filter(e=>e[0]===`enter`).map(t=>vH(e,t[1])).join(``).trim();if(f.length>0&&!f.includes(`]`)){let e=[[`enter`,a,o],[`enter`,c,o]];for(let t of l){let[n,r]=t;e.push([n,{...r},o])}e.push([`exit`,c,o],[`exit`,a,o]),r.push(e)}}return a(t)})}try{gA.tokenize=a;let i=eF({...t,extensions:n}),o=rF()(e,void 0,!0);return tF(i.document().write(o)).concat(...r)}finally{gA.tokenize=i}}function bH(e,t={},n={},r=0,i=void 0){let a=!!t.freezeTokens,o=yH(e,n),s=[],c=[],l={type:`data`,startLine:-1,startColumn:-1,endLine:-1,endColumn:-1,text:`ROOT`,children:s,parent:null},u=[l],d=l,f=null,p=null,m=!1;for(let s of o){let[o,h]=s,{type:g,start:_,end:v}=h,{column:y,line:b}=_,{column:x,line:S}=v,C=vH(e,h);if(o===`enter`&&!m){let a=d;if(u.push(a),d={type:g,startLine:b+r,startColumn:y,endLine:S+r,endColumn:x,text:C,children:[],parent:a===l?i||null:a},i&&Object.defineProperty(d,gH.htmlFlowSymbol,{value:!0}),a.children.push(d),c.push(d),d.type===`htmlFlow`&&!(0,Z.isHtmlFlowComment)(d)){m=!0,(!f||!p)&&(f={...n,extensions:[{disable:{null:[`codeIndented`,`htmlFlow`]}}]},p=e.split(gH.newlineRe));let r=bH(p.slice(d.startLine-1,d.endLine).join(`
266
- `),t,f,d.startLine-1,d);d.children=r,c=c.concat(r[gH.flatTokensSymbol])}}else o===`exit`&&(g===`htmlFlow`&&(m=!1),m||(a&&(Object.freeze(d.children),Object.freeze(d)),d=u.pop()))}return Object.defineProperty(s,gH.flatTokensSymbol,{value:c}),a&&Object.freeze(s),s}function xH(e,t){return bH(e,t)}const SH=new Set([`codeFencedFence`,`definition`,`reference`,`resource`]);var CH={names:[`MD044`,`proper-names`],description:`Proper names should have the correct capitalization`,tags:[`spelling`],parser:`micromark`,function:function(e,t){let n=e.config.names;if(n=Array.isArray(n)?n:[],n.sort((e,t)=>t.length-e.length||e.localeCompare(t)),n.length===0)return;let r=e.config.code_blocks,i=r===void 0?!0:!!r,a=e.config.html_elements,o=a===void 0?!0:!!a,s=new Set([`data`]);i&&(s.add(`codeFlowValue`),s.add(`codeTextData`)),o&&(s.add(`htmlFlowData`),s.add(`htmlTextData`));let c=(0,Z.filterByPredicate)(e.parsers.micromark.tokens,e=>s.has(e.type),e=>e.children.filter(e=>!SH.has(e.type))),l=[],u=new Set;for(let e of n){let r=(0,X.escapeForRegExp)(e),i=`(${/^\W/.test(e)?``:`\\b_*`})(${r})${/\W$/.test(e)?``:`_*\\b`}`,a=new RegExp(i,`gi`);for(let r of c){let i=null;for(;(i=a.exec(r.text))!==null;){let[,a,o]=i,s=r.startColumn+i.index+a.length,c=o.length,d=r.startLine,f={startLine:d,startColumn:s,endLine:d,endColumn:s+c-1};if(!n.includes(o)&&!l.some(e=>(0,X.hasOverlap)(e,f))){let n=[];u.has(r)||(n=(0,Z.filterByTypes)(xH(r.text),[`literalAutolink`]).map(e=>({startLine:d,startColumn:r.startColumn+e.startColumn-1,endLine:d,endColumn:r.endColumn+e.endColumn-1})),l.push(...n),u.add(r)),n.some(e=>(0,X.hasOverlap)(e,f))||(0,X.addErrorDetailIf)(t,r.startLine,e,o,void 0,void 0,[s,c],{editColumn:s,deleteCount:c,insertText:e})}l.push(f)}}}}};const wH=(0,X.getHtmlAttributeRe)(`alt`),TH=(0,X.getHtmlAttributeRe)(`aria-hidden`);var EH={names:[`MD045`,`no-alt-text`],description:`Images should have alternate text (alt text)`,tags:[`accessibility`,`images`],parser:`micromark`,function:function(e,t){let n=Q([`image`]);for(let e of n)if((0,Z.getDescendantsByType)(e,[`label`,`labelText`]).some(e=>e.text.length===0)){let n=e.startLine===e.endLine?[e.startColumn,e.endColumn-e.startColumn]:void 0;(0,X.addError)(t,e.startLine,void 0,void 0,n)}let r=Q([`htmlText`],!0);for(let e of r){let{startColumn:n,startLine:r,text:i}=e,a=(0,Z.getHtmlTagInfo)(e);a&&!a.close&&a.name.toLowerCase()===`img`&&!wH.test(i)&&TH.exec(i)?.[1].toLowerCase()!==`true`&&(0,X.addError)(t,r,void 0,void 0,[n,i.replace(X.nextLinesRe,``).length])}}};const DH=e=>e===`codeFenced`?`fenced`:`indented`;var OH={names:[`MD046`,`code-block-style`],description:`Code block style`,tags:[`code`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`);for(let e of Q([`codeFenced`,`codeIndented`])){let{startLine:r,type:i}=e;n===`consistent`&&(n=DH(i)),(0,X.addErrorDetailIf)(t,r,n,DH(i))}}},kH={names:[`MD047`,`single-trailing-newline`],description:`Files should end with a single newline character`,tags:[`blank_lines`],parser:`none`,function:function(e,t){let n=e.lines.length,r=e.lines[n-1];(0,X.isBlankLine)(r)||(0,X.addError)(t,n,void 0,void 0,[r.length,1],{insertText:`
267
- `,editColumn:r.length+1})}};function AH(e){switch(e[0]){case`~`:return`tilde`;default:return`backtick`}}var jH={names:[`MD048`,`code-fence-style`],description:`Code fence style`,tags:[`code`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`),r=Q([`codeFenced`]);for(let e of r){let{startLine:r,text:i}=(0,Z.getDescendantsByType)(e,[`codeFencedFence`,`codeFencedFenceSequence`])[0];n===`consistent`&&(n=AH(i)),(0,X.addErrorDetailIf)(t,r,n,AH(i))}}};const MH=/^\w$/;function NH(e){switch(e[0]){case`*`:return`asterisk`;default:return`underscore`}}const PH=(e,t,n,r,i,a,o=`consistent`)=>{let{lines:s,parsers:c}=e,l=(0,Z.filterByPredicate)(c.micromark.tokens,e=>e.type===n,e=>e.type===`htmlFlow`?[]:e.children);for(let e of l){let n=(0,Z.getDescendantsByType)(e,[r]),c=n[0],l=n[n.length-1];if(c&&l){let e=NH(c.text);if(o===`consistent`&&(o=e),o!==e&&!(o===`underscore`&&(MH.test(s[c.startLine-1][c.startColumn-2])||MH.test(s[l.endLine-1][l.endColumn-1]))))for(let n of[c,l])(0,X.addError)(t,n.startLine,`Expected: ${o}; Actual: ${e}`,void 0,[n.startColumn,n.text.length],{editColumn:n.startColumn,deleteCount:n.text.length,insertText:o===`asterisk`?i:a})}}};var FH=[{names:[`MD049`,`emphasis-style`],description:`Emphasis style`,tags:[`emphasis`],parser:`micromark`,function:function(e,t){return PH(e,t,`emphasis`,`emphasisSequence`,`*`,`_`,e.config.style||void 0)}},{names:[`MD050`,`strong-style`],description:`Strong style`,tags:[`emphasis`],parser:`micromark`,function:function(e,t){return PH(e,t,`strong`,`strongSequence`,`**`,`__`,e.config.style||void 0)}}];const IH=(0,X.getHtmlAttributeRe)(`id`),LH=(0,X.getHtmlAttributeRe)(`name`),RH=/\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu,zH=/^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/,BH=new Set([`image`,`reference`,`resource`]),VH=new Set([`characterEscapeValue`,`codeTextData`,`data`,`mathTextData`]);function HH(e){let t=(0,Z.filterByPredicate)(e.children,e=>VH.has(e.type),e=>BH.has(e.type)?[]:e.children).map(e=>e.text).join(``);return`#`+encodeURIComponent(t.toLowerCase().replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,``).replace(/ /gu,`-`).toWellFormed())}function UH(e){return(0,Z.filterByTypes)(e.children,[`characterEscapeValue`,`data`]).map(e=>e.text).join(``)}var WH={names:[`MD051`,`link-fragments`],description:`Link fragments should be valid`,tags:[`links`],parser:`micromark`,function:function(e,t){let n=e.config.ignore_case||!1,r=e.config.ignored_pattern||``,i=new RegExp(r||`^$`),a=new Map([[`#top`,0]]),o=Q([`atxHeadingText`,`setextHeadingText`]);for(let e of o){let t=HH(e);if(t!==`#`){let n=a.get(t)||0;n&&a.set(`${t}-${n}`,0),a.set(t,n+1);let r=null;for(;(r=RH.exec(e.text))!==null;){let[,e]=r;a.has(e)||a.set(e,1)}}}for(let e of Q([`htmlText`],!0)){let t=(0,Z.getHtmlTagInfo)(e);if(t&&!t.close){let n=IH.exec(e.text)||t.name.toLowerCase()===`a`&&LH.exec(e.text);n&&n.length>0&&a.set(`#${n[1]}`,0)}}for(let[e,r]of[[`link`,`resourceDestinationString`],[`definition`,`definitionDestinationString`]]){let o=Q([e]).filter(e=>!(e.parent?.type===`atxHeadingText`&&(0,Z.isDocfxTab)(e.parent.parent)));for(let e of o){let o=(0,Z.filterByTypes)(e.children,[r]);for(let r of o){let{endColumn:o,startColumn:s}=r,c=UH(r),l=c.slice(1),u=`#${encodeURIComponent(l.toWellFormed())}`;if(c.length>1&&c.startsWith(`#`)&&!a.has(u)&&!zH.test(u)&&!i.test(l)){let r,i,l;e.startLine===e.endLine&&(r=e.text,i=[e.startColumn,e.endColumn-e.startColumn],l={editColumn:s,deleteCount:o-s});let u=c.toLowerCase(),d=[...a.keys()].find(e=>u===e.toLowerCase());d?((l||{}).insertText=d,!n&&d!==c&&(0,X.addError)(t,e.startLine,`Expected: ${d}; Actual: ${c}`,r,i,l)):(0,X.addError)(t,e.startLine,void 0,r,i)}}}}}},GH={names:[`MD052`,`reference-links-images`],description:`Reference links and images should use a label that is defined`,tags:[`images`,`links`],parser:`none`,function:function(e,t){let{config:n,lines:r}=e,i=n.shortcut_syntax||!1,a=new Set(n.ignored_labels||[`x`]),{definitions:o,references:s,shortcuts:c}=jB(),l=i?[...s.entries(),...c.entries()]:s.entries();for(let e of l){let[n,i]=e;if(!o.has(n)&&!a.has(n))for(let e of i){let[i,a,o]=e,s=r[i].slice(a,a+o);(0,X.addError)(t,i+1,`Missing link or image reference definition: "${n}"`,s,[a+1,s.length])}}}};const KH=/^ {0,3}\[([^\]]*[^\\])\]:/;var qH={names:[`MD053`,`link-image-reference-definitions`],description:`Link and image reference definitions should be needed`,tags:[`images`,`links`],parser:`none`,function:function(e,t){let n=new Set(e.config.ignored_definitions||[`//`]),r=e.lines,{references:i,shortcuts:a,definitions:o,duplicateDefinitions:s}=jB(),c=e=>e.replace(KH,``).trim().length>0,l={deleteCount:-1};for(let e of o.entries()){let[o,[s]]=e;if(!n.has(o)&&!i.has(o)&&!a.has(o)){let e=r[s];(0,X.addError)(t,s+1,`Unused link or image reference definition: "${o}"`,(0,X.ellipsify)(e),[1,e.length],c(e)?l:void 0)}}for(let e of s){let[i,a]=e;if(!n.has(i)){let e=r[a];(0,X.addError)(t,a+1,`Duplicate link or image reference definition: "${i}"`,(0,X.ellipsify)(e),[1,e.length],c(e)?l:void 0)}}}};const JH=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,YH=e=>e.replace(JH,`$1`),XH=/[ <>]/,ZH=e=>{try{new URL(e)}catch{return!1}return!XH.test(e)};var QH={names:[`MD054`,`link-image-style`],description:`Link and image style`,tags:[`images`,`links`],parser:`micromark`,function:(e,t)=>{let n=e.config,r=n.autolink===void 0||!!n.autolink,i=n.inline===void 0||!!n.inline,a=n.full===void 0||!!n.full,o=n.collapsed===void 0||!!n.collapsed,s=n.shortcut===void 0||!!n.shortcut,c=n.url_inline===void 0||!!n.url_inline;if(r&&i&&a&&o&&s&&c)return;let{definitions:l}=jB(),u=Q([`autolink`,`image`,`link`]);for(let e of u){let n=null,u=null,{endColumn:d,endLine:f,startColumn:p,startLine:m,text:h,type:g}=e,_=g===`image`,v=!1;if(g===`autolink`)u=(0,Z.getDescendantsByType)(e,[[`autolinkEmail`,`autolinkProtocol`]])[0]?.text,n=u,v=!r&&!!u;else if(n=(0,Z.getDescendantsByType)(e,[`label`,`labelText`])[0].text,u=(0,Z.getDescendantsByType)(e,[`resource`,`resourceDestination`,[`resourceDestinationLiteral`,`resourceDestinationRaw`],`resourceDestinationString`])[0]?.text,u){let t=(0,Z.getDescendantsByType)(e,[`resource`,`resourceTitle`,`resourceTitleString`])[0]?.text;v=!i||!c&&r&&!_&&!t&&n===u&&ZH(u)}else{let t=(0,Z.getDescendantsByType)(e,[`reference`]).length===0,r=(0,Z.getDescendantsByType)(e,[`reference`,`referenceString`])[0]?.text,i=r===void 0,c=l.get(r||n);u=c&&c[1]||``,v=!!(u&&(t?!s:i?!o:!a))}if(v){let e,a;if(m===f){e=[p,d-p];let t=null,o=i&&n,s=r&&!_&&ZH(u);o&&(c||!s)?t=`${_?`!`:``}[${n.replace(/[[\]]/g,`\\$&`)}](${u.replace(/[()]/g,`\\$&`)})`:s&&(t=`<${YH(u)}>`),t&&(a={editColumn:e[0],insertText:t,deleteCount:e[1]})}(0,X.addErrorContext)(t,m,h.replace(X.nextLinesRe,``),void 0,void 0,e,a)}}}};const $H=new Set([`linePrefix`,`whitespace`]),eU=e=>e.filter(e=>!$H.has(e.type)),tU=e=>e[0],nU=e=>e[e.length-1],rU=(e,t)=>[e,t-e+1];var iU={names:[`MD055`,`table-pipe-style`],description:`Table pipe style`,tags:[`table`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`),r=n!==`no_leading_or_trailing`&&n!==`trailing_only`,i=n!==`no_leading_or_trailing`&&n!==`leading_only`,a=Q([`tableDelimiterRow`,`tableRow`]);for(let e of a){let a=tU(e.children),o=tU(eU(a.children)).type===`tableCellDivider`,s=nU(e.children),c=nU(eU(s.children)).type===`tableCellDivider`,l=o?c?`leading_and_trailing`:`leading_only`:c?`trailing_only`:`no_leading_or_trailing`;n===`consistent`&&(n=l,r=o,i=c),o!==r&&(0,X.addErrorDetailIf)(t,a.startLine,n,l,`${r?`Missing`:`Unexpected`} leading pipe`,void 0,rU(e.startColumn,a.startColumn)),c!==i&&(0,X.addErrorDetailIf)(t,s.endLine,n,l,`${i?`Missing`:`Unexpected`} trailing pipe`,void 0,rU(s.endColumn-1,e.endColumn-1))}}};const aU=(e,t)=>[e,t-e+1];var oU={names:[`MD056`,`table-column-count`],description:`Table column count`,tags:[`table`],parser:`micromark`,function:function(e,t){let n=Q([`tableDelimiterRow`,`tableRow`]),r=0,i=null;for(let e of n){let n=(0,Z.getParentOfType)(e,[`table`]);i!==n&&(r=0,i=n);let a=e.children.filter(e=>[`tableData`,`tableDelimiter`,`tableHeader`].includes(e.type)),o=a.length;r||=o;let s,c;o<r?(s=`Too few cells, row will be missing data`,c=[e.endColumn-1,1]):r<o&&(s=`Too many cells, extra data will be missing`,c=aU(a[r].startColumn,e.endColumn-1)),(0,X.addErrorDetailIf)(t,e.endLine,r,o,s,void 0,c)}}},sU={names:[`MD058`,`blanks-around-tables`],description:`Tables should be surrounded by blank lines`,tags:[`table`],parser:`micromark`,function:function(e,t){let{lines:n}=e,r=Q([`blockQuotePrefix`,`linePrefix`]),i=Q([`table`]);for(let e of i){let i=e.startLine;(0,X.isBlankLine)(n[i-2])||(0,X.addErrorContext)(t,i,n[i-1].trim(),void 0,void 0,void 0,{insertText:(0,Z.getBlockQuotePrefixText)(r,i)});let a=e.endLine;(0,X.isBlankLine)(n[a])||(0,X.addErrorContext)(t,a,n[a-1].trim(),void 0,void 0,void 0,{lineNumber:a+1,insertText:(0,Z.getBlockQuotePrefixText)(r,a)})}}};const cU=new Set([`codeText`,`htmlText`]),lU=[`click here`,`here`,`link`,`more`];function uU(e){return e.replace(/[\W_]+/g,` `).replace(/\s+/g,` `).toLowerCase().trim()}var dU={names:[`MD059`,`descriptive-link-text`],description:`Link text should be descriptive`,tags:[`accessibility`,`links`],parser:`micromark`,function:function(e,t){let n=new Set((e.config.prohibited_texts||lU).map(uU));if(n.size>0){let e=Q([`link`]);for(let r of e){let e=(0,Z.getDescendantsByType)(r,[`label`,`labelText`]);for(let r of e){let{children:e,endColumn:i,endLine:a,parent:o,startColumn:s,startLine:c,text:l}=r;if(!e.some(e=>cU.has(e.type))&&n.has(uU(l))){let e=c===a?[s,i-s]:void 0;(0,X.addErrorContext)(t,c,o.text,void 0,void 0,e)}}}}}};function fU({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const pU=fU();function mU(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(pU,``)}const hU=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],gU=[12288,12288,65281,65376,65504,65510],_U=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],vU=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},yU=19968,[bU,xU]=SU(_U);function SU(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(yU>=i&&yU<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}const CU=e=>e<161||e>1114109?!1:vU(hU,e),wU=e=>e<12288||e>65510?!1:vU(gU,e),TU=e=>e>=bU&&e<=xU?!0:e<4352||e>262141?!1:vU(_U,e);function EU(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function DU(e,{ambiguousAsWide:t=!1}={}){return EU(e),wU(e)||TU(e)||t&&CU(e)?2:1}const OU=new Intl.Segmenter,kU=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,AU=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,jU=/^\p{RGI_Emoji}$/v,MU=/^[\d#*]\u20E3$/,NU=/\p{Extended_Pictographic}/gu;function PU(e){if(e.length>50)return!1;if(MU.test(e))return!0;if(e.includes(`‍`)){let t=e.match(NU);return t!==null&&t.length>=2}return!1}function FU(e){return e.replace(AU,``)}function IU(e){return kU.test(e)}function LU(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function RU(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function zU(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function BU(e){return LU(e)||RU(e)||zU(e)}function VU(e,t){let n=[];for(let t of e)kU.test(t)||n.push(t.codePointAt(0));if(n.length===0)return;let r=0;for(let e=0;e<n.length;e++){let i=n[e];if(!BU(i)){if(r===0)return;for(let i=e;i<n.length;i++)r+=DU(n[i],t);return r}if(LU(i)&&RU(n[e+1])){r+=2,e+=zU(n[e+2])?2:1;continue}r+=DU(i,t)}return r}function HU(e,t){let n=0,r=!0;for(let i of e){if(r){r=!1;continue}i>=`＀`&&i<=`￯`&&(n+=DU(i.codePointAt(0),t))}return n}function UU(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t,i=e;if(!r&&(i.includes(`\x1B`)||i.includes(`›`))&&(i=mU(i)),i.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(i))return i.length;let a=0,o={ambiguousAsWide:!n};for(let{segment:e}of OU.segment(i)){if(IU(e))continue;if(jU.test(e)||PU(e)){a+=2;continue}let t=FU(e),n=VU(t,o);if(n!==void 0){a+=n;continue}let r=t.codePointAt(0);a+=DU(r,o),a+=HU(t,o)}return a}function WU(e,t,n,r,i){e.push({lineNumber:t,detail:r,range:[n,1],fixInfo:i})}function GU(e,t){return(0,Z.filterByTypes)(t.children,[`tableCellDivider`]).map(n=>({actual:n.startColumn,effective:UU(e[t.startLine-1].slice(0,n.startColumn-1))}))}function KU(e,t,n){let r=[],i=t[0],a=GU(e,i);for(let i of t.slice(1)){let t=new Set(a.map(e=>e.effective)),o=GU(e,i);for(let e of o)t.size>0&&!t.delete(e.effective)&&WU(r,i.startLine,e.actual,n)}return r}var qU={names:[`MD060`,`table-column-style`],description:`Table column style`,tags:[`table`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`any`),r=n===`any`||n===`aligned`,i=n===`any`||n===`compact`,a=n===`any`||n===`tight`,o=!!e.config.aligned_delimiter,s=e.lines,c=Q([`table`]);for(let e of c){let n=(0,Z.filterByTypes)(e.children,[`tableDelimiterRow`,`tableRow`]),c=[];r&&c.push(...KU(s,n,`Table pipe does not align with header for style "aligned"`));let l=[],u=[];if((i||a)&&!(r&&c.length===0)){if(o){let e=KU(s,n.slice(0,2),`Table pipe does not align with header for option "aligned_delimiter"`);l.push(...e),u.push(...e)}for(let e of n){let t=(0,Z.filterByTypes)(e.children,[`tableCellDivider`,`tableContent`,`whitespace`]);for(let n=0;n<t.length;n++){let{startColumn:r,startLine:i,type:a}=t[n];if(a===`tableCellDivider`){let a=t[n-1];a&&(a.type===`whitespace`?(a.text.length!==1&&WU(l,i,r,`Table pipe has extra space to the left for style "compact"`,{editColumn:a.startColumn,deleteCount:a.text.length-1}),WU(u,i,r,`Table pipe has space to the left for style "tight"`,{editColumn:a.startColumn,deleteCount:a.text.length})):WU(l,i,r,`Table pipe is missing space to the left for style "compact"`,{editColumn:a.endColumn,insertText:` `}));let o=t[n+1];o&&(o.type===`whitespace`?o.endColumn!==e.endColumn&&(o.text.length!==1&&WU(l,i,r,`Table pipe has extra space to the right for style "compact"`,{editColumn:o.startColumn,deleteCount:o.text.length-1}),WU(u,i,r,`Table pipe has space to the right for style "tight"`,{editColumn:o.startColumn,deleteCount:o.text.length})):WU(l,i,r,`Table pipe is missing space to the right for style "compact"`,{editColumn:o.startColumn,insertText:` `}))}}}}let d=c;i&&(l.length<d.length||!r)&&(d=l),a&&(u.length<d.length||!r&&!i)&&(d=u);for(let e of d)t(e)}}};const[JU,YU]=aV,[XU,ZU]=FH,QU=[IB,LB,HB,UB,KB,qB,YB,ZB,QB,eV,nV,rV,JU,oV,YU,lV,uV,dV,fV,pV,hV,_V,xV,SV,TV,DV,kV,AV,jV,PV,FV,IV,RV,zV,HV,UV,WV,CH,EH,OH,kH,jH,XU,ZU,WH,GH,qH,QH,iU,oU,sU,dU,qU];for(let e of QU){let t=e.names[0].toLowerCase();e.information=new URL(`https://github.com/DavidAnson/markdownlint/blob/v${MB}/doc/${t}.md`)}function $U(e,t,n){let r=null,i=null,a=[],o=0;return(n||[JSON.parse]).every(e=>{try{let n=e(t);return r=n&&typeof n==`object`&&!Array.isArray(n)?n:{},!1}catch(e){a.push(`Parser ${o++}: ${e?.message}`)}return!0})&&(a.unshift(`Unable to parse '${e}'`),i=a.join(`; `)),{config:r,message:i}}function eW(e,t){let n=null;if(e.length===QU.length)return n;let r={};for(let[i,a]of e.entries()){let e=i-QU.length;function o(t,n){return Error(`Property '${t}' of custom rule at index ${e} is incorrect: '${n}'.`)}for(let e of[`names`,`tags`]){let t=a[e];!n&&(!t||!Array.isArray(t)||t.length===0||!t.every(X.isString)||t.some(X.isEmptyString))&&(n=o(e,t))}for(let e of[[`description`,`string`],[`function`,`function`]]){let t=e[0],r=a[t];!n&&(!r||typeof r!==e[1])&&(n=o(t,r))}if(!n&&a.parser!==void 0&&a.parser!==`markdownit`&&a.parser!==`micromark`&&a.parser!==`none`&&(n=o(`parser`,a.parser)),!n&&a.information&&!X.isUrl(a.information)&&(n=o(`information`,a.information)),!n&&a.asynchronous!==void 0&&typeof a.asynchronous!=`boolean`&&(n=o(`asynchronous`,a.asynchronous)),!n&&a.asynchronous&&t&&(n=Error(`Custom rule `+a.names.join(`/`)+` at index `+e+` is asynchronous and can not be used in a synchronous context.`)),!n){for(let t of a.names){let i=t.toUpperCase();!n&&r[i]!==void 0&&(n=Error(`Name '`+t+`' of custom rule at index `+e+` is already used as a name or tag.`)),r[i]=!0}for(let t of a.tags){let i=t.toUpperCase();!n&&r[i]&&(n=Error(`Tag '`+t+`' of custom rule at index `+e+` is already used as a name.`)),r[i]=!1}}}return n}function tW(e,t){let n=[];if(t){let r=e.match(t);if(r&&!r.index){let t=r[0];e=e.slice(t.length),n=t.split(X.newLineRe),n.length>0&&n[n.length-1]===``&&n.length--}}return{content:e,frontMatterLines:n}}function nW(e){let t={};for(let n of e){let e=n.names[0].toUpperCase();for(let r of n.names){let n=r.toUpperCase();t[n]=[e]}for(let r of n.tags){let n=r.toUpperCase(),i=t[n]||[];i.push(e),t[n]=i}}return t}function rW(e,t,n){let r=!0,i=`error`;Object.entries(t).every(([e,t])=>e.toUpperCase()===`DEFAULT`?(r=!!t,t===`warning`&&(i=`warning`),!1):!0);let a={},o=new Map,s=new Map,c=Object.freeze({});for(let t of e.map(e=>e.names[0].toUpperCase()))a[t]=c,o.set(t,r),s.set(t,i);for(let[e,r]of Object.entries(t)){let t=e.toUpperCase(),i=!1,c=`error`,l={};if(r)if(r instanceof Object){let e=r;i=e.enabled===void 0?!0:!!e.enabled,c=e.severity===`warning`?`warning`:`error`,l=Object.fromEntries(Object.entries(r).filter(([e])=>e!==`enabled`&&e!==`severity`))}else i=!0,c=r===`warning`?`warning`:`error`;for(let e of n[t]||[])Object.freeze(l),a[e]=l,o.set(e,i),s.set(e,c)}return{effectiveConfig:a,rulesEnabled:o,rulesSeverity:s}}function iW(e,t,n,r,i,a,o){let s=new Map,c=s,l=Array(1+n.length);function u(e,t,n=void 0){for(let[i,a]of e.entries()){if(!r){let e=null;for(;e=X.inlineCommentStartRe.exec(a);){let n=e[2].toUpperCase(),r=e.index+e[1].length,o=a.indexOf(`-->`,r);if(o===-1)break;t(n,a.slice(r,o),i+1)}}n&&n()}}function d(e,t){if(e===`CONFIGURE-FILE`){let{config:e}=$U(`CONFIGURE-FILE`,t,a);e&&(i={...i,...e})}}function f(e,t,n){n=new Map(n);let r=e.startsWith(`ENABLE`),i=t&&t.trim(),a=i?i.toUpperCase().split(/\s+/):b;for(let e of a)for(let t of o[e]||[])n.set(t,r);return n}function p(e,t){(e===`ENABLE-FILE`||e===`DISABLE-FILE`)&&(s=f(e,t,s))}function m(e,t){e===`CAPTURE`?c=s:e===`RESTORE`?s=c:(e===`ENABLE`||e===`DISABLE`)&&(s=f(e,t,s))}function h(){l.push(s)}function g(e,t,r){let i=e===`DISABLE-LINE`,a=e===`DISABLE-NEXT-LINE`;if(i||a){let i=n.length+r+ +!!a;l[i]=f(e,t,l[i])}}u([t.join(`
268
- `)],d);let{effectiveConfig:_,rulesEnabled:v,rulesSeverity:y}=rW(e,i,o),b=[...v.keys()];return s=new Map(v),c=s,u(t,p),u(t,m,h),u(t,g),{effectiveConfig:_,enabledRulesPerLineNumber:l,enabledRuleList:e.filter(e=>{let t=e.names[0].toUpperCase();return l.some(e=>e.get(t))}),rulesSeverity:y}}function aW(e,n,r,i,a,o,s,c,l,u,d,f){let p=e=>f(e instanceof Error?e:Error(e));i=i.replace(/^\uFEFF/,``);let m=tW(i,c),{frontMatterLines:h}=m;i=m.content;let{effectiveConfig:g,enabledRulesPerLineNumber:_,enabledRuleList:v,rulesSeverity:y}=iW(e,i.split(X.newLineRe),h,u,o,s,n),b=v.some(e=>e.parser===`markdownit`||e.parser===void 0),x=v.some(e=>e.parser===`micromark`),S=e.length!==QU.length,C=x?xH(i,{freezeTokens:S}):[],w=i;i=X.clearHtmlCommentText(i);let T=i.split(X.newLineRe),E=e=>{let t=Object.freeze({markdownit:Object.freeze({tokens:e})}),n=Object.freeze({micromark:Object.freeze({tokens:C})}),i=Object.freeze({}),a={name:r,version:MB,lines:Object.freeze(T),frontMatterLines:Object.freeze(h)};OB({...a,parsers:n,config:{}});let o=[],s=s=>{let c=s.names[0].toUpperCase(),u={},d=i;s.parser===void 0?(u.tokens=e,d=t):s.parser===`markdownit`?d=t:s.parser===`micromark`&&(d=n);let f=Object.freeze({...a,...u,parsers:d,config:g[c]});function p(e){throw Error(`Value of '${e}' passed to onError by '${c}' is incorrect for '${r}'.`)}function m(e){(!e||!X.isNumber(e.lineNumber)||e.lineNumber<1||e.lineNumber>T.length)&&p(`lineNumber`);let t=e.lineNumber+h.length;if(!_[t].get(c))return;e.detail&&!X.isString(e.detail)&&p(`detail`),e.context&&!X.isString(e.context)&&p(`context`),e.information&&!X.isUrl(e.information)&&p(`information`),e.range&&(!Array.isArray(e.range)||e.range.length!==2||!X.isNumber(e.range[0])||e.range[0]<1||!X.isNumber(e.range[1])||e.range[1]<1||e.range[0]+e.range[1]-1>T[e.lineNumber-1].length)&&p(`range`);let n=e.fixInfo,r={};if(n){X.isObject(n)||p(`fixInfo`),n.lineNumber!==void 0&&((!X.isNumber(n.lineNumber)||n.lineNumber<1||n.lineNumber>T.length)&&p(`fixInfo.lineNumber`),r.lineNumber=n.lineNumber+h.length);let t=n.lineNumber||e.lineNumber;n.editColumn!==void 0&&((!X.isNumber(n.editColumn)||n.editColumn<1||n.editColumn>T[t-1].length+1)&&p(`fixInfo.editColumn`),r.editColumn=n.editColumn),n.deleteCount!==void 0&&((!X.isNumber(n.deleteCount)||n.deleteCount<-1||n.deleteCount>T[t-1].length)&&p(`fixInfo.deleteCount`),r.deleteCount=n.deleteCount),n.insertText!==void 0&&(X.isString(n.insertText)||p(`fixInfo.insertText`),r.insertText=n.insertText)}let i=e.information||s.information;o.push({lineNumber:t,ruleNames:s.names,ruleDescription:s.description,ruleInformation:i?i.href:null,errorDetail:e.detail?.replace(X.newLineRe,` `)||null,errorContext:e.context?.replace(X.newLineRe,` `)||null,errorRange:e.range?[...e.range]:null,fixInfo:n?r:null,severity:y.get(c)})}let v=e=>m({lineNumber:1,detail:`This rule threw an exception: ${e.message||e}`}),b=()=>s.function(f,m);if(s.asynchronous){let e=Promise.resolve().then(b);return l?e.catch(v):e}try{b()}catch(e){if(l)v(e);else throw e}return null},c=()=>(o.sort((e,t)=>e.ruleNames[0].localeCompare(t.ruleNames[0])||e.lineNumber-t.lineNumber),o),u=v.filter(e=>e.asynchronous),d=v.filter(e=>!e.asynchronous),m=[...u,...d],b=()=>f(null,c());try{let e=m.map(s);u.length>0?Promise.all(e.slice(0,u.length)).then(b).catch(p):b()}catch(e){p(e)}finally{OB()}};!b||d?E(b?(0,FB.requireMarkdownItCjs)().getMarkdownItTokens(a(),w,T):[]):Promise.all([import(`./markdownit-C8k7jh2Z.mjs`).then(e=>t(e.default,1)),new Promise(e=>e(a()))]).then(([e,t])=>{E(e.getMarkdownItTokens(t,w,T))}).catch(p)}function oW(e,t,n,r,i,a,o,s,c,l,u,d){function f(l,f){return l?d(l):aW(e,t,n,f,r,i,a,o,s,c,u,d)}u?f(null,l.readFileSync(n,`utf8`)):l.readFile(n,`utf8`,f)}function sW(e,t,n){e||={},n||=()=>{};let r=[e.customRules||[]].flat().map(e=>({names:X.cloneIfArray(e.names),description:e.description,information:X.cloneIfUrl(e.information),tags:X.cloneIfArray(e.tags),parser:e.parser,asynchronous:e.asynchronous,function:e.function})),i=QU.concat(r),a=eW(i,t);if(a){n(a);return}let o=[];Array.isArray(e.files)?o=[...e.files]:e.files&&(o=[String(e.files)]);let s=e.strings||{},c=Object.keys(s),l=e.config||{default:!0},u=e.configParsers||void 0,d=e.frontMatter===void 0?X.frontMatterRe:e.frontMatter,f=!!e.handleRuleFailures,p=!!e.noInlineConfig,m=e.markdownItFactory||(()=>{throw Error(`The option 'markdownItFactory' was required (due to the option 'customRules' including a rule requiring the 'markdown-it' parser), but 'markdownItFactory' was not set.`)}),h=e.fs||CB,g=nW(i),_={},v=!1,y=0;function b(){let e;function r(r,i){return y--,r?(v=!0,n(r)):(_[e]=i,t||b(),null)}if(!v){if(e=o.shift())y++,oW(i,g,e,m,l,u,d,f,p,h,t,r);else if(e=c.shift())y++,aW(i,g,e,s[e]||``,m,l,u,d,f,p,t,r);else if(y===0){v=!0;let e=Object.entries(_);e.sort(([e],[t])=>e.localeCompare(t));let t=Object.fromEntries(e);return n(null,t)}}return null}if(t)for(;!v;)b();else b(),b(),b(),b(),b(),b(),b(),b()}function cW(e){let t=null;return sW(e,!0,function(e,n){if(e)throw e;t=n}),t}function lW(e,t=0){return{lineNumber:e.lineNumber||t,editColumn:e.editColumn||1,deleteCount:e.deleteCount||0,insertText:e.insertText||``}}function uW(e,t,n=`
269
- `){let{editColumn:r,deleteCount:i,insertText:a}=lW(t),o=r-1;return i===-1?null:e.slice(0,o)+a.replace(/\n/g,n)+e.slice(o+i)}function dW(e,t){let n=X.getPreferredLineEnding(e,wB),r=e.split(X.newLineRe),i=t.filter(e=>e.fixInfo).map(e=>lW(e.fixInfo,e.lineNumber));i.sort((e,t)=>{let n=e.deleteCount===-1,r=t.deleteCount===-1;return t.lineNumber-e.lineNumber||(n?1:r?-1:0)||t.editColumn-e.editColumn||t.insertText.length-e.insertText.length});let a={};i=i.filter(e=>{let t=e.lineNumber!==a.lineNumber||e.editColumn!==a.editColumn||e.deleteCount!==a.deleteCount||e.insertText!==a.insertText;return a=e,t}),a={lineNumber:-1};for(let e of i)e.lineNumber===a.lineNumber&&e.editColumn===a.editColumn&&!e.insertText&&e.deleteCount>0&&a.insertText&&!a.deleteCount&&(e.insertText=a.insertText,a.lineNumber=0),a=e;i=i.filter(e=>e.lineNumber);let o=-1,s=-1;for(let e of i){let{lineNumber:t,editColumn:i,deleteCount:a}=e,c=t-1,l=i-1;(c!==o||a===-1||l+a<=s-(a>0?0:1))&&(r[c]=uW(r[c],e,n)),o=c,s=l}return r.filter(e=>e!==null).join(n)}function fW(e,t){return dW(e,cW({strings:{doc:e},config:t}).doc??[])}function pW(e,t){let n=cW({strings:{doc:e},config:t}).doc??[],r=e.split(`
270
- `),i=mW(t);return n.map(e=>gW(e,r,hW(e,i)))}function mW(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function hW(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function gW(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[_W(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function _W(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}const vW=ie([p(),c([`error`,`warning`]),v(T(),y())]),yW=[{id:`markdownlint`,sliceSchema:g({enabled:p(),rules:v(T(),vW)}),defaultSlice:{enabled:!1,rules:xB},async lint(e,t){return pW(e,SB(t.rules))},fix(e,t){return fW(e,SB(t.rules))}}],bW={enabled:!0,plugins:Object.fromEntries(yW.map(e=>[e.id,e.defaultSlice]))};function xW(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??xB}}}}const SW=Object.fromEntries(yW.map(e=>[e.id,e.sliceSchema])),CW=g({effective:g({enabled:p(),plugins:g(SW)}),configFile:T().nullable().optional(),configProblems:m(T()).optional()}),wW=ie([p(),v(T(),y())]),TW=g({ruleId:T().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:ie([wW,D()])}),EW=g({line:S(),character:S()}),DW=g({start:EW,end:EW}),OW=g({range:DW,severity:c([`error`,`warning`,`info`,`hint`]),source:T(),code:T(),message:T(),fixes:m(g({range:DW,newText:T()})).optional()}),kW=g({file:T(),diagnostics:m(OW)}),AW=g({files:m(kW),fileCount:S(),errorCount:S(),warningCount:S(),warnings:m(T())}),jW=g({docName:ny,summary:ay,...iy}).loose(),MW=g({file:T(),fixedCount:S(),diagnostics:m(OW),errorCount:S(),warningCount:S(),warning:T().optional()}),NW=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],PW=(()=>{let e=new Map;for(let t of NW){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function FW(e){return PW.get(e.toUpperCase())??null}function IW(e,t){let n=FW(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))FW(t)===n&&(r={key:t,value:i});return r}async function LW(e,t,n){if(!t.enabled)return[];let r=[];for(let i of yW){let a=t.plugins[i.id];a.enabled&&r.push(...await i.lint(e,a,{docName:n}))}return r}function RW(e,t){if(!t.enabled)return e;let n=e;for(let e of yW){let r=t.plugins[e.id];!r.enabled||!e.fix||(n=e.fix(n,r))}return n}const zW=/\p{M}+/gu,BW=/[^\p{L}\p{N}]+/gu,VW=/^-+|-+$/g;function HW(e){return e.trim().normalize(`NFKD`).replace(zW,``).toLowerCase().replace(BW,`-`).replace(VW,``)}function UW(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function WW(e,t){let n=HW(e);return n?UW(n,t):``}const GW=new Set([`img`,`video`,`audio`,`mark`]);new Map(vN.flatMap(e=>e.surface===`compat`&&GW.has(e.rendersAs)?[[e.name,e]]:[])),sk(`<>`);const KW=IR(),qW=eR(),JW=tR();function YW(){return vN.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function XW(){return YW().filter(e=>ZW(e)!==`fence`)}function ZW(e){return e.name===`MermaidFence`?`fence`:e.hasChildren?`jsx-block`:`jsx-void`}function QW(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:ZW(e)}}function $W(e){if(e.hidden!==!0&&e.type!==`reactnode`){if(`defaultValue`in e&&e.defaultValue!==void 0)return e.defaultValue;if(e.type===`enum`)return e.enumValues[0];if(e.type===`string`)return``;if(e.type===`number`)return 0;if(e.type===`boolean`)return!1}}function eG(e,t){return!(e.omitOnDefault===!0&&`defaultValue`in e&&Object.is(e.defaultValue,t)||e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&t===``)}function tG(e){let t=[];for(let n of e.props){let e=$W(n);e!==void 0&&eG(n,e)&&t.push(jM(n.name,e))}return t}function nG(e){return aF(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[KW],mdastExtensions:[qW]}).children}function rG(e){let t=ZW(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
271
- A --> B`};else{let r=tG(e),i=t===`jsx-block`?nG(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return cO({type:`root`,children:[n]},{extensions:[JW]}).trimEnd()}function iG(e){let t=[];for(let n of e.props){if(n.hidden===!0)continue;let e={name:n.name,type:n.type,required:n.required};n.description!==void 0&&(e.description=n.description),n.advanced===!0&&(e.advanced=!0),n.omitOnDefault===!0&&(e.omitOnDefault=!0),n.type===`enum`&&(e.values=n.enumValues,n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue)),n.type===`string`&&(n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.language!==void 0&&(e.language=n.language),n.accept!==void 0&&(e.accept=n.accept)),n.type===`boolean`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.type===`number`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),t.push(e)}return t}function aG(e){return{...QW(e),example:rG(e),params:iG(e)}}function oG(){return[``,"**Custom canonical components.** OK `.md` / `.mdx` supports the JSX components below — use whichever is semantically useful in any part of the doc. For full source syntax + parameter schemas, call `palette({ components: [ids] })` with the ids you want to use. Fenced code blocks render naturally and don't need a fetch — including ` ```mermaid ` for diagrams (mermaid label text has sharp edges — `palette({ components: [\"Mermaid\"] })` lists them; parse failures come back as `warnings` entries on write/edit) and ` ```html preview ` for interactive HTML/JS/CSS pages (the fence info-string `preview` token renders the block as a live iframe; works for `html` / `htm` / `xml`; optional `h=` / `w=` tokens set size, e.g. ` ```html preview h=400px `). Use ` ```html preview ` whenever you want anything interactive or JS-powered (charts, demos, calculators, animations) — just author the standalone HTML page in the fence. Call `palette` for the markdown-native component forms (write `> [!NOTE]`, not `<Callout>`), copy-ready themed `html preview` starters, and the theme tokens (`var(--chart-1)`, `var(--foreground)`, …) an embed should reference so it tracks the reader's light/dark theme. Arbitrary `<TagName>` JSX falls through as raw MDX when no canonical fits.",``,...XW().map(QW).map(e=>`- \`${e.id}\` (${e.kind}) — ${e.description}`)].join(`
272
- `)}const sG=[`text`,`number`,`boolean`,`date`,`list`,`object`];c(sG);const cG=ie([T(),S(),p()]),lG=re(()=>ie([cG.transform(e=>String(e)),v(T(),uG),m(lG)])),uG=re(()=>ie([T(),S(),p(),m(lG),v(T(),uG)]));function dG(e){if(Array.isArray(e)){let t=[];for(let n of e)n!==null&&t.push(dG(n));return t}if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=r===null?``:dG(r);return t}return e}const fG=ne(dG,v(T(),uG));v(T(),ie([uG,D()]));function pG(e){return!!(e===null||typeof e==`string`&&e===``||Array.isArray(e)&&e.length===0)}const mG=g({docName:ny,summary:ay,content:T().optional(),...iy}).loose(),hG=g({docName:ny,summary:ay,markdown:T(),position:c([`append`,`prepend`,`replace`]).optional(),extension:c(Ye).optional(),...iy}).loose(),gG=g({docName:ny,summary:ay,find:T().min(1),replace:T(),offset:S().int().nonnegative().optional(),...iy}).loose(),_G=g({docName:ny,connectionId:T().min(1),scope:c([`last`,`session`,`file`,`count`]).optional(),count:S().int().positive().optional(),...iy}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]}),vG=g({value:T(),truncatedFrom:S().int().nonnegative().optional(),hint:T().optional()}).loose(),yG=d(`kind`,[g({kind:E(`inline`),content:T()}),g({kind:E(`truncated`),byteLength:S().int().nonnegative(),hint:T()})]),bG=g({kind:E(`content-divergence`),intendedBytes:S().int().nonnegative(),actualBytes:S().int().nonnegative(),byteDelta:S().int(),divergenceType:T().optional(),currentState:yG.optional(),hint:T().optional()}).loose(),xG=g({type:E(`orphan`),parentCandidates:m(T()),message:T()}).loose(),SG=g({kind:E(`disk-edit-reconciled`),intendedBytes:S().int().nonnegative(),actualBytes:S().int().nonnegative(),byteDelta:S().int(),mergeOutcome:T().optional(),hint:T().optional()}).loose(),CG=d(`kind`,[bG,SG]),wG=d(`kind`,[bG,SG,g({kind:E(`mermaid-parse-error`),fenceIndex:S().int().positive(),fenceFirstLine:T(),message:T(),line:S().int().positive().optional()}).loose(),g({kind:E(`lint-violation`),source:T(),code:T(),message:T(),severity:c([`error`,`warning`,`info`,`hint`]),line:S().int().positive(),column:S().int().positive()}).loose()]),TG=m(wG).min(1),EG=g({href:T(),resolvedTo:T().nullable(),reason:c([`no-such-doc`,`no-such-file`,`unresolvable`])}).loose(),DG=m(EG),OG=g({timestamp:T().min(1),summary:vG.optional(),warning:CG.optional(),warnings:TG.optional()}).loose(),kG=g({timestamp:T().min(1),subscriberCount:S().int().nonnegative(),systemSubscriberCount:S().int().nonnegative(),hints:m(xG).optional(),summary:vG.optional(),warning:CG.optional(),warnings:TG.optional(),brokenLinks:DG}).loose(),AG=g({timestamp:T().min(1),subscriberCount:S().int().nonnegative(),systemSubscriberCount:S().int().nonnegative(),summary:vG.optional(),warning:CG.optional(),warnings:TG.optional(),brokenLinks:DG}).loose(),jG=g({docName:T().min(1),scope:c([`last`,`session`,`count`]),undone:p()}).loose(),MG=g({docs:m(g({docName:ry,markdown:T(),position:c([`append`,`prepend`,`replace`]).optional(),extension:c(Ye).optional(),summary:ay}).loose()).min(1).max(100),...iy}).loose(),NG=g({type:Vy,title:T(),detail:T().optional()}).loose(),PG=d(`status`,[g({status:E(`written`),docName:T().min(1),summary:vG.optional(),warnings:TG.optional(),brokenLinks:DG}).loose(),g({status:E(`error`),docName:T().min(1),error:NG}).loose()]),FG=g({timestamp:T().min(1),results:m(PG),written:S().int().nonnegative(),failed:S().int().nonnegative()}).loose(),IG=g({docName:ny,patch:v(T(),ie([uG,D()])),types:v(T(),c(sG)).optional(),summary:ay,...iy}).loose(),LG=g({timestamp:T().min(1),subscriberCount:S().int().nonnegative(),systemSubscriberCount:S().int().nonnegative(),appliedKeys:m(T()),summary:vG.optional(),warning:CG.optional(),warnings:TG.optional(),brokenLinks:DG}).loose(),RG=g({entries:m(g({level:c([`info`,`warn`,`error`]),message:T().max(8192),event:T().optional(),fields:v(T(),y()).optional(),ts:S().optional(),sourceId:T().optional(),lineNumber:S().optional()}).loose()).max(100),droppedSinceLastFlush:S().int().min(0).optional()}).loose(),zG=g({accepted:S().int().min(0)}).loose(),BG=g({status:T().min(1),reason:T()}).loose(),VG=g({docName:T().min(1),content:T(),lifecycle:BG.nullable()}).loose(),HG=g({documents:m(g({kind:c([`document`,`asset`,`folder`,`file`]).default(`document`),docName:T().min(1).optional(),docExt:T().min(1).default(`.md`),size:S().int().nonnegative(),modified:T().min(1),isSymlink:p().default(!1),canonicalDocName:T().nullable().default(null),targetPath:T().nullable().default(null),path:T().min(1).optional(),assetExt:T().min(1).optional(),mediaKind:c([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`]).nullable().optional(),referencedBy:m(T().min(1)).optional(),hasChildren:p().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`})),truncated:p().optional()}).loose(),UG=g({source:T().min(1),anchor:T().nullable(),title:T(),snippet:T().nullable()}).loose(),WG=g({docName:T().min(1),backlinks:m(UG)}).loose(),GG=g({counts:v(T().min(1),S().int().nonnegative())}).loose(),KG=d(`kind`,[g({kind:E(`doc`),docName:T().min(1),anchor:T().nullable(),title:T(),snippet:T().nullable()}).loose(),g({kind:E(`external`),url:T().min(1),title:T(),snippet:T().nullable()}).loose()]),qG=g({docName:T().min(1),forwardLinks:m(KG)}).loose(),JG=d(`kind`,[g({id:T().min(1),kind:E(`doc`),docName:T().min(1),anchor:T().nullable(),label:T(),cluster:T().nullable(),category:T().nullable(),tags:m(T()).nullable()}).loose(),g({id:T().min(1),kind:E(`external`),url:T().min(1),label:T()}).loose()]),YG=g({source:T().min(1),target:T().min(1)}).loose(),XG=g({nodes:m(JG),links:m(YG)}).loose(),ZG=g({ts:S().int().min(0),url:T(),method:T(),ua:T().optional(),origin:T().optional(),referer:T().optional(),host:T().optional(),remote:T().optional(),secChUa:T().optional(),secChUaMobile:T().optional(),secChUaPlatform:T().optional(),secFetchSite:T().optional(),secFetchDest:T().optional(),secFetchMode:T().optional(),secFetchUser:T().optional()}).loose(),QG=g({app:ie([E(`cursor`),E(`codex`),E(`claude`),D()]),signals_fired:m(T())}).loose(),$G=g({entries:m(ZG),count:S().int().min(0),detection:QG}).loose(),eK=g({writers:m(g({id:T().min(1),name:T().optional(),email:T().optional()}).loose()).optional(),summary:ay,...iy}).loose(),tK=g({checkpointRef:T().min(1)}).loose(),nK=g({v:S().int().optional(),id:T().min(1),name:T().min(1),colorSeed:T().optional(),docs:m(T()),summaries:m(T()).optional()}).loose(),rK=g({entries:m(g({sha:T().min(1),timestamp:T().min(1),author:T(),authorEmail:T(),type:c([`checkpoint`,`wip`,`upstream`,`park`]),message:T(),contributors:m(nK),checkpoint:y().nullable(),parentSha:T().nullable().optional()}).loose()),total:S().int().nonnegative().optional(),truncated:p().optional(),hasMore:p().optional()}).loose(),iK=g({sha:T().regex(/^[0-9a-f]{40}$/i),content:T(),timestamp:T(),author:T()}).loose(),aK=g({contentDir:T().min(1),pathSeparator:c([`/`,`\\`]),symlinkResolved:p()}).loose(),oK=m(d(`source`,[g({docName:T().min(1),timestamp:T().min(1),size:S().int().nonnegative(),source:E(`flat`)}).loose(),g({docName:T().min(1),timestamp:T().min(1),source:E(`timeline`),sha:T().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),sK=g({domain:T().min(1),title:T().optional(),description:T().optional(),siteName:T().optional(),faviconDataUri:T().optional()}).loose(),cK=g({url:T()}).loose(),lK=d(`ok`,[g({ok:E(!0),metadata:sK}).loose(),g({ok:E(!1),reason:T()}).loose()]),uK=g({orphans:m(g({docName:T().min(1),title:T()}).loose())}).loose(),dK=g({hubs:m(g({docName:T().min(1),title:T(),count:S().int().nonnegative()}).loose())}).loose(),fK=g({source:T().min(1),title:T(),snippet:T().nullable()}).loose(),pK=g({deadLinks:m(g({target:T().min(1),sources:m(fK)}).loose())}).loose(),mK=g({target:g({docName:T().min(1),title:T(),aliases:m(T())}).loose(),mentions:m(g({source:T().min(1),excerpt:T(),offset:S().int().nonnegative()}).loose()),truncated:p()}).loose(),hK=g({projectPath:T().min(1)}).loose(),gK=c([`not-a-git-worktree`,`init-failed`]),_K=d(`ok`,[g({ok:E(!0),projectPath:T().min(1)}).loose(),g({ok:E(!1),reason:gK,message:T().min(1)}).loose()]),vK=g({host:T().min(1).optional()}).loose(),yK=g({host:T().min(1).optional(),token:T().min(1)}).loose(),bK=g({host:T(),login:T()}).loose(),xK=g({key:T().min(1)}).loose(),SK=g({keyPresent:p()}).loose(),CK=g({name:T().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:T().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),wK=g({authenticated:p()}).loose(),TK=g({}).loose(),EK=g({stackIndex:S().int().min(0),ts:S().int().min(0),additions:S().int().min(0),deletions:S().int().min(0)}).loose(),DK=g({docName:T().min(1),additionsTotal:S().int().min(0),deletionsTotal:S().int().min(0),lastTs:S().int().min(0),bursts:m(EK)}).loose(),OK=g({displayName:T().min(1),color:T().min(1),icon:T().optional(),connectionId:T().min(1)}).loose(),kK=g({sessionAlive:p(),agent:OK.nullable(),files:m(DK)}).loose(),AK=g({diff:T(),before:T(),after:T(),generatedAt:S().int().min(0)}).loose(),jK=g({}).loose(),MK=g({}).loose(),NK=g({}).loose(),PK=g({}).loose(),FK=g({}).loose(),IK=g({}).loose(),LK=g({displayName:T().min(1),icon:T(),color:T().min(1),currentDoc:T().nullable(),mode:c([`idle`,`writing`]),ts:S().int().min(0)}).loose(),RK=g({presence:v(T().min(1),LK)}).loose(),zK=g({sessionId:T().min(1),agentType:T().min(1),ts:S().int().min(0),insertedChars:S().int().min(0),deletedChars:S().int().min(0)}).loose(),BK=g({effects:m(g({"doc.name":T().min(1),entries:m(zK)}).loose())}).loose(),VK=g({decisions:m(g({ts:S().int().min(0),decision:T().min(1),kind:T().min(1),"doc.name":T().min(1),pathRole:T().min(1)}).loose())}).loose(),HK=v(T().min(1),p()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});g({path:T().min(1,`path must be non-empty`)}).loose();const UK=g({}).loose(),WK=g({fromDocName:T().min(1),toDocName:T().min(1)}).loose(),GK=g({fromPath:T().min(1),toPath:T().min(1)}).loose(),KK=g({}).loose(),qK=g({path:T().min(1),...iy,summary:ay}).loose(),JK=g({docName:T().min(1)}).loose(),YK=g({path:T().min(1),...iy,summary:ay}).loose(),XK=g({path:T().min(1)}).loose(),ZK=g({kind:c([`file`,`folder`]),path:T().min(1),...iy,summary:ay}).loose(),QK=g({kind:c([`file`,`folder`]),path:T().min(1),duplicatedDocNames:m(T().min(1))}).loose(),$K=g({pages:m(g({docName:T().min(1),title:T(),docExt:T().min(1),size:S().int().nonnegative(),modified:T().min(1),icon:T().min(1).max(2048).optional()}).loose())}).loose(),eq=g({level:S().int().min(1).max(6),text:T(),slug:T()}).loose(),tq=g({docName:T().min(1),headings:m(eq)}).loose(),nq=g({docName:T().min(1),rewrites:S().int().nonnegative()}).loose(),rq=g({kind:c([`file`,`folder`,`asset`]),fromPath:T().min(1),toPath:T().min(1),...iy,summary:ay}).loose(),iq=g({renamed:m(WK),renamedAssets:m(GK),rewrittenDocs:m(nq).optional(),summary:vG.optional()}).loose(),aq=g({kind:c([`file`,`folder`,`asset`]),path:T().min(1),...iy}).loose(),oq=g({deletedDocNames:m(T().min(1))}).loose(),sq=g({kind:c([`file`,`folder`,`asset`]),path:T().min(1),...iy,summary:ay}).loose(),cq=g({deletedDocNames:m(T().min(1))}).loose(),lq=g({docName:T().min(1),commitSha:T().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:ay,...iy}).loose(),uq=g({restoredFrom:T().min(1),timestamp:T().min(1),summary:vG.optional(),warning:bG.optional(),warnings:TG.optional()}).loose(),dq=c([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),fq=g({label:T().min(1),webUrl:b().nullable()}).loose(),pq=d(`checkStatus`,[g({checkStatus:E(`allowed`)}).loose(),g({checkStatus:E(`denied`),deniedReason:c([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`])}).loose(),g({checkStatus:E(`unknown`),unknownError:c([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),mq=c([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]),hq=g({state:dq,lastSyncUtc:T().nullable(),lastFetchUtc:T().nullable(),lastPushedSha:T().nullable(),ahead:S().int().min(0),behind:S().int().min(0),consecutiveFailures:S().int().min(0),conflictCount:S().int().min(0),hasRemote:p(),syncEnabled:p(),identityUnresolved:p(),remote:fq.nullable().optional(),pushError:T().optional(),pushErrorCode:mq.optional(),pullError:T().optional(),pullErrorCode:mq.optional(),pausedReason:T().optional(),pushPermission:pq.optional()}).loose(),gq=g({op:c([`sync`,`push`,`pull`]).optional()}).loose(),_q=g({op:c([`sync`,`push`,`pull`])}).loose(),vq=g({conflicts:m(g({file:T().min(1),detectedAt:T().min(1),oursSha:T().optional(),theirsSha:T().optional(),baseSha:T().optional()}).loose())}).loose(),yq=g({file:T().min(1),strategy:c([`mine`,`theirs`,`content`,`delete`]),content:T().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),bq=g({}).loose(),xq=g({file:T().min(1),base:T(),ours:T(),theirs:T(),kind:c([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:T().nullable()}).loose(),Sq=g({plan:h(e=>e!==void 0,{message:`plan is required`})}).loose(),Cq=g({plan:h(e=>e!==void 0,{message:`plan is required`})}).loose(),wq=g({result:h(e=>e!==void 0,{message:`result is required`})}).loose(),Tq=g({path:T().min(1),summary:T().min(1)}).loose(),Eq=g({files:S().int().nonnegative(),folders:S().int().nonnegative()}).loose(),Dq=g({packs:m(g({id:T().min(1),name:T().min(1),description:T().min(1),defaultSubfolder:T().optional(),folders:m(Tq),entryCounts:Eq}).loose())}).loose(),Oq=g({noOpen:p().optional(),out:T().min(1).optional()}).loose(),kq=g({reason:c([`unsupported-platform`,`spawn-error`]),message:T()}).loose(),Aq=d(`status`,[g({status:E(`installed`),outputPath:T(),size:S().int().nonnegative(),sha256:T(),skillVersion:T()}).loose(),g({status:E(`built`),outputPath:T(),size:S().int().nonnegative(),sha256:T(),skillVersion:T(),handoffError:kq.optional()}).loose(),g({status:E(`failed`),buildError:T()}).loose(),g({status:E(`skip-current`),skillVersion:T(),recordedAt:T().optional()}).loose()]),jq=[`.ok`,`skill-targets.json`],Mq=c(tt),Nq=te({schema:E(1),targets:m(Mq).default([])});function Pq(e){let t;try{t=JSON.parse(e)}catch{return null}let n=Nq.safeParse(t);return n.success?n.data:null}const Fq=g({tags:m(g({name:T().min(1),count:S().int().nonnegative(),isLeaf:p()}).loose())}).loose(),Iq=g({docName:T().min(1),title:T(),matchingTags:m(T().min(1)),snippet:T().nullable()}).loose(),Lq=g({name:T().min(1),docs:m(Iq)}).loose(),Rq=g({folder:y(),frontmatter_local:v(T(),y()).nullable()}).loose(),zq=g({path:T(),frontmatter:v(T(),y()).optional()}).loose(),Bq=g({applied:y()}).loose(),Vq=v(T(),y()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Hq=g({template:g({name:T().min(1),folder:T(),scope:c([`local`,`inherited`]),path:T().min(1),frontmatter:Vq,body:T()}).strict()}).strict(),Uq=g({templates:m(g({name:T().min(1),title:T().optional(),description:T().optional(),path:T().min(1),source_folder:T()}).strict()),truncated:p()}).strict(),Wq=g({folder:T(),name:T(),body:T().optional(),frontmatter:Vq.optional(),...iy,summary:ay}).strict(),Gq=g({path:T().min(1),created:p(),warnings:m(T())}).strict(),Kq=g({sourcePath:T().min(1),targetFolder:T(),name:T().optional(),title:T().optional(),deleteSource:p().optional(),...iy,summary:ay}).strict(),qq=g({path:T().min(1),created:p(),warnings:m(T())}).strict(),Jq=g({existed:p(),path:T().min(1)}).strict(),Yq=g({fromFolder:T(),fromName:T(),toFolder:T(),toName:T(),body:T().optional(),frontmatter:Vq.optional(),...iy,summary:ay}).strict(),Xq=g({from:T().min(1),to:T().min(1),committed:p()}).strict(),Zq=c(Pe),Qq=/^[a-z0-9-]+$/,$q=/<\/?[A-Za-z][^>]*>/;function eJ(e){return $q.test(e)}const tJ=/^[A-Za-z0-9_-]+$/,nJ=g({name:T(),description:T()}).strict(),rJ=g({skill:g({name:T().min(1),scope:Zq,path:T().min(1),frontmatter:nJ,body:T(),files:m(g({path:T().min(1),text:T().nullable()})).optional(),managed:p().optional()}).strict()}).strict(),iJ=g({skills:m(g({name:T().min(1),description:T().optional(),scope:Zq,path:T().min(1),absolutePath:T().min(1).optional(),installed:p(),hosts:m(T()),installedVersion:T().optional(),bundledVersion:T().optional(),updateAvailable:p().optional(),managed:p().optional()}).strict()),truncated:p()}).strict(),aJ=g({scope:Zq.default(`project`),name:T(),body:T().optional(),frontmatter:nJ,...iy,summary:ay}).strict(),oJ=g({path:T().min(1),created:p(),warnings:m(T())}).strict(),sJ=g({scope:Zq.default(`project`),name:T(),...iy,summary:ay}).strict(),cJ=g({name:T().min(1),version:T().min(1),previousVersion:T().optional(),checkpointRef:T().optional()}).strict(),lJ=g({existed:p(),path:T().min(1)}).strict(),uJ=g({scope:Zq.default(`project`),fromName:T(),toName:T(),body:T().optional(),frontmatter:nJ.optional(),...iy,summary:ay}).strict(),dJ=g({from:T().min(1),to:T().min(1),committed:p()}).strict(),fJ=c([`reference`,`script`]),pJ=g({scope:Zq.default(`project`),name:T(),path:T().min(1),content:T(),...iy,summary:ay}).strict(),mJ=g({path:T().min(1),created:p(),kind:fJ,content:p()}).strict(),hJ=g({path:T().min(1),kind:fJ,text:T()}).strict(),gJ=g({path:T().min(1),existed:p(),kind:fJ}).strict(),_J=g({scope:Zq.default(`project`),name:T(),targets:m(Mq).optional().meta({description:`Explicit editor ids to install into; omit to use project-configured editors.`}),...iy,summary:ay}).strict(),vJ=g({name:T().min(1),hosts:m(T()),scripts:p(),warnings:m(T()),warningCodes:m(c([`no-targets`,`scripts-present`]))}).strict(),yJ=g({scope:Zq.default(`project`),name:T()}).strict(),bJ=g({name:T().min(1),uninstalled:p()}).strict(),xJ=g({targets:m(Mq),configured:p()}).strict(),SJ=g({targets:m(Mq)}).strict(),CJ=g({targets:m(Mq),reprojected:m(g({name:T(),hosts:m(T())}).strict()),bundleHosts:m(T()),removedFrom:m(T())}).strict(),wJ=g({scope:Zq.default(`project`),name:T(),version:T().regex(/^[0-9a-f]{40}$/i),...iy,summary:ay}).strict(),TJ=g({name:T().min(1),version:T(),restoredFiles:m(T()),warnings:m(T())}).strict(),EJ=g({query:T().optional(),intent:c([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:c([`navigation`,`relevance`]).optional(),scopes:m(c([`page`,`folder`,`content`,`file`])).optional(),scope:T().optional(),limit:S().int().nonnegative().optional(),semantic:p().optional(),source:c([`omnibar`,`mcp`,`http`]).optional()}).loose(),DJ=g({kind:c([`page`,`folder`,`content`,`file`]),path:T().min(1),title:T(),score:S(),signals:v(T(),y()),snippet:T().optional()}).loose(),OJ=g({capable:p(),applied:p(),coverage:g({embedded:S().int().nonnegative(),total:S().int().nonnegative()})}).loose(),kJ=g({enabled:p(),keyPresent:p(),keySource:c([`file`,`env`]).nullable(),keyHint:T().nullable(),ready:p(),capable:p(),embedded:S().int().nonnegative(),total:S().int().nonnegative()}).loose(),AJ=g({query:T(),intent:c([`autocomplete`,`full_text`,`omnibar`]),results:m(DJ),elapsedMs:S().nonnegative(),semantic:OJ.optional(),truncated:p().optional(),ready:p().optional()}).loose(),jJ=g({version:T().min(1),recordedAt:T().min(1)}).loose(),MJ=g({currentVersion:T().min(1),targets:v(T(),jJ.nullable())}).loose(),NJ=`server-info`,PJ=`branch-switched`,FJ=`disk-ack`,IJ=`config-validation-rejected`,LJ=`config-ignore-nested-error`,RJ=c([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),zJ=g({v:E(1),ch:E(NJ),seq:S(),serverInstanceId:T().min(1),currentBranch:T().min(1).optional()}).loose(),BJ=g({v:E(1),ch:E(PJ),seq:S(),branch:T().min(1)}).loose(),VJ=g({v:E(1),ch:RJ,seq:S()}).loose(),HJ=g({v:E(1),ch:E(FJ),seq:S(),docName:T().min(1),sv:T().min(1)}).loose(),UJ=g({v:E(1),ch:E(IJ),seq:S(),docName:T().min(1),error:_}).loose(),WJ=g({v:E(1),ch:E(LJ),seq:S(),path:T().min(1),error:T().min(1)}).loose();function GJ(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function KJ(e){return e.reason!==void 0||GJ(e.note)!==void 0||GJ(e.email)!==void 0}function qJ(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function JJ(){return qJ((typeof process>`u`?void 0:GJ(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function YJ(e){let t=GJ(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function XJ(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function ZJ(e,t={}){let n=JJ();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=GJ(e.note),a=YJ(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return XJ(r,o,c());let l=await XJ(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:XJ(r,o,c())}var QJ=t(r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var ee=-b+v;ee<=b-y;ee+=2){for(var T=l+ee,E=ee==-b||ee!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,D=E-ee;E<o&&D<s&&e.charAt(o-E-1)==t.charAt(s-D-1);)E++,D++;if(f[T]=E,E>o)y+=2;else if(D>s)v+=2;else if(!h){var S=l+m-ee;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
265
+ `:`\r`,s}t.exports.getPreferredLineEnding=E;function ee(e,t){let n=t&&t.homedir&&t.homedir();return n?e.replace(/^~($|\/|\\)/,`${n}$1`):e}t.exports.expandTildePath=ee;function D(e){let t={ruleNames:[],lineNumber:-1};return e.filter((e,n,r)=>{delete e.fixInfo,delete e.severity;let i=r[n-1]||t;return e.ruleNames[0]!==i.ruleNames[0]||e.lineNumber!==i.lineNumber})}function te(e){for(let t of e)t.ruleName=t.ruleNames[0],t.ruleAlias=t.ruleNames[1]||t.ruleName,delete t.ruleNames;return e}function ne(e){let t={};for(let n of e){let e=n.ruleNames[0],r=t[e]||[];r.push(n.lineNumber),t[e]=r}return t}function re(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=t(i.map(e=>({...e})));return n}t.exports.convertToResultVersion0=function(e){return re(e,e=>ne(D(e)))},t.exports.convertToResultVersion1=function(e){return re(e,e=>te(D(e)))},t.exports.convertToResultVersion2=function(e){return re(e,D)},t.exports.formatLintResults=function(e){let t=[],n=Object.entries(e||{});n.sort((e,t)=>e[0].localeCompare(t[0]));for(let[e,r]of n)for(let n of r){let{lineNumber:r,ruleNames:i,ruleDescription:a,errorDetail:o,errorContext:s,errorRange:c,severity:l}=n,u=i.join(`/`),d=`:${r}`,f=c&&c[0]||0,p=f?`:${f}`:``,m=a,h=o?` [${o}]`:``,g=s?` [Context: "${s}"]`:``;t.push(`${e}${d}${p} ${l} ${u} ${m}${h}${g}`)}return t}}))(),1),Z=wB();const TB=new Map;let EB;function DB(e){TB.clear(),EB=e}function OB(){return EB?.parsers.micromark.tokens||[]}function kB(e,t){if(TB.has(e))return TB.get(e);let n=t();return TB.set(e,n),n}function Q(e,t){return kB(JSON.stringify(arguments),()=>(0,Z.filterByTypes)(OB(),e,t))}function AB(){return kB(AB.name,()=>(0,X.getReferenceLinkImageData)(OB()))}const jB=`0.41.1`;var MB=r(((e,t)=>{function n(){return ae()}t.exports={requireMarkdownItCjs:n}})),NB=r(((t,n)=>{let r=typeof __non_webpack_require__>`u`?e:__non_webpack_require__,i=(e,t,n=[])=>{let r=e.paths?.(``)||[];return e(t,{paths:[...n,...r]})};n.exports={resolveModule:(e,t)=>i(r.resolve,e,t),resolveModuleCustomResolve:i}})),PB=MB();NB();var FB={names:[`MD001`,`heading-increment`],description:`Heading levels should only increment by one level at a time`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=(0,X.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title)?1:2**53-1;for(let e of Q([`atxHeading`,`setextHeading`])){let r=(0,Z.getHeadingLevel)(e);r>n&&(0,X.addErrorDetailIf)(t,e.startLine,`h${n+1}`,`h${r}`),n=r}}},IB={names:[`MD003`,`heading-style`],description:`Heading style`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`);for(let e of Q([`atxHeading`,`setextHeading`])){let r=(0,Z.getHeadingStyle)(e);if(n===`consistent`&&(n=r),r!==n){let i=(0,Z.getHeadingLevel)(e)<=2;if(!(n===`setext_with_atx`&&(i&&r===`setext`||!i&&r===`atx`))&&!(n===`setext_with_atx_closed`&&(i&&r===`setext`||!i&&r===`atx_closed`))){let a=n;n===`setext_with_atx`?a=i?`setext`:`atx`:n===`setext_with_atx_closed`&&(a=i?`setext`:`atx_closed`),(0,X.addErrorDetailIf)(t,e.startLine,a,r)}}}}};const LB=e=>e===`-`?`dash`:e===`+`?`plus`:`asterisk`,RB=e=>e===`dash`?`-`:e===`plus`?`+`:`*`,zB=e=>e===`dash`?`plus`:e===`plus`?`asterisk`:`dash`,BB=new Set([`asterisk`,`consistent`,`dash`,`plus`,`sublist`]);var VB={names:[`MD004`,`ul-style`],description:`Unordered list style`,tags:[`bullet`,`ul`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`),r=BB.has(n)?n:`dash`,i=[];for(let e of Q([`listUnordered`])){let a=0;if(n===`sublist`){let t=e;for(;t=(0,Z.getParentOfType)(t,[`listOrdered`,`listUnordered`]);)a++}let o=(0,Z.getDescendantsByType)(e,[`listItemPrefix`,`listItemMarker`]);for(let e of o){let o=LB(e.text);n===`sublist`?(i[a]||(i[a]=o===i[a-1]?zB(o):o),r=i[a]):r===`consistent`&&(r=o);let s=e.startColumn,c=e.endColumn-e.startColumn;(0,X.addErrorDetailIf)(t,e.startLine,r,o,void 0,void 0,[s,c],{editColumn:s,deleteCount:c,insertText:RB(r)})}}}},HB={names:[`MD005`,`list-indent`],description:`Inconsistent indentation for list items at the same level`,tags:[`bullet`,`ul`,`indentation`],parser:`micromark`,function:function(e,t){for(let e of Q([`listOrdered`,`listUnordered`])){let n=e.startColumn-1,r=0,i=!1,a=e.children.filter(e=>e.type===`listItemPrefix`);for(let o of a){let a=o.startLine,s=o.startColumn-1,c=[1,o.endColumn-1];if(e.type===`listUnordered`)(0,X.addErrorDetailIf)(t,a,n,s,void 0,void 0,c);else{let e=o.text.trim().length,l=o.startColumn+e-1;if(r||=l,n!==s||i)if(r===l)i=!0;else{let o=i?`Expected: (${r}); Actual: (${l})`:`Expected: ${n}; Actual: ${s}`,u=i?r-e:n,d=i?l-e:s;(0,X.addError)(t,a,o,void 0,c,{editColumn:Math.min(d,u)+1,deleteCount:Math.max(d-u,0),insertText:``.padEnd(Math.max(u-d,0))})}}}}}};const UB=[`blockQuotePrefix`,`listItemPrefix`,`listUnordered`],WB=[`blockQuote`,`listOrdered`,`listUnordered`];var GB={names:[`MD007`,`ul-indent`],description:`Unordered list indentation`,tags:[`bullet`,`ul`,`indentation`],parser:`micromark`,function:function(e,t){let n=Number(e.config.indent||2),r=!!e.config.start_indented,i=Number(e.config.start_indent||n),a=new Map,o=null,s=Q(UB);for(let e of s){let{endColumn:s,parent:c,startColumn:l,startLine:u,type:d}=e;if(d===`blockQuotePrefix`)o=e;else if(d===`listUnordered`){let t=0,n=e;for(;n=(0,Z.getParentOfType)(n,WB);){if(n.type===`listUnordered`){t++;continue}else n.type===`listOrdered`&&(t=-1);break}t>=0&&a.set(e,t)}else{let d=a.get(c);if(d!==void 0){let a=((0,Z.getParentOfType)(e,[`gfmFootnoteDefinition`])?4:0)+(r?i:0)+d*n,c=o?.endLine===u?o.endColumn-1:0,f=l-1-c;(0,X.addErrorDetailIf)(t,u,a,f,void 0,void 0,[1,s-1],{editColumn:l-f,deleteCount:Math.max(f-a,0),insertText:``.padEnd(Math.max(a-f,0))})}}}}},KB={names:[`MD009`,`no-trailing-spaces`],description:`Trailing spaces`,tags:[`whitespace`],parser:`micromark`,function:function(e,t){let n=e.config.br_spaces;n=Number(n===void 0?2:n);let r=e.config.code_blocks,i=r===void 0?!1:!!r,a=!!e.config.list_item_empty_lines,o=!!e.config.strict,s=new Set;if(!i){for(let e of Q([`codeFenced`]))(0,Z.addRangeToSet)(s,e.startLine+1,e.endLine-1);for(let e of Q([`codeIndented`]))(0,Z.addRangeToSet)(s,e.startLine,e.endLine)}let c=new Set;if(a)for(let e of Q([`listOrdered`,`listUnordered`])){(0,Z.addRangeToSet)(c,e.startLine,e.endLine);let t=!0;for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];switch(r.type){case`content`:t=!1;break;case`listItemIndent`:t&&c.delete(r.startLine);break;case`listItemPrefix`:t=!0;break;default:break}}}let l=new Set,u=new Set;if(o){for(let e of Q([`paragraph`]))(0,Z.addRangeToSet)(l,e.startLine,e.endLine-1);for(let e of Q([`codeText`]))(0,Z.addRangeToSet)(u,e.startLine,e.endLine-1)}let d=n<2?0:n;for(let n=0;n<e.lines.length;n++){let r=e.lines[n],i=n+1,a=r.length-r.trimEnd().length;if(a&&!s.has(i)&&!c.has(i)&&(d!==a||o&&(!l.has(i)||u.has(i)))){let e=r.length-a+1;(0,X.addError)(t,i,`Expected: `+(d===0?``:`0 or `)+d+`; Actual: `+a,void 0,[e,a],{editColumn:e,deleteCount:a})}}}};const qB=/\t+/g;var JB={names:[`MD010`,`no-hard-tabs`],description:`Hard tabs`,tags:[`whitespace`,`hard_tab`],parser:`micromark`,function:function(e,t){let n=e.config.code_blocks,r=n===void 0?!0:!!n,i=new Set((e.config.ignore_code_languages||[]).map(e=>String(e).toLowerCase())),a=e.config.spaces_per_tab,o=a===void 0?1:Math.max(0,Number(a)),s=[];r?i.size>0&&s.push(`codeFenced`):s.push(`codeFenced`,`codeIndented`,`codeText`);let c=Q(s).filter(e=>e.type===`codeFenced`&&i.size>0?(0,Z.getDescendantsByType)(e,[`codeFencedFence`,`codeFencedFenceInfo`]).every(e=>i.has(e.text.toLowerCase())):!0).map(e=>{let{type:t,startLine:n,startColumn:r,endLine:i,endColumn:a}=e,o=t===`codeFenced`;return{startLine:n+ +!!o,startColumn:o?0:r,endLine:i-+!!o,endColumn:o?2**53-1:a}});for(let n=0;n<e.lines.length;n++){let r=e.lines[n],i=null;for(;(i=qB.exec(r))!==null;){let e=n+1,r=i.index+1,a=i[0].length,s={startLine:e,startColumn:r,endLine:e,endColumn:r+a-1};c.some(e=>(0,X.hasOverlap)(e,s))||(0,X.addError)(t,e,`Column: `+r,void 0,[r,a],{editColumn:r,deleteCount:a,insertText:``.padEnd(a*o)})}}}};const YB=/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)\](?!\()/g;var XB={names:[`MD011`,`no-reversed-links`],description:`Reversed link syntax`,tags:[`links`],parser:`micromark`,function:function(e,t){let n=new Set;for(let e of Q([`codeFenced`,`codeIndented`,`mathFlow`]))(0,Z.addRangeToSet)(n,e.startLine,e.endLine);let r=Q([`codeText`,`mathText`]);for(let[i,a]of e.lines.entries()){let e=i+1;if(!n.has(e)){let n=null;for(;(n=YB.exec(a))!==null;){let[i,a,o,s]=n;if(!o.endsWith(`\\`)&&!s.endsWith(`\\`)){let c=n.index+a.length+1,l=n[0].length-a.length,u={startLine:e,startColumn:c,endLine:e,endColumn:c+l-1};r.some(e=>(0,X.hasOverlap)(e,u))||(0,X.addError)(t,e,i.slice(a.length),void 0,[c,l],{editColumn:c,deleteCount:l,insertText:`[${o}](${s})`})}}}}}},ZB={names:[`MD012`,`no-multiple-blanks`],description:`Multiple consecutive blank lines`,tags:[`whitespace`,`blank_lines`],parser:`micromark`,function:function(e,t){let n=Number(e.config.maximum||1),{lines:r}=e,i=new Set;for(let e of Q([`codeFenced`,`codeIndented`]))(0,Z.addRangeToSet)(i,e.startLine,e.endLine);let a=0;for(let[e,o]of r.entries())a=i.has(e+1)||o.trim().length>0?0:a+1,n<a&&(0,X.addErrorDetailIf)(t,e+1,n,a,void 0,void 0,void 0,{deleteCount:-1})}};const QB=/^(?:[#>\s]*\s)?\S*$/;var $B={names:[`MD013`,`line-length`],description:`Line length`,tags:[`line_length`],parser:`micromark`,function:function(e,t){let n=Number(e.config.line_length||80),r=Number(e.config.heading_line_length||n),i=Number(e.config.code_block_line_length||n),a=!!e.config.strict,o=!!e.config.stern,s=e.config.code_blocks,c=s===void 0?!0:!!s,l=e.config.tables,u=l===void 0?!0:!!l,d=e.config.headings,f=d===void 0?!0:!!d,p=new Set;for(let e of Q([`atxHeading`,`setextHeading`]))(0,Z.addRangeToSet)(p,e.startLine,e.endLine);let m=new Set;for(let e of Q([`codeFenced`,`codeIndented`]))(0,Z.addRangeToSet)(m,e.startLine,e.endLine);let h=new Set;for(let e of Q([`table`]))(0,Z.addRangeToSet)(h,e.startLine,e.endLine);let g=new Set;for(let e of Q([`autolink`,`image`,`link`,`literalAutolink`]))(0,Z.addRangeToSet)(g,e.startLine,e.endLine);let _=new Set;for(let e of Q([`paragraph`]))for(let t of(0,Z.getDescendantsByType)(e,[`data`]))(0,Z.addRangeToSet)(_,t.startLine,t.endLine);let v=new Set;for(let e of g)_.has(e)||v.add(e);let y=new Set(AB().definitionLineIndices);for(let s=0;s<e.lines.length;s++){let l=e.lines[s],d=s+1,g=p.has(d),_=m.has(d),b=h.has(d),x=_?i:g?r:n,S=a||o?l:l.replace(/\S*$/u,`#`);x>0&&(c||!_)&&(u||!b)&&(f||!g)&&!y.has(s)&&(a||!(o&&QB.test(l))&&!v.has(d))&&S.length>x&&(0,X.addErrorDetailIf)(t,d,x,l.length,void 0,void 0,[x+1,l.length-x])}}};const eV=/^(\s*)(\$\s+)/;var tV={names:[`MD014`,`commands-show-output`],description:`Dollar signs used before commands without showing output`,tags:[`code`],parser:`micromark`,function:function(e,t){for(let e of Q([`codeFenced`,`codeIndented`])){let n=e.children.filter(e=>e.type===`codeFlowValue`),r=n.map(e=>({result:e.text.match(eV),startColumn:e.startColumn,startLine:e.startLine,text:e.text})).filter(e=>e.result);if(r.length===n.length)for(let e of r){let n=e.startColumn+e.result[1].length,r=e.result[2].length;(0,X.addErrorContext)(t,e.startLine,e.text,void 0,void 0,[n,r],{editColumn:n,deleteCount:r})}}}},nV={names:[`MD018`,`no-missing-space-atx`],description:`No space after hash on atx style heading`,tags:[`headings`,`atx`,`spaces`],parser:`micromark`,function:function(e,t){let{lines:n}=e,r=new Set;for(let e of Q([`codeFenced`,`codeIndented`,`htmlFlow`]))(0,Z.addRangeToSet)(r,e.startLine,e.endLine);for(let[e,i]of n.entries())if(!r.has(e+1)&&/^#+[^# \t]/.test(i)&&!/#\s*$/.test(i)&&!i.startsWith(`#️⃣`)){let n=/^#+/.exec(i)[0].length;(0,X.addErrorContext)(t,e+1,i.trim(),void 0,void 0,[1,n+1],{editColumn:n+1,insertText:` `})}}};function rV(e,t,n){let{children:r,startLine:i,text:a}=t,o=n>0?0:r.length-1;for(;r[o]&&r[o].type!==`atxHeadingSequence`;)o+=n;let s=r[o],c=r[o+n];if(s?.type===`atxHeadingSequence`&&c?.type===`whitespace`&&c.text.length>1){let t=c.startColumn+1,r=c.endColumn-t;(0,X.addErrorContext)(e,i,a.trim(),n>0,n<0,[t,r],{editColumn:t,deleteCount:r})}}var iV=[{names:[`MD019`,`no-multiple-space-atx`],description:`Multiple spaces after hash on atx style heading`,tags:[`headings`,`atx`,`spaces`],parser:`micromark`,function:function(e,t){let n=Q([`atxHeading`]).filter(e=>(0,Z.getHeadingStyle)(e)===`atx`);for(let e of n)rV(t,e,1)}},{names:[`MD021`,`no-multiple-space-closed-atx`],description:`Multiple spaces inside hashes on closed atx style heading`,tags:[`headings`,`atx_closed`,`spaces`],parser:`micromark`,function:function(e,t){let n=Q([`atxHeading`]).filter(e=>(0,Z.getHeadingStyle)(e)===`atx_closed`);for(let e of n)rV(t,e,1),rV(t,e,-1)}}],aV={names:[`MD020`,`no-missing-space-closed-atx`],description:`No space inside hashes on closed atx style heading`,tags:[`headings`,`atx_closed`,`spaces`],parser:`micromark`,function:function(e,t){let{lines:n}=e,r=new Set;for(let e of Q([`codeFenced`,`codeIndented`,`htmlFlow`]))(0,Z.addRangeToSet)(r,e.startLine,e.endLine);for(let[e,i]of n.entries())if(!r.has(e+1)){let n=/^(#+)([ \t]*)([^# \t\\]|[^# \t][^#]*?[^# \t\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(i);if(n){let[,r,{length:a},o,{length:s},c,l,{length:u}]=n,d=r.length,f=l.length,p=!a,m=!s||!!c,h=c?`${c} `:``;if(p||m){let n=p?[1,d+1]:[i.length-u-f,f+1];(0,X.addErrorContext)(t,e+1,i.trim(),p,m,n,{editColumn:1,deleteCount:i.length,insertText:`${r} ${o} ${h}${l}`})}}}}};const oV=e=>{if(Array.isArray(e)){let t=[,,,,,,].fill(1);for(let[n,r]of[...e.entries()].slice(0,6))t[n]=r;return e=>t[(0,Z.getHeadingLevel)(e)-1]}let t=e===void 0?1:Number(e);return()=>t},sV=(e,t,n,r)=>t>=0&&t<e.length?e[t]:r&&n.length>0&&t<0&&t>=-n.length?n[n.length+t]:``;var cV={names:[`MD022`,`blanks-around-headings`],description:`Headings should be surrounded by blank lines`,tags:[`headings`,`blank_lines`],parser:`micromark`,function:function(e,t){let n=oV(e.config.lines_above),r=oV(e.config.lines_below),i=!!e.config.include_front_matter,{lines:a,frontMatterLines:o}=e,s=Q([`blockQuotePrefix`,`linePrefix`]);for(let e of Q([`atxHeading`,`setextHeading`])){let{startLine:c,endLine:l}=e,u=a[c-1].trim(),d=n(e);if(d>=0){let e=0;for(let t=0;t<d&&(0,X.isBlankLine)(sV(a,c-2-t,o,i));t++)e++;(0,X.addErrorDetailIf)(t,c,d,e,`Above`,u,void 0,{insertText:(0,Z.getBlockQuotePrefixText)(s,c-1,d-e)})}let f=r(e);if(f>=0){let e=0;for(let t=0;t<f&&(0,X.isBlankLine)(sV(a,l+t,o,!1));t++)e++;(0,X.addErrorDetailIf)(t,c,f,e,`Below`,u,void 0,{lineNumber:l+1,insertText:(0,Z.getBlockQuotePrefixText)(s,l+1,f-e)})}}}},lV={names:[`MD023`,`heading-start-left`],description:`Headings must start at the beginning of the line`,tags:[`headings`,`spaces`],parser:`micromark`,function:function(e,t){let n=Q([`atxHeading`,`linePrefix`,`setextHeading`]);for(let r=0;r<n.length-1;r++)if(n[r].type===`linePrefix`&&n[r+1].type!==`linePrefix`&&n[r].startLine===n[r+1].startLine){let{endColumn:i,startColumn:a,startLine:o}=n[r],s=i-a;(0,X.addErrorContext)(t,o,e.lines[o-1],!0,!1,[a,s],{editColumn:a,deleteCount:s})}}},uV={names:[`MD024`,`no-duplicate-heading`],description:`Multiple headings with the same content`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=!!e.config.siblings_only,r=[null,[]],i=1,a=r[i];for(let e of Q([`atxHeading`,`setextHeading`])){let o=(0,Z.getHeadingText)(e);if(n){let t=(0,Z.getHeadingLevel)(e);for(;i<t;)i++,r[i]=[];for(;i>t;)r[i]=[],i--;a=r[t]}a.includes(o)?(0,X.addErrorContext)(t,e.startLine,o.trim()):a.push(o)}}},dV={names:[`MD025`,`single-title`,`single-h1`],description:`Multiple top-level headings in the same document`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=Number(e.config.level||1),{tokens:r}=e.parsers.micromark,i=Q([`atxHeading`,`setextHeading`]).filter(e=>n===(0,Z.getHeadingLevel)(e)&&!(0,Z.isDocfxTab)(e));if(i.length>0){let n=(0,X.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title),a=n;if(a||=r.slice(0,r.indexOf(i[0])).every(e=>Z.nonContentTokens.has(e.type)||(0,Z.isHtmlFlowComment)(e)),a)for(let e of i.slice(+!n))(0,X.addErrorContext)(t,e.startLine,(0,Z.getHeadingText)(e))}}},fV={names:[`MD026`,`no-trailing-punctuation`],description:`Trailing punctuation in heading`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=e.config.punctuation;n=String(n===void 0?X.allPunctuationNoQuestion:n);let r=RegExp(`\\s*[`+(0,X.escapeForRegExp)(n)+`]+$`),i=Q([`atxHeadingText`,`setextHeadingText`]);for(let e of i){let{endColumn:n,endLine:i,text:a}=e,o=r.exec(a);if(o&&!X.endOfLineHtmlEntityRe.test(a)&&!X.endOfLineGemojiCodeRe.test(a)){let e=o[0],r=e.length,a=n-r;(0,X.addError)(t,i,`Punctuation: '${e}'`,void 0,[a,r],{editColumn:a,deleteCount:r})}}}};const pV=[`listOrdered`,`listUnordered`];var mV={names:[`MD027`,`no-multiple-space-blockquote`],description:`Multiple spaces after blockquote symbol`,tags:[`blockquote`,`whitespace`,`indentation`],parser:`micromark`,function:function(e,t){let n=e.config.list_items,r=n===void 0?!0:!!n,{tokens:i}=e.parsers.micromark;for(let n of Q([`linePrefix`])){let a=n.parent,o=a?.type===`codeIndented`,s=a?.children||i;if(!o&&s[s.indexOf(n)-1]?.type===`blockQuotePrefix`&&(r||!pV.includes(s[s.indexOf(n)+1]?.type)&&!(0,Z.getParentOfType)(n,pV))){let{startColumn:r,startLine:i,text:a}=n,{length:o}=a,s=e.lines[i-1];(0,X.addErrorContext)(t,i,s,void 0,void 0,[r,o],{editColumn:r,deleteCount:o})}}}};const hV=new Set([`lineEnding`,`listItemIndent`,`linePrefix`]);var gV={names:[`MD028`,`no-blanks-blockquote`],description:`Blank line inside blockquote`,tags:[`blockquote`,`whitespace`],parser:`micromark`,function:function(e,t){for(let n of Q([`blockQuote`])){let r=[],i=n.parent?.children||e.parsers.micromark.tokens;for(let e=i.indexOf(n)+1;e<i.length;e++){let{startLine:n,type:a}=i[e];if(a===`lineEndingBlank`)r.push(n);else if(!hV.has(a))if(a===`blockQuote`){for(let e of r)(0,X.addError)(t,e);break}else break}}}};const _V={one:`1/1/1`,ordered:`1/2/3`,zero:`0/0/0`},vV=Object.keys(_V);function yV(e){let{startColumn:t,endColumn:n,text:r}=(0,Z.getDescendantsByType)(e,[`listItemValue`])[0];return{startColumn:t,endColumn:n,text:r,number:Number(r)}}var bV={names:[`MD029`,`ol-prefix`],description:`Ordered list item prefix`,tags:[`ol`],parser:`micromark`,function:function(e,t){let n=String(e.config.style);for(let e of Q([`listOrdered`])){let r=(0,Z.getDescendantsByType)(e,[`listItemPrefix`]),i=1,a=!1,o=!1,s=!1;if(r.length>0){let e=r[0].endColumn;if(o=r.every(t=>t.endColumn===e),r.length>1){let e=yV(r[0]);(yV(r[1]).number!==1||e.number===0)&&(a=!0,e.number===0&&(i=0)),s=e.text.startsWith(`0`)}}let c=vV.includes(n)?n:a?`ordered`:`one`;c===`zero`?i=0:c===`one`&&(i=1);for(let e of r){let n=i.toString(),{endColumn:r,startColumn:a,number:l}=yV(e),u=r-a,d={editColumn:a,deleteCount:u,insertText:o?n.padStart(u,s?`0`:` `):n};(0,X.addErrorDetailIf)(t,e.startLine,i,l,`Style: `+_V[c],void 0,[e.startColumn,e.endColumn-e.startColumn],d),c===`ordered`&&i++}}}},xV={names:[`MD030`,`list-marker-space`],description:`Spaces after list markers`,tags:[`ol`,`ul`,`whitespace`],parser:`micromark`,function:function(e,t){let n=Number(e.config.ul_single||1),r=Number(e.config.ol_single||1),i=Number(e.config.ul_multi||1),a=Number(e.config.ol_multi||1);for(let e of Q([`listOrdered`,`listUnordered`])){let o=e.type===`listOrdered`,s=e.children.filter(e=>e.type===`listItemPrefix`),c=e.endLine-e.startLine+1===s.length,l=o?c?r:a:c?n:i;for(let e of s){let n=[e.startColumn,e.endColumn-e.startColumn],r=e.children.filter(e=>e.type===`listItemPrefixWhitespace`);for(let e of r){let{endColumn:r,startColumn:i,startLine:a}=e,o=r-i;(0,X.addErrorDetailIf)(t,a,l,o,void 0,void 0,n,{editColumn:i,deleteCount:o,insertText:``.padEnd(l)})}}}}};const SV=/^(.*?)[`~]/;function CV(e,t,n,r){let i=t[n-1],[,a]=i.match(SV)||[],o=a===void 0?void 0:{lineNumber:n+ +!r,insertText:`${a.replace(/[^>]/g,` `).trim()}\n`};(0,X.addErrorContext)(e,n,i.trim(),void 0,void 0,void 0,o)}var wV={names:[`MD031`,`blanks-around-fences`],description:`Fenced code blocks should be surrounded by blank lines`,tags:[`code`,`blank_lines`],parser:`micromark`,function:function(e,t){let n=e.config.list_items,r=n===void 0?!0:!!n,{lines:i}=e;for(let e of Q([`codeFenced`]))(r||!(0,Z.getParentOfType)(e,[`listOrdered`,`listUnordered`]))&&((0,X.isBlankLine)(i[e.startLine-2])||CV(t,i,e.startLine,!0),!(0,X.isBlankLine)(i[e.endLine])&&!(0,X.isBlankLine)(i[e.endLine-1])&&CV(t,i,e.endLine,!1))}};const TV=e=>e.type===`listOrdered`||e.type===`listUnordered`;var EV={names:[`MD032`,`blanks-around-lists`],description:`Lists should be surrounded by blank lines`,tags:[`bullet`,`ul`,`ol`,`blank_lines`],parser:`micromark`,function:function(e,t){let{lines:n,parsers:r}=e,i=Q([`blockQuotePrefix`,`linePrefix`]),a=(0,Z.filterByPredicate)(r.micromark.tokens,TV,e=>TV(e)||e.type===`htmlFlow`?[]:e.children);for(let e of a){let r=e.startLine;(0,X.isBlankLine)(n[r-2])||(0,X.addErrorContext)(t,r,n[r-1].trim(),void 0,void 0,void 0,{insertText:(0,Z.getBlockQuotePrefixText)(i,r)});let a=(0,Z.filterByPredicate)(e.children,e=>!Z.nonContentTokens.has(e.type),e=>Z.nonContentTokens.has(e.type)?[]:e.children),o=(a.length>0?a[a.length-1]:e).endLine;(0,X.isBlankLine)(n[o])||(0,X.addErrorContext)(t,o,n[o-1].trim(),void 0,void 0,void 0,{lineNumber:o+1,insertText:(0,Z.getBlockQuotePrefixText)(i,o)})}}};const DV=e=>Array.isArray(e)?e.map(e=>String(e).toLowerCase()):[];var OV={names:[`MD033`,`no-inline-html`],description:`Inline HTML`,tags:[`html`],parser:`micromark`,function:function(e,t){let n=DV(e.config.allowed_elements),r=DV(e.config.table_allowed_elements||e.config.allowed_elements);for(let e of Q([`htmlText`],!0)){let i=(0,Z.getHtmlTagInfo)(e);if(i&&!i.close){let a=i?.name.toLowerCase(),o=!!(0,Z.getParentOfType)(e,[`table`]);if((o||!n.includes(a))&&(!o||!r.includes(a))){let n=[e.startColumn,e.text.replace(X.nextLinesRe,``).length];(0,X.addError)(t,e.startLine,`Element: `+i.name,void 0,n)}}}}},kV={names:[`MD034`,`no-bare-urls`],description:`Bare URL used`,tags:[`links`,`url`],parser:`micromark`,function:function(e,t){let n=e=>(0,Z.filterByPredicate)(e,e=>{if(e.type===`literalAutolink`&&!(0,Z.inHtmlFlow)(e)){let t=e.parent?.children,n=t?.indexOf(e),r=t?.at(n-1),i=t?.at(n+1);return!(r&&i&&r.type===`data`&&i.type===`data`&&r.text.endsWith(`<`)&&i.text.startsWith(`>`))}return!1},e=>{let{children:t}=e,n=[];for(let e=0;e<t.length;e++){let r=t[e],i=(0,Z.getHtmlTagInfo)(r);if(i&&!i.close){let n=1;for(let r=e+1;r<t.length;r++){let a=t[r],o=(0,Z.getHtmlTagInfo)(a);if(o&&i.name===o.name)if(o.close){if(n--,n===0){e=r;break}}else n++}}else n.push(r)}return n});for(let r of n(e.parsers.micromark.tokens)){let e=[r.startColumn,r.endColumn-r.startColumn],n={editColumn:e[0],deleteCount:e[1],insertText:`<${r.text}>`};(0,X.addErrorContext)(t,r.startLine,r.text,void 0,void 0,e,n)}}},AV={names:[`MD035`,`hr-style`],description:`Horizontal rule style`,tags:[`hr`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`).trim(),r=Q([`thematicBreak`]);for(let e of r){let{startLine:r,text:i}=e;n===`consistent`&&(n=i),(0,X.addErrorDetailIf)(t,r,n,i)}}};const jV=[[`emphasis`,`emphasisText`],[`strong`,`strongText`]],MV=e=>!(e.type===`htmlText`||e.type===`data`&&e.text.trim().length===0);var NV={names:[`MD036`,`no-emphasis-as-heading`],description:`Emphasis used instead of a heading`,tags:[`headings`,`emphasis`],parser:`micromark`,function:function(e,t){let n=e.config.punctuation;n=String(n===void 0?X.allPunctuation:n);let r=RegExp(`[`+n+`]$`),i=Q([`paragraph`],!0).filter(e=>e.parent?.type===`content`&&(!e.parent?.parent||e.parent?.parent?.type===`htmlFlow`&&!e.parent?.parent?.parent)&&e.children.filter(MV).length===1);for(let e of jV){let n=(0,Z.getDescendantsByType)(i,e);for(let e of n)e.children.length===1&&e.children[0].type===`data`&&!r.test(e.text)&&(0,X.addErrorContext)(t,e.startLine,e.text)}}},PV={names:[`MD037`,`no-space-in-emphasis`],description:`Spaces inside emphasis markers`,tags:[`whitespace`,`emphasis`],parser:`micromark`,function:function(e,t){let{lines:n,parsers:r}=e,i=new Map;for(let e of[`_`,`__`,`___`,`*`,`**`,`***`])i.set(e,[]);let a=(0,Z.filterByPredicate)(r.micromark.tokens,e=>e.children.some(e=>e.type===`data`));for(let e of a){for(let e of i.values())e.length=0;for(let t of e.children){let{text:e,type:n}=t;if(n===`data`&&e.length<=3){let n=i.get(e);n&&!(0,Z.inHtmlFlow)(t)&&n.push(t)}}for(let[e,r]of i)for(let i=0;i+1<r.length;i+=2){let a=r[i],o=n[a.startLine-1].slice(a.endColumn-1).match(/^\s+\S/);if(o){let[n]=o,r=`${e}${n}`,i=a.endColumn,s=n.length-1;(0,X.addError)(t,a.startLine,void 0,r,[i,s],{editColumn:i,deleteCount:s})}let s=r[i+1],c=n[s.startLine-1].slice(0,s.startColumn-1).match(/\S\s+$/);if(c){let[n]=c,r=`${n}${e}`,i=s.startColumn-(n.length-1),a=n.length-1;(0,X.addError)(t,s.startLine,void 0,r,[i,a],{editColumn:i,deleteCount:a})}}}}},FV={names:[`MD038`,`no-space-in-code`],description:`Spaces inside code span elements`,tags:[`whitespace`,`code`],parser:`micromark`,function:function(e,t){let n=Q([`codeText`]);for(let e of n){let n=(0,Z.getDescendantsByType)(e,[`codeTextData`]);if(n.length>0){let r=(0,Z.getDescendantsByType)(e,[`codeTextPadding`]),i=r[0],a=n[0],o=/^(\s+)(\S)/.exec(a.text)||[null,``,``],s=o[2]==="`",c=o[1].length-(s&&!i?1:0),l=c>0,u=r[r.length-1],d=n[n.length-1],f=/(\S)(\s+)$/.exec(d.text)||[null,``,``],p=f[1]==="`",m=f[2].length-(p&&!u?1:0),h=m>0,g=l&&h&&i&&u&&!s&&!p,_=e.text;if(l){let e=(g?i:a).startColumn,n=c+(g?i.text.length:0);(0,X.addErrorContext)(t,a.startLine,_,!0,!1,[e,n],{editColumn:e,deleteCount:n})}if(h){let e=(g?u:d).endColumn,n=m+(g?u.text.length:0);(0,X.addErrorContext)(t,d.endLine,_,!1,!0,[e-n,n],{editColumn:e-n,deleteCount:n})}}}}};function IV(e,t,n,r){let i=n.text.match(r?/^[^\S\r\n]+/:/[^\S\r\n]+$/),a=i?[r?n.startColumn:n.endColumn-i[0].length,i[0].length]:void 0;(0,X.addErrorContext)(e,r?n.startLine+ +!i:n.endLine-+!i,t.text.replace(/\s+/g,` `),r,!r,a,a?{editColumn:a[0],deleteCount:a[1]}:void 0)}var LV={names:[`MD039`,`no-space-in-links`],description:`Spaces inside link text`,tags:[`whitespace`,`links`],parser:`micromark`,function:function(e,t){let n=Q([`label`]).filter(e=>e.parent?.type===`link`);for(let e of n){let n=e.children.filter(e=>e.type===`labelText`);for(let r of n)r.text.trimStart().length!==r.text.length&&IV(t,e,r,!0),r.text.trimEnd().length!==r.text.length&&IV(t,e,r,!1)}}},RV={names:[`MD040`,`fenced-code-language`],description:`Fenced code blocks should have a language specified`,tags:[`code`,`language`],parser:`micromark`,function:function(e,t){let n=e.config.allowed_languages;n=Array.isArray(n)?n:[];let r=!!e.config.language_only,i=Q([`codeFenced`]);for(let e of i){let i=(0,Z.getDescendantsByType)(e,[`codeFencedFence`])[0],{startLine:a,text:o}=i,s=(0,Z.getDescendantsByType)(i,[`codeFencedFenceInfo`])[0]?.text;s?n.length>0&&!n.includes(s)&&(0,X.addError)(t,a,`"${s}" is not allowed`):(0,X.addErrorContext)(t,a,o),r&&(0,Z.getDescendantsByType)(i,[`codeFencedFenceMeta`]).length>0&&(0,X.addError)(t,a,`Info string contains more than language: "${o}"`)}}};const zV=/^h[1-6]$/;function BV(e){let{children:t,type:n}=e;if(n===`htmlFlow`){let e=(0,Z.filterByTypes)(t,[`htmlText`],!0),n=e.length>0&&(0,Z.getHtmlTagInfo)(e[0]);if(n)return n.name.toLowerCase()}return null}var VV={names:[`MD041`,`first-line-heading`,`first-line-h1`],description:`First line in a file should be a top-level heading`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=!!e.config.allow_preamble,r=Number(e.config.level||1),{tokens:i}=e.parsers.micromark;if(!(0,X.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title)){let a=0;for(let e of i){let{startLine:t,type:i}=e;if(!Z.nonContentTokens.has(i)&&!(0,Z.isHtmlFlowComment)(e)){let o=null;if(i===`atxHeading`||i===`setextHeading`){(0,Z.getHeadingLevel)(e)!==r&&(a=t);break}else if((o=BV(e))&&zV.test(o)){o!==`h${r}`&&(a=t);break}else if(!n){a=t;break}}}a>0&&(0,X.addErrorContext)(t,a,e.lines[a-1])}}},HV={names:[`MD042`,`no-empty-links`],description:`No empty links`,tags:[`links`],parser:`micromark`,function:function(e,t){let{definitions:n}=AB(),r=e=>{let t=n.get(e.text.trim());return!!(t&&t[1]===`#`)},i=Q([`link`]);for(let e of i){let n=(0,Z.getDescendantsByType)(e,[`label`,`labelText`]),i=(0,Z.getDescendantsByType)(e,[`reference`]),a=(0,Z.getDescendantsByType)(e,[`resource`]),o=(0,Z.getDescendantsByType)(i,[`referenceString`]),s=(0,Z.getDescendantsByType)(a,[`resourceDestination`,[`resourceDestinationLiteral`,`resourceDestinationRaw`],`resourceDestinationString`]),c=n.length>0,l=i.length>0,u=a.length>0,d=o.length>0,f=s.length>0,p=!1;c&&(!l&&!u||l&&!d)?p=r(n[0]):d&&!f?p=r(o[0]):!d&&f?p=s[0].text.trim()===`#`:!d&&!f&&(p=!0),p&&(0,X.addErrorContext)(t,e.startLine,e.text,void 0,void 0,[e.startColumn,e.endColumn-e.startColumn])}}},UV={names:[`MD043`,`required-headings`],description:`Required heading structure`,tags:[`headings`],parser:`micromark`,function:function(e,t){let n=e.config.headings;if(!Array.isArray(n))return;let r=e.config.match_case||!1,i=0,a=!1,o=!1,s=!1,c=()=>String(n[i++]||`[None]`),l=e=>r?e:e.toLowerCase();for(let e of Q([`atxHeading`,`setextHeading`]))if(!o){let n=(0,Z.getHeadingText)(e),r=(0,Z.getHeadingLevel)(e);s=!0;let u=`${``.padEnd(r,`#`)} ${n}`,d=c();d===`*`?l(c())!==l(u)&&(a=!0,i--):d===`+`?a=!0:d===`?`||(l(d)===l(u)?a=!1:a?i--:((0,X.addErrorDetailIf)(t,e.startLine,d,u),o=!0))}let u=n.length-i;!o&&(u>1||u===1&&n[i]!==`*`)&&(s||!n.every(e=>e===`*`))&&(0,X.addErrorContext)(t,e.lines.length,n[i])}};function WV(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h,g;return _;function _(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),v}function v(t){return t===35?(h=o,y(t)):t===46?(h=s,y(t)):m&&J(t)?Y(e,v,`whitespace`)(t):!m&&q(t)?Jk(e,v)(t):t===null||K(t)||UT(t)||HT(t)&&t!==45&&t!==95?ne(t):(e.enter(a),e.enter(c),e.consume(t),S)}function y(t){let n=h+`Marker`;return e.enter(a),e.enter(h),e.enter(n),e.consume(t),e.exit(n),b}function b(t){if(t===null||t===34||t===35||t===39||t===46||t===60||t===61||t===62||t===96||t===125||q(t))return n(t);let r=h+`Value`;return e.enter(r),e.consume(t),x}function x(t){if(t===null||t===34||t===39||t===60||t===61||t===62||t===96)return n(t);if(t===35||t===46||t===125||q(t)){let n=h+`Value`;return e.exit(n),e.exit(h),e.exit(a),v(t)}return e.consume(t),x}function S(t){return t===null||K(t)||UT(t)||HT(t)&&t!==45&&t!==46&&t!==58&&t!==95?(e.exit(c),m&&J(t)?Y(e,C,`whitespace`)(t):!m&&q(t)?Jk(e,C)(t):C(t)):(e.consume(t),S)}function C(t){return t===61?(e.enter(l),e.consume(t),e.exit(l),w):(e.exit(a),v(t))}function w(t){return t===null||t===60||t===61||t===62||t===96||t===125||m&&K(t)?n(t):t===34||t===39?(e.enter(u),e.enter(f),e.consume(t),e.exit(f),g=t,E):m&&J(t)?Y(e,w,`whitespace`)(t):!m&&q(t)?Jk(e,w)(t):(e.enter(d),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return t===null||t===34||t===39||t===60||t===61||t===62||t===96?n(t):t===125||q(t)?(e.exit(p),e.exit(d),e.exit(a),v(t)):(e.consume(t),T)}function E(t){return t===g?(e.enter(f),e.consume(t),e.exit(f),e.exit(u),e.exit(a),te):(e.enter(d),ee(t))}function ee(t){return t===g?(e.exit(d),E(t)):t===null?n(t):K(t)?m?n(t):Jk(e,ee)(t):(e.enter(p),e.consume(t),D)}function D(t){return t===g||t===null||K(t)?(e.exit(p),ee(t)):(e.consume(t),D)}function te(e){return e===125||q(e)?v(e):ne(e)}function ne(a){return a===125?(e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):n(a)}}function GV(e,t,n,r,i,a,o){let s=0,c=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d}function d(n){return n===93?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),f(n))}function f(t){if(t===93&&!c)return h(t);let n=e.enter(`chunkText`,{_contentTypeTextTrailing:!0,contentType:`text`,previous:l});return l&&(l.next=n),l=n,p(t)}function p(t){return t===null||s>999||t===91&&++c>32?n(t):t===93&&!c--?(e.exit(`chunkText`),h(t)):K(t)?o?n(t):(e.consume(t),e.exit(`chunkText`),f):(e.consume(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}function h(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function KV(e,t,n,r){let i=this;return a;function a(t){return t===null||K(t)||HT(t)||UT(t)?n(t):(e.enter(r),e.consume(t),o)}function o(a){return a===null||K(a)||UT(a)||HT(a)&&a!==45&&a!==95?(e.exit(r),i.previous===45||i.previous===95?n(a):t(a)):(e.consume(a),o)}}const qV={tokenize:ZV,concrete:!0},JV={tokenize:QV,partial:!0},YV={tokenize:$V,partial:!0},XV={tokenize:eH,partial:!0};function ZV(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0,s;return c;function c(t){return e.enter(`directiveContainer`),e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),l(t)}function l(t){return t===58?(e.consume(t),o++,l):o<3?n(t):(e.exit(`directiveContainerSequence`),KV.call(r,e,u,n,`directiveContainerName`)(t))}function u(t){return t===91?e.attempt(JV,d,d)(t):d(t)}function d(t){return t===123?e.attempt(YV,f,f)(t):f(t)}function f(t){return Y(e,p,`whitespace`)(t)}function p(i){return e.exit(`directiveContainerFence`),i===null?C(i):K(i)?r.interrupt?t(i):e.attempt(XV,m,C)(i):n(i)}function m(t){return t===null?C(t):K(t)?e.check(XV,y,C)(t):(e.enter(`directiveContainerContent`),h(t))}function h(t){return e.attempt({tokenize:w,partial:!0},S,a?Y(e,g,`linePrefix`,a+1):g)(t)}function g(t){return t===null?S(t):K(t)?e.check(XV,v,S)(t):v(t)}function _(t){if(t===null){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}return K(t)?e.check(XV,b,x)(t):(e.consume(t),_)}function v(t){let n=e.enter(`chunkDocument`,{contentType:`document`,previous:s});return s&&(s.next=n),s=n,_(t)}function y(t){return e.enter(`directiveContainerContent`),h(t)}function b(t){e.consume(t);let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,h}function x(t){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}function S(t){return e.exit(`directiveContainerContent`),C(t)}function C(n){return e.exit(`directiveContainer`),t(n)}function w(e,t,n){let i=0;return Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),s(t)}function s(t){return t===58?(e.consume(t),i++,s):i<o?n(t):(e.exit(`directiveContainerSequence`),Y(e,c,`whitespace`)(t))}function c(r){return r===null||K(r)?(e.exit(`directiveContainerFence`),t(r)):n(r)}}}function QV(e,t,n){return GV(e,t,n,`directiveContainerLabel`,`directiveContainerLabelMarker`,`directiveContainerLabelString`,!0)}function $V(e,t,n){return WV(e,t,n,`directiveContainerAttributes`,`directiveContainerAttributesMarker`,`directiveContainerAttribute`,`directiveContainerAttributeId`,`directiveContainerAttributeClass`,`directiveContainerAttributeName`,`directiveContainerAttributeInitializerMarker`,`directiveContainerAttributeValueLiteral`,`directiveContainerAttributeValue`,`directiveContainerAttributeValueMarker`,`directiveContainerAttributeValueData`,!0)}function eH(e,t,n){let r=this;return i;function i(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const tH={tokenize:iH},nH={tokenize:aH,partial:!0},rH={tokenize:oH,partial:!0};function iH(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveLeaf`),e.enter(`directiveLeafSequence`),e.consume(t),a}function a(t){return t===58?(e.consume(t),e.exit(`directiveLeafSequence`),KV.call(r,e,o,n,`directiveLeafName`)):n(t)}function o(t){return t===91?e.attempt(nH,s,s)(t):s(t)}function s(t){return t===123?e.attempt(rH,c,c)(t):c(t)}function c(t){return Y(e,l,`whitespace`)(t)}function l(r){return r===null||K(r)?(e.exit(`directiveLeaf`),t(r)):n(r)}}function aH(e,t,n){return GV(e,t,n,`directiveLeafLabel`,`directiveLeafLabelMarker`,`directiveLeafLabelString`,!0)}function oH(e,t,n){return WV(e,t,n,`directiveLeafAttributes`,`directiveLeafAttributesMarker`,`directiveLeafAttribute`,`directiveLeafAttributeId`,`directiveLeafAttributeClass`,`directiveLeafAttributeName`,`directiveLeafAttributeInitializerMarker`,`directiveLeafAttributeValueLiteral`,`directiveLeafAttributeValue`,`directiveLeafAttributeValueMarker`,`directiveLeafAttributeValueData`,!0)}const sH={tokenize:dH,previous:uH},cH={tokenize:fH,partial:!0},lH={tokenize:pH,partial:!0};function uH(e){return e!==58||this.events[this.events.length-1][1].type===`characterEscape`}function dH(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveText`),e.enter(`directiveTextMarker`),e.consume(t),e.exit(`directiveTextMarker`),KV.call(r,e,a,n,`directiveTextName`)}function a(t){return t===58?n(t):t===91?e.attempt(cH,o,o)(t):o(t)}function o(t){return t===123?e.attempt(lH,s,s)(t):s(t)}function s(n){return e.exit(`directiveText`),t(n)}}function fH(e,t,n){return GV(e,t,n,`directiveTextLabel`,`directiveTextLabelMarker`,`directiveTextLabelString`)}function pH(e,t,n){return WV(e,t,n,`directiveTextAttributes`,`directiveTextAttributesMarker`,`directiveTextAttribute`,`directiveTextAttributeId`,`directiveTextAttributeClass`,`directiveTextAttributeName`,`directiveTextAttributeInitializerMarker`,`directiveTextAttributeValueLiteral`,`directiveTextAttributeValue`,`directiveTextAttributeValueMarker`,`directiveTextAttributeValueData`)}function mH(){return{text:{58:sH},flow:{58:[qV,tH]}}}var hH=O();function gH(){let e={...mH()};return delete e.text,e}function _H(e,t){return e.slice(t.start.offset,t.end.offset)}function vH(e,t={}){let n=[gH(),GO(),GA(),rj(),CP(),...t.extensions||[]],r=[],i=hA.tokenize;function a(t,n,a){let o=this,s=o.events;return i.call(o,t,n,t=>{let n=s.length;for(;--n>=0;){let[e,t]=s[n];if(e===`enter`){let{type:e}=t;if(e===`labelImage`||e===`labelLink`)break}}if(n>=0){let[,t]=s[n],[,i]=s[s.length-1],a={type:`undefinedReferenceShortcut`,start:t.start,end:i.end},c={type:`undefinedReference`,start:t.start,end:i.end},l=s.slice(n).filter(e=>{let[,t]=e,{type:n}=t;return n===`data`||n===`lineEnding`}),u=r.length>0&&r[r.length-1][0],d=u&&u[1];d&&d.end.line===a.start.line&&d.end.column===a.start.column&&(l.length===0?(d.type=`undefinedReferenceCollapsed`,d.end=i.end):(a.type=`undefinedReferenceFull`,a.start=d.start,r.pop()));let f=l.filter(e=>e[0]===`enter`).map(t=>_H(e,t[1])).join(``).trim();if(f.length>0&&!f.includes(`]`)){let e=[[`enter`,a,o],[`enter`,c,o]];for(let t of l){let[n,r]=t;e.push([n,{...r},o])}e.push([`exit`,c,o],[`exit`,a,o]),r.push(e)}}return a(t)})}try{hA.tokenize=a;let i=$P({...t,extensions:n}),o=nF()(e,void 0,!0);return eF(i.document().write(o)).concat(...r)}finally{hA.tokenize=i}}function yH(e,t={},n={},r=0,i=void 0){let a=!!t.freezeTokens,o=vH(e,n),s=[],c=[],l={type:`data`,startLine:-1,startColumn:-1,endLine:-1,endColumn:-1,text:`ROOT`,children:s,parent:null},u=[l],d=l,f=null,p=null,m=!1;for(let s of o){let[o,h]=s,{type:g,start:_,end:v}=h,{column:y,line:b}=_,{column:x,line:S}=v,C=_H(e,h);if(o===`enter`&&!m){let a=d;if(u.push(a),d={type:g,startLine:b+r,startColumn:y,endLine:S+r,endColumn:x,text:C,children:[],parent:a===l?i||null:a},i&&Object.defineProperty(d,hH.htmlFlowSymbol,{value:!0}),a.children.push(d),c.push(d),d.type===`htmlFlow`&&!(0,Z.isHtmlFlowComment)(d)){m=!0,(!f||!p)&&(f={...n,extensions:[{disable:{null:[`codeIndented`,`htmlFlow`]}}]},p=e.split(hH.newlineRe));let r=yH(p.slice(d.startLine-1,d.endLine).join(`
266
+ `),t,f,d.startLine-1,d);d.children=r,c=c.concat(r[hH.flatTokensSymbol])}}else o===`exit`&&(g===`htmlFlow`&&(m=!1),m||(a&&(Object.freeze(d.children),Object.freeze(d)),d=u.pop()))}return Object.defineProperty(s,hH.flatTokensSymbol,{value:c}),a&&Object.freeze(s),s}function bH(e,t){return yH(e,t)}const xH=new Set([`codeFencedFence`,`definition`,`reference`,`resource`]);var SH={names:[`MD044`,`proper-names`],description:`Proper names should have the correct capitalization`,tags:[`spelling`],parser:`micromark`,function:function(e,t){let n=e.config.names;if(n=Array.isArray(n)?n:[],n.sort((e,t)=>t.length-e.length||e.localeCompare(t)),n.length===0)return;let r=e.config.code_blocks,i=r===void 0?!0:!!r,a=e.config.html_elements,o=a===void 0?!0:!!a,s=new Set([`data`]);i&&(s.add(`codeFlowValue`),s.add(`codeTextData`)),o&&(s.add(`htmlFlowData`),s.add(`htmlTextData`));let c=(0,Z.filterByPredicate)(e.parsers.micromark.tokens,e=>s.has(e.type),e=>e.children.filter(e=>!xH.has(e.type))),l=[],u=new Set;for(let e of n){let r=(0,X.escapeForRegExp)(e),i=`(${/^\W/.test(e)?``:`\\b_*`})(${r})${/\W$/.test(e)?``:`_*\\b`}`,a=new RegExp(i,`gi`);for(let r of c){let i=null;for(;(i=a.exec(r.text))!==null;){let[,a,o]=i,s=r.startColumn+i.index+a.length,c=o.length,d=r.startLine,f={startLine:d,startColumn:s,endLine:d,endColumn:s+c-1};if(!n.includes(o)&&!l.some(e=>(0,X.hasOverlap)(e,f))){let n=[];u.has(r)||(n=(0,Z.filterByTypes)(bH(r.text),[`literalAutolink`]).map(e=>({startLine:d,startColumn:r.startColumn+e.startColumn-1,endLine:d,endColumn:r.endColumn+e.endColumn-1})),l.push(...n),u.add(r)),n.some(e=>(0,X.hasOverlap)(e,f))||(0,X.addErrorDetailIf)(t,r.startLine,e,o,void 0,void 0,[s,c],{editColumn:s,deleteCount:c,insertText:e})}l.push(f)}}}}};const CH=(0,X.getHtmlAttributeRe)(`alt`),wH=(0,X.getHtmlAttributeRe)(`aria-hidden`);var TH={names:[`MD045`,`no-alt-text`],description:`Images should have alternate text (alt text)`,tags:[`accessibility`,`images`],parser:`micromark`,function:function(e,t){let n=Q([`image`]);for(let e of n)if((0,Z.getDescendantsByType)(e,[`label`,`labelText`]).some(e=>e.text.length===0)){let n=e.startLine===e.endLine?[e.startColumn,e.endColumn-e.startColumn]:void 0;(0,X.addError)(t,e.startLine,void 0,void 0,n)}let r=Q([`htmlText`],!0);for(let e of r){let{startColumn:n,startLine:r,text:i}=e,a=(0,Z.getHtmlTagInfo)(e);a&&!a.close&&a.name.toLowerCase()===`img`&&!CH.test(i)&&wH.exec(i)?.[1].toLowerCase()!==`true`&&(0,X.addError)(t,r,void 0,void 0,[n,i.replace(X.nextLinesRe,``).length])}}};const EH=e=>e===`codeFenced`?`fenced`:`indented`;var DH={names:[`MD046`,`code-block-style`],description:`Code block style`,tags:[`code`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`);for(let e of Q([`codeFenced`,`codeIndented`])){let{startLine:r,type:i}=e;n===`consistent`&&(n=EH(i)),(0,X.addErrorDetailIf)(t,r,n,EH(i))}}},OH={names:[`MD047`,`single-trailing-newline`],description:`Files should end with a single newline character`,tags:[`blank_lines`],parser:`none`,function:function(e,t){let n=e.lines.length,r=e.lines[n-1];(0,X.isBlankLine)(r)||(0,X.addError)(t,n,void 0,void 0,[r.length,1],{insertText:`
267
+ `,editColumn:r.length+1})}};function kH(e){switch(e[0]){case`~`:return`tilde`;default:return`backtick`}}var AH={names:[`MD048`,`code-fence-style`],description:`Code fence style`,tags:[`code`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`),r=Q([`codeFenced`]);for(let e of r){let{startLine:r,text:i}=(0,Z.getDescendantsByType)(e,[`codeFencedFence`,`codeFencedFenceSequence`])[0];n===`consistent`&&(n=kH(i)),(0,X.addErrorDetailIf)(t,r,n,kH(i))}}};const jH=/^\w$/;function MH(e){switch(e[0]){case`*`:return`asterisk`;default:return`underscore`}}const NH=(e,t,n,r,i,a,o=`consistent`)=>{let{lines:s,parsers:c}=e,l=(0,Z.filterByPredicate)(c.micromark.tokens,e=>e.type===n,e=>e.type===`htmlFlow`?[]:e.children);for(let e of l){let n=(0,Z.getDescendantsByType)(e,[r]),c=n[0],l=n[n.length-1];if(c&&l){let e=MH(c.text);if(o===`consistent`&&(o=e),o!==e&&!(o===`underscore`&&(jH.test(s[c.startLine-1][c.startColumn-2])||jH.test(s[l.endLine-1][l.endColumn-1]))))for(let n of[c,l])(0,X.addError)(t,n.startLine,`Expected: ${o}; Actual: ${e}`,void 0,[n.startColumn,n.text.length],{editColumn:n.startColumn,deleteCount:n.text.length,insertText:o===`asterisk`?i:a})}}};var PH=[{names:[`MD049`,`emphasis-style`],description:`Emphasis style`,tags:[`emphasis`],parser:`micromark`,function:function(e,t){return NH(e,t,`emphasis`,`emphasisSequence`,`*`,`_`,e.config.style||void 0)}},{names:[`MD050`,`strong-style`],description:`Strong style`,tags:[`emphasis`],parser:`micromark`,function:function(e,t){return NH(e,t,`strong`,`strongSequence`,`**`,`__`,e.config.style||void 0)}}];const FH=(0,X.getHtmlAttributeRe)(`id`),IH=(0,X.getHtmlAttributeRe)(`name`),LH=/\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu,RH=/^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/,zH=new Set([`image`,`reference`,`resource`]),BH=new Set([`characterEscapeValue`,`codeTextData`,`data`,`mathTextData`]);function VH(e){let t=(0,Z.filterByPredicate)(e.children,e=>BH.has(e.type),e=>zH.has(e.type)?[]:e.children).map(e=>e.text).join(``);return`#`+encodeURIComponent(t.toLowerCase().replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,``).replace(/ /gu,`-`).toWellFormed())}function HH(e){return(0,Z.filterByTypes)(e.children,[`characterEscapeValue`,`data`]).map(e=>e.text).join(``)}var UH={names:[`MD051`,`link-fragments`],description:`Link fragments should be valid`,tags:[`links`],parser:`micromark`,function:function(e,t){let n=e.config.ignore_case||!1,r=e.config.ignored_pattern||``,i=new RegExp(r||`^$`),a=new Map([[`#top`,0]]),o=Q([`atxHeadingText`,`setextHeadingText`]);for(let e of o){let t=VH(e);if(t!==`#`){let n=a.get(t)||0;n&&a.set(`${t}-${n}`,0),a.set(t,n+1);let r=null;for(;(r=LH.exec(e.text))!==null;){let[,e]=r;a.has(e)||a.set(e,1)}}}for(let e of Q([`htmlText`],!0)){let t=(0,Z.getHtmlTagInfo)(e);if(t&&!t.close){let n=FH.exec(e.text)||t.name.toLowerCase()===`a`&&IH.exec(e.text);n&&n.length>0&&a.set(`#${n[1]}`,0)}}for(let[e,r]of[[`link`,`resourceDestinationString`],[`definition`,`definitionDestinationString`]]){let o=Q([e]).filter(e=>!(e.parent?.type===`atxHeadingText`&&(0,Z.isDocfxTab)(e.parent.parent)));for(let e of o){let o=(0,Z.filterByTypes)(e.children,[r]);for(let r of o){let{endColumn:o,startColumn:s}=r,c=HH(r),l=c.slice(1),u=`#${encodeURIComponent(l.toWellFormed())}`;if(c.length>1&&c.startsWith(`#`)&&!a.has(u)&&!RH.test(u)&&!i.test(l)){let r,i,l;e.startLine===e.endLine&&(r=e.text,i=[e.startColumn,e.endColumn-e.startColumn],l={editColumn:s,deleteCount:o-s});let u=c.toLowerCase(),d=[...a.keys()].find(e=>u===e.toLowerCase());d?((l||{}).insertText=d,!n&&d!==c&&(0,X.addError)(t,e.startLine,`Expected: ${d}; Actual: ${c}`,r,i,l)):(0,X.addError)(t,e.startLine,void 0,r,i)}}}}}},WH={names:[`MD052`,`reference-links-images`],description:`Reference links and images should use a label that is defined`,tags:[`images`,`links`],parser:`none`,function:function(e,t){let{config:n,lines:r}=e,i=n.shortcut_syntax||!1,a=new Set(n.ignored_labels||[`x`]),{definitions:o,references:s,shortcuts:c}=AB(),l=i?[...s.entries(),...c.entries()]:s.entries();for(let e of l){let[n,i]=e;if(!o.has(n)&&!a.has(n))for(let e of i){let[i,a,o]=e,s=r[i].slice(a,a+o);(0,X.addError)(t,i+1,`Missing link or image reference definition: "${n}"`,s,[a+1,s.length])}}}};const GH=/^ {0,3}\[([^\]]*[^\\])\]:/;var KH={names:[`MD053`,`link-image-reference-definitions`],description:`Link and image reference definitions should be needed`,tags:[`images`,`links`],parser:`none`,function:function(e,t){let n=new Set(e.config.ignored_definitions||[`//`]),r=e.lines,{references:i,shortcuts:a,definitions:o,duplicateDefinitions:s}=AB(),c=e=>e.replace(GH,``).trim().length>0,l={deleteCount:-1};for(let e of o.entries()){let[o,[s]]=e;if(!n.has(o)&&!i.has(o)&&!a.has(o)){let e=r[s];(0,X.addError)(t,s+1,`Unused link or image reference definition: "${o}"`,(0,X.ellipsify)(e),[1,e.length],c(e)?l:void 0)}}for(let e of s){let[i,a]=e;if(!n.has(i)){let e=r[a];(0,X.addError)(t,a+1,`Duplicate link or image reference definition: "${i}"`,(0,X.ellipsify)(e),[1,e.length],c(e)?l:void 0)}}}};const qH=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,JH=e=>e.replace(qH,`$1`),YH=/[ <>]/,XH=e=>{try{new URL(e)}catch{return!1}return!YH.test(e)};var ZH={names:[`MD054`,`link-image-style`],description:`Link and image style`,tags:[`images`,`links`],parser:`micromark`,function:(e,t)=>{let n=e.config,r=n.autolink===void 0||!!n.autolink,i=n.inline===void 0||!!n.inline,a=n.full===void 0||!!n.full,o=n.collapsed===void 0||!!n.collapsed,s=n.shortcut===void 0||!!n.shortcut,c=n.url_inline===void 0||!!n.url_inline;if(r&&i&&a&&o&&s&&c)return;let{definitions:l}=AB(),u=Q([`autolink`,`image`,`link`]);for(let e of u){let n=null,u=null,{endColumn:d,endLine:f,startColumn:p,startLine:m,text:h,type:g}=e,_=g===`image`,v=!1;if(g===`autolink`)u=(0,Z.getDescendantsByType)(e,[[`autolinkEmail`,`autolinkProtocol`]])[0]?.text,n=u,v=!r&&!!u;else if(n=(0,Z.getDescendantsByType)(e,[`label`,`labelText`])[0].text,u=(0,Z.getDescendantsByType)(e,[`resource`,`resourceDestination`,[`resourceDestinationLiteral`,`resourceDestinationRaw`],`resourceDestinationString`])[0]?.text,u){let t=(0,Z.getDescendantsByType)(e,[`resource`,`resourceTitle`,`resourceTitleString`])[0]?.text;v=!i||!c&&r&&!_&&!t&&n===u&&XH(u)}else{let t=(0,Z.getDescendantsByType)(e,[`reference`]).length===0,r=(0,Z.getDescendantsByType)(e,[`reference`,`referenceString`])[0]?.text,i=r===void 0,c=l.get(r||n);u=c&&c[1]||``,v=!!(u&&(t?!s:i?!o:!a))}if(v){let e,a;if(m===f){e=[p,d-p];let t=null,o=i&&n,s=r&&!_&&XH(u);o&&(c||!s)?t=`${_?`!`:``}[${n.replace(/[[\]]/g,`\\$&`)}](${u.replace(/[()]/g,`\\$&`)})`:s&&(t=`<${JH(u)}>`),t&&(a={editColumn:e[0],insertText:t,deleteCount:e[1]})}(0,X.addErrorContext)(t,m,h.replace(X.nextLinesRe,``),void 0,void 0,e,a)}}}};const QH=new Set([`linePrefix`,`whitespace`]),$H=e=>e.filter(e=>!QH.has(e.type)),eU=e=>e[0],tU=e=>e[e.length-1],nU=(e,t)=>[e,t-e+1];var rU={names:[`MD055`,`table-pipe-style`],description:`Table pipe style`,tags:[`table`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`consistent`),r=n!==`no_leading_or_trailing`&&n!==`trailing_only`,i=n!==`no_leading_or_trailing`&&n!==`leading_only`,a=Q([`tableDelimiterRow`,`tableRow`]);for(let e of a){let a=eU(e.children),o=eU($H(a.children)).type===`tableCellDivider`,s=tU(e.children),c=tU($H(s.children)).type===`tableCellDivider`,l=o?c?`leading_and_trailing`:`leading_only`:c?`trailing_only`:`no_leading_or_trailing`;n===`consistent`&&(n=l,r=o,i=c),o!==r&&(0,X.addErrorDetailIf)(t,a.startLine,n,l,`${r?`Missing`:`Unexpected`} leading pipe`,void 0,nU(e.startColumn,a.startColumn)),c!==i&&(0,X.addErrorDetailIf)(t,s.endLine,n,l,`${i?`Missing`:`Unexpected`} trailing pipe`,void 0,nU(s.endColumn-1,e.endColumn-1))}}};const iU=(e,t)=>[e,t-e+1];var aU={names:[`MD056`,`table-column-count`],description:`Table column count`,tags:[`table`],parser:`micromark`,function:function(e,t){let n=Q([`tableDelimiterRow`,`tableRow`]),r=0,i=null;for(let e of n){let n=(0,Z.getParentOfType)(e,[`table`]);i!==n&&(r=0,i=n);let a=e.children.filter(e=>[`tableData`,`tableDelimiter`,`tableHeader`].includes(e.type)),o=a.length;r||=o;let s,c;o<r?(s=`Too few cells, row will be missing data`,c=[e.endColumn-1,1]):r<o&&(s=`Too many cells, extra data will be missing`,c=iU(a[r].startColumn,e.endColumn-1)),(0,X.addErrorDetailIf)(t,e.endLine,r,o,s,void 0,c)}}},oU={names:[`MD058`,`blanks-around-tables`],description:`Tables should be surrounded by blank lines`,tags:[`table`],parser:`micromark`,function:function(e,t){let{lines:n}=e,r=Q([`blockQuotePrefix`,`linePrefix`]),i=Q([`table`]);for(let e of i){let i=e.startLine;(0,X.isBlankLine)(n[i-2])||(0,X.addErrorContext)(t,i,n[i-1].trim(),void 0,void 0,void 0,{insertText:(0,Z.getBlockQuotePrefixText)(r,i)});let a=e.endLine;(0,X.isBlankLine)(n[a])||(0,X.addErrorContext)(t,a,n[a-1].trim(),void 0,void 0,void 0,{lineNumber:a+1,insertText:(0,Z.getBlockQuotePrefixText)(r,a)})}}};const sU=new Set([`codeText`,`htmlText`]),cU=[`click here`,`here`,`link`,`more`];function lU(e){return e.replace(/[\W_]+/g,` `).replace(/\s+/g,` `).toLowerCase().trim()}var uU={names:[`MD059`,`descriptive-link-text`],description:`Link text should be descriptive`,tags:[`accessibility`,`links`],parser:`micromark`,function:function(e,t){let n=new Set((e.config.prohibited_texts||cU).map(lU));if(n.size>0){let e=Q([`link`]);for(let r of e){let e=(0,Z.getDescendantsByType)(r,[`label`,`labelText`]);for(let r of e){let{children:e,endColumn:i,endLine:a,parent:o,startColumn:s,startLine:c,text:l}=r;if(!e.some(e=>sU.has(e.type))&&n.has(lU(l))){let e=c===a?[s,i-s]:void 0;(0,X.addErrorContext)(t,c,o.text,void 0,void 0,e)}}}}}};function dU({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const fU=dU();function pU(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(fU,``)}const mU=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],hU=[12288,12288,65281,65376,65504,65510],gU=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],_U=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},vU=19968,[yU,bU]=xU(gU);function xU(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(vU>=i&&vU<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}const SU=e=>e<161||e>1114109?!1:_U(mU,e),CU=e=>e<12288||e>65510?!1:_U(hU,e),wU=e=>e>=yU&&e<=bU?!0:e<4352||e>262141?!1:_U(gU,e);function TU(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function EU(e,{ambiguousAsWide:t=!1}={}){return TU(e),CU(e)||wU(e)||t&&SU(e)?2:1}const DU=new Intl.Segmenter,OU=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,kU=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,AU=/^\p{RGI_Emoji}$/v,jU=/^[\d#*]\u20E3$/,MU=/\p{Extended_Pictographic}/gu;function NU(e){if(e.length>50)return!1;if(jU.test(e))return!0;if(e.includes(`‍`)){let t=e.match(MU);return t!==null&&t.length>=2}return!1}function PU(e){return e.replace(kU,``)}function FU(e){return OU.test(e)}function IU(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function LU(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function RU(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function zU(e){return IU(e)||LU(e)||RU(e)}function BU(e,t){let n=[];for(let t of e)OU.test(t)||n.push(t.codePointAt(0));if(n.length===0)return;let r=0;for(let e=0;e<n.length;e++){let i=n[e];if(!zU(i)){if(r===0)return;for(let i=e;i<n.length;i++)r+=EU(n[i],t);return r}if(IU(i)&&LU(n[e+1])){r+=2,e+=RU(n[e+2])?2:1;continue}r+=EU(i,t)}return r}function VU(e,t){let n=0,r=!0;for(let i of e){if(r){r=!1;continue}i>=`＀`&&i<=`￯`&&(n+=EU(i.codePointAt(0),t))}return n}function HU(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t,i=e;if(!r&&(i.includes(`\x1B`)||i.includes(`›`))&&(i=pU(i)),i.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(i))return i.length;let a=0,o={ambiguousAsWide:!n};for(let{segment:e}of DU.segment(i)){if(FU(e))continue;if(AU.test(e)||NU(e)){a+=2;continue}let t=PU(e),n=BU(t,o);if(n!==void 0){a+=n;continue}let r=t.codePointAt(0);a+=EU(r,o),a+=VU(t,o)}return a}function UU(e,t,n,r,i){e.push({lineNumber:t,detail:r,range:[n,1],fixInfo:i})}function WU(e,t){return(0,Z.filterByTypes)(t.children,[`tableCellDivider`]).map(n=>({actual:n.startColumn,effective:HU(e[t.startLine-1].slice(0,n.startColumn-1))}))}function GU(e,t,n){let r=[],i=t[0],a=WU(e,i);for(let i of t.slice(1)){let t=new Set(a.map(e=>e.effective)),o=WU(e,i);for(let e of o)t.size>0&&!t.delete(e.effective)&&UU(r,i.startLine,e.actual,n)}return r}var KU={names:[`MD060`,`table-column-style`],description:`Table column style`,tags:[`table`],parser:`micromark`,function:function(e,t){let n=String(e.config.style||`any`),r=n===`any`||n===`aligned`,i=n===`any`||n===`compact`,a=n===`any`||n===`tight`,o=!!e.config.aligned_delimiter,s=e.lines,c=Q([`table`]);for(let e of c){let n=(0,Z.filterByTypes)(e.children,[`tableDelimiterRow`,`tableRow`]),c=[];r&&c.push(...GU(s,n,`Table pipe does not align with header for style "aligned"`));let l=[],u=[];if((i||a)&&!(r&&c.length===0)){if(o){let e=GU(s,n.slice(0,2),`Table pipe does not align with header for option "aligned_delimiter"`);l.push(...e),u.push(...e)}for(let e of n){let t=(0,Z.filterByTypes)(e.children,[`tableCellDivider`,`tableContent`,`whitespace`]);for(let n=0;n<t.length;n++){let{startColumn:r,startLine:i,type:a}=t[n];if(a===`tableCellDivider`){let a=t[n-1];a&&(a.type===`whitespace`?(a.text.length!==1&&UU(l,i,r,`Table pipe has extra space to the left for style "compact"`,{editColumn:a.startColumn,deleteCount:a.text.length-1}),UU(u,i,r,`Table pipe has space to the left for style "tight"`,{editColumn:a.startColumn,deleteCount:a.text.length})):UU(l,i,r,`Table pipe is missing space to the left for style "compact"`,{editColumn:a.endColumn,insertText:` `}));let o=t[n+1];o&&(o.type===`whitespace`?o.endColumn!==e.endColumn&&(o.text.length!==1&&UU(l,i,r,`Table pipe has extra space to the right for style "compact"`,{editColumn:o.startColumn,deleteCount:o.text.length-1}),UU(u,i,r,`Table pipe has space to the right for style "tight"`,{editColumn:o.startColumn,deleteCount:o.text.length})):UU(l,i,r,`Table pipe is missing space to the right for style "compact"`,{editColumn:o.startColumn,insertText:` `}))}}}}let d=c;i&&(l.length<d.length||!r)&&(d=l),a&&(u.length<d.length||!r&&!i)&&(d=u);for(let e of d)t(e)}}};const[qU,JU]=iV,[YU,XU]=PH,ZU=[FB,IB,VB,HB,GB,KB,JB,XB,ZB,$B,tV,nV,qU,aV,JU,cV,lV,uV,dV,fV,mV,gV,bV,xV,wV,EV,OV,kV,AV,NV,PV,FV,LV,RV,VV,HV,UV,SH,TH,DH,OH,AH,YU,XU,UH,WH,KH,ZH,rU,aU,oU,uU,KU];for(let e of ZU){let t=e.names[0].toLowerCase();e.information=new URL(`https://github.com/DavidAnson/markdownlint/blob/v${jB}/doc/${t}.md`)}function QU(e,t,n){let r=null,i=null,a=[],o=0;return(n||[JSON.parse]).every(e=>{try{let n=e(t);return r=n&&typeof n==`object`&&!Array.isArray(n)?n:{},!1}catch(e){a.push(`Parser ${o++}: ${e?.message}`)}return!0})&&(a.unshift(`Unable to parse '${e}'`),i=a.join(`; `)),{config:r,message:i}}function $U(e,t){let n=null;if(e.length===ZU.length)return n;let r={};for(let[i,a]of e.entries()){let e=i-ZU.length;function o(t,n){return Error(`Property '${t}' of custom rule at index ${e} is incorrect: '${n}'.`)}for(let e of[`names`,`tags`]){let t=a[e];!n&&(!t||!Array.isArray(t)||t.length===0||!t.every(X.isString)||t.some(X.isEmptyString))&&(n=o(e,t))}for(let e of[[`description`,`string`],[`function`,`function`]]){let t=e[0],r=a[t];!n&&(!r||typeof r!==e[1])&&(n=o(t,r))}if(!n&&a.parser!==void 0&&a.parser!==`markdownit`&&a.parser!==`micromark`&&a.parser!==`none`&&(n=o(`parser`,a.parser)),!n&&a.information&&!X.isUrl(a.information)&&(n=o(`information`,a.information)),!n&&a.asynchronous!==void 0&&typeof a.asynchronous!=`boolean`&&(n=o(`asynchronous`,a.asynchronous)),!n&&a.asynchronous&&t&&(n=Error(`Custom rule `+a.names.join(`/`)+` at index `+e+` is asynchronous and can not be used in a synchronous context.`)),!n){for(let t of a.names){let i=t.toUpperCase();!n&&r[i]!==void 0&&(n=Error(`Name '`+t+`' of custom rule at index `+e+` is already used as a name or tag.`)),r[i]=!0}for(let t of a.tags){let i=t.toUpperCase();!n&&r[i]&&(n=Error(`Tag '`+t+`' of custom rule at index `+e+` is already used as a name.`)),r[i]=!1}}}return n}function eW(e,t){let n=[];if(t){let r=e.match(t);if(r&&!r.index){let t=r[0];e=e.slice(t.length),n=t.split(X.newLineRe),n.length>0&&n[n.length-1]===``&&n.length--}}return{content:e,frontMatterLines:n}}function tW(e){let t={};for(let n of e){let e=n.names[0].toUpperCase();for(let r of n.names){let n=r.toUpperCase();t[n]=[e]}for(let r of n.tags){let n=r.toUpperCase(),i=t[n]||[];i.push(e),t[n]=i}}return t}function nW(e,t,n){let r=!0,i=`error`;Object.entries(t).every(([e,t])=>e.toUpperCase()===`DEFAULT`?(r=!!t,t===`warning`&&(i=`warning`),!1):!0);let a={},o=new Map,s=new Map,c=Object.freeze({});for(let t of e.map(e=>e.names[0].toUpperCase()))a[t]=c,o.set(t,r),s.set(t,i);for(let[e,r]of Object.entries(t)){let t=e.toUpperCase(),i=!1,c=`error`,l={};if(r)if(r instanceof Object){let e=r;i=e.enabled===void 0?!0:!!e.enabled,c=e.severity===`warning`?`warning`:`error`,l=Object.fromEntries(Object.entries(r).filter(([e])=>e!==`enabled`&&e!==`severity`))}else i=!0,c=r===`warning`?`warning`:`error`;for(let e of n[t]||[])Object.freeze(l),a[e]=l,o.set(e,i),s.set(e,c)}return{effectiveConfig:a,rulesEnabled:o,rulesSeverity:s}}function rW(e,t,n,r,i,a,o){let s=new Map,c=s,l=Array(1+n.length);function u(e,t,n=void 0){for(let[i,a]of e.entries()){if(!r){let e=null;for(;e=X.inlineCommentStartRe.exec(a);){let n=e[2].toUpperCase(),r=e.index+e[1].length,o=a.indexOf(`-->`,r);if(o===-1)break;t(n,a.slice(r,o),i+1)}}n&&n()}}function d(e,t){if(e===`CONFIGURE-FILE`){let{config:e}=QU(`CONFIGURE-FILE`,t,a);e&&(i={...i,...e})}}function f(e,t,n){n=new Map(n);let r=e.startsWith(`ENABLE`),i=t&&t.trim(),a=i?i.toUpperCase().split(/\s+/):b;for(let e of a)for(let t of o[e]||[])n.set(t,r);return n}function p(e,t){(e===`ENABLE-FILE`||e===`DISABLE-FILE`)&&(s=f(e,t,s))}function m(e,t){e===`CAPTURE`?c=s:e===`RESTORE`?s=c:(e===`ENABLE`||e===`DISABLE`)&&(s=f(e,t,s))}function h(){l.push(s)}function g(e,t,r){let i=e===`DISABLE-LINE`,a=e===`DISABLE-NEXT-LINE`;if(i||a){let i=n.length+r+ +!!a;l[i]=f(e,t,l[i])}}u([t.join(`
268
+ `)],d);let{effectiveConfig:_,rulesEnabled:v,rulesSeverity:y}=nW(e,i,o),b=[...v.keys()];return s=new Map(v),c=s,u(t,p),u(t,m,h),u(t,g),{effectiveConfig:_,enabledRulesPerLineNumber:l,enabledRuleList:e.filter(e=>{let t=e.names[0].toUpperCase();return l.some(e=>e.get(t))}),rulesSeverity:y}}function iW(e,n,r,i,a,o,s,c,l,u,d,f){let p=e=>f(e instanceof Error?e:Error(e));i=i.replace(/^\uFEFF/,``);let m=eW(i,c),{frontMatterLines:h}=m;i=m.content;let{effectiveConfig:g,enabledRulesPerLineNumber:_,enabledRuleList:v,rulesSeverity:y}=rW(e,i.split(X.newLineRe),h,u,o,s,n),b=v.some(e=>e.parser===`markdownit`||e.parser===void 0),x=v.some(e=>e.parser===`micromark`),S=e.length!==ZU.length,C=x?bH(i,{freezeTokens:S}):[],w=i;i=X.clearHtmlCommentText(i);let T=i.split(X.newLineRe),E=e=>{let t=Object.freeze({markdownit:Object.freeze({tokens:e})}),n=Object.freeze({micromark:Object.freeze({tokens:C})}),i=Object.freeze({}),a={name:r,version:jB,lines:Object.freeze(T),frontMatterLines:Object.freeze(h)};DB({...a,parsers:n,config:{}});let o=[],s=s=>{let c=s.names[0].toUpperCase(),u={},d=i;s.parser===void 0?(u.tokens=e,d=t):s.parser===`markdownit`?d=t:s.parser===`micromark`&&(d=n);let f=Object.freeze({...a,...u,parsers:d,config:g[c]});function p(e){throw Error(`Value of '${e}' passed to onError by '${c}' is incorrect for '${r}'.`)}function m(e){(!e||!X.isNumber(e.lineNumber)||e.lineNumber<1||e.lineNumber>T.length)&&p(`lineNumber`);let t=e.lineNumber+h.length;if(!_[t].get(c))return;e.detail&&!X.isString(e.detail)&&p(`detail`),e.context&&!X.isString(e.context)&&p(`context`),e.information&&!X.isUrl(e.information)&&p(`information`),e.range&&(!Array.isArray(e.range)||e.range.length!==2||!X.isNumber(e.range[0])||e.range[0]<1||!X.isNumber(e.range[1])||e.range[1]<1||e.range[0]+e.range[1]-1>T[e.lineNumber-1].length)&&p(`range`);let n=e.fixInfo,r={};if(n){X.isObject(n)||p(`fixInfo`),n.lineNumber!==void 0&&((!X.isNumber(n.lineNumber)||n.lineNumber<1||n.lineNumber>T.length)&&p(`fixInfo.lineNumber`),r.lineNumber=n.lineNumber+h.length);let t=n.lineNumber||e.lineNumber;n.editColumn!==void 0&&((!X.isNumber(n.editColumn)||n.editColumn<1||n.editColumn>T[t-1].length+1)&&p(`fixInfo.editColumn`),r.editColumn=n.editColumn),n.deleteCount!==void 0&&((!X.isNumber(n.deleteCount)||n.deleteCount<-1||n.deleteCount>T[t-1].length)&&p(`fixInfo.deleteCount`),r.deleteCount=n.deleteCount),n.insertText!==void 0&&(X.isString(n.insertText)||p(`fixInfo.insertText`),r.insertText=n.insertText)}let i=e.information||s.information;o.push({lineNumber:t,ruleNames:s.names,ruleDescription:s.description,ruleInformation:i?i.href:null,errorDetail:e.detail?.replace(X.newLineRe,` `)||null,errorContext:e.context?.replace(X.newLineRe,` `)||null,errorRange:e.range?[...e.range]:null,fixInfo:n?r:null,severity:y.get(c)})}let v=e=>m({lineNumber:1,detail:`This rule threw an exception: ${e.message||e}`}),b=()=>s.function(f,m);if(s.asynchronous){let e=Promise.resolve().then(b);return l?e.catch(v):e}try{b()}catch(e){if(l)v(e);else throw e}return null},c=()=>(o.sort((e,t)=>e.ruleNames[0].localeCompare(t.ruleNames[0])||e.lineNumber-t.lineNumber),o),u=v.filter(e=>e.asynchronous),d=v.filter(e=>!e.asynchronous),m=[...u,...d],b=()=>f(null,c());try{let e=m.map(s);u.length>0?Promise.all(e.slice(0,u.length)).then(b).catch(p):b()}catch(e){p(e)}finally{DB()}};!b||d?E(b?(0,PB.requireMarkdownItCjs)().getMarkdownItTokens(a(),w,T):[]):Promise.all([import(`./markdownit-C8k7jh2Z.mjs`).then(e=>t(e.default,1)),new Promise(e=>e(a()))]).then(([e,t])=>{E(e.getMarkdownItTokens(t,w,T))}).catch(p)}function aW(e,t,n,r,i,a,o,s,c,l,u,d){function f(l,f){return l?d(l):iW(e,t,n,f,r,i,a,o,s,c,u,d)}u?f(null,l.readFileSync(n,`utf8`)):l.readFile(n,`utf8`,f)}function oW(e,t,n){e||={},n||=()=>{};let r=[e.customRules||[]].flat().map(e=>({names:X.cloneIfArray(e.names),description:e.description,information:X.cloneIfUrl(e.information),tags:X.cloneIfArray(e.tags),parser:e.parser,asynchronous:e.asynchronous,function:e.function})),i=ZU.concat(r),a=$U(i,t);if(a){n(a);return}let o=[];Array.isArray(e.files)?o=[...e.files]:e.files&&(o=[String(e.files)]);let s=e.strings||{},c=Object.keys(s),l=e.config||{default:!0},u=e.configParsers||void 0,d=e.frontMatter===void 0?X.frontMatterRe:e.frontMatter,f=!!e.handleRuleFailures,p=!!e.noInlineConfig,m=e.markdownItFactory||(()=>{throw Error(`The option 'markdownItFactory' was required (due to the option 'customRules' including a rule requiring the 'markdown-it' parser), but 'markdownItFactory' was not set.`)}),h=e.fs||SB,g=tW(i),_={},v=!1,y=0;function b(){let e;function r(r,i){return y--,r?(v=!0,n(r)):(_[e]=i,t||b(),null)}if(!v){if(e=o.shift())y++,aW(i,g,e,m,l,u,d,f,p,h,t,r);else if(e=c.shift())y++,iW(i,g,e,s[e]||``,m,l,u,d,f,p,t,r);else if(y===0){v=!0;let e=Object.entries(_);e.sort(([e],[t])=>e.localeCompare(t));let t=Object.fromEntries(e);return n(null,t)}}return null}if(t)for(;!v;)b();else b(),b(),b(),b(),b(),b(),b(),b()}function sW(e){let t=null;return oW(e,!0,function(e,n){if(e)throw e;t=n}),t}function cW(e,t=0){return{lineNumber:e.lineNumber||t,editColumn:e.editColumn||1,deleteCount:e.deleteCount||0,insertText:e.insertText||``}}function lW(e,t,n=`
269
+ `){let{editColumn:r,deleteCount:i,insertText:a}=cW(t),o=r-1;return i===-1?null:e.slice(0,o)+a.replace(/\n/g,n)+e.slice(o+i)}function uW(e,t){let n=X.getPreferredLineEnding(e,CB),r=e.split(X.newLineRe),i=t.filter(e=>e.fixInfo).map(e=>cW(e.fixInfo,e.lineNumber));i.sort((e,t)=>{let n=e.deleteCount===-1,r=t.deleteCount===-1;return t.lineNumber-e.lineNumber||(n?1:r?-1:0)||t.editColumn-e.editColumn||t.insertText.length-e.insertText.length});let a={};i=i.filter(e=>{let t=e.lineNumber!==a.lineNumber||e.editColumn!==a.editColumn||e.deleteCount!==a.deleteCount||e.insertText!==a.insertText;return a=e,t}),a={lineNumber:-1};for(let e of i)e.lineNumber===a.lineNumber&&e.editColumn===a.editColumn&&!e.insertText&&e.deleteCount>0&&a.insertText&&!a.deleteCount&&(e.insertText=a.insertText,a.lineNumber=0),a=e;i=i.filter(e=>e.lineNumber);let o=-1,s=-1;for(let e of i){let{lineNumber:t,editColumn:i,deleteCount:a}=e,c=t-1,l=i-1;(c!==o||a===-1||l+a<=s-(a>0?0:1))&&(r[c]=lW(r[c],e,n)),o=c,s=l}return r.filter(e=>e!==null).join(n)}function dW(e,t){return uW(e,sW({strings:{doc:e},config:t}).doc??[])}function fW(e,t){let n=sW({strings:{doc:e},config:t}).doc??[],r=e.split(`
270
+ `),i=pW(t);return n.map(e=>hW(e,r,mW(e,i)))}function pW(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function mW(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function hW(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[gW(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function gW(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}const _W=ie([p(),c([`error`,`warning`]),v(T(),y())]),vW=[{id:`markdownlint`,sliceSchema:g({enabled:p(),rules:v(T(),_W)}),defaultSlice:{enabled:!1,rules:bB},async lint(e,t){return fW(e,xB(t.rules))},fix(e,t){return dW(e,xB(t.rules))}}],yW={enabled:!0,plugins:Object.fromEntries(vW.map(e=>[e.id,e.defaultSlice]))};function bW(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??bB}}}}const xW=Object.fromEntries(vW.map(e=>[e.id,e.sliceSchema])),SW=g({effective:g({enabled:p(),plugins:g(xW)}),configFile:T().nullable().optional(),configProblems:m(T()).optional()}),CW=ie([p(),v(T(),y())]),wW=g({ruleId:T().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:ie([CW,D()])}),TW=g({line:S(),character:S()}),EW=g({start:TW,end:TW}),DW=g({range:EW,severity:c([`error`,`warning`,`info`,`hint`]),source:T(),code:T(),message:T(),fixes:m(g({range:EW,newText:T()})).optional()}),OW=g({file:T(),diagnostics:m(DW)}),kW=g({files:m(OW),fileCount:S(),errorCount:S(),warningCount:S(),warnings:m(T())}),AW=g({docName:ny,summary:ay,...iy}).loose(),jW=g({file:T(),fixedCount:S(),diagnostics:m(DW),errorCount:S(),warningCount:S(),warning:T().optional()}),MW=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],NW=(()=>{let e=new Map;for(let t of MW){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function PW(e){return NW.get(e.toUpperCase())??null}function FW(e,t){let n=PW(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))PW(t)===n&&(r={key:t,value:i});return r}async function IW(e,t,n){if(!t.enabled)return[];let r=[];for(let i of vW){let a=t.plugins[i.id];a.enabled&&r.push(...await i.lint(e,a,{docName:n}))}return r}function LW(e,t){if(!t.enabled)return e;let n=e;for(let e of vW){let r=t.plugins[e.id];!r.enabled||!e.fix||(n=e.fix(n,r))}return n}const RW=/\p{M}+/gu,zW=/[^\p{L}\p{N}]+/gu,BW=/^-+|-+$/g;function VW(e){return e.trim().normalize(`NFKD`).replace(RW,``).toLowerCase().replace(zW,`-`).replace(BW,``)}function HW(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function UW(e,t){let n=VW(e);return n?HW(n,t):``}const WW=new Set([`img`,`video`,`audio`,`mark`]);new Map(_N.flatMap(e=>e.surface===`compat`&&WW.has(e.rendersAs)?[[e.name,e]]:[])),ok(`<>`);const GW=FR(),KW=$L(),qW=eR();function JW(){return _N.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function YW(){return JW().filter(e=>XW(e)!==`fence`)}function XW(e){return e.name===`MermaidFence`?`fence`:e.hasChildren?`jsx-block`:`jsx-void`}function ZW(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:XW(e)}}function QW(e){if(e.hidden!==!0&&e.type!==`reactnode`){if(`defaultValue`in e&&e.defaultValue!==void 0)return e.defaultValue;if(e.type===`enum`)return e.enumValues[0];if(e.type===`string`)return``;if(e.type===`number`)return 0;if(e.type===`boolean`)return!1}}function $W(e,t){return!(e.omitOnDefault===!0&&`defaultValue`in e&&Object.is(e.defaultValue,t)||e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&t===``)}function eG(e){let t=[];for(let n of e.props){let e=QW(n);e!==void 0&&$W(n,e)&&t.push(AM(n.name,e))}return t}function tG(e){return iF(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[GW],mdastExtensions:[KW]}).children}function nG(e){let t=XW(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
271
+ A --> B`};else{let r=eG(e),i=t===`jsx-block`?tG(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return sO({type:`root`,children:[n]},{extensions:[qW]}).trimEnd()}function rG(e){let t=[];for(let n of e.props){if(n.hidden===!0)continue;let e={name:n.name,type:n.type,required:n.required};n.description!==void 0&&(e.description=n.description),n.advanced===!0&&(e.advanced=!0),n.omitOnDefault===!0&&(e.omitOnDefault=!0),n.type===`enum`&&(e.values=n.enumValues,n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue)),n.type===`string`&&(n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.language!==void 0&&(e.language=n.language),n.accept!==void 0&&(e.accept=n.accept)),n.type===`boolean`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.type===`number`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),t.push(e)}return t}function iG(e){return{...ZW(e),example:nG(e),params:rG(e)}}function aG(){return[``,"**Custom canonical components.** OK `.md` / `.mdx` supports the JSX components below — use whichever is semantically useful in any part of the doc. For full source syntax + parameter schemas, call `palette({ components: [ids] })` with the ids you want to use. Fenced code blocks render naturally and don't need a fetch — including ` ```mermaid ` for diagrams (mermaid label text has sharp edges — `palette({ components: [\"Mermaid\"] })` lists them; parse failures come back as `warnings` entries on write/edit) and ` ```html preview ` for interactive HTML/JS/CSS pages (the fence info-string `preview` token renders the block as a live iframe; works for `html` / `htm` / `xml`; optional `h=` / `w=` tokens set size, e.g. ` ```html preview h=400px `). Use ` ```html preview ` whenever you want anything interactive or JS-powered (charts, demos, calculators, animations) — just author the standalone HTML page in the fence. Call `palette` for the markdown-native component forms (write `> [!NOTE]`, not `<Callout>`), copy-ready themed `html preview` starters, and the theme tokens (`var(--chart-1)`, `var(--foreground)`, …) an embed should reference so it tracks the reader's light/dark theme. Arbitrary `<TagName>` JSX falls through as raw MDX when no canonical fits.",``,...YW().map(ZW).map(e=>`- \`${e.id}\` (${e.kind}) — ${e.description}`)].join(`
272
+ `)}const oG=[`text`,`number`,`boolean`,`date`,`list`,`object`];c(oG);const sG=ie([T(),S(),p()]),cG=re(()=>ie([sG.transform(e=>String(e)),v(T(),lG),m(cG)])),lG=re(()=>ie([T(),S(),p(),m(cG),v(T(),lG)]));function uG(e){if(Array.isArray(e)){let t=[];for(let n of e)n!==null&&t.push(uG(n));return t}if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=r===null?``:uG(r);return t}return e}const dG=ne(uG,v(T(),lG));v(T(),ie([lG,D()]));function fG(e){return!!(e===null||typeof e==`string`&&e===``||Array.isArray(e)&&e.length===0)}const pG=g({docName:ny,summary:ay,content:T().optional(),...iy}).loose(),mG=g({docName:ny,summary:ay,markdown:T(),position:c([`append`,`prepend`,`replace`]).optional(),extension:c(Ye).optional(),...iy}).loose(),hG=g({docName:ny,summary:ay,find:T().min(1),replace:T(),offset:S().int().nonnegative().optional(),...iy}).loose(),gG=g({docName:ny,connectionId:T().min(1),scope:c([`last`,`session`,`file`,`count`]).optional(),count:S().int().positive().optional(),...iy}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]}),_G=g({value:T(),truncatedFrom:S().int().nonnegative().optional(),hint:T().optional()}).loose(),vG=d(`kind`,[g({kind:E(`inline`),content:T()}),g({kind:E(`truncated`),byteLength:S().int().nonnegative(),hint:T()})]),yG=g({kind:E(`content-divergence`),intendedBytes:S().int().nonnegative(),actualBytes:S().int().nonnegative(),byteDelta:S().int(),divergenceType:T().optional(),currentState:vG.optional(),hint:T().optional()}).loose(),bG=g({type:E(`orphan`),parentCandidates:m(T()),message:T()}).loose(),xG=g({kind:E(`disk-edit-reconciled`),intendedBytes:S().int().nonnegative(),actualBytes:S().int().nonnegative(),byteDelta:S().int(),mergeOutcome:T().optional(),hint:T().optional()}).loose(),SG=d(`kind`,[yG,xG]),CG=d(`kind`,[yG,xG,g({kind:E(`mermaid-parse-error`),fenceIndex:S().int().positive(),fenceFirstLine:T(),message:T(),line:S().int().positive().optional()}).loose(),g({kind:E(`lint-violation`),source:T(),code:T(),message:T(),severity:c([`error`,`warning`,`info`,`hint`]),line:S().int().positive(),column:S().int().positive()}).loose()]),wG=m(CG).min(1),TG=g({href:T(),resolvedTo:T().nullable(),reason:c([`no-such-doc`,`no-such-file`,`unresolvable`])}).loose(),EG=m(TG),DG=g({timestamp:T().min(1),summary:_G.optional(),warning:SG.optional(),warnings:wG.optional()}).loose(),OG=g({timestamp:T().min(1),subscriberCount:S().int().nonnegative(),systemSubscriberCount:S().int().nonnegative(),hints:m(bG).optional(),summary:_G.optional(),warning:SG.optional(),warnings:wG.optional(),brokenLinks:EG}).loose(),kG=g({timestamp:T().min(1),subscriberCount:S().int().nonnegative(),systemSubscriberCount:S().int().nonnegative(),summary:_G.optional(),warning:SG.optional(),warnings:wG.optional(),brokenLinks:EG}).loose(),AG=g({docName:T().min(1),scope:c([`last`,`session`,`count`]),undone:p()}).loose(),jG=g({docs:m(g({docName:ry,markdown:T(),position:c([`append`,`prepend`,`replace`]).optional(),extension:c(Ye).optional(),summary:ay}).loose()).min(1).max(100),...iy}).loose(),MG=g({type:Vy,title:T(),detail:T().optional()}).loose(),NG=d(`status`,[g({status:E(`written`),docName:T().min(1),summary:_G.optional(),warnings:wG.optional(),brokenLinks:EG}).loose(),g({status:E(`error`),docName:T().min(1),error:MG}).loose()]),PG=g({timestamp:T().min(1),results:m(NG),written:S().int().nonnegative(),failed:S().int().nonnegative()}).loose(),FG=g({docName:ny,patch:v(T(),ie([lG,D()])),types:v(T(),c(oG)).optional(),summary:ay,...iy}).loose(),IG=g({timestamp:T().min(1),subscriberCount:S().int().nonnegative(),systemSubscriberCount:S().int().nonnegative(),appliedKeys:m(T()),summary:_G.optional(),warning:SG.optional(),warnings:wG.optional(),brokenLinks:EG}).loose(),LG=g({entries:m(g({level:c([`info`,`warn`,`error`]),message:T().max(8192),event:T().optional(),fields:v(T(),y()).optional(),ts:S().optional(),sourceId:T().optional(),lineNumber:S().optional()}).loose()).max(100),droppedSinceLastFlush:S().int().min(0).optional()}).loose(),RG=g({accepted:S().int().min(0)}).loose(),zG=g({status:T().min(1),reason:T()}).loose(),BG=g({docName:T().min(1),content:T(),lifecycle:zG.nullable()}).loose(),VG=g({documents:m(g({kind:c([`document`,`asset`,`folder`,`file`]).default(`document`),docName:T().min(1).optional(),docExt:T().min(1).default(`.md`),size:S().int().nonnegative(),modified:T().min(1),isSymlink:p().default(!1),canonicalDocName:T().nullable().default(null),targetPath:T().nullable().default(null),path:T().min(1).optional(),assetExt:T().min(1).optional(),mediaKind:c([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`]).nullable().optional(),referencedBy:m(T().min(1)).optional(),hasChildren:p().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`})),truncated:p().optional()}).loose(),HG=g({source:T().min(1),anchor:T().nullable(),title:T(),snippet:T().nullable()}).loose(),UG=g({docName:T().min(1),backlinks:m(HG)}).loose(),WG=g({counts:v(T().min(1),S().int().nonnegative())}).loose(),GG=d(`kind`,[g({kind:E(`doc`),docName:T().min(1),anchor:T().nullable(),title:T(),snippet:T().nullable()}).loose(),g({kind:E(`external`),url:T().min(1),title:T(),snippet:T().nullable()}).loose()]),KG=g({docName:T().min(1),forwardLinks:m(GG)}).loose(),qG=d(`kind`,[g({id:T().min(1),kind:E(`doc`),docName:T().min(1),anchor:T().nullable(),label:T(),cluster:T().nullable(),category:T().nullable(),tags:m(T()).nullable()}).loose(),g({id:T().min(1),kind:E(`external`),url:T().min(1),label:T()}).loose()]),JG=g({source:T().min(1),target:T().min(1)}).loose(),YG=g({nodes:m(qG),links:m(JG)}).loose(),XG=g({ts:S().int().min(0),url:T(),method:T(),ua:T().optional(),origin:T().optional(),referer:T().optional(),host:T().optional(),remote:T().optional(),secChUa:T().optional(),secChUaMobile:T().optional(),secChUaPlatform:T().optional(),secFetchSite:T().optional(),secFetchDest:T().optional(),secFetchMode:T().optional(),secFetchUser:T().optional()}).loose(),ZG=g({app:ie([E(`cursor`),E(`codex`),E(`claude`),D()]),signals_fired:m(T())}).loose(),QG=g({entries:m(XG),count:S().int().min(0),detection:ZG}).loose(),$G=g({writers:m(g({id:T().min(1),name:T().optional(),email:T().optional()}).loose()).optional(),summary:ay,...iy}).loose(),eK=g({checkpointRef:T().min(1)}).loose(),tK=g({v:S().int().optional(),id:T().min(1),name:T().min(1),colorSeed:T().optional(),docs:m(T()),summaries:m(T()).optional()}).loose(),nK=g({entries:m(g({sha:T().min(1),timestamp:T().min(1),author:T(),authorEmail:T(),type:c([`checkpoint`,`wip`,`upstream`,`park`]),message:T(),contributors:m(tK),checkpoint:y().nullable(),parentSha:T().nullable().optional()}).loose()),total:S().int().nonnegative().optional(),truncated:p().optional(),hasMore:p().optional()}).loose(),rK=g({sha:T().regex(/^[0-9a-f]{40}$/i),content:T(),timestamp:T(),author:T()}).loose(),iK=g({contentDir:T().min(1),pathSeparator:c([`/`,`\\`]),symlinkResolved:p()}).loose(),aK=m(d(`source`,[g({docName:T().min(1),timestamp:T().min(1),size:S().int().nonnegative(),source:E(`flat`)}).loose(),g({docName:T().min(1),timestamp:T().min(1),source:E(`timeline`),sha:T().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),oK=g({domain:T().min(1),title:T().optional(),description:T().optional(),siteName:T().optional(),faviconDataUri:T().optional()}).loose(),sK=g({url:T()}).loose(),cK=d(`ok`,[g({ok:E(!0),metadata:oK}).loose(),g({ok:E(!1),reason:T()}).loose()]),lK=g({orphans:m(g({docName:T().min(1),title:T()}).loose())}).loose(),uK=g({hubs:m(g({docName:T().min(1),title:T(),count:S().int().nonnegative()}).loose())}).loose(),dK=g({source:T().min(1),title:T(),snippet:T().nullable()}).loose(),fK=g({deadLinks:m(g({target:T().min(1),sources:m(dK)}).loose())}).loose(),pK=g({target:g({docName:T().min(1),title:T(),aliases:m(T())}).loose(),mentions:m(g({source:T().min(1),excerpt:T(),offset:S().int().nonnegative()}).loose()),truncated:p()}).loose(),mK=g({projectPath:T().min(1)}).loose(),hK=c([`not-a-git-worktree`,`init-failed`]),gK=d(`ok`,[g({ok:E(!0),projectPath:T().min(1)}).loose(),g({ok:E(!1),reason:hK,message:T().min(1)}).loose()]),_K=g({host:T().min(1).optional()}).loose(),vK=g({host:T().min(1).optional(),token:T().min(1)}).loose(),yK=g({host:T(),login:T()}).loose(),bK=g({key:T().min(1)}).loose(),xK=g({keyPresent:p()}).loose(),SK=g({name:T().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:T().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),CK=g({authenticated:p()}).loose(),wK=g({}).loose(),TK=g({stackIndex:S().int().min(0),ts:S().int().min(0),additions:S().int().min(0),deletions:S().int().min(0)}).loose(),EK=g({docName:T().min(1),additionsTotal:S().int().min(0),deletionsTotal:S().int().min(0),lastTs:S().int().min(0),bursts:m(TK)}).loose(),DK=g({displayName:T().min(1),color:T().min(1),icon:T().optional(),connectionId:T().min(1)}).loose(),OK=g({sessionAlive:p(),agent:DK.nullable(),files:m(EK)}).loose(),kK=g({diff:T(),before:T(),after:T(),generatedAt:S().int().min(0)}).loose(),AK=g({}).loose(),jK=g({}).loose(),MK=g({}).loose(),NK=g({}).loose(),PK=g({}).loose(),FK=g({}).loose(),IK=g({displayName:T().min(1),icon:T(),color:T().min(1),currentDoc:T().nullable(),mode:c([`idle`,`writing`]),ts:S().int().min(0)}).loose(),LK=g({presence:v(T().min(1),IK)}).loose(),RK=g({sessionId:T().min(1),agentType:T().min(1),ts:S().int().min(0),insertedChars:S().int().min(0),deletedChars:S().int().min(0)}).loose(),zK=g({effects:m(g({"doc.name":T().min(1),entries:m(RK)}).loose())}).loose(),BK=g({decisions:m(g({ts:S().int().min(0),decision:T().min(1),kind:T().min(1),"doc.name":T().min(1),pathRole:T().min(1)}).loose())}).loose(),VK=v(T().min(1),p()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});g({path:T().min(1,`path must be non-empty`)}).loose();const HK=g({}).loose(),UK=g({fromDocName:T().min(1),toDocName:T().min(1)}).loose(),WK=g({fromPath:T().min(1),toPath:T().min(1)}).loose(),GK=g({}).loose(),KK=g({path:T().min(1),...iy,summary:ay}).loose(),qK=g({docName:T().min(1)}).loose(),JK=g({path:T().min(1),...iy,summary:ay}).loose(),YK=g({path:T().min(1)}).loose(),XK=g({kind:c([`file`,`folder`]),path:T().min(1),...iy,summary:ay}).loose(),ZK=g({kind:c([`file`,`folder`]),path:T().min(1),duplicatedDocNames:m(T().min(1))}).loose(),QK=g({pages:m(g({docName:T().min(1),title:T(),docExt:T().min(1),size:S().int().nonnegative(),modified:T().min(1),icon:T().min(1).max(2048).optional()}).loose())}).loose(),$K=g({level:S().int().min(1).max(6),text:T(),slug:T()}).loose(),eq=g({docName:T().min(1),headings:m($K)}).loose(),tq=g({docName:T().min(1),rewrites:S().int().nonnegative()}).loose(),nq=g({kind:c([`file`,`folder`,`asset`]),fromPath:T().min(1),toPath:T().min(1),...iy,summary:ay}).loose(),rq=g({renamed:m(UK),renamedAssets:m(WK),rewrittenDocs:m(tq).optional(),summary:_G.optional()}).loose(),iq=g({kind:c([`file`,`folder`,`asset`]),path:T().min(1),...iy}).loose(),aq=g({deletedDocNames:m(T().min(1))}).loose(),oq=g({kind:c([`file`,`folder`,`asset`]),path:T().min(1),...iy,summary:ay}).loose(),sq=g({deletedDocNames:m(T().min(1))}).loose(),cq=g({docName:T().min(1),commitSha:T().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:ay,...iy}).loose(),lq=g({restoredFrom:T().min(1),timestamp:T().min(1),summary:_G.optional(),warning:yG.optional(),warnings:wG.optional()}).loose(),uq=c([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),dq=g({label:T().min(1),webUrl:b().nullable()}).loose(),fq=d(`checkStatus`,[g({checkStatus:E(`allowed`)}).loose(),g({checkStatus:E(`denied`),deniedReason:c([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`])}).loose(),g({checkStatus:E(`unknown`),unknownError:c([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),pq=c([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]),mq=g({state:uq,lastSyncUtc:T().nullable(),lastFetchUtc:T().nullable(),lastPushedSha:T().nullable(),ahead:S().int().min(0),behind:S().int().min(0),consecutiveFailures:S().int().min(0),conflictCount:S().int().min(0),hasRemote:p(),syncEnabled:p(),identityUnresolved:p(),remote:dq.nullable().optional(),pushError:T().optional(),pushErrorCode:pq.optional(),pullError:T().optional(),pullErrorCode:pq.optional(),pausedReason:T().optional(),pushPermission:fq.optional()}).loose(),hq=g({op:c([`sync`,`push`,`pull`]).optional()}).loose(),gq=g({op:c([`sync`,`push`,`pull`])}).loose(),_q=g({conflicts:m(g({file:T().min(1),detectedAt:T().min(1),oursSha:T().optional(),theirsSha:T().optional(),baseSha:T().optional()}).loose())}).loose(),vq=g({file:T().min(1),strategy:c([`mine`,`theirs`,`content`,`delete`]),content:T().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),yq=g({}).loose(),bq=g({file:T().min(1),base:T(),ours:T(),theirs:T(),kind:c([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:T().nullable()}).loose(),xq=g({plan:h(e=>e!==void 0,{message:`plan is required`})}).loose(),Sq=g({plan:h(e=>e!==void 0,{message:`plan is required`})}).loose(),Cq=g({result:h(e=>e!==void 0,{message:`result is required`})}).loose(),wq=g({path:T().min(1),summary:T().min(1)}).loose(),Tq=g({files:S().int().nonnegative(),folders:S().int().nonnegative()}).loose(),Eq=g({packs:m(g({id:T().min(1),name:T().min(1),description:T().min(1),defaultSubfolder:T().optional(),folders:m(wq),entryCounts:Tq}).loose())}).loose(),Dq=g({noOpen:p().optional(),out:T().min(1).optional()}).loose(),Oq=g({reason:c([`unsupported-platform`,`spawn-error`]),message:T()}).loose(),kq=d(`status`,[g({status:E(`installed`),outputPath:T(),size:S().int().nonnegative(),sha256:T(),skillVersion:T()}).loose(),g({status:E(`built`),outputPath:T(),size:S().int().nonnegative(),sha256:T(),skillVersion:T(),handoffError:Oq.optional()}).loose(),g({status:E(`failed`),buildError:T()}).loose(),g({status:E(`skip-current`),skillVersion:T(),recordedAt:T().optional()}).loose()]),Aq=[`.ok`,`skill-targets.json`],jq=c(tt),Mq=te({schema:E(1),targets:m(jq).default([])});function Nq(e){let t;try{t=JSON.parse(e)}catch{return null}let n=Mq.safeParse(t);return n.success?n.data:null}const Pq=g({tags:m(g({name:T().min(1),count:S().int().nonnegative(),isLeaf:p()}).loose())}).loose(),Fq=g({docName:T().min(1),title:T(),matchingTags:m(T().min(1)),snippet:T().nullable()}).loose(),Iq=g({name:T().min(1),docs:m(Fq)}).loose(),Lq=g({folder:y(),frontmatter_local:v(T(),y()).nullable()}).loose(),Rq=g({path:T(),frontmatter:v(T(),y()).optional()}).loose(),zq=g({applied:y()}).loose(),Bq=v(T(),y()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Vq=g({template:g({name:T().min(1),folder:T(),scope:c([`local`,`inherited`]),path:T().min(1),frontmatter:Bq,body:T()}).strict()}).strict(),Hq=g({templates:m(g({name:T().min(1),title:T().optional(),description:T().optional(),path:T().min(1),source_folder:T()}).strict()),truncated:p()}).strict(),Uq=g({folder:T(),name:T(),body:T().optional(),frontmatter:Bq.optional(),...iy,summary:ay}).strict(),Wq=g({path:T().min(1),created:p(),warnings:m(T())}).strict(),Gq=g({sourcePath:T().min(1),targetFolder:T(),name:T().optional(),title:T().optional(),deleteSource:p().optional(),...iy,summary:ay}).strict(),Kq=g({path:T().min(1),created:p(),warnings:m(T())}).strict(),qq=g({existed:p(),path:T().min(1)}).strict(),Jq=g({fromFolder:T(),fromName:T(),toFolder:T(),toName:T(),body:T().optional(),frontmatter:Bq.optional(),...iy,summary:ay}).strict(),Yq=g({from:T().min(1),to:T().min(1),committed:p()}).strict(),Xq=c(Pe),Zq=/^[a-z0-9-]+$/,Qq=/<\/?[A-Za-z][^>]*>/;function $q(e){return Qq.test(e)}const eJ=/^[A-Za-z0-9_-]+$/,tJ=g({name:T(),description:T()}).strict(),nJ=g({skill:g({name:T().min(1),scope:Xq,path:T().min(1),frontmatter:tJ,body:T(),files:m(g({path:T().min(1),text:T().nullable()})).optional(),managed:p().optional()}).strict()}).strict(),rJ=g({skills:m(g({name:T().min(1),description:T().optional(),scope:Xq,path:T().min(1),absolutePath:T().min(1).optional(),installed:p(),hosts:m(T()),installedVersion:T().optional(),bundledVersion:T().optional(),updateAvailable:p().optional(),managed:p().optional()}).strict()),truncated:p()}).strict(),iJ=g({scope:Xq.default(`project`),name:T(),body:T().optional(),frontmatter:tJ,...iy,summary:ay}).strict(),aJ=g({path:T().min(1),created:p(),warnings:m(T())}).strict(),oJ=g({scope:Xq.default(`project`),name:T(),...iy,summary:ay}).strict(),sJ=g({name:T().min(1),version:T().min(1),previousVersion:T().optional(),checkpointRef:T().optional()}).strict(),cJ=g({existed:p(),path:T().min(1)}).strict(),lJ=g({scope:Xq.default(`project`),fromName:T(),toName:T(),body:T().optional(),frontmatter:tJ.optional(),...iy,summary:ay}).strict(),uJ=g({from:T().min(1),to:T().min(1),committed:p()}).strict(),dJ=c([`reference`,`script`]),fJ=g({scope:Xq.default(`project`),name:T(),path:T().min(1),content:T(),...iy,summary:ay}).strict(),pJ=g({path:T().min(1),created:p(),kind:dJ,content:p()}).strict(),mJ=g({path:T().min(1),kind:dJ,text:T()}).strict(),hJ=g({path:T().min(1),existed:p(),kind:dJ}).strict(),gJ=g({scope:Xq.default(`project`),name:T(),targets:m(jq).optional().meta({description:`Explicit editor ids to install into; omit to use project-configured editors.`}),...iy,summary:ay}).strict(),_J=g({name:T().min(1),hosts:m(T()),scripts:p(),warnings:m(T()),warningCodes:m(c([`no-targets`,`scripts-present`]))}).strict(),vJ=g({scope:Xq.default(`project`),name:T()}).strict(),yJ=g({name:T().min(1),uninstalled:p()}).strict(),bJ=g({targets:m(jq),configured:p()}).strict(),xJ=g({targets:m(jq)}).strict(),SJ=g({targets:m(jq),reprojected:m(g({name:T(),hosts:m(T())}).strict()),bundleHosts:m(T()),removedFrom:m(T())}).strict(),CJ=g({scope:Xq.default(`project`),name:T(),version:T().regex(/^[0-9a-f]{40}$/i),...iy,summary:ay}).strict(),wJ=g({name:T().min(1),version:T(),restoredFiles:m(T()),warnings:m(T())}).strict(),TJ=g({query:T().optional(),intent:c([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:c([`navigation`,`relevance`]).optional(),scopes:m(c([`page`,`folder`,`content`,`file`])).optional(),scope:T().optional(),limit:S().int().nonnegative().optional(),semantic:p().optional(),source:c([`omnibar`,`mcp`,`http`]).optional()}).loose(),EJ=g({kind:c([`page`,`folder`,`content`,`file`]),path:T().min(1),title:T(),score:S(),signals:v(T(),y()),snippet:T().optional()}).loose(),DJ=g({capable:p(),applied:p(),coverage:g({embedded:S().int().nonnegative(),total:S().int().nonnegative()})}).loose(),OJ=g({enabled:p(),keyPresent:p(),keySource:c([`file`,`env`]).nullable(),keyHint:T().nullable(),ready:p(),capable:p(),embedded:S().int().nonnegative(),total:S().int().nonnegative()}).loose(),kJ=g({query:T(),intent:c([`autocomplete`,`full_text`,`omnibar`]),results:m(EJ),elapsedMs:S().nonnegative(),semantic:DJ.optional(),truncated:p().optional(),ready:p().optional()}).loose(),AJ=g({version:T().min(1),recordedAt:T().min(1)}).loose(),jJ=g({currentVersion:T().min(1),targets:v(T(),AJ.nullable())}).loose(),MJ=`server-info`,NJ=`branch-switched`,PJ=`disk-ack`,FJ=`config-validation-rejected`,IJ=`config-ignore-nested-error`,LJ=c([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),RJ=g({v:E(1),ch:E(MJ),seq:S(),serverInstanceId:T().min(1),currentBranch:T().min(1).optional()}).loose(),zJ=g({v:E(1),ch:E(NJ),seq:S(),branch:T().min(1)}).loose(),BJ=g({v:E(1),ch:LJ,seq:S()}).loose(),VJ=g({v:E(1),ch:E(PJ),seq:S(),docName:T().min(1),sv:T().min(1)}).loose(),HJ=g({v:E(1),ch:E(FJ),seq:S(),docName:T().min(1),error:_}).loose(),UJ=g({v:E(1),ch:E(IJ),seq:S(),path:T().min(1),error:T().min(1)}).loose();function WJ(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function GJ(e){return e.reason!==void 0||WJ(e.note)!==void 0||WJ(e.email)!==void 0}function KJ(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function qJ(){return KJ((typeof process>`u`?void 0:WJ(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function JJ(e){let t=WJ(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function YJ(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function XJ(e,t={}){let n=qJ();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=WJ(e.note),a=JJ(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return YJ(r,o,c());let l=await YJ(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:YJ(r,o,c())}var ZJ=t(r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var ee=-b+v;ee<=b-y;ee+=2){for(var T=l+ee,E=ee==-b||ee!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,D=E-ee;E<o&&D<s&&e.charAt(o-E-1)==t.charAt(s-D-1);)E++,D++;if(f[T]=E,E>o)y+=2;else if(D>s)v+=2;else if(!h){var S=l+m-ee;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
273
273
  `,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``;break}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&amp;`).replace(o,`&lt;`).replace(s,`&gt;`).replace(c,`&para;<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`;break}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0;break}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length;break}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p);break}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
274
274
  `),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
275
275
  `],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `;break}n[s+1]=o+encodeURI(this.diffs[s][1])+`
276
- `}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}))(),1);const $J=new QJ.default;function eY(e,t){if(e===t)return[{value:e}];let{chars1:n,chars2:r,lineArray:i}=$J.diff_linesToChars_(e,t),a=$J.diff_main(n,r,!1);$J.diff_charsToLines_(a,i);let o=[];for(let[e,t]of a){if(t.length===0)continue;let n=o[o.length-1],r=e===QJ.default.DIFF_DELETE,i=e===QJ.default.DIFF_INSERT;if(n&&!!n.removed===r&&!!n.added===i){n.value+=t;continue}r?o.push({value:t,removed:!0}):i?o.push({value:t,added:!0}):o.push({value:t})}return o}const tY=256*1024;function nY(e,t,n){if(t===n)return;let r=eY(t,n),i=0;for(let n=0;n<r.length;n++){let a=r[n],o=r[n+1];if(a.removed&&o?.added){if(t.substring(i,i+o.value.length)===o.value){i+=o.value.length,n++;continue}e.delete(i,a.value.length),e.insert(i,o.value),i+=o.value.length,n++}else a.removed?e.delete(i,a.value.length):(a.added&&e.insert(i,a.value),i+=a.value.length)}}function rY(e,t,n){if(t===n)return;if(t.length>tY||n.length>tY){iY(e,t,n);return}let r=eY(t,n),i=0;for(let t of r)t.removed?e.delete(i,t.value.length):(t.added&&e.insert(i,t.value),i+=t.value.length)}function iY(e,t,n){let r=0,i=Math.min(t.length,n.length);for(;r<i&&t.charCodeAt(r)===n.charCodeAt(r);)r++;r>0&&(r=t.lastIndexOf(`
276
+ `}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}))(),1);const QJ=new ZJ.default;function $J(e,t){if(e===t)return[{value:e}];let{chars1:n,chars2:r,lineArray:i}=QJ.diff_linesToChars_(e,t),a=QJ.diff_main(n,r,!1);QJ.diff_charsToLines_(a,i);let o=[];for(let[e,t]of a){if(t.length===0)continue;let n=o[o.length-1],r=e===ZJ.default.DIFF_DELETE,i=e===ZJ.default.DIFF_INSERT;if(n&&!!n.removed===r&&!!n.added===i){n.value+=t;continue}r?o.push({value:t,removed:!0}):i?o.push({value:t,added:!0}):o.push({value:t})}return o}const eY=256*1024;function tY(e,t,n){if(t===n)return;let r=$J(t,n),i=0;for(let n=0;n<r.length;n++){let a=r[n],o=r[n+1];if(a.removed&&o?.added){if(t.substring(i,i+o.value.length)===o.value){i+=o.value.length,n++;continue}e.delete(i,a.value.length),e.insert(i,o.value),i+=o.value.length,n++}else a.removed?e.delete(i,a.value.length):(a.added&&e.insert(i,a.value),i+=a.value.length)}}function nY(e,t,n){if(t===n)return;if(t.length>eY||n.length>eY){rY(e,t,n);return}let r=$J(t,n),i=0;for(let t of r)t.removed?e.delete(i,t.value.length):(t.added&&e.insert(i,t.value),i+=t.value.length)}function rY(e,t,n){let r=0,i=Math.min(t.length,n.length);for(;r<i&&t.charCodeAt(r)===n.charCodeAt(r);)r++;r>0&&(r=t.lastIndexOf(`
277
277
  `,r-1)+1);let a=0;for(;a<i-r&&t.charCodeAt(t.length-1-a)===n.charCodeAt(n.length-1-a);)a++;if(a>0){let e=t.length-a,r=n.length-a,i=e===0||t.charCodeAt(e-1)===10,o=r===0||n.charCodeAt(r-1)===10;if(!(i&&o)){let n=t.indexOf(`
278
- `,e);a=n===-1?0:t.length-(n+1)}}let o=t.length-r-a,s=n.slice(r,n.length-a);o>0&&e.delete(r,o),s.length>0&&e.insert(r,s)}const aY=g({path:m(ie([T(),S()])),message:T(),issueCode:T()});d(`code`,[g({code:E(`SCHEMA_INVALID`),issues:m(aY)}),g({code:E(`WRITE_ERROR`),detail:T()})]);const oY={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function sY(e){if(e.trim()===``)return{doc:new Ce.Document({}),map:{}};let t;try{t=(0,Ce.parseDocument)(e)}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new Ce.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=fG.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function cY(e){return Object.keys(e).length===0?``:new Ce.Document(e).toString(oY)}function lY(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function uY(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=(0,Ce.isSeq)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(lY(n)){let r=e.createNode(n),i=(0,Ce.isMap)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function dY(e){return e===``?``:`---\n${e.endsWith(`
279
- `)?e.slice(0,-1):e}\n---\n`}function fY(e){let t=e.match(kp);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function pY(e){if(e.trim()===``)return{doc:new Ce.Document({}),map:{}};let t;try{t=(0,Ce.parseDocument)(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new Ce.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=fG.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function mY(e){return e===``?{doc:new Ce.Document({}),map:{}}:pY(Mp(e))}function hY(e){let{fenced:t}=fY(e),{map:n}=mY(t);return n??{}}function gY(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function _Y(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:dY(e.toString(oY))}function vY(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:65536}:null}function yY(e){let t=_Y(e),n=vY(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function bY(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:`frontmatter`}};let{doc:n,map:r}=mY(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{gY(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=uG.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,uY(n,n.get(e,!0),t.data))}return yY(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function xY(e,t){let n=t?.verbose===!0,r=t?.nowMs===void 0?new Date().toISOString():new Date(t.nowMs).toISOString(),i={event:`bridge-invariant-violation`,site:e.site,"doc.name":e.docName??null,"tolerance-class-attempted":`untracked`,"normalize-equal-modulo-tolerance":!1,ytextLen:e.ytextSnapshot.length,fragmentLen:e.fragmentMdSnapshot.length,ytextHash:he(e.ytextSnapshot),fragmentHash:he(e.fragmentMdSnapshot),redacted:!n,timestamp:r};return n?{...i,diff:e.unifiedDiff}:i}var SY=class extends Error{violation;constructor(e){let t=typeof e.origin==`string`?e.origin:e.origin?.context?.origin??`unknown-object`,n=e.docName?` doc='${e.docName}'`:``;super(`Bridge invariant violated [site='${e.site}'${n}, origin='${t}'].\n Y.Text (${e.ytextSnapshot.length} chars): ${e.ytextSnapshot.slice(0,200)}...\n Fragment (${e.fragmentMdSnapshot.length} chars): ${e.fragmentMdSnapshot.slice(0,200)}...\n Diff:\n${e.unifiedDiff}`),this.name=`BridgeInvariantViolationError`,this.violation=e}};const CY=/^(?:\r?\n)+/;function wY(e){let{frontmatter:t,body:n}=Ap(e),r=n.match(CY);if(!r)return{boundary:``,text:e};let i=n.slice(r[0].length);return t===``&&kp.test(i)?{boundary:``,text:e}:{boundary:r[0],text:t+i}}function TY(e,t){if(t===``)return e;let{frontmatter:n,body:r}=Ap(e);return n+t+r}function EY(e){let t=wY(e).text;return Ap(t).frontmatter===``?t:TY(t,`
280
- `)}function DY(e,t=16){let n=e.trim();return n.length<t?!1:!(n.startsWith(`<`)||n.startsWith("```")||n.startsWith(`|`))}function OY(e,t=16){let n=new Map;for(let r of e.split(`
281
- `)){if(!DY(r,t))continue;let e=r.trim();n.set(e,(n.get(e)??0)+1)}return n}function kY(e,t,n=16){let r=OY(t,n),i=[];for(let[t,a]of OY(e,n))a>=2&&a>(r.get(t)??0)&&i.push(t);return i}function AY(e,t){let n=Object.create(null);for(let e=0;e<t.length;e++){let r=t[e];n[r]?n[r].push(e):n[r]=[e]}let r=[{buffer1index:-1,buffer2index:-1,chain:null}];for(let t=0;t<e.length;t++){let i=n[e[t]]||[],a=0,o=r[0];for(let e of i){let n;for(n=a;n<r.length&&!(r[n].buffer2index<e&&(n===r.length-1||r[n+1].buffer2index>e));n++);if(n<r.length){let i={buffer1index:t,buffer2index:e,chain:r[n]};if(a===r.length?r.push(o):r[a]=o,a=n+1,o=i,a===r.length)break}}r[a]=o}return r[r.length-1]}function jY(e,t){let n=AY(e,t),r=[],i=e.length,a=t.length;for(let o=n;o!==null;o=o.chain){let n=i-o.buffer1index-1,s=a-o.buffer2index-1;i=o.buffer1index,a=o.buffer2index,(n||s)&&r.push({buffer1:[i+1,n],buffer1Content:e.slice(i+1,i+1+n),buffer2:[a+1,s],buffer2Content:t.slice(a+1,a+1+s)})}return r.reverse(),r}function MY(e,t,n){let r=[];function i(e,t){r.push({ab:t,oStart:e.buffer1[0],oLength:e.buffer1[1],abStart:e.buffer2[0],abLength:e.buffer2[1]})}jY(t,e).forEach(e=>i(e,`a`)),jY(t,n).forEach(e=>i(e,`b`)),r.sort((e,t)=>e.oStart-t.oStart);let a=[],o=0;function s(e){e>o&&(a.push({stable:!0,buffer:`o`,bufferStart:o,bufferLength:e-o,bufferContent:t.slice(o,e)}),o=e)}for(;r.length;){let i=r.shift(),c=i.oStart,l=i.oStart+i.oLength,u=[i];for(s(c);r.length;){let e=r[0],t=e.oStart;if(t>l)break;l=Math.max(l,t+e.oLength),u.push(r.shift())}if(u.length===1){if(i.abLength>0){let t=i.ab===`a`?e:n;a.push({stable:!0,buffer:i.ab,bufferStart:i.abStart,bufferLength:i.abLength,bufferContent:t.slice(i.abStart,i.abStart+i.abLength)})}}else{let r={a:[e.length,-1,t.length,-1],b:[n.length,-1,t.length,-1]};for(;u.length;){i=u.shift();let e=i.oStart,t=e+i.oLength,n=i.abStart,a=n+i.abLength,o=r[i.ab];o[0]=Math.min(n,o[0]),o[1]=Math.max(a,o[1]),o[2]=Math.min(e,o[2]),o[3]=Math.max(t,o[3])}let o=r.a[0]+(c-r.a[2]),s=r.a[1]+(l-r.a[3]),d=r.b[0]+(c-r.b[2]),f=r.b[1]+(l-r.b[3]),p={stable:!1,aStart:o,aLength:s-o,aContent:e.slice(o,s),oStart:c,oLength:l-c,oContent:t.slice(c,l),bStart:d,bLength:f-d,bContent:n.slice(d,f)};a.push(p)}o=l}return s(t.length),a}function NY(e,t,n,r){r=Object.assign({excludeFalseConflicts:!0,stringSeparator:/\s+/},r),typeof e==`string`&&(e=e.split(r.stringSeparator)),typeof t==`string`&&(t=t.split(r.stringSeparator)),typeof n==`string`&&(n=n.split(r.stringSeparator));let i=[],a=MY(e,t,n),o=[];function s(){o.length&&i.push({ok:o}),o=[]}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return a.forEach(e=>{e.stable?o.push(...e.bufferContent):r.excludeFalseConflicts&&c(e.aContent,e.bContent)?o.push(...e.aContent):(s(),i.push({conflict:{a:e.aContent,aIndex:e.aStart,o:e.oContent,oIndex:e.oStart,b:e.bContent,bIndex:e.bStart}}))}),s(),i}const PY=new QJ.default;PY.Match_Threshold=.5;function FY(e,t,n){let r=IY(e,t,n);return VY(e,t,n,r),r}function IY(e,t,n){if(e===t)return n;if(e===n||t===n)return t;let r=NY(t.split(`
278
+ `,e);a=n===-1?0:t.length-(n+1)}}let o=t.length-r-a,s=n.slice(r,n.length-a);o>0&&e.delete(r,o),s.length>0&&e.insert(r,s)}const iY=g({path:m(ie([T(),S()])),message:T(),issueCode:T()});d(`code`,[g({code:E(`SCHEMA_INVALID`),issues:m(iY)}),g({code:E(`WRITE_ERROR`),detail:T()})]);const aY={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function oY(e){if(e.trim()===``)return{doc:new Ce.Document({}),map:{}};let t;try{t=(0,Ce.parseDocument)(e)}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new Ce.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=dG.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function sY(e){return Object.keys(e).length===0?``:new Ce.Document(e).toString(aY)}function cY(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function lY(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=(0,Ce.isSeq)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(cY(n)){let r=e.createNode(n),i=(0,Ce.isMap)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function uY(e){return e===``?``:`---\n${e.endsWith(`
279
+ `)?e.slice(0,-1):e}\n---\n`}function dY(e){let t=e.match(kp);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function fY(e){if(e.trim()===``)return{doc:new Ce.Document({}),map:{}};let t;try{t=(0,Ce.parseDocument)(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new Ce.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=dG.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function pY(e){return e===``?{doc:new Ce.Document({}),map:{}}:fY(Mp(e))}function mY(e){let{fenced:t}=dY(e),{map:n}=pY(t);return n??{}}function hY(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function gY(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:uY(e.toString(aY))}function _Y(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:65536}:null}function vY(e){let t=gY(e),n=_Y(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function yY(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:`frontmatter`}};let{doc:n,map:r}=pY(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{hY(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=lG.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,lY(n,n.get(e,!0),t.data))}return vY(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function bY(e,t){let n=t?.verbose===!0,r=t?.nowMs===void 0?new Date().toISOString():new Date(t.nowMs).toISOString(),i={event:`bridge-invariant-violation`,site:e.site,"doc.name":e.docName??null,"tolerance-class-attempted":`untracked`,"normalize-equal-modulo-tolerance":!1,ytextLen:e.ytextSnapshot.length,fragmentLen:e.fragmentMdSnapshot.length,ytextHash:he(e.ytextSnapshot),fragmentHash:he(e.fragmentMdSnapshot),redacted:!n,timestamp:r};return n?{...i,diff:e.unifiedDiff}:i}var xY=class extends Error{violation;constructor(e){let t=typeof e.origin==`string`?e.origin:e.origin?.context?.origin??`unknown-object`,n=e.docName?` doc='${e.docName}'`:``;super(`Bridge invariant violated [site='${e.site}'${n}, origin='${t}'].\n Y.Text (${e.ytextSnapshot.length} chars): ${e.ytextSnapshot.slice(0,200)}...\n Fragment (${e.fragmentMdSnapshot.length} chars): ${e.fragmentMdSnapshot.slice(0,200)}...\n Diff:\n${e.unifiedDiff}`),this.name=`BridgeInvariantViolationError`,this.violation=e}};const SY=/^(?:\r?\n)+/;function CY(e){let{frontmatter:t,body:n}=Ap(e),r=n.match(SY);if(!r)return{boundary:``,text:e};let i=n.slice(r[0].length);return t===``&&kp.test(i)?{boundary:``,text:e}:{boundary:r[0],text:t+i}}function wY(e,t){if(t===``)return e;let{frontmatter:n,body:r}=Ap(e);return n+t+r}function TY(e){let t=CY(e).text;return Ap(t).frontmatter===``?t:wY(t,`
280
+ `)}function EY(e,t=16){let n=e.trim();return n.length<t?!1:!(n.startsWith(`<`)||n.startsWith("```")||n.startsWith(`|`))}function DY(e,t=16){let n=new Map;for(let r of e.split(`
281
+ `)){if(!EY(r,t))continue;let e=r.trim();n.set(e,(n.get(e)??0)+1)}return n}function OY(e,t,n=16){let r=DY(t,n),i=[];for(let[t,a]of DY(e,n))a>=2&&a>(r.get(t)??0)&&i.push(t);return i}function kY(e,t){let n=Object.create(null);for(let e=0;e<t.length;e++){let r=t[e];n[r]?n[r].push(e):n[r]=[e]}let r=[{buffer1index:-1,buffer2index:-1,chain:null}];for(let t=0;t<e.length;t++){let i=n[e[t]]||[],a=0,o=r[0];for(let e of i){let n;for(n=a;n<r.length&&!(r[n].buffer2index<e&&(n===r.length-1||r[n+1].buffer2index>e));n++);if(n<r.length){let i={buffer1index:t,buffer2index:e,chain:r[n]};if(a===r.length?r.push(o):r[a]=o,a=n+1,o=i,a===r.length)break}}r[a]=o}return r[r.length-1]}function AY(e,t){let n=kY(e,t),r=[],i=e.length,a=t.length;for(let o=n;o!==null;o=o.chain){let n=i-o.buffer1index-1,s=a-o.buffer2index-1;i=o.buffer1index,a=o.buffer2index,(n||s)&&r.push({buffer1:[i+1,n],buffer1Content:e.slice(i+1,i+1+n),buffer2:[a+1,s],buffer2Content:t.slice(a+1,a+1+s)})}return r.reverse(),r}function jY(e,t,n){let r=[];function i(e,t){r.push({ab:t,oStart:e.buffer1[0],oLength:e.buffer1[1],abStart:e.buffer2[0],abLength:e.buffer2[1]})}AY(t,e).forEach(e=>i(e,`a`)),AY(t,n).forEach(e=>i(e,`b`)),r.sort((e,t)=>e.oStart-t.oStart);let a=[],o=0;function s(e){e>o&&(a.push({stable:!0,buffer:`o`,bufferStart:o,bufferLength:e-o,bufferContent:t.slice(o,e)}),o=e)}for(;r.length;){let i=r.shift(),c=i.oStart,l=i.oStart+i.oLength,u=[i];for(s(c);r.length;){let e=r[0],t=e.oStart;if(t>l)break;l=Math.max(l,t+e.oLength),u.push(r.shift())}if(u.length===1){if(i.abLength>0){let t=i.ab===`a`?e:n;a.push({stable:!0,buffer:i.ab,bufferStart:i.abStart,bufferLength:i.abLength,bufferContent:t.slice(i.abStart,i.abStart+i.abLength)})}}else{let r={a:[e.length,-1,t.length,-1],b:[n.length,-1,t.length,-1]};for(;u.length;){i=u.shift();let e=i.oStart,t=e+i.oLength,n=i.abStart,a=n+i.abLength,o=r[i.ab];o[0]=Math.min(n,o[0]),o[1]=Math.max(a,o[1]),o[2]=Math.min(e,o[2]),o[3]=Math.max(t,o[3])}let o=r.a[0]+(c-r.a[2]),s=r.a[1]+(l-r.a[3]),d=r.b[0]+(c-r.b[2]),f=r.b[1]+(l-r.b[3]),p={stable:!1,aStart:o,aLength:s-o,aContent:e.slice(o,s),oStart:c,oLength:l-c,oContent:t.slice(c,l),bStart:d,bLength:f-d,bContent:n.slice(d,f)};a.push(p)}o=l}return s(t.length),a}function MY(e,t,n,r){r=Object.assign({excludeFalseConflicts:!0,stringSeparator:/\s+/},r),typeof e==`string`&&(e=e.split(r.stringSeparator)),typeof t==`string`&&(t=t.split(r.stringSeparator)),typeof n==`string`&&(n=n.split(r.stringSeparator));let i=[],a=jY(e,t,n),o=[];function s(){o.length&&i.push({ok:o}),o=[]}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return a.forEach(e=>{e.stable?o.push(...e.bufferContent):r.excludeFalseConflicts&&c(e.aContent,e.bContent)?o.push(...e.aContent):(s(),i.push({conflict:{a:e.aContent,aIndex:e.aStart,o:e.oContent,oIndex:e.oStart,b:e.bContent,bIndex:e.bStart}}))}),s(),i}const NY=new ZJ.default;NY.Match_Threshold=.5;function PY(e,t,n){let r=FY(e,t,n);return BY(e,t,n,r),r}function FY(e,t,n){if(e===t)return n;if(e===n||t===n)return t;let r=MY(t.split(`
282
282
  `),e.split(`
283
283
  `),n.split(`
284
284
  `)),i=[];for(let e=0;e<r.length;e++){let t=r[e];if(`ok`in t&&t.ok)i.push(t.ok.join(`
285
285
  `));else if(`conflict`in t&&t.conflict){let e=t.conflict.o.join(`
286
286
  `),n=t.conflict.a.join(`
287
287
  `),r=t.conflict.b.join(`
288
- `);i.push(HY(e,n,r))}}return i.join(`
289
- `)}function LY(e){return e.map(e=>({len:e.length,digest:he(e)}))}var RY=class extends Error{info;constructor(e){let t=e.lostSubstrings.map(e=>JSON.stringify(e.length>80?`${e.slice(0,77)}...`:e)).join(`, `);super(`Bridge merge content loss (which=${e.which}, side=${e.side}): ${t}`),this.name=`BridgeMergeContentLossError`,this.info=e}toLog(e){let t=e?.verbose===!0;return{event:`bridge-merge-content-loss`,which:this.info.which,side:this.info.side,baselineLen:this.info.baseline.length,userTextLen:this.info.userText.length,agentTextLen:this.info.agentText.length,resultLen:this.info.result.length,lostSubstrings:t?this.info.lostSubstrings:LY(this.info.lostSubstrings),redacted:!t}}};function zY(e,t){if(e===t)return[];let n=PY.diff_main(e,t);PY.diff_cleanupSemantic(n);let r=[];for(let[e,t]of n)if(e===1)for(let e of t.split(`
290
- `)){let t=e.trim();t.length!==0&&r.push(t)}return r}function BY(e,t){let n=0;for(let r of t){let t=e.indexOf(r,n);if(t<0){if(e.indexOf(r)<0)continue;return r}n=t+r.length}return null}function VY(e,t,n,r){let i=zY(e,t),a=zY(e,n),o=i.filter(e=>!r.includes(e));if(o.length>0)throw new RY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:o,which:`substring`,side:`user`});let s=a.filter(e=>!r.includes(e));if(s.length>0)throw new RY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:s,which:`substring`,side:`agent`});let c=BY(r,i);if(c!==null)throw new RY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:[c],which:`order`,side:`user`});let l=BY(r,a);if(l!==null)throw new RY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:[l],which:`order`,side:`agent`});let u=OY(e),d=OY(t),f=OY(n);for(let[i,a]of OY(r))if(!(a<2)&&a>Math.max(u.get(i)??0,d.get(i)??0,f.get(i)??0))throw new RY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:[i],which:`growth`,side:`user`})}function HY(e,t,n){if(t===``)return n;if(n===``)return t;let r=PY.patch_make(e,t),[i,a]=PY.patch_apply(r,n);return a.some(e=>!e)&&console.warn(JSON.stringify({event:`bridge-merge-patch-drop`,applied:a.filter(Boolean).length,total:a.length,regionSize:n.length})),i}const UY=/\\([!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~])/g,WY=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?\s*$/,GY=/^[ \t]+([-+*]|\d+[.)]|[a-zA-Z][.)])\s/,KY=/^\d+([.)])(?=\s)/,qY=/\*\*\s*(`[^`]+`)\s*\*\*/g,JY=/^(`{3,}|~{3,})/;function YY(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r].trimEnd(),a=JY.exec(i);if(a){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}if(n!==null||r===0||!WY.test(i))continue;let o=e[r-1].trimEnd();if(!(!o.startsWith(`|`)||WY.test(o))){t.add(r-1),t.add(r);for(let n=r+1;n<e.length&&e[n].trimEnd().startsWith(`|`);n++)t.add(n)}}return t}function XY(e){return e.slice(0,-1).trimEnd()}const ZY=/^(?:#{1,6}[ \t]|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function QY(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r]??``,a=/^(`{3,}|~{3,})/.exec(i.trimStart());if(a?.[1]){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}n!==null&&t.add(r)}return t}const $Y=/^<\/?[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,eX=/^<[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,tX=/^<\/[A-Z][A-Za-z0-9.]*\s*>$/,nX=/<\/?[A-Z]/;function rX(e){let t=!1;for(let n=0;n<e.length;n++)if(nX.test(e[n]??``)){t=!0;break}if(!t)return e;let n=QY(e),r=[],i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t]??``,s=o.trim();if(n.has(t)){r.push(!1),i.push(a);continue}let c=a>=1||!/^[ \t]/.test(o);r.push(c&&$Y.test(s));let l=c&&tX.test(s),u=c&&!l&&eX.test(s)&&!s.endsWith(`/>`);l?(a=Math.max(0,a-1),i.push(a)):(i.push(a),u&&(a+=1))}let o=Array(e.length);for(let t=0,n=-1;t<e.length;t++)o[t]=n,(e[t]??``).trim()!==``&&(n=t);let s=Array(e.length);for(let t=e.length-1,n=e.length;t>=0;t--)s[t]=n,(e[t]??``).trim()!==``&&(n=t);let c=new Set;for(let t=0;t<e.length;t++){if((e[t]??``).trim()!==``||n.has(t)||(i[t]??0)<1)continue;let a=o[t]??-1,l=s[t]??e.length;(a>=0&&r[a]===!0||l<e.length&&r[l]===!0)&&c.add(t)}let l=[];for(let t=0;t<e.length;t++){if(c.has(t))continue;let n=e[t]??``;l.push(r[t]===!0&&(i[t]??0)>=1?n.replace(/^[ \t]+/,``):n)}return l}function iX(e){let t=rX(e.replace(/^/,``).replace(/\r/g,``).replace(UY,`$1`).replace(qY,`$1`).replace(/^\n+/,``).replace(/^[*-]{3,}(?=\n|$)/,`---`).replace(/(\n)([#>+-]|\d+[.)]|`{3,}|~{3,})/g,`
288
+ `);i.push(VY(e,n,r))}}return i.join(`
289
+ `)}function IY(e){return e.map(e=>({len:e.length,digest:he(e)}))}var LY=class extends Error{info;constructor(e){let t=e.lostSubstrings.map(e=>JSON.stringify(e.length>80?`${e.slice(0,77)}...`:e)).join(`, `);super(`Bridge merge content loss (which=${e.which}, side=${e.side}): ${t}`),this.name=`BridgeMergeContentLossError`,this.info=e}toLog(e){let t=e?.verbose===!0;return{event:`bridge-merge-content-loss`,which:this.info.which,side:this.info.side,baselineLen:this.info.baseline.length,userTextLen:this.info.userText.length,agentTextLen:this.info.agentText.length,resultLen:this.info.result.length,lostSubstrings:t?this.info.lostSubstrings:IY(this.info.lostSubstrings),redacted:!t}}};function RY(e,t){if(e===t)return[];let n=NY.diff_main(e,t);NY.diff_cleanupSemantic(n);let r=[];for(let[e,t]of n)if(e===1)for(let e of t.split(`
290
+ `)){let t=e.trim();t.length!==0&&r.push(t)}return r}function zY(e,t){let n=0;for(let r of t){let t=e.indexOf(r,n);if(t<0){if(e.indexOf(r)<0)continue;return r}n=t+r.length}return null}function BY(e,t,n,r){let i=RY(e,t),a=RY(e,n),o=i.filter(e=>!r.includes(e));if(o.length>0)throw new LY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:o,which:`substring`,side:`user`});let s=a.filter(e=>!r.includes(e));if(s.length>0)throw new LY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:s,which:`substring`,side:`agent`});let c=zY(r,i);if(c!==null)throw new LY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:[c],which:`order`,side:`user`});let l=zY(r,a);if(l!==null)throw new LY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:[l],which:`order`,side:`agent`});let u=DY(e),d=DY(t),f=DY(n);for(let[i,a]of DY(r))if(!(a<2)&&a>Math.max(u.get(i)??0,d.get(i)??0,f.get(i)??0))throw new LY({baseline:e,userText:t,agentText:n,result:r,lostSubstrings:[i],which:`growth`,side:`user`})}function VY(e,t,n){if(t===``)return n;if(n===``)return t;let r=NY.patch_make(e,t),[i,a]=NY.patch_apply(r,n);return a.some(e=>!e)&&console.warn(JSON.stringify({event:`bridge-merge-patch-drop`,applied:a.filter(Boolean).length,total:a.length,regionSize:n.length})),i}const HY=/\\([!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~])/g,UY=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?\s*$/,WY=/^[ \t]+([-+*]|\d+[.)]|[a-zA-Z][.)])\s/,GY=/^\d+([.)])(?=\s)/,KY=/\*\*\s*(`[^`]+`)\s*\*\*/g,qY=/^(`{3,}|~{3,})/;function JY(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r].trimEnd(),a=qY.exec(i);if(a){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}if(n!==null||r===0||!UY.test(i))continue;let o=e[r-1].trimEnd();if(!(!o.startsWith(`|`)||UY.test(o))){t.add(r-1),t.add(r);for(let n=r+1;n<e.length&&e[n].trimEnd().startsWith(`|`);n++)t.add(n)}}return t}function YY(e){return e.slice(0,-1).trimEnd()}const XY=/^(?:#{1,6}[ \t]|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function ZY(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r]??``,a=/^(`{3,}|~{3,})/.exec(i.trimStart());if(a?.[1]){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}n!==null&&t.add(r)}return t}const QY=/^<\/?[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,$Y=/^<[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,eX=/^<\/[A-Z][A-Za-z0-9.]*\s*>$/,tX=/<\/?[A-Z]/;function nX(e){let t=!1;for(let n=0;n<e.length;n++)if(tX.test(e[n]??``)){t=!0;break}if(!t)return e;let n=ZY(e),r=[],i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t]??``,s=o.trim();if(n.has(t)){r.push(!1),i.push(a);continue}let c=a>=1||!/^[ \t]/.test(o);r.push(c&&QY.test(s));let l=c&&eX.test(s),u=c&&!l&&$Y.test(s)&&!s.endsWith(`/>`);l?(a=Math.max(0,a-1),i.push(a)):(i.push(a),u&&(a+=1))}let o=Array(e.length);for(let t=0,n=-1;t<e.length;t++)o[t]=n,(e[t]??``).trim()!==``&&(n=t);let s=Array(e.length);for(let t=e.length-1,n=e.length;t>=0;t--)s[t]=n,(e[t]??``).trim()!==``&&(n=t);let c=new Set;for(let t=0;t<e.length;t++){if((e[t]??``).trim()!==``||n.has(t)||(i[t]??0)<1)continue;let a=o[t]??-1,l=s[t]??e.length;(a>=0&&r[a]===!0||l<e.length&&r[l]===!0)&&c.add(t)}let l=[];for(let t=0;t<e.length;t++){if(c.has(t))continue;let n=e[t]??``;l.push(r[t]===!0&&(i[t]??0)>=1?n.replace(/^[ \t]+/,``):n)}return l}function rX(e){let t=nX(e.replace(/^/,``).replace(/\r/g,``).replace(HY,`$1`).replace(KY,`$1`).replace(/^\n+/,``).replace(/^[*-]{3,}(?=\n|$)/,`---`).replace(/(\n)([#>+-]|\d+[.)]|`{3,}|~{3,})/g,`
291
291
 
292
292
  $2`).replace(/^([#>+-].*|\d+[.)].*|`{3,}.*|~{3,}.*|<\/[A-Z][A-Za-z0-9]*>[ \t]*)\n([^\n])/gm,`$1
293
293
 
294
294
  $2`).split(`
295
- `)),n=YY(t),r=QY(t);return t.map((e,i)=>{let a=e.trimEnd();if(i>0&&!r.has(i)&&/^[ \t]+\S/.test(a)&&(t[i-1]??``).trim()!==``&&!GY.test(a)&&!ZY.test(a.trimStart())){let e=(t[i-1]??``).trimStart();if(!ZY.test(e)&&!e.startsWith(`|`))return a.replace(/^[ \t]+/,``)}if(WY.test(a)){let e=a.replace(/\s+/g,``);return n.has(i)&&e.length>1&&e.startsWith(`|`)&&e.endsWith(`|`)?XY(e):e}let o=GY.test(a)?a.replace(/^[ \t]+/,``):a;return n.has(i)&&o.length>1&&o.startsWith(`|`)&&o.endsWith(`|`)&&(o=XY(o)),o.replace(KY,`1$1`)}).join(`
295
+ `)),n=JY(t),r=ZY(t);return t.map((e,i)=>{let a=e.trimEnd();if(i>0&&!r.has(i)&&/^[ \t]+\S/.test(a)&&(t[i-1]??``).trim()!==``&&!WY.test(a)&&!XY.test(a.trimStart())){let e=(t[i-1]??``).trimStart();if(!XY.test(e)&&!e.startsWith(`|`))return a.replace(/^[ \t]+/,``)}if(UY.test(a)){let e=a.replace(/\s+/g,``);return n.has(i)&&e.length>1&&e.startsWith(`|`)&&e.endsWith(`|`)?YY(e):e}let o=WY.test(a)?a.replace(/^[ \t]+/,``):a;return n.has(i)&&o.length>1&&o.startsWith(`|`)&&o.endsWith(`|`)&&(o=YY(o)),o.replace(GY,`1$1`)}).join(`
296
296
  `).replace(/\n{3,}/g,`
297
297
 
298
- `).replace(/\n+$/,``)}function aX(e,t){let n=[];(e.charCodeAt(0)===65279||t.charCodeAt(0)===65279)&&n.push(`bom`),(e.includes(`\r`)||t.includes(`\r`))&&n.push(`crlf`),(/\\[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~\\]/.test(e)||/\\[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~\\]/.test(t))&&n.push(`commonmark-escape`),(/\*\*\s*`[^`]+`\s*\*\*/.test(e)||/\*\*\s*`[^`]+`\s*\*\*/.test(t))&&n.push(`emphasis-around-code`);let r=e.replace(/^/,``),i=t.replace(/^/,``);r.startsWith(`
298
+ `).replace(/\n+$/,``)}function iX(e,t){let n=[];(e.charCodeAt(0)===65279||t.charCodeAt(0)===65279)&&n.push(`bom`),(e.includes(`\r`)||t.includes(`\r`))&&n.push(`crlf`),(/\\[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~\\]/.test(e)||/\\[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~\\]/.test(t))&&n.push(`commonmark-escape`),(/\*\*\s*`[^`]+`\s*\*\*/.test(e)||/\*\*\s*`[^`]+`\s*\*\*/.test(t))&&n.push(`emphasis-around-code`);let r=e.replace(/^/,``),i=t.replace(/^/,``);r.startsWith(`
299
299
  `)!==i.startsWith(`
300
300
  `)&&n.push(`leading-newline`);let a=r.replace(/^\n+/,``),o=i.replace(/^\n+/,``),s=/^\*{3,}(?=\n|$)/.test(a),c=/^-{3,}(?=\n|$)/.test(a),l=/^\*{3,}(?=\n|$)/.test(o),u=/^-{3,}(?=\n|$)/.test(o);(s&&u||c&&l)&&n.push(`doc-start-thematic`);let d=/\n\n([#>+-]|\d+[.)]|`{3,}|~{3,})/,f=/^([#>+-].*|\d+[.)].*|`{3,}.*|~{3,}.*|<\/[A-Z][A-Za-z0-9]*>[ \t]*)\n\n[^\n]/m,p=d.test(r),m=d.test(i),h=f.test(r),g=f.test(i);(p!==m||h!==g)&&n.push(`block-separator-collapse`);let _=r.replace(/\r/g,``),v=i.replace(/\r/g,``),y=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?\s*$/m;(y.test(_)||y.test(v))&&n.push(`table-align-row-spacing`);let b=e=>y.test(e)&&/^\|[^\n]*[^|\s][ \t]*$/m.test(e);b(_)!==b(v)&&n.push(`row-no-trailing-pipe`);let x=/^[ \t]+([-+*]|\d+[.)]|[a-zA-Z][.)])\s/m;(x.test(_)||x.test(v))&&n.push(`list-indent-canonical`);let S=/[^\n]\n[ \t]+(?![-+*>#]|\d+[.)])\S/;(S.test(_)||S.test(v))&&n.push(`paragraph-continuation-indent`);let C=_.split(`
301
301
  `),w=v.split(`
302
- `),T=e=>{for(let t=0;t<e.length-1;t++){let n=(e[t]??``).trim(),r=(e[t+1]??``).trim(),i=n!==``&&r===``&&$Y.test(n),a=n===``&&r!==``&&$Y.test(r);if(i||a)return!0}return!1};(T(C)||T(w))&&n.push(`jsx-container-boundary-blank`);let E=e=>e.replace(/^[ \t]+/,``).replace(KY,`1$1`),ee=Math.min(C.length,w.length);for(let e=0;e<ee;e++){let t=C[e]??``,r=w[e]??``;if(t!==r&&E(t)===E(r)&&/^[ \t]*\d+[.)]\s/.test(t)){n.push(`ordered-list-marker-number`);break}}return(/[ \t]\n/.test(_)||/[ \t]\n/.test(v))&&n.push(`trailing-whitespace`),(/[ \t]$/.test(_)||/[ \t]$/.test(v))&&(n.includes(`trailing-whitespace`)||n.push(`trailing-whitespace`)),(/\n{3,}/.test(_)||/\n{3,}/.test(v))&&n.push(`blank-line-collapse`),_.endsWith(`
302
+ `),T=e=>{for(let t=0;t<e.length-1;t++){let n=(e[t]??``).trim(),r=(e[t+1]??``).trim(),i=n!==``&&r===``&&QY.test(n),a=n===``&&r!==``&&QY.test(r);if(i||a)return!0}return!1};(T(C)||T(w))&&n.push(`jsx-container-boundary-blank`);let E=e=>e.replace(/^[ \t]+/,``).replace(GY,`1$1`),ee=Math.min(C.length,w.length);for(let e=0;e<ee;e++){let t=C[e]??``,r=w[e]??``;if(t!==r&&E(t)===E(r)&&/^[ \t]*\d+[.)]\s/.test(t)){n.push(`ordered-list-marker-number`);break}}return(/[ \t]\n/.test(_)||/[ \t]\n/.test(v))&&n.push(`trailing-whitespace`),(/[ \t]$/.test(_)||/[ \t]$/.test(v))&&(n.includes(`trailing-whitespace`)||n.push(`trailing-whitespace`)),(/\n{3,}/.test(_)||/\n{3,}/.test(v))&&n.push(`blank-line-collapse`),_.endsWith(`
303
303
  `)!==v.endsWith(`
304
- `)&&n.push(`trailing-newline`),n}const oX=`parse-equivalence`;function sX(e){return e.replace(/^\n+/,``).replace(/\n+$/,``)}function cX(e){return e.replace(/[ \t]+$/gm,``)}const lX=/^([ \t]*)\d+([.)])(?=[ \t])/;function uX(e){return e.split(`
305
- `).map(e=>e.replace(lX,(e,t,n)=>`${t}1${n}`)).join(``).replace(/\s+/g,``)}const dX=new Set;function fX(e,t,n){let r=Ap(e),i=Ap(t);if(r.frontmatter!==i.frontmatter)return!1;if(r.body===i.body)return!0;let a;try{a=n(r.body)}catch(e){let t=e instanceof Error?e.message:String(e);return dX.size<8&&!dX.has(t)&&(dX.add(t),console.warn(`[parse-equivalence] canonicalizeBody threw; treating as not equivalent:`,t)),!1}return sX(cX(a))===sX(cX(i.body))?tM(uX(r.body),uX(a)):!1}const pX={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),now:()=>Date.now()},mX={"emphasis-around-code":`pm-model-caused`,bom:`parser-caused`,crlf:`parser-caused`,"commonmark-escape":`parser-caused`,"leading-newline":`parser-caused`,"paragraph-continuation-indent":`parser-caused`,"doc-start-thematic":`parser-caused`,"block-separator-collapse":`serializer-caused`,"table-align-row-spacing":`serializer-caused`,"row-no-trailing-pipe":`serializer-caused`,"ordered-list-marker-number":`serializer-caused`,"list-indent-canonical":`serializer-caused`,"jsx-container-boundary-blank":`serializer-caused`,"trailing-whitespace":`serializer-caused`,"blank-line-collapse":`serializer-caused`,"trailing-newline":`serializer-caused`,"parse-equivalence":`parser-caused`};function hX(e){return mX[e]}function gX(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e.charCodeAt(r)!==t.charCodeAt(r))return r;return e.length===t.length?-1:n}let _X=null;function vX(e){_X=e}function yX(e,t,n,r){if(!_X||e.length===0)return;let i=gX(t,n),a=new Date().toISOString();for(let t of e)_X({timestamp:a,className:t,documentName:r,codeUnitPosition:i,severity:hX(t)})}const bX=1e4,xX=`last-spawn-error.log`,SX=`last-server-exit.json`,CX=`last-server-crash.json`;function wX(e){let{frontmatter:t}=Ap(e);if(t===``)return null;let n;try{let e=(0,Ce.parseDocument)(Mp(t));if(e.errors.length>0)return null;n=e.toJS()}catch{return null}return typeof n!=`object`||!n||Array.isArray(n)?null:n}const TX=/^[a-zA-Z0-9][\w/-]*$/;function EX(e){return e.startsWith(`#`)?e.slice(1):e}function DX(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function OX(e){if(!e||e.trim()===``)return[];let{map:t}=sY(e);if(!t)return[];let n=DX(t.tags),r=[];for(let e of n){let t=EX(e);TX.test(t)&&r.push(t)}return r}const kX=[`.ok`,`local`,`installed-skills.json`],AX=c(Pe),jX=te({hosts:m(T()),scope:AX,scripts:p(),installedAt:ee()}),MX=te({schema:E(1),skills:v(T(),jX).default({})});function NX(){return{schema:1,skills:{}}}function PX(e){let t;try{t=JSON.parse(e)}catch{return null}let n=MX.safeParse(t);return n.success?n.data:null}const FX={arabic:`ar`,armenian:`am`,bulgarian:`bg`,czech:`cz`,danish:`dk`,dutch:`nl`,english:`en`,finnish:`fi`,french:`fr`,german:`de`,greek:`gr`,hungarian:`hu`,indian:`in`,indonesian:`id`,irish:`ie`,italian:`it`,lithuanian:`lt`,nepali:`np`,norwegian:`no`,portuguese:`pt`,romanian:`ro`,russian:`ru`,serbian:`rs`,slovenian:`ru`,spanish:`es`,swedish:`se`,tamil:`ta`,turkish:`tr`,ukrainian:`uk`,sanskrit:`sk`},IX={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},LX=Object.keys(FX);function RX(e){return e!==void 0&&LX.includes(e)?FX[e]:void 0}const zX=Date.now().toString().slice(5);let BX=0;const VX=BigInt(1e3),HX=BigInt(1e6),UX=BigInt(1e9),WX=65535;function GX(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let n=t.length;for(let r=0;r<n;r+=WX)Array.prototype.push.apply(e,t.slice(r,r+WX))}}function KX(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],a=i?t[Number.parseInt(i)-1]:t.shift(),o=n===``?0:Number.parseInt(n);switch(r){case`d`:return a.toString().padStart(o,`0`);case`f`:{let e=a,[t,r]=n.split(`.`).map(e=>Number.parseFloat(e));return typeof r==`number`&&r>=0&&(e=e.toFixed(r)),typeof t==`number`&&t>=0?e.toString().padStart(o,`0`):e.toString()}case`s`:return o<0?a.toString().padEnd(-o,` `):a.toString().padStart(o,` `);default:return a}})}function qX(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function JX(){return typeof process<`u`&&process.release&&process.release.name===`node`}function YX(){return BigInt(Math.floor(performance.now()*1e6))}function XX(e){return typeof e==`number`&&(e=BigInt(e)),e<VX?`${e}ns`:e<HX?`${e/VX}μs`:e<UX?`${e/HX}ms`:`${e/UX}s`}function ZX(){return qX()?YX():JX()||typeof process<`u`&&typeof process?.hrtime?.bigint==`function`?process.hrtime.bigint():typeof performance<`u`?YX():BigInt(0)}function QX(){return`${zX}-${BX++}`}function $X(e,t){return Object.hasOwn===void 0?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function eZ(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function tZ(e){if(e.length===0)return[];if(e.length===1)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let n=e[0];e[0]=e[t],e[t]=n}let t=new Map;for(let n of e[0])t.set(n,1);for(let n=1;n<e.length;n++){let r=0;for(let i of e[n]){let e=t.get(i);e===n&&(t.set(i,e+1),r++)}if(r===0)return[]}return e[0].filter(n=>{let r=t.get(n);return r!==void 0&&t.set(n,0),r===e.length})}function nZ(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i],a=r.split(`.`),o=e,s=a.length;for(let e=0;e<s;e++)if(o=o[a[e]],typeof o==`object`){if(o!==null&&`lat`in o&&`lon`in o&&typeof o.lat==`number`&&typeof o.lon==`number`){o=n[r]=o;break}else if(!Array.isArray(o)&&o!==null&&e===s-1){o=void 0;break}}else if((typeof o!=`object`||!o)&&e<s-1){o=void 0;break}o!==void 0&&(n[r]=o)}return n}function rZ(e,t){return nZ(e,[t])[t]}const iZ={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function aZ(e,t){let n=iZ[t];if(n===void 0)throw Error($(`INVALID_DISTANCE_SUFFIX`,e).message);return e*n}function oZ(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let n=t.split(`.`),r=n.pop(),i=e;for(let e of n)i[e]=i[e]??{},i=i[e];return i[r]=null,e},e.document)}}))}function sZ(e){return Array.isArray(e)?e.some(e=>sZ(e)):e?.constructor?.name===`AsyncFunction`}const cZ=`intersection`in new Set;function lZ(...e){if(e.length===0)return new Set;if(e.length===1)return e[0];if(e.length===2){let t=e[0],n=e[1];if(cZ)return t.intersection(n);let r=new Set,i=t.size<n.size?t:n,a=i===t?n:t;for(let e of i)a.has(e)&&r.add(e);return r}let t={index:0,size:e[0].size};for(let n=1;n<e.length;n++)e[n].size<t.size&&(t.index=n,t.size=e[n].size);if(cZ){let n=e[t.index];for(let r=0;r<e.length;r++)r!==t.index&&(n=n.intersection(e[r]));return n}let n=e[t.index];for(let r=0;r<e.length;r++){if(r===t.index)continue;let i=e[r];for(let e of n)i.has(e)||n.delete(e)}return n}const uZ=`union`in new Set;function dZ(e,t){return uZ?e?e.union(t):t:e?new Set([...e,...t]):new Set(t)}function fZ(e,t){let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function pZ(e){if(typeof SharedArrayBuffer<`u`&&typeof Atomics<`u`){let t=new Int32Array(new SharedArrayBuffer(4));if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);Atomics.wait(t,0,0,Number(e))}else{if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);let t=Date.now()+Number(e);for(;t>Date.now(););}}const mZ={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:`Do not pass the language option to create when using a custom tokenizer.`,LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.\nSupported languages are:\n - ${LX.join(`
304
+ `)&&n.push(`trailing-newline`),n}const aX=`parse-equivalence`;function oX(e){return e.replace(/^\n+/,``).replace(/\n+$/,``)}function sX(e){return e.replace(/[ \t]+$/gm,``)}const cX=/^([ \t]*)\d+([.)])(?=[ \t])/;function lX(e){return e.split(`
305
+ `).map(e=>e.replace(cX,(e,t,n)=>`${t}1${n}`)).join(``).replace(/\s+/g,``)}const uX=new Set;function dX(e,t,n){let r=Ap(e),i=Ap(t);if(r.frontmatter!==i.frontmatter)return!1;if(r.body===i.body)return!0;let a;try{a=n(r.body)}catch(e){let t=e instanceof Error?e.message:String(e);return uX.size<8&&!uX.has(t)&&(uX.add(t),console.warn(`[parse-equivalence] canonicalizeBody threw; treating as not equivalent:`,t)),!1}return oX(sX(a))===oX(sX(i.body))?eM(lX(r.body),lX(a)):!1}const fX={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),now:()=>Date.now()},pX={"emphasis-around-code":`pm-model-caused`,bom:`parser-caused`,crlf:`parser-caused`,"commonmark-escape":`parser-caused`,"leading-newline":`parser-caused`,"paragraph-continuation-indent":`parser-caused`,"doc-start-thematic":`parser-caused`,"block-separator-collapse":`serializer-caused`,"table-align-row-spacing":`serializer-caused`,"row-no-trailing-pipe":`serializer-caused`,"ordered-list-marker-number":`serializer-caused`,"list-indent-canonical":`serializer-caused`,"jsx-container-boundary-blank":`serializer-caused`,"trailing-whitespace":`serializer-caused`,"blank-line-collapse":`serializer-caused`,"trailing-newline":`serializer-caused`,"parse-equivalence":`parser-caused`};function mX(e){return pX[e]}function hX(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e.charCodeAt(r)!==t.charCodeAt(r))return r;return e.length===t.length?-1:n}let gX=null;function _X(e){gX=e}function vX(e,t,n,r){if(!gX||e.length===0)return;let i=hX(t,n),a=new Date().toISOString();for(let t of e)gX({timestamp:a,className:t,documentName:r,codeUnitPosition:i,severity:mX(t)})}const yX=1e4,bX=`last-spawn-error.log`,xX=`last-server-exit.json`,SX=`last-server-crash.json`;function CX(e){let{frontmatter:t}=Ap(e);if(t===``)return null;let n;try{let e=(0,Ce.parseDocument)(Mp(t));if(e.errors.length>0)return null;n=e.toJS()}catch{return null}return typeof n!=`object`||!n||Array.isArray(n)?null:n}const wX=/^[a-zA-Z0-9][\w/-]*$/;function TX(e){return e.startsWith(`#`)?e.slice(1):e}function EX(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function DX(e){if(!e||e.trim()===``)return[];let{map:t}=oY(e);if(!t)return[];let n=EX(t.tags),r=[];for(let e of n){let t=TX(e);wX.test(t)&&r.push(t)}return r}const OX=[`.ok`,`local`,`installed-skills.json`],kX=c(Pe),AX=te({hosts:m(T()),scope:kX,scripts:p(),installedAt:ee()}),jX=te({schema:E(1),skills:v(T(),AX).default({})});function MX(){return{schema:1,skills:{}}}function NX(e){let t;try{t=JSON.parse(e)}catch{return null}let n=jX.safeParse(t);return n.success?n.data:null}const PX={arabic:`ar`,armenian:`am`,bulgarian:`bg`,czech:`cz`,danish:`dk`,dutch:`nl`,english:`en`,finnish:`fi`,french:`fr`,german:`de`,greek:`gr`,hungarian:`hu`,indian:`in`,indonesian:`id`,irish:`ie`,italian:`it`,lithuanian:`lt`,nepali:`np`,norwegian:`no`,portuguese:`pt`,romanian:`ro`,russian:`ru`,serbian:`rs`,slovenian:`ru`,spanish:`es`,swedish:`se`,tamil:`ta`,turkish:`tr`,ukrainian:`uk`,sanskrit:`sk`},FX={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},IX=Object.keys(PX);function LX(e){return e!==void 0&&IX.includes(e)?PX[e]:void 0}const RX=Date.now().toString().slice(5);let zX=0;const BX=BigInt(1e3),VX=BigInt(1e6),HX=BigInt(1e9),UX=65535;function WX(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let n=t.length;for(let r=0;r<n;r+=UX)Array.prototype.push.apply(e,t.slice(r,r+UX))}}function GX(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],a=i?t[Number.parseInt(i)-1]:t.shift(),o=n===``?0:Number.parseInt(n);switch(r){case`d`:return a.toString().padStart(o,`0`);case`f`:{let e=a,[t,r]=n.split(`.`).map(e=>Number.parseFloat(e));return typeof r==`number`&&r>=0&&(e=e.toFixed(r)),typeof t==`number`&&t>=0?e.toString().padStart(o,`0`):e.toString()}case`s`:return o<0?a.toString().padEnd(-o,` `):a.toString().padStart(o,` `);default:return a}})}function KX(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function qX(){return typeof process<`u`&&process.release&&process.release.name===`node`}function JX(){return BigInt(Math.floor(performance.now()*1e6))}function YX(e){return typeof e==`number`&&(e=BigInt(e)),e<BX?`${e}ns`:e<VX?`${e/BX}μs`:e<HX?`${e/VX}ms`:`${e/HX}s`}function XX(){return KX()?JX():qX()||typeof process<`u`&&typeof process?.hrtime?.bigint==`function`?process.hrtime.bigint():typeof performance<`u`?JX():BigInt(0)}function ZX(){return`${RX}-${zX++}`}function QX(e,t){return Object.hasOwn===void 0?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function $X(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function eZ(e){if(e.length===0)return[];if(e.length===1)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let n=e[0];e[0]=e[t],e[t]=n}let t=new Map;for(let n of e[0])t.set(n,1);for(let n=1;n<e.length;n++){let r=0;for(let i of e[n]){let e=t.get(i);e===n&&(t.set(i,e+1),r++)}if(r===0)return[]}return e[0].filter(n=>{let r=t.get(n);return r!==void 0&&t.set(n,0),r===e.length})}function tZ(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i],a=r.split(`.`),o=e,s=a.length;for(let e=0;e<s;e++)if(o=o[a[e]],typeof o==`object`){if(o!==null&&`lat`in o&&`lon`in o&&typeof o.lat==`number`&&typeof o.lon==`number`){o=n[r]=o;break}else if(!Array.isArray(o)&&o!==null&&e===s-1){o=void 0;break}}else if((typeof o!=`object`||!o)&&e<s-1){o=void 0;break}o!==void 0&&(n[r]=o)}return n}function nZ(e,t){return tZ(e,[t])[t]}const rZ={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function iZ(e,t){let n=rZ[t];if(n===void 0)throw Error($(`INVALID_DISTANCE_SUFFIX`,e).message);return e*n}function aZ(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let n=t.split(`.`),r=n.pop(),i=e;for(let e of n)i[e]=i[e]??{},i=i[e];return i[r]=null,e},e.document)}}))}function oZ(e){return Array.isArray(e)?e.some(e=>oZ(e)):e?.constructor?.name===`AsyncFunction`}const sZ=`intersection`in new Set;function cZ(...e){if(e.length===0)return new Set;if(e.length===1)return e[0];if(e.length===2){let t=e[0],n=e[1];if(sZ)return t.intersection(n);let r=new Set,i=t.size<n.size?t:n,a=i===t?n:t;for(let e of i)a.has(e)&&r.add(e);return r}let t={index:0,size:e[0].size};for(let n=1;n<e.length;n++)e[n].size<t.size&&(t.index=n,t.size=e[n].size);if(sZ){let n=e[t.index];for(let r=0;r<e.length;r++)r!==t.index&&(n=n.intersection(e[r]));return n}let n=e[t.index];for(let r=0;r<e.length;r++){if(r===t.index)continue;let i=e[r];for(let e of n)i.has(e)||n.delete(e)}return n}const lZ=`union`in new Set;function uZ(e,t){return lZ?e?e.union(t):t:e?new Set([...e,...t]):new Set(t)}function dZ(e,t){let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function fZ(e){if(typeof SharedArrayBuffer<`u`&&typeof Atomics<`u`){let t=new Int32Array(new SharedArrayBuffer(4));if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);Atomics.wait(t,0,0,Number(e))}else{if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);let t=Date.now()+Number(e);for(;t>Date.now(););}}const pZ={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:`Do not pass the language option to create when using a custom tokenizer.`,LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.\nSupported languages are:\n - ${IX.join(`
306
306
  - `)}`,INVALID_STEMMER_FUNCTION_TYPE:`config.stemmer property must be a function.`,MISSING_STEMMER:`As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.`,CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY:`Custom stop words array must only contain strings.`,UNSUPPORTED_COMPONENT:`Unsupported component "%s".`,COMPONENT_MUST_BE_FUNCTION:`The component "%s" must be a function.`,COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS:`The component "%s" must be a function or an array of functions.`,INVALID_SCHEMA_TYPE:`Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.`,DOCUMENT_ID_MUST_BE_STRING:`Document id must be of type "string". Got "%s" instead.`,DOCUMENT_ALREADY_EXISTS:`A document with id "%s" already exists.`,DOCUMENT_DOES_NOT_EXIST:`A document with id "%s" does not exists.`,MISSING_DOCUMENT_PROPERTY:`Missing searchable property "%s".`,INVALID_DOCUMENT_PROPERTY:`Invalid document property "%s": expected "%s", got "%s"`,UNKNOWN_INDEX:`Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s`,INVALID_BOOST_VALUE:`Boost value must be a number greater than, or less than 0.`,INVALID_FILTER_OPERATION:`You can only use one operation per filter, you requested %d.`,SCHEMA_VALIDATION_FAILURE:`Cannot insert document due schema validation failure on "%s" property.`,INVALID_SORT_SCHEMA_TYPE:`Unsupported sort schema type "%s" at "%s". Expected "string" or "number".`,CANNOT_SORT_BY_ARRAY:`Cannot configure sort for "%s" because it is an array (%s).`,UNABLE_TO_SORT_ON_UNKNOWN_FIELD:`Unable to sort on unknown field "%s". Allowed fields: %s`,SORT_DISABLED:`Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.`,UNKNOWN_GROUP_BY_PROPERTY:`Unknown groupBy property "%s".`,INVALID_GROUP_BY_PROPERTY:`Invalid groupBy property "%s". Allowed types: "%s", but given "%s".`,UNKNOWN_FILTER_PROPERTY:`Unknown filter property "%s".`,UNKNOWN_VECTOR_PROPERTY:`Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.`,INVALID_VECTOR_SIZE:`Vector size must be a number greater than 0. Got "%s" instead.`,INVALID_VECTOR_VALUE:`Vector value must be a number greater than 0. Got "%s" instead.`,INVALID_INPUT_VECTOR:`Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead.
307
307
  Input vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,WRONG_SEARCH_PROPERTY_TYPE:`Property "%s" is not searchable. Only "string" properties are searchable.`,FACET_NOT_SUPPORTED:`Facet doens't support the type "%s".`,INVALID_DISTANCE_SUFFIX:`Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.`,INVALID_SEARCH_MODE:`Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".`,MISSING_VECTOR_AND_SECURE_PROXY:`No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.`,MISSING_TERM:`"term" is a required parameter when performing hybrid search. Please provide a search term.`,INVALID_VECTOR_INPUT:`Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.`,PLUGIN_CRASHED:`A plugin crashed during initialization. Please check the error message for more information:`,PLUGIN_SECURE_PROXY_NOT_FOUND:`Could not find '@orama/secure-proxy-plugin' installed in your Orama instance.
308
308
  Please install it before proceeding with creating an answer session.
@@ -310,8 +310,8 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
310
310
  `,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
311
311
  Please provide a chat model before proceeding with creating an answer session.
312
312
  Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
313
- `,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function $(e,...t){let n=Error(KX(mZ[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function hZ(e){return{raw:Number(e),formatted:XX(e)}}function gZ(e){if(e.id){if(typeof e.id!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return QX()}function _Z(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(xZ(r)){let e=wZ(r);if(!Array.isArray(t)||t.length!==e)throw $(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(SZ(r)){if(!Array.isArray(t))return n;let e=CZ(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=_Z(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const vZ={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},yZ={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function bZ(e){return e===`geopoint`}function xZ(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function SZ(e){return typeof e==`string`&&vZ[e]}function CZ(e){return yZ[e]}function wZ(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw $(`INVALID_VECTOR_VALUE`,e);case t<=0:throw $(`INVALID_VECTOR_SIZE`,e);default:return t}}function TZ(){return{idToInternalId:new Map,internalIdToId:[],save:EZ,load:DZ}}function EZ(e){return{internalIdToId:e.internalIdToId}}function DZ(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function OZ(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?OZ(e,t.toString()):t}function kZ(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function AZ(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function jZ(e,t){let n=OZ(e.sharedInternalDocumentStore,t);return e.docs[n]}function MZ(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=OZ(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function NZ(e){return e.docs}function PZ(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function FZ(e,t){let n=OZ(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function IZ(e){return e.count}function LZ(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function RZ(e){return{docs:e.docs,count:e.count}}function zZ(){return{create:AZ,get:jZ,getMultiple:MZ,getAll:NZ,store:PZ,remove:FZ,count:IZ,load:LZ,save:RZ}}const BZ=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function VZ(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),$(`PLUGIN_CRASHED`)}return n}const HZ=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],UZ=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function WZ(e,t,n,r){if(e.some(sZ))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function GZ(e,t,n){if(e.some(sZ))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function KZ(e,t,n,r,i){if(e.some(sZ))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function qZ(e,t,n,r){if(e.some(sZ))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function JZ(e,t){if(e.some(sZ))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var YZ=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},XZ=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new YZ(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?YZ.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new YZ(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new YZ(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new YZ(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},ZZ=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function QZ(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function $Z(e,t,n){let r=QZ(e,t,n);return{distance:r,isBounded:r>=0}}var eQ=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if($X(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&$Z(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if($X(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&($Z(e,n,r).isBounded&&(i[n]=[]),$X(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},tQ=class e extends eQ{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,eQ.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},nQ=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},rQ=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new nQ(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%2==0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=nQ.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),E=w/1024*(256+w*(-128+w*(74-47*w))),ee=E*v*(C+E/4*(y*(-1+2*C*C)-E/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-ee)}},iQ=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function aQ(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var oQ=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=sQ(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),cQ(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function sQ(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function cQ(e,t,n,r,i){let a=sQ(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function lQ(e,t,n,r,i){let a=OZ(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function uQ(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=OZ(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function dQ(e,t,n,r){let i=OZ(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function fQ(e,t,n){e.tokenOccurrences[t][n]--}function pQ(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){pQ(e,t,o,r,n);continue}if(xZ(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new oQ(wZ(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new iQ,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new XZ(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new tQ,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new ZZ,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new rQ,isArray:e};break;default:throw $(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function mQ(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function hQ(e,t,n,r,i,a,o,s,c,l,u){if(xZ(o))return gQ(t,n,a,r,i);let d=mQ(e,t,n,i,s,c,l,u);if(!SZ(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function gQ(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function _Q(e,t,n,r,i,a,o,s,c,l){if(xZ(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function vQ(e,t,n,r,i,a,o,s,c,l){if(!SZ(o))return _Q(e,t,n,r,i,a,o,s,c,l);let u=CZ(o),d=a,f=d.length;for(let a=0;a<f;a++)_Q(e,t,n,r,i,d[a],u,s,c,l);return!0}function yQ(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=aQ(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function bQ(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw $(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw $(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];yQ(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function xQ(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:lZ(...i.map(n=>xQ(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>xQ(e,t,n,r)).reduce((e,t)=>dZ(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return fZ(a,xQ(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw $(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=dZ(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=aZ(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=DQ(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=DQ(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=jQ(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw $(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=dZ(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw $(`INVALID_FILTER_OPERATION`,e)}a[o]=dZ(a[o],n)}}return lZ(...Object.values(a))}function SQ(e){return e.searchableProperties}function CQ(e){return e.searchablePropertiesWithTypes}function wQ(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:tQ.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:ZZ.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:XZ.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:rQ.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:iQ.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:oQ.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function TQ(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function EQ(){return{create:pQ,insert:hQ,remove:vQ,insertDocumentScoreParameters:lQ,insertTokenScoreParameters:uQ,removeDocumentScoreParameters:dQ,removeTokenScoreParameters:fQ,calculateResultScores:yQ,search:bQ,searchByWhereClause:xQ,getSearchableProperties:SQ,getSearchablePropertiesWithTypes:CQ,load:wQ,save:TQ}}function DQ(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function OQ(e,t,n=!1){let r=n?rQ.vincentyDistance:rQ.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function kQ(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function AQ(e,t){let n=e,r=kQ(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=aZ(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),OQ(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=rQ.calculatePolygonCentroid(e);return OQ(s,r,n)}return null}function jQ(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function MQ(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=MQ(e,t,s,r,n);GX(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!xZ(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw $(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function NQ(e,t,n,r){return r?.enabled===!1?{disabled:!0}:MQ(e,t,n,(r||{}).unsortableProperties||[],``)}function PQ(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=OZ(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&VQ(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function FQ(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)zQ(e,n);e.isSorted=!0}function IQ(e,t,n){return t[1].localeCompare(n[1],RX(e))}function LQ(e,t){return e[1]-t[1]}function RQ(e,t){return t[1]?-1:1}function zQ(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=IQ.bind(null,e.language);break;case`number`:r=LQ.bind(null);break;case`boolean`:r=RQ.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function BQ(e){let t=Object.keys(e.sorts);for(let n of t)VQ(e,n)}function VQ(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function HQ(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=OZ(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function UQ(e,t,n){if(!e.enabled)throw $(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw $(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return VQ(e,r),FQ(e),t.sort((t,n)=>{let r=a.docs.get(OZ(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(OZ(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function WQ(e){return e.enabled?e.sortableProperties:[]}function GQ(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function KQ(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function qQ(e){if(!e.enabled)return{enabled:!1};BQ(e),FQ(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function JQ(){return{create:NQ,insert:PQ,remove:HQ,save:qQ,load:KQ,sortBy:UQ,getSortableProperties:WQ,getSortablePropertiesWithTypes:GQ}}const YQ=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function XQ(e){return e<192||e>383?e:YQ[e-192]||e}function ZQ(e){let t=[];for(let n=0;n<e.length;n++)t[n]=XQ(e.charCodeAt(n));return String.fromCharCode(...t)}const QQ={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},$Q={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},e$=`[aeiouy]`,t$=`[^aeiou][^aeiouy]*`;e$+``;const n$=`^(`+t$+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`;``+t$;const r$=`^(`+t$+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,i$=`^(`+t$+`)?[aeiouy]`;function a$(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(n$),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(i$),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+t$+e$+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(i$),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(n$),t&&r.test(t)&&(e=t+QQ[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(n$),t&&r.test(t)&&(e=t+$Q[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(r$),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(r$),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(r$),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+t$+e$+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(r$),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function o$(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=ZQ(t),n&&this.normalizationCache.set(r,t),t)}function s$(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function c$(e,t,n,r=!0){if(t&&t!==this.language)throw $(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=IX[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=s$(a);return this.allowDuplicates?o:Array.from(new Set(o))}function l$(e={}){if(!e.language)e.language=`english`;else if(!LX.includes(e.language))throw $(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw $(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=a$;else throw $(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:c$,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:o$,normalizationCache:new Map};return r.tokenize=c$.bind(r),r.normalizeToken=o$,r}function u$(e){return{sharedInternalDocumentStore:e,rules:new Map}}function d$(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function f$(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function p$(e,t){return e.rules.delete(t)}function m$(e,t){return e.rules.get(t)}function h$(e){return Array.from(e.rules.values())}function g$(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function _$(e,t){return e?t.conditions.every(t=>g$(e,t)):!1}function v$(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())_$(t,r)&&n.push(r);return n}function y$(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function b$(e){return{rules:Array.from(e.rules.entries())}}function x$(){return{create:u$,addRule:d$,updateRule:f$,removeRule:p$,getRule:m$,getAllRules:h$,getMatchingRules:v$,load:y$,save:b$}}function S$(e){let t={formatElapsedTime:hZ,getDocumentIndexId:gZ,getDocumentProperties:nZ,validateSchema:_Z};for(let n of UZ){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw $(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!HZ.includes(t)&&!UZ.includes(t))throw $(`UNSUPPORTED_COMPONENT`,t)}function C$({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw $(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=QX();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:l$(o):l$({language:n??`english`}),r.tokenizer&&n)throw $(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=TZ();s||=EQ(),l||=JQ(),c||=zZ(),u||=x$(),S$(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:w$()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of BZ)g[e]=(g[e]??[]).concat(VZ(g,e));let _=g.afterCreate;return _&&JZ(_,g),g}function w$(){return`{{VERSION}}`}function T$(e){return e.documentsStore.count(e.data.docs)}function E$(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw $(`SCHEMA_VALIDATION_FAILURE`,a);return sZ(e.beforeInsert)||sZ(e.afterInsert)||sZ(e.index.beforeInsert)||sZ(e.index.insert)||sZ(e.index.afterInsert)?k$(e,t,n,r,i):A$(e,t,n,r,i)}const D$=new Set([`enum`,`enum[]`]),O$=new Set([`string`,`number`]);async function k$(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=OZ(e.internalDocumentIDStore,s);if(r||await WZ(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];j$(n,r,e,t)}return await M$(e,s,u,f,l,n,t,i),r||await WZ(e.afterInsert,e,s,t),s}function A$(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=OZ(e.internalDocumentIDStore,s);if(r||WZ(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];j$(n,r,e,t)}return N$(e,s,u,f,l,n,t,i),r||WZ(e.afterInsert,e,s,t),s}function j$(e,t,n,r){if(!(bZ(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(xZ(t)&&Array.isArray(r))&&!(SZ(t)&&Array.isArray(r))&&!(D$.has(t)&&O$.has(e))&&e!==t)throw $(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function M$(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function N$(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=OZ(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function P$(e,t,n,r,i,a){return sZ(e.afterInsertMultiple)||sZ(e.beforeInsertMultiple)||sZ(e.index.beforeInsert)||sZ(e.index.insert)||sZ(e.index.afterInsert)?F$(e,t,n,r,i,a):I$(e,t,n,r,i,a)}async function F$(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await E$(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&pZ(e)}}})(),i||await GZ(e.afterInsertMultiple,e,t),o}function I$(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=E$(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&pZ(e)}}}return l(),i||GZ(e.afterInsertMultiple,e,t),o}function L$(e,t,n,r){return sZ(e.index.beforeRemove)||sZ(e.index.remove)||sZ(e.index.afterRemove)?R$(e,t,n,r):z$(e,t,n,r)}async function R$(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=OZ(e.internalDocumentIDStore,t),l=kZ(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await WZ(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];await e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),await e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),await e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=await e.sorter.getSortableProperties(e.data.sorting),h=await e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||await WZ(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function z$(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=OZ(e.internalDocumentIDStore,t),l=kZ(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||WZ(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=e.sorter.getSortableProperties(e.data.sorting),h=e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||WZ(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function B$(e,t,n,r,i){return sZ(e.index.beforeRemove)||sZ(e.index.remove)||sZ(e.index.afterRemove)||sZ(e.beforeRemoveMultiple)||sZ(e.afterRemoveMultiple)?V$(e,t,n,r,i):H$(e,t,n,r,i)}async function V$(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>kZ(e.internalDocumentIDStore,OZ(e.internalDocumentIDStore,t)));return i||await GZ(e.beforeRemoveMultiple,e,o),await new Promise((o,s)=>{let c=0;async function l(){let u=t.slice(c*n,++c*n);if(!u.length)return o();for(let t of u)try{await L$(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await GZ(e.afterRemoveMultiple,e,o),a}function H$(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>kZ(e.internalDocumentIDStore,OZ(e.internalDocumentIDStore,t)));i||GZ(e.beforeRemoveMultiple,e,o);let s=0;function c(){let o=t.slice(s*n,++s*n);if(o.length){for(let t of o)L$(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||GZ(e.afterRemoveMultiple,e,o),a}function U$(e,t){return e[1]-t[1]}function W$(e,t){return t[1]-e[1]}function G$(e=`desc`){return e.toLowerCase()===`asc`?U$:W$}function K$(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?rZ(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;q$(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=q$(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:J$(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=J$(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw $(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=G$(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function q$(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function J$(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}const Y$={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},X$=[`string`,`number`,`boolean`];function Z$(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw $(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!X$.includes(a[t]))throw $(`INVALID_GROUP_BY_PROPERTY`,t,X$.join(`, `),a[t])}let o=t.map(([t])=>kZ(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=rZ(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=Q$(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=tZ(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||Y$,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function Q$(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=Q$(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];GX(n,t),i.push(n)}return i}function $$(e,t,n,r){let i=v$(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=OZ(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function e1(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw $(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=T$(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},a1(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=n1(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${t1(e)}\\b`).test(n)))return!0}return!1})}}else l=s?AQ(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function t1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function n1(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function r1(e,t,n){let r=ZX();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=e1(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[OZ(e.internalDocumentIDStore,t),n]);else d=d.sort(eZ);d=$$(e,e.data.pinning,d,t.term);let f;u||(f=c?_1(e,d,s,o,c):v1(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||oZ(p,i)),a&&(p.facets=K$(e,d,t.facets)),t.groupBy&&(p.groups=Z$(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(ZX()-r),p}async function a(){e.beforeSearch&&await qZ(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await KZ(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const i1={k:1.2,b:.75,d:.5};function a1(e){let t=e??{};return t.k=t.k??i1.k,t.b=t.b??i1.b,t.d=t.d??i1.d,t}function o1(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw $(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw $(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?$(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):$(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function s1(e,t,n=`english`){let r=ZX();function i(){let i=o1(e,t,n).sort(eZ);i=$$(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=K$(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:kZ(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=Z$(e,i,t.groupBy));let f=ZX()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:XX(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await qZ(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await KZ(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function c1(e,t,n){let r=d1(e1(e,t,n)),i=o1(e,t,n),a=t.hybridWeights;return m1(r,i,t.term??``,a)}function l1(e,t,n){let r=ZX();function i(){let i=c1(e,t,n);i=$$(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=K$(e,i,t.facets));let o;t.groupBy&&(o=Z$(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=v1(e,i,s,c).filter(Boolean),u=ZX(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:XX(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||oZ(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await qZ(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await KZ(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function u1(e){return e[1]}function d1(e){let t=Math.max.apply(Math,e.map(u1));return e.map(([e,n])=>[e,n/t])}function f1(e,t){return e/t}function p1(e,t){return(n,r)=>n*e+r*t}function m1(e,t,n,r){let i=Math.max.apply(Math,e.map(u1)),a=Math.max.apply(Math,t.map(u1)),{text:o,vector:s}=r&&r.text&&r.vector?r:h1(n),c=new Map,l=e.length,u=p1(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(f1(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=f1(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function h1(e){return{text:.5,vector:.5}}function g1(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return r1(e,t,n);if(r===`vector`)return s1(e,t);if(r===`hybrid`)return l1(e,t);throw $(`INVALID_SEARCH_MODE`,r)}function _1(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=rZ(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:kZ(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function v1(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:kZ(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const y1={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},b1=new WeakMap;function x1(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function S1(e){return e.trim().toLowerCase()}const C1=/\.(?:md|mdx)$/;function w1(e,t){if(t!==`page`)return e;let n=e.replace(C1,``);return n.length>0?n:e}function T1(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function E1(e){let t=T1(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function D1(e){let t=C$({schema:y1});return e.length>0&&P$(t,e),t}function O1(e){let t={documents:e};return b1.set(t,D1(e)),t}function k1(e){let t=b1.get(e);if(t)return t;let n=D1(e.documents);return b1.set(e,n),n}const A1=new WeakSet;function j1(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function M1(e,t){let n=e=>({corpus:O1(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=b1.get(e);if(!r)return n(`no-index`);if(A1.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?j1(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);A1.add(e);try{if(a.length>0&&B$(r,a),o.length>0&&P$(r,o),T$(r)!==t.length)throw Error(`Search index count ${T$(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return b1.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function N1(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function P1(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function F1(e,t){let n=S1(t);if(!n)return 0;let r=w1(n,e.kind),i=S1(e.title),a=S1(e.name),o=S1(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}function I1(e,t){let n=F1(e,t);return n<=0?n:ey(e.path)?n*.5:n}function L1(e){return e===`file`?-60:0}function R1(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function z1(e,t,n,r){return e+t*20+n+L1(r)}function B1(e,t,n,r,i,a){return e===`relevance`?z1(t,n,r,i):R1(t,n,r,i,a)}function V1(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function H1(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function U1(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function W1(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function G1(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function K1(e,t){return S1(t).length<4?0:+(e===`full_text`)}function q1(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function J1(e){let t=[],n=[],r=[];for(let i of e){let e=q1(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function Y1(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=J1(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function X1(e,t,n={}){let r=n.intent??`omnibar`,i=V1(r,n.ranking),a=x1(n.limit),o=new Set(n.scopes??N1(r)),s=e.documents.filter(e=>P1(e,o)),c=S1(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=g1(k1(e),{term:c,properties:W1(r),boost:G1(r),tolerance:K1(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>P1(e.document,o)).map(e=>[e.document.id,e.score])),d=U1(s),f=new Map;for(let e of s)I1(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)P1(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=H1(f.values(),u);return Y1([...f.values()].map(t=>{let n=Math.max(0,I1(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:B1(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return Y1(Q1({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function Z1(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Q1(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=H1(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,I1(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?B1(o,t,n,s,e.kind,m):z1(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=Z1(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=Z1(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}const $1=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),e0=globalThis;e0[$1]===void 0&&(e0[$1]=x());const t0=e0[$1],n0=[`.ok`,`skill-state.yml`],r0=[`claude-cowork`,`cli-hosts`],i0=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],a0=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,o0=te({version:T().regex(a0,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(t0,{description:`Recorded skill version for this target.`}),recordedAt:ee().register(t0,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:c(i0).register(t0,{description:`Install-source surface that recorded this entry.`}).optional()}),s0=te({enabled:p().register(t0,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:ee().register(t0,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),c0=te({schema:E(1).register(t0,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:te({"claude-cowork":o0.optional(),"cli-hosts":o0.optional()}).register(t0,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:v(T(),s0).register(t0,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional()});function l0(e,t){return e??t.installedOnDisk}function u0(){return{schema:1,targets:{}}}const d0=`template`;function f0(e){if(e.trim()===``)return{};let t;try{t=(0,Ce.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function p0(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function m0(e){let{frontmatter:t,body:n}=Ap(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Mp(t),markdown:n}}function h0(e){let t=e.split(`
314
- `);if(!(t[0]??``).startsWith(`template:`))return null;let n=[t[0]??``],r=1;for(;r<t.length;){let e=t[r]??``;if(/^[ \t]/.test(e)){n.push(e),r++;continue}if(e.trim()===``){let i=r+1;for(;i<t.length&&(t[i]??``).trim()===``;)i++;if(i<t.length&&/^[ \t]/.test(t[i]??``)){n.push(e),r++;continue}}break}let i=f0(n.join(`
315
- `))[d0];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
316
- `).replace(/\n+$/,``)}}function g0(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=Ap(t);if(n===``)return{identity:{},starterContent:t};let i=Mp(n),a=h0(i);if(a)return{identity:a.identity,starterContent:p0(a.docFrontmatterText,r)};let{frontmatter:o}=Ap(r);if(o!==``)return{identity:f0(i),starterContent:r};let s=f0(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:p0(i,r)}}function _0(e,t){let{docFrontmatterText:n,markdown:r}=m0(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Ce.stringify)({[d0]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function v0(e){return g0(e).starterContent}const y0=`(agent thread)`;function b0(){let e=!1,t=``,n=0;return r=>{let i=x0(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function x0(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}const S0=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],C0={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function w0(e,t=S0){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const T0={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function E0(e){return e?T0[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const D0={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function O0(e){let t=e?.trim();return t?D0[E0(t)]??t:`Agent`}function k0(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}const A0=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function j0(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function M0(e){let t=e.trim();return A0.test(t)||t.startsWith(`//`)}function N0(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(M0(n))return{kind:`external`,url:n};let r=k0(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};let i=j0(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function P0(e,t){let n=e.trim();if(!n)return null;if(M0(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=j0(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function F0(e,t){let n=e.trim();if(!n||A0.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function I0(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function L0(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function R0(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function z0(e){return e.split(`/`).filter(e=>e!==``)}function B0(e,t){let n=R0(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function V0(e,t){let n=R0(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:z0(r).length}function H0(e,t){let n=z0(e),r=z0(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function U0(){let e=new Map;function t(t){let n=I0(t);if(n===``)return;let r=L0(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=I0(t),r=L0(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=R0(I0(n)),o=[],s=[];for(let e of i)B0(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=V0(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=V0(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=H0(a,R0(t));for(let r=1;r<e.length;r++){let i=e[r],o=H0(a,R0(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function W0(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function G0(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}export{bY as $,xd as $i,PK as $n,oG as $r,Fq as $t,NX as A,Oe as Aa,My as Ai,JK as An,VG as Ar,pJ as At,pX as B,Ve as Ba,Oy as Bi,lq as Bn,MG as Br,wJ as Bt,l0 as C,Xe as Ca,Uy as Ci,bq as Cn,eK as Cr,Qq as Ct,M1 as D,Ae as Da,Wy as Di,YK as Dn,GG as Dr,lJ as Dt,X1 as E,je as Ea,Gy as Ei,_q as En,$G as Er,kJ as Et,CX as F,Te as Fa,my as Fi,KK as Fn,wG as Fr,vJ as Ft,RY as G,_e as Ga,Qv as Gi,AK as Gn,OG as Gr,CJ as Gt,fX as H,ze as Ha,ky as Hi,sq as Hn,hG as Hr,Zq as Ht,SX as I,Fe as Ia,_y as Ii,tq as In,gG as Ir,uJ as It,EY as J,he as Ja,qv as Ji,RK as Jn,LG as Jr,sJ as Jt,FY as K,ve as Ka,Xv as Ki,HK as Kn,EG as Kr,yJ as Kt,xX as L,Je as La,yy as Li,$K as Ln,AG as Lr,dJ as Lt,OX as M,Ne as Ma,sy as Mi,oq as Mn,XG as Mr,rJ as Mt,wX as N,Pe as Na,uy as Ni,ZK as Nn,RG as Nr,_J as Nt,kX as O,De as Oa,Hy as Oi,XK as On,WG as Or,gJ as Ot,bX as P,Ie as Pa,hy as Pi,QK as Pn,zG as Pr,MJ as Pt,xY as Q,Mp as Qi,UK as Qn,aG as Qr,Lq as Qt,yX as R,Ue as Ra,Fy as Ri,rq as Rn,_G as Rr,aJ as Rt,u0 as S,Ze as Sa,zy as Si,yq as Sn,oK as Sr,Bq as St,E1 as T,Ee as Ta,qy as Ti,gq as Tn,aK as Tr,AJ as Tt,aX as U,We as Ua,by as Ui,cq as Un,kG as Ur,xJ as Ut,oX as V,Le as Va,Sy as Vi,uq as Vn,FG as Vr,TJ as Vt,iX as W,we as Wa,ey as Wi,kK as Wn,mG as Wr,SJ as Wt,wY as X,jp as Xi,FK as Xn,pG as Xr,iJ as Xt,TY as Y,Uv as Yi,IK as Yn,uG as Yr,cJ as Yt,SY as Z,Ap as Zi,VK as Zn,XW as Zr,tJ as Zt,g0 as _,et as _a,nL as _i,wq as _n,sK as _r,IJ as _t,P0 as a,pt as aa,IW as ai,Xq as an,yK as ar,rY as at,a0 as b,rt as ba,By as bi,xq as bn,rK as br,Rq as bt,C0 as c,ut as ca,kW as ci,Uq as cn,wK as cr,ZJ as ct,E0 as d,ct as da,TW as di,Mq as dn,hK as dr,UJ as dt,li as ea,WW as ei,Jq as en,MK as er,fY as et,b0 as f,lt as fa,xW as fi,Nq as fn,_K as fr,VJ as ft,v0 as g,at as ga,cB as gi,Cq as gn,mK as gr,LJ as gt,_0 as h,$e as ha,lB as hi,Aq as hn,uK as hr,PJ as ht,N0 as i,ht as ia,FW as ii,Yq as in,vK as ir,dY as it,PX as j,Me as ja,Py as ji,aq as jn,qG as jr,mJ as jt,MX as k,ke as ka,jy as ki,qK as kn,HG as kr,hJ as kt,w0 as l,dt as la,jW as li,eJ as ln,SK as lr,BJ as lt,d0 as m,Qe as ma,xB as mi,Oq as mn,dK as mr,zJ as mt,G0 as n,_t as na,RW as ni,Kq as nn,jK as nr,sY as nt,F0 as o,mt as oa,AW as oi,Wq as on,bK as or,nY as ot,y0 as p,ot as pa,bW as pi,Pq as pn,pK as pr,HJ as pt,kY as q,ge as qa,Yv as qi,BK as qn,IG as qr,bJ as qt,U0 as r,gt as ra,LW as ri,qq as rn,TK as rr,cY as rt,k0 as s,ft as sa,CW as si,Gq as sn,CK as sr,KJ as st,W0 as t,A as ta,HW as ti,Hq as tn,NK as tr,hY as tt,O0 as u,st as ua,MW as ui,jq as un,xK as ur,WJ as ut,n0 as v,it as va,EN as vi,Dq as vn,cK as vr,FJ as vt,O1 as w,Ye as wa,Ry as wi,hq as wn,tK as wr,EJ as wt,c0 as x,nt as xa,Ky as xi,vq as xn,iK as xr,zq as xt,r0 as y,tt as ya,yM as yi,Sq as yn,lK as yr,NJ as yt,vX as z,Ke as za,Iy as zi,iq as zn,jG as zr,oJ as zt};
317
- //# sourceMappingURL=src-BTo9m5ju.mjs.map
313
+ `,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function $(e,...t){let n=Error(GX(pZ[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function mZ(e){return{raw:Number(e),formatted:YX(e)}}function hZ(e){if(e.id){if(typeof e.id!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return ZX()}function gZ(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(bZ(r)){let e=CZ(r);if(!Array.isArray(t)||t.length!==e)throw $(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(xZ(r)){if(!Array.isArray(t))return n;let e=SZ(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=gZ(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const _Z={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},vZ={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function yZ(e){return e===`geopoint`}function bZ(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function xZ(e){return typeof e==`string`&&_Z[e]}function SZ(e){return vZ[e]}function CZ(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw $(`INVALID_VECTOR_VALUE`,e);case t<=0:throw $(`INVALID_VECTOR_SIZE`,e);default:return t}}function wZ(){return{idToInternalId:new Map,internalIdToId:[],save:TZ,load:EZ}}function TZ(e){return{internalIdToId:e.internalIdToId}}function EZ(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function DZ(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?DZ(e,t.toString()):t}function OZ(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function kZ(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function AZ(e,t){let n=DZ(e.sharedInternalDocumentStore,t);return e.docs[n]}function jZ(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=DZ(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function MZ(e){return e.docs}function NZ(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function PZ(e,t){let n=DZ(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function FZ(e){return e.count}function IZ(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function LZ(e){return{docs:e.docs,count:e.count}}function RZ(){return{create:kZ,get:AZ,getMultiple:jZ,getAll:MZ,store:NZ,remove:PZ,count:FZ,load:IZ,save:LZ}}const zZ=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function BZ(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),$(`PLUGIN_CRASHED`)}return n}const VZ=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],HZ=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function UZ(e,t,n,r){if(e.some(oZ))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function WZ(e,t,n){if(e.some(oZ))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function GZ(e,t,n,r,i){if(e.some(oZ))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function KZ(e,t,n,r){if(e.some(oZ))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function qZ(e,t){if(e.some(oZ))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var JZ=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},YZ=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new JZ(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?JZ.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new JZ(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new JZ(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new JZ(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},XZ=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function ZZ(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function QZ(e,t,n){let r=ZZ(e,t,n);return{distance:r,isBounded:r>=0}}var $Z=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(QX(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&QZ(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(QX(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(QZ(e,n,r).isBounded&&(i[n]=[]),QX(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},eQ=class e extends $Z{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,$Z.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},tQ=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},nQ=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new tQ(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%2==0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=tQ.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),E=w/1024*(256+w*(-128+w*(74-47*w))),ee=E*v*(C+E/4*(y*(-1+2*C*C)-E/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-ee)}},rQ=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function iQ(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var aQ=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=oQ(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),sQ(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function oQ(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function sQ(e,t,n,r,i){let a=oQ(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function cQ(e,t,n,r,i){let a=DZ(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function lQ(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=DZ(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function uQ(e,t,n,r){let i=DZ(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function dQ(e,t,n){e.tokenOccurrences[t][n]--}function fQ(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){fQ(e,t,o,r,n);continue}if(bZ(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new aQ(CZ(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new rQ,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new YZ(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new eQ,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new XZ,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new nQ,isArray:e};break;default:throw $(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function pQ(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function mQ(e,t,n,r,i,a,o,s,c,l,u){if(bZ(o))return hQ(t,n,a,r,i);let d=pQ(e,t,n,i,s,c,l,u);if(!xZ(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function hQ(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function gQ(e,t,n,r,i,a,o,s,c,l){if(bZ(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function _Q(e,t,n,r,i,a,o,s,c,l){if(!xZ(o))return gQ(e,t,n,r,i,a,o,s,c,l);let u=SZ(o),d=a,f=d.length;for(let a=0;a<f;a++)gQ(e,t,n,r,i,d[a],u,s,c,l);return!0}function vQ(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=iQ(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function yQ(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw $(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw $(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];vQ(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function bQ(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:cZ(...i.map(n=>bQ(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>bQ(e,t,n,r)).reduce((e,t)=>uZ(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return dZ(a,bQ(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw $(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=uZ(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=iZ(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=EQ(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=EQ(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=AQ(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw $(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=uZ(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw $(`INVALID_FILTER_OPERATION`,e)}a[o]=uZ(a[o],n)}}return cZ(...Object.values(a))}function xQ(e){return e.searchableProperties}function SQ(e){return e.searchablePropertiesWithTypes}function CQ(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:eQ.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:XZ.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:YZ.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:nQ.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:rQ.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:aQ.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function wQ(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function TQ(){return{create:fQ,insert:mQ,remove:_Q,insertDocumentScoreParameters:cQ,insertTokenScoreParameters:lQ,removeDocumentScoreParameters:uQ,removeTokenScoreParameters:dQ,calculateResultScores:vQ,search:yQ,searchByWhereClause:bQ,getSearchableProperties:xQ,getSearchablePropertiesWithTypes:SQ,load:CQ,save:wQ}}function EQ(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function DQ(e,t,n=!1){let r=n?nQ.vincentyDistance:nQ.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function OQ(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function kQ(e,t){let n=e,r=OQ(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=iZ(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),DQ(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=nQ.calculatePolygonCentroid(e);return DQ(s,r,n)}return null}function AQ(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function jQ(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=jQ(e,t,s,r,n);WX(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!bZ(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw $(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function MQ(e,t,n,r){return r?.enabled===!1?{disabled:!0}:jQ(e,t,n,(r||{}).unsortableProperties||[],``)}function NQ(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=DZ(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&BQ(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function PQ(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)RQ(e,n);e.isSorted=!0}function FQ(e,t,n){return t[1].localeCompare(n[1],LX(e))}function IQ(e,t){return e[1]-t[1]}function LQ(e,t){return t[1]?-1:1}function RQ(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=FQ.bind(null,e.language);break;case`number`:r=IQ.bind(null);break;case`boolean`:r=LQ.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function zQ(e){let t=Object.keys(e.sorts);for(let n of t)BQ(e,n)}function BQ(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function VQ(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=DZ(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function HQ(e,t,n){if(!e.enabled)throw $(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw $(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return BQ(e,r),PQ(e),t.sort((t,n)=>{let r=a.docs.get(DZ(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(DZ(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function UQ(e){return e.enabled?e.sortableProperties:[]}function WQ(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function GQ(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function KQ(e){if(!e.enabled)return{enabled:!1};zQ(e),PQ(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function qQ(){return{create:MQ,insert:NQ,remove:VQ,save:KQ,load:GQ,sortBy:HQ,getSortableProperties:UQ,getSortablePropertiesWithTypes:WQ}}const JQ=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function YQ(e){return e<192||e>383?e:JQ[e-192]||e}function XQ(e){let t=[];for(let n=0;n<e.length;n++)t[n]=YQ(e.charCodeAt(n));return String.fromCharCode(...t)}const ZQ={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},QQ={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},$Q=`[aeiouy]`,e$=`[^aeiou][^aeiouy]*`;$Q+``;const t$=`^(`+e$+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`;``+e$;const n$=`^(`+e$+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,r$=`^(`+e$+`)?[aeiouy]`;function i$(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(t$),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(r$),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+e$+$Q+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(r$),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(t$),t&&r.test(t)&&(e=t+ZQ[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(t$),t&&r.test(t)&&(e=t+QQ[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(n$),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(n$),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(n$),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+e$+$Q+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(n$),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function a$(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=XQ(t),n&&this.normalizationCache.set(r,t),t)}function o$(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function s$(e,t,n,r=!0){if(t&&t!==this.language)throw $(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=FX[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=o$(a);return this.allowDuplicates?o:Array.from(new Set(o))}function c$(e={}){if(!e.language)e.language=`english`;else if(!IX.includes(e.language))throw $(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw $(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=i$;else throw $(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw $(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:s$,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:a$,normalizationCache:new Map};return r.tokenize=s$.bind(r),r.normalizeToken=a$,r}function l$(e){return{sharedInternalDocumentStore:e,rules:new Map}}function u$(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function d$(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function f$(e,t){return e.rules.delete(t)}function p$(e,t){return e.rules.get(t)}function m$(e){return Array.from(e.rules.values())}function h$(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function g$(e,t){return e?t.conditions.every(t=>h$(e,t)):!1}function _$(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())g$(t,r)&&n.push(r);return n}function v$(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function y$(e){return{rules:Array.from(e.rules.entries())}}function b$(){return{create:l$,addRule:u$,updateRule:d$,removeRule:f$,getRule:p$,getAllRules:m$,getMatchingRules:_$,load:v$,save:y$}}function x$(e){let t={formatElapsedTime:mZ,getDocumentIndexId:hZ,getDocumentProperties:tZ,validateSchema:gZ};for(let n of HZ){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw $(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!VZ.includes(t)&&!HZ.includes(t))throw $(`UNSUPPORTED_COMPONENT`,t)}function S$({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw $(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=ZX();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:c$(o):c$({language:n??`english`}),r.tokenizer&&n)throw $(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=wZ();s||=TQ(),l||=qQ(),c||=RZ(),u||=b$(),x$(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:C$()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of zZ)g[e]=(g[e]??[]).concat(BZ(g,e));let _=g.afterCreate;return _&&qZ(_,g),g}function C$(){return`{{VERSION}}`}function w$(e){return e.documentsStore.count(e.data.docs)}function T$(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw $(`SCHEMA_VALIDATION_FAILURE`,a);return oZ(e.beforeInsert)||oZ(e.afterInsert)||oZ(e.index.beforeInsert)||oZ(e.index.insert)||oZ(e.index.afterInsert)?O$(e,t,n,r,i):k$(e,t,n,r,i)}const E$=new Set([`enum`,`enum[]`]),D$=new Set([`string`,`number`]);async function O$(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=DZ(e.internalDocumentIDStore,s);if(r||await UZ(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];A$(n,r,e,t)}return await j$(e,s,u,f,l,n,t,i),r||await UZ(e.afterInsert,e,s,t),s}function k$(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw $(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=DZ(e.internalDocumentIDStore,s);if(r||UZ(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw $(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];A$(n,r,e,t)}return M$(e,s,u,f,l,n,t,i),r||UZ(e.afterInsert,e,s,t),s}function A$(e,t,n,r){if(!(yZ(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(bZ(t)&&Array.isArray(r))&&!(xZ(t)&&Array.isArray(r))&&!(E$.has(t)&&D$.has(e))&&e!==t)throw $(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function j$(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function M$(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=DZ(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function N$(e,t,n,r,i,a){return oZ(e.afterInsertMultiple)||oZ(e.beforeInsertMultiple)||oZ(e.index.beforeInsert)||oZ(e.index.insert)||oZ(e.index.afterInsert)?P$(e,t,n,r,i,a):F$(e,t,n,r,i,a)}async function P$(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await T$(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&fZ(e)}}})(),i||await WZ(e.afterInsertMultiple,e,t),o}function F$(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=T$(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&fZ(e)}}}return l(),i||WZ(e.afterInsertMultiple,e,t),o}function I$(e,t,n,r){return oZ(e.index.beforeRemove)||oZ(e.index.remove)||oZ(e.index.afterRemove)?L$(e,t,n,r):R$(e,t,n,r)}async function L$(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=DZ(e.internalDocumentIDStore,t),l=OZ(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await UZ(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];await e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),await e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),await e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=await e.sorter.getSortableProperties(e.data.sorting),h=await e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||await UZ(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function R$(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=DZ(e.internalDocumentIDStore,t),l=OZ(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||UZ(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=e.sorter.getSortableProperties(e.data.sorting),h=e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||UZ(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function z$(e,t,n,r,i){return oZ(e.index.beforeRemove)||oZ(e.index.remove)||oZ(e.index.afterRemove)||oZ(e.beforeRemoveMultiple)||oZ(e.afterRemoveMultiple)?B$(e,t,n,r,i):V$(e,t,n,r,i)}async function B$(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>OZ(e.internalDocumentIDStore,DZ(e.internalDocumentIDStore,t)));return i||await WZ(e.beforeRemoveMultiple,e,o),await new Promise((o,s)=>{let c=0;async function l(){let u=t.slice(c*n,++c*n);if(!u.length)return o();for(let t of u)try{await I$(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await WZ(e.afterRemoveMultiple,e,o),a}function V$(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>OZ(e.internalDocumentIDStore,DZ(e.internalDocumentIDStore,t)));i||WZ(e.beforeRemoveMultiple,e,o);let s=0;function c(){let o=t.slice(s*n,++s*n);if(o.length){for(let t of o)I$(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||WZ(e.afterRemoveMultiple,e,o),a}function H$(e,t){return e[1]-t[1]}function U$(e,t){return t[1]-e[1]}function W$(e=`desc`){return e.toLowerCase()===`asc`?H$:U$}function G$(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?nZ(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;K$(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=K$(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:q$(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=q$(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw $(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=W$(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function K$(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function q$(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}const J$={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},Y$=[`string`,`number`,`boolean`];function X$(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw $(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!Y$.includes(a[t]))throw $(`INVALID_GROUP_BY_PROPERTY`,t,Y$.join(`, `),a[t])}let o=t.map(([t])=>OZ(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=nZ(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=Z$(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=eZ(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||J$,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function Z$(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=Z$(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];WX(n,t),i.push(n)}return i}function Q$(e,t,n,r){let i=_$(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=DZ(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function $$(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw $(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=w$(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},i1(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=t1(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${e1(e)}\\b`).test(n)))return!0}return!1})}}else l=s?kQ(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function e1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function t1(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function n1(e,t,n){let r=XX();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=$$(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[DZ(e.internalDocumentIDStore,t),n]);else d=d.sort($X);d=Q$(e,e.data.pinning,d,t.term);let f;u||(f=c?g1(e,d,s,o,c):_1(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||aZ(p,i)),a&&(p.facets=G$(e,d,t.facets)),t.groupBy&&(p.groups=X$(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(XX()-r),p}async function a(){e.beforeSearch&&await KZ(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await GZ(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const r1={k:1.2,b:.75,d:.5};function i1(e){let t=e??{};return t.k=t.k??r1.k,t.b=t.b??r1.b,t.d=t.d??r1.d,t}function a1(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw $(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw $(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?$(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):$(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function o1(e,t,n=`english`){let r=XX();function i(){let i=a1(e,t,n).sort($X);i=Q$(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=G$(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:OZ(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=X$(e,i,t.groupBy));let f=XX()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:YX(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await KZ(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await GZ(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function s1(e,t,n){let r=u1($$(e,t,n)),i=a1(e,t,n),a=t.hybridWeights;return p1(r,i,t.term??``,a)}function c1(e,t,n){let r=XX();function i(){let i=s1(e,t,n);i=Q$(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=G$(e,i,t.facets));let o;t.groupBy&&(o=X$(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=_1(e,i,s,c).filter(Boolean),u=XX(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:YX(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||aZ(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await KZ(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await GZ(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function l1(e){return e[1]}function u1(e){let t=Math.max.apply(Math,e.map(l1));return e.map(([e,n])=>[e,n/t])}function d1(e,t){return e/t}function f1(e,t){return(n,r)=>n*e+r*t}function p1(e,t,n,r){let i=Math.max.apply(Math,e.map(l1)),a=Math.max.apply(Math,t.map(l1)),{text:o,vector:s}=r&&r.text&&r.vector?r:m1(n),c=new Map,l=e.length,u=f1(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(d1(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=d1(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function m1(e){return{text:.5,vector:.5}}function h1(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return n1(e,t,n);if(r===`vector`)return o1(e,t);if(r===`hybrid`)return c1(e,t);throw $(`INVALID_SEARCH_MODE`,r)}function g1(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=nZ(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:OZ(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function _1(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:OZ(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const v1={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},y1=new WeakMap;function b1(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function x1(e){return e.trim().toLowerCase()}const S1=/\.(?:md|mdx)$/;function C1(e,t){if(t!==`page`)return e;let n=e.replace(S1,``);return n.length>0?n:e}function w1(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function T1(e){let t=w1(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function E1(e){let t=S$({schema:v1});return e.length>0&&N$(t,e),t}function D1(e){let t={documents:e};return y1.set(t,E1(e)),t}function O1(e){let t=y1.get(e);if(t)return t;let n=E1(e.documents);return y1.set(e,n),n}const k1=new WeakSet;function A1(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function j1(e,t){let n=e=>({corpus:D1(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=y1.get(e);if(!r)return n(`no-index`);if(k1.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?A1(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);k1.add(e);try{if(a.length>0&&z$(r,a),o.length>0&&N$(r,o),w$(r)!==t.length)throw Error(`Search index count ${w$(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return y1.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function M1(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function N1(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function P1(e,t){let n=x1(t);if(!n)return 0;let r=C1(n,e.kind),i=x1(e.title),a=x1(e.name),o=x1(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}function F1(e,t){let n=P1(e,t);return n<=0?n:ey(e.path)?n*.5:n}function I1(e){return e===`file`?-60:0}function L1(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function R1(e,t,n,r){return e+t*20+n+I1(r)}function z1(e,t,n,r,i,a){return e===`relevance`?R1(t,n,r,i):L1(t,n,r,i,a)}function B1(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function V1(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function H1(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function U1(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function W1(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function G1(e,t){return x1(t).length<4?0:+(e===`full_text`)}function K1(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function q1(e){let t=[],n=[],r=[];for(let i of e){let e=K1(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function J1(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=q1(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function Y1(e,t,n={}){let r=n.intent??`omnibar`,i=B1(r,n.ranking),a=b1(n.limit),o=new Set(n.scopes??M1(r)),s=e.documents.filter(e=>N1(e,o)),c=x1(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=h1(O1(e),{term:c,properties:U1(r),boost:W1(r),tolerance:G1(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>N1(e.document,o)).map(e=>[e.document.id,e.score])),d=H1(s),f=new Map;for(let e of s)F1(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)N1(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=V1(f.values(),u);return J1([...f.values()].map(t=>{let n=Math.max(0,F1(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:z1(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return J1(Z1({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function X1(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Z1(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=V1(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,F1(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?z1(o,t,n,s,e.kind,m):R1(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=X1(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=X1(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}const Q1=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),$1=globalThis;$1[Q1]===void 0&&($1[Q1]=x());const e0=$1[Q1],t0=[`.ok`,`skill-state.yml`],n0=[`claude-cowork`,`cli-hosts`],r0=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],i0=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,a0=te({version:T().regex(i0,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(e0,{description:`Recorded skill version for this target.`}),recordedAt:ee().register(e0,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:c(r0).register(e0,{description:`Install-source surface that recorded this entry.`}).optional()}),o0=te({enabled:p().register(e0,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:ee().register(e0,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),s0=te({schema:E(1).register(e0,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:te({"claude-cowork":a0.optional(),"cli-hosts":a0.optional()}).register(e0,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:v(T(),o0).register(e0,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional()});function c0(e,t){return e??t.installedOnDisk}function l0(){return{schema:1,targets:{}}}const u0=`template`;function d0(e){if(e.trim()===``)return{};let t;try{t=(0,Ce.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function f0(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function p0(e){let{frontmatter:t,body:n}=Ap(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Mp(t),markdown:n}}function m0(e){let t=e.split(`
314
+ `);if(!(t[0]??``).startsWith(`template:`))return null;let n=[t[0]??``],r=1;for(;r<t.length;){let e=t[r]??``;if(/^[ \t]/.test(e)){n.push(e),r++;continue}if(e.trim()===``){let i=r+1;for(;i<t.length&&(t[i]??``).trim()===``;)i++;if(i<t.length&&/^[ \t]/.test(t[i]??``)){n.push(e),r++;continue}}break}let i=d0(n.join(`
315
+ `))[u0];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
316
+ `).replace(/\n+$/,``)}}function h0(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=Ap(t);if(n===``)return{identity:{},starterContent:t};let i=Mp(n),a=m0(i);if(a)return{identity:a.identity,starterContent:f0(a.docFrontmatterText,r)};let{frontmatter:o}=Ap(r);if(o!==``)return{identity:d0(i),starterContent:r};let s=d0(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:f0(i,r)}}function g0(e,t){let{docFrontmatterText:n,markdown:r}=p0(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Ce.stringify)({[u0]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function _0(e){return h0(e).starterContent}const v0=`(agent thread)`;function y0(){let e=!1,t=``,n=0;return r=>{let i=b0(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function b0(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}const x0=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],S0={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function C0(e,t=x0){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const w0={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function T0(e){return e?w0[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const E0={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function D0(e){let t=e?.trim();return t?E0[T0(t)]??t:`Agent`}function O0(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}const k0=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function A0(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function j0(e){let t=e.trim();return k0.test(t)||t.startsWith(`//`)}function M0(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(j0(n))return{kind:`external`,url:n};let r=O0(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};let i=A0(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function N0(e,t){let n=e.trim();if(!n)return null;if(j0(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=A0(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function P0(e,t){let n=e.trim();if(!n||k0.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function F0(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function I0(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function L0(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function R0(e){return e.split(`/`).filter(e=>e!==``)}function z0(e,t){let n=L0(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function B0(e,t){let n=L0(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:R0(r).length}function V0(e,t){let n=R0(e),r=R0(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function H0(){let e=new Map;function t(t){let n=F0(t);if(n===``)return;let r=I0(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=F0(t),r=I0(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=L0(F0(n)),o=[],s=[];for(let e of i)z0(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=B0(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=B0(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=V0(a,L0(t));for(let r=1;r<e.length;r++){let i=e[r],o=V0(a,L0(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function U0(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function W0(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}export{yY as $,xd as $i,NK as $n,aG as $r,Pq as $t,MX as A,Oe as Aa,My as Ai,qK as An,BG as Ar,fJ as At,fX as B,Ve as Ba,Oy as Bi,cq as Bn,jG as Br,CJ as Bt,c0 as C,Xe as Ca,Uy as Ci,yq as Cn,$G as Cr,Zq as Ct,j1 as D,Ae as Da,Wy as Di,JK as Dn,WG as Dr,cJ as Dt,Y1 as E,je as Ea,Gy as Ei,gq as En,QG as Er,OJ as Et,SX as F,Te as Fa,my as Fi,GK as Fn,CG as Fr,_J as Ft,LY as G,_e as Ga,Qv as Gi,kK as Gn,DG as Gr,SJ as Gt,dX as H,ze as Ha,ky as Hi,oq as Hn,mG as Hr,Xq as Ht,xX as I,Fe as Ia,_y as Ii,eq as In,hG as Ir,lJ as It,TY as J,he as Ja,qv as Ji,LK as Jn,IG as Jr,oJ as Jt,PY as K,ve as Ka,Xv as Ki,VK as Kn,TG as Kr,vJ as Kt,bX as L,Je as La,yy as Li,QK as Ln,kG as Lr,uJ as Lt,DX as M,Ne as Ma,sy as Mi,aq as Mn,YG as Mr,nJ as Mt,CX as N,Pe as Na,uy as Ni,XK as Nn,LG as Nr,gJ as Nt,OX as O,De as Oa,Hy as Oi,YK as On,UG as Or,hJ as Ot,yX as P,Ie as Pa,hy as Pi,ZK as Pn,RG as Pr,jJ as Pt,bY as Q,Mp as Qi,HK as Qn,iG as Qr,Iq as Qt,vX as R,Ue as Ra,Fy as Ri,nq as Rn,gG as Rr,iJ as Rt,l0 as S,Ze as Sa,zy as Si,vq as Sn,aK as Sr,zq as St,T1 as T,Ee as Ta,qy as Ti,hq as Tn,iK as Tr,kJ as Tt,iX as U,We as Ua,by as Ui,sq as Un,OG as Ur,bJ as Ut,aX as V,Le as Va,Sy as Vi,lq as Vn,PG as Vr,wJ as Vt,rX as W,we as Wa,ey as Wi,OK as Wn,pG as Wr,xJ as Wt,CY as X,jp as Xi,PK as Xn,fG as Xr,rJ as Xt,wY as Y,Uv as Yi,FK as Yn,lG as Yr,sJ as Yt,xY as Z,Ap as Zi,BK as Zn,YW as Zr,eJ as Zt,h0 as _,et as _a,tL as _i,Cq as _n,oK as _r,FJ as _t,N0 as a,pt as aa,FW as ai,Yq as an,vK as ar,nY as at,i0 as b,rt as ba,By as bi,bq as bn,nK as br,Lq as bt,S0 as c,ut as ca,OW as ci,Hq as cn,CK as cr,XJ as ct,T0 as d,ct as da,wW as di,jq as dn,mK as dr,HJ as dt,li as ea,UW as ei,qq as en,jK as er,dY as et,y0 as f,lt as fa,bW as fi,Mq as fn,gK as fr,BJ as ft,_0 as g,at as ga,sB as gi,Sq as gn,pK as gr,IJ as gt,g0 as h,$e as ha,cB as hi,kq as hn,lK as hr,NJ as ht,M0 as i,ht as ia,PW as ii,Jq as in,_K as ir,uY as it,NX as j,Me as ja,Py as ji,iq as jn,KG as jr,pJ as jt,jX as k,ke as ka,jy as ki,KK as kn,VG as kr,mJ as kt,C0 as l,dt as la,AW as li,$q as ln,xK as lr,zJ as lt,u0 as m,Qe as ma,bB as mi,Dq as mn,uK as mr,RJ as mt,W0 as n,_t as na,LW as ni,Gq as nn,AK as nr,oY as nt,P0 as o,mt as oa,kW as oi,Uq as on,yK as or,tY as ot,v0 as p,ot as pa,yW as pi,Nq as pn,fK as pr,VJ as pt,OY as q,ge as qa,Yv as qi,zK as qn,FG as qr,yJ as qt,H0 as r,gt as ra,IW as ri,Kq as rn,wK as rr,sY as rt,O0 as s,ft as sa,SW as si,Wq as sn,SK as sr,GJ as st,U0 as t,A as ta,VW as ti,Vq as tn,MK as tr,mY as tt,D0 as u,st as ua,jW as ui,Aq as un,bK as ur,UJ as ut,t0 as v,it as va,TN as vi,Eq as vn,sK as vr,PJ as vt,D1 as w,Ye as wa,Ry as wi,mq as wn,eK as wr,TJ as wt,s0 as x,nt as xa,Ky as xi,_q as xn,rK as xr,Rq as xt,n0 as y,tt as ya,vM as yi,xq as yn,cK as yr,MJ as yt,_X as z,Ke as za,Iy as zi,rq as zn,AG as zr,aJ as zt};
317
+ //# sourceMappingURL=src-FuRMJntf.mjs.map