@cartanova/qgrid-cli 2.10.9 → 2.11.0

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 (318) hide show
  1. package/bundle/dist/_virtual/_rolldown/runtime.js +1 -10
  2. package/bundle/dist/application/monit/log-buffer.js +12 -6
  3. package/bundle/dist/application/monit/monit.frame.js +11 -3
  4. package/bundle/dist/application/monit/monit.types.js +1 -1
  5. package/bundle/dist/application/qgrid/conv-routing.js +9 -6
  6. package/bundle/dist/application/qgrid/expired-token-reminder.js +2 -2
  7. package/bundle/dist/application/qgrid/oauth.js +31 -4
  8. package/bundle/dist/application/qgrid/qgrid-image-generation.js +1 -1
  9. package/bundle/dist/application/qgrid/qgrid-response-format.js +22 -20
  10. package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +43 -34
  11. package/bundle/dist/application/qgrid/qgrid.dispatcher.js +128 -93
  12. package/bundle/dist/application/qgrid/qgrid.frame.js +930 -49
  13. package/bundle/dist/application/qgrid/qgrid.types.js +212 -5
  14. package/bundle/dist/application/qgrid/schema-prompt.js +75 -48
  15. package/bundle/dist/application/qgrid/slack-user-map.js +1 -1
  16. package/bundle/dist/application/qgrid/token-death.js +1 -1
  17. package/bundle/dist/application/qgrid/token-subscriber.js +83 -30
  18. package/bundle/dist/application/qgrid/token-trigger-setup.js +1 -1
  19. package/bundle/dist/application/qgrid/token-window-keepalive.js +8 -6
  20. package/bundle/dist/application/qgrid/tool-emulation-schema.js +13 -13
  21. package/bundle/dist/application/qgrid/tool-emulation.js +19 -15
  22. package/bundle/dist/application/request-log/json-schema-type-text.js +29 -12
  23. package/bundle/dist/application/request-log/request-log.model.js +83 -69
  24. package/bundle/dist/application/request-log/request-log.types.js +8 -2
  25. package/bundle/dist/application/request-log/zod-code-format.js +1 -1
  26. package/bundle/dist/application/request-log-step/request-log-step.model.js +1 -1
  27. package/bundle/dist/application/request-log-step/request-log-step.types.js +1 -1
  28. package/bundle/dist/application/setting/setting.constant.js +1 -1
  29. package/bundle/dist/application/setting/setting.model.js +2 -2
  30. package/bundle/dist/application/setting/setting.store.js +2 -2
  31. package/bundle/dist/application/setting/setting.types.js +1 -1
  32. package/bundle/dist/application/sonamu.generated.js +40 -16
  33. package/bundle/dist/application/sonamu.generated.sso.js +2 -1
  34. package/bundle/dist/application/token/token.model.js +26 -9
  35. package/bundle/dist/application/token/token.types.js +20 -3
  36. package/bundle/dist/i18n/en.js +15 -1
  37. package/bundle/dist/i18n/ko.js +15 -1
  38. package/bundle/dist/i18n/sd.generated.js +2 -1
  39. package/bundle/dist/migrations/20260807133553_manual__backfill_request_log_cost.js +8 -6
  40. package/bundle/dist/migrations/20261018215031_alter_request_logs_add1_alter1.js +15 -0
  41. package/bundle/dist/server-bootstrap.js +4 -2
  42. package/bundle/dist/server-error-handler.js +1 -1
  43. package/bundle/dist/sonamu.config.js +37 -8
  44. package/bundle/dist/startup-migrations.js +17 -7
  45. package/bundle/dist/testing/global.js +1 -1
  46. package/bundle/dist/testing/schema-bench.js +0 -0
  47. package/bundle/dist/testing/test-database-name.js +1 -1
  48. package/bundle/dist/utils/providers/anthropic/anthropic-constants.js +1 -1
  49. package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +11 -5
  50. package/bundle/dist/utils/providers/anthropic/anthropic-quota.js +4 -4
  51. package/bundle/dist/utils/providers/anthropic/anthropic-thinking.js +1 -1
  52. package/bundle/dist/utils/providers/anthropic/claude-session.js +20 -19
  53. package/bundle/dist/utils/providers/anthropic/fence-strip.js +1 -1
  54. package/bundle/dist/utils/providers/anthropic/stream-json-adapter.js +49 -23
  55. package/bundle/dist/utils/providers/common/credentials.js +5 -1
  56. package/bundle/dist/utils/providers/common/effort.js +3 -3
  57. package/bundle/dist/utils/providers/common/model-cost.js +69 -14
  58. package/bundle/dist/utils/providers/common/provider-types.js +29 -1
  59. package/bundle/dist/utils/providers/common/schema-validation.js +78 -40
  60. package/bundle/dist/utils/providers/common/smooth-weighted-round-robin.js +1 -1
  61. package/bundle/dist/utils/providers/common/strictifier.js +62 -43
  62. package/bundle/dist/utils/providers/common/thinking.js +3 -2
  63. package/bundle/dist/utils/providers/common/ttft.js +1 -1
  64. package/bundle/dist/utils/providers/grok/grok-backend-protocol.js +427 -0
  65. package/bundle/dist/utils/providers/grok/grok-constants.js +55 -0
  66. package/bundle/dist/utils/providers/grok/grok-direct-client.js +196 -0
  67. package/bundle/dist/utils/providers/grok/grok-dispatcher.js +1313 -0
  68. package/bundle/dist/utils/providers/grok/grok-headers.js +118 -0
  69. package/bundle/dist/utils/providers/grok/grok-media-client.js +420 -0
  70. package/bundle/dist/utils/providers/grok/grok-models.js +114 -0
  71. package/bundle/dist/utils/providers/grok/grok-oauth.js +455 -0
  72. package/bundle/dist/utils/providers/grok/grok-quota.js +119 -0
  73. package/bundle/dist/utils/providers/grok/grok-refresh.js +192 -0
  74. package/bundle/dist/utils/providers/grok/grok-types.js +186 -0
  75. package/bundle/dist/utils/providers/grok/grok-voice-client.js +199 -0
  76. package/bundle/dist/utils/providers/grok/index.js +11 -0
  77. package/bundle/dist/utils/providers/openai/openai-backend-protocol.js +111 -83
  78. package/bundle/dist/utils/providers/openai/openai-callback-relay.js +3 -2
  79. package/bundle/dist/utils/providers/openai/openai-constants.js +1 -1
  80. package/bundle/dist/utils/providers/openai/openai-direct-client.js +23 -7
  81. package/bundle/dist/utils/providers/openai/openai-dispatcher.js +143 -106
  82. package/bundle/dist/utils/providers/openai/openai-image-generation.js +48 -33
  83. package/bundle/dist/utils/providers/openai/openai-oauth.js +28 -13
  84. package/bundle/dist/utils/providers/openai/openai-quota.js +38 -27
  85. package/bundle/dist/utils/providers/openai/openai-refresh.js +17 -9
  86. package/bundle/dist/utils/providers/openai/openai-sse.js +1 -1
  87. package/bundle/dist/utils/providers/openai/openai-transport-config.js +1 -1
  88. package/bundle/dist/utils/quiet-hours.js +1 -1
  89. package/bundle/dist/utils/slack-notify.js +14 -8
  90. package/bundle/dist/utils/subset-loaders.js +4 -5
  91. package/bundle/src/application/monit/log-buffer.ts +23 -9
  92. package/bundle/src/application/monit/monit.frame.ts +22 -5
  93. package/bundle/src/application/monit/monit.types.ts +6 -0
  94. package/bundle/src/application/qgrid/conv-routing.test.ts +76 -4
  95. package/bundle/src/application/qgrid/conv-routing.ts +35 -9
  96. package/bundle/src/application/qgrid/expired-token-reminder.ts +9 -1
  97. package/bundle/src/application/qgrid/oauth.ts +51 -15
  98. package/bundle/src/application/qgrid/qgrid-image-generation.ts +9 -0
  99. package/bundle/src/application/qgrid/qgrid-response-format.ts +50 -25
  100. package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +33 -0
  101. package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +87 -40
  102. package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +97 -0
  103. package/bundle/src/application/qgrid/qgrid.dispatcher.ts +274 -126
  104. package/bundle/src/application/qgrid/qgrid.frame.test.ts +1013 -3
  105. package/bundle/src/application/qgrid/qgrid.frame.ts +1415 -60
  106. package/bundle/src/application/qgrid/qgrid.types.ts +335 -0
  107. package/bundle/src/application/qgrid/schema-prompt.ts +105 -41
  108. package/bundle/src/application/qgrid/slack-user-map.ts +5 -0
  109. package/bundle/src/application/qgrid/token-death.ts +4 -0
  110. package/bundle/src/application/qgrid/token-subscriber.test.ts +21 -19
  111. package/bundle/src/application/qgrid/token-subscriber.ts +186 -53
  112. package/bundle/src/application/qgrid/token-trigger-setup.ts +2 -0
  113. package/bundle/src/application/qgrid/token-window-keepalive.ts +49 -6
  114. package/bundle/src/application/qgrid/tool-emulation-schema.ts +33 -29
  115. package/bundle/src/application/qgrid/tool-emulation.ts +52 -27
  116. package/bundle/src/application/request-log/json-schema-type-text.test.ts +5 -5
  117. package/bundle/src/application/request-log/json-schema-type-text.ts +81 -26
  118. package/bundle/src/application/request-log/request-log.entity.json +8 -0
  119. package/bundle/src/application/request-log/request-log.model.test.ts +111 -4
  120. package/bundle/src/application/request-log/request-log.model.ts +279 -145
  121. package/bundle/src/application/request-log/request-log.types.ts +17 -0
  122. package/bundle/src/application/request-log/zod-code-format.ts +11 -0
  123. package/bundle/src/application/request-log-step/request-log-step.model.ts +1 -0
  124. package/bundle/src/application/request-log-step/request-log-step.types.ts +2 -0
  125. package/bundle/src/application/setting/setting.constant.ts +9 -0
  126. package/bundle/src/application/setting/setting.model.ts +12 -2
  127. package/bundle/src/application/setting/setting.store.ts +5 -1
  128. package/bundle/src/application/setting/setting.types.ts +8 -0
  129. package/bundle/src/application/sonamu.generated.http +135 -0
  130. package/bundle/src/application/sonamu.generated.sso.ts +3 -0
  131. package/bundle/src/application/sonamu.generated.ts +29 -0
  132. package/bundle/src/application/token/token.identity.test.ts +20 -0
  133. package/bundle/src/application/token/token.model.ts +66 -7
  134. package/bundle/src/application/token/token.types.ts +24 -1
  135. package/bundle/src/i18n/en.ts +19 -0
  136. package/bundle/src/i18n/ko.ts +21 -0
  137. package/bundle/src/i18n/sd.generated.ts +24 -2
  138. package/bundle/src/migrations/20260807133553_manual__backfill_request_log_cost.ts +16 -8
  139. package/bundle/src/migrations/20261018215031_alter_request_logs_add1_alter1.ts +15 -0
  140. package/bundle/src/server-bootstrap.ts +4 -2
  141. package/bundle/src/server-error-handler.ts +1 -0
  142. package/bundle/src/sonamu.config.ts +69 -7
  143. package/bundle/src/startup-migrations.ts +27 -9
  144. package/bundle/src/testing/global.ts +20 -0
  145. package/bundle/src/testing/schema-bench.ts +105 -30
  146. package/bundle/src/testing/test-database-name.ts +2 -0
  147. package/bundle/src/utils/providers/anthropic/anthropic-constants.ts +8 -0
  148. package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +41 -6
  149. package/bundle/src/utils/providers/anthropic/anthropic-quota.ts +7 -3
  150. package/bundle/src/utils/providers/anthropic/anthropic-thinking.ts +6 -0
  151. package/bundle/src/utils/providers/anthropic/claude-session.ts +58 -24
  152. package/bundle/src/utils/providers/anthropic/fence-strip.ts +11 -0
  153. package/bundle/src/utils/providers/anthropic/stream-json-adapter.ts +110 -45
  154. package/bundle/src/utils/providers/common/credentials.ts +8 -0
  155. package/bundle/src/utils/providers/common/effort.ts +9 -2
  156. package/bundle/src/utils/providers/common/model-cost.test.ts +48 -1
  157. package/bundle/src/utils/providers/common/model-cost.ts +259 -158
  158. package/bundle/src/utils/providers/common/provider-dispatcher.ts +98 -2
  159. package/bundle/src/utils/providers/common/provider-types.ts +46 -3
  160. package/bundle/src/utils/providers/common/schema-validation.test.ts +5 -1
  161. package/bundle/src/utils/providers/common/schema-validation.ts +124 -56
  162. package/bundle/src/utils/providers/common/smooth-weighted-round-robin.ts +4 -0
  163. package/bundle/src/utils/providers/common/strictifier.ts +185 -59
  164. package/bundle/src/utils/providers/common/thinking.ts +2 -2
  165. package/bundle/src/utils/providers/common/ttft.ts +4 -2
  166. package/bundle/src/utils/providers/grok/__fixtures__/golden-responses-1.0.60.json +164 -0
  167. package/bundle/src/utils/providers/grok/grok-backend-protocol.test.ts +325 -0
  168. package/bundle/src/utils/providers/grok/grok-backend-protocol.ts +721 -0
  169. package/bundle/src/utils/providers/grok/grok-constants.ts +105 -0
  170. package/bundle/src/utils/providers/grok/grok-direct-client.test.ts +179 -0
  171. package/bundle/src/utils/providers/grok/grok-direct-client.ts +313 -0
  172. package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +1395 -0
  173. package/bundle/src/utils/providers/grok/grok-dispatcher.ts +2105 -0
  174. package/bundle/src/utils/providers/grok/grok-headers.test.ts +149 -0
  175. package/bundle/src/utils/providers/grok/grok-headers.ts +199 -0
  176. package/bundle/src/utils/providers/grok/grok-media-client.test.ts +446 -0
  177. package/bundle/src/utils/providers/grok/grok-media-client.ts +703 -0
  178. package/bundle/src/utils/providers/grok/grok-models.test.ts +96 -0
  179. package/bundle/src/utils/providers/grok/grok-models.ts +161 -0
  180. package/bundle/src/utils/providers/grok/grok-oauth.test.ts +406 -0
  181. package/bundle/src/utils/providers/grok/grok-oauth.ts +771 -0
  182. package/bundle/src/utils/providers/grok/grok-quota.test.ts +142 -0
  183. package/bundle/src/utils/providers/grok/grok-quota.ts +198 -0
  184. package/bundle/src/utils/providers/grok/grok-refresh.test.ts +239 -0
  185. package/bundle/src/utils/providers/grok/grok-refresh.ts +325 -0
  186. package/bundle/src/utils/providers/grok/grok-types.test.ts +252 -0
  187. package/bundle/src/utils/providers/grok/grok-types.ts +374 -0
  188. package/bundle/src/utils/providers/grok/grok-voice-client.test.ts +321 -0
  189. package/bundle/src/utils/providers/grok/grok-voice-client.ts +284 -0
  190. package/bundle/src/utils/providers/grok/index.ts +20 -0
  191. package/bundle/src/utils/providers/openai/openai-backend-protocol.ts +221 -137
  192. package/bundle/src/utils/providers/openai/openai-callback-relay.ts +12 -1
  193. package/bundle/src/utils/providers/openai/openai-constants.ts +2 -0
  194. package/bundle/src/utils/providers/openai/openai-direct-client.ts +111 -21
  195. package/bundle/src/utils/providers/openai/openai-dispatcher.ts +322 -169
  196. package/bundle/src/utils/providers/openai/openai-image-generation.ts +116 -36
  197. package/bundle/src/utils/providers/openai/openai-oauth.ts +48 -20
  198. package/bundle/src/utils/providers/openai/openai-quota.ts +77 -46
  199. package/bundle/src/utils/providers/openai/openai-refresh.ts +42 -18
  200. package/bundle/src/utils/providers/openai/openai-sse.ts +27 -3
  201. package/bundle/src/utils/providers/openai/openai-transport-config.ts +2 -0
  202. package/bundle/src/utils/quiet-hours.ts +12 -1
  203. package/bundle/src/utils/slack-notify.ts +44 -13
  204. package/bundle/src/utils/subset-loaders.ts +7 -7
  205. package/bundle/web-dist/client/assets/clsx-5XM_pHvN.js +1 -0
  206. package/bundle/web-dist/client/assets/index-BA7uQ-6c.js +31 -0
  207. package/bundle/web-dist/client/assets/index-Be2qCZmI.css +1 -0
  208. package/bundle/web-dist/client/assets/logs-C47OJGEI.js +1 -0
  209. package/bundle/web-dist/client/assets/monit-BS9no0dU.js +4 -0
  210. package/bundle/web-dist/client/assets/plus-sdACTfH0.js +1 -0
  211. package/bundle/web-dist/client/assets/refresh-cw-CY8o_1cT.js +1 -0
  212. package/bundle/web-dist/client/assets/request-model-BRtFuZvj.js +1 -0
  213. package/bundle/web-dist/client/assets/routes-kqgkUxE8.js +5 -0
  214. package/bundle/web-dist/client/assets/{services.generated-BsieU37H.js → services.generated-CefiDXEv.js} +5 -5
  215. package/bundle/web-dist/client/assets/settings-DNDvFGSw.js +1 -0
  216. package/bundle/web-dist/client/assets/show-u8Np69q3.js +2 -0
  217. package/bundle/web-dist/client/assets/tokens-QvP410NW.js +1 -0
  218. package/bundle/web-dist/client/assets/total-cost-MnfKU8IN.js +1 -0
  219. package/bundle/web-dist/client/assets/use-oauth-login-flow-Bzdh28Ws.js +1 -0
  220. package/bundle/web-dist/client/assets/use-update-token-mutation-CfJKaxmR.js +1 -0
  221. package/bundle/web-dist/client/assets/vendor-react-CUFFrVN9.js +244 -0
  222. package/bundle/web-dist/client/assets/vendor-tanstack-Bf_jag9G.js +1 -0
  223. package/bundle/web-dist/client/index.html +6 -6
  224. package/bundle/web-dist/server/assets/clsx-D_N5PN_2.js +16 -0
  225. package/bundle/web-dist/server/assets/{lazyRouteComponent-Dtd0NR4r.js → lazyRouteComponent-D8iTIHyn.js} +129 -2
  226. package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +825 -0
  227. package/bundle/web-dist/server/assets/{monit-DvzribSE.js → monit-B2hqorPe.js} +385 -126
  228. package/bundle/web-dist/server/assets/plus-DwG7h9kq.js +28 -0
  229. package/bundle/web-dist/server/assets/{react-dom-B4a6-uuR.js → react-dom-BIYQzBqG.js} +2 -129
  230. package/bundle/web-dist/server/assets/refresh-cw-mMBkwOq0.js +44 -0
  231. package/bundle/web-dist/server/assets/{request-model-CbqfnQOJ.js → request-model-I6OdODSH.js} +15 -6
  232. package/bundle/web-dist/server/assets/{routes-BAPWTizT.js → routes-B95YlUv2.js} +760 -213
  233. package/bundle/web-dist/server/assets/{services.generated-CEbGjsI0.js → services.generated-DQATJ6qf.js} +12821 -12194
  234. package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +830 -0
  235. package/bundle/web-dist/server/assets/{show-CxVZTAdv.js → show-Bxaj3rhH.js} +1355 -419
  236. package/bundle/web-dist/server/assets/tokens-CZjH3cB7.js +1038 -0
  237. package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +18 -0
  238. package/bundle/web-dist/server/assets/use-oauth-login-flow-CKDHgc3U.js +2379 -0
  239. package/bundle/web-dist/server/assets/{use-update-token-mutation-CfYmk_4_.js → use-update-token-mutation-BEbgOzaa.js} +1 -1
  240. package/bundle/web-dist/server/entry-server.generated.js +4303 -22810
  241. package/dist/cli.js +9 -9
  242. package/package.json +4 -11
  243. package/postinstall.mjs +12 -0
  244. package/skills/qgrid/SKILL.md +1 -0
  245. package/skills/qgrid/references/cli-env-and-server-boot.md +4 -1
  246. package/skills/qgrid/references/decision-rationale.md +24 -1
  247. package/skills/qgrid/references/grok-runtime.md +89 -0
  248. package/skills/qgrid/references/provider-runtime-differences.md +30 -29
  249. package/skills/qgrid/references/repo-map.md +10 -0
  250. package/skills/qgrid/references/request-log-run-lifecycle.md +1 -1
  251. package/skills/qgrid/references/sonamu-api-web-flow.md +1 -1
  252. package/skills/qgrid/references/token-auth-quota-lifecycle.md +56 -3
  253. package/bundle/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +0 -406
  254. package/bundle/dist/node_modules/.pnpm/@vitest_expect@4.1.10/node_modules/@vitest/expect/dist/index.js +0 -1507
  255. package/bundle/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.10/node_modules/@vitest/pretty-format/dist/index.js +0 -887
  256. package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/chunk-artifact.js +0 -2756
  257. package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/index.js +0 -8
  258. package/bundle/dist/node_modules/.pnpm/@vitest_runner@4.1.10/node_modules/@vitest/runner/dist/utils.js +0 -8
  259. package/bundle/dist/node_modules/.pnpm/@vitest_snapshot@4.1.10/node_modules/@vitest/snapshot/dist/index.js +0 -922
  260. package/bundle/dist/node_modules/.pnpm/@vitest_spy@4.1.10/node_modules/@vitest/spy/dist/index.js +0 -386
  261. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +0 -121
  262. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/constants.js +0 -51
  263. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/diff.js +0 -1317
  264. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/display.js +0 -561
  265. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/error.js +0 -40
  266. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/helpers.js +0 -272
  267. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/offset.js +0 -27
  268. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/serialize.js +0 -77
  269. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/source-map.js +0 -381
  270. package/bundle/dist/node_modules/.pnpm/@vitest_utils@4.1.10/node_modules/@vitest/utils/dist/timers.js +0 -51
  271. package/bundle/dist/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.js +0 -2986
  272. package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.js +0 -10
  273. package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.js +0 -109
  274. package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.js +0 -10
  275. package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.js +0 -10
  276. package/bundle/dist/node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.js +0 -10
  277. package/bundle/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +0 -1126
  278. package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -21
  279. package/bundle/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -432
  280. package/bundle/dist/node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.js +0 -517
  281. package/bundle/dist/node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.js +0 -101
  282. package/bundle/dist/node_modules/.pnpm/vite@8.0.3_@emnapi_core@1.11.2_@emnapi_runtime@1.11.2_@types_node@25.0.7_esbuild@0.27.4_5b35fc1fb85d2af4d105e0d74f940f50/node_modules/vite/dist/node/module-runner.js +0 -1265
  283. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -9
  284. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/benchmark.CX_oY03V.js +0 -41
  285. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -19
  286. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.Chj8NDwU.js +0 -202
  287. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/index.DdgEv5B1.js +0 -46
  288. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js +0 -119
  289. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/test.DNmyFkvJ.js +0 -3044
  290. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js +0 -59
  291. package/bundle/dist/node_modules/.pnpm/vitest@4.1.10_@opentelemetry_api@1.9.0_@types_node@25.0.7_@vitest_coverage-v8@4.1.10_vi_a1977b93af7bb69308bcb1dbab39b618/node_modules/vitest/dist/index.js +0 -28
  292. package/bundle/dist/testing/setup-mocks.js +0 -16
  293. package/bundle/src/testing/setup-mocks.ts +0 -44
  294. package/bundle/web-dist/client/assets/index-Bw2s88Ot.css +0 -1
  295. package/bundle/web-dist/client/assets/index-CrXKu_J8.js +0 -106
  296. package/bundle/web-dist/client/assets/logs-B2SmWJXA.js +0 -1
  297. package/bundle/web-dist/client/assets/monit-D-JwXXoA.js +0 -1
  298. package/bundle/web-dist/client/assets/plus-B62CuqT8.js +0 -1
  299. package/bundle/web-dist/client/assets/refresh-cw-NNcU0Cmq.js +0 -1
  300. package/bundle/web-dist/client/assets/request-model-CojtinqK.js +0 -1
  301. package/bundle/web-dist/client/assets/routes-C5r4gTvY.js +0 -5
  302. package/bundle/web-dist/client/assets/settings-D3tDSAck.js +0 -1
  303. package/bundle/web-dist/client/assets/show-Cah_kUKC.js +0 -2
  304. package/bundle/web-dist/client/assets/tokens-DU2Iyxxd.js +0 -1
  305. package/bundle/web-dist/client/assets/use-oauth-login-flow-D0UaR9_e.js +0 -1
  306. package/bundle/web-dist/client/assets/use-update-token-mutation-DAq0F8p-.js +0 -1
  307. package/bundle/web-dist/client/assets/vendor-react-DH4kUfK2.js +0 -9
  308. package/bundle/web-dist/client/assets/vendor-tanstack-DJRQAbrY.js +0 -1
  309. package/bundle/web-dist/server/assets/logs-l91avYif.js +0 -509
  310. package/bundle/web-dist/server/assets/plus-KZrECewT.js +0 -19
  311. package/bundle/web-dist/server/assets/refresh-cw-BND93JrF.js +0 -23
  312. package/bundle/web-dist/server/assets/settings-BZR5HSAL.js +0 -461
  313. package/bundle/web-dist/server/assets/tokens-D1hb4eKk.js +0 -448
  314. package/bundle/web-dist/server/assets/use-oauth-login-flow-Cvdy0zF8.js +0 -178
  315. package/dist/cli.d.ts +0 -10
  316. /package/bundle/web-dist/client/assets/{cost-DH2jZbrw.js → cost-DB3HbU7T.js} +0 -0
  317. /package/bundle/web-dist/client/assets/{preload-helper-ca-nBW7U.js → preload-helper-DWTEM3RW.js} +0 -0
  318. /package/bundle/web-dist/server/assets/{cost-eEHeTRT5.js → cost-BC9yzyA9.js} +0 -0
