@codeyam/codeyam-cli 0.1.8 → 0.1.9

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 (335) hide show
  1. package/analyzer-template/.build-info.json +8 -8
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +4 -4
  4. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
  5. package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +13 -7
  6. package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
  7. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
  8. package/analyzer-template/packages/aws/package.json +1 -1
  9. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +31 -0
  10. package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
  11. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +0 -65
  12. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +5 -0
  13. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -1
  14. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +31 -0
  15. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  16. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  17. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
  18. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  19. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  20. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +0 -25
  21. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  22. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  23. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  24. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
  25. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
  26. package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
  27. package/analyzer-template/packages/ui-components/package.json +1 -1
  28. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  29. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  30. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
  31. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
  32. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
  33. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
  34. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
  35. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
  36. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
  37. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
  38. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +45 -0
  39. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
  40. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
  41. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
  42. package/codeyam-cli/src/commands/default.js +3 -46
  43. package/codeyam-cli/src/commands/default.js.map +1 -1
  44. package/codeyam-cli/src/commands/editor.js +1619 -243
  45. package/codeyam-cli/src/commands/editor.js.map +1 -1
  46. package/codeyam-cli/src/commands/init.js +67 -34
  47. package/codeyam-cli/src/commands/init.js.map +1 -1
  48. package/codeyam-cli/src/data/techStacks.js +77 -0
  49. package/codeyam-cli/src/data/techStacks.js.map +1 -0
  50. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +144 -0
  51. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
  52. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
  53. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
  54. package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
  55. package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
  56. package/codeyam-cli/src/utils/__tests__/editorApi.test.js +127 -0
  57. package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
  58. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +610 -1
  59. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  60. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
  61. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
  62. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +181 -3
  63. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -1
  64. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +121 -0
  65. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
  66. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
  67. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
  68. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +249 -2
  69. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -1
  70. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +520 -0
  71. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
  72. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +118 -1
  73. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -1
  74. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +195 -3
  75. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -1
  76. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
  77. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
  78. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
  79. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
  80. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +221 -0
  81. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
  82. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +781 -2
  83. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
  84. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +213 -0
  85. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
  86. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1742 -0
  87. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
  88. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
  89. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
  90. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +101 -0
  91. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
  92. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +227 -0
  93. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
  94. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +300 -0
  95. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
  96. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +25 -5
  97. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  98. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
  99. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
  100. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
  101. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
  102. package/codeyam-cli/src/utils/analyzer.js +9 -0
  103. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  104. package/codeyam-cli/src/utils/analyzerFinalization.js +96 -0
  105. package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
  106. package/codeyam-cli/src/utils/backgroundServer.js +94 -18
  107. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  108. package/codeyam-cli/src/utils/database.js +37 -2
  109. package/codeyam-cli/src/utils/database.js.map +1 -1
  110. package/codeyam-cli/src/utils/devServerState.js +71 -0
  111. package/codeyam-cli/src/utils/devServerState.js.map +1 -0
  112. package/codeyam-cli/src/utils/editorApi.js +73 -0
  113. package/codeyam-cli/src/utils/editorApi.js.map +1 -0
  114. package/codeyam-cli/src/utils/editorAudit.js +101 -7
  115. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  116. package/codeyam-cli/src/utils/editorCapture.js +102 -0
  117. package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
  118. package/codeyam-cli/src/utils/editorDevServer.js +100 -1
  119. package/codeyam-cli/src/utils/editorDevServer.js.map +1 -1
  120. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +44 -0
  121. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
  122. package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
  123. package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
  124. package/codeyam-cli/src/utils/editorJournal.js +92 -4
  125. package/codeyam-cli/src/utils/editorJournal.js.map +1 -1
  126. package/codeyam-cli/src/utils/editorLoaderHelpers.js +113 -0
  127. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
  128. package/codeyam-cli/src/utils/editorMockState.js +1 -1
  129. package/codeyam-cli/src/utils/editorPreloadHelpers.js +72 -1
  130. package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -1
  131. package/codeyam-cli/src/utils/editorPreview.js +67 -1
  132. package/codeyam-cli/src/utils/editorPreview.js.map +1 -1
  133. package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
  134. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
  135. package/codeyam-cli/src/utils/editorScenarios.js +276 -0
  136. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
  137. package/codeyam-cli/src/utils/editorSeedAdapter.js +173 -0
  138. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
  139. package/codeyam-cli/src/utils/entityChangeStatus.js +349 -0
  140. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
  141. package/codeyam-cli/src/utils/entityChangeStatus.server.js +158 -0
  142. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
  143. package/codeyam-cli/src/utils/install-skills.js +1 -1
  144. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  145. package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
  146. package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
  147. package/codeyam-cli/src/utils/scenarioCoverage.js +75 -0
  148. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
  149. package/codeyam-cli/src/utils/scenariosManifest.js +159 -0
  150. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
  151. package/codeyam-cli/src/utils/serverState.js +30 -0
  152. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  153. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +46 -16
  154. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  155. package/codeyam-cli/src/utils/simulationGateMiddleware.js +8 -1
  156. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
  157. package/codeyam-cli/src/utils/slugUtils.js +25 -0
  158. package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
  159. package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
  160. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  161. package/codeyam-cli/src/utils/webappDetection.js +21 -0
  162. package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
  163. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +40 -0
  164. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
  165. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +567 -0
  166. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
  167. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +65 -0
  168. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
  169. package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
  170. package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
  171. package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-DmJveP3T.js → CopyButton-BPXZwM4t.js} +1 -1
  172. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-C76mRRiF.js → EntityItem-BcgbViKV.js} +3 -3
  173. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CobE682z.js → EntityTypeIcon-CQIG2qda.js} +9 -9
  174. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-djPLI-WV.js → ReportIssueModal-BzHcG7SE.js} +3 -3
  175. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-B76aig_2.js → ScenarioViewer-Bd-hxofb.js} +3 -3
  176. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
  177. package/codeyam-cli/src/webserver/build/client/assets/{_index-C96V0n15.js → _index-DLxKhri3.js} +3 -3
  178. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BpKzcsJz.js → activity.(_tab)-BcY3q6nt.js} +6 -6
  179. package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
  180. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
  181. package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
  182. package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-D9hemwl6.js → agent-transcripts-Bni3iiUj.js} +5 -5
  183. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
  184. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
  185. package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
  186. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
  187. package/codeyam-cli/src/webserver/build/client/assets/{book-open-D_nMCFmP.js → book-open-BYOypzCa.js} +2 -2
  188. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BH2h1Ea2.js → chevron-down-C_Pmso5S.js} +2 -2
  189. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DyIKORY6.js → circle-check-BVMi9VA5.js} +2 -2
  190. package/codeyam-cli/src/webserver/build/client/assets/{copy-NDbZjXao.js → copy-n2FB0_Sw.js} +3 -3
  191. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CC6AbExI.js +41 -0
  192. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BsDh6TSF.js +1 -0
  193. package/codeyam-cli/src/webserver/build/client/assets/editor-PBc_6L9R.js +10 -0
  194. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-4FzHlcNn.js +41 -0
  195. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-CrjR3zZW.js → entity._sha._-BsDXNp45.js} +3 -3
  196. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-BgAqUtTZ.js +6 -0
  197. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-Bmshgrij.js +6 -0
  198. package/codeyam-cli/src/webserver/build/client/assets/{files-DO4CZ16O.js → files-BZrlFE1F.js} +1 -1
  199. package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +1 -0
  200. package/codeyam-cli/src/webserver/build/client/assets/globals-B8vTTNy2.css +1 -0
  201. package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
  202. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BAXYRVEO.js → loader-circle-DaAZ_H2w.js} +2 -2
  203. package/codeyam-cli/src/webserver/build/client/assets/manifest-65850841.js +1 -0
  204. package/codeyam-cli/src/webserver/build/client/assets/memory-9gnxSZlb.js +101 -0
  205. package/codeyam-cli/src/webserver/build/client/assets/{pause-DTAcYxBt.js → pause-f5-1lKBt.js} +3 -3
  206. package/codeyam-cli/src/webserver/build/client/assets/root-BwX8YgFb.js +67 -0
  207. package/codeyam-cli/src/webserver/build/client/assets/{search-fKo7v0Zo.js → search-Di64LWVb.js} +2 -2
  208. package/codeyam-cli/src/webserver/build/client/assets/{settings-DfuTtcJP.js → settings-0OrEMU6J.js} +1 -1
  209. package/codeyam-cli/src/webserver/build/client/assets/{simulations-B3aOzpCZ.js → simulations-DWT-CvLy.js} +1 -1
  210. package/codeyam-cli/src/webserver/build/client/assets/{terminal-BG4heKCG.js → terminal-Br7MOqts.js} +3 -3
  211. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DtSmdtM4.js → triangle-alert-BLdiCuG-.js} +2 -2
  212. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BE43Hjti.js +1 -0
  213. package/codeyam-cli/src/webserver/build/server/assets/index-DEEQf4pi.js +1 -0
  214. package/codeyam-cli/src/webserver/build/server/assets/init-CkWmyFY2.js +10 -0
  215. package/codeyam-cli/src/webserver/build/server/assets/server-build-BHi-9O8W.js +439 -0
  216. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  217. package/codeyam-cli/src/webserver/build-info.json +5 -5
  218. package/codeyam-cli/src/webserver/editorProxy.js +487 -50
  219. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
  220. package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +242 -3
  221. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +94 -4
  222. package/codeyam-cli/src/webserver/server.js +46 -14
  223. package/codeyam-cli/src/webserver/server.js.map +1 -1
  224. package/codeyam-cli/src/webserver/terminalServer.js +39 -11
  225. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
  226. package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
  227. package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
  228. package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
  229. package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
  230. package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
  231. package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
  232. package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
  233. package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
  234. package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
  235. package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
  236. package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
  237. package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
  238. package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
  239. package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
  240. package/codeyam-cli/templates/codeyam-editor-claude.md +84 -5
  241. package/codeyam-cli/templates/editor-step-hook.py +97 -8
  242. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
  243. package/codeyam-cli/templates/expo-react-native/README.md +41 -0
  244. package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
  245. package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
  246. package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
  247. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
  248. package/codeyam-cli/templates/expo-react-native/app.json +18 -0
  249. package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
  250. package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
  251. package/codeyam-cli/templates/expo-react-native/global.css +3 -0
  252. package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
  253. package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
  254. package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
  255. package/codeyam-cli/templates/expo-react-native/package.json +38 -0
  256. package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
  257. package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
  258. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
  259. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
  260. package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
  261. package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
  262. package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
  263. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
  264. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +9 -4
  265. package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
  266. package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +21 -0
  267. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +5 -1
  268. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +4 -1
  269. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +92 -0
  270. package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
  271. package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
  272. package/codeyam-cli/templates/{nextjs-prisma-sqlite/PRISMA_SETUP.md → nextjs-prisma-supabase/SUPABASE_SETUP.md} +37 -17
  273. package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
  274. package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
  275. package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
  276. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
  277. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
  278. package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
  279. package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
  280. package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
  281. package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
  282. package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
  283. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
  284. package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
  285. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
  286. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
  287. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
  288. package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
  289. package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +2 -2
  290. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +96 -17
  291. package/codeyam-cli/templates/skills/codeyam-memory/SKILL.md +10 -10
  292. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
  293. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
  294. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
  295. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
  296. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
  297. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
  298. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
  299. package/package.json +14 -9
  300. package/packages/ai/src/lib/generateExecutionFlows.js +0 -11
  301. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
  302. package/packages/analyze/src/lib/ProjectAnalyzer.js +10 -4
  303. package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
  304. package/packages/analyze/src/lib/asts/index.js +4 -2
  305. package/packages/analyze/src/lib/asts/index.js.map +1 -1
  306. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
  307. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
  308. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +31 -0
  309. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  310. package/packages/database/src/lib/loadEntities.js +0 -6
  311. package/packages/database/src/lib/loadEntities.js.map +1 -1
  312. package/packages/database/src/lib/updateCommitMetadata.js +0 -25
  313. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  314. package/packages/types/src/enums/ProjectFramework.js +2 -0
  315. package/packages/types/src/enums/ProjectFramework.js.map +1 -1
  316. package/codeyam-cli/src/webserver/build/client/assets/Terminal-Dnj5CY9R.js +0 -41
  317. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +0 -1
  318. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CMT1jU2q.js +0 -21
  319. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +0 -1
  320. package/codeyam-cli/src/webserver/build/client/assets/editor-D1DAKXtT.js +0 -8
  321. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-DkzqFzFj.js +0 -6
  322. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +0 -6
  323. package/codeyam-cli/src/webserver/build/client/assets/git-CFCTYk9I.js +0 -15
  324. package/codeyam-cli/src/webserver/build/client/assets/globals-B17TBSS6.css +0 -1
  325. package/codeyam-cli/src/webserver/build/client/assets/manifest-a632de18.js +0 -1
  326. package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +0 -96
  327. package/codeyam-cli/src/webserver/build/client/assets/root-DUKqhFlb.js +0 -67
  328. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-ByhSyh0W.js +0 -1
  329. package/codeyam-cli/src/webserver/build/server/assets/index-HfLydfDq.js +0 -1
  330. package/codeyam-cli/src/webserver/build/server/assets/server-build-CUu_F-oo.js +0 -366
  331. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.sh +0 -108
  332. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.sh +0 -69
  333. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.sh +0 -12
  334. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter.jq +0 -45
  335. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.sh +0 -139
