visual-living-plan 0.1.0 → 2.32.1

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 (608) hide show
  1. package/DESIGN.md +213 -0
  2. package/README.md +155 -28
  3. package/dist/AuthScreen.d.ts +9 -0
  4. package/dist/AuthScreen.js +7 -0
  5. package/dist/DesktopModeSwitch.d.ts +13 -0
  6. package/dist/DesktopModeSwitch.js +14 -0
  7. package/dist/OAuthMark.d.ts +6 -0
  8. package/dist/OAuthMark.js +8 -0
  9. package/dist/accountInitials.d.ts +5 -0
  10. package/dist/accountInitials.js +20 -0
  11. package/dist/accountLinking.d.ts +26 -0
  12. package/dist/accountLinking.js +46 -0
  13. package/dist/agentEvents.d.ts +31 -0
  14. package/dist/agentEvents.js +260 -0
  15. package/dist/agentPresence.d.ts +42 -0
  16. package/dist/agentPresence.js +69 -0
  17. package/dist/agentSkills.d.ts +35 -0
  18. package/dist/agentSkills.js +89 -0
  19. package/dist/agentStream.d.ts +35 -0
  20. package/dist/agentStream.js +133 -0
  21. package/dist/appearanceDom.d.ts +13 -0
  22. package/dist/appearanceDom.js +24 -0
  23. package/dist/appearanceSettings.d.ts +29 -0
  24. package/dist/appearanceSettings.js +293 -0
  25. package/dist/assets.d.ts +14 -0
  26. package/dist/assets.js +72 -0
  27. package/dist/authSearch.d.ts +11 -0
  28. package/dist/authSearch.js +30 -0
  29. package/dist/changelog.d.ts +11 -0
  30. package/dist/changelog.js +63 -0
  31. package/dist/changelogParse.d.ts +53 -0
  32. package/dist/changelogParse.js +226 -0
  33. package/dist/cli.d.ts +2 -0
  34. package/dist/cli.js +1684 -0
  35. package/dist/cliLauncher.d.ts +40 -0
  36. package/dist/cliLauncher.js +170 -0
  37. package/dist/cliToken.d.ts +11 -0
  38. package/dist/cliToken.js +15 -0
  39. package/dist/client/.vite/manifest.json +1780 -0
  40. package/dist/client/assets/BarChart-DtV3dIq4.js +1 -0
  41. package/dist/client/assets/BlockEditor-BklSUBjk.js +168 -0
  42. package/dist/client/assets/BlockEditor-K5h6xc4_.css +1 -0
  43. package/dist/client/assets/CodeBlock-BbI08MlQ.js +1 -0
  44. package/dist/client/assets/CodeBlock-BxRMnldw.js +175 -0
  45. package/dist/client/assets/LineChart-CQYMEbD6.js +1 -0
  46. package/dist/client/assets/Mermaid-Ciu9eIoG.js +1 -0
  47. package/dist/client/assets/Mermaid-jPWLXX7e.js +1 -0
  48. package/dist/client/assets/Popover-DbE4vUPG.js +1 -0
  49. package/dist/client/assets/ReactFlowExecutionCanvas-BhVs-adc.js +7 -0
  50. package/dist/client/assets/ReactFlowExecutionCanvas-DLioOiRN.css +1 -0
  51. package/dist/client/assets/StatusIcon-C_-Lm9b4.js +1 -0
  52. package/dist/client/assets/Workflow-C92OpLyf.js +1 -0
  53. package/dist/client/assets/agentPresence-D8asHrTp.js +1 -0
  54. package/dist/client/assets/andromeeda-DW8vo71h.js +1 -0
  55. package/dist/client/assets/andromeeda-vGVdxbeo.js +1 -0
  56. package/dist/client/assets/arrow-up-CEVVOXD5.js +1 -0
  57. package/dist/client/assets/arrow-up-down-BSjnQK2I.js +1 -0
  58. package/dist/client/assets/aurora-x-CDeNXAV0.js +1 -0
  59. package/dist/client/assets/aurora-x-rMvKqtYI.js +1 -0
  60. package/dist/client/assets/ayu-dark-CwczpL8O.js +1 -0
  61. package/dist/client/assets/ayu-dark-DluEY0Gj.js +1 -0
  62. package/dist/client/assets/ayu-light-C3h-C4tm.js +1 -0
  63. package/dist/client/assets/ayu-light-DSh22xiD.js +1 -0
  64. package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +1 -0
  65. package/dist/client/assets/ayu-mirage-JE6hAyHG.js +1 -0
  66. package/dist/client/assets/browserStore-BDGKYoJj.js +435 -0
  67. package/dist/client/assets/button-BI07wqbi.css +1 -0
  68. package/dist/client/assets/button-DJWAGApe.js +1 -0
  69. package/dist/client/assets/catppuccin-frappe-C9Q5zVZY.js +1 -0
  70. package/dist/client/assets/catppuccin-frappe-pyXErRRU.js +1 -0
  71. package/dist/client/assets/catppuccin-latte-BILSUICr.js +1 -0
  72. package/dist/client/assets/catppuccin-latte-CtsyrtPq.js +1 -0
  73. package/dist/client/assets/catppuccin-macchiato-Ck60ZZQE.js +1 -0
  74. package/dist/client/assets/catppuccin-macchiato-R8nAf1vR.js +1 -0
  75. package/dist/client/assets/catppuccin-mocha-C_2G67cS.js +1 -0
  76. package/dist/client/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
  77. package/dist/client/assets/ccount-nzzEXTrh.js +1 -0
  78. package/dist/client/assets/chartRows-CNjjLsAH.js +2 -0
  79. package/dist/client/assets/circle-x-BLGxA3gi.js +1 -0
  80. package/dist/client/assets/client-BsE_buVT.js +9 -0
  81. package/dist/client/assets/constants-CmGPilXJ.js +1 -0
  82. package/dist/client/assets/dark-plus-CHgc6GYj.js +1 -0
  83. package/dist/client/assets/dark-plus-Cs2F2srj.js +1 -0
  84. package/dist/client/assets/default-5FplaXL4.js +7 -0
  85. package/dist/client/assets/diffsTheme-PJJTu2Rq.js +1 -0
  86. package/dist/client/assets/dracula-BHWKrbxM.js +1 -0
  87. package/dist/client/assets/dracula-Cf1PG3MT.js +1 -0
  88. package/dist/client/assets/dracula-soft-5eyTD99u.js +1 -0
  89. package/dist/client/assets/dracula-soft-DXuNm1Kq.js +1 -0
  90. package/dist/client/assets/editSource-DQfw4nRm.js +1 -0
  91. package/dist/client/assets/editSource-U5AoD-Wo.js +14 -0
  92. package/dist/client/assets/engine-CLTPZlti.js +1 -0
  93. package/dist/client/assets/engine-DUyaiAMV.js +2 -0
  94. package/dist/client/assets/everforest-dark-CjdfwUBe.js +1 -0
  95. package/dist/client/assets/everforest-dark-sB-x3p7T.js +1 -0
  96. package/dist/client/assets/everforest-light-CfVwwCBP.js +1 -0
  97. package/dist/client/assets/everforest-light-Df2xbC6M.js +1 -0
  98. package/dist/client/assets/forgetDocuments-CIUBitCs.js +1 -0
  99. package/dist/client/assets/formatCSSVariablePrefix-KRh9vnZf.js +1 -0
  100. package/dist/client/assets/github-dark-BL6HSl_n.js +1 -0
  101. package/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  102. package/dist/client/assets/github-dark-default-DXG-b-1a.js +1 -0
  103. package/dist/client/assets/github-dark-default-zacuWV-M.js +1 -0
  104. package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
  105. package/dist/client/assets/github-dark-dimmed-Mc0P9idi.js +1 -0
  106. package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
  107. package/dist/client/assets/github-dark-high-contrast-IMKX2AVF.js +1 -0
  108. package/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  109. package/dist/client/assets/github-light-default-BXViO-2h.js +1 -0
  110. package/dist/client/assets/github-light-default-DVlCqP3X.js +1 -0
  111. package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +1 -0
  112. package/dist/client/assets/github-light-high-contrast-Dj6zTyWR.js +1 -0
  113. package/dist/client/assets/github-light-mYhEBkPo.js +1 -0
  114. package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
  115. package/dist/client/assets/gruvbox-dark-hard-QTgQQZn-.js +1 -0
  116. package/dist/client/assets/gruvbox-dark-medium-9d5YdCTx.js +1 -0
  117. package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
  118. package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
  119. package/dist/client/assets/gruvbox-dark-soft-XCkqeBhR.js +1 -0
  120. package/dist/client/assets/gruvbox-light-hard--5-nXqNp.js +1 -0
  121. package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
  122. package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
  123. package/dist/client/assets/gruvbox-light-medium-COA1PZW2.js +1 -0
  124. package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
  125. package/dist/client/assets/gruvbox-light-soft-CIJpzjAO.js +1 -0
  126. package/dist/client/assets/hastToHtml-Dj8rXue9.js +11 -0
  127. package/dist/client/assets/highlight-cB-PkhyE.js +1 -0
  128. package/dist/client/assets/highlights-LLBF1DTm.js +1 -0
  129. package/dist/client/assets/horizon-Ba2cwkSy.js +1 -0
  130. package/dist/client/assets/horizon-CE9ld1lL.js +1 -0
  131. package/dist/client/assets/horizon-bright-DSNQnXHK.js +1 -0
  132. package/dist/client/assets/horizon-bright-DaEDgBmR.js +1 -0
  133. package/dist/client/assets/houston-B6x0XVpU.js +1 -0
  134. package/dist/client/assets/houston-CsvMBhTu.js +1 -0
  135. package/dist/client/assets/jsx-runtime-DKj5X9O4.js +1 -0
  136. package/dist/client/assets/kanagawa-dragon-Bozd7klA.js +1 -0
  137. package/dist/client/assets/kanagawa-dragon-DhTFvBMT.js +1 -0
  138. package/dist/client/assets/kanagawa-lotus--m8sdOxn.js +1 -0
  139. package/dist/client/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
  140. package/dist/client/assets/kanagawa-wave-BML5mF2J.js +1 -0
  141. package/dist/client/assets/kanagawa-wave-D-tTv4k2.js +1 -0
  142. package/dist/client/assets/laserwave-C_8bwKvT.js +1 -0
  143. package/dist/client/assets/laserwave-HSLx0L75.js +1 -0
  144. package/dist/client/assets/lib-COgu-QLX.js +33 -0
  145. package/dist/client/assets/lib-CdRiGVUZ.js +1 -0
  146. package/dist/client/assets/light-plus-CUjWrTSi.js +1 -0
  147. package/dist/client/assets/light-plus-DVQuIRkW.js +1 -0
  148. package/dist/client/assets/loader-CjL04K29.js +1 -0
  149. package/dist/client/assets/main-BGMX_GnZ.js +2 -0
  150. package/dist/client/assets/main-BTko4EvJ.css +1 -0
  151. package/dist/client/assets/material-theme-Bm3Qr25_.js +1 -0
  152. package/dist/client/assets/material-theme-CnthUGfg.js +1 -0
  153. package/dist/client/assets/material-theme-darker-2IIEA8gg.js +1 -0
  154. package/dist/client/assets/material-theme-darker-DUi03Qre.js +1 -0
  155. package/dist/client/assets/material-theme-lighter-D2-qr5Vw.js +1 -0
  156. package/dist/client/assets/material-theme-lighter-uhdI0v04.js +1 -0
  157. package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +1 -0
  158. package/dist/client/assets/material-theme-ocean-CWR-LogA.js +1 -0
  159. package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +1 -0
  160. package/dist/client/assets/material-theme-palenight-Cnv8m1ra.js +1 -0
  161. package/dist/client/assets/mdxEntries-BNTMP8ct.css +1 -0
  162. package/dist/client/assets/mdxEntries-L-V7bB6i.js +1 -0
  163. package/dist/client/assets/mermaid-Bjhs-krb.js +1 -0
  164. package/dist/client/assets/mermaid-Di4j-zgD.js +146 -0
  165. package/dist/client/assets/min-dark-BSWPekZh.js +1 -0
  166. package/dist/client/assets/min-dark-EXoM-6Xo.js +1 -0
  167. package/dist/client/assets/min-light-DDpmG2fV.js +1 -0
  168. package/dist/client/assets/min-light-DVOTDhnA.js +1 -0
  169. package/dist/client/assets/monokai-BscAjiQZ.js +1 -0
  170. package/dist/client/assets/monokai-DkggTbGy.js +1 -0
  171. package/dist/client/assets/mountChrome-BVWpsDCy.js +122 -0
  172. package/dist/client/assets/mountChrome-DhTDH3YM.css +1 -0
  173. package/dist/client/assets/night-owl-Bdcs0PMi.js +1 -0
  174. package/dist/client/assets/night-owl-DhmEMT88.js +1 -0
  175. package/dist/client/assets/night-owl-light-RoU30LE0.js +1 -0
  176. package/dist/client/assets/night-owl-light-eJ-hLW7d.js +1 -0
  177. package/dist/client/assets/noShiki-DB8hQ_W3.js +1 -0
  178. package/dist/client/assets/noShiki-GTG3tT8x.js +1 -0
  179. package/dist/client/assets/nord-Cb4Vim4T.js +1 -0
  180. package/dist/client/assets/nord-u7hMircQ.js +1 -0
  181. package/dist/client/assets/offlineSync-Cv3FVIlJ.js +1 -0
  182. package/dist/client/assets/one-dark-pro-08PdtLzi.js +1 -0
  183. package/dist/client/assets/one-dark-pro-C6YyR8OD.js +1 -0
  184. package/dist/client/assets/one-light-D7Lr4KcI.js +1 -0
  185. package/dist/client/assets/one-light-DgvUEtgI.js +1 -0
  186. package/dist/client/assets/opfs-worker-DuTOCgWR.js +5919 -0
  187. package/dist/client/assets/pierre-dark-B2jZWvHG.js +1 -0
  188. package/dist/client/assets/pierre-dark-CpLgRqie.js +1 -0
  189. package/dist/client/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
  190. package/dist/client/assets/pierre-dark-protanopia-deuteranopia-CebgQdRf.js +1 -0
  191. package/dist/client/assets/pierre-dark-soft-DdE7dyP3.js +1 -0
  192. package/dist/client/assets/pierre-dark-soft-kZQmAZld.js +1 -0
  193. package/dist/client/assets/pierre-dark-tritanopia-CXimiT7X.js +1 -0
  194. package/dist/client/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
  195. package/dist/client/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
  196. package/dist/client/assets/pierre-dark-vibrant-DzBsxHvQ.js +1 -0
  197. package/dist/client/assets/pierre-light-CoaEpmwp.js +1 -0
  198. package/dist/client/assets/pierre-light-Vf__O3ev.js +1 -0
  199. package/dist/client/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
  200. package/dist/client/assets/pierre-light-protanopia-deuteranopia-BUtWcCQC.js +1 -0
  201. package/dist/client/assets/pierre-light-soft-C3QCXKvN.js +1 -0
  202. package/dist/client/assets/pierre-light-soft-lWLdNTOI.js +1 -0
  203. package/dist/client/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
  204. package/dist/client/assets/pierre-light-tritanopia-CKLy6XvA.js +1 -0
  205. package/dist/client/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
  206. package/dist/client/assets/pierre-light-vibrant-DDuTEIhH.js +1 -0
  207. package/dist/client/assets/planEditButton-CbWGczbi.js +45 -0
  208. package/dist/client/assets/planEvents-cuzv9ELr.js +1 -0
  209. package/dist/client/assets/planMdx-Db1ze_nN.js +110 -0
  210. package/dist/client/assets/plastic-B8mE6BxX.js +1 -0
  211. package/dist/client/assets/plastic-DQwYfKfQ.js +1 -0
  212. package/dist/client/assets/poimandres-DRFjx7u4.js +1 -0
  213. package/dist/client/assets/poimandres-DUFjrgxT.js +1 -0
  214. package/dist/client/assets/preload-helper-Dx0-lKy1.js +1 -0
  215. package/dist/client/assets/queryClient-Bs5tSUJh.js +1 -0
  216. package/dist/client/assets/react-dom-DpzJPrWF.js +1 -0
  217. package/dist/client/assets/rebaseDraft-B2--cj1c.js +19 -0
  218. package/dist/client/assets/red-BJvdDEUx.js +1 -0
  219. package/dist/client/assets/red-CYlAq2b0.js +1 -0
  220. package/dist/client/assets/register-hZEIk3A9.css +1 -0
  221. package/dist/client/assets/register-htm5s8o9.js +1 -0
  222. package/dist/client/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
  223. package/dist/client/assets/rose-pine-BSqRqUae.js +1 -0
  224. package/dist/client/assets/rose-pine-aMsaMD1D.js +1 -0
  225. package/dist/client/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
  226. package/dist/client/assets/rose-pine-dawn-U6TBE82u.js +1 -0
  227. package/dist/client/assets/rose-pine-moon-CAU7u1h4.js +1 -0
  228. package/dist/client/assets/rose-pine-moon-DO-qXg-I.js +1 -0
  229. package/dist/client/assets/routeEdges-B2z8v0di.js +24 -0
  230. package/dist/client/assets/selector-CDsXW7SO.css +1 -0
  231. package/dist/client/assets/selector-tlBGWtQl.js +1 -0
  232. package/dist/client/assets/settingsChrome-NGUDtEIp.js +1 -0
  233. package/dist/client/assets/shiki-BOXJeUHI.js +2 -0
  234. package/dist/client/assets/slack-dark-CMu0smFa.js +1 -0
  235. package/dist/client/assets/slack-dark-DnToyrRv.js +1 -0
  236. package/dist/client/assets/slack-ochin-B2OO5cIa.js +1 -0
  237. package/dist/client/assets/slack-ochin-BBne7cjw.js +1 -0
  238. package/dist/client/assets/snazzy-light-4G7pJPwS.js +1 -0
  239. package/dist/client/assets/snazzy-light-CV8HUEmk.js +1 -0
  240. package/dist/client/assets/solarized-dark-CmYmhSgI.js +1 -0
  241. package/dist/client/assets/solarized-dark-b97czJOk.js +1 -0
  242. package/dist/client/assets/solarized-light-CjLLwxRp.js +1 -0
  243. package/dist/client/assets/solarized-light-DFPxpIYQ.js +1 -0
  244. package/dist/client/assets/stampPlanParts-DVXYCykw.js +15 -0
  245. package/dist/client/assets/stampPlanParts-ctZzxWdw.css +1 -0
  246. package/dist/client/assets/stream-tokenizer-C3n8hi1h.js +4 -0
  247. package/dist/client/assets/synthwave-84-nFMaYfgc.js +1 -0
  248. package/dist/client/assets/synthwave-84-wQeDKbzQ.js +1 -0
  249. package/dist/client/assets/textChildren-ZDSs1dod.js +1 -0
  250. package/dist/client/assets/themes-CdTJhjZf.js +2 -0
  251. package/dist/client/assets/tokyo-night-D4ZgDiA7.js +1 -0
  252. package/dist/client/assets/tokyo-night-oM2G3aXe.js +1 -0
  253. package/dist/client/assets/triangle-alert-C9Sgr3jF.js +1 -0
  254. package/dist/client/assets/unwrapDefault-ByDmBtHB.js +1 -0
  255. package/dist/client/assets/utils-C9Glzetk.js +2 -0
  256. package/dist/client/assets/versionView-zkSROPw7.js +1 -0
  257. package/dist/client/assets/vesper-DdrHHSXu.js +1 -0
  258. package/dist/client/assets/vesper-sUHevyKv.js +1 -0
  259. package/dist/client/assets/vitesse-black-CfklMpOb.js +1 -0
  260. package/dist/client/assets/vitesse-black-fwtXNY1n.js +1 -0
  261. package/dist/client/assets/vitesse-dark-BZCL-v6S.js +1 -0
  262. package/dist/client/assets/vitesse-dark-CJkzwmKT.js +1 -0
  263. package/dist/client/assets/vitesse-light-BxMp8E1Y.js +1 -0
  264. package/dist/client/assets/vitesse-light-VbXTXTou.js +1 -0
  265. package/dist/client/assets/wa-sqlite-Ba70bhIr.wasm +0 -0
  266. package/dist/client/assets/warmPlans-CYFrLwcX.js +1 -0
  267. package/dist/client/assets/with-selector-HIcjK0_d.js +1 -0
  268. package/dist/client/assets/workflowSource-LMsRuqF_.js +3 -0
  269. package/dist/client/favicon.png +0 -0
  270. package/dist/client/icons/apple-touch-icon-180x180.png +0 -0
  271. package/dist/client/icons/favicon.ico +0 -0
  272. package/dist/client/icons/maskable-icon-192x192.png +0 -0
  273. package/dist/client/icons/maskable-icon-512x512.png +0 -0
  274. package/dist/client/icons/pwa-16x16.png +0 -0
  275. package/dist/client/icons/pwa-192x192.png +0 -0
  276. package/dist/client/icons/pwa-32x32.png +0 -0
  277. package/dist/client/icons/pwa-512x512.png +0 -0
  278. package/dist/client/icons/pwa-64x64.png +0 -0
  279. package/dist/clientLog.d.ts +5 -0
  280. package/dist/clientLog.js +64 -0
  281. package/dist/cloudClient.d.ts +38 -0
  282. package/dist/cloudClient.js +185 -0
  283. package/dist/cloudCommand.d.ts +23 -0
  284. package/dist/cloudCommand.js +159 -0
  285. package/dist/cloudFrontmatter.d.ts +4 -0
  286. package/dist/cloudFrontmatter.js +30 -0
  287. package/dist/cloudStore.d.ts +28 -0
  288. package/dist/cloudStore.js +70 -0
  289. package/dist/cloudWatch.d.ts +12 -0
  290. package/dist/cloudWatch.js +103 -0
  291. package/dist/commentReply.d.ts +25 -0
  292. package/dist/commentReply.js +17 -0
  293. package/dist/configHome.d.ts +34 -0
  294. package/dist/configHome.js +136 -0
  295. package/dist/dashboard.d.ts +67 -0
  296. package/dist/dashboard.js +86 -0
  297. package/dist/dashboardClientScript.d.ts +2 -0
  298. package/dist/dashboardClientScript.js +1006 -0
  299. package/dist/dashboardDocument.d.ts +13 -0
  300. package/dist/dashboardDocument.js +40 -0
  301. package/dist/dashboardFormat.d.ts +98 -0
  302. package/dist/dashboardFormat.js +199 -0
  303. package/dist/dashboardLoading.d.ts +19 -0
  304. package/dist/dashboardLoading.js +94 -0
  305. package/dist/dashboardOverview.d.ts +28 -0
  306. package/dist/dashboardOverview.js +333 -0
  307. package/dist/dashboardPage.d.ts +2 -0
  308. package/dist/dashboardPage.js +11 -0
  309. package/dist/dashboardParts.d.ts +4 -0
  310. package/dist/dashboardParts.js +367 -0
  311. package/dist/dashboardSearchView.d.ts +38 -0
  312. package/dist/dashboardSearchView.js +255 -0
  313. package/dist/desktopApp.d.ts +23 -0
  314. package/dist/desktopApp.js +110 -0
  315. package/dist/desktopBridge.d.ts +21 -0
  316. package/dist/desktopBridge.js +78 -0
  317. package/dist/desktopCommand.d.ts +61 -0
  318. package/dist/desktopCommand.js +172 -0
  319. package/dist/desktopConfig.d.ts +54 -0
  320. package/dist/desktopConfig.js +164 -0
  321. package/dist/desktopNotices.d.ts +105 -0
  322. package/dist/desktopNotices.js +427 -0
  323. package/dist/diff.d.ts +2 -0
  324. package/dist/diff.js +46 -0
  325. package/dist/diffsTheme.d.ts +51 -0
  326. package/dist/diffsTheme.js +86 -0
  327. package/dist/diffsThemeCatalog.d.ts +3 -0
  328. package/dist/diffsThemeCatalog.js +78 -0
  329. package/dist/elkRuntime.node.d.ts +7 -0
  330. package/dist/elkRuntime.node.js +63 -0
  331. package/dist/execution.d.ts +78 -0
  332. package/dist/execution.js +139 -0
  333. package/dist/expectedWorkflow.d.ts +11 -0
  334. package/dist/expectedWorkflow.js +99 -0
  335. package/dist/favicon.d.ts +4 -0
  336. package/dist/favicon.js +40 -0
  337. package/dist/favicon.png +0 -0
  338. package/dist/faviconBase64.d.ts +1 -0
  339. package/dist/faviconBase64.js +1 -0
  340. package/dist/fileVersion.d.ts +8 -0
  341. package/dist/fileVersion.js +20 -0
  342. package/dist/formatBytes.d.ts +2 -0
  343. package/dist/formatBytes.js +13 -0
  344. package/dist/gitStatus.d.ts +12 -0
  345. package/dist/gitStatus.js +88 -0
  346. package/dist/hostToolbar.d.ts +38 -0
  347. package/dist/hostToolbar.js +249 -0
  348. package/dist/http.d.ts +8 -0
  349. package/dist/http.js +38 -0
  350. package/dist/httpServer.d.ts +13 -0
  351. package/dist/httpServer.js +40 -0
  352. package/dist/icons/apple-touch-icon-180x180.png +0 -0
  353. package/dist/icons/favicon.ico +0 -0
  354. package/dist/icons/maskable-icon-192x192.png +0 -0
  355. package/dist/icons/maskable-icon-512x512.png +0 -0
  356. package/dist/icons/pwa-16x16.png +0 -0
  357. package/dist/icons/pwa-192x192.png +0 -0
  358. package/dist/icons/pwa-32x32.png +0 -0
  359. package/dist/icons/pwa-512x512.png +0 -0
  360. package/dist/icons/pwa-64x64.png +0 -0
  361. package/dist/lanAccess.d.ts +31 -0
  362. package/dist/lanAccess.js +110 -0
  363. package/dist/lanAddress.d.ts +24 -0
  364. package/dist/lanAddress.js +174 -0
  365. package/dist/lanCommand.d.ts +25 -0
  366. package/dist/lanCommand.js +159 -0
  367. package/dist/lanConfig.d.ts +40 -0
  368. package/dist/lanConfig.js +130 -0
  369. package/dist/lanFirewall.d.ts +17 -0
  370. package/dist/lanFirewall.js +221 -0
  371. package/dist/layoutGraph.d.ts +13 -0
  372. package/dist/layoutGraph.js +55 -0
  373. package/dist/localName.d.ts +9 -0
  374. package/dist/localName.js +28 -0
  375. package/dist/lockBanner.d.ts +2 -0
  376. package/dist/lockBanner.js +2 -0
  377. package/dist/mdnsPacket.d.ts +44 -0
  378. package/dist/mdnsPacket.js +384 -0
  379. package/dist/mdnsPublish.d.ts +12 -0
  380. package/dist/mdnsPublish.js +290 -0
  381. package/dist/offlineSync.d.ts +249 -0
  382. package/dist/offlineSync.js +477 -0
  383. package/dist/openUrl.d.ts +40 -0
  384. package/dist/openUrl.js +147 -0
  385. package/dist/openedPages.d.ts +14 -0
  386. package/dist/openedPages.js +48 -0
  387. package/dist/pageEditPull.d.ts +9 -0
  388. package/dist/pageEditPull.js +29 -0
  389. package/dist/pageRoutes.d.ts +3 -0
  390. package/dist/pageRoutes.js +34 -0
  391. package/dist/parse.d.ts +7 -0
  392. package/dist/parse.js +100 -0
  393. package/dist/pid.d.ts +2 -0
  394. package/dist/pid.js +13 -0
  395. package/dist/planArchive.d.ts +4 -0
  396. package/dist/planArchive.js +28 -0
  397. package/dist/planEntries.d.ts +12 -0
  398. package/dist/planEntries.js +117 -0
  399. package/dist/planHost.d.ts +31 -0
  400. package/dist/planHost.js +286 -0
  401. package/dist/planId.d.ts +2 -0
  402. package/dist/planId.js +6 -0
  403. package/dist/planMdx/blockEdit.d.ts +41 -0
  404. package/dist/planMdx/blockEdit.js +60 -0
  405. package/dist/planMdx/cellPart.d.ts +14 -0
  406. package/dist/planMdx/cellPart.js +26 -0
  407. package/dist/planMdx/compilePlanMdx.d.ts +3 -0
  408. package/dist/planMdx/compilePlanMdx.js +22 -0
  409. package/dist/planMdx/editSource.d.ts +39 -0
  410. package/dist/planMdx/editSource.js +327 -0
  411. package/dist/planMdx/frontmatter.d.ts +5 -0
  412. package/dist/planMdx/frontmatter.js +15 -0
  413. package/dist/planMdx/markdown.d.ts +6 -0
  414. package/dist/planMdx/markdown.js +470 -0
  415. package/dist/planMdx/outline.d.ts +8 -0
  416. package/dist/planMdx/outline.js +548 -0
  417. package/dist/planMdx/payload.d.ts +4 -0
  418. package/dist/planMdx/payload.js +18 -0
  419. package/dist/planMdx/rebaseDraft.d.ts +54 -0
  420. package/dist/planMdx/rebaseDraft.js +675 -0
  421. package/dist/planMdx/recmaPlanComponents.d.ts +18 -0
  422. package/dist/planMdx/recmaPlanComponents.js +52 -0
  423. package/dist/planMdx/remarkBlockRanges.d.ts +104 -0
  424. package/dist/planMdx/remarkBlockRanges.js +275 -0
  425. package/dist/planMdx/remarkCodeMeta.d.ts +16 -0
  426. package/dist/planMdx/remarkCodeMeta.js +25 -0
  427. package/dist/planMdx/remarkGfmTable.d.ts +5 -0
  428. package/dist/planMdx/remarkGfmTable.js +15 -0
  429. package/dist/planMdx/remarkGfmTaskList.d.ts +5 -0
  430. package/dist/planMdx/remarkGfmTaskList.js +15 -0
  431. package/dist/planMdx/remarkMermaid.d.ts +16 -0
  432. package/dist/planMdx/remarkMermaid.js +56 -0
  433. package/dist/planMdx/source.d.ts +11 -0
  434. package/dist/planMdx/source.js +131 -0
  435. package/dist/planMdx/titleEdit.d.ts +35 -0
  436. package/dist/planMdx/titleEdit.js +112 -0
  437. package/dist/planPage.css +2125 -0
  438. package/dist/planProgress.d.ts +17 -0
  439. package/dist/planProgress.js +78 -0
  440. package/dist/planReady.d.ts +8 -0
  441. package/dist/planReady.js +20 -0
  442. package/dist/planRefNavigation.d.ts +4 -0
  443. package/dist/planRefNavigation.js +8 -0
  444. package/dist/planRoutes.d.ts +12 -0
  445. package/dist/planRoutes.js +141 -0
  446. package/dist/planSearch.d.ts +166 -0
  447. package/dist/planSearch.js +462 -0
  448. package/dist/planSession.d.ts +130 -0
  449. package/dist/planSession.js +1182 -0
  450. package/dist/planSnapshots.d.ts +34 -0
  451. package/dist/planSnapshots.js +113 -0
  452. package/dist/planStatus.d.ts +26 -0
  453. package/dist/planStatus.js +46 -0
  454. package/dist/planStepHeading.d.ts +16 -0
  455. package/dist/planStepHeading.js +34 -0
  456. package/dist/planTarget.d.ts +16 -0
  457. package/dist/planTarget.js +92 -0
  458. package/dist/planToc.d.ts +24 -0
  459. package/dist/planToc.js +258 -0
  460. package/dist/planVersionMenu.d.ts +12 -0
  461. package/dist/planVersionMenu.js +23 -0
  462. package/dist/processRecord.d.ts +108 -0
  463. package/dist/processRecord.js +68 -0
  464. package/dist/processesPanel.d.ts +7 -0
  465. package/dist/processesPanel.js +636 -0
  466. package/dist/pwaIconFile.d.ts +2 -0
  467. package/dist/pwaIconFile.js +42 -0
  468. package/dist/pwaIcons.d.ts +28 -0
  469. package/dist/pwaIcons.js +46 -0
  470. package/dist/registerServiceWorker.d.ts +25 -0
  471. package/dist/registerServiceWorker.js +26 -0
  472. package/dist/registryClient.d.ts +94 -0
  473. package/dist/registryClient.js +490 -0
  474. package/dist/registryConstants.d.ts +9 -0
  475. package/dist/registryConstants.js +9 -0
  476. package/dist/registryLock.d.ts +19 -0
  477. package/dist/registryLock.js +48 -0
  478. package/dist/registryPage.d.ts +2 -0
  479. package/dist/registryPage.js +284 -0
  480. package/dist/registryService.d.ts +21 -0
  481. package/dist/registryService.js +562 -0
  482. package/dist/registryStore.d.ts +63 -0
  483. package/dist/registryStore.js +398 -0
  484. package/dist/releaseNotes.d.ts +35 -0
  485. package/dist/releaseNotes.js +62 -0
  486. package/dist/render.d.ts +50 -0
  487. package/dist/render.js +1506 -0
  488. package/dist/requestGuard.d.ts +21 -0
  489. package/dist/requestGuard.js +42 -0
  490. package/dist/reviewRound.d.ts +12 -0
  491. package/dist/reviewRound.js +19 -0
  492. package/dist/runFollow.d.ts +28 -0
  493. package/dist/runFollow.js +33 -0
  494. package/dist/searchMatch.d.ts +35 -0
  495. package/dist/searchMatch.js +270 -0
  496. package/dist/server.d.ts +24 -0
  497. package/dist/server.js +114 -0
  498. package/dist/serviceLog.d.ts +56 -0
  499. package/dist/serviceLog.js +481 -0
  500. package/dist/shellCache.d.ts +69 -0
  501. package/dist/shellCache.js +289 -0
  502. package/dist/shellWorker.js +322 -0
  503. package/dist/shellWorkerResponse.d.ts +4 -0
  504. package/dist/shellWorkerResponse.js +15 -0
  505. package/dist/startServer.d.ts +2 -0
  506. package/dist/startServer.js +2 -0
  507. package/dist/store/meta.d.ts +53 -0
  508. package/dist/store/meta.js +140 -0
  509. package/dist/store/migrate.d.ts +3 -0
  510. package/dist/store/migrate.js +408 -0
  511. package/dist/store/rows.d.ts +4 -0
  512. package/dist/store/rows.js +100 -0
  513. package/dist/store/schema.d.ts +5 -0
  514. package/dist/store/schema.js +5 -0
  515. package/dist/store/sqlite.d.ts +19 -0
  516. package/dist/store/sqlite.js +57 -0
  517. package/dist/store/tables.d.ts +1892 -0
  518. package/dist/store/tables.js +136 -0
  519. package/dist/theme.d.ts +174 -0
  520. package/dist/theme.js +444 -0
  521. package/dist/themeBootstrap.d.ts +2 -0
  522. package/dist/themeBootstrap.js +11 -0
  523. package/dist/tui/DashboardApp.d.ts +19 -0
  524. package/dist/tui/DashboardApp.js +237 -0
  525. package/dist/tui/PaletteProvider.d.ts +12 -0
  526. package/dist/tui/PaletteProvider.js +36 -0
  527. package/dist/tui/PlanActions.d.ts +7 -0
  528. package/dist/tui/PlanActions.js +9 -0
  529. package/dist/tui/PlanCard.d.ts +13 -0
  530. package/dist/tui/PlanCard.js +31 -0
  531. package/dist/tui/PlanRow.d.ts +13 -0
  532. package/dist/tui/PlanRow.js +31 -0
  533. package/dist/tui/PlanTable.d.ts +13 -0
  534. package/dist/tui/PlanTable.js +24 -0
  535. package/dist/tui/ProcessCard.d.ts +9 -0
  536. package/dist/tui/ProcessCard.js +24 -0
  537. package/dist/tui/ProcessList.d.ts +9 -0
  538. package/dist/tui/ProcessList.js +12 -0
  539. package/dist/tui/SegmentButton.d.ts +7 -0
  540. package/dist/tui/SegmentButton.js +18 -0
  541. package/dist/tui/StatCard.d.ts +6 -0
  542. package/dist/tui/StatCard.js +17 -0
  543. package/dist/tui/dashboardView.d.ts +45 -0
  544. package/dist/tui/dashboardView.js +192 -0
  545. package/dist/tui/openExternal.d.ts +2 -0
  546. package/dist/tui/openExternal.js +5 -0
  547. package/dist/tui/palette.d.ts +27 -0
  548. package/dist/tui/palette.js +66 -0
  549. package/dist/tui/planColumns.d.ts +38 -0
  550. package/dist/tui/planColumns.js +14 -0
  551. package/dist/tui/readDashboard.d.ts +3 -0
  552. package/dist/tui/readDashboard.js +15 -0
  553. package/dist/tui/readProcesses.d.ts +3 -0
  554. package/dist/tui/readProcesses.js +23 -0
  555. package/dist/tui/registryView.d.ts +11 -0
  556. package/dist/tui/registryView.js +56 -0
  557. package/dist/tui/runTui.d.ts +21 -0
  558. package/dist/tui/runTui.js +86 -0
  559. package/dist/tui/systemTheme.d.ts +28 -0
  560. package/dist/tui/systemTheme.js +141 -0
  561. package/dist/types.d.ts +191 -0
  562. package/dist/types.js +0 -0
  563. package/dist/webManifest.d.ts +39 -0
  564. package/dist/webManifest.js +48 -0
  565. package/dist/workflow.d.ts +8 -0
  566. package/dist/workflow.js +42 -0
  567. package/dist/workflowLayoutShared.d.ts +25 -0
  568. package/dist/workflowLayoutShared.js +33 -0
  569. package/dist/workflowSource.d.ts +31 -0
  570. package/dist/workflowSource.js +90 -0
  571. package/docs/changelogs/changelog-2026-10-27.md +203 -0
  572. package/docs/changelogs/changelog-2026-10-28.md +181 -0
  573. package/docs/changelogs/changelog-2026-10-29.md +349 -0
  574. package/docs/changelogs/changelog-2026-10-30.md +303 -0
  575. package/docs/changelogs/changelog-2026-10-31.md +129 -0
  576. package/docs/changelogs/changelog-2026-11-01.md +155 -0
  577. package/docs/changelogs/changelog-2026-11-02.md +195 -0
  578. package/docs/changelogs/changelog-2026-11-03.md +209 -0
  579. package/docs/changelogs/changelog-2026-11-04.md +243 -0
  580. package/docs/changelogs/changelog-2026-11-05.md +172 -0
  581. package/docs/changelogs/changelog-2026-11-06.md +123 -0
  582. package/docs/changelogs/changelog-2026-11-07.md +138 -0
  583. package/docs/changelogs/changelog-2026-11-08.md +47 -0
  584. package/docs/changelogs/changelog-2026-11-10.md +219 -0
  585. package/docs/changelogs/changelog-2026-11-11.md +205 -0
  586. package/docs/changelogs/changelog-2026-11-12.md +44 -0
  587. package/docs/changelogs/changelog-2026-11-13.md +48 -0
  588. package/docs/changelogs/changelog-2026-11-14.md +116 -0
  589. package/docs/changelogs/changelog-2026-11-15.md +31 -0
  590. package/docs/changelogs/changelog-2026-11-16.md +41 -0
  591. package/docs/changelogs/changelog-2026-11-17.md +25 -0
  592. package/docs/changelogs/changelog-2026-11-18.md +71 -0
  593. package/docs/changelogs/changelog-2026-11-19.md +19 -0
  594. package/examples/cloud-showcase.plan.md +181 -0
  595. package/examples/component-showcase.plan.md +378 -0
  596. package/examples/component-tour.plan.md +168 -0
  597. package/examples/data-table.plan.md +917 -0
  598. package/examples/execution-graph.json +15 -5
  599. package/examples/form-controls.plan.md +51 -0
  600. package/examples/live-plan.config.json +5 -0
  601. package/examples/rate-limit.plan.md +110 -78
  602. package/examples/submission-delivery-runbook.md +122 -0
  603. package/examples/submission-delivery.plan.md +107 -0
  604. package/examples/tables.plan.md +61 -0
  605. package/package.json +86 -15
  606. package/skills/live-plan/SKILL.md +381 -0
  607. package/skills/live-plan/primitives.md +738 -0
  608. package/skills/living-plan/SKILL.md +0 -71