@@ -0,0 +1,31 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tokens-QvP410NW.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/use-oauth-login-flow-Bzdh28Ws.js","assets/vendor-tanstack-Bf_jag9G.js","assets/vendor-react-CUFFrVN9.js","assets/services.generated-CefiDXEv.js","assets/clsx-5XM_pHvN.js","assets/use-update-token-mutation-CfJKaxmR.js","assets/plus-sdACTfH0.js","assets/settings-DNDvFGSw.js","assets/monit-BS9no0dU.js","assets/cost-DB3HbU7T.js","assets/refresh-cw-CY8o_1cT.js","assets/logs-C47OJGEI.js","assets/total-cost-MnfKU8IN.js","assets/request-model-BRtFuZvj.js","assets/routes-kqgkUxE8.js","assets/show-u8Np69q3.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t,t as n}from"./rolldown-runtime-Dw2cE7zH.js";import{A as r,C as i,D as a,E as o,F as s,M as c,N as l,O as u,P as d,S as f,T as p,_ as m,a as h,b as g,c as _,d as v,i as y,j as b,k as x,l as S,n as C,o as w,r as T,s as E,t as D,w as O,x as ee,y as te}from"./vendor-tanstack-Bf_jag9G.js";import{a as ne,i as re,n as k,r as ie,t as ae}from"./vendor-react-CUFFrVN9.js";import{C as oe,D as se,E as A,O as ce,S as le,T as j,_ as M,b as N,c as ue,d as de,f as fe,g as pe,h as P,l as me,m as he,n as ge,o as _e,p as ve,s as ye,v as be,w as F,x as xe,y as Se}from"./services.generated-CefiDXEv.js";import{t as Ce}from"./preload-helper-DWTEM3RW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function we(e){return e}function Te(e,t,n){if(typeof t!=`object`||!t)return;let i=e.getMutationCache(),a=e.getQueryCache(),o=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??we,s=t.mutations||[],c=t.queries||[];s.forEach(({state:t,...r})=>{i.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...r},t)}),c.forEach(({queryKey:t,state:i,queryHash:s,meta:c,promise:l,dehydratedAt:u})=>{let d=l?O(l):void 0,f=i.data===void 0?d?.data:i.data,p=f===void 0?f:o(f),m=a.get(s),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&u!==void 0&&u>m.state.dataUpdatedAt;if(i.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=i;m.setState({...t,data:p})}}else m=a.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:s,meta:c},{...i,data:p,fetchStatus:`idle`,status:p===void 0?i.status:`success`});l&&!h&&!g&&(u===void 0||u>m.state.dataUpdatedAt)&&m.fetch(void 0,{initialPromise:Promise.resolve(l).then(o)}).catch(r)})}var Ee=class extends s{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new te({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=De(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=De(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=De(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=De(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){i.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>u(t,e))}findAll(e={}){return this.getAll().filter(t=>u(e,t))}notify(e){i.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return i.batch(()=>Promise.all(e.map(e=>e.continue().catch(r))))}};function De(e){return e.options.scope?.id}var Oe=class extends s{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??a(r,t),o=this.get(i);return o||(o=new ee({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){i.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>x(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>x(e,t)):t}notify(e){i.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ke=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Oe,this.#t=e.mutationCache||new Ee,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=d.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=f.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(c(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=p(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return i.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;i.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return i.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},a=i.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(a).then(r).catch(r)}invalidateQueries(e,t={}){return i.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},a=i.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(a).then(r)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(c(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r).catch(r)}fetchInfiniteQuery(e){return e.behavior=g(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r).catch(r)}ensureInfiniteQueryData(e){return e.behavior=g(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return f.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(o(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{b(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(o(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{b(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=a(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===l&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ae=t(k(),1),I=t(ne()),L=ae(),je=`~icons/lucide/file-text.jsx`,Me=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,L.jsxDEV)(`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`},void 0,!1,{fileName:je,lineNumber:2,columnNumber:196},void 0),(0,L.jsxDEV)(`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8`},void 0,!1,{fileName:je,lineNumber:2,columnNumber:319},void 0)]},void 0,!0,{fileName:je,lineNumber:2,columnNumber:98},void 0)},void 0,!1,{fileName:je,lineNumber:2,columnNumber:33},void 0),Ne=`~icons/lucide/home.jsx`,Pe=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,L.jsxDEV)(`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`},void 0,!1,{fileName:Ne,lineNumber:2,columnNumber:192},void 0),(0,L.jsxDEV)(`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`},void 0,!1,{fileName:Ne,lineNumber:2,columnNumber:247},void 0)]},void 0,!0,{fileName:Ne,lineNumber:2,columnNumber:94},void 0)},void 0,!1,{fileName:Ne,lineNumber:2,columnNumber:29},void 0),Fe=`~icons/lucide/key-round.jsx`,Ie=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,L.jsxDEV)(`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`},void 0,!1,{fileName:Fe,lineNumber:2,columnNumber:196},void 0),(0,L.jsxDEV)(`circle`,{cx:16.5,cy:7.5,r:.5,fill:`currentColor`},void 0,!1,{fileName:Fe,lineNumber:2,columnNumber:379},void 0)]},void 0,!0,{fileName:Fe,lineNumber:2,columnNumber:98},void 0)},void 0,!1,{fileName:Fe,lineNumber:2,columnNumber:33},void 0),Le=`~icons/lucide/settings.jsx`,Re=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,L.jsxDEV)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`},void 0,!1,{fileName:Le,lineNumber:2,columnNumber:196},void 0),(0,L.jsxDEV)(`circle`,{cx:12,cy:12,r:3},void 0,!1,{fileName:Le,lineNumber:2,columnNumber:536},void 0)]},void 0,!0,{fileName:Le,lineNumber:2,columnNumber:98},void 0)},void 0,!1,{fileName:Le,lineNumber:2,columnNumber:33},void 0),ze=`~icons/lucide/terminal.jsx`,Be=[{label:`Overview`,items:[{title:`Dashboard`,path:`/`,icon:Pe}]},{label:`Manage`,items:[{title:`Tokens`,path:`/tokens`,icon:Ie},{title:`Request Logs`,shortTitle:`Logs`,path:`/logs`,icon:Me},{title:`Server Logs`,shortTitle:`Server`,path:`/monit`,icon:e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 19h8M4 17l6-6l-6-6`},void 0,!1,{fileName:ze,lineNumber:2,columnNumber:98},void 0)},void 0,!1,{fileName:ze,lineNumber:2,columnNumber:33},void 0)},{title:`Settings`,path:`/settings`,icon:Re}]}],Ve=Be.flatMap(e=>e.items);function He(e,t){return e===`/`?t===`/`||t===``:t.startsWith(e)}var Ue=`/home/runner/work/qgrid/qgrid/packages/web/src/components/BottomNav.tsx`;function We(){let e=v({select:e=>e.location.pathname});return(0,L.jsxDEV)(`nav`,{className:`md:hidden shrink-0 border-t border-sand-200/60 bg-sand-50/95 backdrop-blur-sm pb-[env(safe-area-inset-bottom)]`,children:(0,L.jsxDEV)(`div`,{className:`flex`,children:Ve.map(t=>{let n=He(t.path,e);return(0,L.jsxDEV)(S,{to:t.path,className:`flex-1 flex flex-col items-center gap-0.5 py-2 no-underline transition-colors duration-150 ${n?`text-sienna-600`:`text-sand-500`}`,children:[(0,L.jsxDEV)(t.icon,{className:`size-5 ${n?`text-sienna-500`:`text-sand-400`}`},void 0,!1,{fileName:Ue,lineNumber:29,columnNumber:15},this),(0,L.jsxDEV)(`span`,{className:`text-[10px] ${n?`font-medium`:``}`,children:t.shortTitle??t.title},void 0,!1,{fileName:Ue,lineNumber:30,columnNumber:15},this)]},t.path,!0,{fileName:Ue,lineNumber:22,columnNumber:13},this)})},void 0,!1,{fileName:Ue,lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:Ue,lineNumber:16,columnNumber:5},this)}var Ge=class extends Error{name=`Assertion`;code=`ERR_ASSERTION`;constructor(e,t,n,r,i){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=t,this.expected=n,this.generated=i,this.operator=r}};function R(e,t){qe(!!e,!1,!0,`ok`,`Expected value to be truthy`,t)}function Ke(e){qe(!1,!1,!0,`ok`,`Unreachable`,e)}function qe(e,t,n,r,i,a){if(!e)throw a instanceof Error?a:new Ge(a||i,t,n,r,!a)}function Je(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ye=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ze={};function Qe(e,t){return((t||Ze).jsx?Xe:Ye).test(e)}var $e=/[ \t\n\f\r]/g;function et(e){return typeof e==`object`?e.type===`text`?tt(e.value):!1:tt(e)}function tt(e){return e.replace($e,``)===``}var nt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};nt.prototype.normal={},nt.prototype.property={},nt.prototype.space=void 0;function rt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new nt(n,r,t)}function it(e){return e.toLowerCase()}var at=class{constructor(e,t){this.attribute=t,this.property=e}};at.prototype.attribute=``,at.prototype.booleanish=!1,at.prototype.boolean=!1,at.prototype.commaOrSpaceSeparated=!1,at.prototype.commaSeparated=!1,at.prototype.defined=!1,at.prototype.mustUseProperty=!1,at.prototype.number=!1,at.prototype.overloadedBoolean=!1,at.prototype.property=``,at.prototype.spaceSeparated=!1,at.prototype.space=void 0;var ot=e({boolean:()=>z,booleanish:()=>B,commaOrSpaceSeparated:()=>ut,commaSeparated:()=>lt,number:()=>V,overloadedBoolean:()=>ct,spaceSeparated:()=>H}),st=0,z=dt(),B=dt(),ct=dt(),V=dt(),H=dt(),lt=dt(),ut=dt();function dt(){return 2**++st}var ft=Object.keys(ot),pt=class extends at{constructor(e,t,n,r){let i=-1;if(super(e,t),mt(this,`space`,r),typeof n==`number`)for(;++i<ft.length;){let e=ft[i];mt(this,ft[i],(n&ot[e])===ot[e])}}};pt.prototype.defined=!0;function mt(e,t,n){n&&(e[t]=n)}function ht(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new pt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[it(r)]=r,n[it(a.attribute)]=r}return new nt(t,n,e.space)}var gt=ht({properties:{ariaActiveDescendant:null,ariaAtomic:B,ariaAutoComplete:null,ariaBusy:B,ariaChecked:B,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:H,ariaCurrent:null,ariaDescribedBy:H,ariaDetails:null,ariaDisabled:B,ariaDropEffect:H,ariaErrorMessage:null,ariaExpanded:B,ariaFlowTo:H,ariaGrabbed:B,ariaHasPopup:null,ariaHidden:B,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:H,ariaLevel:V,ariaLive:null,ariaModal:B,ariaMultiLine:B,ariaMultiSelectable:B,ariaOrientation:null,ariaOwns:H,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:B,ariaReadOnly:B,ariaRelevant:null,ariaRequired:B,ariaRoleDescription:H,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:B,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function _t(e,t){return t in e?e[t]:t}function vt(e,t){return _t(e,t.toLowerCase())}var yt=ht({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:lt,acceptCharset:H,accessKey:H,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:H,autoFocus:z,autoPlay:z,blocking:H,capture:null,charSet:null,checked:z,cite:null,className:H,cols:V,colSpan:null,content:null,contentEditable:B,controls:z,controlsList:H,coords:V|lt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:ct,draggable:B,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:H,height:V,hidden:ct,high:V,href:null,hrefLang:null,htmlFor:H,httpEquiv:H,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:H,itemRef:H,itemScope:z,itemType:H,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:z,optimum:V,pattern:null,ping:H,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:H,required:z,reversed:z,rows:V,rowSpan:V,sandbox:H,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:B,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:B,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:H,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:B,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:z,disableRemotePlayback:z,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:vt}),bt=ht({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:ut,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:H,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:lt,g2:lt,glyphName:lt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:ut,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:H,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ut,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ut,rev:ut,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ut,requiredFeatures:ut,requiredFonts:ut,requiredFormats:ut,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:ut,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ut,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ut,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:_t}),xt=ht({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),St=ht({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:vt}),Ct=ht({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),wt={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`},Tt=/[A-Z]/g,Et=/-[a-z]/g,Dt=/^data[-\w.:]+$/i;function Ot(e,t){let n=it(t),r=t,i=at;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Dt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Et,At);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Et.test(e)){let n=e.replace(Tt,kt);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=pt}return new i(r,t)}function kt(e){return`-`+e.toLowerCase()}function At(e){return e.charAt(1).toUpperCase()}var jt=rt([gt,yt,xt,St,Ct],`html`),Mt=rt([gt,bt,xt,St,Ct],`svg`);function Nt(e){return e.join(` `).trim()}var Pt=n(((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,u=`
3
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Ft=n((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(Pt());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}})),It=n((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))}})),Lt=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Ft()),r=It();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})),Rt=Bt(`end`),zt=Bt(`start`);function Bt(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 Vt(e){let t=zt(e),n=Rt(e);if(t&&n)return{start:t,end:n}}function Ht(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Wt(e.position):`start`in e||`end`in e?Wt(e):`line`in e||`column`in e?Ut(e):``}function Ut(e){return Gt(e&&e.line)+`:`+Gt(e&&e.column)}function Wt(e){return Ut(e&&e.start)+`-`+Ut(e&&e.end)}function Gt(e){return e&&typeof e==`number`?e:1}var U=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Ht(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};U.prototype.file=``,U.prototype.name=``,U.prototype.reason=``,U.prototype.message=``,U.prototype.stack=``,U.prototype.column=void 0,U.prototype.line=void 0,U.prototype.ancestors=void 0,U.prototype.cause=void 0,U.prototype.fatal=void 0,U.prototype.place=void 0,U.prototype.ruleId=void 0,U.prototype.source=void 0;var Kt=t(Lt(),1),qt={}.hasOwnProperty,Jt=new Map,Yt=/[A-Z]/g,Xt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Zt=new Set([`td`,`th`]),Qt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function $t(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=dn(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=un(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Mt:jt,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=en(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function en(e,t,n){if(t.type===`element`)return tn(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return nn(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return an(e,t,n);if(t.type===`mdxjsEsm`)return rn(e,t);if(t.type===`root`)return on(e,t,n);if(t.type===`text`)return sn(e,t)}function tn(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Mt,e.schema=i),e.ancestors.push(t);let a=_n(e,t.tagName,!1),o=fn(e,t),s=mn(e,t);return Xt.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!et(e):!0})),cn(e,o,a,t),ln(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nn(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return R(n.type===`ExpressionStatement`),e.evaluater.evaluateExpression(n.expression)}vn(e,t.position)}function rn(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vn(e,t.position)}function an(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Mt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:_n(e,t.name,!0),o=pn(e,t),s=mn(e,t);return cn(e,o,a,t),ln(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function on(e,t,n){let r={};return ln(r,mn(e,t)),e.create(t,e.Fragment,r,n)}function sn(e,t){return t.value}function cn(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ln(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function un(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function dn(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=zt(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function fn(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&qt.call(t.properties,i)){let a=hn(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Zt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function pn(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];R(t.type===`ExpressionStatement`);let i=t.expression;R(i.type===`ObjectExpression`);let a=i.properties[0];R(a.type===`SpreadElement`),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else vn(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];R(t.type===`ExpressionStatement`),a=e.evaluater.evaluateExpression(t.expression)}else vn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function mn(e,t){let n=[],r=-1,i=e.passKeys?new Map:Jt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=en(e,a,o);s!==void 0&&n.push(s)}return n}function hn(e,t,n){let r=Ot(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Je(n):Nt(n)),r.property===`style`){let t=typeof n==`object`?n:gn(e,String(n));return e.stylePropertyNameCase===`css`&&(t=yn(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?wt[r.property]||r.property:r.attribute,n]}}function gn(e,t){try{return(0,Kt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new U("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Qt+`#cannot-parse-style-attribute`,r}}function _n(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Qe(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}R(i,`always a result`),r=i}else r=Qe(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return qt.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);vn(e)}function vn(e,t){let n=new U("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Qt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function yn(e){let t={},n;for(n in e)qt.call(e,n)&&(t[bn(n)]=e[n]);return t}function bn(e){let t=e.replace(Yt,xn);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function xn(e){return`-`+e.toLowerCase()}var Sn={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Cn={};function wn(e,t){let n=t||Cn;return Tn(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Tn(e,t,n){if(Dn(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return En(e.children,t,n)}return Array.isArray(e)?En(e,t,n):``}function En(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Tn(e[i],t,n);return r.join(``)}function Dn(e){return!!(e&&typeof e==`object`)}var On=document.createElement(`i`);function kn(e){let t=`&`+e+`;`;On.innerHTML=t;let n=On.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}var W={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},G={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:`CDATA[`,characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:`content`,contentTypeDocument:`document`,contentTypeFlow:`flow`,contentTypeString:`string`,contentTypeText:`text`,hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},K={data:`data`,whitespace:`whitespace`,lineEnding:`lineEnding`,lineEndingBlank:`lineEndingBlank`,linePrefix:`linePrefix`,lineSuffix:`lineSuffix`,atxHeading:`atxHeading`,atxHeadingSequence:`atxHeadingSequence`,atxHeadingText:`atxHeadingText`,autolink:`autolink`,autolinkEmail:`autolinkEmail`,autolinkMarker:`autolinkMarker`,autolinkProtocol:`autolinkProtocol`,characterEscape:`characterEscape`,characterEscapeValue:`characterEscapeValue`,characterReference:`characterReference`,characterReferenceMarker:`characterReferenceMarker`,characterReferenceMarkerNumeric:`characterReferenceMarkerNumeric`,characterReferenceMarkerHexadecimal:`characterReferenceMarkerHexadecimal`,characterReferenceValue:`characterReferenceValue`,codeFenced:`codeFenced`,codeFencedFence:`codeFencedFence`,codeFencedFenceSequence:`codeFencedFenceSequence`,codeFencedFenceInfo:`codeFencedFenceInfo`,codeFencedFenceMeta:`codeFencedFenceMeta`,codeFlowValue:`codeFlowValue`,codeIndented:`codeIndented`,codeText:`codeText`,codeTextData:`codeTextData`,codeTextPadding:`codeTextPadding`,codeTextSequence:`codeTextSequence`,content:`content`,definition:`definition`,definitionDestination:`definitionDestination`,definitionDestinationLiteral:`definitionDestinationLiteral`,definitionDestinationLiteralMarker:`definitionDestinationLiteralMarker`,definitionDestinationRaw:`definitionDestinationRaw`,definitionDestinationString:`definitionDestinationString`,definitionLabel:`definitionLabel`,definitionLabelMarker:`definitionLabelMarker`,definitionLabelString:`definitionLabelString`,definitionMarker:`definitionMarker`,definitionTitle:`definitionTitle`,definitionTitleMarker:`definitionTitleMarker`,definitionTitleString:`definitionTitleString`,emphasis:`emphasis`,emphasisSequence:`emphasisSequence`,emphasisText:`emphasisText`,escapeMarker:`escapeMarker`,hardBreakEscape:`hardBreakEscape`,hardBreakTrailing:`hardBreakTrailing`,htmlFlow:`htmlFlow`,htmlFlowData:`htmlFlowData`,htmlText:`htmlText`,htmlTextData:`htmlTextData`,image:`image`,label:`label`,labelText:`labelText`,labelLink:`labelLink`,labelImage:`labelImage`,labelMarker:`labelMarker`,labelImageMarker:`labelImageMarker`,labelEnd:`labelEnd`,link:`link`,paragraph:`paragraph`,reference:`reference`,referenceMarker:`referenceMarker`,referenceString:`referenceString`,resource:`resource`,resourceDestination:`resourceDestination`,resourceDestinationLiteral:`resourceDestinationLiteral`,resourceDestinationLiteralMarker:`resourceDestinationLiteralMarker`,resourceDestinationRaw:`resourceDestinationRaw`,resourceDestinationString:`resourceDestinationString`,resourceMarker:`resourceMarker`,resourceTitle:`resourceTitle`,resourceTitleMarker:`resourceTitleMarker`,resourceTitleString:`resourceTitleString`,setextHeading:`setextHeading`,setextHeadingText:`setextHeadingText`,setextHeadingLine:`setextHeadingLine`,setextHeadingLineSequence:`setextHeadingLineSequence`,strong:`strong`,strongSequence:`strongSequence`,strongText:`strongText`,thematicBreak:`thematicBreak`,thematicBreakSequence:`thematicBreakSequence`,blockQuote:`blockQuote`,blockQuotePrefix:`blockQuotePrefix`,blockQuoteMarker:`blockQuoteMarker`,blockQuotePrefixWhitespace:`blockQuotePrefixWhitespace`,listOrdered:`listOrdered`,listUnordered:`listUnordered`,listItemIndent:`listItemIndent`,listItemMarker:`listItemMarker`,listItemPrefix:`listItemPrefix`,listItemPrefixWhitespace:`listItemPrefixWhitespace`,listItemValue:`listItemValue`,chunkDocument:`chunkDocument`,chunkContent:`chunkContent`,chunkFlow:`chunkFlow`,chunkText:`chunkText`,chunkString:`chunkString`},An={ht:` `,lf:`
4
+ `,cr:`\r`,space:` `,exclamationMark:`!`,quotationMark:`"`,numberSign:`#`,dollarSign:`$`,percentSign:`%`,ampersand:`&`,apostrophe:`'`,leftParenthesis:`(`,rightParenthesis:`)`,asterisk:`*`,plusSign:`+`,comma:`,`,dash:`-`,dot:`.`,slash:`/`,digit0:`0`,digit1:`1`,digit2:`2`,digit3:`3`,digit4:`4`,digit5:`5`,digit6:`6`,digit7:`7`,digit8:`8`,digit9:`9`,colon:`:`,semicolon:`;`,lessThan:`<`,equalsTo:`=`,greaterThan:`>`,questionMark:`?`,atSign:`@`,uppercaseA:`A`,uppercaseB:`B`,uppercaseC:`C`,uppercaseD:`D`,uppercaseE:`E`,uppercaseF:`F`,uppercaseG:`G`,uppercaseH:`H`,uppercaseI:`I`,uppercaseJ:`J`,uppercaseK:`K`,uppercaseL:`L`,uppercaseM:`M`,uppercaseN:`N`,uppercaseO:`O`,uppercaseP:`P`,uppercaseQ:`Q`,uppercaseR:`R`,uppercaseS:`S`,uppercaseT:`T`,uppercaseU:`U`,uppercaseV:`V`,uppercaseW:`W`,uppercaseX:`X`,uppercaseY:`Y`,uppercaseZ:`Z`,leftSquareBracket:`[`,backslash:`\\`,rightSquareBracket:`]`,caret:`^`,underscore:`_`,graveAccent:"`",lowercaseA:`a`,lowercaseB:`b`,lowercaseC:`c`,lowercaseD:`d`,lowercaseE:`e`,lowercaseF:`f`,lowercaseG:`g`,lowercaseH:`h`,lowercaseI:`i`,lowercaseJ:`j`,lowercaseK:`k`,lowercaseL:`l`,lowercaseM:`m`,lowercaseN:`n`,lowercaseO:`o`,lowercaseP:`p`,lowercaseQ:`q`,lowercaseR:`r`,lowercaseS:`s`,lowercaseT:`t`,lowercaseU:`u`,lowercaseV:`v`,lowercaseW:`w`,lowercaseX:`x`,lowercaseY:`y`,lowercaseZ:`z`,leftCurlyBrace:`{`,verticalBar:`|`,rightCurlyBrace:`}`,tilde:`~`,replacementCharacter:`�`};function jn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<G.v8MaxSafeChunkSize)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+G.v8MaxSafeChunkSize),o.unshift(t,0),e.splice(...o),a+=G.v8MaxSafeChunkSize,t+=G.v8MaxSafeChunkSize}function Mn(e,t){return e.length>0?(jn(e,e.length,0,t),e):t}var Nn={}.hasOwnProperty;function Pn(e){let t={},n=-1;for(;++n<e.length;)Fn(t,e[n]);return t}function Fn(e,t){let n;for(n in t){let r=(Nn.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Nn.call(r,a)||(r[a]=[]);let e=i[a];In(r[a],Array.isArray(e)?e:e?[e]:[])}}}function In(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);jn(e,0,0,r)}function Ln(e,t){let n=Number.parseInt(e,t);return n<W.ht||n===W.vt||n>W.cr&&n<W.space||n>W.tilde&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?An.replacementCharacter:String.fromCodePoint(n)}function Rn(e){return e.replace(/[\t\n\r ]+/g,An.space).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var zn=qn(/[A-Za-z]/),q=qn(/[\dA-Za-z]/),Bn=qn(/[#-'*+\--9=?A-Z^-~]/);function Vn(e){return e!==null&&(e<W.space||e===W.del)}var Hn=qn(/\d/),Un=qn(/[\dA-Fa-f]/),Wn=qn(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<W.horizontalTab}function Y(e){return e!==null&&(e<W.nul||e===W.space)}function X(e){return e===W.horizontalTab||e===W.virtualSpace||e===W.space}var Gn=qn(/\p{P}|\p{S}/u),Kn=qn(/\s/);function qn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Jn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===W.percentSign&&q(e.charCodeAt(n+1))&&q(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=An.replacementCharacter}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 Z(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return X(r)?(e.enter(n),s(r)):t(r)}function s(r){return X(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Yn={tokenize:Xn};function Xn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(R(n===W.eof||J(n),`expected eol or eof`),n===W.eof){e.consume(n);return}return e.enter(K.lineEnding),e.consume(n),e.exit(K.lineEnding),Z(e,t,K.linePrefix)}function i(t){return R(t!==W.eof&&!J(t),`expected anything other than a line ending or EOF`),e.enter(K.paragraph),a(t)}function a(t){let r=e.enter(K.chunkText,{contentType:G.contentTypeText,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===W.eof){e.exit(K.chunkText),e.exit(K.paragraph),e.consume(t);return}return J(t)?(e.consume(t),e.exit(K.chunkText),a):(e.consume(t),o)}}var Zn={tokenize:$n},Qn={tokenize:er};function $n(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],R(a[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(R(t.containerState,"expected `containerState` to be defined after continuation"),r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===K.chunkFlow){o=t.events[a][1].end;break}R(o,`could not find previous flow chunk`),_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return jn(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Qn,p,m)(n)}function p(e){return R(t.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),R(t.containerState,"expected `containerState` to be defined on tokenizer"),r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===W.eof){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(K.chunkFlow,{_tokenizer:i,contentType:G.contentTypeFlow,previous:a}),h(n)}function h(n){if(n===W.eof){g(e.exit(K.chunkFlow),!0),_(0),e.consume(n);return}return J(n)?(e.consume(n),g(e.exit(K.chunkFlow)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){R(i,"expected `childFlow` to be defined when continuing");let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===K.chunkFlow){if(s){c=t.events[a][1].end;break}s=!0}for(R(c,`could not find previous flow chunk`),_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;jn(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],R(r[0].exit,"expected `exit` to be defined on container construct"),r[0].exit.call(t,e)}n.length=r}function v(){R(t.containerState,"expected `containerState` to be defined when closing flow"),R(i,"expected `childFlow` to be defined when closing it"),i.write([W.eof]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function er(e,t,n){return R(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),Z(e,e.attempt(this.parser.constructs.document,t,n),K.linePrefix,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize)}function tr(e){if(e===W.eof||Y(e)||Kn(e))return G.characterGroupWhitespace;if(Gn(e))return G.characterGroupPunctuation}function nr(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var rr={name:`attention`,resolveAll:ir,tokenize:ar};function ir(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};or(d,-c),or(f,c),o={type:c>1?K.strongSequence:K.emphasisSequence,start:d,end:{...e[r][1].end}},s={type:c>1?K.strongSequence:K.emphasisSequence,start:{...e[n][1].start},end:f},a={type:c>1?K.strongText:K.emphasisText,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?K.strong:K.emphasis,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Mn(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Mn(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),R(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=Mn(l,nr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Mn(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Mn(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,jn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function ar(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tr(r),a;return o;function o(t){return R(t===W.asterisk||t===W.underscore,`expected asterisk or underscore`),a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=tr(o);R(n,"expected `attentionMarkers` to be populated");let u=!l||l===G.characterGroupPunctuation&&i||n.includes(o),d=!i||i===G.characterGroupPunctuation&&l||n.includes(r);return c._open=!!(a===W.asterisk?u:u&&(i||!d)),c._close=!!(a===W.asterisk?d:d&&(l||!u)),t(o)}}function or(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var sr={name:`autolink`,tokenize:cr};function cr(e,t,n){let r=0;return i;function i(t){return R(t===W.lessThan,"expected `<`"),e.enter(K.autolink),e.enter(K.autolinkMarker),e.consume(t),e.exit(K.autolinkMarker),e.enter(K.autolinkProtocol),a}function a(t){return zn(t)?(e.consume(t),o):t===W.atSign?n(t):l(t)}function o(e){return e===W.plusSign||e===W.dash||e===W.dot||q(e)?(r=1,s(e)):l(e)}function s(t){return t===W.colon?(e.consume(t),r=0,c):(t===W.plusSign||t===W.dash||t===W.dot||q(t))&&r++<G.autolinkSchemeSizeMax?(e.consume(t),s):(r=0,l(t))}function c(r){return r===W.greaterThan?(e.exit(K.autolinkProtocol),e.enter(K.autolinkMarker),e.consume(r),e.exit(K.autolinkMarker),e.exit(K.autolink),t):r===W.eof||r===W.space||r===W.lessThan||Vn(r)?n(r):(e.consume(r),c)}function l(t){return t===W.atSign?(e.consume(t),u):Bn(t)?(e.consume(t),l):n(t)}function u(e){return q(e)?d(e):n(e)}function d(n){return n===W.dot?(e.consume(n),r=0,u):n===W.greaterThan?(e.exit(K.autolinkProtocol).type=K.autolinkEmail,e.enter(K.autolinkMarker),e.consume(n),e.exit(K.autolinkMarker),e.exit(K.autolink),t):f(n)}function f(t){if((t===W.dash||q(t))&&r++<G.autolinkDomainSizeMax){let n=t===W.dash?f:d;return e.consume(t),n}return n(t)}}var lr={partial:!0,tokenize:ur};function ur(e,t,n){return r;function r(t){return X(t)?Z(e,i,K.linePrefix)(t):i(t)}function i(e){return e===W.eof||J(e)?t(e):n(e)}}var dr={continuation:{tokenize:pr},exit:mr,name:`blockQuote`,tokenize:fr};function fr(e,t,n){let r=this;return i;function i(t){if(t===W.greaterThan){let n=r.containerState;return R(n,"expected `containerState` to be defined in container"),n.open||=(e.enter(K.blockQuote,{_container:!0}),!0),e.enter(K.blockQuotePrefix),e.enter(K.blockQuoteMarker),e.consume(t),e.exit(K.blockQuoteMarker),a}return n(t)}function a(n){return X(n)?(e.enter(K.blockQuotePrefixWhitespace),e.consume(n),e.exit(K.blockQuotePrefixWhitespace),e.exit(K.blockQuotePrefix),t):(e.exit(K.blockQuotePrefix),t(n))}}function pr(e,t,n){let r=this;return i;function i(t){return X(t)?(R(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Z(e,a,K.linePrefix,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize)(t)):a(t)}function a(r){return e.attempt(dr,t,n)(r)}}function mr(e){e.exit(K.blockQuote)}var hr={name:`characterEscape`,tokenize:gr};function gr(e,t,n){return r;function r(t){return R(t===W.backslash,"expected `\\`"),e.enter(K.characterEscape),e.enter(K.escapeMarker),e.consume(t),e.exit(K.escapeMarker),i}function i(r){return Wn(r)?(e.enter(K.characterEscapeValue),e.consume(r),e.exit(K.characterEscapeValue),e.exit(K.characterEscape),t):n(r)}}var _r={name:`characterReference`,tokenize:vr};function vr(e,t,n){let r=this,i=0,a,o;return s;function s(t){return R(t===W.ampersand,"expected `&`"),e.enter(K.characterReference),e.enter(K.characterReferenceMarker),e.consume(t),e.exit(K.characterReferenceMarker),c}function c(t){return t===W.numberSign?(e.enter(K.characterReferenceMarkerNumeric),e.consume(t),e.exit(K.characterReferenceMarkerNumeric),l):(e.enter(K.characterReferenceValue),a=G.characterReferenceNamedSizeMax,o=q,u(t))}function l(t){return t===W.uppercaseX||t===W.lowercaseX?(e.enter(K.characterReferenceMarkerHexadecimal),e.consume(t),e.exit(K.characterReferenceMarkerHexadecimal),e.enter(K.characterReferenceValue),a=G.characterReferenceHexadecimalSizeMax,o=Un,u):(e.enter(K.characterReferenceValue),a=G.characterReferenceDecimalSizeMax,o=Hn,u(t))}function u(s){if(s===W.semicolon&&i){let i=e.exit(K.characterReferenceValue);return o===q&&!kn(r.sliceSerialize(i))?n(s):(e.enter(K.characterReferenceMarker),e.consume(s),e.exit(K.characterReferenceMarker),e.exit(K.characterReference),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var yr={partial:!0,tokenize:Sr},br={concrete:!0,name:`codeFenced`,tokenize:xr};function xr(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){R(t===W.graveAccent||t===W.tilde,"expected `` ` `` or `~`");let n=r.events[r.events.length-1];return a=n&&n[1].type===K.linePrefix?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(K.codeFenced),e.enter(K.codeFencedFence),e.enter(K.codeFencedFenceSequence),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<G.codeFencedSequenceSizeMin?n(t):(e.exit(K.codeFencedFenceSequence),X(t)?Z(e,d,K.whitespace)(t):d(t))}function d(n){return n===W.eof||J(n)?(e.exit(K.codeFencedFence),r.interrupt?t(n):e.check(yr,h,b)(n)):(e.enter(K.codeFencedFenceInfo),e.enter(K.chunkString,{contentType:G.contentTypeString}),f(n))}function f(t){return t===W.eof||J(t)?(e.exit(K.chunkString),e.exit(K.codeFencedFenceInfo),d(t)):X(t)?(e.exit(K.chunkString),e.exit(K.codeFencedFenceInfo),Z(e,p,K.whitespace)(t)):t===W.graveAccent&&t===s?n(t):(e.consume(t),f)}function p(t){return t===W.eof||J(t)?d(t):(e.enter(K.codeFencedFenceMeta),e.enter(K.chunkString,{contentType:G.contentTypeString}),m(t))}function m(t){return t===W.eof||J(t)?(e.exit(K.chunkString),e.exit(K.codeFencedFenceMeta),d(t)):t===W.graveAccent&&t===s?n(t):(e.consume(t),m)}function h(t){return R(J(t),`expected eol`),e.attempt(i,b,g)(t)}function g(t){return R(J(t),`expected eol`),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),_}function _(t){return a>0&&X(t)?Z(e,v,K.linePrefix,a+1)(t):v(t)}function v(t){return t===W.eof||J(t)?e.check(yr,h,b)(t):(e.enter(K.codeFlowValue),y(t))}function y(t){return t===W.eof||J(t)?(e.exit(K.codeFlowValue),v(t)):(e.consume(t),y)}function b(n){return e.exit(K.codeFenced),t(n)}function x(e,t,n){let i=0;return a;function a(t){return R(J(t),`expected eol`),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),c}function c(t){return R(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),e.enter(K.codeFencedFence),X(t)?Z(e,l,K.linePrefix,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize)(t):l(t)}function l(t){return t===s?(e.enter(K.codeFencedFenceSequence),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(K.codeFencedFenceSequence),X(t)?Z(e,d,K.whitespace)(t):d(t)):n(t)}function d(r){return r===W.eof||J(r)?(e.exit(K.codeFencedFence),t(r)):n(r)}}}function Sr(e,t,n){let r=this;return i;function i(t){return t===W.eof?n(t):(R(J(t),`expected eol`),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Cr={name:`codeIndented`,tokenize:Tr},wr={partial:!0,tokenize:Er};function Tr(e,t,n){let r=this;return i;function i(t){return R(X(t)),e.enter(K.codeIndented),Z(e,a,K.linePrefix,G.tabSize+1)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===K.linePrefix&&t[2].sliceSerialize(t[1],!0).length>=G.tabSize?o(e):n(e)}function o(t){return t===W.eof?c(t):J(t)?e.attempt(wr,o,c)(t):(e.enter(K.codeFlowValue),s(t))}function s(t){return t===W.eof||J(t)?(e.exit(K.codeFlowValue),o(t)):(e.consume(t),s)}function c(n){return e.exit(K.codeIndented),t(n)}}function Er(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):J(t)?(e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),i):Z(e,a,K.linePrefix,G.tabSize+1)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===K.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=G.tabSize?t(e):J(e)?i(e):n(e)}}var Dr={name:`codeText`,previous:kr,resolve:Or,tokenize:Ar};function Or(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===K.lineEnding||e[n][1].type===`space`)&&(e[t][1].type===K.lineEnding||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===K.codeTextData){e[n][1].type=K.codeTextPadding,e[t][1].type=K.codeTextPadding,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==K.lineEnding&&(i=r):(r===t||e[r][1].type===K.lineEnding)&&(e[i][1].type=K.codeTextData,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function kr(e){return e!==W.graveAccent||this.events[this.events.length-1][1].type===K.characterEscape}function Ar(e,t,n){let r=this,i=0,a,o;return s;function s(t){return R(t===W.graveAccent,"expected `` ` ``"),R(kr.call(r,r.previous),`expected correct previous`),e.enter(K.codeText),e.enter(K.codeTextSequence),c(t)}function c(t){return t===W.graveAccent?(e.consume(t),i++,c):(e.exit(K.codeTextSequence),l(t))}function l(t){return t===W.eof?n(t):t===W.space?(e.enter(`space`),e.consume(t),e.exit(`space`),l):t===W.graveAccent?(o=e.enter(K.codeTextSequence),a=0,d(t)):J(t)?(e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),l):(e.enter(K.codeTextData),u(t))}function u(t){return t===W.eof||t===W.space||t===W.graveAccent||J(t)?(e.exit(K.codeTextData),l(t)):(e.consume(t),u)}function d(n){return n===W.graveAccent?(e.consume(n),a++,d):a===i?(e.exit(K.codeTextSequence),e.exit(K.codeText),t(n)):(o.type=K.codeTextData,u(n))}}var jr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Mr(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Mr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Mr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Mr(this.left,t.reverse())}}};function Mr(e,t){let n=0;if(t.length<G.v8MaxSafeChunkSize)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+G.v8MaxSafeChunkSize)),n+=G.v8MaxSafeChunkSize}function Nr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new jr(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===K.chunkFlow&&u.get(n-1)[1].type===K.listItemPrefix&&(R(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===K.lineEndingBlank&&(a+=2),a<c.length&&c[a][1].type===K.content))for(;++a<c.length&&c[a][1].type!==K.content;)c[a][1].type===K.chunkText&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Pr(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===K.lineEnding||o[1].type===K.lineEndingBlank)o[0]===`enter`&&(i&&(u.get(i)[1].type=K.lineEndingBlank),o[1].type=K.lineEnding,i=a);else if(!(o[1].type===K.linePrefix||o[1].type===K.listItemIndent))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return jn(e,0,1/0,u.slice(0)),!l}function Pr(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[];R(n.contentType,"expected `contentType` on subtokens");let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);R(!d||p.previous===d,`expected previous to match`),R(!d||d.next===p,`expected next to match`),a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(W.eof),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(R(p,`expected a current token`),h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0,R(!p.next,`expected no next token`)):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();R(n!==void 0,`expected a start position when splicing`),c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Fr={resolve:Lr,tokenize:Rr},Ir={partial:!0,tokenize:zr};function Lr(e){return Nr(e),e}function Rr(e,t){let n;return r;function r(t){return R(t!==W.eof&&!J(t),`expected no eof or eol`),e.enter(K.content),n=e.enter(K.chunkContent,{contentType:G.contentTypeContent}),i(t)}function i(t){return t===W.eof?a(t):J(t)?e.check(Ir,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(K.chunkContent),e.exit(K.content),t(n)}function o(t){return R(J(t),`expected eol`),e.consume(t),e.exit(K.chunkContent),R(n,`expected previous token`),n.next=e.enter(K.chunkContent,{contentType:G.contentTypeContent,previous:n}),n=n.next,i}}function zr(e,t,n){let r=this;return i;function i(t){return R(J(t),`expected a line ending`),e.exit(K.chunkContent),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),Z(e,a,K.linePrefix)}function a(i){if(i===W.eof||J(i))return n(i);R(r.parser.constructs.disable.null,"expected `disable.null` to be populated");let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===K.linePrefix&&a[2].sliceSerialize(a[1],!0).length>=G.tabSize?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Br(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===W.lessThan?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===W.eof||t===W.space||t===W.rightParenthesis||Vn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(K.chunkString,{contentType:G.contentTypeString}),h(t))}function f(n){return n===W.greaterThan?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(K.chunkString,{contentType:G.contentTypeString}),p(n))}function p(t){return t===W.greaterThan?(e.exit(K.chunkString),e.exit(s),f(t)):t===W.eof||t===W.lessThan||J(t)?n(t):(e.consume(t),t===W.backslash?m:p)}function m(t){return t===W.lessThan||t===W.greaterThan||t===W.backslash?(e.consume(t),p):p(t)}function h(i){return!u&&(i===W.eof||i===W.rightParenthesis||Y(i))?(e.exit(K.chunkString),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===W.leftParenthesis?(e.consume(i),u++,h):i===W.rightParenthesis?(e.consume(i),u--,h):i===W.eof||i===W.space||i===W.leftParenthesis||Vn(i)?n(i):(e.consume(i),i===W.backslash?g:h)}function g(t){return t===W.leftParenthesis||t===W.rightParenthesis||t===W.backslash?(e.consume(t),h):h(t)}}function Vr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return R(t===W.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>G.linkReferenceSizeMax||l===W.eof||l===W.leftSquareBracket||l===W.rightSquareBracket&&!c||l===W.caret&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===W.rightSquareBracket?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(K.lineEnding),e.consume(l),e.exit(K.lineEnding),u):(e.enter(K.chunkString,{contentType:G.contentTypeString}),d(l))}function d(t){return t===W.eof||t===W.leftSquareBracket||t===W.rightSquareBracket||J(t)||s++>G.linkReferenceSizeMax?(e.exit(K.chunkString),u(t)):(e.consume(t),c||=!X(t),t===W.backslash?f:d)}function f(t){return t===W.leftSquareBracket||t===W.backslash||t===W.rightSquareBracket?(e.consume(t),s++,d):d(t)}}function Hr(e,t,n,r,i,a){let o;return s;function s(t){return t===W.quotationMark||t===W.apostrophe||t===W.leftParenthesis?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===W.leftParenthesis?W.rightParenthesis:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===W.eof?n(t):J(t)?(e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),Z(e,l,K.linePrefix)):(e.enter(K.chunkString,{contentType:G.contentTypeString}),u(t))}function u(t){return t===o||t===W.eof||J(t)?(e.exit(K.chunkString),l(t)):(e.consume(t),t===W.backslash?d:u)}function d(t){return t===o||t===W.backslash?(e.consume(t),u):u(t)}}function Ur(e,t){let n;return r;function r(i){return J(i)?(e.enter(K.lineEnding),e.consume(i),e.exit(K.lineEnding),n=!0,r):X(i)?Z(e,r,n?K.linePrefix:K.lineSuffix)(i):t(i)}}var Wr={name:`definition`,tokenize:Kr},Gr={partial:!0,tokenize:qr};function Kr(e,t,n){let r=this,i;return a;function a(t){return e.enter(K.definition),o(t)}function o(t){return R(t===W.leftSquareBracket,"expected `[`"),Vr.call(r,e,s,n,K.definitionLabel,K.definitionLabelMarker,K.definitionLabelString)(t)}function s(t){return i=Rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===W.colon?(e.enter(K.definitionMarker),e.consume(t),e.exit(K.definitionMarker),c):n(t)}function c(t){return Y(t)?Ur(e,l)(t):l(t)}function l(t){return Br(e,u,n,K.definitionDestination,K.definitionDestinationLiteral,K.definitionDestinationLiteralMarker,K.definitionDestinationRaw,K.definitionDestinationString)(t)}function u(t){return e.attempt(Gr,d,d)(t)}function d(t){return X(t)?Z(e,f,K.whitespace)(t):f(t)}function f(a){return a===W.eof||J(a)?(e.exit(K.definition),r.parser.defined.push(i),t(a)):n(a)}}function qr(e,t,n){return r;function r(t){return Y(t)?Ur(e,i)(t):n(t)}function i(t){return Hr(e,a,n,K.definitionTitle,K.definitionTitleMarker,K.definitionTitleString)(t)}function a(t){return X(t)?Z(e,o,K.whitespace)(t):o(t)}function o(e){return e===W.eof||J(e)?t(e):n(e)}}var Jr={name:`hardBreakEscape`,tokenize:Yr};function Yr(e,t,n){return r;function r(t){return R(t===W.backslash,"expected `\\`"),e.enter(K.hardBreakEscape),e.consume(t),i}function i(r){return J(r)?(e.exit(K.hardBreakEscape),t(r)):n(r)}}var Xr={name:`headingAtx`,resolve:Zr,tokenize:Qr};function Zr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===K.whitespace&&(r+=2),n-2>r&&e[n][1].type===K.whitespace&&(n-=2),e[n][1].type===K.atxHeadingSequence&&(r===n-1||n-4>r&&e[n-2][1].type===K.whitespace)&&(n-=r+1===n?2:4),n>r&&(i={type:K.atxHeadingText,start:e[r][1].start,end:e[n][1].end},a={type:K.chunkText,start:e[r][1].start,end:e[n][1].end,contentType:G.contentTypeText},jn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Qr(e,t,n){let r=0;return i;function i(t){return e.enter(K.atxHeading),a(t)}function a(t){return R(t===W.numberSign,"expected `#`"),e.enter(K.atxHeadingSequence),o(t)}function o(t){return t===W.numberSign&&r++<G.atxHeadingOpeningFenceSizeMax?(e.consume(t),o):t===W.eof||Y(t)?(e.exit(K.atxHeadingSequence),s(t)):n(t)}function s(n){return n===W.numberSign?(e.enter(K.atxHeadingSequence),c(n)):n===W.eof||J(n)?(e.exit(K.atxHeading),t(n)):X(n)?Z(e,s,K.whitespace)(n):(e.enter(K.atxHeadingText),l(n))}function c(t){return t===W.numberSign?(e.consume(t),c):(e.exit(K.atxHeadingSequence),s(t))}function l(t){return t===W.eof||t===W.numberSign||Y(t)?(e.exit(K.atxHeadingText),s(t)):(e.consume(t),l)}}var $r=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ei=[`pre`,`script`,`style`,`textarea`],ti={concrete:!0,name:`htmlFlow`,resolveTo:ii,tokenize:ai},ni={partial:!0,tokenize:si},ri={partial:!0,tokenize:oi};function ii(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===K.htmlFlow););return t>1&&e[t-2][1].type===K.linePrefix&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ai(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return R(t===W.lessThan,"expected `<`"),e.enter(K.htmlFlow),e.enter(K.htmlFlowData),e.consume(t),d}function d(s){return s===W.exclamationMark?(e.consume(s),f):s===W.slash?(e.consume(s),a=!0,h):s===W.questionMark?(e.consume(s),i=G.htmlInstruction,r.interrupt?t:oe):zn(s)?(R(s!==null),e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===W.dash?(e.consume(a),i=G.htmlComment,p):a===W.leftSquareBracket?(e.consume(a),i=G.htmlCdata,s=0,m):zn(a)?(e.consume(a),i=G.htmlDeclaration,r.interrupt?t:oe):n(a)}function p(i){return i===W.dash?(e.consume(i),r.interrupt?t:oe):n(i)}function m(i){let a=G.cdataOpeningString;return i===a.charCodeAt(s++)?(e.consume(i),s===a.length?r.interrupt?t:O:m):n(i)}function h(t){return zn(t)?(R(t!==null),e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===W.eof||s===W.slash||s===W.greaterThan||Y(s)){let c=s===W.slash,l=o.toLowerCase();return!c&&!a&&ei.includes(l)?(i=G.htmlRaw,r.interrupt?t(s):O(s)):$r.includes(o.toLowerCase())?(i=G.htmlBasic,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=G.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===W.dash||q(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===W.greaterThan?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return X(t)?(e.consume(t),v):E(t)}function y(t){return t===W.slash?(e.consume(t),E):t===W.colon||t===W.underscore||zn(t)?(e.consume(t),b):X(t)?(e.consume(t),y):E(t)}function b(t){return t===W.dash||t===W.dot||t===W.colon||t===W.underscore||q(t)?(e.consume(t),b):x(t)}function x(t){return t===W.equalsTo?(e.consume(t),S):X(t)?(e.consume(t),x):y(t)}function S(t){return t===W.eof||t===W.lessThan||t===W.equalsTo||t===W.greaterThan||t===W.graveAccent?n(t):t===W.quotationMark||t===W.apostrophe?(e.consume(t),c=t,C):X(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===W.eof||J(t)?n(t):(e.consume(t),C)}function w(t){return t===W.eof||t===W.quotationMark||t===W.apostrophe||t===W.slash||t===W.lessThan||t===W.equalsTo||t===W.greaterThan||t===W.graveAccent||Y(t)?x(t):(e.consume(t),w)}function T(e){return e===W.slash||e===W.greaterThan||X(e)?y(e):n(e)}function E(t){return t===W.greaterThan?(e.consume(t),D):n(t)}function D(t){return t===W.eof||J(t)?O(t):X(t)?(e.consume(t),D):n(t)}function O(t){return t===W.dash&&i===G.htmlComment?(e.consume(t),re):t===W.lessThan&&i===G.htmlRaw?(e.consume(t),k):t===W.greaterThan&&i===G.htmlDeclaration?(e.consume(t),se):t===W.questionMark&&i===G.htmlInstruction?(e.consume(t),oe):t===W.rightSquareBracket&&i===G.htmlCdata?(e.consume(t),ae):J(t)&&(i===G.htmlBasic||i===G.htmlComplete)?(e.exit(K.htmlFlowData),e.check(ni,A,ee)(t)):t===W.eof||J(t)?(e.exit(K.htmlFlowData),ee(t)):(e.consume(t),O)}function ee(t){return e.check(ri,te,A)(t)}function te(t){return R(J(t)),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),ne}function ne(t){return t===W.eof||J(t)?ee(t):(e.enter(K.htmlFlowData),O(t))}function re(t){return t===W.dash?(e.consume(t),oe):O(t)}function k(t){return t===W.slash?(e.consume(t),o=``,ie):O(t)}function ie(t){if(t===W.greaterThan){let n=o.toLowerCase();return ei.includes(n)?(e.consume(t),se):O(t)}return zn(t)&&o.length<G.htmlRawSizeMax?(R(t!==null),e.consume(t),o+=String.fromCharCode(t),ie):O(t)}function ae(t){return t===W.rightSquareBracket?(e.consume(t),oe):O(t)}function oe(t){return t===W.greaterThan?(e.consume(t),se):t===W.dash&&i===G.htmlComment?(e.consume(t),oe):O(t)}function se(t){return t===W.eof||J(t)?(e.exit(K.htmlFlowData),A(t)):(e.consume(t),se)}function A(n){return e.exit(K.htmlFlow),t(n)}}function oi(e,t,n){let r=this;return i;function i(t){return J(t)?(e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function si(e,t,n){return r;function r(r){return R(J(r),`expected a line ending`),e.enter(K.lineEnding),e.consume(r),e.exit(K.lineEnding),e.attempt(lr,t,n)}}var ci={name:`htmlText`,tokenize:li};function li(e,t,n){let r=this,i,a,o;return s;function s(t){return R(t===W.lessThan,"expected `<`"),e.enter(K.htmlText),e.enter(K.htmlTextData),e.consume(t),c}function c(t){return t===W.exclamationMark?(e.consume(t),l):t===W.slash?(e.consume(t),x):t===W.questionMark?(e.consume(t),y):zn(t)?(e.consume(t),w):n(t)}function l(t){return t===W.dash?(e.consume(t),u):t===W.leftSquareBracket?(e.consume(t),a=0,m):zn(t)?(e.consume(t),v):n(t)}function u(t){return t===W.dash?(e.consume(t),p):n(t)}function d(t){return t===W.eof?n(t):t===W.dash?(e.consume(t),f):J(t)?(o=d,k(t)):(e.consume(t),d)}function f(t){return t===W.dash?(e.consume(t),p):d(t)}function p(e){return e===W.greaterThan?re(e):e===W.dash?f(e):d(e)}function m(t){let r=G.cdataOpeningString;return t===r.charCodeAt(a++)?(e.consume(t),a===r.length?h:m):n(t)}function h(t){return t===W.eof?n(t):t===W.rightSquareBracket?(e.consume(t),g):J(t)?(o=h,k(t)):(e.consume(t),h)}function g(t){return t===W.rightSquareBracket?(e.consume(t),_):h(t)}function _(t){return t===W.greaterThan?re(t):t===W.rightSquareBracket?(e.consume(t),_):h(t)}function v(t){return t===W.eof||t===W.greaterThan?re(t):J(t)?(o=v,k(t)):(e.consume(t),v)}function y(t){return t===W.eof?n(t):t===W.questionMark?(e.consume(t),b):J(t)?(o=y,k(t)):(e.consume(t),y)}function b(e){return e===W.greaterThan?re(e):y(e)}function x(t){return zn(t)?(e.consume(t),S):n(t)}function S(t){return t===W.dash||q(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,k(t)):X(t)?(e.consume(t),C):re(t)}function w(t){return t===W.dash||q(t)?(e.consume(t),w):t===W.slash||t===W.greaterThan||Y(t)?T(t):n(t)}function T(t){return t===W.slash?(e.consume(t),re):t===W.colon||t===W.underscore||zn(t)?(e.consume(t),E):J(t)?(o=T,k(t)):X(t)?(e.consume(t),T):re(t)}function E(t){return t===W.dash||t===W.dot||t===W.colon||t===W.underscore||q(t)?(e.consume(t),E):D(t)}function D(t){return t===W.equalsTo?(e.consume(t),O):J(t)?(o=D,k(t)):X(t)?(e.consume(t),D):T(t)}function O(t){return t===W.eof||t===W.lessThan||t===W.equalsTo||t===W.greaterThan||t===W.graveAccent?n(t):t===W.quotationMark||t===W.apostrophe?(e.consume(t),i=t,ee):J(t)?(o=O,k(t)):X(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===W.eof?n(t):J(t)?(o=ee,k(t)):(e.consume(t),ee)}function te(t){return t===W.eof||t===W.quotationMark||t===W.apostrophe||t===W.lessThan||t===W.equalsTo||t===W.graveAccent?n(t):t===W.slash||t===W.greaterThan||Y(t)?T(t):(e.consume(t),te)}function ne(e){return e===W.slash||e===W.greaterThan||Y(e)?T(e):n(e)}function re(r){return r===W.greaterThan?(e.consume(r),e.exit(K.htmlTextData),e.exit(K.htmlText),t):n(r)}function k(t){return R(o,`expected return state`),R(J(t),`expected eol`),e.exit(K.htmlTextData),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),ie}function ie(t){return R(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),X(t)?Z(e,ae,K.linePrefix,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize)(t):ae(t)}function ae(t){return e.enter(K.htmlTextData),o(t)}}var ui={name:`labelEnd`,resolveAll:mi,resolveTo:hi,tokenize:gi},di={tokenize:_i},fi={tokenize:vi},pi={tokenize:yi};function mi(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===K.labelImage||r.type===K.labelLink||r.type===K.labelEnd){let e=r.type===K.labelImage?4:2;r.type=K.data,t+=e}}return e.length!==n.length&&jn(e,0,e.length,n),e}function hi(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===K.link||i.type===K.labelLink&&i._inactive)break;e[n][0]===`enter`&&i.type===K.labelLink&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===K.labelImage||i.type===K.labelLink)&&!i._balanced&&(a=n,i.type!==K.labelLink)){r=2;break}}else i.type===K.labelEnd&&(o=n);R(a!==void 0,"`open` is supposed to be found"),R(o!==void 0,"`close` is supposed to be found");let c={type:e[a][1].type===K.labelLink?K.link:K.image,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:K.label,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:K.labelText,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Mn(s,e.slice(a+1,a+r+3)),s=Mn(s,[[`enter`,u,t]]),R(t.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),s=Mn(s,nr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Mn(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Mn(s,e.slice(o+1)),s=Mn(s,[[`exit`,c,t]]),jn(e,a,e.length,s),e}function gi(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===K.labelImage||r.events[i][1].type===K.labelLink)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return R(t===W.rightSquareBracket,"expected `]`"),a?a._inactive?d(t):(o=r.parser.defined.includes(Rn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(K.labelEnd),e.enter(K.labelMarker),e.consume(t),e.exit(K.labelMarker),e.exit(K.labelEnd),c):n(t)}function c(t){return t===W.leftParenthesis?e.attempt(di,u,o?u:d)(t):t===W.leftSquareBracket?e.attempt(fi,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(pi,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function _i(e,t,n){return r;function r(t){return R(t===W.leftParenthesis,`expected left paren`),e.enter(K.resource),e.enter(K.resourceMarker),e.consume(t),e.exit(K.resourceMarker),i}function i(t){return Y(t)?Ur(e,a)(t):a(t)}function a(t){return t===W.rightParenthesis?u(t):Br(e,o,s,K.resourceDestination,K.resourceDestinationLiteral,K.resourceDestinationLiteralMarker,K.resourceDestinationRaw,K.resourceDestinationString,G.linkResourceDestinationBalanceMax)(t)}function o(t){return Y(t)?Ur(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===W.quotationMark||t===W.apostrophe||t===W.leftParenthesis?Hr(e,l,n,K.resourceTitle,K.resourceTitleMarker,K.resourceTitleString)(t):u(t)}function l(t){return Y(t)?Ur(e,u)(t):u(t)}function u(r){return r===W.rightParenthesis?(e.enter(K.resourceMarker),e.consume(r),e.exit(K.resourceMarker),e.exit(K.resource),t):n(r)}}function vi(e,t,n){let r=this;return i;function i(t){return R(t===W.leftSquareBracket,`expected left bracket`),Vr.call(r,e,a,o,K.reference,K.referenceMarker,K.referenceString)(t)}function a(e){return r.parser.defined.includes(Rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function yi(e,t,n){return r;function r(t){return R(t===W.leftSquareBracket,`expected left bracket`),e.enter(K.reference),e.enter(K.referenceMarker),e.consume(t),e.exit(K.referenceMarker),i}function i(r){return r===W.rightSquareBracket?(e.enter(K.referenceMarker),e.consume(r),e.exit(K.referenceMarker),e.exit(K.reference),t):n(r)}}var bi={name:`labelStartImage`,resolveAll:ui.resolveAll,tokenize:xi};function xi(e,t,n){let r=this;return i;function i(t){return R(t===W.exclamationMark,"expected `!`"),e.enter(K.labelImage),e.enter(K.labelImageMarker),e.consume(t),e.exit(K.labelImageMarker),a}function a(t){return t===W.leftSquareBracket?(e.enter(K.labelMarker),e.consume(t),e.exit(K.labelMarker),e.exit(K.labelImage),o):n(t)}function o(e){return e===W.caret&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Si={name:`labelStartLink`,resolveAll:ui.resolveAll,tokenize:Ci};function Ci(e,t,n){let r=this;return i;function i(t){return R(t===W.leftSquareBracket,"expected `[`"),e.enter(K.labelLink),e.enter(K.labelMarker),e.consume(t),e.exit(K.labelMarker),e.exit(K.labelLink),a}function a(e){return e===W.caret&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var wi={name:`lineEnding`,tokenize:Ti};function Ti(e,t){return n;function n(n){return R(J(n),`expected eol`),e.enter(K.lineEnding),e.consume(n),e.exit(K.lineEnding),Z(e,t,K.linePrefix)}}var Ei={name:`thematicBreak`,tokenize:Di};function Di(e,t,n){let r=0,i;return a;function a(t){return e.enter(K.thematicBreak),o(t)}function o(e){return R(e===W.asterisk||e===W.dash||e===W.underscore,"expected `*`, `-`, or `_`"),i=e,s(e)}function s(a){return a===i?(e.enter(K.thematicBreakSequence),c(a)):r>=G.thematicBreakMarkerCountMin&&(a===W.eof||J(a))?(e.exit(K.thematicBreak),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(K.thematicBreakSequence),X(t)?Z(e,s,K.whitespace)(t):s(t))}}var Oi={continuation:{tokenize:Mi},exit:Pi,name:`list`,tokenize:ji},ki={partial:!0,tokenize:Fi},Ai={partial:!0,tokenize:Ni};function ji(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===K.linePrefix?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){R(r.containerState,`expected state`);let i=r.containerState.type||(t===W.asterisk||t===W.plusSign||t===W.dash?K.listUnordered:K.listOrdered);if(i===K.listUnordered?!r.containerState.marker||t===r.containerState.marker:Hn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===K.listUnordered)return e.enter(K.listItemPrefix),t===W.asterisk||t===W.dash?e.check(Ei,n,l)(t):l(t);if(!r.interrupt||t===W.digit1)return e.enter(K.listItemPrefix),e.enter(K.listItemValue),c(t)}return n(t)}function c(t){return R(r.containerState,`expected state`),Hn(t)&&++o<G.listItemValueSizeMax?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===W.rightParenthesis||t===W.dot)?(e.exit(K.listItemValue),l(t)):n(t)}function l(t){return R(r.containerState,`expected state`),R(t!==W.eof,"eof (`null`) is not a marker"),e.enter(K.listItemMarker),e.consume(t),e.exit(K.listItemMarker),r.containerState.marker=r.containerState.marker||t,e.check(lr,r.interrupt?n:u,e.attempt(ki,f,d))}function u(e){return R(r.containerState,`expected state`),r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return X(t)?(e.enter(K.listItemPrefixWhitespace),e.consume(t),e.exit(K.listItemPrefixWhitespace),f):n(t)}function f(n){return R(r.containerState,`expected state`),r.containerState.size=a+r.sliceSerialize(e.exit(K.listItemPrefix),!0).length,t(n)}}function Mi(e,t,n){let r=this;return R(r.containerState,`expected state`),r.containerState._closeFlow=void 0,e.check(lr,i,a);function i(n){return R(r.containerState,`expected state`),R(typeof r.containerState.size==`number`,`expected size`),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Z(e,t,K.listItemIndent,r.containerState.size+1)(n)}function a(n){return R(r.containerState,`expected state`),r.containerState.furtherBlankLines||!X(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ai,t,o)(n))}function o(i){return R(r.containerState,`expected state`),r.containerState._closeFlow=!0,r.interrupt=void 0,R(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Z(e,e.attempt(Oi,t,n),K.linePrefix,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize)(i)}}function Ni(e,t,n){let r=this;return R(r.containerState,`expected state`),R(typeof r.containerState.size==`number`,`expected size`),Z(e,i,K.listItemIndent,r.containerState.size+1);function i(e){R(r.containerState,`expected state`);let i=r.events[r.events.length-1];return i&&i[1].type===K.listItemIndent&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Pi(e){R(this.containerState,`expected state`),R(typeof this.containerState.type==`string`,`expected type`),e.exit(this.containerState.type)}function Fi(e,t,n){let r=this;return R(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Z(e,i,K.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize+1);function i(e){let i=r.events[r.events.length-1];return!X(e)&&i&&i[1].type===K.listItemPrefixWhitespace?t(e):n(e)}}var Ii={name:`setextUnderline`,resolveTo:Li,tokenize:Ri};function Li(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===K.content){r=n;break}e[n][1].type===K.paragraph&&(i=n)}else e[n][1].type===K.content&&e.splice(n,1),!a&&e[n][1].type===K.definition&&(a=n);R(i!==void 0,"expected a `text` index to be found"),R(r!==void 0,"expected a `text` index to be found"),R(e[r][2]===t,`enter context should be same`),R(e[e.length-1][2]===t,`enter context should be same`);let o={type:K.setextHeading,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=K.setextHeadingText,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Ri(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(R(t===W.dash||t===W.equalsTo,"expected `=` or `-`");a--;)if(r.events[a][1].type!==K.lineEnding&&r.events[a][1].type!==K.linePrefix&&r.events[a][1].type!==K.content){s=r.events[a][1].type===K.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(K.setextHeadingLine),i=t,o(t)):n(t)}function o(t){return e.enter(K.setextHeadingLineSequence),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(K.setextHeadingLineSequence),X(t)?Z(e,c,K.lineSuffix)(t):c(t))}function c(r){return r===W.eof||J(r)?(e.exit(K.setextHeadingLine),t(r)):n(r)}}var zi={tokenize:Bi};function Bi(e){let t=this,n=e.attempt(lr,r,e.attempt(this.parser.constructs.flowInitial,i,Z(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Fr,i)),K.linePrefix)));return n;function r(r){if(R(r===W.eof||J(r),`expected eol or eof`),r===W.eof){e.consume(r);return}return e.enter(K.lineEndingBlank),e.consume(r),e.exit(K.lineEndingBlank),t.currentConstruct=void 0,n}function i(r){if(R(r===W.eof||J(r),`expected eol or eof`),r===W.eof){e.consume(r);return}return e.enter(K.lineEnding),e.consume(r),e.exit(K.lineEnding),t.currentConstruct=void 0,n}}var Vi={resolveAll:Gi()},Hi=Wi(`string`),Ui=Wi(`text`);function Wi(e){return{resolveAll:Gi(e===`text`?Ki:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===W.eof){t.consume(e);return}return t.enter(K.data),t.consume(e),s}function s(e){return c(e)?(t.exit(K.data),i(e)):(t.consume(e),s)}function c(e){if(e===W.eof)return!0;let t=r[e],i=-1;if(t)for(R(Array.isArray(t),"expected `disable.null` to be populated");++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Gi(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===K.data&&(i=r,r++):(!t[r]||t[r][1].type!==K.data)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Ki(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===K.lineEnding)&&e[n-1][1].type===K.data){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===W.space;)s++,o--;if(o)break;o=-1}else if(e===W.horizontalTab)c=!0,s++;else if(e!==W.virtualSpace){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<G.hardBreakPrefixSizeMin?K.lineSuffix:K.hardBreakTrailing,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var qi=e({attentionMarkers:()=>ta,contentInitial:()=>Yi,disable:()=>na,document:()=>Ji,flow:()=>Zi,flowInitial:()=>Xi,insideSpan:()=>ea,string:()=>Qi,text:()=>$i}),Ji={[W.asterisk]:Oi,[W.plusSign]:Oi,[W.dash]:Oi,[W.digit0]:Oi,[W.digit1]:Oi,[W.digit2]:Oi,[W.digit3]:Oi,[W.digit4]:Oi,[W.digit5]:Oi,[W.digit6]:Oi,[W.digit7]:Oi,[W.digit8]:Oi,[W.digit9]:Oi,[W.greaterThan]:dr},Yi={[W.leftSquareBracket]:Wr},Xi={[W.horizontalTab]:Cr,[W.virtualSpace]:Cr,[W.space]:Cr},Zi={[W.numberSign]:Xr,[W.asterisk]:Ei,[W.dash]:[Ii,Ei],[W.lessThan]:ti,[W.equalsTo]:Ii,[W.underscore]:Ei,[W.graveAccent]:br,[W.tilde]:br},Qi={[W.ampersand]:_r,[W.backslash]:hr},$i={[W.carriageReturn]:wi,[W.lineFeed]:wi,[W.carriageReturnLineFeed]:wi,[W.exclamationMark]:bi,[W.ampersand]:_r,[W.asterisk]:rr,[W.lessThan]:[sr,ci],[W.leftSquareBracket]:Si,[W.backslash]:[Jr,hr],[W.rightSquareBracket]:ui,[W.underscore]:rr,[W.graveAccent]:Dr},ea={null:[rr,Vi]},ta={null:[W.asterisk,W.underscore]},na={null:[]},ra=n(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),ia=n(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=ra(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),aa=(0,t(n(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t={}.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=ia()(e);var{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}}))(),1).default)(`micromark`);function oa(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c=!0,l={attempt:T(C),check:T(w),consume:b,enter:x,exit:S,interrupt:T(w,{interrupt:!0})},u={code:W.eof,containerState:{},defineSkip:_,events:[],now:g,parser:e,previous:W.eof,sliceSerialize:m,sliceStream:h,write:p},d=t.tokenize.call(u,l),f;return t.resolveAll&&a.push(t),u;function p(e){return o=Mn(o,e),v(),o[o.length-1]===W.eof?(E(t,0),u.events=nr(a,u.events,u),u.events):[]}function m(e,t){return ca(h(e),t)}function h(e){return sa(o,e)}function g(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function _(e){i[e.line]=e.column,O(),aa("position: define skip: `%j`",r)}function v(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)y(t.charCodeAt(r._bufferIndex));else y(t)}}function y(e){R(c===!0,`expected character to be consumed`),c=void 0,aa("main: passing `%s` to %s",e,d&&d.name),f=e,R(typeof d==`function`,`expected state`),d=d(e)}function b(e){R(e===f,`expected given code to equal expected code`),aa("consume: `%s`",e),R(c===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),R(e===null?u.events.length===0||u.events[u.events.length-1][0]===`exit`:u.events[u.events.length-1][0]===`enter`,`expected last token to be open`),J(e)?(r.line++,r.column=1,r.offset+=e===W.carriageReturnLineFeed?2:1,O(),aa("position: after eol: `%j`",r)):e!==W.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e,c=!0}function x(e,t){let n=t||{};return n.type=e,n.start=g(),R(typeof e==`string`,`expected string type`),R(e.length>0,`expected non-empty string`),aa("enter: `%s`",e),u.events.push([`enter`,n,u]),s.push(n),n}function S(e){R(typeof e==`string`,`expected string type`),R(e.length>0,`expected non-empty string`);let t=s.pop();return R(t,`cannot close w/o open tokens`),t.end=g(),R(e===t.type,`expected exit token to match current token`),R(!(t.start._index===t.end._index&&t.start._bufferIndex===t.end._bufferIndex),"expected non-empty token (`"+e+"`)"),aa("exit: `%s`",t.type),u.events.push([`exit`,t,u]),t}function C(e,t){E(e,t.from)}function w(e,t){t.restore()}function T(e,t){return n;function n(n,r,i){let a,o,s,d;return Array.isArray(n)?m(n):`tokenize`in n?m([n]):p(n);function p(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function m(e){return a=e,o=0,e.length===0?(R(i,"expected `bogusState` to be given"),i):h(e[o])}function h(e){return n;function n(n){return d=D(),s=e,e.partial||(u.currentConstruct=e),R(u.parser.constructs.disable.null,"expected `disable.null` to be populated"),e.name&&u.parser.constructs.disable.null.includes(e.name)?_(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,l,g,_)(n)}}function g(t){return R(t===f,`expected code`),c=!0,e(s,d),r}function _(e){return R(e===f,`expected code`),c=!0,d.restore(),++o<a.length?h(a[o]):i}}}function E(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&jn(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u)),R(e.partial||u.events.length===0||u.events[u.events.length-1][0]===`exit`,`expected last token to end`)}function D(){let e=g(),t=u.previous,n=u.currentConstruct,i=u.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=i,s=a,O(),aa("position: restore: `%j`",r)}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function sa(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)R(a>-1,`expected non-negative end buffer index`),R(r>-1,`expected non-negative start buffer index`),o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):(R(r===0,"expected `startBufferIndex` to be `0`"),o.shift())}a>0&&o.push(e[i].slice(0,a))}return o}function ca(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case W.carriageReturn:o=An.cr;break;case W.lineFeed:o=An.lf;break;case W.carriageReturnLineFeed:o=An.cr+An.lf;break;case W.horizontalTab:o=t?An.space:An.ht;break;case W.virtualSpace:if(!t&&i)continue;o=An.space;break;default:R(typeof a==`number`,`expected number`),o=String.fromCharCode(a)}i=a===W.horizontalTab,r.push(o)}return r.join(``)}function la(e){let t={constructs:Pn([qi,...(e||{}).extensions||[]]),content:n(Yn),defined:[],document:n(Zn),flow:n(zi),lazy:{},string:n(Hi),text:n(Ui)};return t;function n(e){return n;function n(n){return oa(t,e,n)}}}function ua(e){for(;!Nr(e););return e}var da=/[\0\t\n\r]/g;function fa(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===W.byteOrderMarker&&u++,void 0);u<i.length;){if(da.lastIndex=u,c=da.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===W.lf&&u===d&&r)s.push(W.carriageReturnLineFeed),r=void 0;else switch(r&&=(s.push(W.carriageReturn),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case W.nul:s.push(W.replacementCharacter),e++;break;case W.ht:for(l=Math.ceil(e/G.tabSize)*G.tabSize,s.push(W.horizontalTab);e++<l;)s.push(W.virtualSpace);break;case W.lf:s.push(W.lineFeed),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(W.carriageReturn),t&&s.push(t),s.push(W.eof)),s}}var pa=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ma(e){return e.replace(pa,ha)}function ha(e,t,n){if(t)return t;if(n.charCodeAt(0)===W.numberSign){let e=n.charCodeAt(1),t=e===W.lowercaseX||e===W.uppercaseX;return Ln(n.slice(t?2:1),t?G.numericBaseHexadecimal:G.numericBaseDecimal)}return kn(n)||e}var ga={}.hasOwnProperty;function _a(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),va(n)(ua(la(n).document().write(fa()(e,t,!0))))}function va(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(be),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ge),blockQuote:a(fe),characterEscape:T,characterReference:T,codeFenced:a(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(pe,o),codeText:a(P,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(me),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(he),hardBreakEscape:a(_e),hardBreakTrailing:a(_e),htmlFlow:a(ve,o),htmlFlowData:T,htmlText:a(ve,o),htmlTextData:T,image:a(ye),label:o,link:a(be),listItem:a(xe),listItemValue:f,listOrdered:a(F,d),listUnordered:a(F),paragraph:a(Se),reference:ce,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ge),strong:a(Ce),thematicBreak:a(Te)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:de,autolinkProtocol:ue,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:M,characterReference:N,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ne),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(k),label:ae,labelText:ie,lineEnding:D,link:c(re),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:oe,resourceTitleString:se,resource:A,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ba(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)if(e[d][1].type===K.listOrdered||e[d][1].type===K.listUnordered)if(e[d][0]===`enter`)c.push(d);else{let t=c.pop();R(typeof t==`number`,`expected list to be open`),d=i(e,t,d)}for(d=-1;++d<e.length;){let n=t[e[d][0]];ga.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Sa).call(a,void 0,e[0])}for(r.position={start:ya(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ya(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case K.listUnordered:case K.listOrdered:case K.blockQuote:t[0]===`enter`?i++:i--,l=void 0;break;case K.lineEndingBlank:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case K.linePrefix:case K.listItemValue:case K.listItemMarker:case K.listItemPrefix:case K.listItemPrefixWhitespace:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===K.listItemPrefix||i===-1&&t[0]===`exit`&&(t[1].type===K.listUnordered||t[1].type===K.listOrdered)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===K.lineEnding||t[1].type===K.lineEndingBlank){if(t[0]===`exit`)continue;s&&(e[s][1].type=K.lineEndingBlank,a=!0),t[1].type=K.lineEnding,s=i}else if(!(t[1].type===K.linePrefix||t[1].type===K.blockQuotePrefix||t[1].type===K.blockQuotePrefixWhitespace||t[1].type===K.blockQuoteMarker||t[1].type===K.listItemIndent))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===K.listItemPrefix){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){let r=this.stack[this.stack.length-1];R(r,"expected `parent`"),R(`children`in r,"expected `parent`"),r.children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ya(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop();R(n,"expected `node`");let r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Sa).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Ht({start:e.start,end:e.end})+`): it’s not open`);R(n.type!==`fragment`,"unexpected fragment `exit`ed"),R(n.position,"expected `position` to be defined"),n.position.end=ya(e.end)}function u(){return wn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];R(t,`expected nodes on stack`),R(t.type===`list`,`expected list on stack`),t.start=Number.parseInt(this.sliceSerialize(e),G.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`code`,`expected code on stack`),t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`code`,`expected code on stack`),t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`code`,`expected code on stack`),t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`code`,`expected code on stack`),t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];R(n,`expected node on stack`),R(n.type===`definition`,`expected definition on stack`),n.label=t,n.identifier=Rn(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`definition`,`expected definition on stack`),t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`definition`,`expected definition on stack`),t.url=e}function x(e){let t=this.stack[this.stack.length-1];if(R(t,`expected node on stack`),R(t.type===`heading`,`expected heading on stack`),!t.depth){let n=this.sliceSerialize(e).length;R(n===1||n===2||n===3||n===4||n===5||n===6,"expected `depth` between `1` and `6`"),t.depth=n}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`heading`,`expected heading on stack`),t.depth=this.sliceSerialize(e).codePointAt(0)===W.equalsTo?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(`children`in t,`expected parent on stack`);let n=t.children,r=n[n.length-1];(!r||r.type!==`text`)&&(r=we(),r.position={start:ya(e.start),end:void 0},n.push(r)),this.stack.push(r)}function E(e){let t=this.stack.pop();R(t,"expected a `node` to be on the stack"),R(`value`in t,"expected a `literal` to be on the stack"),R(t.position,"expected `node` to have an open position"),t.value+=this.sliceSerialize(e),t.position.end=ya(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(R(n,"expected `node`"),this.data.atHardBreak){R(`children`in n,"expected `parent`");let t=n.children[n.children.length-1];R(t.position,`expected tail to have a starting position`),t.position.end=ya(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`html`,`expected html on stack`),t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`html`,`expected html on stack`),t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`inlineCode`,`expected inline code on stack`),t.value=e}function re(){let e=this.stack[this.stack.length-1];if(R(e,`expected node on stack`),R(e.type===`link`,`expected link on stack`),this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function k(){let e=this.stack[this.stack.length-1];if(R(e,`expected node on stack`),R(e.type===`image`,`expected image on stack`),this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];R(n,`expected ancestor on stack`),R(n.type===`image`||n.type===`link`,`expected image or link on stack`),n.label=ma(t),n.identifier=Rn(t).toLowerCase()}function ae(){let e=this.stack[this.stack.length-1];R(e,`expected node on stack`),R(e.type===`fragment`,`expected fragment on stack`);let t=this.resume(),n=this.stack[this.stack.length-1];R(n,`expected node on stack`),R(n.type===`image`||n.type===`link`,`expected image or link on stack`),this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`image`||t.type===`link`,`expected image or link on stack`),t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`image`||t.type===`link`,`expected image or link on stack`),t.title=e}function A(){this.data.inReference=void 0}function ce(){this.data.referenceType=`collapsed`}function le(e){let t=this.resume(),n=this.stack[this.stack.length-1];R(n,`expected node on stack`),R(n.type===`image`||n.type===`link`,`expected image reference or link reference on stack`),n.label=t,n.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function j(e){R(e.type===`characterReferenceMarkerNumeric`||e.type===`characterReferenceMarkerHexadecimal`),this.data.characterReferenceType=e.type}function M(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;if(n)r=Ln(t,n===K.characterReferenceMarkerNumeric?G.numericBaseDecimal:G.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{let e=kn(t);R(e!==!1,`expected reference to decode`),r=e}let i=this.stack[this.stack.length-1];R(i,"expected `node`"),R(`value`in i,"expected `node.value`"),i.value+=r}function N(e){let t=this.stack.pop();R(t,"expected `node`"),R(t.position,"expected `node.position`"),t.position.end=ya(e.end)}function ue(e){E.call(this,e);let t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`link`,`expected link on stack`),t.url=this.sliceSerialize(e)}function de(e){E.call(this,e);let t=this.stack[this.stack.length-1];R(t,`expected node on stack`),R(t.type===`link`,`expected link on stack`),t.url=`mailto:`+this.sliceSerialize(e)}function fe(){return{type:`blockquote`,children:[]}}function pe(){return{type:`code`,lang:null,meta:null,value:``}}function P(){return{type:`inlineCode`,value:``}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function he(){return{type:`emphasis`,children:[]}}function ge(){return{type:`heading`,depth:0,children:[]}}function _e(){return{type:`break`}}function ve(){return{type:`html`,value:``}}function ye(){return{type:`image`,title:null,url:``,alt:null}}function be(){return{type:`link`,title:null,url:``,children:[]}}function F(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function xe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Se(){return{type:`paragraph`,children:[]}}function Ce(){return{type:`strong`,children:[]}}function we(){return{type:`text`,value:``}}function Te(){return{type:`thematicBreak`}}}function ya(e){return{line:e.line,column:e.column,offset:e.offset}}function ba(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ba(e,r):xa(e,r)}}function xa(e,t){let n;for(n in t)if(ga.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Sa(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Ht({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+`) is still open`)}function Ca(e){let t=this;t.parser=n;function n(n){return _a(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function wa(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 Ta(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
5
+ `}]}function Ea(e,t){let n=t.value?t.value+`
6
+ `:``,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 Da(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oa(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ka(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Jn(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 Aa(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 ja(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ma(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 Na(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ma(e,t);let i={src:Jn(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 Pa(e,t){let n={src:Jn(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 Fa(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 Ia(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ma(e,t);let i={href:Jn(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 La(e,t){let n={href:Jn(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 Ra(e,t,n){let r=e.all(t),i=n?za(n):Ba(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:`
7
+ `}),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:`
8
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function za(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Ba(n[r])}return t}function Ba(e){return e.spread??e.children.length>1}function Va(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 Ha(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ua(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Wa(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ga(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=zt(t.children[1]),o=Rt(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 Ka(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 qa(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ja=9,Ya=32;function Xa(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Za(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Za(t.slice(i),i>0,!1)),a.join(``)}function Za(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ja||t===Ya;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ja||t===Ya;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Qa(e,t){let n={type:`text`,value:Xa(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $a(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var eo={blockquote:wa,break:Ta,code:Ea,delete:Da,emphasis:Oa,footnoteReference:ka,heading:Aa,html:ja,imageReference:Na,image:Pa,inlineCode:Fa,linkReference:Ia,link:La,listItem:Ra,list:Va,paragraph:Ha,root:Ua,strong:Wa,table:Ga,tableCell:qa,tableRow:Ka,text:Qa,thematicBreak:$a,toml:to,yaml:to,definition:to,footnoteDefinition:to};function to(){}var no=typeof self==`object`?self:globalThis,ro=(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)e[r(t)]=r(n);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(new no[e](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)}}return n(new no[a](o),i)};return r},io=e=>ro(new Map,e)(0),ao=``,{toString:oo}={},{keys:so}=Object,co=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=oo.call(e).slice(8,-1);switch(n){case`Array`:return[1,ao];case`Object`:return[2,ao];case`Date`:return[3,ao];case`RegExp`:return[4,ao];case`Map`:return[5,ao];case`Set`:return[6,ao];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},lo=([e,t])=>e===0&&(t===`function`||t===`symbol`),uo=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=co(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of so(r))(e||!lo(co(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(lo(co(n))||lo(co(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!lo(co(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},fo=(e,{json:t,lossy:n}={})=>{let r=[];return uo(!(t||n),!!t,new Map,r)(e),r},po=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?io(fo(e,t)):structuredClone(e):(e,t)=>io(fo(e,t));function mo(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 ho(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function go(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||mo,r=e.options.footnoteBackLabel||ho,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=Jn(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:{...po(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
9
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
10
+ `}]}}var _o=(function(e){if(e==null)return So;if(typeof e==`function`)return xo(e);if(typeof e==`object`)return Array.isArray(e)?vo(e):yo(e);if(typeof e==`string`)return bo(e);throw Error(`Expected function, string, or object as test`)});function vo(e){let t=[],n=-1;for(;++n<e.length;)t[n]=_o(e[n]);return xo(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function yo(e){let t=e;return xo(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function bo(e){return xo(t);function t(t){return t&&t.type===e}}function xo(e){return t;function t(t,n,r){return!!(Co(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function So(){return!0}function Co(e){return typeof e==`object`&&!!e&&`type`in e}function wo(e){return e}var To=[];function Eo(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=_o(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 (`+wo(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=To,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Do(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 Do(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?To:[e]}function Oo(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),Eo(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 ko={}.hasOwnProperty,Ao={};function jo(e,t){let n=t||Ao,r=new Map,i=new Map,a={all:s,applyData:No,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...eo,...n.handlers},one:o,options:n,patch:Mo,wrap:Fo};return Oo(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(ko.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=po(n);return r.children=a.all(e),r}return po(e)}return(a.options.unknownHandler||Po)(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=Io(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Io(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Mo(e,t){e.position&&(t.position=Vt(e))}function No(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,po(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Po(e,t){let n=t.data||{},r=`value`in t&&!(ko.call(n,`hProperties`)||ko.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 Fo(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
11
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
12
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
13
+ `}),n}function Io(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Lo(e,t){let n=jo(e,t),r=n.one(e,void 0),i=go(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(R(`children`in a),a.children.push({type:`text`,value:`
14
+ `},i)),a}function Ro(e,t){return e&&`run`in e?async function(n,r){let i=Lo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Lo(n,{file:r,...e||t})}}function zo(e){if(e)throw e}var Bo=n(((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}}));function Vo(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 Ho(){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);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Uo(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 Uo(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 Wo={basename:Go,dirname:Ko,extname:qo,join:Jo,sep:`/`};function Go(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Zo(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 Ko(e){if(Zo(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 qo(e){Zo(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}continue}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 Jo(...e){let t=-1,n;for(;++t<e.length;)Zo(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Yo(n)}function Yo(e){Zo(e);let t=e.codePointAt(0)===47,n=Xo(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Xo(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 Zo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Qo={cwd:$o};function $o(){return`/`}function es(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ts(e){if(typeof e==`string`)e=new URL(e);else if(!es(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 ns(e)}function ns(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 rs=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],is=class{constructor(e){let t;t=e?es(e)?{path:e}:typeof e==`string`||cs(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Qo.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<rs.length;){let e=rs[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)rs.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Wo.basename(this.path):void 0}set basename(e){os(e,`basename`),as(e,`basename`),this.path=Wo.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Wo.dirname(this.path):void 0}set dirname(e){ss(this.basename,`dirname`),this.path=Wo.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Wo.extname(this.path):void 0}set extname(e){if(as(e,`extname`),ss(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=Wo.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){es(e)&&(e=ts(e)),os(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Wo.basename(this.path,this.extname):void 0}set stem(e){os(e,`stem`),as(e,`stem`),this.path=Wo.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 U(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 as(e,t){if(e&&e.includes(Wo.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Wo.sep+"`")}function os(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function ss(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function cs(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ls=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),us=t(Bo(),1),ds={}.hasOwnProperty,fs=new class e extends ls{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=Ho()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,us.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(hs(`data`,this.frozen),this.namespace[e]=t,this):ds.call(this.namespace,e)&&this.namespace[e]||void 0:e?(hs(`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=vs(e),n=this.parser||this.Parser;return ps(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),ps(`process`,this.parser||this.Parser),ms(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=vs(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);bs(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):(R(t,"`done` is defined if `resolve` is not"),t(void 0,n))}}}processSync(e){let t=!1,n;return this.freeze(),ps(`processSync`,this.parser||this.Parser),ms(`processSync`,this.compiler||this.Compiler),this.process(e,r),_s(`processSync`,`process`,t),R(n,`we either bailed on an error or have a tree`),n;function r(e,r){t=!0,zo(e),n=r}}run(e,t,n){gs(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){R(typeof t!=`function`,"`file` can’t be a `done` anymore, we checked");let o=vs(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):(R(n,"`done` is defined if `resolve` is not"),n(void 0,s,o))}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),_s(`runSync`,`run`,n),R(r,`we either bailed on an error or have a tree`),r;function i(e,t){zo(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=vs(t),r=this.compiler||this.Compiler;return ms(`stringify`,r),gs(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(hs(`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,us.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];Vo(o)&&Vo(r)&&(r=(0,us.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function ps(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function ms(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function hs(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 gs(e){if(!Vo(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function _s(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vs(e){return ys(e)?e:new is(e)}function ys(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function bs(e){return typeof e==`string`||xs(e)}function xs(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ss=re(),Cs=[],ws={allowDangerousHtml:!0},Ts=/^(https?|ircs?|mailto|xmpp)$/i,Es=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ds(e){let t=Os(e),n=ks(e);return As(t.runSync(t.parse(n),n),e)}function Os(e){let t=e.rehypePlugins||Cs,n=e.remarkPlugins||Cs,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ws}:ws;return fs().use(Ca).use(n).use(Ro,r).use(t)}function ks(e){let t=e.children||``,n=new is;return typeof t==`string`?n.value=t:Ke("Unexpected value `"+t+"` for `children` prop, expected `string`"),n}function As(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||js;for(let e of Es)Object.hasOwn(t,e.from)&&Ke("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":`remove it`)+` (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#`+e.id+`> for more info)`);return n&&a&&Ke("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),Oo(e,l),$t(e,{Fragment:Ss.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Ss.jsx,jsxs:Ss.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Sn)if(Object.hasOwn(Sn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Sn[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function js(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ts.test(e.slice(0,t))?e:``}function Ms(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ns(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ps(e,t,n){let r=_o((n||{}).ignore||[]),i=Fs(t),a=-1;for(;++a<i.length;)Eo(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Fs(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Is(e[0]),Ls(e[1])])}return t}function Is(e){return typeof e==`string`?new RegExp(Ns(e),`g`):e}function Ls(e){return typeof e==`function`?e:function(){return e}}var Rs=`phrasing`,zs=[`autolink`,`link`,`image`,`label`];function Bs(){return{transforms:[Js],enter:{literalAutolink:Hs,literalAutolinkEmail:Us,literalAutolinkHttp:Us,literalAutolinkWww:Us},exit:{literalAutolink:qs,literalAutolinkEmail:Ks,literalAutolinkHttp:Ws,literalAutolinkWww:Gs}}}function Vs(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Rs,notInConstruct:zs},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Rs,notInConstruct:zs},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Rs,notInConstruct:zs}]}}function Hs(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Us(e){this.config.enter.autolinkProtocol.call(this,e)}function Ws(e){this.config.exit.autolinkProtocol.call(this,e)}function Gs(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];R(t.type===`link`),t.url=`http://`+this.sliceSerialize(e)}function Ks(e){this.config.exit.autolinkEmail.call(this,e)}function qs(e){this.exit(e)}function Js(e){Ps(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ys],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Xs]],{ignore:[`link`,`linkReference`]})}function Ys(e,t,n,r,i){let a=``;if(!$s(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Zs(n)))return!1;let o=Qs(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Xs(e,t,n,r){return!$s(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Zs(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Qs(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ms(e,`(`),a=Ms(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function $s(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Kn(n)||Gn(n))&&(!t||n!==47)}lc.peek=cc;function ec(){this.buffer()}function tc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function nc(){this.buffer()}function rc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function ic(e){let t=this.resume(),n=this.stack[this.stack.length-1];R(n.type===`footnoteReference`),n.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ac(e){this.exit(e)}function oc(e){let t=this.resume(),n=this.stack[this.stack.length-1];R(n.type===`footnoteDefinition`),n.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sc(e){this.exit(e)}function cc(){return`[`}function lc(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function uc(){return{enter:{gfmFootnoteCallString:ec,gfmFootnoteCall:tc,gfmFootnoteDefinitionLabelString:nc,gfmFootnoteDefinition:rc},exit:{gfmFootnoteCallString:ic,gfmFootnoteCall:ac,gfmFootnoteDefinitionLabelString:oc,gfmFootnoteDefinition:sc}}}function dc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:lc},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
15
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?pc:fc))),s(),o}}function fc(e,t,n){return t===0?e:pc(e,t,n)}function pc(e,t,n){return(n?``:` `)+e}var mc=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];yc.peek=bc;function hc(){return{canContainEols:[`delete`],enter:{strikethrough:_c},exit:{strikethrough:vc}}}function gc(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:mc}],handlers:{delete:yc}}}function _c(e){this.enter({type:`delete`,children:[]},e)}function vc(e){this.exit(e)}function yc(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function bc(){return`~`}function xc(e){return e.length}function Sc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||xc,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=Cc(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]=wc(r[d]);else{let e=wc(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(`
16
+ `)}function Cc(e){return e==null?``:String(e)}function wc(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}function Tc(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()),Ec);return i(),o}function Ec(e,t,n){return`>`+(n?``:` `)+e}function Dc(e,t){return Oc(e,t.inConstruct,!0)&&!Oc(e,t.notInConstruct,!1)}function Oc(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 kc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&Dc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
18
+ `}function Ac(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 jc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Mc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Nc(e,t,n,r){let i=Mc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(jc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Pc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Ac(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
19
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
20
+ `),a&&(u+=s.move(a+`
21
+ `)),u+=s.move(c),l(),u}function Pc(e,t,n){return(n?``:` `)+e}function Fc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ic(e,t,n,r){let i=Fc(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?` `:`
22
+ `,...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 Lc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Rc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function zc(e,t,n){let r=tr(e),i=tr(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}}Bc.peek=Vc;function Bc(e,t,n,r){let i=Lc(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=zc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Rc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=zc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Rc(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Vc(e,t,n){return n.options.emphasis||`*`}function Hc(e,t){let n=!1;return Oo(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)&&wn(e)&&(t.options.setext||n))}function Uc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Hc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
23
+ `,after:`
24
+ `});return r(),t(),o+`
25
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
26
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
27
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=Rc(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Wc.peek=Gc;function Wc(e){return e.value||``}function Gc(){return`<`}Kc.peek=qc;function Kc(e,t,n,r){let i=Fc(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 qc(){return`!`}Jc.peek=Yc;function Jc(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=[],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 Yc(){return`!`}Xc.peek=Zc;function Xc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)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 Zc(){return"`"}function Qc(e,t){let n=wn(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))}$c.peek=el;function $c(e,t,n,r){let i=Fc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Qc(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(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:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function el(e,t,n){return Qc(e,n)?`<`:`[`}tl.peek=nl;function tl(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=[],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 nl(){return`[`}function rl(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 il(e){let t=rl(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 al(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ol(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 sl(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?al(n):rl(n),s=e.ordered?o===`.`?`)`:`.`:il(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),ol(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 cl(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 ll(e,t,n,r){let i=cl(n),a=n.bulletCurrent||rl(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 ul(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var dl=_o([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function fl(e,t,n,r){return(e.children.some(function(e){return dl(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function pl(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ml.peek=hl;function ml(e,t,n,r){let i=pl(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=zc(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Rc(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=zc(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Rc(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function hl(e,t,n){return n.options.strong||`*`}function gl(e,t,n,r){return n.safe(e.value,r)}function _l(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 vl(e,t,n){let r=(ol(n)+(n.options.ruleSpaces?` `:``)).repeat(_l(n));return n.options.ruleSpaces?r.slice(0,-1):r}var yl={blockquote:Tc,break:kc,code:Nc,definition:Ic,emphasis:Bc,hardBreak:kc,heading:Uc,html:Wc,image:Kc,imageReference:Jc,inlineCode:Xc,link:$c,linkReference:tl,list:sl,listItem:ll,paragraph:ul,root:fl,strong:ml,text:gl,thematicBreak:vl};function bl(){return{enter:{table:xl,tableData:Tl,tableHeader:Tl,tableRow:Cl},exit:{codeText:El,table:Sl,tableData:wl,tableHeader:wl,tableRow:wl}}}function xl(e){let t=e._align;R(t,"expected `_align` on table"),this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Sl(e){this.exit(e),this.data.inTable=void 0}function Cl(e){this.enter({type:`tableRow`,children:[]},e)}function wl(e){this.exit(e)}function Tl(e){this.enter({type:`tableCell`,children:[]},e)}function El(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Dl));let n=this.stack[this.stack.length-1];R(n.type===`inlineCode`),n.value=t,this.exit(e)}function Dl(e,t){return t===`|`?t:e}function Ol(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
28
+ `,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(`
29
+ `))}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 Sc(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=yl.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function kl(){return{exit:{taskListCheckValueChecked:jl,taskListCheckValueUnchecked:jl,paragraph:Ml}}}function Al(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Nl}}}function jl(e){let t=this.stack[this.stack.length-2];R(t.type===`listItem`),t.checked=e.type===`taskListCheckValueChecked`}function Ml(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];R(e.type===`paragraph`);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=Object.assign({},n.position.start)))}}this.exit(e)}function Nl(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=yl.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Pl(){return[Bs(),uc(),hc(),bl(),kl()]}function Fl(e){return{extensions:[Vs(),dc(e),gc(),Ol(e),Al()]}}var Il={tokenize:Xl,partial:!0},Ll={tokenize:Zl,partial:!0},Rl={tokenize:Ql,partial:!0},zl={tokenize:$l,partial:!0},Bl={tokenize:eu,partial:!0},Vl={name:`wwwAutolink`,tokenize:Jl,previous:tu},Hl={name:`protocolAutolink`,tokenize:Yl,previous:nu},Ul={name:`emailAutolink`,tokenize:ql,previous:ru},Wl={};function Gl(){return{text:Wl}}for(var Kl=W.digit0;Kl<W.leftCurlyBrace;)Wl[Kl]=Ul,Kl++,Kl===W.colon?Kl=W.uppercaseA:Kl===W.leftSquareBracket&&(Kl=W.lowercaseA);Wl[W.plusSign]=Ul,Wl[W.dash]=Ul,Wl[W.dot]=Ul,Wl[W.underscore]=Ul,Wl[W.uppercaseH]=[Ul,Hl],Wl[W.lowercaseH]=[Ul,Hl],Wl[W.uppercaseW]=[Ul,Vl],Wl[W.lowercaseW]=[Ul,Vl];function ql(e,t,n){let r=this,i,a;return o;function o(t){return!iu(t)||!ru.call(r,r.previous)||au(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return iu(t)?(e.consume(t),s):t===W.atSign?(e.consume(t),c):n(t)}function c(t){return t===W.dot?e.check(Bl,u,l)(t):t===W.dash||t===W.underscore||q(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&zn(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Jl(e,t,n){let r=this;return i;function i(t){return t!==W.uppercaseW&&t!==W.lowercaseW||!tu.call(r,r.previous)||au(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Il,e.attempt(Ll,e.attempt(Rl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Yl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===W.uppercaseH||t===W.lowercaseH)&&nu.call(r,r.previous)&&!au(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(zn(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===W.colon){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===W.slash?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===W.eof||Vn(t)||Y(t)||Kn(t)||Gn(t)?n(t):e.attempt(Ll,e.attempt(Rl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Xl(e,t,n){let r=0;return i;function i(t){return(t===W.uppercaseW||t===W.lowercaseW)&&r<3?(r++,e.consume(t),i):t===W.dot&&r===3?(e.consume(t),a):n(t)}function a(e){return e===W.eof?n(e):t(e)}}function Zl(e,t,n){let r,i,a;return o;function o(t){return t===W.dot||t===W.underscore?e.check(zl,c,s)(t):t===W.eof||Y(t)||Kn(t)||t!==W.dash&&Gn(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===W.underscore?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ql(e,t){let n=0,r=0;return i;function i(o){return o===W.leftParenthesis?(n++,e.consume(o),i):o===W.rightParenthesis&&r<n?a(o):o===W.exclamationMark||o===W.quotationMark||o===W.ampersand||o===W.apostrophe||o===W.rightParenthesis||o===W.asterisk||o===W.comma||o===W.dot||o===W.colon||o===W.semicolon||o===W.lessThan||o===W.questionMark||o===W.rightSquareBracket||o===W.underscore||o===W.tilde?e.check(zl,t,a)(o):o===W.eof||Y(o)||Kn(o)?t(o):(e.consume(o),i)}function a(t){return t===W.rightParenthesis&&r++,e.consume(t),i}}function $l(e,t,n){return r;function r(o){return o===W.exclamationMark||o===W.quotationMark||o===W.apostrophe||o===W.rightParenthesis||o===W.asterisk||o===W.comma||o===W.dot||o===W.colon||o===W.semicolon||o===W.questionMark||o===W.underscore||o===W.tilde?(e.consume(o),r):o===W.ampersand?(e.consume(o),a):o===W.rightSquareBracket?(e.consume(o),i):o===W.lessThan||o===W.eof||Y(o)||Kn(o)?t(o):n(o)}function i(e){return e===W.eof||e===W.leftParenthesis||e===W.leftSquareBracket||Y(e)||Kn(e)?t(e):r(e)}function a(e){return zn(e)?o(e):n(e)}function o(t){return t===W.semicolon?(e.consume(t),r):zn(t)?(e.consume(t),o):n(t)}}function eu(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return q(e)?n(e):t(e)}}function tu(e){return e===W.eof||e===W.leftParenthesis||e===W.asterisk||e===W.underscore||e===W.leftSquareBracket||e===W.rightSquareBracket||e===W.tilde||Y(e)}function nu(e){return!zn(e)}function ru(e){return!(e===W.slash||iu(e))}function iu(e){return e===W.plusSign||e===W.dash||e===W.dot||e===W.underscore||q(e)}function au(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var ou={tokenize:mu,partial:!0};function su(){return{document:{[W.leftSquareBracket]:{name:`gfmFootnoteDefinition`,tokenize:du,continuation:{tokenize:fu},exit:pu}},text:{[W.leftSquareBracket]:{name:`gfmFootnoteCall`,tokenize:uu},[W.rightSquareBracket]:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:cu,resolveTo:lu}}}}function cu(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===K.labelImage){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===K.labelLink||e.type===K.label||e.type===K.image||e.type===K.link)break}return s;function s(i){if(R(i===W.rightSquareBracket,"expected `]`"),!o||!o._balanced)return n(i);let s=Rn(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==W.caret||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function lu(e,t){let n=e.length,r;for(;n--;)if(e[n][1].type===K.labelImage&&e[n][0]===`enter`){r=e[n][1];break}R(r,"expected `labelStart` to resolve"),e[n+1][1].type=K.data,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let i={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let o={type:`gfmFootnoteCallString`,start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:K.chunkString,contentType:`string`,start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],[`enter`,i,t],e[n+3],e[n+4],[`enter`,a,t],[`exit`,a,t],[`enter`,o,t],[`enter`,s,t],[`exit`,s,t],[`exit`,o,t],e[e.length-2],e[e.length-1],[`exit`,i,t]];return e.splice(n,e.length-n+1,...c),e}function uu(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return R(t===W.leftSquareBracket,"expected `[`"),e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===W.caret?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>G.linkReferenceSizeMax||s===W.rightSquareBracket&&!o||s===W.eof||s===W.leftSquareBracket||Y(s))return n(s);if(s===W.rightSquareBracket){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Rn(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Y(s)||(o=!0),a++,e.consume(s),s===W.backslash?u:l}function u(t){return t===W.leftSquareBracket||t===W.backslash||t===W.rightSquareBracket?(e.consume(t),a++,l):l(t)}}function du(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return R(t===W.leftSquareBracket,"expected `[`"),e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===W.caret?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>G.linkReferenceSizeMax||t===W.rightSquareBracket&&!s||t===W.eof||t===W.leftSquareBracket||Y(t))return n(t);if(t===W.rightSquareBracket){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Rn(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Y(t)||(s=!0),o++,e.consume(t),t===W.backslash?d:u}function d(t){return t===W.leftSquareBracket||t===W.backslash||t===W.rightSquareBracket?(e.consume(t),o++,u):u(t)}function f(t){return t===W.colon?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Z(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function fu(e,t,n){return e.check(lr,t,e.attempt(ou,t,n))}function pu(e){e.exit(`gfmFootnoteDefinition`)}function mu(e,t,n){let r=this;return Z(e,i,`gfmFootnoteDefinitionIndent`,G.tabSize+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===G.tabSize?t(e):n(e)}}function hu(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{[W.tilde]:n},insideSpan:{null:[n]},attentionMarkers:{null:[W.tilde]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&jn(o,o.length,0,nr(s,e.slice(r+1,n),t)),jn(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),jn(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=K.data);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return R(t===W.tilde,"expected `~`"),i===W.tilde&&a[a.length-1][1].type!==K.characterEscape?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=tr(i);if(a===W.tilde)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=tr(a);return l._open=!u||u===G.attentionSideAfter&&!!s,l._close=!s||s===G.attentionSideAfter&&!!u,n(a)}}}var gu=class{constructor(){this.map=[]}add(e,t,n){_u(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}};function _u(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function vu(e,t){R(e[t][1].type===`table`,`expected table`);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 yu(){return{flow:{null:{name:`table`,tokenize:bu,resolveAll:xu}}}}function bu(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 e=r.events[t][1].type;if(e===K.lineEnding||e===K.linePrefix)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&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===W.verticalBar?u(e):(o=!0,a+=1,u(e))}function u(t){return t===W.eof?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(K.lineEnding),e.consume(t),e.exit(K.lineEnding),p):n(t):X(t)?Z(e,u,K.whitespace)(t):(a+=1,o&&(o=!1,i+=1),t===W.verticalBar?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(K.data),d(t)))}function d(t){return t===W.eof||t===W.verticalBar||Y(t)?(e.exit(K.data),u(t)):(e.consume(t),t===W.backslash?f:d)}function f(t){return t===W.backslash||t===W.verticalBar?(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,X(t)?(R(r.parser.constructs.disable.null,"expected `disabled.null`"),Z(e,m,K.linePrefix,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:G.tabSize)(t)):m(t))}function m(t){return t===W.dash||t===W.colon?g(t):t===W.verticalBar?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return X(t)?Z(e,g,K.whitespace)(t):g(t)}function g(t){return t===W.colon?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===W.dash?(a+=1,_(t)):t===W.eof||J(t)?b(t):x(t)}function _(t){return t===W.dash?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===W.dash?(e.consume(t),v):t===W.colon?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return X(t)?Z(e,b,K.whitespace)(t):b(t)}function b(n){return n===W.verticalBar?m(n):n===W.eof||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===W.verticalBar?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===W.eof||J(n)?(e.exit(`tableRow`),t(n)):X(n)?Z(e,C,K.whitespace)(n):(e.enter(K.data),w(n))}function w(t){return t===W.eof||t===W.verticalBar||Y(t)?(e.exit(K.data),C(t)):(e.consume(t),t===W.backslash?T:w)}function T(t){return t===W.backslash||t===W.verticalBar?(e.consume(t),w):w(t)}}function xu(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 gu;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(R(l,`there should be a table opening`),Cu(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===K.data||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Su(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=Su(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=Su(f,t,o,i,n,d)):(o[0]=o[1],d=Su(f,t,a,i,n,d)),i=0):i&&(m.type===K.data||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&(R(l,`expected table opening`),Cu(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=vu(t.events,n))}return e}function Su(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(R(a,`expected previous cell enter`),a.end=Object.assign({},wu(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=wu(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=wu(t.events,n[2]),a=wu(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(n[3]!==0),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=K.chunkText,r[1].contentType=G.contentTypeText,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({},wu(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Cu(e,t,n,r,i){let a=[],o=wu(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 wu(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Tu={name:`tasklistCheck`,tokenize:Du};function Eu(){return{text:{[W.leftSquareBracket]:Tu}}}function Du(e,t,n){let r=this;return i;function i(t){return R(t===W.leftSquareBracket,"expected `[`"),r.previous!==W.eof||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Y(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===W.uppercaseX||t===W.lowercaseX?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===W.rightSquareBracket?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):X(r)?e.check({tokenize:Ou},t,n)(r):n(r)}}function Ou(e,t,n){return Z(e,r,K.whitespace);function r(e){return e===W.eof?n(e):t(e)}}function ku(e){return Pn([Gl(),su(),hu(e),yu(),Eu()])}var Au={};function ju(e){let t=this,n=e||Au,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(ku(n)),a.push(Pl()),o.push(Fl(n))}var Mu=`~icons/lucide/arrow-up.jsx`,Nu=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m5 12l7-7l7 7m-7 7V5`},void 0,!1,{fileName:Mu,lineNumber:2,columnNumber:97},void 0)},void 0,!1,{fileName:Mu,lineNumber:2,columnNumber:32},void 0),Pu=`~icons/lucide/image.jsx`,Fu=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,L.jsxDEV)(`rect`,{width:18,height:18,x:3,y:3,rx:2,ry:2},void 0,!1,{fileName:Pu,lineNumber:2,columnNumber:193},void 0),(0,L.jsxDEV)(`circle`,{cx:9,cy:9,r:2},void 0,!1,{fileName:Pu,lineNumber:2,columnNumber:250},void 0),(0,L.jsxDEV)(`path`,{d:`m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21`},void 0,!1,{fileName:Pu,lineNumber:2,columnNumber:280},void 0)]},void 0,!0,{fileName:Pu,lineNumber:2,columnNumber:95},void 0)},void 0,!1,{fileName:Pu,lineNumber:2,columnNumber:30},void 0),Iu=`~icons/lucide/rotate-ccw.jsx`,Lu=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,L.jsxDEV)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`},void 0,!1,{fileName:Iu,lineNumber:2,columnNumber:197},void 0),(0,L.jsxDEV)(`path`,{d:`M3 3v5h5`},void 0,!1,{fileName:Iu,lineNumber:2,columnNumber:259},void 0)]},void 0,!0,{fileName:Iu,lineNumber:2,columnNumber:99},void 0)},void 0,!1,{fileName:Iu,lineNumber:2,columnNumber:34},void 0),Ru=`~icons/lucide/sliders-horizontal.jsx`,zu=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 5H3m9 14H3M14 3v4m2 10v4m5-9h-9m9 7h-5m5-14h-7m-6 5v4m0-2H3`},void 0,!1,{fileName:Ru,lineNumber:2,columnNumber:107},void 0)},void 0,!1,{fileName:Ru,lineNumber:2,columnNumber:42},void 0),Bu=`~icons/lucide/square.jsx`,Vu=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`rect`,{width:18,height:18,x:3,y:3,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,rx:2},void 0,!1,{fileName:Bu,lineNumber:2,columnNumber:96},void 0)},void 0,!1,{fileName:Bu,lineNumber:2,columnNumber:31},void 0),Hu=`~icons/lucide/x.jsx`,Uu=e=>(0,L.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,...e,children:(0,L.jsxDEV)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`},void 0,!1,{fileName:Hu,lineNumber:2,columnNumber:91},void 0)},void 0,!1,{fileName:Hu,lineNumber:2,columnNumber:26},void 0),Wu=`/assets/chat-icon-JYfue7fB.png`;function Gu(e,t){return e.flatMap(e=>{let n=t?e.images??[]:[];return e.role===`user`?[{type:`message`,role:`user`,content:[{type:`input_text`,text:e.text},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[...e.text?[{type:`message`,role:`assistant`,content:[{type:`output_text`,text:e.text}]}]:[],...n.length?[{type:`message`,role:`user`,content:[{type:`input_text`,text:`Previously generated assistant images (reference for follow-up edits):`},...n.map(e=>({type:`input_image`,image_url:e}))]}]:[]]})}function Ku(e){return e.flatMap(e=>e.type===`image`?[`data:${e.mediaType??`image/png`};base64,${e.data}`]:[])}function qu(e,t){return e.filter(e=>e.active&&e.provider===t).toSorted((e,t)=>e.ord-t.ord||e.name.localeCompare(t.name))}function Ju(e,t){return t!==void 0&&!e.some(e=>e.active&&e.provider===t)}function Yu(e,t,n){return!e||!n||t.some(t=>t.name===e)?e:``}function Xu(e,t){return e.model!==t.model||e.system!==t.system||e.tokenName!==t.tokenName}function Zu(e){return e?{tokenName:e}:{}}var Qu=t(ie(),1);function $u(e){let t=e.indexOf(`,`),n=e.slice(0,t).match(/^data:image\/(png|jpeg|webp);base64$/)?.[1];if(!n)return{extension:`—`,bytes:0};let r=e.endsWith(`==`)?2:e.endsWith(`=`)?1:0;return{extension:n===`jpeg`?`jpg`:n,bytes:Math.max(0,Math.floor((e.length-t-1)*3/4)-r)}}function ed(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}var Q=`/home/runner/work/qgrid/qgrid/packages/web/src/components/qgrid/ChatImagePreview.tsx`;function td({url:e,onClose:t}){let n=(0,I.useRef)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(!1),[s,c]=(0,I.useState)(!1),l=$u(e);return(0,I.useEffect)(()=>{let e=n.current;return e?.showModal(),()=>e?.close()},[]),(0,Qu.createPortal)((0,L.jsxDEV)(`dialog`,{ref:n,"aria-labelledby":`chat-image-preview-title`,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{if(e.target!==e.currentTarget)return;let n=e.currentTarget.getBoundingClientRect();(e.clientX<n.left||e.clientX>n.right||e.clientY<n.top||e.clientY>n.bottom)&&t()},className:`m-auto w-[min(1100px,calc(100vw-2rem))] max-w-none max-h-[calc(100dvh-2rem)] overflow-hidden rounded-2xl bg-white p-0 text-sand-900 shadow-xl backdrop:bg-black/65`,children:[(0,L.jsxDEV)(`div`,{className:`flex items-center justify-between gap-3 border-b border-sand-100 px-4 py-3`,children:[(0,L.jsxDEV)(`h2`,{id:`chat-image-preview-title`,className:`text-sm font-semibold`,children:`이미지 미리보기`},void 0,!1,{fileName:Q,lineNumber:44,columnNumber:9},this),(0,L.jsxDEV)(`button`,{type:`button`,onClick:t,"aria-label":`이미지 미리보기 닫기`,className:`grid size-8 place-items-center rounded-full hover:bg-sand-100`,children:(0,L.jsxDEV)(Uu,{className:`size-4`},void 0,!1,{fileName:Q,lineNumber:53,columnNumber:11},this)},void 0,!1,{fileName:Q,lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:Q,lineNumber:43,columnNumber:7},this),(0,L.jsxDEV)(`div`,{className:`max-h-[calc(100dvh-13rem)] overflow-auto bg-sand-100 p-3`,style:{backgroundImage:`conic-gradient(#e8e4df 25%, #fff 0 50%, #e8e4df 0 75%, #fff 0)`,backgroundSize:`20px 20px`},children:s?(0,L.jsxDEV)(`p`,{role:`alert`,className:`p-8 text-center text-danger-500`,children:`이미지를 불러올 수 없습니다.`},void 0,!1,{fileName:Q,lineNumber:64,columnNumber:11},this):(0,L.jsxDEV)(`img`,{src:e,alt:`확대된 채팅 이미지`,onLoad:e=>i({width:e.currentTarget.naturalWidth,height:e.currentTarget.naturalHeight}),onError:()=>c(!0),className:a?`block max-w-none`:`mx-auto block max-h-[calc(100dvh-15rem)] max-w-full object-contain`},void 0,!1,{fileName:Q,lineNumber:68,columnNumber:11},this)},void 0,!1,{fileName:Q,lineNumber:56,columnNumber:7},this),(0,L.jsxDEV)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-sand-100 px-4 py-3`,children:[(0,L.jsxDEV)(`dl`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-xs tabular-nums`,children:[(0,L.jsxDEV)(`div`,{children:[(0,L.jsxDEV)(`dt`,{className:`text-sand-400`,children:`확장자`},void 0,!1,{fileName:Q,lineNumber:89,columnNumber:13},this),(0,L.jsxDEV)(`dd`,{className:`mt-1 uppercase`,children:l.extension},void 0,!1,{fileName:Q,lineNumber:90,columnNumber:13},this)]},void 0,!0,{fileName:Q,lineNumber:88,columnNumber:11},this),(0,L.jsxDEV)(`div`,{children:[(0,L.jsxDEV)(`dt`,{className:`text-sand-400`,children:`파일 용량`},void 0,!1,{fileName:Q,lineNumber:93,columnNumber:13},this),(0,L.jsxDEV)(`dd`,{className:`mt-1`,children:ed(l.bytes)},void 0,!1,{fileName:Q,lineNumber:94,columnNumber:13},this)]},void 0,!0,{fileName:Q,lineNumber:92,columnNumber:11},this),(0,L.jsxDEV)(`div`,{children:[(0,L.jsxDEV)(`dt`,{className:`text-sand-400`,children:`해상도`},void 0,!1,{fileName:Q,lineNumber:97,columnNumber:13},this),(0,L.jsxDEV)(`dd`,{className:`mt-1`,children:r?`${r.width} × ${r.height} px`:`—`},void 0,!1,{fileName:Q,lineNumber:98,columnNumber:13},this)]},void 0,!0,{fileName:Q,lineNumber:96,columnNumber:11},this)]},void 0,!0,{fileName:Q,lineNumber:87,columnNumber:9},this),(0,L.jsxDEV)(`div`,{className:`flex items-center gap-3 text-xs`,children:[(0,L.jsxDEV)(`button`,{type:`button`,disabled:!r||s,onClick:()=>o(e=>!e),className:`text-sand-600 hover:underline disabled:opacity-40`,children:a?`화면에 맞추기`:`원본 크기`},void 0,!1,{fileName:Q,lineNumber:104,columnNumber:11},this),(0,L.jsxDEV)(`a`,{href:e,download:`qgrid-image.${l.extension}`,className:`text-sienna-500 hover:underline`,children:`다운로드`},void 0,!1,{fileName:Q,lineNumber:112,columnNumber:11},this)]},void 0,!0,{fileName:Q,lineNumber:103,columnNumber:9},this)]},void 0,!0,{fileName:Q,lineNumber:86,columnNumber:7},this)]},void 0,!0,{fileName:Q,lineNumber:22,columnNumber:5},this),document.body)}var $=`/home/runner/work/qgrid/qgrid/packages/web/src/components/qgrid/ChatWidget.tsx`,nd=`qgrid_chat`,rd=`anthropic/claude-fable-5-1`,id=[{label:`OpenAI`,models:[`openai/gpt-6-astra`,`openai/gpt-6.1-sol`,`openai/gpt-6-sol`,`openai/gpt-6-luna`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-luna`]},{label:`Anthropic`,models:[`anthropic/claude-fable-5-1`,`anthropic/claude-fable-5`,`anthropic/claude-opus-5-5`,`anthropic/claude-opus-5`,`anthropic/claude-sonnet-5-5`,`anthropic/claude-sonnet-5`,`anthropic/claude-haiku-5-5`,`anthropic/claude-opus-4-8`,`anthropic/claude-opus-4-7`,`anthropic/claude-opus-4-6`,`anthropic/claude-opus-4-5`,`anthropic/claude-sonnet-4-6`,`anthropic/claude-haiku-4-5`]}],ad=[`low`,`medium`,`high`],od=new Map([[`openai`,`OpenAI`],[`anthropic`,`Anthropic`]]);function sd(e,t,n){let r=n!==void 0&&Ju(n,t);return/NO_OPENAI_WORKERS|no ready openai workers|no anthropic tokens available/i.test(e)||r&&/기동 중입니다/.test(e)?`사용 가능한 ${t?od.get(t)??t:``} 토큰이 없습니다. Tokens 페이지에서 토큰을 추가해주세요.`:e}function cd(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var ld=4,ud=1536;async function dd(e){let t=await createImageBitmap(e),n=Math.min(1,ud/Math.max(t.width,t.height)),r=document.createElement(`canvas`);return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext(`2d`).drawImage(t,0,0,r.width,r.height),t.close(),r.toDataURL(`image/jpeg`,.85)}function fd(){let[e,t]=(0,I.useState)(!1),[n,r]=(0,I.useState)(!1),[i,a]=(0,I.useState)([]),[o,s]=(0,I.useState)(``),[c,l]=(0,I.useState)(rd),[u,d]=(0,I.useState)(``),[f,p]=(0,I.useState)(``),[m,h]=(0,I.useState)(``),[g,_]=(0,I.useState)(!1),[v,y]=(0,I.useState)(null),[b,x]=(0,I.useState)(!1),[C,w]=(0,I.useState)([]),[T,E]=(0,I.useState)(null),D=(0,I.useRef)(null);(0,I.useEffect)(()=>()=>D.current?.abort(),[]);let O=(0,I.useRef)(void 0),ee=(0,I.useRef)(void 0),te=(0,I.useRef)(null),ne=(0,I.useRef)(null),re=(0,I.useRef)(null),k=c.split(`/`)[0],ie=k===`openai`,{data:ae}=_e.useTokens(`A`,{orderBy:`ord-asc`},{enabled:e}),oe=(0,I.useMemo)(()=>qu(ae?.rows??[],k),[k,ae?.rows]),se=ae?.rows!==void 0,A=(0,I.useRef)(void 0);(0,I.useEffect)(()=>{A.current=ae?.rows},[ae?.rows]);let ce=ae?.rows!==void 0&&Ju(ae.rows,k);(0,I.useEffect)(()=>{ie||w([])},[ie]),(0,I.useEffect)(()=>{d(e=>Yu(e,oe,se))},[se,oe]);let le=async e=>{if(!e)return;let t=ld-C.length,n=await Promise.all([...e].slice(0,t).map(e=>dd(e).catch(()=>null)));w(e=>[...e,...n.filter(e=>e!==null)].slice(0,ld))},j=e=>{a(t=>{let n=t[t.length-1];return!n||n.role!==`assistant`?t:[...t.slice(0,-1),e(n)]})},M=e=>{let t=sd(e,ee.current?.model.split(`/`)[0],A.current);j(e=>e.status===`streaming`?{...e,status:`error`,error:t}:e),y(null),x(!1)},N=ge.useQueryStream({streamId:v??``},{delta:({text:e})=>{j(t=>t.status===`streaming`?{...t,text:t.text+e}:t)},toolCall:()=>{M(`tool call 응답은 채팅에서 지원하지 않습니다`)},done:e=>{O.current=e.runContext?.threadCoord,j(t=>({...t,text:e.text||t.text,images:Ku(Array.isArray(e.content)?e.content:[e.content]),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}}))},error:({message:e})=>{M(e)},end:()=>{j(e=>e.status===`streaming`?{...e,status:`error`,error:`응답 완료 전에 스트림이 종료되었습니다`}:e),y(null),x(!1)}},{enabled:v!==null,retry:0});(0,I.useEffect)(()=>{v!==null&&N.error&&M(N.error)},[N.error]),(0,I.useEffect)(()=>{te.current?.scrollTo({top:te.current.scrollHeight})},[i,e]),(0,I.useEffect)(()=>{e&&ne.current?.focus()},[e]);let ue=async()=>{let e=o.trim();if(!e||b)return;let t=m.trim(),n=Yu(u,oe,se),r={model:c,system:t,tokenName:n};ee.current&&Xu(ee.current,r)&&(O.current=void 0),ee.current=r;let l=ie?C:[],d=Gu(i,ie),p=new AbortController;D.current=p;let h={role:`user`,text:e};l.length>0&&(h.images=l),a(e=>[...e,h,{role:`assistant`,text:``,status:`streaming`}]),s(``),w([]),x(!0);try{let r={prompt:e,model:c,projectName:nd,...Zu(n)};if(t&&(r.system=t),f&&(r.effort=f),l.length>0&&(r.input=l.map(e=>({type:`image`,url:e}))),d.length>0&&(r.history=JSON.stringify(d)),O.current&&(r.runContext={threadCoord:O.current}),ie){let e=await me({method:`POST`,url:`/api/qgrid/query`,data:{args:{...r,imageGeneration:`auto`}},signal:p.signal});if(D.current!==p||p.signal.aborted)return;O.current=e.runContext?.threadCoord,j(t=>({...t,text:e.text,images:Ku(e.content),status:`done`,meta:{model:e.model,tokenName:e.tokenName,durationMs:e.durationMs,costUsd:e.costUsd,requestLogId:e.requestLogId,fallback:(e.modelFallbacks?.length??0)>0}})),x(!1),D.current=null;return}let{streamId:i}=await ge.prepareStream(r);if(D.current!==p||p.signal.aborted)return;y(i)}catch(e){if(D.current!==p||p.signal.aborted)return;M(e instanceof Error?e.message:String(e)),D.current=null}},de=()=>{D.current?.abort(),D.current=null,j(e=>e.status===`streaming`?{...e,status:`aborted`}:e),y(null),x(!1)};return(0,L.jsxDEV)(`div`,{className:`fixed bottom-5 right-5 z-40`,children:[T&&(0,L.jsxDEV)(td,{url:T,onClose:()=>E(null)},T,!1,{fileName:$,lineNumber:435,columnNumber:9},this),e?(0,L.jsxDEV)(`div`,{onAnimationEnd:()=>{n&&(t(!1),r(!1))},className:`flex flex-col w-[min(400px,calc(100vw-2.5rem))] h-[min(640px,calc(100dvh-7rem))] bg-white rounded-2xl shadow-[0_16px_48px_rgba(44,36,24,0.18),0_0_0_1px_rgba(227,218,204,0.6)] overflow-hidden origin-bottom-right ${n?`chat-panel-pop-out`:`chat-panel-pop`}`,children:[(0,L.jsxDEV)(`div`,{className:`flex items-center gap-2.5 px-4 py-2.5 border-b border-sand-100 shrink-0`,children:[(0,L.jsxDEV)(`div`,{className:`min-w-0`,children:[(0,L.jsxDEV)(`p`,{className:`text-[14px] font-semibold text-sand-900 leading-tight`,children:`채팅`},void 0,!1,{fileName:$,lineNumber:453,columnNumber:15},this),(0,L.jsxDEV)(`p`,{className:`text-[11px] text-sand-400 truncate leading-tight`,children:[c,f?` · ${f}`:``,u?` · ${u}`:``]},void 0,!0,{fileName:$,lineNumber:454,columnNumber:15},this)]},void 0,!0,{fileName:$,lineNumber:452,columnNumber:13},this),(0,L.jsxDEV)(`div`,{className:`ml-auto flex items-center gap-0.5`,children:[(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>_(e=>!e),title:`모델·토큰·effort·system prompt 설정`,className:`size-8 grid place-items-center rounded-full transition-colors duration-150 ${g?`text-sienna-500 bg-sienna-50`:`text-sand-500 hover:text-sand-700 hover:bg-sand-100`}`,children:(0,L.jsxDEV)(zu,{className:`size-4`},void 0,!1,{fileName:$,lineNumber:471,columnNumber:17},this)},void 0,!1,{fileName:$,lineNumber:461,columnNumber:15},this),(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>{b&&de(),a([]),O.current=void 0,ee.current=void 0},disabled:i.length===0,title:`새 대화`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,L.jsxDEV)(Lu,{className:`size-4`},void 0,!1,{fileName:$,lineNumber:480,columnNumber:17},this)},void 0,!1,{fileName:$,lineNumber:473,columnNumber:15},this),(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>{if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){t(!1);return}r(!0)},title:`닫기`,className:`size-8 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 transition-colors duration-150`,children:(0,L.jsxDEV)(Uu,{className:`size-4.5`},void 0,!1,{fileName:$,lineNumber:488,columnNumber:17},this)},void 0,!1,{fileName:$,lineNumber:482,columnNumber:15},this)]},void 0,!0,{fileName:$,lineNumber:460,columnNumber:13},this)]},void 0,!0,{fileName:$,lineNumber:451,columnNumber:11},this),g&&(0,L.jsxDEV)(`div`,{className:`px-4 py-2.5 border-b border-sand-100 bg-sand-50/60 shrink-0 flex flex-col gap-1.5`,children:[(0,L.jsxDEV)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsxDEV)(`select`,{value:c,onChange:e=>l(e.target.value),disabled:b,className:`min-w-0 flex-1 rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-800 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:id.map(e=>(0,L.jsxDEV)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,L.jsxDEV)(`option`,{value:e,children:e},e,!1,{fileName:$,lineNumber:505,columnNumber:25},this))},e.label,!1,{fileName:$,lineNumber:503,columnNumber:21},this))},void 0,!1,{fileName:$,lineNumber:496,columnNumber:17},this),(0,L.jsxDEV)(`select`,{value:f,onChange:e=>p(e.target.value),disabled:b,className:`rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-600 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,L.jsxDEV)(`option`,{value:``,children:`effort 기본`},void 0,!1,{fileName:$,lineNumber:518,columnNumber:19},this),ad.map(e=>(0,L.jsxDEV)(`option`,{value:e,children:e},e,!1,{fileName:$,lineNumber:520,columnNumber:21},this))]},void 0,!0,{fileName:$,lineNumber:512,columnNumber:17},this)]},void 0,!0,{fileName:$,lineNumber:495,columnNumber:15},this),(0,L.jsxDEV)(`select`,{value:u,onChange:e=>d(e.target.value),disabled:b,"aria-label":`요청 토큰`,className:`w-full rounded-xl border border-sand-200/80 bg-white px-2 py-1.5 text-[12px] text-sand-700 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,children:[(0,L.jsxDEV)(`option`,{value:``,children:`토큰 자동 분배`},void 0,!1,{fileName:$,lineNumber:533,columnNumber:17},this),oe.map(e=>(0,L.jsxDEV)(`option`,{value:e.name,children:e.name},e.name,!1,{fileName:$,lineNumber:535,columnNumber:19},this))]},void 0,!0,{fileName:$,lineNumber:526,columnNumber:15},this),(0,L.jsxDEV)(`textarea`,{value:m,onChange:e=>h(e.target.value),disabled:b,placeholder:`system prompt (선택)`,rows:2,className:`w-full resize-none rounded-xl border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`},void 0,!1,{fileName:$,lineNumber:540,columnNumber:15},this)]},void 0,!0,{fileName:$,lineNumber:494,columnNumber:13},this),(0,L.jsxDEV)(`div`,{ref:te,className:`flex-1 overflow-y-auto main-scroll px-3.5 py-3`,children:i.length===0?(0,L.jsxDEV)(`div`,{className:`h-full grid place-items-center`,children:(0,L.jsxDEV)(`div`,{className:`text-center px-4`,children:[(0,L.jsxDEV)(`img`,{src:Wu,alt:``,className:`mx-auto mb-2.5 size-14 rounded-[35%] object-cover`},void 0,!1,{fileName:$,lineNumber:555,columnNumber:19},this),(0,L.jsxDEV)(`p`,{className:`text-[13px] text-sand-600`,children:`가용 토큰에게 바로 물어보세요.`},void 0,!1,{fileName:$,lineNumber:560,columnNumber:19},this),(0,L.jsxDEV)(`p`,{className:`mt-1 text-[11px] text-sand-400`,children:[`대화는 저장되지 않고, 요청은`,` `,(0,L.jsxDEV)(S,{to:`/logs`,search:{project:nd,page:1},className:`text-sienna-500 hover:underline`,children:`request log`},void 0,!1,{fileName:$,lineNumber:563,columnNumber:21},this),`에 기록됩니다.`]},void 0,!0,{fileName:$,lineNumber:561,columnNumber:19},this)]},void 0,!0,{fileName:$,lineNumber:554,columnNumber:17},this)},void 0,!1,{fileName:$,lineNumber:553,columnNumber:15},this):(0,L.jsxDEV)(`div`,{className:`flex flex-col gap-1.5`,children:i.map((e,t)=>e.role===`user`?(0,L.jsxDEV)(`div`,{className:`self-end max-w-[80%] flex flex-col items-end gap-1`,children:[e.images&&(0,L.jsxDEV)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e.images.map((e,t)=>(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>E(e),"aria-label":`첨부 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,L.jsxDEV)(`img`,{src:e,alt:``,className:`size-24 rounded-xl object-cover`},void 0,!1,{fileName:$,lineNumber:589,columnNumber:31},this)},t,!1,{fileName:$,lineNumber:582,columnNumber:29},this))},void 0,!1,{fileName:$,lineNumber:580,columnNumber:25},this),(0,L.jsxDEV)(`div`,{className:`rounded-[18px] rounded-br-[5px] bg-sienna-600 px-3.5 py-2 text-[13px] leading-relaxed text-white whitespace-pre-wrap break-words`,children:e.text},void 0,!1,{fileName:$,lineNumber:594,columnNumber:23},this)]},t,!0,{fileName:$,lineNumber:578,columnNumber:21},this):(0,L.jsxDEV)(`div`,{className:`self-start max-w-[88%] min-w-0`,children:[(0,L.jsxDEV)(`div`,{className:`rounded-[18px] rounded-bl-[5px] bg-sand-100 px-3.5 py-2`,children:[e.images?.map((e,t)=>(0,L.jsxDEV)(`div`,{className:`my-1.5`,children:[(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>E(e),"aria-label":`생성된 이미지 ${t+1} 크게 보기`,className:`block w-full cursor-zoom-in rounded-xl`,children:(0,L.jsxDEV)(`img`,{src:e,alt:`생성된 이미지 ${t+1}`,onLoad:()=>te.current?.scrollTo({top:te.current.scrollHeight}),className:`w-full rounded-xl object-contain bg-white`},void 0,!1,{fileName:$,lineNumber:609,columnNumber:31},this)},void 0,!1,{fileName:$,lineNumber:603,columnNumber:29},this),(0,L.jsxDEV)(`a`,{href:e,download:`qgrid-image-${t+1}.${e.startsWith(`data:image/jpeg;`)?`jpg`:e.startsWith(`data:image/webp;`)?`webp`:`png`}`,className:`mt-1 inline-block text-[11px] text-sienna-500 hover:underline`,children:`이미지 다운로드`},void 0,!1,{fileName:$,lineNumber:620,columnNumber:29},this)]},t,!0,{fileName:$,lineNumber:602,columnNumber:27},this)),e.text?(0,L.jsxDEV)(`div`,{className:`prose prose-sm prose-qgrid max-w-none text-[13px] leading-relaxed break-words`,children:(0,L.jsxDEV)(Ds,{remarkPlugins:[ju],children:e.text},void 0,!1,{fileName:$,lineNumber:631,columnNumber:29},this)},void 0,!1,{fileName:$,lineNumber:630,columnNumber:27},this):e.status===`streaming`?(0,L.jsxDEV)(`span`,{className:`inline-flex gap-1 py-1.5 px-0.5`,"aria-label":`응답 대기 중`,children:[(0,L.jsxDEV)(`span`,{className:`chat-typing-dot`},void 0,!1,{fileName:$,lineNumber:638,columnNumber:29},this),(0,L.jsxDEV)(`span`,{className:`chat-typing-dot [animation-delay:150ms]`},void 0,!1,{fileName:$,lineNumber:639,columnNumber:29},this),(0,L.jsxDEV)(`span`,{className:`chat-typing-dot [animation-delay:300ms]`},void 0,!1,{fileName:$,lineNumber:640,columnNumber:29},this)]},void 0,!0,{fileName:$,lineNumber:634,columnNumber:27},this):null,e.status===`aborted`&&(0,L.jsxDEV)(`p`,{className:`mt-1 text-[10px] text-sand-400`,children:`중단됨`},void 0,!1,{fileName:$,lineNumber:644,columnNumber:27},this),e.status===`error`&&(0,L.jsxDEV)(`p`,{className:`mt-1 text-[12px] text-danger-500 break-words`,children:e.error},void 0,!1,{fileName:$,lineNumber:647,columnNumber:27},this)]},void 0,!0,{fileName:$,lineNumber:600,columnNumber:23},this),e.meta&&(0,L.jsxDEV)(S,{to:e.meta.requestLogId===void 0?`/logs`:`/requests/show`,search:e.meta.requestLogId===void 0?{project:nd,page:1}:{id:e.meta.requestLogId},className:`mt-1 ml-1.5 inline-block text-[10px] tabular-nums text-sand-400 hover:text-sienna-500 transition-colors duration-150`,title:`request log 보기`,children:[e.meta.model,e.meta.fallback&&` (폴백)`,e.meta.tokenName?` · ${e.meta.tokenName}`:``,` · ${(e.meta.durationMs/1e3).toFixed(1)}s · ${cd(e.meta.costUsd)}`]},void 0,!0,{fileName:$,lineNumber:651,columnNumber:25},this)]},t,!0,{fileName:$,lineNumber:599,columnNumber:21},this))},void 0,!1,{fileName:$,lineNumber:575,columnNumber:15},this)},void 0,!1,{fileName:$,lineNumber:551,columnNumber:11},this),ce&&(0,L.jsxDEV)(`div`,{className:`px-4 py-1.5 border-t border-caution-400/30 bg-caution-400/10 text-[11px] text-caution-500 shrink-0`,children:[od.get(k)??k,` 토큰이 등록되어 있지 않습니다.`,` `,(0,L.jsxDEV)(S,{to:`/tokens`,className:`font-medium underline hover:text-caution-400`,children:`Tokens 페이지`},void 0,!1,{fileName:$,lineNumber:677,columnNumber:15},this),`에서 추가해주세요.`]},void 0,!0,{fileName:$,lineNumber:675,columnNumber:13},this),(0,L.jsxDEV)(`div`,{className:`px-3 py-2.5 border-t border-sand-100 shrink-0`,children:[C.length>0&&(0,L.jsxDEV)(`div`,{className:`flex gap-1.5 pb-2`,children:C.map((e,t)=>(0,L.jsxDEV)(`div`,{className:`relative`,children:[(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>E(e),"aria-label":`첨부할 이미지 ${t+1} 크게 보기`,className:`cursor-zoom-in rounded-xl`,children:(0,L.jsxDEV)(`img`,{src:e,alt:``,className:`size-12 rounded-xl object-cover`},void 0,!1,{fileName:$,lineNumber:694,columnNumber:23},this)},void 0,!1,{fileName:$,lineNumber:688,columnNumber:21},this),(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>w(e=>e.filter((e,n)=>n!==t)),title:`첨부 제거`,className:`absolute -top-1.5 -right-1.5 size-4.5 grid place-items-center rounded-full bg-sand-800 text-white hover:bg-sand-700`,children:(0,L.jsxDEV)(Uu,{className:`size-2.5`},void 0,!1,{fileName:$,lineNumber:702,columnNumber:23},this)},void 0,!1,{fileName:$,lineNumber:696,columnNumber:21},this)]},t,!0,{fileName:$,lineNumber:687,columnNumber:19},this))},void 0,!1,{fileName:$,lineNumber:685,columnNumber:15},this),(0,L.jsxDEV)(`div`,{className:`flex items-end gap-1.5`,children:[ie&&(0,L.jsxDEV)(L.Fragment,{children:[(0,L.jsxDEV)(`input`,{ref:re,type:`file`,accept:`image/*`,multiple:!0,hidden:!0,onChange:e=>{le(e.target.files),e.target.value=``}},void 0,!1,{fileName:$,lineNumber:711,columnNumber:19},this),(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>re.current?.click(),disabled:b||C.length>=ld,title:`이미지 첨부`,className:`size-9 shrink-0 grid place-items-center rounded-full text-sand-500 hover:text-sand-700 hover:bg-sand-100 disabled:opacity-40 transition-colors duration-150`,children:(0,L.jsxDEV)(Fu,{className:`size-4.5`},void 0,!1,{fileName:$,lineNumber:729,columnNumber:21},this)},void 0,!1,{fileName:$,lineNumber:722,columnNumber:19},this)]},void 0,!0),(0,L.jsxDEV)(`textarea`,{ref:ne,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ue())},placeholder:`메시지 입력...`,rows:1,className:`min-w-0 flex-1 resize-none [field-sizing:content] max-h-28 rounded-[20px] border border-sand-200/80 bg-sand-50/60 px-4 py-2 text-[13px] leading-relaxed text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 focus:bg-white transition-colors duration-150`},void 0,!1,{fileName:$,lineNumber:733,columnNumber:15},this),b?(0,L.jsxDEV)(`button`,{type:`button`,onClick:de,title:`응답 중단`,className:`size-9 shrink-0 grid place-items-center rounded-full border border-sand-200/80 text-sand-600 hover:bg-sand-100 active:scale-[0.96] transition-all duration-150`,children:(0,L.jsxDEV)(Vu,{className:`size-3.5`},void 0,!1,{fileName:$,lineNumber:754,columnNumber:19},this)},void 0,!1,{fileName:$,lineNumber:748,columnNumber:17},this):(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>void ue(),disabled:!o.trim(),title:`전송`,className:`size-9 shrink-0 grid place-items-center rounded-full bg-sienna-600 text-white hover:bg-sienna-700 disabled:opacity-40 active:scale-[0.96] transition-all duration-150`,children:(0,L.jsxDEV)(Nu,{className:`size-4.5`},void 0,!1,{fileName:$,lineNumber:764,columnNumber:19},this)},void 0,!1,{fileName:$,lineNumber:757,columnNumber:17},this)]},void 0,!0,{fileName:$,lineNumber:708,columnNumber:13},this)]},void 0,!0,{fileName:$,lineNumber:683,columnNumber:11},this)]},void 0,!0,{fileName:$,lineNumber:442,columnNumber:9},this):(0,L.jsxDEV)(`button`,{type:`button`,onClick:()=>t(!0),title:`채팅 열기`,className:`block size-15 rounded-[35%] overflow-hidden shadow-[0_6px_20px_rgba(44,36,24,0.25)] hover:scale-105 active:scale-[0.96] transition-transform duration-150`,children:(0,L.jsxDEV)(`img`,{src:Wu,alt:``,className:`size-full object-cover`},void 0,!1,{fileName:$,lineNumber:777,columnNumber:11},this)},void 0,!1,{fileName:$,lineNumber:771,columnNumber:9},this)]},void 0,!0,{fileName:$,lineNumber:433,columnNumber:5},this)}var pd=`/home/runner/work/qgrid/qgrid/packages/web/src/components/Sidebar.tsx`,md=`2.11.0`;function hd({className:e}){let t=v({select:e=>e.location.pathname});return(0,L.jsxDEV)(`aside`,{className:`hidden md:flex w-[200px] bg-sand-50 flex-col shrink-0 border-r border-sand-200/40 ${e??``}`,children:[(0,L.jsxDEV)(`div`,{className:`h-11 flex items-center px-4 border-b border-sand-200/30`,children:(0,L.jsxDEV)(`span`,{className:`text-[13px] font-semibold text-sand-800 tracking-tight`,children:`Qgrid`},void 0,!1,{fileName:pd,lineNumber:19,columnNumber:9},this)},void 0,!1,{fileName:pd,lineNumber:18,columnNumber:7},this),(0,L.jsxDEV)(`nav`,{className:`flex-1 px-2.5 py-3 space-y-4 overflow-y-auto`,children:Be.map(e=>(0,L.jsxDEV)(`div`,{children:[(0,L.jsxDEV)(`div`,{className:`px-2 pb-1.5`,children:(0,L.jsxDEV)(`span`,{className:`text-[10px] uppercase tracking-[0.08em] text-sand-400 font-medium`,children:e.label},void 0,!1,{fileName:pd,lineNumber:26,columnNumber:15},this)},void 0,!1,{fileName:pd,lineNumber:25,columnNumber:13},this),(0,L.jsxDEV)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let n=He(e.path,t);return(0,L.jsxDEV)(S,{to:e.path,className:`flex items-center gap-2 px-2 py-[6px] rounded-[7px] text-[13px] no-underline transition-all duration-150 ${n?`bg-sand-200/60 text-sand-900 font-medium`:`text-sand-500 hover:bg-sand-100 hover:text-sand-700`}`,style:n?{boxShadow:`0 0.5px 1px rgba(0,0,0,0.04), inset 0 0.5px 0 rgba(255,255,255,0.6)`}:void 0,children:[(0,L.jsxDEV)(e.icon,{className:`size-[15px] shrink-0 ${n?`text-sienna-500`:`text-sand-400`}`},void 0,!1,{fileName:pd,lineNumber:52,columnNumber:21},this),(0,L.jsxDEV)(`span`,{children:e.title},void 0,!1,{fileName:pd,lineNumber:55,columnNumber:21},this)]},e.path,!0,{fileName:pd,lineNumber:35,columnNumber:19},this)})},void 0,!1,{fileName:pd,lineNumber:30,columnNumber:13},this)]},e.label,!0,{fileName:pd,lineNumber:24,columnNumber:11},this))},void 0,!1,{fileName:pd,lineNumber:22,columnNumber:7},this),(0,L.jsxDEV)(`div`,{className:`px-4 py-3 border-t border-sand-200/30`,children:(0,L.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxDEV)(`div`,{className:`size-1.5 rounded-full bg-sage-400`},void 0,!1,{fileName:pd,lineNumber:66,columnNumber:11},this),(0,L.jsxDEV)(`span`,{className:`text-[10px] text-sand-400`,children:[`v`,md]},void 0,!0,{fileName:pd,lineNumber:67,columnNumber:11},this)]},void 0,!0,{fileName:pd,lineNumber:65,columnNumber:9},this)},void 0,!1,{fileName:pd,lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:pd,lineNumber:15,columnNumber:5},this)}var gd=`/home/runner/work/qgrid/qgrid/packages/web/src/components/Toolbar.tsx`,_d=new Map(Object.entries({"/":`Dashboard`,"/tokens":`Tokens`,"/logs":`Request Logs`,"/monit":`Server Logs`}));function vd(e){return e.startsWith(`/requests/show`)?{parent:`Request Logs`,parentPath:`/logs`,current:`Detail`}:{current:_d.get(e)??e}}function yd(){let e=vd(v({select:e=>e.location.pathname}));return(0,L.jsxDEV)(`div`,{className:`toolbar-glass h-11 shrink-0 flex items-center px-5`,children:(0,L.jsxDEV)(`nav`,{className:`flex items-center gap-1.5 text-[13px]`,children:[e.parent&&e.parentPath&&(0,L.jsxDEV)(L.Fragment,{children:[(0,L.jsxDEV)(S,{to:e.parentPath,className:`text-sand-400 hover:text-sand-600 transition-colors no-underline`,children:e.parent},void 0,!1,{fileName:gd,lineNumber:35,columnNumber:13},this),(0,L.jsxDEV)(`span`,{className:`text-sand-300 select-none`,children:`/`},void 0,!1,{fileName:gd,lineNumber:41,columnNumber:13},this)]},void 0,!0),(0,L.jsxDEV)(`span`,{className:`font-medium text-sand-800`,children:e.current},void 0,!1,{fileName:gd,lineNumber:44,columnNumber:9},this)]},void 0,!0,{fileName:gd,lineNumber:32,columnNumber:7},this)},void 0,!1,{fileName:gd,lineNumber:31,columnNumber:5},this)}var bd=`/home/runner/work/qgrid/qgrid/packages/web/src/App.tsx`,xd=[`/login`,`/signup`];function Sd({children:e}){(0,I.useEffect)(()=>{let e=navigator.language.split(`-`)[0],t=ve.find(t=>t===e);t!==void 0&&he(t)},[]);let t=v({select:e=>e.location.pathname}),n=!xd.includes(t);return(0,L.jsxDEV)(`div`,{className:`flex h-screen w-full bg-sand-100 overflow-hidden font-sans`,children:[n&&(0,L.jsxDEV)(hd,{},void 0,!1,{fileName:bd,lineNumber:31,columnNumber:23},this),(0,L.jsxDEV)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0`,children:[n&&(0,L.jsxDEV)(yd,{},void 0,!1,{fileName:bd,lineNumber:33,columnNumber:25},this),(0,L.jsxDEV)(`main`,{className:`flex-1 overflow-y-auto main-scroll content-inset`,children:(0,L.jsxDEV)(`div`,{className:`px-3 py-4 sm:px-6 sm:py-5 md:px-8`,children:(0,L.jsxDEV)(I.Suspense,{fallback:(0,L.jsxDEV)(`div`,{className:`text-sand-400 text-center py-8 text-sm`,children:`로딩 중...`},void 0,!1,{fileName:bd,lineNumber:37,columnNumber:25},this),children:e},void 0,!1,{fileName:bd,lineNumber:36,columnNumber:13},this)},void 0,!1,{fileName:bd,lineNumber:35,columnNumber:11},this)},void 0,!1,{fileName:bd,lineNumber:34,columnNumber:9},this),n&&(0,L.jsxDEV)(We,{},void 0,!1,{fileName:bd,lineNumber:43,columnNumber:25},this)]},void 0,!0,{fileName:bd,lineNumber:32,columnNumber:7},this),n&&(0,L.jsxDEV)(fd,{},void 0,!1,{fileName:bd,lineNumber:46,columnNumber:23},this)]},void 0,!0,{fileName:bd,lineNumber:30,columnNumber:5},this)}var Cd={"rc.asyncSelect.loading":`Loading...`,"rc.asyncSelect.noOptions":`No options`,"rc.asyncSelect.noResults":`No results`,"rc.asyncSelect.selectPlaceholder":`Select...`,"rc.combobox.noResults":`No results`,"rc.combobox.selectPlaceholder":`Select...`,"rc.datePicker.pickDate":`Pick date`,"rc.datePicker.placeholder":`Pick date`,"rc.datePicker.selectDate":`Select date`,"rc.dateSelectorMultiple.addDate":`Add date`,"rc.dateSelectorMultiple.dateRange":`Range`,"rc.dateSelectorMultiple.placeholder":`Pick date`,"rc.dateSelectorMultiple.singleDate":`Single`,"rc.fileInput.browseFiles":`Browse files`,"rc.fileInput.dropZone":`Drag files here or click to upload`,"rc.fileInput.filePlaceholder":`File`,"rc.fileInput.imagePlaceholder":`Image`,"rc.fileInput.maxFilesExceeded":e=>`Maximum ${e} files allowed`,"rc.fileInput.pending":`Pending`,"rc.fileInput.remove":`Remove`,"rc.fileInput.uploadFailed":`Upload failed`,"rc.fileInput.uploading":`Uploading...`,"rc.monthPickerMultiple.addMonth":`Add month`,"rc.monthPickerMultiple.dateRange":`Range`,"rc.monthPickerMultiple.endDate":`End date`,"rc.monthPickerMultiple.placeholder":`Pick month`,"rc.monthPickerMultiple.singleDate":`Single`,"rc.monthPickerMultiple.startDate":`Start date`,"rc.multiSelect.clear":`Clear all`,"rc.multiSelect.close":`Close`,"rc.multiSelect.moreItems":e=>`+${e} more`,"rc.multiSelect.noOptions":`No options`,"rc.multiSelect.noOptionsSelected":`No options selected`,"rc.multiSelect.noResults":`No results`,"rc.multiSelect.optionsCount":e=>`${e} options`,"rc.multiSelect.selectAll":`Select all`,"rc.multiSelect.selectPlaceholder":`Select...`,"rc.pagination.next":`Next`,"rc.pagination.previous":`Previous`,"rc.pagination.showing":(e,t,n)=>`Showing ${e}-${t} of ${n}`,"rc.calendar.month.0":`January`,"rc.calendar.month.1":`February`,"rc.calendar.month.2":`March`,"rc.calendar.month.3":`April`,"rc.calendar.month.4":`May`,"rc.calendar.month.5":`June`,"rc.calendar.month.6":`July`,"rc.calendar.month.7":`August`,"rc.calendar.month.8":`September`,"rc.calendar.month.9":`October`,"rc.calendar.month.10":`November`,"rc.calendar.month.11":`December`,"rc.sonamuFilter.title":`Sonamu Filter`,"rc.sonamuFilter.apply":`Apply`,"rc.sonamuFilter.reset":`Reset`,"rc.sonamuFilter.addRule":`Add Rule`,"rc.sonamuFilter.noRulesYet":`No rules yet. Click "+ Add Rule" to start.`,"rc.sonamuFilter.selectField":`Select field`,"rc.sonamuFilter.selectOperator":`Operator`,"rc.sonamuFilter.selectOperatorFirst":`Select operator first`,"rc.sonamuFilter.enterValue":`Enter value`,"rc.sonamuFilter.enterNumber":`Enter number`,"rc.sonamuFilter.notSupported":`Not supported`,"rc.sonamuFilter.startDate":`Start date`,"rc.sonamuFilter.endDate":`End date`,"rc.sonamuFilter.appliedFilters":`🌲 Applied SonamuFilters`,"rc.common.cancel":`Cancel`,"rc.common.save":`Save`},wd=Object.create(null),Td=e=>({}),Ed=new Proxy(wd,{get(e,t){return Td()[t]??wd[t]},has(e,t){return t in Td()||t in wd},set(e,t,n){let r=Td(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Td(!0);return delete n[t],!0},ownKeys(){let e=Td(!0);return Object.keys(e)}});function Dd(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return Dd(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return Dd(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return Dd(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return Dd(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return Dd(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return Dd(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return Dd(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function Od(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function kd(e){let t=e.split(`
30
+ at `);return t.length<=1?e:(t.splice(1,1),t.join(`
31
+ at `))}function Ad(e,t){class n extends e{#e;constructor(...e){if(Od()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=kd(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,`constructor`,{get(){return t},enumerable:!1,configurable:!0}),n}var jd={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};Ad(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:jd[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var Md=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function Nd(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new Md(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Pd(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Md(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Md?t:new Md(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Fd(e,t=`/api/auth`){if(Pd(e),Nd(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Id(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Ld(e,t,n,r,i){if(e)return Fd(e,t);if(r!==!1){let e=Ed.BETTER_AUTH_URL||Ed.NEXT_PUBLIC_BETTER_AUTH_URL||Ed.PUBLIC_BETTER_AUTH_URL||Ed.NUXT_PUBLIC_BETTER_AUTH_URL||Ed.NUXT_PUBLIC_AUTH_URL||(Ed.BASE_URL===`/`?void 0:Ed.BASE_URL);if(e)return Fd(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&Id(o,`proto`)&&Id(a,`host`))try{return Fd(`${o}://${a}`,t)}catch{}if(n){let e=Rd(n.url);if(!e)throw new Md(`Could not get origin from request. Please provide a valid base URL.`);return Fd(e,t)}if(typeof window<`u`&&window.location)return Fd(window.location.origin,t)}function Rd(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var zd={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},Bd=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Vd={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Hd=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Ud(e){return e instanceof Date&&!isNaN(e.getTime())}function Wd(e){let t=Hd.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return Ud(f)?f:null}function Gd(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in Vd)return Vd[s];if(!Bd.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(zd).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=Wd(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function Kd(e,t={strict:!0}){return Gd(e,t)}var qd={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},Jd=Symbol(`clean`),Yd=[],Xd=0,Zd=4,Qd=0,$d=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=Xd+Zd;t<Yd.length;)Yd[t]===e?Yd.splice(t,Zd):t+=Zd;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){Qd++;let i=!Yd.length;for(let i of t)Yd.push(i,n.value,e,r);if(i){for(Xd=0;Xd<Yd.length;Xd+=Zd)Yd[Xd](Yd[Xd+1],Yd[Xd+2],Yd[Xd+3]);Yd.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n[Jd]=()=>{t=[],n.lc=0,n.off()},n},ef=5,tf=6,nf=10,rf=(e,t,n,r)=>(e.events=e.events||{},e.events[n+nf]||(e.events[n+nf]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+nf](),delete e.events[n+nf])}),af=1e3,of=(e,t)=>rf(e,n=>{let r=t(n);r&&e.events[tf].push(r)},ef,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;e.events[tf]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[tf])t();e.events[tf]=[]}},af)};{let t=e[Jd];e[Jd]=()=>{for(let t of e.events[tf])t();e.events[tf]=[],e.active=!1,t()}}return()=>{e.listen=n,e.off=r}});function sf(e,t,n){let r=new Set(t).add(void 0);return e.listen((e,t,i)=>{r.has(i)&&n(e,t,i)})}var cf=()=>typeof window>`u`,lf=(e,t,n,r)=>{let i=$d({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{cf()||(o?await a():of(i,()=>{let e=setTimeout(async()=>{o||=(await a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},uf=Symbol.for(`better-auth:broadcast-channel`),df=()=>Math.floor(Date.now()/1e3),ff=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:df()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function pf(e=`better-auth.message`){return globalThis[uf]||(globalThis[uf]=new ff(e)),globalThis[uf]}var mf=Symbol.for(`better-auth:focus-manager`),hf=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function gf(){return globalThis[mf]||(globalThis[mf]=new hf),globalThis[mf]}var _f=Symbol.for(`better-auth:online-manager`),vf=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function yf(){return globalThis[_f]||(globalThis[_f]=new vf),globalThis[_f]}var bf=()=>Math.floor(Date.now()/1e3);function xf(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var Sf=5;function Cf(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||yf().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=bf(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=bf(),r(`/get-session`).then(async e=>{let{data:a,error:o}=xf(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=xf(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=bf(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(bf()-c.lastSessionRequest<Sf)return;c.lastSessionRequest=bf()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=bf(),n.set(!n.get()))},d=e=>{pf().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=pf().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=gf().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=yf().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),pf().setup(),gf().setup(),yf().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}function wf(e,t){let n=$d(!1),r=lf(n,`/get-session`,e,{method:`GET`}),i=()=>{};return of(r,()=>{let a=Cf({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}function Tf(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Ef(e,t,n=`.`,r){if(!Tf(t))return Ef(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Tf(a)&&Tf(i[t])?i[t]=Ef(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Df(e){return(...t)=>t.reduce((t,n)=>Ef(t,n,``,e),{})}var Of=Df(),kf=Object.defineProperty,Af=Object.defineProperties,jf=Object.getOwnPropertyDescriptors,Mf=Object.getOwnPropertySymbols,Nf=Object.prototype.hasOwnProperty,Pf=Object.prototype.propertyIsEnumerable,Ff=(e,t,n)=>t in e?kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,If=(e,t)=>{for(var n in t||={})Nf.call(t,n)&&Ff(e,n,t[n]);if(Mf)for(var n of Mf(t))Pf.call(t,n)&&Ff(e,n,t[n]);return e},Lf=(e,t)=>Af(e,jf(t)),Rf=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},zf=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Bf=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Vf=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Hf(e){if(typeof e==`number`)return new Bf({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Bf(e);case`exponential`:return new Vf(e);default:throw Error(`Invalid retry strategy`)}}var Uf=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Wf=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Gf(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Wf.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Kf(e){try{return JSON.parse(e),!0}catch{return!1}}function qf(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Jf(e){try{return JSON.parse(e)}catch{return e}}function Yf(e){return typeof e==`function`}function Xf(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&Yf(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&Yf(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function Zf(e){let t=new Headers(e?.headers),n=await Uf(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=Qf(e?.body);n&&t.set(`content-type`,n)}return t}function Qf(e){return qf(e)?`application/json`:null}function $f(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(qf(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&qf(e.body)?new URLSearchParams(e.body).toString():e.body}function ep(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return ip.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function tp(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var np=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function rp(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new np(n.issues);return n.value}var ip=[`get`,`post`,`put`,`patch`,`delete`],ap=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=Lf(If({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=Lf(If({},e),{body:i.input?await rp(i.input,n?.body):n?.body,params:i.params?await rp(i.params,n?.params):n?.params,query:i.query?await rp(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),op=e=>{async function t(t,n){let r=Lf(If(If({},e),n),{plugins:[...e?.plugins||[],ap(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await cp(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await cp(t,r)}return t};function sp(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];ip.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var cp=async(e,t)=>{let{hooks:n,url:r,options:i}=await zf(e,t),a=Xf(i),o=new AbortController,s=i.signal??o.signal,c=sp(r,i),l=$f(i),u=await Zf(i),d=ep(r,i),f=Lf(If({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=tp(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(Lf(If({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=Gf(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Jf)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await rp(f.output,r.data));for(let e of n.onSuccess)e&&await e(Lf(If({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Jf,_=await m.text(),v=Kf(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:Lf(If({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(Lf(If({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Hf(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await cp(e,Lf(If({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Rf(m.status,m.statusText,v?y:_);return{data:null,error:Lf(If({},y),{status:m.status,statusText:m.statusText})}},lp=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},up=(e,t)=>{let n=`credentials`in Request.prototype,r=Ld(e?.baseURL,e?.basePath,void 0,t)??lp(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=op({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?Kd(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[qd],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=wf(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/change-email`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=Of(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function dp(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function fp(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function pp(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||dp(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=fp(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function mp(e,t={}){let n=(0,I.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,I.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?sf(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,I.useSyncExternalStore)(a,o,o)}function hp(e){return e.charAt(0).toUpperCase()+e.slice(1)}function gp(e){return`use${hp(e)}`}function _p(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=up(e),s={};for(let[e,t]of Object.entries(r))s[gp(e)]=()=>mp(t);return pp({...n,...s,$fetch:i,$store:a},i,t,r,o)}var vp=e=>`[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`,yp=()=>()=>{throw Error(vp(`uploader`))};function bp(){let e=new Map(Object.entries(Cd));return t=>e.get(t)??t}var xp=(0,I.createContext)({uploader:yp(),SD:bp()});function Sp({children:e,auth:t,...n}){let r={uploader:n.uploader??yp(),auth:t,SD:n.SD??bp()};return(0,Ss.jsx)(xp.Provider,{value:r,children:e})}function Cp({children:e,authOptions:t,...n}){let[r]=(0,I.useState)(()=>_p(t));return(0,Ss.jsx)(Sp,{...n,auth:n.auth??r,children:e})}function wp({children:e,authOptions:t,...n}){return t===void 0?(0,Ss.jsx)(Sp,{...n,children:e}):(0,Ss.jsx)(Cp,{...n,authOptions:t,children:e})}var Tp=`/home/runner/work/qgrid/qgrid/packages/web/src/contexts/sonamu-provider.tsx`,Ep=e=>fe(e);function Dp({children:e}){return(0,L.jsxDEV)(wp,{SD:Ep,children:e},void 0,!1,{fileName:Tp,lineNumber:10,columnNumber:10},this)}var Op=`/home/runner/work/qgrid/qgrid/packages/web/src/routes/__root.tsx`,kp=_()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`Qgrid`}]}),component:Ap});function Ap(){let{queryClient:e}=kp.useRouteContext();return(0,L.jsxDEV)(`html`,{lang:`en`,children:[(0,L.jsxDEV)(`head`,{children:[(0,L.jsxDEV)(`link`,{rel:`icon`,type:`image/svg+xml`,href:`/sonamu.svg`},void 0,!1,{fileName:Op,lineNumber:28,columnNumber:9},this),(0,L.jsxDEV)(`link`,{rel:`preconnect`,href:`https://fonts.googleapis.com`},void 0,!1,{fileName:Op,lineNumber:29,columnNumber:9},this),(0,L.jsxDEV)(`link`,{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:``},void 0,!1,{fileName:Op,lineNumber:30,columnNumber:9},this),(0,L.jsxDEV)(`link`,{href:`https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=DM+Mono:wght@400;500&display=swap`,rel:`stylesheet`},void 0,!1,{fileName:Op,lineNumber:31,columnNumber:9},this),(0,L.jsxDEV)(C,{},void 0,!1,{fileName:Op,lineNumber:35,columnNumber:9},this)]},void 0,!0,{fileName:Op,lineNumber:27,columnNumber:7},this),(0,L.jsxDEV)(`body`,{children:[(0,L.jsxDEV)(`div`,{id:`root`,children:(0,L.jsxDEV)(m,{client:e,children:(0,L.jsxDEV)(Dp,{children:(0,L.jsxDEV)(Sd,{children:(0,L.jsxDEV)(h,{},void 0,!1,{fileName:Op,lineNumber:42,columnNumber:17},this)},void 0,!1,{fileName:Op,lineNumber:41,columnNumber:15},this)},void 0,!1,{fileName:Op,lineNumber:40,columnNumber:13},this)},void 0,!1,{fileName:Op,lineNumber:39,columnNumber:11},this)},void 0,!1,{fileName:Op,lineNumber:38,columnNumber:9},this),(0,L.jsxDEV)(D,{},void 0,!1,{fileName:Op,lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:Op,lineNumber:37,columnNumber:7},this)]},void 0,!0,{fileName:Op,lineNumber:26,columnNumber:5},this)}var jp=E(`/tokens`)({component:w(()=>Ce(()=>import(`./tokens-QvP410NW.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`)}),Mp=E(`/settings`)({component:w(()=>Ce(()=>import(`./settings-DNDvFGSw.js`),__vite__mapDeps([9,1,3,4,5,7,8])),`component`)}),Np=()=>Ce(()=>import(`./monit-BS9no0dU.js`),__vite__mapDeps([10,1,3,4,5,6,11,12])),Pp=j({level:P([`all`,`warn`,`error`]).optional().default(`all`).catch(()=>`all`)}),Fp=E(`/monit`)({validateSearch:Pp,component:w(Np,`component`)}),Ip=pe(j({type:A(),role:A().optional(),content:ce().optional(),name:A().optional(),arguments:A().optional(),call_id:A().optional(),output:A().optional()})),Lp=pe(j({mediaType:A().optional(),data:A().optional(),url:A().optional(),byteSize:F().optional()})),Rp=se([j({accessToken:A(),refreshToken:A(),expiresAt:F(),accountUuid:A()}),j({accessToken:A(),refreshToken:A(),idToken:A().optional(),accessTokenExpiresAt:F(),idTokenExpiresAt:F().optional(),accountId:A(),planType:A().optional()}),j({authMode:le(`oauth`),accessToken:A(),refreshToken:A(),expiresAt:A(),issuer:le(`https://auth.x.ai`),clientId:A(),scopes:pe(A()),userId:A(),sessionId:A(),agentId:A(),subscriptionTier:A().optional()})]),zp=pe(j({name:A(),description:A().optional(),inputSchema:ce()})),Bp=P([`id-desc`,`id-asc`,`created_at-desc`,`created_at-asc`,`ttft_ms-desc`,`ttft_ms-asc`,`duration_ms-desc`,`duration_ms-asc`,`input_tokens-desc`,`input_tokens-asc`,`output_tokens-desc`,`output_tokens-asc`,`cache_read_tokens-desc`,`cache_read_tokens-asc`,`cache_creation_tokens-desc`,`cache_creation_tokens-asc`,`cost_usd-desc`,`cost_usd-asc`]).describe(`RequestLogOrderBy`),Vp=P([`id`,`token_name`,`user_prompt`]).describe(`RequestLogSearchField`),Hp=P([`running`,`succeeded`,`error`,`aborted`]).describe(`RequestLogStatus`),Up=P([`generate`,`tool_call`]).describe(`RequestLogStepType`),Wp=P([`id-asc`]).describe(`RequestLogStepOrderBy`),Gp=P([`id`]).describe(`RequestLogStepSearchField`),Kp=P([`key-asc`]).describe(`SettingOrderBy`),qp=P([`key`]).describe(`SettingSearchField`),Jp=P([`id-desc`,`ord-asc`]).describe(`TokenOrderBy`),Yp=P([`id`,`name`]).describe(`TokenSearchField`);j({id:N(),created_at:Se(),token_name:A().max(100).nullable(),project_name:A().max(50).nullable(),model_name:A().max(255).nullable(),requested_model_name:A().max(255).nullable(),fallback_count:N().nullable(),user_prompt:A().nullable(),system_prompt:A().nullable(),response:A(),input_tokens:N(),output_tokens:N(),cache_read_tokens:N(),cache_creation_tokens:N(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),duration_ms:N(),ttft_ms:N(),cost_usd:N().nullable(),cost_source:A().max(20).nullable(),image_cost_usd:N().nullable(),image_cost_method:A().max(100).nullable(),service_tier:A().max(20).nullable(),effort:A().max(10).nullable(),history:Ip.nullable(),input_images:Lp.nullable(),tools:zp.nullable(),json_schema:A().nullable(),status:Hp,error_message:A().nullable(),response_json_ok:M().nullable(),tool_call_count:N(),is_image_generation:M(),is_structured:M()}),j({id:N(),created_at:Se(),request_log_id:N(),step_index:N(),type:Up,model_name:A().max(255).nullable(),requested_model_name:A().max(255).nullable(),fallback_count:N().nullable(),input_tokens:N().nullable(),output_tokens:N().nullable(),cache_read_tokens:N().nullable(),cache_creation_tokens:N().nullable(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),cost_usd:N().nullable(),cost_source:A().max(20).nullable(),duration_ms:N().nullable(),ttft_ms:N().nullable(),finish_reason:A().max(20).nullable(),reasoning_text:A().nullable(),reasoning_tokens:N().nullable(),tool_call_index:N().nullable(),tool_call_id:A().max(100).nullable(),tool_name:A().max(100).nullable(),tool_args:A().nullable(),tool_result:A().nullable(),tool_duration_ms:N().nullable(),error:A().nullable()}),j({id:N(),created_at:Se(),key:A().max(100),value:A(),updated_at:Se().nullable()}),j({id:N(),created_at:Se(),provider:A().max(20),credentials:Rp,name:A(),active:M(),reauth_required:M(),ord:N(),quota_threshold:N().nullable(),weight:N(),keepalive_enabled:M()});var Xp=j({num:F().int().nonnegative(),page:F().int().min(1),search:Vp,keyword:A(),orderBy:Bp,queryMode:ye,id:de(F().int().positive()),sonamuFilter:be(),token_name:A().max(100).nullable(),project_name:A().max(50).nullable(),model_name:A().max(255).nullable()}).partial();j({num:F().int().nonnegative(),page:F().int().min(1),search:Gp,keyword:A(),orderBy:Wp,queryMode:ye,id:de(F().int().positive()),sonamuFilter:be(),request_log_id:N()}).partial(),j({num:F().int().nonnegative(),page:F().int().min(1),search:qp,keyword:A(),orderBy:Kp,queryMode:ye,id:de(F().int().positive()),sonamuFilter:be(),key:A().max(100)}).partial(),j({num:F().int().nonnegative(),page:F().int().min(1),search:Yp,keyword:A(),orderBy:Jp,queryMode:ye,id:de(F().int().positive()),sonamuFilter:be()}).partial(),j({id:N(),created_at:Se(),token_name:A().max(100).nullable(),project_name:A().max(50).nullable(),model_name:A().max(255).nullable(),requested_model_name:A().max(255).nullable(),fallback_count:N().nullable(),user_prompt:A().nullable(),system_prompt:A().nullable(),response:A(),input_tokens:N(),output_tokens:N(),cache_read_tokens:N(),cache_creation_tokens:N(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),duration_ms:N(),ttft_ms:N(),cost_usd:N().nullable(),cost_source:A().max(20).nullable(),image_cost_usd:N().nullable(),image_cost_method:A().max(100).nullable(),effort:A().max(10).nullable(),service_tier:A().max(20).nullable(),history:Ip.nullable(),input_images:Lp.nullable(),tools:zp.nullable(),status:Hp,response_json_ok:M().nullable(),error_message:A().nullable(),tool_call_count:N(),is_image_generation:M(),is_structured:M()}),j({id:N(),created_at:Se(),token_name:A().max(100).nullable(),project_name:A().max(50).nullable(),model_name:A().max(255).nullable(),requested_model_name:A().max(255).nullable(),fallback_count:N().nullable(),input_tokens:N(),output_tokens:N(),cache_read_tokens:N(),cache_creation_tokens:N(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),duration_ms:N(),ttft_ms:N(),cost_usd:N().nullable(),cost_source:A().max(20).nullable(),image_cost_usd:N().nullable(),image_cost_method:A().max(100).nullable(),effort:A().max(10).nullable(),service_tier:A().max(20).nullable(),status:Hp,response_json_ok:M().nullable(),tool_call_count:N(),is_image_generation:M(),is_structured:M()}),j({id:N(),token_name:A().max(100).nullable(),model_name:A().max(255).nullable(),input_tokens:N(),output_tokens:N(),cache_read_tokens:N(),cache_creation_tokens:N(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),cost_usd:N().nullable(),cost_source:A().max(20).nullable()}),P([`A`,`P`,`C`]),j({id:N(),created_at:Se(),step_index:N(),type:Up,model_name:A().max(255).nullable(),requested_model_name:A().max(255).nullable(),fallback_count:N().nullable(),input_tokens:N().nullable(),output_tokens:N().nullable(),cache_read_tokens:N().nullable(),cache_creation_tokens:N().nullable(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),cost_usd:N().nullable(),cost_source:A().max(20).nullable(),duration_ms:N().nullable(),ttft_ms:N().nullable(),finish_reason:A().max(20).nullable(),reasoning_text:A().nullable(),reasoning_tokens:N().nullable(),tool_call_index:N().nullable(),tool_call_id:A().max(100).nullable(),tool_name:A().max(100).nullable(),tool_args:A().nullable(),tool_result:A().nullable(),tool_duration_ms:N().nullable(),error:A().nullable()}),j({id:N(),created_at:Se(),step_index:N(),type:Up,model_name:A().max(255).nullable(),requested_model_name:A().max(255).nullable(),fallback_count:N().nullable(),input_tokens:N().nullable(),output_tokens:N().nullable(),cache_read_tokens:N().nullable(),cache_creation_tokens:N().nullable(),cache_creation_5m_tokens:N().nullable(),cache_creation_1h_tokens:N().nullable(),cost_usd:N().nullable(),cost_source:A().max(20).nullable(),duration_ms:N().nullable(),ttft_ms:N().nullable(),finish_reason:A().max(20).nullable(),reasoning_tokens:N().nullable(),tool_call_index:N().nullable(),tool_call_id:A().max(100).nullable(),tool_name:A().max(100).nullable(),tool_duration_ms:N().nullable(),error:A().nullable()}),j({id:N(),tool_args:A().nullable()}),P([`A`,`T`,`I`]),j({id:N(),created_at:Se(),key:A().max(100),value:A(),updated_at:Se().nullable()}),P([`A`]),j({id:N(),created_at:Se(),provider:A().max(20),credentials:Rp,name:A(),active:M(),reauth_required:M(),ord:N(),quota_threshold:N().nullable(),weight:N(),keepalive_enabled:M()}),P([`A`]);var Zp=()=>Ce(()=>import(`./logs-C47OJGEI.js`),__vite__mapDeps([13,1,3,4,5,14,11,15,12])),Qp=j({token:A().optional(),project:A().optional(),model:A().optional(),sort:Bp.optional(),page:Xp.shape.page.default(1)}),$p=E(`/logs`)({validateSearch:Qp,component:w(Zp,`component`)}),em=E(`/`)({component:w(()=>Ce(()=>import(`./routes-kqgkUxE8.js`),__vite__mapDeps([16,1,2,3,4,5,6,14,11,7])),`component`)}),tm=()=>Ce(()=>import(`./show-u8Np69q3.js`),__vite__mapDeps([17,1,3,4,5,11,15])),nm=j({id:F()}),rm=E(`/requests/show`)({validateSearch:nm,component:w(tm,`component`)}),im=xe();j({mediaType:A().optional(),data:A().optional(),url:A().optional(),byteSize:F().optional()});var am=oe({text:A()});se([A(),pe(se([am,im])),im]);var om=jp.update({id:`/tokens`,path:`/tokens`,getParentRoute:()=>kp}),sm=Mp.update({id:`/settings`,path:`/settings`,getParentRoute:()=>kp}),cm=Fp.update({id:`/monit`,path:`/monit`,getParentRoute:()=>kp}),lm=$p.update({id:`/logs`,path:`/logs`,getParentRoute:()=>kp}),um={IndexRoute:em.update({id:`/`,path:`/`,getParentRoute:()=>kp}),LogsRoute:lm,MonitRoute:cm,SettingsRoute:sm,TokensRoute:om,RequestsShowRoute:rm.update({id:`/requests/show`,path:`/requests/show`,getParentRoute:()=>kp})},dm=kp._addFileChildren(um)._addFileTypes(),fm=`/home/runner/work/qgrid/qgrid/packages/web/src/entry-client.tsx`,pm=new ke({defaultOptions:{queries:{staleTime:5e3,retry:!1,refetchOnMount:!0}}}),mm=window.__SONAMU_SSR__?JSON.parse(JSON.stringify(window.__SONAMU_SSR__),ue):void 0;mm&&Te(pm,mm);var hm=window.__SONAMU_SSR_CONFIG__,gm=y({routeTree:dm,context:{queryClient:pm},defaultPreload:`intent`});(async()=>{await gm.load(),document.documentElement.innerHTML&&mm?hm?.disableHydrate?(console.log(`[Sonamu] Hydration disabled, rendering as CSR`),Ae.createRoot(document).render((0,L.jsxDEV)(T,{router:gm},void 0,!1,{fileName:fm,lineNumber:69,columnNumber:44},void 0))):Ae.hydrateRoot(document,(0,L.jsxDEV)(T,{router:gm},void 0,!1,{fileName:fm,lineNumber:72,columnNumber:38},void 0)):Ae.createRoot(document).render((0,L.jsxDEV)(T,{router:gm},void 0,!1,{fileName:fm,lineNumber:76,columnNumber:42},void 0))})(),window.__TANSTACK_QUERY_CLIENT__=pm;export{Fp as a,ju as c,Bp as i,Ds as l,$p as n,Uu as o,Xp as r,Lu as s,rm as t,Ie as u};