@inkeep/open-knowledge 0.80.0-beta.3 → 0.80.0-beta.4

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 (135) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-JLtAmcu6.mjs +1 -0
  3. package/dist/{dist-LKhxaIqd.mjs → dist-Bkhn2suz.mjs} +1 -1
  4. package/dist/{dist-DIt2A6O3.mjs → dist-lSvSC9qO.mjs} +1 -1
  5. package/dist/index.mjs +106 -104
  6. package/dist/{init-BGBPXL0D.mjs → init-BSjC6Lzt.mjs} +2 -2
  7. package/dist/init-ChDK6xct.mjs +1 -0
  8. package/dist/{launch-json-removal-DIzQ3twn.mjs → launch-json-removal-B6RQofWo.mjs} +1 -1
  9. package/dist/{loader-D1pgp7cf.mjs → loader-4haslDjN.mjs} +1 -1
  10. package/dist/loader-Csbf4Lbe.mjs +1 -0
  11. package/dist/{md-manager-BGnqyqi1-Kd9RuPsT.mjs → md-manager-BGnqyqi1-BsJX7ufl.mjs} +30 -28
  12. package/dist/{open-browser-C_W051pq.mjs → open-browser-CNeVrnyI.mjs} +1 -1
  13. package/dist/parse-worker.mjs +1 -1
  14. package/dist/{preview-p2PvxfBS.mjs → preview-C6n4fjw9.mjs} +1 -1
  15. package/dist/preview-DqQqCrui.mjs +1 -0
  16. package/dist/public/assets/{ActivityModeContent-BAPXGHWo.js → ActivityModeContent-DCTiw2hr.js} +1 -1
  17. package/dist/public/assets/{AddPropertiesButton-DaM5tzpb.js → AddPropertiesButton-DLf1hC8K.js} +2 -2
  18. package/dist/public/assets/{AgentDiffPane-CjZnjfGe.js → AgentDiffPane-DHRU8AxR.js} +1 -1
  19. package/dist/public/assets/{AgentThreadClientBinder-BSPGAh_E.js → AgentThreadClientBinder-trT1r05W.js} +1 -1
  20. package/dist/public/assets/{BugReportHistory-CJiUb73a.js → BugReportHistory-BlMaMheB.js} +1 -1
  21. package/dist/public/assets/{BugReportHistoryDialog-CtByXbBx.js → BugReportHistoryDialog-Dl2J_kNN.js} +1 -1
  22. package/dist/public/assets/{CodeMirrorPropInput-6Z5ZMAPQ.js → CodeMirrorPropInput-BepO6Sgu.js} +1 -1
  23. package/dist/public/assets/{ConsentDialogBody-DpXOW8ek.js → ConsentDialogBody-D70gfceW.js} +1 -1
  24. package/dist/public/assets/{DeleteConfirmationDialog-BHaoO6w5.js → DeleteConfirmationDialog-CyFvmBqi.js} +1 -1
  25. package/dist/public/assets/{DiffViewBoundary-B3HbMKFC.js → DiffViewBoundary-B_W1cw_1.js} +1 -1
  26. package/dist/public/assets/{DocumentContext-Cn9J8crD.js → DocumentContext-DlueKLbL.js} +1 -1
  27. package/dist/public/assets/{EditorModeToggle-AmfJVzHm.js → EditorModeToggle-ljJ8FSrJ.js} +1 -1
  28. package/dist/public/assets/{EnableSyncConfirmDialog-C9TkBHT5.js → EnableSyncConfirmDialog-DzvC0Mpe.js} +1 -1
  29. package/dist/public/assets/{ExcalidrawDocEditor-qQa8ZSkt.js → ExcalidrawDocEditor-D04cXs58.js} +1 -1
  30. package/dist/public/assets/FeedbackForm-xJjXCTv5.js +1 -0
  31. package/dist/public/assets/{GraphPanel-DrXj04wO.js → GraphPanel-Df2U0G-4.js} +1 -1
  32. package/dist/public/assets/{ImageAttachments-BCZsZ1sq.js → ImageAttachments-C-5sQ75E.js} +1 -1
  33. package/dist/public/assets/{ImportSkillDialog-DQxxrVN7.js → ImportSkillDialog-CeL9MmZg.js} +1 -1
  34. package/dist/public/assets/{LintConfigEditor-ConhfeLc.js → LintConfigEditor-dnd2fiqC.js} +1 -1
  35. package/dist/public/assets/ManagedArtifactProperties-5Ub_9KlH.js +1 -0
  36. package/dist/public/assets/{ManagedArtifactProperties-CX6Vb1JW.js → ManagedArtifactProperties-Mq7GjcqR.js} +1 -1
  37. package/dist/public/assets/{MermaidDocEditor-BsGXHGGp.js → MermaidDocEditor-Cy09YvVZ.js} +1 -1
  38. package/dist/public/assets/{OpenInAgentMenuItem-nGXqEk1W.js → OpenInAgentMenuItem-bUqSoKzB.js} +1 -1
  39. package/dist/public/assets/{PropertyDisplayRow-DzMc70ZS.js → PropertyDisplayRow-B9rs80AL.js} +1 -1
  40. package/dist/public/assets/{RegisteredAgentIcon-Csy_gtym.js → RegisteredAgentIcon-C8cUr8Cj.js} +1 -1
  41. package/dist/public/assets/{ReportBugDialogBody-DYDHbNSq.js → ReportBugDialogBody-BxDyGvcN.js} +1 -1
  42. package/dist/public/assets/{ReportBugMenuTrigger-BI86cMBx.js → ReportBugMenuTrigger-BeP1PVk8.js} +1 -1
  43. package/dist/public/assets/{SchemaConfigEditor-CAUyzvxl.js → SchemaConfigEditor-BTanVu9K.js} +1 -1
  44. package/dist/public/assets/{SessionsHost-BlOe2SwN.js → SessionsHost-CEwBUwt_.js} +2 -2
  45. package/dist/public/assets/{SettingsDialogBody-bGbz3rU_.js → SettingsDialogBody-C5bZMc1S.js} +1 -1
  46. package/dist/public/assets/{ShareBranchSwitchDialog-B1uJs5Bn.js → ShareBranchSwitchDialog-C1waHnQi.js} +1 -1
  47. package/dist/public/assets/{ShareReceiveDialog-D5zztXCK.js → ShareReceiveDialog-B0UXIgi2.js} +1 -1
  48. package/dist/public/assets/{ShareReceiveMissDialog-DTEfqcON.js → ShareReceiveMissDialog-DDowoFuB.js} +1 -1
  49. package/dist/public/assets/{SkillCostValue-ak3JKnDm.js → SkillCostValue-C15WAhMi.js} +1 -1
  50. package/dist/public/assets/{SkillEditBanner-B5rEaInO.js → SkillEditBanner-bDQFTZSd.js} +1 -1
  51. package/dist/public/assets/{SkillForkDialog-Cu7JHqqd.js → SkillForkDialog-Dw_VC1vk.js} +1 -1
  52. package/dist/public/assets/{SkillInstallMenu-B7K9elQU.js → SkillInstallMenu-CsHLrBd-.js} +1 -1
  53. package/dist/public/assets/{SkillOriginInline-DYbcJg7P.js → SkillOriginInline-FSJgJOE4.js} +1 -1
  54. package/dist/public/assets/{SkillToolbarControls-DcbvW2T6.js → SkillToolbarControls-pnJALCK3.js} +1 -1
  55. package/dist/public/assets/{SlidesToolbarControls-7LjoJy_5.js → SlidesToolbarControls-CD75Z1Oh.js} +1 -1
  56. package/dist/public/assets/{SourceEditor-C8ffIHwr.js → SourceEditor-CG4SyAGZ.js} +1 -1
  57. package/dist/public/assets/{TerminalPanel-CiqML_vV.js → TerminalPanel-DSqS__4Q.js} +1 -1
  58. package/dist/public/assets/{TerminalWindowApp-BeNUbLdQ.js → TerminalWindowApp-CdPZNLJf.js} +1 -1
  59. package/dist/public/assets/{TextDocEditor-Dp7FK75S.js → TextDocEditor-CGyF06C_.js} +1 -1
  60. package/dist/public/assets/{ThreadView-9tYfJB3u.js → ThreadView-CCIPW-QB.js} +1 -1
  61. package/dist/public/assets/{TimelineDiffPane-CBzWQFjK.js → TimelineDiffPane-DB6dAe2o.js} +1 -1
  62. package/dist/public/assets/{agent-connections-BeE3-bph.js → agent-connections-xDHnlWZF.js} +1 -1
  63. package/dist/public/assets/{auth-state-cache--dIcIe7G.js → auth-state-cache-BQi0FKqV.js} +1 -1
  64. package/dist/public/assets/{bug-report-send-manager-DNdGRps_.js → bug-report-send-manager-D-nmYpHV.js} +1 -1
  65. package/dist/public/assets/{client-version-DUN6viBa.js → client-version-CaNa0QvT.js} +1 -1
  66. package/dist/public/assets/{comment-chips-TcK52Do9.js → comment-chips-C2jJwXUK.js} +1 -1
  67. package/dist/public/assets/{config-provider-CG9gR7T8.js → config-provider-Caglq5qS.js} +1 -1
  68. package/dist/public/assets/{css-color-to-hex-Z8frkoC6.js → css-color-to-hex-DJhZ-QPk.js} +1 -1
  69. package/dist/public/assets/{diagnostic-breadcrumb-CntZqCsY.js → diagnostic-breadcrumb-9HmqdG9O.js} +1 -1
  70. package/dist/public/assets/{dist-DWDffHoo.js → dist-CKSoioI8.js} +29 -27
  71. package/dist/public/assets/{doc-paths-DApIJEsY.js → doc-paths-a4fVjLYy.js} +1 -1
  72. package/dist/public/assets/{doc-undo-manager-BsCVxADi.js → doc-undo-manager-8ldpXoUT.js} +1 -1
  73. package/dist/public/assets/{documents-events-D3WFvAcg.js → documents-events-CZtSmQGF.js} +1 -1
  74. package/dist/public/assets/{file-tree-adapter-BBZoex3H.js → file-tree-adapter-DjSzNafC.js} +1 -1
  75. package/dist/public/assets/{file-tree-utils-MSwqAf_Q.js → file-tree-utils-BDrf8D6F.js} +1 -1
  76. package/dist/public/assets/{folder-config-api-CTSvuorZ.js → folder-config-api-Biu9PH2S.js} +1 -1
  77. package/dist/public/assets/{index-z4pOD0dV.js → index-llzPc8ii.js} +8 -8
  78. package/dist/public/assets/{lint-config-client-DPGrXD4q.js → lint-config-client-CtpTLmxs.js} +1 -1
  79. package/dist/public/assets/{markdownlint-rule-browser-CAHOja9n.js → markdownlint-rule-browser-CmYWGfCY.js} +1 -1
  80. package/dist/public/assets/{navigation-targets-CU6rzUlp.js → navigation-targets-CUokC1RP.js} +1 -1
  81. package/dist/public/assets/{page-list-cache-BqFWbREg.js → page-list-cache-CWP9yGOL.js} +1 -1
  82. package/dist/public/assets/{pending-receive-nav-store-D3aYtYmc.js → pending-receive-nav-store-Bap5Raub.js} +1 -1
  83. package/dist/public/assets/{preferred-session-events-DAmmw5gh.js → preferred-session-events-CUEIYFT-.js} +1 -1
  84. package/dist/public/assets/{progress-sy7HQozy.js → progress-C9lBCHrW.js} +1 -1
  85. package/dist/public/assets/{project-paths-ZxQBkNtH.js → project-paths-BQ-o05KT.js} +1 -1
  86. package/dist/public/assets/{prop-types-DKh1WKWf.js → prop-types-B8o3EswU.js} +1 -1
  87. package/dist/public/assets/{receive-store-MDSlAMS-.js → receive-store-lDX8cgeG.js} +1 -1
  88. package/dist/public/assets/{selection-context-W5wdYOgq.js → selection-context-B-PzVRtY.js} +1 -1
  89. package/dist/public/assets/{sign-in-terminal-events-hpuzOw8T.js → sign-in-terminal-events-CfJ3mBLe.js} +1 -1
  90. package/dist/public/assets/{skill-scope-Bez3g3qc.js → skill-scope-DI5gmqPM.js} +1 -1
  91. package/dist/public/assets/{skills-api-Dg4Bu4bF.js → skills-api-De9HEjhb.js} +1 -1
  92. package/dist/public/assets/{src-BnWuP41K.js → src-DOIqQXkv.js} +1 -1
  93. package/dist/public/assets/{startup-marks-BANMGjlj.js → startup-marks-CFWs3syR.js} +1 -1
  94. package/dist/public/assets/{tag-pill-input-X411ZGOD.js → tag-pill-input-Y6ljfhvB.js} +1 -1
  95. package/dist/public/assets/{target-navigation-intent-BC3uQ8d6.js → target-navigation-intent-XdliCJgy.js} +1 -1
  96. package/dist/public/assets/{telemetry-startup-C1Pox6wt.js → telemetry-startup-C2599gsZ.js} +1 -1
  97. package/dist/public/assets/{terminal-command-events-DhjWRdh7.js → terminal-command-events-D2A3ox61.js} +1 -1
  98. package/dist/public/assets/{terminal-launch-events-BdwMO1Yd.js → terminal-launch-events-CJ38YxgG.js} +1 -1
  99. package/dist/public/assets/{terminal-telemetry-CkRgU6v9.js → terminal-telemetry-BWruQjxx.js} +1 -1
  100. package/dist/public/assets/{thread-client-Cs7m3o_c.js → thread-client-opUSjoT6.js} +1 -1
  101. package/dist/public/assets/{typing-burst-detector-DYnzK_Dw.js → typing-burst-detector-CWE4R_n-.js} +1 -1
  102. package/dist/public/assets/{uninstall-D-JcCb1g.js → uninstall-BQgdI1YE.js} +1 -1
  103. package/dist/public/assets/{use-activity-panel-E7Mh-Ezq.js → use-activity-panel-BbAFb6_B.js} +1 -1
  104. package/dist/public/assets/{use-apply-config-language-D6tEZ9VT.js → use-apply-config-language-DLpBqdmj.js} +1 -1
  105. package/dist/public/assets/{use-collab-url-D86Y_0c-.js → use-collab-url-BnNySuyB.js} +1 -1
  106. package/dist/public/assets/{use-conflicts-DX3qdaOd.js → use-conflicts-By3vedGU.js} +1 -1
  107. package/dist/public/assets/{use-git-sync-status-CD2DOuM6.js → use-git-sync-status-DbY7lQ6w.js} +1 -1
  108. package/dist/public/assets/{use-installed-clis-Cwk9Ej-5.js → use-installed-clis-C-H8pD3V.js} +2 -2
  109. package/dist/public/assets/{use-live-xterm-theme-CuUImHB-.js → use-live-xterm-theme-Dq7SoxPx.js} +1 -1
  110. package/dist/public/assets/{use-open-skill-D7-vvik5.js → use-open-skill-aZlFxB21.js} +1 -1
  111. package/dist/public/assets/{use-settings-route-Cgem-_t0.js → use-settings-route-CnBwjcNG.js} +1 -1
  112. package/dist/public/assets/{use-skill-origin-B_Jm5scu.js → use-skill-origin-C6A_84cR.js} +1 -1
  113. package/dist/public/assets/{use-skills-BDkMItFj.js → use-skills-DJtnRsFe.js} +1 -1
  114. package/dist/public/assets/{use-terminal-enabled-CE0TRk5u.js → use-terminal-enabled-Dc7IhmBw.js} +1 -1
  115. package/dist/public/assets/{use-timeline-entry-diff-D2HtWDOo.js → use-timeline-entry-diff-CroxWSA-.js} +1 -1
  116. package/dist/public/assets/{use-workspace-CUF62sEC.js → use-workspace-VBOqTrTw.js} +1 -1
  117. package/dist/public/index.html +59 -59
  118. package/dist/public/uninstall.html +3 -3
  119. package/dist/{registry-probes-C_CjBt1X.mjs → registry-probes-CavTb20W.mjs} +1 -1
  120. package/dist/{removal-file-path-Dpgj65Fm.mjs → removal-file-path-DgmD5_nT.mjs} +1 -1
  121. package/dist/{repair-launch-json-D2_vTIDM.mjs → repair-launch-json-B7mDQWuX.mjs} +1 -1
  122. package/dist/{repair-mcp-configs-B7iHsYuV.mjs → repair-mcp-configs-BdVJr4yx.mjs} +1 -1
  123. package/dist/{src-BXartIQO.mjs → src-BxPOrcsE.mjs} +1 -1
  124. package/dist/src-CIddp0Q3.mjs +1 -0
  125. package/dist/start-B2WF7iC_.mjs +1 -0
  126. package/dist/{start-B02FL8wC.mjs → start-DoprBiXl.mjs} +3 -3
  127. package/package.json +4 -4
  128. package/dist/constants-B-aUCjZp.mjs +0 -1
  129. package/dist/init-BJXU6KnD.mjs +0 -1
  130. package/dist/loader-DS_Yxo5c.mjs +0 -1
  131. package/dist/preview-CQAChk_4.mjs +0 -1
  132. package/dist/public/assets/FeedbackForm-DFC9eU2O.js +0 -1
  133. package/dist/public/assets/ManagedArtifactProperties-DhhC3S2j.js +0 -1
  134. package/dist/src-CFZDRhgI.mjs +0 -1
  135. package/dist/start-D8xMsLwv.mjs +0 -1
@@ -460,8 +460,8 @@ $2`).split(`
460
460
  out.textContent = '$' + Number(amt.value).toLocaleString();
461
461
  });
462
462
  <\/script>
463
- </div>`}];function xoe(e){return["```html preview",e.html,"```"].join(`
464
- `)}const r2=[{name:`--chart-1`,light:`oklch(0.62 0.19 259)`,dark:`oklch(0.72 0.14 259)`},{name:`--chart-2`,light:`oklch(0.58 0.14 145)`,dark:`oklch(0.73 0.13 145)`},{name:`--chart-3`,light:`oklch(0.62 0.15 70)`,dark:`oklch(0.77 0.14 70)`},{name:`--chart-4`,light:`oklch(0.55 0.18 290)`,dark:`oklch(0.72 0.16 290)`},{name:`--chart-5`,light:`oklch(0.58 0.21 25)`,dark:`oklch(0.72 0.2 25)`},{name:`--primary`,light:`oklch(0.5621 0.1983 259.59)`,dark:`#69a3ff`},{name:`--primary-foreground`,light:`oklch(0.985 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--background`,light:`oklch(1 0 0)`,dark:`oklch(0.145 0 0)`},{name:`--card`,light:`oklch(1 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--card-foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--muted-foreground`,light:`oklch(0.556 0 0)`,dark:`oklch(0.708 0 0)`},{name:`--border`,light:`oklch(0.922 0 0)`,dark:`oklch(1 0 0 / 10%)`},{name:`--destructive`,light:`oklch(0.577 0.245 27.325)`,dark:`oklch(0.704 0.191 22.216)`},{name:`--radius`,light:`0.625rem`,dark:`0.625rem`}];function i2(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);if(n<=0)return t;let r=t.slice(n).toLowerCase();return W0.includes(r)?t.slice(0,n):t}function a2(e){return i2(e)===`log`}const o2=`127.0.0.1`,s2=Object.freeze([{value:`workflow-fit`,label:`It didn't fit into my workflow`},{value:`missing-feature`,label:`It was missing a feature I needed`},{value:`hard-to-start`,label:`It was too hard to set up or get started`},{value:`unreliable`,label:`Bugs, crashes, or it felt unreliable`},{value:`switched-tool`,label:`I'm switching to another tool`},{value:`one-off`,label:`It was a trial or one-off project`},{value:`other`,label:`Something else`}]);new Set(s2.map(e=>e.value));const c2=Vw.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3},meta:{default:null},sourceStyle:{default:`fenced`},sourceClosingFenceLength:{default:null,rendered:!1},sourceUnclosedFence:{default:!1,rendered:!1},sourceFenceIndent:{default:null,rendered:!1},sourceInfoPadding:{default:null,rendered:!1},sourceIndents:{default:null,rendered:!1}}}}),l2=bre.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}},addInputRules(){return[yw({find:qw,type:this.type,getAttributes:{sourceDelimiter:`*`}}),yw({find:Jw,type:this.type,getAttributes:{sourceDelimiter:`_`}})]}}),u2=_re.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}},addInputRules(){return[yw({find:Uw,type:this.type,getAttributes:{sourceDelimiter:`**`}}),yw({find:Gw,type:this.type,getAttributes:{sourceDelimiter:`__`}})]}}),d2=aw.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),f2=Fw.create({name:`footnoteDefinition`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){let e=e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}};return[{tag:`aside[data-footnote-def]`,getAttrs:e},{tag:`aside.footnote-def`,getAttrs:e}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.identifier??``);return[`aside`,{...t,"data-footnote-def":``,"data-footnote-id":n,id:`fn-${n}`,class:`footnote-def`},[`div`,{class:`footnote-body`},0],[`a`,{href:`#fnref-${n}`,class:`footnote-backref`,contentEditable:`false`,"aria-label":`Back to reference`},`↩`]]},addCommands(){return{insertFootnoteDefinition:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e},content:[{type:`paragraph`}]})}}});function p2({node:e}){return``.repeat(e.nodeSize-e.content.size)}const m2=Fw.create({name:`footnoteReference`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,draggable:!1,priority:60,renderText:p2,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){return[{tag:`sup[data-footnote-ref]`,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}}}]},renderHTML({node:e}){let t=String(e.attrs.identifier??``);return[`sup`,{id:`fnref-${t}`,"data-footnote-ref":``,"data-footnote-id":t,class:`footnote-ref`},[`a`,{href:`#fn-${t}`,class:`footnote-ref-link`},`[${t}]`]]},addCommands(){return{insertFootnoteReference:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e}})}}}),h2=xre.extend({marks:`_`,priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`},sourceRaw:{default:null}}}}),g2=Sre.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`},sourceTrailingHashes:{default:null},sourceUnderlineLength:{default:null},sourceContiguousNext:{default:!1},sourceLeadingIndent:{default:null,rendered:!1},sourceInteriorSpacing:{default:null,rendered:!1}}}}),_2=Fw.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}}),v2=Fw.create({name:`imageReference`,marks:`_`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:p2,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 y2(e){if(typeof e!=`string`||!e.startsWith(`/`))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return typeof t==`string`&&t?t+e:e}const b2=wre.extend({marks:`_`,priority:60,renderText:p2,addAttributes(){return{...this.parent?.(),sourceUrl:{default:null,rendered:!1}}},renderHTML({HTMLAttributes:e}){let t=nC(this.options.HTMLAttributes,e);return typeof t.src==`string`&&(t.src=y2(t.src)),[`img`,t]}}),x2=Fw.create({name:`jsxComponent`,group:`block`,atom:!1,content:`block*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e!=`string`&&{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{sourceRaw:e}})}}}),S2=Fw.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`text*`,isolating:!1,selectable:!0,priority:60,renderText:p2,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`span[data-jsx-inline]`,getAttrs:e=>typeof e!=`string`&&{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-jsx-inline":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]}}),C2=[`https`,`http`,`mailto`,`tel`,`ftp`,`sms`],w2=C2.map(e=>`${e}:`).join(`|`);RegExp(`^(?:${w2}|\\/|#|\\?|\\.\\/|\\.\\.\\/)`,`i`);function T2(e){let t=e.trim();if(t===``)return!0;let n=t.indexOf(`:`);if(n===-1)return!0;let r=t.indexOf(`/`),i=t.indexOf(`?`),a=t.indexOf(`#`);return n>Math.min(r===-1?1/0:r,i===-1?1/0:i,a===-1?1/0:a)}const E2=new Set(C2.map(e=>`${e}:`));function D2(e){try{let t=new URL(e,`https://placeholder.invalid`);return E2.has(t.protocol.toLowerCase())}catch{return!1}}const O2=`LinkFidelity must be derived from the Link extension`,k2=Mre.extend({priority:60,addOptions(){let e=this.parent?.();if(e===void 0)throw Error(O2);return{...e,openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:D2,shouldAutoLink:()=>!0}},addAttributes(){let e=this.parent?.();if(e===void 0)throw Error(O2);return{...e,linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1},sourceForm:{default:null,rendered:!1},target:{default:null,rendered:!1},anchor:{default:null,rendered:!1},alias:{default:null,rendered:!1},sourceUrlForm:{default:null,rendered:!1},sourceTitleMarker:{default:null,rendered:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}}}),A2=Fw.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null},sourceLayout:{default:null},sourceTitleMarker:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function j2(e){return e.type.name===`list`&&!e.attrs.ordered}function M2(e){return e.type.name===`list`&&!!e.attrs.ordered}function N2(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function P2(e,t,n,r,i,a,o){let s=KS(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?Wg(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o})}}),t(n),!0}return Vg(n,a)(e,void 0)?!t||Vg(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!1}function F2(e){return e===`x`||e===`X`}function I2(e){return e===`X`?`X`:null}function L2(e,t,n,r){let i=e.schema.nodes.list;if(!i)return!1;let a=e.doc.resolve(t.from),o=a.depth-1;if(o>0&&a.node(o).type.name===`listItem`&&a.index(o)===0){let i=a.node(o);return e.tr.delete(t.from,t.to).setNodeMarkup(a.before(o),void 0,{...i.attrs,checked:n,sourceCheckboxChar:r}),!0}let s=a.blockRange();if(!s)return!1;let c=eh(s,i,{ordered:!1});if(!c)return!1;let l=e.tr;l.wrap(s,c),l.delete(l.mapping.map(t.from),l.mapping.map(t.to));let u=l.doc.resolve(l.mapping.map(t.from));for(let e=u.depth;e>0;e--){let t=u.node(e);if(t.type.name===`listItem`){l.setNodeMarkup(u.before(e),void 0,{...t.attrs,checked:n,sourceCheckboxChar:r});break}}return!0}const R2=/^\s*([-+*])\s$/,z2=/^\s*(\d+)([.)])\s$/,B2=/^\s*[-*+]\s\[([ xX]?)\]\s$/,V2=/^\s*\[([ xX]?)\]\s$/,H2=Fw.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,nC(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:P2(e,t,n,r,e=>j2(e)&&!N2(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:P2(e,t,n,r,e=>M2(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:P2(e,t,n,r,e=>j2(e)&&N2(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[Sw({find:R2,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]}),joinPredicate:(e,t)=>t.attrs.ordered===!1}),Sw({find:z2,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]}),joinPredicate:(e,t)=>t.attrs.ordered===!0}),new ew({find:B2,handler:({state:e,range:t,match:n})=>L2(e,t,F2(n[1]),I2(n[1]))?void 0:null}),new ew({find:V2,handler:({state:e,range:t,match:n})=>L2(e,t,F2(n[1]),I2(n[1]))?void 0:null})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),U2=Fw.create({name:`listItem`,content:`paragraph block*`,defining:!0,addAttributes(){return{checked:{default:null},spread:{default:!1},sourceMarkerSpacing:{default:null,rendered:!1},sourceOrdinal:{default:null,rendered:!1},sourceCheckboxChar:{default:null,rendered:!1},sourceContinuationIndent:{default:null,rendered:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,nC(t),0]:[`li`,nC(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(nC(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`),c=()=>{o&&(o.disabled=!n.isEditable)};return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,c(),n.on(`update`,c),o.addEventListener(`change`,()=>{let r=t();r!==void 0&&typeof r==`number`&&n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,o.disabled=!n.isEditable,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)},destroy(){n.off(`update`,c)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),W2=H2,G2=U2,K2=Fw.create({name:`mathInline`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,renderText:p2,addAttributes(){return{formula:{default:``},id:{default:null},language:{default:`latex`},sourceDelimiter:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-math-inline]`,getAttrs:e=>typeof e!=`string`&&{formula:e.getAttribute(`data-formula`)||``,id:e.getAttribute(`id`)||null,language:e.getAttribute(`data-language`)||`latex`}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-math-inline":``,"data-formula":e.formula,"data-language":e.language,...e.id?{id:e.id}:{}}]},addCommands(){return{insertMathInline:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{formula:e}})}}}),q2=Fw.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){let e=e=>typeof e!=`string`&&{reason:e.getAttribute(`data-reason`)||``};return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e},{tag:`pre[data-raw-mdx-fallback]`,getAttrs:e}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),J2=Wie.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),Y2=qie.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),X2=Fw.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`,...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)}}}),Z2=aw.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`,...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)}}}),Q2=sw.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}});function $2(e){for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return t;return null}function e4(e){let t=!1;return e.descendants(e=>!t&&(e.type.name===`list`&&(t=!0),!t)),t}function t4(e){let{selection:t}=e;return t instanceof Uh?t.$cursor:null}function n4(e){let t=t4(e);if(t?.parentOffset!==0)return!1;let n=$2(t);if(n===null||t.depth!==n+1||t.index(n)!==0)return!1;let r=t.index(n-1);return r!==0&&e4(t.node(n-1).child(r-1))}function r4(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 i4(e){let t=t4(e);if(!t||t.parentOffset!==t.parent.content.size)return!1;let n=$2(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=r4(t,n);return r!==null&&r<n}const a4=sw.create({name:`listBoundaryMerge`,addKeyboardShortcuts(){let e=()=>{let{editor:e}=this;if(!n4(e.state))return!1;if(e.commands.undoInputRule())return!0;let{state:t,view:n}=e;return sg(t,n.dispatch,n)},t=()=>{let{editor:e}=this;if(!i4(e.state))return!1;let{state:t,view:n}=e;return cg(t,n.dispatch,n)};return{Backspace:e,"Mod-Backspace":e,Delete:t,"Mod-Delete":t}}}),o4=sw.create({name:`plainTextClipboard`,priority:1e3,addProseMirrorPlugins(){return[new eg({key:new rg(`okPlainTextClipboard`),props:{clipboardTextSerializer:e=>e.content.textBetween(0,e.content.size,`
463
+ </div>`}];function r2(e){return["```html preview",e.html,"```"].join(`
464
+ `)}const i2=[{name:`--chart-1`,light:`oklch(0.62 0.19 259)`,dark:`oklch(0.72 0.14 259)`},{name:`--chart-2`,light:`oklch(0.58 0.14 145)`,dark:`oklch(0.73 0.13 145)`},{name:`--chart-3`,light:`oklch(0.62 0.15 70)`,dark:`oklch(0.77 0.14 70)`},{name:`--chart-4`,light:`oklch(0.55 0.18 290)`,dark:`oklch(0.72 0.16 290)`},{name:`--chart-5`,light:`oklch(0.58 0.21 25)`,dark:`oklch(0.72 0.2 25)`},{name:`--primary`,light:`oklch(0.5621 0.1983 259.59)`,dark:`#69a3ff`},{name:`--primary-foreground`,light:`oklch(0.985 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--background`,light:`oklch(1 0 0)`,dark:`oklch(0.145 0 0)`},{name:`--card`,light:`oklch(1 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--card-foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--muted-foreground`,light:`oklch(0.556 0 0)`,dark:`oklch(0.708 0 0)`},{name:`--border`,light:`oklch(0.922 0 0)`,dark:`oklch(1 0 0 / 10%)`},{name:`--destructive`,light:`oklch(0.577 0.245 27.325)`,dark:`oklch(0.704 0.191 22.216)`},{name:`--radius`,light:`0.625rem`,dark:`0.625rem`}];function a2(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);if(n<=0)return t;let r=t.slice(n).toLowerCase();return W0.includes(r)?t.slice(0,n):t}function o2(e){return a2(e)===`log`}const xoe=`127.0.0.1`,s2=Object.freeze([{value:`workflow-fit`,label:`It didn't fit into my workflow`},{value:`missing-feature`,label:`It was missing a feature I needed`},{value:`hard-to-start`,label:`It was too hard to set up or get started`},{value:`unreliable`,label:`Bugs, crashes, or it felt unreliable`},{value:`switched-tool`,label:`I'm switching to another tool`},{value:`one-off`,label:`It was a trial or one-off project`},{value:`other`,label:`Something else`}]);new Set(s2.map(e=>e.value));const c2=Vw.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3},meta:{default:null},sourceStyle:{default:`fenced`},sourceClosingFenceLength:{default:null,rendered:!1},sourceUnclosedFence:{default:!1,rendered:!1},sourceFenceIndent:{default:null,rendered:!1},sourceInfoPadding:{default:null,rendered:!1},sourceIndents:{default:null,rendered:!1}}}}),l2=bre.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}},addInputRules(){return[yw({find:qw,type:this.type,getAttributes:{sourceDelimiter:`*`}}),yw({find:Jw,type:this.type,getAttributes:{sourceDelimiter:`_`}})]}}),u2=_re.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}},addInputRules(){return[yw({find:Uw,type:this.type,getAttributes:{sourceDelimiter:`**`}}),yw({find:Gw,type:this.type,getAttributes:{sourceDelimiter:`__`}})]}}),d2=aw.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),f2=Fw.create({name:`footnoteDefinition`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){let e=e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}};return[{tag:`aside[data-footnote-def]`,getAttrs:e},{tag:`aside.footnote-def`,getAttrs:e}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.identifier??``);return[`aside`,{...t,"data-footnote-def":``,"data-footnote-id":n,id:`fn-${n}`,class:`footnote-def`},[`div`,{class:`footnote-body`},0],[`a`,{href:`#fnref-${n}`,class:`footnote-backref`,contentEditable:`false`,"aria-label":`Back to reference`},`↩`]]},addCommands(){return{insertFootnoteDefinition:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e},content:[{type:`paragraph`}]})}}});function p2({node:e}){return``.repeat(e.nodeSize-e.content.size)}const m2=Fw.create({name:`footnoteReference`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,draggable:!1,priority:60,renderText:p2,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){return[{tag:`sup[data-footnote-ref]`,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}}}]},renderHTML({node:e}){let t=String(e.attrs.identifier??``);return[`sup`,{id:`fnref-${t}`,"data-footnote-ref":``,"data-footnote-id":t,class:`footnote-ref`},[`a`,{href:`#fn-${t}`,class:`footnote-ref-link`},`[${t}]`]]},addCommands(){return{insertFootnoteReference:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e}})}}}),h2=xre.extend({marks:`_`,priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`},sourceRaw:{default:null}}}}),g2=Sre.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`},sourceTrailingHashes:{default:null},sourceUnderlineLength:{default:null},sourceContiguousNext:{default:!1},sourceLeadingIndent:{default:null,rendered:!1},sourceInteriorSpacing:{default:null,rendered:!1}}}}),_2=Fw.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}}),v2=Fw.create({name:`imageReference`,marks:`_`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:p2,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 y2(e){if(typeof e!=`string`||!e.startsWith(`/`))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return typeof t==`string`&&t?t+e:e}const b2=wre.extend({marks:`_`,priority:60,renderText:p2,addAttributes(){return{...this.parent?.(),sourceUrl:{default:null,rendered:!1}}},renderHTML({HTMLAttributes:e}){let t=nC(this.options.HTMLAttributes,e);return typeof t.src==`string`&&(t.src=y2(t.src)),[`img`,t]}}),x2=Fw.create({name:`jsxComponent`,group:`block`,atom:!1,content:`block*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e!=`string`&&{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{sourceRaw:e}})}}}),S2=Fw.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`text*`,isolating:!1,selectable:!0,priority:60,renderText:p2,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`span[data-jsx-inline]`,getAttrs:e=>typeof e!=`string`&&{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-jsx-inline":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]}}),C2=[`https`,`http`,`mailto`,`tel`,`ftp`,`sms`],w2=C2.map(e=>`${e}:`).join(`|`);RegExp(`^(?:${w2}|\\/|#|\\?|\\.\\/|\\.\\.\\/)`,`i`);function T2(e){let t=e.trim();if(t===``)return!0;let n=t.indexOf(`:`);if(n===-1)return!0;let r=t.indexOf(`/`),i=t.indexOf(`?`),a=t.indexOf(`#`);return n>Math.min(r===-1?1/0:r,i===-1?1/0:i,a===-1?1/0:a)}const E2=new Set(C2.map(e=>`${e}:`));function D2(e){try{let t=new URL(e,`https://placeholder.invalid`);return E2.has(t.protocol.toLowerCase())}catch{return!1}}const O2=`LinkFidelity must be derived from the Link extension`,k2=Mre.extend({priority:60,addOptions(){let e=this.parent?.();if(e===void 0)throw Error(O2);return{...e,openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:D2,shouldAutoLink:()=>!0}},addAttributes(){let e=this.parent?.();if(e===void 0)throw Error(O2);return{...e,linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1},sourceForm:{default:null,rendered:!1},target:{default:null,rendered:!1},anchor:{default:null,rendered:!1},alias:{default:null,rendered:!1},sourceUrlForm:{default:null,rendered:!1},sourceTitleMarker:{default:null,rendered:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}}}),A2=Fw.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null},sourceLayout:{default:null},sourceTitleMarker:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function j2(e){return e.type.name===`list`&&!e.attrs.ordered}function M2(e){return e.type.name===`list`&&!!e.attrs.ordered}function N2(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function P2(e,t,n,r,i,a,o){let s=KS(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?Wg(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o})}}),t(n),!0}return Vg(n,a)(e,void 0)?!t||Vg(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!1}function F2(e){return e===`x`||e===`X`}function I2(e){return e===`X`?`X`:null}function L2(e,t,n,r){let i=e.schema.nodes.list;if(!i)return!1;let a=e.doc.resolve(t.from),o=a.depth-1;if(o>0&&a.node(o).type.name===`listItem`&&a.index(o)===0){let i=a.node(o);return e.tr.delete(t.from,t.to).setNodeMarkup(a.before(o),void 0,{...i.attrs,checked:n,sourceCheckboxChar:r}),!0}let s=a.blockRange();if(!s)return!1;let c=eh(s,i,{ordered:!1});if(!c)return!1;let l=e.tr;l.wrap(s,c),l.delete(l.mapping.map(t.from),l.mapping.map(t.to));let u=l.doc.resolve(l.mapping.map(t.from));for(let e=u.depth;e>0;e--){let t=u.node(e);if(t.type.name===`listItem`){l.setNodeMarkup(u.before(e),void 0,{...t.attrs,checked:n,sourceCheckboxChar:r});break}}return!0}const R2=/^\s*([-+*])\s$/,z2=/^\s*(\d+)([.)])\s$/,B2=/^\s*[-*+]\s\[([ xX]?)\]\s$/,V2=/^\s*\[([ xX]?)\]\s$/,H2=Fw.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,nC(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:P2(e,t,n,r,e=>j2(e)&&!N2(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:P2(e,t,n,r,e=>M2(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:P2(e,t,n,r,e=>j2(e)&&N2(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[Sw({find:R2,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]}),joinPredicate:(e,t)=>t.attrs.ordered===!1}),Sw({find:z2,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]}),joinPredicate:(e,t)=>t.attrs.ordered===!0}),new ew({find:B2,handler:({state:e,range:t,match:n})=>L2(e,t,F2(n[1]),I2(n[1]))?void 0:null}),new ew({find:V2,handler:({state:e,range:t,match:n})=>L2(e,t,F2(n[1]),I2(n[1]))?void 0:null})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),U2=Fw.create({name:`listItem`,content:`paragraph block*`,defining:!0,addAttributes(){return{checked:{default:null},spread:{default:!1},sourceMarkerSpacing:{default:null,rendered:!1},sourceOrdinal:{default:null,rendered:!1},sourceCheckboxChar:{default:null,rendered:!1},sourceContinuationIndent:{default:null,rendered:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,nC(t),0]:[`li`,nC(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(nC(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`),c=()=>{o&&(o.disabled=!n.isEditable)};return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,c(),n.on(`update`,c),o.addEventListener(`change`,()=>{let r=t();r!==void 0&&typeof r==`number`&&n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,o.disabled=!n.isEditable,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)},destroy(){n.off(`update`,c)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),W2=H2,G2=U2,K2=Fw.create({name:`mathInline`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,renderText:p2,addAttributes(){return{formula:{default:``},id:{default:null},language:{default:`latex`},sourceDelimiter:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-math-inline]`,getAttrs:e=>typeof e!=`string`&&{formula:e.getAttribute(`data-formula`)||``,id:e.getAttribute(`id`)||null,language:e.getAttribute(`data-language`)||`latex`}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-math-inline":``,"data-formula":e.formula,"data-language":e.language,...e.id?{id:e.id}:{}}]},addCommands(){return{insertMathInline:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{formula:e}})}}}),q2=Fw.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){let e=e=>typeof e!=`string`&&{reason:e.getAttribute(`data-reason`)||``};return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e},{tag:`pre[data-raw-mdx-fallback]`,getAttrs:e}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),J2=Wie.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),Y2=qie.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),X2=Fw.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`,...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)}}}),Z2=aw.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`,...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)}}}),Q2=sw.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}});function $2(e){for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return t;return null}function e4(e){let t=!1;return e.descendants(e=>!t&&(e.type.name===`list`&&(t=!0),!t)),t}function t4(e){let{selection:t}=e;return t instanceof Uh?t.$cursor:null}function n4(e){let t=t4(e);if(t?.parentOffset!==0)return!1;let n=$2(t);if(n===null||t.depth!==n+1||t.index(n)!==0)return!1;let r=t.index(n-1);return r!==0&&e4(t.node(n-1).child(r-1))}function r4(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 i4(e){let t=t4(e);if(!t||t.parentOffset!==t.parent.content.size)return!1;let n=$2(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=r4(t,n);return r!==null&&r<n}const a4=sw.create({name:`listBoundaryMerge`,addKeyboardShortcuts(){let e=()=>{let{editor:e}=this;if(!n4(e.state))return!1;if(e.commands.undoInputRule())return!0;let{state:t,view:n}=e;return sg(t,n.dispatch,n)},t=()=>{let{editor:e}=this;if(!i4(e.state))return!1;let{state:t,view:n}=e;return cg(t,n.dispatch,n)};return{Backspace:e,"Mod-Backspace":e,Delete:t,"Mod-Delete":t}}}),o4=sw.create({name:`plainTextClipboard`,priority:1e3,addProseMirrorPlugins(){return[new eg({key:new rg(`okPlainTextClipboard`),props:{clipboardTextSerializer:e=>e.content.textBetween(0,e.content.size,`
465
465
 
466
466
  `)}})]}}),s4=aw.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 c4(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||l4(n)===r||B1(e)===t}function l4(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}const u4=uae.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),d4=$T.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),f4=KT.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),p4=qT.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),m4=Fw.create({name:`tag`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,renderText:p2,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e!=`string`&&{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()}}}),h4=/^(?:---|—-|___\s|\*\*\*\s)$/;function g4(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}const _4=Yie.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[bw({find:h4,type:this.type,getAttributes:e=>({sourceRaw:g4(e)})})]}}),v4=fae.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceForm:{default:`u`,rendered:!1}}}});function y4(e,t){let{target:n,anchor:r,alias:i}=e;if(!t.separatorCrossed)return e;if(r!==null){let e=C4(r);return{target:n,anchor:e.length>0?e:null,alias:i===null?null:w4(i)}}return{target:C4(n),anchor:null,alias:i===null?null:w4(i)}}function b4(e,t,n){let r=e.trim();return r===t?!0:n===`alias`?w4(r)===t:C4(r)===t}function x4(e,t,n){return typeof e==`string`&&b4(e,t,n)?e:t}function S4(e){return C4(e.trim())===``}function C4(e){return e.endsWith(`\\`)?e.slice(0,-1):e}function w4(e){return e.replace(/\\\|/g,`|`)}function T4(e){let t=``,n=0;for(let r of e)r===`\\`?n++:(r===`|`&&n%2==0&&(t+=`\\`),n=0),t+=r;return t}function E4(e){return e.replace(/\|/g,`\\|`)}function D4(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function O4(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const k4=Fw.create({name:`wikiLink`,marks:`_`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:p2,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`&&{target:e.getAttribute(`data-target`)||``,alias:D4(e.getAttribute(`data-alias`)),anchor:D4(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:D4(e.getAttribute(`data-alias`)),anchor:D4(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=D4(e.attrs.alias),i=D4(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`},O4({target:n,alias:r,anchor:i})]}});function A4(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function j4(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const M4=[x2,q2,S2,K2,k4,Fw.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:p2,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:D4(e.getAttribute(`data-alias`)),anchor:D4(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=D4(e.attrs.alias),i=D4(e.attrs.anchor),a=D4(e.attrs.resolvedSrc),o=A4(n);if(pd.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let s=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${s}#${i}`:s,target:`_blank`,rel:`noopener noreferrer`},j4({target:n,alias:r,anchor:i})]}}),m4,W2,G2,l2,u2,u4,v4,Y2,c2,J2,g2,_4,k2,_2,A2,h2,d2,Q2,s4,o4,Iae.configure({trailingNode:!1,undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,listKeymap:{listTypes:[{itemName:`listItem`,wrapperNames:[`list`]}]},italic:!1,bold:!1,strike:!1,underline:!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}}),a4,d4.configure({resizable:!0}),JT,p4,f4,b2.configure({inline:!0}),v2,Fre,Z2,X2,m2,f2];function Soe(e){let{frontmatter:t}=qc(e);if(t===``)return null;let n;try{let e=(0,Lc.parseDocument)(Yc(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 Coe=/^[a-zA-Z0-9][\w/-]*$/;function woe(e){return e.startsWith(`#`)?e.slice(1):e}function Toe(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Eoe(e){if(!e||e.trim()===``)return[];let{map:t}=Zc(e);if(!t)return[];let n=Toe(t.tags),r=[];for(let e of n){let t=woe(e);Coe.test(t)&&r.push(t)}return r}const Doe=I({changes:F(no(`kind`,[I({key:M(),kind:R(`added`),after:Vc}).loose(),I({key:M(),kind:R(`removed`),before:Vc}).loose(),I({key:M(),kind:R(`changed`),before:Vc,after:Vc}).loose()])),unparseable:I({before:M(),after:M()}).loose().nullable()}).loose();function N4(e){let{fenced:t}=DQ(e),n=kQ(t);if(n.map===null)return{fenced:t,map:{},keys:[],parseError:n.parseError};let r=nl(n.doc);return{fenced:t,map:n.map,keys:r.length>0?r:Object.keys(n.map),parseError:void 0}}function Ooe(e,t){let n=N4(e),r=N4(t);if(n.parseError!==void 0||r.parseError!==void 0)return{changes:[],unparseable:{before:n.fenced,after:r.fenced}};let i=[],a=new Set;for(let e of r.keys){if(a.has(e))continue;a.add(e);let t=r.map[e];if(t===void 0)continue;let o=n.map[e];if(o===void 0){i.push({key:e,kind:`added`,after:t});continue}Gc(o,t)||i.push({key:e,kind:`changed`,before:o,after:t})}for(let e of n.keys){if(a.has(e))continue;a.add(e);let t=n.map[e];t!==void 0&&i.push({key:e,kind:`removed`,before:t})}return{changes:i,unparseable:null}}function P4(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 F4(e,t,n){let r=n.delimiter,i=(e??``).split(r).filter(e=>e.length>0),a=new Set(i),o=[];for(let e of t)!a.has(e)&&n.isDir(e)&&(a.add(e),o.push(e));return[...i,...o].join(r)}function koe(e,t){return F4(e,P4(t.platform,t.homeDir),t)}function Aoe(e,t){switch(e){case`darwin`:return[`${t}/Library/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`];case`win32`:return[];default:return[`${t}/.local/share/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`]}}function joe(e,t){return F4(e,[...P4(t.platform,t.homeDir),...Aoe(t.platform,t.homeDir)],t)}const I4=`:(literal)`;function L4(e){if(e===``)throw Error(`toPathspec: empty path. ":(literal)" is an empty pattern that matches every tracked path; pass "." if you meant the repo root.`);return`${I4}${e}`}function Moe(e){if(e.length===0)throw Error(`pathspecArgs: empty path list. A bare "--" removes the pathspec restriction rather than selecting nothing.`);return[`--`,...e.map(e=>L4(e))]}function Noe(e){return e.replaceAll(I4,``)}3072-Poe("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 Poe(e,t){let n=encodeURIComponent(e);return t===`cursor`?encodeURIComponent(n).length:n.length}function R4(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 Foe=new Set([`opencode.json`]),Ioe=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function z4(e){return Ioe.test(e)}function B4(e){return z4(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:Foe.has(e.slice(e.lastIndexOf(`/`)+1))}function V4(e,t){let n=R4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const H4=M().superRefine(V4).optional(),Loe=M().superRefine(V4),U4={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},W4=M().optional(),Roe=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,zoe=no(`kind`,[I({kind:R(`doc`),docPath:M().min(1)}).loose(),I({kind:R(`folder`),folderPath:M()}).loose()]),G4=L([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),K4=L([`current`,`stale`,`absent`,`empty`]),Boe=no(`ok`,[I({ok:R(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:K4.optional().catch(void 0)}).loose(),I({ok:R(!1),error:G4,branch:M().min(1).optional()}).loose()]),Voe=L([`user`,`org`]),Hoe=I({login:M().min(1),kind:Voe,avatarUrl:M().optional()}).loose(),q4=L([`auth-required`,`network`]),Uoe=no(`ok`,[I({ok:R(!0),owners:F(Hoe)}).loose(),I({ok:R(!1),error:q4}).loose()]),Woe=no(`ok`,[I({ok:R(!0),available:P()}).loose(),I({ok:R(!1),error:q4}).loose()]),Goe=L([`public`,`private`]),Koe=I({owner:M().min(1),name:M().min(1),visibility:Goe,description:M().optional()}).loose(),qoe=L([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),Joe=no(`ok`,[I({ok:R(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:R(!1),error:qoe}).loose()]);function J4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const Y4=e=>e.refine(J4,`invalid branch name`);function Yoe(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 Xoe=[/could not read (username|password)/i,/terminal prompts disabled/i,/user interactivity has been disabled/i,/unable to get password from user/i],Zoe=[/insufficient scopes/i,/missing.*scope/i,/required scope/i],Qoe=[/permission denied.*\(publickey\)/i,/host key verification failed/i],X4=/fatal:.*repository.*not found/i,$oe=[/\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,X4];function ese(e){if(typeof e!=`object`||!e)return``;let t=e.git;return t==null?``:String(t)}function tse(e){if(e==null)return{kind:`non-auth`};let t=`${e instanceof Error?e.message:String(e)}\n${ese(e)}`;return Xoe.some(e=>e.test(t))?{kind:`auth`,subclass:`no-credential`}:Zoe.some(e=>e.test(t))?{kind:`auth`,subclass:`scope-mismatch`}:Qoe.some(e=>e.test(t))?{kind:`auth`,subclass:`ssh-auth`}:$oe.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`}:X4.test(t)?{kind:`auth`,subclass:`not-found-as-identity`}:{kind:`auth`,subclass:`unknown-auth`}:{kind:`non-auth`}}function nse(e){return e.kind===`auth`?e.subclass===`no-credential`||e.subclass===`401`||e.subclass===`unknown-auth`:!1}const Z4={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()},rse=no(`detached`,[I({detached:R(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Ja(),...Z4}).loose(),I({detached:R(!0),currentBranch:Ja(),currentHeadSha:M().min(1),...Z4}).loose()]),ise=I({branch:Y4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose(),ase=L([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]),ose=no(`ok`,[I({ok:R(!0)}).loose(),I({ok:R(!1),reason:ase,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]);L([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]);const sse=I({branch:Y4(M().min(1)),path:M(),kind:L([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),cse=no(`verdict`,[I({verdict:R(`on-origin`)}).loose(),I({verdict:R(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:R(`deleted`)}).loose(),I({verdict:R(`never-on-branch`)}).loose(),I({verdict:R(`changed-locally`)}).loose(),I({verdict:R(`unknown`)}).loose()]).catch({verdict:`unknown`}),lse=I({startedAt:M().min(1),httpListenMs:N().nonnegative().optional(),seedWalkMs:N().nonnegative().optional(),indexesMs:N().nonnegative().optional(),readyMs:N().nonnegative().optional(),fileCount:N().nonnegative().optional()}),use=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:ao(M().min(1),M().min(1)).optional(),boot:lse.optional(),collabClients:N().int().nonnegative().optional()}).loose(),dse=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:L([`git-config`,`synthesized`]),created_at:M().min(1)}).loose(),fse=I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose(),Q4=L(`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:symlink-refused.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:derived-index-unavailable.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:stale-external-write.urn:ok:error:store-refused.urn:ok:error:doc-removed.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:non-github-origin.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:concurrent-overwrite-refused.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.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.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`));function pse(e){throw Error(`Unexpected ProblemType variant: ${JSON.stringify(e)}`)}const $4=I({type:Q4,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex(Roe,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose(),mse=I({parentDocName:M().min(1),placement:L([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose(),hse=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose(),gse=I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(J4,`invalid branch name`).optional()}).loose(),_se=I({type:R(`error`),problem:$4}).loose();function e3(e,t){let n=t.map(e=>[vp(e),e]);for(let t of e){let e=vp(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function vse(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=e3([t],i);if(e!==void 0)return{locale:e,source:`override`}}if(n!==void 0&&n!==`system`&&i.includes(n))return{locale:n,source:`explicit`};let o=e3(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}const yse=[`.ok`,`local`,`installed-skills.json`],bse=L(fl),xse=$a({hosts:F(M()),scope:bse,scripts:P(),installedAt:$i(),projection:L([`symlink`,`copy`]).optional(),contentHash:M().optional()}),t3=$a({schema:R(1),skills:ao(M(),xse).default({})});function Sse(){return{schema:1,skills:{}}}function Cse(e){let t;try{t=JSON.parse(e)}catch{return null}let n=t3.safeParse(t);return n.success?n.data:null}function n3(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===45||e===95}function wse(e){if(!e.includes(`eyJ`))return null;let t=[],n=[];for(let r=0;r<e.length;r+=1)if(n3(e.charCodeAt(r))){for(t.push(r);r<e.length&&n3(e.charCodeAt(r));)r+=1;n.push(r)}let r=[];for(let t=e.indexOf(`eyJ`);t!==-1;t=e.indexOf(`eyJ`,t+1))r.push(t);let i=r=>r+1<t.length&&e[n[r]??-1]===`.`&&t[r+1]===(n[r]??-1)+1,a=[],o=0,s=0;for(let c=0;c+2<t.length;c+=1){let l=t[c]??0,u=n[c]??0;for(;s<r.length&&(r[s]??0)<l;)s+=1;if(!i(c)||!i(c+1))continue;let d=t[c+1]??0,f=n[c+1]??0,p=(n[c+2]??0)-(t[c+2]??0);if(!e.startsWith(`eyJ`,d)||f-d<11||p<8)continue;let m=r[s];m===void 0||m>=u||u-m<11||(a.push(e.slice(o,m),`[REDACTED-JWT]`),o=n[c+2]??e.length,c+=2)}return a.length===0?null:(a.push(e.slice(o)),a.join(``))}function r3(e){return RegExp(`(?:\\b|(?<=(?:\\[|\\u009b)[0-?]*[ -/]*[@-~]))${e.source}`,`g`)}const i3=[{name:`github-pat`,regex:/(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:r3(/(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/),replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/sk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:r3(/sk-[A-Za-z0-9]{20,}\b/),replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,redact:wse},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/github_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:r3(/sk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/),replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/xox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/AIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:r3(/(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/),replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/glpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`linux-home-path`,regex:/\/home\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`windows-home-path`,regex:/[A-Za-z]:\\{1,2}Users\\{1,2}(?:(?![A-Za-z]:\\)[^\\"\r])+/gi,replacement:`~`}],Tse=i3.map(e=>e.name);function a3(e){let t=new Set,n=0;return{redacted:e.split(`
467
467
  `).map(e=>{let r=e,i=!1;for(let e of i3){if(`redact`in e){let n=e.redact(r);if(n===null)continue;t.add(e.name),i=!0,r=n;continue}let{name:n,regex:a,replacement:o}=e;a.lastIndex=0,a.test(r)&&(t.add(n),i=!0,a.lastIndex=0,r=r.replace(a,o))}return i&&n++,r}).join(`
@@ -471,26 +471,28 @@ $2`).split(`
471
471
  <Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>c3(`Tabs`,e,t,v3)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:y3,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)=>c3(`Tab`,e,t,y3)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:b3,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)=>c3(`Math`,e,t,b3)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:Xse,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:w3,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)=>c3(`Mirror`,e,t,w3)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:T3,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)=>c3(`MirrorSource`,e,t,T3)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:Vse,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:Hse,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:Gse,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:D3},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:Kse,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:D3},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:qse,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:D3},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:Zse,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:D3},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:Use,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="${E3(n.name)}"`:``,a=n?.id?` id="${E3(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${Qse(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:Wse,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${E3(i)}"`):`${a} align="${E3(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:Jse,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:Yse,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??``})}],$se={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>c3(e.attrs.componentName||`*`,e,t)};function ece(){let e=new Map;e.set(`*`,$se);for(let t of O3)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 tce(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const k3={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxActionAborted:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},jsxChromeDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function A3(){k3.parseFallback.blockLevel++}function j3(){k3.parseFallback.wholeDoc++}function nce(){k3.parseFallback.wholeDocBudget++}function rce(){let e=tce();return{parseFallback:{...k3.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...k3.jsxRenderFailure},jsxAutoConvertFailed:{...k3.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...k3.jsxAutoConvertSucceeded},jsxActionAborted:{...k3.jsxActionAborted},jsxPropDropped:{...k3.jsxPropDropped},jsxMoveFailed:{...k3.jsxMoveFailed},jsxStuckCopyFailed:{...k3.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...k3.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...k3.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...k3.jsxKeyboardDeleteFailed},jsxChromeDeleteFailed:{...k3.jsxChromeDeleteFailed},blockGripClickSelectFailed:{...k3.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...k3.jsxArrowNodeSelectFailed}}}const ice=/^(`{3,}|~{3,})/gm;function M3(e){let t=[],n=null;for(let r of e.matchAll(ice)){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 N3(e,t){return t.some(([t,n])=>e>=t&&e<n)}const P3=/`+/g;function ace(e){let t=[];P3.lastIndex=0;for(let n of e.matchAll(P3))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const oce=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function F3(e){let t=M3(e),n=[];for(let r of e.matchAll(oce))N3(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
472
472
  `)}\n\n`:``}function sce(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return R3(e,t.parse,0,n)}function I3(e){return e.calls>=1e3||(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=500}function L3(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split(`
473
473
  `).slice(0,4).join(`
474
- `)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function R3(e,t,n,r){if(n>20)return j3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),B3(e);if(r){if(I3(r))return nce(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),B3(e);r.calls+=1}try{return t(e)}catch(i){let a=cce(i),o=L3(i);if(a===void 0){if(n===0){let n=mce(e,t,i,r);if(n)return n}return j3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),B3(e)}A3(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=fce(e,a),s=e.slice(i.start,i.end),c=e.slice(0,i.start).replace(/\n+$/,``),l=e.slice(i.end).replace(/^\n+/,``),u=c.trim()?R3(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?R3(F3(c)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:s?[{type:`text`,text:s}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){j3();let n=L3(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})),B3(e)}}}function cce(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 lce(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 z3(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function uce(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(N3(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 dce(e){let t=uce(e,M3(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=z3(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=z3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function fce(e,t){let n=dce(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:lce(e,t)??0,end:z3(e,t)??e.length}}function pce(e){let t=M3(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;N3(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 mce(e,t,n,r){let i=pce(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&I3(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=F3(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){A3();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 B3(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}function V3(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function H3(e){return V3(e).kind===`valid`}const U3=[[``,``],[``,``],[``,``],[``,``],[``,``]],W3=/[\uE000-\uE004]/,G3=/[\uE005-\uE009]/,hce=U3.map(([e,t])=>({from:e,to:t})),gce=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,_ce=/<!--[\s\S]*?-->/g,vce=/<\/([a-z][a-z0-9]*)\s*>/g,yce=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,K3=new Set([`img`,`video`,`audio`]),q3=new Set([`mark`,`u`,`ins`]);function bce(e,t,n,r){let i=0,a=0,o=`<${t}`;for(;a<n;){let t=e.indexOf(o,a);if(t===-1||t>=n)break;a=t+o.length;let s=e[t+o.length];if(s!==void 0&&s!==`>`&&s!==`/`&&!/\s/.test(s)||N3(t,r))continue;let c=e.indexOf(`>`,t);(c===-1||e[c-1]!==`/`)&&i++}return i}const xce=/<\/([A-Z][A-Za-z0-9.]*)>/g;function J3(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 Sce(e){let t=new Map,n=new RegExp(xce.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 Cce(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 wce(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}const Y3=1024;function Tce(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-Y3);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
475
- `||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+Y3);for(let n=e+1;n<c;n++){let e=t[n];if(e===`>`){s=n;break}if(e===`<`||e===`\\`||e===`
476
- `||e===`\r`||e===``||e===``||e===``||e===``||e===``)return!1;(e===` `||e===` `)&&(o=!0)}return s===-1||!o?!1:t[s+1]===`)`}function Ece(e,t,n,r){let i=J3(n,e);if(i>=n.length)return!1;let a=n[i],o=J3(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function Dce(e){let t=[];for(let n of e.matchAll(/<\/?([A-Z][A-Za-z0-9.]*)/g)){let r=n.index;if(t.length>0){let[e,n]=t[t.length-1];if(r>e&&r<=n)continue}let i=r+n[0].length,a=!1,o=!1,s=!1,c=0,l=-1;for(;i<e.length;){let t=e[i];if(a)t===`'`?a=!1:t===`\\`&&i+1<e.length&&i++;else if(o)t===`"`?o=!1:t===`\\`&&i+1<e.length&&i++;else if(s)t==="`"?s=!1:t===`\\`&&i+1<e.length&&i++;else if(t===`'`)a=!0;else if(t===`"`)o=!0;else if(t==="`")s=!0;else if(t===`{`)c++;else if(t===`}`&&c>0)c--;else if(c===0&&t===`>`){l=i;break}i++}if(l!==-1){if(e.slice(r,l).includes(`
474
+ `)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function R3(e,t,n,r){if(n>20)return j3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),B3(e);if(r){if(I3(r))return nce(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),B3(e);r.calls+=1}try{return t(e)}catch(i){let a=cce(i),o=L3(i);if(a===void 0){if(n===0){let n=mce(e,t,i,r);if(n)return n}return j3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),B3(e)}A3(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=fce(e,a),s=e.slice(i.start,i.end),c=e.slice(0,i.start).replace(/\n+$/,``),l=e.slice(i.end).replace(/^\n+/,``),u=c.trim()?R3(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?R3(F3(c)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:s?[{type:`text`,text:s}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){j3();let n=L3(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})),B3(e)}}}function cce(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 lce(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 z3(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function uce(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(N3(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 dce(e){let t=uce(e,M3(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=z3(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=z3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function fce(e,t){let n=dce(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:lce(e,t)??0,end:z3(e,t)??e.length}}function pce(e){let t=M3(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;N3(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 mce(e,t,n,r){let i=pce(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&I3(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=F3(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){A3();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 B3(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}function V3(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function H3(e){return V3(e).kind===`valid`}const U3=[[``,``],[``,``],[``,``],[``,``],[``,``]],W3=/[\uE000-\uE004]/,G3=/[\uE005-\uE009]/,hce=U3.map(([e,t])=>({from:e,to:t})),gce=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,_ce=/<!--[\s\S]*?-->/g,vce=/<\/([a-z][a-z0-9]*)\s*>/g,yce=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,K3=new Set([`img`,`video`,`audio`]),q3=new Set([`mark`,`u`,`ins`]);function bce(e,t,n,r){let i=0,a=0,o=`<${t}`;for(;a<n;){let t=e.indexOf(o,a);if(t===-1||t>=n)break;a=t+o.length;let s=e[t+o.length];if(s!==void 0&&s!==`>`&&s!==`/`&&!/\s/.test(s)||N3(t,r))continue;let c=e.indexOf(`>`,t);(c===-1||e[c-1]!==`/`)&&i++}return i}const xce=/<\/([A-Z][A-Za-z0-9.]*)>/g;function J3(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 Sce(e){let t=new Map,n=new RegExp(xce.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 Cce(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 wce(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}function Tce(e){let t=[],n=e.indexOf(`
475
+
476
+ `);for(;n!==-1;)t.push(n),n=e.indexOf(`
477
477
 
478
- `))continue;t.push([r,l])}}return t}function Oce(e,t){if(t.length===0)return!1;let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>>1,[a,o]=t[i];if(e<=a)r=i-1;else if(e>o)n=i+1;else return!0}return!1}function kce(e,t,n){let r=Math.min(t.length,n),i=!1,a=0;for(let n=e;n<r;n++){let e=t[n];if(i){e===`"`&&(i=!1),e===`\\`&&n+1<r&&n++;continue}if(e===`"`){i=!0;continue}if(e===`{`){a++;continue}if(e===`}`&&a>0){a--;continue}if(!(a>0)&&e===`>`)return n>0&&t[n-1]===`/`}return!1}function X3(e,t){let n=Ace(e,t.escapeAware),r=new Set(n),i=[],a=[];return Z3(e,t.escapeAware,{onFlush:()=>{a.length=0},onBrace:(e,t)=>{if(!r.has(e)){if(t===`{`)a.push(e);else if(a.length>0){let t=a.pop();a.length===0&&i.push({start:t,end:e+1})}}}}),{matched:i,unmatched:n}}function Ace(e,t){let n=[],r=[];return Z3(e,t,{onFlush:()=>{n.push(...r),r.length=0},onBrace:(e,t)=>{t===`{`?r.push(e):r.length>0&&r.pop()}}),n.push(...r),n}function Z3(e,t,n){for(let r=0;r<e.length;r++){if(e[r]===`
478
+ `,n+1);return t}const Y3=1024;function Ece(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-Y3);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
479
+ `||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+Y3);for(let n=e+1;n<c;n++){let e=t[n];if(e===`>`){s=n;break}if(e===`<`||e===`\\`||e===`
480
+ `||e===`\r`||e===``||e===``||e===``||e===``||e===``)return!1;(e===` `||e===` `)&&(o=!0)}return s===-1||!o?!1:t[s+1]===`)`}function Dce(e,t,n,r){let i=J3(n,e);if(i>=n.length)return!1;let a=n[i],o=J3(r,e);return a>=(o<r.length?r[o]:t.length)?!1:t[a-1]===`/`}function Oce(e){let t=[],n=Tce(e);for(let r of e.matchAll(/<\/?([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(t.length>0){let[e,n]=t[t.length-1];if(i>e&&i<=n)continue}let a=i+r[0].length,o=J3(n,i),s=o<n.length?n[o]:e.length,c=!1,l=!1,u=!1,d=0,f=-1;for(;a<s;){let t=e[a];if(c)t===`'`?c=!1:t===`\\`&&a+1<e.length&&a++;else if(l)t===`"`?l=!1:t===`\\`&&a+1<e.length&&a++;else if(u)t==="`"?u=!1:t===`\\`&&a+1<e.length&&a++;else if(t===`'`)c=!0;else if(t===`"`)l=!0;else if(t==="`")u=!0;else if(t===`{`)d++;else if(t===`}`&&d>0)d--;else if(d===0&&t===`>`){f=a;break}a++}f!==-1&&t.push([i,f])}return t}function kce(e,t){if(t.length===0)return!1;let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>>1,[a,o]=t[i];if(e<=a)r=i-1;else if(e>o)n=i+1;else return!0}return!1}function Ace(e,t,n){let r=Math.min(t.length,n),i=!1,a=0;for(let n=e;n<r;n++){let e=t[n];if(i){e===`"`&&(i=!1),e===`\\`&&n+1<r&&n++;continue}if(e===`"`){i=!0;continue}if(e===`{`){a++;continue}if(e===`}`&&a>0){a--;continue}if(!(a>0)&&e===`>`)return n>0&&t[n-1]===`/`}return!1}function X3(e,t){let n=jce(e,t.escapeAware),r=new Set(n),i=[],a=[];return Z3(e,t.escapeAware,{onFlush:()=>{a.length=0},onBrace:(e,t)=>{if(!r.has(e)){if(t===`{`)a.push(e);else if(a.length>0){let t=a.pop();a.length===0&&i.push({start:t,end:e+1})}}}}),{matched:i,unmatched:n}}function jce(e,t){let n=[],r=[];return Z3(e,t,{onFlush:()=>{n.push(...r),r.length=0},onBrace:(e,t)=>{t===`{`?r.push(e):r.length>0&&r.pop()}}),n.push(...r),n}function Z3(e,t,n){for(let r=0;r<e.length;r++){if(e[r]===`
479
481
  `){let t=e[r+1];if(t===`
480
482
  `||t===`>`){if(n.onFlush(),t===`
481
483
  `)for(;e[r+1]===`
482
- `;)r++;continue}}let i=e[r];if(i===`{`||i===`}`){if(t){let t=0;for(let n=r-1;n>=0&&e[n]===`\\`;n--)t++;if(t%2==1)continue}n.onBrace(r,i)}}}function jce(e){let t=e;if(W3.test(t))for(let[e,n]of U3)t=t.replaceAll(e,n);t=t.replace(_ce,e=>e.replace(/</g,``).replace(/>/g,``)),t=t.replace(gce,(e,t)=>`${t.replaceAll(`:`,``).replaceAll(`@`,``)}`);let n=new Map,r=[...M3(t),...ace(t)];t=t.replace(vce,(e,i,a)=>{if(q3.has(i)){let o=n.get(i)??0;if(o<bce(t,i,a,r))return n.set(i,o+1),e}return e.replace(/</g,``).replace(/>/g,``)}),t=t.replace(yce,(e,t)=>K3.has(t)&&e.endsWith(`/>`)||q3.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,``).replace(/>/g,``):e),t=t.replace(/<>/g,``);let i=Sce(t),a=Cce(t),o=wce(t),s=Dce(t);t=t.replace(/</g,(e,n)=>{if(Tce(n,t)||Oce(n,s))return e;let r=t.slice(n,n+256);if(r[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(r)?e:``;let c=/^<([a-z][a-z0-9]*)/.exec(r);if(c&&K3.has(c[1])&&Ece(n,t,o,a))return e;let l=/^<([a-z][a-z0-9]*)([\s/>])/.exec(r);if(l&&q3.has(l[1])){let i=l[1];return r.startsWith(`<${i}/>`)||t.indexOf(`</${i}>`,n)!==-1?e:``}let u=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(r);if(!u)return``;let d=u[1],f=J3(a,n),p=f<a.length?a[f]:t.length;if(kce(n+1+d.length,t,p))return e;let m=i.get(d);return m&&J3(m,n)<m.length?e:``});{let{unmatched:e}=X3(t,{escapeAware:!0});if(e.length>0){let n=t.split(``);for(let t of e)n[t]=``;t=n.join(``)}}return t}function Q3(e){return W3.test(e)||G3.test(e)}function Mce(){return e=>{Hj(e,e=>{let t=e;typeof t.value==`string`&&Q3(t.value)&&(t.value=$3(t.value)),typeof t.url==`string`&&Q3(t.url)&&(t.url=$3(t.url)),typeof t.title==`string`&&Q3(t.title)&&(t.title=$3(t.title)),typeof t.alt==`string`&&Q3(t.alt)&&(t.alt=$3(t.alt)),typeof t.lang==`string`&&Q3(t.lang)&&(t.lang=$3(t.lang)),typeof t.meta==`string`&&Q3(t.meta)&&(t.meta=$3(t.meta))})}}function $3(e){let t=e.replaceAll(``,`<`).replaceAll(``,`>`).replaceAll(``,`:`).replaceAll(``,`@`).replaceAll(``,`{`);if(G3.test(t))for(let[e,n]of U3)t=t.replaceAll(n,e);return t}const Nce=[{from:`&`,to:``},{from:`;`,to:``}],Pce=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Fce(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function e6(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||Fce(e,r)%2==1?t:n(t))}function Ice(e){return e6(e,Pce,e=>`${e.slice(1,-1)}`)}const t6=RegExp(`([^]+)`,`g`);function n6(e){if(!e.includes(``))return{value:e,spans:[]};let t=[],n=``,r=0;t6.lastIndex=0;let i=t6.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=t6.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function Lce(){return e=>{Hj(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){let{value:n,spans:r}=n6(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]=n6(n).value)}})}}const Rce=[{from:`\\`,to:``}],zce=/\\</g;function Bce(e){return e6(e,zce,e=>`${e.slice(1)}`)}function Vce(){return e=>{Hj(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){if(e.type===`text`){let t=e.value,n=Array(t.length+1),r=[],i=``;for(let e=0;e<t.length;e+=1)n[e]=i.length,t[e]===``?r.push({offset:i.length,char:t[e+1]??``}):i+=t[e];n[t.length]=i.length;let a=[...(e.data?.escapedChars??[]).map(e=>({...e,offset:n[e.offset]??e.offset})),...r].map(e=>({...e})).sort((e,t)=>e.offset-t.offset||e.char.localeCompare(t.char)).filter((e,t,n)=>t===0||e.offset!==n[t-1]?.offset||e.char!==n[t-1]?.char),o=e.data?.entityRefSpans?.map(e=>{let t=n[e.offset]??e.offset,r=n[e.offset+e.length]??e.offset+e.length;return{...e,offset:t,length:r-t}});e.value=i,e.data??={},e.data.escapedChars=a,o&&(e.data.entityRefSpans=o)}else 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 Hce=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),Uce={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`},r6=`ok-alert`,Wce=RegExp(`(?:^|\\s)${r6}-(\\w+)(?:\\s|$)`),Gce=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function i6(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
483
- `,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(Gce);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function Kce(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(Wce);return n?n[1].toLowerCase():null}function a6(e){let t=e.toLowerCase();return Uce[t]??null}function qce(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&&Jce(o[0],s)?o.slice(1):o,position:e.position}}function Jce(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 Yce(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${r6}-title`)}function Xce(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=Kce(e);if(!i)return;let a=a6(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=i6(n,e.position.start.offset),s&&(o=s.title,a||=a6(s.rawType)));let c=a??`note`,l=s&&Hce.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=i6(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!Yce(e.children[0]))return;let f=qce(e,c,o,l,d);r.children[t]=f})}}const Zce={markers:`*`,classPrefix:r6,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 o6(e,t,n){return e[t]===`\\`&&t+1<e.length&&e[t+1]===n}function s6(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;){let t=a>0&&n[a-1]===`
484
- `?$ce(e,i,n[a]):null;t!==null&&(i=t),i+=o6(e,i,n[a])?2:1,a+=1}return i}function Qce(e,t,n){return e[t]===n||o6(e,t,n)}function $ce(e,t,n){let r=t,i=!1;for(;;){let t=r;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r+=1;if(e[r]===`>`){r+=1,(e[r]===` `||e[r]===` `)&&(r+=1),i=!0;continue}r>t&&(i=!0);break}return i&&Qce(e,r,n)?r:null}function c6(e){return H3(e.data)?new Set(e.data.escapedChars.map(e=>e.offset)):null}function ele(e,t,n){return e.filter(e=>e.offset>=t&&e.offset<n).map(e=>({...e,offset:e.offset-t}))}function tle(e,t,n){return e.filter(e=>e.offset>=t&&e.offset+e.length<=n).map(e=>({...e,offset:e.offset-t}))}function l6(e,t,n,r){let i={type:`text`,value:t.value.slice(n,r)},a=f6(e,t,n,r);a&&(i.position=a);let o;if(H3(t.data)&&(o={escapedChars:ele(t.data.escapedChars,n,r)}),t.data?.entityRefSpans?.length){let e=tle(t.data.entityRefSpans,n,r);e.length>0&&(o={...o,entityRefSpans:e})}return o&&(i.data=o),i}function u6(e,t,n){if(e===null||e.size===0)return!1;for(let r=0;r<n;r++)if(e.has(t+r))return!0;return!1}function d6(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
485
- `?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function nle(e,t,n){return{start:d6(e,t),end:d6(e,n)}}function f6(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return nle(e,s6(e,i,t.value,n),s6(e,i,t.value,r))}const p6=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,m6=/<!--([\s\S]*?)-->/g;function rle(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ale(e,n),Hj(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=ile(i,c6(e));if(a.length===0)return;let o=[],s=0;for(let t of a){t.start>s&&o.push(l6(n,e,s,t.start));let r=t.sourceForm===`html`?4:2,a=t.start+r,c=t.sourceForm===`html`?a+i.slice(a,t.end-3).indexOf(t.body):a,l={type:`comment`,children:[l6(n,e,c,c+t.body.length)],data:{sourceForm:t.sourceForm}},u=f6(n,e,t.start,t.end);u&&(l.position=u),o.push(l),s=t.end}return s<i.length&&o.push(l6(n,e,s,i.length)),r.children.splice(t,1,...o),[zj,t+o.length]}),ule(e,n)}}function ile(e,t){let n=[];p6.lastIndex=0;let r;for(;(r=p6.exec(e))!==null;){if(u6(t,r.index,2)||u6(t,r.index+r[0].length-2,2)){p6.lastIndex=r.index+1;continue}r[1].trim().length!==0&&n.push({start:r.index,end:r.index+r[0].length,body:r[1],sourceForm:`percent`})}m6.lastIndex=0;let i;for(;(i=m6.exec(e))!==null;){if(u6(t,i.index,4)||u6(t,i.index+i[0].length-3,3)){m6.lastIndex=i.index+1;continue}let e=i[1].trim();e!==``&&n.push({start:i.index,end:i.index+i[0].length,body:e,sourceForm:`html`})}n.sort((e,t)=>e.start-t.start);let a=[],o=-1;for(let e of n)e.start<o||(a.push(e),o=e.end);return a}function ale(e,t){let n=e.children,r=0;for(;r<n.length;){let e=n[r];if(e.type===`paragraph`){let i=_6(e);if(i!==null){let t=e.children[0],a,o=()=>(a===void 0&&(a=c6(t)),a),s=ole(i);if(s!==null&&!u6(o(),0,2)&&!u6(o(),i.length-2,2)){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:s}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};n.splice(r,1,e),r+=1;continue}let c=sle(i);if(c!==null&&!u6(o(),i.length-i.trimStart().length,4)&&!u6(o(),i.trimEnd().length-3,3)){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:c}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}}let a=cle(e,t);if(a!==null&&!g6(e,4,3)){let e={type:`commentBlock`,children:[a],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}let o=lle(e,t);if(o!==null&&!g6(e,2,2)){let e={type:`commentBlock`,children:[o],data:{sourceForm:`percent`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}}if(e.type===`paragraph`&&y6(e)){let e=r+1;for(;e<n.length;){let t=n[e];if(t.type===`paragraph`&&y6(t))break;e+=1}if(e<n.length&&e>r+1){let t={type:`commentBlock`,children:n.slice(r+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};n.splice(r,e-r+1,t),r+=1;continue}}r+=1}}function h6(e,t,n){return u6(c6(e),t,n)}function g6(e,t,n){let r=e.children[0],i=e.children[e.children.length-1];if(r.type!==`text`||i.type!==`text`)return!1;let a=r.value.length-r.value.trimStart().length,o=i.value.trimEnd().length-n,s=c6(r);return u6(s,a,t)?!0:u6(i===r?s:c6(i),o,n)}function _6(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function ole(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function sle(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 cle(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if(n.type!==`text`||r.type!==`text`)return null;let i=n.value.trimStart();if(!i.startsWith(`<!--`))return null;let a=r.value.trimEnd();if(!a.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(v6(r,`<!--`)>1||v6(r,`-->`)>0)return null}else if(t===e.children.length-1){if(v6(r,`<!--`)>0||v6(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let o=n.value.length-i.length+4;n.value[o]===` `&&(o+=1);let s=a.length-3;r.value[s-1]===` `&&--s;let c=[];o<n.value.length&&c.push(l6(t,n,o,n.value.length));for(let t=1;t<e.children.length-1;t++)c.push(e.children[t]);return s>0&&c.push(l6(t,r,0,s)),c.length===0?null:{type:`paragraph`,children:c}}function lle(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if(n.type!==`text`||r.type!==`text`)return null;let i=n.value.trimStart();if(!i.startsWith(`%%`)||i.startsWith(`%%%`))return null;let a=r.value.trimEnd();if(!a.endsWith(`%%`)||a.endsWith(`%%%`))return null;let o=n.value.length-i.length+2;n.value[o]===` `&&(o+=1);let s=a.length-2;r.value[s-1]===` `&&--s;let c=n.value.slice(o),l=r.value.slice(0,s);if(c.indexOf(`%%`)!==-1||l.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)||c.trim().length>0||l.trim().length>0))return null;let u=[];c.length>0&&u.push(l6(t,n,o,n.value.length));for(let t=1;t<e.children.length-1;t++)u.push(e.children[t]);return l.length>0&&u.push(l6(t,r,0,s)),u.length===0?null:{type:`paragraph`,children:u}}function v6(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 y6(e){let t=_6(e);return t===null||t.trim()!==`%%`?!1:!h6(e.children[0],t.indexOf(`%%`),2)}function ule(e,t){(t.indexOf(`%%`)!==-1||t.indexOf(`<!--`)!==-1)&&Hj(e,e=>{if(!dle.has(e.type))return;let n=e.children;if(!(n===void 0||n.length<2)){for(let e of fle)if(ple(n,t,e))return}})}const dle=new Set([`paragraph`,`heading`,`tableCell`]),fle=[{sourceForm:`html`,open:`<!--`,close:`-->`},{sourceForm:`percent`,open:`%%`,close:`%%`}];function b6(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type!==`text`)continue;let a=0;for(;;){let e=i.value.indexOf(t,a);if(e===-1)break;n.push({index:r,offset:e}),a=e+t.length}}return n}function ple(e,t,n){let r,i;if(n.sourceForm===`percent`){let t=b6(e,`%%`);if(t.length!==2)return!1;[r,i]=t}else{let t=b6(e,`<!--`),n=b6(e,`-->`);if(t.length!==1||n.length!==1)return!1;r=t[0],i=n[0]}if(r.index>=i.index)return!1;let a=e[r.index],o=e[i.index];if(n.sourceForm===`percent`&&(a.value[r.offset-1]===`%`||a.value[r.offset+2]===`%`||o.value[i.offset-1]===`%`||o.value[i.offset+2]===`%`)||hle(e,n,r,i)||h6(a,r.offset,n.open.length)||h6(o,i.offset,n.close.length))return!1;for(let t=r.index+1;t<i.index;t++)if(S6(e[t]))return!1;if(r.offset===0&&S6(e[r.index-1])||i.offset+n.close.length===o.value.length&&S6(e[i.index+1]))return!1;let s=mle(e,n,r,i,t);if(s===null)return!1;let c=[];a.value.slice(0,r.offset).length>0&&c.push(l6(t,a,0,r.offset));let l={type:`comment`,children:s,data:{sourceForm:n.sourceForm}},u=f6(t,a,r.offset,a.value.length),d=f6(t,o,0,i.offset+n.close.length);u&&d&&(l.position={start:u.start,end:d.end}),c.push(l);let f=i.offset+n.close.length;return o.value.slice(f).length>0&&c.push(l6(t,o,f,o.value.length)),e.splice(r.index,i.index-r.index+1,...c),!0}function mle(e,t,n,r,i){let a=e[n.index],o=e[r.index],s=n.offset+t.open.length,c=a.value.length,l=r.offset;if(t.sourceForm===`html`){for(;s<c&&/\s/.test(a.value[s]);)s+=1;for(;l>0&&/\s/.test(o.value[l-1]);)--l}let u=[];s<c&&u.push(l6(i,a,s,c));for(let t=n.index+1;t<r.index;t++)u.push(e[t]);return 0<l&&u.push(l6(i,o,0,l)),u.length===0||!u.some(e=>e.type!==`text`||e.value.trim().length>0)||!u.some(e=>e.type===`text`)?null:u}function hle(e,t,n,r){let i=e[n.index],a=e[r.index];if(i.value.indexOf(`
484
+ `;)r++;continue}}let i=e[r];if(i===`{`||i===`}`){if(t){let t=0;for(let n=r-1;n>=0&&e[n]===`\\`;n--)t++;if(t%2==1)continue}n.onBrace(r,i)}}}function Mce(e){let t=e;if(W3.test(t))for(let[e,n]of U3)t=t.replaceAll(e,n);t=t.replace(_ce,e=>e.replace(/</g,``).replace(/>/g,``)),t=t.replace(gce,(e,t)=>`${t.replaceAll(`:`,``).replaceAll(`@`,``)}`);let n=new Map,r=[...M3(t),...ace(t)];t=t.replace(vce,(e,i,a)=>{if(q3.has(i)){let o=n.get(i)??0;if(o<bce(t,i,a,r))return n.set(i,o+1),e}return e.replace(/</g,``).replace(/>/g,``)}),t=t.replace(yce,(e,t)=>K3.has(t)&&e.endsWith(`/>`)||q3.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,``).replace(/>/g,``):e),t=t.replace(/<>/g,``);let i=Sce(t),a=Cce(t),o=wce(t),s=Oce(t);t=t.replace(/</g,(e,n)=>{if(Ece(n,t)||kce(n,s))return e;let r=t.slice(n,n+256);if(r[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(r)?e:``;let c=/^<([a-z][a-z0-9]*)/.exec(r);if(c&&K3.has(c[1])&&Dce(n,t,o,a))return e;let l=/^<([a-z][a-z0-9]*)([\s/>])/.exec(r);if(l&&q3.has(l[1])){let i=l[1];return r.startsWith(`<${i}/>`)||t.indexOf(`</${i}>`,n)!==-1?e:``}let u=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(r);if(!u)return``;let d=u[1],f=J3(a,n),p=f<a.length?a[f]:t.length;if(Ace(n+1+d.length,t,p))return e;let m=i.get(d);return m&&J3(m,n)<m.length?e:``});{let{unmatched:e}=X3(t,{escapeAware:!0});if(e.length>0){let n=t.split(``);for(let t of e)n[t]=``;t=n.join(``)}}return t}function Q3(e){return W3.test(e)||G3.test(e)}function Nce(){return e=>{Hj(e,e=>{let t=e;typeof t.value==`string`&&Q3(t.value)&&(t.value=$3(t.value)),typeof t.url==`string`&&Q3(t.url)&&(t.url=$3(t.url)),typeof t.title==`string`&&Q3(t.title)&&(t.title=$3(t.title)),typeof t.alt==`string`&&Q3(t.alt)&&(t.alt=$3(t.alt)),typeof t.lang==`string`&&Q3(t.lang)&&(t.lang=$3(t.lang)),typeof t.meta==`string`&&Q3(t.meta)&&(t.meta=$3(t.meta))})}}function $3(e){let t=e.replaceAll(``,`<`).replaceAll(``,`>`).replaceAll(``,`:`).replaceAll(``,`@`).replaceAll(``,`{`);if(G3.test(t))for(let[e,n]of U3)t=t.replaceAll(n,e);return t}const Pce=[{from:`&`,to:``},{from:`;`,to:``}],Fce=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Ice(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function e6(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||Ice(e,r)%2==1?t:n(t))}function Lce(e){return e6(e,Fce,e=>`${e.slice(1,-1)}`)}const t6=RegExp(`([^]+)`,`g`);function n6(e){if(!e.includes(``))return{value:e,spans:[]};let t=[],n=``,r=0;t6.lastIndex=0;let i=t6.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=t6.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function Rce(){return e=>{Hj(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){let{value:n,spans:r}=n6(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]=n6(n).value)}})}}const zce=[{from:`\\`,to:``}],Bce=/\\</g;function Vce(e){return e6(e,Bce,e=>`${e.slice(1)}`)}function Hce(){return e=>{Hj(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(``)){if(e.type===`text`){let t=e.value,n=Array(t.length+1),r=[],i=``;for(let e=0;e<t.length;e+=1)n[e]=i.length,t[e]===``?r.push({offset:i.length,char:t[e+1]??``}):i+=t[e];n[t.length]=i.length;let a=[...(e.data?.escapedChars??[]).map(e=>({...e,offset:n[e.offset]??e.offset})),...r].map(e=>({...e})).sort((e,t)=>e.offset-t.offset||e.char.localeCompare(t.char)).filter((e,t,n)=>t===0||e.offset!==n[t-1]?.offset||e.char!==n[t-1]?.char),o=e.data?.entityRefSpans?.map(e=>{let t=n[e.offset]??e.offset,r=n[e.offset+e.length]??e.offset+e.length;return{...e,offset:t,length:r-t}});e.value=i,e.data??={},e.data.escapedChars=a,o&&(e.data.entityRefSpans=o)}else 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 Uce=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),Wce={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`},r6=`ok-alert`,Gce=RegExp(`(?:^|\\s)${r6}-(\\w+)(?:\\s|$)`),Kce=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function i6(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
485
+ `,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(Kce);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function qce(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(Gce);return n?n[1].toLowerCase():null}function a6(e){let t=e.toLowerCase();return Wce[t]??null}function Jce(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&&Yce(o[0],s)?o.slice(1):o,position:e.position}}function Yce(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 Xce(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${r6}-title`)}function Zce(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=qce(e);if(!i)return;let a=a6(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=i6(n,e.position.start.offset),s&&(o=s.title,a||=a6(s.rawType)));let c=a??`note`,l=s&&Uce.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=i6(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!Xce(e.children[0]))return;let f=Jce(e,c,o,l,d);r.children[t]=f})}}const Qce={markers:`*`,classPrefix:r6,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 o6(e,t,n){return e[t]===`\\`&&t+1<e.length&&e[t+1]===n}function s6(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;){let t=a>0&&n[a-1]===`
486
+ `?ele(e,i,n[a]):null;t!==null&&(i=t),i+=o6(e,i,n[a])?2:1,a+=1}return i}function $ce(e,t,n){return e[t]===n||o6(e,t,n)}function ele(e,t,n){let r=t,i=!1;for(;;){let t=r;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r+=1;if(e[r]===`>`){r+=1,(e[r]===` `||e[r]===` `)&&(r+=1),i=!0;continue}r>t&&(i=!0);break}return i&&$ce(e,r,n)?r:null}function c6(e){return H3(e.data)?new Set(e.data.escapedChars.map(e=>e.offset)):null}function tle(e,t,n){return e.filter(e=>e.offset>=t&&e.offset<n).map(e=>({...e,offset:e.offset-t}))}function nle(e,t,n){return e.filter(e=>e.offset>=t&&e.offset+e.length<=n).map(e=>({...e,offset:e.offset-t}))}function l6(e,t,n,r){let i={type:`text`,value:t.value.slice(n,r)},a=f6(e,t,n,r);a&&(i.position=a);let o;if(H3(t.data)&&(o={escapedChars:tle(t.data.escapedChars,n,r)}),t.data?.entityRefSpans?.length){let e=nle(t.data.entityRefSpans,n,r);e.length>0&&(o={...o,entityRefSpans:e})}return o&&(i.data=o),i}function u6(e,t,n){if(e===null||e.size===0)return!1;for(let r=0;r<n;r++)if(e.has(t+r))return!0;return!1}function d6(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
487
+ `?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function rle(e,t,n){return{start:d6(e,t),end:d6(e,n)}}function f6(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return rle(e,s6(e,i,t.value,n),s6(e,i,t.value,r))}const p6=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,m6=/<!--([\s\S]*?)-->/g;function ile(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;ole(e,n),Hj(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=ale(i,c6(e));if(a.length===0)return;let o=[],s=0;for(let t of a){t.start>s&&o.push(l6(n,e,s,t.start));let r=t.sourceForm===`html`?4:2,a=t.start+r,c=t.sourceForm===`html`?a+i.slice(a,t.end-3).indexOf(t.body):a,l={type:`comment`,children:[l6(n,e,c,c+t.body.length)],data:{sourceForm:t.sourceForm}},u=f6(n,e,t.start,t.end);u&&(l.position=u),o.push(l),s=t.end}return s<i.length&&o.push(l6(n,e,s,i.length)),r.children.splice(t,1,...o),[zj,t+o.length]}),dle(e,n)}}function ale(e,t){let n=[];p6.lastIndex=0;let r;for(;(r=p6.exec(e))!==null;){if(u6(t,r.index,2)||u6(t,r.index+r[0].length-2,2)){p6.lastIndex=r.index+1;continue}r[1].trim().length!==0&&n.push({start:r.index,end:r.index+r[0].length,body:r[1],sourceForm:`percent`})}m6.lastIndex=0;let i;for(;(i=m6.exec(e))!==null;){if(u6(t,i.index,4)||u6(t,i.index+i[0].length-3,3)){m6.lastIndex=i.index+1;continue}let e=i[1].trim();e!==``&&n.push({start:i.index,end:i.index+i[0].length,body:e,sourceForm:`html`})}n.sort((e,t)=>e.start-t.start);let a=[],o=-1;for(let e of n)e.start<o||(a.push(e),o=e.end);return a}function ole(e,t){let n=e.children,r=0;for(;r<n.length;){let e=n[r];if(e.type===`paragraph`){let i=_6(e);if(i!==null){let t=e.children[0],a,o=()=>(a===void 0&&(a=c6(t)),a),s=sle(i);if(s!==null&&!u6(o(),0,2)&&!u6(o(),i.length-2,2)){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:s}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};n.splice(r,1,e),r+=1;continue}let c=cle(i);if(c!==null&&!u6(o(),i.length-i.trimStart().length,4)&&!u6(o(),i.trimEnd().length-3,3)){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:c}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}}let a=lle(e,t);if(a!==null&&!g6(e,4,3)){let e={type:`commentBlock`,children:[a],data:{sourceForm:`html`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}let o=ule(e,t);if(o!==null&&!g6(e,2,2)){let e={type:`commentBlock`,children:[o],data:{sourceForm:`percent`,sourceLayout:`inline`}};n.splice(r,1,e),r+=1;continue}}if(e.type===`paragraph`&&y6(e)){let e=r+1;for(;e<n.length;){let t=n[e];if(t.type===`paragraph`&&y6(t))break;e+=1}if(e<n.length&&e>r+1){let t={type:`commentBlock`,children:n.slice(r+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};n.splice(r,e-r+1,t),r+=1;continue}}r+=1}}function h6(e,t,n){return u6(c6(e),t,n)}function g6(e,t,n){let r=e.children[0],i=e.children[e.children.length-1];if(r.type!==`text`||i.type!==`text`)return!1;let a=r.value.length-r.value.trimStart().length,o=i.value.trimEnd().length-n,s=c6(r);return u6(s,a,t)?!0:u6(i===r?s:c6(i),o,n)}function _6(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function sle(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function cle(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 lle(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if(n.type!==`text`||r.type!==`text`)return null;let i=n.value.trimStart();if(!i.startsWith(`<!--`))return null;let a=r.value.trimEnd();if(!a.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(v6(r,`<!--`)>1||v6(r,`-->`)>0)return null}else if(t===e.children.length-1){if(v6(r,`<!--`)>0||v6(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let o=n.value.length-i.length+4;n.value[o]===` `&&(o+=1);let s=a.length-3;r.value[s-1]===` `&&--s;let c=[];o<n.value.length&&c.push(l6(t,n,o,n.value.length));for(let t=1;t<e.children.length-1;t++)c.push(e.children[t]);return s>0&&c.push(l6(t,r,0,s)),c.length===0?null:{type:`paragraph`,children:c}}function ule(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if(n.type!==`text`||r.type!==`text`)return null;let i=n.value.trimStart();if(!i.startsWith(`%%`)||i.startsWith(`%%%`))return null;let a=r.value.trimEnd();if(!a.endsWith(`%%`)||a.endsWith(`%%%`))return null;let o=n.value.length-i.length+2;n.value[o]===` `&&(o+=1);let s=a.length-2;r.value[s-1]===` `&&--s;let c=n.value.slice(o),l=r.value.slice(0,s);if(c.indexOf(`%%`)!==-1||l.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)||c.trim().length>0||l.trim().length>0))return null;let u=[];c.length>0&&u.push(l6(t,n,o,n.value.length));for(let t=1;t<e.children.length-1;t++)u.push(e.children[t]);return l.length>0&&u.push(l6(t,r,0,s)),u.length===0?null:{type:`paragraph`,children:u}}function v6(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 y6(e){let t=_6(e);return t===null||t.trim()!==`%%`?!1:!h6(e.children[0],t.indexOf(`%%`),2)}function dle(e,t){(t.indexOf(`%%`)!==-1||t.indexOf(`<!--`)!==-1)&&Hj(e,e=>{if(!fle.has(e.type))return;let n=e.children;if(!(n===void 0||n.length<2)){for(let e of ple)if(mle(n,t,e))return}})}const fle=new Set([`paragraph`,`heading`,`tableCell`]),ple=[{sourceForm:`html`,open:`<!--`,close:`-->`},{sourceForm:`percent`,open:`%%`,close:`%%`}];function b6(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type!==`text`)continue;let a=0;for(;;){let e=i.value.indexOf(t,a);if(e===-1)break;n.push({index:r,offset:e}),a=e+t.length}}return n}function mle(e,t,n){let r,i;if(n.sourceForm===`percent`){let t=b6(e,`%%`);if(t.length!==2)return!1;[r,i]=t}else{let t=b6(e,`<!--`),n=b6(e,`-->`);if(t.length!==1||n.length!==1)return!1;r=t[0],i=n[0]}if(r.index>=i.index)return!1;let a=e[r.index],o=e[i.index];if(n.sourceForm===`percent`&&(a.value[r.offset-1]===`%`||a.value[r.offset+2]===`%`||o.value[i.offset-1]===`%`||o.value[i.offset+2]===`%`)||gle(e,n,r,i)||h6(a,r.offset,n.open.length)||h6(o,i.offset,n.close.length))return!1;for(let t=r.index+1;t<i.index;t++)if(S6(e[t]))return!1;if(r.offset===0&&S6(e[r.index-1])||i.offset+n.close.length===o.value.length&&S6(e[i.index+1]))return!1;let s=hle(e,n,r,i,t);if(s===null)return!1;let c=[];a.value.slice(0,r.offset).length>0&&c.push(l6(t,a,0,r.offset));let l={type:`comment`,children:s,data:{sourceForm:n.sourceForm}},u=f6(t,a,r.offset,a.value.length),d=f6(t,o,0,i.offset+n.close.length);u&&d&&(l.position={start:u.start,end:d.end}),c.push(l);let f=i.offset+n.close.length;return o.value.slice(f).length>0&&c.push(l6(t,o,f,o.value.length)),e.splice(r.index,i.index-r.index+1,...c),!0}function hle(e,t,n,r,i){let a=e[n.index],o=e[r.index],s=n.offset+t.open.length,c=a.value.length,l=r.offset;if(t.sourceForm===`html`){for(;s<c&&/\s/.test(a.value[s]);)s+=1;for(;l>0&&/\s/.test(o.value[l-1]);)--l}let u=[];s<c&&u.push(l6(i,a,s,c));for(let t=n.index+1;t<r.index;t++)u.push(e[t]);return 0<l&&u.push(l6(i,o,0,l)),u.length===0||!u.some(e=>e.type!==`text`||e.value.trim().length>0)||!u.some(e=>e.type===`text`)?null:u}function gle(e,t,n,r){let i=e[n.index],a=e[r.index];if(i.value.indexOf(`
486
488
  `,n.offset+t.open.length)!==-1||a.value.lastIndexOf(`
487
489
  `,r.offset)!==-1)return!0;for(let t=n.index+1;t<r.index;t++)if(x6(e[t]))return!0;return!1}function x6(e){let t=e;return t?.type===`break`?!0:t?.type===`text`?(t.value??``).indexOf(`
488
- `)!==-1:Array.isArray(t?.children)&&t.children.some(x6)}function S6(e){if(e==null)return!1;if(e.type===`comment`)return!0;let t=e.children;return Array.isArray(t)&&t.some(S6)}const gle=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,_le=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function vle(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
489
- `;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return _le.test(i)}return!1}function C6(e){if(!e.includes(`</`))return e;let t=M3(e),n=!1,r=e.replace(gle,(r,i,a,o,s)=>N3(s,t)||!vle(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}const yle=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,ble=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,xle=/^\s*<\/details>\s*$/;function w6(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 T6(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 E6(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function D6(e){return e.children[0].value??``}function Sle(e){if(!E6(e))return null;let t=D6(e).match(yle);if(!t)return null;let{defaultOpen:n,name:r,id:i}=w6(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:T6({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function Cle(e,t){let n=e[t];if(!E6(n))return null;let r=D6(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(ble);if(!i)return null;let{defaultOpen:a,name:o,id:s}=w6(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!E6(t))continue;let r=D6(t);if(xle.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function wle(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(E6(e)){let r=Sle(e);if(r){t[n]=r,n++;continue}let i=Cle(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:T6(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 Tle(){return e=>{Hj(e,e=>{`children`in e&&Array.isArray(e.children)&&wle(e)})}}const Ele=/^<(div|center)(\s[^>]*?)?\s*>$/i,Dle=new Set([`center`,`left`,`right`,`justify`]);function Ole(e){if(!e)return null;let t=e.match(/\balign\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+))/i);if(!t)return null;let n=(t[1]??t[2]??t[3]??``).toLowerCase();return Dle.has(n)?n:null}function O6(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function k6(e){return e.children[0].value??``}function kle(e){if(!O6(e))return null;let t=k6(e).trim().match(Ele);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??``;return{tag:n,align:Ole(r)??(n===`center`?`center`:null),sourceAttrs:r}}function Ale(e,t,n){let r=new RegExp(String.raw`^\s*</${n}>\s*$`,`i`);for(let i=t+1;i<e.length;i++){let t=e[i];if(!O6(t))continue;let a=k6(t);if(r.test(a))return i;let o=a.trimStart().toLowerCase();if(o.startsWith(`<div`)||o.startsWith(`<center`)||o.includes(`</${n}>`))return null}return null}function jle(e){let t=e.children,n=0;for(;n<t.length;){let e=kle(t[n]);if(e!==null){let r=Ale(t,n,e.tag);if(r!==null){let i=t[n],a=t[r],o=t.slice(n+1,r),s=i.position,c=a.position,l={type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[...e.align===null?[]:[{type:`mdxJsxAttribute`,name:`align`,value:e.align}],{type:`mdxJsxAttribute`,name:`tag`,value:e.tag},{type:`mdxJsxAttribute`,name:`sourceAttrs`,value:e.sourceAttrs}],children:o,position:s&&c?{start:s.start,end:c.end}:void 0};t.splice(n,r-n+1,l),n++;continue}}n++}}function Mle(){return e=>{Hj(e,e=>{`children`in e&&Array.isArray(e.children)&&jle(e)})}}const A6=`&#x20;`;function j6(e){return e.type===`listItem`&&typeof e.checked==`boolean`}function Nle(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];return n?.type===`paragraph`&&(n.children?.length??0)===0}function Ple(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];if(n?.type!==`paragraph`||(n.children?.length??0)!==1)return!1;let r=n.children[0];if(r?.type!==`text`||r.value!==A6)return!1;let i=r.data?.entityRefSpans;if(!Array.isArray(i)||i.length!==1)return!1;let a=i[0];return a?.offset===0&&a.length===6&&a.raw===A6}function Fle(e){Hj(e,`listItem`,e=>{if(!j6(e)||!Nle(e))return;let t=e.children[0];t.children=[{type:`text`,value:` `,data:{sourceRaw:A6}}]})}function Ile(e){Hj(e,`listItem`,e=>{!j6(e)||!Ple(e)||(e.children[0].children=[])})}function Lle(){return e=>{Ile(e)}}const M6=57856,N6=63743,P6=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function Rle(e){return P6.lastIndex=0,e.replace(P6,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return lP(t.slice(e?2:1),e?16:10)}let n=cP(t);return n===!1?e:n})}function zle(e){let t=new Set,n=0;for(let r of e){let e=0;for(let i of r){let r=i.codePointAt(0);r!==void 0&&(r>=M6&&r<=N6&&t.add(r),r===M6?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}function Ble(e){let{occupied:t,longestStartRun:n}=zle([e,Rle(e)]);for(let e=M6;e<=N6;e+=1)if(!t.has(e))return String.fromCharCode(e);return``.repeat(n+1)+``}function Vle(e){return{exit:{characterEscapeValue(t){let n=this.stack.pop();n.value+=e+this.sliceSerialize(t),n.position&&(n.position.end={line:t.end.line,column:t.end.column,offset:t.end.offset})}},transforms:[t=>(Hj(t,t=>{if(t.type===`text`){let n=[],r=``,i=0;for(;;){let a=t.value.indexOf(e,i);if(a===-1)break;r+=t.value.slice(i,a);let o=t.value.slice(a+e.length,a+e.length+1);n.push({offset:r.length,char:o}),i=a+e.length}r+=t.value.slice(i),t.value=r,t.data??={},t.data.escapedChars=n;return}let n=t;for(let[t,r]of Object.entries(n))typeof r==`string`&&(n[t]=r.replaceAll(e,``))}),t)]}}function Hle(e,t){let n;return(r,i)=>{let a=t.data();a.fromMarkdownExtensions??=[];let o=a.fromMarkdownExtensions,s=Vle(Ble(r)),c=n,l=c?o.lastIndexOf(c):-1;l>=0?o.splice(l,1,s):o.push(s),n=s;try{return e(r,i)}finally{let e=o.lastIndexOf(s);e>=0&&(c&&l>=0?o.splice(e,1,c):o.splice(e,1)),n=c}}}const Ule=function(){let e=this;e.parser=Hle(e.parser,e)},F6=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function Wle(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function I6(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?I6(e.children[0]):null}function L6(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 L6(t[t.length-1])}return null}function Gle(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(t!==void 0)return t;let n=c6(e);return r.set(e,n),n},a=0;for(;a<n.length;){let e=n[a];if(e.type!==`text`){a++;continue}let r=e.value,o=-1;for(let t=0;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||t>0&&r.charCodeAt(t-1)===61||u6(i(e),t,2))continue;let s;if(t+2<r.length)s=r.charAt(t+2);else{let e=n[a+1];if(!e)continue;s=I6(e)}if(!(s===null||/\s/.test(s))){o=t;break}}if(o===-1){a++;continue}let s=-1,c=-1,l=!1;for(let t=o+3;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||u6(i(e),t,2))continue;let o=r.charAt(t-1);if(/[\s=]/.test(o))continue;let c;if(t+2<r.length)c=r.charAt(t+2);else{let e=n[a+1];c=e?e.type===`text`?e.value[0]??null:I6(e):null}if(c!==`=`){s=-2;break}}if(s===-2){a++;continue}for(let e=a+1;e<n.length;e++){let t=n[e];if(t.type===`text`){for(let r=0;r<=t.value.length-2;r++){if(t.value.charCodeAt(r)!==61||t.value.charCodeAt(r+1)!==61||u6(i(t),r,2))continue;let a;if(r>0)a=t.value.charAt(r-1);else{let t=n[e-1];a=L6(t)}if(a===null||/[\s=]/.test(a))continue;let o;if(r+2<t.value.length)o=t.value.charAt(r+2);else{let t=n[e+1];o=t?t.type===`text`?t.value[0]??null:I6(t):null}if(o!==`=`){s=e,c=r,l=!0;break}}if(s>=0)break}else if(!Wle(t))break}if(s<0){a++;continue}let u=n[s],d=r.slice(0,o),f=r.slice(o+2),p=u.value.slice(0,c),m=u.value.slice(c+2),h=[];f.length>0&&h.push(l6(t,e,o+2,r.length));for(let e=a+1;e<s;e++)h.push(n[e]);if(p.length>0&&h.push(l6(t,u,0,c)),!l){a++;continue}let g={type:`mark`,children:h},_=[];d.length>0&&_.push(l6(t,e,0,o)),_.push(g),m.length>0&&_.push(l6(t,u,c+2,u.value.length)),n.splice(a,s-a+1,..._),a+=+(d.length>0)+1}}function R6(e,t){if(`children`in e&&Array.isArray(e.children)){Gle(e,t);for(let n of e.children)R6(n,t)}}function Kle(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;let a=c6(e);F6.lastIndex=0;let o=[],s;for(;(s=F6.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(u6(a,e,2)||u6(a,t-2,2)){F6.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(l6(n,e,l,r));let a={type:`mark`,children:[l6(n,e,r+2,i-2)]},o=f6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(l6(n,e,l,i.length)),r.children.splice(t,1,...c),[zj,t+c.length]}),R6(e,n),Hj(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 qle(){return e=>{Hj(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(r?.type!==`image`)return;let i=Jle(r,e);n.children[t]=i})}}function Jle(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 z6=/^( {4}|\t)/;function Yle(e){let t=e.split(`
490
- `),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!z6.test(e)))return!1;return n}function Xle(e){return e.split(`
490
+ `)!==-1:Array.isArray(t?.children)&&t.children.some(x6)}function S6(e){if(e==null)return!1;if(e.type===`comment`)return!0;let t=e.children;return Array.isArray(t)&&t.some(S6)}const _le=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,vle=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function yle(e,t){if(t===0)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&e[r-1]!==`
491
+ `;)r--;let i=e.slice(r,n===t-1?n:n+1);if(i.trim().length===0){n=r-2;continue}return vle.test(i)}return!1}function C6(e){if(!e.includes(`</`))return e;let t=M3(e),n=!1,r=e.replace(_le,(r,i,a,o,s)=>N3(s,t)||!yle(e,s)?r:(n=!0,`${a}${o}`));return n?r:e}const ble=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,xle=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,Sle=/^\s*<\/details>\s*$/;function w6(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 T6(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 E6(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function D6(e){return e.children[0].value??``}function Cle(e){if(!E6(e))return null;let t=D6(e).match(ble);if(!t)return null;let{defaultOpen:n,name:r,id:i}=w6(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:T6({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function wle(e,t){let n=e[t];if(!E6(n))return null;let r=D6(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(xle);if(!i)return null;let{defaultOpen:a,name:o,id:s}=w6(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!E6(t))continue;let r=D6(t);if(Sle.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function Tle(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(E6(e)){let r=Cle(e);if(r){t[n]=r,n++;continue}let i=wle(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:T6(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 Ele(){return e=>{Hj(e,e=>{`children`in e&&Array.isArray(e.children)&&Tle(e)})}}const Dle=/^<(div|center)(\s[^>]*?)?\s*>$/i,Ole=new Set([`center`,`left`,`right`,`justify`]);function kle(e){if(!e)return null;let t=e.match(/\balign\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+))/i);if(!t)return null;let n=(t[1]??t[2]??t[3]??``).toLowerCase();return Ole.has(n)?n:null}function O6(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function k6(e){return e.children[0].value??``}function Ale(e){if(!O6(e))return null;let t=k6(e).trim().match(Dle);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??``;return{tag:n,align:kle(r)??(n===`center`?`center`:null),sourceAttrs:r}}function jle(e,t,n){let r=new RegExp(String.raw`^\s*</${n}>\s*$`,`i`);for(let i=t+1;i<e.length;i++){let t=e[i];if(!O6(t))continue;let a=k6(t);if(r.test(a))return i;let o=a.trimStart().toLowerCase();if(o.startsWith(`<div`)||o.startsWith(`<center`)||o.includes(`</${n}>`))return null}return null}function Mle(e){let t=e.children,n=0;for(;n<t.length;){let e=Ale(t[n]);if(e!==null){let r=jle(t,n,e.tag);if(r!==null){let i=t[n],a=t[r],o=t.slice(n+1,r),s=i.position,c=a.position,l={type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[...e.align===null?[]:[{type:`mdxJsxAttribute`,name:`align`,value:e.align}],{type:`mdxJsxAttribute`,name:`tag`,value:e.tag},{type:`mdxJsxAttribute`,name:`sourceAttrs`,value:e.sourceAttrs}],children:o,position:s&&c?{start:s.start,end:c.end}:void 0};t.splice(n,r-n+1,l),n++;continue}}n++}}function Nle(){return e=>{Hj(e,e=>{`children`in e&&Array.isArray(e.children)&&Mle(e)})}}const A6=`&#x20;`;function j6(e){return e.type===`listItem`&&typeof e.checked==`boolean`}function Ple(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];return n?.type===`paragraph`&&(n.children?.length??0)===0}function Fle(e){let t=e.children??[];if(t.length!==1)return!1;let n=t[0];if(n?.type!==`paragraph`||(n.children?.length??0)!==1)return!1;let r=n.children[0];if(r?.type!==`text`||r.value!==A6)return!1;let i=r.data?.entityRefSpans;if(!Array.isArray(i)||i.length!==1)return!1;let a=i[0];return a?.offset===0&&a.length===6&&a.raw===A6}function Ile(e){Hj(e,`listItem`,e=>{if(!j6(e)||!Ple(e))return;let t=e.children[0];t.children=[{type:`text`,value:` `,data:{sourceRaw:A6}}]})}function Lle(e){Hj(e,`listItem`,e=>{!j6(e)||!Fle(e)||(e.children[0].children=[])})}function Rle(){return e=>{Lle(e)}}const M6=57856,N6=63743,P6=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function zle(e){return P6.lastIndex=0,e.replace(P6,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return lP(t.slice(e?2:1),e?16:10)}let n=cP(t);return n===!1?e:n})}function Ble(e){let t=new Set,n=0;for(let r of e){let e=0;for(let i of r){let r=i.codePointAt(0);r!==void 0&&(r>=M6&&r<=N6&&t.add(r),r===M6?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}function Vle(e){let{occupied:t,longestStartRun:n}=Ble([e,zle(e)]);for(let e=M6;e<=N6;e+=1)if(!t.has(e))return String.fromCharCode(e);return``.repeat(n+1)+``}function Hle(e){return{exit:{characterEscapeValue(t){let n=this.stack.pop();n.value+=e+this.sliceSerialize(t),n.position&&(n.position.end={line:t.end.line,column:t.end.column,offset:t.end.offset})}},transforms:[t=>(Hj(t,t=>{if(t.type===`text`){let n=[],r=``,i=0;for(;;){let a=t.value.indexOf(e,i);if(a===-1)break;r+=t.value.slice(i,a);let o=t.value.slice(a+e.length,a+e.length+1);n.push({offset:r.length,char:o}),i=a+e.length}r+=t.value.slice(i),t.value=r,t.data??={},t.data.escapedChars=n;return}let n=t;for(let[t,r]of Object.entries(n))typeof r==`string`&&(n[t]=r.replaceAll(e,``))}),t)]}}function Ule(e,t){let n;return(r,i)=>{let a=t.data();a.fromMarkdownExtensions??=[];let o=a.fromMarkdownExtensions,s=Hle(Vle(r)),c=n,l=c?o.lastIndexOf(c):-1;l>=0?o.splice(l,1,s):o.push(s),n=s;try{return e(r,i)}finally{let e=o.lastIndexOf(s);e>=0&&(c&&l>=0?o.splice(e,1,c):o.splice(e,1)),n=c}}}const Wle=function(){let e=this;e.parser=Ule(e.parser,e)},F6=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function Gle(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function I6(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?I6(e.children[0]):null}function L6(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 L6(t[t.length-1])}return null}function Kle(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(t!==void 0)return t;let n=c6(e);return r.set(e,n),n},a=0;for(;a<n.length;){let e=n[a];if(e.type!==`text`){a++;continue}let r=e.value,o=-1;for(let t=0;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||t>0&&r.charCodeAt(t-1)===61||u6(i(e),t,2))continue;let s;if(t+2<r.length)s=r.charAt(t+2);else{let e=n[a+1];if(!e)continue;s=I6(e)}if(!(s===null||/\s/.test(s))){o=t;break}}if(o===-1){a++;continue}let s=-1,c=-1,l=!1;for(let t=o+3;t<=r.length-2;t++){if(r.charCodeAt(t)!==61||r.charCodeAt(t+1)!==61||u6(i(e),t,2))continue;let o=r.charAt(t-1);if(/[\s=]/.test(o))continue;let c;if(t+2<r.length)c=r.charAt(t+2);else{let e=n[a+1];c=e?e.type===`text`?e.value[0]??null:I6(e):null}if(c!==`=`){s=-2;break}}if(s===-2){a++;continue}for(let e=a+1;e<n.length;e++){let t=n[e];if(t.type===`text`){for(let r=0;r<=t.value.length-2;r++){if(t.value.charCodeAt(r)!==61||t.value.charCodeAt(r+1)!==61||u6(i(t),r,2))continue;let a;if(r>0)a=t.value.charAt(r-1);else{let t=n[e-1];a=L6(t)}if(a===null||/[\s=]/.test(a))continue;let o;if(r+2<t.value.length)o=t.value.charAt(r+2);else{let t=n[e+1];o=t?t.type===`text`?t.value[0]??null:I6(t):null}if(o!==`=`){s=e,c=r,l=!0;break}}if(s>=0)break}else if(!Gle(t))break}if(s<0){a++;continue}let u=n[s],d=r.slice(0,o),f=r.slice(o+2),p=u.value.slice(0,c),m=u.value.slice(c+2),h=[];f.length>0&&h.push(l6(t,e,o+2,r.length));for(let e=a+1;e<s;e++)h.push(n[e]);if(p.length>0&&h.push(l6(t,u,0,c)),!l){a++;continue}let g={type:`mark`,children:h},_=[];d.length>0&&_.push(l6(t,e,0,o)),_.push(g),m.length>0&&_.push(l6(t,u,c+2,u.value.length)),n.splice(a,s-a+1,..._),a+=+(d.length>0)+1}}function R6(e,t){if(`children`in e&&Array.isArray(e.children)){Kle(e,t);for(let n of e.children)R6(n,t)}}function qle(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;let a=c6(e);F6.lastIndex=0;let o=[],s;for(;(s=F6.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(u6(a,e,2)||u6(a,t-2,2)){F6.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(l6(n,e,l,r));let a={type:`mark`,children:[l6(n,e,r+2,i-2)]},o=f6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(l6(n,e,l,i.length)),r.children.splice(t,1,...c),[zj,t+c.length]}),R6(e,n),Hj(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 Jle(){return e=>{Hj(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(r?.type!==`image`)return;let i=Yle(r,e);n.children[t]=i})}}function Yle(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 z6=/^( {4}|\t)/;function Xle(e){let t=e.split(`
492
+ `),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!z6.test(e)))return!1;return n}function Zle(e){return e.split(`
491
493
  `).map(e=>e.length===0?e:e.startsWith(` `)?e.slice(4):e.startsWith(` `)?e.slice(1):e).join(`
492
- `)}function Zle(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]!==`
493
- `;)a--;if(a===r)return null;let o=t.slice(a,r);if(!z6.test(o))return null;let s=t.slice(a,i);if(!Yle(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:Xle(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}const Qle=function(){return(e,t)=>{let n=String(t.value??``);n&&Hj(e,`paragraph`,(e,t,r)=>{if(r?.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=Zle(e,n);a&&(r.children[t]=a)})}},$le=/^\n+$/;function eue(e){return e.length<3||!$le.test(e)?0:e.length-2}function tue(e,t){let n=[],r=e.children;for(let e=1;e<r.length;e++){let i=r[e-1],a=r[e],o=i?.position?.end?.offset,s=i?.position?.end?.line,c=a?.position?.start?.offset;if(typeof o!=`number`||typeof c!=`number`||typeof s!=`number`||c<o)continue;let l=eue(t.slice(o,c));if(l===0)continue;let u=[],d=[];for(let e=0;e<l;e++)u.push(s+2+e),d.push(o+2+e);n.push({beforeChildIndex:e,lines:u,offsets:d})}return n}function B6(e,t){let n=tue(e,t);if(n.length===0)return;let r=[],i=0;for(let t=0;t<e.children.length;t++){let a=n[i];if(a&&a.beforeChildIndex===t){for(let e=0;e<a.lines.length;e++)r.push(nue(a.lines[e],a.offsets[e]));i+=1}r.push(e.children[t])}e.children=r}function nue(e,t){let n={line:e,column:1,offset:t};return{type:`paragraph`,children:[],position:{start:n,end:{...n}}}}function V6(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}function H6(e){let t=e.identifier??e.label;if(typeof t!=`string`)return null;let n=V6(t);return n.length>0?n:null}function rue(e){let t=new Map;return Hj(e,`definition`,e=>{let n=H6(e);n&&!t.has(n)&&t.set(n,e)}),t}function iue(){return e=>{let t=rue(e);t.size!==0&&Hj(e,`linkReference`,e=>{let n=H6(e);if(!n)return;let r=t.get(n);r&&(e.data={...e.data,resolvedUrl:r.url,resolvedTitle:r.title??null})})}}function U6(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function aue(){return e=>{Hj(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=U6(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),Hj(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=U6(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}const W6=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function oue(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=c6(i);W6.lastIndex=0;let o=[],s=0;for(;;){let n=W6.exec(e);if(n===null)break;let c=n[0],l=n[1],u=n.index;if(u6(a,u,1))continue;u>s&&o.push(l6(t,i,s,u));let d={type:`link`,url:l,title:null,children:[l6(t,i,u+1,u+1+l.length)],data:{sourceStyle:`autolink`}},f=f6(t,i,u,u+c.length);f&&(d.position=f),o.push(d),s=u+c.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(l6(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}const sue=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function G6(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 cue(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(!H3(e.data)&&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&&sue.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]!==`
494
+ `)}function Qle(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]!==`
495
+ `;)a--;if(a===r)return null;let o=t.slice(a,r);if(!z6.test(o))return null;let s=t.slice(a,i);if(!Xle(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:Zle(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}const $le=function(){return(e,t)=>{let n=String(t.value??``);n&&Hj(e,`paragraph`,(e,t,r)=>{if(r?.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=Qle(e,n);a&&(r.children[t]=a)})}},eue=/^\n+$/;function tue(e){return e.length<3||!eue.test(e)?0:e.length-2}function nue(e,t){let n=[],r=e.children;for(let e=1;e<r.length;e++){let i=r[e-1],a=r[e],o=i?.position?.end?.offset,s=i?.position?.end?.line,c=a?.position?.start?.offset;if(typeof o!=`number`||typeof c!=`number`||typeof s!=`number`||c<o)continue;let l=tue(t.slice(o,c));if(l===0)continue;let u=[],d=[];for(let e=0;e<l;e++)u.push(s+2+e),d.push(o+2+e);n.push({beforeChildIndex:e,lines:u,offsets:d})}return n}function B6(e,t){let n=nue(e,t);if(n.length===0)return;let r=[],i=0;for(let t=0;t<e.children.length;t++){let a=n[i];if(a&&a.beforeChildIndex===t){for(let e=0;e<a.lines.length;e++)r.push(rue(a.lines[e],a.offsets[e]));i+=1}r.push(e.children[t])}e.children=r}function rue(e,t){let n={line:e,column:1,offset:t};return{type:`paragraph`,children:[],position:{start:n,end:{...n}}}}function V6(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}function H6(e){let t=e.identifier??e.label;if(typeof t!=`string`)return null;let n=V6(t);return n.length>0?n:null}function iue(e){let t=new Map;return Hj(e,`definition`,e=>{let n=H6(e);n&&!t.has(n)&&t.set(n,e)}),t}function aue(){return e=>{let t=iue(e);t.size!==0&&Hj(e,`linkReference`,e=>{let n=H6(e);if(!n)return;let r=t.get(n);r&&(e.data={...e.data,resolvedUrl:r.url,resolvedTitle:r.title??null})})}}function U6(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function oue(){return e=>{Hj(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=U6(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),Hj(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=U6(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}const W6=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function sue(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=c6(i);W6.lastIndex=0;let o=[],s=0;for(;;){let n=W6.exec(e);if(n===null)break;let c=n[0],l=n[1],u=n.index;if(u6(a,u,1))continue;u>s&&o.push(l6(t,i,s,u));let d={type:`link`,url:l,title:null,children:[l6(t,i,u+1,u+1+l.length)],data:{sourceStyle:`autolink`}},f=f6(t,i,u,u+c.length);f&&(d.position=f),o.push(d),s=u+c.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(l6(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}const cue=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function G6(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 lue(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(!H3(e.data)&&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&&cue.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]!==`
494
496
  `;)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]!==`
495
497
  `;)n--;let r=!1;for(let e=n;e<a;e++)if(t[e]===`>`){r=!0;break}let i=t.slice(a,o).split(`
496
498
  `),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]!==`
@@ -504,11 +506,11 @@ $2`).split(`
504
506
  `).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(`
505
507
  `);a!==-1&&(i=i.slice(0,a));let o=G6(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]===`
506
508
  `);)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(`
507
- `)?`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`}}function K6(){return RegExp(`(^|\\s)#([a-zA-Z][\\w/-]*)`,`g`)}const q6=K6();function lue(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=c6(i);q6.lastIndex=0;let o=[],s=0;for(;;){let n=q6.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(u6(a,u,1))continue;u>s&&o.push(l6(t,i,s,u));let d={type:`tag`,value:l},f=f6(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(l6(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}const uue=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.underline.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function J6(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(`
509
+ `)?`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`}}function K6(){return RegExp(`(^|\\s)#([a-zA-Z][\\w/-]*)`,`g`)}const q6=K6();function uue(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=c6(i);q6.lastIndex=0;let o=[],s=0;for(;;){let n=q6.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(u6(a,u,1))continue;u>s&&o.push(l6(t,i,s,u));let d={type:`tag`,value:l},f=f6(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(l6(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}const due=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.underline.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function J6(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(`
508
510
  `,i);if(e===-1)return null;i=e+1}let a=t.indexOf(`
509
- `,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function due(e,t){if(!e)return null;let n=J6(e.start,t),r=J6(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function fue(e,t){let n=due(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function pue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`;Hj(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!uue.has(e.type)){let r=fue(e,n);return i.children[t]=r,zj}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(oue(t,n),lue(t,n))}if(cue(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 mue(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function hue(){return e=>{Hj(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=mue(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function Y6(){let e=!1,t=``,n=0;return r=>{let i=gue(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 gue(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}function X6(e,t,n){for(let r=t;r<n;r++)e[r]=` `}function _ue(e,t){if(e[t]!==`<`)return null;let n=e.slice(t).toLowerCase();for(let r of[`pre`,`code`]){if(!n.startsWith(`<${r}`))continue;let i=e[t+r.length+1];if(i===`>`||i===`/`||i===` `||i===` `)return r}return null}function vue(e,t){let n=null;for(let r=t;r<e.length;r++){let t=e[r];if(n!==null)t===n&&(n=null);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r+1}return null}function Z6(e,t,n){let r=RegExp(`</${n}\\s*>`,`i`).exec(e.slice(t));return r?.index===void 0?null:t+r.index+r[0].length}function Q6(e,t){let n=0;for(;e[t+n]==="`";)n+=1;if(n===0)return null;let r=t+n,i=r;for(;i<e.length;){if(e[i]!=="`"){i+=1;continue}let t=0;for(;e[i+t]==="`";)t+=1;if(t===n)return i+n;i+=t}return r}function $6(e){let t=Y6(),n=!1,r=null;return e.map(({text:e,start:i})=>{if(r===null&&!n&&t(e))return{text:` `.repeat(e.length),start:i};let a=e.split(``),o=0;for(;o<e.length;){if(n){let t=e.indexOf(`-->`,o),r=t<0?e.length:t+3;if(X6(a,o,r),o=r,t<0)break;n=!1;continue}if(r!==null){let t=Z6(e,o,r);if(X6(a,o,t??e.length),t===null)break;o=t,r=null;continue}let t=e.indexOf(`<!--`,o),i=-1,s=null;for(let t=o;t<e.length;t++){let n=_ue(e,t);if(n!==null){i=t,s=n;break}}let c=e.indexOf("`",o),l=t<0?i:i<0?t:Math.min(t,i);if(c>=0&&(l<0||c<l)){o=Q6(e,c)??c+1;continue}if(t<0&&i<0)break;if(t>=0&&(i<0||t<i)){let r=e.indexOf(`-->`,t+4),i=r<0?e.length:r+3;if(X6(a,t,i),o=i,n=r<0,n)break;continue}let u=vue(e,i);if(u===null||s===null)break;let d=Z6(e,u,s),f=d??e.length;if(X6(a,i,f),o=f,r=d===null?s:null,r!==null)break}return{text:a.join(``),start:i}})}function yue(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e[r];i===`
511
+ `,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function fue(e,t){if(!e)return null;let n=J6(e.start,t),r=J6(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function pue(e,t){let n=fue(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function mue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`;Hj(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!due.has(e.type)){let r=pue(e,n);return i.children[t]=r,zj}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(sue(t,n),uue(t,n))}if(lue(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 hue(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function gue(){return e=>{Hj(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=hue(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function Y6(){let e=!1,t=``,n=0;return r=>{let i=_ue(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 _ue(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}function X6(e,t,n){for(let r=t;r<n;r++)e[r]=` `}function vue(e,t){if(e[t]!==`<`)return null;let n=e.slice(t).toLowerCase();for(let r of[`pre`,`code`]){if(!n.startsWith(`<${r}`))continue;let i=e[t+r.length+1];if(i===`>`||i===`/`||i===` `||i===` `)return r}return null}function yue(e,t){let n=null;for(let r=t;r<e.length;r++){let t=e[r];if(n!==null)t===n&&(n=null);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r+1}return null}function Z6(e,t,n){let r=RegExp(`</${n}\\s*>`,`i`).exec(e.slice(t));return r?.index===void 0?null:t+r.index+r[0].length}function Q6(e,t){let n=0;for(;e[t+n]==="`";)n+=1;if(n===0)return null;let r=t+n,i=r;for(;i<e.length;){if(e[i]!=="`"){i+=1;continue}let t=0;for(;e[i+t]==="`";)t+=1;if(t===n)return i+n;i+=t}return r}function $6(e){let t=Y6(),n=!1,r=null;return e.map(({text:e,start:i})=>{if(r===null&&!n&&t(e))return{text:` `.repeat(e.length),start:i};let a=e.split(``),o=0;for(;o<e.length;){if(n){let t=e.indexOf(`-->`,o),r=t<0?e.length:t+3;if(X6(a,o,r),o=r,t<0)break;n=!1;continue}if(r!==null){let t=Z6(e,o,r);if(X6(a,o,t??e.length),t===null)break;o=t,r=null;continue}let t=e.indexOf(`<!--`,o),i=-1,s=null;for(let t=o;t<e.length;t++){let n=vue(e,t);if(n!==null){i=t,s=n;break}}let c=e.indexOf("`",o),l=t<0?i:i<0?t:Math.min(t,i);if(c>=0&&(l<0||c<l)){o=Q6(e,c)??c+1;continue}if(t<0&&i<0)break;if(t>=0&&(i<0||t<i)){let r=e.indexOf(`-->`,t+4),i=r<0?e.length:r+3;if(X6(a,t,i),o=i,n=r<0,n)break;continue}let u=yue(e,i);if(u===null||s===null)break;let d=Z6(e,u,s),f=d??e.length;if(X6(a,i,f),o=f,r=d===null?s:null,r!==null)break}return{text:a.join(``),start:i}})}function bue(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e[r];i===`
510
512
  `?(t.push({text:e.slice(n,r),start:n}),n=r+1):i===`\r`&&(t.push({text:e.slice(n,r),start:n}),e[r+1]===`
511
- `&&(r+=1),n=r+1)}t.push({text:e.slice(n),start:n});let r=$6(t),i=e.split(``);for(let e of r)for(let t=0;t<e.text.length;t++)i[e.start+t]=e.text[t];return i.join(``)}function bue(e,t,n,r){return r<=n||e.slice(n,r).trim().length===0?!1:t.slice(n,r).trim().length===0}function xue(e){return e.type===`link`||e.type===`linkReference`}function Sue(e,t,n,r){let i=n.position?.start.offset,a=n.position?.end.offset;if(i===void 0||a===void 0)return;let o=r.slice(i,a),s={type:`text`,value:o,data:{sourceRaw:o},position:n.position};e.children.splice(t,1,s)}function Cue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value??``);if(n.length===0||!n.includes(`<!--`)&&!/<(pre|code)[\s/>]/i.test(n))return;let r=yue(n),i=e=>{for(let t=e.children.length-1;t>=0;t--){let a=e.children[t];if(!a||(`children`in a&&Array.isArray(a.children)&&i(a),!xue(a)))continue;let o=a.position?.start.offset,s=a.position?.end.offset;o!==void 0&&s!==void 0&&bue(n,r,o,s)&&Sue(e,t,a,n)}};i(e)}}const e8=aV(),t8=CB(),n8=wB();function r8(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===e8)||t.push(e8);let n=e.fromMarkdownExtensions;n.some(e=>e===t8)||n.push(t8);let r=e.toMarkdownExtensions;r.some(e=>e===n8)||r.push(n8)}const wue=Object.assign(zue,{peek:()=>`$`}),Tue=Object.assign(Bue,{peek:()=>`~`}),Eue=(()=>{for(let e of n8.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).`)})(),Due=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function Oue(e){let t=e;return t.type===`rawMdxFallback`?{type:`mdxJsxFlowElement`,name:null,attributes:[],children:[],data:{sourceRaw:t.value??``}}:e}const kue={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&c4(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;let i=V3(e.data);if(i.kind===`malformed`&&typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`&&console.warn(`[escape-provenance] malformed escapedChars metadata: CommonMark-safe serialization applies`),i.kind===`valid`&&i.data.escapedChars.length>0){let t=e.value??``,a=i.data.escapedChars,o=``,s=0,c,l=(e,t)=>{if(!e)return;let i=c===`<`?e.indexOf(`>`):-1;i>=0&&(o+=c8(n,e.slice(0,i+1),{...r,before:r.before+o,after:e.slice(i+1,i+2)||t},!0),e=e.slice(i+1)),e&&(o+=c8(n,e,{...r,before:r.before+o,after:t}))};for(let{offset:e,char:n}of a)e>s&&l(t.slice(s,e),`\\`),o+=`\\${n}`,s=e+1,c=n;return s<t.length&&l(t.slice(s),r.after),o}return c8(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+=d8(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+=d8(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}>`:s8(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(o8(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(s8(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`?`
513
+ `&&(r+=1),n=r+1)}t.push({text:e.slice(n),start:n});let r=$6(t),i=e.split(``);for(let e of r)for(let t=0;t<e.text.length;t++)i[e.start+t]=e.text[t];return i.join(``)}function xue(e,t,n,r){return r<=n||e.slice(n,r).trim().length===0?!1:t.slice(n,r).trim().length===0}function Sue(e){return e.type===`link`||e.type===`linkReference`}function Cue(e,t,n,r){let i=n.position?.start.offset,a=n.position?.end.offset;if(i===void 0||a===void 0)return;let o=r.slice(i,a),s={type:`text`,value:o,data:{sourceRaw:o},position:n.position};e.children.splice(t,1,s)}function wue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value??``);if(n.length===0||!n.includes(`<!--`)&&!/<(pre|code)[\s/>]/i.test(n))return;let r=bue(n),i=e=>{for(let t=e.children.length-1;t>=0;t--){let a=e.children[t];if(!a||(`children`in a&&Array.isArray(a.children)&&i(a),!Sue(a)))continue;let o=a.position?.start.offset,s=a.position?.end.offset;o!==void 0&&s!==void 0&&xue(n,r,o,s)&&Cue(e,t,a,n)}};i(e)}}const e8=aV(),t8=CB(),n8=wB();function r8(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===e8)||t.push(e8);let n=e.fromMarkdownExtensions;n.some(e=>e===t8)||n.push(t8);let r=e.toMarkdownExtensions;r.some(e=>e===n8)||r.push(n8)}const Tue=Object.assign(Bue,{peek:()=>`$`}),Eue=Object.assign(Vue,{peek:()=>`~`}),Due=(()=>{for(let e of n8.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).`)})(),Oue=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function kue(e){let t=e;return t.type===`rawMdxFallback`?{type:`mdxJsxFlowElement`,name:null,attributes:[],children:[],data:{sourceRaw:t.value??``}}:e}const Aue={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&c4(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;let i=V3(e.data);if(i.kind===`malformed`&&typeof process<`u`&&process.env?.OK_DEBUG_POSITION_SLICE===`1`&&console.warn(`[escape-provenance] malformed escapedChars metadata: CommonMark-safe serialization applies`),i.kind===`valid`&&i.data.escapedChars.length>0){let t=e.value??``,a=i.data.escapedChars,o=``,s=0,c,l=(e,t)=>{if(!e)return;let i=c===`<`?e.indexOf(`>`):-1;i>=0&&(o+=c8(n,e.slice(0,i+1),{...r,before:r.before+o,after:e.slice(i+1,i+2)||t},!0),e=e.slice(i+1)),e&&(o+=c8(n,e,{...r,before:r.before+o,after:t}))};for(let{offset:e,char:n}of a)e>s&&l(t.slice(s,e),`\\`),o+=`\\${n}`,s=e+1,c=n;return s<t.length&&l(t.slice(s),r.after),o}return c8(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+=d8(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+=d8(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}>`:s8(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(o8(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(s8(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`?`
512
514
  `:` `;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(s8(d)),e()}if(e.title){let t=i===`multiline`?`
513
515
  `:` `;l+=s.move(o8(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`?`\\
514
516
  `:`
@@ -519,7 +521,7 @@ $2`).split(`
519
521
  `).map(e=>e.length>0?`${c}${e}`:e).join(`
520
522
  `):e}let m=`${u}${f}${d}${p}\n${n}\n${r.repeat(o)}`;return c?m.split(`
521
523
  `).map(e=>e.length>0?`${c}${e}`:e).join(`
522
- `):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`)?E4(l):l},inlineMath:wue,delete:Tue,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:`
524
+ `):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`)?E4(l):l},inlineMath:Tue,delete:Eue,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:`
523
525
  `,after:`
524
526
  `}),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:`
525
527
  `});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(`
@@ -533,14 +535,14 @@ $2`).split(`
533
535
 
534
536
  `:`
535
537
  `;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(`
536
- `)},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=i8(i.attributes??[]);if(!i.children||i.children.length===0)return s?c?`<${s} ${c} />`:`<${s} />`:``;let l={...i,attributes:(i.attributes??[]).map(Aue),children:(i.children??[]).map(Oue)};return Eue(l,t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=d8(n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),r,`==`),o+=i.move(`==`),a(),o},underline(e,t,n,r){let i=e.data?.sourceForm===`ins`?`<ins>`:`<u>`,a=e.data?.sourceForm===`ins`?`</ins>`:`</u>`,o=n.createTracker(r),s=n.enter(`underline`),c=o.move(i);return c+=n.containerPhrasing(e,{before:c,after:a,...o.current()}),c+=o.move(a),s(),c},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=i8(e.attributes??[]),i=(e.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return i?r?`<${n} ${r}>${i}</${n}>`:`<${n}>${i}</${n}>`: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&&!Due.test(e)?e:i===`none`||i===0?`>${e}`:typeof i==`number`&&i>=2&&!e.startsWith(` `)?`>${` `.repeat(i)}${e}`:`> ${e}`})}};function i8(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}={${a8(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function a8(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Aue(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:a8(e.value)}}:e}function o8(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function s8(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 jue(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>Mue(t)?e:`\\${e}`)}function Mue(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 Nue=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Pue(e){return e.replace(Nue,e=>L1(e)?``+e.slice(1):e)}function Fue(e){return/[\r\n][\t ]*$/.test(e)}function c8(e,t,n,r=!1){let{matched:i}=X3(t,{escapeAware:!1});if(i.length===0)return l8(e,t,n,r);let a=``,o=0,s=i=>{i>o&&(a+=l8(e,t.slice(o,i),{...n,before:n.before+a,after:t.slice(i,i+1)||n.after},r)),o=i};for(let e of i)s(e.start),!Fue(n.before+a)&&(a+=t.slice(e.start,e.end),o=e.end);return s(t.length),a}function l8(e,t,n,r=!1){let i=e.unsafe;e.unsafe=i.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]`||r&&e.character===`:`&&e.before===`[ps]`&&e.after===`\\/`||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
537
- ]|$)`};return delete t._compiled,t});let a;try{a=e.safe(Pue(t),n)}finally{e.unsafe=i}return a=a.replaceAll(``,`\\&`),jue(Rue(a,n))}function u8(e){if(Number.isNaN(e))return`ws`;let t=xN(e);return t===1?`ws`:t===2?`punct`:`other`}function Iue(e,t,n){let r=u8(t),i=u8(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 Lue(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
538
- `||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function Rue(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)&&Lue(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+=Iue(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function d8(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);f8(i.charCodeAt(i.length-1),s,r)&&(o=p8(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return f8(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+p8(c)),o}function f8(e,t,n){return!(xN(t)!==1||n===`_`&&xN(e)===void 0)}function p8(e){return`&#x${e.toString(16).toUpperCase()};`}function zue(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!Vue(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 Bue(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=d8(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function Vue(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(`\\`))}const m8=[{mode:`protecting`,protect:Bce,reservations:Rce},{mode:`protecting`,protect:jce,reservations:hce},{mode:`protecting`,protect:Ice,reservations:Nce},{mode:`serializer-only`,reservations:[{to:``}]}],Hue=new Set(m8.flatMap(({reservations:e})=>e.map(({to:e})=>e)));function Uue(e,t){switch(t.mode){case`protecting`:return t.protect(e);case`serializer-only`:return e}}function h8(e){return m8.reduce(Uue,e)}function Wue(e){return Hue.has(e)}function g8(e){return e.data?.sourceRaw}function Gue(e){return e.type===`text`?e.value===``:e.type===`mdxJsxTextElement`&&g8(e)===``}function _8(e){return e.type===`paragraph`&&(e.children??[]).every(Gue)}function v8(e){let t=e.children??[],n=t[0]?.children?.length??0,r=0;for(let e=1;e<t.length;e++)r=Math.max(r,t[e]?.children?.length??0);let i=e.align??[];return Math.max(n,r,i.length)}function Kue(e){switch(e.type){case`table`:return v8(e)===0;case`code`:return e.data?.sourceStyle===`indented`&&/^\n*$/.test(e.value??``);case`thematicBreak`:return g8(e)===``;case`html`:return(e.value??``)===``;case`mdxJsxFlowElement`:return g8(e)===void 0&&e.data?.htmlBoundary===void 0&&(e.children??[]).length===0&&!e.name;case`list`:return(e.children??[]).length===0;default:return!1}}function que(e){let t=[];for(let n of e.children){if(n.type===`table`&&v8(n)===0){console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:(n.children??[]).length}));continue}Kue(n)||(n.type===`paragraph`&&n.children.length>0&&_8(n)&&(n.children=[]),t.push(n))}e.children=t}function Jue(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}const Yue=(e,t)=>{if(_8(e)||Jue(e,t))return 0;let n=e.position,r=t.position;if(!n||!r)return;let i=r.start.line-n.end.line-1;return i>=1?i:void 0},y8=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function Xue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;let a=c6(e);y8.lastIndex=0;let o=[],s;for(;(s=y8.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(u6(a,e,1)||u6(a,t-1,1)){y8.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(l6(n,e,l,r));let a={type:`inlineMath`,value:t[1]},o=f6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(l6(n,e,l,i.length)),r.children.splice(t,1,...c),[zj,t+c.length]})}}const Zue=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]);function Que(e){if(e?.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function $ue(e){e.data??={},e.data.sourceRaw=`<br />`,e.data.sourceStyle=`html`}function b8(e){if(e?.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}const x8=/[ \t]+$/,S8=/^[ \t]*$/;function ede(e){return e.some(e=>!(b8(e)&&S8.test(e.value)))}function C8(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if(Que(n)){$ue(n);break}if(n&&Zue.has(n.type)&&`children`in n){let t=n.children;if(C8(t,!0),t.length===0){e.pop();continue}}if(!t&&b8(n)&&x8.test(n.value)){let t=n.value.replace(x8,``);if(t.length>0){n.value=t;continue}if(ede(e.slice(0,-1))){e.pop();continue}if(e.every(e=>b8(e)&&S8.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}const tde=new Set([`paragraph`,`heading`,`tableCell`]);function nde(e){let t=e=>{if(tde.has(e.type)&&`children`in e&&C8(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}const w8={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function rde(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===w8)||e.toMarkdownExtensions.push(w8)}const ide=new Set([`u`,`ins`]);function ade(){return e=>{Hj(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name===null||!ide.has(e.name)||(e.attributes??[]).length>0)return;let r={type:`underline`,children:e.children??[],data:{sourceForm:e.name===`ins`?`ins`:`u`}};return e.position&&(r.position=e.position),n.children.splice(t,1,r),t+1})}}const T8=/(?<!\uE102)<br[ \t]*\/?>/g,ode=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function sde(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;T8.lastIndex=0;let a=[],o=0;for(;;){let n=T8.exec(e);if(n===null)break;let s=n.index;s>o&&a.push(l6(t,i,o,s));let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=f6(t,i,s,s+n[0].length);l&&(c.position=l),a.push(c),o=s+n[0].length,r=!0}a.length===0?n.push(i):(o<e.length&&a.push(l6(t,i,o,e.length)),n.push(...a))}r&&(e.children=n)}function cde(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,e=>{if(ode.has(e.type))return zj;let t=e;Array.isArray(t.children)&&sde(e,n)})}}function E8(e){return e===-2?` `:e===-1?` `:String.fromCharCode(e)}const lde={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;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?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===124?S4(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),a+=E8(t),c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(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(`wikiLinkAlias`),d(t)):(e.consume(t),i++,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)}}},ude={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;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?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===124?S4(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),a+=E8(t),l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),i++,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 dde(){return{text:{91:lde,33:ude}}}function fde(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function pde(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function D8(e){return e.stack[e.stack.length-1]}function mde(e){let t=D8(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function hde(e){let t=D8(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 gde(e){let t=D8(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)}function _de(e){let t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},n=y4(t,{separatorCrossed:t.alias!==null||e.data.sourceAlias!=null});n.target!==t.target&&(e.data.sourceTarget??=t.target,e.data.target=n.target),n.anchor!==t.anchor&&(e.data.sourceAnchor??=t.anchor,e.data.anchor=n.anchor),n.alias!==t.alias&&(e.data.sourceAlias??=t.alias,e.data.alias=n.alias)}function O8(e){_de(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 vde(e){O8(D8(this)),this.exit(e)}function yde(e){O8(D8(this)),this.exit(e)}const k8={enter:{wikiLink:fde,wikiLinkEmbed:pde},exit:{wikiLinkTarget:mde,wikiLinkAnchor:hde,wikiLinkAlias:gde,wikiLink:vde,wikiLinkEmbed:yde}};function A8(e){return(t,n,r,i)=>{let a=t.data,o=r.stack.includes(`tableCell`),s=e=>o?T4(e):e,c=a?.target??``,l=a?.anchor,u=a?.alias,d=`${e}${s(x4(a?.sourceTarget,c,`separatorAdjacent`))}`;if(l)d+=`#${s(x4(a?.sourceAnchor,l,`separatorAdjacent`))}`;else{let e=s(x4(a?.sourceAnchor,``,`separatorAdjacent`));e.length>0&&(d+=`#${e}`)}let f=u?x4(a?.sourceAlias,u,`alias`):x4(a?.sourceAlias,``,`alias`);if(f.length>0){let e=o&&!d.endsWith(`\\`)?`\\|`:`|`;d+=`${e}${s(f)}`}return`${d}]]`}}const j8={handlers:{wikiLink:A8(`[[`),wikiLinkEmbed:A8(`![[`)},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},M8=dde();function N8(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===M8)||e.micromarkExtensions.push(M8),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===k8)||e.fromMarkdownExtensions.push(k8),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===j8)||e.toMarkdownExtensions.push(j8)}function bde(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}const xde=[{name:`remark-parse`,plugin:Lz},{name:`escape-provenance`,plugin:Ule},{name:`remark-mdx-agnostic`,plugin:r8},{name:`remark-gfm`,plugin:NL},{name:`remark-math`,plugin:QR,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:N8},{name:`remark-github-alerts`,plugin:BR,options:Zce},{name:`callout-transformer`,plugin:Xce},{name:`restore-from-mdx`,plugin:Mce},{name:`void-br-promoter`,plugin:cde},{name:`restore-entity-refs`,plugin:Lce},{name:`restore-backslash-escapes`,plugin:Vce},{name:`details-accordion-promoter`,plugin:Tle},{name:`div-align-promoter`,plugin:Mle},{name:`image-promoter`,plugin:qle},{name:`indented-code-promoter`,plugin:Qle},{name:`math-promoter`,plugin:aue},{name:`single-dollar-math-promoter`,plugin:Xue},{name:`highlight-promoter`,plugin:Kle},{name:`underline-promoter`,plugin:ade},{name:`mermaid-promoter`,plugin:hue},{name:`comment-promoter`,plugin:rle},{name:`merged-post-parse-walker`,plugin:pue},{name:`empty-task-item-unmint`,plugin:Lle},{name:`link-reference-destination`,plugin:iue},{name:`non-rendering-context-demote`,plugin:Cue},{name:`ensure-non-empty-doc`,plugin:()=>bde}];function Sde(e){let t=HL();for(let e of xde)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(fR,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function Cde(e){let t=HL().use(IR,[`yaml`]).use(NL,{tablePipeAlign:!1}).use(QR,{singleDollarTextMath:!1}).use(r8).use(N8).use(rde).use(PL,{bullet:`-`,fences:!0,rule:`-`,join:[Yue],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function P8(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}const F8=/^\n+$/,I8=/^\n{2,}$/;function L8(e,t,n){let r,i,a=e.children;if(a.length>0){let e=a[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);F8.test(n)&&(r=n)}let n=a[a.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);I8.test(e)&&(i=e)}}if(!n&&r===void 0&&i===void 0)return;let o={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i}};return e.data??={},e.data.sourceDocBoundary=o,o}function wde(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&F8.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&I8.test(t.trailing)&&(n.trailing=t.trailing),n.bom||n.leading||n.trailing?n:void 0}function Tde(e,t){let{source:n,hadBom:r}=P8(e),i=C6(n),a=new pj(h8(i)),o=t.parse(a);a.value=i;let s=t.runSync(o,a);B6(s,i);let c=L8(s,i,r),l=c?$Q(s,c):void 0,u=t.stringify(s);return l?u.type.create({...u.attrs,sourceDocBoundary:l},u.content,u.marks):u}function Ede(e,t){return R8(e,t,!1)}function Dde(e,t){return R8(e,t,!0)}function R8(e,t,n){let{source:r,hadBom:i}=P8(e),a=C6(r),o=new pj(h8(a)),s=t.parse(o);o.value=a;let c=t.runSync(s,o);n&&B6(c,a);let l=L8(c,a,i);return n&&l&&$Q(c,l),c}function Ode(e,t,n){let r=mR(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});z8(r),Fle(r),nde(r),que(r);let i=wde(e.attrs?.sourceDocBoundary),a=String(t.stringify(r));return i?.leading&&(a=i.leading+a),i?.trailing&&(a=a.replace(/\n+$/,``)+i.trailing),i?.bom&&(a=`\uFEFF${a}`),a}function z8(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)z8(t);for(let t=0;t+1<e.children.length;){let n=e.children[t],r=e.children[t+1],i=n?.data,a=r?.data,o=H3(i)?i.escapedChars:null,s=H3(a)?a.escapedChars:null;if(n?.type!==`text`||r?.type!==`text`||typeof n.data?.sourceRaw==`string`||typeof r.data?.sourceRaw==`string`||o===null&&s===null){t+=1;continue}let c=n.value.length;n.value+=r.value,n.data??={},n.data.escapedChars=[...o??[],...(s??[]).map(e=>({...e,offset:e.offset+c}))],r.data?.entityRefSpans?.length&&(n.data.entityRefSpans=[...n.data.entityRefSpans??[],...r.data.entityRefSpans.map(e=>({...e,offset:e.offset+c}))]),e.children.splice(t+1,1)}}}function kde(){return typeof process>`u`||!process.env?!1:process.env.NODE_ENV===`development`||process.env.NODE_ENV===`test`}function Ade(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function jde(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 B8(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!T2(e))return e;let n=jde(Ade(t),e);return n===``||n===`..`||n.startsWith(`../`)?(kde()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}function V8(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 Mde=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=fC(e.extensions),this.handlers=Lde(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?D1({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=Rde(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Sde({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=Cde({toMarkdownHandlers:kue})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Tde(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Ede(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?Dde(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?sce(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 Ode(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};const H8=ece();function U8(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 r[e]=i?.type===`boolean`?t.value===`true`:t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function Nde(e){let t=!1;return e.descendants(e=>t?!1:e.type.name===`jsxInline`?(e.attrs.sourceDirty&&(t=!0),!1):e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function Pde(e,t){return e.attrs.sourceDirty||Nde(e)?!0:t?t.isDiverged(e.toJSON()):!1}function Fde(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0||t.every(e=>e.type===`text`&&e.value===``)}function W8(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 G8(e,t){if(e.length===0)return W8({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return W8({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:[G8(n.children,t)]}}return W8({type:`inlineCode`,value:K8(e)},t)}function K8(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=K8(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}const Ide=pd;function Lde(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.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&&(i.blockquote=lR(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.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&&(i.tableRow=lR(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.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&&(i.image=e=>{let r=e.url??``,i=B8(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},i.imageReference=n.imageReference?e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.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&&B1(t.raw)!==null&&L1(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=B1(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&&(i.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 a=r.strike??r.delete;if(a&&(i.delete=uR(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=uR(r.highlight)),r.underline&&(i.underline=uR(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=uR(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=lR(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=uR(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=uR(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=lR(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&&(i.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&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(i.list=lR(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&&(i.listItem=lR(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;i.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)))},i.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:n.data?.resolvedUrl??``,title:n.data?.resolvedTitle??null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=H8.getOrWildcard(o),c=U8(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=B8(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 a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}let i=t.name??``,o=i?H8.get(i):void 0;if(o&&n.jsxInline){let e=U8(t.attributes,o.props),a=r(t.data)??``,s=(t.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return s&&(e.children=s),n.jsxInline.createAndFill({componentName:i,attributes:t.attributes,sourceRaw:a,sourceDirty:!1,props: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)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.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&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=i.data?.sourceTarget??null,u=i.data?.sourceAnchor??null,d=i.data?.sourceAlias??null,f=A4(o),{resolveEmbed:p,sourcePath:m}=t.current,h=p&&m?p(o,m)??null:null,g=h?`/${h}`:o,_=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(_&&Ide.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,alt:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&md.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&gd.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&_d.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&m?e(o,m)??null:null,i=r===null?null:V8(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,target:o,anchor:c,alias:s,size:i,sourceTarget:l,sourceAnchor:u,sourceAlias:d}})}let v=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:g,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d});return e.text(v,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.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},i.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?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.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?i.footnoteDefinition=lR(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.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},i.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)},i}function Rde(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=hR(`paragraph`)),i.blockquote&&(n.blockquote=hR(`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=hR(`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||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||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=hR(`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&&Fde(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=hR(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:Ose(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!Pde(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:H8.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:H8,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.componentName||``;if(t&&e.attrs.sourceDirty)return Ase(t,e,H8.get(t)?.props);let n=e.attrs.attributes,r=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:t||null,attributes:Array.isArray(n)?n:[],children:[],data:{sourceRaw:String(r)}}}),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=gR(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=gR(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return G8(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0||void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=gR(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=gR(`mark`)),a.underline&&(r.underline=gR(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),a.comment&&(r.comment=gR(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=hR(`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=hR(`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=typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,o=typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,s=typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null,c=i||(r?`${t}#${r}`:t),l=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return l!==c&&l.trim().length>0&&!l.includes(`]]`)&&(i=l,c=l),{type:`wikiLinkEmbed`,value:c,data:{target:t,anchor:r,alias:i,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}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 c4(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 q8={default:!0,MD013:!1};function J8(e){return e??q8}function Y8(e){let t=e.replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);let n=t.toLowerCase();for(let e of W0)if(n.endsWith(e))return t.slice(0,-e.length);return t}function X8(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[],i=[],a=[],o=0;for(let e of t){let t=e.startsWith(`!`),s=t?e.slice(1):e;if(t||(o+=1),s.length===0){n.push({pattern:e,detail:`empty pattern`});continue}try{let e=(0,dU.default)(s,{dot:!0,strictBrackets:!0});(t?a:i).push(e)}catch(t){n.push({pattern:e,detail:t instanceof Error?t.message:String(t)});continue}if(s.endsWith(`/`))r.push({pattern:e,reason:`trailing-slash`});else if(s.startsWith(`/`))r.push({pattern:e,reason:`leading-slash`});else{let t=s.toLowerCase();W0.some(e=>t.endsWith(e))&&r.push({pattern:e,reason:`doc-extension`})}}let s=o===0;return{invalidPatterns:n,suspiciousPatterns:r,matches(e){if(e===void 0||e===``)return!1;let t=Y8(e);return t===``||!(s||i.some(e=>e(t)))?!1:!a.some(e=>e(t))}}}function zde(e,t){if(t.length===0)return[];let n=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),r=t.map(Y8).filter(e=>e!==``),i=[];for(let e of n){let t=e.startsWith(`!`)?e.slice(1):e;if(t.length===0)continue;let n;try{n=(0,dU.default)(t,{dot:!0,strictBrackets:!0})}catch{continue}r.some(e=>n(e))||i.push(e)}return i}function Z8(e,t){let n=new Set,r=[];for(let i of e){if(i.enabled===!1||!i.schema||!X8(i.appliesTo).matches(t))continue;let e=i.key??i.file;n.has(e)||(n.add(e),r.push({file:i.file,schema:i.schema}))}return r}const Q8={"draft-06":`http://json-schema.org/draft-06/schema#`,"draft-07":`http://json-schema.org/draft-07/schema#`,"2019-09":`https://json-schema.org/draft/2019-09/schema`,"2020-12":`https://json-schema.org/draft/2020-12/schema`},$8=Object.keys(Q8),e5=`draft-07`,Bde=new Map($8.map(e=>[t5(Q8[e]),e]));function t5(e){return e.replace(/^https?:\/\//,``).replace(/#$/,``)}function n5(e){let t=e.$schema;return t===void 0?e5:typeof t==`string`?Bde.get(t5(t))??null:null}function Vde(e){return n5(e)!==null}const r5=new Map;function Hde(e){throw Error(`Unhandled FrontmatterSchemaDialect: ${JSON.stringify(e)}`)}function Ude(e){let t=r5.get(e);if(t)return t;let n={allErrors:!0,strict:!1},r;switch(e){case`2020-12`:r=new lU.default(n);break;case`2019-09`:r=new cU.default(n);break;case`draft-06`:case`draft-07`:r=new sU.default(n);break;default:return Hde(e)}return(0,uU.default)(r),r5.set(e,r),r}function Wde(e){let{$schema:t,...n}=e;return n}function i5(e,t){let n=Ude(e),r=t.$id;return typeof r==`string`&&r!==``&&n.removeSchema(r),n.compile(Wde(t))}const a5=new Map;function o5(e){let t=JSON.stringify(e),n=a5.get(t);if(n!==void 0)return n;let r=null,i=n5(e);if(i!==null)try{r=i5(i,e)}catch{r=null}return a5.size>=256&&a5.clear(),a5.set(t,r),r}function Gde(e){if(o5(e))return null;let t=n5(e);if(t===null)return`unsupported dialect ${JSON.stringify(e.$schema)}`;try{return i5(t,e),`schema was refused`}catch(e){return e instanceof Error?e.message:String(e)}}function Kde(e){let t=new Map;if(!Kc.test(e))return{data:{},keyLines:t};let{frontmatter:n}=qc(e),r=Yc(n);if(r.trim()===``)return{data:{},keyLines:t};let i=(0,Lc.parseDocument)(r,{uniqueKeys:!1});if(i.errors.length>0)return{data:{},keyLines:t};let a=i.toJS();if(typeof a!=`object`||!a||Array.isArray(a))return{data:{},keyLines:t};if((0,Lc.isMap)(i.contents))for(let e of i.contents.items){let n=e.key;if(!(0,Lc.isScalar)(n)||typeof n.value!=`string`||!n.range)continue;let i=0,a=Math.min(n.range[0],r.length);for(let e=0;e<a;e++)r.charCodeAt(e)===10&&i++;t.has(n.value)||t.set(n.value,i+1)}return{data:a,keyLines:t}}const qde={"date-time":`an ISO 8601 datetime with an explicit UTC offset, for example "2026-09-23T00:00:00Z"`};function s5(e){let t=e.format;return typeof t==`string`?qde[t]:void 0}function c5(e){if(e===void 0)return``;let t;if(typeof e==`string`)t=`"${e}"`;else try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>60&&(t=`${t.slice(0,57)}…`),` (got ${t})`}function Jde(e){if(!e.startsWith(`/`))return null;let t=e.slice(1).split(`/`)[0]??``;return t===``?null:t.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Yde(e){return e.split(`/`).slice(1).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)).join(`.`)}function l5(e,t,n){if(t.length===0)return[];let r=n?.source??`frontmatter`,{data:i,keyLines:a}=Kde(e),o=e.split(`
539
- `),s=e=>({start:{line:e,character:0},end:{line:e,character:o[e]?.length??0}}),c=[];for(let{schema:e,ruleId:n}of t){let t=o5(e);if(t&&!t(i))for(let e of t.errors??[]){let t=e.keyword;if(t===`if`)continue;let o=0,l,u=`invalid`,d;if(t===`maxProperties`&&e.instancePath===``)l=`This document must not have frontmatter`;else if(t===`required`&&e.instancePath===``){let t=String(e.params.missingProperty??``);l=`Frontmatter property "${t}" is required`,u=`missing`,t!==``&&(d=t)}else if(e.instancePath===``)l=`Frontmatter ${e.message??`violates "${t}"`}`;else{let n=Jde(e.instancePath);n!==null&&(o=a.get(n)??0);let r=Yde(e.instancePath),s=n!==null&&r===n?i[n]:void 0;if(t===`enum`)l=`Frontmatter property "${r}" must be one of: ${(e.params.allowedValues??[]).map(String).join(`, `)}${c5(s)}`;else if(t===`format`&&s5(e.params)!==void 0){let t=e.params.format;l=`Frontmatter property "${r}" must be ${s5(e.params)} (format "${String(t)}")${c5(s)}`}else l=`Frontmatter property "${r}" ${e.message??`violates "${t}"`}`}c.push({range:s(o),severity:`warning`,source:r,code:n??t,message:l,frontmatterScope:u,...d===void 0?{}:{frontmatterProperty:d}})}}return c}function Xde(e,t){return tq(e,QK({strings:{doc:e},config:t}).doc??[])}function Zde(e,t){let n=QK({strings:{doc:e},config:t}).doc??[],r=e.split(`
540
- `),i=Qde(t);return n.map(e=>efe(e,r,$de(e,i)))}function Qde(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 $de(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 efe(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?[tfe(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 tfe(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 nfe=[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`,`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`,`project-no-mdx`];function u5(e,t){return e?.[t]!==!1}const d5=`.ok/okf`;function f5(e){return`${e.replace(/^frontmatter-/,``)}.schema.json`}function p5(e){return`${d5}/${f5(e)}`}const rfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — required frontmatter`,description:"The OKF v0.2 conformance floor. A bundle is conformant when every non-reserved .md file contains a parseable YAML frontmatter block whose `type` is non-empty. This schema is the whole of that floor: a concept carrying only `type` is fully conformant. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#11-conformance",type:`object`,required:[`type`],properties:{type:{type:`string`,pattern:`\\S`,description:"REQUIRED, and the only always-required key in OKF. A short string identifying the kind of concept; consumers use it for routing, filtering, and presentation. Type values are not registered centrally — pick something descriptive and self-explanatory (`BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`, `Playbook`, `Reference`, `Attested Computation`). Consumers must tolerate unknown types, typically by treating them as generic concepts. The `\\S` pattern is what makes §11 rule 2 mean what it says, and it replaces a `minLength` rather than joining one: a length check alone accepts a whitespace-only value that no consumer can route on, and having both would report one mistake twice. OKF v0.2 §4.1, §11."}}},ife={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — recommended frontmatter`,description:"Shapes for the OKF v0.2 recommended keys. Every key here is optional, and nothing is constrained beyond the shape OKF states: declaring a key pins its YAML type when present (so `tags` written as a comma-separated string warns) and advertises it to agents at read time. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#41-frontmatter",type:`object`,properties:{title:{type:`string`,description:`Human-readable display name. If omitted, consumers MAY derive a title from the filename. OKF v0.2 §4.1.`},description:{type:`string`,description:"A single sentence summarizing the concept. Used by `index.md` generators, search snippets, and previews. OKF v0.2 §4.1."},resource:{type:`string`,format:`uri-reference`,description:"A URI that uniquely identifies the underlying asset the concept describes. Absent for concepts that describe abstract ideas rather than physical resources. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or an ordinary relative path — hence `uri-reference`, not `uri`, which would reject `/tables/customers.md`. OKF v0.2 §4.1, §6.2."},tags:{type:`array`,items:{type:`string`},description:`A YAML list of short strings for cross-cutting categorization. Tags stay a first-class concept through this field; OKF specifies no separate per-tag file format, so a consumer that wants a tag-browsing view synthesizes one by scanning frontmatter. OKF v0.2 §3.1, §4.1.`},timestamp:{description:"LEGACY (OKF v0.1), superseded by `generated.at` in v0.2 — one of the two deliberate breaking changes. Consumers MAY fall back to it when `generated` is absent; new documents SHOULD write `generated: { by, at }` instead. Documented here so agents are told what it is and what replaced it, but deliberately left unconstrained: v0.2 does not define it as a producer field, so validating its shape would be a rule OKF no longer has. OKF v0.2 §5.2, §13.1."}}},afe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — provenance, trust, and lifecycle frontmatter`,description:'The optional OKF v0.2 families that make "where did this come from", "how much should I trust it", and "is it still current" answerable from frontmatter alone. Every key is optional, and absence carries meaning rather than being an error: a concept with no `verified` is unverified, and a consumer must not reject it. Only `sources[].resource` and `generated.by` are required-when-their-parent-is-present, because those are the two fields OKF marks REQUIRED in this family; every other field is described but not mandated, so nothing else is enforced. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#5-provenance-trust-and-lifecycle',type:`object`,properties:{sources:{type:`array`,description:"The materials this concept derives from, external or internal to the bundle. Lineage is expressed through links rather than a dedicated field: when an entry's `resource` points at another OKF concept, the derivation edge already exists in the bundle graph, so a consumer may recurse into that source's own `sources`. OKF v0.2 §5.1.",items:{type:`object`,required:[`resource`],properties:{resource:{type:`string`,description:"REQUIRED within an entry. Either a concrete artifact a consumer can follow (an absolute URL, a bundle-relative path, or a path into a `references/` subdirectory) or a population or scope descriptor it cannot, for example `all queries in BigQuery project X`. Deliberately NOT format-constrained: a scope descriptor is prose, so a `uri-reference` check here would warn on conformant documents. OKF v0.2 §5.1, §6.2, §6.3."},id:{type:`string`,description:"Optional. A stable key used to attribute individual claims: a markdown footnote whose label is this id (`[^ga4-schema]`) attributes the claim it follows. SHOULD be present when the body cites the source. Keyed rather than positional because agents constantly rewrite these documents — a positional index misattributes silently the moment the list is reordered. OKF v0.2 §5.1."},title:{type:`string`,description:`Optional. Human-readable label for the source. OKF v0.2 §5.1.`},author:{type:`string`,description:"Optional credibility signal — an authority signal: who or what produced the source. OKF describes this as following the actor convention (§7), but its own examples use a `team:<id>` prefix that the three §7 forms do not cover, so no pattern is enforced. OKF v0.2 §5.1, §7."},usage_count:{type:`integer`,description:"Optional credibility signal — an adoption and liveness signal: how often `resource` was exercised (dashboard views, query executions, page reads) over `usage_window`. For a single artifact it is that artifact's own exercise count; for a scope descriptor it is the number of exercises within the scope that touch the concept. Coarse by design: comparable at the alive-versus-dead and order-of-magnitude level and against a source's own history, but not a precise cross-kind ranking. Read as liveness and trend, not as a score. OKF v0.2 §5.1."},last_modified:{type:`string`,format:`date-time`,description:"Optional credibility signal — a recency signal: when the source itself last changed, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-15T00:00:00Z`). Distinct from `generated.at`, which records when the concept was written. OKF v0.2 §5, §5.1."},usage_window:{type:`object`,description:"Optional per-entry override of the `usage_window` written as a sibling of `sources`. OKF v0.2 §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}}}}},usage_window:{type:`object`,description:"Written once as a sibling of `sources`, this frames every `usage_count` in the list with a `{ from, to }` range. A single entry may carry its own `usage_window` to override it. OKF v0.2 §5, §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}},generated:{type:`object`,required:[`by`],description:"How the current content was produced. Kept distinct from `verified` because who wrote a concept need not be who confirmed it. OKF v0.2 §5.2.",properties:{by:{type:`string`,description:"REQUIRED within `generated`. An actor in the OKF convention: `<producer>/<version>` for agents and tools (`reference_agent/gemini-2.5-pro`), `human:<id>` for a person (`human:ahormati`), or `process:<id>` for an automated process (`process:finance-nightly`). Consumers that classify trust key off the `human:` prefix, so producers MUST use it for hand-authored or human-confirmed content — a rule about which form to pick for which content, which frontmatter alone cannot check, so the three forms are documented here rather than enforced by a pattern. OKF v0.2 §5.2, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-06-30T14:00:00Z`) marking the content's last meaningful change. Consumers use it to tell a recent edit from a stale fact. Supersedes v0.1's top-level `timestamp`. OKF v0.2 §5, §5.2, §13.1."}}},verified:{description:'Who or what has confirmed the content against its sources or `resource` — a list of verification events. Multiple entries capture independent checks, for example a human sign-off plus a nightly process; "how recently" is the latest `at`. Independent of `generated.at`: content can change without re-confirmation, and facts can be re-confirmed without regeneration. A single verifier MAY be written as one bare `{ by, at }` mapping without the list dash, and consumers MUST treat that as a one-element list — hence the two accepted shapes here. Absence means unverified, which is a valid state, never a rejection. OKF v0.2 §5.2, §5.3, §11.',anyOf:[{type:`object`,description:`The bare single-verifier mapping form. OKF v0.2 §5.2.`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}},{type:`array`,description:`The list form: one entry per independent verification event. OKF v0.2 §5.2.`,items:{type:`object`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}}}]},status:{enum:[`draft`,`stable`,`deprecated`],description:"Lifecycle state. `draft` = not yet reviewed, possibly incomplete. `stable` = ready for consumption. `deprecated` = kept for links and history, no longer current. Absent means `stable`, so the key is only worth writing to say draft or deprecated. These three values are the whole set OKF defines, which is why this is the pack's only enum. OKF v0.2 §5.4."},stale_after:{type:`string`,format:`date-time`,description:"An absolute instant, an ISO 8601 datetime with an explicit UTC offset (`2026-12-31T00:00:00Z`): the concept is stale when `now >= stale_after`. Absolute rather than a relative TTL so staleness stays a plain comparison with no reference to when the concept was read. An instant in the past is a freshness signal for consumers, not a violation. OKF v0.2 §5, §5.5, §10.5."}}},ofe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — Attested Computation frontmatter`,description:'Shapes for the OKF v0.2 computation keys, which turn a concept into a sanctioned way to compute a value so a consumer can confirm the agent ran the blessed computation instead of improvising its own. Provenance answers "where did this claim come from"; attestation answers "was this number produced the way we said it must be". This file also carries the one value-shaped rule in the pack: `runtime` is the single key OKF marks REQUIRED here, and only when `type` is `Attested Computation`. Ordinary concepts never match that condition and are unaffected, and no other key in the family is mandated. OKF records the computation and the means to check it and executes nothing itself; receipts and verdicts are runtime artifacts that are never stored in the bundle. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#10-attested-computations-concept',type:`object`,if:{required:[`type`],properties:{type:{const:`Attested Computation`,description:"The condition, not a constraint: everything in `then` applies only to documents whose `type` is exactly `Attested Computation`. An ordinary concept never matches, so nothing in this schema is ever asked of it. `type` is also required inside the condition so a document with no type at all fails the conformance floor once, rather than also being told it is missing a `runtime` for a type it never claimed."}}},then:{required:[`runtime`]},properties:{runtime:{type:`string`,description:"REQUIRED for `type: Attested Computation`. The single field that says how to run the computation, and therefore how the executor and attester interpret it and what `parameters` mean — a parameter is a SQL bind variable, a dbt var, or a Python argument depending on the runtime. Keeping `runtime` and `parameters` in one frontmatter is what makes the binding semantics self-evident. Example values: `bigquery`, `postgres`, `dbt`, `python`, `Looker`. Not a closed set, so no enum. OKF v0.2 §10.1, §10.2."},parameters:{type:`array`,description:`The typed, named holes the agent may fill. An agent MAY only supply values for these parameters; it MUST NOT author or edit the computation. That parameter-only surface is what makes "did the sanctioned thing run" a mechanical comparison rather than a judgement call. OKF v0.2 §10.2, §10.3.`,items:{type:`object`,properties:{name:{type:`string`,description:"The parameter name the computation binds, for example `year` bound as `@year` in BigQuery SQL or `{{ var('year') }}` in dbt. OKF v0.2 §10.2, §10.3."},type:{type:`string`,description:"The parameter's type, interpreted by `runtime` (`integer`, `string`, and so on). Deliberately not constrained to JSON Schema type names, because the vocabulary belongs to the runtime. OKF v0.2 §10.2."},required:{type:`boolean`,description:`Whether the agent must supply a value for this parameter. OKF v0.2 §10.2.`}}}},computation:{type:`string`,format:`uri-reference`,description:"Optional. A path to a file holding the computation, used instead of an inline body fence — best for a long or generated computation, or one already kept as a real file shared with non-OKF tooling. When absent, the body's `# Computation` fence IS the computation. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or a relative path. OKF v0.2 §6.2, §10.2, §10.3."},executor:{type:`object`,description:"How the computation is run. A runner — an agent, or deterministic consumer code — follows `resource`, and the run returns a receipt shaped by `receipt`. Binding the computation with the parameter values into the executable artifact is the consumer's job. OKF v0.2 §10.2, §10.5.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names the run instructions or code. What sits behind it — a Skill, a script, a container — is a packaging choice; OKF fixes the interface, not the packaging. Conventionally points into a `references/` subdirectory, for example `references/skills/run-on-bq.md`. OKF v0.2 §1, §6.2, §6.3, §10.2."},receipt:{type:`array`,items:{type:`string`},description:"Declares the fields a run must return — the evidence the attester inspects, for example `[job_id, executed_sql, result]` for BigQuery or `[run_id, compiled_sql, result]` for dbt. Because the attester compares the expanded, compiled artifact the receipt carries, a rewritten query, a swapped computation file, or a mutated dependency fails the check. The receipt itself is a runtime artifact and is never stored in the bundle. OKF v0.2 §10.2, §10.3, §10.5."}}},attester:{type:`object`,description:"The deterministic check that inspects a receipt and returns a verdict. Meant to run consumer-side. Distinct from `verified`: `verified` confirms the definition still matches policy and is recorded in the bundle, while attestation confirms a single run produced the value the sanctioned way and is not stored. OKF v0.2 §10.2, §10.6.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names code — no LLM — that takes a receipt and returns a verdict, independently re-deriving the binding of `computation` with the claimed parameter values to compare against what actually ran. Conventionally points into a `references/` subdirectory, for example `references/attesters/sql-equality.py`. OKF v0.2 §6.2, §6.3, §10.2, §10.3."}}}}},sfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — index files carry no frontmatter`,description:"`index.md` is a reserved filename at any level of the hierarchy and must not be used for a concept document. Index files contain no frontmatter, with exactly one exception — a bundle-root `index.md` may carry `okf_version` — which the scope carves out with a `!index` exclusion rather than a keyword here. `maxProperties: 0` is the mechanism rather than the boolean schema `false`, because a document with no frontmatter block validates as `{}` and `false` would reject that too, flagging the very documents that are correct. `log.md` is deliberately NOT covered: §9 constrains a log's date headings, ordering, and prose entries but never its frontmatter, and OKF's own reference bundle ships a `log.md` carrying `type` and `title`. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#8-index-files",type:`object`,maxProperties:0},cfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — bundle-root index.md`,description:"The bundle-root `index.md` is the only index file OKF permits frontmatter in, and `okf_version` is the key it names there. OKF states the declaration as a MAY, so it is not required here. Nor is the frontmatter closed to other keys: §8 grants the exception for `okf_version` specifically, but §11 tells consumers not to reject a bundle over unknown additional keys, and that ambiguity is resolved in favor of the looser reading. The one thing pinned is the value's shape, because a YAML float is provably lossy where a version string is not. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#12-versioning",type:`object`,properties:{okf_version:{type:`string`,pattern:`^[0-9]+\\.[0-9]+$`,description:'The OKF version this bundle targets, as `<major>.<minor>` — currently `"0.2"`. Quote it: unquoted `0.2` parses as a YAML number, so a consumer comparing version strings sees a float instead, and `0.10` would silently become `0.1`. A minor bump is backward-compatible additions; a major bump may rename required fields or change reserved filenames. Consumers that do not understand the declared version should attempt best-effort consumption rather than refusing the bundle. OKF v0.2 §12.'}}},m5=[`**`,`!**/{index,log}`],h5=[{id:`frontmatter-required`,appliesTo:m5,schema:rfe},{id:`frontmatter-recommended`,appliesTo:m5,schema:ife},{id:`frontmatter-provenance`,appliesTo:m5,schema:afe},{id:`frontmatter-computation`,appliesTo:m5,schema:ofe},{id:`frontmatter-reserved-index`,appliesTo:[`**/index`,`!index`],schema:sfe},{id:`frontmatter-root-index`,appliesTo:[`index`],schema:cfe}],lfe=Object.fromEntries(nfe.filter(e=>!h5.some(t=>t.id===e)).map(e=>[e,!1]));function g5(e,t){return t===void 0?[]:h5.filter(n=>u5(e,n.id)&&X8([...n.appliesTo]).matches(t))}function ufe(e){return h5.filter(t=>u5(e,t.id)).map(e=>({appliesTo:[...e.appliesTo],file:p5(e.id)}))}function dfe(e,t,n){let r=g5(t,n);return r.length===0?[]:l5(e,r.map(e=>({file:p5(e.id),schema:e.schema,ruleId:e.id})),{source:`okf`})}function _5(e,t){return nq(`okf:${e}`,(n,r)=>{try{t(n,r)}catch(t){console.warn(`[lint] OKF rule "${e}" failed${r.data.okfDocName?` on "${r.data.okfDocName}"`:``}`,t)}})}function v5(e,t,n){let r=X8(t);return _5(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}const y5=e=>({line:e.line-1,character:e.column-1});function ffe(e,t){if(e&&`start`in e)return{start:y5(e.start),end:y5(e.end)};if(e){let n=y5(e);return{start:n,end:{line:n.line,character:t[n.line]?.length??0}}}return{start:{line:0,character:0},end:{line:0,character:t[0]?.length??0}}}function pfe(e,t){return{range:ffe(e.place,t),severity:`warning`,source:`okf`,code:e.ruleId??`okf`,message:e.reason}}function mfe(e,t,n){if(t.length===0)return[];let r=HL().use(Lz).use(NL).use(IR,[`yaml`]);for(let e of t)r.use(e);let i=new pj({value:e});n!==void 0&&(i.data.okfDocName=n);let a=r.parse(i);r.runSync(a,i);let o=e.split(`
541
- `);return i.messages.map(e=>pfe(e,o))}function hfe(e){let t=!1;return Hj(e,[`link`,`linkReference`],()=>(t=!0,!1)),t}const gfe=v5(`index-shape`,`**/index`,(e,t)=>{let n=!1;for(let r of e.children){if(r.type===`heading`){n=!0;continue}r.type===`list`&&!n&&t.message(`This index list is not under a section heading, so an Open Knowledge Format consumer reading the file as navigation has no name to file its entries under — an index is one or more heading-led sections of bulleted links.`,r)}Hj(e,`listItem`,e=>{e.children.some(e=>e.type===`list`)||hfe(e)||t.message(`This index entry has no link, so an Open Knowledge Format consumer reading the file as navigation has nowhere to follow it. Every entry in the format's own reference bundles is a link followed by a short description.`,e)})}),_fe=/^\s*(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?!\d)/;function vfe(e,t,n){let r=new Date(Date.UTC(e,t-1,n));return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}const yfe=/^\s*\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/;function b5(e){let t=e.trim();return t.length>60?`${t.slice(0,59)}…`:t}const bfe=v5(`log-shape`,`**/log`,(e,t)=>{let n;Hj(e,`heading`,e=>{if(e.depth!==2)return;let r=Wj(e),i=_fe.exec(r);if(!i){t.message(yfe.test(r)?`Log date heading "${b5(r)}" is not in ISO 8601 YYYY-MM-DD form, the one form an Open Knowledge Format log requires of its date headings.`:`Log entry heading "${b5(r)}" is not a date, so it falls outside the dated-entry format an Open Knowledge Format consumer reads a log as — nothing under it reaches the change-history timeline.`,e);return}let a=`${i[1]}-${i[2]}-${i[3]}`;if(!vfe(Number(i[1]),Number(i[2]),Number(i[3]))){t.message(`Log date heading "${a}" is not a real calendar date, so it is not ISO 8601 — the one form an Open Knowledge Format log requires of its date headings.`,e);return}n!==void 0&&a>n&&t.message(`Log date heading "${a}" is newer than the entry above it — an Open Knowledge Format log is a flat list of date-grouped entries, newest first.`,e),n=a})}),xfe=/\[\[[^[\]\n]+\]\]/g;function Sfe(e){let t=`Wiki-link ${e} won't resolve for an external Open Knowledge Format consumer — it renders as literal text and its graph edge is lost.`;return e.includes(`|`)?`${t} The alias "|" also splits a GFM table cell.`:t}const Cfe=_5(`no-wiki-links`,(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value);Hj(e,`text`,e=>{let r=e.position?.start,i=e.position?.end,a=r?.offset,o=a===void 0||i?.offset===void 0?e.value:n.slice(a,i.offset),s=0,c=r?.line??0,l=r?.column??0,u=e=>{for(;s<e;s+=1)o[s]===`
542
- `?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(xfe)){let{index:i}=e;if((a===void 0?o[i-1]:n[a+i-1])===`!`)continue;let s=r&&a!==void 0?{start:u(i),end:u(i+e[0].length)}:void 0;t.message(Sfe(e[0]),s)}})}),wfe=[`index`,`log`],Tfe=_5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=i2(n),i=r.toLowerCase();wfe.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)}),x5=[{id:`no-wiki-links`,rule:Cfe},{id:`log-shape`,rule:bfe},{id:`index-shape`,rule:gfe},{id:`reserved-casing`,rule:Tfe}],Efe=x5.map(e=>e.rule);function Dfe(e){return e===void 0?Efe:x5.filter(t=>u5(e,t.id)).map(e=>e.rule)}const Ofe=to([P(),L(Xd),ao(M(),Ya())]),kfe={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:ao(M(),Ofe)}),defaultSlice:{enabled:!1,rules:q8},async lint(e,t){return Zde(e,J8(t.rules))},fix(e,t){return Xde(e,J8(t.rules))}},Afe=I({appliesTo:to([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:ao(M(),Ya()).optional()}),S5=[kfe,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(Afe)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return l5(e,Z8(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>Z8(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:ao(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...mfe(e,Dfe(t.rules),n.docName),...dfe(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>g5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...lfe}}),advertisedMappings:e=>ufe(e.rules)}}],jfe={enabled:!0,plugins:Object.fromEntries(S5.map(e=>[e.id,e.defaultSlice]))};function C5(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function Mfe(e){if(!e?.enabled)return[];let t=[];for(let n of S5){if(n.frontmatter===void 0)continue;let r=e.plugins[n.id];r?.enabled===!0&&t.push(...n.frontmatter.advertisedMappings(r))}return t}const Nfe=I({docName:H4,summary:W4,content:M().optional(),...U4}).loose(),Pfe=I({docName:H4,summary:W4,markdown:M(),position:L([`append`,`prepend`,`replace`]).optional(),extension:L(W0).optional(),...U4}).loose(),Ffe=I({docName:H4,summary:W4,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...U4}).loose(),Ife=I({docName:H4,connectionId:M().min(1),scope:L([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...U4}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]}),w5=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Lfe=no(`kind`,[I({kind:R(`inline`),content:M()}),I({kind:R(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),T5=I({kind:R(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Lfe.optional(),hint:M().optional()}).loose(),Rfe=I({type:R(`orphan`),parentCandidates:F(M()),message:M()}).loose(),E5=I({kind:R(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();no(`kind`,[T5,E5]);const D5=Object.keys({"content-divergence":!0,"disk-edit-reconciled":!0});function zfe(e){return D5.includes(e)}function Bfe(e){throw Error(`Unexpected WriteWarning variant: ${JSON.stringify(e)}`)}const Vfe=I({kind:R(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),O5=I({href:M(),targetKind:M(),role:M(),sourceForm:M(),resolvedTarget:M().nullable(),reason:M(),resolutionMethod:M(),fallbackTarget:M().nullable().optional(),definition:I({line:N().int().nonnegative(),label:M()}).loose().optional()}).loose(),k5=no(`kind`,[T5,E5,Vfe,I({kind:R(`lint-violation`),source:M(),code:M(),message:M(),severity:L([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:O5.optional()}).loose()]),A5=F(k5).min(1),j5=I({href:M(),resolvedTo:M().nullable(),reason:L([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:O5.optional()}).loose(),M5=F(j5),Hfe=[`reserved-log-policy`],N5=I({reason:M().min(1),count:N().int().positive()}).loose(),Ufe=I({timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),Wfe=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(Rfe).optional(),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),Gfe=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),Kfe=I({docName:M().min(1),scope:L([`last`,`session`,`count`]),undone:P()}).loose(),qfe=I({docs:F(I({docName:Loe,markdown:M(),position:L([`append`,`prepend`,`replace`]).optional(),extension:L(W0).optional(),summary:W4}).loose()).min(1).max(100),...U4}).loose(),Jfe=I({type:Q4,title:M(),detail:M().optional()}).loose(),Yfe=no(`status`,[I({status:R(`written`),docName:M().min(1),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),I({status:R(`error`),docName:M().min(1),error:Jfe}).loose()]),Xfe=I({timestamp:M().min(1),results:F(Yfe),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),Zfe=I({docName:H4,patch:ao(M(),to([Vc,Ja()])),types:ao(M(),L(Rc)).optional(),summary:W4,...U4}).loose(),Qfe=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose();function $fe(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??q8},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]},okf:{enabled:e.okf?.enabled??!1,...e.okf?.rules===void 0?{}:{rules:e.okf.rules},generate:{index:e.okf?.generate?.index??!1}}}}}const epe=Object.fromEntries(S5.map(e=>[e.id,e.sliceSchema])),tpe=I({effective:I({enabled:P(),plugins:I(epe)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),npe=to([P(),ao(M(),Ya())]),rpe=new Set([`__proto__`]),P5=M().min(1).max(256).refine(e=>!rpe.has(e),{message:`schema property name cannot be __proto__`}),ipe=I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:to([npe,Ja()])}),ape=I({file:M().min(1).max(512),delete:R(!0).optional(),field:P5.optional(),parentPath:F(to([P5,I({items:R(!0)}).strict()])).max(8).optional(),removeField:R(!0).optional(),renameTo:P5.optional(),constraint:I({type:L([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(to([M(),N(),P()])).nullable().optional(),itemsEnum:F(to([M(),N(),P()])).nullable().optional(),itemsType:L([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:M().nullable().optional(),format:M().nullable().optional(),description:M().max(2048).nullable().optional(),required:P().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`}),ope=I({schemas:F(M()),truncated:P()}).strict(),F5=I({line:N(),character:N()}),I5=I({start:F5,end:F5}),L5=I({range:I5,severity:L([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:I5,newText:M()})).optional(),frontmatterScope:L(qd).optional(),frontmatterProperty:M().optional()}),R5=F(M()).optional(),z5=I({file:M(),diagnostics:F(L5),ran:R5,warnings:F(M()).optional()}),spe=I({files:F(z5),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:R5}),cpe=L5.extend({linkTarget:M().optional(),localTarget:O5.optional()}),lpe=I({files:F(I({file:M(),diagnostics:F(cpe)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:R5,brokenLinkSuppression:N5.optional()}),B5=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),upe=I({files:F(I({file:M(),lint:B5,links:B5})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:N5.optional()}),dpe=I({docName:H4,summary:W4,...U4}).loose(),V5=`Re-lint after fix failed: `;function fpe(e){return e.startsWith(V5)}const H5=[`re-lint-threw`,`source-went-blind`];function ppe(e){return typeof e==`string`&&H5.includes(e)}const U5=I({reason:L(H5),message:M().min(1)}),mpe=I({file:M(),fixedCount:N(),diagnostics:F(L5),errorCount:N(),warningCount:N(),ran:R5,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:U5.optional()});function W5(){let e=Q8[e5];return`${JSON.stringify({$schema:e,type:`object`},null,2)}\n`}function hpe(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function gpe(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:hpe(e)&&t.endsWith(`.json`)}var G5=class extends Error{};function K5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q5(e,t,n){let r=e;for(let e of t){if(typeof e!=`string`){let e=r.items;if(e===void 0){if(!n)throw new G5(`field path items does not exist`);let e={type:`object`};r.items=e,r=e;continue}if(!K5(e))throw new G5(`field path items is not an object sub-schema`);r=e;continue}let t=Y5(r),i=Object.hasOwn(t,e)?t[e]:void 0;if(i===void 0){if(!n)throw new G5(`field path ${JSON.stringify(e)} does not exist`);let i={type:`object`};r.properties={...t,[e]:i},r=i;continue}if(!K5(i))throw new G5(`field path ${JSON.stringify(e)} is not an object property`);r=i}return r}function _pe(e,t,n,r=[]){let i;i=e.trim()===``?JSON.parse(W5()):J5(e);let a=q5(i,r,!0),o=Y5(a),s=Object.hasOwn(o,t)?o[t]:void 0,c={...K5(s)?s:{}};for(let e of[`type`,`enum`,`pattern`,`format`,`description`]){if(!(e in n))continue;let t=n[e];t==null?delete c[e]:c[e]=t}if(`itemsEnum`in n||`itemsType`in n){if(c.items!==void 0&&!K5(c.items))throw new G5(`field path items is not an object sub-schema`);let e=K5(c.items)?{...c.items}:{};`itemsEnum`in n&&(n.itemsEnum===null||n.itemsEnum===void 0?delete e.enum:e.enum=n.itemsEnum),`itemsType`in n&&(n.itemsType===null||n.itemsType===void 0?delete e.type:e.type=n.itemsType),Object.keys(e).length>0?c.items=e:delete c.items}if(Object.keys(c).length>0)a.properties={...o,[t]:c};else if(Object.hasOwn(o,t)){let{[t]:e,...n}=o;Object.keys(n).length>0?a.properties=n:delete a.properties}if(n.required!==void 0){let e=X5(a),r=e.includes(t);n.required&&!r?a.required=[...e,t]:!n.required&&r&&Z5(a,e.filter(e=>e!==t))}return`${JSON.stringify(i,null,2)}\n`}function J5(e){let t;try{t=JSON.parse(e)}catch(e){throw new G5(`schema is not valid JSON (${e instanceof Error?e.message:String(e)})`)}if(!K5(t))throw new G5(`schema is not a JSON object`);return t}function Y5(e){return K5(e.properties)?e.properties:{}}function X5(e){return Array.isArray(e.required)?e.required.filter(e=>typeof e==`string`):[]}function Z5(e,t){t.length>0?e.required=t:delete e.required}function vpe(e,t,n=[]){let r=J5(e),i=q5(r,n,!1),a=Y5(i);if(Object.hasOwn(a,t)){let{[t]:e,...n}=a;Object.keys(n).length>0?i.properties=n:delete i.properties}return Z5(i,X5(i).filter(e=>e!==t)),`${JSON.stringify(r,null,2)}\n`}function ype(e,t,n,r=[]){let i=J5(e),a=q5(i,r,!1),o=Y5(a);if(!Object.hasOwn(o,t))throw new G5(`field ${JSON.stringify(t)} does not exist`);if(Object.hasOwn(o,n))throw new G5(`field ${JSON.stringify(n)} already exists`);return a.properties=Object.fromEntries(Object.entries(o).map(([e,r])=>[e===t?n:e,r])),Z5(a,X5(a).map(e=>e===t?n:e)),`${JSON.stringify(i,null,2)}\n`}function bpe(){return h5.map(e=>({path:`${d5}/${f5(e.id)}`,ruleId:e.id,contents:`${JSON.stringify({$comment:"Generated by the OpenKnowledge `okf` lint plugin — do not edit. The plugin validates from its own compiled copy and never reads this file, so changes here have no effect and are overwritten when the server restarts. This describes an external format (Google’s Open Knowledge Format); to change what is enforced, change the rule toggles under Settings → this project → Plugins → OKF.",...e.schema},null,2)}\n`}))}function Q5(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?{stem:t,ext:``}:{stem:t.slice(0,n),ext:t.slice(n)}}function xpe(e){let t=new Set(e.filter(e=>Q5(e).ext.toLowerCase()===`.md`).map(e=>e.slice(0,e.lastIndexOf(`.`)))),n=[];for(let r of e){if(Q5(r).ext.toLowerCase()!==`.mdx`)continue;let e=r.slice(0,r.lastIndexOf(`.`)),i=`"${r}" won't be picked up by an Open Knowledge Format consumer — the format is .md-only, and nothing scanning for .md files will open an .mdx.`;n.push({file:r,code:`project-no-mdx`,message:t.has(e)?`${i} It is also shadowed by "${e}.md", so a consumer reads that file instead and gets different content than this project shows you.`:i})}return n}const Spe=[{id:`project-no-mdx`,run:xpe}];function Cpe(e,t){let n=e.filter(e=>W0.some(t=>e.toLowerCase().endsWith(t)));return n.length===0?[]:Spe.filter(e=>u5(t,e.id)).flatMap(e=>e.run(n))}function $5(e){return`source "${e.source}" ${e.phase} failed`}function wpe(e){let t=e.docName===void 0?``:` on "${e.docName}"`;return`${$5(e)}${t}: ${e.message}`}function Tpe(e){let t=new Map;for(let n of e){let e=[n.source,n.phase,n.message].join(`\0`),r=t.get(e)??{first:n,docNames:new Set};n.docName!==void 0&&r.docNames.add(n.docName),t.set(e,r)}return[...t.values()].map(({first:e,docNames:t})=>t.size<=1?wpe(e):`${$5(e)} on ${t.size} documents (first: "${e.docName}"): ${e.message}`)}const Epe=[{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}]}],Dpe=(()=>{let e=new Map;for(let t of Epe){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function e7(e){return Dpe.get(e.toUpperCase())??null}function Ope(e,t){let n=e7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))e7(t)===n&&(r={key:t,value:i});return r}function kpe(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}function Ape(e,t){let n=S5.filter(t=>C5(e,t.id)).map(e=>e.id);return t.mode===`audit`&&t.linksValidation!==`off`&&n.push(`links`),n}const t7=`No documents were checked: this scope contains no admitted documents.`;function jpe(e){return e===t7}function Mpe(e,t){return t===0?e!==void 0&&e.length>0?[`Checks selected: ${e.join(`, `)}; no document checks ran.`]:[`No document checks ran.`]:e===void 0?[]:e.length===0?[`No checks ran.`]:[`Checks run: ${e.join(`, `)}.`]}async function Npe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of S5){if(!C5(t,a.id))continue;let o=t.plugins[a.id];try{i.push(...await a.lint(e,o,{docName:n}))}catch(e){console.warn(`[lint] plugin "${a.id}" failed${n?` on "${n}"`:``}`,e),r?.({source:a.id,phase:`lint`,...n===void 0?{}:{docName:n},message:n7(e)})}}return i}function Ppe(e,t,n,r){if(!t.enabled)return e;let i=e;for(let e of S5){if(!C5(t,e.id)||!e.fix)continue;let a=t.plugins[e.id];try{i=e.fix(i,a)}catch(t){console.warn(`[lint] plugin "${e.id}" fix failed${n?` on "${n}"`:``}`,t),r?.({source:e.id,phase:`fix`,...n===void 0?{}:{docName:n},message:n7(t)})}}return i}function n7(e){let t=r7(e);return t.length>500?`${t.slice(0,500)}… (truncated)`:t}function r7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${r7(e.cause,t+1)})`;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return String(e)}const Fpe=/\p{M}+/gu,Ipe=/[^\p{L}\p{N}]+/gu,Lpe=/^-+|-+$/g;function i7(e){return e.trim().normalize(`NFKD`).replace(Fpe,``).toLowerCase().replace(Ipe,`-`).replace(Lpe,``)}function Rpe(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function zpe(e,t){let n=i7(e);return n?Rpe(n,t):``}const Bpe=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]);new Map(O3.flatMap(e=>e.surface===`compat`&&Bpe.has(e.rendersAs)?[[e.name,e]]:[])),CF(`<>`),HL().use(Lz).use(NL);const a7=[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}];for(let e of a7){let t=O3.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}const Vpe=aV(),Hpe=CB(),Upe=wB();function Wpe(){return O3.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function Gpe(){return Wpe().filter(e=>{let t=o7(e);return t!==`fence`&&t!==`html`})}function o7(e){return e.name===`MermaidFence`?`fence`:e.name===`HtmlAlignBlock`?`html`:e.hasChildren?`jsx-block`:`jsx-void`}function Kpe(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:o7(e)}}function qpe(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 Jpe(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 Ype(e){let t=[];for(let n of e.props){let e=qpe(n);e!==void 0&&Jpe(n,e)&&t.push(s3(n.name,e))}return t}function Xpe(e){return jz(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[Vpe],mdastExtensions:[Hpe]}).children}function Zpe(e){let t=o7(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
543
- A --> B`};else{let r=Ype(e),i=t===`jsx-block`?Xpe(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return wP({type:`root`,children:[n]},{extensions:[Upe]}).trimEnd()}function Qpe(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 $pe(e){return{...Kpe(e),example:Zpe(e),params:Qpe(e)}}const eme=I({intents:F(I({satisfierId:M().min(1),desired:L([`present`,`absent`])}).loose()),...U4,summary:W4}).loose(),tme=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:L([`present`,`absent`]),action:L(wo),errorId:M().optional()}).loose(),nme=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),rme=I({state:M(),strictness:F(L(So)).optional()}).loose(),ime=I({probes:I({env:L([`desktop`,`local-web`,`remote-web`]),satisfiers:ao(M(),rme)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),ame=I({actions:F(tme),conflicts:F(nme),withheld:F(M()),snapshot:ime}).loose(),ome=I({entries:F(I({level:L([`info`,`warn`,`error`]),message:M().max(8192),event:M().optional(),fields:ao(M(),Ya()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),sme=I({accepted:N().int().min(0)}).loose(),cme=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),lme=F(to([M(),N().int().nonnegative()])),ume=no(`kind`,[I({kind:R(`body`)}),I({kind:R(`property`),key:M().min(1),path:lme.default([])})]).default({kind:`body`}),dme=L([`anchored`,`orphaned`,`resolved`]),s7=I({threadId:M().min(1),docName:M().min(1),target:ume,anchor:cme.nullable(),state:dme,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),c7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),l7=I({threadId:M(),ok:R(!0)}),u7=I({threadId:M(),ok:R(!1),error:R(`not-found`)}),fme=I({threads:F(s7)}).loose(),pme=I({meta:s7,orphaned:P()}).loose(),mme=I({threadId:M()}).loose(),hme=I({meta:s7,payload:c7}).loose(),gme=I({results:F(to([l7.extend({meta:s7,payload:c7}),u7]))}).loose(),_me=I({results:F(to([l7.extend({meta:s7}),u7]))}).loose(),vme=I({status:M().min(1),reason:M()}).loose(),yme=I({docName:M().min(1),content:M(),lifecycle:vme.nullable()}).loose(),bme=I({documents:F(I({kind:L([`document`,`asset`,`folder`,`file`]).default(`document`),docName:M().min(1).optional(),docExt:M().min(1).default(`.md`),size:N().int().nonnegative(),modified:M().min(1),isSymlink:P().default(!1),canonicalDocName:M().nullable().default(null),targetPath:M().nullable().default(null),path:M().min(1).optional(),assetExt:M().min(1).optional(),mediaKind:L([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:F(M().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(),xme=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),Sme=I({docName:M().min(1),backlinks:F(xme)}).loose(),Cme=I({counts:ao(M().min(1),N().int().nonnegative())}).loose(),wme=I({counts:ao(M().min(1),N().int().nonnegative())}).loose(),Tme=no(`kind`,[I({kind:R(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:R(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),Eme=I({role:M().min(1),sourceForm:M().min(1),targetKind:M().min(1),href:M(),resolvedTarget:M().nullable(),status:M().min(1),reason:M().nullable(),resolutionMethod:M().min(1),fallbackTarget:M().nullable().default(null),range:I({start:N().int().nonnegative(),end:N().int().nonnegative()}),line:N().int().nonnegative(),column:N().int().nonnegative(),definition:I({label:M(),line:N().int().nonnegative()}).nullable().default(null)}).loose(),Dme=I({docName:M().min(1),forwardLinks:F(Tme),localTargets:F(Eme).optional()}).loose(),Ome=no(`kind`,[I({id:M().min(1),kind:R(`doc`),docName:M().min(1),anchor:M().nullable(),label:M(),cluster:M().nullable(),category:M().nullable(),tags:F(M()).nullable(),managed:P().optional()}).loose(),I({id:M().min(1),kind:R(`external`),url:M().min(1),label:M()}).loose()]),kme=I({source:M().min(1),target:M().min(1)}).loose(),Ame=I({nodes:F(Ome),links:F(kme)}).loose(),jme=I({ts:N().int().min(0),url:M(),method:M(),ua:M().optional(),origin:M().optional(),referer:M().optional(),host:M().optional(),remote:M().optional(),secChUa:M().optional(),secChUaMobile:M().optional(),secChUaPlatform:M().optional(),secFetchSite:M().optional(),secFetchDest:M().optional(),secFetchMode:M().optional(),secFetchUser:M().optional()}).loose(),Mme=I({app:to([R(`cursor`),R(`codex`),R(`claude`),Ja()]),signals_fired:F(M())}).loose(),Nme=I({entries:F(jme),count:N().int().min(0),detection:Mme}).loose(),d7=[`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `],f7=I({path:M().min(1),code:L(d7),origPath:M().min(1).optional(),syncScoped:P(),open:no(`kind`,[I({kind:R(`doc`),docName:M().min(1)}),I({kind:R(`asset`),path:M().min(1)})]).optional()}).loose(),Pme=I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(f7),notStaged:F(f7),untracked:F(f7),incoming:F(f7),truncated:P(),readable:P().default(!0)}).loose(),Fme=L([`AWAITING_CHECKS`,`LOCKED`,`MERGEABLE`,`QUEUED`,`UNMERGEABLE`]),Ime=L([`BEHIND`,`BLOCKED`,`CLEAN`,`DIRTY`,`DRAFT`,`HAS_HOOKS`,`UNKNOWN`,`UNSTABLE`]),Lme=L([`APPROVED`,`CHANGES_REQUESTED`,`REVIEW_REQUIRED`]),Rme=L([`ERROR`,`EXPECTED`,`FAILURE`,`PENDING`,`SUCCESS`]),zme=I({mergeQueue:I({position:N().int().nonnegative(),state:Fme.nullable().catch(null)}).nullable().catch(null),autoMerge:P(),mergeState:Ime.nullable().catch(null),reviewDecision:Lme.nullable().catch(null),checks:Rme.nullable().catch(null)}).loose(),p7=I({kind:L([`pull`,`issue`]),repo:M().min(1),number:N().int().positive(),title:M(),author:M().nullable(),createdAt:M(),lifecycle:L([`open`,`draft`,`merged`,`closed`,`completed`,`not-planned`]),additions:N().int().nonnegative().optional(),deletions:N().int().nonnegative().optional(),status:zme.optional()}).loose(),Bme=I({url:M()}).loose(),Vme=no(`ok`,[I({ok:R(!0),preview:p7}).loose(),I({ok:R(!1),reason:M()}).loose()]),Hme=I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:W4,...U4}).loose(),Ume=I({checkpointRef:M().min(1)}).loose(),Wme=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose(),Gme=I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:L([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(Wme),checkpoint:Ya().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),Kme=I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose(),qme=I({contentDir:M().min(1),pathSeparator:L([`/`,`\\`]),symlinkResolved:P()}).loose(),Jme=F(no(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:R(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:R(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),m7=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose(),Yme=I({url:M()}).loose(),Xme=no(`ok`,[I({ok:R(!0),metadata:m7}).loose(),I({ok:R(!1),reason:M()}).loose()]),Zme=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Qme=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),$me=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose(),ehe=I({deadLinks:F(I({target:M().min(1),sources:F($me)}).loose())}).loose(),the=I({target:I({docName:M().min(1),title:M(),aliases:F(M())}).loose(),mentions:F(I({source:M().min(1),excerpt:M(),offset:N().int().nonnegative()}).loose()),truncated:P()}).loose(),nhe=I({projectPath:M().min(1)}).loose(),rhe=L([`not-a-git-worktree`,`init-failed`]),ihe=no(`ok`,[I({ok:R(!0),projectPath:M().min(1)}).loose(),I({ok:R(!1),reason:rhe,message:M().min(1)}).loose()]),ahe=I({host:M().min(1).optional()}).loose(),ohe=I({host:M().min(1).optional(),token:M().min(1)}).loose(),she=I({host:M(),login:M()}).loose(),che=I({key:M().min(1)}).loose(),lhe=I({keyPresent:P()}).loose(),uhe=L([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),dhe=no(`ok`,[I({ok:R(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:R(!1),endpoint:M().min(1),model:M().min(1),reason:uhe,status:N().int().optional()}).loose()]),fhe=I({name:M().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:M().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),phe=I({authenticated:P()}).loose(),mhe=I({channel:L([`login`,`gh-login`]).default(`login`)}).loose(),hhe=I({}).loose(),ghe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),_he=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(ghe)}).loose(),vhe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),yhe=I({sessionAlive:P(),agent:vhe.nullable(),files:F(_he)}).loose(),bhe=I({diff:M(),before:M(),after:M(),properties:Doe,generatedAt:N().int().min(0)}).loose(),xhe=I({}).loose(),She=I({}).loose(),Che=I({}).loose(),whe=I({}).loose(),The=I({}).loose(),Ehe=I({}).loose(),Dhe=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:L([`idle`,`writing`]),ts:N().int().min(0)}).loose(),Ohe=I({presence:ao(M().min(1),Dhe)}).loose(),khe=I({sessionId:M().min(1),agentType:M().min(1),ts:N().int().min(0),insertedChars:N().int().min(0),deletedChars:N().int().min(0)}).loose(),Ahe=I({effects:F(I({"doc.name":M().min(1),entries:F(khe)}).loose())}).loose(),jhe=I({decisions:F(I({ts:N().int().min(0),decision:M().min(1),kind:M().min(1),"doc.name":M().min(1),pathRole:M().min(1)}).loose())}).loose(),Mhe=ao(M().min(1),P()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});I({path:M().min(1,`path must be non-empty`)}).loose();const Nhe=I({}).loose(),Phe=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),Fhe=I({fromPath:M().min(1),toPath:M().min(1)}).loose(),Ihe=I({}).loose(),Lhe=I({path:M().min(1),...U4,summary:W4}).loose(),Rhe=I({docName:M().min(1)}).loose(),zhe=I({path:M().min(1),...U4,summary:W4}).loose(),Bhe=I({path:M().min(1)}).loose(),Vhe=I({kind:L([`file`,`folder`]),path:M().min(1),...U4,summary:W4}).loose(),Hhe=I({kind:L([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),Uhe=I({pages:F(I({docName:M().min(1),title:M(),docExt:M().min(1),size:N().int().nonnegative(),modified:M().min(1),icon:M().min(1).max(2048).optional()}).loose())}).loose(),Whe=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),Ghe=I({docName:M().min(1),headings:F(Whe)}).loose(),Khe=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose(),qhe=I({kind:L([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...U4,summary:W4}).loose(),Jhe=I({renamed:F(Phe),renamedAssets:F(Fhe),rewrittenDocs:F(Khe).optional(),summary:w5.optional()}).loose(),Yhe=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...U4}).loose(),Xhe=I({deletedDocNames:F(M().min(1))}).loose(),Zhe=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...U4,summary:W4}).loose(),Qhe=I({deletedDocNames:F(M().min(1))}).loose(),$he=I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:W4,...U4}).loose(),ege=I({restoredFrom:M().min(1),timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),tge=/^#[0-9a-fA-F]{6}$/,nge=I(Object.fromEntries(Zd.map(e=>[e,M().regex(tge,`must be a #rrggbb hex color`)]))),h7=M().min(1).refine(nf,{message:`must contain a non-whitespace character`}),g7=I({name:h7,author:h7.optional(),variant:L([`dark`,`light`]),palette:nge}).loose(),rge=I({name:M().min(1),scheme:g7,stem:M().min(1).optional(),extension:L([`.yaml`,`.yml`]).optional()}).loose(),ige=I({id:M().min(1),filename:M().min(1)}).loose(),age=I({id:M().min(1),scheme:g7}).loose(),oge=I({id:M().min(1),filename:M().min(1)}).loose(),sge=no(`existed`,[I({existed:R(!1)}).loose(),I({existed:R(!0),filename:M().min(1),scheme:g7}).loose()]),cge=I({themes:F(no(`ok`,[I({ok:R(!0),id:M().min(1),filename:M().min(1),scheme:g7}),I({ok:R(!1),filename:M().min(1),id:M().min(1).optional(),code:M().min(1),conflictingFilenames:F(M().min(1)).min(2).optional()})])),truncated:P()}).loose(),lge=L([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),uge=I({label:M().min(1),webUrl:Aa().nullable()}).loose(),dge=no(`checkStatus`,[I({checkStatus:R(`allowed`)}).loose(),I({checkStatus:R(`denied`),deniedReason:L([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:R(`unknown`),unknownError:L([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),_7=L([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),fge=L(Eu),pge=L([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]),mge=I({state:lge,lastSyncUtc:M().nullable(),lastRunUtc:M().nullable().optional(),lastPullOkUtc:M().nullable().optional(),lastPushOkUtc:M().nullable().optional(),lastFetchUtc:M().nullable(),lastPushedSha:M().nullable(),ahead:N().int().min(0),behind:N().int().min(0),consecutiveFailures:N().int().min(0),consecutivePushFailures:N().int().min(0).optional(),conflictCount:N().int().min(0),hasRemote:P(),syncEnabled:P(),identityUnresolved:P(),remote:uge.nullable().optional(),pushError:M().optional(),pushErrorCode:_7.optional(),pullError:M().optional(),pullErrorCode:_7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:dge.optional(),syncMode:fge.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:pge.nullable().optional()}).loose(),hge=I({action:L([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),gge=I({action:L([`commit`])}).loose(),_ge=I({op:L([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),vge=I({op:L([`sync`,`push`,`pull`,`fetch`])}).loose(),v7=[`merge-native`,`working-tree`,`reconcile`],y7=L(v7),b7=[`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`],x7=L(b7),yge=L([`mine`,`theirs`,`content`,`delete`]),bge=I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflict:y7,reason:x7.optional().catch(void 0),conflictKind:L([`git`,`stale-external-write`]).optional(),docName:M().nullable(),theirsSha:M().optional(),baseSha:M().optional()}).loose())}).loose(),xge=I({file:M().min(1),strategy:L([`mine`,`theirs`,`content`,`delete`]),content:M().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),Sge=I({}).loose(),Cge=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:L([`both-modified`,`delete-modify`,`modify-delete`]),conflict:y7,reason:x7.optional().catch(void 0),conflictKind:L([`git`,`stale-external-write`]).optional(),resolutionOptions:F(yge)}).loose(),wge=I({plan:_o(e=>e!==void 0,{message:`plan is required`})}).loose(),Tge=I({plan:_o(e=>e!==void 0,{message:`plan is required`})}).loose(),Ege=I({result:_o(e=>e!==void 0,{message:`result is required`})}).loose(),Dge=I({packId:M().min(1)}).strict(),Oge=I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict(),kge=I({path:M().min(1),summary:M().min(1)}).loose(),Age=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose(),jge=I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(kge),entryCounts:Age}).loose())}).loose(),Mge=I({noOpen:P().optional(),out:M().min(1).optional()}).loose(),Nge=I({reason:L([`unsupported-platform`,`spawn-error`]),message:M()}).loose(),Pge=no(`status`,[I({status:R(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:R(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:Nge.optional()}).loose(),I({status:R(`failed`),buildError:M()}).loose(),I({status:R(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]),S7=L(ce),Fge=L(le);function Ige(e){return e===`agents`||le.includes(e)}const Lge=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),Rge=[`.md`,`.mdx`,`.txt`];function C7(e){return Math.round(e/4)}function zge(e){let t=e.lastIndexOf(`.`);return t!==-1&&Rge.includes(e.slice(t).toLowerCase())}function Bge(e){let t=C7((e.name??``).length+(e.description??``).length),n=C7(qc(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||zge(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:C7(i)}}const w7=I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose(),Vge=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose(),Hge=I({name:M().min(1),docs:F(Vge)}).loose(),Uge=I({folder:Ya(),frontmatter_local:ao(M(),Ya()).nullable(),warnings:F(M()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete — the aligned `warningCodes` entry names which field and how."}),warningCodes:F(L([`symlink-refused`,`malformed-yaml`,`unverifiable`,`templates-symlink-refused`,`templates-unverifiable`])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) — `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from — a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure — `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),Wge=I({path:M(),frontmatter:ao(M(),Ya()).optional()}).loose(),Gge=I({applied:Ya()}).loose(),T7=ao(M(),Ya()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Kge=I({template:I({name:M().min(1),folder:M(),scope:L([`local`,`inherited`]),path:M().min(1),frontmatter:T7,body:M()}).strict()}).strict(),qge=I({templates:F(I({name:M().min(1),title:M().optional(),description:M().optional(),path:M().min(1),source_folder:M()}).strict()),truncated:P()}).strict(),Jge=I({folder:M(),name:M(),body:M().optional(),frontmatter:T7.optional(),...U4,summary:W4}).strict(),Yge=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Xge=I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...U4,summary:W4}).strict(),Zge=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Qge=I({existed:P(),path:M().min(1)}).strict(),$ge=I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:T7.optional(),...U4,summary:W4}).strict(),e_e=I({from:M().min(1),to:M().min(1),committed:P()}).strict(),E7=L(fl),t_e=/^[a-z0-9-]+$/,n_e=/<\/?[A-Za-z][^>]*>/;function r_e(e){return n_e.test(e)}const i_e=/^[A-Za-z0-9_-]+$/,D7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict(),a_e=I({skill:I({name:M().min(1),scope:E7,path:M().min(1),frontmatter:D7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict(),o_e=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),s_e=I({name:M().min(1),description:M().optional(),scope:E7,path:M().min(1),canonicalPath:M().min(1).optional(),filePaths:F(M()).optional(),absolutePath:M().min(1).optional(),installed:P(),hosts:F(M()),hostQualifier:M().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:F(M()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:ao(M(),M()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:F(M()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:F(M()).optional(),installableEditors:F(M()).optional(),hubOffered:P().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine — server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads it is installed (`HUB_READER_EDITORS`)."}),linkMode:P().optional(),customPlacements:F(I({path:M(),mode:L([`copy`,`link`])}).strict()).optional(),plugin:I({name:M().min(1),marketplace:M().min(1),provider:M().min(1),url:M().optional()}).strict().optional(),managed:P().optional(),origin:o_e.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:Lge.optional()}).strict(),c_e=I({name:M().min(1),scope:E7,apply:P().optional()}).strict(),l_e=I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict(),u_e=I({skills:F(s_e),truncated:P()}).strict(),d_e=I({scope:E7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:D7,...U4,summary:W4}).strict(),O7=[`skill-name-vendor-word`,`skill-body-too-long`],k7=F(L(O7)).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."}),f_e=I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:k7}).strict(),p_e=I({scope:E7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...U4,summary:W4}).strict(),m_e=I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:k7}).strict(),h_e=I({scope:E7.default(`project`),name:M(),...U4,summary:W4}).strict(),g_e=I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict(),A7=`This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.`,__e=I({existed:P(),path:M().min(1),warnings:F(M()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged — either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${A7}`})}).strict(),v_e=I({scope:E7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:D7.optional(),...U4,summary:W4}).strict(),y_e=I({from:M().min(1),to:M().min(1),committed:P(),warnings:F(M()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${A7}`})}).strict(),b_e=I({name:M(),toName:M().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:E7,toScope:E7,...U4,summary:W4}).strict(),j7=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function x_e(e){return typeof e==`string`&&j7.includes(e)}const M7=[`intact`,`lossy`,`unknown`];function N7(e){return typeof e==`string`&&M7.includes(e)}const P7=[`unreadable`,`occupant-unverifiable`];function S_e(e){return typeof e==`string`&&P7.includes(e)}const C_e={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function w_e(e){return C_e[e]}function T_e(e){let t=typeof e==`object`&&e?e:{},n=t.moveState,r=t.sourceState,i=t.retentionLedger;if(n===void 0&&r===void 0&&i===void 0)return{kind:`coherent`};let a=x_e(n)?n:void 0,o=N7(r)?r:void 0,s=S_e(i)?i:void 0,c={...a===void 0?{}:{moveState:a},...o===void 0?{}:{sourceState:o},...s===void 0?{}:{retentionLedger:s}};return n!==void 0&&a===void 0||r!==void 0&&o===void 0||i!==void 0&&s===void 0||a===void 0?{kind:`unverified`,...c}:(w_e(a)?o!==void 0&&s===void 0:a===`nothing-written`?o===void 0:o===void 0&&s===void 0)?{kind:`coherent`,...c}:{kind:`unverified`,...c}}const F7=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function E_e(e){if(e===void 0)return[];let t=F7;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}const D_e=I({scope:E7,path:M().optional(),droppedLocations:F(M()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:F(M()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${A7}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),O_e=I({scope:E7,name:M(),toName:M(),...U4,summary:W4}).strict(),k_e=I({name:M().min(1)}).strict(),A_e=I({name:M(),home:M().min(1)}).strict(),j_e=I({docName:M().min(1)}).strict(),I7=L([`reference`,`script`,`file`]),M_e=I({scope:E7.default(`project`),name:M(),path:M().min(1),content:M(),...U4,summary:W4}).strict(),N_e=I({path:M().min(1),created:P(),kind:I7,content:P()}).strict(),P_e=I({scope:E7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...U4,summary:W4}).strict(),F_e=I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I_e=I({path:M().min(1),kind:I7,text:M()}).strict(),L_e=I({path:M().min(1),existed:P(),kind:I7}).strict(),L7=to([Fge,R(`agents`)]),R7=M().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),z7=to([L7,R7]),R_e=I({scope:E7.default(`project`),name:M(),targets:F(L7).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:F(z7).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:F(z7).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:L([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:z7.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:P().optional(),setSource:M().min(1).optional(),place:I({dir:M().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:L([`copy`,`link`])}).strict().optional(),convert:I({target:z7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:L([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:I({path:M().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...U4,summary:W4,fork:I({editor:M().min(1),action:L([`align`,`make-source`,`rename`]),toName:M().optional()}).strict().optional()}).strict().refine(e=>e.targets===void 0||e.add===void 0&&e.remove===void 0,{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>e.source===void 0||e.add===void 0&&e.remove===void 0,{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),B7=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`],z_e=I({name:M().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:F(M()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:P().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:F(M()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:F(L(B7)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),B_e=I({scope:E7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),V_e=I({name:M().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:P().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict(),H_e=I({targets:F(S7),configured:P(),folders:F(I({scope:E7,host:M(),root:M(),state:L([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:R(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),V7=I({action:R(`link`),scope:E7,root:M().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:M().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),H7=I({action:R(`unlink`),scope:E7,root:M().min(1).meta({description:`The linked folder to materialize back.`}),exclude:F(M().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),U7=I({action:R(`add-root`),scope:E7,root:R7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),U_e=no(`action`,[V7.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),H7,U7]),W_e=no(`action`,[V7.strict(),H7,U7]),G_e=I({folderAction:U_e}).strict(),K_e=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict(),q_e=I({targets:F(S7),reprojected:F(I({name:M(),hosts:F(M())}).strict()),bundleHosts:F(M()),removedFrom:F(M()),folder:I({moved:F(M()),dropped:F(M()),linked:F(M())}).strict().optional(),preview:K_e.optional()}).strict(),J_e=I({scope:E7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...U4,summary:W4}).strict(),Y_e=I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),X_e=I({query:M().optional(),intent:L([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:L([`navigation`,`relevance`]).optional(),scopes:F(L([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:L([`omnibar`,`mcp`,`http`]).optional()}).loose(),Z_e=I({kind:L([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:ao(M(),Ya()),snippet:M().optional()}).loose(),W7=L([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),G7=L([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Q_e(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function $_e(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function eve(e,t){let n=e?.providerErrorReason;switch(n){case null:case void 0:return e?.providerError===!0;case`corpus`:return!1;case`query`:return t===`query`;case`warm`:case`dimensions`:case`configured_dimensions`:return!0;default:return $_e(n)}}function tve(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}const K7=I({capable:P(),applied:P(),outcome:W7,providerErrorReason:G7.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),nve=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:L([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:G7.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function rve(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}const ive=I({query:M(),intent:L([`autocomplete`,`full_text`,`omnibar`]),results:F(Z_e),elapsedMs:N().nonnegative(),semantic:K7.optional(),truncated:P().optional(),ready:P().optional()}).loose(),ave=I({version:M().min(1),recordedAt:M().min(1)}).loose(),ove=I({currentVersion:M().min(1),targets:ao(M(),ave.nullable())}).loose(),sve=I({scope:E7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:M().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...U4,summary:W4}).strict(),cve=I({scope:E7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:F(M().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...U4,summary:W4}).strict(),lve=I({results:F(I({requested:M(),status:L([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:k7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),uve=I({scope:E7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...U4,summary:W4}).strict(),dve=I({results:F(I({requested:M(),status:L([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:k7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose(),fve=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose(),pve=I({name:M().min(1).meta({description:`Managed skill name created or matched.`}),path:M().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:P().meta({description:`True when this request created new source files.`}),alreadyImported:P().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:M().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:fve,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:k7}).loose(),q7=`server-info`,J7=`branch-switched`,Y7=`disk-ack`,X7=`config-validation-rejected`,Z7=`config-ignore-nested-error`,mve=L([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),hve=I({v:R(1),ch:R(q7),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),gve=I({v:R(1),ch:R(J7),seq:N(),branch:M().min(1)}).loose(),_ve=I({v:R(1),ch:mve,seq:N()}).loose(),vve=I({v:R(1),ch:R(Y7),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),yve=I({v:R(1),ch:R(X7),seq:N(),docName:M().min(1),error:bne}).loose(),bve=I({v:R(1),ch:R(Z7),seq:N(),path:M().min(1),error:M().min(1)}).loose(),xve={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},Q7=new WeakMap;function Sve(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function $7(e){return e.trim().toLowerCase()}const Cve=/\.(?:md|mdx)$/;function wve(e,t){if(t!==`page`)return e;let n=e.replace(Cve,``);return n.length>0?n:e}function Tve(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Eve(e){let t=Tve(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}}const e9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,t9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function Dve(){let e=FY({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!t9||typeof e!=`string`||!e9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of t9.segment(e)){if(!n||!e9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function n9(e){let t=YY({schema:xve,components:{tokenizer:Dve()}});return e.length>0&&oX(t,e),t}function r9(e){let t={documents:e};return Q7.set(t,n9(e)),t}function Ove(e){let t=Q7.get(e);if(t)return t;let n=n9(e.documents);return Q7.set(e,n),n}const i9=new WeakSet;function kve(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 Ave(e,t){let n=e=>({corpus:r9(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=Q7.get(e);if(!r)return n(`no-index`);if(i9.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?kve(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`);i9.add(e);try{if(a.length>0&&fX(r,a),o.length>0&&oX(r,o),ZY(r)!==t.length)throw Error(`Search index count ${ZY(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return Q7.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function jve(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function a9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Mve(e,t){let n=$7(t);if(!n)return 0;let r=wve(n,e.kind),i=$7(e.title),a=$7(e.name),o=$7(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 o9(e,t){let n=Mve(e,t);return n<=0?n:B4(e.path)?n*.5:n}function Nve(e){return e===`file`?-60:0}function Pve(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 s9(e,t,n,r){return e+t*20+n+Nve(r)}function c9(e,t,n,r,i,a){return e===`relevance`?s9(t,n,r,i):Pve(t,n,r,i,a)}function Fve(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function l9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function Ive(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 Lve(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Rve(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}}const zve=/[฀-๿ក-៿ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿\uf900-﫿＀-￯\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Bve(e,t){let n=$7(t);return n.length<4||zve.test(n)?0:+(e===`full_text`)}function Vve(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function Hve(e){let t=[],n=[],r=[];for(let i of e){let e=Vve(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 u9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Hve(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 Uve(e,t,n={}){let r=n.intent??`omnibar`,i=Fve(r,n.ranking),a=Sve(n.limit),o=new Set(n.scopes??jve(r)),s=e.documents.filter(e=>a9(e,o)),c=$7(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=HX(Ove(e),{term:c,properties:Lve(r),boost:Rve(r),tolerance:Bve(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>a9(e.document,o)).map(e=>[e.document.id,e.score])),d=Ive(s),f=new Map;for(let e of s)o9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)a9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=l9(f.values(),u);return u9([...f.values()].map(t=>{let n=Math.max(0,o9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:c9(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 u9(Wve({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function d9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Wve(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=l9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,o9(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?c9(o,t,n,s,e.kind,m):s9(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=d9(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)),_=d9(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}))}function Gve(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}const Kve=/^[A-Za-z0-9._-]+$/,qve=/^(?:\d{1,3}\.){3}\d{1,3}$/;var f9=class extends Error{constructor(e){super(e),this.name=`InvalidShareUrlError`}};function Jve(e,t=0){if(m9(t,!0),t===0)return Zve(e);if(e.length>2985)throw new f9(`Share URL exceeds the v2 URL size limit`);Xve(p9(e),t);let n=new TextEncoder().encode(e);if(n.length>2985)throw new f9(`Share URL exceeds the v2 URL size limit`);let r=new Uint8Array(3+n.length);if(r[0]=2,r[1]=t>>>8,r[2]=t&255,r.set(n,3),r.length>2988)throw new f9(`Share payload exceeds the v2 size limit`);let i=b9(r);if(i.length>3984)throw new f9(`Share token exceeds the v2 size limit`);return i}function p9(e){if(!e.startsWith(`https://`))throw new f9(`Share URL must use canonical HTTPS spelling`);if(e.includes(`?`)||e.includes(`#`))throw new f9(`Share URL cannot contain a query or fragment`);let t=e.slice(8),n=t.indexOf(`/`);if(n<=0)throw new f9(`Share URL is missing its repository path`);let r=t.slice(0,n);h9(r);let i=t.slice(n+1).split(`/`);if(i.length<4||i.some(e=>e.length===0))throw new f9(`Share URL has an invalid path shape`);let[a,o,s,c,...l]=i;if(s!==`blob`&&s!==`tree`)throw new f9(`Share URL has an unsupported repository path shape`);let u=g9(a,`owner`),d=g9(o,`repository`),f=Qve(c),p=l.map(e=>$ve(e,`target`)),m=s===`blob`?`doc`:`folder`;if(m===`doc`&&p.length===0)throw new f9(`Document share URL is missing its target path`);let h={host:r,owner:u,repo:d,branch:f,kind:m,targetSegments:p};if(Yve(h)!==e)throw new f9(`Share URL is not canonically serialized`);return h}function Yve(e){if(h9(e.host),y9(e.owner,`owner`),y9(e.repo,`repository`),!J4(e.branch))throw new f9(`Share URL branch is invalid`);if(e.kind!==`doc`&&e.kind!==`folder`)throw new f9(`Share URL target kind is invalid`);if(e.kind===`doc`&&e.targetSegments.length===0)throw new f9(`Document share URL is missing its target path`);for(let t of e.targetSegments)v9(t,`target`);let t=e.kind===`doc`?`blob`:`tree`,n=[encodeURIComponent(e.owner),encodeURIComponent(e.repo),t,encodeURIComponent(e.branch),...e.targetSegments.map(e=>encodeURIComponent(e))];return`https://${e.host}/${n.join(`/`)}`}function Xve(e,t){if(m9(t,!1),t>e.targetSegments.length)throw new f9(`Content root depth exceeds the repository target path`);let n=e.targetSegments.slice(t).join(`/`);if(e.kind===`doc`){if(n.length===0)throw new f9(`Document share target cannot be the content root`);return{kind:`doc`,docPath:n}}return{kind:`folder`,folderPath:n}}function Zve(e){let t=new TextEncoder().encode(e),n=new Uint8Array(1+t.length);return n[0]=1,n.set(t,1),b9(n)}function m9(e,t){if(!Number.isInteger(e)||e<+!t||e>65535)throw new f9(`Content root depth is invalid`)}function h9(e){if(e.length===0||e.length>253||e.endsWith(`.`)||e!==e.toLowerCase()||qve.test(e))throw new f9(`Share URL host is not canonical`);if(e.split(`.`).some(e=>e.length===0||e.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e)))throw new f9(`Share URL host is not a DNS name`);if(Wu(e)!==e)throw new f9(`Share URL host is not a canonical GitHub host`)}function Qve(e){let t=_9(e,`branch`);if(!J4(t))throw new f9(`Share URL branch is invalid`);return t}function $ve(e,t){let n=_9(e,t);return v9(n,t),n}function g9(e,t){let n=_9(e,t);return y9(n,t),n}function _9(e,t){let n;try{n=decodeURIComponent(e)}catch{throw new f9(`Share URL ${t} has malformed percent encoding`)}if(encodeURIComponent(n)!==e)throw new f9(`Share URL ${t} is not canonically encoded`);return n}function v9(e,t){if(e.length===0||e===`.`||e===`..`||e.toLowerCase()===`.git`||e.includes(`/`)||e.includes(`\\`)||eye(e))throw new f9(`Share URL ${t} component is invalid`)}function y9(e,t){if(v9(e,t),!Kve.test(e)||e.startsWith(`-`))throw new f9(`Share URL ${t} component is invalid`)}function eye(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function b9(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}const x9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),S9=globalThis;S9[x9]===void 0&&(S9[x9]=tr());const C9=S9[x9],tye=[`.ok`,`skill-state.yml`],nye=[`claude-cowork`,`cli-hosts`],rye=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],w9=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,T9=$a({version:M().regex(w9,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(C9,{description:`Recorded skill version for this target.`}),recordedAt:$i().register(C9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:L(rye).register(C9,{description:`Install-source surface that recorded this entry.`}).optional()}),iye=$a({enabled:P().register(C9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:$i().register(C9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),aye=$a({schema:R(1).register(C9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:$a({"claude-cowork":T9.optional(),"cli-hosts":T9.optional()}).register(C9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:ao(M(),iye).register(C9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(C9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function oye(e,t){return e??t.installedOnDisk}function sye(){return{schema:1,targets:{}}}const cye=[`auth-error`,`detached-head`,`dirty-tree`,`diverged-local-commits`,`external-changes-pending`,`git-index-locked`,`git-operation-in-progress`,`no-commits-yet`,`no-push-permission`,`non-content-merge-failure`,`protected-branch`],E9=`template`;function D9(e){if(e.trim()===``)return{};let t;try{t=(0,Lc.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function O9(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function lye(e){let{frontmatter:t,body:n}=qc(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Yc(t),markdown:n}}function uye(e){let t=e.split(`
538
+ `)},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=i8(i.attributes??[]);if(!i.children||i.children.length===0)return s?c?`<${s} ${c} />`:`<${s} />`:``;let l={...i,attributes:(i.attributes??[]).map(jue),children:(i.children??[]).map(kue)};return Due(l,t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=d8(n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),r,`==`),o+=i.move(`==`),a(),o},underline(e,t,n,r){let i=e.data?.sourceForm===`ins`?`<ins>`:`<u>`,a=e.data?.sourceForm===`ins`?`</ins>`:`</u>`,o=n.createTracker(r),s=n.enter(`underline`),c=o.move(i);return c+=n.containerPhrasing(e,{before:c,after:a,...o.current()}),c+=o.move(a),s(),c},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=i8(e.attributes??[]),i=(e.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return i?r?`<${n} ${r}>${i}</${n}>`:`<${n}>${i}</${n}>`: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&&!Oue.test(e)?e:i===`none`||i===0?`>${e}`:typeof i==`number`&&i>=2&&!e.startsWith(` `)?`>${` `.repeat(i)}${e}`:`> ${e}`})}};function i8(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}={${a8(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function a8(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function jue(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:a8(e.value)}}:e}function o8(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function s8(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 Mue(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>Nue(t)?e:`\\${e}`)}function Nue(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 Pue=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Fue(e){return e.replace(Pue,e=>L1(e)?``+e.slice(1):e)}function Iue(e){return/[\r\n][\t ]*$/.test(e)}function c8(e,t,n,r=!1){let{matched:i}=X3(t,{escapeAware:!1});if(i.length===0)return l8(e,t,n,r);let a=``,o=0,s=i=>{i>o&&(a+=l8(e,t.slice(o,i),{...n,before:n.before+a,after:t.slice(i,i+1)||n.after},r)),o=i};for(let e of i)s(e.start),!Iue(n.before+a)&&(a+=t.slice(e.start,e.end),o=e.end);return s(t.length),a}function l8(e,t,n,r=!1){let i=e.unsafe;e.unsafe=i.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]`||r&&e.character===`:`&&e.before===`[ps]`&&e.after===`\\/`||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
539
+ ]|$)`};return delete t._compiled,t});let a;try{a=e.safe(Fue(t),n)}finally{e.unsafe=i}return a=a.replaceAll(``,`\\&`),Mue(zue(a,n))}function u8(e){if(Number.isNaN(e))return`ws`;let t=xN(e);return t===1?`ws`:t===2?`punct`:`other`}function Lue(e,t,n){let r=u8(t),i=u8(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 Rue(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
540
+ `||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function zue(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)&&Rue(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+=Lue(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function d8(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);f8(i.charCodeAt(i.length-1),s,r)&&(o=p8(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return f8(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+p8(c)),o}function f8(e,t,n){return!(xN(t)!==1||n===`_`&&xN(e)===void 0)}function p8(e){return`&#x${e.toString(16).toUpperCase()};`}function Bue(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!Hue(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 Vue(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=d8(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function Hue(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(`\\`))}const m8=[{mode:`protecting`,protect:Vce,reservations:zce},{mode:`protecting`,protect:Mce,reservations:hce},{mode:`protecting`,protect:Lce,reservations:Pce},{mode:`serializer-only`,reservations:[{to:``}]}],Uue=new Set(m8.flatMap(({reservations:e})=>e.map(({to:e})=>e)));function Wue(e,t){switch(t.mode){case`protecting`:return t.protect(e);case`serializer-only`:return e}}function h8(e){return m8.reduce(Wue,e)}function Gue(e){return Uue.has(e)}function g8(e){return e.data?.sourceRaw}function Kue(e){return e.type===`text`?e.value===``:e.type===`mdxJsxTextElement`&&g8(e)===``}function _8(e){return e.type===`paragraph`&&(e.children??[]).every(Kue)}function v8(e){let t=e.children??[],n=t[0]?.children?.length??0,r=0;for(let e=1;e<t.length;e++)r=Math.max(r,t[e]?.children?.length??0);let i=e.align??[];return Math.max(n,r,i.length)}function que(e){switch(e.type){case`table`:return v8(e)===0;case`code`:return e.data?.sourceStyle===`indented`&&/^\n*$/.test(e.value??``);case`thematicBreak`:return g8(e)===``;case`html`:return(e.value??``)===``;case`mdxJsxFlowElement`:return g8(e)===void 0&&e.data?.htmlBoundary===void 0&&(e.children??[]).length===0&&!e.name;case`list`:return(e.children??[]).length===0;default:return!1}}function Jue(e){let t=[];for(let n of e.children){if(n.type===`table`&&v8(n)===0){console.warn(JSON.stringify({event:`table-serialize-dropped-empty`,rows:(n.children??[]).length}));continue}que(n)||(n.type===`paragraph`&&n.children.length>0&&_8(n)&&(n.children=[]),t.push(n))}e.children=t}function Yue(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}const Xue=(e,t)=>{if(_8(e)||Yue(e,t))return 0;let n=e.position,r=t.position;if(!n||!r)return;let i=r.start.line-n.end.line-1;return i>=1?i:void 0},y8=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function Zue(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;let a=c6(e);y8.lastIndex=0;let o=[],s;for(;(s=y8.exec(i))!==null;){let e=s.index,t=e+s[0].length;if(u6(a,e,1)||u6(a,t-1,1)){y8.lastIndex=e+1;continue}o.push(s)}if(o.length===0)return;let c=[],l=0;for(let t of o){let r=t.index,i=r+t[0].length;r>l&&c.push(l6(n,e,l,r));let a={type:`inlineMath`,value:t[1]},o=f6(n,e,r,i);o&&(a.position=o),c.push(a),l=i}return l<i.length&&c.push(l6(n,e,l,i.length)),r.children.splice(t,1,...c),[zj,t+c.length]})}}const Que=new Set([`strong`,`emphasis`,`delete`,`link`,`mark`,`comment`]);function $ue(e){if(e?.type!==`break`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}function ede(e){e.data??={},e.data.sourceRaw=`<br />`,e.data.sourceStyle=`html`}function b8(e){if(e?.type!==`text`)return!1;let t=e.data?.sourceRaw;return typeof t!=`string`||t.length===0}const x8=/[ \t]+$/,S8=/^[ \t]*$/;function tde(e){return e.some(e=>!(b8(e)&&S8.test(e.value)))}function C8(e,t=!1){for(;e.length>0;){let n=e[e.length-1];if($ue(n)){ede(n);break}if(n&&Que.has(n.type)&&`children`in n){let t=n.children;if(C8(t,!0),t.length===0){e.pop();continue}}if(!t&&b8(n)&&x8.test(n.value)){let t=n.value.replace(x8,``);if(t.length>0){n.value=t;continue}if(tde(e.slice(0,-1))){e.pop();continue}if(e.every(e=>b8(e)&&S8.test(e.value))){let t=e[0];t.value=t.value.charAt(0),e.splice(1)}}break}}const nde=new Set([`paragraph`,`heading`,`tableCell`]);function rde(e){let t=e=>{if(nde.has(e.type)&&`children`in e&&C8(e.children),`children`in e)for(let n of e.children)t(n)};t(e)}const w8={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function ide(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===w8)||e.toMarkdownExtensions.push(w8)}const ade=new Set([`u`,`ins`]);function ode(){return e=>{Hj(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name===null||!ade.has(e.name)||(e.attributes??[]).length>0)return;let r={type:`underline`,children:e.children??[],data:{sourceForm:e.name===`ins`?`ins`:`u`}};return e.position&&(r.position=e.position),n.children.splice(t,1,r),t+1})}}const T8=/(?<!\uE102)<br[ \t]*\/?>/g,sde=new Set([`mdxJsxTextElement`,`mdxJsxFlowElement`]);function cde(e,t){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;T8.lastIndex=0;let a=[],o=0;for(;;){let n=T8.exec(e);if(n===null)break;let s=n.index;s>o&&a.push(l6(t,i,o,s));let c={type:`break`,data:{sourceStyle:`html`,sourceRaw:n[0]}},l=f6(t,i,s,s+n[0].length);l&&(c.position=l),a.push(c),o=s+n[0].length,r=!0}a.length===0?n.push(i):(o<e.length&&a.push(l6(t,i,o,e.length)),n.push(...a))}r&&(e.children=n)}function lde(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Hj(e,e=>{if(sde.has(e.type))return zj;let t=e;Array.isArray(t.children)&&cde(e,n)})}}function E8(e){return e===-2?` `:e===-1?` `:String.fromCharCode(e)}const ude={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;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?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===124?S4(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),a+=E8(t),c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(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(`wikiLinkAlias`),d(t)):(e.consume(t),i++,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)}}},dde={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=``;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?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===35?a.trim()===``?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===124?S4(a)?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),a+=E8(t),l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?r===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===124?r===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===91?n(t):t===93?i===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),i++,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 fde(){return{text:{91:ude,33:dde}}}function pde(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function mde(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function D8(e){return e.stack[e.stack.length-1]}function hde(e){let t=D8(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function gde(e){let t=D8(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 _de(e){let t=D8(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)}function vde(e){let t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},n=y4(t,{separatorCrossed:t.alias!==null||e.data.sourceAlias!=null});n.target!==t.target&&(e.data.sourceTarget??=t.target,e.data.target=n.target),n.anchor!==t.anchor&&(e.data.sourceAnchor??=t.anchor,e.data.anchor=n.anchor),n.alias!==t.alias&&(e.data.sourceAlias??=t.alias,e.data.alias=n.alias)}function O8(e){vde(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 yde(e){O8(D8(this)),this.exit(e)}function bde(e){O8(D8(this)),this.exit(e)}const k8={enter:{wikiLink:pde,wikiLinkEmbed:mde},exit:{wikiLinkTarget:hde,wikiLinkAnchor:gde,wikiLinkAlias:_de,wikiLink:yde,wikiLinkEmbed:bde}};function A8(e){return(t,n,r,i)=>{let a=t.data,o=r.stack.includes(`tableCell`),s=e=>o?T4(e):e,c=a?.target??``,l=a?.anchor,u=a?.alias,d=`${e}${s(x4(a?.sourceTarget,c,`separatorAdjacent`))}`;if(l)d+=`#${s(x4(a?.sourceAnchor,l,`separatorAdjacent`))}`;else{let e=s(x4(a?.sourceAnchor,``,`separatorAdjacent`));e.length>0&&(d+=`#${e}`)}let f=u?x4(a?.sourceAlias,u,`alias`):x4(a?.sourceAlias,``,`alias`);if(f.length>0){let e=o&&!d.endsWith(`\\`)?`\\|`:`|`;d+=`${e}${s(f)}`}return`${d}]]`}}const j8={handlers:{wikiLink:A8(`[[`),wikiLinkEmbed:A8(`![[`)},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},M8=fde();function N8(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===M8)||e.micromarkExtensions.push(M8),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===k8)||e.fromMarkdownExtensions.push(k8),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===j8)||e.toMarkdownExtensions.push(j8)}function xde(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}const Sde=[{name:`remark-parse`,plugin:Lz},{name:`escape-provenance`,plugin:Wle},{name:`remark-mdx-agnostic`,plugin:r8},{name:`remark-gfm`,plugin:NL},{name:`remark-math`,plugin:QR,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:N8},{name:`remark-github-alerts`,plugin:BR,options:Qce},{name:`callout-transformer`,plugin:Zce},{name:`restore-from-mdx`,plugin:Nce},{name:`void-br-promoter`,plugin:lde},{name:`restore-entity-refs`,plugin:Rce},{name:`restore-backslash-escapes`,plugin:Hce},{name:`details-accordion-promoter`,plugin:Ele},{name:`div-align-promoter`,plugin:Nle},{name:`image-promoter`,plugin:Jle},{name:`indented-code-promoter`,plugin:$le},{name:`math-promoter`,plugin:oue},{name:`single-dollar-math-promoter`,plugin:Zue},{name:`highlight-promoter`,plugin:qle},{name:`underline-promoter`,plugin:ode},{name:`mermaid-promoter`,plugin:gue},{name:`comment-promoter`,plugin:ile},{name:`merged-post-parse-walker`,plugin:mue},{name:`empty-task-item-unmint`,plugin:Rle},{name:`link-reference-destination`,plugin:aue},{name:`non-rendering-context-demote`,plugin:wue},{name:`ensure-non-empty-doc`,plugin:()=>xde}];function Cde(e){let t=HL();for(let e of Sde)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(fR,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function wde(e){let t=HL().use(IR,[`yaml`]).use(NL,{tablePipeAlign:!1}).use(QR,{singleDollarTextMath:!1}).use(r8).use(N8).use(ide).use(PL,{bullet:`-`,fences:!0,rule:`-`,join:[Xue],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function P8(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}const F8=/^\n+$/,I8=/^\n{2,}$/;function L8(e,t,n){let r,i,a=e.children;if(a.length>0){let e=a[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);F8.test(n)&&(r=n)}let n=a[a.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);I8.test(e)&&(i=e)}}if(!n&&r===void 0&&i===void 0)return;let o={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i}};return e.data??={},e.data.sourceDocBoundary=o,o}function Tde(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&F8.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&I8.test(t.trailing)&&(n.trailing=t.trailing),n.bom||n.leading||n.trailing?n:void 0}function Ede(e,t){let{source:n,hadBom:r}=P8(e),i=C6(n),a=new pj(h8(i)),o=t.parse(a);a.value=i;let s=t.runSync(o,a);B6(s,i);let c=L8(s,i,r),l=c?$Q(s,c):void 0,u=t.stringify(s);return l?u.type.create({...u.attrs,sourceDocBoundary:l},u.content,u.marks):u}function Dde(e,t){return R8(e,t,!1)}function Ode(e,t){return R8(e,t,!0)}function R8(e,t,n){let{source:r,hadBom:i}=P8(e),a=C6(r),o=new pj(h8(a)),s=t.parse(o);o.value=a;let c=t.runSync(s,o);n&&B6(c,a);let l=L8(c,a,i);return n&&l&&$Q(c,l),c}function kde(e,t,n){let r=mR(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});z8(r),Ile(r),rde(r),Jue(r);let i=Tde(e.attrs?.sourceDocBoundary),a=String(t.stringify(r));return i?.leading&&(a=i.leading+a),i?.trailing&&(a=a.replace(/\n+$/,``)+i.trailing),i?.bom&&(a=`\uFEFF${a}`),a}function z8(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)z8(t);for(let t=0;t+1<e.children.length;){let n=e.children[t],r=e.children[t+1],i=n?.data,a=r?.data,o=H3(i)?i.escapedChars:null,s=H3(a)?a.escapedChars:null;if(n?.type!==`text`||r?.type!==`text`||typeof n.data?.sourceRaw==`string`||typeof r.data?.sourceRaw==`string`||o===null&&s===null){t+=1;continue}let c=n.value.length;n.value+=r.value,n.data??={},n.data.escapedChars=[...o??[],...(s??[]).map(e=>({...e,offset:e.offset+c}))],r.data?.entityRefSpans?.length&&(n.data.entityRefSpans=[...n.data.entityRefSpans??[],...r.data.entityRefSpans.map(e=>({...e,offset:e.offset+c}))]),e.children.splice(t+1,1)}}}function Ade(){return typeof process>`u`||!process.env?!1:process.env.NODE_ENV===`development`||process.env.NODE_ENV===`test`}function jde(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Mde(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 B8(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!T2(e))return e;let n=Mde(jde(t),e);return n===``||n===`..`||n.startsWith(`../`)?(Ade()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}function V8(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 Nde=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=fC(e.extensions),this.handlers=Rde(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?D1({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=zde(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Cde({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=wde({toMarkdownHandlers:Aue})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Ede(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Dde(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?Ode(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?sce(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 kde(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};const H8=ece();function U8(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 r[e]=i?.type===`boolean`?t.value===`true`:t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function Pde(e){let t=!1;return e.descendants(e=>t?!1:e.type.name===`jsxInline`?(e.attrs.sourceDirty&&(t=!0),!1):e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function Fde(e,t){return e.attrs.sourceDirty||Pde(e)?!0:t?t.isDiverged(e.toJSON()):!1}function Ide(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0||t.every(e=>e.type===`text`&&e.value===``)}function W8(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 G8(e,t){if(e.length===0)return W8({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return W8({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:[G8(n.children,t)]}}return W8({type:`inlineCode`,value:K8(e)},t)}function K8(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=K8(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}const Lde=pd;function Rde(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.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&&(i.blockquote=lR(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.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&&(i.tableRow=lR(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.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&&(i.image=e=>{let r=e.url??``,i=B8(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},i.imageReference=n.imageReference?e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.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&&B1(t.raw)!==null&&L1(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=B1(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&&(i.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 a=r.strike??r.delete;if(a&&(i.delete=uR(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=uR(r.highlight)),r.underline&&(i.underline=uR(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=uR(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=lR(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=uR(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=uR(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=lR(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&&(i.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&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(i.list=lR(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&&(i.listItem=lR(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;i.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)))},i.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:n.data?.resolvedUrl??``,title:n.data?.resolvedTitle??null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=H8.getOrWildcard(o),c=U8(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=B8(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 a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}let i=t.name??``,o=i?H8.get(i):void 0;if(o&&n.jsxInline){let e=U8(t.attributes,o.props),a=r(t.data)??``,s=(t.children??[]).map(e=>e&&typeof e==`object`&&`value`in e?String(e.value??``):``).join(``);return s&&(e.children=s),n.jsxInline.createAndFill({componentName:i,attributes:t.attributes,sourceRaw:a,sourceDirty:!1,props: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)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.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&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=i.data?.sourceTarget??null,u=i.data?.sourceAnchor??null,d=i.data?.sourceAlias??null,f=A4(o),{resolveEmbed:p,sourcePath:m}=t.current,h=p&&m?p(o,m)??null:null,g=h?`/${h}`:o,_=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(_&&Lde.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,alt:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&md.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&gd.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,title:s??o,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d}});if(_&&_d.has(f)&&n.jsxComponent&&H8.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&m?e(o,m)??null:null,i=r===null?null:V8(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:g,target:o,anchor:c,alias:s,size:i,sourceTarget:l,sourceAnchor:u,sourceAlias:d}})}let v=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:g,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s,sourceTarget:l,sourceAnchor:u,sourceAlias:d});return e.text(v,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.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},i.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?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.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?i.footnoteDefinition=lR(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.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},i.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)},i}function zde(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=hR(`paragraph`)),i.blockquote&&(n.blockquote=hR(`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=hR(`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||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||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=hR(`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&&Ide(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=hR(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:Ose(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!Fde(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:H8.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:H8,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.componentName||``;if(t&&e.attrs.sourceDirty)return Ase(t,e,H8.get(t)?.props);let n=e.attrs.attributes,r=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:t||null,attributes:Array.isArray(n)?n:[],children:[],data:{sourceRaw:String(r)}}}),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=gR(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=gR(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return G8(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0||void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=gR(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=gR(`mark`)),a.underline&&(r.underline=gR(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),a.comment&&(r.comment=gR(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=hR(`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=hR(`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=typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,o=typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,s=typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null,c=i||(r?`${t}#${r}`:t),l=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return l!==c&&l.trim().length>0&&!l.includes(`]]`)&&(i=l,c=l),{type:`wikiLinkEmbed`,value:c,data:{target:t,anchor:r,alias:i,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}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 c4(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 q8={default:!0,MD013:!1};function J8(e){return e??q8}function Y8(e){let t=e.replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);let n=t.toLowerCase();for(let e of W0)if(n.endsWith(e))return t.slice(0,-e.length);return t}function X8(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[],i=[],a=[],o=0;for(let e of t){let t=e.startsWith(`!`),s=t?e.slice(1):e;if(t||(o+=1),s.length===0){n.push({pattern:e,detail:`empty pattern`});continue}try{let e=(0,dU.default)(s,{dot:!0,strictBrackets:!0});(t?a:i).push(e)}catch(t){n.push({pattern:e,detail:t instanceof Error?t.message:String(t)});continue}if(s.endsWith(`/`))r.push({pattern:e,reason:`trailing-slash`});else if(s.startsWith(`/`))r.push({pattern:e,reason:`leading-slash`});else{let t=s.toLowerCase();W0.some(e=>t.endsWith(e))&&r.push({pattern:e,reason:`doc-extension`})}}let s=o===0;return{invalidPatterns:n,suspiciousPatterns:r,matches(e){if(e===void 0||e===``)return!1;let t=Y8(e);return t===``||!(s||i.some(e=>e(t)))?!1:!a.some(e=>e(t))}}}function Bde(e,t){if(t.length===0)return[];let n=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),r=t.map(Y8).filter(e=>e!==``),i=[];for(let e of n){let t=e.startsWith(`!`)?e.slice(1):e;if(t.length===0)continue;let n;try{n=(0,dU.default)(t,{dot:!0,strictBrackets:!0})}catch{continue}r.some(e=>n(e))||i.push(e)}return i}function Z8(e,t){let n=new Set,r=[];for(let i of e){if(i.enabled===!1||!i.schema||!X8(i.appliesTo).matches(t))continue;let e=i.key??i.file;n.has(e)||(n.add(e),r.push({file:i.file,schema:i.schema}))}return r}const Q8={"draft-06":`http://json-schema.org/draft-06/schema#`,"draft-07":`http://json-schema.org/draft-07/schema#`,"2019-09":`https://json-schema.org/draft/2019-09/schema`,"2020-12":`https://json-schema.org/draft/2020-12/schema`},$8=Object.keys(Q8),e5=`draft-07`,Vde=new Map($8.map(e=>[t5(Q8[e]),e]));function t5(e){return e.replace(/^https?:\/\//,``).replace(/#$/,``)}function n5(e){let t=e.$schema;return t===void 0?e5:typeof t==`string`?Vde.get(t5(t))??null:null}function Hde(e){return n5(e)!==null}const r5=new Map;function Ude(e){throw Error(`Unhandled FrontmatterSchemaDialect: ${JSON.stringify(e)}`)}function Wde(e){let t=r5.get(e);if(t)return t;let n={allErrors:!0,strict:!1},r;switch(e){case`2020-12`:r=new lU.default(n);break;case`2019-09`:r=new cU.default(n);break;case`draft-06`:case`draft-07`:r=new sU.default(n);break;default:return Ude(e)}return(0,uU.default)(r),r5.set(e,r),r}function Gde(e){let{$schema:t,...n}=e;return n}function i5(e,t){let n=Wde(e),r=t.$id;return typeof r==`string`&&r!==``&&n.removeSchema(r),n.compile(Gde(t))}const a5=new Map;function o5(e){let t=JSON.stringify(e),n=a5.get(t);if(n!==void 0)return n;let r=null,i=n5(e);if(i!==null)try{r=i5(i,e)}catch{r=null}return a5.size>=256&&a5.clear(),a5.set(t,r),r}function Kde(e){if(o5(e))return null;let t=n5(e);if(t===null)return`unsupported dialect ${JSON.stringify(e.$schema)}`;try{return i5(t,e),`schema was refused`}catch(e){return e instanceof Error?e.message:String(e)}}function qde(e){let t=new Map;if(!Kc.test(e))return{data:{},keyLines:t};let{frontmatter:n}=qc(e),r=Yc(n);if(r.trim()===``)return{data:{},keyLines:t};let i=(0,Lc.parseDocument)(r,{uniqueKeys:!1});if(i.errors.length>0)return{data:{},keyLines:t};let a=i.toJS();if(typeof a!=`object`||!a||Array.isArray(a))return{data:{},keyLines:t};if((0,Lc.isMap)(i.contents))for(let e of i.contents.items){let n=e.key;if(!(0,Lc.isScalar)(n)||typeof n.value!=`string`||!n.range)continue;let i=0,a=Math.min(n.range[0],r.length);for(let e=0;e<a;e++)r.charCodeAt(e)===10&&i++;t.has(n.value)||t.set(n.value,i+1)}return{data:a,keyLines:t}}const Jde={"date-time":`an ISO 8601 datetime with an explicit UTC offset, for example "2026-09-23T00:00:00Z"`};function s5(e){let t=e.format;return typeof t==`string`?Jde[t]:void 0}function c5(e){if(e===void 0)return``;let t;if(typeof e==`string`)t=`"${e}"`;else try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>60&&(t=`${t.slice(0,57)}…`),` (got ${t})`}function Yde(e){if(!e.startsWith(`/`))return null;let t=e.slice(1).split(`/`)[0]??``;return t===``?null:t.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Xde(e){return e.split(`/`).slice(1).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)).join(`.`)}function l5(e,t,n){if(t.length===0)return[];let r=n?.source??`frontmatter`,{data:i,keyLines:a}=qde(e),o=e.split(`
541
+ `),s=e=>({start:{line:e,character:0},end:{line:e,character:o[e]?.length??0}}),c=[];for(let{schema:e,ruleId:n}of t){let t=o5(e);if(t&&!t(i))for(let e of t.errors??[]){let t=e.keyword;if(t===`if`)continue;let o=0,l,u=`invalid`,d;if(t===`maxProperties`&&e.instancePath===``)l=`This document must not have frontmatter`;else if(t===`required`&&e.instancePath===``){let t=String(e.params.missingProperty??``);l=`Frontmatter property "${t}" is required`,u=`missing`,t!==``&&(d=t)}else if(e.instancePath===``)l=`Frontmatter ${e.message??`violates "${t}"`}`;else{let n=Yde(e.instancePath);n!==null&&(o=a.get(n)??0);let r=Xde(e.instancePath),s=n!==null&&r===n?i[n]:void 0;if(t===`enum`)l=`Frontmatter property "${r}" must be one of: ${(e.params.allowedValues??[]).map(String).join(`, `)}${c5(s)}`;else if(t===`format`&&s5(e.params)!==void 0){let t=e.params.format;l=`Frontmatter property "${r}" must be ${s5(e.params)} (format "${String(t)}")${c5(s)}`}else l=`Frontmatter property "${r}" ${e.message??`violates "${t}"`}`}c.push({range:s(o),severity:`warning`,source:r,code:n??t,message:l,frontmatterScope:u,...d===void 0?{}:{frontmatterProperty:d}})}}return c}function Zde(e,t){return tq(e,QK({strings:{doc:e},config:t}).doc??[])}function Qde(e,t){let n=QK({strings:{doc:e},config:t}).doc??[],r=e.split(`
542
+ `),i=$de(t);return n.map(e=>tfe(e,r,efe(e,i)))}function $de(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 efe(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 tfe(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?[nfe(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 nfe(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 rfe=[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`,`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`,`project-no-mdx`];function u5(e,t){return e?.[t]!==!1}const d5=`.ok/okf`;function f5(e){return`${e.replace(/^frontmatter-/,``)}.schema.json`}function p5(e){return`${d5}/${f5(e)}`}const ife={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — required frontmatter`,description:"The OKF v0.2 conformance floor. A bundle is conformant when every non-reserved .md file contains a parseable YAML frontmatter block whose `type` is non-empty. This schema is the whole of that floor: a concept carrying only `type` is fully conformant. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#11-conformance",type:`object`,required:[`type`],properties:{type:{type:`string`,pattern:`\\S`,description:"REQUIRED, and the only always-required key in OKF. A short string identifying the kind of concept; consumers use it for routing, filtering, and presentation. Type values are not registered centrally — pick something descriptive and self-explanatory (`BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`, `Playbook`, `Reference`, `Attested Computation`). Consumers must tolerate unknown types, typically by treating them as generic concepts. The `\\S` pattern is what makes §11 rule 2 mean what it says, and it replaces a `minLength` rather than joining one: a length check alone accepts a whitespace-only value that no consumer can route on, and having both would report one mistake twice. OKF v0.2 §4.1, §11."}}},afe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — recommended frontmatter`,description:"Shapes for the OKF v0.2 recommended keys. Every key here is optional, and nothing is constrained beyond the shape OKF states: declaring a key pins its YAML type when present (so `tags` written as a comma-separated string warns) and advertises it to agents at read time. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#41-frontmatter",type:`object`,properties:{title:{type:`string`,description:`Human-readable display name. If omitted, consumers MAY derive a title from the filename. OKF v0.2 §4.1.`},description:{type:`string`,description:"A single sentence summarizing the concept. Used by `index.md` generators, search snippets, and previews. OKF v0.2 §4.1."},resource:{type:`string`,format:`uri-reference`,description:"A URI that uniquely identifies the underlying asset the concept describes. Absent for concepts that describe abstract ideas rather than physical resources. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or an ordinary relative path — hence `uri-reference`, not `uri`, which would reject `/tables/customers.md`. OKF v0.2 §4.1, §6.2."},tags:{type:`array`,items:{type:`string`},description:`A YAML list of short strings for cross-cutting categorization. Tags stay a first-class concept through this field; OKF specifies no separate per-tag file format, so a consumer that wants a tag-browsing view synthesizes one by scanning frontmatter. OKF v0.2 §3.1, §4.1.`},timestamp:{description:"LEGACY (OKF v0.1), superseded by `generated.at` in v0.2 — one of the two deliberate breaking changes. Consumers MAY fall back to it when `generated` is absent; new documents SHOULD write `generated: { by, at }` instead. Documented here so agents are told what it is and what replaced it, but deliberately left unconstrained: v0.2 does not define it as a producer field, so validating its shape would be a rule OKF no longer has. OKF v0.2 §5.2, §13.1."}}},ofe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — provenance, trust, and lifecycle frontmatter`,description:'The optional OKF v0.2 families that make "where did this come from", "how much should I trust it", and "is it still current" answerable from frontmatter alone. Every key is optional, and absence carries meaning rather than being an error: a concept with no `verified` is unverified, and a consumer must not reject it. Only `sources[].resource` and `generated.by` are required-when-their-parent-is-present, because those are the two fields OKF marks REQUIRED in this family; every other field is described but not mandated, so nothing else is enforced. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#5-provenance-trust-and-lifecycle',type:`object`,properties:{sources:{type:`array`,description:"The materials this concept derives from, external or internal to the bundle. Lineage is expressed through links rather than a dedicated field: when an entry's `resource` points at another OKF concept, the derivation edge already exists in the bundle graph, so a consumer may recurse into that source's own `sources`. OKF v0.2 §5.1.",items:{type:`object`,required:[`resource`],properties:{resource:{type:`string`,description:"REQUIRED within an entry. Either a concrete artifact a consumer can follow (an absolute URL, a bundle-relative path, or a path into a `references/` subdirectory) or a population or scope descriptor it cannot, for example `all queries in BigQuery project X`. Deliberately NOT format-constrained: a scope descriptor is prose, so a `uri-reference` check here would warn on conformant documents. OKF v0.2 §5.1, §6.2, §6.3."},id:{type:`string`,description:"Optional. A stable key used to attribute individual claims: a markdown footnote whose label is this id (`[^ga4-schema]`) attributes the claim it follows. SHOULD be present when the body cites the source. Keyed rather than positional because agents constantly rewrite these documents — a positional index misattributes silently the moment the list is reordered. OKF v0.2 §5.1."},title:{type:`string`,description:`Optional. Human-readable label for the source. OKF v0.2 §5.1.`},author:{type:`string`,description:"Optional credibility signal — an authority signal: who or what produced the source. OKF describes this as following the actor convention (§7), but its own examples use a `team:<id>` prefix that the three §7 forms do not cover, so no pattern is enforced. OKF v0.2 §5.1, §7."},usage_count:{type:`integer`,description:"Optional credibility signal — an adoption and liveness signal: how often `resource` was exercised (dashboard views, query executions, page reads) over `usage_window`. For a single artifact it is that artifact's own exercise count; for a scope descriptor it is the number of exercises within the scope that touch the concept. Coarse by design: comparable at the alive-versus-dead and order-of-magnitude level and against a source's own history, but not a precise cross-kind ranking. Read as liveness and trend, not as a score. OKF v0.2 §5.1."},last_modified:{type:`string`,format:`date-time`,description:"Optional credibility signal — a recency signal: when the source itself last changed, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-15T00:00:00Z`). Distinct from `generated.at`, which records when the concept was written. OKF v0.2 §5, §5.1."},usage_window:{type:`object`,description:"Optional per-entry override of the `usage_window` written as a sibling of `sources`. OKF v0.2 §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}}}}},usage_window:{type:`object`,description:"Written once as a sibling of `sources`, this frames every `usage_count` in the list with a `{ from, to }` range. A single entry may carry its own `usage_window` to override it. OKF v0.2 §5, §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}},generated:{type:`object`,required:[`by`],description:"How the current content was produced. Kept distinct from `verified` because who wrote a concept need not be who confirmed it. OKF v0.2 §5.2.",properties:{by:{type:`string`,description:"REQUIRED within `generated`. An actor in the OKF convention: `<producer>/<version>` for agents and tools (`reference_agent/gemini-2.5-pro`), `human:<id>` for a person (`human:ahormati`), or `process:<id>` for an automated process (`process:finance-nightly`). Consumers that classify trust key off the `human:` prefix, so producers MUST use it for hand-authored or human-confirmed content — a rule about which form to pick for which content, which frontmatter alone cannot check, so the three forms are documented here rather than enforced by a pattern. OKF v0.2 §5.2, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-06-30T14:00:00Z`) marking the content's last meaningful change. Consumers use it to tell a recent edit from a stale fact. Supersedes v0.1's top-level `timestamp`. OKF v0.2 §5, §5.2, §13.1."}}},verified:{description:'Who or what has confirmed the content against its sources or `resource` — a list of verification events. Multiple entries capture independent checks, for example a human sign-off plus a nightly process; "how recently" is the latest `at`. Independent of `generated.at`: content can change without re-confirmation, and facts can be re-confirmed without regeneration. A single verifier MAY be written as one bare `{ by, at }` mapping without the list dash, and consumers MUST treat that as a one-element list — hence the two accepted shapes here. Absence means unverified, which is a valid state, never a rejection. OKF v0.2 §5.2, §5.3, §11.',anyOf:[{type:`object`,description:`The bare single-verifier mapping form. OKF v0.2 §5.2.`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}},{type:`array`,description:`The list form: one entry per independent verification event. OKF v0.2 §5.2.`,items:{type:`object`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}}}]},status:{enum:[`draft`,`stable`,`deprecated`],description:"Lifecycle state. `draft` = not yet reviewed, possibly incomplete. `stable` = ready for consumption. `deprecated` = kept for links and history, no longer current. Absent means `stable`, so the key is only worth writing to say draft or deprecated. These three values are the whole set OKF defines, which is why this is the pack's only enum. OKF v0.2 §5.4."},stale_after:{type:`string`,format:`date-time`,description:"An absolute instant, an ISO 8601 datetime with an explicit UTC offset (`2026-12-31T00:00:00Z`): the concept is stale when `now >= stale_after`. Absolute rather than a relative TTL so staleness stays a plain comparison with no reference to when the concept was read. An instant in the past is a freshness signal for consumers, not a violation. OKF v0.2 §5, §5.5, §10.5."}}},sfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — Attested Computation frontmatter`,description:'Shapes for the OKF v0.2 computation keys, which turn a concept into a sanctioned way to compute a value so a consumer can confirm the agent ran the blessed computation instead of improvising its own. Provenance answers "where did this claim come from"; attestation answers "was this number produced the way we said it must be". This file also carries the one value-shaped rule in the pack: `runtime` is the single key OKF marks REQUIRED here, and only when `type` is `Attested Computation`. Ordinary concepts never match that condition and are unaffected, and no other key in the family is mandated. OKF records the computation and the means to check it and executes nothing itself; receipts and verdicts are runtime artifacts that are never stored in the bundle. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#10-attested-computations-concept',type:`object`,if:{required:[`type`],properties:{type:{const:`Attested Computation`,description:"The condition, not a constraint: everything in `then` applies only to documents whose `type` is exactly `Attested Computation`. An ordinary concept never matches, so nothing in this schema is ever asked of it. `type` is also required inside the condition so a document with no type at all fails the conformance floor once, rather than also being told it is missing a `runtime` for a type it never claimed."}}},then:{required:[`runtime`]},properties:{runtime:{type:`string`,description:"REQUIRED for `type: Attested Computation`. The single field that says how to run the computation, and therefore how the executor and attester interpret it and what `parameters` mean — a parameter is a SQL bind variable, a dbt var, or a Python argument depending on the runtime. Keeping `runtime` and `parameters` in one frontmatter is what makes the binding semantics self-evident. Example values: `bigquery`, `postgres`, `dbt`, `python`, `Looker`. Not a closed set, so no enum. OKF v0.2 §10.1, §10.2."},parameters:{type:`array`,description:`The typed, named holes the agent may fill. An agent MAY only supply values for these parameters; it MUST NOT author or edit the computation. That parameter-only surface is what makes "did the sanctioned thing run" a mechanical comparison rather than a judgement call. OKF v0.2 §10.2, §10.3.`,items:{type:`object`,properties:{name:{type:`string`,description:"The parameter name the computation binds, for example `year` bound as `@year` in BigQuery SQL or `{{ var('year') }}` in dbt. OKF v0.2 §10.2, §10.3."},type:{type:`string`,description:"The parameter's type, interpreted by `runtime` (`integer`, `string`, and so on). Deliberately not constrained to JSON Schema type names, because the vocabulary belongs to the runtime. OKF v0.2 §10.2."},required:{type:`boolean`,description:`Whether the agent must supply a value for this parameter. OKF v0.2 §10.2.`}}}},computation:{type:`string`,format:`uri-reference`,description:"Optional. A path to a file holding the computation, used instead of an inline body fence — best for a long or generated computation, or one already kept as a real file shared with non-OKF tooling. When absent, the body's `# Computation` fence IS the computation. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or a relative path. OKF v0.2 §6.2, §10.2, §10.3."},executor:{type:`object`,description:"How the computation is run. A runner — an agent, or deterministic consumer code — follows `resource`, and the run returns a receipt shaped by `receipt`. Binding the computation with the parameter values into the executable artifact is the consumer's job. OKF v0.2 §10.2, §10.5.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names the run instructions or code. What sits behind it — a Skill, a script, a container — is a packaging choice; OKF fixes the interface, not the packaging. Conventionally points into a `references/` subdirectory, for example `references/skills/run-on-bq.md`. OKF v0.2 §1, §6.2, §6.3, §10.2."},receipt:{type:`array`,items:{type:`string`},description:"Declares the fields a run must return — the evidence the attester inspects, for example `[job_id, executed_sql, result]` for BigQuery or `[run_id, compiled_sql, result]` for dbt. Because the attester compares the expanded, compiled artifact the receipt carries, a rewritten query, a swapped computation file, or a mutated dependency fails the check. The receipt itself is a runtime artifact and is never stored in the bundle. OKF v0.2 §10.2, §10.3, §10.5."}}},attester:{type:`object`,description:"The deterministic check that inspects a receipt and returns a verdict. Meant to run consumer-side. Distinct from `verified`: `verified` confirms the definition still matches policy and is recorded in the bundle, while attestation confirms a single run produced the value the sanctioned way and is not stored. OKF v0.2 §10.2, §10.6.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names code — no LLM — that takes a receipt and returns a verdict, independently re-deriving the binding of `computation` with the claimed parameter values to compare against what actually ran. Conventionally points into a `references/` subdirectory, for example `references/attesters/sql-equality.py`. OKF v0.2 §6.2, §6.3, §10.2, §10.3."}}}}},cfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — index files carry no frontmatter`,description:"`index.md` is a reserved filename at any level of the hierarchy and must not be used for a concept document. Index files contain no frontmatter, with exactly one exception — a bundle-root `index.md` may carry `okf_version` — which the scope carves out with a `!index` exclusion rather than a keyword here. `maxProperties: 0` is the mechanism rather than the boolean schema `false`, because a document with no frontmatter block validates as `{}` and `false` would reject that too, flagging the very documents that are correct. `log.md` is deliberately NOT covered: §9 constrains a log's date headings, ordering, and prose entries but never its frontmatter, and OKF's own reference bundle ships a `log.md` carrying `type` and `title`. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#8-index-files",type:`object`,maxProperties:0},lfe={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — bundle-root index.md`,description:"The bundle-root `index.md` is the only index file OKF permits frontmatter in, and `okf_version` is the key it names there. OKF states the declaration as a MAY, so it is not required here. Nor is the frontmatter closed to other keys: §8 grants the exception for `okf_version` specifically, but §11 tells consumers not to reject a bundle over unknown additional keys, and that ambiguity is resolved in favor of the looser reading. The one thing pinned is the value's shape, because a YAML float is provably lossy where a version string is not. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#12-versioning",type:`object`,properties:{okf_version:{type:`string`,pattern:`^[0-9]+\\.[0-9]+$`,description:'The OKF version this bundle targets, as `<major>.<minor>` — currently `"0.2"`. Quote it: unquoted `0.2` parses as a YAML number, so a consumer comparing version strings sees a float instead, and `0.10` would silently become `0.1`. A minor bump is backward-compatible additions; a major bump may rename required fields or change reserved filenames. Consumers that do not understand the declared version should attempt best-effort consumption rather than refusing the bundle. OKF v0.2 §12.'}}},m5=[`**`,`!**/{index,log}`],h5=[{id:`frontmatter-required`,appliesTo:m5,schema:ife},{id:`frontmatter-recommended`,appliesTo:m5,schema:afe},{id:`frontmatter-provenance`,appliesTo:m5,schema:ofe},{id:`frontmatter-computation`,appliesTo:m5,schema:sfe},{id:`frontmatter-reserved-index`,appliesTo:[`**/index`,`!index`],schema:cfe},{id:`frontmatter-root-index`,appliesTo:[`index`],schema:lfe}],ufe=Object.fromEntries(rfe.filter(e=>!h5.some(t=>t.id===e)).map(e=>[e,!1]));function g5(e,t){return t===void 0?[]:h5.filter(n=>u5(e,n.id)&&X8([...n.appliesTo]).matches(t))}function dfe(e){return h5.filter(t=>u5(e,t.id)).map(e=>({appliesTo:[...e.appliesTo],file:p5(e.id)}))}function ffe(e,t,n){let r=g5(t,n);return r.length===0?[]:l5(e,r.map(e=>({file:p5(e.id),schema:e.schema,ruleId:e.id})),{source:`okf`})}function _5(e,t){return nq(`okf:${e}`,(n,r)=>{try{t(n,r)}catch(t){console.warn(`[lint] OKF rule "${e}" failed${r.data.okfDocName?` on "${r.data.okfDocName}"`:``}`,t)}})}function v5(e,t,n){let r=X8(t);return _5(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}const y5=e=>({line:e.line-1,character:e.column-1});function pfe(e,t){if(e&&`start`in e)return{start:y5(e.start),end:y5(e.end)};if(e){let n=y5(e);return{start:n,end:{line:n.line,character:t[n.line]?.length??0}}}return{start:{line:0,character:0},end:{line:0,character:t[0]?.length??0}}}function mfe(e,t){return{range:pfe(e.place,t),severity:`warning`,source:`okf`,code:e.ruleId??`okf`,message:e.reason}}function hfe(e,t,n){if(t.length===0)return[];let r=HL().use(Lz).use(NL).use(IR,[`yaml`]);for(let e of t)r.use(e);let i=new pj({value:e});n!==void 0&&(i.data.okfDocName=n);let a=r.parse(i);r.runSync(a,i);let o=e.split(`
543
+ `);return i.messages.map(e=>mfe(e,o))}function gfe(e){let t=!1;return Hj(e,[`link`,`linkReference`],()=>(t=!0,!1)),t}const _fe=v5(`index-shape`,`**/index`,(e,t)=>{let n=!1;for(let r of e.children){if(r.type===`heading`){n=!0;continue}r.type===`list`&&!n&&t.message(`This index list is not under a section heading, so an Open Knowledge Format consumer reading the file as navigation has no name to file its entries under — an index is one or more heading-led sections of bulleted links.`,r)}Hj(e,`listItem`,e=>{e.children.some(e=>e.type===`list`)||gfe(e)||t.message(`This index entry has no link, so an Open Knowledge Format consumer reading the file as navigation has nowhere to follow it. Every entry in the format's own reference bundles is a link followed by a short description.`,e)})}),vfe=/^\s*(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?!\d)/;function yfe(e,t,n){let r=new Date(Date.UTC(e,t-1,n));return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}const bfe=/^\s*\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/;function b5(e){let t=e.trim();return t.length>60?`${t.slice(0,59)}…`:t}const xfe=v5(`log-shape`,`**/log`,(e,t)=>{let n;Hj(e,`heading`,e=>{if(e.depth!==2)return;let r=Wj(e),i=vfe.exec(r);if(!i){t.message(bfe.test(r)?`Log date heading "${b5(r)}" is not in ISO 8601 YYYY-MM-DD form, the one form an Open Knowledge Format log requires of its date headings.`:`Log entry heading "${b5(r)}" is not a date, so it falls outside the dated-entry format an Open Knowledge Format consumer reads a log as — nothing under it reaches the change-history timeline.`,e);return}let a=`${i[1]}-${i[2]}-${i[3]}`;if(!yfe(Number(i[1]),Number(i[2]),Number(i[3]))){t.message(`Log date heading "${a}" is not a real calendar date, so it is not ISO 8601 — the one form an Open Knowledge Format log requires of its date headings.`,e);return}n!==void 0&&a>n&&t.message(`Log date heading "${a}" is newer than the entry above it — an Open Knowledge Format log is a flat list of date-grouped entries, newest first.`,e),n=a})}),Sfe=/\[\[[^[\]\n]+\]\]/g;function Cfe(e){let t=`Wiki-link ${e} won't resolve for an external Open Knowledge Format consumer — it renders as literal text and its graph edge is lost.`;return e.includes(`|`)?`${t} The alias "|" also splits a GFM table cell.`:t}const wfe=_5(`no-wiki-links`,(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value);Hj(e,`text`,e=>{let r=e.position?.start,i=e.position?.end,a=r?.offset,o=a===void 0||i?.offset===void 0?e.value:n.slice(a,i.offset),s=0,c=r?.line??0,l=r?.column??0,u=e=>{for(;s<e;s+=1)o[s]===`
544
+ `?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(Sfe)){let{index:i}=e;if((a===void 0?o[i-1]:n[a+i-1])===`!`)continue;let s=r&&a!==void 0?{start:u(i),end:u(i+e[0].length)}:void 0;t.message(Cfe(e[0]),s)}})}),Tfe=[`index`,`log`],Efe=_5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=a2(n),i=r.toLowerCase();Tfe.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)}),x5=[{id:`no-wiki-links`,rule:wfe},{id:`log-shape`,rule:xfe},{id:`index-shape`,rule:_fe},{id:`reserved-casing`,rule:Efe}],Dfe=x5.map(e=>e.rule);function Ofe(e){return e===void 0?Dfe:x5.filter(t=>u5(e,t.id)).map(e=>e.rule)}const kfe=to([P(),L(Xd),ao(M(),Ya())]),Afe={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:ao(M(),kfe)}),defaultSlice:{enabled:!1,rules:q8},async lint(e,t){return Qde(e,J8(t.rules))},fix(e,t){return Zde(e,J8(t.rules))}},jfe=I({appliesTo:to([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:ao(M(),Ya()).optional()}),S5=[Afe,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(jfe)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return l5(e,Z8(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>Z8(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:ao(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...hfe(e,Ofe(t.rules),n.docName),...ffe(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>g5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...ufe}}),advertisedMappings:e=>dfe(e.rules)}}],Mfe={enabled:!0,plugins:Object.fromEntries(S5.map(e=>[e.id,e.defaultSlice]))};function C5(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function Nfe(e){if(!e?.enabled)return[];let t=[];for(let n of S5){if(n.frontmatter===void 0)continue;let r=e.plugins[n.id];r?.enabled===!0&&t.push(...n.frontmatter.advertisedMappings(r))}return t}const Pfe=I({docName:H4,summary:W4,content:M().optional(),...U4}).loose(),Ffe=I({docName:H4,summary:W4,markdown:M(),position:L([`append`,`prepend`,`replace`]).optional(),extension:L(W0).optional(),...U4}).loose(),Ife=I({docName:H4,summary:W4,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...U4}).loose(),Lfe=I({docName:H4,connectionId:M().min(1),scope:L([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...U4}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]}),w5=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Rfe=no(`kind`,[I({kind:R(`inline`),content:M()}),I({kind:R(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),T5=I({kind:R(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Rfe.optional(),hint:M().optional()}).loose(),zfe=I({type:R(`orphan`),parentCandidates:F(M()),message:M()}).loose(),E5=I({kind:R(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();no(`kind`,[T5,E5]);const D5=Object.keys({"content-divergence":!0,"disk-edit-reconciled":!0});function Bfe(e){return D5.includes(e)}function Vfe(e){throw Error(`Unexpected WriteWarning variant: ${JSON.stringify(e)}`)}const Hfe=I({kind:R(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),O5=I({href:M(),targetKind:M(),role:M(),sourceForm:M(),resolvedTarget:M().nullable(),reason:M(),resolutionMethod:M(),fallbackTarget:M().nullable().optional(),definition:I({line:N().int().nonnegative(),label:M()}).loose().optional()}).loose(),k5=no(`kind`,[T5,E5,Hfe,I({kind:R(`lint-violation`),source:M(),code:M(),message:M(),severity:L([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:O5.optional()}).loose()]),A5=F(k5).min(1),j5=I({href:M(),resolvedTo:M().nullable(),reason:L([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:O5.optional()}).loose(),M5=F(j5),Ufe=[`reserved-log-policy`],N5=I({reason:M().min(1),count:N().int().positive()}).loose(),Wfe=I({timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),Gfe=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(zfe).optional(),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),Kfe=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),qfe=I({docName:M().min(1),scope:L([`last`,`session`,`count`]),undone:P()}).loose(),Jfe=I({docs:F(I({docName:Loe,markdown:M(),position:L([`append`,`prepend`,`replace`]).optional(),extension:L(W0).optional(),summary:W4}).loose()).min(1).max(100),...U4}).loose(),Yfe=I({type:Q4,title:M(),detail:M().optional()}).loose(),Xfe=no(`status`,[I({status:R(`written`),docName:M().min(1),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),I({status:R(`error`),docName:M().min(1),error:Yfe}).loose()]),Zfe=I({timestamp:M().min(1),results:F(Xfe),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),Qfe=I({docName:H4,patch:ao(M(),to([Vc,Ja()])),types:ao(M(),L(Rc)).optional(),summary:W4,...U4}).loose(),$fe=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose();function epe(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??q8},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]},okf:{enabled:e.okf?.enabled??!1,...e.okf?.rules===void 0?{}:{rules:e.okf.rules},generate:{index:e.okf?.generate?.index??!1}}}}}const tpe=Object.fromEntries(S5.map(e=>[e.id,e.sliceSchema])),npe=I({effective:I({enabled:P(),plugins:I(tpe)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),rpe=to([P(),ao(M(),Ya())]),ipe=new Set([`__proto__`]),P5=M().min(1).max(256).refine(e=>!ipe.has(e),{message:`schema property name cannot be __proto__`}),ape=I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:to([rpe,Ja()])}),ope=I({file:M().min(1).max(512),delete:R(!0).optional(),field:P5.optional(),parentPath:F(to([P5,I({items:R(!0)}).strict()])).max(8).optional(),removeField:R(!0).optional(),renameTo:P5.optional(),constraint:I({type:L([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(to([M(),N(),P()])).nullable().optional(),itemsEnum:F(to([M(),N(),P()])).nullable().optional(),itemsType:L([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:M().nullable().optional(),format:M().nullable().optional(),description:M().max(2048).nullable().optional(),required:P().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`}),spe=I({schemas:F(M()),truncated:P()}).strict(),F5=I({line:N(),character:N()}),I5=I({start:F5,end:F5}),L5=I({range:I5,severity:L([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:I5,newText:M()})).optional(),frontmatterScope:L(qd).optional(),frontmatterProperty:M().optional()}),R5=F(M()).optional(),z5=I({file:M(),diagnostics:F(L5),ran:R5,warnings:F(M()).optional()}),cpe=I({files:F(z5),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:R5}),lpe=L5.extend({linkTarget:M().optional(),localTarget:O5.optional()}),upe=I({files:F(I({file:M(),diagnostics:F(lpe)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:R5,brokenLinkSuppression:N5.optional()}),B5=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),dpe=I({files:F(I({file:M(),lint:B5,links:B5})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:N5.optional()}),fpe=I({docName:H4,summary:W4,...U4}).loose(),V5=`Re-lint after fix failed: `;function ppe(e){return e.startsWith(V5)}const H5=[`re-lint-threw`,`source-went-blind`];function mpe(e){return typeof e==`string`&&H5.includes(e)}const U5=I({reason:L(H5),message:M().min(1)}),hpe=I({file:M(),fixedCount:N(),diagnostics:F(L5),errorCount:N(),warningCount:N(),ran:R5,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:U5.optional()});function W5(){let e=Q8[e5];return`${JSON.stringify({$schema:e,type:`object`},null,2)}\n`}function gpe(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function _pe(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:gpe(e)&&t.endsWith(`.json`)}var G5=class extends Error{};function K5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q5(e,t,n){let r=e;for(let e of t){if(typeof e!=`string`){let e=r.items;if(e===void 0){if(!n)throw new G5(`field path items does not exist`);let e={type:`object`};r.items=e,r=e;continue}if(!K5(e))throw new G5(`field path items is not an object sub-schema`);r=e;continue}let t=Y5(r),i=Object.hasOwn(t,e)?t[e]:void 0;if(i===void 0){if(!n)throw new G5(`field path ${JSON.stringify(e)} does not exist`);let i={type:`object`};r.properties={...t,[e]:i},r=i;continue}if(!K5(i))throw new G5(`field path ${JSON.stringify(e)} is not an object property`);r=i}return r}function vpe(e,t,n,r=[]){let i;i=e.trim()===``?JSON.parse(W5()):J5(e);let a=q5(i,r,!0),o=Y5(a),s=Object.hasOwn(o,t)?o[t]:void 0,c={...K5(s)?s:{}};for(let e of[`type`,`enum`,`pattern`,`format`,`description`]){if(!(e in n))continue;let t=n[e];t==null?delete c[e]:c[e]=t}if(`itemsEnum`in n||`itemsType`in n){if(c.items!==void 0&&!K5(c.items))throw new G5(`field path items is not an object sub-schema`);let e=K5(c.items)?{...c.items}:{};`itemsEnum`in n&&(n.itemsEnum===null||n.itemsEnum===void 0?delete e.enum:e.enum=n.itemsEnum),`itemsType`in n&&(n.itemsType===null||n.itemsType===void 0?delete e.type:e.type=n.itemsType),Object.keys(e).length>0?c.items=e:delete c.items}if(Object.keys(c).length>0)a.properties={...o,[t]:c};else if(Object.hasOwn(o,t)){let{[t]:e,...n}=o;Object.keys(n).length>0?a.properties=n:delete a.properties}if(n.required!==void 0){let e=X5(a),r=e.includes(t);n.required&&!r?a.required=[...e,t]:!n.required&&r&&Z5(a,e.filter(e=>e!==t))}return`${JSON.stringify(i,null,2)}\n`}function J5(e){let t;try{t=JSON.parse(e)}catch(e){throw new G5(`schema is not valid JSON (${e instanceof Error?e.message:String(e)})`)}if(!K5(t))throw new G5(`schema is not a JSON object`);return t}function Y5(e){return K5(e.properties)?e.properties:{}}function X5(e){return Array.isArray(e.required)?e.required.filter(e=>typeof e==`string`):[]}function Z5(e,t){t.length>0?e.required=t:delete e.required}function ype(e,t,n=[]){let r=J5(e),i=q5(r,n,!1),a=Y5(i);if(Object.hasOwn(a,t)){let{[t]:e,...n}=a;Object.keys(n).length>0?i.properties=n:delete i.properties}return Z5(i,X5(i).filter(e=>e!==t)),`${JSON.stringify(r,null,2)}\n`}function bpe(e,t,n,r=[]){let i=J5(e),a=q5(i,r,!1),o=Y5(a);if(!Object.hasOwn(o,t))throw new G5(`field ${JSON.stringify(t)} does not exist`);if(Object.hasOwn(o,n))throw new G5(`field ${JSON.stringify(n)} already exists`);return a.properties=Object.fromEntries(Object.entries(o).map(([e,r])=>[e===t?n:e,r])),Z5(a,X5(a).map(e=>e===t?n:e)),`${JSON.stringify(i,null,2)}\n`}function xpe(){return h5.map(e=>({path:`${d5}/${f5(e.id)}`,ruleId:e.id,contents:`${JSON.stringify({$comment:"Generated by the OpenKnowledge `okf` lint plugin — do not edit. The plugin validates from its own compiled copy and never reads this file, so changes here have no effect and are overwritten when the server restarts. This describes an external format (Google’s Open Knowledge Format); to change what is enforced, change the rule toggles under Settings → this project → Plugins → OKF.",...e.schema},null,2)}\n`}))}function Q5(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?{stem:t,ext:``}:{stem:t.slice(0,n),ext:t.slice(n)}}function Spe(e){let t=new Set(e.filter(e=>Q5(e).ext.toLowerCase()===`.md`).map(e=>e.slice(0,e.lastIndexOf(`.`)))),n=[];for(let r of e){if(Q5(r).ext.toLowerCase()!==`.mdx`)continue;let e=r.slice(0,r.lastIndexOf(`.`)),i=`"${r}" won't be picked up by an Open Knowledge Format consumer — the format is .md-only, and nothing scanning for .md files will open an .mdx.`;n.push({file:r,code:`project-no-mdx`,message:t.has(e)?`${i} It is also shadowed by "${e}.md", so a consumer reads that file instead and gets different content than this project shows you.`:i})}return n}const Cpe=[{id:`project-no-mdx`,run:Spe}];function wpe(e,t){let n=e.filter(e=>W0.some(t=>e.toLowerCase().endsWith(t)));return n.length===0?[]:Cpe.filter(e=>u5(t,e.id)).flatMap(e=>e.run(n))}function $5(e){return`source "${e.source}" ${e.phase} failed`}function Tpe(e){let t=e.docName===void 0?``:` on "${e.docName}"`;return`${$5(e)}${t}: ${e.message}`}function Epe(e){let t=new Map;for(let n of e){let e=[n.source,n.phase,n.message].join(`\0`),r=t.get(e)??{first:n,docNames:new Set};n.docName!==void 0&&r.docNames.add(n.docName),t.set(e,r)}return[...t.values()].map(({first:e,docNames:t})=>t.size<=1?Tpe(e):`${$5(e)} on ${t.size} documents (first: "${e.docName}"): ${e.message}`)}const Dpe=[{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}]}],Ope=(()=>{let e=new Map;for(let t of Dpe){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function e7(e){return Ope.get(e.toUpperCase())??null}function kpe(e,t){let n=e7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))e7(t)===n&&(r={key:t,value:i});return r}function Ape(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}function jpe(e,t){let n=S5.filter(t=>C5(e,t.id)).map(e=>e.id);return t.mode===`audit`&&t.linksValidation!==`off`&&n.push(`links`),n}const t7=`No documents were checked: this scope contains no admitted documents.`;function Mpe(e){return e===t7}function Npe(e,t){return t===0?e!==void 0&&e.length>0?[`Checks selected: ${e.join(`, `)}; no document checks ran.`]:[`No document checks ran.`]:e===void 0?[]:e.length===0?[`No checks ran.`]:[`Checks run: ${e.join(`, `)}.`]}async function Ppe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of S5){if(!C5(t,a.id))continue;let o=t.plugins[a.id];try{i.push(...await a.lint(e,o,{docName:n}))}catch(e){console.warn(`[lint] plugin "${a.id}" failed${n?` on "${n}"`:``}`,e),r?.({source:a.id,phase:`lint`,...n===void 0?{}:{docName:n},message:n7(e)})}}return i}function Fpe(e,t,n,r){if(!t.enabled)return e;let i=e;for(let e of S5){if(!C5(t,e.id)||!e.fix)continue;let a=t.plugins[e.id];try{i=e.fix(i,a)}catch(t){console.warn(`[lint] plugin "${e.id}" fix failed${n?` on "${n}"`:``}`,t),r?.({source:e.id,phase:`fix`,...n===void 0?{}:{docName:n},message:n7(t)})}}return i}function n7(e){let t=r7(e);return t.length>500?`${t.slice(0,500)}… (truncated)`:t}function r7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${r7(e.cause,t+1)})`;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return String(e)}const Ipe=/\p{M}+/gu,Lpe=/[^\p{L}\p{N}]+/gu,Rpe=/^-+|-+$/g;function i7(e){return e.trim().normalize(`NFKD`).replace(Ipe,``).toLowerCase().replace(Lpe,`-`).replace(Rpe,``)}function zpe(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function Bpe(e,t){let n=i7(e);return n?zpe(n,t):``}const Vpe=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]);new Map(O3.flatMap(e=>e.surface===`compat`&&Vpe.has(e.rendersAs)?[[e.name,e]]:[])),CF(`<>`),HL().use(Lz).use(NL);const a7=[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}];for(let e of a7){let t=O3.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}const Hpe=aV(),Upe=CB(),Wpe=wB();function Gpe(){return O3.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function Kpe(){return Gpe().filter(e=>{let t=o7(e);return t!==`fence`&&t!==`html`})}function o7(e){return e.name===`MermaidFence`?`fence`:e.name===`HtmlAlignBlock`?`html`:e.hasChildren?`jsx-block`:`jsx-void`}function qpe(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:o7(e)}}function Jpe(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 Ype(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 Xpe(e){let t=[];for(let n of e.props){let e=Jpe(n);e!==void 0&&Ype(n,e)&&t.push(s3(n.name,e))}return t}function Zpe(e){return jz(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[Hpe],mdastExtensions:[Upe]}).children}function Qpe(e){let t=o7(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
545
+ A --> B`};else{let r=Xpe(e),i=t===`jsx-block`?Zpe(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return wP({type:`root`,children:[n]},{extensions:[Wpe]}).trimEnd()}function $pe(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 eme(e){return{...qpe(e),example:Qpe(e),params:$pe(e)}}const tme=I({intents:F(I({satisfierId:M().min(1),desired:L([`present`,`absent`])}).loose()),...U4,summary:W4}).loose(),nme=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:L([`present`,`absent`]),action:L(wo),errorId:M().optional()}).loose(),rme=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),ime=I({state:M(),strictness:F(L(So)).optional()}).loose(),ame=I({probes:I({env:L([`desktop`,`local-web`,`remote-web`]),satisfiers:ao(M(),ime)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),ome=I({actions:F(nme),conflicts:F(rme),withheld:F(M()),snapshot:ame}).loose(),sme=I({entries:F(I({level:L([`info`,`warn`,`error`]),message:M().max(8192),event:M().optional(),fields:ao(M(),Ya()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),cme=I({accepted:N().int().min(0)}).loose(),lme=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),ume=F(to([M(),N().int().nonnegative()])),dme=no(`kind`,[I({kind:R(`body`)}),I({kind:R(`property`),key:M().min(1),path:ume.default([])})]).default({kind:`body`}),fme=L([`anchored`,`orphaned`,`resolved`]),s7=I({threadId:M().min(1),docName:M().min(1),target:dme,anchor:lme.nullable(),state:fme,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),c7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),l7=I({threadId:M(),ok:R(!0)}),u7=I({threadId:M(),ok:R(!1),error:R(`not-found`)}),pme=I({threads:F(s7)}).loose(),mme=I({meta:s7,orphaned:P()}).loose(),hme=I({threadId:M()}).loose(),gme=I({meta:s7,payload:c7}).loose(),_me=I({results:F(to([l7.extend({meta:s7,payload:c7}),u7]))}).loose(),vme=I({results:F(to([l7.extend({meta:s7}),u7]))}).loose(),yme=I({status:M().min(1),reason:M()}).loose(),bme=I({docName:M().min(1),content:M(),lifecycle:yme.nullable()}).loose(),xme=I({documents:F(I({kind:L([`document`,`asset`,`folder`,`file`]).default(`document`),docName:M().min(1).optional(),docExt:M().min(1).default(`.md`),size:N().int().nonnegative(),modified:M().min(1),isSymlink:P().default(!1),canonicalDocName:M().nullable().default(null),targetPath:M().nullable().default(null),path:M().min(1).optional(),assetExt:M().min(1).optional(),mediaKind:L([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:F(M().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(),Sme=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),Cme=I({docName:M().min(1),backlinks:F(Sme)}).loose(),wme=I({counts:ao(M().min(1),N().int().nonnegative())}).loose(),Tme=I({counts:ao(M().min(1),N().int().nonnegative())}).loose(),Eme=no(`kind`,[I({kind:R(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:R(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),Dme=I({role:M().min(1),sourceForm:M().min(1),targetKind:M().min(1),href:M(),resolvedTarget:M().nullable(),status:M().min(1),reason:M().nullable(),resolutionMethod:M().min(1),fallbackTarget:M().nullable().default(null),range:I({start:N().int().nonnegative(),end:N().int().nonnegative()}),line:N().int().nonnegative(),column:N().int().nonnegative(),definition:I({label:M(),line:N().int().nonnegative()}).nullable().default(null)}).loose(),Ome=I({docName:M().min(1),forwardLinks:F(Eme),localTargets:F(Dme).optional()}).loose(),kme=no(`kind`,[I({id:M().min(1),kind:R(`doc`),docName:M().min(1),anchor:M().nullable(),label:M(),cluster:M().nullable(),category:M().nullable(),tags:F(M()).nullable(),managed:P().optional()}).loose(),I({id:M().min(1),kind:R(`external`),url:M().min(1),label:M()}).loose()]),Ame=I({source:M().min(1),target:M().min(1)}).loose(),jme=I({nodes:F(kme),links:F(Ame)}).loose(),Mme=I({ts:N().int().min(0),url:M(),method:M(),ua:M().optional(),origin:M().optional(),referer:M().optional(),host:M().optional(),remote:M().optional(),secChUa:M().optional(),secChUaMobile:M().optional(),secChUaPlatform:M().optional(),secFetchSite:M().optional(),secFetchDest:M().optional(),secFetchMode:M().optional(),secFetchUser:M().optional()}).loose(),Nme=I({app:to([R(`cursor`),R(`codex`),R(`claude`),Ja()]),signals_fired:F(M())}).loose(),Pme=I({entries:F(Mme),count:N().int().min(0),detection:Nme}).loose(),d7=[`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `],f7=I({path:M().min(1),code:L(d7),origPath:M().min(1).optional(),syncScoped:P(),open:no(`kind`,[I({kind:R(`doc`),docName:M().min(1)}),I({kind:R(`asset`),path:M().min(1)})]).optional()}).loose(),Fme=I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(f7),notStaged:F(f7),untracked:F(f7),incoming:F(f7),truncated:P(),readable:P().default(!0)}).loose(),Ime=L([`AWAITING_CHECKS`,`LOCKED`,`MERGEABLE`,`QUEUED`,`UNMERGEABLE`]),Lme=L([`BEHIND`,`BLOCKED`,`CLEAN`,`DIRTY`,`DRAFT`,`HAS_HOOKS`,`UNKNOWN`,`UNSTABLE`]),Rme=L([`APPROVED`,`CHANGES_REQUESTED`,`REVIEW_REQUIRED`]),zme=L([`ERROR`,`EXPECTED`,`FAILURE`,`PENDING`,`SUCCESS`]),Bme=I({mergeQueue:I({position:N().int().nonnegative(),state:Ime.nullable().catch(null)}).nullable().catch(null),autoMerge:P(),mergeState:Lme.nullable().catch(null),reviewDecision:Rme.nullable().catch(null),checks:zme.nullable().catch(null)}).loose(),p7=I({kind:L([`pull`,`issue`]),repo:M().min(1),number:N().int().positive(),title:M(),author:M().nullable(),createdAt:M(),lifecycle:L([`open`,`draft`,`merged`,`closed`,`completed`,`not-planned`]),additions:N().int().nonnegative().optional(),deletions:N().int().nonnegative().optional(),status:Bme.optional()}).loose(),Vme=I({url:M()}).loose(),Hme=no(`ok`,[I({ok:R(!0),preview:p7}).loose(),I({ok:R(!1),reason:M()}).loose()]),Ume=I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:W4,...U4}).loose(),Wme=I({checkpointRef:M().min(1)}).loose(),Gme=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose(),Kme=I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:L([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(Gme),checkpoint:Ya().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),qme=I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose(),Jme=I({contentDir:M().min(1),pathSeparator:L([`/`,`\\`]),symlinkResolved:P()}).loose(),Yme=F(no(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:R(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:R(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),m7=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose(),Xme=I({url:M()}).loose(),Zme=no(`ok`,[I({ok:R(!0),metadata:m7}).loose(),I({ok:R(!1),reason:M()}).loose()]),Qme=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),$me=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),ehe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose(),the=I({deadLinks:F(I({target:M().min(1),sources:F(ehe)}).loose())}).loose(),nhe=I({target:I({docName:M().min(1),title:M(),aliases:F(M())}).loose(),mentions:F(I({source:M().min(1),excerpt:M(),offset:N().int().nonnegative()}).loose()),truncated:P()}).loose(),rhe=I({projectPath:M().min(1)}).loose(),ihe=L([`not-a-git-worktree`,`init-failed`]),ahe=no(`ok`,[I({ok:R(!0),projectPath:M().min(1)}).loose(),I({ok:R(!1),reason:ihe,message:M().min(1)}).loose()]),ohe=I({host:M().min(1).optional()}).loose(),she=I({host:M().min(1).optional(),token:M().min(1)}).loose(),che=I({host:M(),login:M()}).loose(),lhe=I({key:M().min(1)}).loose(),uhe=I({keyPresent:P()}).loose(),dhe=L([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),fhe=no(`ok`,[I({ok:R(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:R(!1),endpoint:M().min(1),model:M().min(1),reason:dhe,status:N().int().optional()}).loose()]),phe=I({name:M().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:M().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),mhe=I({authenticated:P()}).loose(),hhe=I({channel:L([`login`,`gh-login`]).default(`login`)}).loose(),ghe=I({}).loose(),_he=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),vhe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(_he)}).loose(),yhe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),bhe=I({sessionAlive:P(),agent:yhe.nullable(),files:F(vhe)}).loose(),xhe=I({diff:M(),before:M(),after:M(),properties:Doe,generatedAt:N().int().min(0)}).loose(),She=I({}).loose(),Che=I({}).loose(),whe=I({}).loose(),The=I({}).loose(),Ehe=I({}).loose(),Dhe=I({}).loose(),Ohe=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:L([`idle`,`writing`]),ts:N().int().min(0)}).loose(),khe=I({presence:ao(M().min(1),Ohe)}).loose(),Ahe=I({sessionId:M().min(1),agentType:M().min(1),ts:N().int().min(0),insertedChars:N().int().min(0),deletedChars:N().int().min(0)}).loose(),jhe=I({effects:F(I({"doc.name":M().min(1),entries:F(Ahe)}).loose())}).loose(),Mhe=I({decisions:F(I({ts:N().int().min(0),decision:M().min(1),kind:M().min(1),"doc.name":M().min(1),pathRole:M().min(1)}).loose())}).loose(),Nhe=ao(M().min(1),P()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});I({path:M().min(1,`path must be non-empty`)}).loose();const Phe=I({}).loose(),Fhe=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),Ihe=I({fromPath:M().min(1),toPath:M().min(1)}).loose(),Lhe=I({}).loose(),Rhe=I({path:M().min(1),...U4,summary:W4}).loose(),zhe=I({docName:M().min(1)}).loose(),Bhe=I({path:M().min(1),...U4,summary:W4}).loose(),Vhe=I({path:M().min(1)}).loose(),Hhe=I({kind:L([`file`,`folder`]),path:M().min(1),...U4,summary:W4}).loose(),Uhe=I({kind:L([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),Whe=I({pages:F(I({docName:M().min(1),title:M(),docExt:M().min(1),size:N().int().nonnegative(),modified:M().min(1),icon:M().min(1).max(2048).optional()}).loose())}).loose(),Ghe=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),Khe=I({docName:M().min(1),headings:F(Ghe)}).loose(),qhe=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose(),Jhe=I({kind:L([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...U4,summary:W4}).loose(),Yhe=I({renamed:F(Fhe),renamedAssets:F(Ihe),rewrittenDocs:F(qhe).optional(),summary:w5.optional()}).loose(),Xhe=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...U4}).loose(),Zhe=I({deletedDocNames:F(M().min(1))}).loose(),Qhe=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...U4,summary:W4}).loose(),$he=I({deletedDocNames:F(M().min(1))}).loose(),ege=I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:W4,...U4}).loose(),tge=I({restoredFrom:M().min(1),timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),nge=/^#[0-9a-fA-F]{6}$/,rge=I(Object.fromEntries(Zd.map(e=>[e,M().regex(nge,`must be a #rrggbb hex color`)]))),h7=M().min(1).refine(nf,{message:`must contain a non-whitespace character`}),g7=I({name:h7,author:h7.optional(),variant:L([`dark`,`light`]),palette:rge}).loose(),ige=I({name:M().min(1),scheme:g7,stem:M().min(1).optional(),extension:L([`.yaml`,`.yml`]).optional()}).loose(),age=I({id:M().min(1),filename:M().min(1)}).loose(),oge=I({id:M().min(1),scheme:g7}).loose(),sge=I({id:M().min(1),filename:M().min(1)}).loose(),cge=no(`existed`,[I({existed:R(!1)}).loose(),I({existed:R(!0),filename:M().min(1),scheme:g7}).loose()]),lge=I({themes:F(no(`ok`,[I({ok:R(!0),id:M().min(1),filename:M().min(1),scheme:g7}),I({ok:R(!1),filename:M().min(1),id:M().min(1).optional(),code:M().min(1),conflictingFilenames:F(M().min(1)).min(2).optional()})])),truncated:P()}).loose(),uge=L([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),dge=I({label:M().min(1),webUrl:Aa().nullable()}).loose(),fge=no(`checkStatus`,[I({checkStatus:R(`allowed`)}).loose(),I({checkStatus:R(`denied`),deniedReason:L([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:R(`unknown`),unknownError:L([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),_7=L([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),pge=L(Eu),mge=L([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]),hge=I({state:uge,lastSyncUtc:M().nullable(),lastRunUtc:M().nullable().optional(),lastPullOkUtc:M().nullable().optional(),lastPushOkUtc:M().nullable().optional(),lastFetchUtc:M().nullable(),lastPushedSha:M().nullable(),ahead:N().int().min(0),behind:N().int().min(0),consecutiveFailures:N().int().min(0),consecutivePushFailures:N().int().min(0).optional(),conflictCount:N().int().min(0),hasRemote:P(),syncEnabled:P(),identityUnresolved:P(),remote:dge.nullable().optional(),pushError:M().optional(),pushErrorCode:_7.optional(),pullError:M().optional(),pullErrorCode:_7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:fge.optional(),syncMode:pge.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:mge.nullable().optional()}).loose(),gge=I({action:L([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),_ge=I({action:L([`commit`])}).loose(),vge=I({op:L([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),yge=I({op:L([`sync`,`push`,`pull`,`fetch`])}).loose(),v7=[`merge-native`,`working-tree`,`reconcile`],y7=L(v7),b7=[`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`],x7=L(b7),bge=L([`mine`,`theirs`,`content`,`delete`]),xge=I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflict:y7,reason:x7.optional().catch(void 0),conflictKind:L([`git`,`stale-external-write`]).optional(),docName:M().nullable(),theirsSha:M().optional(),baseSha:M().optional()}).loose())}).loose(),Sge=I({file:M().min(1),strategy:L([`mine`,`theirs`,`content`,`delete`]),content:M().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),Cge=I({}).loose(),wge=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:L([`both-modified`,`delete-modify`,`modify-delete`]),conflict:y7,reason:x7.optional().catch(void 0),conflictKind:L([`git`,`stale-external-write`]).optional(),resolutionOptions:F(bge)}).loose(),Tge=I({plan:_o(e=>e!==void 0,{message:`plan is required`})}).loose(),Ege=I({plan:_o(e=>e!==void 0,{message:`plan is required`})}).loose(),Dge=I({result:_o(e=>e!==void 0,{message:`result is required`})}).loose(),Oge=I({packId:M().min(1)}).strict(),kge=I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict(),Age=I({path:M().min(1),summary:M().min(1)}).loose(),jge=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose(),Mge=I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(Age),entryCounts:jge}).loose())}).loose(),Nge=I({noOpen:P().optional(),out:M().min(1).optional()}).loose(),Pge=I({reason:L([`unsupported-platform`,`spawn-error`]),message:M()}).loose(),Fge=no(`status`,[I({status:R(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:R(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:Pge.optional()}).loose(),I({status:R(`failed`),buildError:M()}).loose(),I({status:R(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]),S7=L(ce),Ige=L(le);function Lge(e){return e===`agents`||le.includes(e)}const Rge=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),zge=[`.md`,`.mdx`,`.txt`];function C7(e){return Math.round(e/4)}function Bge(e){let t=e.lastIndexOf(`.`);return t!==-1&&zge.includes(e.slice(t).toLowerCase())}function w7(e){let t=C7((e.name??``).length+(e.description??``).length),n=C7(qc(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||Bge(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:C7(i)}}const Vge=I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose(),Hge=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose(),Uge=I({name:M().min(1),docs:F(Hge)}).loose(),Wge=I({folder:Ya(),frontmatter_local:ao(M(),Ya()).nullable(),warnings:F(M()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete — the aligned `warningCodes` entry names which field and how."}),warningCodes:F(L([`symlink-refused`,`malformed-yaml`,`unverifiable`,`templates-symlink-refused`,`templates-unverifiable`])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) — `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from — a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure — `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),Gge=I({path:M(),frontmatter:ao(M(),Ya()).optional()}).loose(),Kge=I({applied:Ya()}).loose(),T7=ao(M(),Ya()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),qge=I({template:I({name:M().min(1),folder:M(),scope:L([`local`,`inherited`]),path:M().min(1),frontmatter:T7,body:M()}).strict()}).strict(),Jge=I({templates:F(I({name:M().min(1),title:M().optional(),description:M().optional(),path:M().min(1),source_folder:M()}).strict()),truncated:P()}).strict(),Yge=I({folder:M(),name:M(),body:M().optional(),frontmatter:T7.optional(),...U4,summary:W4}).strict(),Xge=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Zge=I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...U4,summary:W4}).strict(),Qge=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),$ge=I({existed:P(),path:M().min(1)}).strict(),e_e=I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:T7.optional(),...U4,summary:W4}).strict(),t_e=I({from:M().min(1),to:M().min(1),committed:P()}).strict(),E7=L(fl),n_e=/^[a-z0-9-]+$/,r_e=/<\/?[A-Za-z][^>]*>/;function i_e(e){return r_e.test(e)}const a_e=/^[A-Za-z0-9_-]+$/,D7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict(),o_e=I({skill:I({name:M().min(1),scope:E7,path:M().min(1),frontmatter:D7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict(),s_e=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),c_e=I({name:M().min(1),description:M().optional(),scope:E7,path:M().min(1),canonicalPath:M().min(1).optional(),filePaths:F(M()).optional(),absolutePath:M().min(1).optional(),installed:P(),hosts:F(M()),hostQualifier:M().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:F(M()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:ao(M(),M()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:F(M()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:F(M()).optional(),installableEditors:F(M()).optional(),hubOffered:P().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine — server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads it is installed (`HUB_READER_EDITORS`)."}),linkMode:P().optional(),customPlacements:F(I({path:M(),mode:L([`copy`,`link`])}).strict()).optional(),plugin:I({name:M().min(1),marketplace:M().min(1),provider:M().min(1),url:M().optional()}).strict().optional(),managed:P().optional(),origin:s_e.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:Rge.optional()}).strict(),l_e=I({name:M().min(1),scope:E7,apply:P().optional()}).strict(),u_e=I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict(),d_e=I({skills:F(c_e),truncated:P()}).strict(),f_e=I({scope:E7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:D7,...U4,summary:W4}).strict(),O7=[`skill-name-vendor-word`,`skill-body-too-long`],k7=F(L(O7)).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."}),p_e=I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:k7}).strict(),m_e=I({scope:E7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...U4,summary:W4}).strict(),h_e=I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:k7}).strict(),g_e=I({scope:E7.default(`project`),name:M(),...U4,summary:W4}).strict(),__e=I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict(),A7=`This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.`,v_e=I({existed:P(),path:M().min(1),warnings:F(M()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged — either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${A7}`})}).strict(),y_e=I({scope:E7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:D7.optional(),...U4,summary:W4}).strict(),b_e=I({from:M().min(1),to:M().min(1),committed:P(),warnings:F(M()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${A7}`})}).strict(),x_e=I({name:M(),toName:M().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:E7,toScope:E7,...U4,summary:W4}).strict(),j7=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function S_e(e){return typeof e==`string`&&j7.includes(e)}const M7=[`intact`,`lossy`,`unknown`];function N7(e){return typeof e==`string`&&M7.includes(e)}const P7=[`unreadable`,`occupant-unverifiable`];function C_e(e){return typeof e==`string`&&P7.includes(e)}const w_e={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function T_e(e){return w_e[e]}function E_e(e){let t=typeof e==`object`&&e?e:{},n=t.moveState,r=t.sourceState,i=t.retentionLedger;if(n===void 0&&r===void 0&&i===void 0)return{kind:`coherent`};let a=S_e(n)?n:void 0,o=N7(r)?r:void 0,s=C_e(i)?i:void 0,c={...a===void 0?{}:{moveState:a},...o===void 0?{}:{sourceState:o},...s===void 0?{}:{retentionLedger:s}};return n!==void 0&&a===void 0||r!==void 0&&o===void 0||i!==void 0&&s===void 0||a===void 0?{kind:`unverified`,...c}:(T_e(a)?o!==void 0&&s===void 0:a===`nothing-written`?o===void 0:o===void 0&&s===void 0)?{kind:`coherent`,...c}:{kind:`unverified`,...c}}const F7=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function D_e(e){if(e===void 0)return[];let t=F7;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}const O_e=I({scope:E7,path:M().optional(),droppedLocations:F(M()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:F(M()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${A7}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),k_e=I({scope:E7,name:M(),toName:M(),...U4,summary:W4}).strict(),A_e=I({name:M().min(1)}).strict(),j_e=I({name:M(),home:M().min(1)}).strict(),M_e=I({docName:M().min(1)}).strict(),I7=L([`reference`,`script`,`file`]),N_e=I({scope:E7.default(`project`),name:M(),path:M().min(1),content:M(),...U4,summary:W4}).strict(),P_e=I({path:M().min(1),created:P(),kind:I7,content:P()}).strict(),F_e=I({scope:E7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...U4,summary:W4}).strict(),I_e=I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),L_e=I({path:M().min(1),kind:I7,text:M()}).strict(),R_e=I({path:M().min(1),existed:P(),kind:I7}).strict(),L7=to([Ige,R(`agents`)]),R7=M().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),z7=to([L7,R7]),z_e=I({scope:E7.default(`project`),name:M(),targets:F(L7).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:F(z7).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:F(z7).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:L([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:z7.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:P().optional(),setSource:M().min(1).optional(),place:I({dir:M().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:L([`copy`,`link`])}).strict().optional(),convert:I({target:z7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:L([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:I({path:M().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...U4,summary:W4,fork:I({editor:M().min(1),action:L([`align`,`make-source`,`rename`]),toName:M().optional()}).strict().optional()}).strict().refine(e=>e.targets===void 0||e.add===void 0&&e.remove===void 0,{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>e.source===void 0||e.add===void 0&&e.remove===void 0,{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),B7=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`],B_e=I({name:M().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:F(M()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:P().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:F(M()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:F(L(B7)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),V_e=I({scope:E7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),H_e=I({name:M().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:P().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict(),U_e=I({targets:F(S7),configured:P(),folders:F(I({scope:E7,host:M(),root:M(),state:L([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:R(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),V7=I({action:R(`link`),scope:E7,root:M().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:M().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),H7=I({action:R(`unlink`),scope:E7,root:M().min(1).meta({description:`The linked folder to materialize back.`}),exclude:F(M().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),U7=I({action:R(`add-root`),scope:E7,root:R7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),W_e=no(`action`,[V7.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),H7,U7]),G_e=no(`action`,[V7.strict(),H7,U7]),K_e=I({folderAction:W_e}).strict(),q_e=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict(),J_e=I({targets:F(S7),reprojected:F(I({name:M(),hosts:F(M())}).strict()),bundleHosts:F(M()),removedFrom:F(M()),folder:I({moved:F(M()),dropped:F(M()),linked:F(M())}).strict().optional(),preview:q_e.optional()}).strict(),Y_e=I({scope:E7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...U4,summary:W4}).strict(),X_e=I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),Z_e=I({query:M().optional(),intent:L([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:L([`navigation`,`relevance`]).optional(),scopes:F(L([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:L([`omnibar`,`mcp`,`http`]).optional()}).loose(),Q_e=I({kind:L([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:ao(M(),Ya()),snippet:M().optional()}).loose(),W7=L([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),G7=L([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function $_e(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function eve(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function tve(e,t){let n=e?.providerErrorReason;switch(n){case null:case void 0:return e?.providerError===!0;case`corpus`:return!1;case`query`:return t===`query`;case`warm`:case`dimensions`:case`configured_dimensions`:return!0;default:return eve(n)}}function nve(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}const K7=I({capable:P(),applied:P(),outcome:W7,providerErrorReason:G7.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),rve=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:L([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:G7.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function ive(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}const ave=I({query:M(),intent:L([`autocomplete`,`full_text`,`omnibar`]),results:F(Q_e),elapsedMs:N().nonnegative(),semantic:K7.optional(),truncated:P().optional(),ready:P().optional()}).loose(),ove=I({version:M().min(1),recordedAt:M().min(1)}).loose(),sve=I({currentVersion:M().min(1),targets:ao(M(),ove.nullable())}).loose(),cve=I({scope:E7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:M().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...U4,summary:W4}).strict(),lve=I({scope:E7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:F(M().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...U4,summary:W4}).strict(),uve=I({results:F(I({requested:M(),status:L([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:k7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),dve=I({scope:E7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...U4,summary:W4}).strict(),fve=I({results:F(I({requested:M(),status:L([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:k7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose(),pve=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose(),mve=I({name:M().min(1).meta({description:`Managed skill name created or matched.`}),path:M().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:P().meta({description:`True when this request created new source files.`}),alreadyImported:P().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:M().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:pve,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:k7}).loose(),q7=`server-info`,J7=`branch-switched`,Y7=`disk-ack`,X7=`config-validation-rejected`,Z7=`config-ignore-nested-error`,hve=L([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),gve=I({v:R(1),ch:R(q7),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),_ve=I({v:R(1),ch:R(J7),seq:N(),branch:M().min(1)}).loose(),vve=I({v:R(1),ch:hve,seq:N()}).loose(),yve=I({v:R(1),ch:R(Y7),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),bve=I({v:R(1),ch:R(X7),seq:N(),docName:M().min(1),error:bne}).loose(),xve=I({v:R(1),ch:R(Z7),seq:N(),path:M().min(1),error:M().min(1)}).loose(),Sve={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},Q7=new WeakMap;function Cve(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function $7(e){return e.trim().toLowerCase()}const wve=/\.(?:md|mdx)$/;function Tve(e,t){if(t!==`page`)return e;let n=e.replace(wve,``);return n.length>0?n:e}function Eve(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Dve(e){let t=Eve(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}}const e9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,t9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function Ove(){let e=FY({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!t9||typeof e!=`string`||!e9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of t9.segment(e)){if(!n||!e9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function n9(e){let t=YY({schema:Sve,components:{tokenizer:Ove()}});return e.length>0&&oX(t,e),t}function r9(e){let t={documents:e};return Q7.set(t,n9(e)),t}function kve(e){let t=Q7.get(e);if(t)return t;let n=n9(e.documents);return Q7.set(e,n),n}const i9=new WeakSet;function Ave(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 jve(e,t){let n=e=>({corpus:r9(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=Q7.get(e);if(!r)return n(`no-index`);if(i9.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?Ave(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`);i9.add(e);try{if(a.length>0&&fX(r,a),o.length>0&&oX(r,o),ZY(r)!==t.length)throw Error(`Search index count ${ZY(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return Q7.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function Mve(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function a9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Nve(e,t){let n=$7(t);if(!n)return 0;let r=Tve(n,e.kind),i=$7(e.title),a=$7(e.name),o=$7(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 o9(e,t){let n=Nve(e,t);return n<=0?n:B4(e.path)?n*.5:n}function Pve(e){return e===`file`?-60:0}function Fve(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 s9(e,t,n,r){return e+t*20+n+Pve(r)}function c9(e,t,n,r,i,a){return e===`relevance`?s9(t,n,r,i):Fve(t,n,r,i,a)}function Ive(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function l9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function Lve(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 Rve(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function zve(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}}const Bve=/[฀-๿ក-៿ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿\uf900-﫿＀-￯\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Vve(e,t){let n=$7(t);return n.length<4||Bve.test(n)?0:+(e===`full_text`)}function Hve(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function Uve(e){let t=[],n=[],r=[];for(let i of e){let e=Hve(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 u9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Uve(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 Wve(e,t,n={}){let r=n.intent??`omnibar`,i=Ive(r,n.ranking),a=Cve(n.limit),o=new Set(n.scopes??Mve(r)),s=e.documents.filter(e=>a9(e,o)),c=$7(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=HX(kve(e),{term:c,properties:Rve(r),boost:zve(r),tolerance:Vve(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>a9(e.document,o)).map(e=>[e.document.id,e.score])),d=Lve(s),f=new Map;for(let e of s)o9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)a9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=l9(f.values(),u);return u9([...f.values()].map(t=>{let n=Math.max(0,o9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:c9(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 u9(Gve({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function d9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Gve(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=l9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,o9(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?c9(o,t,n,s,e.kind,m):s9(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=d9(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)),_=d9(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}))}function Kve(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}const qve=/^[A-Za-z0-9._-]+$/,Jve=/^(?:\d{1,3}\.){3}\d{1,3}$/;var f9=class extends Error{constructor(e){super(e),this.name=`InvalidShareUrlError`}};function Yve(e,t=0){if(m9(t,!0),t===0)return Qve(e);if(e.length>2985)throw new f9(`Share URL exceeds the v2 URL size limit`);Zve(p9(e),t);let n=new TextEncoder().encode(e);if(n.length>2985)throw new f9(`Share URL exceeds the v2 URL size limit`);let r=new Uint8Array(3+n.length);if(r[0]=2,r[1]=t>>>8,r[2]=t&255,r.set(n,3),r.length>2988)throw new f9(`Share payload exceeds the v2 size limit`);let i=b9(r);if(i.length>3984)throw new f9(`Share token exceeds the v2 size limit`);return i}function p9(e){if(!e.startsWith(`https://`))throw new f9(`Share URL must use canonical HTTPS spelling`);if(e.includes(`?`)||e.includes(`#`))throw new f9(`Share URL cannot contain a query or fragment`);let t=e.slice(8),n=t.indexOf(`/`);if(n<=0)throw new f9(`Share URL is missing its repository path`);let r=t.slice(0,n);h9(r);let i=t.slice(n+1).split(`/`);if(i.length<4||i.some(e=>e.length===0))throw new f9(`Share URL has an invalid path shape`);let[a,o,s,c,...l]=i;if(s!==`blob`&&s!==`tree`)throw new f9(`Share URL has an unsupported repository path shape`);let u=g9(a,`owner`),d=g9(o,`repository`),f=$ve(c),p=l.map(e=>eye(e,`target`)),m=s===`blob`?`doc`:`folder`;if(m===`doc`&&p.length===0)throw new f9(`Document share URL is missing its target path`);let h={host:r,owner:u,repo:d,branch:f,kind:m,targetSegments:p};if(Xve(h)!==e)throw new f9(`Share URL is not canonically serialized`);return h}function Xve(e){if(h9(e.host),y9(e.owner,`owner`),y9(e.repo,`repository`),!J4(e.branch))throw new f9(`Share URL branch is invalid`);if(e.kind!==`doc`&&e.kind!==`folder`)throw new f9(`Share URL target kind is invalid`);if(e.kind===`doc`&&e.targetSegments.length===0)throw new f9(`Document share URL is missing its target path`);for(let t of e.targetSegments)v9(t,`target`);let t=e.kind===`doc`?`blob`:`tree`,n=[encodeURIComponent(e.owner),encodeURIComponent(e.repo),t,encodeURIComponent(e.branch),...e.targetSegments.map(e=>encodeURIComponent(e))];return`https://${e.host}/${n.join(`/`)}`}function Zve(e,t){if(m9(t,!1),t>e.targetSegments.length)throw new f9(`Content root depth exceeds the repository target path`);let n=e.targetSegments.slice(t).join(`/`);if(e.kind===`doc`){if(n.length===0)throw new f9(`Document share target cannot be the content root`);return{kind:`doc`,docPath:n}}return{kind:`folder`,folderPath:n}}function Qve(e){let t=new TextEncoder().encode(e),n=new Uint8Array(1+t.length);return n[0]=1,n.set(t,1),b9(n)}function m9(e,t){if(!Number.isInteger(e)||e<+!t||e>65535)throw new f9(`Content root depth is invalid`)}function h9(e){if(e.length===0||e.length>253||e.endsWith(`.`)||e!==e.toLowerCase()||Jve.test(e))throw new f9(`Share URL host is not canonical`);if(e.split(`.`).some(e=>e.length===0||e.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e)))throw new f9(`Share URL host is not a DNS name`);if(Wu(e)!==e)throw new f9(`Share URL host is not a canonical GitHub host`)}function $ve(e){let t=_9(e,`branch`);if(!J4(t))throw new f9(`Share URL branch is invalid`);return t}function eye(e,t){let n=_9(e,t);return v9(n,t),n}function g9(e,t){let n=_9(e,t);return y9(n,t),n}function _9(e,t){let n;try{n=decodeURIComponent(e)}catch{throw new f9(`Share URL ${t} has malformed percent encoding`)}if(encodeURIComponent(n)!==e)throw new f9(`Share URL ${t} is not canonically encoded`);return n}function v9(e,t){if(e.length===0||e===`.`||e===`..`||e.toLowerCase()===`.git`||e.includes(`/`)||e.includes(`\\`)||tye(e))throw new f9(`Share URL ${t} component is invalid`)}function y9(e,t){if(v9(e,t),!qve.test(e)||e.startsWith(`-`))throw new f9(`Share URL ${t} component is invalid`)}function tye(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function b9(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}const x9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),S9=globalThis;S9[x9]===void 0&&(S9[x9]=tr());const C9=S9[x9],nye=[`.ok`,`skill-state.yml`],rye=[`claude-cowork`,`cli-hosts`],iye=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],w9=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,T9=$a({version:M().regex(w9,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(C9,{description:`Recorded skill version for this target.`}),recordedAt:$i().register(C9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:L(iye).register(C9,{description:`Install-source surface that recorded this entry.`}).optional()}),aye=$a({enabled:P().register(C9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:$i().register(C9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),oye=$a({schema:R(1).register(C9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:$a({"claude-cowork":T9.optional(),"cli-hosts":T9.optional()}).register(C9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:ao(M(),aye).register(C9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(C9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function sye(e,t){return e??t.installedOnDisk}function cye(){return{schema:1,targets:{}}}const lye=[`auth-error`,`detached-head`,`dirty-tree`,`diverged-local-commits`,`external-changes-pending`,`git-index-locked`,`git-operation-in-progress`,`no-commits-yet`,`no-push-permission`,`non-content-merge-failure`,`protected-branch`],E9=`template`;function D9(e){if(e.trim()===``)return{};let t;try{t=(0,Lc.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function O9(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function uye(e){let{frontmatter:t,body:n}=qc(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Yc(t),markdown:n}}function dye(e){let t=e.split(`
544
546
  `);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=D9(n.join(`
545
547
  `))[E9];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
546
- `).replace(/\n+$/,``)}}function k9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=qc(t);if(n===``)return{identity:{},starterContent:t};let i=Yc(n),a=uye(i);if(a)return{identity:a.identity,starterContent:O9(a.docFrontmatterText,r)};let{frontmatter:o}=qc(r);if(o!==``)return{identity:D9(i),starterContent:r};let s=D9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:O9(i,r)}}function dye(e,t){let{docFrontmatterText:n,markdown:r}=lye(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Lc.stringify)({[E9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function fye(e){return k9(e).starterContent}const A9=e=>e*8+4;A9(92),A9(40);const pye=/^(#{1,6})\s+(.+)$/;function mye(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(pye);if(!n)return null;let r=n[2].trim(),i=zpe(r,t);return i?{level:n[1].length,text:r,slug:i}:null}Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));const hye={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},gye=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],_ye={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function vye(e,t=gye){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const yye={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function j9(e){return e?yye[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const bye={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function xye(e){let t=e?.trim();return t?bye[j9(t)]??t:`Agent`}function M9(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function N9(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function Sye(e){return e.split(`/`).map(N9).join(`/`)}function P9(e){return e.split(`/`).map(M9).join(`/`)}function F9(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=M9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!W0.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=M9(d[e]??``);if(e===f&&(t=gl(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function Cye(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}const I9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function L9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function R9(e){let t=e.trim();return I9.test(t)||t.startsWith(`//`)}function wye(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(R9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=P9(r<0?n:n.slice(0,r)),a=xl(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=bl(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=F9(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=L9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function z9(e,t){let n=e.trim();if(!n)return null;if(R9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=L9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Tye(e,t,n){let r=e.trim();if(!r||I9.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:M9(e));return c.length===0?null:c.join(`/`)}function B9(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function V9(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function H9(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function U9(e){return e.split(`/`).filter(e=>e!==``)}function Eye(e,t){let n=H9(t);return e===``||n===e||n.startsWith(`${e}/`)}function W9(e,t){let n=H9(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:U9(r).length}function G9(e,t){let n=U9(e),r=U9(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function Dye(){let e=new Map;function t(t){let n=B9(t);if(n===``)return;let r=V9(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=B9(t),r=V9(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=H9(B9(n)),o=[],s=[];for(let e of i)Eye(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=W9(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=W9(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=G9(a,H9(t));for(let r=1;r<e.length;r++){let i=e[r],o=G9(a,H9(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}}const K9=`unknown`;function Oye(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return K9;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function kye(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 Aye(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}function q9(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function jye(e){return e.reason!==void 0||q9(e.note)!==void 0||q9(e.email)!==void 0}function Mye(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 Nye(){return Mye((typeof process>`u`?void 0:q9(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function Pye(e){let t=q9(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function J9(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 Fye(e,t={}){let n=Nye();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=q9(e.note),a=Pye(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 J9(r,o,c());let l=await J9(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:J9(r,o,c())}function Y9(e){return`pagesBySlug`in e}function X9(e){return Y9(e)?e.pages:e}function Iye(e,t){return Y9(e)?e.assetPaths??new Set:t??new Set}function Lye(e,t){return Y9(e)?e.filePaths??new Set:t??new Set}function Z9(e,t){return e<t?-1:+(e>t)}function Rye(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||Z9(r,i)<0)&&n.set(e,r)}return n}function zye(e,t){let n=new Map,r=[...e].sort(Z9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function Bye(e,t){let n=i7(e);if(!n)return;if(Y9(t))return t.pagesBySlug.get(n);let r;for(let e of t)i7(e)===n&&(r===void 0||Z9(e,r)<0)&&(r=e);return r}function Vye(e,t){if(e.includes(`/`))return;let n=i7(e);if(!n)return;if(Y9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);i7(t===-1?e:e.slice(t+1))===n&&(r===void 0||Z9(e,r)<0)&&(r=e)}return r}function Hye(e){let t=e.trim();if(!t)return[];let n=i7(t);return n.length>0&&n!==t?[n]:[]}function Q9(e,t){let n=e.trim();if(!n)return;if(X9(t).has(n))return n;let r=n.replace(/\.(md|mdx)$/i,``);if(r!==n){let e=$9(r,t);if(e!==void 0)return e}return $9(n,t)}function $9(e,t){let n=e.trim();if(!n)return;let r=X9(t);if(r.has(n))return n;let i=Bye(n,t);if(i)return i;for(let e of Hye(n))if(r.has(e))return e;return Uye(n,r)||Vye(n,t)}function Uye(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function Wye(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function Gye(e,t,n){let r=Wye(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(Z9)[0]??null}function Kye(e,t,n){let r=z9(e,t);return r===null||r.kind!==`asset`||Gye(r.url,Iye(n),Lye(n))!==null||Q9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}const qye=new Mde({extensions:M4,deriveStructuralFreshness:!0}),Jye=fC(M4);export{Rhe as $,b1 as $a,xd as $c,fe as $d,fme as $i,sl as $l,$8 as $n,Ige as $o,b_e as $r,Tpe as $s,ahe as $t,vs as $u,gve as A,tse as Aa,rne as Ac,Rn as Ad,hge as Ai,Lu as Al,pme as An,rce as Ao,Joe as Ar,vpe as As,Pme as At,kl as Au,q7 as B,TQ as Ba,Yd as Bc,A as Bd,Qge as Bi,lne as Bl,$he as Bn,gpe as Bo,M_e as Br,Kye as Bs,a7 as Bt,hu as Bu,Sme as C,koe as Ca,Rne as Cc,to as Cd,dve as Ci,ep as Cl,M1 as Cn,Ppe as Co,G4 as Cr,FZ as Cs,G5 as Ct,Ml as Cu,j5 as D,VZ as Da,Dne as Dc,$i as Dd,Cge as Di,Vu as Dl,hme as Dn,m$ as Do,Woe as Dr,x4 as Ds,p7 as Dt,hl as Du,x$ as E,Rye as Ea,Bne as Ec,Oa as Ed,the as Ei,qf as El,gme as En,Oye as Eo,K4 as Er,$pe as Es,d7 as Et,gu as Eu,hve as F,P1 as Fa,Lf as Fc,_t as Fd,vge as Fi,wne as Fl,V5 as Fn,fye as Fo,k_e as Fr,oye as Fs,Mge as Ft,vl as Fu,ome as G,kpe as Ga,nd as Gc,ie as Gd,e_e as Gi,Tu as Gl,j7 as Gn,u5 as Go,a_e as Gr,Ese as Gs,Xme as Gt,tl as Gu,v7 as H,r_e as Ha,Pf as Hc,te as Hd,Xge as Hi,Su as Hl,Tse as Hn,nse as Ho,P_e as Hr,m0 as Hs,Ame as Ht,qc as Hu,J7 as I,vye as Ia,Bf as Ic,dt as Id,E9 as Ii,Zu as Il,U5 as In,T_e as Io,A_e as Ir,O0 as Is,Pge as It,xl as Iu,s7 as J,n$ as Ja,Vd as Jc,ce as Jd,qge as Ji,jl as Jl,M7 as Jn,z4 as Jo,R_e as Jr,eve as Js,z5 as Jt,ds as Ju,sme as K,Dye as Ka,Gf as Kc,de as Kd,Jge as Ki,wu as Kl,t_e as Kn,Y0 as Ko,sve as Kr,Uve as Ks,spe as Kt,Ic as Ku,Z7 as L,_1 as La,zf as Lc,He as Ld,i_e as Li,id as Ll,qhe as Ln,jpe as Lo,j_e as Lr,F9 as Ls,Mhe as Lt,Ul as Lu,yve as M,t2 as Ma,vne as Mc,eee as Md,Sge as Mi,Pne as Ml,K9 as Mn,jye as Mo,cse as Mr,bpe as Ms,Kme as Mt,mu as Mu,_ve as N,Q_e as Na,Yf as Nc,tee as Nd,mge as Ni,Ane as Nl,j1 as Nn,j9 as No,__e as Nr,B0 as Ns,Qme as Nt,Kl as Nu,N5 as O,e7 as Oa,yd as Oc,Zi as Od,bge as Oi,gf as Ol,dse as On,Gde as Oo,Uoe as Or,AQ as Os,Bme as Ot,Zc as Ou,vve as P,z9 as Pa,Cd as Pc,ht as Pd,_ge as Pi,One as Pl,O1 as Pn,V0 as Po,O_e as Pr,Tye as Ps,yse as Pt,Jc as Pu,Lhe as Q,P9 as Qa,pp as Qc,le as Qd,xhe as Qi,al as Ql,W0 as Qn,rve as Qo,v_e as Qr,Noe as Qs,hhe as Qt,ps as Qu,X7 as R,X8 as Ra,Rf as Rc,Ae as Rd,Hge as Ri,pne as Rl,Jhe as Rn,Yoe as Ro,L_e as Rr,vse as Rs,t3 as Rt,Qc as Ru,Cme as S,joe as Sa,zne as Sc,ute as Sd,uve as Si,Jf as Sl,r2 as Sn,zde as So,use as Sr,Gve as Ss,Qfe as St,pl as Su,LQ as T,zye as Ta,Ine as Tc,Aa as Td,_se as Ti,Nu as Tl,Uhe as Tn,j0 as To,Boe as Tr,xoe as Ts,ope as Tt,du as Tu,ise as U,p0 as Ua,Nf as Uc,ne as Ud,Zge as Ui,vu as Ul,O7 as Un,z0 as Uo,F_e as Ur,Cpe as Us,m7 as Ut,Al as Uu,N1 as V,EQ as Va,Ff as Vc,ve as Vd,Kge as Vi,Cu as Vl,ege as Vn,B4 as Vo,N_e as Vr,Q9 as Vs,G0 as Vt,_u as Vu,ose as W,f0 as Wa,vd as Wc,re as Wd,$ge as Wi,xu as Wl,B7 as Wn,Wue as Wo,W_e as Wr,mye as Ws,Yme as Wt,Yc as Wu,zhe as X,r9 as Xa,Hf as Xc,D as Xd,She as Xi,ll as Xl,nye as Xn,ppe as Xo,z_e as Xr,Q6 as Xs,mpe as Xt,rs as Xu,_me as Y,K6 as Ya,Uf as Yc,ue as Yd,whe as Yi,il as Yl,tye as Yn,fpe as Yo,ove as Yr,HQ as Ys,dpe as Yt,us as Yu,Bhe as Z,Eve as Za,Vf as Zc,ge as Zd,Che as Zi,cl as Zl,w9 as Zn,a2 as Zo,z7 as Zr,s$ as Zs,mhe as Zt,Nte as Zu,Wfe as _,Cye as _a,Une as _c,I as _d,B_e as _i,Bd as _l,d5 as _n,kye as _o,jge as _r,Soe as _s,Uge as _t,cu as _u,k5 as a,hse as aa,i7 as ac,L as ad,S as af,m_e as ai,une as al,lhe as an,xye as ao,rge as ar,KQ as as,ehe as at,fl as au,fse as b,Bfe as ba,bp as bc,ao as bd,lve as bi,Kf as bl,q$ as bn,T$ as bo,G7 as br,Moe as bs,Dme as bt,uu as bu,eme as c,lpe as ca,R4 as cc,F as cd,ee as cf,h_e as ci,hf as cl,nhe as cn,W5 as co,oge as cr,M0 as cs,mme as ct,Wl as cu,Gfe as d,W$ as da,yH as dc,no as dd,T as df,aye as di,Af as dl,Ahe as dn,sye as do,K7 as dr,H$ as ds,Vhe as dt,eu as du,Zhe as ea,CZ as ec,Mte as ed,he as ef,D_e as ei,bd as el,ohe as en,Ape as eo,cye as er,N7 as es,jfe as et,ol as eu,Ife as f,E0 as fa,rg as fc,qa as fd,H_e as fi,tne as fl,Ohe as fn,Sye as fo,ive as fr,B8 as fs,Hhe as ft,tu as fu,Pfe as g,FQ as ga,Sp as gc,N as gd,l_e as gi,cd as gl,h5 as gn,QX as go,Oge as gr,p9 as gs,h0 as gt,$l as gu,Xfe as h,pQ as ha,Gne as hc,$a as hd,c_e as hi,Sne as hl,jhe as hn,Bge as ho,Dge as hr,f$ as hs,Ihe as ht,Ql as hu,t7 as i,F7 as ia,L4 as ic,co as id,v as if,p_e as ii,Ud as il,gse as in,Ooe as io,sge as ir,Npe as is,K0 as it,dl as iu,bve as j,wye as ja,Tne as jc,Qt as jd,xge as ji,Pu as jl,b7 as jn,O4 as jo,sse as jr,ype as js,Gme as jt,Cl as ju,Q8 as k,U0 as ka,Gd as kc,Tr as kd,gge as ki,nne as kl,$4 as kn,Gpe as ko,Koe as kr,a3 as ks,Vme as kt,Tl as ku,ame as l,D5 as la,Mpe as lc,P as ld,y as lf,g_e as li,sne as ll,ihe as ln,Sse as lo,cge as lr,_$ as ls,bme as lt,Gl as lu,qfe as m,_pe as ma,yp as mc,R as md,q_e as mi,kne as ml,The as mn,Jve as mo,Ege as mr,y4 as ms,Nme as mt,nu as mu,Jye as n,q0 as na,IQ as nc,Ate as nd,pe as nf,d_e as ni,jne as nl,fhe as nn,A0 as no,Hme as nr,J4 as ns,e5 as nt,_l as nu,yhe as o,mse as oa,y$ as oc,Ja as od,x as of,J_e as oi,Xu as ol,che as on,l$ as oo,ige as or,$6 as os,Yhe as ot,Il as ou,Kfe as p,mQ as pa,V as pc,ro as pd,G_e as pi,Cne as pl,Ehe as pn,N9 as po,Tge as pr,V6 as ps,iZ as pt,ou as pu,wme as q,Y6 as qa,Sd as qc,ae as qd,Yge as qi,bu as ql,P7 as qn,$$ as qo,pve as qr,Mfe as qs,tpe as qt,fs as qu,_ye as r,s2 as ra,$fe as rc,Ka as rd,se as rf,f_e as ri,Ene as rl,phe as rn,DQ as ro,Ume as rr,zfe as rs,o2 as rt,ul as ru,bhe as s,upe as sa,Ave as sc,rte as sd,E as sf,Y_e as si,Nne as sl,dhe as sn,UQ as so,age as sr,$0 as ss,Xhe as st,Fl as su,qye as t,Qhe as ta,Aye as tc,qte as td,k as tf,y_e as ti,Mne as tl,she as tn,G$ as to,hye as tr,Vde as ts,q8 as tt,Vc as tu,Ffe as u,qme as ua,eU as uc,_o as ud,b as uf,E7 as ui,Uu as ul,ipe as un,rZ as uo,X_e as ur,E_e as us,yme as ut,rl as uu,Nfe as v,pse as va,Vne as vc,lo as vd,V_e as vi,Hu as vl,J0 as vn,Eoe as vo,wge as vr,Cse as vs,Wge as vt,ml as vu,rse as w,xZ as wa,Lne as wc,Ya as wd,Nhe as wi,Hd as wl,Ghe as wn,V8 as wo,zoe as wr,Fye as ws,ape as wt,Ll as wu,Hfe as x,YZ as xa,Fne as xc,M as xd,u_e as xi,Rd as xl,n2 as xn,Ope as xo,W7 as xr,h$ as xs,Zfe as xt,Wc as xu,Ufe as y,tve as ya,Hne as yc,vo as yd,cve as yi,up as yl,Zme as yn,c0 as yo,nve as yr,k9 as ys,Gge as yt,Hl as yu,Y7 as z,dye as za,Ru as zc,j as zd,w7 as zi,cne as zl,Jme as zn,R9 as zo,I_e as zr,H0 as zs,f9 as zt,El as zu};
548
+ `).replace(/\n+$/,``)}}function k9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=qc(t);if(n===``)return{identity:{},starterContent:t};let i=Yc(n),a=dye(i);if(a)return{identity:a.identity,starterContent:O9(a.docFrontmatterText,r)};let{frontmatter:o}=qc(r);if(o!==``)return{identity:D9(i),starterContent:r};let s=D9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:O9(i,r)}}function fye(e,t){let{docFrontmatterText:n,markdown:r}=uye(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Lc.stringify)({[E9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function pye(e){return k9(e).starterContent}const A9=e=>e*8+4;A9(92),A9(40);const mye=/^(#{1,6})\s+(.+)$/;function hye(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(mye);if(!n)return null;let r=n[2].trim(),i=Bpe(r,t);return i?{level:n[1].length,text:r,slug:i}:null}Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));const gye={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},_ye=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],vye={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function yye(e,t=_ye){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const bye={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function j9(e){return e?bye[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const xye={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function Sye(e){let t=e?.trim();return t?xye[j9(t)]??t:`Agent`}function M9(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function N9(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function Cye(e){return e.split(`/`).map(N9).join(`/`)}function P9(e){return e.split(`/`).map(M9).join(`/`)}function F9(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=M9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!W0.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=M9(d[e]??``);if(e===f&&(t=gl(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function wye(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}const I9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function L9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function R9(e){let t=e.trim();return I9.test(t)||t.startsWith(`//`)}function Tye(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(R9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=P9(r<0?n:n.slice(0,r)),a=xl(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=bl(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=F9(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=L9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function z9(e,t){let n=e.trim();if(!n)return null;if(R9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=L9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Eye(e,t,n){let r=e.trim();if(!r||I9.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:M9(e));return c.length===0?null:c.join(`/`)}function B9(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function V9(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function H9(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function U9(e){return e.split(`/`).filter(e=>e!==``)}function Dye(e,t){let n=H9(t);return e===``||n===e||n.startsWith(`${e}/`)}function W9(e,t){let n=H9(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:U9(r).length}function G9(e,t){let n=U9(e),r=U9(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function Oye(){let e=new Map;function t(t){let n=B9(t);if(n===``)return;let r=V9(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=B9(t),r=V9(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=H9(B9(n)),o=[],s=[];for(let e of i)Dye(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=W9(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=W9(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=G9(a,H9(t));for(let r=1;r<e.length;r++){let i=e[r],o=G9(a,H9(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}}const K9=`unknown`;function kye(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return K9;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function Aye(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 jye(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}function q9(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function Mye(e){return e.reason!==void 0||q9(e.note)!==void 0||q9(e.email)!==void 0}function Nye(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 Pye(){return Nye((typeof process>`u`?void 0:q9(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function Fye(e){let t=q9(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function J9(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 Iye(e,t={}){let n=Pye();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=q9(e.note),a=Fye(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 J9(r,o,c());let l=await J9(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:J9(r,o,c())}function Y9(e){return`pagesBySlug`in e}function X9(e){return Y9(e)?e.pages:e}function Lye(e,t){return Y9(e)?e.assetPaths??new Set:t??new Set}function Rye(e,t){return Y9(e)?e.filePaths??new Set:t??new Set}function Z9(e,t){return e<t?-1:+(e>t)}function zye(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);e&&(i===void 0||Z9(r,i)<0)&&n.set(e,r)}return n}function Bye(e,t){let n=new Map,r=[...e].sort(Z9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function Vye(e,t){let n=i7(e);if(!n)return;if(Y9(t))return t.pagesBySlug.get(n);let r;for(let e of t)i7(e)===n&&(r===void 0||Z9(e,r)<0)&&(r=e);return r}function Hye(e,t){if(e.includes(`/`))return;let n=i7(e);if(!n)return;if(Y9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);i7(t===-1?e:e.slice(t+1))===n&&(r===void 0||Z9(e,r)<0)&&(r=e)}return r}function Uye(e){let t=e.trim();if(!t)return[];let n=i7(t);return n.length>0&&n!==t?[n]:[]}function Q9(e,t){let n=e.trim();if(!n)return;if(X9(t).has(n))return n;let r=n.replace(/\.(md|mdx)$/i,``);if(r!==n){let e=$9(r,t);if(e!==void 0)return e}return $9(n,t)}function $9(e,t){let n=e.trim();if(!n)return;let r=X9(t);if(r.has(n))return n;let i=Vye(n,t);if(i)return i;for(let e of Uye(n))if(r.has(e))return e;return Wye(n,r)||Hye(n,t)}function Wye(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function Gye(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function Kye(e,t,n){let r=Gye(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(Z9)[0]??null}function qye(e,t,n){let r=z9(e,t);return r===null||r.kind!==`asset`||Kye(r.url,Lye(n),Rye(n))!==null||Q9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}const Jye=new Nde({extensions:M4,deriveStructuralFreshness:!0}),Yye=fC(M4);export{zhe as $,b1 as $a,xd as $c,fe as $d,pme as $i,sl as $l,$8 as $n,Lge as $o,x_e as $r,Epe as $s,ohe as $t,vs as $u,_ve as A,tse as Aa,rne as Ac,Rn as Ad,gge as Ai,Lu as Al,mme as An,rce as Ao,Joe as Ar,ype as As,Fme as At,kl as Au,q7 as B,TQ as Ba,Yd as Bc,A as Bd,$ge as Bi,lne as Bl,ege as Bn,_pe as Bo,N_e as Br,qye as Bs,a7 as Bt,hu as Bu,Cme as C,koe as Ca,Rne as Cc,to as Cd,fve as Ci,ep as Cl,M1 as Cn,Fpe as Co,G4 as Cr,FZ as Cs,G5 as Ct,Ml as Cu,j5 as D,VZ as Da,Dne as Dc,$i as Dd,wge as Di,Vu as Dl,gme as Dn,m$ as Do,Woe as Dr,x4 as Ds,p7 as Dt,hl as Du,x$ as E,zye as Ea,Bne as Ec,Oa as Ed,nhe as Ei,qf as El,_me as En,kye as Eo,K4 as Er,eme as Es,d7 as Et,gu as Eu,gve as F,P1 as Fa,Lf as Fc,_t as Fd,yge as Fi,wne as Fl,V5 as Fn,pye as Fo,A_e as Fr,sye as Fs,Nge as Ft,vl as Fu,sme as G,Ape as Ga,nd as Gc,ie as Gd,t_e as Gi,Tu as Gl,j7 as Gn,u5 as Go,o_e as Gr,Ese as Gs,Zme as Gt,tl as Gu,v7 as H,i_e as Ha,Pf as Hc,te as Hd,Zge as Hi,Su as Hl,Tse as Hn,nse as Ho,F_e as Hr,m0 as Hs,jme as Ht,qc as Hu,J7 as I,yye as Ia,Bf as Ic,dt as Id,E9 as Ii,Zu as Il,U5 as In,E_e as Io,j_e as Ir,O0 as Is,Fge as It,xl as Iu,s7 as J,n$ as Ja,Vd as Jc,ce as Jd,Jge as Ji,jl as Jl,M7 as Jn,z4 as Jo,z_e as Jr,tve as Js,z5 as Jt,ds as Ju,cme as K,Oye as Ka,Gf as Kc,de as Kd,Yge as Ki,wu as Kl,n_e as Kn,Y0 as Ko,cve as Kr,Wve as Ks,cpe as Kt,Ic as Ku,Z7 as L,_1 as La,zf as Lc,He as Ld,a_e as Li,id as Ll,Jhe as Ln,Mpe as Lo,M_e as Lr,F9 as Ls,Nhe as Lt,Ul as Lu,bve as M,t2 as Ma,vne as Mc,eee as Md,Cge as Mi,Pne as Ml,K9 as Mn,Mye as Mo,cse as Mr,xpe as Ms,qme as Mt,mu as Mu,vve as N,$_e as Na,Yf as Nc,tee as Nd,hge as Ni,Ane as Nl,j1 as Nn,j9 as No,v_e as Nr,B0 as Ns,$me as Nt,Kl as Nu,N5 as O,e7 as Oa,yd as Oc,Zi as Od,xge as Oi,gf as Ol,dse as On,Kde as Oo,Uoe as Or,AQ as Os,Vme as Ot,Zc as Ou,yve as P,z9 as Pa,Cd as Pc,ht as Pd,vge as Pi,One as Pl,O1 as Pn,V0 as Po,k_e as Pr,Eye as Ps,yse as Pt,Jc as Pu,Rhe as Q,P9 as Qa,pp as Qc,le as Qd,She as Qi,al as Ql,W0 as Qn,ive as Qo,y_e as Qr,Noe as Qs,ghe as Qt,ps as Qu,X7 as R,X8 as Ra,Rf as Rc,Ae as Rd,Uge as Ri,pne as Rl,Yhe as Rn,Yoe as Ro,R_e as Rr,vse as Rs,t3 as Rt,Qc as Ru,wme as S,joe as Sa,zne as Sc,ute as Sd,dve as Si,Jf as Sl,i2 as Sn,Bde as So,use as Sr,Kve as Ss,$fe as St,pl as Su,LQ as T,Bye as Ta,Ine as Tc,Aa as Td,_se as Ti,Nu as Tl,Whe as Tn,j0 as To,Boe as Tr,r2 as Ts,spe as Tt,du as Tu,ise as U,p0 as Ua,Nf as Uc,ne as Ud,Qge as Ui,vu as Ul,O7 as Un,z0 as Uo,I_e as Ur,wpe as Us,m7 as Ut,Al as Uu,N1 as V,EQ as Va,Ff as Vc,ve as Vd,qge as Vi,Cu as Vl,tge as Vn,B4 as Vo,P_e as Vr,Q9 as Vs,G0 as Vt,_u as Vu,ose as W,f0 as Wa,vd as Wc,re as Wd,e_e as Wi,xu as Wl,B7 as Wn,Gue as Wo,G_e as Wr,hye as Ws,Xme as Wt,Yc as Wu,Bhe as X,r9 as Xa,Hf as Xc,D as Xd,Che as Xi,ll as Xl,rye as Xn,mpe as Xo,B_e as Xr,Q6 as Xs,hpe as Xt,rs as Xu,vme as Y,K6 as Ya,Uf as Yc,ue as Yd,The as Yi,il as Yl,nye as Yn,ppe as Yo,sve as Yr,HQ as Ys,fpe as Yt,us as Yu,Vhe as Z,Dve as Za,Vf as Zc,ge as Zd,whe as Zi,cl as Zl,w9 as Zn,o2 as Zo,z7 as Zr,s$ as Zs,hhe as Zt,Nte as Zu,Gfe as _,wye as _a,Une as _c,I as _d,V_e as _i,Bd as _l,d5 as _n,Aye as _o,Mge as _r,Soe as _s,Wge as _t,cu as _u,k5 as a,hse as aa,i7 as ac,L as ad,S as af,h_e as ai,une as al,uhe as an,Sye as ao,ige as ar,KQ as as,the as at,fl as au,fse as b,Vfe as ba,bp as bc,ao as bd,uve as bi,Kf as bl,q$ as bn,T$ as bo,G7 as br,Moe as bs,Ome as bt,uu as bu,tme as c,upe as ca,R4 as cc,F as cd,ee as cf,g_e as ci,hf as cl,rhe as cn,W5 as co,sge as cr,M0 as cs,hme as ct,Wl as cu,Kfe as d,W$ as da,yH as dc,no as dd,T as df,oye as di,Af as dl,jhe as dn,cye as do,K7 as dr,H$ as ds,Hhe as dt,eu as du,Qhe as ea,CZ as ec,Mte as ed,he as ef,O_e as ei,bd as el,she as en,jpe as eo,lye as er,N7 as es,Mfe as et,ol as eu,Lfe as f,E0 as fa,rg as fc,qa as fd,U_e as fi,tne as fl,khe as fn,Cye as fo,ave as fr,B8 as fs,Uhe as ft,tu as fu,Ffe as g,FQ as ga,Sp as gc,N as gd,u_e as gi,cd as gl,h5 as gn,QX as go,kge as gr,p9 as gs,h0 as gt,$l as gu,Zfe as h,pQ as ha,Gne as hc,$a as hd,l_e as hi,Sne as hl,Mhe as hn,w7 as ho,Oge as hr,f$ as hs,Lhe as ht,Ql as hu,t7 as i,F7 as ia,L4 as ic,co as id,v as if,m_e as ii,Ud as il,gse as in,Ooe as io,cge as ir,Ppe as is,K0 as it,dl as iu,xve as j,Tye as ja,Tne as jc,Qt as jd,Sge as ji,Pu as jl,b7 as jn,O4 as jo,sse as jr,bpe as js,Kme as jt,Cl as ju,Q8 as k,U0 as ka,Gd as kc,Tr as kd,_ge as ki,nne as kl,$4 as kn,Kpe as ko,Koe as kr,a3 as ks,Hme as kt,Tl as ku,ome as l,D5 as la,Npe as lc,P as ld,y as lf,__e as li,sne as ll,ahe as ln,Sse as lo,lge as lr,_$ as ls,xme as lt,Gl as lu,Jfe as m,vpe as ma,yp as mc,R as md,J_e as mi,kne as ml,Ehe as mn,Yve as mo,Dge as mr,y4 as ms,Pme as mt,nu as mu,Yye as n,q0 as na,IQ as nc,Ate as nd,pe as nf,f_e as ni,jne as nl,phe as nn,A0 as no,Ume as nr,J4 as ns,e5 as nt,_l as nu,bhe as o,mse as oa,y$ as oc,Ja as od,x as of,Y_e as oi,Xu as ol,lhe as on,l$ as oo,age as or,$6 as os,Xhe as ot,Il as ou,qfe as p,mQ as pa,V as pc,ro as pd,K_e as pi,Cne as pl,Dhe as pn,N9 as po,Ege as pr,V6 as ps,iZ as pt,ou as pu,Tme as q,Y6 as qa,Sd as qc,ae as qd,Xge as qi,bu as ql,P7 as qn,$$ as qo,mve as qr,Nfe as qs,npe as qt,fs as qu,vye as r,s2 as ra,epe as rc,Ka as rd,se as rf,p_e as ri,Ene as rl,mhe as rn,DQ as ro,Wme as rr,Bfe as rs,xoe as rt,ul as ru,xhe as s,dpe as sa,jve as sc,rte as sd,E as sf,X_e as si,Nne as sl,fhe as sn,UQ as so,oge as sr,$0 as ss,Zhe as st,Fl as su,Jye as t,$he as ta,jye as tc,qte as td,k as tf,b_e as ti,Mne as tl,che as tn,G$ as to,gye as tr,Hde as ts,q8 as tt,Vc as tu,Ife as u,Jme as ua,eU as uc,_o as ud,b as uf,E7 as ui,Uu as ul,ape as un,rZ as uo,Z_e as ur,D_e as us,bme as ut,rl as uu,Pfe as v,pse as va,Vne as vc,lo as vd,H_e as vi,Hu as vl,J0 as vn,Eoe as vo,Tge as vr,Cse as vs,Gge as vt,ml as vu,rse as w,xZ as wa,Lne as wc,Ya as wd,Phe as wi,Hd as wl,Khe as wn,V8 as wo,zoe as wr,Iye as ws,ope as wt,Ll as wu,Ufe as x,YZ as xa,Fne as xc,M as xd,d_e as xi,Rd as xl,n2 as xn,kpe as xo,W7 as xr,h$ as xs,Qfe as xt,Wc as xu,Wfe as y,nve as ya,Hne as yc,vo as yd,lve as yi,up as yl,Qme as yn,c0 as yo,rve as yr,k9 as ys,Kge as yt,Hl as yu,Y7 as z,fye as za,Ru as zc,j as zd,Vge as zi,cne as zl,Yme as zn,R9 as zo,L_e as zr,H0 as zs,f9 as zt,El as zu};