@@ -0,0 +1,101 @@
1
+ import{g as br,j as a,r as I,w as Bi,u as $i,d as Hi,f as Ui,L as Vi}from"./chunk-JZWAC4HX-C4pqxYJB.js";import{u as qi}from"./useReportContext-O-jkvSPx.js";import{c as Se}from"./createLucideIcon-CC6AbExI.js";import{T as kr,C as Jt}from"./terminal-Br7MOqts.js";import{C as Ie,a as _e}from"./copy-n2FB0_Sw.js";import{C as wr}from"./CopyButton-BPXZwM4t.js";import{C as _t}from"./chevron-down-C_Pmso5S.js";import{S as Cr}from"./search-Di64LWVb.js";import{F as Ot,P as Wi}from"./pause-f5-1lKBt.js";import{B as Yi}from"./book-open-BYOypzCa.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Qi=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Xi=Se("eye",Qi);/**
7
+ * @license lucide-react v0.577.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Ki=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Gi=Se("folder-tree",Ki);/**
12
+ * @license lucide-react v0.577.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Ji=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],vr=Se("folder",Ji);/**
17
+ * @license lucide-react v0.577.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Zi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Bt=Se("info",Zi);/**
22
+ * @license lucide-react v0.577.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const el=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],tl=Se("pencil",el);/**
27
+ * @license lucide-react v0.577.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const nl=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zt=Se("plus",nl);/**
32
+ * @license lucide-react v0.577.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const rl=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],il=Se("trash-2",rl);/**
37
+ * @license lucide-react v0.577.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const ll=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$e=Se("x",ll);function ol(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const al=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ul={};function jn(e,t){return(ul.jsx?sl:al).test(e)}const cl=/[ \t\n\f\r]/g;function hl(e){return typeof e=="object"?e.type==="text"?Nn(e.value):!1:Nn(e)}function Nn(e){return e.replace(cl,"")===""}class nt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}nt.prototype.normal={};nt.prototype.property={};nt.prototype.space=void 0;function jr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new nt(n,r,t)}function $t(e){return e.toLowerCase()}class fe{constructor(t,n){this.attribute=n,this.property=t}}fe.prototype.attribute="";fe.prototype.booleanish=!1;fe.prototype.boolean=!1;fe.prototype.commaOrSpaceSeparated=!1;fe.prototype.commaSeparated=!1;fe.prototype.defined=!1;fe.prototype.mustUseProperty=!1;fe.prototype.number=!1;fe.prototype.overloadedBoolean=!1;fe.prototype.property="";fe.prototype.spaceSeparated=!1;fe.prototype.space=void 0;let fl=0;const U=Fe(),ie=Fe(),Ht=Fe(),E=Fe(),te=Fe(),Oe=Fe(),pe=Fe();function Fe(){return 2**++fl}const Ut=Object.freeze(Object.defineProperty({__proto__:null,boolean:U,booleanish:ie,commaOrSpaceSeparated:pe,commaSeparated:Oe,number:E,overloadedBoolean:Ht,spaceSeparated:te},Symbol.toStringTag,{value:"Module"})),wt=Object.keys(Ut);class en extends fe{constructor(t,n,r,i){let o=-1;if(super(t,n),Sn(this,"space",i),typeof r=="number")for(;++o<wt.length;){const l=wt[o];Sn(this,wt[o],(r&Ut[l])===Ut[l])}}}en.prototype.defined=!0;function Sn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new en(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$t(r)]=r,n[$t(o.attribute)]=r}return new nt(t,n,e.space)}const Nr=He({properties:{ariaActiveDescendant:null,ariaAtomic:ie,ariaAutoComplete:null,ariaBusy:ie,ariaChecked:ie,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:te,ariaCurrent:null,ariaDescribedBy:te,ariaDetails:null,ariaDisabled:ie,ariaDropEffect:te,ariaErrorMessage:null,ariaExpanded:ie,ariaFlowTo:te,ariaGrabbed:ie,ariaHasPopup:null,ariaHidden:ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:te,ariaLevel:E,ariaLive:null,ariaModal:ie,ariaMultiLine:ie,ariaMultiSelectable:ie,ariaOrientation:null,ariaOwns:te,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:ie,ariaReadOnly:ie,ariaRelevant:null,ariaRequired:ie,ariaRoleDescription:te,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:ie,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sr(e,t){return t in e?e[t]:t}function Er(e,t){return Sr(e,t.toLowerCase())}const dl=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oe,acceptCharset:te,accessKey:te,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:te,autoFocus:U,autoPlay:U,blocking:te,capture:null,charSet:null,checked:U,cite:null,className:te,cols:E,colSpan:null,content:null,contentEditable:ie,controls:U,controlsList:te,coords:E|Oe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:Ht,draggable:ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:te,height:E,hidden:Ht,high:E,href:null,hrefLang:null,htmlFor:te,httpEquiv:te,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:te,itemRef:te,itemScope:U,itemType:te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:E,pattern:null,ping:te,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:te,required:U,reversed:U,rows:E,rowSpan:E,sandbox:te,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:ie,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:te,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:ie,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:Er}),pl=He({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pe,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Oe,g2:Oe,glyphName:Oe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:pe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pe,rev:pe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pe,requiredFeatures:pe,requiredFonts:pe,requiredFormats:pe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:pe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pe,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sr}),Pr=He({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ar=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Er}),Tr=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ml={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},gl=/[A-Z]/g,En=/-[a-z]/g,xl=/^data[-\w.:]+$/i;function yl(e,t){const n=$t(t);let r=t,i=fe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(En,kl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!En.test(o)){let l=o.replace(gl,bl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=en}return new i(r,t)}function bl(e){return"-"+e.toLowerCase()}function kl(e){return e.charAt(1).toUpperCase()}const wl=jr([Nr,dl,Pr,Ar,Tr],"html"),tn=jr([Nr,pl,Pr,Ar,Tr],"svg");function Cl(e){return e.join(" ").trim()}var De={},Ct,Pn;function vl(){if(Pn)return Ct;Pn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,s=/^\s+|\s+$/g,c=`
42
+ `,u="/",f="*",h="",p="comment",d="declaration";function m(C,y){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];y=y||{};var j=1,S=1;function A(L){var v=L.match(t);v&&(j+=v.length);var z=L.lastIndexOf(c);S=~z?L.length-z:S+L.length}function P(){var L={line:j,column:S};return function(v){return v.position=new b(L),q(),v}}function b(L){this.start=L,this.end={line:j,column:S},this.source=y.source}b.prototype.content=C;function R(L){var v=new Error(y.source+":"+j+":"+S+": "+L);if(v.reason=L,v.filename=y.source,v.line=j,v.column=S,v.source=C,!y.silent)throw v}function _(L){var v=L.exec(C);if(v){var z=v[0];return A(z),C=C.slice(z.length),v}}function q(){_(n)}function w(L){var v;for(L=L||[];v=F();)v!==!1&&L.push(v);return L}function F(){var L=P();if(!(u!=C.charAt(0)||f!=C.charAt(1))){for(var v=2;h!=C.charAt(v)&&(f!=C.charAt(v)||u!=C.charAt(v+1));)++v;if(v+=2,h===C.charAt(v-1))return R("End of comment missing");var z=C.slice(2,v-2);return S+=2,A(z),C=C.slice(v),S+=2,L({type:p,comment:z})}}function D(){var L=P(),v=_(r);if(v){if(F(),!_(i))return R("property missing ':'");var z=_(o),B=L({type:d,property:k(v[0].replace(e,h)),value:z?k(z[0].replace(e,h)):h});return _(l),B}}function Y(){var L=[];w(L);for(var v;v=D();)v!==!1&&(L.push(v),w(L));return L}return q(),Y()}function k(C){return C?C.replace(s,h):h}return Ct=m,Ct}var An;function jl(){if(An)return De;An=1;var e=De&&De.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0}),De.default=n;const t=e(vl());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),s=typeof i=="function";return l.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:f}=c;s?i(u,f,c):f&&(o=o||{},o[u]=f)}),o}return De}var We={},Tn;function Nl(){if(Tn)return We;Tn=1,Object.defineProperty(We,"__esModule",{value:!0}),We.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},c=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(t,l))};return We.camelCase=c,We}var Ye,In;function Sl(){if(In)return Ye;In=1;var e=Ye&&Ye.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(jl()),n=Nl();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(s,c){s&&c&&(l[(0,n.camelCase)(s,o)]=c)}),l}return r.default=r,Ye=r,Ye}var El=Sl();const Pl=br(El),Ir=Fr("end"),nn=Fr("start");function Fr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Al(e){const t=nn(e),n=Ir(e);if(t&&n)return{start:t,end:n}}function Ke(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?Vt(e):""}function Vt(e){return Rn(e&&e.line)+":"+Rn(e&&e.column)}function Fn(e){return Vt(e&&e.start)+"-"+Vt(e&&e.end)}function Rn(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Ke(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="";ae.prototype.name="";ae.prototype.reason="";ae.prototype.message="";ae.prototype.stack="";ae.prototype.column=void 0;ae.prototype.line=void 0;ae.prototype.ancestors=void 0;ae.prototype.cause=void 0;ae.prototype.fatal=void 0;ae.prototype.place=void 0;ae.prototype.ruleId=void 0;ae.prototype.source=void 0;const rn={}.hasOwnProperty,Tl=new Map,Il=/[A-Z]/g,Fl=new Set(["table","tbody","thead","tfoot","tr"]),Rl=new Set(["td","th"]),Rr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Dl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Hl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=$l(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tn:wl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Dr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Dr(e,t,n){if(t.type==="element")return Ll(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ml(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _l(e,t,n);if(t.type==="mdxjsEsm")return zl(e,t);if(t.type==="root")return Ol(e,t,n);if(t.type==="text")return Bl(e,t)}function Ll(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=tn,e.schema=i),e.ancestors.push(t);const o=Mr(e,t.tagName,!1),l=Ul(e,t);let s=on(e,t);return Fl.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!hl(c):!0})),Lr(e,l,o,t),ln(l,s),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ml(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}et(e,t.position)}function zl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);et(e,t.position)}function _l(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=tn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Mr(e,t.name,!0),l=Vl(e,t),s=on(e,t);return Lr(e,l,o,t),ln(l,s),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ol(e,t,n){const r={};return ln(r,on(e,t)),e.create(t,e.Fragment,r,n)}function Bl(e,t){return t.value}function Lr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ln(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $l(e,t,n){return r;function r(i,o,l,s){const u=Array.isArray(l.children)?n:t;return s?u(o,l,s):u(o,l)}}function Hl(e,t){return n;function n(r,i,o,l){const s=Array.isArray(o.children),c=nn(r);return t(i,o,l,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Ul(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&rn.call(t.properties,i)){const o=ql(e,i,t.properties[i]);if(o){const[l,s]=o;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Rl.has(t.tagName)?r=s:n[l]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Vl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const s=l.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else et(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else et(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function on(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Tl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const u=i.get(c)||0;l=c+"-"+u,i.set(c,u+1)}}const s=Dr(e,o,l);s!==void 0&&n.push(s)}return n}function ql(e,t,n){const r=yl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ol(n):Cl(n)),r.property==="style"){let i=typeof n=="object"?n:Wl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Yl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ml[r.property]||r.property:r.attribute,n]}}function Wl(e,t){try{return Pl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Rr+"#cannot-parse-style-attribute",i}}function Mr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const s=jn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=l}else r=jn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return rn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);et(e)}function et(e,t){const n=new ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Rr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Yl(e){const t={};let n;for(n in e)rn.call(e,n)&&(t[Ql(n)]=e[n]);return t}function Ql(e){let t=e.replace(Il,Xl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Xl(e){return"-"+e.toLowerCase()}const vt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Kl={};function an(e,t){const n=Kl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zr(e,r,i)}function zr(e,t,n){if(Gl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Dn(e.children,t,n)}return Array.isArray(e)?Dn(e,t,n):""}function Dn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=zr(e[i],t,n);return r.join("")}function Gl(e){return!!(e&&typeof e=="object")}const Ln=document.createElement("i");function sn(e){const t="&"+e+";";Ln.innerHTML=t;const n=Ln.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function me(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function ge(e,t){return e.length>0?(me(e,e.length,0,t),e):t}const Mn={}.hasOwnProperty;function _r(e){const t={};let n=-1;for(;++n<e.length;)Jl(t,e[n]);return t}function Jl(e,t){let n;for(n in t){const i=(Mn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Mn.call(i,l)||(i[l]=[]);const s=o[l];Zl(i[l],Array.isArray(s)?s:s?[s]:[])}}}function Zl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);me(e,0,0,r)}function Or(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=Ee(/[A-Za-z]/),oe=Ee(/[\dA-Za-z]/),eo=Ee(/[#-'*+\--9=?A-Z^-~]/);function ht(e){return e!==null&&(e<32||e===127)}const qt=Ee(/\d/),to=Ee(/[\dA-Fa-f]/),no=Ee(/[!-/:-@[-`{-~]/);function O(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function V(e){return e===-2||e===-1||e===32}const mt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Te=Ee(/\s/);function Ee(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ue(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&oe(e.charCodeAt(n+1))&&oe(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(l=String.fromCharCode(o,s),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(c){return V(c)?(e.enter(n),s(c)):t(c)}function s(c){return V(c)&&o++<i?(e.consume(c),s):(e.exit(n),t(c))}}const ro={tokenize:io};function io(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Q(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return O(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),l)}}const lo={tokenize:oo},zn={tokenize:ao};function oo(e){const t=this,n=[];let r=0,i,o,l;return s;function s(S){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,c,u)(S)}return u(S)}function c(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const A=t.events.length;let P=A,b;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){b=t.events[P][1].end;break}y(r);let R=A;for(;R<t.events.length;)t.events[R][1].end={...b},R++;return me(t.events,P+1,0,t.events.slice(A)),t.events.length=R,u(S)}return s(S)}function u(S){if(r===n.length){if(!i)return p(S);if(i.currentConstruct&&i.currentConstruct.concrete)return m(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zn,f,h)(S)}function f(S){return i&&j(),y(r),p(S)}function h(S){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(S)}function p(S){return t.containerState={},e.attempt(zn,d,m)(S)}function d(S){return r++,n.push([t.currentConstruct,t.containerState]),p(S)}function m(S){if(S===null){i&&j(),y(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),k(S)}function k(S){if(S===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return O(S)?(e.consume(S),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),k)}function C(S,A){const P=t.sliceStream(S);if(A&&P.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(P),t.parser.lazy[S.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const R=t.events.length;let _=R,q,w;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(q){w=t.events[_][1].end;break}q=!0}for(y(r),b=R;b<t.events.length;)t.events[b][1].end={...w},b++;me(t.events,_+1,0,t.events.slice(R)),t.events.length=b}}function y(S){let A=n.length;for(;A-- >S;){const P=n[A];t.containerState=P[1],P[0].exit.call(t,e)}n.length=S}function j(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ao(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Be(e){if(e===null||Z(e)||Te(e))return 1;if(mt(e))return 2}function gt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Wt={name:"attention",resolveAll:so,tokenize:uo};function so(e,t){let n=-1,r,i,o,l,s,c,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};_n(h,-c),_n(p,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},s={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ge(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ge(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=ge(u,gt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ge(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=ge(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,me(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function uo(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Be(r);let o;return l;function l(c){return o=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===o)return e.consume(c),s;const u=e.exit("attentionSequence"),f=Be(c),h=!f||f===2&&i||n.includes(c),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?h:h&&(i||!p)),u._close=!!(o===42?p:p&&(f||!h)),t(c)}}function _n(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const co={name:"autolink",tokenize:ho};function ho(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return ce(d)?(e.consume(d),l):d===64?n(d):u(d)}function l(d){return d===43||d===45||d===46||oe(d)?(r=1,s(d)):u(d)}function s(d){return d===58?(e.consume(d),r=0,c):(d===43||d===45||d===46||oe(d))&&r++<32?(e.consume(d),s):(r=0,u(d))}function c(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||ht(d)?n(d):(e.consume(d),c)}function u(d){return d===64?(e.consume(d),f):eo(d)?(e.consume(d),u):n(d)}function f(d){return oe(d)?h(d):n(d)}function h(d){return d===46?(e.consume(d),r=0,f):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||oe(d))&&r++<63){const m=d===45?p:h;return e.consume(d),m}return n(d)}}const rt={partial:!0,tokenize:fo};function fo(e,t,n){return r;function r(o){return V(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||O(o)?t(o):n(o)}}const Br={continuation:{tokenize:mo},exit:go,name:"blockQuote",tokenize:po};function po(e,t,n){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return V(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function mo(e,t,n){const r=this;return i;function i(l){return V(l)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Br,t,n)(l)}}function go(e){e.exit("blockQuote")}const $r={name:"characterEscape",tokenize:xo};function xo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return no(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Hr={name:"characterReference",tokenize:yo};function yo(e,t,n){const r=this;let i=0,o,l;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=oe,f(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=to,f):(e.enter("characterReferenceValue"),o=7,l=qt,f(h))}function f(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return l===oe&&!sn(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(h)&&i++<o?(e.consume(h),f):n(h)}}const On={partial:!0,tokenize:ko},Bn={concrete:!0,name:"codeFenced",tokenize:bo};function bo(e,t,n){const r=this,i={partial:!0,tokenize:P};let o=0,l=0,s;return c;function c(b){return u(b)}function u(b){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===s?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),V(b)?Q(e,h,"whitespace")(b):h(b))}function h(b){return b===null||O(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(On,k,A)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(b)):V(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,d,"whitespace")(b)):b===96&&b===s?n(b):(e.consume(b),p)}function d(b){return b===null||O(b)?h(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(b)):b===96&&b===s?n(b):(e.consume(b),m)}function k(b){return e.attempt(i,A,C)(b)}function C(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&V(b)?Q(e,j,"linePrefix",o+1)(b):j(b)}function j(b){return b===null||O(b)?e.check(On,k,A)(b):(e.enter("codeFlowValue"),S(b))}function S(b){return b===null||O(b)?(e.exit("codeFlowValue"),j(b)):(e.consume(b),S)}function A(b){return e.exit("codeFenced"),t(b)}function P(b,R,_){let q=0;return w;function w(v){return b.enter("lineEnding"),b.consume(v),b.exit("lineEnding"),F}function F(v){return b.enter("codeFencedFence"),V(v)?Q(b,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):D(v)}function D(v){return v===s?(b.enter("codeFencedFenceSequence"),Y(v)):_(v)}function Y(v){return v===s?(q++,b.consume(v),Y):q>=l?(b.exit("codeFencedFenceSequence"),V(v)?Q(b,L,"whitespace")(v):L(v)):_(v)}function L(v){return v===null||O(v)?(b.exit("codeFencedFence"),R(v)):_(v)}}}function ko(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const jt={name:"codeIndented",tokenize:Co},wo={partial:!0,tokenize:vo};function Co(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?c(u):O(u)?e.attempt(wo,l,c)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||O(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function c(u){return e.exit("codeIndented"),t(u)}}function vo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Q(e,o,"linePrefix",5)(l)}function o(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):O(l)?i(l):n(l)}}const jo={name:"codeText",previous:So,resolve:No,tokenize:Eo};function No(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function So(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Eo(e,t,n){let r=0,i,o;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),s(h)}function s(h){return h===96?(e.consume(h),r++,s):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(o=e.enter("codeTextSequence"),i=0,f(h)):O(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||O(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",u(h))}}class Po{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Qe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qe(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qe(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qe(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qe(this.left,n.reverse())}}}function Qe(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ur(e){const t={};let n=-1,r,i,o,l,s,c,u;const f=new Po(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ao(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return me(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Ao(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,c=[],u={};let f,h,p=-1,d=n,m=0,k=0;const C=[k];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(f=r.sliceStream(d),d.next||f.push(null),h&&l.defineSkip(d.start),d._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),d._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(k=p+1,C.push(k),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(l.events=[],d?(d._tokenizer=void 0,d.previous=void 0):C.pop(),p=C.length;p--;){const y=s.slice(C[p],C[p+1]),j=o.pop();c.push([j,j+y.length-1]),e.splice(j,2,y)}for(c.reverse(),p=-1;++p<c.length;)u[m+c[p][0]]=m+c[p][1],m+=c[p][1]-c[p][0]-1;return u}const To={resolve:Fo,tokenize:Ro},Io={partial:!0,tokenize:Do};function Fo(e){return Ur(e),e}function Ro(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):O(s)?e.check(Io,l,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function l(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Do(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(l){if(l===null||O(l))return n(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Vr(e,t,n,r,i,o,l,s,c){const u=c||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||ht(y)?n(y):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),k(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(s),p(y)):y===null||y===60||O(y)?n(y):(e.consume(y),y===92?m:d)}function m(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function k(y){return!f&&(y===null||y===41||Z(y))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,k):y===41?(e.consume(y),f--,k):y===null||y===32||y===40||ht(y)?n(y):(e.consume(y),y===92?C:k)}function C(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function qr(e,t,n,r,i,o){const l=this;let s=0,c;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),f}function f(d){return s>999||d===null||d===91||d===93&&!c||d===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):O(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(d))}function h(d){return d===null||d===91||d===93||O(d)||s++>999?(e.exit("chunkString"),f(d)):(e.consume(d),c||(c=!V(d)),d===92?p:h)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,h):h(d)}}function Wr(e,t,n,r,i,o){let l;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,c):n(p)}function c(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),c(l)):p===null?n(p):O(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||O(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:f)}function h(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Ge(e,t){let n;return r;function r(i){return O(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):V(i)?Q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Lo={name:"definition",tokenize:zo},Mo={partial:!0,tokenize:_o};function zo(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),l(d)}function l(d){return qr.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),c):n(d)}function c(d){return Z(d)?Ge(e,u)(d):u(d)}function u(d){return Vr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return e.attempt(Mo,h,h)(d)}function h(d){return V(d)?Q(e,p,"whitespace")(d):p(d)}function p(d){return d===null||O(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function _o(e,t,n){return r;function r(s){return Z(s)?Ge(e,i)(s):n(s)}function i(s){return Wr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return V(s)?Q(e,l,"whitespace")(s):l(s)}function l(s){return s===null||O(s)?t(s):n(s)}}const Oo={name:"hardBreakEscape",tokenize:Bo};function Bo(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return O(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const $o={name:"headingAtx",resolve:Ho,tokenize:Uo};function Ho(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},me(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Uo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Z(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||O(f)?(e.exit("atxHeading"),t(f)):V(f)?Q(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||Z(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const Vo=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$n=["pre","script","style","textarea"],qo={concrete:!0,name:"htmlFlow",resolveTo:Qo,tokenize:Xo},Wo={partial:!0,tokenize:Go},Yo={partial:!0,tokenize:Ko};function Qo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Xo(e,t,n){const r=this;let i,o,l,s,c;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),h}function h(x){return x===33?(e.consume(x),p):x===47?(e.consume(x),o=!0,k):x===63?(e.consume(x),i=3,r.interrupt?t:g):ce(x)?(e.consume(x),l=String.fromCharCode(x),C):n(x)}function p(x){return x===45?(e.consume(x),i=2,d):x===91?(e.consume(x),i=5,s=0,m):ce(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function d(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function m(x){const G="CDATA[";return x===G.charCodeAt(s++)?(e.consume(x),s===G.length?r.interrupt?t:D:m):n(x)}function k(x){return ce(x)?(e.consume(x),l=String.fromCharCode(x),C):n(x)}function C(x){if(x===null||x===47||x===62||Z(x)){const G=x===47,re=l.toLowerCase();return!G&&!o&&$n.includes(re)?(i=1,r.interrupt?t(x):D(x)):Vo.includes(l.toLowerCase())?(i=6,G?(e.consume(x),y):r.interrupt?t(x):D(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?j(x):S(x))}return x===45||oe(x)?(e.consume(x),l+=String.fromCharCode(x),C):n(x)}function y(x){return x===62?(e.consume(x),r.interrupt?t:D):n(x)}function j(x){return V(x)?(e.consume(x),j):w(x)}function S(x){return x===47?(e.consume(x),w):x===58||x===95||ce(x)?(e.consume(x),A):V(x)?(e.consume(x),S):w(x)}function A(x){return x===45||x===46||x===58||x===95||oe(x)?(e.consume(x),A):P(x)}function P(x){return x===61?(e.consume(x),b):V(x)?(e.consume(x),P):S(x)}function b(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),c=x,R):V(x)?(e.consume(x),b):_(x)}function R(x){return x===c?(e.consume(x),c=null,q):x===null||O(x)?n(x):(e.consume(x),R)}function _(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Z(x)?P(x):(e.consume(x),_)}function q(x){return x===47||x===62||V(x)?S(x):n(x)}function w(x){return x===62?(e.consume(x),F):n(x)}function F(x){return x===null||O(x)?D(x):V(x)?(e.consume(x),F):n(x)}function D(x){return x===45&&i===2?(e.consume(x),z):x===60&&i===1?(e.consume(x),B):x===62&&i===4?(e.consume(x),le):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),X):O(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wo,se,Y)(x)):x===null||O(x)?(e.exit("htmlFlowData"),Y(x)):(e.consume(x),D)}function Y(x){return e.check(Yo,L,se)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),v}function v(x){return x===null||O(x)?Y(x):(e.enter("htmlFlowData"),D(x))}function z(x){return x===45?(e.consume(x),g):D(x)}function B(x){return x===47?(e.consume(x),l="",K):D(x)}function K(x){if(x===62){const G=l.toLowerCase();return $n.includes(G)?(e.consume(x),le):D(x)}return ce(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),K):D(x)}function X(x){return x===93?(e.consume(x),g):D(x)}function g(x){return x===62?(e.consume(x),le):x===45&&i===2?(e.consume(x),g):D(x)}function le(x){return x===null||O(x)?(e.exit("htmlFlowData"),se(x)):(e.consume(x),le)}function se(x){return e.exit("htmlFlow"),t(x)}}function Ko(e,t,n){const r=this;return i;function i(l){return O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Go(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(rt,t,n)}}const Jo={name:"htmlText",tokenize:Zo};function Zo(e,t,n){const r=this;let i,o,l;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),P):g===63?(e.consume(g),S):ce(g)?(e.consume(g),_):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),o=0,m):ce(g)?(e.consume(g),j):n(g)}function f(g){return g===45?(e.consume(g),d):n(g)}function h(g){return g===null?n(g):g===45?(e.consume(g),p):O(g)?(l=h,B(g)):(e.consume(g),h)}function p(g){return g===45?(e.consume(g),d):h(g)}function d(g){return g===62?z(g):g===45?p(g):h(g)}function m(g){const le="CDATA[";return g===le.charCodeAt(o++)?(e.consume(g),o===le.length?k:m):n(g)}function k(g){return g===null?n(g):g===93?(e.consume(g),C):O(g)?(l=k,B(g)):(e.consume(g),k)}function C(g){return g===93?(e.consume(g),y):k(g)}function y(g){return g===62?z(g):g===93?(e.consume(g),y):k(g)}function j(g){return g===null||g===62?z(g):O(g)?(l=j,B(g)):(e.consume(g),j)}function S(g){return g===null?n(g):g===63?(e.consume(g),A):O(g)?(l=S,B(g)):(e.consume(g),S)}function A(g){return g===62?z(g):S(g)}function P(g){return ce(g)?(e.consume(g),b):n(g)}function b(g){return g===45||oe(g)?(e.consume(g),b):R(g)}function R(g){return O(g)?(l=R,B(g)):V(g)?(e.consume(g),R):z(g)}function _(g){return g===45||oe(g)?(e.consume(g),_):g===47||g===62||Z(g)?q(g):n(g)}function q(g){return g===47?(e.consume(g),z):g===58||g===95||ce(g)?(e.consume(g),w):O(g)?(l=q,B(g)):V(g)?(e.consume(g),q):z(g)}function w(g){return g===45||g===46||g===58||g===95||oe(g)?(e.consume(g),w):F(g)}function F(g){return g===61?(e.consume(g),D):O(g)?(l=F,B(g)):V(g)?(e.consume(g),F):q(g)}function D(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,Y):O(g)?(l=D,B(g)):V(g)?(e.consume(g),D):(e.consume(g),L)}function Y(g){return g===i?(e.consume(g),i=void 0,v):g===null?n(g):O(g)?(l=Y,B(g)):(e.consume(g),Y)}function L(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Z(g)?q(g):(e.consume(g),L)}function v(g){return g===47||g===62||Z(g)?q(g):n(g)}function z(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function B(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),K}function K(g){return V(g)?Q(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):X(g)}function X(g){return e.enter("htmlTextData"),l(g)}}const un={name:"labelEnd",resolveAll:ra,resolveTo:ia,tokenize:la},ea={tokenize:oa},ta={tokenize:aa},na={tokenize:sa};function ra(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&me(e,0,e.length,n),e}function ia(e,t){let n=e.length,r=0,i,o,l,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return s=[["enter",c,t],["enter",u,t]],s=ge(s,e.slice(o+1,o+r+3)),s=ge(s,[["enter",f,t]]),s=ge(s,gt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),s=ge(s,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),s=ge(s,e.slice(l+1)),s=ge(s,[["exit",c,t]]),me(e,o,e.length,s),e}function la(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?h(p):(l=r.parser.defined.includes(ye(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(ea,f,l?f:h)(p):p===91?e.attempt(ta,f,l?u:h)(p):l?f(p):h(p)}function u(p){return e.attempt(na,f,h)(p)}function f(p){return t(p)}function h(p){return o._balanced=!0,n(p)}}function oa(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Z(h)?Ge(e,o)(h):o(h)}function o(h){return h===41?f(h):Vr(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return Z(h)?Ge(e,c)(h):f(h)}function s(h){return n(h)}function c(h){return h===34||h===39||h===40?Wr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Z(h)?Ge(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function aa(e,t,n){const r=this;return i;function i(s){return qr.call(r,e,o,l,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function l(s){return n(s)}}function sa(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ua={name:"labelStartImage",resolveAll:un.resolveAll,tokenize:ca};function ca(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ha={name:"labelStartLink",resolveAll:un.resolveAll,tokenize:fa};function fa(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Nt={name:"lineEnding",tokenize:da};function da(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,t,"linePrefix")}}const ct={name:"thematicBreak",tokenize:pa};function pa(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||O(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),V(u)?Q(e,s,"whitespace")(u):s(u))}}const he={continuation:{tokenize:ya},exit:ka,name:"list",tokenize:xa},ma={partial:!0,tokenize:wa},ga={partial:!0,tokenize:ba};function xa(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:qt(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(ct,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(d)}return n(d)}function c(d){return qt(d)&&++l<10?(e.consume(d),c):(!r.interrupt||l<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(rt,r.interrupt?n:f,e.attempt(ma,p,h))}function f(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function h(d){return V(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function ya(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(rt,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!V(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ga,t,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(he,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ba(e,t,n){const r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ka(e){e.exit(this.containerState.type)}function wa(e,t,n){const r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!V(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Hn={name:"setextUnderline",resolveTo:Ca,tokenize:va};function Ca(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function va(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),V(u)?Q(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||O(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const ja={tokenize:Na};function Na(e){const t=this,n=e.attempt(rt,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(To,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Sa={resolveAll:Qr()},Ea=Yr("string"),Pa=Yr("text");function Yr(e){return{resolveAll:Qr(e==="text"?Aa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,s);return l;function l(f){return u(f)?o(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),c)}function u(f){if(f===null)return!0;const h=i[f];let p=-1;if(h)for(;++p<h.length;){const d=h[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Qr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Aa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,s=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(u===-2)c=!0,s++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Ta={42:he,43:he,45:he,48:he,49:he,50:he,51:he,52:he,53:he,54:he,55:he,56:he,57:he,62:Br},Ia={91:Lo},Fa={[-2]:jt,[-1]:jt,32:jt},Ra={35:$o,42:ct,45:[Hn,ct],60:qo,61:Hn,95:ct,96:Bn,126:Bn},Da={38:Hr,92:$r},La={[-5]:Nt,[-4]:Nt,[-3]:Nt,33:ua,38:Hr,42:Wt,60:[co,Jo],91:ha,92:[Oo,$r],93:un,95:Wt,96:jo},Ma={null:[Wt,Sa]},za={null:[42,95]},_a={null:[]},Oa=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:za,contentInitial:Ia,disable:_a,document:Ta,flow:Ra,flowInitial:Fa,insideSpan:Ma,string:Da,text:La},Symbol.toStringTag,{value:"Module"}));function Ba(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],s=[];const c={attempt:R(P),check:R(b),consume:j,enter:S,exit:A,interrupt:R(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:h};let f=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function h(F){return l=ge(l,F),C(),l[l.length-1]!==null?[]:(_(t,0),u.events=gt(o,u.events,u),u.events)}function p(F,D){return Ha(d(F),D)}function d(F){return $a(l,F)}function m(){const{_bufferIndex:F,_index:D,line:Y,column:L,offset:v}=r;return{_bufferIndex:F,_index:D,line:Y,column:L,offset:v}}function k(F){i[F.line]=F.column,w()}function C(){let F;for(;r._index<l.length;){const D=l[r._index];if(typeof D=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<D.length;)y(D.charCodeAt(r._bufferIndex));else y(D)}}function y(F){f=f(F)}function j(F){O(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,w()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function S(F,D){const Y=D||{};return Y.type=F,Y.start=m(),u.events.push(["enter",Y,u]),s.push(Y),Y}function A(F){const D=s.pop();return D.end=m(),u.events.push(["exit",D,u]),D}function P(F,D){_(F,D.from)}function b(F,D){D.restore()}function R(F,D){return Y;function Y(L,v,z){let B,K,X,g;return Array.isArray(L)?se(L):"tokenize"in L?se([L]):le(L);function le(ne){return M;function M(H){const ee=H!==null&&ne[H],ue=H!==null&&ne.null,be=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return se(be)(H)}}function se(ne){return B=ne,K=0,ne.length===0?z:x(ne[K])}function x(ne){return M;function M(H){return g=q(),X=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?re():ne.tokenize.call(D?Object.assign(Object.create(u),D):u,c,G,re)(H)}}function G(ne){return F(X,g),v}function re(ne){return g.restore(),++K<B.length?x(B[K]):z}}}function _(F,D){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&me(u.events,D,u.events.length-D,F.resolve(u.events.slice(D),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function q(){const F=m(),D=u.previous,Y=u.currentConstruct,L=u.events.length,v=Array.from(s);return{from:L,restore:z};function z(){r=F,u.previous=D,u.currentConstruct=Y,u.events.length=L,s=v,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $a(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ha(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
43
+ `;break}case-3:{l=`\r
44
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Ua(e){const r={constructs:_r([Oa,...(e||{}).extensions||[]]),content:i(ro),defined:[],document:i(lo),flow:i(ja),lazy:{},string:i(Ea),text:i(Pa)};return r;function i(o){return l;function l(s){return Ba(r,o,s)}}}function Va(e){for(;!Ur(e););return e}const Un=/[\0\t\n\r]/g;function qa(){let e=1,t="",n=!0,r;return i;function i(o,l,s){const c=[];let u,f,h,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(Un.lastIndex=h,u=Un.exec(o),p=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(p),!u){t=o.slice(h);break}if(d===10&&h===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<p&&(c.push(o.slice(h,p)),e+=p-h),d){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return s&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Wa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ya(e){return e.replace(Wa,Qa)}function Qa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Or(n.slice(o?2:1),o?16:10)}return sn(n)||e}const Xr={}.hasOwnProperty;function Xa(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ka(n)(Va(Ua(n).document().write(qa()(e,t,!0))))}function Ka(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Cn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(bn),blockQuote:o(ue),characterEscape:q,characterReference:q,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Ii,l),codeTextData:q,data:q,codeFlowValue:q,definition:o(Fi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ri),hardBreakEscape:o(kn),hardBreakTrailing:o(kn),htmlFlow:o(wn,l),htmlFlowData:q,htmlText:o(wn,l),htmlTextData:q,image:o(Di),label:l,link:o(Cn),listItem:o(Li),listItemValue:p,listOrdered:o(vn,h),listUnordered:o(vn),paragraph:o(Mi),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(bn),strong:o(zi),thematicBreak:o(Oi)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:ee,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ne,characterReference:M,codeFenced:c(C),codeFencedFence:k,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(y),codeText:c(v),codeTextData:w,data:w,definition:c(),definitionDestinationString:A,definitionLabelString:j,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(Y),htmlFlowData:w,htmlText:c(L),htmlTextData:w,image:c(B),label:X,labelText:K,lineEnding:F,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:g,resourceTitleString:le,resource:se,setextHeading:c(_),setextHeadingLineSequence:R,setextHeadingText:b,strong:c(),thematicBreak:c()}};Kr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let T={type:"root",children:[]};const $={stack:[T],tokenStack:[],config:t,enter:s,exit:u,buffer:l,resume:f,data:n},W=[];let J=-1;for(;++J<N.length;)if(N[J][1].type==="listOrdered"||N[J][1].type==="listUnordered")if(N[J][0]==="enter")W.push(J);else{const xe=W.pop();J=i(N,xe,J)}for(J=-1;++J<N.length;){const xe=t[N[J][0]];Xr.call(xe,N[J][1].type)&&xe[N[J][1].type].call(Object.assign({sliceSerialize:N[J][2].sliceSerialize},$),N[J][1])}if($.tokenStack.length>0){const xe=$.tokenStack[$.tokenStack.length-1];(xe[1]||Vn).call($,void 0,xe[0])}for(T.position={start:Ne(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Ne(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)T=t.transforms[J](T)||T;return T}function i(N,T,$){let W=T-1,J=-1,xe=!1,Pe,Ce,Ve,qe;for(;++W<=$;){const de=N[W];switch(de[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{de[0]==="enter"?J++:J--,qe=void 0;break}case"lineEndingBlank":{de[0]==="enter"&&(Pe&&!qe&&!J&&!Ve&&(Ve=W),qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qe=void 0}if(!J&&de[0]==="enter"&&de[1].type==="listItemPrefix"||J===-1&&de[0]==="exit"&&(de[1].type==="listUnordered"||de[1].type==="listOrdered")){if(Pe){let Re=W;for(Ce=void 0;Re--;){const ve=N[Re];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;Ce&&(N[Ce][1].type="lineEndingBlank",xe=!0),ve[1].type="lineEnding",Ce=Re}else if(!(ve[1].type==="linePrefix"||ve[1].type==="blockQuotePrefix"||ve[1].type==="blockQuotePrefixWhitespace"||ve[1].type==="blockQuoteMarker"||ve[1].type==="listItemIndent"))break}Ve&&(!Ce||Ve<Ce)&&(Pe._spread=!0),Pe.end=Object.assign({},Ce?N[Ce][1].start:de[1].end),N.splice(Ce||W,0,["exit",Pe,de[2]]),W++,$++}if(de[1].type==="listItemPrefix"){const Re={type:"listItem",_spread:!1,start:Object.assign({},de[1].start),end:void 0};Pe=Re,N.splice(W,0,["enter",Re,de[2]]),W++,$++,Ve=void 0,qe=!0}}}return N[T][1]._spread=xe,$}function o(N,T){return $;function $(W){s.call(this,N(W),W),T&&T.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(N,T,$){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([T,$||void 0]),N.position={start:Ne(T.start),end:void 0}}function c(N){return T;function T($){N&&N.call(this,$),u.call(this,$)}}function u(N,T){const $=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==N.type&&(T?T.call(this,N,W[0]):(W[1]||Vn).call(this,N,W[0]));else throw new Error("Cannot close `"+N.type+"` ("+Ke({start:N.start,end:N.end})+"): it’s not open");$.position.end=Ne(N.end)}function f(){return an(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(N){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function d(){const N=this.resume(),T=this.stack[this.stack.length-1];T.lang=N}function m(){const N=this.resume(),T=this.stack[this.stack.length-1];T.meta=N}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const N=this.resume(),T=this.stack[this.stack.length-1];T.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const N=this.resume(),T=this.stack[this.stack.length-1];T.value=N.replace(/(\r?\n|\r)$/g,"")}function j(N){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(N)).toLowerCase()}function S(){const N=this.resume(),T=this.stack[this.stack.length-1];T.title=N}function A(){const N=this.resume(),T=this.stack[this.stack.length-1];T.url=N}function P(N){const T=this.stack[this.stack.length-1];if(!T.depth){const $=this.sliceSerialize(N).length;T.depth=$}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function R(N){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function q(N){const $=this.stack[this.stack.length-1].children;let W=$[$.length-1];(!W||W.type!=="text")&&(W=_i(),W.position={start:Ne(N.start),end:void 0},$.push(W)),this.stack.push(W)}function w(N){const T=this.stack.pop();T.value+=this.sliceSerialize(N),T.position.end=Ne(N.end)}function F(N){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=T.children[T.children.length-1];$.position.end=Ne(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&(q.call(this,N),w.call(this,N))}function D(){this.data.atHardBreak=!0}function Y(){const N=this.resume(),T=this.stack[this.stack.length-1];T.value=N}function L(){const N=this.resume(),T=this.stack[this.stack.length-1];T.value=N}function v(){const N=this.resume(),T=this.stack[this.stack.length-1];T.value=N}function z(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=T,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function B(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=T,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function K(N){const T=this.sliceSerialize(N),$=this.stack[this.stack.length-2];$.label=Ya(T),$.identifier=ye(T).toLowerCase()}function X(){const N=this.stack[this.stack.length-1],T=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const W=N.children;$.children=W}else $.alt=T}function g(){const N=this.resume(),T=this.stack[this.stack.length-1];T.url=N}function le(){const N=this.resume(),T=this.stack[this.stack.length-1];T.title=N}function se(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function G(N){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function re(N){this.data.characterReferenceType=N.type}function ne(N){const T=this.sliceSerialize(N),$=this.data.characterReferenceType;let W;$?(W=Or(T,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=sn(T);const J=this.stack[this.stack.length-1];J.value+=W}function M(N){const T=this.stack.pop();T.position.end=Ne(N.end)}function H(N){w.call(this,N);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(N)}function ee(N){w.call(this,N);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(N)}function ue(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Ii(){return{type:"inlineCode",value:""}}function Fi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ri(){return{type:"emphasis",children:[]}}function bn(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function wn(){return{type:"html",value:""}}function Di(){return{type:"image",title:null,url:"",alt:null}}function Cn(){return{type:"link",title:null,url:"",children:[]}}function vn(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Li(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function Mi(){return{type:"paragraph",children:[]}}function zi(){return{type:"strong",children:[]}}function _i(){return{type:"text",value:""}}function Oi(){return{type:"thematicBreak"}}}function Ne(e){return{line:e.line,column:e.column,offset:e.offset}}function Kr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Kr(e,r):Ga(e,r)}}function Ga(e,t){let n;for(n in t)if(Xr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Vn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ke({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ke({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ke({start:t.start,end:t.end})+") is still open")}function Ja(e){const t=this;t.parser=n;function n(r){return Xa(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Za(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function es(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
45
+ `}]}function ts(e,t){const n=t.value?t.value+`
46
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ns(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rs(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function is(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ue(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,s+=1,e.footnoteCounts.set(r,s);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function ls(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function os(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function as(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gr(e,t);const i={src:Ue(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function ss(e,t){const n={src:Ue(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function us(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function cs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gr(e,t);const i={href:Ue(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function hs(e,t){const n={href:Ue(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fs(e,t,n){const r=e.all(t),i=n?ds(n):Jr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
47
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
48
+ `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function ds(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jr(n[r])}return t}function Jr(e){const t=e.spread;return t??e.children.length>1}function ps(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function ms(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gs(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xs(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ys(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=nn(t.children[1]),c=Ir(t.children[t.children.length-1]);s&&c&&(l.position={start:s,end:c}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function bs(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,s=l?l.length:t.children.length;let c=-1;const u=[];for(;++c<s;){const h=t.children[c],p={},d=l?l[c]:void 0;d&&(p.align=d);let m={type:"element",tagName:o,properties:p,children:[]};h&&(m.children=e.all(h),e.patch(h,m),m=e.applyData(h,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function ks(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qn=9,Wn=32;function ws(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Yn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Yn(t.slice(i),i>0,!1)),o.join("")}function Yn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===qn||o===Wn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===qn||o===Wn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Cs(e,t){const n={type:"text",value:ws(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vs(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const js={blockquote:Za,break:es,code:ts,delete:ns,emphasis:rs,footnoteReference:is,heading:ls,html:os,imageReference:as,image:ss,inlineCode:us,linkReference:cs,link:hs,listItem:fs,list:ps,paragraph:ms,root:gs,strong:xs,table:ys,tableCell:ks,tableRow:bs,text:Cs,thematicBreak:vs,toml:lt,yaml:lt,definition:lt,footnoteDefinition:lt};function lt(){}const Zr=-1,xt=0,Je=1,ft=2,cn=3,hn=4,fn=5,dn=6,ei=7,ti=8,Qn=typeof self=="object"?self:globalThis,Ns=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case xt:case Zr:return n(l,i);case Je:{const s=n([],i);for(const c of l)s.push(r(c));return s}case ft:{const s=n({},i);for(const[c,u]of l)s[r(c)]=r(u);return s}case cn:return n(new Date(l),i);case hn:{const{source:s,flags:c}=l;return n(new RegExp(s,c),i)}case fn:{const s=n(new Map,i);for(const[c,u]of l)s.set(r(c),r(u));return s}case dn:{const s=n(new Set,i);for(const c of l)s.add(r(c));return s}case ei:{const{name:s,message:c}=l;return n(new Qn[s](c),i)}case ti:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:s}=new Uint8Array(l);return n(new DataView(s),l)}}return n(new Qn[o](l),i)};return r},Xn=e=>Ns(new Map,e)(0),Le="",{toString:Ss}={},{keys:Es}=Object,Xe=e=>{const t=typeof e;if(t!=="object"||!e)return[xt,t];const n=Ss.call(e).slice(8,-1);switch(n){case"Array":return[Je,Le];case"Object":return[ft,Le];case"Date":return[cn,Le];case"RegExp":return[hn,Le];case"Map":return[fn,Le];case"Set":return[dn,Le];case"DataView":return[Je,n]}return n.includes("Array")?[Je,n]:n.includes("Error")?[ei,n]:[ft,n]},ot=([e,t])=>e===xt&&(t==="function"||t==="symbol"),Ps=(e,t,n,r)=>{const i=(l,s)=>{const c=r.push(l)-1;return n.set(s,c),c},o=l=>{if(n.has(l))return n.get(l);let[s,c]=Xe(l);switch(s){case xt:{let f=l;switch(c){case"bigint":s=ti,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([Zr],l)}return i([s,f],l)}case Je:{if(c){let p=l;return c==="DataView"?p=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(l)),i([c,[...p]],l)}const f=[],h=i([s,f],l);for(const p of l)f.push(o(p));return h}case ft:{if(c)switch(c){case"BigInt":return i([c,l.toString()],l);case"Boolean":case"Number":case"String":return i([c,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],h=i([s,f],l);for(const p of Es(l))(e||!ot(Xe(l[p])))&&f.push([o(p),o(l[p])]);return h}case cn:return i([s,l.toISOString()],l);case hn:{const{source:f,flags:h}=l;return i([s,{source:f,flags:h}],l)}case fn:{const f=[],h=i([s,f],l);for(const[p,d]of l)(e||!(ot(Xe(p))||ot(Xe(d))))&&f.push([o(p),o(d)]);return h}case dn:{const f=[],h=i([s,f],l);for(const p of l)(e||!ot(Xe(p)))&&f.push(o(p));return h}}const{message:u}=l;return i([s,{name:c,message:u}],l)};return o},Kn=(e,{json:t,lossy:n}={})=>{const r=[];return Ps(!(t||n),!!t,new Map,r)(e),r},dt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xn(Kn(e,t)):structuredClone(e):(e,t)=>Xn(Kn(e,t));function As(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ts(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Is(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||As,r=e.options.footnoteBackLabel||Ts,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const f=e.all(u),h=String(u.identifier).toUpperCase(),p=Ue(h.toLowerCase());let d=0;const m=[],k=e.footnoteCounts.get(h);for(;k!==void 0&&++d<=k;){m.length>0&&m.push({type:"text",value:" "});let j=typeof n=="string"?n:n(c,d);typeof j=="string"&&(j={type:"text",value:j}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,d),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const j=C.children[C.children.length-1];j&&j.type==="text"?j.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...m)}else f.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...dt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
49
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
50
+ `}]}}const yt=(function(e){if(e==null)return Ls;if(typeof e=="function")return bt(e);if(typeof e=="object")return Array.isArray(e)?Fs(e):Rs(e);if(typeof e=="string")return Ds(e);throw new Error("Expected function, string, or object as test")});function Fs(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=yt(e[n]);return bt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Rs(e){const t=e;return bt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Ds(e){return bt(t);function t(n){return n&&n.type===e}}function bt(e){return t;function t(n,r,i){return!!(Ms(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ls(){return!0}function Ms(e){return e!==null&&typeof e=="object"&&"type"in e}const ni=[],zs=!0,Yt=!1,_s="skip";function ri(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=yt(i),l=r?-1:1;s(e,void 0,[])();function s(c,u,f){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const d=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=ni,m,k,C;if((!t||o(c,u,f[f.length-1]||void 0))&&(d=Os(n(c,f)),d[0]===Yt))return d;if("children"in c&&c.children){const y=c;if(y.children&&d[0]!==_s)for(k=(r?y.children.length:-1)+l,C=f.concat(y);k>-1&&k<y.children.length;){const j=y.children[k];if(m=s(j,k,C)(),m[0]===Yt)return m;k=typeof m[1]=="number"?m[1]:k+l}}return d}}}function Os(e){return Array.isArray(e)?e:typeof e=="number"?[zs,e]:e==null?ni:[e]}function pn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),ri(e,o,s,i);function s(c,u){const f=u[u.length-1],h=f?f.children.indexOf(c):void 0;return l(c,h,f)}}const Qt={}.hasOwnProperty,Bs={};function $s(e,t){const n=t||Bs,r=new Map,i=new Map,o=new Map,l={...js,...n.handlers},s={all:u,applyData:Us,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:c,options:n,patch:Hs,wrap:qs};return pn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();h.has(p)||h.set(p,f)}}),s;function c(f,h){const p=f.type,d=s.handlers[p];if(Qt.call(s.handlers,p)&&d)return d(s,f,h);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:k,...C}=f,y=dt(C);return y.children=s.all(f),y}return dt(f)}return(s.options.unknownHandler||Vs)(s,f,h)}function u(f){const h=[];if("children"in f){const p=f.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],f);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Gn(m.value)),!Array.isArray(m)&&m.type==="element")){const k=m.children[0];k&&k.type==="text"&&(k.value=Gn(k.value))}Array.isArray(m)?h.push(...m):h.push(m)}}}return h}}function Hs(e,t){e.position&&(t.position=Al(e))}function Us(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,dt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Vs(e,t){const n=t.data||{},r="value"in t&&!(Qt.call(n,"hProperties")||Qt.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qs(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
51
+ `});++r<e.length;)r&&n.push({type:"text",value:`
52
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
53
+ `}),n}function Gn(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jn(e,t){const n=$s(e,t),r=n.one(e,void 0),i=Is(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
54
+ `},i),o}function Ws(e,t){return e&&"run"in e?async function(n,r){const i=Jn(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Jn(n,{file:r,...e||t})}}function Zn(e){if(e)throw e}var St,er;function Ys(){if(er)return St;er=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!h)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return St=function c(){var u,f,h,p,d,m,k=arguments[0],C=1,y=arguments.length,j=!1;for(typeof k=="boolean"&&(j=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<y;++C)if(u=arguments[C],u!=null)for(f in u)h=s(k,f),p=s(u,f),k!==p&&(j&&p&&(o(p)||(d=i(p)))?(d?(d=!1,m=h&&i(h)?h:[]):m=h&&o(h)?h:{},l(k,{name:f,newValue:c(j,m,p)})):typeof p<"u"&&l(k,{name:f,newValue:p}));return k},St}var Qs=Ys();const Et=br(Qs);function Xt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Xs(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(c,...u){const f=e[++o];let h=-1;if(c){l(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,f?Ks(f,s)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ks(e,t){let n;return r;function r(...l){const s=e.length>l.length;let c;s&&l.push(i);try{c=e.apply(this,l)}catch(u){const f=u;if(s&&n)throw f;return i(f)}s||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(l,...s){n||(n=!0,t(l,...s))}function o(l){i(null,l)}}const ke={basename:Gs,dirname:Js,extname:Zs,join:eu,sep:"/"};function Gs(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');it(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Js(e){if(it(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Zs(e){it(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function eu(...e){let t=-1,n;for(;++t<e.length;)it(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":tu(n)}function tu(e){it(e);const t=e.codePointAt(0)===47;let n=nu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function nu(e,t){let n="",r=0,i=-1,o=0,l=-1,s,c;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else s===46&&o>-1?o++:o=-1}return n}function it(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ru={cwd:iu};function iu(){return"/"}function Kt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lu(e){if(typeof e=="string")e=new URL(e);else if(!Kt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ou(e)}function ou(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pt=["history","path","basename","stem","extname","dirname"];class ii{constructor(t){let n;t?Kt(t)?n={path:t}:typeof t=="string"||au(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ru.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pt.length;){const o=Pt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(t){Tt(t,"basename"),At(t,"basename"),this.path=ke.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(t){tr(this.basename,"dirname"),this.path=ke.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(t){if(At(t,"extname"),tr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ke.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Kt(t)&&(t=lu(t)),Tt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(t){Tt(t,"stem"),At(t,"stem"),this.path=ke.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ae(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function At(e,t){if(e&&e.includes(ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ke.sep+"`")}function Tt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function tr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function au(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const su=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),uu={}.hasOwnProperty;class mn extends su{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xs()}copy(){const t=new mn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Et(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Rt("data",this.frozen),this.namespace[t]=n,this):uu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=at(t),r=this.parser||this.Parser;return It("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),It("process",this.parser||this.Parser),Ft("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const s=at(t),c=r.parse(s);r.run(c,s,function(f,h,p){if(f||!h||!p)return u(f);const d=h,m=r.stringify(d,p);fu(m)?p.value=m:p.result=m,u(f,p)});function u(f,h){f||!h?l(f):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),It("processSync",this.parser||this.Parser),Ft("processSync",this.compiler||this.Compiler),this.process(t,i),rr("processSync","process",n),r;function i(o,l){n=!0,Zn(o),r=l}}run(t,n,r){nr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,s){const c=at(n);i.run(t,c,u);function u(f,h,p){const d=h||t;f?s(f):l?l(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),rr("runSync","run",r),i;function o(l,s){Zn(l),i=s,r=!0}}stringify(t,n){this.freeze();const r=at(n),i=this.compiler||this.Compiler;return Ft("stringify",i),nr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Rt("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...h]=u;c(f,h)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Et(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const h=u[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===u){p=h;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[d,...m]=f;const k=r[p][1];Xt(k)&&Xt(d)&&(d=Et(!0,k,d)),r[p]=[u,d,...m]}}}}const cu=new mn().freeze();function It(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ft(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nr(e){if(!Xt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function at(e){return hu(e)?e:new ii(e)}function hu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fu(e){return typeof e=="string"||du(e)}function du(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ir=[],lr={allowDangerousHtml:!0},mu=/^(https?|ircs?|mailto|xmpp)$/i,gu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function xu(e){const t=yu(e),n=bu(e);return ku(t.runSync(t.parse(n),n),e)}function yu(e){const t=e.rehypePlugins||ir,n=e.remarkPlugins||ir,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lr}:lr;return cu().use(Ja).use(n).use(Ws,r).use(t)}function bu(e){const t=e.children||"",n=new ii;return typeof t=="string"&&(n.value=t),n}function ku(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||wu;for(const f of gu)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+pu+f.id,void 0);return pn(e,u),Dl(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function u(f,h,p){if(f.type==="raw"&&p&&typeof h=="number")return l?p.children.splice(h,1):p.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let d;for(d in vt)if(Object.hasOwn(vt,d)&&Object.hasOwn(f.properties,d)){const m=f.properties[d],k=vt[d];(k===null||k.includes(f.tagName))&&(f.properties[d]=c(String(m||""),d,f))}}if(f.type==="element"){let d=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!d&&r&&typeof h=="number"&&(d=!r(f,h,p)),d&&p&&typeof h=="number")return s&&f.children?p.children.splice(h,1,...f.children):p.children.splice(h,1),h}}}function wu(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||mu.test(e.slice(0,t))?e:""}function or(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Cu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vu(e,t,n){const i=yt((n||{}).ignore||[]),o=ju(t);let l=-1;for(;++l<o.length;)ri(e,"text",s);function s(u,f){let h=-1,p;for(;++h<f.length;){const d=f[h],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return c(u,f)}function c(u,f){const h=f[f.length-1],p=o[l][0],d=o[l][1];let m=0;const C=h.children.indexOf(u);let y=!1,j=[];p.lastIndex=0;let S=p.exec(u.value);for(;S;){const A=S.index,P={index:S.index,input:S.input,stack:[...f,u]};let b=d(...S,P);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=A+1:(m!==A&&j.push({type:"text",value:u.value.slice(m,A)}),Array.isArray(b)?j.push(...b):b&&j.push(b),m=A+S[0].length,y=!0),!p.global)break;S=p.exec(u.value)}return y?(m<u.value.length&&j.push({type:"text",value:u.value.slice(m)}),h.children.splice(C,1,...j)):j=[u],C+j.length}}function ju(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Nu(i[0]),Su(i[1])])}return t}function Nu(e){return typeof e=="string"?new RegExp(Cu(e),"g"):e}function Su(e){return typeof e=="function"?e:function(){return e}}const Dt="phrasing",Lt=["autolink","link","image","label"];function Eu(){return{transforms:[Du],enter:{literalAutolink:Au,literalAutolinkEmail:Mt,literalAutolinkHttp:Mt,literalAutolinkWww:Mt},exit:{literalAutolink:Ru,literalAutolinkEmail:Fu,literalAutolinkHttp:Tu,literalAutolinkWww:Iu}}}function Pu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dt,notInConstruct:Lt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dt,notInConstruct:Lt},{character:":",before:"[ps]",after:"\\/",inConstruct:Dt,notInConstruct:Lt}]}}function Au(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mt(e){this.config.enter.autolinkProtocol.call(this,e)}function Tu(e){this.config.exit.autolinkProtocol.call(this,e)}function Iu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Fu(e){this.config.exit.autolinkEmail.call(this,e)}function Ru(e){this.exit(e)}function Du(e){vu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Lu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Mu]],{ignore:["link","linkReference"]})}function Lu(e,t,n,r,i){let o="";if(!li(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!zu(n)))return!1;const l=_u(n+r);if(!l[0])return!1;const s={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function Mu(e,t,n,r){return!li(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function zu(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function _u(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=or(e,"(");let o=or(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function li(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Te(n)||mt(n))&&(!t||n!==47)}oi.peek=Yu;function Ou(){this.buffer()}function Bu(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $u(){this.buffer()}function Hu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Uu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vu(e){this.exit(e)}function qu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Wu(e){this.exit(e)}function Yu(){return"["}function oi(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),l(),o+=i.move("]"),o}function Qu(){return{enter:{gfmFootnoteCallString:Ou,gfmFootnoteCall:Bu,gfmFootnoteDefinitionLabelString:$u,gfmFootnoteDefinition:Hu},exit:{gfmFootnoteCallString:Uu,gfmFootnoteCall:Vu,gfmFootnoteDefinitionLabelString:qu,gfmFootnoteDefinition:Wu}}}function Xu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:oi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const s=o.createTracker(l);let c=s.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return c+=s.move(o.safe(o.associationId(r),{before:c,after:"]"})),f(),c+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),c+=s.move((t?`
55
+ `:" ")+o.indentLines(o.containerFlow(r,s.current()),t?ai:Ku))),u(),c}}function Ku(e,t,n){return t===0?e:ai(e,t,n)}function ai(e,t,n){return(n?"":" ")+e}const Gu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];si.peek=nc;function Ju(){return{canContainEols:["delete"],enter:{strikethrough:ec},exit:{strikethrough:tc}}}function Zu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Gu}],handlers:{delete:si}}}function ec(e){this.enter({type:"delete",children:[]},e)}function tc(e){this.exit(e)}function si(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function nc(){return"~"}function rc(e){return e.length}function ic(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||rc,o=[],l=[],s=[],c=[];let u=0,f=-1;for(;++f<e.length;){const k=[],C=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const j=lc(e[f][y]);if(n.alignDelimiters!==!1){const S=i(j);C[y]=S,(c[y]===void 0||S>c[y])&&(c[y]=S)}k.push(j)}l[f]=k,s[f]=C}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)o[h]=ar(r[h]);else{const k=ar(r);for(;++h<u;)o[h]=k}h=-1;const p=[],d=[];for(;++h<u;){const k=o[h];let C="",y="";k===99?(C=":",y=":"):k===108?C=":":k===114&&(y=":");let j=n.alignDelimiters===!1?1:Math.max(1,c[h]-C.length-y.length);const S=C+"-".repeat(j)+y;n.alignDelimiters!==!1&&(j=C.length+j+y.length,j>c[h]&&(c[h]=j),d[h]=j),p[h]=S}l.splice(1,0,p),s.splice(1,0,d),f=-1;const m=[];for(;++f<l.length;){const k=l[f],C=s[f];h=-1;const y=[];for(;++h<u;){const j=k[h]||"";let S="",A="";if(n.alignDelimiters!==!1){const P=c[h]-(C[h]||0),b=o[h];b===114?S=" ".repeat(P):b===99?P%2?(S=" ".repeat(P/2+.5),A=" ".repeat(P/2-.5)):(S=" ".repeat(P/2),A=S):A=" ".repeat(P)}n.delimiterStart!==!1&&!h&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||h)&&y.push(" "),n.alignDelimiters!==!1&&y.push(S),y.push(j),n.alignDelimiters!==!1&&y.push(A),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
56
+ `)}function lc(e){return e==null?"":String(e)}function ar(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function oc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),ac);return i(),l}function ac(e,t,n){return">"+(n?"":" ")+e}function sc(e,t){return sr(e,t.inConstruct,!0)&&!sr(e,t.notInConstruct,!1)}function sr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ur(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
57
+ `&&sc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
58
+ `}function uc(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function cc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function hc(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function fc(e,t,n,r){const i=hc(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(cc(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(o,dc);return h(),p}const s=n.createTracker(r),c=i.repeat(Math.max(uc(o,i)+1,3)),u=n.enter("codeFenced");let f=s.move(c);if(e.lang){const h=n.enter(`codeFencedLang${l}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${l}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
59
+ `,encode:["`"],...s.current()})),h()}return f+=s.move(`
60
+ `),o&&(f+=s.move(o+`
61
+ `)),f+=s.move(c),u(),f}function dc(e,t,n){return(n?"":" ")+e}function gn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function pc(e,t,n,r){const i=gn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let s=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
62
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),l(),u}function mc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function tt(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pt(e,t,n){const r=Be(e),i=Be(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ui.peek=gc;function ui(e,t,n,r){const i=mc(n),o=n.enter("emphasis"),l=n.createTracker(r),s=l.move(i);let c=l.move(n.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=tt(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=pt(r.after.charCodeAt(0),h,i);p.inside&&(c=c.slice(0,-1)+tt(h));const d=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+c+d}function gc(e,t,n){return n.options.emphasis||"*"}function xc(e,t){let n=!1;return pn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yt}),!!((!e.depth||e.depth<3)&&an(e)&&(t.options.setext||n))}function yc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(xc(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
63
+ `,after:`
64
+ `});return h(),f(),p+`
65
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
66
+ `))+1))}const l="#".repeat(i),s=n.enter("headingAtx"),c=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
67
+ `,...o.current()});return/^[\t ]/.test(u)&&(u=tt(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),c(),s(),u}ci.peek=bc;function ci(e){return e.value||""}function bc(){return"<"}hi.peek=kc;function hi(e,t,n,r){const i=gn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let s=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(s=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),s()),u+=c.move(")"),l(),u}function kc(){return"!"}fi.peek=wc;function fi(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("![");const u=n.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==h?c+=s.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function wc(){return"!"}di.peek=Cc;function di(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],s=n.compilePattern(l);let c;if(l.atBreak)for(;c=s.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function Cc(){return"`"}function pi(e,t){const n=an(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mi.peek=vc;function mi(e,t,n,r){const i=gn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let s,c;if(pi(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let h=l.move("<");return h+=l.move(n.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),s(),n.stack=f,h}s=n.enter("link"),c=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),c()),u+=l.move(")"),s(),u}function vc(e,t,n){return pi(e,n)?"<":"["}gi.peek=jc;function gi(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const s=n.createTracker(r);let c=s.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==h?c+=s.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function jc(){return"["}function xn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Nc(e){const t=xn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Sc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function xi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ec(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Sc(n):xn(n);const s=e.ordered?l==="."?")":".":Nc(n);let c=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),xi(n)===l&&f){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(l=s),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Pc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ac(e,t,n,r){const i=Pc(n);let o=n.bulletCurrent||xn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(l-o.length)),s.shift(l);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),f);return c(),u;function f(h,p,d){return p?(d?"":" ".repeat(l))+h:(d?o:o+" ".repeat(l-o.length))+h}}function Tc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Ic=yt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Fc(e,t,n,r){return(e.children.some(function(l){return Ic(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Rc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}yi.peek=Dc;function yi(e,t,n,r){const i=Rc(n),o=n.enter("strong"),l=n.createTracker(r),s=l.move(i+i);let c=l.move(n.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=tt(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=pt(r.after.charCodeAt(0),h,i);p.inside&&(c=c.slice(0,-1)+tt(h));const d=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},s+c+d}function Dc(e,t,n){return n.options.strong||"*"}function Lc(e,t,n,r){return n.safe(e.value,r)}function Mc(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zc(e,t,n){const r=(xi(n)+(n.options.ruleSpaces?" ":"")).repeat(Mc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bi={blockquote:oc,break:ur,code:fc,definition:pc,emphasis:ui,hardBreak:ur,heading:yc,html:ci,image:hi,imageReference:fi,inlineCode:di,link:mi,linkReference:gi,list:Ec,listItem:Ac,paragraph:Tc,root:Fc,strong:yi,text:Lc,thematicBreak:zc};function _c(){return{enter:{table:Oc,tableData:cr,tableHeader:cr,tableRow:$c},exit:{codeText:Hc,table:Bc,tableData:zt,tableHeader:zt,tableRow:zt}}}function Oc(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Bc(e){this.exit(e),this.data.inTable=void 0}function $c(e){this.enter({type:"tableRow",children:[]},e)}function zt(e){this.exit(e)}function cr(e){this.enter({type:"tableCell",children:[]},e)}function Hc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Uc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Uc(e,t){return t==="|"?t:e}function Vc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
68
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:c,tableRow:s}};function l(d,m,k,C){return u(f(d,k,C),d.align)}function s(d,m,k,C){const y=h(d,k,C),j=u([y]);return j.slice(0,j.indexOf(`
69
+ `))}function c(d,m,k,C){const y=k.enter("tableCell"),j=k.enter("phrasing"),S=k.containerPhrasing(d,{...C,before:o,after:o});return j(),y(),S}function u(d,m){return ic(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(d,m,k){const C=d.children;let y=-1;const j=[],S=m.enter("table");for(;++y<C.length;)j[y]=h(C[y],m,k);return S(),j}function h(d,m,k){const C=d.children;let y=-1;const j=[],S=m.enter("tableRow");for(;++y<C.length;)j[y]=c(C[y],d,m,k);return S(),j}function p(d,m,k){let C=bi.inlineCode(d,m,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function qc(){return{exit:{taskListCheckValueChecked:hr,taskListCheckValueUnchecked:hr,paragraph:Yc}}}function Wc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qc}}}function hr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Yc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){l=s;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Qc(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(l);let c=bi.listItem(e,t,n,{...r,...s.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+l}}function Xc(){return[Eu(),Qu(),Ju(),_c(),qc()]}function Kc(e){return{extensions:[Pu(),Xu(e),Zu(),Vc(e),Wc()]}}const Gc={tokenize:rh,partial:!0},ki={tokenize:ih,partial:!0},wi={tokenize:lh,partial:!0},Ci={tokenize:oh,partial:!0},Jc={tokenize:ah,partial:!0},vi={name:"wwwAutolink",tokenize:th,previous:Ni},ji={name:"protocolAutolink",tokenize:nh,previous:Si},je={name:"emailAutolink",tokenize:eh,previous:Ei},we={};function Zc(){return{text:we}}let Ae=48;for(;Ae<123;)we[Ae]=je,Ae++,Ae===58?Ae=65:Ae===91&&(Ae=97);we[43]=je;we[45]=je;we[46]=je;we[95]=je;we[72]=[je,ji];we[104]=[je,ji];we[87]=[je,vi];we[119]=[je,vi];function eh(e,t,n){const r=this;let i,o;return l;function l(h){return!Gt(h)||!Ei.call(r,r.previous)||yn(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return Gt(h)?(e.consume(h),s):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(Jc,f,u)(h):h===45||h===95||oe(h)?(o=!0,e.consume(h),c):f(h)}function u(h){return e.consume(h),i=!0,c}function f(h){return o&&i&&ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function th(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ni.call(r,r.previous)||yn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Gc,e.attempt(ki,e.attempt(wi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function nh(e,t,n){const r=this;let i="",o=!1;return l;function l(h){return(h===72||h===104)&&Si.call(r,r.previous)&&!yn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):n(h)}function s(h){if(ce(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),o?u:(o=!0,c)):n(h)}function u(h){return h===null||ht(h)||Z(h)||Te(h)||mt(h)?n(h):e.attempt(ki,e.attempt(wi,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function rh(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function ih(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(Ci,c,s)(u):u===null||Z(u)||Te(u)||u!==45&&mt(u)?c(u):(o=!0,e.consume(u),l)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function c(u){return i||r||!o?n(u):t(u)}}function lh(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Ci,t,o)(l):l===null||Z(l)||Te(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function oh(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Z(s)||Te(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Z(s)||Te(s)?t(s):r(s)}function o(s){return ce(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):ce(s)?(e.consume(s),l):n(s)}}function ah(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return oe(o)?n(o):t(o)}}function Ni(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function Si(e){return!ce(e)}function Ei(e){return!(e===47||Gt(e))}function Gt(e){return e===43||e===45||e===46||e===95||oe(e)}function yn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const sh={tokenize:gh,partial:!0};function uh(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dh,continuation:{tokenize:ph},exit:mh}},text:{91:{name:"gfmFootnoteCall",tokenize:fh},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ch,resolveTo:hh}}}}function ch(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){l=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!l||!l._balanced)return n(c);const u=ye(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function hh(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function fh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(o>999||h===93&&!l||h===null||h===91||Z(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ye(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Z(h)||(l=!0),o++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function dh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,s;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(l>999||m===93&&!s||m===null||m===91||Z(m))return n(m);if(m===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=ye(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Z(m)||(s=!0),l++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function ph(e,t,n){return e.check(rt,t,e.attempt(sh,t,n))}function mh(e){e.exit("gfmFootnoteDefinition")}function gh(e,t,n){const r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function xh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,s){let c=-1;for(;++c<l.length;)if(l[c][0]==="enter"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._close){let u=c;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[c][1].end.offset-l[c][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[c][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[c][1].end)},h={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[c][1].start)},p=[["enter",f,s],["enter",l[u][1],s],["exit",l[u][1],s],["enter",h,s]],d=s.parser.constructs.insideSpan.null;d&&me(p,p.length,0,gt(d,l.slice(u+1,c),s)),me(p,p.length,0,[["exit",h,s],["enter",l[c][1],s],["exit",l[c][1],s],["exit",f,s]]),me(l,u-1,c-u+3,p),c=u+p.length-2;break}}for(c=-1;++c<l.length;)l[c][1].type==="strikethroughSequenceTemporary"&&(l[c][1].type="data");return l}function o(l,s,c){const u=this.previous,f=this.events;let h=0;return p;function p(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(m):(l.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const k=Be(u);if(m===126)return h>1?c(m):(l.consume(m),h++,d);if(h<2&&!n)return c(m);const C=l.exit("strikethroughSequenceTemporary"),y=Be(m);return C._open=!y||y===2&&!!k,C._close=!k||k===2&&!!y,s(m)}}}class yh{constructor(){this.map=[]}add(t,n,r){bh(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function bh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function kh(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function wh(){return{flow:{null:{name:"table",tokenize:Ch,resolveAll:vh}}}}function Ch(e,t,n){const r=this;let i=0,o=0,l;return s;function s(w){let F=r.events.length-1;for(;F>-1;){const L=r.events[F][1].type;if(L==="lineEnding"||L==="linePrefix")F--;else break}const D=F>-1?r.events[F][1].type:null,Y=D==="tableHead"||D==="tableRow"?b:c;return Y===b&&r.parser.lazy[r.now().line]?n(w):Y(w)}function c(w){return e.enter("tableHead"),e.enter("tableRow"),u(w)}function u(w){return w===124||(l=!0,o+=1),f(w)}function f(w){return w===null?n(w):O(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),d):n(w):V(w)?Q(e,f,"whitespace")(w):(o+=1,l&&(l=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),h(w)))}function h(w){return w===null||w===124||Z(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?p:h)}function p(w){return w===92||w===124?(e.consume(w),h):h(w)}function d(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),l=!1,V(w)?Q(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):m(w))}function m(w){return w===45||w===58?C(w):w===124?(l=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),k):P(w)}function k(w){return V(w)?Q(e,C,"whitespace")(w):C(w)}function C(w){return w===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(o+=1,y(w)):w===null||O(w)?A(w):P(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),j(w)):P(w)}function j(w){return w===45?(e.consume(w),j):w===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(w))}function S(w){return V(w)?Q(e,A,"whitespace")(w):A(w)}function A(w){return w===124?m(w):w===null||O(w)?!l||i!==o?P(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):P(w)}function P(w){return n(w)}function b(w){return e.enter("tableRow"),R(w)}function R(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),R):w===null||O(w)?(e.exit("tableRow"),t(w)):V(w)?Q(e,R,"whitespace")(w):(e.enter("data"),_(w))}function _(w){return w===null||w===124||Z(w)?(e.exit("data"),R(w)):(e.consume(w),w===92?q:_)}function q(w){return w===92||w===124?(e.consume(w),_):_(w)}}function vh(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],s=!1,c=0,u,f,h;const p=new yh;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,c!==0&&(fr(p,t,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],l=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],h=st(p,t,o,i,void 0,h),o=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],h=st(p,t,o,i,void 0,h)),o=l,l=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,o[1]!==0?(l[0]=l[1],h=st(p,t,o,i,n,h)):l[1]!==0&&(h=st(p,t,l,i,n,h)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(c!==0&&fr(p,t,c,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=kh(t.events,n))}return e}function st(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Me(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=Me(t.events,n[1]);if(o={type:l,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Me(t.events,n[2]),f=Me(t.events,n[3]),h={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,k=n[3]-n[2]-1;e.add(m,k,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(o.end=Object.assign({},Me(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function fr(e,t,n,r,i){const o=[],l=Me(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Me(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const jh={name:"tasklistCheck",tokenize:Sh};function Nh(){return{text:{91:jh}}}function Sh(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Z(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):n(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return O(c)?t(c):V(c)?e.check({tokenize:Eh},t,n)(c):n(c)}}function Eh(e,t,n){return Q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Ph(e){return _r([Zc(),uh(),xh(e),wh(),Nh()])}const Ah={};function Th(e){const t=this,n=e||Ah,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ph(n)),o.push(Xc()),l.push(Kc(n))}function Pi({content:e,className:t}){const n=e.trim().replace(/^#+ .+$/m,"").trim();return a.jsx(xu,{remarkPlugins:[Th],components:{h1:({children:r})=>a.jsx("h1",{className:"text-lg font-bold text-gray-900 mb-3 mt-6 first:mt-0 pb-1 border-b border-gray-200",children:r}),h2:({children:r})=>a.jsx("h2",{className:"text-base font-semibold text-gray-900 mb-2 mt-5 first:mt-0",children:r}),h3:({children:r})=>a.jsx("h3",{className:"text-sm font-semibold text-gray-800 mb-2 mt-4 first:mt-0",children:r}),p:({children:r})=>a.jsx("p",{className:"text-sm text-gray-700 mb-3 leading-relaxed",children:r}),ul:({children:r})=>a.jsx("ul",{className:"list-disc ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),ol:({children:r})=>a.jsx("ol",{className:"list-decimal ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),li:({children:r})=>a.jsx("li",{className:"leading-relaxed",children:r}),code:({children:r,className:i})=>(i==null?void 0:i.includes("language-"))?a.jsx("pre",{className:"bg-gray-100 rounded p-3 text-xs font-mono overflow-x-auto mb-3",children:a.jsx("code",{children:r})}):a.jsx("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs font-mono text-gray-800",children:r}),pre:({children:r})=>a.jsx(a.Fragment,{children:r}),strong:({children:r})=>a.jsx("strong",{className:"font-semibold text-gray-900",children:r}),blockquote:({children:r})=>a.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-600 mb-3",children:r}),table:({children:r})=>a.jsx("div",{className:"overflow-x-auto mb-3",children:a.jsx("table",{className:"min-w-full text-sm border-collapse border border-gray-200",children:r})}),thead:({children:r})=>a.jsx("thead",{className:"bg-gray-50",children:r}),th:({children:r})=>a.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold text-gray-900",children:r}),td:({children:r})=>a.jsx("td",{className:"border border-gray-200 px-3 py-2 text-gray-700",children:r}),a:({children:r,href:i})=>a.jsx("a",{href:i,className:"text-[#005C75] hover:underline",target:"_blank",rel:"noopener noreferrer",children:r})},children:n})}function Ai(e){const t={name:"root",path:"",memories:[],children:new Map};for(const n of e){const r=n.filePath.split("/");r.pop();let i=t,o="";for(const l of r)o=o?`${o}/${l}`:l,i.children.has(l)||i.children.set(l,{name:l,path:o,memories:[],children:new Map}),i=i.children.get(l);r.length===0?t.memories.push(n):i.memories.push(n)}return t}function Ti(e){let t=e.memories.length;for(const n of e.children.values())t+=Ti(n);return t}function kt(e,t){var r;const n=e.match(/^#+ (.+)$/m);return n?n[1]:((r=t.split("/").pop())==null?void 0:r.replace(".md",""))||t}function Ze(e){return Math.round(e/3.5)}function ze(e){const t=new Date(e),n=new Date;if(t.toDateString()===n.toDateString()){const c=n.getTime()-t.getTime(),u=Math.floor(c/(1e3*60)),f=Math.floor(c/(1e3*60*60));return u<3?"Just now":u<60?`${u}min ago`:f===1?"1h ago":`${f}h ago`}const i=t.toLocaleDateString("en-US",{month:"short"}),o=t.getDate(),l=t.getFullYear(),s=n.getFullYear();return l===s?`${i} ${o}`:`${i} ${o}, ${l}`}function Ih({rule:e,onEdit:t,onDelete:n,onView:r,isReviewed:i,onToggleReviewed:o,changeType:l,isUncommitted:s,changeDate:c,diff:u,isFadingOut:f,showLeftBorder:h}){const[p,d]=I.useState(!1),[m,k]=I.useState(!1),C=I.useMemo(()=>kt(e.body,e.filePath),[e.body,e.filePath]),y=Ze(e.body.length),j=p?"#3e3e3e":s?"#d97706":"#c7c7c7",S=`rounded-lg border overflow-hidden transition-all ease-in-out ${s?"bg-amber-50 border-amber-300":"bg-white border-gray-200"}`,A={...f&&{opacity:0,maxHeight:0,paddingTop:0,paddingBottom:0,marginBottom:0,borderWidth:0,transitionDuration:"600ms"}};return a.jsxs("div",{className:S,style:A,children:[a.jsx("div",{className:`p-4 cursor-pointer ${s?"hover:bg-amber-100":"hover:bg-gray-50"}`,onClick:()=>r?r(e):d(!p),children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:p?"rotate(90deg)":"none",transition:"transform 0.2s"},children:a.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:j})})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h3",{style:{fontSize:"14px",lineHeight:"18px",fontWeight:500,color:s?"#78350f":"#000"},children:C}),l&&a.jsx("span",{className:`px-2 py-0.5 rounded uppercase font-medium tracking-wider ${l==="deleted"?"bg-red-100 text-red-700":""}`,style:{fontSize:"10px",...l==="added"&&{backgroundColor:"#CBF3FA",color:"#005C75"},...l==="modified"&&{backgroundColor:"#FFE8C1",color:"#C67E06"}},children:l}),s&&a.jsx("span",{className:"px-2 py-0.5 bg-amber-200 text-amber-800 rounded font-medium uppercase tracking-wider",style:{fontSize:"10px"},children:"Uncommitted"}),a.jsxs("span",{className:"text-xs text-gray-400",children:["~",y.toLocaleString()," tokens"]})]}),a.jsx("div",{className:"flex items-center gap-2 text-xs text-gray-500 flex-wrap",children:e.frontmatter.paths&&e.frontmatter.paths.length>0&&a.jsxs(a.Fragment,{children:[e.frontmatter.paths.slice(0,2).map((P,b)=>a.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded font-mono",children:P},b)),e.frontmatter.paths.length>2&&a.jsxs("span",{className:"text-gray-400 whitespace-nowrap",children:["+",e.frontmatter.paths.length-2," more"]})]})})]})]}),a.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[c&&a.jsx("span",{className:"text-xs text-gray-400",children:ze(c)}),o&&a.jsx("button",{onClick:P=>{P.stopPropagation(),o(e.filePath,e.lastModified,i??!1)},className:`w-5 h-5 rounded-full border-2 flex items-center justify-center cursor-pointer transition-colors ${i?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,title:i?"Mark as unreviewed":"Mark as reviewed",children:i&&a.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:a.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}),p&&a.jsxs("div",{className:`border-t ${s?"border-amber-200":"border-gray-100"}`,children:[a.jsxs("div",{className:`px-4 py-3 flex items-center justify-between ${s?"bg-amber-50":"bg-white"}`,children:[a.jsx("div",{className:"flex items-center gap-2",children:l==="modified"&&u&&a.jsxs("button",{onClick:P=>{P.stopPropagation(),k(!m)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${m?s?"bg-amber-200 text-amber-900":"bg-gray-200 text-gray-900":s?"text-amber-700 hover:text-amber-900 hover:bg-amber-100":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[a.jsx(kr,{className:"w-3 h-3"}),m?"Hide Diff":"Show Diff"]})}),l!=="deleted"&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{onClick:P=>{P.stopPropagation(),t(e)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${s?"text-amber-700 hover:text-amber-900 hover:bg-amber-100":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[a.jsx(tl,{className:"w-3 h-3"}),"Edit"]}),a.jsxs("button",{onClick:P=>{P.stopPropagation(),n(e)},className:"flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer text-red-600 hover:text-red-800 hover:bg-red-100",children:[a.jsx(il,{className:"w-3 h-3"}),"Delete"]})]})]}),m&&u&&a.jsx("pre",{className:"mx-4 mb-4 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:u.split(`
70
+ `).map((P,b)=>{let R="";return P.startsWith("+")&&!P.startsWith("+++")?R="text-green-400":P.startsWith("-")&&!P.startsWith("---")?R="text-red-400":P.startsWith("@@")&&(R="text-cyan-400"),a.jsx("div",{className:R,children:P},b)})}),a.jsxs("div",{className:"mx-4 mb-3",children:[a.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Edit with Claude:"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:["Claude, can you help me edit this rule: `",e.filePath,"`"]}),a.jsx(wr,{content:`Claude, can you help me edit this rule: \`${e.filePath}\``,icon:!0,iconSize:14,className:"p-1 text-gray-400 hover:text-gray-600 rounded transition-colors"})]})]}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&a.jsxs("div",{className:"mx-4 mb-3",children:[a.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Applies to paths:"}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.frontmatter.paths.map((P,b)=>a.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:P},b))})]}),!m&&a.jsx("div",{className:"mx-4 mb-4 p-4 rounded border max-h-[500px] overflow-auto bg-white border-gray-200",children:a.jsx(Pi,{content:e.body})})]})]})}function Fh(){return new Date().toISOString().split(".")[0]+"",`---
71
+ paths:
72
+ - '**/*.ts'
73
+ ---
74
+
75
+ ## Title
76
+
77
+ Description here.
78
+ `}function Rh({rule:e,onSave:t,onCancel:n}){const[r,i]=I.useState(e?`.claude/rules/${e.filePath}`:""),[o,l]=I.useState((e==null?void 0:e.content)||Fh()),[s,c]=I.useState(!!e),[u,f]=I.useState(!1),h=!e;return a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold",style:{fontFamily:"Sora"},children:e?"Edit Rule":"Create New Rule"}),a.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-5 h-5"})})]}),h&&a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"bg-[#f0f9ff] border border-[#bae6fd] rounded-lg p-4 mb-4",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(kr,{className:"w-5 h-5 text-[#0284c7] mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-medium text-[#0c4a6e] mb-1",children:"Recommended: Use Claude Code"}),a.jsx("p",{className:"text-sm text-[#0369a1] mb-2",children:"Run this command in Claude Code to create a properly formatted rule with the right file location and paths:"}),a.jsxs("div",{className:"relative",children:[a.jsx("code",{className:"block bg-white px-3 py-2 pr-9 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam-new-rule"}),a.jsx("button",{onClick:()=>{navigator.clipboard.writeText("/codeyam-new-rule"),f(!0),setTimeout(()=>f(!1),2e3)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-[#0284c7] hover:text-[#0c4a6e] cursor-pointer transition-colors",title:"Copy command",children:u?a.jsx(Ie,{className:"w-4 h-4 text-green-500"}):a.jsx(_e,{className:"w-4 h-4"})})]})]})]})}),a.jsxs("button",{onClick:()=>c(!s),className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 cursor-pointer",children:[a.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:s?"rotate(90deg)":"none",transition:"transform 0.2s"},children:a.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:s?"#3e3e3e":"#c7c7c7"})})}),"Or create manually"]})]}),(s||!h)&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path (relative to .claude/rules/)"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{type:"text",value:r,onChange:p=>i(p.target.value),placeholder:"e.g., src/webserver/architecture.md",className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm",disabled:!!e}),a.jsx("button",{onClick:()=>{navigator.clipboard.writeText(r)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600 cursor-pointer",title:"Copy path",children:a.jsx(_e,{className:"w-4 h-4"})})]})]}),e&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ask Claude for help editing:"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{type:"text",value:`Claude, can you help me edit the rule: \`${r}\``,readOnly:!0,className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-md bg-gray-50 font-mono text-sm text-gray-600"}),a.jsx("button",{onClick:()=>{navigator.clipboard.writeText(`Claude, can you help me edit the rule: \`${r}\``)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600 cursor-pointer",title:"Copy prompt",children:a.jsx(_e,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),a.jsx("textarea",{value:o,onChange:p=>l(p.target.value),rows:20,className:"w-full px-3 py-2 border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm bg-gray-900 text-gray-100 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-gray-800 [&::-webkit-scrollbar-thumb]:bg-gray-600 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:hover:bg-gray-500 [&::-webkit-resizer]:bg-gray-700"})]}),a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx("button",{onClick:n,className:"px-4 py-2 text-[#001f3f] hover:text-[#001530] rounded-md cursor-pointer font-mono uppercase text-xs font-semibold",children:"Cancel"}),a.jsx("button",{onClick:()=>t(r.replace(/^\.claude\/rules\//,""),o),disabled:!r.trim()||!o.trim(),className:"px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer font-mono uppercase text-xs font-semibold",children:"Save"})]})]})]})}function Dh({memories:e,selectedPath:t,onSelectPath:n,expandedFolders:r,onToggleFolder:i}){const o=I.useMemo(()=>Ai(e),[e]),l=(u,f,h)=>{if(u.target.closest(".chevron-toggle")){h&&i(f||"root");return}const d=f||null;n(t===d?null:d),h&&!r.has(f||"root")&&i(f||"root")},s=u=>{n(t===u?null:u)},c=(u,f=0)=>{const h=r.has(u.path||"root"),p=Ti(u),d=u.children.size>0,m=u.name==="root"?"(root)":u.name,k=u.memories.length>0||d,C=u.path||"",y=t===C||t===null&&C==="";return a.jsxs("div",{children:[a.jsxs("div",{className:`flex items-center gap-2 py-2.5 cursor-pointer rounded px-2 relative ${y?"bg-[#E0E9EC]":"hover:bg-gray-100"}`,style:{paddingLeft:`${f*12+8}px`},onClick:j=>l(j,u.path,k),children:[k&&a.jsx("span",{className:"chevron-toggle p-0.5 -m-0.5 hover:bg-gray-200 rounded",onClick:j=>{j.stopPropagation(),i(u.path||"root")},children:a.jsx(Jt,{className:`w-3 h-3 text-gray-500 transition-transform ${h?"rotate-90":""}`})}),!k&&a.jsx("div",{className:"w-3"}),a.jsx(vr,{className:"w-3.5 h-3.5 text-[#005C75]"}),a.jsx("span",{className:`text-xs font-mono font-semibold ${y?"text-[#005C75]":""}`,style:{color:"#005C75"},children:m}),a.jsxs("span",{className:"text-xs ml-auto",style:{color:"#005C75"},children:[p," rules"]})]}),h&&a.jsxs("div",{className:"relative",children:[(u.memories.length>0||d)&&a.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:`${f*12+8+6}px`}}),u.memories.length>0&&a.jsx("div",{style:{paddingLeft:`${(f+1)*12+8}px`},children:u.memories.map(j=>{var A;const S=t===j.filePath;return a.jsx("div",{className:`flex items-center gap-2 py-1 px-2 text-sm rounded cursor-pointer relative ${S?"bg-[#E0E9EC] text-[#005C75]":"text-gray-600 hover:bg-gray-50"}`,onClick:()=>s(j.filePath),children:a.jsx("span",{className:"text-xs",children:(A=j.filePath.split("/").pop())==null?void 0:A.replace(".md","")})},j.filePath)})}),d&&a.jsx("div",{children:Array.from(u.children.values()).sort((j,S)=>j.name.localeCompare(S.name)).map(j=>c(j,f+1))})]})]},u.path||"root")};return a.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-8",children:c(o)})}function Lh({memories:e,onEdit:t,onDelete:n,expandedFolders:r,onToggleFolder:i,reviewedStatus:o,onMarkReviewed:l,onMarkUnreviewed:s,onViewRule:c}){const[u,f]=I.useState({});I.useEffect(()=>{f({})},[o]);const h=I.useMemo(()=>({...o,...u}),[o,u]),p=I.useMemo(()=>Ai(e),[e]),d=(k,C,y)=>{f(j=>({...j,[k]:!y})),y?s(k):l(k,C)},m=(k,C=0)=>{const y=r.has(k.path||"root"),j=k.children.size>0,S=k.name==="root"?"root":k.name,A=k.memories.length>0||j;return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 py-2 cursor-pointer hover:bg-gray-50 rounded px-2 mb-2",style:{backgroundColor:"rgba(224, 233, 236, 0.5)"},onClick:()=>A&&i(k.path||"root"),children:[A&&a.jsx(Jt,{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`}),!A&&a.jsx("div",{className:"w-4"}),a.jsx(vr,{className:"w-4 h-4 text-[#005C75]"}),a.jsx("span",{className:"text-sm font-mono font-semibold",style:{color:"#001f3f"},children:S})]}),y&&a.jsxs("div",{className:"ml-10 space-y-4 relative",children:[(k.memories.length>0||j)&&a.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:"-24px"}}),k.memories.length>0&&a.jsx("div",{className:"space-y-2",children:k.memories.map(P=>a.jsx(Ih,{rule:P,onEdit:t,onDelete:n,onView:c,isReviewed:h[P.filePath]??!1,onToggleReviewed:d},P.filePath))}),j&&a.jsx("div",{className:"space-y-4",children:Array.from(k.children.values()).sort((P,b)=>P.name.localeCompare(b.name)).map(P=>m(P,C+1))})]})]},k.path||"root")};return a.jsx("div",{children:m(p)})}function Mh({memories:e,reviewedStatus:t,onViewRule:n,refreshKey:r}){const[i,o]=I.useState("unreviewed"),[l,s]=I.useState("by-date"),[c,u]=I.useState(null),[f,h]=I.useState(!0),[p,d]=I.useState(new Map),m=I.useRef(t),k=I.useRef([]);I.useEffect(()=>()=>{k.current.forEach(clearTimeout)},[]),I.useEffect(()=>{(async()=>{h(!0);try{const b=await(await fetch("/api/memory?action=rule-coverage")).json();u(b.coverage??null)}catch{u(null)}finally{h(!1)}})()},[r]),I.useEffect(()=>{const A=m.current,P=[];for(const[b,R]of Object.entries(t))R&&!A[b]&&P.push(b);m.current=t,P.length!==0&&(d(b=>{const R=new Map(b);return P.forEach(_=>R.set(_,"approved")),R}),k.current.push(setTimeout(()=>{d(b=>{const R=new Map(b);return P.forEach(_=>R.set(_,"fading")),R})},1500)),k.current.push(setTimeout(()=>{d(b=>{const R=new Map(b);return P.forEach(_=>R.delete(_)),R})},2500)))},[t]);const C=I.useMemo(()=>{const A=[...e];return l==="by-impact"&&c!==null?A.sort((P,b)=>{const R=c[P.filePath]??0,_=c[b.filePath]??0;return _!==R?_-R:new Date(b.lastModified).getTime()-new Date(P.lastModified).getTime()}):A.sort((P,b)=>new Date(b.lastModified).getTime()-new Date(P.lastModified).getTime()),A},[e,l,c]),y=I.useMemo(()=>C.filter(A=>!t[A.filePath]).length,[C,t]),j=I.useMemo(()=>i==="unreviewed"?C.filter(A=>!t[A.filePath]||p.has(A.filePath)):C,[C,i,t,p]),S=!f&&c!==null;return a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden flex flex-col",children:[a.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[a.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:a.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Recently Changed Rules"})}),a.jsx("div",{className:"flex-1"}),a.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[a.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),a.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:["Unreviewed Rules (",y,")"]})]}),a.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[a.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),a.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:["All (",C.length,")"]})]})]}),a.jsxs("div",{className:"grid grid-cols-[1fr_90px_80px_100px] px-5 py-2 border-b border-gray-100",children:[a.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Rule"}),a.jsxs("button",{onClick:()=>S&&s("by-impact"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none p-0 ${S?"cursor-pointer hover:text-gray-600":"cursor-default"} ${l==="by-impact"?"text-[#005C75]":"text-gray-400"}`,children:["Src Files",l==="by-impact"&&a.jsx(_t,{className:"w-3 h-3"})]}),a.jsxs("button",{onClick:()=>s("by-date"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none cursor-pointer p-0 hover:text-gray-600 ${l==="by-date"?"text-[#005C75]":"text-gray-400"}`,children:["Changed At",l==="by-date"&&a.jsx(_t,{className:"w-3 h-3"})]}),a.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium text-center flex items-center justify-center gap-1 whitespace-nowrap",children:["✓ Reviewed",a.jsxs("span",{className:"relative group",children:[a.jsx(Bt,{className:"w-3 h-3 text-gray-300 cursor-help"}),a.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Showing which rules have been reviewed and approved. Click a rule to view it and approve it"})]})]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:j.map(A=>{const P=t[A.filePath]??!1,b=p.get(A.filePath),R=kt(A.body,A.filePath),_=(c==null?void 0:c[A.filePath])??0;return a.jsx("div",{className:`border-b border-gray-50 transition-all ${b==="fading"?"duration-1000":"duration-300"}`,style:{opacity:b==="fading"?0:1},children:a.jsxs("div",{className:`grid grid-cols-[1fr_90px_80px_100px] px-5 py-2.5 items-center cursor-pointer transition-colors duration-300 ${b==="approved"?"bg-[#f0fdf4]":"hover:bg-gray-50"}`,onClick:()=>n(A),children:[a.jsx("div",{className:"flex items-center gap-2 min-w-0",children:a.jsx("span",{className:"text-sm text-gray-900 truncate",children:R})}),a.jsx("span",{className:"text-xs text-center",children:f?a.jsx("span",{className:"inline-block w-6 h-3 bg-gray-100 rounded animate-pulse"}):c!==null?a.jsx("span",{className:_>0?"text-gray-700 font-medium":"text-gray-300",children:_}):a.jsx("span",{className:"text-gray-300",children:"—"})}),a.jsx("span",{className:"text-xs text-gray-500 text-center",children:ze(A.lastModified)}),a.jsx("div",{className:"flex justify-center",children:a.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors duration-300 ${P?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:P&&a.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:a.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})},A.filePath)})}),j.length===0&&i==="unreviewed"&&a.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:"All rules have been reviewed"})]})}function zh(e,t){const n=t.map(r=>`- \`${r}\``).join(`
79
+ `);return`Please audit the following Claude Rules that apply to the file \`${e}\`:
80
+
81
+ ${n}
82
+
83
+ Please review these rules in conjunction with one another as they all apply to this file.
84
+
85
+ Review each rule with the other rules in mind:
86
+ - Necessary: Is this rule really necessary to avoid confusion in future work sessions?
87
+ - Efficiency: Are the rules concise and well-structured?
88
+ - Effectiveness: Does the rules provide clear, actionable guidance?
89
+ - Context window impact: Can the rules be shortened without losing important information?
90
+ - Overlap: Is there any redundant information across the rules that can be consolidated?
91
+ - Duplication: Are there any rules that are nearly identical that can be merged or removed?
92
+
93
+ Remember that documenting past confusion isn't helpul unless that confusion will likely happen again.
94
+
95
+ Note: Each rule may apply to multiple files, not just the file listed above. Consider this when suggesting changes — modifications should not negatively impact the rule's usefulness for other files it covers.`}function _h({filePath:e,rulePaths:t,onClose:n}){const[r,i]=I.useState(!1),o=zh(e,t),l=()=>{navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)};return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:n,children:a.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:s=>s.stopPropagation(),children:[a.jsx("button",{onClick:n,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-6 h-6"})}),a.jsx("h2",{className:"text-xl font-bold mb-1",children:"Audit Rules For File"}),a.jsx("p",{className:"font-mono text-sm text-gray-500 mb-4 truncate",title:e,children:e}),a.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can audit these rules to try and make them as efficient and effective as possible, reducing the impact on the context window."}),a.jsx("textarea",{readOnly:!0,value:o,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-4",children:a.jsx("button",{onClick:l,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:r?a.jsxs(a.Fragment,{children:[a.jsx(Ie,{className:"w-4 h-4"}),"Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(_e,{className:"w-4 h-4"}),"Copy Prompt"]})})})]})})}function Oh({refreshKey:e,reviewedStatus:t,memories:n,onViewRule:r}){const[i,o]=I.useState("unreviewed"),[l,s]=I.useState(null),[c,u]=I.useState(""),[f,h]=I.useState(0),[p,d]=I.useState(!1),[m,k]=I.useState(null),[C,y]=I.useState(null),j=I.useRef(null),S=I.useRef(null),[A,P]=I.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[b,R]=I.useState(!0);I.useEffect(()=>{(async()=>{R(!0);try{const B=await(await fetch("/api/memory?action=audit")).json();P({topPaths:B.topPaths||[],totalFilesWithCoverage:B.totalFilesWithCoverage||0,allSourceFiles:B.allSourceFiles||[]})}catch(z){console.error("Failed to load audit data:",z)}finally{R(!1)}})()},[e]);const _=I.useMemo(()=>i==="all"?A.topPaths:A.topPaths.filter(v=>v.matchingRules.some(z=>!t[z.filePath])),[A.topPaths,i,t]);I.useMemo(()=>A.topPaths.filter(v=>v.matchingRules.some(z=>!t[z.filePath])).length,[A.topPaths,t]);const q=v=>v.split("/").pop()||v,w=I.useMemo(()=>{const v=new Map;for(const z of A.topPaths)v.set(z.filePath,z);return v},[A.topPaths]),F=I.useMemo(()=>{if(!c.trim())return[];const v=c.toLowerCase(),z=[],B=[];for(const K of A.allSourceFiles){const X=K.toLowerCase();if(!X.includes(v))continue;const g=w.get(K)||{filePath:K,matchingRules:[],totalTextLength:0};X.startsWith(v)?z.push(g):B.push(g)}return z.sort((K,X)=>K.filePath.localeCompare(X.filePath)),B.sort((K,X)=>K.filePath.localeCompare(X.filePath)),[...z,...B].slice(0,8)},[c,A.allSourceFiles,w]),D=I.useCallback(v=>{var z;k(v),s(v.filePath),u(v.filePath),d(!1),(z=j.current)==null||z.blur()},[]),Y=I.useCallback(()=>{var v;u(""),k(null),s(null),(v=j.current)==null||v.focus()},[]),L=I.useCallback(v=>{var z;!p||F.length===0||(v.key==="ArrowDown"?(v.preventDefault(),h(B=>Math.min(B+1,F.length-1))):v.key==="ArrowUp"?(v.preventDefault(),h(B=>Math.max(B-1,0))):v.key==="Enter"?(v.preventDefault(),D(F[f])):v.key==="Escape"&&(d(!1),(z=j.current)==null||z.blur()))},[p,F,f,D]);return I.useEffect(()=>{h(0)},[F]),a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 flex flex-col",children:[a.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[a.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:a.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Rule Audit"})}),a.jsxs("div",{className:"relative flex-1 max-w-[300px]",children:[a.jsx(Cr,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),a.jsx("input",{ref:j,type:"text",value:c,onChange:v=>{u(v.target.value),d(!0)},onFocus:()=>{c.trim()&&d(!0)},onBlur:()=>{setTimeout(()=>d(!1),200)},onKeyDown:L,placeholder:"Search files...",className:`w-full pl-8 ${c?"pr-7":"pr-3"} py-1 text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-1 focus:ring-[#005C75] focus:border-[#005C75] bg-gray-50`}),c&&a.jsx("button",{type:"button",onMouseDown:v=>{v.preventDefault(),Y()},className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 flex items-center justify-center text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:a.jsx("path",{d:"M1 1l12 12M13 1L1 13"})})}),p&&F.length>0&&a.jsx("div",{ref:S,className:"absolute left-0 top-full mt-0.5 bg-white border border-gray-200 rounded-md shadow-lg z-10 max-h-75 overflow-y-auto min-w-75 max-w-120",children:F.map((v,z)=>a.jsxs("div",{onMouseDown:B=>{B.preventDefault(),D(v)},onMouseEnter:()=>h(z),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${z===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[a.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),a.jsx("span",{className:"text-gray-700 truncate",title:v.filePath,children:(()=>{const B=v.filePath.toLowerCase().indexOf(c.toLowerCase());if(B===-1)return v.filePath;const K=v.filePath.slice(0,B),X=v.filePath.slice(B,B+c.length),g=v.filePath.slice(B+c.length);return a.jsxs(a.Fragment,{children:[K,a.jsx("span",{className:"font-semibold text-[#005C75]",children:X}),g]})})()}),a.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[v.matchingRules.length," rule",v.matchingRules.length!==1?"s":""]})]},v.filePath))})]}),a.jsx("div",{className:"flex-1"}),a.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[a.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),a.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:"Unreviewed Rules"})]}),a.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[a.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),a.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:"All"})]})]}),a.jsxs("div",{className:"grid grid-cols-[1fr_140px_150px] px-5 py-2 border-b border-gray-100",children:[a.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Source file"}),a.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Rules",a.jsxs("span",{className:"relative group",children:[a.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),a.jsx("span",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-48 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Number of rules not yet reviewed for this file / Total number of rules that apply to this file"})]})]}),a.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Tokens",a.jsxs("span",{className:"relative group",children:[a.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),a.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Estimated tokens from unreviewed rules / Total number of tokens from all rules that apply to this file"})]})]})]}),b&&a.jsx("div",{className:"px-5 py-6",children:a.jsxs("div",{className:"animate-pulse space-y-3",children:[a.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),a.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2"}),a.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mt-4"})]})}),!b&&(_.length>0||m)&&a.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(m?[m,..._.filter(z=>z.filePath!==m.filePath)].slice(0,8):_.slice(0,8)).map((v,z)=>{const B=v.matchingRules.length,K=v.matchingRules.filter(G=>!t[G.filePath]),X=K.length,g=K.reduce((G,re)=>G+re.bodyLength,0),le=X>0,se=l===v.filePath,x=(m==null?void 0:m.filePath)===v.filePath;return a.jsxs("div",{children:[a.jsxs("div",{onClick:()=>s(se?null:v.filePath),className:`grid grid-cols-[1fr_140px_150px] px-5 py-2.5 items-center border-b border-gray-50 cursor-pointer ${x?"bg-[#f0f9ff] hover:bg-[#e0f2fe]":"hover:bg-gray-50"}`,children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[se?a.jsx(_t,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):a.jsx(Jt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),a.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),a.jsx("span",{className:"text-sm text-gray-900 truncate",title:v.filePath,children:x?v.filePath:q(v.filePath)})]}),a.jsxs("span",{className:"text-sm text-center",children:[a.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:X}),a.jsx("span",{className:"text-gray-300",children:" / "}),a.jsx("span",{className:"text-gray-500",children:B})]}),a.jsxs("span",{className:"text-sm text-center",children:[a.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:Ze(g).toLocaleString()}),a.jsx("span",{className:"text-gray-300",children:" / "}),a.jsx("span",{className:"text-gray-500",children:Ze(v.totalTextLength).toLocaleString()})]})]}),se&&a.jsxs("div",{className:"bg-gray-50 border-b border-gray-100",children:[v.matchingRules.map(G=>{const re=n.find(M=>M.filePath===G.filePath),ne=t[G.filePath]??!1;return a.jsxs("div",{onClick:M=>{M.stopPropagation(),re&&r(re)},className:"flex items-center gap-2 px-5 pl-12 py-2 hover:bg-gray-100 cursor-pointer",children:[a.jsx(Yi,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),a.jsx("span",{className:"text-sm text-gray-700 truncate flex-1",children:re?kt(re.body,re.filePath):G.filePath}),a.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Ze(G.bodyLength).toLocaleString()," ","tokens"]}),a.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${ne?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:ne&&a.jsx("svg",{width:"8",height:"6",viewBox:"0 0 10 8",fill:"none",children:a.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},G.filePath)}),a.jsxs("div",{className:"flex items-center justify-center gap-3 px-5 py-2 border-t border-gray-200",children:[a.jsx("span",{className:"text-xs text-gray-400",children:"Have Claude audit these rules"}),a.jsx("button",{onClick:G=>{G.stopPropagation(),y({filePath:v.filePath,rulePaths:v.matchingRules.map(re=>re.filePath)})},className:"px-3 py-1 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer",children:"Prompt"})]})]})]},v.filePath)})}),!b&&_.length===0&&a.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:i==="unreviewed"?"No files have unreviewed rules":"No files have rule coverage yet"}),C&&a.jsx(_h,{filePath:C.filePath,rulePaths:C.rulePaths,onClose:()=>y(null)})]})}function Bh({rule:e,changeInfo:t,isReviewed:n,onApprove:r,onEdit:i,onDelete:o,onClose:l}){const s=kt(e.body,e.filePath),c=Ze(e.body.length),u=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,p]=I.useState(null),d=(t==null?void 0:t.changeType)==="added"||h!=null&&h.commitCount!=null&&h.commitCount<=1&&!(h.commitCount===1&&h.isUncommitted);return I.useEffect(()=>{p(null),fetch(`/api/memory?action=rule-diff&filePath=${encodeURIComponent(e.filePath)}`).then(m=>m.json()).then(m=>{m.diff&&p(m.diff)}).catch(()=>{})},[e.filePath]),I.useEffect(()=>{const m=k=>{k.key==="Escape"&&l()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]),a.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:l,children:a.jsxs("div",{className:"rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",style:{backgroundColor:"#F8F7F6"},onClick:m=>m.stopPropagation(),children:[a.jsx("div",{className:"px-6 pt-5 pb-4",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[a.jsx("h2",{className:"text-[16px] font-bold text-gray-900",children:s}),t&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:ze(t.date)}),a.jsx("span",{className:`flex-shrink-0 text-[11px] uppercase font-semibold tracking-wider ${t.changeType==="added"?"text-green-600":t.changeType==="modified"?"text-orange-600":"text-red-600"}`,children:t.changeType})]})]}),u&&a.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[a.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"TYPE:"}),a.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] uppercase font-semibold tracking-wider bg-[#E0F2F1] text-[#00796B]",children:u})]}),a.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[a.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"FILE:"}),a.jsx("code",{className:"text-[11px] text-gray-600 font-mono",children:f}),a.jsx(wr,{content:f,icon:!0,iconSize:12,className:"p-0.5 rounded text-gray-400 hover:text-gray-600 transition-colors",ariaLabel:"Copy file path"})]}),a.jsxs("div",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:["TOKENS: ~",c.toLocaleString()]})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[a.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer transition-colors ${n?"bg-green-600 text-white":"border border-green-600 text-green-700 hover:bg-green-50"}`,children:[a.jsx(Ie,{className:"w-3.5 h-3.5"}),n?"Approved":"Approve"]}),a.jsx("button",{onClick:i,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-gray-300 text-gray-600 hover:bg-gray-50 transition-colors",children:"Edit"}),a.jsx("button",{onClick:o,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-red-300 text-red-600 hover:bg-red-50 transition-colors",children:"Delete"}),a.jsx("button",{onClick:l,className:"p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-200 cursor-pointer transition-colors ml-1",children:a.jsx($e,{className:"w-5 h-5"})})]})]})}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&a.jsxs("div",{className:"px-6 pb-4",children:[a.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Applies to paths:"}),a.jsx("div",{className:"bg-white rounded-lg p-4 space-y-2.5",style:{border:"1px solid #E6E6E6"},children:e.frontmatter.paths.map((m,k)=>{const C=m.split("/"),y=C.pop()||m,j=C.length>0?C.join("/")+"/":"";return a.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[a.jsx(Ot,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),a.jsxs("span",{children:[j&&a.jsx("span",{className:"text-gray-500",children:j}),a.jsx("span",{className:"font-bold text-gray-900",children:y})]})]},k)})})]}),d?a.jsx("div",{className:"px-6 pb-4",children:a.jsxs("div",{className:"text-[13px] text-gray-500",children:["Created"," ",t!=null&&t.date?ze(t.date):h!=null&&h.date?ze(h.date):"recently"]})}):h&&a.jsx("div",{className:"px-6 pb-4",children:a.jsxs("details",{children:[a.jsxs("summary",{className:"text-[13px] text-gray-700 font-semibold cursor-pointer",children:["Recent change: ",h.commitMessage," —"," ",ze(h.date)]}),a.jsx("pre",{className:"mt-2 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:h.diff.split(`
96
+ `).map((m,k)=>{let C="";return m.startsWith("+")&&!m.startsWith("+++")?C="text-green-400":m.startsWith("-")&&!m.startsWith("---")?C="text-red-400":m.startsWith("@@")&&(C="text-cyan-400"),a.jsx("div",{className:C,children:m},k)})})]})}),a.jsxs("div",{className:"px-6 pb-6",children:[a.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),a.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:a.jsx(Pi,{content:e.body})})]})]})})}function $h(){return a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),a.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),a.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),a.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),a.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),a.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),a.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),a.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),a.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),a.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),a.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),a.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),a.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),a.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),a.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),a.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),a.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),a.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),a.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),a.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),a.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),a.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),a.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),a.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),a.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),a.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),a.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),a.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),a.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),a.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),a.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),a.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),a.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),a.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function Hh(){return a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),a.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),a.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),a.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),a.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),a.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),a.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),a.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),a.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),a.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),a.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),a.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),a.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),a.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),a.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),a.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),a.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),a.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),a.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),a.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),a.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),a.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),a.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),a.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),a.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),a.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),a.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),a.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function Uh(){return a.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:a.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-10",children:[a.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),a.jsx("p",{className:"text-[15px] text-gray-500 leading-relaxed max-w-2xl mx-auto",children:"CodeYam Memory generates path-scoped Claude Rules that load automatically when Claude works on matching files. These rules capture any confusion, architectural decisions, and tribal knowledge from your as you work with Claude, ensuring sessions become more efficient and aligned with your codebase over time."})]}),a.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[a.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),a.jsxs("ol",{className:"space-y-5",children:[a.jsxs("li",{className:"flex gap-3 items-start",children:[a.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"1"}),a.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),a.jsxs("li",{className:"flex gap-3 items-start",children:[a.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"2"}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[a.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),a.jsx(dr,{value:"/codeyam-memory"}),a.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"in the Claude Code session"})]}),a.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),a.jsxs("li",{className:"flex gap-3 items-start",children:[a.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"3"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Return to this dashboard page to review the new rules"}),a.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"You can review, edit, and approve the rules Claude creates."})]})]})]})]}),a.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[a.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start gap-4 relative",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:a.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[a.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),a.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),a.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),a.jsxs("div",{className:"flex items-start gap-4 relative",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:a.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),a.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"No manual steps needed — Claude picks up relevant rules based on the files it touches."})]})]}),a.jsxs("div",{className:"flex items-start gap-4 relative",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:a.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),a.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"A git hook runs automatically to update rules when related code changes and looks for any new patterns of confusion in work sessions."})]})]})]})]})]}),a.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[a.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),a.jsx(dr,{value:"/codeyam-memory"}),a.jsx("span",{className:"text-white text-[15px] font-medium",children:"in Claude Code to get started"})]})]})})}function dr({value:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return a.jsxs("button",{onClick:r,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-[13px] font-mono cursor-pointer border-0",style:{backgroundColor:"#2C3E50",color:"#E0E0E0"},title:"Copy to clipboard",children:[e,t?a.jsx(Ie,{className:"w-3.5 h-3.5 text-green-400"}):a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400",children:[a.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),a.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function ut({label:e,count:t,icon:n,bgColor:r,iconBgColor:i,textColor:o}){return a.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:n}),a.jsxs("div",{className:"flex-1",children:[a.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:t}),a.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Vh({searchFilter:e,onSearchChange:t,onCreateNew:n,onLearnMore:r,reviewCounts:i}){return a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx($h,{}),a.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),a.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",a.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Cr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),a.jsx("input",{type:"text",value:e,onChange:o=>t(o.target.value),placeholder:"Search rules...",className:"w-64 pl-10 pr-4 py-2 border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent text-sm"})]}),a.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[a.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsx(ut,{label:"Total Rules",count:i.total,icon:a.jsx(Hh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),a.jsx(ut,{label:"Unreviewed",count:i.unreviewed,icon:a.jsx(Xi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),a.jsx(ut,{label:"Reviewed",count:i.reviewed,icon:a.jsx(Ie,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),a.jsx(ut,{label:"Stale",count:i.stale,icon:a.jsx(Wi,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function qh({onClose:e,onCreateNew:t}){return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:a.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:n=>n.stopPropagation(),children:[a.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-6 h-6"})}),a.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),a.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),a.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[a.jsxs("p",{children:["Claude Rules are a component of"," ",a.jsx("a",{href:"https://code.claude.com/docs/en/memory#modular-rules-with-claude%2Frules%2F",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Memory Management in Claude Code"}),'. The text of each rule is passed into the context window when working on the specific files described in the "paths" frontmatter field of the rule.']}),a.jsx("p",{children:"This allows you to provide context that is surgically specific to certain files in your codebase. They are a powerful tool but are harder to write and maintain than CLAUDE.md files."}),a.jsx("p",{children:"CodeYam Memory helps write and maintain Claude Rules. Hooks ensure that rules are reviewed and added during Claude Code working sessions. The CodeYam CLI Dashboard provides a page dedicated to Memory where you can view, edit, create, delete, and review Claude Rules."})]}),a.jsx("div",{className:"flex justify-center",children:a.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-5 py-2.5 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[a.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Wh({rule:e,onConfirm:t,onCancel:n}){return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:a.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[a.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),a.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",a.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx("button",{onClick:n,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),a.jsx("button",{onClick:()=>t(e),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})})}const pr="Can you help me perform an interactive rules audit? Please look at all of the rules in `.claude/rules`. Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts `folder1/folder2/file1` and `folder1/folder2/folder3/file2` then the rule should be in `.claude/rules/folder1/folder2`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rule is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. Too often rules reflect past confusion that has been resolved and is unlikely to happen again. Content and rules like this should be removed. If you have any questions please ask!",mr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function gr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return a.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?a.jsxs(a.Fragment,{children:[a.jsx(Ie,{className:"w-4 h-4"}),"Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(_e,{className:"w-4 h-4"}),"Copy Prompt"]})})}function Yh({onClose:e}){return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:a.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:t=>t.stopPropagation(),children:[a.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-6 h-6"})}),a.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit All Rules"}),a.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can review all rules to look for information that is inconsistent, inappropriate, duplicative, inefficient, etc."}),a.jsx("textarea",{readOnly:!0,value:pr,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(gr,{text:pr})}),a.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[a.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),a.jsx("textarea",{readOnly:!0,value:mr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(gr,{text:mr})})]})]})})}function Qh(){const[e,t]=I.useState(!1);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit All Rules"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Ask Claude to review, audit, and improve all rules."}),a.jsx("button",{onClick:()=>t(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),e&&a.jsx(Yh,{onClose:()=>t(!1)})]})}function Xh(e){return`Can you help me review my unreviewed rules? The following rules in \`.claude/rules\` have not been reviewed yet:
97
+
98
+ ${e.map(n=>`- \`.claude/rules/${n}\``).join(`
99
+ `)}
100
+
101
+ Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts \`folder1/folder2/file1\` and \`folder1/folder2/folder3/file2\` then the rule should be in \`.claude/rules/folder1/folder2\`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rule is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. Too often rules reflect past confusion that has been resolved and is unlikely to happen again. Content and rules like this should be removed. If you have any questions please ask!`}const xr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function yr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return a.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?a.jsxs(a.Fragment,{children:[a.jsx(Ie,{className:"w-4 h-4"}),"Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(_e,{className:"w-4 h-4"}),"Copy Prompt"]})})}function Kh({onClose:e,unreviewedRulePaths:t}){const n=Xh(t);return a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:a.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:r=>r.stopPropagation(),children:[a.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:a.jsx($e,{className:"w-6 h-6"})}),a.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit Unreviewed Rules"}),a.jsxs("p",{className:"text-gray-600 text-sm mb-4",children:["Claude will review only the ",t.length," unreviewed"," ",t.length===1?"rule":"rules"," for quality, relevance, and organization."]}),a.jsx("textarea",{readOnly:!0,value:n,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(yr,{text:n})}),a.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[a.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),a.jsx("textarea",{readOnly:!0,value:xr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),a.jsx("div",{className:"flex justify-end mt-3",children:a.jsx(yr,{text:xr})})]})]})})}function Gh({unreviewedRulePaths:e}){const[t,n]=I.useState(!1);return e.length===0?a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3 opacity-50",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit Unreviewed Rules"}),a.jsx("p",{className:"text-sm text-gray-500",children:"All rules have been reviewed."})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 flex items-center gap-3",children:[a.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit Unreviewed Rules"}),a.jsxs("p",{className:"text-sm text-gray-500",children:["Ask Claude to review the ",e.length," unreviewed"," ",e.length===1?"rule":"rules","."]}),a.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),t&&a.jsx(Kh,{onClose:()=>n(!1),unreviewedRulePaths:e})]})}const uf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],cf=Bi(function(){const{memories:t,reviewedStatus:n,memoryInitialized:r,error:i}=$i(),o=Hi(),l=Ui(),[s,c]=I.useState(""),[u,f]=I.useState(null),[h,p]=I.useState(new Set(["root"])),[d,m]=I.useState(null),[k,C]=I.useState(!1),[y,j]=I.useState(null),[S,A]=I.useState(0),[P,b]=I.useState(!1),[R,_]=I.useState(null),[q,w]=I.useState(null),[F,D]=I.useState({}),Y=M=>{p(H=>{const ee=new Set(H);return ee.has(M)?ee.delete(M):ee.add(M),ee})};qi({source:"memory-page"});const L=I.useMemo(()=>({...n,...F}),[n,F]),v=I.useRef(o.state);I.useEffect(()=>{const M=v.current==="loading"||v.current==="submitting",H=o.state==="idle";M&&H&&o.data&&(l.revalidate(),m(null),C(!1),A(ee=>ee+1)),v.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{D(M=>{const H={};for(const[ee,ue]of Object.entries(M))n[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(M).length?M:H})},[n]);const z=(M,H)=>{D(ee=>({...ee,[M]:!0})),o.submit({action:"mark-reviewed",filePath:M,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=M=>{D(H=>({...H,[M]:!1})),o.submit({action:"mark-unreviewed",filePath:M},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(M,H)=>{_(M),w(H??null)},X=I.useMemo(()=>{let M=t;if(s.trim()){const H=s.toLowerCase();M=M.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return M},[t,s]),g=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(M,H)=>{const ee=d?"update":"create";o.submit({action:ee,filePath:M,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=M=>{o.submit({action:"delete",filePath:M.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},x=I.useMemo(()=>{const M=t.filter(H=>L[H.filePath]).length;return{total:t.length,reviewed:M,unreviewed:t.length-M,stale:0}},[t,L]),G=I.useMemo(()=>{const M=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,M.add(ue)}return M},[X]),re=G.size===h.size&&[...G].every(M=>h.has(M)),ne=()=>{p(re?new Set(["root"]):new Set(G))};return i?a.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:a.jsxs("div",{className:"px-12 py-6 font-sans",children:[a.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),a.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?a.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:a.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[a.jsx(Vh,{searchFilter:s,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>b(!0),reviewCounts:x}),(k||d)&&a.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),m(null)},children:a.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:M=>M.stopPropagation(),children:a.jsx(Rh,{rule:d,onSave:le,onCancel:()=>{C(!1),m(null)}})})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[a.jsx(Mh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:S}),a.jsx(Oh,{onEditRule:m,onDeleteRule:j,refreshKey:S,reviewedStatus:L,onMarkReviewed:z,onMarkUnreviewed:B,memories:t,onViewRule:K})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[a.jsx(Gh,{unreviewedRulePaths:t.filter(M=>!L[M.filePath]).map(M=>M.filePath)}),a.jsx(Qh,{})]}),a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),a.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&a.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:a.jsx(Dh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),a.jsx("div",{className:"flex-1 min-w-0",children:t.length===0?a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[a.jsx(Gi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),a.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",a.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),a.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[a.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):a.jsxs("div",{children:[u&&a.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",a.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),a.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),a.jsx(Lh,{memories:g,onEdit:m,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:z,onMarkUnreviewed:B,onViewRule:K})]})})]}),a.jsx("div",{className:"mt-8 mb-8",children:a.jsx(Vi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("polyline",{points:"4 17 10 11 4 5"}),a.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),a.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),R&&!d&&(()=>{const M=t.find(H=>H.filePath===R.filePath)??R;return a.jsx(Bh,{rule:M,changeInfo:q??void 0,isReviewed:L[M.filePath]??!1,onApprove:()=>{L[M.filePath]??!1?B(M.filePath):z(M.filePath,M.lastModified),_(null)},onEdit:()=>{m(M)},onDelete:()=>{j(M),_(null)},onClose:()=>_(null)})})(),P&&a.jsx(qh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),C(!0)}}),y&&a.jsx(Wh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):a.jsx(Uh,{})});export{cf as default,uf as meta};