@codeyam/codeyam-cli 0.1.0-staging.596f0eb → 0.1.0-staging.6e699e5

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 (696) hide show
  1. package/analyzer-template/.build-info.json +8 -8
  2. package/analyzer-template/common/execAsync.ts +1 -1
  3. package/analyzer-template/log.txt +3 -3
  4. package/analyzer-template/package.json +10 -6
  5. package/analyzer-template/packages/ai/index.ts +10 -3
  6. package/analyzer-template/packages/ai/package.json +1 -1
  7. package/analyzer-template/packages/ai/src/lib/__mocks__/completionCall.ts +122 -0
  8. package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +128 -6
  9. package/analyzer-template/packages/ai/src/lib/astScopes/arrayDerivationDetector.ts +199 -0
  10. package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +138 -1
  11. package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
  12. package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +140 -6
  13. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
  14. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +38 -1
  15. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +181 -1
  16. package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +1239 -104
  17. package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +304 -0
  18. package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
  19. package/analyzer-template/packages/ai/src/lib/completionCall.ts +216 -36
  20. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +1501 -138
  21. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +2 -1
  22. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +976 -0
  23. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +243 -77
  24. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +19 -1
  25. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +103 -6
  26. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +23 -0
  27. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
  28. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +42 -2
  29. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.ts +129 -0
  30. package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +156 -0
  31. package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
  32. package/analyzer-template/packages/ai/src/lib/e2eDataTracking.ts +334 -0
  33. package/analyzer-template/packages/ai/src/lib/extractCriticalDataKeys.ts +120 -0
  34. package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +74 -7
  35. package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +89 -112
  36. package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +6 -0
  37. package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +1111 -91
  38. package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +207 -104
  39. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +570 -0
  40. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
  41. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +1977 -0
  42. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +239 -0
  43. package/analyzer-template/packages/ai/src/lib/getConditionalUsagesFromCode.ts +143 -31
  44. package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +8 -2
  45. package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +276 -3
  46. package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +33 -3
  47. package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +7 -0
  48. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
  49. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -102
  50. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChunkPrompt.ts +82 -0
  51. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateCriticalKeysPrompt.ts +103 -0
  52. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +90 -6
  53. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -53
  54. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
  55. package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +28 -2
  56. package/analyzer-template/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.ts +391 -0
  57. package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +812 -0
  58. package/analyzer-template/packages/ai/src/lib/splitOutsideParentheses.ts +5 -1
  59. package/analyzer-template/packages/ai/src/lib/validateExecutionFlowPaths.ts +531 -0
  60. package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +123 -0
  61. package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +8 -1
  62. package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +14 -0
  63. package/analyzer-template/packages/analyze/src/lib/analysisContext.ts +44 -4
  64. package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +1 -0
  65. package/analyzer-template/packages/analyze/src/lib/asts/nodes/isAsyncFunction.ts +67 -0
  66. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +455 -267
  67. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +18 -0
  68. package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +3 -0
  69. package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +33 -7
  70. package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +31 -15
  71. package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +11 -7
  72. package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +11 -12
  73. package/analyzer-template/packages/analyze/src/lib/files/enums/steps.ts +1 -1
  74. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +265 -0
  75. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
  76. package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +588 -52
  77. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.ts +1 -1
  78. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -62
  79. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +336 -133
  80. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +156 -0
  81. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +78 -83
  82. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +4 -8
  83. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +461 -94
  84. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.ts +56 -11
  85. package/analyzer-template/packages/aws/codebuild/index.ts +1 -0
  86. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts +11 -1
  87. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts.map +1 -1
  88. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js +29 -18
  89. package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js.map +1 -1
  90. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts +2 -2
  91. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts.map +1 -1
  92. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js +2 -2
  93. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js.map +1 -1
  94. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts +8 -18
  95. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts.map +1 -1
  96. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js +17 -61
  97. package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js.map +1 -1
  98. package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts +15 -0
  99. package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts.map +1 -0
  100. package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js +31 -0
  101. package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js.map +1 -0
  102. package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.d.ts.map +1 -1
  103. package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js +8 -1
  104. package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js.map +1 -1
  105. package/analyzer-template/packages/aws/package.json +3 -3
  106. package/analyzer-template/packages/aws/s3/index.ts +1 -0
  107. package/analyzer-template/packages/aws/src/lib/codebuild/waitForBuild.ts +43 -19
  108. package/analyzer-template/packages/aws/src/lib/ecs/ecsDefineContainer.ts +3 -3
  109. package/analyzer-template/packages/aws/src/lib/ecs/ecsTaskFactory.ts +17 -69
  110. package/analyzer-template/packages/aws/src/lib/s3/checkS3ObjectExists.ts +47 -0
  111. package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
  112. package/analyzer-template/packages/database/src/lib/kysely/db.ts +4 -4
  113. package/analyzer-template/packages/database/src/lib/kysely/tableRelations.ts +2 -2
  114. package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +36 -9
  115. package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +7 -3
  116. package/analyzer-template/packages/generate/index.ts +3 -0
  117. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +17 -1
  118. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +193 -0
  119. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.ts +73 -0
  120. package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +9 -4
  121. package/analyzer-template/packages/generate/src/lib/deepMerge.ts +26 -1
  122. package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
  123. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -2
  124. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +2 -2
  125. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tableRelations.d.ts +2 -2
  126. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -11
  127. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts.map +1 -1
  128. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +30 -7
  129. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -1
  130. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
  131. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
  132. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts +1 -0
  133. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts.map +1 -1
  134. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +2 -6
  135. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
  136. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
  137. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +7 -4
  138. package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
  139. package/analyzer-template/packages/github/dist/generate/index.d.ts +3 -0
  140. package/analyzer-template/packages/github/dist/generate/index.d.ts.map +1 -1
  141. package/analyzer-template/packages/github/dist/generate/index.js +3 -0
  142. package/analyzer-template/packages/github/dist/generate/index.js.map +1 -1
  143. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
  144. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
  145. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
  146. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts +9 -0
  147. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -0
  148. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
  149. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
  150. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts +20 -0
  151. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts.map +1 -0
  152. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
  153. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
  154. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
  155. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
  156. package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
  157. package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.d.ts.map +1 -1
  158. package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js +27 -1
  159. package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js.map +1 -1
  160. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts +8 -0
  161. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts.map +1 -0
  162. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js +89 -0
  163. package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js.map +1 -0
  164. package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.d.ts.map +1 -1
  165. package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js +10 -0
  166. package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js.map +1 -1
  167. package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.d.ts.map +1 -1
  168. package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js +3 -0
  169. package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js.map +1 -1
  170. package/analyzer-template/packages/github/dist/types/index.d.ts +2 -2
  171. package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
  172. package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
  173. package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +87 -13
  174. package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
  175. package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts +2 -0
  176. package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts.map +1 -1
  177. package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +11 -6
  178. package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
  179. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +196 -0
  180. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  181. package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts +2 -0
  182. package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts.map +1 -1
  183. package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.d.ts.map +1 -1
  184. package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.js +25 -0
  185. package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
  186. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts +9 -1
  187. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
  188. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js +29 -3
  189. package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js.map +1 -1
  190. package/analyzer-template/packages/github/src/lib/loadOrCreateCommit.ts +14 -0
  191. package/analyzer-template/packages/github/src/lib/syncPrimaryBranch.ts +2 -0
  192. package/analyzer-template/packages/process/index.ts +2 -0
  193. package/analyzer-template/packages/process/package.json +12 -0
  194. package/analyzer-template/packages/process/tsconfig.json +8 -0
  195. package/analyzer-template/packages/types/index.ts +5 -0
  196. package/analyzer-template/packages/types/src/types/Analysis.ts +104 -13
  197. package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
  198. package/analyzer-template/packages/types/src/types/Scenario.ts +11 -10
  199. package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +224 -0
  200. package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
  201. package/analyzer-template/packages/ui-components/src/components/ScenarioDetailInteractiveView.tsx +23 -7
  202. package/analyzer-template/packages/utils/dist/types/index.d.ts +2 -2
  203. package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
  204. package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
  205. package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +87 -13
  206. package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
  207. package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts +2 -0
  208. package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts.map +1 -1
  209. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +11 -6
  210. package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
  211. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +196 -0
  212. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  213. package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts +2 -0
  214. package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts.map +1 -1
  215. package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.d.ts.map +1 -1
  216. package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.js +25 -0
  217. package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
  218. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts +9 -1
  219. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
  220. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js +29 -3
  221. package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js.map +1 -1
  222. package/analyzer-template/packages/utils/src/lib/lightweightEntityExtractor.ts +27 -0
  223. package/analyzer-template/packages/utils/src/lib/safeFileName.ts +48 -3
  224. package/analyzer-template/playwright/capture.ts +37 -18
  225. package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
  226. package/analyzer-template/playwright/takeElementScreenshot.ts +26 -11
  227. package/analyzer-template/playwright/takeScreenshot.ts +9 -7
  228. package/analyzer-template/playwright/waitForServer.ts +21 -6
  229. package/analyzer-template/project/analyzeBaselineCommit.ts +4 -0
  230. package/analyzer-template/project/analyzeBranchCommit.ts +4 -0
  231. package/analyzer-template/project/analyzeFileEntities.ts +4 -0
  232. package/analyzer-template/project/analyzeRegularCommit.ts +4 -0
  233. package/analyzer-template/project/constructMockCode.ts +1181 -160
  234. package/analyzer-template/project/controller/startController.ts +16 -1
  235. package/analyzer-template/project/executeLibraryFunctionDirect.ts +7 -3
  236. package/analyzer-template/project/mocks/analyzeFileMock.ts +8 -7
  237. package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
  238. package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +82 -36
  239. package/analyzer-template/project/orchestrateCapture.ts +36 -3
  240. package/analyzer-template/project/reconcileMockDataKeys.ts +245 -2
  241. package/analyzer-template/project/runAnalysis.ts +11 -0
  242. package/analyzer-template/project/runMultiScenarioServer.ts +11 -10
  243. package/analyzer-template/project/serverOnlyModules.ts +194 -21
  244. package/analyzer-template/project/start.ts +26 -4
  245. package/analyzer-template/project/startScenarioCapture.ts +79 -41
  246. package/analyzer-template/project/writeMockDataTsx.ts +232 -57
  247. package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
  248. package/analyzer-template/project/writeScenarioComponents.ts +769 -181
  249. package/analyzer-template/project/writeScenarioFiles.ts +26 -0
  250. package/analyzer-template/project/writeSimpleRoot.ts +13 -15
  251. package/analyzer-template/scripts/comboWorkerLoop.cjs +1 -0
  252. package/analyzer-template/scripts/defaultCmd.sh +9 -0
  253. package/analyzer-template/tsconfig.json +2 -1
  254. package/background/src/lib/local/createLocalAnalyzer.js +1 -29
  255. package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
  256. package/background/src/lib/local/execAsync.js +1 -1
  257. package/background/src/lib/local/execAsync.js.map +1 -1
  258. package/background/src/lib/virtualized/common/execAsync.js +1 -1
  259. package/background/src/lib/virtualized/common/execAsync.js.map +1 -1
  260. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +2 -1
  261. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
  262. package/background/src/lib/virtualized/project/analyzeBranchCommit.js +2 -1
  263. package/background/src/lib/virtualized/project/analyzeBranchCommit.js.map +1 -1
  264. package/background/src/lib/virtualized/project/analyzeFileEntities.js +2 -1
  265. package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
  266. package/background/src/lib/virtualized/project/analyzeRegularCommit.js +2 -1
  267. package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
  268. package/background/src/lib/virtualized/project/constructMockCode.js +1053 -124
  269. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  270. package/background/src/lib/virtualized/project/controller/startController.js +11 -1
  271. package/background/src/lib/virtualized/project/controller/startController.js.map +1 -1
  272. package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js +6 -3
  273. package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js.map +1 -1
  274. package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js +7 -7
  275. package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js.map +1 -1
  276. package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js +3 -2
  277. package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js.map +1 -1
  278. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +69 -32
  279. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
  280. package/background/src/lib/virtualized/project/orchestrateCapture.js +27 -4
  281. package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
  282. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +204 -2
  283. package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
  284. package/background/src/lib/virtualized/project/runAnalysis.js +9 -0
  285. package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
  286. package/background/src/lib/virtualized/project/runMultiScenarioServer.js +11 -9
  287. package/background/src/lib/virtualized/project/runMultiScenarioServer.js.map +1 -1
  288. package/background/src/lib/virtualized/project/serverOnlyModules.js +163 -23
  289. package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
  290. package/background/src/lib/virtualized/project/start.js +21 -4
  291. package/background/src/lib/virtualized/project/start.js.map +1 -1
  292. package/background/src/lib/virtualized/project/startScenarioCapture.js +61 -31
  293. package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
  294. package/background/src/lib/virtualized/project/writeMockDataTsx.js +199 -50
  295. package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
  296. package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js +15 -0
  297. package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js.map +1 -0
  298. package/background/src/lib/virtualized/project/writeScenarioComponents.js +552 -125
  299. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  300. package/background/src/lib/virtualized/project/writeScenarioFiles.js +19 -0
  301. package/background/src/lib/virtualized/project/writeScenarioFiles.js.map +1 -1
  302. package/background/src/lib/virtualized/project/writeSimpleRoot.js +13 -13
  303. package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
  304. package/codeyam-cli/src/cli.js +7 -1
  305. package/codeyam-cli/src/cli.js.map +1 -1
  306. package/codeyam-cli/src/commands/analyze.js +1 -1
  307. package/codeyam-cli/src/commands/analyze.js.map +1 -1
  308. package/codeyam-cli/src/commands/baseline.js +174 -0
  309. package/codeyam-cli/src/commands/baseline.js.map +1 -0
  310. package/codeyam-cli/src/commands/debug.js +40 -18
  311. package/codeyam-cli/src/commands/debug.js.map +1 -1
  312. package/codeyam-cli/src/commands/default.js +0 -15
  313. package/codeyam-cli/src/commands/default.js.map +1 -1
  314. package/codeyam-cli/src/commands/recapture.js +226 -0
  315. package/codeyam-cli/src/commands/recapture.js.map +1 -0
  316. package/codeyam-cli/src/commands/report.js +72 -24
  317. package/codeyam-cli/src/commands/report.js.map +1 -1
  318. package/codeyam-cli/src/commands/start.js +8 -12
  319. package/codeyam-cli/src/commands/start.js.map +1 -1
  320. package/codeyam-cli/src/commands/status.js +23 -1
  321. package/codeyam-cli/src/commands/status.js.map +1 -1
  322. package/codeyam-cli/src/commands/test-startup.js +1 -1
  323. package/codeyam-cli/src/commands/test-startup.js.map +1 -1
  324. package/codeyam-cli/src/commands/wipe.js +108 -0
  325. package/codeyam-cli/src/commands/wipe.js.map +1 -0
  326. package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js +81 -0
  327. package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js.map +1 -0
  328. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +31 -27
  329. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  330. package/codeyam-cli/src/utils/analysisRunner.js +8 -13
  331. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  332. package/codeyam-cli/src/utils/backgroundServer.js +14 -4
  333. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  334. package/codeyam-cli/src/utils/database.js +91 -5
  335. package/codeyam-cli/src/utils/database.js.map +1 -1
  336. package/codeyam-cli/src/utils/generateReport.js +253 -106
  337. package/codeyam-cli/src/utils/generateReport.js.map +1 -1
  338. package/codeyam-cli/src/utils/git.js +79 -0
  339. package/codeyam-cli/src/utils/git.js.map +1 -0
  340. package/codeyam-cli/src/utils/install-skills.js +31 -17
  341. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  342. package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +38 -0
  343. package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
  344. package/codeyam-cli/src/utils/queue/job.js +245 -16
  345. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  346. package/codeyam-cli/src/utils/queue/manager.js +25 -7
  347. package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
  348. package/codeyam-cli/src/utils/queue/persistence.js.map +1 -1
  349. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  350. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +7 -5
  351. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  352. package/codeyam-cli/src/utils/versionInfo.js +25 -19
  353. package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
  354. package/codeyam-cli/src/utils/wipe.js +128 -0
  355. package/codeyam-cli/src/utils/wipe.js.map +1 -0
  356. package/codeyam-cli/src/webserver/app/lib/database.js +98 -1
  357. package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
  358. package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
  359. package/codeyam-cli/src/webserver/backgroundServer.js +5 -10
  360. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  361. package/codeyam-cli/src/webserver/bootstrap.js +49 -0
  362. package/codeyam-cli/src/webserver/bootstrap.js.map +1 -0
  363. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-BXhEawa3.js +1 -0
  364. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-efWKDYMr.js → EntityTypeBadge-DLqD3qNt.js} +1 -1
  365. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-Ba2JVPzP.js +41 -0
  366. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C8lyxW9k.js +34 -0
  367. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-aht4aafF.js +25 -0
  368. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-CVtiBnY5.js +3 -0
  369. package/codeyam-cli/src/webserver/build/client/assets/LoadingDots-B0GLXMsr.js +6 -0
  370. package/codeyam-cli/src/webserver/build/client/assets/LogViewer-xgeCVgSM.js +3 -0
  371. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-D4TZhLuw.js +21 -0
  372. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DuDvi0jm.js +1 -0
  373. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-DEx02QDa.js +10 -0
  374. package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-COPstp9J.js → TruncatedFilePath-DyFZkK0l.js} +1 -1
  375. package/codeyam-cli/src/webserver/build/client/assets/_index-BwqWJOgH.js +11 -0
  376. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DoLIqZX2.js +37 -0
  377. package/codeyam-cli/src/webserver/build/client/assets/api.health-l0sNRNKZ.js +1 -0
  378. package/codeyam-cli/src/webserver/build/client/assets/api.restart-server-l0sNRNKZ.js +1 -0
  379. package/codeyam-cli/src/webserver/build/client/assets/api.rules-l0sNRNKZ.js +1 -0
  380. package/codeyam-cli/src/webserver/build/client/assets/chevron-down-Cx24_aWc.js +6 -0
  381. package/codeyam-cli/src/webserver/build/client/assets/chunk-EPOLDU6W-CXRTFQ3F.js +51 -0
  382. package/codeyam-cli/src/webserver/build/client/assets/circle-check-BOARzkeR.js +6 -0
  383. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-BdhJEx6B.js +21 -0
  384. package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-C1gnJVOL.svg → cy-logo-cli-CCKUIm0S.svg} +2 -2
  385. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +1 -0
  386. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BRb-0kQl.js +1 -0
  387. package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-C2N4Op8e.js +23 -0
  388. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DavjRmOY.js +6 -0
  389. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-D1T4TGjf.js +6 -0
  390. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-CTBG2mmz.js +5 -0
  391. package/codeyam-cli/src/webserver/build/client/assets/entry.client-CS2cb_eZ.js +29 -0
  392. package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
  393. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-DMJ7zii9.js +1 -0
  394. package/codeyam-cli/src/webserver/build/client/assets/files-Cs4MdYtv.js +1 -0
  395. package/codeyam-cli/src/webserver/build/client/assets/git-B4RJRvYB.js +15 -0
  396. package/codeyam-cli/src/webserver/build/client/assets/git-commit-horizontal-CysbcZxi.js +6 -0
  397. package/codeyam-cli/src/webserver/build/client/assets/globals-DMUaGAqV.css +1 -0
  398. package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-fmIEn3Bc.js +9 -0
  399. package/codeyam-cli/src/webserver/build/client/assets/index-B1h680n5.js +9 -0
  400. package/codeyam-cli/src/webserver/build/client/assets/index-lzqtyFU8.js +3 -0
  401. package/codeyam-cli/src/webserver/build/client/assets/loader-circle-B7B9V-bu.js +6 -0
  402. package/codeyam-cli/src/webserver/build/client/assets/manifest-f874c610.js +1 -0
  403. package/codeyam-cli/src/webserver/build/client/assets/preload-helper-ckwbz45p.js +1 -0
  404. package/codeyam-cli/src/webserver/build/client/assets/root-Bz5TunQg.js +57 -0
  405. package/codeyam-cli/src/webserver/build/client/assets/rules-hEkvVw2-.js +97 -0
  406. package/codeyam-cli/src/webserver/build/client/assets/scenarioStatus-B_8jpV3e.js +1 -0
  407. package/codeyam-cli/src/webserver/build/client/assets/search-CxXUmBSd.js +6 -0
  408. package/codeyam-cli/src/webserver/build/client/assets/settings-CS5f3WzT.js +1 -0
  409. package/codeyam-cli/src/webserver/build/client/assets/simulations-DwFIBT09.js +1 -0
  410. package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-B6LgvRJg.js +6 -0
  411. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-C1v1PQzo.js +1 -0
  412. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-3pmpUQB-.js → useLastLogLine-aSv48UbS.js} +1 -1
  413. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DYxHZQuP.js +1 -0
  414. package/codeyam-cli/src/webserver/build/client/assets/{useToast-DEyawJ8r.js → useToast-mBRpZPiu.js} +1 -1
  415. package/codeyam-cli/src/webserver/build/server/assets/index-967OuJoF.js +1 -0
  416. package/codeyam-cli/src/webserver/build/server/assets/server-build-DRTmerg9.js +257 -0
  417. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  418. package/codeyam-cli/src/webserver/build-info.json +5 -5
  419. package/codeyam-cli/src/webserver/devServer.js +1 -3
  420. package/codeyam-cli/src/webserver/devServer.js.map +1 -1
  421. package/codeyam-cli/src/webserver/server.js +35 -25
  422. package/codeyam-cli/src/webserver/server.js.map +1 -1
  423. package/codeyam-cli/templates/codeyam-power-rules-hook.sh +200 -0
  424. package/codeyam-cli/templates/{codeyam-debug-skill.md → codeyam:debug.md} +48 -4
  425. package/codeyam-cli/templates/codeyam:diagnose.md +650 -0
  426. package/codeyam-cli/templates/codeyam:new-rule.md +13 -0
  427. package/codeyam-cli/templates/codeyam:power-rules.md +447 -0
  428. package/codeyam-cli/templates/{codeyam-setup-skill.md → codeyam:setup.md} +139 -4
  429. package/codeyam-cli/templates/{codeyam-sim-skill.md → codeyam:sim.md} +1 -1
  430. package/codeyam-cli/templates/{codeyam-test-skill.md → codeyam:test.md} +1 -1
  431. package/codeyam-cli/templates/{codeyam-verify-skill.md → codeyam:verify.md} +1 -1
  432. package/package.json +17 -16
  433. package/packages/ai/index.js +5 -4
  434. package/packages/ai/index.js.map +1 -1
  435. package/packages/ai/src/lib/analyzeScope.js +99 -0
  436. package/packages/ai/src/lib/analyzeScope.js.map +1 -1
  437. package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js +150 -0
  438. package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js.map +1 -0
  439. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +100 -1
  440. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
  441. package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js +435 -0
  442. package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js.map +1 -0
  443. package/packages/ai/src/lib/astScopes/methodSemantics.js +97 -6
  444. package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
  445. package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js +8 -0
  446. package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js.map +1 -1
  447. package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +23 -0
  448. package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
  449. package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +138 -1
  450. package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
  451. package/packages/ai/src/lib/astScopes/processExpression.js +945 -87
  452. package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
  453. package/packages/ai/src/lib/checkAllAttributes.js +24 -9
  454. package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
  455. package/packages/ai/src/lib/completionCall.js +178 -31
  456. package/packages/ai/src/lib/completionCall.js.map +1 -1
  457. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1198 -82
  458. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  459. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +2 -1
  460. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
  461. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +661 -0
  462. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -0
  463. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +180 -56
  464. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
  465. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +16 -1
  466. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
  467. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +86 -4
  468. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
  469. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +20 -0
  470. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
  471. package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js +86 -0
  472. package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js.map +1 -0
  473. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +34 -3
  474. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
  475. package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js +107 -0
  476. package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js.map +1 -0
  477. package/packages/ai/src/lib/dataStructureChunking.js +111 -0
  478. package/packages/ai/src/lib/dataStructureChunking.js.map +1 -0
  479. package/packages/ai/src/lib/deepEqual.js +32 -0
  480. package/packages/ai/src/lib/deepEqual.js.map +1 -0
  481. package/packages/ai/src/lib/e2eDataTracking.js +241 -0
  482. package/packages/ai/src/lib/e2eDataTracking.js.map +1 -0
  483. package/packages/ai/src/lib/extractCriticalDataKeys.js +96 -0
  484. package/packages/ai/src/lib/extractCriticalDataKeys.js.map +1 -0
  485. package/packages/ai/src/lib/generateChangesEntityScenarioData.js +62 -5
  486. package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
  487. package/packages/ai/src/lib/generateChangesEntityScenarios.js +81 -90
  488. package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
  489. package/packages/ai/src/lib/generateEntityDataStructure.js +5 -0
  490. package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
  491. package/packages/ai/src/lib/generateEntityScenarioData.js +904 -84
  492. package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
  493. package/packages/ai/src/lib/generateEntityScenarios.js +186 -82
  494. package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
  495. package/packages/ai/src/lib/generateExecutionFlows.js +392 -0
  496. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -0
  497. package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js +380 -0
  498. package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js.map +1 -0
  499. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +1440 -0
  500. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
  501. package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js +194 -0
  502. package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js.map +1 -0
  503. package/packages/ai/src/lib/getConditionalUsagesFromCode.js +84 -14
  504. package/packages/ai/src/lib/getConditionalUsagesFromCode.js.map +1 -1
  505. package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -1
  506. package/packages/ai/src/lib/guessScenarioDataFromDescription.js.map +1 -1
  507. package/packages/ai/src/lib/isolateScopes.js +231 -4
  508. package/packages/ai/src/lib/isolateScopes.js.map +1 -1
  509. package/packages/ai/src/lib/mergeStatements.js +26 -3
  510. package/packages/ai/src/lib/mergeStatements.js.map +1 -1
  511. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +6 -0
  512. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
  513. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +1 -1
  514. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
  515. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +21 -64
  516. package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
  517. package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js +54 -0
  518. package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js.map +1 -0
  519. package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +68 -6
  520. package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
  521. package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -34
  522. package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
  523. package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js +45 -0
  524. package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js.map +1 -0
  525. package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js +16 -3
  526. package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
  527. package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js +335 -0
  528. package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js.map +1 -0
  529. package/packages/ai/src/lib/resolvePathToControllable.js +667 -0
  530. package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -0
  531. package/packages/ai/src/lib/splitOutsideParentheses.js +3 -1
  532. package/packages/ai/src/lib/splitOutsideParentheses.js.map +1 -1
  533. package/packages/ai/src/lib/worker/SerializableDataStructure.js +29 -0
  534. package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
  535. package/packages/ai/src/lib/worker/analyzeScopeWorker.js +4 -0
  536. package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
  537. package/packages/analyze/src/lib/FileAnalyzer.js +15 -0
  538. package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
  539. package/packages/analyze/src/lib/analysisContext.js +30 -5
  540. package/packages/analyze/src/lib/analysisContext.js.map +1 -1
  541. package/packages/analyze/src/lib/asts/nodes/index.js +1 -0
  542. package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
  543. package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js +52 -0
  544. package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js.map +1 -0
  545. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +218 -50
  546. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  547. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +10 -0
  548. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  549. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +2 -0
  550. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
  551. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +31 -7
  552. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
  553. package/packages/analyze/src/lib/files/analyzeChange.js +21 -11
  554. package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
  555. package/packages/analyze/src/lib/files/analyzeEntity.js +9 -8
  556. package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
  557. package/packages/analyze/src/lib/files/analyzeInitial.js +9 -10
  558. package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
  559. package/packages/analyze/src/lib/files/enums/steps.js +1 -1
  560. package/packages/analyze/src/lib/files/enums/steps.js.map +1 -1
  561. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +209 -0
  562. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -0
  563. package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js +85 -0
  564. package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js.map +1 -0
  565. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +458 -48
  566. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
  567. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js +1 -1
  568. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js.map +1 -1
  569. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +29 -34
  570. package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
  571. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +264 -78
  572. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  573. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +96 -0
  574. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -0
  575. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +56 -69
  576. package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
  577. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +4 -8
  578. package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
  579. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +372 -89
  580. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
  581. package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js +46 -9
  582. package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js.map +1 -1
  583. package/packages/aws/src/lib/ecs/ecsDefineContainer.js +2 -2
  584. package/packages/aws/src/lib/ecs/ecsDefineContainer.js.map +1 -1
  585. package/packages/aws/src/lib/ecs/ecsTaskFactory.js +17 -61
  586. package/packages/aws/src/lib/ecs/ecsTaskFactory.js.map +1 -1
  587. package/packages/database/src/lib/kysely/db.js +2 -2
  588. package/packages/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
  589. package/packages/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
  590. package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +7 -4
  591. package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
  592. package/packages/generate/index.js +3 -0
  593. package/packages/generate/index.js.map +1 -1
  594. package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
  595. package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
  596. package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
  597. package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
  598. package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
  599. package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
  600. package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
  601. package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
  602. package/packages/generate/src/lib/deepMerge.js +27 -1
  603. package/packages/generate/src/lib/deepMerge.js.map +1 -1
  604. package/packages/generate/src/lib/scenarioComponentForServer.js +89 -0
  605. package/packages/generate/src/lib/scenarioComponentForServer.js.map +1 -0
  606. package/packages/github/src/lib/loadOrCreateCommit.js +10 -0
  607. package/packages/github/src/lib/loadOrCreateCommit.js.map +1 -1
  608. package/packages/github/src/lib/syncPrimaryBranch.js +3 -0
  609. package/packages/github/src/lib/syncPrimaryBranch.js.map +1 -1
  610. package/packages/process/index.js +3 -0
  611. package/packages/process/index.js.map +1 -0
  612. package/packages/process/src/GlobalProcessManager.js.map +1 -0
  613. package/{background/src/lib/process → packages/process/src}/ProcessManager.js +1 -1
  614. package/packages/process/src/ProcessManager.js.map +1 -0
  615. package/packages/process/src/index.js.map +1 -0
  616. package/packages/process/src/managedExecAsync.js.map +1 -0
  617. package/packages/types/index.js.map +1 -1
  618. package/packages/utils/src/lib/lightweightEntityExtractor.js +25 -0
  619. package/packages/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
  620. package/packages/utils/src/lib/safeFileName.js +29 -3
  621. package/packages/utils/src/lib/safeFileName.js.map +1 -1
  622. package/scripts/finalize-analyzer.cjs +6 -4
  623. package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -102
  624. package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -197
  625. package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -271
  626. package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -294
  627. package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
  628. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -115
  629. package/analyzer-template/process/INTEGRATION_COMPLETE.md +0 -333
  630. package/analyzer-template/process/INTEGRATION_EXAMPLE.md +0 -525
  631. package/analyzer-template/process/README.md +0 -507
  632. package/background/src/lib/process/GlobalProcessManager.js.map +0 -1
  633. package/background/src/lib/process/ProcessManager.js.map +0 -1
  634. package/background/src/lib/process/index.js.map +0 -1
  635. package/background/src/lib/process/managedExecAsync.js.map +0 -1
  636. package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
  637. package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
  638. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-CVbSvOjo.js +0 -1
  639. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-DcwcHyl5.js +0 -1
  640. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-WgwC1GfJ.js +0 -26
  641. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-IEKom9O2.js +0 -3
  642. package/codeyam-cli/src/webserver/build/client/assets/LogViewer-BYnfxbUG.js +0 -3
  643. package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-_lBPJCzG.js +0 -1
  644. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-lHVhvsu_.js +0 -1
  645. package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-d_TBk4GQ.js +0 -5
  646. package/codeyam-cli/src/webserver/build/client/assets/_index-kGT7VUqj.js +0 -1
  647. package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DDGmhu7P.js +0 -7
  648. package/codeyam-cli/src/webserver/build/client/assets/chevron-down-n_HPRfM_.js +0 -1
  649. package/codeyam-cli/src/webserver/build/client/assets/chunk-WWGJGFF6-CbVoyx1U.js +0 -26
  650. package/codeyam-cli/src/webserver/build/client/assets/circle-check-D1VOYveA.js +0 -1
  651. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-YR8jjAlu.js +0 -1
  652. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-B8vP3V_s.js +0 -1
  653. package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-CN6aLCT1.js +0 -16
  654. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DA5Jeu2P.js +0 -1
  655. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-BTeitalf.js +0 -5
  656. package/codeyam-cli/src/webserver/build/client/assets/entry.client-du6UEYD-.js +0 -13
  657. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-BpjkhMoi.js +0 -1
  658. package/codeyam-cli/src/webserver/build/client/assets/files-BQGvk4lJ.js +0 -1
  659. package/codeyam-cli/src/webserver/build/client/assets/git-DVdYRT-I.js +0 -12
  660. package/codeyam-cli/src/webserver/build/client/assets/globals-CO-U8Bpo.css +0 -1
  661. package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-XQCGvadH.js +0 -5
  662. package/codeyam-cli/src/webserver/build/client/assets/index-DCG-vks0.js +0 -1
  663. package/codeyam-cli/src/webserver/build/client/assets/loader-circle-GazdNeLl.js +0 -1
  664. package/codeyam-cli/src/webserver/build/client/assets/manifest-0b694d28.js +0 -1
  665. package/codeyam-cli/src/webserver/build/client/assets/root-D3tQP7hx.js +0 -16
  666. package/codeyam-cli/src/webserver/build/client/assets/search-CIY6XmtE.js +0 -1
  667. package/codeyam-cli/src/webserver/build/client/assets/server-build-CMKNK2uU.css +0 -1
  668. package/codeyam-cli/src/webserver/build/client/assets/settings-CoMDgElu.js +0 -1
  669. package/codeyam-cli/src/webserver/build/client/assets/simulations-agkniXp2.js +0 -1
  670. package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-B2VUcygF.js +0 -1
  671. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-EvdK-zXP.js +0 -1
  672. package/codeyam-cli/src/webserver/build/server/assets/index-DGVHQEXD.js +0 -1
  673. package/codeyam-cli/src/webserver/build/server/assets/server-build-CghkTkIL.js +0 -166
  674. package/codeyam-cli/templates/debug-command.md +0 -303
  675. package/packages/ai/src/lib/findMatchingAttribute.js +0 -77
  676. package/packages/ai/src/lib/findMatchingAttribute.js.map +0 -1
  677. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +0 -136
  678. package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
  679. package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -220
  680. package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
  681. package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -241
  682. package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +0 -1
  683. package/packages/ai/src/lib/isFrontend.js +0 -5
  684. package/packages/ai/src/lib/isFrontend.js.map +0 -1
  685. package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js +0 -40
  686. package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js.map +0 -1
  687. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +0 -72
  688. package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +0 -1
  689. /package/analyzer-template/{process → packages/process/src}/GlobalProcessManager.ts +0 -0
  690. /package/analyzer-template/{process → packages/process/src}/ProcessManager.ts +0 -0
  691. /package/analyzer-template/{process → packages/process/src}/index.ts +0 -0
  692. /package/analyzer-template/{process → packages/process/src}/managedExecAsync.ts +0 -0
  693. /package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-CMKNK2uU.css → styles-CMKNK2uU.css} +0 -0
  694. /package/{background/src/lib/process → packages/process/src}/GlobalProcessManager.js +0 -0
  695. /package/{background/src/lib/process → packages/process/src}/index.js +0 -0
  696. /package/{background/src/lib/process → packages/process/src}/managedExecAsync.js +0 -0
