@loopstack/loopstack-studio 0.25.1 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1667) hide show
  1. package/dist/_virtual/rolldown_runtime.js +20 -0
  2. package/dist/api/auth.js +2 -4
  3. package/dist/api/client.js +7 -9
  4. package/dist/api/config.js +2 -4
  5. package/dist/api/dashboard.js +2 -4
  6. package/dist/api/documents.js +2 -4
  7. package/dist/api/index.js +19 -21
  8. package/dist/api/processor.js +2 -4
  9. package/dist/api/secrets.js +2 -4
  10. package/dist/api/workflows.js +2 -4
  11. package/dist/api/workspaces.js +2 -4
  12. package/dist/app/EnvironmentEmbedRoot.js +31 -24
  13. package/dist/components/ai-elements/code-block.js +71 -53
  14. package/dist/components/ai-elements/message.js +82 -41
  15. package/dist/components/ai-elements/prompt-input.js +253 -162
  16. package/dist/components/ai-elements/reasoning.js +116 -78
  17. package/dist/components/ai-elements/shimmer.js +35 -23
  18. package/dist/components/ai-elements/sources.js +58 -29
  19. package/dist/components/data-table/ConfirmDialog.js +30 -14
  20. package/dist/components/data-table/DataList.js +198 -138
  21. package/dist/components/data-table/DataTable.js +234 -168
  22. package/dist/components/data-table/DataTableBatchAction.js +27 -18
  23. package/dist/components/data-table/DataTableFilters.js +78 -53
  24. package/dist/components/data-table/DataTablePagination.js +104 -72
  25. package/dist/components/data-table/DataTableToolbar.js +65 -53
  26. package/dist/components/dynamic-form/ArrayController.js +103 -85
  27. package/dist/components/dynamic-form/CodeContent.js +36 -28
  28. package/dist/components/dynamic-form/Form.js +56 -43
  29. package/dist/components/dynamic-form/FormBody.js +10 -12
  30. package/dist/components/dynamic-form/FormElement.js +41 -31
  31. package/dist/components/dynamic-form/FormElementHeader.js +20 -12
  32. package/dist/components/dynamic-form/InputController.js +38 -36
  33. package/dist/components/dynamic-form/MarkdownContent.js +74 -53
  34. package/dist/components/dynamic-form/MermaidDiagram.js +24 -22
  35. package/dist/components/dynamic-form/ObjectController.js +32 -24
  36. package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +47 -35
  37. package/dist/components/dynamic-form/fields/CheckboxField.js +48 -39
  38. package/dist/components/dynamic-form/fields/CodeViewField.js +50 -42
  39. package/dist/components/dynamic-form/fields/InputField.js +90 -62
  40. package/dist/components/dynamic-form/fields/MarkdownViewField.js +19 -16
  41. package/dist/components/dynamic-form/fields/RadioField.js +62 -46
  42. package/dist/components/dynamic-form/fields/SelectField.js +58 -40
  43. package/dist/components/dynamic-form/fields/SliderField.js +100 -94
  44. package/dist/components/dynamic-form/fields/SwitchField.js +61 -42
  45. package/dist/components/dynamic-form/fields/TextareaField.js +72 -53
  46. package/dist/components/dynamic-form/fields/utils/text-validation-utils.js +2 -4
  47. package/dist/components/dynamic-form/hooks/useArrayDefaultValue.js +5 -6
  48. package/dist/components/dynamic-form/hooks/useFieldConfig.js +20 -19
  49. package/dist/components/dynamic-form/hooks/useMergeParentKey.js +2 -4
  50. package/dist/components/dynamic-form/hooks/useSortPropertyNames.js +2 -4
  51. package/dist/components/feedback/ErrorAlert.js +17 -11
  52. package/dist/components/feedback/ErrorBoundary.js +14 -16
  53. package/dist/components/feedback/ErrorSnackbar.js +30 -13
  54. package/dist/components/feedback/LoadingCentered.js +28 -15
  55. package/dist/components/feedback/Snackbar.js +44 -43
  56. package/dist/components/feedback/index.js +5 -5
  57. package/dist/components/index.js +47 -47
  58. package/dist/components/layout/MainLayout.js +25 -17
  59. package/dist/components/layout/StudioSidebar.js +202 -132
  60. package/dist/components/lists/CustomListView.js +74 -49
  61. package/dist/components/lists/ListView.js +102 -66
  62. package/dist/components/loopstack-elements/link.js +104 -65
  63. package/dist/components/loopstack-elements/tool.js +142 -70
  64. package/dist/components/messages/CompletionMessagePaper.js +85 -53
  65. package/dist/components/page/PageBreadcrumbs.js +83 -64
  66. package/dist/components/ui/DiscordLogo.js +22 -16
  67. package/dist/components/ui/GoogleLogo.js +44 -40
  68. package/dist/components/ui/accordion.js +52 -31
  69. package/dist/components/ui/alert-dialog.js +109 -59
  70. package/dist/components/ui/alert.js +36 -22
  71. package/dist/components/ui/avatar.js +35 -21
  72. package/dist/components/ui/badge.js +17 -13
  73. package/dist/components/ui/breadcrumb.js +82 -46
  74. package/dist/components/ui/button-group.js +5 -5
  75. package/dist/components/ui/button.js +21 -17
  76. package/dist/components/ui/card.js +74 -40
  77. package/dist/components/ui/checkbox.js +23 -17
  78. package/dist/components/ui/collapsible.js +25 -17
  79. package/dist/components/ui/command.js +2 -1
  80. package/dist/components/ui/context-menu.js +52 -32
  81. package/dist/components/ui/dialog.js +107 -62
  82. package/dist/components/ui/drawer.js +99 -54
  83. package/dist/components/ui/dropdown-menu.js +159 -91
  84. package/dist/components/ui/hover-card.js +2 -1
  85. package/dist/components/ui/input-group.js +56 -36
  86. package/dist/components/ui/input.js +15 -11
  87. package/dist/components/ui/label.js +15 -11
  88. package/dist/components/ui/popover.js +38 -25
  89. package/dist/components/ui/radio-group.js +33 -22
  90. package/dist/components/ui/scroll-area.js +43 -28
  91. package/dist/components/ui/select.js +134 -73
  92. package/dist/components/ui/separator.js +17 -13
  93. package/dist/components/ui/sheet.js +105 -60
  94. package/dist/components/ui/sidebar.js +451 -269
  95. package/dist/components/ui/skeleton.js +14 -10
  96. package/dist/components/ui/slider.js +15 -17
  97. package/dist/components/ui/switch.js +21 -15
  98. package/dist/components/ui/table.js +85 -46
  99. package/dist/components/ui/tabs.js +45 -26
  100. package/dist/components/ui/textarea.js +14 -10
  101. package/dist/components/ui/tooltip.js +41 -26
  102. package/dist/components/ui-widgets/UiActions.js +37 -30
  103. package/dist/components/ui-widgets/UiWidget.js +46 -34
  104. package/dist/components/ui-widgets/widgets/AiPromptInput.js +42 -28
  105. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +21 -16
  106. package/dist/components/ui-widgets/widgets/SandboxRun.js +26 -19
  107. package/dist/components/ui-widgets/widgets/SubmitButton.js +20 -15
  108. package/dist/events/api-client-events.js +2 -4
  109. package/dist/events/sse-client-events.js +2 -4
  110. package/dist/features/code-explorer/CodeExplorer.js +2 -1
  111. package/dist/features/code-explorer/components/CodeExplorerTree.js +2 -2
  112. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +29 -31
  113. package/dist/features/code-explorer/components/FileContentViewer.js +148 -108
  114. package/dist/features/code-explorer/components/FileTabsBar.js +2 -1
  115. package/dist/features/code-explorer/components/FileTabsBarBase.js +169 -134
  116. package/dist/features/code-explorer/index.js +1 -1
  117. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +4 -4
  118. package/dist/features/code-explorer/utils/fileIcons.js +39 -41
  119. package/dist/features/dashboard/Dashboard.js +121 -79
  120. package/dist/features/dashboard/RunItem.js +68 -50
  121. package/dist/features/dashboard/RunList.js +28 -17
  122. package/dist/features/debug/components/ConfigFlowViewer.js +67 -49
  123. package/dist/features/debug/components/WorkflowDebugHeader.js +46 -30
  124. package/dist/features/debug/components/WorkflowDebugLegend.js +68 -56
  125. package/dist/features/debug/components/WorkflowFlowViewer.js +96 -76
  126. package/dist/features/debug/components/workflow-flow/StateNode.js +102 -73
  127. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +40 -35
  128. package/dist/features/debug/components/workflow-flow/WorkflowTransitionEdge.js +94 -61
  129. package/dist/features/debug/index.js +3 -3
  130. package/dist/features/debug/lib/edge-paths.js +31 -33
  131. package/dist/features/debug/lib/flow-utils.js +145 -147
  132. package/dist/features/documents/DocumentRenderer.js +77 -73
  133. package/dist/features/documents/components/DocumentItem.js +24 -21
  134. package/dist/features/documents/components/DocumentList.js +45 -39
  135. package/dist/features/documents/components/DocumentMetadataPills.js +59 -44
  136. package/dist/features/documents/document-details/DocumentDetails.js +413 -298
  137. package/dist/features/documents/document-details/PromptDetails.js +142 -105
  138. package/dist/features/documents/index.js +4 -4
  139. package/dist/features/documents/renderers/AiMessage.js +48 -39
  140. package/dist/features/documents/renderers/AiMessageContent.js +164 -108
  141. package/dist/features/documents/renderers/ChoicesRenderer.js +89 -77
  142. package/dist/features/documents/renderers/ClaudeMessage.js +91 -74
  143. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +53 -44
  144. package/dist/features/documents/renderers/DocumentDebugRenderer.js +30 -26
  145. package/dist/features/documents/renderers/DocumentFormRenderer.js +85 -69
  146. package/dist/features/documents/renderers/DocumentMessageRenderer.js +9 -10
  147. package/dist/features/documents/renderers/ErrorMessageRenderer.js +13 -11
  148. package/dist/features/documents/renderers/LinkMessageRenderer.js +14 -15
  149. package/dist/features/documents/renderers/MarkdownMessageRenderer.js +10 -8
  150. package/dist/features/documents/renderers/PlainMessageRenderer.js +9 -7
  151. package/dist/features/documents/renderers/SecretInputRenderer.js +35 -37
  152. package/dist/features/documents/renderers/TextPromptRenderer.js +54 -45
  153. package/dist/features/documents/renderers/useDocumentTransition.js +7 -9
  154. package/dist/features/health/LocalHealthCheck.js +53 -54
  155. package/dist/features/health/index.js +1 -1
  156. package/dist/features/oauth/OAuthCallbackPage.js +2 -2
  157. package/dist/features/oauth/OAuthPromptRenderer.js +197 -148
  158. package/dist/features/oauth/index.js +2 -2
  159. package/dist/features/oauth/useOAuthPopup.js +71 -52
  160. package/dist/features/runs/Runs.js +187 -145
  161. package/dist/features/workbench/Workbench.js +98 -72
  162. package/dist/features/workbench/WorkflowItem.js +68 -49
  163. package/dist/features/workbench/WorkflowList.js +66 -51
  164. package/dist/features/workbench/components/NewRunDialog.js +309 -212
  165. package/dist/features/workbench/components/RemoteFileTabsBar.js +17 -18
  166. package/dist/features/workbench/components/RemoteFileTree.js +85 -54
  167. package/dist/features/workbench/components/WorkbenchFilesPanel.js +63 -52
  168. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +51 -34
  169. package/dist/features/workbench/components/WorkbenchFlowPanel.js +44 -35
  170. package/dist/features/workbench/components/WorkbenchIconSidebar.js +68 -50
  171. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +49 -51
  172. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +172 -143
  173. package/dist/features/workbench/components/WorkbenchSettingsModal.js +60 -49
  174. package/dist/features/workbench/components/WorkflowForms.js +23 -17
  175. package/dist/features/workbench/components/WorkflowHistoryItem.js +122 -96
  176. package/dist/features/workbench/components/WorkflowHistoryList.js +54 -31
  177. package/dist/features/workbench/components/buttons/WorkflowButtons.js +99 -70
  178. package/dist/features/workbench/hooks/useAutoScrollBottom.js +25 -21
  179. package/dist/features/workbench/hooks/useScrollToListItem.js +21 -20
  180. package/dist/features/workbench/hooks/useWorkflowData.js +44 -31
  181. package/dist/features/workbench/hooks/useWorkflowListState.js +12 -13
  182. package/dist/features/workbench/index.js +7 -7
  183. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +138 -123
  184. package/dist/features/workbench/providers/ScrollProvider.js +19 -15
  185. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +75 -76
  186. package/dist/features/workspaces/Workspaces.js +226 -161
  187. package/dist/features/workspaces/components/CreateWorkspace.js +194 -137
  188. package/dist/features/workspaces/components/EnvironmentSlotSelector.js +25 -27
  189. package/dist/features/workspaces/components/ExecutionTimeline.js +185 -143
  190. package/dist/features/workspaces/components/NewWorkflowRunDialog.js +26 -18
  191. package/dist/features/workspaces/components/WorkflowRunForm.js +133 -85
  192. package/dist/features/workspaces/components/WorkspaceHomePage.js +80 -59
  193. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +69 -52
  194. package/dist/features/workspaces/components/workflow-form/HeaderSection.js +41 -27
  195. package/dist/features/workspaces/components/workflow-form/SelectionView.js +103 -64
  196. package/dist/features/workspaces/index.js +3 -3
  197. package/dist/hooks/index.js +6 -6
  198. package/dist/hooks/query-keys.js +31 -33
  199. package/dist/hooks/use-mobile.js +11 -12
  200. package/dist/hooks/useApi.js +14 -16
  201. package/dist/hooks/useAuth.js +53 -38
  202. package/dist/hooks/useConfig.js +37 -26
  203. package/dist/hooks/useDashboard.js +15 -12
  204. package/dist/hooks/useDebounce.js +11 -12
  205. package/dist/hooks/useDocuments.js +35 -23
  206. package/dist/hooks/useFiles.js +2 -1
  207. package/dist/hooks/useProcessor.js +17 -14
  208. package/dist/hooks/useSecrets.js +64 -45
  209. package/dist/hooks/useWorkflows.js +161 -109
  210. package/dist/hooks/useWorkspaces.js +123 -83
  211. package/dist/index.d.ts +1304 -0
  212. package/dist/index.js +80 -80
  213. package/dist/lib/requireParam.js +2 -4
  214. package/dist/lib/utils.js +5 -7
  215. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +4 -6
  216. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +6 -8
  217. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +17 -19
  218. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +71 -73
  219. package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +13 -16
  220. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +2 -2
  221. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +2 -4
  222. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +34 -36
  223. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +110 -138
  224. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +11 -13
  225. package/dist/node_modules/@chevrotain/utils/lib/src/print.js +3 -5
  226. package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +2 -4
  227. package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +2 -4
  228. package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1913 -1812
  229. package/dist/node_modules/@iconify/utils/lib/customisations/defaults.js +6 -8
  230. package/dist/node_modules/@iconify/utils/lib/icon/defaults.js +8 -10
  231. package/dist/node_modules/@iconify/utils/lib/icon/merge.js +6 -8
  232. package/dist/node_modules/@iconify/utils/lib/icon/name.js +6 -8
  233. package/dist/node_modules/@iconify/utils/lib/icon/transformations.js +2 -4
  234. package/dist/node_modules/@iconify/utils/lib/icon-set/get-icon.js +10 -12
  235. package/dist/node_modules/@iconify/utils/lib/icon-set/tree.js +2 -4
  236. package/dist/node_modules/@iconify/utils/lib/svg/build.js +18 -20
  237. package/dist/node_modules/@iconify/utils/lib/svg/defs.js +6 -8
  238. package/dist/node_modules/@iconify/utils/lib/svg/html.js +2 -4
  239. package/dist/node_modules/@iconify/utils/lib/svg/id.js +8 -10
  240. package/dist/node_modules/@iconify/utils/lib/svg/size.js +5 -7
  241. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +2 -2
  242. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +17 -20
  243. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +17 -20
  244. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +23 -28
  245. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +21 -26
  246. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +17 -20
  247. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +17 -20
  248. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +425 -436
  249. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +17 -20
  250. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js +38 -45
  251. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +22 -27
  252. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +2 -2
  253. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +2 -2
  254. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +2 -2
  255. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +2 -2
  256. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +2 -2
  257. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +2 -2
  258. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +2 -2
  259. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +2 -2
  260. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +52 -56
  261. package/dist/node_modules/@shikijs/core/dist/index.js +1119 -583
  262. package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +148 -163
  263. package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -4
  264. package/dist/node_modules/@shikijs/langs/dist/abap.js +2 -3
  265. package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -3
  266. package/dist/node_modules/@shikijs/langs/dist/ada.js +2 -3
  267. package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +2 -3
  268. package/dist/node_modules/@shikijs/langs/dist/angular-html.js +13 -15
  269. package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +3 -5
  270. package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +7 -9
  271. package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +3 -5
  272. package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +7 -9
  273. package/dist/node_modules/@shikijs/langs/dist/angular-template.js +3 -5
  274. package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +15 -17
  275. package/dist/node_modules/@shikijs/langs/dist/apache.js +2 -3
  276. package/dist/node_modules/@shikijs/langs/dist/apex.js +2 -3
  277. package/dist/node_modules/@shikijs/langs/dist/apl.js +13 -15
  278. package/dist/node_modules/@shikijs/langs/dist/applescript.js +2 -3
  279. package/dist/node_modules/@shikijs/langs/dist/ara.js +2 -3
  280. package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -3
  281. package/dist/node_modules/@shikijs/langs/dist/asm.js +2 -3
  282. package/dist/node_modules/@shikijs/langs/dist/astro.js +15 -17
  283. package/dist/node_modules/@shikijs/langs/dist/awk.js +2 -3
  284. package/dist/node_modules/@shikijs/langs/dist/ballerina.js +2 -3
  285. package/dist/node_modules/@shikijs/langs/dist/bat.js +2 -3
  286. package/dist/node_modules/@shikijs/langs/dist/beancount.js +2 -3
  287. package/dist/node_modules/@shikijs/langs/dist/berry.js +2 -3
  288. package/dist/node_modules/@shikijs/langs/dist/bibtex.js +2 -3
  289. package/dist/node_modules/@shikijs/langs/dist/bicep.js +2 -3
  290. package/dist/node_modules/@shikijs/langs/dist/bird2.js +2 -3
  291. package/dist/node_modules/@shikijs/langs/dist/blade.js +17 -19
  292. package/dist/node_modules/@shikijs/langs/dist/bsl.js +3 -5
  293. package/dist/node_modules/@shikijs/langs/dist/c.js +2 -3
  294. package/dist/node_modules/@shikijs/langs/dist/c3.js +2 -3
  295. package/dist/node_modules/@shikijs/langs/dist/cadence.js +2 -3
  296. package/dist/node_modules/@shikijs/langs/dist/cairo.js +3 -5
  297. package/dist/node_modules/@shikijs/langs/dist/clarity.js +2 -3
  298. package/dist/node_modules/@shikijs/langs/dist/clojure.js +2 -3
  299. package/dist/node_modules/@shikijs/langs/dist/cmake.js +2 -3
  300. package/dist/node_modules/@shikijs/langs/dist/cobol.js +7 -9
  301. package/dist/node_modules/@shikijs/langs/dist/codeowners.js +2 -3
  302. package/dist/node_modules/@shikijs/langs/dist/codeql.js +2 -3
  303. package/dist/node_modules/@shikijs/langs/dist/coffee.js +3 -5
  304. package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +2 -3
  305. package/dist/node_modules/@shikijs/langs/dist/coq.js +2 -3
  306. package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +9 -11
  307. package/dist/node_modules/@shikijs/langs/dist/cpp.js +11 -13
  308. package/dist/node_modules/@shikijs/langs/dist/crystal.js +15 -17
  309. package/dist/node_modules/@shikijs/langs/dist/csharp.js +2 -3
  310. package/dist/node_modules/@shikijs/langs/dist/css.js +2 -3
  311. package/dist/node_modules/@shikijs/langs/dist/csv.js +2 -3
  312. package/dist/node_modules/@shikijs/langs/dist/cue.js +2 -3
  313. package/dist/node_modules/@shikijs/langs/dist/cypher.js +2 -3
  314. package/dist/node_modules/@shikijs/langs/dist/d.js +2 -3
  315. package/dist/node_modules/@shikijs/langs/dist/dart.js +2 -3
  316. package/dist/node_modules/@shikijs/langs/dist/dax.js +2 -3
  317. package/dist/node_modules/@shikijs/langs/dist/desktop.js +2 -3
  318. package/dist/node_modules/@shikijs/langs/dist/diff.js +2 -3
  319. package/dist/node_modules/@shikijs/langs/dist/docker.js +2 -3
  320. package/dist/node_modules/@shikijs/langs/dist/dotenv.js +2 -3
  321. package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +2 -3
  322. package/dist/node_modules/@shikijs/langs/dist/edge.js +9 -11
  323. package/dist/node_modules/@shikijs/langs/dist/elixir.js +3 -5
  324. package/dist/node_modules/@shikijs/langs/dist/elm.js +3 -5
  325. package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -3
  326. package/dist/node_modules/@shikijs/langs/dist/erb.js +7 -9
  327. package/dist/node_modules/@shikijs/langs/dist/erlang.js +3 -5
  328. package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +9 -11
  329. package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +9 -11
  330. package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +9 -11
  331. package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +7 -9
  332. package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +3 -5
  333. package/dist/node_modules/@shikijs/langs/dist/fennel.js +2 -3
  334. package/dist/node_modules/@shikijs/langs/dist/fish.js +2 -3
  335. package/dist/node_modules/@shikijs/langs/dist/fluent.js +2 -3
  336. package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +3 -5
  337. package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -3
  338. package/dist/node_modules/@shikijs/langs/dist/fsharp.js +3 -5
  339. package/dist/node_modules/@shikijs/langs/dist/gdresource.js +7 -9
  340. package/dist/node_modules/@shikijs/langs/dist/gdscript.js +2 -3
  341. package/dist/node_modules/@shikijs/langs/dist/gdshader.js +2 -3
  342. package/dist/node_modules/@shikijs/langs/dist/genie.js +2 -3
  343. package/dist/node_modules/@shikijs/langs/dist/gherkin.js +2 -3
  344. package/dist/node_modules/@shikijs/langs/dist/git-commit.js +3 -5
  345. package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +3 -5
  346. package/dist/node_modules/@shikijs/langs/dist/gleam.js +2 -3
  347. package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +11 -13
  348. package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +11 -13
  349. package/dist/node_modules/@shikijs/langs/dist/glsl.js +3 -5
  350. package/dist/node_modules/@shikijs/langs/dist/gn.js +2 -3
  351. package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +2 -3
  352. package/dist/node_modules/@shikijs/langs/dist/go.js +2 -3
  353. package/dist/node_modules/@shikijs/langs/dist/graphql.js +11 -13
  354. package/dist/node_modules/@shikijs/langs/dist/groovy.js +2 -3
  355. package/dist/node_modules/@shikijs/langs/dist/hack.js +7 -9
  356. package/dist/node_modules/@shikijs/langs/dist/haml.js +7 -9
  357. package/dist/node_modules/@shikijs/langs/dist/handlebars.js +11 -13
  358. package/dist/node_modules/@shikijs/langs/dist/haskell.js +2 -3
  359. package/dist/node_modules/@shikijs/langs/dist/haxe.js +2 -3
  360. package/dist/node_modules/@shikijs/langs/dist/hcl.js +2 -3
  361. package/dist/node_modules/@shikijs/langs/dist/hjson.js +2 -3
  362. package/dist/node_modules/@shikijs/langs/dist/hlsl.js +2 -3
  363. package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +3 -5
  364. package/dist/node_modules/@shikijs/langs/dist/html.js +7 -9
  365. package/dist/node_modules/@shikijs/langs/dist/http.js +11 -13
  366. package/dist/node_modules/@shikijs/langs/dist/hurl.js +9 -11
  367. package/dist/node_modules/@shikijs/langs/dist/hxml.js +3 -5
  368. package/dist/node_modules/@shikijs/langs/dist/hy.js +2 -3
  369. package/dist/node_modules/@shikijs/langs/dist/imba.js +2 -3
  370. package/dist/node_modules/@shikijs/langs/dist/ini.js +2 -3
  371. package/dist/node_modules/@shikijs/langs/dist/java.js +2 -3
  372. package/dist/node_modules/@shikijs/langs/dist/javascript.js +2 -3
  373. package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +3 -5
  374. package/dist/node_modules/@shikijs/langs/dist/jinja.js +3 -5
  375. package/dist/node_modules/@shikijs/langs/dist/jison.js +3 -5
  376. package/dist/node_modules/@shikijs/langs/dist/json.js +2 -3
  377. package/dist/node_modules/@shikijs/langs/dist/json5.js +2 -3
  378. package/dist/node_modules/@shikijs/langs/dist/jsonc.js +2 -3
  379. package/dist/node_modules/@shikijs/langs/dist/jsonl.js +2 -3
  380. package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +2 -3
  381. package/dist/node_modules/@shikijs/langs/dist/jssm.js +2 -3
  382. package/dist/node_modules/@shikijs/langs/dist/jsx.js +2 -3
  383. package/dist/node_modules/@shikijs/langs/dist/julia.js +13 -15
  384. package/dist/node_modules/@shikijs/langs/dist/just.js +15 -17
  385. package/dist/node_modules/@shikijs/langs/dist/kdl.js +2 -3
  386. package/dist/node_modules/@shikijs/langs/dist/kotlin.js +2 -3
  387. package/dist/node_modules/@shikijs/langs/dist/kusto.js +2 -3
  388. package/dist/node_modules/@shikijs/langs/dist/latex.js +3 -5
  389. package/dist/node_modules/@shikijs/langs/dist/lean.js +2 -3
  390. package/dist/node_modules/@shikijs/langs/dist/less.js +2 -3
  391. package/dist/node_modules/@shikijs/langs/dist/liquid.js +11 -13
  392. package/dist/node_modules/@shikijs/langs/dist/llvm.js +2 -3
  393. package/dist/node_modules/@shikijs/langs/dist/log.js +2 -3
  394. package/dist/node_modules/@shikijs/langs/dist/logo.js +2 -3
  395. package/dist/node_modules/@shikijs/langs/dist/lua.js +3 -5
  396. package/dist/node_modules/@shikijs/langs/dist/luau.js +2 -3
  397. package/dist/node_modules/@shikijs/langs/dist/make.js +2 -3
  398. package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -3
  399. package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -3
  400. package/dist/node_modules/@shikijs/langs/dist/markdown.js +2 -3
  401. package/dist/node_modules/@shikijs/langs/dist/marko.js +11 -13
  402. package/dist/node_modules/@shikijs/langs/dist/matlab.js +2 -3
  403. package/dist/node_modules/@shikijs/langs/dist/mdc.js +9 -11
  404. package/dist/node_modules/@shikijs/langs/dist/mdx.js +2 -3
  405. package/dist/node_modules/@shikijs/langs/dist/mermaid.js +2 -3
  406. package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +2 -3
  407. package/dist/node_modules/@shikijs/langs/dist/mojo.js +2 -3
  408. package/dist/node_modules/@shikijs/langs/dist/moonbit.js +2 -3
  409. package/dist/node_modules/@shikijs/langs/dist/move.js +2 -3
  410. package/dist/node_modules/@shikijs/langs/dist/narrat.js +2 -3
  411. package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -3
  412. package/dist/node_modules/@shikijs/langs/dist/nextflow.js +3 -5
  413. package/dist/node_modules/@shikijs/langs/dist/nginx.js +3 -5
  414. package/dist/node_modules/@shikijs/langs/dist/nim.js +17 -19
  415. package/dist/node_modules/@shikijs/langs/dist/nix.js +3 -5
  416. package/dist/node_modules/@shikijs/langs/dist/nushell.js +2 -3
  417. package/dist/node_modules/@shikijs/langs/dist/objective-c.js +2 -3
  418. package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -3
  419. package/dist/node_modules/@shikijs/langs/dist/ocaml.js +2 -3
  420. package/dist/node_modules/@shikijs/langs/dist/odin.js +2 -3
  421. package/dist/node_modules/@shikijs/langs/dist/openscad.js +2 -3
  422. package/dist/node_modules/@shikijs/langs/dist/pascal.js +2 -3
  423. package/dist/node_modules/@shikijs/langs/dist/perl.js +13 -15
  424. package/dist/node_modules/@shikijs/langs/dist/php.js +15 -17
  425. package/dist/node_modules/@shikijs/langs/dist/pkl.js +2 -3
  426. package/dist/node_modules/@shikijs/langs/dist/plsql.js +2 -3
  427. package/dist/node_modules/@shikijs/langs/dist/po.js +2 -3
  428. package/dist/node_modules/@shikijs/langs/dist/polar.js +2 -3
  429. package/dist/node_modules/@shikijs/langs/dist/postcss.js +2 -3
  430. package/dist/node_modules/@shikijs/langs/dist/powerquery.js +2 -3
  431. package/dist/node_modules/@shikijs/langs/dist/powershell.js +2 -3
  432. package/dist/node_modules/@shikijs/langs/dist/prisma.js +2 -3
  433. package/dist/node_modules/@shikijs/langs/dist/prolog.js +2 -3
  434. package/dist/node_modules/@shikijs/langs/dist/proto.js +2 -3
  435. package/dist/node_modules/@shikijs/langs/dist/pug.js +9 -11
  436. package/dist/node_modules/@shikijs/langs/dist/puppet.js +2 -3
  437. package/dist/node_modules/@shikijs/langs/dist/purescript.js +2 -3
  438. package/dist/node_modules/@shikijs/langs/dist/python.js +2 -3
  439. package/dist/node_modules/@shikijs/langs/dist/qml.js +3 -5
  440. package/dist/node_modules/@shikijs/langs/dist/qmldir.js +2 -3
  441. package/dist/node_modules/@shikijs/langs/dist/qss.js +2 -3
  442. package/dist/node_modules/@shikijs/langs/dist/r.js +2 -3
  443. package/dist/node_modules/@shikijs/langs/dist/racket.js +2 -3
  444. package/dist/node_modules/@shikijs/langs/dist/raku.js +2 -3
  445. package/dist/node_modules/@shikijs/langs/dist/razor.js +7 -9
  446. package/dist/node_modules/@shikijs/langs/dist/reg.js +2 -3
  447. package/dist/node_modules/@shikijs/langs/dist/regexp.js +2 -3
  448. package/dist/node_modules/@shikijs/langs/dist/rel.js +2 -3
  449. package/dist/node_modules/@shikijs/langs/dist/riscv.js +2 -3
  450. package/dist/node_modules/@shikijs/langs/dist/ron.js +2 -3
  451. package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +2 -3
  452. package/dist/node_modules/@shikijs/langs/dist/rst.js +19 -21
  453. package/dist/node_modules/@shikijs/langs/dist/ruby.js +27 -29
  454. package/dist/node_modules/@shikijs/langs/dist/rust.js +2 -3
  455. package/dist/node_modules/@shikijs/langs/dist/sas.js +3 -5
  456. package/dist/node_modules/@shikijs/langs/dist/sass.js +2 -3
  457. package/dist/node_modules/@shikijs/langs/dist/scala.js +2 -3
  458. package/dist/node_modules/@shikijs/langs/dist/scheme.js +2 -3
  459. package/dist/node_modules/@shikijs/langs/dist/scss.js +3 -5
  460. package/dist/node_modules/@shikijs/langs/dist/sdbl.js +2 -3
  461. package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +3 -5
  462. package/dist/node_modules/@shikijs/langs/dist/shellscript.js +2 -3
  463. package/dist/node_modules/@shikijs/langs/dist/shellsession.js +3 -5
  464. package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +2 -3
  465. package/dist/node_modules/@shikijs/langs/dist/solidity.js +2 -3
  466. package/dist/node_modules/@shikijs/langs/dist/soy.js +3 -5
  467. package/dist/node_modules/@shikijs/langs/dist/sparql.js +3 -5
  468. package/dist/node_modules/@shikijs/langs/dist/splunk.js +2 -3
  469. package/dist/node_modules/@shikijs/langs/dist/sql.js +2 -3
  470. package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +2 -3
  471. package/dist/node_modules/@shikijs/langs/dist/stata.js +3 -5
  472. package/dist/node_modules/@shikijs/langs/dist/stylus.js +2 -3
  473. package/dist/node_modules/@shikijs/langs/dist/surrealql.js +3 -5
  474. package/dist/node_modules/@shikijs/langs/dist/svelte.js +11 -13
  475. package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -3
  476. package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +2 -3
  477. package/dist/node_modules/@shikijs/langs/dist/systemd.js +2 -3
  478. package/dist/node_modules/@shikijs/langs/dist/talonscript.js +2 -3
  479. package/dist/node_modules/@shikijs/langs/dist/tasl.js +2 -3
  480. package/dist/node_modules/@shikijs/langs/dist/tcl.js +2 -3
  481. package/dist/node_modules/@shikijs/langs/dist/templ.js +9 -11
  482. package/dist/node_modules/@shikijs/langs/dist/terraform.js +2 -3
  483. package/dist/node_modules/@shikijs/langs/dist/tex.js +3 -5
  484. package/dist/node_modules/@shikijs/langs/dist/toml.js +2 -3
  485. package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +15 -17
  486. package/dist/node_modules/@shikijs/langs/dist/tsv.js +2 -3
  487. package/dist/node_modules/@shikijs/langs/dist/tsx.js +2 -3
  488. package/dist/node_modules/@shikijs/langs/dist/turtle.js +2 -3
  489. package/dist/node_modules/@shikijs/langs/dist/twig.js +15 -17
  490. package/dist/node_modules/@shikijs/langs/dist/typescript.js +2 -3
  491. package/dist/node_modules/@shikijs/langs/dist/typespec.js +2 -3
  492. package/dist/node_modules/@shikijs/langs/dist/typst.js +2 -3
  493. package/dist/node_modules/@shikijs/langs/dist/v.js +2 -3
  494. package/dist/node_modules/@shikijs/langs/dist/vala.js +2 -3
  495. package/dist/node_modules/@shikijs/langs/dist/vb.js +2 -3
  496. package/dist/node_modules/@shikijs/langs/dist/verilog.js +2 -3
  497. package/dist/node_modules/@shikijs/langs/dist/vhdl.js +2 -3
  498. package/dist/node_modules/@shikijs/langs/dist/viml.js +2 -3
  499. package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +2 -3
  500. package/dist/node_modules/@shikijs/langs/dist/vue-html.js +3 -5
  501. package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -3
  502. package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +3 -5
  503. package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +15 -17
  504. package/dist/node_modules/@shikijs/langs/dist/vue.js +23 -25
  505. package/dist/node_modules/@shikijs/langs/dist/vyper.js +2 -3
  506. package/dist/node_modules/@shikijs/langs/dist/wasm.js +2 -3
  507. package/dist/node_modules/@shikijs/langs/dist/wenyan.js +2 -3
  508. package/dist/node_modules/@shikijs/langs/dist/wgsl.js +2 -3
  509. package/dist/node_modules/@shikijs/langs/dist/wikitext.js +2 -3
  510. package/dist/node_modules/@shikijs/langs/dist/wit.js +2 -3
  511. package/dist/node_modules/@shikijs/langs/dist/wolfram.js +2 -3
  512. package/dist/node_modules/@shikijs/langs/dist/xml.js +3 -5
  513. package/dist/node_modules/@shikijs/langs/dist/xsl.js +3 -5
  514. package/dist/node_modules/@shikijs/langs/dist/yaml.js +2 -3
  515. package/dist/node_modules/@shikijs/langs/dist/zenscript.js +2 -3
  516. package/dist/node_modules/@shikijs/langs/dist/zig.js +2 -3
  517. package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +2 -4
  518. package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +2 -4
  519. package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -4
  520. package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +2 -4
  521. package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -4
  522. package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -4
  523. package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -4
  524. package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -4
  525. package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -4
  526. package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +2 -4
  527. package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -4
  528. package/dist/node_modules/@shikijs/themes/dist/dracula.js +2 -4
  529. package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -4
  530. package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +2 -4
  531. package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -4
  532. package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -4
  533. package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -4
  534. package/dist/node_modules/@shikijs/themes/dist/github-dark.js +2 -4
  535. package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +2 -4
  536. package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -4
  537. package/dist/node_modules/@shikijs/themes/dist/github-light.js +2 -4
  538. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -4
  539. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -4
  540. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -4
  541. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -4
  542. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -4
  543. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -4
  544. package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -4
  545. package/dist/node_modules/@shikijs/themes/dist/horizon.js +2 -4
  546. package/dist/node_modules/@shikijs/themes/dist/houston.js +2 -4
  547. package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -4
  548. package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -4
  549. package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -4
  550. package/dist/node_modules/@shikijs/themes/dist/laserwave.js +2 -4
  551. package/dist/node_modules/@shikijs/themes/dist/light-plus.js +2 -4
  552. package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -4
  553. package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -4
  554. package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -4
  555. package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -4
  556. package/dist/node_modules/@shikijs/themes/dist/material-theme.js +2 -4
  557. package/dist/node_modules/@shikijs/themes/dist/min-dark.js +2 -4
  558. package/dist/node_modules/@shikijs/themes/dist/min-light.js +2 -4
  559. package/dist/node_modules/@shikijs/themes/dist/monokai.js +2 -4
  560. package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -4
  561. package/dist/node_modules/@shikijs/themes/dist/night-owl.js +2 -4
  562. package/dist/node_modules/@shikijs/themes/dist/nord.js +2 -4
  563. package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -4
  564. package/dist/node_modules/@shikijs/themes/dist/one-light.js +2 -4
  565. package/dist/node_modules/@shikijs/themes/dist/plastic.js +2 -4
  566. package/dist/node_modules/@shikijs/themes/dist/poimandres.js +2 -4
  567. package/dist/node_modules/@shikijs/themes/dist/red.js +2 -4
  568. package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -4
  569. package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -4
  570. package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +2 -4
  571. package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +2 -4
  572. package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -4
  573. package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -4
  574. package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -4
  575. package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +2 -4
  576. package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -4
  577. package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -4
  578. package/dist/node_modules/@shikijs/themes/dist/vesper.js +2 -4
  579. package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -4
  580. package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -4
  581. package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -4
  582. package/dist/node_modules/@shikijs/types/dist/index.js +2 -4
  583. package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +947 -949
  584. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +30 -30
  585. package/dist/node_modules/@ungap/structured-clone/esm/index.js +4 -6
  586. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +64 -64
  587. package/dist/node_modules/@ungap/structured-clone/esm/types.js +2 -0
  588. package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +693 -695
  589. package/dist/node_modules/@xyflow/react/dist/esm/index.js +881 -883
  590. package/dist/node_modules/@xyflow/system/dist/esm/index.js +1221 -1223
  591. package/dist/node_modules/bail/index.js +2 -4
  592. package/dist/node_modules/ccount/index.js +2 -4
  593. package/dist/node_modules/character-entities-html4/index.js +2 -4
  594. package/dist/node_modules/character-entities-legacy/index.js +2 -4
  595. package/dist/node_modules/chevrotain/lib/src/api.js +10 -10
  596. package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +4 -6
  597. package/dist/node_modules/chevrotain/lib/src/parse/constants.js +2 -4
  598. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +9 -11
  599. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +15 -17
  600. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +17 -19
  601. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +24 -26
  602. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +201 -203
  603. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +16 -18
  604. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +17 -19
  605. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +12 -14
  606. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +140 -142
  607. package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +4 -5
  608. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +25 -27
  609. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +149 -151
  610. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +14 -16
  611. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +38 -40
  612. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +64 -65
  613. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +11 -13
  614. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +101 -103
  615. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +5 -7
  616. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +45 -47
  617. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +6 -8
  618. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +73 -75
  619. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +180 -182
  620. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +23 -24
  621. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +26 -28
  622. package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +2 -4
  623. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +246 -246
  624. package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +2 -4
  625. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +31 -33
  626. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +64 -67
  627. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +10 -12
  628. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +35 -36
  629. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +26 -28
  630. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +240 -242
  631. package/dist/node_modules/chevrotain-allstar/lib/atn.js +133 -134
  632. package/dist/node_modules/chevrotain-allstar/lib/dfa.js +10 -11
  633. package/dist/node_modules/chevrotain-allstar/lib/index.js +1 -1
  634. package/dist/node_modules/classcat/index.js +3 -5
  635. package/dist/node_modules/comma-separated-tokens/index.js +3 -5
  636. package/dist/node_modules/cose-base/cose-base.js +21 -21
  637. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +7940 -7937
  638. package/dist/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +6 -8
  639. package/dist/node_modules/cytoscape-fcose/cytoscape-fcose.js +6 -8
  640. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js +20 -20
  641. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js +4 -6
  642. package/dist/node_modules/d3/src/index.js +95 -95
  643. package/dist/node_modules/d3-array/src/ascending.js +2 -4
  644. package/dist/node_modules/d3-array/src/bisect.js +8 -8
  645. package/dist/node_modules/d3-array/src/bisector.js +6 -8
  646. package/dist/node_modules/d3-array/src/descending.js +2 -4
  647. package/dist/node_modules/d3-array/src/max.js +2 -4
  648. package/dist/node_modules/d3-array/src/min.js +2 -4
  649. package/dist/node_modules/d3-array/src/number.js +2 -4
  650. package/dist/node_modules/d3-array/src/range.js +2 -4
  651. package/dist/node_modules/d3-array/src/ticks.js +11 -13
  652. package/dist/node_modules/d3-axis/src/axis.js +46 -48
  653. package/dist/node_modules/d3-axis/src/identity.js +2 -4
  654. package/dist/node_modules/d3-brush/src/brush.js +4 -6
  655. package/dist/node_modules/d3-color/src/color.js +84 -86
  656. package/dist/node_modules/d3-color/src/define.js +3 -5
  657. package/dist/node_modules/d3-color/src/lab.js +43 -45
  658. package/dist/node_modules/d3-color/src/math.js +2 -4
  659. package/dist/node_modules/d3-dispatch/src/dispatch.js +17 -18
  660. package/dist/node_modules/d3-drag/src/constant.js +2 -4
  661. package/dist/node_modules/d3-drag/src/drag.js +75 -77
  662. package/dist/node_modules/d3-drag/src/event.js +3 -5
  663. package/dist/node_modules/d3-drag/src/nodrag.js +9 -11
  664. package/dist/node_modules/d3-drag/src/noevent.js +4 -6
  665. package/dist/node_modules/d3-ease/src/cubic.js +2 -4
  666. package/dist/node_modules/d3-format/src/defaultLocale.js +6 -8
  667. package/dist/node_modules/d3-format/src/exponent.js +4 -6
  668. package/dist/node_modules/d3-format/src/formatDecimal.js +3 -5
  669. package/dist/node_modules/d3-format/src/formatGroup.js +2 -4
  670. package/dist/node_modules/d3-format/src/formatNumerals.js +2 -4
  671. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +8 -10
  672. package/dist/node_modules/d3-format/src/formatRounded.js +4 -6
  673. package/dist/node_modules/d3-format/src/formatSpecifier.js +8 -10
  674. package/dist/node_modules/d3-format/src/formatTrim.js +2 -4
  675. package/dist/node_modules/d3-format/src/formatTypes.js +13 -15
  676. package/dist/node_modules/d3-format/src/identity.js +2 -4
  677. package/dist/node_modules/d3-format/src/locale.js +31 -33
  678. package/dist/node_modules/d3-format/src/precisionFixed.js +4 -6
  679. package/dist/node_modules/d3-format/src/precisionPrefix.js +4 -6
  680. package/dist/node_modules/d3-format/src/precisionRound.js +4 -6
  681. package/dist/node_modules/d3-hierarchy/src/accessors.js +2 -4
  682. package/dist/node_modules/d3-hierarchy/src/constant.js +3 -5
  683. package/dist/node_modules/d3-hierarchy/src/hierarchy/ancestors.js +2 -4
  684. package/dist/node_modules/d3-hierarchy/src/hierarchy/count.js +4 -6
  685. package/dist/node_modules/d3-hierarchy/src/hierarchy/descendants.js +2 -4
  686. package/dist/node_modules/d3-hierarchy/src/hierarchy/each.js +2 -4
  687. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js +2 -4
  688. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js +2 -4
  689. package/dist/node_modules/d3-hierarchy/src/hierarchy/find.js +2 -4
  690. package/dist/node_modules/d3-hierarchy/src/hierarchy/index.js +44 -46
  691. package/dist/node_modules/d3-hierarchy/src/hierarchy/iterator.js +2 -4
  692. package/dist/node_modules/d3-hierarchy/src/hierarchy/leaves.js +2 -4
  693. package/dist/node_modules/d3-hierarchy/src/hierarchy/links.js +2 -4
  694. package/dist/node_modules/d3-hierarchy/src/hierarchy/path.js +4 -6
  695. package/dist/node_modules/d3-hierarchy/src/hierarchy/sort.js +2 -4
  696. package/dist/node_modules/d3-hierarchy/src/hierarchy/sum.js +2 -4
  697. package/dist/node_modules/d3-hierarchy/src/treemap/dice.js +2 -4
  698. package/dist/node_modules/d3-hierarchy/src/treemap/index.js +14 -16
  699. package/dist/node_modules/d3-hierarchy/src/treemap/round.js +2 -4
  700. package/dist/node_modules/d3-hierarchy/src/treemap/slice.js +2 -4
  701. package/dist/node_modules/d3-hierarchy/src/treemap/squarify.js +9 -11
  702. package/dist/node_modules/d3-interpolate/src/array.js +4 -6
  703. package/dist/node_modules/d3-interpolate/src/basis.js +4 -6
  704. package/dist/node_modules/d3-interpolate/src/basisClosed.js +4 -6
  705. package/dist/node_modules/d3-interpolate/src/color.js +17 -19
  706. package/dist/node_modules/d3-interpolate/src/constant.js +2 -4
  707. package/dist/node_modules/d3-interpolate/src/date.js +2 -4
  708. package/dist/node_modules/d3-interpolate/src/hcl.js +6 -8
  709. package/dist/node_modules/d3-interpolate/src/number.js +2 -4
  710. package/dist/node_modules/d3-interpolate/src/numberArray.js +3 -5
  711. package/dist/node_modules/d3-interpolate/src/object.js +4 -6
  712. package/dist/node_modules/d3-interpolate/src/rgb.js +9 -11
  713. package/dist/node_modules/d3-interpolate/src/round.js +2 -4
  714. package/dist/node_modules/d3-interpolate/src/string.js +14 -16
  715. package/dist/node_modules/d3-interpolate/src/transform/decompose.js +5 -7
  716. package/dist/node_modules/d3-interpolate/src/transform/index.js +11 -13
  717. package/dist/node_modules/d3-interpolate/src/transform/parse.js +8 -10
  718. package/dist/node_modules/d3-interpolate/src/value.js +12 -14
  719. package/dist/node_modules/d3-interpolate/src/zoom.js +11 -13
  720. package/dist/node_modules/d3-path/src/path.js +14 -16
  721. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/max.js +2 -4
  722. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/min.js +2 -4
  723. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/sum.js +2 -4
  724. package/dist/node_modules/d3-sankey/node_modules/d3-path/src/path.js +12 -13
  725. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/array.js +2 -4
  726. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +2 -4
  727. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js +17 -19
  728. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/point.js +3 -5
  729. package/dist/node_modules/d3-sankey/src/align.js +10 -12
  730. package/dist/node_modules/d3-sankey/src/constant.js +2 -4
  731. package/dist/node_modules/d3-sankey/src/sankey.js +168 -170
  732. package/dist/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +6 -8
  733. package/dist/node_modules/d3-scale/src/band.js +9 -11
  734. package/dist/node_modules/d3-scale/src/constant.js +2 -4
  735. package/dist/node_modules/d3-scale/src/continuous.js +47 -49
  736. package/dist/node_modules/d3-scale/src/init.js +2 -4
  737. package/dist/node_modules/d3-scale/src/linear.js +13 -15
  738. package/dist/node_modules/d3-scale/src/nice.js +2 -4
  739. package/dist/node_modules/d3-scale/src/number.js +2 -4
  740. package/dist/node_modules/d3-scale/src/ordinal.js +16 -18
  741. package/dist/node_modules/d3-scale/src/tickFormat.js +14 -16
  742. package/dist/node_modules/d3-scale/src/time.js +34 -36
  743. package/dist/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js +3 -5
  744. package/dist/node_modules/d3-scale-chromatic/src/colors.js +2 -4
  745. package/dist/node_modules/d3-selection/src/array.js +2 -4
  746. package/dist/node_modules/d3-selection/src/constant.js +2 -4
  747. package/dist/node_modules/d3-selection/src/creator.js +10 -12
  748. package/dist/node_modules/d3-selection/src/matcher.js +3 -5
  749. package/dist/node_modules/d3-selection/src/namespace.js +5 -7
  750. package/dist/node_modules/d3-selection/src/namespaces.js +3 -5
  751. package/dist/node_modules/d3-selection/src/pointer.js +4 -6
  752. package/dist/node_modules/d3-selection/src/select.js +4 -6
  753. package/dist/node_modules/d3-selection/src/selection/append.js +4 -6
  754. package/dist/node_modules/d3-selection/src/selection/attr.js +17 -19
  755. package/dist/node_modules/d3-selection/src/selection/call.js +2 -4
  756. package/dist/node_modules/d3-selection/src/selection/classed.js +23 -25
  757. package/dist/node_modules/d3-selection/src/selection/clone.js +5 -7
  758. package/dist/node_modules/d3-selection/src/selection/data.js +16 -18
  759. package/dist/node_modules/d3-selection/src/selection/datum.js +2 -4
  760. package/dist/node_modules/d3-selection/src/selection/dispatch.js +10 -12
  761. package/dist/node_modules/d3-selection/src/selection/each.js +2 -4
  762. package/dist/node_modules/d3-selection/src/selection/empty.js +2 -4
  763. package/dist/node_modules/d3-selection/src/selection/enter.js +11 -13
  764. package/dist/node_modules/d3-selection/src/selection/exit.js +5 -7
  765. package/dist/node_modules/d3-selection/src/selection/filter.js +6 -8
  766. package/dist/node_modules/d3-selection/src/selection/html.js +6 -8
  767. package/dist/node_modules/d3-selection/src/selection/index.js +79 -80
  768. package/dist/node_modules/d3-selection/src/selection/insert.js +6 -8
  769. package/dist/node_modules/d3-selection/src/selection/iterator.js +2 -4
  770. package/dist/node_modules/d3-selection/src/selection/join.js +2 -4
  771. package/dist/node_modules/d3-selection/src/selection/lower.js +4 -6
  772. package/dist/node_modules/d3-selection/src/selection/merge.js +4 -6
  773. package/dist/node_modules/d3-selection/src/selection/node.js +2 -4
  774. package/dist/node_modules/d3-selection/src/selection/nodes.js +2 -4
  775. package/dist/node_modules/d3-selection/src/selection/on.js +9 -11
  776. package/dist/node_modules/d3-selection/src/selection/order.js +2 -4
  777. package/dist/node_modules/d3-selection/src/selection/property.js +6 -8
  778. package/dist/node_modules/d3-selection/src/selection/raise.js +4 -6
  779. package/dist/node_modules/d3-selection/src/selection/remove.js +4 -6
  780. package/dist/node_modules/d3-selection/src/selection/select.js +6 -8
  781. package/dist/node_modules/d3-selection/src/selection/selectAll.js +9 -11
  782. package/dist/node_modules/d3-selection/src/selection/selectChild.js +8 -10
  783. package/dist/node_modules/d3-selection/src/selection/selectChildren.js +8 -10
  784. package/dist/node_modules/d3-selection/src/selection/size.js +2 -4
  785. package/dist/node_modules/d3-selection/src/selection/sort.js +6 -8
  786. package/dist/node_modules/d3-selection/src/selection/sparse.js +2 -4
  787. package/dist/node_modules/d3-selection/src/selection/style.js +12 -14
  788. package/dist/node_modules/d3-selection/src/selection/text.js +6 -8
  789. package/dist/node_modules/d3-selection/src/selector.js +4 -6
  790. package/dist/node_modules/d3-selection/src/selectorAll.js +4 -6
  791. package/dist/node_modules/d3-selection/src/sourceEvent.js +2 -4
  792. package/dist/node_modules/d3-selection/src/window.js +2 -4
  793. package/dist/node_modules/d3-shape/src/arc.js +36 -38
  794. package/dist/node_modules/d3-shape/src/array.js +2 -3
  795. package/dist/node_modules/d3-shape/src/constant.js +2 -4
  796. package/dist/node_modules/d3-shape/src/curve/basis.js +8 -10
  797. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +16 -18
  798. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +7 -9
  799. package/dist/node_modules/d3-shape/src/curve/bump.js +13 -15
  800. package/dist/node_modules/d3-shape/src/curve/bundle.js +7 -9
  801. package/dist/node_modules/d3-shape/src/curve/cardinal.js +8 -10
  802. package/dist/node_modules/d3-shape/src/curve/cardinalClosed.js +10 -12
  803. package/dist/node_modules/d3-shape/src/curve/cardinalOpen.js +7 -9
  804. package/dist/node_modules/d3-shape/src/curve/catmullRom.js +17 -19
  805. package/dist/node_modules/d3-shape/src/curve/catmullRomClosed.js +11 -13
  806. package/dist/node_modules/d3-shape/src/curve/catmullRomOpen.js +8 -10
  807. package/dist/node_modules/d3-shape/src/curve/linear.js +5 -7
  808. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +10 -12
  809. package/dist/node_modules/d3-shape/src/curve/monotone.js +21 -23
  810. package/dist/node_modules/d3-shape/src/curve/natural.js +7 -9
  811. package/dist/node_modules/d3-shape/src/curve/step.js +17 -19
  812. package/dist/node_modules/d3-shape/src/descending.js +2 -4
  813. package/dist/node_modules/d3-shape/src/identity.js +2 -4
  814. package/dist/node_modules/d3-shape/src/line.js +17 -19
  815. package/dist/node_modules/d3-shape/src/math.js +6 -8
  816. package/dist/node_modules/d3-shape/src/noop.js +2 -4
  817. package/dist/node_modules/d3-shape/src/path.js +4 -6
  818. package/dist/node_modules/d3-shape/src/pie.js +13 -15
  819. package/dist/node_modules/d3-shape/src/point.js +3 -5
  820. package/dist/node_modules/d3-time/src/day.js +15 -17
  821. package/dist/node_modules/d3-time/src/duration.js +2 -4
  822. package/dist/node_modules/d3-time/src/hour.js +14 -16
  823. package/dist/node_modules/d3-time/src/interval.js +5 -7
  824. package/dist/node_modules/d3-time/src/millisecond.js +5 -7
  825. package/dist/node_modules/d3-time/src/minute.js +14 -16
  826. package/dist/node_modules/d3-time/src/month.js +12 -14
  827. package/dist/node_modules/d3-time/src/second.js +7 -9
  828. package/dist/node_modules/d3-time/src/ticks.js +64 -66
  829. package/dist/node_modules/d3-time/src/week.js +19 -21
  830. package/dist/node_modules/d3-time/src/year.js +8 -10
  831. package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -8
  832. package/dist/node_modules/d3-time-format/src/locale.js +344 -346
  833. package/dist/node_modules/d3-timer/src/timeout.js +4 -6
  834. package/dist/node_modules/d3-timer/src/timer.js +31 -33
  835. package/dist/node_modules/d3-transition/src/index.js +2 -2
  836. package/dist/node_modules/d3-transition/src/interrupt.js +3 -4
  837. package/dist/node_modules/d3-transition/src/selection/index.js +4 -5
  838. package/dist/node_modules/d3-transition/src/selection/interrupt.js +4 -6
  839. package/dist/node_modules/d3-transition/src/selection/transition.js +14 -16
  840. package/dist/node_modules/d3-transition/src/transition/attr.js +26 -28
  841. package/dist/node_modules/d3-transition/src/transition/attrTween.js +11 -13
  842. package/dist/node_modules/d3-transition/src/transition/delay.js +9 -11
  843. package/dist/node_modules/d3-transition/src/transition/duration.js +9 -11
  844. package/dist/node_modules/d3-transition/src/transition/ease.js +6 -8
  845. package/dist/node_modules/d3-transition/src/transition/easeVarying.js +6 -8
  846. package/dist/node_modules/d3-transition/src/transition/end.js +4 -6
  847. package/dist/node_modules/d3-transition/src/transition/filter.js +6 -8
  848. package/dist/node_modules/d3-transition/src/transition/index.js +61 -63
  849. package/dist/node_modules/d3-transition/src/transition/interpolate.js +7 -9
  850. package/dist/node_modules/d3-transition/src/transition/merge.js +4 -6
  851. package/dist/node_modules/d3-transition/src/transition/on.js +7 -9
  852. package/dist/node_modules/d3-transition/src/transition/remove.js +4 -6
  853. package/dist/node_modules/d3-transition/src/transition/schedule.js +18 -20
  854. package/dist/node_modules/d3-transition/src/transition/select.js +8 -10
  855. package/dist/node_modules/d3-transition/src/transition/selectAll.js +8 -10
  856. package/dist/node_modules/d3-transition/src/transition/selection.js +5 -7
  857. package/dist/node_modules/d3-transition/src/transition/style.js +19 -21
  858. package/dist/node_modules/d3-transition/src/transition/styleTween.js +6 -8
  859. package/dist/node_modules/d3-transition/src/transition/text.js +6 -8
  860. package/dist/node_modules/d3-transition/src/transition/textTween.js +6 -8
  861. package/dist/node_modules/d3-transition/src/transition/transition.js +8 -10
  862. package/dist/node_modules/d3-transition/src/transition/tween.js +12 -14
  863. package/dist/node_modules/d3-zoom/src/constant.js +2 -4
  864. package/dist/node_modules/d3-zoom/src/event.js +2 -4
  865. package/dist/node_modules/d3-zoom/src/index.js +2 -2
  866. package/dist/node_modules/d3-zoom/src/noevent.js +3 -5
  867. package/dist/node_modules/d3-zoom/src/transform.js +10 -12
  868. package/dist/node_modules/d3-zoom/src/zoom.js +114 -116
  869. package/dist/node_modules/dagre-d3-es/src/dagre/acyclic.js +12 -14
  870. package/dist/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +9 -11
  871. package/dist/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +34 -36
  872. package/dist/node_modules/dagre-d3-es/src/dagre/data/list.js +7 -9
  873. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +49 -51
  874. package/dist/node_modules/dagre-d3-es/src/dagre/index.js +2 -2
  875. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +163 -165
  876. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +43 -45
  877. package/dist/node_modules/dagre-d3-es/src/dagre/normalize.js +10 -12
  878. package/dist/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +4 -6
  879. package/dist/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +6 -8
  880. package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +12 -14
  881. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +20 -22
  882. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +34 -36
  883. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +13 -15
  884. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +30 -32
  885. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +28 -30
  886. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +18 -20
  887. package/dist/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +10 -12
  888. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +148 -150
  889. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +18 -20
  890. package/dist/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +17 -19
  891. package/dist/node_modules/dagre-d3-es/src/dagre/rank/index.js +14 -16
  892. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +63 -64
  893. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -10
  894. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +82 -84
  895. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +13 -15
  896. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js +2 -3
  897. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js +2 -3
  898. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/index.js +3 -3
  899. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +4 -6
  900. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +4 -6
  901. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +11 -13
  902. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +129 -131
  903. package/dist/node_modules/dagre-d3-es/src/graphlib/index.js +1 -1
  904. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +16 -18
  905. package/dist/node_modules/dayjs/dayjs.min.js +4 -6
  906. package/dist/node_modules/dayjs/plugin/advancedFormat.js +4 -6
  907. package/dist/node_modules/dayjs/plugin/customParseFormat.js +4 -6
  908. package/dist/node_modules/dayjs/plugin/duration.js +4 -6
  909. package/dist/node_modules/dayjs/plugin/isoWeek.js +4 -6
  910. package/dist/node_modules/decode-named-character-reference/index.dom.js +5 -7
  911. package/dist/node_modules/devlop/lib/default.js +2 -4
  912. package/dist/node_modules/dompurify/dist/purify.es.js +180 -182
  913. package/dist/node_modules/entities/dist/esm/decode-codepoint.js +4 -6
  914. package/dist/node_modules/entities/dist/esm/decode.js +85 -87
  915. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +2 -4
  916. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +4 -6
  917. package/dist/node_modules/extend/index.js +6 -9
  918. package/dist/node_modules/hast-util-from-dom/lib/index.js +30 -32
  919. package/dist/node_modules/hast-util-from-html-isomorphic/lib/browser.js +8 -10
  920. package/dist/node_modules/hast-util-from-parse5/lib/index.js +80 -82
  921. package/dist/node_modules/hast-util-is-element/lib/index.js +15 -17
  922. package/dist/node_modules/hast-util-parse-selector/lib/index.js +5 -7
  923. package/dist/node_modules/hast-util-raw/lib/index.js +134 -136
  924. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +21 -23
  925. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +3 -5
  926. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +89 -89
  927. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +249 -250
  928. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +4 -6
  929. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +14 -14
  930. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +4 -4
  931. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +15 -17
  932. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1495 -1497
  933. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +146 -148
  934. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +19 -20
  935. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +798 -800
  936. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +31 -33
  937. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +8 -10
  938. package/dist/node_modules/hast-util-sanitize/lib/index.js +104 -106
  939. package/dist/node_modules/hast-util-sanitize/lib/schema.js +11 -12
  940. package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +7 -9
  941. package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +2 -4
  942. package/dist/node_modules/hast-util-to-html/lib/handle/element.js +23 -25
  943. package/dist/node_modules/hast-util-to-html/lib/handle/index.js +21 -22
  944. package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +4 -6
  945. package/dist/node_modules/hast-util-to-html/lib/handle/root.js +2 -4
  946. package/dist/node_modules/hast-util-to-html/lib/handle/text.js +5 -7
  947. package/dist/node_modules/hast-util-to-html/lib/index.js +36 -38
  948. package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +68 -70
  949. package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +4 -6
  950. package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +30 -32
  951. package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +9 -10
  952. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +190 -192
  953. package/dist/node_modules/hast-util-to-parse5/lib/index.js +69 -71
  954. package/dist/node_modules/hast-util-to-text/lib/index.js +59 -61
  955. package/dist/node_modules/hast-util-whitespace/lib/index.js +6 -8
  956. package/dist/node_modules/hastscript/lib/create-h.js +24 -26
  957. package/dist/node_modules/hastscript/lib/index.js +5 -7
  958. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +2 -4
  959. package/dist/node_modules/html-url-attributes/lib/index.js +2 -4
  960. package/dist/node_modules/html-void-elements/index.js +2 -4
  961. package/dist/node_modules/inline-style-parser/cjs/index.js +4 -6
  962. package/dist/node_modules/internmap/src/index.js +20 -22
  963. package/dist/node_modules/katex/dist/katex.js +2307 -2301
  964. package/dist/node_modules/khroma/dist/channels/index.js +21 -23
  965. package/dist/node_modules/khroma/dist/channels/reusable.js +3 -5
  966. package/dist/node_modules/khroma/dist/channels/type.js +5 -7
  967. package/dist/node_modules/khroma/dist/color/hex.js +8 -10
  968. package/dist/node_modules/khroma/dist/color/hsl.js +17 -19
  969. package/dist/node_modules/khroma/dist/color/index.js +15 -17
  970. package/dist/node_modules/khroma/dist/color/keyword.js +8 -10
  971. package/dist/node_modules/khroma/dist/color/rgb.js +12 -14
  972. package/dist/node_modules/khroma/dist/constants.js +5 -7
  973. package/dist/node_modules/khroma/dist/methods/adjust.js +6 -8
  974. package/dist/node_modules/khroma/dist/methods/adjust_channel.js +6 -8
  975. package/dist/node_modules/khroma/dist/methods/change.js +7 -9
  976. package/dist/node_modules/khroma/dist/methods/channel.js +4 -6
  977. package/dist/node_modules/khroma/dist/methods/darken.js +3 -5
  978. package/dist/node_modules/khroma/dist/methods/invert.js +6 -8
  979. package/dist/node_modules/khroma/dist/methods/is_dark.js +3 -5
  980. package/dist/node_modules/khroma/dist/methods/is_light.js +3 -5
  981. package/dist/node_modules/khroma/dist/methods/lighten.js +3 -5
  982. package/dist/node_modules/khroma/dist/methods/luminance.js +6 -8
  983. package/dist/node_modules/khroma/dist/methods/mix.js +6 -8
  984. package/dist/node_modules/khroma/dist/methods/rgba.js +13 -15
  985. package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -5
  986. package/dist/node_modules/khroma/dist/utils/channel.js +6 -8
  987. package/dist/node_modules/khroma/dist/utils/index.js +8 -10
  988. package/dist/node_modules/khroma/dist/utils/lang.js +2 -4
  989. package/dist/node_modules/khroma/dist/utils/unit.js +2 -4
  990. package/dist/node_modules/langium/lib/default-module.js +64 -66
  991. package/dist/node_modules/langium/lib/dependency-injection.js +39 -37
  992. package/dist/node_modules/langium/lib/documentation/comment-provider.js +5 -7
  993. package/dist/node_modules/langium/lib/documentation/documentation-provider.js +6 -8
  994. package/dist/node_modules/langium/lib/documentation/jsdoc.js +202 -204
  995. package/dist/node_modules/langium/lib/index.js +182 -0
  996. package/dist/node_modules/langium/lib/languages/generated/ast.js +534 -343
  997. package/dist/node_modules/langium/lib/languages/grammar-config.js +8 -10
  998. package/dist/node_modules/langium/lib/parser/async-parser.js +76 -4
  999. package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +6 -8
  1000. package/dist/node_modules/langium/lib/parser/cst-node-builder.js +54 -56
  1001. package/dist/node_modules/langium/lib/parser/indentation-aware.js +141 -0
  1002. package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +7 -9
  1003. package/dist/node_modules/langium/lib/parser/langium-parser.js +188 -190
  1004. package/dist/node_modules/langium/lib/parser/lexer.js +25 -25
  1005. package/dist/node_modules/langium/lib/parser/parser-builder-base.js +203 -204
  1006. package/dist/node_modules/langium/lib/parser/token-builder.js +30 -32
  1007. package/dist/node_modules/langium/lib/parser/value-converter.js +15 -17
  1008. package/dist/node_modules/langium/lib/references/linker.js +103 -104
  1009. package/dist/node_modules/langium/lib/references/name-provider.js +7 -9
  1010. package/dist/node_modules/langium/lib/references/references.js +51 -53
  1011. package/dist/node_modules/langium/lib/references/scope-computation.js +12 -14
  1012. package/dist/node_modules/langium/lib/references/scope-provider.js +11 -13
  1013. package/dist/node_modules/langium/lib/references/scope.js +56 -27
  1014. package/dist/node_modules/langium/lib/serializer/hydrator.js +69 -71
  1015. package/dist/node_modules/langium/lib/serializer/json-serializer.js +21 -23
  1016. package/dist/node_modules/langium/lib/service-registry.js +5 -7
  1017. package/dist/node_modules/langium/lib/syntax-tree.js +31 -33
  1018. package/dist/node_modules/langium/lib/utils/ast-utils.js +112 -77
  1019. package/dist/node_modules/langium/lib/utils/caching.js +42 -33
  1020. package/dist/node_modules/langium/lib/utils/cancellation.js +5 -7
  1021. package/dist/node_modules/langium/lib/utils/collections.js +33 -35
  1022. package/dist/node_modules/langium/lib/utils/cst-utils.js +161 -46
  1023. package/dist/node_modules/langium/lib/utils/disposable.js +3 -5
  1024. package/dist/node_modules/langium/lib/utils/errors.js +9 -8
  1025. package/dist/node_modules/langium/lib/utils/event.js +5 -7
  1026. package/dist/node_modules/langium/lib/utils/grammar-loader.js +14 -16
  1027. package/dist/node_modules/langium/lib/utils/grammar-utils.js +249 -172
  1028. package/dist/node_modules/langium/lib/utils/index.js +53 -0
  1029. package/dist/node_modules/langium/lib/utils/promise-utils.js +19 -18
  1030. package/dist/node_modules/langium/lib/utils/regexp-utils.js +76 -53
  1031. package/dist/node_modules/langium/lib/utils/stream.js +153 -155
  1032. package/dist/node_modules/langium/lib/utils/uri-utils.js +12 -14
  1033. package/dist/node_modules/langium/lib/validation/document-validator.js +103 -104
  1034. package/dist/node_modules/langium/lib/validation/validation-registry.js +14 -15
  1035. package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +17 -19
  1036. package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +2 -4
  1037. package/dist/node_modules/langium/lib/workspace/configuration.js +5 -7
  1038. package/dist/node_modules/langium/lib/workspace/document-builder.js +134 -131
  1039. package/dist/node_modules/langium/lib/workspace/documents.js +83 -85
  1040. package/dist/node_modules/langium/lib/workspace/file-system-provider.js +4 -5
  1041. package/dist/node_modules/langium/lib/workspace/index-manager.js +14 -16
  1042. package/dist/node_modules/langium/lib/workspace/profiler.js +89 -0
  1043. package/dist/node_modules/langium/lib/workspace/workspace-lock.js +9 -11
  1044. package/dist/node_modules/langium/lib/workspace/workspace-manager.js +33 -35
  1045. package/dist/node_modules/layout-base/layout-base.js +4 -6
  1046. package/dist/node_modules/lodash/_Symbol.js +7 -0
  1047. package/dist/node_modules/lodash/_baseGetTag.js +13 -0
  1048. package/dist/node_modules/lodash/_baseTrim.js +11 -0
  1049. package/dist/node_modules/lodash/_freeGlobal.js +6 -0
  1050. package/dist/node_modules/lodash/_getRawTag.js +17 -0
  1051. package/dist/node_modules/lodash/_objectToString.js +10 -0
  1052. package/dist/node_modules/lodash/_root.js +8 -0
  1053. package/dist/node_modules/lodash/_trimmedEndIndex.js +11 -0
  1054. package/dist/{frontend/studio/node_modules → node_modules}/lodash/debounce.js +8 -10
  1055. package/dist/node_modules/lodash/isObject.js +10 -0
  1056. package/dist/node_modules/lodash/isObjectLike.js +9 -0
  1057. package/dist/node_modules/lodash/isSymbol.js +12 -0
  1058. package/dist/node_modules/lodash/now.js +10 -0
  1059. package/dist/node_modules/lodash/toNumber.js +22 -0
  1060. package/dist/node_modules/lodash-es/_DataView.js +4 -6
  1061. package/dist/node_modules/lodash-es/_Hash.js +13 -14
  1062. package/dist/node_modules/lodash-es/_ListCache.js +13 -14
  1063. package/dist/node_modules/lodash-es/_Map.js +4 -6
  1064. package/dist/node_modules/lodash-es/_MapCache.js +13 -14
  1065. package/dist/node_modules/lodash-es/_Promise.js +4 -6
  1066. package/dist/node_modules/lodash-es/_Set.js +4 -6
  1067. package/dist/node_modules/lodash-es/_SetCache.js +9 -10
  1068. package/dist/node_modules/lodash-es/_Stack.js +11 -12
  1069. package/dist/node_modules/lodash-es/_Symbol.js +3 -5
  1070. package/dist/node_modules/lodash-es/_Uint8Array.js +3 -5
  1071. package/dist/node_modules/lodash-es/_WeakMap.js +4 -6
  1072. package/dist/node_modules/lodash-es/_apply.js +3 -4
  1073. package/dist/node_modules/lodash-es/_arrayEach.js +3 -4
  1074. package/dist/node_modules/lodash-es/_arrayFilter.js +3 -4
  1075. package/dist/node_modules/lodash-es/_arrayIncludes.js +5 -6
  1076. package/dist/node_modules/lodash-es/_arrayIncludesWith.js +3 -4
  1077. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  1078. package/dist/node_modules/lodash-es/_arrayMap.js +3 -4
  1079. package/dist/node_modules/lodash-es/_arrayPush.js +3 -4
  1080. package/dist/node_modules/lodash-es/_arrayReduce.js +3 -4
  1081. package/dist/node_modules/lodash-es/_arraySome.js +3 -4
  1082. package/dist/node_modules/lodash-es/_asciiSize.js +3 -5
  1083. package/dist/node_modules/lodash-es/_assignMergeValue.js +6 -7
  1084. package/dist/node_modules/lodash-es/_assignValue.js +7 -8
  1085. package/dist/node_modules/lodash-es/_assocIndexOf.js +5 -6
  1086. package/dist/node_modules/lodash-es/_baseAssign.js +6 -7
  1087. package/dist/node_modules/lodash-es/_baseAssignIn.js +6 -7
  1088. package/dist/node_modules/lodash-es/_baseAssignValue.js +5 -6
  1089. package/dist/node_modules/lodash-es/_baseClone.js +50 -51
  1090. package/dist/node_modules/lodash-es/_baseCreate.js +5 -7
  1091. package/dist/node_modules/lodash-es/_baseEach.js +4 -6
  1092. package/dist/node_modules/lodash-es/_baseExtremum.js +5 -6
  1093. package/dist/node_modules/lodash-es/_baseFilter.js +5 -6
  1094. package/dist/node_modules/lodash-es/_baseFindIndex.js +3 -4
  1095. package/dist/node_modules/lodash-es/_baseFlatten.js +7 -8
  1096. package/dist/node_modules/lodash-es/_baseFor.js +3 -5
  1097. package/dist/node_modules/lodash-es/_baseForOwn.js +6 -7
  1098. package/dist/node_modules/lodash-es/_baseGet.js +7 -8
  1099. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +6 -7
  1100. package/dist/node_modules/lodash-es/_baseGetTag.js +8 -9
  1101. package/dist/node_modules/lodash-es/_baseGt.js +3 -4
  1102. package/dist/node_modules/lodash-es/_baseHas.js +5 -6
  1103. package/dist/node_modules/lodash-es/_baseHasIn.js +3 -4
  1104. package/dist/node_modules/lodash-es/_baseIndexOf.js +7 -8
  1105. package/dist/node_modules/lodash-es/_baseIsArguments.js +7 -8
  1106. package/dist/node_modules/lodash-es/_baseIsEqual.js +6 -7
  1107. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +22 -23
  1108. package/dist/node_modules/lodash-es/_baseIsMap.js +7 -8
  1109. package/dist/node_modules/lodash-es/_baseIsMatch.js +8 -9
  1110. package/dist/node_modules/lodash-es/_baseIsNaN.js +3 -4
  1111. package/dist/node_modules/lodash-es/_baseIsNative.js +9 -10
  1112. package/dist/node_modules/lodash-es/_baseIsSet.js +7 -8
  1113. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +9 -10
  1114. package/dist/node_modules/lodash-es/_baseIteratee.js +9 -10
  1115. package/dist/node_modules/lodash-es/_baseKeys.js +8 -9
  1116. package/dist/node_modules/lodash-es/_baseKeysIn.js +10 -11
  1117. package/dist/node_modules/lodash-es/_baseLt.js +3 -4
  1118. package/dist/node_modules/lodash-es/_baseMap.js +7 -8
  1119. package/dist/node_modules/lodash-es/_baseMatches.js +9 -10
  1120. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +14 -15
  1121. package/dist/node_modules/lodash-es/_baseMerge.js +15 -16
  1122. package/dist/node_modules/lodash-es/_baseMergeDeep.js +23 -24
  1123. package/dist/node_modules/lodash-es/_baseOrderBy.js +22 -23
  1124. package/dist/node_modules/lodash-es/_basePick.js +7 -8
  1125. package/dist/node_modules/lodash-es/_basePickBy.js +8 -9
  1126. package/dist/node_modules/lodash-es/_baseProperty.js +3 -4
  1127. package/dist/node_modules/lodash-es/_basePropertyDeep.js +5 -6
  1128. package/dist/node_modules/lodash-es/_baseRange.js +5 -6
  1129. package/dist/node_modules/lodash-es/_baseReduce.js +3 -4
  1130. package/dist/node_modules/lodash-es/_baseRest.js +7 -8
  1131. package/dist/node_modules/lodash-es/_baseSet.js +13 -14
  1132. package/dist/node_modules/lodash-es/_baseSetToString.js +8 -10
  1133. package/dist/node_modules/lodash-es/_baseSortBy.js +3 -4
  1134. package/dist/node_modules/lodash-es/_baseTimes.js +3 -4
  1135. package/dist/node_modules/lodash-es/_baseToString.js +12 -13
  1136. package/dist/node_modules/lodash-es/_baseTrim.js +6 -7
  1137. package/dist/node_modules/lodash-es/_baseUnary.js +3 -4
  1138. package/dist/node_modules/lodash-es/_baseUniq.js +16 -17
  1139. package/dist/node_modules/lodash-es/_baseValues.js +5 -6
  1140. package/dist/node_modules/lodash-es/_baseZipObject.js +3 -4
  1141. package/dist/node_modules/lodash-es/_cacheHas.js +3 -4
  1142. package/dist/node_modules/lodash-es/_castFunction.js +5 -6
  1143. package/dist/node_modules/lodash-es/_castPath.js +8 -9
  1144. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +5 -6
  1145. package/dist/node_modules/lodash-es/_cloneBuffer.js +8 -9
  1146. package/dist/node_modules/lodash-es/_cloneDataView.js +5 -6
  1147. package/dist/node_modules/lodash-es/_cloneRegExp.js +5 -6
  1148. package/dist/node_modules/lodash-es/_cloneSymbol.js +6 -7
  1149. package/dist/node_modules/lodash-es/_cloneTypedArray.js +5 -6
  1150. package/dist/node_modules/lodash-es/_compareAscending.js +5 -6
  1151. package/dist/node_modules/lodash-es/_compareMultiple.js +5 -6
  1152. package/dist/node_modules/lodash-es/_copyArray.js +3 -4
  1153. package/dist/node_modules/lodash-es/_copyObject.js +6 -7
  1154. package/dist/node_modules/lodash-es/_copySymbols.js +6 -7
  1155. package/dist/node_modules/lodash-es/_copySymbolsIn.js +6 -7
  1156. package/dist/node_modules/lodash-es/_coreJsData.js +3 -5
  1157. package/dist/node_modules/lodash-es/_createAssigner.js +7 -8
  1158. package/dist/node_modules/lodash-es/_createBaseEach.js +5 -6
  1159. package/dist/node_modules/lodash-es/_createBaseFor.js +3 -4
  1160. package/dist/node_modules/lodash-es/_createFind.js +9 -10
  1161. package/dist/node_modules/lodash-es/_createRange.js +7 -8
  1162. package/dist/node_modules/lodash-es/_createSet.js +7 -9
  1163. package/dist/node_modules/lodash-es/_defineProperty.js +4 -6
  1164. package/dist/node_modules/lodash-es/_equalArrays.js +11 -12
  1165. package/dist/node_modules/lodash-es/_equalByTag.js +28 -29
  1166. package/dist/node_modules/lodash-es/_equalObjects.js +8 -9
  1167. package/dist/node_modules/lodash-es/_flatRest.js +7 -8
  1168. package/dist/node_modules/lodash-es/_freeGlobal.js +2 -4
  1169. package/dist/node_modules/lodash-es/_getAllKeys.js +7 -8
  1170. package/dist/node_modules/lodash-es/_getAllKeysIn.js +7 -8
  1171. package/dist/node_modules/lodash-es/_getMapData.js +5 -6
  1172. package/dist/node_modules/lodash-es/_getMatchData.js +7 -8
  1173. package/dist/node_modules/lodash-es/_getNative.js +7 -8
  1174. package/dist/node_modules/lodash-es/_getPrototype.js +3 -5
  1175. package/dist/node_modules/lodash-es/_getRawTag.js +9 -10
  1176. package/dist/node_modules/lodash-es/_getSymbols.js +7 -9
  1177. package/dist/node_modules/lodash-es/_getSymbolsIn.js +8 -10
  1178. package/dist/node_modules/lodash-es/_getTag.js +19 -21
  1179. package/dist/node_modules/lodash-es/_getValue.js +3 -4
  1180. package/dist/node_modules/lodash-es/_hasPath.js +12 -13
  1181. package/dist/node_modules/lodash-es/_hasUnicode.js +5 -6
  1182. package/dist/node_modules/lodash-es/_hashClear.js +5 -6
  1183. package/dist/node_modules/lodash-es/_hashDelete.js +4 -5
  1184. package/dist/node_modules/lodash-es/_hashGet.js +8 -9
  1185. package/dist/node_modules/lodash-es/_hashHas.js +6 -7
  1186. package/dist/node_modules/lodash-es/_hashSet.js +6 -7
  1187. package/dist/node_modules/lodash-es/_initCloneArray.js +5 -6
  1188. package/dist/node_modules/lodash-es/_initCloneByTag.js +28 -29
  1189. package/dist/node_modules/lodash-es/_initCloneObject.js +7 -8
  1190. package/dist/node_modules/lodash-es/_isFlattenable.js +8 -9
  1191. package/dist/node_modules/lodash-es/_isIndex.js +5 -6
  1192. package/dist/node_modules/lodash-es/_isIterateeCall.js +9 -10
  1193. package/dist/node_modules/lodash-es/_isKey.js +8 -9
  1194. package/dist/node_modules/lodash-es/_isKeyable.js +3 -4
  1195. package/dist/node_modules/lodash-es/_isMasked.js +8 -9
  1196. package/dist/node_modules/lodash-es/_isPrototype.js +5 -6
  1197. package/dist/node_modules/lodash-es/_isStrictComparable.js +5 -6
  1198. package/dist/node_modules/lodash-es/_listCacheClear.js +3 -4
  1199. package/dist/node_modules/lodash-es/_listCacheDelete.js +7 -8
  1200. package/dist/node_modules/lodash-es/_listCacheGet.js +5 -6
  1201. package/dist/node_modules/lodash-es/_listCacheHas.js +5 -6
  1202. package/dist/node_modules/lodash-es/_listCacheSet.js +5 -6
  1203. package/dist/node_modules/lodash-es/_mapCacheClear.js +9 -10
  1204. package/dist/node_modules/lodash-es/_mapCacheDelete.js +6 -7
  1205. package/dist/node_modules/lodash-es/_mapCacheGet.js +5 -6
  1206. package/dist/node_modules/lodash-es/_mapCacheHas.js +5 -6
  1207. package/dist/node_modules/lodash-es/_mapCacheSet.js +5 -6
  1208. package/dist/node_modules/lodash-es/_mapToArray.js +3 -4
  1209. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +3 -4
  1210. package/dist/node_modules/lodash-es/_memoizeCapped.js +7 -8
  1211. package/dist/node_modules/lodash-es/_nativeCreate.js +3 -5
  1212. package/dist/node_modules/lodash-es/_nativeKeys.js +3 -5
  1213. package/dist/node_modules/lodash-es/_nativeKeysIn.js +3 -4
  1214. package/dist/node_modules/lodash-es/_nodeUtil.js +4 -6
  1215. package/dist/node_modules/lodash-es/_objectToString.js +5 -6
  1216. package/dist/node_modules/lodash-es/_overArg.js +3 -4
  1217. package/dist/node_modules/lodash-es/_overRest.js +8 -9
  1218. package/dist/node_modules/lodash-es/_root.js +3 -5
  1219. package/dist/node_modules/lodash-es/_safeGet.js +3 -4
  1220. package/dist/node_modules/lodash-es/_setCacheAdd.js +5 -6
  1221. package/dist/node_modules/lodash-es/_setCacheHas.js +3 -4
  1222. package/dist/node_modules/lodash-es/_setToArray.js +3 -4
  1223. package/dist/node_modules/lodash-es/_setToString.js +4 -6
  1224. package/dist/node_modules/lodash-es/_shortOut.js +6 -7
  1225. package/dist/node_modules/lodash-es/_stackClear.js +5 -6
  1226. package/dist/node_modules/lodash-es/_stackDelete.js +3 -4
  1227. package/dist/node_modules/lodash-es/_stackGet.js +3 -4
  1228. package/dist/node_modules/lodash-es/_stackHas.js +3 -4
  1229. package/dist/node_modules/lodash-es/_stackSet.js +10 -11
  1230. package/dist/node_modules/lodash-es/_strictIndexOf.js +3 -4
  1231. package/dist/node_modules/lodash-es/_stringSize.js +7 -8
  1232. package/dist/node_modules/lodash-es/_stringToPath.js +5 -7
  1233. package/dist/node_modules/lodash-es/_toKey.js +7 -8
  1234. package/dist/node_modules/lodash-es/_toSource.js +7 -8
  1235. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +5 -6
  1236. package/dist/node_modules/lodash-es/_unicodeSize.js +16 -17
  1237. package/dist/node_modules/lodash-es/clone.js +6 -7
  1238. package/dist/node_modules/lodash-es/cloneDeep.js +6 -7
  1239. package/dist/node_modules/lodash-es/constant.js +3 -4
  1240. package/dist/node_modules/lodash-es/defaults.js +11 -13
  1241. package/dist/node_modules/lodash-es/eq.js +3 -4
  1242. package/dist/node_modules/lodash-es/filter.js +8 -9
  1243. package/dist/node_modules/lodash-es/find.js +4 -6
  1244. package/dist/node_modules/lodash-es/findIndex.js +9 -10
  1245. package/dist/node_modules/lodash-es/flatMap.js +6 -7
  1246. package/dist/node_modules/lodash-es/flatten.js +5 -6
  1247. package/dist/node_modules/lodash-es/forEach.js +8 -9
  1248. package/dist/node_modules/lodash-es/forIn.js +7 -8
  1249. package/dist/node_modules/lodash-es/forOwn.js +6 -7
  1250. package/dist/node_modules/lodash-es/get.js +5 -6
  1251. package/dist/node_modules/lodash-es/has.js +6 -7
  1252. package/dist/node_modules/lodash-es/hasIn.js +6 -7
  1253. package/dist/node_modules/lodash-es/identity.js +3 -4
  1254. package/dist/node_modules/lodash-es/isArguments.js +6 -8
  1255. package/dist/node_modules/lodash-es/isArray.js +2 -4
  1256. package/dist/node_modules/lodash-es/isArrayLike.js +6 -7
  1257. package/dist/node_modules/lodash-es/isArrayLikeObject.js +6 -7
  1258. package/dist/node_modules/lodash-es/isBuffer.js +4 -6
  1259. package/dist/node_modules/lodash-es/isEmpty.js +17 -18
  1260. package/dist/node_modules/lodash-es/isFunction.js +9 -10
  1261. package/dist/node_modules/lodash-es/isLength.js +5 -6
  1262. package/dist/node_modules/lodash-es/isMap.js +5 -7
  1263. package/dist/node_modules/lodash-es/isObject.js +3 -4
  1264. package/dist/node_modules/lodash-es/isObjectLike.js +3 -4
  1265. package/dist/node_modules/lodash-es/isPlainObject.js +12 -13
  1266. package/dist/node_modules/lodash-es/isSet.js +5 -7
  1267. package/dist/node_modules/lodash-es/isString.js +8 -9
  1268. package/dist/node_modules/lodash-es/isSymbol.js +7 -8
  1269. package/dist/node_modules/lodash-es/isTypedArray.js +5 -7
  1270. package/dist/node_modules/lodash-es/isUndefined.js +3 -4
  1271. package/dist/node_modules/lodash-es/keys.js +7 -8
  1272. package/dist/node_modules/lodash-es/keysIn.js +7 -8
  1273. package/dist/node_modules/lodash-es/last.js +3 -4
  1274. package/dist/node_modules/lodash-es/map.js +8 -9
  1275. package/dist/node_modules/lodash-es/mapValues.js +8 -9
  1276. package/dist/node_modules/lodash-es/max.js +7 -8
  1277. package/dist/node_modules/lodash-es/memoize.js +8 -9
  1278. package/dist/node_modules/lodash-es/merge.js +5 -7
  1279. package/dist/node_modules/lodash-es/min.js +7 -8
  1280. package/dist/node_modules/lodash-es/minBy.js +7 -8
  1281. package/dist/node_modules/lodash-es/noop.js +3 -4
  1282. package/dist/node_modules/lodash-es/now.js +4 -6
  1283. package/dist/node_modules/lodash-es/pick.js +5 -7
  1284. package/dist/node_modules/lodash-es/property.js +8 -9
  1285. package/dist/node_modules/lodash-es/range.js +3 -5
  1286. package/dist/node_modules/lodash-es/reduce.js +10 -11
  1287. package/dist/node_modules/lodash-es/size.js +12 -13
  1288. package/dist/node_modules/lodash-es/sortBy.js +7 -9
  1289. package/dist/node_modules/lodash-es/stubArray.js +3 -4
  1290. package/dist/node_modules/lodash-es/stubFalse.js +3 -4
  1291. package/dist/node_modules/lodash-es/toFinite.js +6 -7
  1292. package/dist/node_modules/lodash-es/toInteger.js +5 -6
  1293. package/dist/node_modules/lodash-es/toNumber.js +13 -14
  1294. package/dist/node_modules/lodash-es/toPlainObject.js +6 -7
  1295. package/dist/node_modules/lodash-es/toString.js +5 -6
  1296. package/dist/node_modules/lodash-es/union.js +7 -9
  1297. package/dist/node_modules/lodash-es/uniqBy.js +6 -7
  1298. package/dist/node_modules/lodash-es/uniqueId.js +7 -8
  1299. package/dist/node_modules/lodash-es/values.js +6 -7
  1300. package/dist/node_modules/lodash-es/zipObject.js +6 -7
  1301. package/dist/node_modules/longest-streak/index.js +2 -4
  1302. package/dist/node_modules/markdown-table/index.js +9 -11
  1303. package/dist/node_modules/marked/lib/marked.esm.js +685 -687
  1304. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +12 -14
  1305. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +2 -4
  1306. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +180 -182
  1307. package/dist/node_modules/mdast-util-gfm/lib/index.js +18 -20
  1308. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +67 -69
  1309. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +45 -47
  1310. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +13 -15
  1311. package/dist/node_modules/mdast-util-gfm-table/lib/index.js +28 -30
  1312. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +14 -16
  1313. package/dist/node_modules/mdast-util-math/lib/index.js +13 -15
  1314. package/dist/node_modules/mdast-util-phrasing/lib/index.js +3 -5
  1315. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +9 -11
  1316. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +2 -4
  1317. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +2 -4
  1318. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +2 -4
  1319. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +2 -4
  1320. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +2 -4
  1321. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +4 -6
  1322. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +2 -4
  1323. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +2 -4
  1324. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +6 -8
  1325. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +4 -6
  1326. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +53 -55
  1327. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +2 -4
  1328. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +6 -8
  1329. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +4 -6
  1330. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +13 -15
  1331. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +2 -4
  1332. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +2 -4
  1333. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +2 -4
  1334. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +2 -4
  1335. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +2 -4
  1336. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +2 -4
  1337. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +4 -6
  1338. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +4 -6
  1339. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +2 -4
  1340. package/dist/node_modules/mdast-util-to-hast/lib/index.js +6 -8
  1341. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +2 -4
  1342. package/dist/node_modules/mdast-util-to-hast/lib/state.js +59 -61
  1343. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +4 -6
  1344. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +4 -6
  1345. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +16 -18
  1346. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +4 -6
  1347. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +12 -14
  1348. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +6 -8
  1349. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +4 -6
  1350. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +4 -6
  1351. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +6 -8
  1352. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +41 -43
  1353. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +5 -7
  1354. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +4 -6
  1355. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +9 -11
  1356. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +5 -7
  1357. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +10 -12
  1358. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -4
  1359. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +4 -6
  1360. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +12 -14
  1361. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -4
  1362. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +5 -7
  1363. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -4
  1364. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -6
  1365. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -4
  1366. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -4
  1367. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -4
  1368. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -4
  1369. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -4
  1370. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -4
  1371. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -4
  1372. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -4
  1373. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -4
  1374. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +4 -6
  1375. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -4
  1376. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -8
  1377. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +4 -6
  1378. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +4 -6
  1379. package/dist/node_modules/mdast-util-to-string/lib/index.js +12 -14
  1380. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +374 -378
  1381. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.js +1347 -1349
  1382. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AHTNJAMY.js +549 -555
  1383. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +38 -40
  1384. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-426QAEUC.js +7 -9
  1385. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js +4 -6
  1386. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4TB4RGXK.js +198 -204
  1387. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +5 -7
  1388. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +2345 -2347
  1389. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +253 -257
  1390. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +20 -22
  1391. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BSJP7CBP.js +35 -37
  1392. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EDXVE4YY.js +15 -17
  1393. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +344 -346
  1394. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js +3 -5
  1395. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +718 -746
  1396. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OYMX7WX6.js +588 -594
  1397. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js +4 -8
  1398. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +204 -206
  1399. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.js +37 -39
  1400. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.js +891 -893
  1401. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +37 -39
  1402. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +13 -15
  1403. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-6PBFFD2Q.js +9 -11
  1404. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-HSJHXN6E.js +9 -11
  1405. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +114 -116
  1406. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KV5264BT.js +188 -190
  1407. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +70 -72
  1408. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-G4DWMVQ6.js +185 -189
  1409. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +154 -156
  1410. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-TYMM5635.js +72 -76
  1411. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-SMLLAGMA.js +75 -79
  1412. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-DWJPFMVM.js +896 -900
  1413. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-T4ZO3ILL.js +685 -687
  1414. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +569 -571
  1415. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +15 -17
  1416. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +304 -308
  1417. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-VCZTEJTY.js +377 -379
  1418. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-6JOO6SKY.js +114 -116
  1419. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-QFDTVHPH.js +87 -91
  1420. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +94 -96
  1421. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-34T5L4WZ.js +273 -279
  1422. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-MS252O5E.js +59 -63
  1423. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-XADWPNL6.js +202 -212
  1424. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +564 -568
  1425. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.js +155 -157
  1426. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-QKLJ7IA2.js +9 -11
  1427. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +559 -561
  1428. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +370 -372
  1429. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +450 -454
  1430. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-5P7HB3ND.js +658 -680
  1431. package/dist/node_modules/mermaid/dist/mermaid.core.js +430 -434
  1432. package/dist/node_modules/micromark/lib/constructs.js +79 -80
  1433. package/dist/node_modules/micromark/lib/create-tokenizer.js +12 -14
  1434. package/dist/node_modules/micromark/lib/initialize/content.js +7 -9
  1435. package/dist/node_modules/micromark/lib/initialize/document.js +14 -15
  1436. package/dist/node_modules/micromark/lib/initialize/flow.js +7 -9
  1437. package/dist/node_modules/micromark/lib/initialize/text.js +6 -8
  1438. package/dist/node_modules/micromark/lib/parse.js +18 -20
  1439. package/dist/node_modules/micromark/lib/postprocess.js +4 -6
  1440. package/dist/node_modules/micromark/lib/preprocess.js +4 -6
  1441. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +18 -20
  1442. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +15 -17
  1443. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +9 -11
  1444. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +13 -15
  1445. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +6 -8
  1446. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +14 -16
  1447. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +21 -22
  1448. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +15 -16
  1449. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +11 -13
  1450. package/dist/node_modules/micromark-core-commonmark/lib/content.js +17 -18
  1451. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +29 -30
  1452. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +6 -8
  1453. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +13 -15
  1454. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +67 -68
  1455. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +64 -66
  1456. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +111 -112
  1457. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +6 -8
  1458. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +6 -8
  1459. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +6 -8
  1460. package/dist/node_modules/micromark-core-commonmark/lib/list.js +31 -32
  1461. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +10 -12
  1462. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +9 -11
  1463. package/dist/node_modules/micromark-extension-gfm/index.js +14 -16
  1464. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +120 -122
  1465. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +31 -33
  1466. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +9 -11
  1467. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +4 -6
  1468. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -4
  1469. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +34 -36
  1470. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +18 -20
  1471. package/dist/node_modules/micromark-extension-math/lib/math-flow.js +20 -21
  1472. package/dist/node_modules/micromark-extension-math/lib/math-text.js +9 -11
  1473. package/dist/node_modules/micromark-extension-math/lib/syntax.js +6 -8
  1474. package/dist/node_modules/micromark-factory-destination/index.js +8 -10
  1475. package/dist/node_modules/micromark-factory-label/index.js +5 -7
  1476. package/dist/node_modules/micromark-factory-space/index.js +5 -7
  1477. package/dist/node_modules/micromark-factory-title/index.js +6 -8
  1478. package/dist/node_modules/micromark-factory-whitespace/index.js +5 -7
  1479. package/dist/node_modules/micromark-util-character/index.js +12 -14
  1480. package/dist/node_modules/micromark-util-chunked/index.js +4 -6
  1481. package/dist/node_modules/micromark-util-classify-character/index.js +5 -7
  1482. package/dist/node_modules/micromark-util-combine-extensions/index.js +11 -13
  1483. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -4
  1484. package/dist/node_modules/micromark-util-decode-string/index.js +9 -11
  1485. package/dist/node_modules/micromark-util-html-tag-name/index.js +2 -4
  1486. package/dist/node_modules/micromark-util-normalize-identifier/index.js +2 -4
  1487. package/dist/node_modules/micromark-util-resolve-all/index.js +2 -4
  1488. package/dist/node_modules/micromark-util-sanitize-uri/index.js +4 -6
  1489. package/dist/node_modules/micromark-util-subtokenize/index.js +8 -10
  1490. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +8 -10
  1491. package/dist/node_modules/motion/dist/es/react.js +2 -2
  1492. package/dist/node_modules/nanoid/index.browser.js +4 -6
  1493. package/dist/node_modules/nanoid/url-alphabet/index.js +2 -4
  1494. package/dist/node_modules/property-information/index.js +23 -25
  1495. package/dist/node_modules/property-information/lib/aria.js +39 -41
  1496. package/dist/node_modules/property-information/lib/find.js +16 -18
  1497. package/dist/node_modules/property-information/lib/hast-to-react.js +2 -4
  1498. package/dist/node_modules/property-information/lib/html.js +94 -96
  1499. package/dist/node_modules/property-information/lib/normalize.js +2 -4
  1500. package/dist/node_modules/property-information/lib/svg.js +77 -79
  1501. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +4 -6
  1502. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +2 -4
  1503. package/dist/node_modules/property-information/lib/util/create.js +8 -10
  1504. package/dist/node_modules/property-information/lib/util/defined-info.js +11 -13
  1505. package/dist/node_modules/property-information/lib/util/info.js +3 -5
  1506. package/dist/node_modules/property-information/lib/util/merge.js +4 -6
  1507. package/dist/node_modules/property-information/lib/util/schema.js +3 -5
  1508. package/dist/node_modules/property-information/lib/util/types.js +14 -15
  1509. package/dist/node_modules/property-information/lib/xlink.js +3 -5
  1510. package/dist/node_modules/property-information/lib/xml.js +3 -5
  1511. package/dist/node_modules/property-information/lib/xmlns.js +5 -7
  1512. package/dist/node_modules/rehype-harden/dist/index.js +45 -47
  1513. package/dist/node_modules/rehype-katex/lib/index.js +23 -25
  1514. package/dist/node_modules/rehype-raw/lib/index.js +4 -6
  1515. package/dist/node_modules/rehype-sanitize/lib/index.js +4 -6
  1516. package/dist/node_modules/remark-gfm/lib/index.js +7 -9
  1517. package/dist/node_modules/remark-math/lib/index.js +7 -9
  1518. package/dist/node_modules/remark-parse/lib/index.js +4 -6
  1519. package/dist/node_modules/remark-rehype/lib/index.js +5 -7
  1520. package/dist/node_modules/remend/dist/index.js +324 -326
  1521. package/dist/node_modules/roughjs/bundled/rough.esm.js +875 -877
  1522. package/dist/node_modules/shiki/dist/bundle-full.js +11 -13
  1523. package/dist/node_modules/shiki/dist/{langs-bundle-full-DfKZStlK.js → langs.js} +6 -8
  1524. package/dist/node_modules/shiki/dist/themes.js +4 -6
  1525. package/dist/node_modules/shiki/dist/wasm.js +2 -2
  1526. package/dist/node_modules/space-separated-tokens/index.js +3 -5
  1527. package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +699 -701
  1528. package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +8 -10
  1529. package/dist/node_modules/streamdown/dist/index.js +1 -1
  1530. package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +2 -2
  1531. package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +712 -709
  1532. package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +2 -4
  1533. package/dist/node_modules/stringify-entities/lib/core.js +16 -18
  1534. package/dist/node_modules/stringify-entities/lib/index.js +5 -7
  1535. package/dist/node_modules/stringify-entities/lib/util/format-smart.js +8 -10
  1536. package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +4 -6
  1537. package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +4 -6
  1538. package/dist/node_modules/stringify-entities/lib/util/to-named.js +12 -14
  1539. package/dist/node_modules/style-to-js/cjs/index.js +7 -9
  1540. package/dist/node_modules/style-to-js/cjs/utilities.js +4 -6
  1541. package/dist/node_modules/style-to-object/cjs/index.js +6 -8
  1542. package/dist/node_modules/stylis/src/Enum.js +2 -4
  1543. package/dist/node_modules/stylis/src/Parser.js +36 -38
  1544. package/dist/node_modules/stylis/src/Serializer.js +15 -17
  1545. package/dist/node_modules/stylis/src/Tokenizer.js +51 -53
  1546. package/dist/node_modules/stylis/src/Utility.js +15 -17
  1547. package/dist/node_modules/trim-lines/index.js +8 -10
  1548. package/dist/node_modules/trough/lib/index.js +4 -6
  1549. package/dist/node_modules/ts-dedent/esm/index.js +2 -4
  1550. package/dist/node_modules/unified/lib/callable-instance.js +2 -4
  1551. package/dist/node_modules/unified/lib/index.js +101 -102
  1552. package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +2 -4
  1553. package/dist/node_modules/unist-util-find-after/lib/index.js +4 -6
  1554. package/dist/node_modules/unist-util-is/lib/index.js +29 -31
  1555. package/dist/node_modules/unist-util-position/lib/index.js +5 -7
  1556. package/dist/node_modules/unist-util-stringify-position/lib/index.js +8 -10
  1557. package/dist/node_modules/unist-util-visit/lib/index.js +4 -6
  1558. package/dist/node_modules/unist-util-visit-parents/lib/color.js +2 -4
  1559. package/dist/node_modules/unist-util-visit-parents/lib/index.js +20 -21
  1560. package/dist/node_modules/uuid/dist/esm-browser/native.js +2 -3
  1561. package/dist/node_modules/uuid/dist/esm-browser/rng.js +6 -8
  1562. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +5 -7
  1563. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -10
  1564. package/dist/node_modules/vaul/dist/index.js +274 -276
  1565. package/dist/node_modules/vfile/lib/index.js +42 -44
  1566. package/dist/node_modules/vfile/lib/minpath.browser.js +20 -22
  1567. package/dist/node_modules/vfile/lib/minproc.browser.js +3 -5
  1568. package/dist/node_modules/vfile/lib/minurl.browser.js +6 -8
  1569. package/dist/node_modules/vfile/lib/minurl.shared.js +2 -4
  1570. package/dist/node_modules/vfile-location/lib/index.js +5 -7
  1571. package/dist/node_modules/vfile-message/lib/index.js +5 -7
  1572. package/dist/node_modules/vscode-jsonrpc/browser.js +6 -8
  1573. package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +9 -11
  1574. package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +6 -8
  1575. package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +26 -28
  1576. package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +15 -17
  1577. package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +11 -13
  1578. package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +4 -6
  1579. package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +6 -8
  1580. package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +4 -6
  1581. package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +4 -6
  1582. package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +4 -6
  1583. package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +9 -11
  1584. package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +29 -31
  1585. package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +6 -8
  1586. package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +4 -6
  1587. package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +6 -8
  1588. package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +6 -8
  1589. package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +8 -10
  1590. package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +21 -23
  1591. package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +6 -8
  1592. package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +6 -8
  1593. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +6 -8
  1594. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +6 -8
  1595. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +6 -8
  1596. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +6 -8
  1597. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +12 -14
  1598. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +6 -8
  1599. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +6 -8
  1600. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +6 -8
  1601. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +6 -8
  1602. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +6 -8
  1603. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +6 -8
  1604. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +53 -55
  1605. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +6 -8
  1606. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +6 -8
  1607. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +8 -10
  1608. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +10 -12
  1609. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +6 -8
  1610. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +6 -8
  1611. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +6 -8
  1612. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +6 -8
  1613. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +6 -8
  1614. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +6 -8
  1615. package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +4 -6
  1616. package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +19 -21
  1617. package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +847 -849
  1618. package/dist/node_modules/vscode-uri/lib/esm/index.js +4 -6
  1619. package/dist/node_modules/web-namespaces/index.js +2 -4
  1620. package/dist/node_modules/zwitch/index.js +5 -7
  1621. package/dist/packages/contracts/dist/enums/index.js +12 -14
  1622. package/dist/packages/contracts/dist/enums/registry.enum.js +4 -6
  1623. package/dist/packages/contracts/dist/enums/sort-order.enum.js +4 -6
  1624. package/dist/packages/contracts/dist/enums/user-type.enum.js +4 -6
  1625. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +4 -6
  1626. package/dist/pages/DashboardPage.js +99 -55
  1627. package/dist/pages/DebugPage.js +17 -12
  1628. package/dist/pages/DebugWorkflowDetailsPage.js +119 -91
  1629. package/dist/pages/DebugWorkflowsPage.js +37 -39
  1630. package/dist/pages/EmbedWorkbenchPage.js +62 -48
  1631. package/dist/pages/PreviewWorkbenchPage.js +324 -243
  1632. package/dist/pages/RunsListPage.js +61 -44
  1633. package/dist/pages/RunsPage.js +48 -31
  1634. package/dist/pages/StudioLandingPage.js +132 -97
  1635. package/dist/pages/WorkbenchPage.js +86 -56
  1636. package/dist/pages/WorkflowDebugPage.js +110 -74
  1637. package/dist/pages/WorkspacePage.js +115 -72
  1638. package/dist/pages/WorkspaceRunsPage.js +70 -43
  1639. package/dist/pages/WorkspacesPage.js +35 -24
  1640. package/dist/providers/ComponentOverridesProvider.js +12 -9
  1641. package/dist/providers/InvalidationEventsProvider.js +35 -33
  1642. package/dist/providers/QueryProvider.js +18 -14
  1643. package/dist/providers/SseProvider.js +29 -28
  1644. package/dist/providers/StudioProvider.js +19 -14
  1645. package/dist/routing/LocalRouter.js +9 -6
  1646. package/dist/services/createApiClient.js +5 -7
  1647. package/dist/services/eventEmitter.js +2 -3
  1648. package/dist/services/index.js +2 -2
  1649. package/dist/types/ai.types.js +5 -7
  1650. package/package.json +33 -33
  1651. package/dist/_virtual/_rolldown/runtime.js +0 -20
  1652. package/dist/frontend/studio/node_modules/lodash/_Symbol.js +0 -9
  1653. package/dist/frontend/studio/node_modules/lodash/_baseGetTag.js +0 -15
  1654. package/dist/frontend/studio/node_modules/lodash/_baseTrim.js +0 -13
  1655. package/dist/frontend/studio/node_modules/lodash/_freeGlobal.js +0 -8
  1656. package/dist/frontend/studio/node_modules/lodash/_getRawTag.js +0 -19
  1657. package/dist/frontend/studio/node_modules/lodash/_objectToString.js +0 -12
  1658. package/dist/frontend/studio/node_modules/lodash/_root.js +0 -10
  1659. package/dist/frontend/studio/node_modules/lodash/_trimmedEndIndex.js +0 -13
  1660. package/dist/frontend/studio/node_modules/lodash/isObject.js +0 -12
  1661. package/dist/frontend/studio/node_modules/lodash/isObjectLike.js +0 -11
  1662. package/dist/frontend/studio/node_modules/lodash/isSymbol.js +0 -14
  1663. package/dist/frontend/studio/node_modules/lodash/now.js +0 -12
  1664. package/dist/frontend/studio/node_modules/lodash/toNumber.js +0 -24
  1665. package/dist/node_modules/@shikijs/primitive/dist/index.js +0 -540
  1666. package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +0 -17
  1667. package/dist/node_modules/shiki/dist/engine-oniguruma.js +0 -7