@@ -0,0 +1,45 @@
1
+ import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{a as n,i as r,n as i,o as a,r as o,s,t as c}from"./lib-CdRiGVUZ.js";import{i as l,r as u}from"./StatusIcon-C_-Lm9b4.js";import{A as d,H as f}from"./mdxEntries-L-V7bB6i.js";import{O as p,T as m,_ as h,a as g,b as _,c as v,f as y,g as b,h as x,i as S,k as C,m as w,o as T,p as E,r as ee,t as te,v as ne,w as re,x as ie,y as D}from"./lib-COgu-QLX.js";import{t as ae}from"./workflowSource-LMsRuqF_.js";var oe={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},O={basename:se,dirname:ce,extname:le,join:k,sep:`/`};function se(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);A(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ce(e){if(A(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function le(e){A(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function k(...e){let t=-1,n;for(;++t<e.length;)A(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:ue(n)}function ue(e){A(e);let t=e.codePointAt(0)===47,n=de(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function de(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function A(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var fe={cwd:pe};function pe(){return`/`}function me(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function he(e){if(typeof e==`string`)e=new URL(e);else if(!me(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ge(e)}function ge(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var _e=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],ve=class{constructor(e){let t;t=e?me(e)?{path:e}:typeof e==`string`||Se(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:fe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<_e.length;){let e=_e[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)_e.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?O.basename(this.path):void 0}set basename(e){be(e,`basename`),ye(e,`basename`),this.path=O.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?O.dirname(this.path):void 0}set dirname(e){xe(this.basename,`dirname`),this.path=O.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?O.extname(this.path):void 0}set extname(e){if(ye(e,`extname`),xe(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=O.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){me(e)&&(e=he(e)),be(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?O.basename(this.path,this.extname):void 0}set stem(e){be(e,`stem`),ye(e,`stem`),this.path=O.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new p(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ye(e,t){if(e&&e.includes(O.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+O.sep+"`")}function be(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function xe(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Se(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ce=[`md`,`markdown`,`mdown`,`mkdn`,`mkd`,`mdwn`,`mkdown`,`ron`].map(function(e){return`.`+e});function we(e,t){let n=Te(e)?e:new ve(e),{format:r,...i}=t||{};return{file:n,options:{format:r===`md`||r===`mdx`?r:n.extname&&(i.mdExtensions||Ce).includes(n.extname)?`md`:`mdx`,...i}}}function Te(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}var Ee=class{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,t,n,r){e&&t&&(n==null?e[t]=r:e[t][n]=r)}remove(e,t,n){e&&t&&(n==null?delete e[t]:e[t].splice(n,1))}},De=class extends Ee{constructor(e,t){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e},this.enter=e,this.leave=t}visit(e,t,n,r){if(e){if(this.enter){let i=this.should_skip,a=this.should_remove,o=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,n,r),this.replacement&&(e=this.replacement,this.replace(t,n,r,e)),this.should_remove&&this.remove(t,n,r);let s=this.should_skip,c=this.should_remove;if(this.should_skip=i,this.should_remove=a,this.replacement=o,s)return e;if(c)return null}let i;for(i in e){let t=e[i];if(t&&typeof t==`object`){if(Array.isArray(t)){let n=t;for(let t=0;t<n.length;t+=1){let r=n[t];Oe(r)&&(this.visit(r,e,i,t)||t--)}}else Oe(t)&&this.visit(t,e,i,null)}}if(this.leave){let i=this.replacement,a=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,n,r),this.replacement&&(e=this.replacement,this.replace(t,n,r,e)),this.should_remove&&this.remove(t,n,r);let o=this.should_remove;if(this.replacement=i,this.should_remove=a,o)return null}}return e}};function Oe(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`}function j(e,{enter:t,leave:n}){return new De(t,n).visit(e,null)}var ke=/@(jsx|jsxFrag|jsxImportSource|jsxRuntime)\s+(\S+)/g;function Ae(e,t){let n=t||{},r=n.runtime===`automatic`,i={},a={};j(e,{enter(e){if(e.type===`Program`){let t=e.comments||[],n=-1;for(;++n<t.length;){ke.lastIndex=0;let e=ke.exec(t[n].value);for(;e;)i[e[1]]=e[2],e=ke.exec(t[n].value)}if(i.jsxRuntime){if(i.jsxRuntime===`automatic`){if(r=!0,i.jsx)throw Error("Unexpected `@jsx` pragma w/ automatic runtime");if(i.jsxFrag)throw Error("Unexpected `@jsxFrag` pragma w/ automatic runtime")}else if(i.jsxRuntime===`classic`){if(r=!1,i.jsxImportSource)throw Error("Unexpected `@jsxImportSource` w/ classic runtime")}else throw Error("Unexpected `jsxRuntime` `"+i.jsxRuntime+"`, expected `automatic` or `classic`")}}},leave(e){if(e.type===`Program`){let t=[];if(a.fragment&&t.push({type:`ImportSpecifier`,imported:{type:`Identifier`,name:`Fragment`},local:{type:`Identifier`,name:`_Fragment`}}),a.jsx&&t.push({type:`ImportSpecifier`,imported:{type:`Identifier`,name:`jsx`},local:{type:`Identifier`,name:`_jsx`}}),a.jsxs&&t.push({type:`ImportSpecifier`,imported:{type:`Identifier`,name:`jsxs`},local:{type:`Identifier`,name:`_jsxs`}}),a.jsxDEV&&t.push({type:`ImportSpecifier`,imported:{type:`Identifier`,name:`jsxDEV`},local:{type:`Identifier`,name:`_jsxDEV`}}),t.length>0){let r=0;for(;r<e.body.length;){let t=e.body[r];if(`directive`in t&&t.directive)r++;else break}e.body.splice(r,0,{type:`ImportDeclaration`,specifiers:t,source:{type:`Literal`,value:(i.jsxImportSource||n.importSource||`react`)+(n.development?`/jsx-dev-runtime`:`/jsx-runtime`)}})}}if(e.type!==`JSXElement`&&e.type!==`JSXFragment`)return;let t=[],o=-1;for(;++o<e.children.length;){let n=e.children[o];if(n.type===`JSXExpressionContainer`)n.expression.type!==`JSXEmptyExpression`&&t.push(n.expression);else if(n.type===`JSXText`){let e=n.value.replace(/\t/g,` `).replace(/ *(\r?\n|\r) */g,`
2
+ `).replace(/\n+/g,`
3
+ `).replace(/\n+$/,``).replace(/^\n+/,``).replace(/\n/g,` `);if(e){let r={type:`Literal`,value:e};Pe(n,r),t.push(r)}}else n.type!==`JSXElement`&&n.type!==`JSXFragment`&&n.type,t.push(n)}let s,c=[],l=[],u;if(e.type===`JSXElement`){if(s=Me(e.openingElement.name),s.type===`Identifier`&&/^[a-z]/.test(s.name)){let e={type:`Literal`,value:s.name};Pe(s,e),s=e}let t,n=e.openingElement.attributes,i=-1;for(;++i<n.length;){let e=n[i];if(e.type===`JSXSpreadAttribute`)e.argument.type===`ObjectExpression`?c.push(...e.argument.properties):c.push({type:`SpreadElement`,argument:e.argument}),t=!0;else{let n=je(e);if(r&&n.key.type===`Identifier`&&n.key.name===`key`){if(t)throw Error("Expected `key` to come before any spread expressions");let e=n.value;e.type!==`AssignmentPattern`&&e.type!==`ArrayPattern`&&e.type!==`ObjectPattern`&&e.type,u=e}else c.push(n)}}}else r?(a.fragment=!0,s={type:`Identifier`,name:`_Fragment`}):s=Ne(i.jsxFrag||n.pragmaFrag||`React.Fragment`);r?t.length>0&&c.push({type:`Property`,key:{type:`Identifier`,name:`children`},value:t.length>1?{type:`ArrayExpression`,elements:t}:t[0],kind:`init`,method:!1,shorthand:!1,computed:!1}):l=t;let d;if(r){l.push({type:`ObjectExpression`,properties:c}),u?l.push(u):n.development&&l.push({type:`Identifier`,name:`undefined`});let r=t.length>1;if(n.development){a.jsxDEV=!0,d={type:`Identifier`,name:`_jsxDEV`},l.push({type:`Literal`,value:r});let t={type:`ObjectExpression`,properties:[{type:`Property`,method:!1,shorthand:!1,computed:!1,kind:`init`,key:{type:`Identifier`,name:`fileName`},value:{type:`Literal`,value:n.filePath||`<source.js>`}}]};e.loc&&t.properties.push({type:`Property`,method:!1,shorthand:!1,computed:!1,kind:`init`,key:{type:`Identifier`,name:`lineNumber`},value:{type:`Literal`,value:e.loc.start.line}},{type:`Property`,method:!1,shorthand:!1,computed:!1,kind:`init`,key:{type:`Identifier`,name:`columnNumber`},value:{type:`Literal`,value:e.loc.start.column+1}}),l.push(t,{type:`ThisExpression`})}else r?(a.jsxs=!0,d={type:`Identifier`,name:`_jsxs`}):(a.jsx=!0,d={type:`Identifier`,name:`_jsx`})}else c.length>0?l.unshift({type:`ObjectExpression`,properties:c}):l.length>0&&l.unshift({type:`Literal`,value:null}),d=Ne(i.jsx||n.pragma||`React.createElement`);l.unshift(s);let f={type:`CallExpression`,callee:d,arguments:l,optional:!1};Pe(e,f),this.replace(f)}})}function je(e){let t;if(e.value){if(e.value.type===`JSXExpressionContainer`){let n=e.value.expression;n.type,t=n}else{let n=e.value;n.type!==`JSXElement`&&n.type,t=n,delete t.raw}}else t={type:`Literal`,value:!0};let n={type:`Property`,key:Me(e.name),value:t,kind:`init`,method:!1,shorthand:!1,computed:!1};return Pe(e,n),n}function Me(e){let t;if(e.type===`JSXMemberExpression`){let n=Me(e.property);t={type:`MemberExpression`,object:Me(e.object),property:n,computed:n.type===`Literal`,optional:!1}}else t=e.type===`JSXNamespacedName`?{type:`Literal`,value:e.namespace.name+`:`+e.name.name}:m(e.name)?{type:`Identifier`,name:e.name}:{type:`Literal`,value:e.name};return Pe(e,t),t}function Ne(e){let t=e.split(`.`),n=-1,r;for(;++n<t.length;){let e=m(t[n])?{type:`Identifier`,name:t[n]}:{type:`Literal`,value:t[n]};r=r?{type:`MemberExpression`,object:r,property:e,computed:!!(n&&e.type===`Literal`),optional:!1}:e}return r}function Pe(e,t){let n=[`start`,`end`,`loc`,`range`,`comments`],r=-1;for(;++r<n.length;){let i=n[r];i in e&&(t[i]=e[i])}}function Fe(e){return function(t,n){Ae(t,{filePath:n.history[0],...e})}}var{stringify:Ie}=JSON;if(!String.prototype.repeat)throw Error(`String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation`);if(!String.prototype.endsWith)throw Error(`String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation`);var Le={"||":2,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},Re={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:17,ClassExpression:17,FunctionExpression:17,ObjectExpression:17,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function M(e,t){let{generator:n}=e;if(e.write(`(`),t!=null&&t.length>0){n[t[0].type](t[0],e);let{length:r}=t;for(let i=1;i<r;i++){let r=t[i];e.write(`, `),n[r.type](r,e)}}e.write(`)`)}function ze(e,t,n,r){let i=e.expressionsPrecedence[t.type];if(i===17)return!0;let a=e.expressionsPrecedence[n.type];return i===a?i!==13&&i!==14?!1:t.operator===`**`&&n.operator===`**`?!r:i===13&&a===13&&(t.operator===`??`||n.operator===`??`)?!0:r?Le[t.operator]<=Le[n.operator]:Le[t.operator]<Le[n.operator]:!r&&i===15&&a===14&&n.operator===`**`||i<a}function Be(e,t,n,r){let{generator:i}=e;ze(e,t,n,r)?(e.write(`(`),i[t.type](t,e),e.write(`)`)):i[t.type](t,e)}function Ve(e,t,n,r){let i=t.split(`
4
+ `),a=i.length-1;if(e.write(i[0].trim()),a>0){e.write(r);for(let t=1;t<a;t++)e.write(n+i[t].trim()+r);e.write(n+i[a].trim())}}function N(e,t,n,r){let{length:i}=t;for(let a=0;a<i;a++){let i=t[a];e.write(n),i.type[0]===`L`?e.write(`// `+i.value.trim()+`
5
+ `,i):(e.write(`/*`),Ve(e,i.value,n,r),e.write(`*/`+r))}}function He(e){let t=e;for(;t!=null;){let{type:e}=t;if(e[0]===`C`&&e[1]===`a`)return!0;if(e[0]===`M`&&e[1]===`e`&&e[2]===`m`)t=t.object;else return!1}}function Ue(e,t){let{generator:n}=e,{declarations:r}=t;e.write(t.kind+` `);let{length:i}=r;if(i>0){n.VariableDeclarator(r[0],e);for(let t=1;t<i;t++)e.write(`, `),n.VariableDeclarator(r[t],e)}}var We,Ge,Ke,qe,Je,Ye,Xe={Program(e,t){let n=t.indent.repeat(t.indentLevel),{lineEnd:r,writeComments:i}=t;i&&e.comments!=null&&N(t,e.comments,n,r);let a=e.body,{length:o}=a;for(let e=0;e<o;e++){let o=a[e];i&&o.comments!=null&&N(t,o.comments,n,r),t.write(n),this[o.type](o,t),t.write(r)}i&&e.trailingComments!=null&&N(t,e.trailingComments,n,r)},BlockStatement:Ye=function(e,t){let n=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:i}=t,a=n+t.indent;t.write(`{`);let o=e.body;if(o!=null&&o.length>0){t.write(r),i&&e.comments!=null&&N(t,e.comments,a,r);let{length:s}=o;for(let e=0;e<s;e++){let n=o[e];i&&n.comments!=null&&N(t,n.comments,a,r),t.write(a),this[n.type](n,t),t.write(r)}t.write(n)}else i&&e.comments!=null&&(t.write(r),N(t,e.comments,a,r),t.write(n));i&&e.trailingComments!=null&&N(t,e.trailingComments,a,r),t.write(`}`),t.indentLevel--},ClassBody:Ye,StaticBlock(e,t){t.write(`static `),this.BlockStatement(e,t)},EmptyStatement(e,t){t.write(`;`)},ExpressionStatement(e,t){let n=t.expressionsPrecedence[e.expression.type];n===17||n===3&&e.expression.left.type[0]===`O`?(t.write(`(`),this[e.expression.type](e.expression,t),t.write(`)`)):this[e.expression.type](e.expression,t),t.write(`;`)},IfStatement(e,t){t.write(`if (`),this[e.test.type](e.test,t),t.write(`) `),this[e.consequent.type](e.consequent,t),e.alternate!=null&&(t.write(` else `),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(`: `),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write(`break`),e.label!=null&&(t.write(` `),this[e.label.type](e.label,t)),t.write(`;`)},ContinueStatement(e,t){t.write(`continue`),e.label!=null&&(t.write(` `),this[e.label.type](e.label,t)),t.write(`;`)},WithStatement(e,t){t.write(`with (`),this[e.object.type](e.object,t),t.write(`) `),this[e.body.type](e.body,t)},SwitchStatement(e,t){let n=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:i}=t;t.indentLevel++;let a=n+t.indent,o=a+t.indent;t.write(`switch (`),this[e.discriminant.type](e.discriminant,t),t.write(`) {`+r);let{cases:s}=e,{length:c}=s;for(let e=0;e<c;e++){let n=s[e];i&&n.comments!=null&&N(t,n.comments,a,r),n.test?(t.write(a+`case `),this[n.test.type](n.test,t),t.write(`:`+r)):t.write(a+`default:`+r);let{consequent:c}=n,{length:l}=c;for(let e=0;e<l;e++){let n=c[e];i&&n.comments!=null&&N(t,n.comments,o,r),t.write(o),this[n.type](n,t),t.write(r)}}t.indentLevel-=2,t.write(n+`}`)},ReturnStatement(e,t){t.write(`return`),e.argument&&(t.write(` `),this[e.argument.type](e.argument,t)),t.write(`;`)},ThrowStatement(e,t){t.write(`throw `),this[e.argument.type](e.argument,t),t.write(`;`)},TryStatement(e,t){if(t.write(`try `),this[e.block.type](e.block,t),e.handler){let{handler:n}=e;n.param==null?t.write(` catch `):(t.write(` catch (`),this[n.param.type](n.param,t),t.write(`) `)),this[n.body.type](n.body,t)}e.finalizer&&(t.write(` finally `),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write(`while (`),this[e.test.type](e.test,t),t.write(`) `),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write(`do `),this[e.body.type](e.body,t),t.write(` while (`),this[e.test.type](e.test,t),t.write(`);`)},ForStatement(e,t){if(t.write(`for (`),e.init!=null){let{init:n}=e;n.type[0]===`V`?Ue(t,n):this[n.type](n,t)}t.write(`; `),e.test&&this[e.test.type](e.test,t),t.write(`; `),e.update&&this[e.update.type](e.update,t),t.write(`) `),this[e.body.type](e.body,t)},ForInStatement:We=function(e,t){t.write(`for ${e.await?`await `:``}(`);let{left:n}=e;n.type[0]===`V`?Ue(t,n):this[n.type](n,t),t.write(e.type[3]===`I`?` in `:` of `),this[e.right.type](e.right,t),t.write(`) `),this[e.body.type](e.body,t)},ForOfStatement:We,DebuggerStatement(e,t){t.write(`debugger;`,e)},FunctionDeclaration:Ge=function(e,t){t.write((e.async?`async `:``)+(e.generator?`function* `:`function `)+(e.id?e.id.name:``),e),M(t,e.params),t.write(` `),this[e.body.type](e.body,t)},FunctionExpression:Ge,VariableDeclaration(e,t){Ue(t,e),t.write(`;`)},VariableDeclarator(e,t){this[e.id.type](e.id,t),e.init!=null&&(t.write(` = `),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write(`class `+(e.id?`${e.id.name} `:``),e),e.superClass){t.write(`extends `);let{superClass:n}=e,{type:r}=n,i=t.expressionsPrecedence[r];(r[0]!==`C`||r[1]!==`l`||r[5]!==`E`)&&(i===17||i<t.expressionsPrecedence.ClassExpression)?(t.write(`(`),this[e.superClass.type](n,t),t.write(`)`)):this[n.type](n,t),t.write(` `)}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write(`import `);let{specifiers:n,attributes:r}=e,{length:i}=n,a=0;if(i>0){for(;a<i;){a>0&&t.write(`, `);let e=n[a],r=e.type[6];if(r===`D`)t.write(e.local.name,e),a++;else if(r===`N`)t.write(`* as `+e.local.name,e),a++;else break}if(a<i){for(t.write(`{`);;){let e=n[a],{name:r}=e.imported;if(t.write(r,e),r!==e.local.name&&t.write(` as `+e.local.name),++a<i)t.write(`, `);else break}t.write(`}`)}t.write(` from `)}if(this.Literal(e.source,t),r&&r.length>0){t.write(` with { `);for(let e=0;e<r.length;e++)this.ImportAttribute(r[e],t),e<r.length-1&&t.write(`, `);t.write(` }`)}t.write(`;`)},ImportAttribute(e,t){this.Identifier(e.key,t),t.write(`: `),this.Literal(e.value,t)},ImportExpression(e,t){t.write(`import(`),this[e.source.type](e.source,t),t.write(`)`)},ExportDefaultDeclaration(e,t){t.write(`export default `),this[e.declaration.type](e.declaration,t),t.expressionsPrecedence[e.declaration.type]!=null&&e.declaration.type[0]!==`F`&&t.write(`;`)},ExportNamedDeclaration(e,t){if(t.write(`export `),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write(`{`);let{specifiers:n}=e,{length:r}=n;if(r>0)for(let e=0;;){let i=n[e],{name:a}=i.local;if(t.write(a,i),a!==i.exported.name&&t.write(` as `+i.exported.name),++e<r)t.write(`, `);else break}if(t.write(`}`),e.source&&(t.write(` from `),this.Literal(e.source,t)),e.attributes&&e.attributes.length>0){t.write(` with { `);for(let n=0;n<e.attributes.length;n++)this.ImportAttribute(e.attributes[n],t),n<e.attributes.length-1&&t.write(`, `);t.write(` }`)}t.write(`;`)}},ExportAllDeclaration(e,t){if(e.exported==null?t.write(`export * from `):t.write(`export * as `+e.exported.name+` from `),this.Literal(e.source,t),e.attributes&&e.attributes.length>0){t.write(` with { `);for(let n=0;n<e.attributes.length;n++)this.ImportAttribute(e.attributes[n],t),n<e.attributes.length-1&&t.write(`, `);t.write(` }`)}t.write(`;`)},MethodDefinition(e,t){e.static&&t.write(`static `);let n=e.kind[0];(n===`g`||n===`s`)&&t.write(e.kind+` `),e.value.async&&t.write(`async `),e.value.generator&&t.write(`*`),e.computed?(t.write(`[`),this[e.key.type](e.key,t),t.write(`]`)):this[e.key.type](e.key,t),M(t,e.value.params),t.write(` `),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?`async `:``,e);let{params:n}=e;n!=null&&(n.length===1&&n[0].type[0]===`I`?t.write(n[0].name,n[0]):M(t,e.params)),t.write(` => `),e.body.type[0]===`O`?(t.write(`(`),this.ObjectExpression(e.body,t),t.write(`)`)):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write(`this`,e)},Super(e,t){t.write(`super`,e)},RestElement:Ke=function(e,t){t.write(`...`),this[e.argument.type](e.argument,t)},SpreadElement:Ke,YieldExpression(e,t){t.write(e.delegate?`yield*`:`yield`),e.argument&&(t.write(` `),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write(`await `,e),Be(t,e.argument,e)},TemplateLiteral(e,t){let{quasis:n,expressions:r}=e;t.write("`");let{length:i}=r;for(let e=0;e<i;e++){let i=r[e],a=n[e];t.write(a.value.raw,a),t.write("${"),this[i.type](i,t),t.write(`}`)}let a=n[n.length-1];t.write(a.value.raw,a),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){Be(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:Je=function(e,t){if(t.write(`[`),e.elements.length>0){let{elements:n}=e,{length:r}=n;for(let e=0;;){let i=n[e];if(i!=null&&this[i.type](i,t),++e<r)t.write(`, `);else{i??t.write(`, `);break}}}t.write(`]`)},ArrayPattern:Je,ObjectExpression(e,t){let n=t.indent.repeat(t.indentLevel++),{lineEnd:r,writeComments:i}=t,a=n+t.indent;if(t.write(`{`),e.properties.length>0){t.write(r),i&&e.comments!=null&&N(t,e.comments,a,r);let o=`,`+r,{properties:s}=e,{length:c}=s;for(let e=0;;){let n=s[e];if(i&&n.comments!=null&&N(t,n.comments,a,r),t.write(a),this[n.type](n,t),++e<c)t.write(o);else break}t.write(r),i&&e.trailingComments!=null&&N(t,e.trailingComments,a,r),t.write(n+`}`)}else i?e.comments==null?e.trailingComments==null?t.write(`}`):(t.write(r),N(t,e.trailingComments,a,r),t.write(n+`}`)):(t.write(r),N(t,e.comments,a,r),e.trailingComments!=null&&N(t,e.trailingComments,a,r),t.write(n+`}`)):t.write(`}`);t.indentLevel--},Property(e,t){e.method||e.kind[0]!==`i`?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(`[`),this[e.key.type](e.key,t),t.write(`]`)):this[e.key.type](e.key,t),t.write(`: `)),this[e.value.type](e.value,t))},PropertyDefinition(e,t){e.static&&t.write(`static `),e.computed&&t.write(`[`),this[e.key.type](e.key,t),e.computed&&t.write(`]`),e.value==null?e.key.type[0]!==`F`&&t.write(`;`):(t.write(` = `),this[e.value.type](e.value,t),t.write(`;`))},ObjectPattern(e,t){if(t.write(`{`),e.properties.length>0){let{properties:n}=e,{length:r}=n;for(let e=0;this[n[e].type](n[e],t),++e<r;)t.write(`, `)}t.write(`}`)},SequenceExpression(e,t){M(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){let{operator:n,argument:r,argument:{type:i}}=e;t.write(n);let a=ze(t,r,e);!a&&(n.length>1||i[0]===`U`&&(i[1]===`n`||i[1]===`p`)&&r.prefix&&r.operator[0]===n&&(n===`+`||n===`-`))&&t.write(` `),a?(t.write(n.length>1?` (`:`(`),this[i](r,t),t.write(`)`)):this[i](r,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(` `+e.operator+` `),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(` = `),this[e.right.type](e.right,t)},BinaryExpression:qe=function(e,t){let n=e.operator===`in`;n&&t.write(`(`),Be(t,e.left,e,!1),t.write(` `+e.operator+` `),Be(t,e.right,e,!0),n&&t.write(`)`)},LogicalExpression:qe,ConditionalExpression(e,t){let{test:n}=e,r=t.expressionsPrecedence[n.type];r===17||r<=t.expressionsPrecedence.ConditionalExpression?(t.write(`(`),this[n.type](n,t),t.write(`)`)):this[n.type](n,t),t.write(` ? `),this[e.consequent.type](e.consequent,t),t.write(` : `),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write(`new `);let n=t.expressionsPrecedence[e.callee.type];n===17||n<t.expressionsPrecedence.CallExpression||He(e.callee)?(t.write(`(`),this[e.callee.type](e.callee,t),t.write(`)`)):this[e.callee.type](e.callee,t),M(t,e.arguments)},CallExpression(e,t){let n=t.expressionsPrecedence[e.callee.type];n===17||n<t.expressionsPrecedence.CallExpression?(t.write(`(`),this[e.callee.type](e.callee,t),t.write(`)`)):this[e.callee.type](e.callee,t),e.optional&&t.write(`?.`),M(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){let n=t.expressionsPrecedence[e.object.type];n===17||n<t.expressionsPrecedence.MemberExpression?(t.write(`(`),this[e.object.type](e.object,t),t.write(`)`)):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write(`?.`),t.write(`[`),this[e.property.type](e.property,t),t.write(`]`)):(e.optional?t.write(`?.`):t.write(`.`),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+`.`+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},PrivateIdentifier(e,t){t.write(`#${e.name}`,e)},Literal(e,t){e.raw==null?e.regex==null?e.bigint==null?t.write(Ie(e.value),e):t.write(e.bigint+`n`,e):this.RegExpLiteral(e,t):t.write(e.raw,e)},RegExpLiteral(e,t){let{regex:n}=e;t.write(`/${n.pattern}/${n.flags}`,e)}},Ze={},Qe=class{constructor(e){let t=e??Ze;this.output=``,t.output==null?this.output=``:(this.output=t.output,this.write=this.writeToStream),this.generator=t.generator==null?Xe:t.generator,this.expressionsPrecedence=t.expressionsPrecedence==null?Re:t.expressionsPrecedence,this.indent=t.indent==null?` `:t.indent,this.lineEnd=t.lineEnd==null?`
6
+ `:t.lineEnd,this.indentLevel=t.startingIndentLevel==null?0:t.startingIndentLevel,this.writeComments=t.comments?t.comments:!1,t.sourceMap!=null&&(this.write=t.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=t.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
7
+ `).length-1,this.mapping={original:null,generated:this,name:void 0,source:t.sourceMap.file||t.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,t){this.output+=e,this.map(e,t)}writeToStreamAndMap(e,t){this.output.write(e),this.map(e,t)}map(e,t){if(t!=null){let{type:n}=t;if(n[0]===`L`&&n[2]===`n`){this.column=0,this.line++;return}if(t.loc!=null){let{mapping:e}=this;e.original=t.loc.start,e.name=t.name,this.sourceMap.addMapping(e)}if(n[0]===`T`&&n[8]===`E`||n[0]===`L`&&n[1]===`i`&&typeof t.value==`string`){let{length:t}=e,{column:n,line:r}=this;for(let i=0;i<t;i++)e[i]===`
8
+ `?(n=0,r++):n++;this.column=n,this.line=r;return}}let{length:n}=e,{lineEnd:r}=this;n>0&&(this.lineEndSize>0&&(r.length===1?e[n-1]===r:e.endsWith(r))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}};function $e(e,t){let n=new Qe(t);return n.generator[e.type](e,n),n.output}var et={};function tt(e,t){let{SourceMapGenerator:n,filePath:r,handlers:i}=t||et,a=n?new n({file:r||`<unknown>.js`}):void 0;return{value:$e(e,{comments:!0,generator:{...Xe,...i},sourceMap:a||void 0}),map:a?a.toJSON():void 0}}var nt={JSXAttribute:rt,JSXClosingElement:it,JSXClosingFragment:at,JSXElement:ot,JSXEmptyExpression:st,JSXExpressionContainer:ct,JSXFragment:lt,JSXIdentifier:ut,JSXMemberExpression:dt,JSXNamespacedName:ft,JSXOpeningElement:pt,JSXOpeningFragment:mt,JSXSpreadAttribute:ht,JSXText:gt};function rt(e,t){this[e.name.type](e.name,t),e.value!==null&&e.value!==void 0&&(t.write(`=`),e.value.type===`Literal`?t.write(`"`+_t(String(e.value.value)).replace(/"/g,`&quot;`)+`"`,e):this[e.value.type](e.value,t))}function it(e,t){t.write(`</`),this[e.name.type](e.name,t),t.write(`>`)}function at(e,t){t.write(`</>`,e)}function ot(e,t){let n=-1;if(this[e.openingElement.type](e.openingElement,t),e.children)for(;++n<e.children.length;){let r=e.children[n];if(r.type===`JSXSpreadChild`)throw Error(`JSX spread children are not supported`);this[r.type](r,t)}e.closingElement&&this[e.closingElement.type](e.closingElement,t)}function st(){}function ct(e,t){t.write(`{`),this[e.expression.type](e.expression,t),t.write(`}`)}function lt(e,t){let n=-1;if(this[e.openingFragment.type](e.openingFragment,t),e.children)for(;++n<e.children.length;){let r=e.children[n];if(r.type===`JSXSpreadChild`)throw Error(`JSX spread children are not supported`);this[r.type](r,t)}this[e.closingFragment.type](e.closingFragment,t)}function ut(e,t){t.write(e.name,e)}function dt(e,t){this[e.object.type](e.object,t),t.write(`.`),this[e.property.type](e.property,t)}function ft(e,t){this[e.namespace.type](e.namespace,t),t.write(`:`),this[e.name.type](e.name,t)}function pt(e,t){let n=-1;if(t.write(`<`),this[e.name.type](e.name,t),e.attributes)for(;++n<e.attributes.length;)t.write(` `),this[e.attributes[n].type](e.attributes[n],t);t.write(e.selfClosing?` />`:`>`)}function mt(e,t){t.write(`<>`,e)}function ht(e,t){t.write(`{`),this.SpreadElement(e,t),t.write(`}`)}function gt(e,t){t.write(_t(e.value).replace(/[<>{}]/g,vt),e)}function _t(e){return e.replace(/&(?=[#a-z])/gi,`&amp;`)}function vt(e){return e===`<`?`&lt;`:e===`>`?`&gt;`:e===`{`?`&#123;`:`&#125;`}var yt=e(re(),1);function bt(){let e=this.data(),t=e.settings||={},n=t.handlers||={};(t.plugins||=[]).push((0,yt.default)()),Object.assign(n,nt)}function xt(e){let t=this;this.compiler=n;function n(n,r){let i={...t.data(`settings`),...e},a=tt(n,{SourceMapGenerator:i.SourceMapGenerator,filePath:r.path||`unknown.js`,handlers:i.handlers});return r.map=a.map,a.value}}function St(e,t){let n={type:`Block`,value:e.value};t.inherit(e,n),t.comments.push(n);let r={type:`JSXEmptyExpression`,comments:[Object.assign({},n,{leading:!1,trailing:!0})]};t.patch(e,r);let i={type:`JSXExpressionContainer`,expression:r};return t.patch(e,i),i}var Ct=t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
9
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),wt=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Ct());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Tt=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Et=t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(wt()),r=Tt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Dt=e(Et(),1),Ot={}.hasOwnProperty,kt=/[A-Z]/g,At=new Set([`td`,`th`]);function jt(e,t){let n=t.schema,r=n,c=e.properties||{};n.space===`html`&&e.tagName.toLowerCase()===`svg`&&(r=a,t.schema=r);let l=t.all(e),u=[],d,f,p;for(d in c)if(Ot.call(c,d)){let n=c[d],a=s(r,d),l;if(n==null||n===!1||typeof n==`number`&&Number.isNaN(n)||!n&&a.boolean)continue;if(d=t.elementAttributeNameCase===`react`&&a.space?oe[a.property]||a.property:a.attribute,Array.isArray(n)&&(n=a.commaSeparated?o(n):i(n)),d===`style`){let r=typeof n==`object`?n:Mt(String(n),e.tagName);t.stylePropertyNameCase===`css`&&(r=Nt(r));let i=[],a;for(a in r)Ot.call(r,a)&&i.push({type:`Property`,method:!1,shorthand:!1,computed:!1,key:m(a)?{type:`Identifier`,name:a}:{type:`Literal`,value:a},value:{type:`Literal`,value:String(r[a])},kind:`init`});p=i,l={type:`JSXExpressionContainer`,expression:{type:`ObjectExpression`,properties:i}}}else if(n===!0)l=null;else if(t.tableCellAlignToStyle&&At.has(e.tagName)&&d===`align`){f=String(n);continue}else l={type:`Literal`,value:String(n)};m(d,{jsx:!0})?u.push({type:`JSXAttribute`,name:{type:`JSXIdentifier`,name:d},value:l}):u.push({type:`JSXSpreadAttribute`,argument:{type:`ObjectExpression`,properties:[{type:`Property`,method:!1,shorthand:!1,computed:!1,key:{type:`Literal`,value:String(d)},value:l||{type:`Literal`,value:!0},kind:`init`}]}})}if(f!==void 0){p||(p=[],u.push({type:`JSXAttribute`,name:{type:`JSXIdentifier`,name:`style`},value:{type:`JSXExpressionContainer`,expression:{type:`ObjectExpression`,properties:p}}}));let e=t.stylePropertyNameCase===`css`?Pt(`textAlign`):`textAlign`;p.push({type:`Property`,method:!1,shorthand:!1,computed:!1,key:m(e)?{type:`Identifier`,name:e}:{type:`Literal`,value:e},value:{type:`Literal`,value:f},kind:`init`})}t.schema=n;let h={type:`JSXElement`,openingElement:{type:`JSXOpeningElement`,attributes:u,name:t.createJsxElementName(e.tagName),selfClosing:l.length===0},closingElement:l.length>0?{type:`JSXClosingElement`,name:t.createJsxElementName(e.tagName)}:null,children:l};return t.inherit(e,h),h}function Mt(e,t){try{return(0,Dt.default)(e,{reactCompat:!0})}catch(e){let n=e;throw Error("Could not parse `style` attribute on `"+t+"`",{cause:n})}}function Nt(e){let t={},n;for(n in e)Ot.call(e,n)&&(t[Pt(n)]=e[n]);return t}function Pt(e){let t=e.replace(kt,Ft);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Ft(e){return`-`+e.toLowerCase()}var It={}.hasOwnProperty,Lt=[];function Rt(e,t){let n=t?[...t].sort(Vt):Lt;n.length>0&&zt(e,{comments:n,index:0})}function zt(e,t){if(t.index===t.comments.length)return;let n=[],r=[],i;for(i in e)if(It.call(e,i)){let t=e[i];if(t&&typeof t==`object`&&i!==`comments`){if(Array.isArray(t)){let e=-1;for(;++e<t.length;)t[e]&&typeof t[e].type==`string`&&n.push(t[e])}else typeof t.type==`string`&&n.push(t)}}n.sort(Vt),r.push(...Bt(t,e,!1,{leading:!0,trailing:!1}));let a=-1;for(;++a<n.length;)zt(n[a],t);r.push(...Bt(t,e,!0,{leading:!1,trailing:n.length>0})),r.length>0&&(e.comments=r)}function Bt(e,t,n,r){let i=[];for(;e.comments[e.index]&&Vt(e.comments[e.index],t,n)<1;)i.push(Object.assign({},e.comments[e.index++],r));return i}function Vt(e,t,n){let r=n?`end`:`start`;return e.range&&t.range?e.range[0]-t.range[+!!n]:e.loc&&e.loc.start&&t.loc&&t.loc[r]?e.loc.start.line-t.loc[r].line||e.loc.start.column-t.loc[r].column:`start`in e&&r in t?e.start-t[r]:NaN}function Ht(e,t){let n=e.data&&e.data.estree,r=n&&n.comments||[],i;n&&(t.comments.push(...r),Rt(n,n.comments),i=n.body[0]&&n.body[0].type===`ExpressionStatement`&&n.body[0].expression||void 0),i||(i={type:`JSXEmptyExpression`},t.patch(e,i));let a={type:`JSXExpressionContainer`,expression:i};return t.inherit(e,a),a}function Ut(e,t){let n=t.schema,r=n,i=e.attributes||[],o=-1;e.name&&n.space===`html`&&e.name.toLowerCase()===`svg`&&(r=a,t.schema=r);let s=t.all(e),c=[];for(;++o<i.length;){let e=i[o],n=e.value,r;if(e.type===`mdxJsxAttribute`){if(n==null)r=null;else if(typeof n==`object`){let e=n.data&&n.data.estree,i=e&&e.comments||[],a;e&&(t.comments.push(...i),Rt(e,e.comments),a=e.body[0]&&e.body[0].type===`ExpressionStatement`&&e.body[0].expression||void 0),r={type:`JSXExpressionContainer`,expression:a||{type:`JSXEmptyExpression`}},t.inherit(n,r)}else r={type:`Literal`,value:String(n)};let i={type:`JSXAttribute`,name:t.createJsxAttributeName(e.name),value:r};t.inherit(e,i),c.push(i)}else{let n=e.data&&e.data.estree,r=n&&n.comments||[],i;n&&(t.comments.push(...r),Rt(n,n.comments),i=n.body[0]&&n.body[0].type===`ExpressionStatement`&&n.body[0].expression&&n.body[0].expression.type===`ObjectExpression`&&n.body[0].expression.properties&&n.body[0].expression.properties[0]&&n.body[0].expression.properties[0].type===`SpreadElement`&&n.body[0].expression.properties[0].argument||void 0);let a={type:`JSXSpreadAttribute`,argument:i||{type:`ObjectExpression`,properties:[]}};t.inherit(e,a),c.push(a)}}t.schema=n;let l=e.name?{type:`JSXElement`,openingElement:{type:`JSXOpeningElement`,attributes:c,name:t.createJsxElementName(e.name),selfClosing:s.length===0},closingElement:s.length>0?{type:`JSXClosingElement`,name:t.createJsxElementName(e.name)}:null,children:s}:{type:`JSXFragment`,openingFragment:{type:`JSXOpeningFragment`},closingFragment:{type:`JSXClosingFragment`},children:s};return t.inherit(e,l),l}function Wt(e,t){let n=e.data&&e.data.estree,r=n&&n.comments||[];n&&(t.comments.push(...r),Rt(n,r),t.esm.push(...n.body))}function Gt(e,t){let n=t.all(e),r=[],i=-1,a;for(;++i<n.length;){let e=n[i];e.type===`JSXExpressionContainer`&&e.expression.type===`Literal`&&c(String(e.expression.value))?a&&a.push(e):(a&&r.push(...a),r.push(e),a=[])}let o={type:`JSXFragment`,openingFragment:{type:`JSXOpeningFragment`},closingFragment:{type:`JSXClosingFragment`},children:r};return t.inherit(e,o),o}function Kt(e,t){let n=String(e.value||``);if(n){let r={type:`Literal`,value:n};t.inherit(e,r);let i={type:`JSXExpressionContainer`,expression:r};return t.patch(e,i),i}}var qt={comment:St,doctype:Jt,element:jt,mdxFlowExpression:Ht,mdxJsxFlowElement:Ut,mdxJsxTextElement:Ut,mdxTextExpression:Ht,mdxjsEsm:Wt,root:Gt,text:Kt};function Jt(){}var Yt=Zt(`end`),Xt=Zt(`start`);function Zt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Qt(e){let t=Xt(e),n=Yt(e);if(t&&n)return{start:t,end:n}}var $t={}.hasOwnProperty,en=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]);function tn(e){let t=r(`type`,{invalid:nn,unknown:rn,handlers:{...qt,...e.handlers}});return{elementAttributeNameCase:e.elementAttributeNameCase||`react`,schema:e.space===`svg`?a:n,stylePropertyNameCase:e.stylePropertyNameCase||`dom`,tableCellAlignToStyle:e.tableCellAlignToStyle!==!1,comments:[],esm:[],all:an,createJsxAttributeName:cn,createJsxElementName:ln,handle:i,inherit:on,patch:sn};function i(e){return t(e,this)}}function nn(e){throw Error("Cannot handle value `"+e+"`, expected node")}function rn(e){throw`type`in e,Error("Cannot handle unknown node `"+e.type+"`")}function an(e){let t=e.children||[],n=-1,r=[],i=this.schema.space===`html`&&e.type===`element`&&en.has(e.tagName.toLowerCase());for(;++n<t.length;){let e=t[n];if(i&&e.type===`text`&&e.value===`
10
+ `)continue;let a=this.handle(e);Array.isArray(a)?r.push(...a):a&&r.push(a)}return r}function on(e,t){let n=e.data,r,i;if(sn(e,t),n){for(i in n)$t.call(n,i)&&i!==`estree`&&(r||={},r[i]=n[i]);r&&(t.data=r)}}function sn(e,t){let n=Qt(e);n&&n.start.offset!==void 0&&n.end.offset!==void 0&&(t.start=n.start.offset,t.end=n.end.offset,t.loc={start:{line:n.start.line,column:n.start.column-1},end:{line:n.end.line,column:n.end.column-1}},t.range=[n.start.offset,n.end.offset])}function cn(e){let t=un(e);if(t.type===`JSXMemberExpression`)throw Error(`Member expressions in attribute names are not supported`);return t}function ln(e){return un(e)}function un(e){if(e.includes(`.`)){let t=e.split(`.`),n=t.shift(),r={type:`JSXIdentifier`,name:n};for(;n=t.shift();)r={type:`JSXMemberExpression`,object:r,property:{type:`JSXIdentifier`,name:n}};return r}if(e.includes(`:`)){let t=e.split(`:`);return{type:`JSXNamespacedName`,namespace:{type:`JSXIdentifier`,name:t[0]},name:{type:`JSXIdentifier`,name:t[1]}}}return{type:`JSXIdentifier`,name:e}}function dn(e,t){let n=tn(t||{}),r=n.handle(e),i=n.esm;if(r){r.type!==`JSXFragment`&&r.type!==`JSXElement`&&(r={type:`JSXFragment`,openingFragment:{type:`JSXOpeningFragment`},closingFragment:{type:`JSXClosingFragment`},children:[r]},n.patch(e,r));let t={type:`ExpressionStatement`,expression:r};n.patch(e,t),i.push(t)}let a={type:`Program`,body:i,sourceType:`module`,comments:n.comments};return n.patch(e,a),a}function fn(e){return function(t){return dn(t,e)}}var pn={};function mn(e){let t=this,n=e||pn,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(S(n)),a.push(_()),o.push(ie(n))}function P(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&x(e.charCodeAt(n+1))&&x(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function hn(e){let t=this;t.parser=n;function n(n){return te(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function gn(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function _n(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
11
+ `}]}function vn(e,t){let n=t.value?t.value+`
12
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function yn(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bn(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xn(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=P(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Sn(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cn(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function wn(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Tn(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wn(e,t);let i={src:P(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function En(e,t){let n={src:P(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Dn(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function On(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return wn(e,t);let i={href:P(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function kn(e,t){let n={href:P(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function An(e,t,n){let r=e.all(t),i=n?jn(n):Mn(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
13
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
14
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function jn(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Mn(n[r])}return t}function Mn(e){return e.spread??e.children.length>1}function Nn(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Pn(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fn(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function In(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ln(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Xt(t.children[1]),o=Yt(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Rn(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function zn(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Bn=9,Vn=32;function Hn(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Un(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Un(t.slice(i),i>0,!1)),a.join(``)}function Un(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Bn||t===Vn;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Bn||t===Vn;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Wn(e,t){let n={type:`text`,value:Hn(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Gn(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Kn={blockquote:gn,break:_n,code:vn,delete:yn,emphasis:bn,footnoteReference:xn,heading:Sn,html:Cn,imageReference:Tn,image:En,inlineCode:Dn,linkReference:On,link:kn,listItem:An,list:Nn,paragraph:Pn,root:Fn,strong:In,table:Ln,tableCell:zn,tableRow:Rn,text:Wn,thematicBreak:Gn,toml:qn,yaml:qn,definition:qn,footnoteDefinition:qn};function qn(){}var{defineProperty:Jn}=Object,Yn=typeof self==`object`?self:globalThis,Xn=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Yn[e](t)},Zn=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Jn(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Yn[e]==`function`?Xn(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Xn(a,o),i)};return r},Qn=e=>Zn(new Map,e)(0),F=``,{toString:$n}={},{keys:er,is:tr}=Object,nr=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=$n.call(e).slice(8,-1);switch(n){case`Array`:return[1,F];case`Object`:return[2,F];case`Date`:return[3,F];case`RegExp`:return[4,F];case`Map`:return[5,F];case`Set`:return[6,F];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},rr=([e,t])=>e===0&&(t===`function`||t===`symbol`),ir=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=nr(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&tr(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of er(o))(e||!rr(nr(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?F:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(rr(nr(n))||rr(nr(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!rr(nr(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},ar=(e,{json:t,lossy:n}={})=>{let r=[];return ir(!(t||n),!!t,new Map,r)(e),r},or=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Qn(ar(e,t)):structuredClone(e):(e,t)=>Qn(ar(e,t));function sr(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function cr(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function lr(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||sr,r=e.options.footnoteBackLabel||cr,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=P(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...or(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
15
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
16
+ `}]}}var ur=(function(e){if(e==null)return hr;if(typeof e==`function`)return mr(e);if(typeof e==`object`)return Array.isArray(e)?dr(e):fr(e);if(typeof e==`string`)return pr(e);throw Error(`Expected function, string, or object as test`)});function dr(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ur(e[n]);return mr(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function fr(e){let t=e;return mr(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function pr(e){return mr(t);function t(t){return t&&t.type===e}}function mr(e){return t;function t(t,n,r){return!!(gr(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function hr(){return!0}function gr(e){return typeof e==`object`&&!!e&&`type`in e}function _r(e){return e}var vr=[];function yr(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=ur(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+_r(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=vr,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=br(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function br(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?vr:[e]}function xr(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),yr(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Sr={}.hasOwnProperty,Cr={};function wr(e,t){let n=t||Cr,r=new Map,i=new Map,a={all:s,applyData:Er,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Kn,...n.handlers},one:o,options:n,patch:Tr,wrap:Or};return xr(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Sr.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=or(n);return r.children=a.all(e),r}return or(e)}return(a.options.unknownHandler||Dr)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=kr(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=kr(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Tr(e,t){e.position&&(t.position=Qt(e))}function Er(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,or(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Dr(e,t){let n=t.data||{},r=`value`in t&&!(Sr.call(n,`hProperties`)||Sr.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Or(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
17
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
18
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
19
+ `}),n}function kr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ar(e,t){let n=wr(e,t),r=n.one(e,void 0),i=lr(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
20
+ `},i)),a}function jr(e,t){return e&&`run`in e?async function(n,r){let i=Ar(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ar(n,{file:r,...e||t})}}function Mr(e){if(e)throw e}var Nr=e(t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function Pr(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Fr(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ir(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ir(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Lr=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Rr={}.hasOwnProperty,zr=new class e extends Lr{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Fr()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Nr.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Hr(`data`,this.frozen),this.namespace[e]=t,this):Rr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Hr(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Gr(e),n=this.parser||this.Parser;return Br(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Br(`process`,this.parser||this.Parser),Vr(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Gr(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);qr(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Br(`processSync`,this.parser||this.Parser),Vr(`processSync`,this.compiler||this.Compiler),this.process(e,r),Wr(`processSync`,`process`,t),n;function r(e,r){t=!0,Mr(e),n=r}}run(e,t,n){Ur(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Gr(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Wr(`runSync`,`run`,n),r;function i(e,t){Mr(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Gr(t),r=this.compiler||this.Compiler;return Vr(`stringify`,r),Ur(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Hr(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Nr.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Pr(o)&&Pr(r)&&(r=(0,Nr.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Br(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Vr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Hr(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ur(e){if(!Pr(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Wr(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Gr(e){return Kr(e)?e:new ve(e)}function Kr(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function qr(e){return typeof e==`string`||Jr(e)}function Jr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function I(e,t){let n=[`start`,`end`,`loc`,`range`],r=-1;for(;++r<n.length;){let i=n[r];i in e&&(t[i]=e[i])}}function Yr(e,t){let n=-1,r=[],i=[],a;for(;++n<e.length;){let t=e[n];t.type===`ImportNamespaceSpecifier`?a=t:i.push(t)}if(a){let e={type:`VariableDeclarator`,id:a.local,init:t};I(a,e),r.push(e)}return r.push({type:`VariableDeclarator`,id:{type:`ObjectPattern`,properties:i.map(function(e){let t=e.type===`ImportSpecifier`?e.imported:e.type===`ExportSpecifier`?e.exported:{type:`Identifier`,name:`default`},n=e.local;e.type===`ExportSpecifier`&&(n=t,t=e.local),n.type;let r={type:`Property`,kind:`init`,shorthand:t.type===`Identifier`&&n.type===`Identifier`&&t.name===n.name,method:!1,computed:!1,key:t,value:n};return I(e,r),r})},init:a?{type:`Identifier`,name:a.local.name}:t}),r}function L(e){let t=-1,n;for(;++t<e.length;){let r=e[t],i=typeof r==`string`&&m(r)?{type:`Identifier`,name:r}:{type:`Literal`,value:r};n=n?{type:`MemberExpression`,object:n,property:i,computed:i.type===`Literal`,optional:!1}:i}return n.type,n}function Xr(e){let t=-1,n;for(;++t<e.length;){let r=e[t];typeof r==`string`&&m(r,{jsx:!0}),``+r;let i={type:`JSXIdentifier`,name:r};n=n?{type:`JSXMemberExpression`,object:n,property:i}:i}return n}function Zr(e){let{outputFormat:t}=e||{};return function(e){if(e.comments&&=e.comments.filter(function(e){return!e.data?._mdxIsPragmaComment}),t===`function-body`){let t=0;for(;t<e.body.length;){let n=e.body[t];if(`directive`in n&&n.directive)t++;else break}let n=e.body[t];n&&n.type===`ImportDeclaration`&&typeof n.source.value==`string`&&/\/jsx-(dev-)?runtime$/.test(n.source.value)&&(e.body[t]={type:`VariableDeclaration`,kind:`const`,declarations:Yr(n.specifiers,L([`arguments`,0]))})}}}function Qr(){let e=[{block:!1,defined:[]}];return{enter:t,exit:n,scopes:e};function t(t){if(t.type===`ArrowFunctionExpression`){e.push({block:!1,defined:[]});for(let e of t.params)i(e,!1)}else if(t.type===`BlockStatement`||t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`WhileStatement`)e.push({block:!0,defined:[]});else if(t.type===`CatchClause`)e.push({block:!0,defined:[]}),t.param&&i(t.param,!0);else if(t.type===`ClassDeclaration`)r(t.id.name,!1);else if(t.type===`FunctionDeclaration`){t.id&&r(t.id.name,!1),e.push({block:!1,defined:[]});for(let e of t.params)i(e,!1)}else if(t.type===`FunctionExpression`){t.id&&r(t.id.name,!1),e.push({block:!1,defined:[]});for(let e of t.params)i(e,!1)}else if(t.type===`ImportDeclaration`)for(let e of t.specifiers)r(e.local.name,!1);else if(t.type===`VariableDeclaration`)for(let e of t.declarations)i(e.id,t.kind!==`var`)}function n(t){(t.type===`ArrowFunctionExpression`||t.type===`FunctionDeclaration`||t.type===`FunctionExpression`||t.type===`BlockStatement`||t.type===`CatchClause`||t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`WhileStatement`)&&e.pop().block}function r(t,n){let r=e.length,i;for(;r--&&(i=e[r],!n&&i.block););i.defined.push(t)}function i(e,t){if(e.type===`ArrayPattern`)for(let n of e.elements)n&&i(n,t);else if(e.type===`AssignmentPattern`)i(e.left,t);else if(e.type===`Identifier`)r(e.name,t);else if(e.type===`ObjectPattern`)for(let n of e.properties)n.type===`Property`?i(n.value,t):(n.type,i(n,t));else e.type,i(e.argument,t)}}function $r(e){return e.type===`FunctionDeclaration`?{...e,type:`FunctionExpression`}:(e.type,{...e,type:`ClassExpression`})}function ei(e){return e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`||e.type===`VariableDeclaration`}function ti(e){let t=e.baseUrl||void 0,n=typeof t==`object`?t.href:t,r=e.outputFormat||`program`,i=e.pragma===void 0?`React.createElement`:e.pragma,a=e.pragmaFrag===void 0?`React.Fragment`:e.pragmaFrag,o=e.pragmaImportSource||`react`,s=e.jsxImportSource||`react`,c=e.jsxRuntime||`automatic`;return function(e,t){let u=[],d=[],f=0,p,m,h;if(c===`classic`&&a&&ni(e,`@jsxFrag`,a),c===`classic`&&i&&ni(e,`@jsx`,i),c===`automatic`&&s&&ni(e,`@jsxImportSource`,s),c&&ni(e,`@jsxRuntime`,c),c===`classic`&&o){if(!i)throw Error("Missing `pragma` in classic runtime with `pragmaImportSource`");b({type:`ImportDeclaration`,specifiers:[{type:`ImportDefaultSpecifier`,local:{type:`Identifier`,name:i.split(`.`)[0]}}],attributes:[],source:{type:`Literal`,value:o}})}for(h of e.body)if(h.type===`ExportDefaultDeclaration`)p&&t.fail(`Unexpected duplicate layout, expected a single layout (previous: `+C(y(p))+`)`,{ancestors:[e,h],place:y(h),ruleId:`duplicate-layout`,source:`recma-document`}),p=h,d.push({type:`VariableDeclaration`,kind:`const`,declarations:[{type:`VariableDeclarator`,id:{type:`Identifier`,name:`MDXLayout`},init:ei(h.declaration)?$r(h.declaration):h.declaration}]});else if(h.type===`ExportNamedDeclaration`&&h.source){let n=h.source;h.specifiers=h.specifiers.filter(function(r){if(r.exported.type===`Identifier`&&r.exported.name==="default"){p&&t.fail(`Unexpected duplicate layout, expected a single layout (previous: `+C(y(p))+`)`,{ancestors:[e,h,r],place:y(h),ruleId:`duplicate-layout`,source:`recma-document`}),p=r;let i=[];if(r.local.type===`Identifier`&&r.local.name==="default")i.push({type:`ImportDefaultSpecifier`,local:{type:`Identifier`,name:`MDXLayout`}});else{let e={type:`ImportSpecifier`,imported:r.local,local:{type:`Identifier`,name:`MDXLayout`}};I(r.local,e),i.push(e)}let a={type:`Literal`,value:n.value};I(n,a);let o={type:`ImportDeclaration`,specifiers:i,attributes:[],source:a};return I(r,o),b(o),!1}return!0}),h.specifiers.length>0&&v(h)}else h.type===`ExportNamedDeclaration`||h.type===`ExportAllDeclaration`?v(h):h.type===`ImportDeclaration`?b(h):h.type===`ExpressionStatement`&&(h.expression.type===`JSXElement`||h.expression.type===`JSXFragment`)?(m=!0,d.push(...l(h.expression,r,!!p))):d.push(h);m||d.push(...l(void 0,r,!!p)),u.push([`MDXContent`,`default`]),r===`function-body`&&d.push({type:`ReturnStatement`,argument:{type:`ObjectExpression`,properties:[...Array.from({length:f}).map(function(e,t){return{type:`SpreadElement`,argument:{type:`Identifier`,name:`_exportAll`+(t+1)}}}),...u.map(function(e){return{type:`Property`,kind:`init`,method:!1,computed:!1,shorthand:typeof e==`string`,key:{type:`Identifier`,name:typeof e==`string`?e:e[1]},value:{type:`Identifier`,name:typeof e==`string`?e:e[0]}}})]}}),e.body=d;let g=!1,_=!1;(n||r===`function-body`)&&j(e,{enter(e){if((e.type===`ExportAllDeclaration`||e.type===`ExportNamedDeclaration`||e.type===`ImportDeclaration`)&&e.source){let t=e.source.value;try{new URL(t)}catch{(t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`))&&(t=new URL(t,n).href)}let r={type:`Literal`,value:t};I(e.source,r),e.source=r}else if(e.type===`ImportExpression`)_=!0,e.source={type:`CallExpression`,callee:{type:`Identifier`,name:`_resolveDynamicMdxSpecifier`},arguments:[e.source],optional:!1};else if(e.type===`MemberExpression`&&`object`in e&&e.object.type===`MetaProperty`&&e.property.type===`Identifier`&&e.object.meta.name===`import`&&e.object.property.name===`meta`&&e.property.name===`url`){g=!0;let t={type:`Identifier`,name:`_importMetaUrl`};I(e,t),this.replace(t)}}}),_&&(n||(g=!0),e.body.push(ri(n?{type:`Literal`,value:n}:{type:`Identifier`,name:`_importMetaUrl`}))),g&&e.body.unshift(...ii());function v(e){if(e.type===`ExportNamedDeclaration`){if(e.declaration){let t=Qr();j(e,{enter(e){t.enter(e),(e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)&&(this.skip(),t.exit(e))},leave:t.exit}),u.push(...t.scopes[0].defined)}for(h of e.specifiers)h.exported.type===`Identifier`?u.push(h.exported.name):(h.exported.value,u.push(h.exported.value))}b(e)}function b(e){let t,n;if(r===`function-body`){if(e.type===`ImportDeclaration`||e.type===`ExportAllDeclaration`||e.type===`ExportNamedDeclaration`&&e.source){e.source;let r={type:`ImportExpression`,source:e.source};I(e,r),n={type:`AwaitExpression`,argument:r},t=(e.type===`ImportDeclaration`||e.type===`ExportNamedDeclaration`)&&e.specifiers.length===0?{type:`ExpressionStatement`,expression:n}:{type:`VariableDeclaration`,kind:`const`,declarations:e.type===`ExportAllDeclaration`?[{type:`VariableDeclarator`,id:{type:`Identifier`,name:`_exportAll`+ ++f},init:n}]:Yr(e.specifiers,n)}}else if(e.declaration)t=e.declaration;else{let n=[];for(let t of e.specifiers)t.exported.type===`Identifier`&&t.local.type===`Identifier`&&t.local.name!==t.exported.name&&n.push({type:`VariableDeclarator`,id:t.exported,init:t.local});n.length>0&&(t={type:`VariableDeclaration`,kind:`const`,declarations:n})}}else t=e;t&&d.push(t)}};function l(e,t,n){let r={type:`JSXElement`,openingElement:{type:`JSXOpeningElement`,name:{type:`JSXIdentifier`,name:`MDXLayout`},attributes:[{type:`JSXSpreadAttribute`,argument:{type:`Identifier`,name:`props`}}],selfClosing:!1},closingElement:{type:`JSXClosingElement`,name:{type:`JSXIdentifier`,name:`MDXLayout`}},children:[{type:`JSXElement`,openingElement:{type:`JSXOpeningElement`,name:{type:`JSXIdentifier`,name:`_createMdxContent`},attributes:[{type:`JSXSpreadAttribute`,argument:{type:`Identifier`,name:`props`}}],selfClosing:!0},closingElement:null,children:[]}]};n||(r={type:`ConditionalExpression`,test:{type:`Identifier`,name:`MDXLayout`},consequent:r,alternate:{type:`CallExpression`,callee:{type:`Identifier`,name:`_createMdxContent`},arguments:[{type:`Identifier`,name:`props`}],optional:!1}});let i=e||{type:`Identifier`,name:`undefined`};i.type===`JSXFragment`&&i.children.length===1&&i.children[0].type===`JSXElement`&&(i=i.children[0]);let a=!1;j(i,{enter(e){if(e.type===`ArrowFunctionExpression`||e.type===`FunctionDeclaration`||e.type===`FunctionExpression`)return this.skip();(e.type===`AwaitExpression`||e.type===`ForOfStatement`&&e.await)&&(a=!0)}});let o={type:`FunctionDeclaration`,id:{type:`Identifier`,name:`MDXContent`},params:[{type:`AssignmentPattern`,left:{type:`Identifier`,name:`props`},right:{type:`ObjectExpression`,properties:[]}}],body:{type:`BlockStatement`,body:[{type:`ReturnStatement`,argument:r}]}};return[{type:`FunctionDeclaration`,async:a,id:{type:`Identifier`,name:`_createMdxContent`},params:[{type:`Identifier`,name:`props`}],body:{type:`BlockStatement`,body:[{type:`ReturnStatement`,argument:i}]}},t===`program`?{type:`ExportDefaultDeclaration`,declaration:o}:o]}}function ni(e,t,n){e.comments?.unshift({type:`Block`,value:t+` `+n,data:{_mdxIsPragmaComment:!0}})}function ri(e){return{type:`FunctionDeclaration`,id:{type:`Identifier`,name:`_resolveDynamicMdxSpecifier`},generator:!1,async:!1,params:[{type:`Identifier`,name:`d`}],body:{type:`BlockStatement`,body:[{type:`IfStatement`,test:{type:`BinaryExpression`,left:{type:`UnaryExpression`,operator:`typeof`,prefix:!0,argument:{type:`Identifier`,name:`d`}},operator:`!==`,right:{type:`Literal`,value:`string`}},consequent:{type:`ReturnStatement`,argument:{type:`Identifier`,name:`d`}},alternate:null},{type:`TryStatement`,block:{type:`BlockStatement`,body:[{type:`ExpressionStatement`,expression:{type:`NewExpression`,callee:{type:`Identifier`,name:`URL`},arguments:[{type:`Identifier`,name:`d`}]}},{type:`ReturnStatement`,argument:{type:`Identifier`,name:`d`}}]},handler:{type:`CatchClause`,param:null,body:{type:`BlockStatement`,body:[]}},finalizer:null},{type:`IfStatement`,test:{type:`LogicalExpression`,left:{type:`LogicalExpression`,left:{type:`CallExpression`,callee:L([`d`,`startsWith`]),arguments:[{type:`Literal`,value:`/`}],optional:!1},operator:`||`,right:{type:`CallExpression`,callee:L([`d`,`startsWith`]),arguments:[{type:`Literal`,value:`./`}],optional:!1}},operator:`||`,right:{type:`CallExpression`,callee:L([`d`,`startsWith`]),arguments:[{type:`Literal`,value:`../`}],optional:!1}},consequent:{type:`ReturnStatement`,argument:{type:`MemberExpression`,object:{type:`NewExpression`,callee:{type:`Identifier`,name:`URL`},arguments:[{type:`Identifier`,name:`d`},e]},property:{type:`Identifier`,name:`href`},computed:!1,optional:!1}},alternate:null},{type:`ReturnStatement`,argument:{type:`Identifier`,name:`d`}}]}}}function ii(){return[{type:`VariableDeclaration`,declarations:[{type:`VariableDeclarator`,id:{type:`Identifier`,name:`_importMetaUrl`},init:L([`arguments`,0,`baseUrl`])}],kind:`const`},{type:`IfStatement`,test:{type:`UnaryExpression`,operator:`!`,prefix:!0,argument:{type:`Identifier`,name:`_importMetaUrl`}},consequent:{type:`ThrowStatement`,argument:{type:`NewExpression`,callee:{type:`Identifier`,name:`Error`},arguments:[{type:`Literal`,value:"Unexpected missing `options.baseUrl` needed to support `export … from`, `import`, or `import.meta.url` when generating `function-body`"}]}},alternate:null}]}function ai(e){let t=-1,n;for(;++t<e.length;){let r=e[t];n=n?{type:`BinaryExpression`,left:n,operator:`+`,right:r}:r}return n}function oi(e){let{development:t,outputFormat:n,providerImportSource:r}=e;return function(e,i){let a=Qr(),o=[],s=!1,c=!1;if(j(e,{enter(e){a.enter(e),(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`)&&(o.push({components:[],idToInvalidComponentName:new Map,node:e,objects:[],references:{},tags:[]}),R(e,`MDXContent`)&&!ci(a.scopes,`MDXLayout`)&&o[0].components.push(`MDXLayout`));let t=o[0];if(t&&(R(t.node,`_createMdxContent`)||r)&&e.type===`JSXElement`){let n=e.openingElement.name;if(n.type===`JSXMemberExpression`){let r=[];for(;n.type===`JSXMemberExpression`;)r.unshift(n.property.name),n=n.object;r.unshift(n.name);let i=r.join(`.`),s=n.name,c=ci(a.scopes,s);!Object.hasOwn(t.references,i)&&(!c||o.length===1&&o[0].node.type===`FunctionDeclaration`&&R(o[0].node,`_createMdxContent`))&&(t.references[i]={component:!0,node:e}),!t.objects.includes(s)&&!c&&t.objects.push(s)}else if(n.type!==`JSXNamespacedName`){if(m(n.name)&&!/^[a-z]/.test(n.name)){let r=n.name;ci(a.scopes,r)||(r!==`MDXLayout`&&!Object.hasOwn(t.references,r)&&(t.references[r]={component:!0,node:e}),t.components.includes(r)||t.components.push(r))}else if(!(e.data&&e.data._mdxExplicitJsx)){let r=n.name;t.tags.includes(r)||t.tags.push(r);let i=[`_components`,r];if(m(r)===!1){let e=t.idToInvalidComponentName.get(r);e===void 0&&(e=`_component${t.idToInvalidComponentName.size}`,t.idToInvalidComponentName.set(r,e)),i=[e]}e.openingElement.name=Xr(i),e.closingElement&&(e.closingElement.name=Xr(i))}}}},leave(e){a.exit(e);let n=[],i=[],l=[],u=[];if(e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`){let a=o[o.length-1],d;for(d of a.tags.sort())n.push({type:`Property`,kind:`init`,key:m(d)?{type:`Identifier`,name:d}:{type:`Literal`,value:d},value:{type:`Literal`,value:d},method:!1,shorthand:!1,computed:!1});i.push(...a.components);for(d of a.objects)i.includes(d)||i.push(d);i.sort();let f=[];if(n.length>0||i.length>0||a.idToInvalidComponentName.size>0){if(r&&(s=!0,l.push({type:`CallExpression`,callee:{type:`Identifier`,name:`_provideComponents`},arguments:[],optional:!1})),(R(a.node,`MDXContent`)||R(a.node,`_createMdxContent`))&&l.push(L([`props`,`components`])),n.length>0||l.length>1)for(let e of l)n.push({type:`SpreadElement`,argument:e});let e=n.length>0?{type:`ObjectExpression`,properties:n}:{type:`LogicalExpression`,operator:`||`,left:l[0],right:{type:`ObjectExpression`,properties:[]}},t;if(i.length>0&&(t={type:`ObjectPattern`,properties:i.map(function(e){return{type:`Property`,kind:`init`,key:{type:`Identifier`,name:e===`MDXLayout`?`wrapper`:e},value:{type:`Identifier`,name:e},method:!1,shorthand:e!==`MDXLayout`,computed:!1}})}),a.tags.length>0&&(u.push({type:`VariableDeclarator`,id:{type:`Identifier`,name:`_components`},init:e}),e={type:`Identifier`,name:`_components`}),R(a.node,`_createMdxContent`))for(let[e,t]of[...a.idToInvalidComponentName].sort(function([e],[t]){return e.localeCompare(t)}))u.push({type:`VariableDeclarator`,id:{type:`Identifier`,name:t},init:{type:`MemberExpression`,object:{type:`Identifier`,name:`_components`},property:{type:`Literal`,value:e},computed:!0,optional:!1}});t&&u.push({type:`VariableDeclarator`,id:t,init:e}),u.length>0&&f.push({type:`VariableDeclaration`,kind:`const`,declarations:u})}let p;for(p in a.references)if(Object.hasOwn(a.references,p)){let e=p.split(`.`),t=0;for(;++t<e.length;){let n=e.slice(0,t).join(`.`);Object.hasOwn(a.references,n)||(a.references[n]={component:!1,node:a.references[p].node})}}let h=Object.keys(a.references).sort(),g=-1;for(;++g<h.length;){let e=h[g],n=a.references[e],r=C(y(n.node)),i=[{type:`Literal`,value:e},{type:`Literal`,value:n.component}];c=!0,t&&r&&i.push({type:`Literal`,value:r}),f.push({type:`IfStatement`,test:{type:`UnaryExpression`,operator:`!`,prefix:!0,argument:L(e.split(`.`))},consequent:{type:`ExpressionStatement`,expression:{type:`CallExpression`,callee:{type:`Identifier`,name:`_missingMdxReference`},arguments:i,optional:!1}},alternate:void 0})}f.length>0&&(e.body.type!==`BlockStatement`&&(e.body={type:`BlockStatement`,body:[{type:`ReturnStatement`,argument:e.body}]}),e.body.body.unshift(...f)),o.pop()}}}),s&&r&&e.body.unshift(si(r,n)),c){let n=[{type:`Literal`,value:`Expected `},{type:`ConditionalExpression`,test:{type:`Identifier`,name:`component`},consequent:{type:`Literal`,value:`component`},alternate:{type:`Literal`,value:`object`}},{type:`Literal`,value:" `"},{type:`Identifier`,name:`id`},{type:`Literal`,value:"` to be defined: you likely forgot to import, pass, or provide it."}],r=[{type:`Identifier`,name:`id`},{type:`Identifier`,name:`component`}];t&&(n.push({type:`ConditionalExpression`,test:{type:`Identifier`,name:`place`},consequent:ai([{type:`Literal`,value:`
21
+ It’s referenced in your code at \``},{type:`Identifier`,name:`place`},{type:`Literal`,value:(i.path?"` in `"+i.path:``)+"`"}]),alternate:{type:`Literal`,value:``}}),r.push({type:`Identifier`,name:`place`})),e.body.push({type:`FunctionDeclaration`,id:{type:`Identifier`,name:`_missingMdxReference`},generator:!1,async:!1,params:r,body:{type:`BlockStatement`,body:[{type:`ThrowStatement`,argument:{type:`NewExpression`,callee:{type:`Identifier`,name:`Error`},arguments:[ai(n)]}}]}})}n===`function-body`&&e.body.unshift({type:`ExpressionStatement`,expression:{type:`Literal`,value:`use strict`},directive:`use strict`})}}function si(e,t){let n=[{type:`ImportSpecifier`,imported:{type:`Identifier`,name:`useMDXComponents`},local:{type:`Identifier`,name:`_provideComponents`}}];return t===`function-body`?{type:`VariableDeclaration`,kind:`const`,declarations:Yr(n,L([`arguments`,0]))}:{type:`ImportDeclaration`,specifiers:n,attributes:[],source:{type:`Literal`,value:e}}}function R(e,t){return!!(e&&`id`in e&&e.id&&e.id.name===t)}function ci(e,t){let n=e.length;for(;n--;)if(e[n].defined.includes(t))return!0;return!1}function li(){return function(e){xr(e,`raw`,function(e,t,n){if(n&&typeof t==`number`)return n.children.splice(t,1),t})}}var ui=/\s+/g,di=/[\t\n\v\f\r ]+/g;function fi(e,t){t?typeof t==`string`&&(t={style:t}):t={};let n=t.preserveLineEndings?pi:mi;return String(e).replace(t.style===`html`?di:ui,t.trim?hi(n):n)}function pi(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:` `}function mi(){return` `}function hi(e){return t;function t(t,n,r){return n===0||n+t.length===r.length?``:e(t)}}function gi(){return function(e){xr(e,function(e,t,n){let r=-1,i=!0,a=!1;if(n&&typeof t==`number`&&e.type===`paragraph`){let o=e.children;for(;++r<o.length;){let e=o[r];if(e.type===`mdxJsxTextElement`||e.type===`mdxTextExpression`)a=!0;else if(e.type!==`text`||fi(e.value,{style:`html`,trim:!0})!==``){i=!1;break}}if(i&&a){r=-1;let e=[];for(;++r<o.length;){let t=o[r];t.type===`mdxJsxTextElement`&&(t.type=`mdxJsxFlowElement`),t.type===`mdxTextExpression`&&(t.type=`mdxFlowExpression`),t.type===`text`&&/^[\t\r\n ]+$/.test(String(t.value))||e.push(t)}return n.children.splice(t,1,...e),t}}if(e.type===`mdxJsxFlowElement`||e.type===`mdxJsxTextElement`){let t=e.data||={};t._mdxExplicitJsx=!0}(e.type===`mdxFlowExpression`||e.type===`mdxTextExpression`||e.type===`mdxjsEsm`)&&e.data&&e.data.estree&&j(e.data.estree,{enter(e){if(e.type===`JSXElement`){let t=e.data||={};t._mdxExplicitJsx=!0}}})})}}var _i=[`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`],vi=[`compilers`,`filepath`,`hastPlugins`,`mdPlugins`,`skipExport`,`wrapExport`],yi=!1;function bi(e){let t=e||{},n=-1;for(;++n<vi.length;){let e=vi[n];e in t&&``+e}t.format,(t.jsxRuntime===`classic`||t.pragma||t.pragmaFrag||t.pragmaImportSource)&&!yi&&(yi=!0,console.warn("Unexpected deprecated option `jsxRuntime: 'classic'`, `pragma`, `pragmaFrag`, or `pragmaImportSource`; see <https://mdxjs.com/migrating/v3/> on how to migrate"));let r=zr().use(hn);t.format!==`md`&&r.use(mn);let i=t.remarkRehypeOptions||{};return r.use(gi).use(t.remarkPlugins||[]).use(jr,{...i,allowDangerousHtml:!0,passThrough:[...i.passThrough||[],..._i]}).use(t.rehypePlugins||[]),t.format===`md`&&r.use(li),r.use(fn,t).use(ti,t).use(oi,t),t.jsx||r.use(Fe,t).use(Zr,t),r.use(bt).use(xt,t).use(t.recmaPlugins||[]),r}function xi(e,t){let{file:n,options:r}=we(e,t);return bi(r).process(n)}function Si(e,t){let n={heading:0,paragraph:0,"list-item":0,diagram:0,code:0,cell:0};return Ci(e.replace(/\r\n/g,`
22
+ `)).map(e=>wi(e,t,n)).filter(e=>e.length>0).join(`
23
+ `)}function Ci(e){let t=e.split(`
24
+ `),n=[],r=0;for(;r<t.length;){if((t[r]??``).trim()===``){r+=1;continue}let e=Mi(t,r);if(e){n.push({type:`code`,info:e.info,content:e.content}),r=e.next;continue}let i=Ni(t,r);if(i){n.push(i.block),r=i.next;continue}let a=/^( {0,3})(#{1,6})(?:\s+(.*))?$/.exec(t[r]??``);if(a&&(a[3]!==void 0||(a[2]??``).length>0)){let e=(a[2]??`#`).length;n.push({type:`heading`,level:e,text:(a[3]??``).trim()}),r+=1;continue}if(/^ {0,3}(?:>\s?)/.test(t[r]??``)){let e=zi(t,r);n.push({type:`quote`,text:e.text}),r=e.next;continue}if(Vi(t[r]??``)){let e=Bi(t,r);n.push(e.block),r=e.next;continue}if(/^ {0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/.test(t[r]??``)){n.push({type:`hr`}),r+=1;continue}let o=Ri(t,r);n.push({type:`paragraph`,text:o.text}),r=o.next}return n}function wi(e,t,n){return e.type===`heading`?(n.heading+=1,`<h${e.level}${ki(t,`heading`,n.heading)}>${z(e.text)}</h${e.level}>`):e.type===`paragraph`?(n.paragraph+=1,`<p${ki(t,`paragraph`,n.paragraph)}>${z(e.text)}</p>`):e.type===`quote`?(n.paragraph+=1,`<blockquote><p${ki(t,`paragraph`,n.paragraph)}>${z(e.text)}</p></blockquote>`):e.type===`hr`?`<hr>`:e.type===`code`?Ti(e.info,e.content,t,n):e.type===`table`?Ei(e,t,n):Oi(e,t,n)}function Ti(e,t,n,r){let i=ji(e),a=Ki(t);if(i.language===`mermaid`&&!i.diff&&t.trim())return r.diagram+=1,`<figure class="mermaid-diagram"${ki(n,`diagram`,r.diagram)}><pre class="mermaid">${a}</pre></figure>`;r.code+=1;let o=[`class="code-block"`,Ai(n,`code`,r.code)];return i.language&&o.push(`data-lang="${qi(i.language)}"`),!i.diff&&i.start>=1&&o.push(`data-start="${i.start}"`),i.diff&&o.push(`data-diff="true"`),`<pre ${o.join(` `)}><code>${a}</code></pre>`}function Ei(e,t,n){return`<div class="rich-table"><table><thead><tr>${e.header.map((r,i)=>Di(`th`,e.aligns[i]??`left`,r,t,n)).join(``)}</tr></thead>${e.rows.length===0?``:`<tbody>${e.rows.map(r=>`<tr>${r.map((r,i)=>Di(`td`,e.aligns[i]??`left`,r,t,n)).join(``)}</tr>`).join(``)}</tbody>`}</table></div>`}function Di(e,t,n,r,i){i.cell+=1;let a=`data-plan-part="${f(r,i.cell)}" data-plan-kind="cell"`,o=t===`center`?`align-center`:t===`right`?`align-right`:``;return`<${e}${o?` class="${o}" ${a}`:` ${a}`}>${z(Li(n.trim()))}</${e}>`}function Oi(e,t,n){let r=e.items.map(r=>{n[`list-item`]+=1;let i=e.loose?r.map(e=>(n.paragraph+=1,`<p${ki(t,`paragraph`,n.paragraph)}>${z(e)}</p>`)).join(``):z(r.join(` `));return`<li${ki(t,`list-item`,n[`list-item`])}>${i}</li>`}).join(``),i=e.ordered&&e.start>1?` start="${e.start}"`:``,a=e.ordered?`ol`:`ul`;return`<${a}${i}>${r}</${a}>`}function ki(e,t,n){return` ${Ai(e,t,n)}`}function Ai(e,t,n){return`data-plan-part="${e}/${t}:${n}" data-plan-kind="${t}"`}function ji(e){let t=``,n=!1,r=0;for(let i of e.split(/\s+/)){if(!i)continue;let e=i.toLowerCase();if(e===`diff`||e===`patch`){n=!0;continue}let a=/^start=(\d+)$/i.exec(i);if(a){let e=Number(a[1]);e>=1&&(r=e)}else t||=e}return{language:t,diff:n,start:r}}function Mi(e,t){let n=/^( {0,3})(`{3,}|~{3,})(.*)$/.exec(e[t]??``);if(!n)return null;let r=n[2]??``,i=(n[3]??``).trim();if(r.startsWith("`")&&i.includes("`"))return null;let a=[],o=t+1;for(;o<e.length;){let t=/^( {0,3})(`{3,}|~{3,})\s*$/.exec(e[o]??``),n=t?.[2]??``;if(t&&n[0]===r[0]&&n.length>=r.length)return{info:i,content:a.join(`
25
+ `),next:o+1};a.push(e[o]??``),o+=1}return{info:i,content:a.join(`
26
+ `),next:e.length}}function Ni(e,t){let n=e[t]??``,r=e[t+1]??``;if(!n.includes(`|`))return null;let i=Ii(n),a=Fi(r);if(!a||i.length===0||i.length!==a.length)return null;let o=[],s=t+2;for(;s<e.length&&!Pi(e[s]??``);){let t=Ii(e[s]??``).slice(0,i.length);for(;t.length<i.length;)t.push(``);o.push(t),s+=1}return{block:{type:`table`,aligns:a,header:i,rows:o},next:s}}function Pi(e){let t=e.trim();return!!(!t||/^#{1,6}(\s|$)/.test(t)||/^(`{3,}|~{3,})/.test(t)||/^(?:[-*+]|\d+[.)])\s/.test(t)||t.startsWith(`>`)||/^(?:-{3,}|\*{3,}|_{3,})$/.test(t)||t.startsWith(`{%`)||/^<\/?[A-Za-z]/.test(t))}function Fi(e){let t=Ii(e);if(t.length===0)return null;let n=[];for(let e of t){let t=e.trim(),r=/^(:)?-+(:)?$/.exec(t);if(!r)return null;let i=r[1]===`:`,a=r[2]===`:`;n.push(i&&a?`center`:a?`right`:`left`)}return n}function Ii(e){let t=[],n=``,r=0;for(;r<e.length;)if(e[r]===`\\`&&e[r+1]===`|`)n+=`\\|`,r+=2;else{if(e[r]==="`"){let t=Gi(e,r);if(t>r){n+=e.slice(r,t),r=t;continue}}e[r]===`|`?(t.push(n),n=``,r+=1):(n+=e[r],r+=1)}return t.push(n),t.length>0&&(t[0]??``).trim()===``&&t.shift(),t.length>0&&(t[t.length-1]??``).trim()===``&&t.pop(),t}function Li(e){return e.replace(/\\\|/g,`|`)}function Ri(e,t){let n=[],r=t;for(;r<e.length;){let t=e[r]??``;if(t.trim()===``||Hi(t,e[r+1]))break;n.push(t.trim()),r+=1}return{text:n.join(` `),next:r}}function zi(e,t){let n=[],r=t;for(;r<e.length&&/^ {0,3}>\s?/.test(e[r]??``);)n.push((e[r]??``).replace(/^ {0,3}>\s?/,``).trim()),r+=1;return{text:n.join(` `),next:r}}function Bi(e,t){let n=Vi(e[t]??``),r=n?.ordered??!1,i=n?.start??1,a=[],o=!1,s=!1,c=t;for(;c<e.length;){let t=e[c]??``,n=Vi(t);if(n&&n.ordered===r){a.push([n.text]),s=!1,c+=1;continue}if(t.trim()===``){let t=e[c+1]??``,n=Vi(t);if(n&&n.ordered===r||/^ {2,}\S/.test(t)&&a.length>0){o=!0,s=!0,c+=1;continue}break}let i=a[a.length-1];if(i&&/^\s+\S/.test(t)&&!Hi(t.trim(),e[c+1])){let e=t.trim();s?i.push(e):i[i.length-1]=`${i[i.length-1]} ${e}`,s=!1,c+=1}else break}return{block:{type:`list`,ordered:r,start:i,loose:o,items:a},next:c}}function Vi(e){let t=/^( {0,3})([-*+]|\d{1,9}[.)])\s+(.*)$/.exec(e);if(!t)return null;let n=t[2]??`-`,r=/\d/.test(n);return{ordered:r,start:r?Number.parseInt(n,10):1,text:t[3]??``}}function Hi(e,t){if(/^ {0,3}#{1,6}(\s|$)/.test(e)||/^ {0,3}(`{3,}|~{3,})/.test(e)||/^ {0,3}>/.test(e)||Vi(e)||/^ {0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/.test(e))return!0;if(t&&e.includes(`|`)){let n=Ii(e),r=Fi(t);if(r&&n.length>0&&n.length===r.length)return!0}return!1}function z(e){let t=``,n=0;for(;n<e.length;){if(e[n]==="`"){let r=Gi(e,n);if(r>n){let i=/^`+/.exec(e.slice(n))?.[0].length??1,a=e.slice(n+i,r-i);t+=`<code>${Ki(Li(a))}</code>`,n=r;continue}}if(e[n]===`[`){let r=/^\[([^\]]+)\]\(([^)\s]+)\)/.exec(e.slice(n));if(r){t+=`<a href="${qi(r[2]??``)}">${z(r[1]??``)}</a>`,n+=r[0].length;continue}}if(e.startsWith(`**`,n)||e.startsWith(`__`,n)){let r=e.slice(n,n+2),i=e.indexOf(r,n+2);if(i>n+2){t+=`<strong>${z(e.slice(n+2,i))}</strong>`,n=i+2;continue}}if((e[n]===`*`||e[n]===`_`)&&Ui(e,n)){let r=e[n]??`*`,i=Wi(e,n+1,r);if(i>n+1){t+=`<em>${z(e.slice(n+1,i))}</em>`,n=i+1;continue}}t+=Ki(e[n]??``),n+=1}return t}function Ui(e,t){let n=e[t],r=t>0?e[t-1]:``;return!(n===`_`&&r&&/[\p{L}\p{N}_]/u.test(r)||e[t+1]===void 0||e[t+1]===` `)}function Wi(e,t,n){for(let r=t;r<e.length;r+=1)if(e[r]===n&&e[r+1]!==n&&e[r-1]!==` `&&!(n===`_`&&e[r+1]&&/[\p{L}\p{N}_]/u.test(e[r+1]??``)))return r;return-1}function Gi(e,t){let n=0;for(;e[t+n]==="`";)n+=1;if(n===0)return t;let r="`".repeat(n),i=t+n;for(;i<e.length;){let a=e.indexOf(r,i);if(a<0)return t;let o=a>0&&e[a-1]==="`",s=e[a+n]==="`";if(!o&&!s)return a+n;i=a+1}return t}function Ki(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function qi(e){return Ki(e).replace(/"/g,`&quot;`)}var Ji=[`pending`,`active`,`blocked`,`done`,`failed`];function Yi(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,48)}function Xi(e){let t=String(e??`pending`);return Ji.includes(t)?t:`pending`}function Zi(e){let t=String(e??`note`);return t===`tip`||t===`risk`||t===`decision`||t===`warning`?t:`note`}var Qi=new Set([`phase`,`callout`,`choice`,`option`,`form`,`field`,`questions`,`item`,`approve`,`checklist`,`workflow`]),$i=new Set([`Box`,`HStack`,`VStack`,`Stack`,`Row`,`ResponsiveStack`,`box`,`hstack`,`vstack`,`stack`,`row`]),ea=new Set(`Mermaid.BarChart.LineChart.DataTable.Column.Row.Cell.Chip.chip.Pill.pill.Checkbox.FileTree.File.Endpoint.Param.Request.Response.DataModel.Entity.Attr.Relation.JsonView.AnnotatedCode.Note.Tabs.Tab.Compare.Pane.Update.Properties.Prop.Path`.split(`.`)),ta=new Set([...Qi,...$i,...ea]),na=new Set([`choice`,`approve`,`form`,`questions`]),ra="Plan entries are MDX components such as <phase> and <choice>. {% tags %} and ```phase fences are not plan entries. A workflow graph is a structured body inside <workflow>.";function ia(e){if(/\{%\s*(?:phase|choice|approve|form|questions|checklist|callout|workflow|option|item|field|status)\b/.test(e)||/^```(?:phase|choice|approve|form|questions|checklist|callout)\b/m.test(e)||oa(e))return ra}function aa(e){let t=ca(sa(e)),n=[],r=[];for(let e of t){let t=n.length;if(e.kind===`md`){let r=e.text.trim();n.push({type:`markdown`,html:xa(r,`markdown:${t}`),source:r});continue}let i=la(e.node,t);n.push(i.block),r.push(...i.entries)}return{blocks:n,entries:r,interactionIds:r.flatMap(e=>e.id&&na.has(e.type)?[e.id]:[])}}function oa(e){let t=0,n=0;for(;n<e.length;){let r=e.slice(n),i=/^```workflow\b/m.exec(r),a=/<workflow\b[^>]*>/.exec(r),o=/<\/workflow\s*>/.exec(r),s=i?n+i.index:1/0,c=a?n+a.index:1/0,l=o?n+o.index:1/0,u=Math.min(s,c,l);if(!Number.isFinite(u))return!1;if(u===s){if(t===0)return!0;n=s+(i?.[0].length??0)}else u===c?(t+=1,n=c+(a?.[0].length??0)):(t=Math.max(0,t-1),n=l+(o?.[0].length??0))}return!1}function sa(e){let t=[],n=``,r=0,i=()=>{n&&=(t.push(n),``)};for(;r<e.length;)if(e.startsWith("```",r)){let t=e.indexOf("```",r+3),i=t<0?e.length:t+3;n+=e.slice(r,i),r=i}else{if(e[r]===`<`){let a=Ca(e,r);if(a&&ta.has(a.name)){if(i(),a.selfClosing){t.push({name:a.name,kind:Sa(a.name),attrs:a.attrs,children:[],source:e.slice(r,a.end)}),r=a.end;continue}let o=wa(e,a.end,a.name);if(!o){n+=e[r],r+=1;continue}t.push({name:a.name,kind:Sa(a.name),attrs:a.attrs,children:sa(e.slice(a.end,o.start)),source:e.slice(r,o.end)}),r=o.end;continue}}n+=e[r],r+=1}return i(),t}function ca(e){let t=[],n=``,r=()=>{n.trim()&&t.push({kind:`md`,text:n}),n=``};for(let i of e)typeof i==`string`?n+=i:i.kind===`entry`?(r(),t.push({kind:`entry`,node:i})):(r(),t.push(...ca(i.children)));return r(),t}function la(e,t){let n=[];return ua(e,n,t),{block:da(e,t),entries:n}}function ua(e,t,n){if(e.kind!==`entry`||e.name===`option`||e.name===`field`||e.name===`item`)for(let r of e.children)typeof r!=`string`&&ua(r,t,n);else{t.push(fa(e,n));for(let r of e.children)typeof r!=`string`&&ua(r,t,n)}}function da(e,t){let n=e.name;if(n===`phase`){let t=B(e.attrs.title)||`Untitled phase`,n=B(e.attrs.id)||Yi(t)||`phase`;return{type:`phase`,id:n,title:t,status:Xi(e.attrs.status),bodyHtml:xa(ya(e.children),`phase:${n}`),source:e.source}}if(n===`callout`){let n=B(e.attrs.title)||void 0,r=B(e.attrs.id)||void 0;return{type:`callout`,id:r,kind:Zi(e.attrs.kind),title:n,bodyHtml:xa(ya(e.children),`callout:${r??t}`),source:e.source}}if(n===`choice`){let t=B(e.attrs.prompt)||`Choose one`;return{type:`choice`,id:B(e.attrs.id)||Yi(t)||`choice`,prompt:t,options:pa(e),source:e.source}}if(n===`approve`){let t=B(e.attrs.prompt)||`Approve this step?`,n=B(e.attrs.id)||Yi(t)||`approve`;return{type:`approve`,id:n,prompt:t,bodyHtml:xa(ya(e.children),`approve:${n}`),source:e.source}}if(n===`form`){let t=B(e.attrs.prompt)||`Provide details`;return{type:`form`,id:B(e.attrs.id)||Yi(t)||`form`,prompt:t,fields:ma(e),source:e.source}}if(n===`questions`){let t=B(e.attrs.prompt)||void 0;return{type:`questions`,id:B(e.attrs.id)||Yi(t??`questions`)||`questions`,prompt:t,items:ha(e),source:e.source}}if(n===`checklist`){let t=B(e.attrs.title)||void 0;return{type:`checklist`,id:B(e.attrs.id)||void 0,title:t,items:ga(e),source:e.source}}let r=B(e.attrs.title)||void 0,i=B(e.attrs.id)||Yi(r??`workflow`)||`workflow`,a=_a(e);return{type:`workflow`,id:i,title:r,nodes:a.nodes,edges:a.edges,source:e.source}}function fa(e,t){let n=da(e,t);return n.type===`markdown`?{type:`markdown`}:n.type===`phase`?{type:`phase`,id:n.id,title:n.title,status:n.status,anchor:n.id}:n.type===`callout`?{type:`callout`,id:n.id,title:n.title,kind:n.kind,anchor:n.id}:n.type===`choice`?{type:`choice`,id:n.id,prompt:n.prompt,anchor:n.id}:n.type===`approve`?{type:`approve`,id:n.id,prompt:n.prompt,anchor:n.id}:n.type===`form`?{type:`form`,id:n.id,prompt:n.prompt,anchor:n.id}:n.type===`questions`?{type:`questions`,id:n.id,prompt:n.prompt,anchor:n.id}:n.type===`checklist`?{type:`checklist`,id:n.id,title:n.title,anchor:n.id}:{type:`workflow`,id:n.id,title:n.title,nodes:n.nodes,edges:n.edges,anchor:n.id}}function pa(e){let t=[];return va(e.children,e=>{if(e.name!==`option`)return;let n=B(e.attrs.id),r=B(e.attrs.label);if(!n||!r)return;let i=ba(e.children).trim();t.push({id:n,label:r,...i?{description:i}:{}})}),t}function ma(e){let t=[];return va(e.children,e=>{if(e.name!==`field`)return;let n=B(e.attrs.name),r=B(e.attrs.label);if(!n||!r)return;let i=Da(B(e.attrs.type)),a=e.attrs.required===!0||e.attrs.required===`true`||e.attrs.required===``,o=e.attrs.default;if((i===`number`||i===`stepper`)&&(typeof o==`string`||typeof o==`number`)){let e=typeof o==`number`?o:Number(o);o!==``&&Number.isFinite(e)&&(o=e)}let s=typeof e.attrs.options==`string`?e.attrs.options.split(`,`).map(e=>e.trim()).filter(Boolean):void 0,c=B(e.attrs.placeholder),l=Oa(e.attrs.min),u=Oa(e.attrs.max),d=Oa(e.attrs.step);t.push({name:n,label:r,type:i,...a?{required:!0}:{},...o!==void 0&&o!==``?{default:o}:{},...s&&s.length>0?{options:s}:{},...c?{placeholder:c}:{},...l===void 0?{}:{min:l},...u===void 0?{}:{max:u},...d===void 0?{}:{step:d}})}),t}function ha(e){let t=[];return va(e.children,e=>{if(e.name!==`item`)return;let n=ba(e.children).trim();n&&t.push(n)}),t}function ga(e){let t=[];return va(e.children,e=>{if(e.name!==`item`)return;let n=ba(e.children).trim();if(!n)return;let r=B(e.attrs.status).toLowerCase(),i=r?r===`done`:e.attrs.done===!0||e.attrs.done===`true`;t.push({text:n,done:i,...r?{status:r}:{}})}),t}function _a(e){return ae(ba(e.children))}function va(e,t){for(let n of e)typeof n!=`string`&&(t(n),(n.kind!==`entry`||n.name===`option`||n.name===`field`||n.name===`item`)&&va(n.children,t))}function ya(e){let t=``;for(let n of e)typeof n==`string`?t+=n:n.kind!==`entry`&&(t+=ya(n.children));return t.trim()}function ba(e){return e.map(e=>typeof e==`string`?e:ba(e.children)).join(``)}function xa(e,t){let n=e.trim();return n?Si(n,t):``}function Sa(e){return Qi.has(e)?`entry`:$i.has(e)?`layout`:`embed`}function Ca(e,t){let n=/^<([A-Za-z][\w]*)\b([^>]*)>/.exec(e.slice(t));if(!n)return null;let r=n[1]??``,i=n[2]??``,a=/\/\s*$/.test(i);return a&&(i=i.replace(/\/\s*$/,``)),{name:r,attrs:Ta(i),end:t+n[0].length,selfClosing:a}}function wa(e,t,n){let r=1,i=t,a=RegExp(`<${n}\\b[^>]*>`,`g`),o=RegExp(`</${n}\\s*>`,`g`);for(;i<e.length;){let t=e.indexOf("```",i);a.lastIndex=i,o.lastIndex=i;let n=a.exec(e),s=o.exec(e);if(!s)return null;let c=n?.index??1/0,l=s.index;if(t>=i&&t<c&&t<l){let n=e.indexOf("```",t+3);i=n<0?e.length:n+3}else if(n&&c<l)n[0].endsWith(`/>`)||(r+=1),i=c+n[0].length;else{if(--r,r===0)return{start:l,end:l+s[0].length};i=l+s[0].length}}return null}function Ta(e){let t={};for(let n of e.matchAll(/([A-Za-z_][\w:-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|\{([^}]*)\}|([^\s"'=/>]+)))?/g)){let e=n[1];e&&(t[e]=n[2]===void 0?n[3]===void 0?n[4]===void 0?n[5]===void 0||n[5]:Ea(n[4].trim()):n[3]:n[2])}return t}function Ea(e){if(e===`true`)return!0;if(e===`false`)return!1;if(/^-?\d+(?:\.\d+)?$/.test(e))return Number(e);let t=/^["']([\s\S]*)["']$/.exec(e);return t?t[1]??``:e}function Da(e){return e===`number`||e===`textarea`||e===`select`||e===`checkbox`||e===`stepper`||e===`text`?e:`text`}function Oa(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return t}}function B(e){return typeof e==`string`?e.trim():typeof e==`number`&&Number.isFinite(e)?String(e):``}var ka=[`pending`,`active`,`done`,`blocked`,`failed`];function Aa(){return/<h([1-3])\b([^>]*)>([\s\S]*?)<\/h\1>/gi}function ja(e){return Na(aa(Va(e)).blocks)}function Ma(e){return e.map(e=>{let t=e.tracksProgress?` data-toc-step`:``;return`<li><a href="${Ua(e.href)}" data-toc="${e.kind}" data-toc-target="${Ua(e.target)}" data-toc-icon="${e.icon}"${t} data-depth="${e.depth}"><span class="plan-toc-icon" aria-hidden="true">${za(e)}</span><span class="plan-toc-label">${Ha(e.label)}</span></a></li>`}).join(``)}function Na(e){let t=new Set,n=new Map;for(let r of e)if(`id`in r&&r.id){t.add(`plan-${r.id}`);let e=V(r);e&&n.set(r.id,e)}let r=[],i=[];for(let a of e)if(a.type===`markdown`)r.push(...Fa(a.html,t));else if(a.type===`phase`)r.push(H(a.title,a.id,0,V(a))),r.push(...Fa(a.bodyHtml,t));else if(a.type===`callout`)a.id&&r.push(H(a.title||a.kind,a.id,0,V(a))),r.push(...Fa(a.bodyHtml,t));else if(a.type===`choice`)r.push(H(a.prompt,a.id,0,V(a)));else if(a.type===`form`)r.push(H(a.prompt,a.id,0,V(a)));else if(a.type===`questions`)r.push(H(a.prompt||`Questions`,a.id,0,V(a)));else if(a.type===`approve`)r.push(H(a.prompt,a.id,0,V(a))),r.push(...Fa(a.bodyHtml,t));else if(a.type===`checklist`)a.id&&r.push(H(a.title||`Checklist`,a.id,0,V(a)));else for(let e of a.nodes){let t=e.ref||e.id,r=(e.label||e.id).trim();if(!t||!r)continue;let a=Pa(e,n.get(t));i.push({label:r,depth:1,kind:`workflow-step`,target:t,href:l(t),icon:a.icon,tracksProgress:a.tracksProgress})}return r.push({label:`Workflow`,depth:0,kind:`workflow`,target:`workflow`,href:`#workflow`,icon:`workflow`}),r.push(...i),r}function V(e){switch(e.type){case`phase`:return{icon:`phase-${e.status}`,tracksProgress:!0};case`callout`:return{icon:`callout-${e.kind}`};case`choice`:return{icon:`choice`};case`form`:return{icon:`form`};case`questions`:return{icon:`questions`};case`approve`:return{icon:`approve`};case`checklist`:return{icon:`checklist`};case`workflow`:return{icon:`workflow`};case`markdown`:return{icon:`heading`}}}function Pa(e,t){if(t?.tracksProgress){let n=e.status?Xi(e.status):void 0;return{icon:n?`phase-${n}`:t.icon,tracksProgress:!0}}return t||{icon:`phase-${Xi(e.status)}`,tracksProgress:!0}}function H(e,t,n,r){return{label:e.trim()||`Section`,depth:n,kind:`section`,target:t,href:u(t),icon:r.icon,tracksProgress:r.tracksProgress}}function Fa(e,t){let n=[];for(let r of e.matchAll(Aa())){let e=r[2]??``;if(!/\bdata-plan-kind="heading"/.test(e))continue;let i=Number(r[1]),a=Ba(r[3]??``);if(!a)continue;let o=Ia(a,t);n.push({label:a,depth:Math.max(0,Math.min(2,i-1)),kind:`section`,target:o,href:`#${encodeURIComponent(o)}`,headingId:o,icon:`heading`})}return n}function Ia(e,t){let n=e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,48)||`section`,r=`plan-${n}`,i=2;for(;t.has(r);)r=`plan-${n}-${i}`,i+=1;return t.add(r),r}var La=`<path d="m8 12.5 2.5 2.5 5.5-6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>`;function U(e){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`}var Ra={"phase-pending":U(`<circle cx="12" cy="12" r="8"/>`),"phase-active":U(`<circle cx="12" cy="12" r="8" opacity="0.28"/><circle cx="12" cy="12" r="8" pathLength="100" stroke-dasharray="32 68" transform="rotate(-90 12 12)"/>`),"phase-done":U(`<circle cx="12" cy="12" r="8" fill="currentColor" stroke="none"/>${La}`),"phase-blocked":U(`<circle cx="12" cy="12" r="8"/><path d="M10 9v6"/><path d="M14 9v6"/>`),"phase-failed":U(`<circle cx="12" cy="12" r="8"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>`),"callout-risk":U(`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>`),"callout-warning":U(`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>`),"callout-decision":U(`<rect width="16" height="16" x="4" y="4" rx="3"/>`),"callout-note":U(`<circle cx="12" cy="12" r="8"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),"callout-tip":U(`<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/>`),choice:U(`<circle cx="12" cy="12" r="8"/><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"/>`),form:U(`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>`),questions:U(`<circle cx="12" cy="12" r="8"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),approve:U(`<rect width="16" height="16" x="4" y="4" rx="4" fill="currentColor" stroke="none"/>${La}`),checklist:U(`<path d="M8 6h13"/><path d="M8 12h13"/><path d="M8 18h13"/><path d="M3 6h.01"/><path d="M3 12h.01"/><path d="M3 18h.01"/>`),workflow:U(`<rect width="8" height="8" x="3" y="3" rx="2"/><path d="M7 11v4a2 2 0 0 0 2 2h4"/><rect width="8" height="8" x="13" y="13" rx="2"/>`)};function za(e){return e.icon===`heading`?``:e.tracksProgress?ka.map(e=>{let t=`phase-${e}`;return`<span data-icon="${t}">${Ra[t]}</span>`}).join(``):Ra[e.icon]}function Ba(e){return e.replace(/<[^>]+>/g,``).replace(/&quot;/g,`"`).replace(/&#39;/g,`'`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&amp;/g,`&`).replace(/\s+/g,` `).trim()}function Va(e){let t=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/.exec(e);return t?e.slice(t[0].length):e}function Ha(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function Ua(e){return Ha(e).replace(/"/g,`&quot;`)}function Wa(e){let t=Ga(e),n=ia(t);if(n)throw Error(n);return`${t.trim()}\n`}function Ga(e){let t=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/.exec(e);return t?e.slice(t[0].length):e}var Ka=new Set([`phase`,`choice`,`approve`,`form`,`questions`,`checklist`,`callout`,`workflow`,`option`,`item`,`field`]);function qa(){return e=>{Ja(e)}}function Ja(e){if(e&&typeof e==`object`){if(e.type===`CallExpression`&&(e.callee?.name===`_jsx`||e.callee?.name===`_jsxs`||e.callee?.name===`_jsxDEV`)&&e.arguments?.[0]?.type===`Literal`&&typeof e.arguments[0].value==`string`&&Ka.has(e.arguments[0].value)){let t=e.arguments[0].value;e.arguments[0]={type:`MemberExpression`,object:{type:`Identifier`,name:`_components`},property:{type:`Identifier`,name:t},computed:!1,optional:!1}}for(let t of Object.values(e))if(Array.isArray(t))for(let e of t)e&&typeof e==`object`&&`type`in e&&Ja(e);else t&&typeof t==`object`&&`type`in t&&Ja(t)}}function Ya(e){return e.length}function Xa(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ya,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Za(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Qa(r[d]);else{let e=Qa(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
27
+ `)}function Za(e){return e==null?``:String(e)}function Qa(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var $a=ur([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function eo(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),to);return i(),o}function to(e,t,n){return`>`+(n?``:` `)+e}function no(e,t){return ro(e,t.inConstruct,!0)&&!ro(e,t.notInConstruct,!1)}function ro(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function io(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
28
+ `&&!e.before&&!e.after&&no(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
29
+ `}function ao(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function oo(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function so(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function co(e,t,n,r){let i=so(n),a=e.value||``;if(oo(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,lo);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(ao(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
30
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
31
+ `),a&&(u+=o.move(a+`
32
+ `)),u+=o.move(s),c(),u}function lo(e,t,n){return(n?``:` `)+e}function uo(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fo(e,t,n,r){let i=uo(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
33
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function po(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function mo(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function ho(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function go(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function _o(e,t,n){let r=v(e),i=v(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function vo(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:w(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!w(a))return;for(;a===45||x(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&T.includes(o)?1:g.includes(o)?6:7}var yo=new Map([[`*`,!1],[`_`,!0]]);function bo(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function xo(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=yo.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=v(u.charCodeAt(u.length-1)),f=v((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(To(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:bo(e,t,a),index:o}}}function So(e,t,n){return Ao(Do(e,t,n),n.before,n.after)}function Co(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?mo(n.value):ho(n.value),i=go(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function wo(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=ko(e,c,r,i),u=xo(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function To(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function Eo(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!b(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function Do(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?mo(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
34
+ `)&&l.type===`html`&&vo(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(Ao(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=Oo(l,f.attention,t,c);a.push(e),s=ho(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=ho(n)}}return r.pop(),a}function Oo(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=Eo(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=Do(e,n,{...r.current(),before:c,after:c});return r.move(Ao(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function ko(e,t,n,r){let i=[],a,o=ho(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===mo(n)&&Co([e],!0),a=void 0,i.push(e),e.value&&(o=ho(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=mo(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=ko(n.children,t,c,c),m=p.length>0?p[0].value:``,h=_o(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&Co(p,!0);let g=p.length>0?ho(p[p.length-1].value):``,_=_o(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&Co(p,!1),h.outside&&d!==`
35
+ `&&d!==`\r`&&Co(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function Ao(e,t,n){let r=new Map,i=ko(e,r,t,n),a=i,o=xo(a,t,n);for(;o;){let s=wo(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}jo.attention=Mo,jo.peek=No;function jo(e,t,n,r){let i=n.enter(`phrasing`),a=Ao([Oo(e,Mo,n,n.createTracker(r))],r.before,r.after);return i(),a}function Mo(e,t){return{construct:`emphasis`,markers:po(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function No(e,t,n){return n.options.emphasis||`*`}function Po(e,t){let n=!1;return xr(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ee(e)&&(t.options.setext||n))}function Fo(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Po(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
36
+ `,after:`
37
+ `});return r(),t(),o+`
38
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
39
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
40
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=go(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Io.peek=Lo;function Io(e){return e.value||``}function Lo(){return`<`}Ro.peek=zo;function Ro(e,t,n,r){let i=uo(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function zo(){return`!`}Bo.peek=Vo;function Bo(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Vo(){return`!`}Ho.peek=Uo;function Ho(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Uo(){return"`"}function Wo(e,t){let n=ee(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Go.peek=Ko;function Go(e,t,n,r){let i=uo(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Wo(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
41
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ko(e,t,n){return Wo(e,n)?`<`:`[`}qo.peek=Jo;function qo(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Jo(){return`[`}function Yo(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Xo(e){let t=Yo(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Zo(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Qo(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function $o(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Zo(n):Yo(n),s=e.ordered?o===`.`?`)`:`.`:Xo(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Qo(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function es(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ts(e,t,n,r){let i=es(n),a=n.bulletCurrent||Yo(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function ns(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function rs(e,t,n,r){if(!e.children.some(function(e){return $a(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function is(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}as.attention=os,as.peek=ss;function as(e,t,n,r){let i=n.enter(`phrasing`),a=Ao([Oo(e,os,n,n.createTracker(r))],r.before,r.after);return i(),a}function os(e,t){return{construct:`strong`,markers:is(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function ss(e,t,n){return n.options.strong||`*`}function cs(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function ls(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function us(e,t,n){let r=(Qo(n)+(n.options.ruleSpaces?` `:``)).repeat(ls(n));return n.options.ruleSpaces?r.slice(0,-1):r}var ds={blockquote:eo,break:io,code:co,definition:fo,emphasis:jo,hardBreak:io,heading:Fo,html:Io,image:Ro,imageReference:Bo,inlineCode:Ho,link:Go,linkReference:qo,list:$o,listItem:ts,paragraph:ns,root:rs,strong:as,text:cs,thematicBreak:us};function fs(){return{enter:{table:ps,tableData:_s,tableHeader:_s,tableRow:hs},exit:{codeText:vs,table:ms,tableData:gs,tableHeader:gs,tableRow:gs}}}function ps(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function ms(e){this.exit(e),this.data.inTable=void 0}function hs(e){this.enter({type:`tableRow`,children:[]},e)}function gs(e){this.exit(e)}function _s(e){this.enter({type:`tableCell`,children:[]},e)}function vs(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ys));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ys(e,t){return t===`|`?t:e}function bs(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
42
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
43
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xa(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ds.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}var xs=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Ss(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ss(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Cs(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ws(){return{flow:{null:{name:`table`,tokenize:Ts,resolveAll:Es}}}}function Ts(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?C:c;return a===C&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):h(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):D(t)?E(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||ne(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,D(t)?E(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?_(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),g):S(t)}function g(t){return D(t)?E(e,_,`whitespace`)(t):_(t)}function _(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),v):t===45?(a+=1,v(t)):t===null||h(t)?x(t):S(t)}function v(t){return t===45?(e.enter(`tableDelimiterFiller`),y(t)):S(t)}function y(t){return t===45?(e.consume(t),y):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),b):(e.exit(`tableDelimiterFiller`),b(t))}function b(t){return D(t)?E(e,x,`whitespace`)(t):x(t)}function x(n){return n===124?m(n):n===null||h(n)?!o||i!==a?S(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):S(n)}function S(e){return n(e)}function C(t){return e.enter(`tableRow`),w(t)}function w(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),w):n===null||h(n)?(e.exit(`tableRow`),t(n)):D(n)?E(e,w,`whitespace`)(n):(e.enter(`data`),T(n))}function T(t){return t===null||t===124||ne(t)?(e.exit(`data`),w(t)):(e.consume(t),t===92?ee:T)}function ee(t){return t===92||t===124?(e.consume(t),T):T(t)}}function Es(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new xs;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Os(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ds(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ds(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ds(f,t,o,i,n,d)):(o[0]=o[1],d=Ds(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Os(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Cs(t.events,n))}return e}function Ds(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ks(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ks(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ks(t.events,n[2]),a=ks(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ks(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Os(e,t,n,r,i){let a=[],o=ks(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ks(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}function As(){let e=this.data(),t=e.micromarkExtensions??=[],n=e.fromMarkdownExtensions??=[],r=e.toMarkdownExtensions??=[];t.push(ws()),n.push(fs()),r.push(bs())}function js(){return{exit:{taskListCheckValueChecked:Ns,taskListCheckValueUnchecked:Ns,paragraph:Ps}}}function Ms(){return{handlers:{paragraph:Fs},join:[Is]}}function Ns(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Ps(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function Fs(e,t,n,r){if(!t||t.type!==`listItem`||Ls(t)!==e)return ds.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+ds.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function Is(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=Ls(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function Ls(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}var Rs={name:`tasklistCheck`,tokenize:Bs};function zs(){return{text:{91:Rs}}}function Bs(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return ne(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return h(r)?t(r):D(r)?e.check({tokenize:Vs},t,n)(r):n(r)}}function Vs(e,t,n){return E(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Hs(){let e=this.data(),t=e.micromarkExtensions??=[],n=e.fromMarkdownExtensions??=[],r=e.toMarkdownExtensions??=[];t.push(zs()),n.push(js()),r.push(Ms())}var Us=`data-plan-block`,Ws=`data-plan-cell-range`,Gs=new Set([`paragraph`,`heading`,`list`,`blockquote`,`code`,`table`,`thematicBreak`,`mdxJsxFlowElement`]),Ks=`data-plan-text`,qs=new Set([`phase`]),Js=new Set([`paragraph`,`heading`,`list`,`blockquote`]),Ys=new Set([`callout`,`approve`,`choice`,`questions`,`Update`,`Tabs`,`Tab`,`Compare`,`Pane`,`box`,`Box`,`hstack`,`HStack`,`vstack`,`VStack`,`responsiveStack`,`ResponsiveStack`,`Stack`,`Row`]);function Xs(e){for(let t of e??[]){if(t.type===`mdxJsxFlowElement`){t.name&&Ys.has(t.name)&&Xs(t.children);continue}if(!Js.has(t.type))continue;let e=t.position?.start?.offset,n=t.position?.end?.offset;if(typeof e!=`number`||typeof n!=`number`||n<=e||t.position?.start?.column!==1)continue;let r=t.data??{};t.data={...r,hProperties:{...r.hProperties??{},[Ks]:`${e}-${n}`}}}}function Zs(e,t){for(let n of e.children??[])for(let e of n.children??[]){if(e.type!==`tableCell`)continue;let n=e.children?.[0]?.position?.start?.offset,r=e.children?.[e.children.length-1]?.position?.end?.offset,i,a;if(typeof n==`number`&&typeof r==`number`&&r>=n)i=n,a=r;else{let n=e.position?.start?.offset;if(typeof n!=`number`)continue;t[n]===`|`&&(n+=1),t[n]===` `&&(n+=1),i=n,a=n}let o=e.data??{};e.data={...o,hProperties:{...o.hProperties??{},[Ws]:`${i}-${a}`}}}}function Qs(e,t,n){for(let r of e??[]){if(!Gs.has(r.type))continue;let e=r.position?.start?.offset,i=r.position?.end?.offset;if(typeof e!=`number`||typeof i!=`number`||i<=e||t&&r.position?.start?.column!==1)continue;let a=`${e}-${i}`;if(r.type===`mdxJsxFlowElement`){r.attributes=[...r.attributes??[],{type:`mdxJsxAttribute`,name:Us,value:a}],r.name&&qs.has(r.name)?Qs(r.children,!0,n):r.name&&Ys.has(r.name)&&Xs(r.children);continue}r.type===`table`&&Zs(r,n);let o=r.data??{};r.data={...o,hProperties:{...o.hProperties??{},[Us]:a}}}}function $s(){return(e,t)=>Qs(e.children,!1,String(t?.value??``))}function ec(e){if(typeof e!=`string`)return null;let t=/^(\d+)-(\d+)$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return r>n?{start:n,end:r}:null}function W(e){let t=/^---\r?\n[\s\S]*?\r?\n---\r?\n?/.exec(e),n=t?e.slice(t[0].length):e,r=n.length-n.trimStart().length;return e.length-n.length+r}function tc(e){if(typeof e!=`string`)return null;let t=/^(\d+)-(\d+)$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return r>=n?{start:n,end:r}:null}function nc(e,t,n){let r=W(e),i=r+t.start,a=r+t.end,o=e.slice(0,i),s=e.slice(a),c=n.trim();return c?`${o}${c}${s}`:`${o.replace(/\n+$/,`
44
+ `)}${s.replace(/^\n+/,`
45
+ `)}`.replace(/^\n+/,``)}function rc(e,t,n){let r=n.trim();if(!r)return e;if(!t)return`${e.replace(/\s*$/,``)}\n\n${r}\n`;let i=W(e)+t.end;return`${e.slice(0,i)}\n\n${r}${e.slice(i)}`}function ic(e,t,n){let r=e.slice(n),i=/^\s*\n/.exec(r)?.[0]??``,a=r.slice(i.length).trimStart();if(i&&a&&!a.startsWith(`</`))return{source:`${e.slice(0,t)}${r.slice(i.length)}`,start:t,end:n+i.length};let o=e.slice(0,t),s=t-(/\s*$/.exec(o)?.[0]??``).length;return{source:`${e.slice(0,s)}${r}`,start:s,end:n}}function ac(e,t,n,r){let i=W(e),a=i+t.start,o=i+t.end,s=i+(r===`before`?n.start:n.end);if(s>a&&s<o)return null;let c=e.slice(a,o),l=r===`before`?`${c}\n\n`:`\n\n${c}`,u=r===`before`?0:2,d,f;if(s>=o){let t=ic(`${e.slice(0,s)}${l}${e.slice(s)}`,a,o);d=t.source,f=s+u-(t.end-t.start)}else{let t=ic(e,a,o);d=`${t.source.slice(0,s)}${l}${t.source.slice(s)}`,f=s+u}let p=W(d);return{source:d,range:{start:f-p,end:f-p+c.length}}}function oc(e,t,n){if(e===t)return n;let r=W(e)+n,i=Math.min(e.length,t.length),a=0;for(;a<i&&e[a]===t[a];)a+=1;let o=0;for(;o<i-a&&e[e.length-1-o]===t[t.length-1-o];)o+=1;return r>=e.length-o?r+t.length-e.length-W(t):r<=a?r-W(t):null}function sc(e,t){let n=W(e);return e.slice(n+t.start,n+t.end)}function G(e){return{type:`Identifier`,name:e}}function K(e){return{type:`Literal`,value:e}}function q(e,t,n){return{type:`CallExpression`,optional:!1,callee:{type:`MemberExpression`,computed:!1,optional:!1,object:e,property:G(t)},arguments:n}}function cc(e){return e<0||Object.is(e,-0)?{type:`UnaryExpression`,operator:`-`,prefix:!0,argument:cc(-e)}:typeof e==`bigint`?{type:`Literal`,bigint:String(e)}:e===1/0||Number.isNaN(e)?G(String(e)):K(e)}function lc(e){return{type:`ArrayExpression`,elements:Array.from(e,cc)}}function uc(e){return e instanceof URL||e instanceof URLSearchParams}function dc(e){return e instanceof Boolean||e instanceof Date||e instanceof Number||e instanceof String}var fc=new Map;for(let e of Reflect.ownKeys(Symbol)){let t=Symbol[e];typeof t==`symbol`&&fc.set(t,e)}function pc(e){return typeof Temporal<`u`&&(e instanceof Temporal.Duration||e instanceof Temporal.Instant||e instanceof Temporal.PlainDate||e instanceof Temporal.PlainDateTime||e instanceof Temporal.PlainYearMonth||e instanceof Temporal.PlainMonthDay||e instanceof Temporal.PlainTime||e instanceof Temporal.ZonedDateTime)}function mc(e){return e instanceof BigInt64Array||e instanceof BigUint64Array||typeof Float16Array<`u`&&e instanceof Float16Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array}function hc(e,t){let n=e.referencedBy.has(t.value),r=t.referencedBy.has(e.value);return n?r?e.count-t.count:-1:r?1:e.count-t.count}function gc(e,t){if(!t||t.type!==`AssignmentExpression`)return e;let n=t;for(;n.right.type===`AssignmentExpression`;)n=n.right;return n.right=e,t}function _c(e){let t=fc.get(e);if(t)return{type:`MemberExpression`,computed:!1,optional:!1,object:G(`Symbol`),property:G(t)};if(e.description&&e===Symbol.for(e.description))return q(G(`Symbol`),`for`,[K(e.description)]);throw TypeError(`Only global symbols are supported, got: ${String(e)}`,{cause:e})}function J(e,t){let n=typeof e==`string`;return{type:`Property`,method:!1,shorthand:!1,computed:e===`__proto__`||!n,kind:`init`,key:n?K(e):_c(e),value:t}}function vc(e,t={}){let n=[],r=new Map,i=[],a=new Map;function o(i){if(typeof i!=`object`&&typeof i!=`function`||i==null)return;let s=r.get(i);if(s){t.preserveReferences&&(s.count+=1);for(let e of n)s.referencedBy.add(e);if(n.includes(i)){if(!t.preserveReferences)throw Error(`Found circular reference: ${i}`,{cause:i});let e=n.at(-1),a=r.get(e);a.recursive=!0,s.recursive=!0}return}r.set(i,{count:1,recursive:!1,referencedBy:new Set(n),value:i});let c=t?.replacer?.(i);if(c)a.set(i,c);else{if(typeof i==`function`)throw TypeError(`Unsupported value: ${i}`,{cause:i});if(!mc(i)&&!uc(i)&&!dc(i)&&!(e instanceof RegExp)&&!pc(e)){if(n.push(i),i instanceof Map)for(let e of i)o(e[0]),o(e[1]);else if(Array.isArray(i)||i instanceof Set)for(let e of i)o(e);else{let e=Object.getPrototypeOf(i);if(e!=null&&e!==Object.prototype&&!t.instanceAsObject)throw TypeError(`Unsupported value: ${i}`,{cause:i});for(let e of Reflect.ownKeys(i))o(i[e])}n.pop()}}}function s(e,t){if(e===void 0)return G(String(e));if(e==null||typeof e==`string`||typeof e==`boolean`)return K(e);if(typeof e==`bigint`||typeof e==`number`)return cc(e);if(typeof e==`symbol`)return _c(e);let n=r.get(e);if(!t&&n?.name)return G(n.name);let o=a.get(e);if(o)return o;if(dc(e))return{type:`NewExpression`,callee:G(e.constructor.name),arguments:[s(e.valueOf())]};if(e instanceof RegExp)return{type:`Literal`,regex:{pattern:e.source,flags:e.flags}};if(typeof Buffer<`u`&&Buffer.isBuffer(e))return q(G(`Buffer`),`from`,[lc(e)]);if(mc(e))return{type:`NewExpression`,callee:G(e.constructor.name),arguments:[lc(e)]};if(uc(e))return{type:`NewExpression`,callee:G(e.constructor.name),arguments:[K(String(e))]};if(pc(e))return q({type:`MemberExpression`,computed:!1,optional:!1,object:G(`Temporal`),property:G(e.constructor.name)},`from`,[K(String(e))]);if(Array.isArray(e)){let t=Array.from({length:e.length}),a;for(let o=0;o<e.length;o+=1){if(!(o in e)){t[o]=null,a=void 0;continue}let c=e[o],l=r.get(c);n&&l&&i.indexOf(l)>=i.indexOf(n)?(t[o]=null,a||=o,l.assignment={type:`AssignmentExpression`,operator:`=`,left:{type:`MemberExpression`,computed:!0,optional:!1,object:G(n.name),property:K(o)},right:l.assignment||G(l.name)}):(t[o]=s(c),a=void 0)}return a!=null&&t.splice(a),{type:`ArrayExpression`,elements:t}}if(e instanceof Set){let t=[],a;for(let o of e)if(a)a=q(a,`add`,[s(o)]);else{let e=r.get(o);n&&e&&i.indexOf(e)>=i.indexOf(n)?a=q(G(n.name),`add`,[s(o)]):t.push(s(o))}return n&&a&&(n.assignment=gc(a,n.assignment)),{type:`NewExpression`,callee:G(`Set`),arguments:t.length?[{type:`ArrayExpression`,elements:t}]:[]}}if(e instanceof Map){let t=[],a;for(let[o,c]of e)if(a)a=q(a,`set`,[s(o),s(c)]);else{let e=r.get(o),l=r.get(c);n&&(e&&i.indexOf(e)>=i.indexOf(n)||l&&i.indexOf(l)>=i.indexOf(n))?a=q(G(n.name),`set`,[s(o),s(c)]):t.push({type:`ArrayExpression`,elements:[s(o),s(c)]})}return n&&a&&(n.assignment=gc(a,n.assignment)),{type:`NewExpression`,callee:G(`Map`),arguments:t.length?[{type:`ArrayExpression`,elements:t}]:[]}}let c=[];Object.getPrototypeOf(e)??c.push({type:`Property`,method:!1,shorthand:!1,computed:!1,kind:`init`,key:G(`__proto__`),value:K(null)});let l=e,u=[];for(let t of Reflect.ownKeys(e)){let a=l[t],{configurable:o,enumerable:d,writable:f}=Object.getOwnPropertyDescriptor(e,t),p=r.get(a);if(!o||!d||!f){let e=[J(`value`,s(a))];o&&e.push(J(`configurable`,K(!0))),d&&e.push(J(`enumerable`,K(!0))),f&&e.push(J(`writable`,K(!0))),u.push([t,{type:`ObjectExpression`,properties:e}])}else n&&p&&i.indexOf(p)>=i.indexOf(n)?t===`__proto__`?u.push([t,{type:`ObjectExpression`,properties:[J(`value`,s(a)),J(`configurable`,K(!0)),J(`enumerable`,K(!0)),J(`writable`,K(!0))]}]):p.assignment={type:`AssignmentExpression`,operator:`=`,left:{type:`MemberExpression`,computed:!0,optional:!1,object:G(n.name),property:s(t)},right:p.assignment||s(a)}:c.push(J(t,s(a)))}let d={type:`ObjectExpression`,properties:c};if(u.length){let e,t;if(u.length===1){let[[n,r]]=u;e=`defineProperty`,t=[typeof n==`string`?K(n):_c(n),r]}else e=`defineProperties`,t=[{type:`ObjectExpression`,properties:u.map(([e,t])=>J(e,t))}];if(!n)return q(G(`Object`),e,[d,...t]);n.assignment=gc(q(G(`Object`),e,[G(n.name),...t]),n.assignment)}return d}o(e);for(let[e,t]of r)t.recursive||t.count>1?(t.name=`$${i.length}`,i.push(t)):r.delete(e);if(!i.length)return s(e);let c=i.sort(hc).map(e=>({type:`AssignmentPattern`,left:G(e.name),right:s(e.value,!0)})),l=r.get(e),u=[];for(let e of r.values())e!==l&&e.assignment&&u.push(e.assignment);return u.push(l?l.assignment||G(l.name):s(e)),{type:`CallExpression`,optional:!1,arguments:[],callee:{type:`ArrowFunctionExpression`,expression:!1,params:c,body:{type:`SequenceExpression`,expressions:u}}}}function yc(){return e=>{bc(e)}}function bc(e){let t=e.children;if(t)for(let e=0;e<t.length;e+=1){let n=t[e];n&&(n.type===`code`&&n.lang===`mermaid`&&n.value?.trim()?t[e]={...xc(n.value.replace(/\n$/,``)),...n.position?{position:n.position}:{}}:bc(n))}}function xc(e){return{type:`mdxJsxFlowElement`,name:`Mermaid`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(e),data:{estree:{type:`Program`,sourceType:`module`,body:[{type:`ExpressionStatement`,expression:vc(e)}]}}}}],children:[]}}function Sc(){return{jsx:!1,jsxImportSource:`react`,jsxRuntime:`automatic`,outputFormat:`function-body`,format:`mdx`,development:!1,remarkPlugins:[yc,As,Hs,d,$s],recmaPlugins:[qa]}}function Cc(e){return xi(e,Sc())}async function wc(e){if(!e.trim())return`The plan file is empty.`;try{await Cc(Wa(e));return}catch(e){return e instanceof Error&&e.message?e.message:`The plan does not compile.`}}function Tc(e){return{offset:(e-8)/2,tight:e<14}}var Ec=new Set([`UL`,`OL`,`BLOCKQUOTE`,`TABLE`,`THEAD`,`TBODY`,`TR`]),Dc=`input, button, svg, [aria-hidden="true"], [data-slash-hint]`;function*Oc(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode(t){if(t instanceof Element)return t!==e&&t.matches(Dc)?NodeFilter.FILTER_REJECT:t instanceof HTMLBRElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP;let n=t.parentElement;return n&&Ec.has(n.tagName)&&!(t.textContent??``).trim()?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(let e=t.nextNode();e;e=t.nextNode())yield e}function kc(e){return e instanceof Text?e.data.length:1}function Ac(e,t){let n=document;if(typeof n.caretPositionFromPoint==`function`){let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:r.offset}}if(typeof n.caretRangeFromPoint==`function`){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:r.startOffset}}return null}function jc(e,t,n){if(!e.contains(t))return null;let r=document.createRange();r.setStart(e,0);try{r.setEnd(t,n)}catch{return null}let i=0;for(let a of Oc(e)){if(a===t)return i+Math.min(n,kc(a));let e=a instanceof Text?a.data.length:0;if(r.comparePoint(a,e)!==0)break;i+=kc(a)}return i}function Mc(e,t,n){let r=Ac(t,n);return r?jc(e,r.node,r.offset):null}function Nc(e,t){let n=window.getSelection();if(!n||n.rangeCount===0)return null;let r=n.getRangeAt(0),i=document.createRange();i.selectNodeContents(e);try{t&&i.setEndBefore(t);let n=i.comparePoint(r.startContainer,r.startOffset),a=i.comparePoint(r.endContainer,r.endOffset);if(n>0||a<0)return null;let o=n<0?0:jc(e,r.startContainer,r.startOffset),s=a>0?jc(e,i.endContainer,i.endOffset):jc(e,r.endContainer,r.endOffset);return o===null||s===null?null:{start:o,end:Math.max(o,s)}}catch{return null}}function Pc(e,t){let n=Math.max(0,t),r=null;for(let t of Oc(e)){if(t instanceof Text){if(n<=t.data.length)return{node:t,offset:n}}else if(n===0&&t.parentNode)return{node:t.parentNode,offset:Array.prototype.indexOf.call(t.parentNode.childNodes,t)};n-=kc(t),r=t}return r instanceof Text?{node:r,offset:r.data.length}:null}function Fc(e,t){return Ic(e,t,t)}function Ic(e,t,n){let r=window.getSelection();if(!r)return!1;let i=Pc(e,t),a=n===t?i:Pc(e,n);return!i||!a?!1:(r.setBaseAndExtent(i.node,i.offset,a.node,a.offset),!0)}var Lc=`mouse`;typeof window<`u`&&window.addEventListener(`pointerdown`,e=>{Lc=e.pointerType||`mouse`},{capture:!0,passive:!0});function Rc(e){return e.pointerType===`touch`||e.pointerType===`pen`}function zc(e){let t=e.pointerType||Lc;return t===`touch`||t===`pen`}function Bc(){let e=Y(),t=e?.querySelector(`[data-plan-title-editing]`),n=t?null:e?.querySelector(`[data-plan-block-editor][data-inline]:not([data-plan-block-editor="cell"])`),r=(t??n)?.parentElement?.closest(`[data-plan-block]`)??null;return!e||!r||!e.contains(r)||Z(r)||Q(r)||n&&r.matches(`[data-entry="phase"]`)?null:r}function Vc(e,t){let n=document.createElement(`div`);n.contentEditable=`true`,n.dataset.planFocusStandIn=``,n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,{position:`fixed`,left:`${Math.max(0,e)}px`,top:`${Math.max(0,t)}px`,width:`1px`,height:`1px`,opacity:`0`,overflow:`hidden`,fontSize:`16px`,pointerEvents:`none`}),document.body.append(n),n.focus({preventScroll:!0});let r=()=>{window.clearTimeout(a),document.removeEventListener(`focusin`,i,!0),n.remove()},i=e=>{e.target!==n&&r()},a=window.setTimeout(r,2e3);document.addEventListener(`focusin`,i,!0)}function Y(){return document.querySelector(`[data-plan-rendered]`)}var Hc=`[data-plan-block-editor][data-inline][data-staged]`;function Uc(e){return e.matches(Hc)?e.getAttribute(`data-plan-block-editor`)===`cell`?e.parentElement:e.previousElementSibling:null}function Wc(e){return e instanceof Node&&Array.from(document.querySelectorAll(Hc)).some(t=>Uc(t)?.contains(e))}function Gc(e){let t=e.nextElementSibling;return t!==null&&Uc(t)===e}function X(e){let t=Y();if(!t||!(e instanceof Element)||!t.contains(e)||e.closest(`[data-plan-block-editor]`))return null;let n=e.closest(`[data-plan-block]`);return n&&t.contains(n)?n:null}var Kc=`p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote`;function Z(e){return e.matches(Kc)}function qc(e){return Array.from(e.querySelectorAll(`[data-plan-block]`)).filter(t=>t.parentElement?.closest(`[data-plan-block]`)===e&&!t.closest(`[data-plan-block-editor]`))}function Jc(e,t,n){for(let[r,i]of e.entries()){let a=i.getBoundingClientRect(),o=e[r+1]?.getBoundingClientRect().top??Math.max(a.bottom,n??a.bottom);if(t>=a.top&&t<o)return i}return null}function Yc(e,t){let n=X(e);return n?(t!==void 0&&!Z(n)&&(n=Jc(qc(n),t)??n),Z(n)?null:n):null}function Xc(e){let t=Y(),n=e.parentElement?.closest(`[data-plan-block]`)??null;return n&&t?.contains(n)?n:null}function Zc(e){return!e.parentElement?.closest(`[data-edit-locked="true"]`)}var Qc=`[data-plan-block], [data-plan-block-editor]`;function $c(e){let t=Y();if(!t)return[];let n=e??t;return Array.from(n.querySelectorAll(Qc)).filter(t=>(t.parentElement?.closest(`[data-plan-block]`)??null)===e&&!t.parentElement?.closest(`[data-plan-block-editor]`))}function el(e,t){let n=Y();if(!n||!(e instanceof Element)||!n.contains(e)||e.closest(`[data-plan-block-editor]`))return null;let r=X(e);if(!r&&e===n?r=Jc($c(null),t,n.getBoundingClientRect().bottom):r&&!Z(r)&&(r=Jc($c(r),t,r.getBoundingClientRect().bottom)??r),!r||r.hasAttribute(`data-plan-block-editor`)||Gc(r))return null;if(Zc(r))return r;let i=Xc(r);return i&&Zc(i)?i:null}function Q(e){return e.closest(`[data-edit-locked="true"]`)!==null||e.querySelector(`:scope > [data-edit-locked="true"]`)!==null}var tl=`a[href], button, input, select, textarea, label, summary, [contenteditable="true"], [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"]`,nl=`[data-entry], .vlp-workflow`;function rl(e,t){let n=e.closest(`[data-plan-title]`);if(!n||!t.contains(n)||n.closest(`[data-plan-block-editor]`))return null;let r=e.closest(tl);if(r&&n.contains(r)&&r!==n)return null;let i=n.dataset.planTitle,a=n.closest(`[data-plan-block]`),o=n.closest(nl);return!i||!a||!o||!t.contains(a)||o!==a&&o.parentElement!==a&&o.parentElement?.parentElement!==a||Q(n)||Q(a)||!(n.textContent??``).trim()?null:{kind:`title`,element:n,block:a,attr:i}}function il(e){if(!(e instanceof Element))return null;let t=Y();if(!t||!t.contains(e)||e.closest(`[data-plan-block-editor], [data-plan-title-editing]`))return null;let n=rl(e,t);if(n)return n;if(e.closest(`[data-plan-title]`)||e.closest(tl))return null;let r=e.closest(`[data-plan-text]`);if(r&&t.contains(r))return Q(r)?null:{kind:`text`,element:r};let i=X(e);if(!i||Q(i))return null;if(Z(i))return{kind:`text`,element:i};let a=e.closest(`td, th`);if(!a||!i.contains(a))return null;if(a.hasAttribute(`data-plan-cell-range`))return{kind:`cell`,element:a};let o=/^row-(\d+)$/.exec(a.closest(`tr`)?.getAttribute(`data-row`)??``),s=a.closest(`[data-plan-data-table]`);if(o&&a.tagName===`TD`&&s&&i.matches(`.plan-block-frame`)&&i.querySelector(`[data-plan-data-table]`)===s&&!a.closest(`[data-edit-locked="true"]`)){let e=Array.prototype.indexOf.call(a.parentElement?.children??[],a);return{kind:`grid`,element:a,block:i,row:Number(o[1])-1,column:e}}return null}function $(){return document.documentElement.dataset.comments===`on`||document.body.dataset.planMode===`comment`}function al(){let e=window.getSelection();return e!==null&&e.rangeCount>0&&!e.isCollapsed}var ol=96;function sl(){let e=Y();if(!e)return null;for(let t of e.children)if(t instanceof HTMLElement&&t.matches(`[data-plan-block]`)&&!Q(t)&&t.getBoundingClientRect().bottom>ol)return t;return null}function cl(){let e=document.querySelector(`[data-tab-target="plan"]`);return!e||e.getAttribute(`aria-selected`)===`true`?!1:(e.click(),!0)}var ll=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"/></svg>`,ul=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14"/><path d="M5 12h14"/></svg>`,dl=300,fl=3e3;function pl(e,t,n){let r=Mc(e,t,n);return r===null?void 0:{offset:r}}var ml=[`block`,`list-item`];function hl(e,t){let n=0,r=e;for(;r;){let e=getComputedStyle(r);if(n=Math.max(n,Number.parseFloat(t===`top`?e.marginTop:e.marginBottom)||0),(t===`top`?(Number.parseFloat(e.paddingTop)||0)+(Number.parseFloat(e.borderTopWidth)||0):(Number.parseFloat(e.paddingBottom)||0)+(Number.parseFloat(e.borderBottomWidth)||0))>0||e.overflow!==`visible`||!ml.includes(e.display))break;let i=t===`top`?r.firstElementChild:r.lastElementChild;if(!i||!ml.includes(getComputedStyle(i).display))break;r=i}return n}function gl(e){return{top:`${hl(e,`top`)}px`,bottom:`${hl(e,`bottom`)}px`}}function _l(e){let t=document.createElement(`p`);t.textContent=`​`,t.style.visibility=`hidden`,e.after(t);let n=gl(t),r=t.getBoundingClientRect().height;return t.remove(),{margins:n,height:r}}function vl(e){let t=gl(e),n=e.nextElementSibling;if(n){let r=n.getBoundingClientRect().top-e.getBoundingClientRect().bottom;r>=0&&(t.bottom=`${r}px`)}return t}function yl(e){return{margins:gl(e),height:e.getBoundingClientRect().height}}function bl(e){let t=/^(\d+)-\d+$/.exec(e??``);return t?Number(t[1]):null}function xl(e){return e.dataset.planText??e.dataset.planBlock}function Sl(e){let t=Y();if(!t)return null;let n=Array.from(t.querySelectorAll(`[data-plan-block], [data-plan-text]`)).filter(t=>bl(xl(t))===e&&!t.closest(`[data-plan-block-editor]`));return n.find(Z)??n[0]??null}function Cl(e){let t=e.hasAttribute(`data-plan-text`)?`data-plan-text`:`data-plan-block`;for(let n=e.nextElementSibling;n;n=n.nextElementSibling)if(n instanceof HTMLElement&&n.hasAttribute(t))return Z(n)&&!Q(n)?n:null;return null}function wl(e){let t=Sl(e.start),n=t?xl(t):void 0;if(!t||!n)return null;if(e.open===`add`)return{kind:`add`,range:n,..._l(t)};if(e.open===`end`||e.open===`start`)return!Z(t)||Q(t)?null:{kind:`edit`,range:n,caret:{offset:e.open===`end`?2**53-1:0},...yl(t)};let r=Cl(t),i=r?xl(r):void 0;return r&&i?{kind:`edit`,range:i,caret:{offset:0},...yl(r)}:null}function Tl(e,t,n,r){let i=document.createElement(`button`);return i.type=`button`,i.className=e,i.tabIndex=-1,i.setAttribute(`aria-label`,t),i.title=n,i.innerHTML=r,i}var El=24;function Dl(e,t){let n=Tl(`plan-add-bar`,e,t,ul);return n.dataset.planAddBar=``,n}function Ol(e){let t=e.getBoundingClientRect(),n=t.bottom,r=e.nextElementSibling;for(;r instanceof HTMLElement&&r.matches(`[data-plan-head]`);)n=r.getBoundingClientRect().bottom,r=r.nextElementSibling;let i=e.parentElement?.closest(`[data-plan-block]`),a=Tc((r?r.getBoundingClientRect().top:i?i.getBoundingClientRect().bottom-(Number.parseFloat(getComputedStyle(i).borderBottomWidth)||0):n+El)-n);return{top:n+a.offset+window.scrollY,left:t.left+window.scrollX,width:t.width,height:8,tight:a.tight}}function kl(e){let t=Y();if(!t||e.parentElement!==t||!document.querySelector(`[data-plan-add-block]:not([data-editing])`))return!1;for(let t=e.nextElementSibling;t;t=t.nextElementSibling)if(t.matches(`[data-plan-block], [data-plan-block-editor]`))return!1;return!0}function Al(e){let t=document.createElement(`div`);t.className=`plan-block-tools`,t.dataset.planBlockTools=``,t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,`Block`);let n=Tl(`plan-block-edit`,`Edit this block`,`Edit this block (E)`,`${ll}<span>Edit</span>`);n.dataset.planBlockEdit=``,n.setAttribute(`aria-keyshortcuts`,`E`),t.append(n);let r=Dl(`Add a block below`,`Add a block below (A)`);r.dataset.planBlockAdd=``,r.setAttribute(`aria-keyshortcuts`,`A`),document.body.append(t,r);let i=null,a=null,o=null,s=0,c=0,l=null,u=0,d=!1,f=e=>e instanceof Node&&(t.contains(e)||r.contains(e)),p=()=>{window.clearTimeout(c),i=null,t.removeAttribute(`data-visible`)},m=()=>{window.clearTimeout(u),l=null,r.removeAttribute(`data-visible`)},h=()=>{if(!l||!l.isConnected)return m();let e=l.getBoundingClientRect();if(e.bottom<-24||e.top>window.innerHeight)return m();if(kl(l)||Gc(l))return void r.removeAttribute(`data-visible`);let t=Ol(l);r.style.top=`${t.top}px`,r.style.left=`${t.left}px`,r.style.width=`${t.width}px`,r.toggleAttribute(`data-tight`,t.tight),r.setAttribute(`data-visible`,``)},g=e=>{window.clearTimeout(u),!(l===e&&r.hasAttribute(`data-visible`))&&(l=e,h())},_=()=>{if(!i||!i.isConnected)return p();let e=i.getBoundingClientRect();if(e.bottom<0||e.top>window.innerHeight)return i===x?void t.removeAttribute(`data-visible`):p();let n=t.offsetWidth||64,r=t.offsetHeight||26,a=Number.parseFloat(getComputedStyle(i).paddingTop)||0,o=document.querySelector(`header.titlebar`)?.getBoundingClientRect().bottom??0,s=window.innerWidth-e.right>=n+24,c=s?e.right+12:Math.max(8,Math.min(e.right-n,window.innerWidth-n-8)),l=s?e.top+a:e.top+a-r-4,u=Math.min(Math.max(l,o+8),e.bottom-r);t.style.top=`${u+window.scrollY}px`,t.style.left=`${c+window.scrollX}px`,i===x&&t.setAttribute(`data-visible`,``)},v=e=>{window.clearTimeout(c),i=e,t.setAttribute(`data-visible`,``),_()},y=()=>{let t=e.state();return t.editable&&!t.editing&&!$()},b=()=>e.state().editable&&!$(),x=null,S=0,C=(n=12)=>{cancelAnimationFrame(S);let r=e.state();if(!r.editable||$()?m():l&&h(),!r.editable||!r.editing||$()){x&&(x=null,p());return}let a=Bc();a?(x=a,(a!==i||!t.hasAttribute(`data-visible`))&&v(a)):(x&&(x=null,p()),n>0&&(S=requestAnimationFrame(()=>C(n-1))))},w=(e,t)=>{let n=b()&&!d&&t!==void 0?el(e,t):null;n?g(n):l&&(window.clearTimeout(u),u=window.setTimeout(m,dl))},T=(n,r)=>{if(f(n)){window.clearTimeout(c),window.clearTimeout(u);return}if(w(n,r),x&&e.state().editing)return;let s=y()?X(n):null;a=s&&!Q(s)?s:null;let l=s&&n instanceof Element?n.closest(`[data-plan-text]`):null;o=l&&s?.contains(l)&&!Q(l)?l:null;let d=s?Yc(n,r):null;d&&!Q(d)?(window.clearTimeout(c),(d!==i||!t.hasAttribute(`data-visible`))&&v(d)):i&&(window.clearTimeout(c),c=window.setTimeout(p,dl))},E=e=>{if(Rc(e))return;let{target:t,clientY:n}=e;cancelAnimationFrame(s),s=requestAnimationFrame(()=>T(t,n))},ee=e=>{Rc(e)&&(d=!1,T(e.target,e.clientY))},te=()=>{i&&_(),l&&h()},ne=e=>{if(!d||Rc(e)||e.movementX===0&&e.movementY===0)return;d=!1,cancelAnimationFrame(s);let{target:t,clientY:n}=e;s=requestAnimationFrame(()=>T(t,n))},re=e=>({inline:!0,..._l(e)}),ie=null,D=(t,n)=>{if(n&&e.state().editing){ie={action:t,block:n,at:Date.now()},x=null,p(),m(),t===`add`&&(d=!0),e.finish();return}p(),m(),t===`add`&&(d=!0);let r=n?.dataset.planBlock;n&&r&&b()&&(t===`edit`?y()&&e.edit(r,{margins:vl(n)}):e.add(r,re(n)))},ae=()=>D(`edit`,i),oe=(e=>t=>{let n=e()??null;zc(t)&&n&&Vc(t.clientX,t.clientY),D(`add`,n)})(()=>l),O=t=>{if(t.key===`Escape`){p(),m();return}let n=t.key.toUpperCase();if(n!==`E`&&n!==`A`||t.metaKey||t.ctrlKey||t.altKey||t.repeat)return;let r=t.target;if(r instanceof HTMLElement&&(r.closest(`input, textarea, select`)||r.isContentEditable)||!y())return;if(t.preventDefault(),n===`A`){if(cl())return;let t=X(document.activeElement),n=[l,t,sl()].map(e=>e?.isConnected?Zc(e)?e:Xc(e):null).find(e=>!!e?.dataset.planBlock);if(p(),m(),!n?.dataset.planBlock)return;d=!0,e.add(n.dataset.planBlock,re(n));return}if(cl())return;if(o?.isConnected&&o.dataset.planText){let t=o.dataset.planText,n=yl(o);p(),e.edit(t,{inline:!0,...n});return}let i=a?.isConnected?a:null,s=X(document.activeElement),c=[i,s&&!Q(s)?s:null,sl()].find(e=>!!e?.dataset.planBlock);p(),c?.dataset.planBlock&&e.edit(c.dataset.planBlock,Z(c)?{inline:!0,...yl(c)}:{margins:vl(c)})},se=(e,t,n)=>e.kind===`grid`?{row:e.row,column:e.column,offset:Mc(e.element,t,n)??2**53-1}:pl(e.element,t,n),ce=(t,n)=>{if(p(),t.kind===`cell`){let r=t.element.getAttribute(`data-plan-cell-range`);r&&e.cell(r,n);return}if(t.kind===`title`){let r=t.block.dataset.planBlock;r&&e.title(t.element,r,t.attr,n);return}let r=t.kind===`grid`?t.block.dataset.planBlock:t.element.dataset.planText??t.element.dataset.planBlock;r&&(t.kind===`grid`?e.edit(r,{caret:n,margins:vl(t.block)}):e.edit(r,{inline:!0,caret:n,...yl(t.element)}))},le=e=>e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey,k=null,ue=t=>{let n=e.state();if(!n.editable||!n.editing||$())return!1;if(f(t.target)||Wc(t.target))return!0;let r=il(t.target),i=r?null:Yc(t.target,t.clientY);return r?k={direct:r,caret:se(r,t.clientX,t.clientY),text:r.element.textContent??``,at:Date.now()}:i&&!Q(i)&&(k={pill:i,at:Date.now()}),!0},de=e=>{Rc(e)||(k=null,le(e)&&ue(e))},A=t=>{if(!le(t)||t.defaultPrevented)return;let n=e.state().editable&&!$()?il(t.target):null;n?.kind===`title`&&t.preventDefault();let r=zc(t);if(r&&ue(t)||!y()||!n||al())return;let i=se(n,t.clientX,t.clientY);n.kind===`title`?ce(n,i):(r&&n.kind!==`grid`&&Vc(t.clientX,t.clientY),window.setTimeout(()=>{t.defaultPrevented||!y()||al()||ce(n,i)},0))},fe=()=>{let t=ie;if(ie=null,t&&Date.now()-t.at<=fl&&b()&&t.block.isConnected){k=null;let n=t.block.dataset.planBlock;if(!n)return;t.action===`edit`?y()&&e.edit(n,{margins:vl(t.block)}):e.add(n,re(t.block));return}let n=k;k=null,!(!n||Date.now()-n.at>fl||!y()||al())&&(`pill`in n?n.pill.isConnected&&v(n.pill):n.direct.element.isConnected&&(n.direct.element.textContent??``)===n.text&&ce(n.direct,n.caret))},pe=e=>{f(e.target)||e.target instanceof HTMLElement&&e.target.dataset.planFocusStandIn!==void 0||T(e.target)},me=e=>e.preventDefault();return n.addEventListener(`click`,ae),r.addEventListener(`click`,oe),r.addEventListener(`mousedown`,me),window.addEventListener(`click`,A,!0),document.addEventListener(`pointerdown`,de,{passive:!0}),document.addEventListener(`pointerover`,E,{passive:!0}),document.addEventListener(`pointermove`,ne,{passive:!0}),window.addEventListener(`pointerup`,ee,{capture:!0,passive:!0}),document.addEventListener(`focusin`,pe),document.addEventListener(`keydown`,O),window.addEventListener(`scroll`,te,{passive:!0}),window.addEventListener(`resize`,te),{stop:()=>{cancelAnimationFrame(s),cancelAnimationFrame(S),window.clearTimeout(c),window.clearTimeout(u),k=null,ie=null,n.removeEventListener(`click`,ae),r.removeEventListener(`click`,oe),r.removeEventListener(`mousedown`,me),window.removeEventListener(`click`,A,!0),document.removeEventListener(`pointerdown`,de),document.removeEventListener(`pointerover`,E),document.removeEventListener(`pointermove`,ne),window.removeEventListener(`pointerup`,ee,{capture:!0}),document.removeEventListener(`focusin`,pe),document.removeEventListener(`keydown`,O),window.removeEventListener(`scroll`,te),window.removeEventListener(`resize`,te),t.remove(),r.remove()},closed:fe,refresh:()=>C()}}export{ds as A,ja as B,nc as C,ws as D,Ms as E,go as F,Et as G,aa as H,oo as I,oe as K,no as L,Po as M,So as N,fs as O,vo as P,$a as R,oc as S,js as T,Ar as U,Ma as V,Xt as W,rc as _,_l as a,ec as b,Rc as c,Nc as d,Tc as f,sc as g,Ws as h,Q as i,Qo as j,bs as k,Fc as l,Cc as m,X as n,Uc as o,wc as p,wl as r,zc as s,Al as t,Ic as u,W as v,zs as w,tc as x,ac as y,Wa as z};
@@ -0,0 +1 @@
1
+ import{t as e}from"./versionView-zkSROPw7.js";var t=[`hello`,`ping`,`plan`,`reload`,`theme`,`execution`,`interaction`,`review`,`mode`,`comment`,`agent`,`error`],n=2e4,r=15e3,i=`living-plan-connection`;function a(e){return`${window.__LIVE_PLAN_BASE__??``}${e}`}function o(){let e=window;return e.__livingPlanHub??=new EventTarget,e.__livingPlanHub}function s(e){return Math.min(r,1e3*2**Math.max(0,e))}var c=class{hub;state=`connecting`;transport=null;attempt=0;retryTimer=0;watchdog=0;lastHeard=0;forwarded=new Set;source=null;suspended=!1;constructor(e){this.hub=e,window.addEventListener(`online`,()=>this.reconnectNow()),window.addEventListener(`offline`,()=>{this.onLoopback()||this.setState(`reconnecting`)}),window.addEventListener(`pagehide`,()=>this.suspend()),window.addEventListener(`pageshow`,e=>{(e.persisted||this.suspended)&&this.resume()}),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&(!this.transport||this.isQuiet())&&this.reconnectNow()}),this.open()}onLoopback(){let e=window.location.hostname;return e===`127.0.0.1`||e===`localhost`||e===`[::1]`||e===`::1`}isWebSocket(){return window.__LIVE_PLAN_TRANSPORT__===`websocket`}isQuiet(){return this.state!==`open`||Date.now()-this.lastHeard>5e4}warnedAt=0;setState(e){this.state!==e&&(this.state=e,e===`reconnecting`&&this.warn(),document.body.dataset.planConnection=e,this.hub.dispatchEvent(new CustomEvent(i,{detail:{state:e}})))}warn(){let e=window.__livingPlanReport;if(typeof e!=`function`)return;let t=Date.now();t-this.warnedAt<1e4||(this.warnedAt=t,e(`warn`,`The plan event stream is not connected.`,``,`page`))}heard(){this.lastHeard=Date.now(),this.attempt=0,this.setState(`open`)}dispatch(e,t){this.heard(),e!==`ping`&&this.hub.dispatchEvent(new MessageEvent(e,{data:t}))}forward(e){this.forwarded.has(e)||(this.forwarded.add(e),this.source?.addEventListener(e,t=>{t instanceof MessageEvent&&typeof t.data==`string`&&this.dispatch(e,t.data)}))}open(){if(!(this.suspended||this.transport)){if(navigator.onLine===!1&&!this.onLoopback())this.setState(`reconnecting`);else{try{this.transport=this.isWebSocket()?this.openSocket():this.openEventSource()}catch{this.transport=null,this.scheduleRetry();return}this.lastHeard=Date.now(),window.clearInterval(this.watchdog),this.watchdog=window.setInterval(()=>{this.transport&&Date.now()-this.lastHeard>5e4&&this.reconnectNow()},n/2)}}}openEventSource(){let e=new EventSource(a(`/api/events`));this.source=e;let n=[...this.forwarded];this.forwarded=new Set;for(let e of new Set([...t,...n]))this.forward(e);return e.addEventListener(`error`,()=>{this.source===e&&(e.readyState===EventSource.CLOSED?this.dropped():this.setState(`reconnecting`))}),{close:()=>{e.close(),this.source===e&&(this.source=null)}}}openSocket(){let e=new URL(a(`/api/events`),window.location.href);e.protocol=e.protocol===`https:`?`wss:`:`ws:`;let t=new WebSocket(e.toString()),r=0;t.addEventListener(`open`,()=>{let e=()=>{t.readyState===WebSocket.OPEN&&t.send(`ping`)};e(),r=window.setInterval(e,n)}),t.addEventListener(`message`,e=>{let t=String(e.data);if(t===`pong`)this.heard();else try{let e=JSON.parse(t);if(!e.event)return;let n=typeof e.data==`string`?e.data:JSON.stringify(e.data??null);this.dispatch(e.event,n)}catch{}}),t.addEventListener(`error`,()=>{}),t.addEventListener(`close`,()=>{window.clearInterval(r),this.transport===i&&this.dropped()});let i={close:()=>{window.clearInterval(r);try{t.close()}catch{}}};return i}dropped(){this.transport?.close(),this.transport=null,this.scheduleRetry()}scheduleRetry(){if(this.setState(`reconnecting`),this.suspended||this.retryTimer)return;let e=s(this.attempt);this.attempt+=1,this.retryTimer=window.setTimeout(()=>{this.retryTimer=0,this.open()},e)}reconnectNow(){this.suspended||(window.clearTimeout(this.retryTimer),this.retryTimer=0,this.attempt=0,this.transport?.close(),this.transport=null,this.setState(`reconnecting`),this.open())}suspend(){this.suspended=!0,window.clearTimeout(this.retryTimer),this.retryTimer=0,window.clearInterval(this.watchdog),this.transport?.close(),this.transport=null}resume(){this.suspended=!1,this.reconnectNow()}};function l(){let e=window;return e.__livingPlanConnection??=new c(o()),e.__livingPlanConnection}function u(t,n){if(e()!==null)return()=>{};let r=l();return r.forward(t),r.hub.addEventListener(t,n),()=>{r.hub.removeEventListener(t,n)}}function d(t){if(e()!==null)return()=>{};let n=l(),r=e=>t(e.detail.state);return n.hub.addEventListener(i,r),t(n.state),()=>n.hub.removeEventListener(i,r)}export{u as n,d as t};