@@ -0,0 +1,97 @@
1
+ import{G as Dt,j as g,w as Ir,u as jr,c as Tr,f as Pr,r as Q}from"./chunk-EPOLDU6W-CXRTFQ3F.js";import{u as Ar}from"./useReportContext-DYxHZQuP.js";import{c as ee}from"./createLucideIcon-BdhJEx6B.js";import{C as vn}from"./chevron-down-Cx24_aWc.js";import{G as zr}from"./git-commit-horizontal-CysbcZxi.js";/**
2
+ * @license lucide-react v0.556.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 Lr=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],In=ee("chevron-right",Lr);/**
7
+ * @license lucide-react v0.556.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 Dr=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_r=ee("clock",Dr);/**
12
+ * @license lucide-react v0.556.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 Rr=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Mr=ee("eye-off",Rr);/**
17
+ * @license lucide-react v0.556.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 Fr=[["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"}]],Wn=ee("eye",Fr);/**
22
+ * @license lucide-react v0.556.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 Or=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],Br=ee("file-pen",Or);/**
27
+ * @license lucide-react v0.556.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 Hr=[["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"}]],Xn=ee("folder-tree",Hr);/**
32
+ * @license lucide-react v0.556.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 Ur=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Vr=ee("funnel",Ur);/**
37
+ * @license lucide-react v0.556.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 qr=[["path",{d:"M5 12h14",key:"1ays0h"}]],$r=ee("minus",qr);/**
42
+ * @license lucide-react v0.556.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Yr=[["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"}]],_t=ee("pencil",Yr);/**
47
+ * @license lucide-react v0.556.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const Wr=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],mn=ee("plus",Wr);/**
52
+ * @license lucide-react v0.556.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const Xr=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Qr=ee("save",Xr);/**
57
+ * @license lucide-react v0.556.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const Gr=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Kr=ee("terminal",Gr);/**
62
+ * @license lucide-react v0.556.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const Jr=[["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"}]],Zr=ee("trash-2",Jr);/**
67
+ * @license lucide-react v0.556.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const ei=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ni=ee("x",ei);function ti(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ri=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ii=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,li={};function Qn(e,n){return(li.jsx?ii:ri).test(e)}const oi=/[ \t\n\f\r]/g;function ai(e){return typeof e=="object"?e.type==="text"?Gn(e.value):!1:Gn(e)}function Gn(e){return e.replace(oi,"")===""}class Ve{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Ve.prototype.normal={};Ve.prototype.property={};Ve.prototype.space=void 0;function Rt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Ve(t,r,n)}function gn(e){return e.toLowerCase()}class ne{constructor(n,t){this.attribute=t,this.property=n}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let si=0;const _=Se(),W=Se(),xn=Se(),w=Se(),$=Se(),je=Se(),re=Se();function Se(){return 2**++si}const yn=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:W,commaOrSpaceSeparated:re,commaSeparated:je,number:w,overloadedBoolean:xn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),nn=Object.keys(yn);class jn extends ne{constructor(n,t,r,i){let l=-1;if(super(n,t),Kn(this,"space",i),typeof r=="number")for(;++l<nn.length;){const o=nn[l];Kn(this,nn[l],(r&yn[o])===yn[o])}}}jn.prototype.defined=!0;function Kn(e,n,t){t&&(e[n]=t)}function Pe(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new jn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[gn(r)]=r,t[gn(l.attribute)]=r}return new Ve(n,t,e.space)}const Mt=Pe({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:w,ariaColIndex:w,ariaColSpan:w,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:W,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:$,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:w,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:w,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:$,ariaRowCount:w,ariaRowIndex:w,ariaRowSpan:w,ariaSelected:W,ariaSetSize:w,ariaSort:null,ariaValueMax:w,ariaValueMin:w,ariaValueNow:w,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ft(e,n){return n in e?e[n]:n}function Ot(e,n){return Ft(e,n.toLowerCase())}const ui=Pe({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:je,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:$,autoFocus:_,autoPlay:_,blocking:$,capture:null,charSet:null,checked:_,cite:null,className:$,cols:w,colSpan:null,content:null,contentEditable:W,controls:_,controlsList:$,coords:w|je,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:xn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:$,height:w,hidden:xn,high:w,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:$,itemRef:$,itemScope:_,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:w,manifest:null,max:null,maxLength:w,media:null,method:null,min:null,minLength:w,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,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:_,optimum:w,pattern:null,ping:$,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:$,required:_,reversed:_,rows:w,rowSpan:w,sandbox:$,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:w,sizes:null,slot:null,span:w,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:w,step:null,style:null,tabIndex:w,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:W,width:w,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:w,borderColor:null,bottomMargin:w,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:w,leftMargin:w,link:null,longDesc:null,lowSrc:null,marginHeight:w,marginWidth:w,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:w,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:w,valueType:null,version:null,vAlign:null,vLink:null,vSpace:w,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:w,security:null,unselectable:null},space:"html",transform:Ot}),ci=Pe({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:re,accentHeight:w,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:w,amplitude:w,arabicForm:null,ascent:w,attributeName:null,attributeType:null,azimuth:w,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:w,by:null,calcMode:null,capHeight:w,className:$,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:w,diffuseConstant:w,direction:null,display:null,dur:null,divisor:w,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:w,enableBackground:null,end:null,event:null,exponent:w,externalResourcesRequired:null,fill:null,fillOpacity:w,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:je,g2:je,glyphName:je,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:w,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:w,horizOriginX:w,horizOriginY:w,id:null,ideographic:w,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:w,k:w,k1:w,k2:w,k3:w,k4:w,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:w,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:w,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:w,overlineThickness:w,paintOrder:null,panose1:null,path:null,pathLength:w,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:w,pointsAtY:w,pointsAtZ:w,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,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:w,specularExponent:w,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:w,strikethroughThickness:w,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:w,strokeOpacity:w,strokeWidth:null,style:null,surfaceScale:w,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:w,tableValues:null,target:null,targetX:w,targetY:w,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:w,underlineThickness:w,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:w,values:null,vAlphabetic:w,vMathematical:w,vectorEffect:null,vHanging:w,vIdeographic:w,version:null,vertAdvY:w,vertOriginX:w,vertOriginY:w,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:w,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ft}),Bt=Pe({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Ht=Pe({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ot}),Ut=Pe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),hi={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"},pi=/[A-Z]/g,Jn=/-[a-z]/g,fi=/^data[-\w.:]+$/i;function di(e,n){const t=gn(n);let r=n,i=ne;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&fi.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Jn,gi);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Jn.test(l)){let o=l.replace(pi,mi);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=jn}return new i(r,n)}function mi(e){return"-"+e.toLowerCase()}function gi(e){return e.charAt(1).toUpperCase()}const xi=Rt([Mt,ui,Bt,Ht,Ut],"html"),Tn=Rt([Mt,ci,Bt,Ht,Ut],"svg");function yi(e){return e.join(" ").trim()}var ve={},tn,Zn;function bi(){if(Zn)return tn;Zn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
72
+ `,s="/",u="*",h="",m="comment",p="declaration";function y(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var I=1,S=1;function D(P){var v=P.match(n);v&&(I+=v.length);var H=P.lastIndexOf(c);S=~H?P.length-H:S+P.length}function z(){var P={line:I,column:S};return function(v){return v.position=new b(P),O(),v}}function b(P){this.start=P,this.end={line:I,column:S},this.source=k.source}b.prototype.content=E;function M(P){var v=new Error(k.source+":"+I+":"+S+": "+P);if(v.reason=P,v.filename=k.source,v.line=I,v.column=S,v.source=E,!k.silent)throw v}function V(P){var v=P.exec(E);if(v){var H=v[0];return D(H),E=E.slice(H.length),v}}function O(){V(t)}function B(P){var v;for(P=P||[];v=T();)v!==!1&&P.push(v);return P}function T(){var P=z();if(!(s!=E.charAt(0)||u!=E.charAt(1))){for(var v=2;h!=E.charAt(v)&&(u!=E.charAt(v)||s!=E.charAt(v+1));)++v;if(v+=2,h===E.charAt(v-1))return M("End of comment missing");var H=E.slice(2,v-2);return S+=2,D(H),E=E.slice(v),S+=2,P({type:m,comment:H})}}function j(){var P=z(),v=V(r);if(v){if(T(),!V(i))return M("property missing ':'");var H=V(l),X=P({type:p,property:C(v[0].replace(e,h)),value:H?C(H[0].replace(e,h)):h});return V(o),X}}function q(){var P=[];B(P);for(var v;v=j();)v!==!1&&(P.push(v),B(P));return P}return O(),q()}function C(E){return E?E.replace(a,h):h}return tn=y,tn}var et;function ki(){if(et)return ve;et=1;var e=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0}),ve.default=t;const n=e(bi());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),a=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:s,value:u}=c;a?i(s,u,c):u&&(l=l||{},l[s]=u)}),l}return ve}var _e={},nt;function wi(){if(nt)return _e;nt=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(s){return!s||t.test(s)||e.test(s)},o=function(s,u){return u.toUpperCase()},a=function(s,u){return"".concat(u,"-")},c=function(s,u){return u===void 0&&(u={}),l(s)?s:(s=s.toLowerCase(),u.reactCompat?s=s.replace(i,a):s=s.replace(r,a),s.replace(n,o))};return _e.camelCase=c,_e}var Re,tt;function Si(){if(tt)return Re;tt=1;var e=Re&&Re.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ki()),t=wi();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(o[(0,t.camelCase)(a,l)]=c)}),o}return r.default=r,Re=r,Re}var Ci=Si();const Ei=Dt(Ci),Vt=qt("end"),Pn=qt("start");function qt(e){return n;function n(t){const r=t&&t.position&&t.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 Ni(e){const n=Pn(e),t=Vt(e);if(n&&t)return{start:n,end:t}}function Oe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rt(e.position):"start"in e||"end"in e?rt(e):"line"in e||"column"in e?bn(e):""}function bn(e){return it(e&&e.line)+":"+it(e&&e.column)}function rt(e){return bn(e&&e.start)+"-"+bn(e&&e.end)}function it(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Oe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const An={}.hasOwnProperty,vi=new Map,Ii=/[A-Z]/g,ji=new Set(["table","tbody","thead","tfoot","tr"]),Ti=new Set(["td","th"]),$t="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Fi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Mi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Tn:xi,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Yt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Yt(e,n,t){if(n.type==="element")return Ai(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return zi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Di(e,n,t);if(n.type==="mdxjsEsm")return Li(e,n);if(n.type==="root")return _i(e,n,t);if(n.type==="text")return Ri(e,n)}function Ai(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Tn,e.schema=i),e.ancestors.push(n);const l=Xt(e,n.tagName,!1),o=Oi(e,n);let a=Ln(e,n);return ji.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!ai(c):!0})),Wt(e,o,l,n),zn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function zi(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ue(e,n.position)}function Li(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ue(e,n.position)}function Di(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Tn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Xt(e,n.name,!0),o=Bi(e,n),a=Ln(e,n);return Wt(e,o,l,n),zn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function _i(e,n,t){const r={};return zn(r,Ln(e,n)),e.create(n,e.Fragment,r,t)}function Ri(e,n){return n.value}function Wt(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function zn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Mi(e,n,t){return r;function r(i,l,o,a){const s=Array.isArray(o.children)?t:n;return a?s(l,o,a):s(l,o)}}function Fi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),c=Pn(r);return n(i,l,o,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Oi(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&An.call(n.properties,i)){const l=Hi(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Ti.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Bi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Ue(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Ue(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Ln(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:vi;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const s=i.get(c)||0;o=c+"-"+s,i.set(c,s+1)}}const a=Yt(e,l,o);a!==void 0&&t.push(a)}return t}function Hi(e,n,t){const r=di(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?ti(t):yi(t)),r.property==="style"){let i=typeof t=="object"?t:Ui(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Vi(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?hi[r.property]||r.property:r.attribute,t]}}function Ui(e,n){try{return Ei(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new K("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=$t+"#cannot-parse-style-attribute",i}}function Xt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=Qn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Qn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return An.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ue(e)}function Ue(e,n){const t=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=$t+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Vi(e){const n={};let t;for(t in e)An.call(e,t)&&(n[qi(t)]=e[t]);return n}function qi(e){let n=e.replace(Ii,$i);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function $i(e){return"-"+e.toLowerCase()}const rn={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"]},Yi={};function Wi(e,n){const t=Yi,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Qt(e,r,i)}function Qt(e,n,t){if(Xi(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lt(e.children,n,t)}return Array.isArray(e)?lt(e,n,t):""}function lt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Qt(e[i],n,t);return r.join("")}function Xi(e){return!!(e&&typeof e=="object")}const ot=document.createElement("i");function Dn(e){const n="&"+e+";";ot.innerHTML=n;const t=ot.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function pe(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function le(e,n){return e.length>0?(pe(e,e.length,0,n),e):n}const at={}.hasOwnProperty;function Qi(e){const n={};let t=-1;for(;++t<e.length;)Gi(n,e[t]);return n}function Gi(e,n){let t;for(t in n){const i=(at.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){at.call(i,o)||(i[o]=[]);const a=l[o];Ki(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Ki(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pe(e,0,0,r)}function Gt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const he=be(/[A-Za-z]/),ie=be(/[\dA-Za-z]/),Ji=be(/[#-'*+\--9=?A-Z^-~]/);function kn(e){return e!==null&&(e<32||e===127)}const wn=be(/\d/),Zi=be(/[\dA-Fa-f]/),el=be(/[!-/:-@[-`{-~]/);function A(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function F(e){return e===-2||e===-1||e===32}const nl=be(new RegExp("\\p{P}|\\p{S}","u")),tl=be(/\s/);function be(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ae(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&ie(e.charCodeAt(t+1))&&ie(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function Y(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return F(c)?(e.enter(t),a(c)):n(c)}function a(c){return F(c)&&l++<i?(e.consume(c),a):(e.exit(t),n(c))}}const rl={tokenize:il};function il(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Y(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return A(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const ll={tokenize:ol},st={tokenize:al};function ol(e){const n=this,t=[];let r=0,i,l,o;return a;function a(S){if(r<t.length){const D=t[r];return n.containerState=D[1],e.attempt(D[0].continuation,c,s)(S)}return s(S)}function c(S){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&I();const D=n.events.length;let z=D,b;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){b=n.events[z][1].end;break}k(r);let M=D;for(;M<n.events.length;)n.events[M][1].end={...b},M++;return pe(n.events,z+1,0,n.events.slice(D)),n.events.length=M,s(S)}return a(S)}function s(S){if(r===t.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return y(S);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(st,u,h)(S)}function u(S){return i&&I(),k(r),m(S)}function h(S){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,y(S)}function m(S){return n.containerState={},e.attempt(st,p,y)(S)}function p(S){return r++,t.push([n.currentConstruct,n.containerState]),m(S)}function y(S){if(S===null){i&&I(),k(0),e.consume(S);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),C(S)}function C(S){if(S===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(S);return}return A(S)?(e.consume(S),E(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(S),C)}function E(S,D){const z=n.sliceStream(S);if(D&&z.push(null),S.previous=l,l&&(l.next=S),l=S,i.defineSkip(S.start),i.write(z),n.parser.lazy[S.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<o&&(!i.events[b][1].end||i.events[b][1].end.offset>o))return;const M=n.events.length;let V=M,O,B;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(O){B=n.events[V][1].end;break}O=!0}for(k(r),b=M;b<n.events.length;)n.events[b][1].end={...B},b++;pe(n.events,V+1,0,n.events.slice(M)),n.events.length=b}}function k(S){let D=t.length;for(;D-- >S;){const z=t[D];n.containerState=z[1],z[0].exit.call(n,e)}t.length=S}function I(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function al(e,n,t){return Y(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ut(e){if(e===null||Z(e)||tl(e))return 1;if(nl(e))return 2}function _n(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Sn={name:"attention",resolveAll:sl,tokenize:ul};function sl(e,n){let t=-1,r,i,l,o,a,c,s,u;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[t][1].start};ct(h,-c),ct(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=le(s,[["enter",e[r][1],n],["exit",e[r][1],n]])),s=le(s,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),s=le(s,_n(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),s=le(s,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(u=2,s=le(s,[["enter",e[t][1],n],["exit",e[t][1],n]])):u=0,pe(e,r-1,t-r+3,s),t=r+s.length-u-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function ul(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ut(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===l)return e.consume(c),a;const s=e.exit("attentionSequence"),u=ut(c),h=!u||u===2&&i||t.includes(c),m=!i||i===2&&u||t.includes(r);return s._open=!!(l===42?h:h&&(i||!m)),s._close=!!(l===42?m:m&&(u||!h)),n(c)}}function ct(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const cl={name:"autolink",tokenize:hl};function hl(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return he(p)?(e.consume(p),o):p===64?t(p):s(p)}function o(p){return p===43||p===45||p===46||ie(p)?(r=1,a(p)):s(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ie(p))&&r++<32?(e.consume(p),a):(r=0,s(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||kn(p)?t(p):(e.consume(p),c)}function s(p){return p===64?(e.consume(p),u):Ji(p)?(e.consume(p),s):t(p)}function u(p){return ie(p)?h(p):t(p)}function h(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):m(p)}function m(p){if((p===45||ie(p))&&r++<63){const y=p===45?m:h;return e.consume(p),y}return t(p)}}const Je={partial:!0,tokenize:pl};function pl(e,n,t){return r;function r(l){return F(l)?Y(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||A(l)?n(l):t(l)}}const Kt={continuation:{tokenize:dl},exit:ml,name:"blockQuote",tokenize:fl};function fl(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return F(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function dl(e,n,t){const r=this;return i;function i(o){return F(o)?Y(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Kt,n,t)(o)}}function ml(e){e.exit("blockQuote")}const Jt={name:"characterEscape",tokenize:gl};function gl(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return el(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Zt={name:"characterReference",tokenize:xl};function xl(e,n,t){const r=this;let i=0,l,o;return a;function a(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"),s):(e.enter("characterReferenceValue"),l=31,o=ie,u(h))}function s(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Zi,u):(e.enter("characterReferenceValue"),l=7,o=wn,u(h))}function u(h){if(h===59&&i){const m=e.exit("characterReferenceValue");return o===ie&&!Dn(r.sliceSerialize(m))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(h)&&i++<l?(e.consume(h),u):t(h)}}const ht={partial:!0,tokenize:bl},pt={concrete:!0,name:"codeFenced",tokenize:yl};function yl(e,n,t){const r=this,i={partial:!0,tokenize:z};let l=0,o=0,a;return c;function c(b){return s(b)}function s(b){const M=r.events[r.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(b)}function u(b){return b===a?(o++,e.consume(b),u):o<3?t(b):(e.exit("codeFencedFenceSequence"),F(b)?Y(e,h,"whitespace")(b):h(b))}function h(b){return b===null||A(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(ht,C,D)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||A(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(b)):F(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Y(e,p,"whitespace")(b)):b===96&&b===a?t(b):(e.consume(b),m)}function p(b){return b===null||A(b)?h(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||A(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(b)):b===96&&b===a?t(b):(e.consume(b),y)}function C(b){return e.attempt(i,D,E)(b)}function E(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return l>0&&F(b)?Y(e,I,"linePrefix",l+1)(b):I(b)}function I(b){return b===null||A(b)?e.check(ht,C,D)(b):(e.enter("codeFlowValue"),S(b))}function S(b){return b===null||A(b)?(e.exit("codeFlowValue"),I(b)):(e.consume(b),S)}function D(b){return e.exit("codeFenced"),n(b)}function z(b,M,V){let O=0;return B;function B(v){return b.enter("lineEnding"),b.consume(v),b.exit("lineEnding"),T}function T(v){return b.enter("codeFencedFence"),F(v)?Y(b,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):j(v)}function j(v){return v===a?(b.enter("codeFencedFenceSequence"),q(v)):V(v)}function q(v){return v===a?(O++,b.consume(v),q):O>=o?(b.exit("codeFencedFenceSequence"),F(v)?Y(b,P,"whitespace")(v):P(v)):V(v)}function P(v){return v===null||A(v)?(b.exit("codeFencedFence"),M(v)):V(v)}}}function bl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const ln={name:"codeIndented",tokenize:wl},kl={partial:!0,tokenize:Sl};function wl(e,n,t){const r=this;return i;function i(s){return e.enter("codeIndented"),Y(e,l,"linePrefix",5)(s)}function l(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(s):t(s)}function o(s){return s===null?c(s):A(s)?e.attempt(kl,o,c)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||A(s)?(e.exit("codeFlowValue"),o(s)):(e.consume(s),a)}function c(s){return e.exit("codeIndented"),n(s)}}function Sl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Y(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):A(o)?i(o):t(o)}}const Cl={name:"codeText",previous:Nl,resolve:El,tokenize:vl};function El(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function Nl(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vl(e,n,t){let r=0,i,l;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(l=e.enter("codeTextSequence"),i=0,u(h)):A(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),s(h))}function s(h){return h===null||h===32||h===96||A(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),s)}function u(h){return h===96?(e.consume(h),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(h)):(l.type="codeTextData",s(h))}}class Il{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Me(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Me(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Me(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Me(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Me(this.left,t.reverse())}}}function Me(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function er(e){const n={};let t=-1,r,i,l,o,a,c,s;const u=new Il(e);for(;++t<u.length;){for(;t in n;)t=n[t];if(r=u.get(t),t&&r[1].type==="chunkFlow"&&u.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,jl(u,t)),t=n[t],s=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=u.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,t),a.unshift(r),u.splice(i,t-i+1,a))}}return pe(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}function jl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,c=[],s={};let u,h,m=-1,p=t,y=0,C=0;const E=[C];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),h&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(C=m+1,E.push(C),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),m=E.length;m--;){const k=a.slice(E[m],E[m+1]),I=l.pop();c.push([I,I+k.length-1]),e.splice(I,2,k)}for(c.reverse(),m=-1;++m<c.length;)s[y+c[m][0]]=y+c[m][1],y+=c[m][1]-c[m][0]-1;return s}const Tl={resolve:Al,tokenize:zl},Pl={partial:!0,tokenize:Ll};function Al(e){return er(e),e}function zl(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):A(a)?e.check(Pl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Ll(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Y(e,l,"linePrefix")}function l(o){if(o===null||A(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function nr(e,n,t,r,i,l,o,a,c){const s=c||Number.POSITIVE_INFINITY;let u=0;return h;function h(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),m):k===null||k===32||k===41||kn(k)?t(k):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),C(k))}function m(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(a),m(k)):k===null||k===60||A(k)?t(k):(e.consume(k),k===92?y:p)}function y(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function C(k){return!u&&(k===null||k===41||Z(k))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(k)):u<s&&k===40?(e.consume(k),u++,C):k===41?(e.consume(k),u--,C):k===null||k===32||k===40||kn(k)?t(k):(e.consume(k),k===92?E:C)}function E(k){return k===40||k===41||k===92?(e.consume(k),C):C(k)}}function tr(e,n,t,r,i,l){const o=this;let a=0,c;return s;function s(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),u}function u(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):A(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||A(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),c||(c=!F(p)),p===92?m:h)}function m(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}function rr(e,n,t,r,i,l){let o;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,c):t(m)}function c(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),n):(e.enter(l),s(m))}function s(m){return m===o?(e.exit(l),c(o)):m===null?t(m):A(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Y(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===o||m===null||A(m)?(e.exit("chunkString"),s(m)):(e.consume(m),m===92?h:u)}function h(m){return m===o||m===92?(e.consume(m),u):u(m)}}function Be(e,n){let t;return r;function r(i){return A(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):F(i)?Y(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Dl={name:"definition",tokenize:Rl},_l={partial:!0,tokenize:Ml};function Rl(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return tr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return Z(p)?Be(e,s)(p):s(p)}function s(p){return nr(e,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(_l,h,h)(p)}function h(p){return F(p)?Y(e,m,"whitespace")(p):m(p)}function m(p){return p===null||A(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Ml(e,n,t){return r;function r(a){return Z(a)?Be(e,i)(a):t(a)}function i(a){return rr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return F(a)?Y(e,o,"whitespace")(a):o(a)}function o(a){return a===null||A(a)?n(a):t(a)}}const Fl={name:"hardBreakEscape",tokenize:Ol};function Ol(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return A(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Bl={name:"headingAtx",resolve:Hl,tokenize:Ul};function Hl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pe(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ul(e,n,t){let r=0;return i;function i(u){return e.enter("atxHeading"),l(u)}function l(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Z(u)?(e.exit("atxHeadingSequence"),a(u)):t(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||A(u)?(e.exit("atxHeading"),n(u)):F(u)?Y(e,a,"whitespace")(u):(e.enter("atxHeadingText"),s(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),a(u))}function s(u){return u===null||u===35||Z(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),s)}}const Vl=["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"],ft=["pre","script","style","textarea"],ql={concrete:!0,name:"htmlFlow",resolveTo:Wl,tokenize:Xl},$l={partial:!0,tokenize:Gl},Yl={partial:!0,tokenize:Ql};function Wl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Xl(e,n,t){const r=this;let i,l,o,a,c;return s;function s(d){return u(d)}function u(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),h}function h(d){return d===33?(e.consume(d),m):d===47?(e.consume(d),l=!0,C):d===63?(e.consume(d),i=3,r.interrupt?n:f):he(d)?(e.consume(d),o=String.fromCharCode(d),E):t(d)}function m(d){return d===45?(e.consume(d),i=2,p):d===91?(e.consume(d),i=5,a=0,y):he(d)?(e.consume(d),i=4,r.interrupt?n:f):t(d)}function p(d){return d===45?(e.consume(d),r.interrupt?n:f):t(d)}function y(d){const se="CDATA[";return d===se.charCodeAt(a++)?(e.consume(d),a===se.length?r.interrupt?n:j:y):t(d)}function C(d){return he(d)?(e.consume(d),o=String.fromCharCode(d),E):t(d)}function E(d){if(d===null||d===47||d===62||Z(d)){const se=d===47,ke=o.toLowerCase();return!se&&!l&&ft.includes(ke)?(i=1,r.interrupt?n(d):j(d)):Vl.includes(o.toLowerCase())?(i=6,se?(e.consume(d),k):r.interrupt?n(d):j(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):l?I(d):S(d))}return d===45||ie(d)?(e.consume(d),o+=String.fromCharCode(d),E):t(d)}function k(d){return d===62?(e.consume(d),r.interrupt?n:j):t(d)}function I(d){return F(d)?(e.consume(d),I):B(d)}function S(d){return d===47?(e.consume(d),B):d===58||d===95||he(d)?(e.consume(d),D):F(d)?(e.consume(d),S):B(d)}function D(d){return d===45||d===46||d===58||d===95||ie(d)?(e.consume(d),D):z(d)}function z(d){return d===61?(e.consume(d),b):F(d)?(e.consume(d),z):S(d)}function b(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),c=d,M):F(d)?(e.consume(d),b):V(d)}function M(d){return d===c?(e.consume(d),c=null,O):d===null||A(d)?t(d):(e.consume(d),M)}function V(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Z(d)?z(d):(e.consume(d),V)}function O(d){return d===47||d===62||F(d)?S(d):t(d)}function B(d){return d===62?(e.consume(d),T):t(d)}function T(d){return d===null||A(d)?j(d):F(d)?(e.consume(d),T):t(d)}function j(d){return d===45&&i===2?(e.consume(d),H):d===60&&i===1?(e.consume(d),X):d===62&&i===4?(e.consume(d),ae):d===63&&i===3?(e.consume(d),f):d===93&&i===5?(e.consume(d),fe):A(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check($l,de,q)(d)):d===null||A(d)?(e.exit("htmlFlowData"),q(d)):(e.consume(d),j)}function q(d){return e.check(Yl,P,de)(d)}function P(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),v}function v(d){return d===null||A(d)?q(d):(e.enter("htmlFlowData"),j(d))}function H(d){return d===45?(e.consume(d),f):j(d)}function X(d){return d===47?(e.consume(d),o="",oe):j(d)}function oe(d){if(d===62){const se=o.toLowerCase();return ft.includes(se)?(e.consume(d),ae):j(d)}return he(d)&&o.length<8?(e.consume(d),o+=String.fromCharCode(d),oe):j(d)}function fe(d){return d===93?(e.consume(d),f):j(d)}function f(d){return d===62?(e.consume(d),ae):d===45&&i===2?(e.consume(d),f):j(d)}function ae(d){return d===null||A(d)?(e.exit("htmlFlowData"),de(d)):(e.consume(d),ae)}function de(d){return e.exit("htmlFlow"),n(d)}}function Ql(e,n,t){const r=this;return i;function i(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Gl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Je,n,t)}}const Kl={name:"htmlText",tokenize:Jl};function Jl(e,n,t){const r=this;let i,l,o;return a;function a(f){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(f),c}function c(f){return f===33?(e.consume(f),s):f===47?(e.consume(f),z):f===63?(e.consume(f),S):he(f)?(e.consume(f),V):t(f)}function s(f){return f===45?(e.consume(f),u):f===91?(e.consume(f),l=0,y):he(f)?(e.consume(f),I):t(f)}function u(f){return f===45?(e.consume(f),p):t(f)}function h(f){return f===null?t(f):f===45?(e.consume(f),m):A(f)?(o=h,X(f)):(e.consume(f),h)}function m(f){return f===45?(e.consume(f),p):h(f)}function p(f){return f===62?H(f):f===45?m(f):h(f)}function y(f){const ae="CDATA[";return f===ae.charCodeAt(l++)?(e.consume(f),l===ae.length?C:y):t(f)}function C(f){return f===null?t(f):f===93?(e.consume(f),E):A(f)?(o=C,X(f)):(e.consume(f),C)}function E(f){return f===93?(e.consume(f),k):C(f)}function k(f){return f===62?H(f):f===93?(e.consume(f),k):C(f)}function I(f){return f===null||f===62?H(f):A(f)?(o=I,X(f)):(e.consume(f),I)}function S(f){return f===null?t(f):f===63?(e.consume(f),D):A(f)?(o=S,X(f)):(e.consume(f),S)}function D(f){return f===62?H(f):S(f)}function z(f){return he(f)?(e.consume(f),b):t(f)}function b(f){return f===45||ie(f)?(e.consume(f),b):M(f)}function M(f){return A(f)?(o=M,X(f)):F(f)?(e.consume(f),M):H(f)}function V(f){return f===45||ie(f)?(e.consume(f),V):f===47||f===62||Z(f)?O(f):t(f)}function O(f){return f===47?(e.consume(f),H):f===58||f===95||he(f)?(e.consume(f),B):A(f)?(o=O,X(f)):F(f)?(e.consume(f),O):H(f)}function B(f){return f===45||f===46||f===58||f===95||ie(f)?(e.consume(f),B):T(f)}function T(f){return f===61?(e.consume(f),j):A(f)?(o=T,X(f)):F(f)?(e.consume(f),T):O(f)}function j(f){return f===null||f===60||f===61||f===62||f===96?t(f):f===34||f===39?(e.consume(f),i=f,q):A(f)?(o=j,X(f)):F(f)?(e.consume(f),j):(e.consume(f),P)}function q(f){return f===i?(e.consume(f),i=void 0,v):f===null?t(f):A(f)?(o=q,X(f)):(e.consume(f),q)}function P(f){return f===null||f===34||f===39||f===60||f===61||f===96?t(f):f===47||f===62||Z(f)?O(f):(e.consume(f),P)}function v(f){return f===47||f===62||Z(f)?O(f):t(f)}function H(f){return f===62?(e.consume(f),e.exit("htmlTextData"),e.exit("htmlText"),n):t(f)}function X(f){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),oe}function oe(f){return F(f)?Y(e,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):fe(f)}function fe(f){return e.enter("htmlTextData"),o(f)}}const Rn={name:"labelEnd",resolveAll:to,resolveTo:ro,tokenize:io},Zl={tokenize:lo},eo={tokenize:oo},no={tokenize:ao};function to(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&pe(e,0,e.length,t),e}function ro(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,n],["enter",s,n]],a=le(a,e.slice(l+1,l+r+3)),a=le(a,[["enter",u,n]]),a=le(a,_n(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=le(a,[["exit",u,n],e[o-2],e[o-1],["exit",s,n]]),a=le(a,e.slice(o+1)),a=le(a,[["exit",c,n]]),pe(e,l,e.length,a),e}function io(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(m){return l?l._inactive?h(m):(o=r.parser.defined.includes(Te(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):t(m)}function c(m){return m===40?e.attempt(Zl,u,o?u:h)(m):m===91?e.attempt(eo,u,o?s:h)(m):o?u(m):h(m)}function s(m){return e.attempt(no,u,h)(m)}function u(m){return n(m)}function h(m){return l._balanced=!0,t(m)}}function lo(e,n,t){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)?Be(e,l)(h):l(h)}function l(h){return h===41?u(h):nr(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return Z(h)?Be(e,c)(h):u(h)}function a(h){return t(h)}function c(h){return h===34||h===39||h===40?rr(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):u(h)}function s(h){return Z(h)?Be(e,u)(h):u(h)}function u(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function oo(e,n,t){const r=this;return i;function i(a){return tr.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function ao(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const so={name:"labelStartImage",resolveAll:Rn.resolveAll,tokenize:uo};function uo(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const co={name:"labelStartLink",resolveAll:Rn.resolveAll,tokenize:ho};function ho(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const on={name:"lineEnding",tokenize:po};function po(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Y(e,n,"linePrefix")}}const Qe={name:"thematicBreak",tokenize:fo};function fo(e,n,t){let r=0,i;return l;function l(s){return e.enter("thematicBreak"),o(s)}function o(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),c(s)):r>=3&&(s===null||A(s))?(e.exit("thematicBreak"),n(s)):t(s)}function c(s){return s===i?(e.consume(s),r++,c):(e.exit("thematicBreakSequence"),F(s)?Y(e,a,"whitespace")(s):a(s))}}const J={continuation:{tokenize:yo},exit:ko,name:"list",tokenize:xo},mo={partial:!0,tokenize:wo},go={partial:!0,tokenize:bo};function xo(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:wn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Qe,t,s)(p):s(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return wn(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),s(p)):t(p)}function s(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Je,r.interrupt?t:u,e.attempt(mo,m,h))}function u(p){return r.containerState.initialBlankLine=!0,l++,m(p)}function h(p){return F(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):t(p)}function m(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function yo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Je,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!F(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(go,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(J,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function bo(e,n,t){const r=this;return Y(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function ko(e){e.exit(this.containerState.type)}function wo(e,n,t){const r=this;return Y(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!F(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const dt={name:"setextUnderline",resolveTo:So,tokenize:Co};function So(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Co(e,n,t){const r=this;let i;return l;function l(s){let u=r.events.length,h;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){h=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=s,o(s)):t(s)}function o(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),F(s)?Y(e,c,"lineSuffix")(s):c(s))}function c(s){return s===null||A(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const Eo={tokenize:No};function No(e){const n=this,t=e.attempt(Je,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Tl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const vo={resolveAll:lr()},Io=ir("string"),jo=ir("text");function ir(e){return{resolveAll:lr(e==="text"?To:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(u){return s(u)?l(u):a(u)}function a(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),c}function c(u){return s(u)?(t.exit("data"),l(u)):(t.consume(u),c)}function s(u){if(u===null)return!0;const h=i[u];let m=-1;if(h)for(;++m<h.length;){const p=h[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function lr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function To(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,c;for(;l--;){const s=i[l];if(typeof s=="string"){for(o=s.length;s.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(s===-2)c=!0,a++;else if(s!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const s={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(t,0,["enter",s,n],["exit",s,n]),t+=2)}t++}return e}const Po={42:J,43:J,45:J,48:J,49:J,50:J,51:J,52:J,53:J,54:J,55:J,56:J,57:J,62:Kt},Ao={91:Dl},zo={[-2]:ln,[-1]:ln,32:ln},Lo={35:Bl,42:Qe,45:[dt,Qe],60:ql,61:dt,95:Qe,96:pt,126:pt},Do={38:Zt,92:Jt},_o={[-5]:on,[-4]:on,[-3]:on,33:so,38:Zt,42:Sn,60:[cl,Kl],91:co,92:[Fl,Jt],93:Rn,95:Sn,96:Cl},Ro={null:[Sn,vo]},Mo={null:[42,95]},Fo={null:[]},Oo=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Mo,contentInitial:Ao,disable:Fo,document:Po,flow:Lo,flowInitial:zo,insideSpan:Ro,string:Do,text:_o},Symbol.toStringTag,{value:"Module"}));function Bo(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const c={attempt:M(z),check:M(b),consume:I,enter:S,exit:D,interrupt:M(b,{interrupt:!0})},s={code:null,containerState:{},defineSkip:C,events:[],now:y,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:h};let u=n.tokenize.call(s,c);return n.resolveAll&&l.push(n),s;function h(T){return o=le(o,T),E(),o[o.length-1]!==null?[]:(V(n,0),s.events=_n(l,s.events,s),s.events)}function m(T,j){return Uo(p(T),j)}function p(T){return Ho(o,T)}function y(){const{_bufferIndex:T,_index:j,line:q,column:P,offset:v}=r;return{_bufferIndex:T,_index:j,line:q,column:P,offset:v}}function C(T){i[T.line]=T.column,B()}function E(){let T;for(;r._index<o.length;){const j=o[r._index];if(typeof j=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<j.length;)k(j.charCodeAt(r._bufferIndex));else k(j)}}function k(T){u=u(T)}function I(T){A(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,B()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function S(T,j){const q=j||{};return q.type=T,q.start=y(),s.events.push(["enter",q,s]),a.push(q),q}function D(T){const j=a.pop();return j.end=y(),s.events.push(["exit",j,s]),j}function z(T,j){V(T,j.from)}function b(T,j){j.restore()}function M(T,j){return q;function q(P,v,H){let X,oe,fe,f;return Array.isArray(P)?de(P):"tokenize"in P?de([P]):ae(P);function ae(G){return ze;function ze(xe){const Ce=xe!==null&&G[xe],Ee=xe!==null&&G.null,$e=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return de($e)(xe)}}function de(G){return X=G,oe=0,G.length===0?H:d(G[oe])}function d(G){return ze;function ze(xe){return f=O(),fe=G,G.partial||(s.currentConstruct=G),G.name&&s.parser.constructs.disable.null.includes(G.name)?ke():G.tokenize.call(j?Object.assign(Object.create(s),j):s,c,se,ke)(xe)}}function se(G){return T(fe,f),v}function ke(G){return f.restore(),++oe<X.length?d(X[oe]):H}}}function V(T,j){T.resolveAll&&!l.includes(T)&&l.push(T),T.resolve&&pe(s.events,j,s.events.length-j,T.resolve(s.events.slice(j),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function O(){const T=y(),j=s.previous,q=s.currentConstruct,P=s.events.length,v=Array.from(a);return{from:P,restore:H};function H(){r=T,s.previous=j,s.currentConstruct=q,s.events.length=P,a=v,B()}}function B(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ho(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Uo(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
73
+ `;break}case-3:{o=`\r
74
+ `;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Vo(e){const r={constructs:Qi([Oo,...(e||{}).extensions||[]]),content:i(rl),defined:[],document:i(ll),flow:i(Eo),lazy:{},string:i(Io),text:i(jo)};return r;function i(l){return o;function o(a){return Bo(r,l,a)}}}function qo(e){for(;!er(e););return e}const mt=/[\0\t\n\r]/g;function $o(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const c=[];let s,u,h,m,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),h=0,n="",t&&(l.charCodeAt(0)===65279&&h++,t=void 0);h<l.length;){if(mt.lastIndex=h,s=mt.exec(l),m=s&&s.index!==void 0?s.index:l.length,p=l.charCodeAt(m),!s){n=l.slice(h);break}if(p===10&&h===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<m&&(c.push(l.slice(h,m)),e+=m-h),p){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=m+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const Yo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wo(e){return e.replace(Yo,Xo)}function Xo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Gt(t.slice(l?2:1),l?16:10)}return Dn(t)||e}const or={}.hasOwnProperty;function Qo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Go(t)(qo(Vo(t).document().write($o()(e,n,!0))))}function Go(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l($n),autolinkProtocol:O,autolinkEmail:O,atxHeading:l(Un),blockQuote:l(Ee),characterEscape:O,characterReference:O,codeFenced:l($e),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l($e,o),codeText:l(yr,o),codeTextData:O,data:O,codeFlowValue:O,definition:l(br),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(kr),hardBreakEscape:l(Vn),hardBreakTrailing:l(Vn),htmlFlow:l(qn,o),htmlFlowData:O,htmlText:l(qn,o),htmlTextData:O,image:l(wr),label:o,link:l($n),listItem:l(Sr),listItemValue:m,listOrdered:l(Yn,h),listUnordered:l(Yn),paragraph:l(Cr),reference:d,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Un),strong:l(Er),thematicBreak:l(vr)},exit:{atxHeading:c(),atxHeadingSequence:z,autolink:c(),autolinkEmail:Ce,autolinkProtocol:xe,blockQuote:c(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:G,characterReference:ze,codeFenced:c(E),codeFencedFence:C,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:B,codeIndented:c(k),codeText:c(v),codeTextData:B,data:B,definition:c(),definitionDestinationString:D,definitionLabelString:I,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(q),htmlFlowData:B,htmlText:c(P),htmlTextData:B,image:c(X),label:fe,labelText:oe,lineEnding:T,link:c(H),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:se,resourceDestinationString:f,resourceTitleString:ae,resource:de,setextHeading:c(V),setextHeadingLineSequence:M,setextHeadingText:b,strong:c(),thematicBreak:c()}};ar(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(x){let N={type:"root",children:[]};const L={stack:[N],tokenStack:[],config:n,enter:a,exit:s,buffer:o,resume:u,data:t},R=[];let U=-1;for(;++U<x.length;)if(x[U][1].type==="listOrdered"||x[U][1].type==="listUnordered")if(x[U][0]==="enter")R.push(U);else{const ue=R.pop();U=i(x,ue,U)}for(U=-1;++U<x.length;){const ue=n[x[U][0]];or.call(ue,x[U][1].type)&&ue[x[U][1].type].call(Object.assign({sliceSerialize:x[U][2].sliceSerialize},L),x[U][1])}if(L.tokenStack.length>0){const ue=L.tokenStack[L.tokenStack.length-1];(ue[1]||gt).call(L,void 0,ue[0])}for(N.position={start:ye(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:ye(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<n.transforms.length;)N=n.transforms[U](N)||N;return N}function i(x,N,L){let R=N-1,U=-1,ue=!1,we,me,Le,De;for(;++R<=L;){const te=x[R];switch(te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{te[0]==="enter"?U++:U--,De=void 0;break}case"lineEndingBlank":{te[0]==="enter"&&(we&&!De&&!U&&!Le&&(Le=R),De=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:De=void 0}if(!U&&te[0]==="enter"&&te[1].type==="listItemPrefix"||U===-1&&te[0]==="exit"&&(te[1].type==="listUnordered"||te[1].type==="listOrdered")){if(we){let Ne=R;for(me=void 0;Ne--;){const ge=x[Ne];if(ge[1].type==="lineEnding"||ge[1].type==="lineEndingBlank"){if(ge[0]==="exit")continue;me&&(x[me][1].type="lineEndingBlank",ue=!0),ge[1].type="lineEnding",me=Ne}else if(!(ge[1].type==="linePrefix"||ge[1].type==="blockQuotePrefix"||ge[1].type==="blockQuotePrefixWhitespace"||ge[1].type==="blockQuoteMarker"||ge[1].type==="listItemIndent"))break}Le&&(!me||Le<me)&&(we._spread=!0),we.end=Object.assign({},me?x[me][1].start:te[1].end),x.splice(me||R,0,["exit",we,te[2]]),R++,L++}if(te[1].type==="listItemPrefix"){const Ne={type:"listItem",_spread:!1,start:Object.assign({},te[1].start),end:void 0};we=Ne,x.splice(R,0,["enter",Ne,te[2]]),R++,L++,Le=void 0,De=!0}}}return x[N][1]._spread=ue,L}function l(x,N){return L;function L(R){a.call(this,x(R),R),N&&N.call(this,R)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(x,N,L){this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([N,L||void 0]),x.position={start:ye(N.start),end:void 0}}function c(x){return N;function N(L){x&&x.call(this,L),s.call(this,L)}}function s(x,N){const L=this.stack.pop(),R=this.tokenStack.pop();if(R)R[0].type!==x.type&&(N?N.call(this,x,R[0]):(R[1]||gt).call(this,x,R[0]));else throw new Error("Cannot close `"+x.type+"` ("+Oe({start:x.start,end:x.end})+"): it’s not open");L.position.end=ye(x.end)}function u(){return Wi(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(x){if(this.data.expectingFirstListItemValue){const N=this.stack[this.stack.length-2];N.start=Number.parseInt(this.sliceSerialize(x),10),this.data.expectingFirstListItemValue=void 0}}function p(){const x=this.resume(),N=this.stack[this.stack.length-1];N.lang=x}function y(){const x=this.resume(),N=this.stack[this.stack.length-1];N.meta=x}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const x=this.resume(),N=this.stack[this.stack.length-1];N.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const x=this.resume(),N=this.stack[this.stack.length-1];N.value=x.replace(/(\r?\n|\r)$/g,"")}function I(x){const N=this.resume(),L=this.stack[this.stack.length-1];L.label=N,L.identifier=Te(this.sliceSerialize(x)).toLowerCase()}function S(){const x=this.resume(),N=this.stack[this.stack.length-1];N.title=x}function D(){const x=this.resume(),N=this.stack[this.stack.length-1];N.url=x}function z(x){const N=this.stack[this.stack.length-1];if(!N.depth){const L=this.sliceSerialize(x).length;N.depth=L}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function M(x){const N=this.stack[this.stack.length-1];N.depth=this.sliceSerialize(x).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function O(x){const L=this.stack[this.stack.length-1].children;let R=L[L.length-1];(!R||R.type!=="text")&&(R=Nr(),R.position={start:ye(x.start),end:void 0},L.push(R)),this.stack.push(R)}function B(x){const N=this.stack.pop();N.value+=this.sliceSerialize(x),N.position.end=ye(x.end)}function T(x){const N=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=N.children[N.children.length-1];L.position.end=ye(x.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(N.type)&&(O.call(this,x),B.call(this,x))}function j(){this.data.atHardBreak=!0}function q(){const x=this.resume(),N=this.stack[this.stack.length-1];N.value=x}function P(){const x=this.resume(),N=this.stack[this.stack.length-1];N.value=x}function v(){const x=this.resume(),N=this.stack[this.stack.length-1];N.value=x}function H(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const N=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=N,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function X(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const N=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=N,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function oe(x){const N=this.sliceSerialize(x),L=this.stack[this.stack.length-2];L.label=Wo(N),L.identifier=Te(N).toLowerCase()}function fe(){const x=this.stack[this.stack.length-1],N=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const R=x.children;L.children=R}else L.alt=N}function f(){const x=this.resume(),N=this.stack[this.stack.length-1];N.url=x}function ae(){const x=this.resume(),N=this.stack[this.stack.length-1];N.title=x}function de(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function se(x){const N=this.resume(),L=this.stack[this.stack.length-1];L.label=N,L.identifier=Te(this.sliceSerialize(x)).toLowerCase(),this.data.referenceType="full"}function ke(x){this.data.characterReferenceType=x.type}function G(x){const N=this.sliceSerialize(x),L=this.data.characterReferenceType;let R;L?(R=Gt(N,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):R=Dn(N);const U=this.stack[this.stack.length-1];U.value+=R}function ze(x){const N=this.stack.pop();N.position.end=ye(x.end)}function xe(x){B.call(this,x);const N=this.stack[this.stack.length-1];N.url=this.sliceSerialize(x)}function Ce(x){B.call(this,x);const N=this.stack[this.stack.length-1];N.url="mailto:"+this.sliceSerialize(x)}function Ee(){return{type:"blockquote",children:[]}}function $e(){return{type:"code",lang:null,meta:null,value:""}}function yr(){return{type:"inlineCode",value:""}}function br(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kr(){return{type:"emphasis",children:[]}}function Un(){return{type:"heading",depth:0,children:[]}}function Vn(){return{type:"break"}}function qn(){return{type:"html",value:""}}function wr(){return{type:"image",title:null,url:"",alt:null}}function $n(){return{type:"link",title:null,url:"",children:[]}}function Yn(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function Sr(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function Cr(){return{type:"paragraph",children:[]}}function Er(){return{type:"strong",children:[]}}function Nr(){return{type:"text",value:""}}function vr(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function ar(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ar(e,r):Ko(e,r)}}function Ko(e,n){let t;for(t in n)if(or.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function gt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Oe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Oe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Oe({start:n.start,end:n.end})+") is still open")}function Jo(e){const n=this;n.parser=t;function t(r){return Qo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Zo(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function ea(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
75
+ `}]}function na(e,n){const t=n.value?n.value+`
76
+ `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function ta(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ra(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ia(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ae(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const s={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,s),e.applyData(n,s)}function la(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function oa(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function sr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function aa(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return sr(e,n);const i={src:Ae(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function sa(e,n){const t={src:Ae(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function ua(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function ca(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return sr(e,n);const i={href:Ae(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function ha(e,n){const t={href:Ae(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function pa(e,n,t){const r=e.all(n),i=t?fa(t):ur(n),l={},o=[];if(typeof n.checked=="boolean"){const u=r[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(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:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
77
+ `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
78
+ `});const s={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,s),e.applyData(n,s)}function fa(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=ur(t[r])}return n}function ur(e){const n=e.spread;return n??e.children.length>1}function da(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function ma(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ga(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function xa(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ya(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Pn(n.children[1]),c=Vt(n.children[n.children.length-1]);a&&c&&(o.position={start:a,end:c}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function ba(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let c=-1;const s=[];for(;++c<a;){const h=n.children[c],m={},p=o?o[c]:void 0;p&&(m.align=p);let y={type:"element",tagName:l,properties:m,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),s.push(y)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(n,u),e.applyData(n,u)}function ka(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const xt=9,yt=32;function wa(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(bt(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(bt(n.slice(i),i>0,!1)),l.join("")}function bt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===xt||l===yt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===xt||l===yt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Sa(e,n){const t={type:"text",value:wa(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Ca(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Ea={blockquote:Zo,break:ea,code:na,delete:ta,emphasis:ra,footnoteReference:ia,heading:la,html:oa,imageReference:aa,image:sa,inlineCode:ua,linkReference:ca,link:ha,listItem:pa,list:da,paragraph:ma,root:ga,strong:xa,table:ya,tableCell:ka,tableRow:ba,text:Sa,thematicBreak:Ca,toml:Ye,yaml:Ye,definition:Ye,footnoteDefinition:Ye};function Ye(){}const cr=-1,Ze=0,He=1,Ge=2,Mn=3,Fn=4,On=5,Bn=6,hr=7,pr=8,kt=typeof self=="object"?self:globalThis,Na=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case Ze:case cr:return t(o,i);case He:{const a=t([],i);for(const c of o)a.push(r(c));return a}case Ge:{const a=t({},i);for(const[c,s]of o)a[r(c)]=r(s);return a}case Mn:return t(new Date(o),i);case Fn:{const{source:a,flags:c}=o;return t(new RegExp(a,c),i)}case On:{const a=t(new Map,i);for(const[c,s]of o)a.set(r(c),r(s));return a}case Bn:{const a=t(new Set,i);for(const c of o)a.add(r(c));return a}case hr:{const{name:a,message:c}=o;return t(new kt[a](c),i)}case pr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new kt[l](o),i)};return r},wt=e=>Na(new Map,e)(0),Ie="",{toString:va}={},{keys:Ia}=Object,Fe=e=>{const n=typeof e;if(n!=="object"||!e)return[Ze,n];const t=va.call(e).slice(8,-1);switch(t){case"Array":return[He,Ie];case"Object":return[Ge,Ie];case"Date":return[Mn,Ie];case"RegExp":return[Fn,Ie];case"Map":return[On,Ie];case"Set":return[Bn,Ie];case"DataView":return[He,t]}return t.includes("Array")?[He,t]:t.includes("Error")?[hr,t]:[Ge,t]},We=([e,n])=>e===Ze&&(n==="function"||n==="symbol"),ja=(e,n,t,r)=>{const i=(o,a)=>{const c=r.push(o)-1;return t.set(a,c),c},l=o=>{if(t.has(o))return t.get(o);let[a,c]=Fe(o);switch(a){case Ze:{let u=o;switch(c){case"bigint":a=pr,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return i([cr],o)}return i([a,u],o)}case He:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const u=[],h=i([a,u],o);for(const m of o)u.push(l(m));return h}case Ge:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const u=[],h=i([a,u],o);for(const m of Ia(o))(e||!We(Fe(o[m])))&&u.push([l(m),l(o[m])]);return h}case Mn:return i([a,o.toISOString()],o);case Fn:{const{source:u,flags:h}=o;return i([a,{source:u,flags:h}],o)}case On:{const u=[],h=i([a,u],o);for(const[m,p]of o)(e||!(We(Fe(m))||We(Fe(p))))&&u.push([l(m),l(p)]);return h}case Bn:{const u=[],h=i([a,u],o);for(const m of o)(e||!We(Fe(m)))&&u.push(l(m));return h}}const{message:s}=o;return i([a,{name:c,message:s}],o)};return l},St=(e,{json:n,lossy:t}={})=>{const r=[];return ja(!(n||t),!!n,new Map,r)(e),r},Ke=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?wt(St(e,n)):structuredClone(e):(e,n)=>wt(St(e,n));function Ta(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Pa(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Aa(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Ta,r=e.options.footnoteBackLabel||Pa,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[c]);if(!s)continue;const u=e.all(s),h=String(s.identifier).toUpperCase(),m=Ae(h.toLowerCase());let p=0;const y=[],C=e.footnoteCounts.get(h);for(;C!==void 0&&++p<=C;){y.length>0&&y.push({type:"text",value:" "});let I=typeof t=="string"?t:t(c,p);typeof I=="string"&&(I={type:"text",value:I}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const E=u[u.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const I=E.children[E.children.length-1];I&&I.type==="text"?I.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...y)}else u.push(...y);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(u,!0)};e.patch(s,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ke(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
79
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
80
+ `}]}}const fr=(function(e){if(e==null)return _a;if(typeof e=="function")return en(e);if(typeof e=="object")return Array.isArray(e)?za(e):La(e);if(typeof e=="string")return Da(e);throw new Error("Expected function, string, or object as test")});function za(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=fr(e[t]);return en(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function La(e){const n=e;return en(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function Da(e){return en(n);function n(t){return t&&t.type===e}}function en(e){return n;function n(t,r,i){return!!(Ra(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function _a(){return!0}function Ra(e){return e!==null&&typeof e=="object"&&"type"in e}const dr=[],Ma=!0,Ct=!1,Fa="skip";function Oa(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=fr(i),o=r?-1:1;a(e,void 0,[])();function a(c,s,u){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=dr,y,C,E;if((!n||l(c,s,u[u.length-1]||void 0))&&(p=Ba(t(c,u)),p[0]===Ct))return p;if("children"in c&&c.children){const k=c;if(k.children&&p[0]!==Fa)for(C=(r?k.children.length:-1)+o,E=u.concat(k);C>-1&&C<k.children.length;){const I=k.children[C];if(y=a(I,C,E)(),y[0]===Ct)return y;C=typeof y[1]=="number"?y[1]:C+o}}return p}}}function Ba(e){return Array.isArray(e)?e:typeof e=="number"?[Ma,e]:e==null?dr:[e]}function mr(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),Oa(e,l,a,i);function a(c,s){const u=s[s.length-1],h=u?u.children.indexOf(c):void 0;return o(c,h,u)}}const Cn={}.hasOwnProperty,Ha={};function Ua(e,n){const t=n||Ha,r=new Map,i=new Map,l=new Map,o={...Ea,...t.handlers},a={all:s,applyData:qa,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:c,options:t,patch:Va,wrap:Ya};return mr(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const h=u.type==="definition"?r:i,m=String(u.identifier).toUpperCase();h.has(m)||h.set(m,u)}}),a;function c(u,h){const m=u.type,p=a.handlers[m];if(Cn.call(a.handlers,m)&&p)return p(a,u,h);if(a.options.passThrough&&a.options.passThrough.includes(m)){if("children"in u){const{children:C,...E}=u,k=Ke(E);return k.children=a.all(u),k}return Ke(u)}return(a.options.unknownHandler||$a)(a,u,h)}function s(u){const h=[];if("children"in u){const m=u.children;let p=-1;for(;++p<m.length;){const y=a.one(m[p],u);if(y){if(p&&m[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Et(y.value)),!Array.isArray(y)&&y.type==="element")){const C=y.children[0];C&&C.type==="text"&&(C.value=Et(C.value))}Array.isArray(y)?h.push(...y):h.push(y)}}}return h}}function Va(e,n){e.position&&(n.position=Ni(e))}function qa(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&l&&Object.assign(t.properties,Ke(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function $a(e,n){const t=n.data||{},r="value"in n&&!(Cn.call(t,"hProperties")||Cn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Ya(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
81
+ `});++r<e.length;)r&&t.push({type:"text",value:`
82
+ `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
83
+ `}),t}function Et(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Nt(e,n){const t=Ua(e,n),r=t.one(e,void 0),i=Aa(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
84
+ `},i),l}function Wa(e,n){return e&&"run"in e?async function(t,r){const i=Nt(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Nt(t,{file:r,...e||n})}}function vt(e){if(e)throw e}var an,It;function Xa(){if(It)return an;It=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},l=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var u=e.call(s,"constructor"),h=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!u&&!h)return!1;var m;for(m in s);return typeof m>"u"||e.call(s,m)},o=function(s,u){t&&u.name==="__proto__"?t(s,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):s[u.name]=u.newValue},a=function(s,u){if(u==="__proto__")if(e.call(s,u)){if(r)return r(s,u).value}else return;return s[u]};return an=function c(){var s,u,h,m,p,y,C=arguments[0],E=1,k=arguments.length,I=!1;for(typeof C=="boolean"&&(I=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<k;++E)if(s=arguments[E],s!=null)for(u in s)h=a(C,u),m=a(s,u),C!==m&&(I&&m&&(l(m)||(p=i(m)))?(p?(p=!1,y=h&&i(h)?h:[]):y=h&&l(h)?h:{},o(C,{name:u,newValue:c(I,y,m)})):typeof m<"u"&&o(C,{name:u,newValue:m}));return C},an}var Qa=Xa();const sn=Dt(Qa);function En(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ga(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(c,...s){const u=e[++l];let h=-1;if(c){o(c);return}for(;++h<i.length;)(s[h]===null||s[h]===void 0)&&(s[h]=i[h]);i=s,u?Ka(u,a)(...s):o(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ka(e,n){let t;return r;function r(...o){const a=e.length>o.length;let c;a&&o.push(i);try{c=e.apply(this,o)}catch(s){const u=s;if(a&&t)throw u;return i(u)}a||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const ce={basename:Ja,dirname:Za,extname:es,join:ns,sep:"/"};function Ja(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');qe(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Za(e){if(qe(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function es(e){qe(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function ns(...e){let n=-1,t;for(;++n<e.length;)qe(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":ts(t)}function ts(e){qe(e);const n=e.codePointAt(0)===47;let t=rs(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function rs(e,n){let t="",r=0,i=-1,l=0,o=-1,a,c;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const is={cwd:ls};function ls(){return"/"}function Nn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function os(e){if(typeof e=="string")e=new URL(e);else if(!Nn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return as(e)}function as(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const un=["history","path","basename","stem","extname","dirname"];class gr{constructor(n){let t;n?Nn(n)?t={path:n}:typeof n=="string"||ss(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":is.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<un.length;){const l=un[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)un.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ce.basename(this.path):void 0}set basename(n){hn(n,"basename"),cn(n,"basename"),this.path=ce.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ce.dirname(this.path):void 0}set dirname(n){jt(this.basename,"dirname"),this.path=ce.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ce.extname(this.path):void 0}set extname(n){if(cn(n,"extname"),jt(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ce.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Nn(n)&&(n=os(n)),hn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ce.basename(this.path,this.extname):void 0}set stem(n){hn(n,"stem"),cn(n,"stem"),this.path=ce.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new K(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function cn(e,n){if(e&&e.includes(ce.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ce.sep+"`")}function hn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function jt(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function ss(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const us=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),cs={}.hasOwnProperty;class Hn extends us{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=Ga()}copy(){const n=new Hn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(sn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(dn("data",this.frozen),this.namespace[n]=t,this):cs.call(this.namespace,n)&&this.namespace[n]||void 0:n?(dn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Xe(n),r=this.parser||this.Parser;return pn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),pn("process",this.parser||this.Parser),fn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=Xe(n),c=r.parse(a);r.run(c,a,function(u,h,m){if(u||!h||!m)return s(u);const p=h,y=r.stringify(p,m);fs(y)?m.value=y:m.result=y,s(u,m)});function s(u,h){u||!h?o(u):l?l(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),pn("processSync",this.parser||this.Parser),fn("processSync",this.compiler||this.Compiler),this.process(n,i),Pt("processSync","process",t),r;function i(l,o){t=!0,vt(l),r=o}}run(n,t,r){Tt(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const c=Xe(t);i.run(n,c,s);function s(u,h,m){const p=h||n;u?a(u):o?o(p):r(void 0,p,m)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Pt("runSync","run",r),i;function l(o,a){vt(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=Xe(t),i=this.compiler||this.Compiler;return fn("stringify",i),Tt(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(dn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(s){if(typeof s=="function")c(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[u,...h]=s;c(u,h)}else o(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function o(s){if(!("plugins"in s)&&!("settings"in s))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");a(s.plugins),s.settings&&(i.settings=sn(!0,i.settings,s.settings))}function a(s){let u=-1;if(s!=null)if(Array.isArray(s))for(;++u<s.length;){const h=s[u];l(h)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function c(s,u){let h=-1,m=-1;for(;++h<r.length;)if(r[h][0]===s){m=h;break}if(m===-1)r.push([s,...u]);else if(u.length>0){let[p,...y]=u;const C=r[m][1];En(C)&&En(p)&&(p=sn(!0,C,p)),r[m]=[s,p,...y]}}}}const hs=new Hn().freeze();function pn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tt(e){if(!En(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Pt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Xe(e){return ps(e)?e:new gr(e)}function ps(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fs(e){return typeof e=="string"||ds(e)}function ds(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ms="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",At=[],zt={allowDangerousHtml:!0},gs=/^(https?|ircs?|mailto|xmpp)$/i,xs=[{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 ys(e){const n=bs(e),t=ks(e);return ws(n.runSync(n.parse(t),t),e)}function bs(e){const n=e.rehypePlugins||At,t=e.remarkPlugins||At,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zt}:zt;return hs().use(Jo).use(t).use(Wa,r).use(n)}function ks(e){const n=e.children||"",t=new gr;return typeof n=="string"&&(t.value=n),t}function ws(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||Ss;for(const u of xs)Object.hasOwn(n,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+ms+u.id,void 0);return mr(e,s),Pi(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function s(u,h,m){if(u.type==="raw"&&m&&typeof h=="number")return o?m.children.splice(h,1):m.children[h]={type:"text",value:u.value},h;if(u.type==="element"){let p;for(p in rn)if(Object.hasOwn(rn,p)&&Object.hasOwn(u.properties,p)){const y=u.properties[p],C=rn[p];(C===null||C.includes(u.tagName))&&(u.properties[p]=c(String(y||""),p,u))}}if(u.type==="element"){let p=t?!t.includes(u.tagName):l?l.includes(u.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(u,h,m)),p&&m&&typeof h=="number")return a&&u.children?m.children.splice(h,1,...u.children):m.children.splice(h,1),h}}}function Ss(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||gs.test(e.slice(0,n))?e:""}const As=()=>[{title:"CodeYam - Rules"},{name:"description",content:"Manage Claude Rules documentation"}],Cs={architecture:"bg-blue-100 text-blue-800",testing:"bg-green-100 text-green-800",faq:"bg-amber-100 text-amber-800"},xr={architecture:"Architecture",testing:"Testing",faq:"FAQ"};function Es({rule:e,onEdit:n,onDelete:t}){const[r,i]=Q.useState(!1),l=e.frontmatter.category||"faq",o=Q.useMemo(()=>{var c;const a=e.body.match(/^#+ (.+)$/m);return a?a[1]:(c=e.filePath.split("/").pop())==null?void 0:c.replace(".md","")},[e.body,e.filePath]);return g.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:[g.jsxs("div",{className:"p-4 cursor-pointer hover:bg-gray-50",onClick:()=>i(!r),children:[g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("button",{className:"mt-1 text-gray-400 cursor-pointer",children:r?g.jsx(vn,{className:"w-4 h-4"}):g.jsx(In,{className:"w-4 h-4"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-medium text-gray-900",children:o}),g.jsx("p",{className:"text-sm text-gray-500 mt-1 font-mono",children:e.filePath})]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${Cs[l]}`,children:xr[l]}),e.frontmatter.timestamp&&g.jsxs("span",{className:"text-xs text-gray-400 flex items-center gap-1",children:[g.jsx(_r,{className:"w-3 h-3"}),new Date(e.frontmatter.timestamp).toLocaleDateString()]})]})]}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&g.jsxs("div",{className:"mt-2 ml-7 flex flex-wrap gap-1",children:[e.frontmatter.paths.slice(0,3).map((a,c)=>g.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded text-xs font-mono",children:a},c)),e.frontmatter.paths.length>3&&g.jsxs("span",{className:"px-2 py-0.5 text-gray-400 text-xs",children:["+",e.frontmatter.paths.length-3," more"]})]})]}),r&&g.jsx("div",{className:"border-t border-gray-100",children:g.jsxs("div",{className:"p-4 bg-gray-50",children:[g.jsxs("div",{className:"flex justify-end gap-2 mb-3",children:[g.jsxs("button",{onClick:a=>{a.stopPropagation(),n(e)},className:"flex items-center gap-1 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded cursor-pointer",children:[g.jsx(_t,{className:"w-4 h-4"}),"Edit"]}),g.jsxs("button",{onClick:a=>{a.stopPropagation(),t(e)},className:"flex items-center gap-1 px-3 py-1.5 text-sm text-red-600 hover:text-red-700 hover:bg-red-50 rounded cursor-pointer",children:[g.jsx(Zr,{className:"w-4 h-4"}),"Delete"]})]}),g.jsx("div",{className:"bg-white p-4 rounded border border-gray-200 max-h-96 overflow-auto markdown-body",children:g.jsx(ys,{components:{h1:({children:a})=>g.jsx("h1",{className:"text-xl font-bold text-gray-900 mb-3 mt-4 first:mt-0",children:a}),h2:({children:a})=>g.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2 mt-4 first:mt-0",children:a}),h3:({children:a})=>g.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-2 mt-3",children:a}),p:({children:a})=>g.jsx("p",{className:"text-sm text-gray-700 mb-3",children:a}),ul:({children:a})=>g.jsx("ul",{className:"list-disc list-inside text-sm text-gray-700 mb-3 space-y-1",children:a}),ol:({children:a})=>g.jsx("ol",{className:"list-decimal list-inside text-sm text-gray-700 mb-3 space-y-1",children:a}),li:({children:a})=>g.jsx("li",{children:a}),code:({children:a,className:c})=>(c==null?void 0:c.includes("language-"))?g.jsx("pre",{className:"bg-gray-100 rounded p-3 text-sm font-mono overflow-x-auto mb-3",children:g.jsx("code",{children:a})}):g.jsx("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-sm font-mono text-gray-800",children:a}),pre:({children:a})=>g.jsx(g.Fragment,{children:a}),strong:({children:a})=>g.jsx("strong",{className:"font-semibold text-gray-900",children:a}),blockquote:({children:a})=>g.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-600 mb-3",children:a})},children:e.body.trim()})})]})})]})}function Lt({rule:e,onSave:n,onCancel:t}){const[r,i]=Q.useState((e==null?void 0:e.filePath)||""),[l,o]=Q.useState((e==null?void 0:e.content)||s()),[a,c]=Q.useState(!!e);function s(){return`---
85
+ paths:
86
+ - '**/*.ts'
87
+ category: faq
88
+ timestamp: ${new Date().toISOString().split(".")[0]+"Z"}
89
+ ---
90
+
91
+ ## Title
92
+
93
+ Description here.
94
+
95
+ **Learned:** ${new Date().toISOString().split("T")[0]} from [context]
96
+ `}const u=!e;return g.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"text-lg font-semibold",children:e?"Edit Rule":"Create New Rule"}),g.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:g.jsx(ni,{className:"w-5 h-5"})})]}),u&&g.jsxs("div",{className:"mb-6",children:[g.jsx("div",{className:"bg-[#f0f9ff] border border-[#bae6fd] rounded-lg p-4 mb-4",children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(Kr,{className:"w-5 h-5 text-[#0284c7] mt-0.5 flex-shrink-0"}),g.jsxs("div",{children:[g.jsx("h4",{className:"font-medium text-[#0c4a6e] mb-1",children:"Recommended: Use Claude Code"}),g.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:"}),g.jsx("code",{className:"block bg-white px-3 py-2 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam:new-rule"})]})]})}),g.jsxs("button",{onClick:()=>c(!a),className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 cursor-pointer",children:[a?g.jsx(vn,{className:"w-4 h-4"}):g.jsx(In,{className:"w-4 h-4"}),"Or create manually"]})]}),(a||!u)&&g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path (relative to .claude/rules/)"}),g.jsx("input",{type:"text",value:r,onChange:h=>i(h.target.value),placeholder:"e.g., src/webserver/architecture.md",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm",disabled:!!e})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),g.jsx("textarea",{value:l,onChange:h=>o(h.target.value),rows:20,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm"})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx("button",{onClick:t,className:"flex items-center gap-1 px-4 py-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),g.jsxs("button",{onClick:()=>n(r,l),disabled:!r.trim()||!l.trim(),className:"flex items-center gap-1 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:[g.jsx(Qr,{className:"w-4 h-4"}),"Save"]})]})]})]})}function Ns({changes:e,rules:n,onEditRule:t}){const[r,i]=Q.useState(!1),[l,o]=Q.useState(()=>new Set(e.filter(y=>y.commitHash==="uncommitted").map(y=>y.commitHash))),a=Q.useMemo(()=>e.some(y=>y.commitHash==="uncommitted"),[e]),c=Q.useMemo(()=>{const y=new Date;return y.setDate(y.getDate()-5),y},[]),s=Q.useMemo(()=>e.some(y=>new Date(y.date)>=c),[e,c]),u=Q.useMemo(()=>{if(r)return e;const y=e.filter(E=>E.commitHash==="uncommitted"),C=e.filter(E=>E.commitHash!=="uncommitted");return!s&&y.length===0?[]:[...y,...C.slice(0,3)]},[e,r,s]),h=y=>{o(C=>{const E=new Set(C);return E.has(y)?E.delete(y):E.add(y),E})},m=y=>n.find(C=>C.filePath===y),p=y=>{const C=new Date(y),k=new Date().getTime()-C.getTime(),I=Math.floor(k/(1e3*60*60*24));return I===0?"Today":I===1?"Yesterday":I<7?`${I} days ago`:C.toLocaleDateString()};return e.length===0?null:!s&&!a&&!r?g.jsx("div",{className:"mb-8",children:g.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-2 text-sm text-gray-500 hover:text-gray-700 cursor-pointer",children:[g.jsx(Wn,{className:"w-4 h-4"}),"View ",e.length," older change",e.length!==1?"s":""]})}):g.jsxs("div",{className:"mb-8",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center gap-2",children:[g.jsx(zr,{className:"w-5 h-5 text-gray-500"}),"Recent Changes"]}),e.length>3&&g.jsx("button",{onClick:()=>i(!r),className:"text-sm text-[#005C75] hover:underline flex items-center gap-1 cursor-pointer",children:r?g.jsxs(g.Fragment,{children:[g.jsx(Mr,{className:"w-4 h-4"}),"Show Less"]}):g.jsxs(g.Fragment,{children:[g.jsx(Wn,{className:"w-4 h-4"}),"View All (",e.length,")"]})})]}),g.jsx("div",{className:"space-y-3",children:u.map(y=>{const C=y.commitHash==="uncommitted";return g.jsxs("div",{className:`rounded-lg border overflow-hidden ${C?"bg-amber-50 border-amber-300":"bg-white border-gray-200"}`,children:[g.jsx("div",{className:`p-4 cursor-pointer ${C?"hover:bg-amber-100":"hover:bg-gray-50"}`,onClick:()=>h(y.commitHash),children:g.jsx("div",{className:"flex items-start justify-between",children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("button",{className:`mt-0.5 cursor-pointer ${C?"text-amber-600":"text-gray-400"}`,children:l.has(y.commitHash)?g.jsx(vn,{className:"w-4 h-4"}):g.jsx(In,{className:"w-4 h-4"})}),g.jsxs("div",{children:[g.jsxs("p",{className:`font-medium ${C?"text-amber-900":"text-gray-900"}`,children:[y.message,C&&g.jsx("span",{className:"ml-2 text-xs bg-amber-200 text-amber-800 px-2 py-0.5 rounded-full",children:"Not committed"})]}),g.jsxs("div",{className:`flex items-center gap-3 mt-1 text-sm ${C?"text-amber-700":"text-gray-500"}`,children:[!C&&g.jsx("span",{className:"font-mono text-xs bg-gray-100 px-1.5 py-0.5 rounded",children:y.commitHash}),g.jsx("span",{children:p(y.date)}),g.jsxs("span",{children:[y.files.length," file",y.files.length!==1?"s":""]})]})]})]})})}),l.has(y.commitHash)&&g.jsx("div",{className:"border-t border-gray-100",children:y.files.map((E,k)=>{const I=m(E.filePath);return g.jsxs("div",{className:"border-b border-gray-100 last:border-b-0",children:[g.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[E.changeType==="added"&&g.jsx(mn,{className:"w-4 h-4 text-green-600"}),E.changeType==="modified"&&g.jsx(Br,{className:"w-4 h-4 text-amber-600"}),E.changeType==="deleted"&&g.jsx($r,{className:"w-4 h-4 text-red-600"}),g.jsx("span",{className:"font-mono text-sm",children:E.filePath}),g.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${E.changeType==="added"?"bg-green-100 text-green-700":E.changeType==="deleted"?"bg-red-100 text-red-700":"bg-amber-100 text-amber-700"}`,children:E.changeType})]}),I&&E.changeType!=="deleted"&&g.jsxs("button",{onClick:S=>{S.stopPropagation(),t(I)},className:"flex items-center gap-1 px-2 py-1 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded cursor-pointer",children:[g.jsx(_t,{className:"w-3 h-3"}),"Edit"]})]}),E.diff&&g.jsx("pre",{className:"p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto",children:E.diff.split(`
97
+ `).map((S,D)=>{let z="";return S.startsWith("+")&&!S.startsWith("+++")?z="text-green-400":S.startsWith("-")&&!S.startsWith("---")?z="text-red-400":S.startsWith("@@")&&(z="text-cyan-400"),g.jsx("div",{className:z,children:S},D)})})]},k)})})]},y.commitHash)})})]})}const zs=Ir(function(){const{rules:n,recentChanges:t,error:r}=jr(),i=Tr(),l=Pr(),[o,a]=Q.useState(null),[c,s]=Q.useState(null),[u,h]=Q.useState(!1),[m,p]=Q.useState(null);Ar({source:"rules-page"}),Q.useEffect(()=>{i.state==="idle"&&i.data&&(l.revalidate(),s(null),h(!1))},[i.state,i.data,l]);const y=Q.useMemo(()=>o?n.filter(S=>S.frontmatter.category===o):n,[n,o]),C=Q.useMemo(()=>{const S={};for(const D of y){const z=D.filePath.includes("/")?D.filePath.split("/").slice(0,-1).join("/"):"(root)";S[z]||(S[z]=[]),S[z].push(D)}return Object.entries(S).sort(([D],[z])=>D.localeCompare(z))},[y]),E=(S,D)=>{const z=c?"update":"create";i.submit({action:z,filePath:S,content:D},{method:"POST",action:"/api/rules",encType:"application/json"})},k=S=>{i.submit({action:"delete",filePath:S.filePath},{method:"POST",action:"/api/rules",encType:"application/json"}),p(null)},I=Q.useMemo(()=>{const S={architecture:0,testing:0,faq:0};for(const D of n){const z=D.frontmatter.category||"faq";S[z]++}return S},[n]);return r?g.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:g.jsxs("div",{className:"px-12 py-6 font-sans",children:[g.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),g.jsx("p",{className:"text-base text-gray-500",children:r})]})}):g.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:g.jsxs("div",{className:"px-20 py-12 font-sans",children:[g.jsxs("div",{className:"mb-8",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Claude Rules"}),g.jsx("p",{className:"text-[15px] text-gray-500",children:"Documentation that helps Claude understand your codebase patterns and conventions."})]}),g.jsxs("button",{onClick:()=>h(!0),className:"flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[g.jsx(mn,{className:"w-4 h-4"}),"New Rule"]})]}),u&&g.jsx("div",{className:"mt-4",children:g.jsx(Lt,{rule:null,onSave:E,onCancel:()=>{h(!1)}})})]}),c&&g.jsx("div",{className:"mb-8",children:g.jsx(Lt,{rule:c,onSave:E,onCancel:()=>{s(null)}})}),g.jsx(Ns,{changes:t,rules:n,onEditRule:s}),g.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-8",children:[g.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[g.jsx("div",{className:"text-2xl font-semibold text-gray-900",children:n.length}),g.jsx("div",{className:"text-sm text-gray-500",children:"Total Rules"})]}),g.jsxs("div",{className:`bg-white rounded-lg border border-gray-200 p-4 cursor-pointer hover:border-blue-300 ${o==="architecture"?"ring-2 ring-blue-500":""}`,onClick:()=>a(o==="architecture"?null:"architecture"),children:[g.jsx("div",{className:"text-2xl font-semibold text-blue-600",children:I.architecture}),g.jsx("div",{className:"text-sm text-gray-500",children:"Architecture"})]}),g.jsxs("div",{className:`bg-white rounded-lg border border-gray-200 p-4 cursor-pointer hover:border-green-300 ${o==="testing"?"ring-2 ring-green-500":""}`,onClick:()=>a(o==="testing"?null:"testing"),children:[g.jsx("div",{className:"text-2xl font-semibold text-green-600",children:I.testing}),g.jsx("div",{className:"text-sm text-gray-500",children:"Testing"})]}),g.jsxs("div",{className:`bg-white rounded-lg border border-gray-200 p-4 cursor-pointer hover:border-amber-300 ${o==="faq"?"ring-2 ring-amber-500":""}`,onClick:()=>a(o==="faq"?null:"faq"),children:[g.jsx("div",{className:"text-2xl font-semibold text-amber-600",children:I.faq}),g.jsx("div",{className:"text-sm text-gray-500",children:"FAQ / Gotchas"})]})]}),m&&g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:g.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Rule?"}),g.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",g.jsx("span",{className:"font-mono text-sm",children:m.filePath}),"? This cannot be undone."]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx("button",{onClick:()=>p(null),className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),g.jsx("button",{onClick:()=>k(m),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})}),n.length===0?g.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[g.jsx(Xn,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),g.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),g.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",g.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam:power-rules"})," ","to generate initial rules for your codebase."]}),g.jsxs("button",{onClick:()=>h(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[g.jsx(mn,{className:"w-4 h-4"}),"Create Your First Rule"]})]}):g.jsxs("div",{className:"space-y-6",children:[o&&g.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[g.jsx(Vr,{className:"w-4 h-4"}),"Showing"," ",xr[o]," ","rules",g.jsx("button",{onClick:()=>a(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),C.map(([S,D])=>g.jsxs("div",{children:[g.jsxs("h2",{className:"text-sm font-medium text-gray-500 mb-3 flex items-center gap-2",children:[g.jsx(Xn,{className:"w-4 h-4"}),S]}),g.jsx("div",{className:"space-y-3",children:D.map(z=>g.jsx(Es,{rule:z,onEdit:s,onDelete:p},z.filePath))})]},S))]})]})})});export{zs as default,As as meta};
@@ -0,0 +1 @@
1
+ function G(s,n,z,C,E){var Q,a,D,F,I,P,R,U;const e=(Q=n==null?void 0:n.scenarios)==null?void 0:Q.find(r=>r.name===s.name),k=!!(e!=null&&e.startedAt),T=!!(e!=null&&e.screenshotStartedAt),y=!!(e!=null&&e.screenshotFinishedAt),v=!!(e!=null&&e.finishedAt),L=1800*1e3,$=T&&!y&&(e==null?void 0:e.screenshotStartedAt)&&Date.now()-new Date(e.screenshotStartedAt).getTime()>L,h=!!((D=(a=s.metadata)==null?void 0:a.screenshotPaths)!=null&&D[0])||!!((F=s.metadata)!=null&&F.executionResult),m=T&&!y,A=e==null?void 0:e.error,o=(P=(I=s.metadata)==null?void 0:I.executionResult)==null?void 0:P.error,u=[];if(n!=null&&n.errors&&n.errors.length>0)for(const r of n.errors)u.push({source:`${r.phase} phase`,message:r.message});if(n!=null&&n.steps)for(const r of n.steps)r.error&&u.push({source:r.name,message:r.error});const w=!h&&!A&&!o&&u.length>0,t=!!(A||o||$||w),M=$?"Capture timed out after 30 minutes":(typeof A=="string"?A:null)||(o==null?void 0:o.message)||(w?`Analysis error: ${u[0].message}`:null),O=$?"The capture process has been running for more than 30 minutes and likely got stuck. Consider re-running the analysis.":(e==null?void 0:e.errorStack)||(o==null?void 0:o.stack)||null,p=(C&&E?E.jobs.some(r=>{var x;return((x=r.entityShas)==null?void 0:x.includes(C))||r.type==="analysis"&&r.entityShas&&r.entityShas.length===0})||((U=(R=E.currentlyExecuting)==null?void 0:R.entityShas)==null?void 0:U.includes(C)):!1)&&!k&&!t||!!(e!=null&&e.analyzing)&&!k&&!t,f=k&&!T&&!v&&!t,_=(p||f||m)&&!t,c=(p||f)&&z===!1&&!h;let d;c?d="crashed":t?d="error":h||v?d="completed":m?d="capturing":f?d="starting":p?d="queued":d="pending";let i="📷",l="pending",b=!1,g=`Not captured: ${s.name}`;const N="border-gray-300",q=t||c?"bg-red-50":"bg-white";return t||c?(i="⚠️",l="error",g=`Error: ${c?"Analysis process crashed":M||"Unknown error"}`):p?(i="⋯",l="queued",g=`Queued: ${s.name}`):f?(i="⋯",l="starting",b=!0,g=`Starting server for ${s.name}...`):m&&!t?(i="⋯",l="capturing",b=!0,g=`Capturing ${s.name}...`):h&&(i="✓",l="completed",g=s.name),{hasError:t||c,errorMessage:c?"Analysis process crashed":M,errorStack:c?"Process terminated unexpectedly before completing analysis":O,isCapturing:m,isCaptured:h,hasCrashed:c,isAnalyzing:_,isQueued:p,isServerStarting:f,status:d,icon:i,iconType:l,shouldSpin:b,title:g,borderColor:N,bgColor:q}}export{G as g};
@@ -0,0 +1,6 @@
1
+ import{c}from"./createLucideIcon-BdhJEx6B.js";/**
2
+ * @license lucide-react v0.556.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 e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
@@ -0,0 +1 @@
1
+ import{w as te,u as ae,e as re,c as ne,f as ie,r,j as e}from"./chunk-EPOLDU6W-CXRTFQ3F.js";import{u as oe}from"./useReportContext-DYxHZQuP.js";const me=()=>[{title:"CodeYam - Settings"},{name:"description",content:"Configure project settings"}];function O(c){if(!c)return"";const t=[c.command];return c.args&&c.args.length>0&&t.push(...c.args),t.join(" ")}function D({mock:c,onSave:t,onCancel:o}){const[i,u]=r.useState(c.entityName),[l,n]=r.useState(c.filePath),[p,x]=r.useState(c.content),y=()=>{if(!i.trim()||!l.trim()||!p.trim()){alert("All fields are required");return}t({entityName:i,filePath:l,content:p})};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Entity Name"}),e.jsx("input",{type:"text",value:i,onChange:m=>u(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., determineDatabaseType"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path"}),e.jsx("input",{type:"text",value:l,onChange:m=>n(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., packages/database/src/lib/kysely/db.ts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),e.jsx("textarea",{value:p,onChange:m=>x(m.target.value),rows:6,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., function determineDatabaseType() { return 'postgresql' }"})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:o,className:"px-4 py-2 bg-gray-200 text-gray-800 border-none rounded text-sm cursor-pointer hover:bg-gray-300",children:"Cancel"}),e.jsx("button",{type:"button",onClick:y,className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Save"})]})]})}function le(c){try{return new Date(c).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return c}}const xe=te(function(){var R,q;const{config:t,secrets:o,versionInfo:i,error:u}=ae(),l=re(),n=ne(),p=ie(),[x,y]=r.useState("project-metadata");oe({source:"settings-page"});const[m,h]=r.useState((t==null?void 0:t.universalMocks)||[]),[j,A]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[S,V]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[$,k]=r.useState((o==null?void 0:o.GROQ_API_KEY)||""),[z,P]=r.useState((o==null?void 0:o.ANTHROPIC_API_KEY)||""),[G,I]=r.useState((o==null?void 0:o.OPENAI_API_KEY)||""),[f,U]=r.useState(!1),[N,Y]=r.useState(!1),[v,H]=r.useState(!1),[K,g]=r.useState(!1),[M,L]=r.useState(!1),[T,E]=r.useState(!1),[W,C]=r.useState(null),[J,b]=r.useState(!1),[w,_]=r.useState({});r.useEffect(()=>{var s;if(t){h(t.universalMocks||[]);const a=(t.pathsToIgnore||[]).join(", ");A(a),V(a);const d={};(s=t.webapps)==null||s.forEach((F,se)=>{F.startCommand&&(d[se]=O(F.startCommand))}),_(d)}o&&(k(o.GROQ_API_KEY||""),P(o.ANTHROPIC_API_KEY||""),I(o.OPENAI_API_KEY||""))},[t,o]),r.useEffect(()=>{if(l!=null&&l.success){g(!0);const s=setTimeout(()=>g(!1),3e3);return()=>clearTimeout(s)}},[l]),r.useEffect(()=>{if(n.state==="idle"&&n.data&&!T){console.log("[Settings] Fetcher data:",n.data);const s=n.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),g(!0),E(!0),(j!==S||s.requiresRestart)&&L(!0),p.revalidate();const a=setTimeout(()=>{g(!1),E(!1)},3e3);return()=>clearTimeout(a)}}},[n.state,n.data,T,p,j,S]);const Q=s=>{s.preventDefault();const a=new FormData(s.currentTarget);a.set("universalMocks",JSON.stringify(m)),a.set("startCommands",JSON.stringify(w)),console.log("[Settings] Submitting form data:",{universalMocks:a.get("universalMocks"),startCommands:a.get("startCommands"),openAiApiKey:a.get("openAiApiKey")?"***":"(empty)"}),n.submit(a,{method:"post"})},B=s=>{h([...m,s]),b(!1)},X=(s,a)=>{const d=[...m];d[s]=a,h(d),C(null)},Z=s=>{h(m.filter((a,d)=>d!==s))};if(u)return e.jsxs("div",{className:"max-w-6xl mx-auto p-8 font-sans",children:[e.jsx("header",{className:"mb-6 pb-4 border-b border-gray-200",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Settings"})})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:e.jsx("p",{className:"text-red-700",children:u})})]});const ee=[{id:"project-metadata",label:"Project Metadata"},{id:"ai-provider",label:"AI Provider Configuration"},{id:"commands",label:"Commands"},{id:"paths-to-ignore",label:"Paths To Ignore"},{id:"universal-mocks",label:"Universal Mocks"},{id:"current-configuration",label:"Current Configuration"}];return e.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:e.jsxs("div",{className:"px-20 pt-8 pb-12 font-sans",children:[e.jsxs("div",{className:"mb-8 flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Settings"}),e.jsx("p",{className:"text-[15px] text-gray-500",children:"Project Configuration"})]}),e.jsx("button",{type:"submit",form:"settings-form",disabled:n.state==="submitting",className:"px-6 py-2 bg-[#005C75] text-white border-none rounded text-sm font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-[#004a5d] whitespace-nowrap",children:n.state==="submitting"?"Saving...":"Save Settings"})]}),e.jsxs("div",{className:"flex gap-8 items-start",children:[e.jsx("nav",{className:"w-64 flex-shrink-0",children:e.jsx("ul",{className:"space-y-1",children:ee.map(s=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>y(s.id),className:`w-full text-left px-0 py-2.5 text-sm transition-colors cursor-pointer ${x===s.id?"text-[#005C75] font-medium":"text-gray-600 hover:text-gray-900"}`,children:s.label})},s.id))})}),e.jsx("div",{className:"flex-1 min-w-0 -mt-2",children:e.jsxs("form",{id:"settings-form",onSubmit:Q,className:"space-y-6",children:[x==="project-metadata"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Project Metadata"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block mb-2 font-medium text-gray-700",children:"Web Applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>{var d;return e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsxs("span",{className:"text-gray-900 font-mono text-xs",children:[s.startCommand.command," ",(d=s.startCommand.args)==null?void 0:d.join(" ")]})]})]})},a)})}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"}),e.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Web applications are detected during initialization. To modify, edit `.codeyam/config.json` or re-run `codeyam init`."})]})]}),x==="ai-provider"&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider API Keys"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure API keys for AI-powered analysis. Choose the provider that best fits your needs."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Groq"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Lightning-fast inference with industry-leading speed. Groq's LPU architecture delivers exceptional performance for real-time AI applications with competitive pricing."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$0.10/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 850 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Less reliable, but capable of producing reasonable results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"groqApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:f?"text":"password",id:"groqApiKey",name:"groqApiKey",value:$,onChange:s=>k(s.target.value),placeholder:"gsk_...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>U(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:f?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Anthropic Claude"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Advanced reasoning and coding capabilities with superior context understanding. Claude excels at complex analysis tasks and provides highly accurate results with detailed explanations."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$3.00/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 120 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"anthropicApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:N?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:z,onChange:s=>P(s.target.value),placeholder:"sk-ant-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>Y(!N),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:N?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"OpenAI GPT"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Industry-standard AI with broad capabilities and extensive ecosystem. GPT models offer reliable performance across diverse tasks with good balance of speed and quality."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$2.50/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 150 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"openAiApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:v?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:G,onChange:s=>I(s.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>H(!v),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:v?"Hide":"Show"})]})]})]})]})]}),x==="commands"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Commands"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure start commands for your web applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-4",children:t.webapps.map((s,a)=>e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-gray-900 mb-1",children:s.path==="."?"Root":s.path}),e.jsx("div",{className:"text-sm text-gray-600",children:s.framework})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:`startCommand-${a}`,className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Command"}),e.jsx("input",{type:"text",id:`startCommand-${a}`,name:`startCommand-${a}`,value:w[a]||"",onChange:d=>_({...w,[a]:d.target.value}),placeholder:"e.g., pnpm dev --port $PORT",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Use $PORT as a placeholder for the dynamic port number"})]})]},a))}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"})]}),x==="paths-to-ignore"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:j,onChange:s=>A(s.target.value),placeholder:"e.g., __tests__, \\.test\\.ts$, ^background (no quotes needed)",className:"w-full px-3 py-3 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-2 focus:ring-[#005C75]/10"}),e.jsxs("p",{className:"mt-2 text-sm text-gray-600",children:["Comma-separated list of regex patterns for paths to ignore during file watching. Examples:"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"__tests__"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"\\.test\\.tsx?$"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"^background"}),e.jsx("br",{}),e.jsx("span",{className:"text-xs text-gray-500 mt-1 inline-block",children:"Note: Files matching patterns in .gitignore are also automatically ignored"})]})]}),x==="universal-mocks"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Universal Mocks"}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),m.length===0?e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-3",children:"No universal mocks configured"}),e.jsx("button",{type:"button",onClick:()=>b(!0),className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}):e.jsx("div",{className:"space-y-3",children:m.map((s,a)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:W===a?e.jsx(D,{mock:s,onSave:d=>X(a,d),onCancel:()=>C(null)}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-gray-800 mb-1",children:s.entityName}),e.jsx("div",{className:"text-sm text-gray-600 mb-2",children:s.filePath}),e.jsx("pre",{className:"text-xs bg-white p-2 rounded border border-gray-200 overflow-x-auto",children:s.content})]}),e.jsxs("div",{className:"flex gap-2 ml-3",children:[e.jsx("button",{type:"button",onClick:()=>C(a),className:"px-3 py-1 bg-teal-600 text-white border-none rounded text-sm cursor-pointer hover:bg-teal-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>Z(a),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},a))}),m.length>0&&e.jsx("button",{type:"button",onClick:()=>b(!0),className:"mt-4 px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}),x==="current-configuration"&&e.jsxs("div",{className:"space-y-6",children:[t&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Current Configuration"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded mb-6",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[t.projectSlug&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Project Slug:"})," ",e.jsx("span",{className:"text-gray-900",children:t.projectSlug})]}),t.packageManager&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"})," ",e.jsx("span",{className:"text-gray-900",children:t.packageManager})]})]})}),t.webapps&&t.webapps.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Web Applications"}),e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsx("span",{className:"text-gray-900 font-mono text-xs",children:O(s.startCommand)})]})]})},a))})]})]}),i&&e.jsxs("div",{className:"mt-6",children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Version Information"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[i.webserverVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Webserver:"})," ",e.jsx("span",{className:"text-gray-900 font-mono",children:i.webserverVersion.version||"unknown"})]}),i.templateVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Analyzer Template:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.templateVersion.version||((R=i.templateVersion.gitCommit)==null?void 0:R.slice(0,7))||"unknown"}),i.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",le(i.templateVersion.buildTimestamp),")"]})]}),i.cachedAnalyzerVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.cachedAnalyzerVersion.version||((q=i.cachedAnalyzerVersion.gitCommit)==null?void 0:q.slice(0,7))||"unknown"}),i.isCacheStale?e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs",children:"Stale - will update on next analysis"}):e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:"Up to date"})]}),!i.cachedAnalyzerVersion&&(t==null?void 0:t.projectSlug)&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})})]})]})]})})]}),(K||M||(l==null?void 0:l.error)||n.data&&typeof n.data=="object"&&"error"in n.data)&&e.jsxs("div",{className:"mt-6 max-w-5xl mx-auto space-y-3",children:[K&&e.jsx("div",{className:"text-emerald-600 text-sm font-medium bg-emerald-50 border border-emerald-200 rounded px-4 py-2",children:"Settings saved successfully!"}),M&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-4 py-2",children:[e.jsx("div",{children:"⚠️ Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsx("code",{className:"ml-2 bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"})]}),(l==null?void 0:l.error)&&e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:l.error}),(()=>{if(n.data&&typeof n.data=="object"&&"error"in n.data){const s=n.data;return typeof s.error=="string"?e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:s.error}):null}return null})()]}),J&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:"Add Universal Mock"}),e.jsx(D,{mock:{entityName:"",filePath:"",content:""},onSave:B,onCancel:()=>b(!1)})]})})]})})});export{xe as default,me as meta};
@@ -0,0 +1 @@
1
+ import{w as R,u as $,r as l,j as e,a as B,c as D,L as F}from"./chunk-EPOLDU6W-CXRTFQ3F.js";import{u as O}from"./useReportContext-DYxHZQuP.js";import{S as U}from"./SafeScreenshot-DuDvi0jm.js";import{L as V}from"./LoadingDots-B0GLXMsr.js";import{E as P}from"./EntityTypeIcon-Ba2JVPzP.js";import{g as Y,a as Q,f as q}from"./fileTableUtils-DMJ7zii9.js";import{C as J}from"./chevron-down-Cx24_aWc.js";import{S as K}from"./search-CxXUmBSd.js";import{L as W}from"./loader-circle-B7B9V-bu.js";import"./createLucideIcon-BdhJEx6B.js";const ie=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}],ce=R(function(){const i=$(),c=i.entities,x=i.queueState;O({source:"simulations-page"});const[n,u]=l.useState(""),[d,S]=l.useState("visual"),g=l.useMemo(()=>{const a=[];return c.forEach(t=>{var y;const r=(y=t.analyses)==null?void 0:y[0];if(r!=null&&r.scenarios){const b=r.scenarios.filter(o=>{var m;return!((m=o.metadata)!=null&&m.sameAsDefault)}).map(o=>{var z,k,A,L,E;const m=(k=(z=o.metadata)==null?void 0:z.screenshotPaths)==null?void 0:k[0],N=(A=o.metadata)==null?void 0:A.noScreenshotSaved,M=m&&!N,T=(E=(L=r.status)==null?void 0:L.scenarios)==null?void 0:E.find(H=>H.name===o.name),I=T&&T.screenshotStartedAt&&!T.screenshotFinishedAt;let w;return M?w="completed":I?w="capturing":w="error",{scenarioName:o.name,scenarioDescription:o.description||"",screenshotPath:m||"",scenarioId:o.id,state:w}}).filter(o=>o.state==="completed"||o.state==="capturing");b.length>0&&a.push({entity:t,screenshots:b,createdAt:r.createdAt||""})}}),a.sort((t,r)=>new Date(r.createdAt).getTime()-new Date(t.createdAt).getTime()),a},[c]),v=l.useMemo(()=>c.filter(a=>{var y,b;const t=(y=a.analyses)==null?void 0:y[0];return!((b=t==null?void 0:t.scenarios)==null?void 0:b.some(o=>{var m,N;return(N=(m=o.metadata)==null?void 0:m.screenshotPaths)==null?void 0:N[0]}))}),[c]),p=l.useMemo(()=>g.filter(({entity:a})=>{const t=!n||a.name.toLowerCase().includes(n.toLowerCase()),r=d==="all"||a.entityType===d;return t&&r}),[g,n,d]),f=l.useMemo(()=>v.filter(a=>{const t=!n||a.name.toLowerCase().includes(n.toLowerCase()),r=d==="all"||a.entityType===d;return t&&r}),[v,n,d]),C=l.useCallback(a=>{u(a.target.value)},[]),j=l.useCallback(a=>{S(a.target.value)},[]),h=g.length>0;return e.jsx("div",{className:"bg-[#F8F7F6] min-h-screen overflow-y-auto",children:e.jsxs("div",{className:"px-20 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-[28px] font-semibold text-gray-900 mb-2",children:"Simulations"}),e.jsx("p",{className:"text-[15px] text-gray-500",children:"A visual gallery of your recently captured simulations."})]}),!h&&e.jsx("div",{className:"bg-[#D1F3F9] border border-[#A5E8F0] rounded-lg p-4 mb-6",children:e.jsxs("p",{className:"text-sm text-gray-700 m-0",children:["This page will display a visual gallery of your recently captured component simulations."," ",e.jsx("strong",{children:"Start by analyzing your first component below."})]})}),e.jsxs("div",{className:"bg-white border-b border-gray-200 rounded-t-lg px-5 py-4 mb-3",children:[e.jsx("div",{className:"text-[11px] text-gray-500 mb-2 uppercase",children:"Filters"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 pr-8 text-[13px] h-[39px] cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:d,onChange:j,children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"visual",children:"Visual"}),e.jsx("option",{value:"library",children:"Library"})]}),e.jsx(J,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-3 h-3 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(K,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search component",className:"w-full bg-gray-50 border border-gray-200 rounded pl-9 pr-3 text-[13px] h-[39px] placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:n,onChange:C})]})]})]}),h&&p.length>0&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"flex items-center py-3",children:[e.jsxs("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#8b8b8b",fontWeight:500,letterSpacing:"0.05em"},children:[e.jsx("span",{style:{color:"#000000"},children:p.length})," ",p.length===1?"entity":"entities"]}),e.jsxs("div",{className:"relative group inline-flex items-center ml-1.5",children:[e.jsx("svg",{className:"w-3 h-3 text-gray-400 cursor-help",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),e.jsx("div",{className:"absolute left-0 top-full mt-2 hidden group-hover:block z-50 w-80",children:e.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-lg px-3 py-2 shadow-lg",children:["In CodeYam, an entity is a discrete, analyzable unit of code that can be independently simulated and tested.",e.jsx("div",{className:"absolute -top-1 left-4 w-2 h-2 bg-gray-900 transform rotate-45"})]})})]}),e.jsx("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#d1d5db",fontWeight:500,letterSpacing:"0.05em",marginLeft:"8px"},children:"|"}),e.jsxs("span",{className:"font-mono uppercase",style:{fontSize:"11px",color:"#8b8b8b",fontWeight:500,letterSpacing:"0.05em",marginLeft:"8px"},children:[e.jsx("span",{style:{color:"#000000"},children:p.reduce((a,{screenshots:t})=>a+t.length,0)})," ","scenarios"]})]})}),e.jsxs("div",{className:"flex flex-col gap-3",children:[h&&(p.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsx(e.Fragment,{children:p.map(({entity:a,screenshots:t})=>e.jsx(G,{entity:a,screenshots:t,queueJobs:(x==null?void 0:x.jobs)||[]},a.sha))})),!h&&(f.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No components found matching your filters."}):f.map(a=>e.jsx(X,{entity:a},a.sha)))]})]})})});function G({entity:s,screenshots:i,queueJobs:c}){var j,h,a;const x=B(),n=D(),[u,d]=l.useState(!1),S=i.length||(((a=(h=(j=s.analyses)==null?void 0:j[0])==null?void 0:h.scenarios)==null?void 0:a.length)??0),g=t=>{x(`/entity/${s.sha}/scenarios/${t}?from=simulations`)},v=()=>{d(!0),n.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})};l.useEffect(()=>{n.state==="idle"&&u&&d(!1)},[n.state,u]);const p=Y(s,c),f=Q(p),C=p==="out-of-date";return e.jsx("div",{className:"rounded-[8px]",style:{backgroundColor:"#ffffff",border:"1px solid #e1e1e1"},children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center px-[15px] py-[15px]",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(P,{type:s.entityType||"other",size:"large"})}),e.jsxs("div",{className:"flex flex-col flex-shrink-0",style:{marginLeft:"15px",gap:"4px"},children:[e.jsxs("div",{className:"flex items-center gap-[5px]",children:[e.jsxs(F,{to:`/entity/${s.sha}`,className:"hover:underline cursor-pointer",title:s.name,style:{fontSize:"14px",lineHeight:"18px",color:"#343434",fontWeight:500},children:[s.name," (",S,")"]}),e.jsx("div",{className:"flex items-center justify-center px-2 rounded",style:{height:"20px",backgroundColor:f.bgColor,color:f.textColor,fontSize:"12px",lineHeight:"16px",fontWeight:400},children:f.text})]}),e.jsx("div",{style:{fontSize:"12px",lineHeight:"15px",color:"#b0b0b0",fontWeight:400},className:"font-mono",title:s.filePath,children:s.filePath})]}),e.jsx("div",{className:"flex-1"}),e.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2",children:[C&&e.jsx(e.Fragment,{children:u||n.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded flex items-center gap-1.5",children:[e.jsx(W,{size:14,className:"animate-spin",style:{color:"#be185d"}}),e.jsx("span",{style:{color:"#be185d",fontSize:"10px",lineHeight:"20px",fontWeight:600},children:"Analyzing..."})]}):e.jsx("button",{onClick:v,className:"px-[10px] rounded transition-colors whitespace-nowrap",style:{backgroundColor:"#005c75",color:"#ffffff",fontSize:"10px",lineHeight:"22px",fontWeight:600},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#004d5e"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="#005c75"},children:"Re-analyze"})}),e.jsx("button",{onClick:()=>void x(`/entity/${s.sha}/logs`),className:"px-[10px] rounded transition-colors whitespace-nowrap",style:{backgroundColor:"#e0e9ec",color:"#005c75",fontSize:"10px",lineHeight:"22px",fontWeight:600},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#d0dfe3"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="#e0e9ec"},children:"View Logs"})]})]}),e.jsx("div",{className:"border-t border-gray-200"}),e.jsx("div",{className:"flex gap-2.5 overflow-x-auto pb-3 px-[15px] pt-3",style:{paddingLeft:"47px"},children:i.length>0?i.map(t=>e.jsxs("div",{className:"shrink-0 flex flex-col gap-2",children:[e.jsx("button",{onClick:()=>g(t.scenarioId||""),className:"block cursor-pointer bg-transparent border-none p-0",children:e.jsx("div",{className:"w-36 h-24 rounded-md border overflow-hidden flex items-center justify-center transition-all",style:{"--hover-border":"#005C75",backgroundColor:t.state==="capturing"?"#f9f9f9":"#f3f4f6",borderColor:t.state==="capturing"?"#efefef":"#d1d5db"},onMouseEnter:r=>{t.state==="completed"&&(r.currentTarget.style.borderColor="#005C75",r.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)")},onMouseLeave:r=>{r.currentTarget.style.borderColor=t.state==="capturing"?"#efefef":"#d1d5db",r.currentTarget.style.boxShadow="none"},children:t.state==="completed"?e.jsx(U,{screenshotPath:t.screenshotPath,alt:t.scenarioName,className:"max-w-full max-h-full object-contain"}):t.state==="capturing"?e.jsx(V,{size:"medium"}):null})}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"text-left text-xs text-gray-600 cursor-default",style:{fontSize:"11px",lineHeight:"14px",maxWidth:"144px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.scenarioName}),e.jsx("div",{className:"fixed hidden group-hover:block pointer-events-none",style:{zIndex:1e4,transform:"translateY(8px)"},children:e.jsxs("div",{className:"bg-gray-100 text-gray-800 text-xs rounded-lg px-3 py-2 shadow-lg max-w-xs border border-gray-200",children:[t.scenarioName,t.scenarioDescription&&e.jsxs(e.Fragment,{children:[": ",t.scenarioDescription]}),e.jsx("div",{className:"absolute -top-1 left-4 w-2 h-2 bg-gray-100 border-l border-t border-gray-200 transform rotate-45"})]})})]})]},t.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function X({entity:s}){const i=D(),[c,x]=l.useState(!1),n=()=>{x(!0),i.submit({entitySha:s.sha,filePath:s.filePath||""},{method:"post",action:"/api/analyze"})};return l.useEffect(()=>{i.state==="idle"&&c&&x(!1)},[i.state,c]),e.jsx("div",{className:"bg-white rounded hover:bg-gray-100 transition-colors cursor-pointer border-b border-[#e1e1e1]",onClick:n,children:e.jsxs("div",{className:"px-5 py-4 flex items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(P,{type:s.entityType}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx(F,{to:`/entity/${s.sha}`,className:"text-sm font-medium text-gray-900 no-underline",children:s.name}),e.jsx("span",{className:"text-[10px] font-semibold px-1 py-0.5 rounded",style:{color:s.entityType==="visual"?"#7c3aed":s.entityType==="library"?"#0DBFE9":s.entityType==="type"?"#dc2626":s.entityType==="data"?"#2563eb":s.entityType==="index"?"#ea580c":s.entityType==="functionCall"?"#7c3aed":s.entityType==="class"?"#059669":s.entityType==="method"?"#0891b2":"#6b7280",backgroundColor:s.entityType==="visual"?"#f3e8ff":s.entityType==="library"?"#cffafe":s.entityType==="type"?"#fee2e2":s.entityType==="data"?"#dbeafe":s.entityType==="index"?"#ffedd5":s.entityType==="functionCall"?"#f3e8ff":s.entityType==="class"?"#d1fae5":s.entityType==="method"?"#cffafe":"#f3f4f6"},children:s.entityType?s.entityType.toUpperCase():"UNKNOWN"})]}),e.jsx("div",{className:"text-xs text-gray-400 truncate",children:s.filePath})]})]}),e.jsx("div",{className:"w-32 flex justify-center",children:e.jsx("span",{className:"text-[10px] text-gray-500 bg-gray-100 px-2 py-1 rounded",children:"Not analyzed"})}),e.jsx("div",{className:"w-32 text-center text-[10px] text-gray-500",children:q(s.createdAt||null)}),e.jsx("div",{className:"w-24 flex justify-end",children:c||i.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(W,{size:14,className:"animate-spin"}),"Analyzing..."]}):e.jsx("button",{onClick:n,className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-xs font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer",children:"Analyze"})})]})})}export{ce as default,ie as meta};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./createLucideIcon-BdhJEx6B.js";/**
2
+ * @license lucide-react v0.556.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 a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};