@@ -1,252 +1,348 @@
1
- import { ShikiError as e } from "../../types/dist/index.js";
2
- import { FontStyle as t } from "../../vscode-textmate/dist/index.js";
3
- import { applyColorReplacements as n, codeToTokensBase as r, codeToTokensWithThemes as i, createShikiPrimitiveAsync as a, getLastGrammarState as o, getLastGrammarStateFromMap as s, isNoneTheme as c, isPlainLang as l, isSpecialLang as u, isSpecialTheme as d, resolveColorReplacements as f, setLastGrammarStateToMap as p, splitLines as m } from "../../primitive/dist/index.js";
4
- import { toHtml as h } from "../../../hast-util-to-html/lib/index.js";
5
- //#region ../../node_modules/@shikijs/core/dist/index.mjs
6
- function g(e, t) {
7
- if (!t) return e;
8
- e.properties ||= {}, e.properties.class ||= [], typeof e.properties.class == "string" && (e.properties.class = e.properties.class.split(/\s+/g)), Array.isArray(e.properties.class) || (e.properties.class = []);
9
- let n = Array.isArray(t) ? t : t.split(/\s+/g);
10
- for (let t of n) t && !e.properties.class.includes(t) && e.properties.class.push(t);
11
- return e;
12
- }
13
- function _(e) {
14
- let t = m(e, !0).map(([e]) => e);
15
- function n(n) {
16
- if (n === e.length) return {
17
- line: t.length - 1,
18
- character: t[t.length - 1].length
1
+ import { ShikiError } from "../../types/dist/index.js";
2
+ import { EncodedTokenMetadata, FontStyle, INITIAL, Registry, Theme } from "../../vscode-textmate/dist/index.js";
3
+ import { toHtml } from "../../../hast-util-to-html/lib/index.js";
4
+ function resolveColorReplacements(a, P) {
5
+ let F = typeof a == "string" ? {} : { ...a.colorReplacements }, I = typeof a == "string" ? a : a.name;
6
+ for (let [a, L] of Object.entries(P?.colorReplacements || {})) typeof L == "string" ? F[a] = L : a === I && Object.assign(F, L);
7
+ return F;
8
+ }
9
+ function applyColorReplacements(a, P) {
10
+ return a && (P?.[a?.toLowerCase()] || a);
11
+ }
12
+ function toArray(a) {
13
+ return Array.isArray(a) ? a : [a];
14
+ }
15
+ async function normalizeGetter(a) {
16
+ return Promise.resolve(typeof a == "function" ? a() : a).then((a) => a.default || a);
17
+ }
18
+ function isPlainLang(a) {
19
+ return !a || [
20
+ "plaintext",
21
+ "txt",
22
+ "text",
23
+ "plain"
24
+ ].includes(a);
25
+ }
26
+ function isSpecialLang(a) {
27
+ return a === "ansi" || isPlainLang(a);
28
+ }
29
+ function isNoneTheme(a) {
30
+ return a === "none";
31
+ }
32
+ function isSpecialTheme(a) {
33
+ return isNoneTheme(a);
34
+ }
35
+ function addClassToHast(a, P) {
36
+ if (!P) return a;
37
+ a.properties ||= {}, a.properties.class ||= [], typeof a.properties.class == "string" && (a.properties.class = a.properties.class.split(/\s+/g)), Array.isArray(a.properties.class) || (a.properties.class = []);
38
+ let F = Array.isArray(P) ? P : P.split(/\s+/g);
39
+ for (let P of F) P && !a.properties.class.includes(P) && a.properties.class.push(P);
40
+ return a;
41
+ }
42
+ function splitLines(a, P = !1) {
43
+ if (a.length === 0) return [["", 0]];
44
+ let F = a.split(/(\r?\n)/g), I = 0, L = [];
45
+ for (let a = 0; a < F.length; a += 2) {
46
+ let R = P ? F[a] + (F[a + 1] || "") : F[a];
47
+ L.push([R, I]), I += F[a].length, I += F[a + 1]?.length || 0;
48
+ }
49
+ return L;
50
+ }
51
+ function createPositionConverter(a) {
52
+ let P = splitLines(a, !0).map(([a]) => a);
53
+ function F(F) {
54
+ if (F === a.length) return {
55
+ line: P.length - 1,
56
+ character: P[P.length - 1].length
19
57
  };
20
- let r = n, i = 0;
21
- for (let e of t) {
22
- if (r < e.length) break;
23
- r -= e.length, i++;
58
+ let I = F, L = 0;
59
+ for (let a of P) {
60
+ if (I < a.length) break;
61
+ I -= a.length, L++;
24
62
  }
25
63
  return {
26
- line: i,
27
- character: r
64
+ line: L,
65
+ character: I
28
66
  };
29
67
  }
30
- function r(e, n) {
31
- let r = 0;
32
- for (let n = 0; n < e; n++) r += t[n].length;
33
- return r += n, r;
68
+ function I(a, F) {
69
+ let I = 0;
70
+ for (let F = 0; F < a; F++) I += P[F].length;
71
+ return I += F, I;
34
72
  }
35
73
  return {
36
- lines: t,
37
- indexToPos: n,
38
- posToIndex: r
74
+ lines: P,
75
+ indexToPos: F,
76
+ posToIndex: I
39
77
  };
40
78
  }
41
- function v(e, t, n) {
42
- let r = /* @__PURE__ */ new Set();
43
- for (let t of e.matchAll(/:?lang=["']([^"']+)["']/g)) {
44
- let e = t[1].toLowerCase().trim();
45
- e && r.add(e);
46
- }
47
- for (let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)) {
48
- let e = t[1].toLowerCase().trim();
49
- e && r.add(e);
50
- }
51
- for (let t of e.matchAll(/\\begin\{([\w-]+)\}/g)) {
52
- let e = t[1].toLowerCase().trim();
53
- e && r.add(e);
54
- }
55
- for (let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)) {
56
- let e = t[1].toLowerCase().trim(), n = e.includes("/") ? e.split("/").pop() : e;
57
- n && r.add(n);
58
- }
59
- if (!n) return Array.from(r);
60
- let i = n.getBundledLanguages();
61
- return Array.from(r).filter((e) => e && i[e]);
62
- }
63
- var y = "light-dark()", b = ["color", "background-color"];
64
- function x(e, t) {
65
- let n = 0, r = [];
66
- for (let i of t) i > n && r.push({
67
- ...e,
68
- content: e.content.slice(n, i),
69
- offset: e.offset + n
70
- }), n = i;
71
- return n < e.content.length && r.push({
72
- ...e,
73
- content: e.content.slice(n),
74
- offset: e.offset + n
75
- }), r;
76
- }
77
- function S(e, t) {
78
- let n = Array.from(t instanceof Set ? t : new Set(t)).sort((e, t) => e - t);
79
- return n.length ? e.map((e) => e.flatMap((e) => {
80
- let t = n.filter((t) => e.offset < t && t < e.offset + e.content.length).map((t) => t - e.offset).sort((e, t) => e - t);
81
- return t.length ? x(e, t) : e;
82
- })) : e;
83
- }
84
- function C(t, n, r, i, a = "css-vars") {
85
- let o = {
86
- content: t.content,
87
- explanation: t.explanation,
88
- offset: t.offset
89
- }, s = n.map((e) => w(t.variants[e])), c = new Set(s.flatMap((e) => Object.keys(e))), l = {}, u = (e, t) => {
90
- let i = t === "color" ? "" : t === "background-color" ? "-bg" : `-${t}`;
91
- return r + n[e] + (t === "color" ? "" : i);
79
+ function guessEmbeddedLanguages(a, P, F) {
80
+ let I = /* @__PURE__ */ new Set();
81
+ for (let P of a.matchAll(/:?lang=["']([^"']+)["']/g)) {
82
+ let a = P[1].toLowerCase().trim();
83
+ a && I.add(a);
84
+ }
85
+ for (let P of a.matchAll(/(?:```|~~~)([\w-]+)/g)) {
86
+ let a = P[1].toLowerCase().trim();
87
+ a && I.add(a);
88
+ }
89
+ for (let P of a.matchAll(/\\begin\{([\w-]+)\}/g)) {
90
+ let a = P[1].toLowerCase().trim();
91
+ a && I.add(a);
92
+ }
93
+ for (let P of a.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)) {
94
+ let a = P[1].toLowerCase().trim(), F = a.includes("/") ? a.split("/").pop() : a;
95
+ F && I.add(F);
96
+ }
97
+ if (!F) return Array.from(I);
98
+ let L = F.getBundledLanguages();
99
+ return Array.from(I).filter((a) => a && L[a]);
100
+ }
101
+ var DEFAULT_COLOR_LIGHT_DARK = "light-dark()", COLOR_KEYS = ["color", "background-color"];
102
+ function splitToken(a, P) {
103
+ let F = 0, I = [];
104
+ for (let L of P) L > F && I.push({
105
+ ...a,
106
+ content: a.content.slice(F, L),
107
+ offset: a.offset + F
108
+ }), F = L;
109
+ return F < a.content.length && I.push({
110
+ ...a,
111
+ content: a.content.slice(F),
112
+ offset: a.offset + F
113
+ }), I;
114
+ }
115
+ function splitTokens(a, P) {
116
+ let F = Array.from(P instanceof Set ? P : new Set(P)).sort((a, P) => a - P);
117
+ return F.length ? a.map((a) => a.flatMap((a) => {
118
+ let P = F.filter((P) => a.offset < P && P < a.offset + a.content.length).map((P) => P - a.offset).sort((a, P) => a - P);
119
+ return P.length ? splitToken(a, P) : a;
120
+ })) : a;
121
+ }
122
+ function flatTokenVariants(P, F, I, L, R = "css-vars") {
123
+ let z = {
124
+ content: P.content,
125
+ explanation: P.explanation,
126
+ offset: P.offset
127
+ }, B = F.map((a) => getTokenStyleObject(P.variants[a])), V = new Set(B.flatMap((a) => Object.keys(a))), H = {}, U = (a, P) => {
128
+ let L = P === "color" ? "" : P === "background-color" ? "-bg" : `-${P}`;
129
+ return I + F[a] + (P === "color" ? "" : L);
92
130
  };
93
- return s.forEach((t, r) => {
94
- for (let o of c) {
95
- let c = t[o] || "inherit";
96
- if (r === 0 && i && b.includes(o)) if (i === y && s.length > 1) {
97
- let t = n.findIndex((e) => e === "light"), i = n.findIndex((e) => e === "dark");
98
- if (t === -1 || i === -1) throw new e("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
99
- l[o] = `light-dark(${s[t][o] || "inherit"}, ${s[i][o] || "inherit"})`, a === "css-vars" && (l[u(r, o)] = c);
100
- } else l[o] = c;
101
- else a === "css-vars" && (l[u(r, o)] = c);
131
+ return B.forEach((P, I) => {
132
+ for (let z of V) {
133
+ let V = P[z] || "inherit";
134
+ if (I === 0 && L && COLOR_KEYS.includes(z)) if (L === DEFAULT_COLOR_LIGHT_DARK && B.length > 1) {
135
+ let P = F.findIndex((a) => a === "light"), L = F.findIndex((a) => a === "dark");
136
+ if (P === -1 || L === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
137
+ H[z] = `light-dark(${B[P][z] || "inherit"}, ${B[L][z] || "inherit"})`, R === "css-vars" && (H[U(I, z)] = V);
138
+ } else H[z] = V;
139
+ else R === "css-vars" && (H[U(I, z)] = V);
102
140
  }
103
- }), o.htmlStyle = l, o;
104
- }
105
- function w(e) {
106
- let n = {};
107
- if (e.color && (n.color = e.color), e.bgColor && (n["background-color"] = e.bgColor), e.fontStyle) {
108
- e.fontStyle & t.Italic && (n["font-style"] = "italic"), e.fontStyle & t.Bold && (n["font-weight"] = "bold");
109
- let r = [];
110
- e.fontStyle & t.Underline && r.push("underline"), e.fontStyle & t.Strikethrough && r.push("line-through"), r.length && (n["text-decoration"] = r.join(" "));
111
- }
112
- return n;
113
- }
114
- function T(e) {
115
- return typeof e == "string" ? e : Object.entries(e).map(([e, t]) => `${e}:${t}`).join(";");
116
- }
117
- function E() {
118
- let t = /* @__PURE__ */ new WeakMap();
119
- function n(n) {
120
- if (!t.has(n.meta)) {
121
- let r = _(n.source);
122
- function i(t) {
123
- if (typeof t == "number") {
124
- if (t < 0 || t > n.source.length) throw new e(`Invalid decoration offset: ${t}. Code length: ${n.source.length}`);
141
+ }), z.htmlStyle = H, z;
142
+ }
143
+ function getTokenStyleObject(a) {
144
+ let P = {};
145
+ if (a.color && (P.color = a.color), a.bgColor && (P["background-color"] = a.bgColor), a.fontStyle) {
146
+ a.fontStyle & FontStyle.Italic && (P["font-style"] = "italic"), a.fontStyle & FontStyle.Bold && (P["font-weight"] = "bold");
147
+ let I = [];
148
+ a.fontStyle & FontStyle.Underline && I.push("underline"), a.fontStyle & FontStyle.Strikethrough && I.push("line-through"), I.length && (P["text-decoration"] = I.join(" "));
149
+ }
150
+ return P;
151
+ }
152
+ function stringifyTokenStyle(a) {
153
+ return typeof a == "string" ? a : Object.entries(a).map(([a, P]) => `${a}:${P}`).join(";");
154
+ }
155
+ var _grammarStateMap = /* @__PURE__ */ new WeakMap();
156
+ function setLastGrammarStateToMap(a, P) {
157
+ _grammarStateMap.set(a, P);
158
+ }
159
+ function getLastGrammarStateFromMap(a) {
160
+ return _grammarStateMap.get(a);
161
+ }
162
+ var GrammarState = class a {
163
+ _stacks = {};
164
+ lang;
165
+ get themes() {
166
+ return Object.keys(this._stacks);
167
+ }
168
+ get theme() {
169
+ return this.themes[0];
170
+ }
171
+ get _stack() {
172
+ return this._stacks[this.theme];
173
+ }
174
+ static initial(P, F) {
175
+ return new a(Object.fromEntries(toArray(F).map((a) => [a, INITIAL])), P);
176
+ }
177
+ constructor(...a) {
178
+ if (a.length === 2) {
179
+ let [P, F] = a;
180
+ this.lang = F, this._stacks = P;
181
+ } else {
182
+ let [P, F, I] = a;
183
+ this.lang = F, this._stacks = { [I]: P };
184
+ }
185
+ }
186
+ getInternalStack(a = this.theme) {
187
+ return this._stacks[a];
188
+ }
189
+ getScopes(a = this.theme) {
190
+ return getScopes(this._stacks[a]);
191
+ }
192
+ toJSON() {
193
+ return {
194
+ lang: this.lang,
195
+ theme: this.theme,
196
+ themes: this.themes,
197
+ scopes: this.getScopes()
198
+ };
199
+ }
200
+ };
201
+ function getScopes(a) {
202
+ let P = [], F = /* @__PURE__ */ new Set();
203
+ function I(a) {
204
+ if (F.has(a)) return;
205
+ F.add(a);
206
+ let L = a?.nameScopesList?.scopeName;
207
+ L && P.push(L), a.parent && I(a.parent);
208
+ }
209
+ return I(a), P;
210
+ }
211
+ function getGrammarStack(P, F) {
212
+ if (!(P instanceof GrammarState)) throw new ShikiError("Invalid grammar state");
213
+ return P.getInternalStack(F);
214
+ }
215
+ function transformerDecorations() {
216
+ let P = /* @__PURE__ */ new WeakMap();
217
+ function F(F) {
218
+ if (!P.has(F.meta)) {
219
+ let I = function(P) {
220
+ if (typeof P == "number") {
221
+ if (P < 0 || P > F.source.length) throw new ShikiError(`Invalid decoration offset: ${P}. Code length: ${F.source.length}`);
125
222
  return {
126
- ...r.indexToPos(t),
127
- offset: t
223
+ ...L.indexToPos(P),
224
+ offset: P
128
225
  };
129
226
  } else {
130
- let n = r.lines[t.line];
131
- if (n === void 0) throw new e(`Invalid decoration position ${JSON.stringify(t)}. Lines length: ${r.lines.length}`);
132
- let i = t.character;
133
- if (i < 0 && (i = n.length + i), i < 0 || i > n.length) throw new e(`Invalid decoration position ${JSON.stringify(t)}. Line ${t.line} length: ${n.length}`);
227
+ let F = L.lines[P.line];
228
+ if (F === void 0) throw new ShikiError(`Invalid decoration position ${JSON.stringify(P)}. Lines length: ${L.lines.length}`);
229
+ let I = P.character;
230
+ if (I < 0 && (I = F.length + I), I < 0 || I > F.length) throw new ShikiError(`Invalid decoration position ${JSON.stringify(P)}. Line ${P.line} length: ${F.length}`);
134
231
  return {
135
- ...t,
136
- character: i,
137
- offset: r.posToIndex(t.line, i)
232
+ ...P,
233
+ character: I,
234
+ offset: L.posToIndex(P.line, I)
138
235
  };
139
236
  }
140
- }
141
- let a = (n.options.decorations || []).map((e) => ({
142
- ...e,
143
- start: i(e.start),
144
- end: i(e.end)
237
+ }, L = createPositionConverter(F.source), R = (F.options.decorations || []).map((a) => ({
238
+ ...a,
239
+ start: I(a.start),
240
+ end: I(a.end)
145
241
  }));
146
- D(a), t.set(n.meta, {
147
- decorations: a,
148
- converter: r,
149
- source: n.source
242
+ verifyIntersections(R), P.set(F.meta, {
243
+ decorations: R,
244
+ converter: L,
245
+ source: F.source
150
246
  });
151
247
  }
152
- return t.get(n.meta);
248
+ return P.get(F.meta);
153
249
  }
154
250
  return {
155
251
  name: "shiki:decorations",
156
- tokens(e) {
157
- if (this.options.decorations?.length) return S(e, n(this).decorations.flatMap((e) => [e.start.offset, e.end.offset]));
252
+ tokens(a) {
253
+ if (this.options.decorations?.length) return splitTokens(a, F(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]));
158
254
  },
159
- code(t) {
255
+ code(P) {
160
256
  if (!this.options.decorations?.length) return;
161
- let r = n(this), i = Array.from(t.children).filter((e) => e.type === "element" && e.tagName === "span");
162
- if (i.length !== r.converter.lines.length) throw new e(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
163
- function a(t, n, r, a) {
164
- let o = i[t], c = "", l = -1, u = -1;
165
- if (n === 0 && (l = 0), r === 0 && (u = 0), r === Infinity && (u = o.children.length), l === -1 || u === -1) for (let e = 0; e < o.children.length; e++) c += O(o.children[e]), l === -1 && c.length === n && (l = e + 1), u === -1 && c.length === r && (u = e + 1);
166
- if (l === -1) throw new e(`Failed to find start index for decoration ${JSON.stringify(a.start)}`);
167
- if (u === -1) throw new e(`Failed to find end index for decoration ${JSON.stringify(a.end)}`);
168
- let d = o.children.slice(l, u);
169
- if (!a.alwaysWrap && d.length === o.children.length) s(o, a, "line");
170
- else if (!a.alwaysWrap && d.length === 1 && d[0].type === "element") s(d[0], a, "token");
257
+ let I = F(this), L = Array.from(P.children).filter((a) => a.type === "element" && a.tagName === "span");
258
+ if (L.length !== I.converter.lines.length) throw new ShikiError(`Number of lines in code element (${L.length}) does not match the number of lines in the source (${I.converter.lines.length}). Failed to apply decorations.`);
259
+ function R(P, F, I, R) {
260
+ let z = L[P], V = "", H = -1, U = -1;
261
+ if (F === 0 && (H = 0), I === 0 && (U = 0), I === Infinity && (U = z.children.length), H === -1 || U === -1) for (let a = 0; a < z.children.length; a++) V += stringify(z.children[a]), H === -1 && V.length === F && (H = a + 1), U === -1 && V.length === I && (U = a + 1);
262
+ if (H === -1) throw new ShikiError(`Failed to find start index for decoration ${JSON.stringify(R.start)}`);
263
+ if (U === -1) throw new ShikiError(`Failed to find end index for decoration ${JSON.stringify(R.end)}`);
264
+ let W = z.children.slice(H, U);
265
+ if (!R.alwaysWrap && W.length === z.children.length) B(z, R, "line");
266
+ else if (!R.alwaysWrap && W.length === 1 && W[0].type === "element") B(W[0], R, "token");
171
267
  else {
172
- let e = {
268
+ let a = {
173
269
  type: "element",
174
270
  tagName: "span",
175
271
  properties: {},
176
- children: d
272
+ children: W
177
273
  };
178
- s(e, a, "wrapper"), o.children.splice(l, d.length, e);
274
+ B(a, R, "wrapper"), z.children.splice(H, W.length, a);
179
275
  }
180
276
  }
181
- function o(e, t) {
182
- i[e] = s(i[e], t, "line");
277
+ function z(a, P) {
278
+ L[a] = B(L[a], P, "line");
183
279
  }
184
- function s(e, t, n) {
185
- let r = t.properties || {}, i = t.transform || ((e) => e);
186
- return e.tagName = t.tagName || "span", e.properties = {
187
- ...e.properties,
188
- ...r,
189
- class: e.properties.class
190
- }, t.properties?.class && g(e, t.properties.class), e = i(e, n) || e, e;
280
+ function B(a, P, F) {
281
+ let I = P.properties || {}, L = P.transform || ((a) => a);
282
+ return a.tagName = P.tagName || "span", a.properties = {
283
+ ...a.properties,
284
+ ...I,
285
+ class: a.properties.class
286
+ }, P.properties?.class && addClassToHast(a, P.properties.class), a = L(a, F) || a, a;
191
287
  }
192
- let c = [], l = r.decorations.sort((e, t) => t.start.offset - e.start.offset || e.end.offset - t.end.offset);
193
- for (let e of l) {
194
- let { start: t, end: n } = e;
195
- if (t.line === n.line) a(t.line, t.character, n.character, e);
196
- else if (t.line < n.line) {
197
- a(t.line, t.character, Infinity, e);
198
- for (let r = t.line + 1; r < n.line; r++) c.unshift(() => o(r, e));
199
- a(n.line, 0, n.character, e);
288
+ let V = [], H = I.decorations.sort((a, P) => P.start.offset - a.start.offset || a.end.offset - P.end.offset);
289
+ for (let a of H) {
290
+ let { start: P, end: F } = a;
291
+ if (P.line === F.line) R(P.line, P.character, F.character, a);
292
+ else if (P.line < F.line) {
293
+ R(P.line, P.character, Infinity, a);
294
+ for (let I = P.line + 1; I < F.line; I++) V.unshift(() => z(I, a));
295
+ R(F.line, 0, F.character, a);
200
296
  }
201
297
  }
202
- c.forEach((e) => e());
298
+ V.forEach((a) => a());
203
299
  }
204
300
  };
205
301
  }
206
- function D(t) {
207
- for (let n = 0; n < t.length; n++) {
208
- let r = t[n];
209
- if (r.start.offset > r.end.offset) throw new e(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);
210
- for (let i = n + 1; i < t.length; i++) {
211
- let n = t[i], a = r.start.offset <= n.start.offset && n.start.offset < r.end.offset, o = r.start.offset < n.end.offset && n.end.offset <= r.end.offset, s = n.start.offset <= r.start.offset && r.start.offset < n.end.offset, c = n.start.offset < r.end.offset && r.end.offset <= n.end.offset;
212
- if (a || o || s || c) {
213
- if (a && o || s && c || s && r.start.offset === r.end.offset || o && n.start.offset === n.end.offset) continue;
214
- throw new e(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(n.start)} intersect.`);
302
+ function verifyIntersections(P) {
303
+ for (let F = 0; F < P.length; F++) {
304
+ let I = P[F];
305
+ if (I.start.offset > I.end.offset) throw new ShikiError(`Invalid decoration range: ${JSON.stringify(I.start)} - ${JSON.stringify(I.end)}`);
306
+ for (let L = F + 1; L < P.length; L++) {
307
+ let F = P[L], R = I.start.offset <= F.start.offset && F.start.offset < I.end.offset, z = I.start.offset < F.end.offset && F.end.offset <= I.end.offset, B = F.start.offset <= I.start.offset && I.start.offset < F.end.offset, V = F.start.offset < I.end.offset && I.end.offset <= F.end.offset;
308
+ if (R || z || B || V) {
309
+ if (R && z || B && V || B && I.start.offset === I.end.offset || z && F.start.offset === F.end.offset) continue;
310
+ throw new ShikiError(`Decorations ${JSON.stringify(I.start)} and ${JSON.stringify(F.start)} intersect.`);
215
311
  }
216
312
  }
217
313
  }
218
314
  }
219
- function O(e) {
220
- return e.type === "text" ? e.value : e.type === "element" ? e.children.map(O).join("") : "";
315
+ function stringify(a) {
316
+ return a.type === "text" ? a.value : a.type === "element" ? a.children.map(stringify).join("") : "";
221
317
  }
222
- var k = [/* @__PURE__ */ E()];
223
- function A(e) {
224
- let t = j(e.transformers || []);
318
+ var builtInTransformers = [/* @__PURE__ */ transformerDecorations()];
319
+ function getTransformers(a) {
320
+ let P = sortTransformersByEnforcement(a.transformers || []);
225
321
  return [
226
- ...t.pre,
227
- ...t.normal,
228
- ...t.post,
229
- ...k
322
+ ...P.pre,
323
+ ...P.normal,
324
+ ...P.post,
325
+ ...builtInTransformers
230
326
  ];
231
327
  }
232
- function j(e) {
233
- let t = [], n = [], r = [];
234
- for (let i of e) switch (i.enforce) {
328
+ function sortTransformersByEnforcement(a) {
329
+ let P = [], F = [], I = [];
330
+ for (let L of a) switch (L.enforce) {
235
331
  case "pre":
236
- t.push(i);
332
+ P.push(L);
237
333
  break;
238
334
  case "post":
239
- n.push(i);
335
+ F.push(L);
240
336
  break;
241
- default: r.push(i);
337
+ default: I.push(L);
242
338
  }
243
339
  return {
244
- pre: t,
245
- post: n,
246
- normal: r
340
+ pre: P,
341
+ post: F,
342
+ normal: I
247
343
  };
248
344
  }
249
- var M = [
345
+ var namedColors = [
250
346
  "black",
251
347
  "red",
252
348
  "green",
@@ -263,7 +359,7 @@ var M = [
263
359
  "brightMagenta",
264
360
  "brightCyan",
265
361
  "brightWhite"
266
- ], N = {
362
+ ], decorations = {
267
363
  1: "bold",
268
364
  2: "dim",
269
365
  3: "italic",
@@ -272,125 +368,125 @@ var M = [
272
368
  8: "hidden",
273
369
  9: "strikethrough"
274
370
  };
275
- function P(e, t) {
276
- let n = e.indexOf("\x1B", t);
277
- if (n !== -1 && e[n + 1] === "[") {
278
- let t = e.indexOf("m", n);
279
- if (t !== -1) return {
280
- sequence: e.substring(n + 2, t).split(";"),
281
- startPosition: n,
282
- position: t + 1
371
+ function findSequence(a, P) {
372
+ let F = a.indexOf("\x1B", P);
373
+ if (F !== -1 && a[F + 1] === "[") {
374
+ let P = a.indexOf("m", F);
375
+ if (P !== -1) return {
376
+ sequence: a.substring(F + 2, P).split(";"),
377
+ startPosition: F,
378
+ position: P + 1
283
379
  };
284
380
  }
285
- return { position: e.length };
381
+ return { position: a.length };
286
382
  }
287
- function F(e) {
288
- let t = e.shift();
289
- if (t === "2") {
290
- let t = e.splice(0, 3).map((e) => Number.parseInt(e));
291
- return t.length !== 3 || t.some((e) => Number.isNaN(e)) ? void 0 : {
383
+ function parseColor(a) {
384
+ let P = a.shift();
385
+ if (P === "2") {
386
+ let P = a.splice(0, 3).map((a) => Number.parseInt(a));
387
+ return P.length !== 3 || P.some((a) => Number.isNaN(a)) ? void 0 : {
292
388
  type: "rgb",
293
- rgb: t
389
+ rgb: P
294
390
  };
295
- } else if (t === "5") {
296
- let t = e.shift();
297
- if (t) return {
391
+ } else if (P === "5") {
392
+ let P = a.shift();
393
+ if (P) return {
298
394
  type: "table",
299
- index: Number(t)
395
+ index: Number(P)
300
396
  };
301
397
  }
302
398
  }
303
- function I(e) {
304
- let t = [];
305
- for (; e.length > 0;) {
306
- let n = e.shift();
307
- if (!n) continue;
308
- let r = Number.parseInt(n);
309
- if (!Number.isNaN(r)) if (r === 0) t.push({ type: "resetAll" });
310
- else if (r <= 9) N[r] && t.push({
399
+ function parseSequence(a) {
400
+ let P = [];
401
+ for (; a.length > 0;) {
402
+ let F = a.shift();
403
+ if (!F) continue;
404
+ let I = Number.parseInt(F);
405
+ if (!Number.isNaN(I)) if (I === 0) P.push({ type: "resetAll" });
406
+ else if (I <= 9) decorations[I] && P.push({
311
407
  type: "setDecoration",
312
- value: N[r]
408
+ value: decorations[I]
313
409
  });
314
- else if (r <= 29) {
315
- let e = N[r - 20];
316
- e && (t.push({
410
+ else if (I <= 29) {
411
+ let a = decorations[I - 20];
412
+ a && (P.push({
317
413
  type: "resetDecoration",
318
- value: e
319
- }), e === "dim" && t.push({
414
+ value: a
415
+ }), a === "dim" && P.push({
320
416
  type: "resetDecoration",
321
417
  value: "bold"
322
418
  }));
323
- } else if (r <= 37) t.push({
419
+ } else if (I <= 37) P.push({
324
420
  type: "setForegroundColor",
325
421
  value: {
326
422
  type: "named",
327
- name: M[r - 30]
423
+ name: namedColors[I - 30]
328
424
  }
329
425
  });
330
- else if (r === 38) {
331
- let n = F(e);
332
- n && t.push({
426
+ else if (I === 38) {
427
+ let F = parseColor(a);
428
+ F && P.push({
333
429
  type: "setForegroundColor",
334
- value: n
430
+ value: F
335
431
  });
336
- } else if (r === 39) t.push({ type: "resetForegroundColor" });
337
- else if (r <= 47) t.push({
432
+ } else if (I === 39) P.push({ type: "resetForegroundColor" });
433
+ else if (I <= 47) P.push({
338
434
  type: "setBackgroundColor",
339
435
  value: {
340
436
  type: "named",
341
- name: M[r - 40]
437
+ name: namedColors[I - 40]
342
438
  }
343
439
  });
344
- else if (r === 48) {
345
- let n = F(e);
346
- n && t.push({
440
+ else if (I === 48) {
441
+ let F = parseColor(a);
442
+ F && P.push({
347
443
  type: "setBackgroundColor",
348
- value: n
444
+ value: F
349
445
  });
350
- } else r === 49 ? t.push({ type: "resetBackgroundColor" }) : r === 53 ? t.push({
446
+ } else I === 49 ? P.push({ type: "resetBackgroundColor" }) : I === 53 ? P.push({
351
447
  type: "setDecoration",
352
448
  value: "overline"
353
- }) : r === 55 ? t.push({
449
+ }) : I === 55 ? P.push({
354
450
  type: "resetDecoration",
355
451
  value: "overline"
356
- }) : r >= 90 && r <= 97 ? t.push({
452
+ }) : I >= 90 && I <= 97 ? P.push({
357
453
  type: "setForegroundColor",
358
454
  value: {
359
455
  type: "named",
360
- name: M[r - 90 + 8]
456
+ name: namedColors[I - 90 + 8]
361
457
  }
362
- }) : r >= 100 && r <= 107 && t.push({
458
+ }) : I >= 100 && I <= 107 && P.push({
363
459
  type: "setBackgroundColor",
364
460
  value: {
365
461
  type: "named",
366
- name: M[r - 100 + 8]
462
+ name: namedColors[I - 100 + 8]
367
463
  }
368
464
  });
369
465
  }
370
- return t;
466
+ return P;
371
467
  }
372
- function L() {
373
- let e = null, t = null, n = /* @__PURE__ */ new Set();
374
- return { parse(r) {
375
- let i = [], a = 0;
468
+ function createAnsiSequenceParser() {
469
+ let a = null, P = null, F = /* @__PURE__ */ new Set();
470
+ return { parse(I) {
471
+ let L = [], R = 0;
376
472
  do {
377
- let o = P(r, a), s = o.sequence ? r.substring(a, o.startPosition) : r.substring(a);
378
- if (s.length > 0 && i.push({
379
- value: s,
380
- foreground: e,
381
- background: t,
382
- decorations: new Set(n)
383
- }), o.sequence) {
384
- let r = I(o.sequence);
385
- for (let i of r) i.type === "resetAll" ? (e = null, t = null, n.clear()) : i.type === "resetForegroundColor" ? e = null : i.type === "resetBackgroundColor" ? t = null : i.type === "resetDecoration" && n.delete(i.value);
386
- for (let i of r) i.type === "setForegroundColor" ? e = i.value : i.type === "setBackgroundColor" ? t = i.value : i.type === "setDecoration" && n.add(i.value);
473
+ let z = findSequence(I, R), B = z.sequence ? I.substring(R, z.startPosition) : I.substring(R);
474
+ if (B.length > 0 && L.push({
475
+ value: B,
476
+ foreground: a,
477
+ background: P,
478
+ decorations: new Set(F)
479
+ }), z.sequence) {
480
+ let I = parseSequence(z.sequence);
481
+ for (let L of I) L.type === "resetAll" ? (a = null, P = null, F.clear()) : L.type === "resetForegroundColor" ? a = null : L.type === "resetBackgroundColor" ? P = null : L.type === "resetDecoration" && F.delete(L.value);
482
+ for (let L of I) L.type === "setForegroundColor" ? a = L.value : L.type === "setBackgroundColor" ? P = L.value : L.type === "setDecoration" && F.add(L.value);
387
483
  }
388
- a = o.position;
389
- } while (a < r.length);
390
- return i;
484
+ R = z.position;
485
+ } while (R < I.length);
486
+ return L;
391
487
  } };
392
488
  }
393
- var R = {
489
+ var defaultNamedColorsMap = {
394
490
  black: "#000000",
395
491
  red: "#bb0000",
396
492
  green: "#00bb00",
@@ -408,19 +504,19 @@ var R = {
408
504
  brightCyan: "#55ffff",
409
505
  brightWhite: "#ffffff"
410
506
  };
411
- function z(e = R) {
412
- function t(t) {
413
- return e[t];
414
- }
415
- function n(e) {
416
- return `#${e.map((e) => Math.max(0, Math.min(e, 255)).toString(16).padStart(2, "0")).join("")}`;
417
- }
418
- let r;
419
- function i() {
420
- if (r) return r;
421
- r = [];
422
- for (let e = 0; e < M.length; e++) r.push(t(M[e]));
423
- let e = [
507
+ function createColorPalette(a = defaultNamedColorsMap) {
508
+ function P(P) {
509
+ return a[P];
510
+ }
511
+ function F(a) {
512
+ return `#${a.map((a) => Math.max(0, Math.min(a, 255)).toString(16).padStart(2, "0")).join("")}`;
513
+ }
514
+ let I;
515
+ function L() {
516
+ if (I) return I;
517
+ I = [];
518
+ for (let a = 0; a < namedColors.length; a++) I.push(P(namedColors[a]));
519
+ let a = [
424
520
  0,
425
521
  95,
426
522
  135,
@@ -428,32 +524,32 @@ function z(e = R) {
428
524
  215,
429
525
  255
430
526
  ];
431
- for (let t = 0; t < 6; t++) for (let i = 0; i < 6; i++) for (let a = 0; a < 6; a++) r.push(n([
432
- e[t],
433
- e[i],
434
- e[a]
527
+ for (let P = 0; P < 6; P++) for (let L = 0; L < 6; L++) for (let R = 0; R < 6; R++) I.push(F([
528
+ a[P],
529
+ a[L],
530
+ a[R]
435
531
  ]));
436
- let i = 8;
437
- for (let e = 0; e < 24; e++, i += 10) r.push(n([
438
- i,
439
- i,
440
- i
532
+ let L = 8;
533
+ for (let a = 0; a < 24; a++, L += 10) I.push(F([
534
+ L,
535
+ L,
536
+ L
441
537
  ]));
442
- return r;
538
+ return I;
443
539
  }
444
- function a(e) {
445
- return i()[e];
540
+ function R(a) {
541
+ return L()[a];
446
542
  }
447
- function o(e) {
448
- switch (e.type) {
449
- case "named": return t(e.name);
450
- case "rgb": return n(e.rgb);
451
- case "table": return a(e.index);
543
+ function z(a) {
544
+ switch (a.type) {
545
+ case "named": return P(a.name);
546
+ case "rgb": return F(a.rgb);
547
+ case "table": return R(a.index);
452
548
  }
453
549
  }
454
- return { value: o };
550
+ return { value: z };
455
551
  }
456
- var B = {
552
+ var defaultAnsiColors = {
457
553
  black: "#000000",
458
554
  red: "#cd3131",
459
555
  green: "#0DBC79",
@@ -471,414 +567,854 @@ var B = {
471
567
  brightCyan: "#29B8DB",
472
568
  brightWhite: "#FFFFFF"
473
569
  };
474
- function V(e, r, i) {
475
- let a = f(e, i), o = m(r), s = z(Object.fromEntries(M.map((t) => {
476
- let n = `terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;
477
- return [t, e.colors?.[n] || B[t]];
478
- }))), c = L();
479
- return o.map((r) => c.parse(r[0]).map((i) => {
480
- let o, c;
481
- i.decorations.has("reverse") ? (o = i.background ? s.value(i.background) : e.bg, c = i.foreground ? s.value(i.foreground) : e.fg) : (o = i.foreground ? s.value(i.foreground) : e.fg, c = i.background ? s.value(i.background) : void 0), o = n(o, a), c = n(c, a), i.decorations.has("dim") && (o = H(o));
482
- let l = t.None;
483
- return i.decorations.has("bold") && (l |= t.Bold), i.decorations.has("italic") && (l |= t.Italic), i.decorations.has("underline") && (l |= t.Underline), i.decorations.has("strikethrough") && (l |= t.Strikethrough), {
484
- content: i.value,
485
- offset: r[1],
486
- color: o,
487
- bgColor: c,
488
- fontStyle: l
570
+ function tokenizeAnsiWithTheme(a, P, I) {
571
+ let L = resolveColorReplacements(a, I), R = splitLines(P), z = createColorPalette(Object.fromEntries(namedColors.map((P) => {
572
+ let F = `terminal.ansi${P[0].toUpperCase()}${P.substring(1)}`;
573
+ return [P, a.colors?.[F] || defaultAnsiColors[P]];
574
+ }))), H = createAnsiSequenceParser();
575
+ return R.map((P) => H.parse(P[0]).map((I) => {
576
+ let R, B;
577
+ I.decorations.has("reverse") ? (R = I.background ? z.value(I.background) : a.bg, B = I.foreground ? z.value(I.foreground) : a.fg) : (R = I.foreground ? z.value(I.foreground) : a.fg, B = I.background ? z.value(I.background) : void 0), R = applyColorReplacements(R, L), B = applyColorReplacements(B, L), I.decorations.has("dim") && (R = dimColor(R));
578
+ let H = FontStyle.None;
579
+ return I.decorations.has("bold") && (H |= FontStyle.Bold), I.decorations.has("italic") && (H |= FontStyle.Italic), I.decorations.has("underline") && (H |= FontStyle.Underline), I.decorations.has("strikethrough") && (H |= FontStyle.Strikethrough), {
580
+ content: I.value,
581
+ offset: P[1],
582
+ color: R,
583
+ bgColor: B,
584
+ fontStyle: H
489
585
  };
490
586
  }));
491
587
  }
492
- function H(e) {
493
- let t = e.match(/#([0-9a-f]{3,8})/i);
494
- if (t) {
495
- let e = t[1];
496
- if (e.length === 8) {
497
- let t = Math.round(Number.parseInt(e.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
498
- return `#${e.slice(0, 6)}${t}`;
499
- } else if (e.length === 6) return `#${e}80`;
500
- else if (e.length === 4) {
501
- let t = e[0], n = e[1], r = e[2], i = e[3];
502
- return `#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`, 16) / 2).toString(16).padStart(2, "0")}`;
503
- } else if (e.length === 3) {
504
- let t = e[0], n = e[1], r = e[2];
505
- return `#${t}${t}${n}${n}${r}${r}80`;
588
+ function dimColor(a) {
589
+ let P = a.match(/#([0-9a-f]{3,8})/i);
590
+ if (P) {
591
+ let a = P[1];
592
+ if (a.length === 8) {
593
+ let P = Math.round(Number.parseInt(a.slice(6, 8), 16) / 2).toString(16).padStart(2, "0");
594
+ return `#${a.slice(0, 6)}${P}`;
595
+ } else if (a.length === 6) return `#${a}80`;
596
+ else if (a.length === 4) {
597
+ let P = a[0], F = a[1], I = a[2], L = a[3];
598
+ return `#${P}${P}${F}${F}${I}${I}${Math.round(Number.parseInt(`${L}${L}`, 16) / 2).toString(16).padStart(2, "0")}`;
599
+ } else if (a.length === 3) {
600
+ let P = a[0], F = a[1], I = a[2];
601
+ return `#${P}${P}${F}${F}${I}${I}80`;
506
602
  }
507
603
  }
508
- let n = e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
509
- return n ? `var(${n[1]}-dim)` : e;
510
- }
511
- function U(e, t, n = {}) {
512
- let i = e.resolveLangAlias(n.lang || "text"), { theme: a = e.getLoadedThemes()[0] } = n;
513
- if (!l(i) && !c(a) && i === "ansi") {
514
- let { theme: r } = e.setTheme(a);
515
- return V(r, t, n);
516
- }
517
- return r(e, t, n);
518
- }
519
- function W(t, r, a) {
520
- let o, c, l, u, d, m;
521
- if ("themes" in a) {
522
- let { defaultColor: n = "light", cssVariablePrefix: h = "--shiki-", colorsRendering: g = "css-vars" } = a, _ = Object.entries(a.themes).filter((e) => e[1]).map((e) => ({
523
- color: e[0],
524
- theme: e[1]
525
- })).sort((e, t) => e.color === n ? -1 : +(t.color === n));
526
- if (_.length === 0) throw new e("`themes` option must not be empty");
527
- let v = i(t, r, a, U);
528
- if (m = s(v), n && y !== n && !_.find((e) => e.color === n)) throw new e(`\`themes\` option must contain the defaultColor key \`${n}\``);
529
- let b = _.map((e) => t.getTheme(e.theme)), x = _.map((e) => e.color);
530
- l = v.map((e) => e.map((e) => C(e, x, h, n, g))), m && p(l, m);
531
- let S = _.map((e) => f(e.theme, a));
532
- c = G(_, b, S, h, n, "fg", g), o = G(_, b, S, h, n, "bg", g), u = `shiki-themes ${b.map((e) => e.name).join(" ")}`, d = n ? void 0 : [c, o].join(";");
533
- } else if ("theme" in a) {
534
- let e = f(a.theme, a);
535
- l = U(t, r, a);
536
- let i = t.getTheme(a.theme);
537
- o = n(i.bg, e), c = n(i.fg, e), u = i.name, m = s(l);
538
- } else throw new e("Invalid options, either `theme` or `themes` must be provided");
604
+ let F = a.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
605
+ return F ? `var(${F[1]}-dim)` : a;
606
+ }
607
+ function codeToTokensBase(P, F, I = {}) {
608
+ let { theme: L = P.getLoadedThemes()[0] } = I, R = P.resolveLangAlias(I.lang || "text");
609
+ if (isPlainLang(R) || isNoneTheme(L)) return splitLines(F).map((a) => [{
610
+ content: a[0],
611
+ offset: a[1]
612
+ }]);
613
+ let { theme: z, colorMap: B } = P.setTheme(L);
614
+ if (R === "ansi") return tokenizeAnsiWithTheme(z, F, I);
615
+ let V = P.getLanguage(I.lang || "text");
616
+ if (I.grammarState) {
617
+ if (I.grammarState.lang !== V.name) throw new ShikiError(`Grammar state language "${I.grammarState.lang}" does not match highlight language "${V.name}"`);
618
+ if (!I.grammarState.themes.includes(z.name)) throw new ShikiError(`Grammar state themes "${I.grammarState.themes}" do not contain highlight theme "${z.name}"`);
619
+ }
620
+ return tokenizeWithTheme(F, V, z, B, I);
621
+ }
622
+ function getLastGrammarState(...P) {
623
+ if (P.length === 2) return getLastGrammarStateFromMap(P[1]);
624
+ let [F, I, L = {}] = P, { lang: R = "text", theme: z = F.getLoadedThemes()[0] } = L;
625
+ if (isPlainLang(R) || isNoneTheme(z)) throw new ShikiError("Plain language does not have grammar state");
626
+ if (R === "ansi") throw new ShikiError("ANSI language does not have grammar state");
627
+ let { theme: B, colorMap: V } = F.setTheme(z), H = F.getLanguage(R);
628
+ return new GrammarState(_tokenizeWithTheme(I, H, B, V, L).stateStack, H.name, B.name);
629
+ }
630
+ function tokenizeWithTheme(a, P, F, I, L) {
631
+ let R = _tokenizeWithTheme(a, P, F, I, L), z = new GrammarState(R.stateStack, P.name, F.name);
632
+ return setLastGrammarStateToMap(R.tokens, z), R.tokens;
633
+ }
634
+ function _tokenizeWithTheme(a, F, L, R, z) {
635
+ let H = resolveColorReplacements(L, z), { tokenizeMaxLineLength: U = 0, tokenizeTimeLimit: W = 500 } = z, G = splitLines(a), K = z.grammarState ? getGrammarStack(z.grammarState, L.name) ?? INITIAL : z.grammarContextCode == null ? INITIAL : _tokenizeWithTheme(z.grammarContextCode, F, L, R, {
636
+ ...z,
637
+ grammarState: void 0,
638
+ grammarContextCode: void 0
639
+ }).stateStack, q = [], J = [];
640
+ for (let a = 0, I = G.length; a < I; a++) {
641
+ let [I, B] = G[a];
642
+ if (I === "") {
643
+ q = [], J.push([]);
644
+ continue;
645
+ }
646
+ if (U > 0 && I.length >= U) {
647
+ q = [], J.push([{
648
+ content: I,
649
+ offset: B,
650
+ color: "",
651
+ fontStyle: 0
652
+ }]);
653
+ continue;
654
+ }
655
+ let Y, X, Z;
656
+ z.includeExplanation && (Y = F.tokenizeLine(I, K, W), X = Y.tokens, Z = 0);
657
+ let Q = F.tokenizeLine2(I, K, W), $ = Q.tokens.length / 2;
658
+ for (let a = 0; a < $; a++) {
659
+ let F = Q.tokens[2 * a], U = a + 1 < $ ? Q.tokens[2 * a + 2] : I.length;
660
+ if (F === U) continue;
661
+ let W = Q.tokens[2 * a + 1], G = applyColorReplacements(R[EncodedTokenMetadata.getForeground(W)], H), K = EncodedTokenMetadata.getFontStyle(W), J = {
662
+ content: I.substring(F, U),
663
+ offset: B + F,
664
+ color: G,
665
+ fontStyle: K
666
+ };
667
+ if (z.includeExplanation) {
668
+ let a = [];
669
+ if (z.includeExplanation !== "scopeName") for (let P of L.settings) {
670
+ let F;
671
+ switch (typeof P.scope) {
672
+ case "string":
673
+ F = P.scope.split(/,/).map((a) => a.trim());
674
+ break;
675
+ case "object":
676
+ F = P.scope;
677
+ break;
678
+ default: continue;
679
+ }
680
+ a.push({
681
+ settings: P,
682
+ selectors: F.map((a) => a.split(/ /))
683
+ });
684
+ }
685
+ J.explanation = [];
686
+ let P = 0;
687
+ for (; F + P < U;) {
688
+ let F = X[Z], L = I.substring(F.startIndex, F.endIndex);
689
+ P += L.length, J.explanation.push({
690
+ content: L,
691
+ scopes: z.includeExplanation === "scopeName" ? explainThemeScopesNameOnly(F.scopes) : explainThemeScopesFull(a, F.scopes)
692
+ }), Z += 1;
693
+ }
694
+ }
695
+ q.push(J);
696
+ }
697
+ J.push(q), q = [], K = Q.ruleStack;
698
+ }
539
699
  return {
540
- tokens: l,
541
- fg: c,
542
- bg: o,
543
- themeName: u,
544
- rootStyle: d,
545
- grammarState: m
700
+ tokens: J,
701
+ stateStack: K
546
702
  };
547
703
  }
548
- function G(t, r, i, a, o, s, c) {
549
- return t.map((l, u) => {
550
- let d = n(r[u][s], i[u]) || "inherit", f = `${a + l.color}${s === "bg" ? "-bg" : ""}:${d}`;
551
- if (u === 0 && o) {
552
- if (o === y && t.length > 1) {
553
- let a = t.findIndex((e) => e.color === "light"), o = t.findIndex((e) => e.color === "dark");
554
- if (a === -1 || o === -1) throw new e("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
555
- return `light-dark(${n(r[a][s], i[a]) || "inherit"}, ${n(r[o][s], i[o]) || "inherit"});${f}`;
704
+ function explainThemeScopesNameOnly(a) {
705
+ return a.map((a) => ({ scopeName: a }));
706
+ }
707
+ function explainThemeScopesFull(a, P) {
708
+ let F = [];
709
+ for (let I = 0, L = P.length; I < L; I++) {
710
+ let L = P[I];
711
+ F[I] = {
712
+ scopeName: L,
713
+ themeMatches: explainThemeScope(a, L, P.slice(0, I))
714
+ };
715
+ }
716
+ return F;
717
+ }
718
+ function matchesOne(a, P) {
719
+ return a === P || P.substring(0, a.length) === a && P[a.length] === ".";
720
+ }
721
+ function matches(a, P, F) {
722
+ if (!matchesOne(a[a.length - 1], P)) return !1;
723
+ let I = a.length - 2, L = F.length - 1;
724
+ for (; I >= 0 && L >= 0;) matchesOne(a[I], F[L]) && --I, --L;
725
+ return I === -1;
726
+ }
727
+ function explainThemeScope(a, P, F) {
728
+ let I = [];
729
+ for (let { selectors: L, settings: R } of a) for (let a of L) if (matches(a, P, F)) {
730
+ I.push(R);
731
+ break;
732
+ }
733
+ return I;
734
+ }
735
+ function codeToTokensWithThemes(a, P, F) {
736
+ let I = Object.entries(F.themes).filter((a) => a[1]).map((a) => ({
737
+ color: a[0],
738
+ theme: a[1]
739
+ })), L = I.map((I) => {
740
+ let L = codeToTokensBase(a, P, {
741
+ ...F,
742
+ theme: I.theme
743
+ });
744
+ return {
745
+ tokens: L,
746
+ state: getLastGrammarStateFromMap(L),
747
+ theme: typeof I.theme == "string" ? I.theme : I.theme.name
748
+ };
749
+ }), R = syncThemesTokenization(...L.map((a) => a.tokens)), z = R[0].map((a, P) => a.map((a, L) => {
750
+ let z = {
751
+ content: a.content,
752
+ variants: {},
753
+ offset: a.offset
754
+ };
755
+ return "includeExplanation" in F && F.includeExplanation && (z.explanation = a.explanation), R.forEach((a, F) => {
756
+ let { content: R, explanation: B, offset: V, ...H } = a[P][L];
757
+ z.variants[I[F].color] = H;
758
+ }), z;
759
+ })), B = L[0].state ? new GrammarState(Object.fromEntries(L.map((a) => [a.theme, a.state?.getInternalStack(a.theme)])), L[0].state.lang) : void 0;
760
+ return B && setLastGrammarStateToMap(z, B), z;
761
+ }
762
+ function syncThemesTokenization(...a) {
763
+ let P = a.map(() => []), F = a.length;
764
+ for (let I = 0; I < a[0].length; I++) {
765
+ let L = a.map((a) => a[I]), R = P.map(() => []);
766
+ P.forEach((a, P) => a.push(R[P]));
767
+ let z = L.map(() => 0), B = L.map((a) => a[0]);
768
+ for (; B.every((a) => a);) {
769
+ let a = Math.min(...B.map((a) => a.content.length));
770
+ for (let P = 0; P < F; P++) {
771
+ let F = B[P];
772
+ F.content.length === a ? (R[P].push(F), z[P] += 1, B[P] = L[P][z[P]]) : (R[P].push({
773
+ ...F,
774
+ content: F.content.slice(0, a)
775
+ }), B[P] = {
776
+ ...F,
777
+ content: F.content.slice(a),
778
+ offset: F.offset + a
779
+ });
556
780
  }
557
- return d;
558
781
  }
559
- return c === "css-vars" ? f : null;
560
- }).filter((e) => !!e).join(";");
782
+ }
783
+ return P;
561
784
  }
562
- function K(e, t, n, r = {
785
+ function codeToTokens(P, F, I) {
786
+ let L, R, z, H, U, W;
787
+ if ("themes" in I) {
788
+ let { defaultColor: V = "light", cssVariablePrefix: G = "--shiki-", colorsRendering: K = "css-vars" } = I, q = Object.entries(I.themes).filter((a) => a[1]).map((a) => ({
789
+ color: a[0],
790
+ theme: a[1]
791
+ })).sort((a, P) => a.color === V ? -1 : P.color === V ? 1 : 0);
792
+ if (q.length === 0) throw new ShikiError("`themes` option must not be empty");
793
+ let J = codeToTokensWithThemes(P, F, I);
794
+ if (W = getLastGrammarStateFromMap(J), V && DEFAULT_COLOR_LIGHT_DARK !== V && !q.find((a) => a.color === V)) throw new ShikiError(`\`themes\` option must contain the defaultColor key \`${V}\``);
795
+ let Y = q.map((a) => P.getTheme(a.theme)), X = q.map((a) => a.color);
796
+ z = J.map((a) => a.map((a) => flatTokenVariants(a, X, G, V, K))), W && setLastGrammarStateToMap(z, W);
797
+ let Z = q.map((a) => resolveColorReplacements(a.theme, I));
798
+ R = mapThemeColors(q, Y, Z, G, V, "fg", K), L = mapThemeColors(q, Y, Z, G, V, "bg", K), H = `shiki-themes ${Y.map((a) => a.name).join(" ")}`, U = V ? void 0 : [R, L].join(";");
799
+ } else if ("theme" in I) {
800
+ let a = resolveColorReplacements(I.theme, I);
801
+ z = codeToTokensBase(P, F, I);
802
+ let U = P.getTheme(I.theme);
803
+ L = applyColorReplacements(U.bg, a), R = applyColorReplacements(U.fg, a), H = U.name, W = getLastGrammarStateFromMap(z);
804
+ } else throw new ShikiError("Invalid options, either `theme` or `themes` must be provided");
805
+ return {
806
+ tokens: z,
807
+ fg: R,
808
+ bg: L,
809
+ themeName: H,
810
+ rootStyle: U,
811
+ grammarState: W
812
+ };
813
+ }
814
+ function mapThemeColors(P, F, I, L, R, z, B) {
815
+ return P.map((H, U) => {
816
+ let W = applyColorReplacements(F[U][z], I[U]) || "inherit", G = `${L + H.color}${z === "bg" ? "-bg" : ""}:${W}`;
817
+ if (U === 0 && R) {
818
+ if (R === DEFAULT_COLOR_LIGHT_DARK && P.length > 1) {
819
+ let L = P.findIndex((a) => a.color === "light"), R = P.findIndex((a) => a.color === "dark");
820
+ if (L === -1 || R === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
821
+ return `light-dark(${applyColorReplacements(F[L][z], I[L]) || "inherit"}, ${applyColorReplacements(F[R][z], I[R]) || "inherit"});${G}`;
822
+ }
823
+ return W;
824
+ }
825
+ return B === "css-vars" ? G : null;
826
+ }).filter((a) => !!a).join(";");
827
+ }
828
+ function codeToHast(a, P, F, I = {
563
829
  meta: {},
564
- options: n,
565
- codeToHast: (t, n) => K(e, t, n),
566
- codeToTokens: (t, n) => W(e, t, n)
830
+ options: F,
831
+ codeToHast: (P, F) => codeToHast(a, P, F),
832
+ codeToTokens: (P, F) => codeToTokens(a, P, F)
567
833
  }) {
568
- let i = t;
569
- for (let e of A(n)) i = e.preprocess?.call(r, i, n) || i;
570
- let { tokens: a, fg: o, bg: s, themeName: c, rootStyle: l, grammarState: u } = W(e, i, n), { mergeWhitespaces: d = !0, mergeSameStyleTokens: f = !1 } = n;
571
- d === !0 ? a = J(a) : d === "never" && (a = Y(a)), f && (a = X(a));
572
- let p = {
573
- ...r,
834
+ let L = P;
835
+ for (let a of getTransformers(F)) L = a.preprocess?.call(I, L, F) || L;
836
+ let { tokens: R, fg: z, bg: B, themeName: V, rootStyle: H, grammarState: U } = codeToTokens(a, L, F), { mergeWhitespaces: W = !0, mergeSameStyleTokens: G = !1 } = F;
837
+ W === !0 ? R = mergeWhitespaceTokens(R) : W === "never" && (R = splitWhitespaceTokens(R)), G && (R = mergeAdjacentStyledTokens(R));
838
+ let K = {
839
+ ...I,
574
840
  get source() {
575
- return i;
841
+ return L;
576
842
  }
577
843
  };
578
- for (let e of A(n)) a = e.tokens?.call(p, a) || a;
579
- return q(a, {
580
- ...n,
581
- fg: o,
582
- bg: s,
583
- themeName: c,
584
- rootStyle: n.rootStyle === !1 ? !1 : n.rootStyle ?? l
585
- }, p, u);
586
- }
587
- function q(e, t, n, r = s(e)) {
588
- let i = A(t), a = [], o = {
844
+ for (let a of getTransformers(F)) R = a.tokens?.call(K, R) || R;
845
+ return tokensToHast(R, {
846
+ ...F,
847
+ fg: z,
848
+ bg: B,
849
+ themeName: V,
850
+ rootStyle: F.rootStyle === !1 ? !1 : F.rootStyle ?? H
851
+ }, K, U);
852
+ }
853
+ function tokensToHast(a, P, F, I = getLastGrammarStateFromMap(a)) {
854
+ let L = getTransformers(P), R = [], z = {
589
855
  type: "root",
590
856
  children: []
591
- }, { structure: c = "classic", tabindex: l = "0" } = t, u = { class: `shiki ${t.themeName || ""}` };
592
- t.rootStyle !== !1 && (t.rootStyle == null ? u.style = `background-color:${t.bg};color:${t.fg}` : u.style = t.rootStyle), l !== !1 && l != null && (u.tabindex = l.toString());
593
- for (let [e, n] of Object.entries(t.meta || {})) e.startsWith("_") || (u[e] = n);
594
- let d = {
857
+ }, { structure: B = "classic", tabindex: V = "0" } = P, H = { class: `shiki ${P.themeName || ""}` };
858
+ P.rootStyle !== !1 && (P.rootStyle == null ? H.style = `background-color:${P.bg};color:${P.fg}` : H.style = P.rootStyle), V !== !1 && V != null && (H.tabindex = V.toString());
859
+ for (let [a, F] of Object.entries(P.meta || {})) a.startsWith("_") || (H[a] = F);
860
+ let U = {
595
861
  type: "element",
596
862
  tagName: "pre",
597
- properties: u,
863
+ properties: H,
598
864
  children: [],
599
- data: t.data
600
- }, f = {
865
+ data: P.data
866
+ }, W = {
601
867
  type: "element",
602
868
  tagName: "code",
603
869
  properties: {},
604
- children: a
605
- }, m = [], h = {
606
- ...n,
607
- structure: c,
608
- addClassToHast: g,
870
+ children: R
871
+ }, G = [], K = {
872
+ ...F,
873
+ structure: B,
874
+ addClassToHast,
609
875
  get source() {
610
- return n.source;
876
+ return F.source;
611
877
  },
612
878
  get tokens() {
613
- return e;
879
+ return a;
614
880
  },
615
881
  get options() {
616
- return t;
882
+ return P;
617
883
  },
618
884
  get root() {
619
- return o;
885
+ return z;
620
886
  },
621
887
  get pre() {
622
- return d;
888
+ return U;
623
889
  },
624
890
  get code() {
625
- return f;
891
+ return W;
626
892
  },
627
893
  get lines() {
628
- return m;
894
+ return G;
629
895
  }
630
896
  };
631
- if (e.forEach((e, t) => {
632
- t && (c === "inline" ? o.children.push({
897
+ if (a.forEach((a, P) => {
898
+ P && (B === "inline" ? z.children.push({
633
899
  type: "element",
634
900
  tagName: "br",
635
901
  properties: {},
636
902
  children: []
637
- }) : c === "classic" && a.push({
903
+ }) : B === "classic" && R.push({
638
904
  type: "text",
639
905
  value: "\n"
640
906
  }));
641
- let n = {
907
+ let F = {
642
908
  type: "element",
643
909
  tagName: "span",
644
910
  properties: { class: "line" },
645
911
  children: []
646
- }, r = 0;
647
- for (let a of e) {
648
- let e = {
912
+ }, I = 0;
913
+ for (let R of a) {
914
+ let a = {
649
915
  type: "element",
650
916
  tagName: "span",
651
- properties: { ...a.htmlAttrs },
917
+ properties: { ...R.htmlAttrs },
652
918
  children: [{
653
919
  type: "text",
654
- value: a.content
920
+ value: R.content
655
921
  }]
656
- }, s = T(a.htmlStyle || w(a));
657
- s && (e.properties.style = s);
658
- for (let o of i) e = o?.span?.call(h, e, t + 1, r, n, a) || e;
659
- c === "inline" ? o.children.push(e) : c === "classic" && n.children.push(e), r += a.content.length;
922
+ }, V = stringifyTokenStyle(R.htmlStyle || getTokenStyleObject(R));
923
+ V && (a.properties.style = V);
924
+ for (let z of L) a = z?.span?.call(K, a, P + 1, I, F, R) || a;
925
+ B === "inline" ? z.children.push(a) : B === "classic" && F.children.push(a), I += R.content.length;
660
926
  }
661
- if (c === "classic") {
662
- for (let e of i) n = e?.line?.call(h, n, t + 1) || n;
663
- m.push(n), a.push(n);
664
- } else c === "inline" && m.push(n);
665
- }), c === "classic") {
666
- for (let e of i) f = e?.code?.call(h, f) || f;
667
- d.children.push(f);
668
- for (let e of i) d = e?.pre?.call(h, d) || d;
669
- o.children.push(d);
670
- } else if (c === "inline") {
671
- let e = [], t = {
927
+ if (B === "classic") {
928
+ for (let a of L) F = a?.line?.call(K, F, P + 1) || F;
929
+ G.push(F), R.push(F);
930
+ } else B === "inline" && G.push(F);
931
+ }), B === "classic") {
932
+ for (let a of L) W = a?.code?.call(K, W) || W;
933
+ U.children.push(W);
934
+ for (let a of L) U = a?.pre?.call(K, U) || U;
935
+ z.children.push(U);
936
+ } else if (B === "inline") {
937
+ let a = [], P = {
672
938
  type: "element",
673
939
  tagName: "span",
674
940
  properties: { class: "line" },
675
941
  children: []
676
942
  };
677
- for (let n of o.children) n.type === "element" && n.tagName === "br" ? (e.push(t), t = {
943
+ for (let F of z.children) F.type === "element" && F.tagName === "br" ? (a.push(P), P = {
678
944
  type: "element",
679
945
  tagName: "span",
680
946
  properties: { class: "line" },
681
947
  children: []
682
- }) : (n.type === "element" || n.type === "text") && t.children.push(n);
683
- e.push(t);
684
- let n = {
948
+ }) : (F.type === "element" || F.type === "text") && P.children.push(F);
949
+ a.push(P);
950
+ let F = {
685
951
  type: "element",
686
952
  tagName: "code",
687
953
  properties: {},
688
- children: e
954
+ children: a
689
955
  };
690
- for (let e of i) n = e?.code?.call(h, n) || n;
691
- o.children = [];
692
- for (let e = 0; e < n.children.length; e++) {
693
- e > 0 && o.children.push({
956
+ for (let a of L) F = a?.code?.call(K, F) || F;
957
+ z.children = [];
958
+ for (let a = 0; a < F.children.length; a++) {
959
+ a > 0 && z.children.push({
694
960
  type: "element",
695
961
  tagName: "br",
696
962
  properties: {},
697
963
  children: []
698
964
  });
699
- let t = n.children[e];
700
- t.type === "element" && o.children.push(...t.children);
965
+ let P = F.children[a];
966
+ P.type === "element" && z.children.push(...P.children);
701
967
  }
702
968
  }
703
- let _ = o;
704
- for (let e of i) _ = e?.root?.call(h, _) || _;
705
- return r && p(_, r), _;
969
+ let q = z;
970
+ for (let a of L) q = a?.root?.call(K, q) || q;
971
+ return I && setLastGrammarStateToMap(q, I), q;
706
972
  }
707
- function J(e) {
708
- return e.map((e) => {
709
- let n = [], r = "", i;
710
- return e.forEach((a, o) => {
711
- let s = !(a.fontStyle && (a.fontStyle & t.Underline || a.fontStyle & t.Strikethrough));
712
- s && a.content.match(/^\s+$/) && e[o + 1] ? (i === void 0 && (i = a.offset), r += a.content) : r ? (s ? n.push({
713
- ...a,
714
- offset: i,
715
- content: r + a.content
716
- }) : n.push({
717
- content: r,
718
- offset: i
719
- }, a), i = void 0, r = "") : n.push(a);
720
- }), n;
973
+ function mergeWhitespaceTokens(a) {
974
+ return a.map((a) => {
975
+ let P = [], I = "", L;
976
+ return a.forEach((R, z) => {
977
+ let B = !(R.fontStyle && (R.fontStyle & FontStyle.Underline || R.fontStyle & FontStyle.Strikethrough));
978
+ B && R.content.match(/^\s+$/) && a[z + 1] ? (L === void 0 && (L = R.offset), I += R.content) : I ? (B ? P.push({
979
+ ...R,
980
+ offset: L,
981
+ content: I + R.content
982
+ }) : P.push({
983
+ content: I,
984
+ offset: L
985
+ }, R), L = void 0, I = "") : P.push(R);
986
+ }), P;
721
987
  });
722
988
  }
723
- function Y(e) {
724
- return e.map((e) => e.flatMap((e) => {
725
- if (e.content.match(/^\s+$/)) return e;
726
- let t = e.content.match(/^(\s*)(.*?)(\s*)$/);
727
- if (!t) return e;
728
- let [, n, r, i] = t;
729
- if (!n && !i) return e;
730
- let a = [{
731
- ...e,
732
- offset: e.offset + n.length,
733
- content: r
989
+ function splitWhitespaceTokens(a) {
990
+ return a.map((a) => a.flatMap((a) => {
991
+ if (a.content.match(/^\s+$/)) return a;
992
+ let P = a.content.match(/^(\s*)(.*?)(\s*)$/);
993
+ if (!P) return a;
994
+ let [, F, I, L] = P;
995
+ if (!F && !L) return a;
996
+ let R = [{
997
+ ...a,
998
+ offset: a.offset + F.length,
999
+ content: I
734
1000
  }];
735
- return n && a.unshift({
736
- content: n,
737
- offset: e.offset
738
- }), i && a.push({
739
- content: i,
740
- offset: e.offset + n.length + r.length
741
- }), a;
1001
+ return F && R.unshift({
1002
+ content: F,
1003
+ offset: a.offset
1004
+ }), L && R.push({
1005
+ content: L,
1006
+ offset: a.offset + F.length + I.length
1007
+ }), R;
742
1008
  }));
743
1009
  }
744
- function X(e) {
745
- return e.map((e) => {
746
- let n = [];
747
- for (let r of e) {
748
- if (n.length === 0) {
749
- n.push({ ...r });
1010
+ function mergeAdjacentStyledTokens(a) {
1011
+ return a.map((a) => {
1012
+ let P = [];
1013
+ for (let I of a) {
1014
+ if (P.length === 0) {
1015
+ P.push({ ...I });
750
1016
  continue;
751
1017
  }
752
- let e = n[n.length - 1], i = T(e.htmlStyle || w(e)), a = T(r.htmlStyle || w(r)), o = e.fontStyle && (e.fontStyle & t.Underline || e.fontStyle & t.Strikethrough), s = r.fontStyle && (r.fontStyle & t.Underline || r.fontStyle & t.Strikethrough);
753
- !o && !s && i === a ? e.content += r.content : n.push({ ...r });
1018
+ let a = P[P.length - 1], L = stringifyTokenStyle(a.htmlStyle || getTokenStyleObject(a)), R = stringifyTokenStyle(I.htmlStyle || getTokenStyleObject(I)), z = a.fontStyle && (a.fontStyle & FontStyle.Underline || a.fontStyle & FontStyle.Strikethrough), B = I.fontStyle && (I.fontStyle & FontStyle.Underline || I.fontStyle & FontStyle.Strikethrough);
1019
+ !z && !B && L === R ? a.content += I.content : P.push({ ...I });
754
1020
  }
755
- return n;
1021
+ return P;
756
1022
  });
757
1023
  }
758
- var Z = h;
759
- function ee(e, t, n) {
760
- let r = {
1024
+ var hastToHtml = toHtml;
1025
+ function codeToHtml(a, P, F) {
1026
+ let I = {
761
1027
  meta: {},
762
- options: n,
763
- codeToHast: (t, n) => K(e, t, n),
764
- codeToTokens: (t, n) => W(e, t, n)
765
- }, i = Z(K(e, t, n, r));
766
- for (let e of A(n)) i = e.postprocess?.call(r, i, n) || i;
767
- return i;
768
- }
769
- async function Q(e) {
770
- let t = await a(e);
1028
+ options: F,
1029
+ codeToHast: (P, F) => codeToHast(a, P, F),
1030
+ codeToTokens: (P, F) => codeToTokens(a, P, F)
1031
+ }, L = hastToHtml(codeToHast(a, P, F, I));
1032
+ for (let a of getTransformers(F)) L = a.postprocess?.call(I, L, F) || L;
1033
+ return L;
1034
+ }
1035
+ var VSCODE_FALLBACK_EDITOR_FG = {
1036
+ light: "#333333",
1037
+ dark: "#bbbbbb"
1038
+ }, VSCODE_FALLBACK_EDITOR_BG = {
1039
+ light: "#fffffe",
1040
+ dark: "#1e1e1e"
1041
+ }, RESOLVED_KEY = "__shiki_resolved";
1042
+ function normalizeTheme(a) {
1043
+ if (a?.[RESOLVED_KEY]) return a;
1044
+ let P = { ...a };
1045
+ P.tokenColors && !P.settings && (P.settings = P.tokenColors, delete P.tokenColors), P.type ||= "dark", P.colorReplacements = { ...P.colorReplacements }, P.settings ||= [];
1046
+ let { bg: F, fg: I } = P;
1047
+ if (!F || !I) {
1048
+ let a = P.settings ? P.settings.find((a) => !a.name && !a.scope) : void 0;
1049
+ a?.settings?.foreground && (I = a.settings.foreground), a?.settings?.background && (F = a.settings.background), !I && P?.colors?.["editor.foreground"] && (I = P.colors["editor.foreground"]), !F && P?.colors?.["editor.background"] && (F = P.colors["editor.background"]), I ||= P.type === "light" ? VSCODE_FALLBACK_EDITOR_FG.light : VSCODE_FALLBACK_EDITOR_FG.dark, F ||= P.type === "light" ? VSCODE_FALLBACK_EDITOR_BG.light : VSCODE_FALLBACK_EDITOR_BG.dark, P.fg = I, P.bg = F;
1050
+ }
1051
+ P.settings[0] && P.settings[0].settings && !P.settings[0].scope || P.settings.unshift({ settings: {
1052
+ foreground: P.fg,
1053
+ background: P.bg
1054
+ } });
1055
+ let L = 0, R = /* @__PURE__ */ new Map();
1056
+ function z(a) {
1057
+ if (R.has(a)) return R.get(a);
1058
+ L += 1;
1059
+ let F = `#${L.toString(16).padStart(8, "0").toLowerCase()}`;
1060
+ return P.colorReplacements?.[`#${F}`] ? z(a) : (R.set(a, F), F);
1061
+ }
1062
+ P.settings = P.settings.map((a) => {
1063
+ let F = a.settings?.foreground && !a.settings.foreground.startsWith("#"), I = a.settings?.background && !a.settings.background.startsWith("#");
1064
+ if (!F && !I) return a;
1065
+ let L = {
1066
+ ...a,
1067
+ settings: { ...a.settings }
1068
+ };
1069
+ if (F) {
1070
+ let F = z(a.settings.foreground);
1071
+ P.colorReplacements[F] = a.settings.foreground, L.settings.foreground = F;
1072
+ }
1073
+ if (I) {
1074
+ let F = z(a.settings.background);
1075
+ P.colorReplacements[F] = a.settings.background, L.settings.background = F;
1076
+ }
1077
+ return L;
1078
+ });
1079
+ for (let a of Object.keys(P.colors || {})) if ((a === "editor.foreground" || a === "editor.background" || a.startsWith("terminal.ansi")) && !P.colors[a]?.startsWith("#")) {
1080
+ let F = z(P.colors[a]);
1081
+ P.colorReplacements[F] = P.colors[a], P.colors[a] = F;
1082
+ }
1083
+ return Object.defineProperty(P, RESOLVED_KEY, {
1084
+ enumerable: !1,
1085
+ writable: !1,
1086
+ value: !0
1087
+ }), P;
1088
+ }
1089
+ async function resolveLangs(a) {
1090
+ return Array.from(new Set((await Promise.all(a.filter((a) => !isSpecialLang(a)).map(async (a) => await normalizeGetter(a).then((a) => Array.isArray(a) ? a : [a])))).flat()));
1091
+ }
1092
+ async function resolveThemes(a) {
1093
+ return (await Promise.all(a.map(async (a) => isSpecialTheme(a) ? null : normalizeTheme(await normalizeGetter(a))))).filter((a) => !!a);
1094
+ }
1095
+ var _emitDeprecation = 3, _emitError = !1;
1096
+ function warnDeprecated(a, P = 3) {
1097
+ if (_emitDeprecation && !(typeof _emitDeprecation == "number" && P > _emitDeprecation)) {
1098
+ if (_emitError) throw Error(`[SHIKI DEPRECATE]: ${a}`);
1099
+ console.trace(`[SHIKI DEPRECATE]: ${a}`);
1100
+ }
1101
+ }
1102
+ var ShikiError$1 = class extends Error {
1103
+ constructor(a) {
1104
+ super(a), this.name = "ShikiError";
1105
+ }
1106
+ };
1107
+ function resolveLangAlias(a, P) {
1108
+ if (!P) return a;
1109
+ if (P[a]) {
1110
+ let F = /* @__PURE__ */ new Set([a]);
1111
+ for (; P[a];) {
1112
+ if (a = P[a], F.has(a)) throw new ShikiError$1(`Circular alias \`${Array.from(F).join(" -> ")} -> ${a}\``);
1113
+ F.add(a);
1114
+ }
1115
+ }
1116
+ return a;
1117
+ }
1118
+ var Registry$1 = class extends Registry {
1119
+ constructor(a, P, F, I = {}) {
1120
+ super(a), this._resolver = a, this._themes = P, this._langs = F, this._alias = I, this._themes.map((a) => this.loadTheme(a)), this.loadLanguages(this._langs);
1121
+ }
1122
+ _resolvedThemes = /* @__PURE__ */ new Map();
1123
+ _resolvedGrammars = /* @__PURE__ */ new Map();
1124
+ _langMap = /* @__PURE__ */ new Map();
1125
+ _langGraph = /* @__PURE__ */ new Map();
1126
+ _textmateThemeCache = /* @__PURE__ */ new WeakMap();
1127
+ _loadedThemesCache = null;
1128
+ _loadedLanguagesCache = null;
1129
+ getTheme(a) {
1130
+ return typeof a == "string" ? this._resolvedThemes.get(a) : this.loadTheme(a);
1131
+ }
1132
+ loadTheme(a) {
1133
+ let P = normalizeTheme(a);
1134
+ return P.name && (this._resolvedThemes.set(P.name, P), this._loadedThemesCache = null), P;
1135
+ }
1136
+ getLoadedThemes() {
1137
+ return this._loadedThemesCache ||= [...this._resolvedThemes.keys()], this._loadedThemesCache;
1138
+ }
1139
+ setTheme(a) {
1140
+ let P = this._textmateThemeCache.get(a);
1141
+ P || (P = Theme.createFromRawTheme(a), this._textmateThemeCache.set(a, P)), this._syncRegistry.setTheme(P);
1142
+ }
1143
+ getGrammar(a) {
1144
+ return a = resolveLangAlias(a, this._alias), this._resolvedGrammars.get(a);
1145
+ }
1146
+ loadLanguage(a) {
1147
+ if (this.getGrammar(a.name)) return;
1148
+ let P = new Set([...this._langMap.values()].filter((P) => P.embeddedLangsLazy?.includes(a.name)));
1149
+ this._resolver.addLanguage(a);
1150
+ let F = {
1151
+ balancedBracketSelectors: a.balancedBracketSelectors || ["*"],
1152
+ unbalancedBracketSelectors: a.unbalancedBracketSelectors || []
1153
+ };
1154
+ this._syncRegistry._rawGrammars.set(a.scopeName, a);
1155
+ let I = this.loadGrammarWithConfiguration(a.scopeName, 1, F);
1156
+ if (I.name = a.name, this._resolvedGrammars.set(a.name, I), a.aliases && a.aliases.forEach((P) => {
1157
+ this._alias[P] = a.name;
1158
+ }), this._loadedLanguagesCache = null, P.size) for (let a of P) this._resolvedGrammars.delete(a.name), this._loadedLanguagesCache = null, this._syncRegistry?._injectionGrammars?.delete(a.scopeName), this._syncRegistry?._grammars?.delete(a.scopeName), this.loadLanguage(this._langMap.get(a.name));
1159
+ }
1160
+ dispose() {
1161
+ super.dispose(), this._resolvedThemes.clear(), this._resolvedGrammars.clear(), this._langMap.clear(), this._langGraph.clear(), this._loadedThemesCache = null;
1162
+ }
1163
+ loadLanguages(a) {
1164
+ for (let P of a) this.resolveEmbeddedLanguages(P);
1165
+ let P = Array.from(this._langGraph.entries()), F = P.filter(([a, P]) => !P);
1166
+ if (F.length) {
1167
+ let a = P.filter(([a, P]) => P ? (P.embeddedLanguages || P.embeddedLangs)?.some((a) => F.map(([a]) => a).includes(a)) : !1).filter((a) => !F.includes(a));
1168
+ throw new ShikiError$1(`Missing languages ${F.map(([a]) => `\`${a}\``).join(", ")}, required by ${a.map(([a]) => `\`${a}\``).join(", ")}`);
1169
+ }
1170
+ for (let [a, F] of P) this._resolver.addLanguage(F);
1171
+ for (let [a, F] of P) this.loadLanguage(F);
1172
+ }
1173
+ getLoadedLanguages() {
1174
+ return this._loadedLanguagesCache ||= [.../* @__PURE__ */ new Set([...this._resolvedGrammars.keys(), ...Object.keys(this._alias)])], this._loadedLanguagesCache;
1175
+ }
1176
+ resolveEmbeddedLanguages(a) {
1177
+ this._langMap.set(a.name, a), this._langGraph.set(a.name, a);
1178
+ let P = a.embeddedLanguages ?? a.embeddedLangs;
1179
+ if (P) for (let a of P) this._langGraph.set(a, this._langMap.get(a));
1180
+ }
1181
+ }, Resolver = class {
1182
+ _langs = /* @__PURE__ */ new Map();
1183
+ _scopeToLang = /* @__PURE__ */ new Map();
1184
+ _injections = /* @__PURE__ */ new Map();
1185
+ _onigLib;
1186
+ constructor(a, P) {
1187
+ this._onigLib = {
1188
+ createOnigScanner: (P) => a.createScanner(P),
1189
+ createOnigString: (P) => a.createString(P)
1190
+ }, P.forEach((a) => this.addLanguage(a));
1191
+ }
1192
+ get onigLib() {
1193
+ return this._onigLib;
1194
+ }
1195
+ getLangRegistration(a) {
1196
+ return this._langs.get(a);
1197
+ }
1198
+ loadGrammar(a) {
1199
+ return this._scopeToLang.get(a);
1200
+ }
1201
+ addLanguage(a) {
1202
+ this._langs.set(a.name, a), a.aliases && a.aliases.forEach((P) => {
1203
+ this._langs.set(P, a);
1204
+ }), this._scopeToLang.set(a.scopeName, a), a.injectTo && a.injectTo.forEach((P) => {
1205
+ this._injections.get(P) || this._injections.set(P, []), this._injections.get(P).push(a.scopeName);
1206
+ });
1207
+ }
1208
+ getInjections(a) {
1209
+ let P = a.split("."), F = [];
1210
+ for (let a = 1; a <= P.length; a++) {
1211
+ let I = P.slice(0, a).join(".");
1212
+ F = [...F, ...this._injections.get(I) || []];
1213
+ }
1214
+ return F;
1215
+ }
1216
+ }, instancesCount = 0;
1217
+ function createShikiInternalSync(a) {
1218
+ instancesCount += 1, a.warnings !== !1 && instancesCount >= 10 && instancesCount % 10 == 0 && console.warn(`[Shiki] ${instancesCount} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
1219
+ let P = !1;
1220
+ if (!a.engine) throw new ShikiError$1("`engine` option is required for synchronous mode");
1221
+ let F = (a.langs || []).flat(1), I = (a.themes || []).flat(1).map(normalizeTheme), L = new Registry$1(new Resolver(a.engine, F), I, F, a.langAlias), R;
1222
+ function z(P) {
1223
+ return resolveLangAlias(P, a.langAlias);
1224
+ }
1225
+ function B(a) {
1226
+ Y();
1227
+ let P = L.getGrammar(typeof a == "string" ? a : a.name);
1228
+ if (!P) throw new ShikiError$1(`Language \`${a}\` not found, you may need to load it first`);
1229
+ return P;
1230
+ }
1231
+ function V(a) {
1232
+ if (a === "none") return {
1233
+ bg: "",
1234
+ fg: "",
1235
+ name: "none",
1236
+ settings: [],
1237
+ type: "dark"
1238
+ };
1239
+ Y();
1240
+ let P = L.getTheme(a);
1241
+ if (!P) throw new ShikiError$1(`Theme \`${a}\` not found, you may need to load it first`);
1242
+ return P;
1243
+ }
1244
+ function H(a) {
1245
+ Y();
1246
+ let P = V(a);
1247
+ return R !== a && (L.setTheme(P), R = a), {
1248
+ theme: P,
1249
+ colorMap: L.getColorMap()
1250
+ };
1251
+ }
1252
+ function U() {
1253
+ return Y(), L.getLoadedThemes();
1254
+ }
1255
+ function W() {
1256
+ return Y(), L.getLoadedLanguages();
1257
+ }
1258
+ function G(...a) {
1259
+ Y(), L.loadLanguages(a.flat(1));
1260
+ }
1261
+ async function K(...a) {
1262
+ return G(await resolveLangs(a));
1263
+ }
1264
+ function q(...a) {
1265
+ Y();
1266
+ for (let P of a.flat(1)) L.loadTheme(P);
1267
+ }
1268
+ async function J(...a) {
1269
+ return Y(), q(await resolveThemes(a));
1270
+ }
1271
+ function Y() {
1272
+ if (P) throw new ShikiError$1("Shiki instance has been disposed");
1273
+ }
1274
+ function X() {
1275
+ P || (P = !0, L.dispose(), --instancesCount);
1276
+ }
1277
+ return {
1278
+ setTheme: H,
1279
+ getTheme: V,
1280
+ getLanguage: B,
1281
+ getLoadedThemes: U,
1282
+ getLoadedLanguages: W,
1283
+ resolveLangAlias: z,
1284
+ loadLanguage: K,
1285
+ loadLanguageSync: G,
1286
+ loadTheme: J,
1287
+ loadThemeSync: q,
1288
+ dispose: X,
1289
+ [Symbol.dispose]: X
1290
+ };
1291
+ }
1292
+ async function createShikiInternal(a) {
1293
+ a.engine || warnDeprecated("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
1294
+ let [P, F, I] = await Promise.all([
1295
+ resolveThemes(a.themes || []),
1296
+ resolveLangs(a.langs || []),
1297
+ a.engine
1298
+ ]);
1299
+ return createShikiInternalSync({
1300
+ ...a,
1301
+ themes: P,
1302
+ langs: F,
1303
+ engine: I
1304
+ });
1305
+ }
1306
+ async function createHighlighterCore(a) {
1307
+ let P = await createShikiInternal(a);
771
1308
  return {
772
- getLastGrammarState: (...e) => o(t, ...e),
773
- codeToTokensBase: (e, n) => U(t, e, n),
774
- codeToTokensWithThemes: (e, n) => i(t, e, n),
775
- codeToTokens: (e, n) => W(t, e, n),
776
- codeToHast: (e, n) => K(t, e, n),
777
- codeToHtml: (e, n) => ee(t, e, n),
1309
+ getLastGrammarState: (...a) => getLastGrammarState(P, ...a),
1310
+ codeToTokensBase: (a, F) => codeToTokensBase(P, a, F),
1311
+ codeToTokensWithThemes: (a, F) => codeToTokensWithThemes(P, a, F),
1312
+ codeToTokens: (a, F) => codeToTokens(P, a, F),
1313
+ codeToHast: (a, F) => codeToHast(P, a, F),
1314
+ codeToHtml: (a, F) => codeToHtml(P, a, F),
778
1315
  getBundledLanguages: () => ({}),
779
1316
  getBundledThemes: () => ({}),
780
- ...t,
781
- getInternalContext: () => t
1317
+ ...P,
1318
+ getInternalContext: () => P
782
1319
  };
783
1320
  }
784
- function te(t) {
785
- let n = t.langs, r = t.themes, i = t.engine;
786
- async function a(t) {
787
- function a(r) {
788
- if (typeof r == "string") {
789
- if (r = t.langAlias?.[r] || r, u(r)) return [];
790
- let i = n[r];
791
- if (!i) throw new e(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);
792
- return i;
1321
+ function createBundledHighlighter(P) {
1322
+ let F = P.langs, I = P.themes, L = P.engine;
1323
+ async function R(P) {
1324
+ function R(I) {
1325
+ if (typeof I == "string") {
1326
+ if (I = P.langAlias?.[I] || I, isSpecialLang(I)) return [];
1327
+ let L = F[I];
1328
+ if (!L) throw new ShikiError(`Language \`${I}\` is not included in this bundle. You may want to load it from external source.`);
1329
+ return L;
793
1330
  }
794
- return r;
1331
+ return I;
795
1332
  }
796
- function o(t) {
797
- if (d(t)) return "none";
798
- if (typeof t == "string") {
799
- let n = r[t];
800
- if (!n) throw new e(`Theme \`${t}\` is not included in this bundle. You may want to load it from external source.`);
801
- return n;
1333
+ function z(P) {
1334
+ if (isSpecialTheme(P)) return "none";
1335
+ if (typeof P == "string") {
1336
+ let F = I[P];
1337
+ if (!F) throw new ShikiError(`Theme \`${P}\` is not included in this bundle. You may want to load it from external source.`);
1338
+ return F;
802
1339
  }
803
- return t;
1340
+ return P;
804
1341
  }
805
- let s = (t.themes ?? []).map((e) => o(e)), c = (t.langs ?? []).map((e) => a(e)), l = await Q({
806
- engine: t.engine ?? i(),
807
- ...t,
808
- themes: s,
809
- langs: c
1342
+ let B = (P.themes ?? []).map((a) => z(a)), V = (P.langs ?? []).map((a) => R(a)), H = await createHighlighterCore({
1343
+ engine: P.engine ?? L(),
1344
+ ...P,
1345
+ themes: B,
1346
+ langs: V
810
1347
  });
811
1348
  return {
812
- ...l,
813
- loadLanguage(...e) {
814
- return l.loadLanguage(...e.map(a));
1349
+ ...H,
1350
+ loadLanguage(...a) {
1351
+ return H.loadLanguage(...a.map(R));
815
1352
  },
816
- loadTheme(...e) {
817
- return l.loadTheme(...e.map(o));
1353
+ loadTheme(...a) {
1354
+ return H.loadTheme(...a.map(z));
818
1355
  },
819
1356
  getBundledLanguages() {
820
- return n;
1357
+ return F;
821
1358
  },
822
1359
  getBundledThemes() {
823
- return r;
1360
+ return I;
824
1361
  }
825
1362
  };
826
1363
  }
827
- return a;
1364
+ return R;
828
1365
  }
829
- function $(e) {
830
- let t;
831
- async function n(n = {}) {
832
- if (t) {
833
- let e = await t;
834
- return await Promise.all([e.loadTheme(...n.themes || []), e.loadLanguage(...n.langs || [])]), e;
1366
+ function makeSingletonHighlighter(a) {
1367
+ let P;
1368
+ async function F(F = {}) {
1369
+ if (P) {
1370
+ let a = await P;
1371
+ return await Promise.all([a.loadTheme(...F.themes || []), a.loadLanguage(...F.langs || [])]), a;
835
1372
  } else {
836
- t = e({
837
- ...n,
1373
+ P = a({
1374
+ ...F,
838
1375
  themes: [],
839
1376
  langs: []
840
1377
  });
841
- let r = await t;
842
- return await Promise.all([r.loadTheme(...n.themes || []), r.loadLanguage(...n.langs || [])]), r;
1378
+ let I = await P;
1379
+ return await Promise.all([I.loadTheme(...F.themes || []), I.loadLanguage(...F.langs || [])]), I;
843
1380
  }
844
1381
  }
845
- return n;
1382
+ return F;
846
1383
  }
847
- function ne(e, t) {
848
- let n = $(e);
849
- async function r(e, r) {
850
- let i = await n({
851
- langs: [r.lang],
852
- themes: "theme" in r ? [r.theme] : Object.values(r.themes)
853
- }), a = await t?.guessEmbeddedLanguages?.(e, r.lang, i);
854
- return a && await i.loadLanguage(...a), i;
1384
+ function createSingletonShorthands(a, P) {
1385
+ let F = makeSingletonHighlighter(a);
1386
+ async function I(a, I) {
1387
+ let L = await F({
1388
+ langs: [I.lang],
1389
+ themes: "theme" in I ? [I.theme] : Object.values(I.themes)
1390
+ }), R = await P?.guessEmbeddedLanguages?.(a, I.lang, L);
1391
+ return R && await L.loadLanguage(...R), L;
855
1392
  }
856
1393
  return {
857
- getSingletonHighlighter(e) {
858
- return n(e);
1394
+ getSingletonHighlighter(a) {
1395
+ return F(a);
859
1396
  },
860
- async codeToHtml(e, t) {
861
- return (await r(e, t)).codeToHtml(e, t);
1397
+ async codeToHtml(a, P) {
1398
+ return (await I(a, P)).codeToHtml(a, P);
862
1399
  },
863
- async codeToHast(e, t) {
864
- return (await r(e, t)).codeToHast(e, t);
1400
+ async codeToHast(a, P) {
1401
+ return (await I(a, P)).codeToHast(a, P);
865
1402
  },
866
- async codeToTokens(e, t) {
867
- return (await r(e, t)).codeToTokens(e, t);
1403
+ async codeToTokens(a, P) {
1404
+ return (await I(a, P)).codeToTokens(a, P);
868
1405
  },
869
- async codeToTokensBase(e, t) {
870
- return (await r(e, t)).codeToTokensBase(e, t);
1406
+ async codeToTokensBase(a, P) {
1407
+ return (await I(a, P)).codeToTokensBase(a, P);
871
1408
  },
872
- async codeToTokensWithThemes(e, t) {
873
- return (await r(e, t)).codeToTokensWithThemes(e, t);
1409
+ async codeToTokensWithThemes(a, P) {
1410
+ return (await I(a, P)).codeToTokensWithThemes(a, P);
874
1411
  },
875
- async getLastGrammarState(e, t) {
876
- return (await n({
877
- langs: [t.lang],
878
- themes: [t.theme]
879
- })).getLastGrammarState(e, t);
1412
+ async getLastGrammarState(a, P) {
1413
+ return (await F({
1414
+ langs: [P.lang],
1415
+ themes: [P.theme]
1416
+ })).getLastGrammarState(a, P);
880
1417
  }
881
1418
  };
882
1419
  }
883
- //#endregion
884
- export { g as addClassToHast, te as createBundledHighlighter, Q as createHighlighterCore, _ as createPositionConverter, ne as createSingletonShorthands, C as flatTokenVariants, w as getTokenStyleObject, v as guessEmbeddedLanguages, Z as hastToHtml, $ as makeSingletonHighlighter, x as splitToken, S as splitTokens, T as stringifyTokenStyle, V as tokenizeAnsiWithTheme, q as tokensToHast, E as transformerDecorations };
1420
+ export { addClassToHast, applyColorReplacements, createBundledHighlighter, createHighlighterCore, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, flatTokenVariants, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, makeSingletonHighlighter, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };