renovate-log-parser 0.1.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 (325) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +402 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +30 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/analyze.d.ts +24 -0
  7. package/dist/commands/analyze.js +114 -0
  8. package/dist/commands/analyze.js.map +1 -0
  9. package/dist/commands/detect-errors.d.ts +17 -0
  10. package/dist/commands/detect-errors.js +119 -0
  11. package/dist/commands/detect-errors.js.map +1 -0
  12. package/dist/commands/install-analyze-skill.d.ts +27 -0
  13. package/dist/commands/install-analyze-skill.js +181 -0
  14. package/dist/commands/install-analyze-skill.js.map +1 -0
  15. package/dist/commands/web.d.ts +12 -0
  16. package/dist/commands/web.js +103 -0
  17. package/dist/commands/web.js.map +1 -0
  18. package/dist/core/analyzer.d.ts +89 -0
  19. package/dist/core/analyzer.js +179 -0
  20. package/dist/core/analyzer.js.map +1 -0
  21. package/dist/core/error-detector.d.ts +56 -0
  22. package/dist/core/error-detector.js +236 -0
  23. package/dist/core/error-detector.js.map +1 -0
  24. package/dist/core/filters.d.ts +136 -0
  25. package/dist/core/filters.js +95 -0
  26. package/dist/core/filters.js.map +1 -0
  27. package/dist/core/ignore-file.d.ts +52 -0
  28. package/dist/core/ignore-file.js +104 -0
  29. package/dist/core/ignore-file.js.map +1 -0
  30. package/dist/core/levels.d.ts +33 -0
  31. package/dist/core/levels.js +35 -0
  32. package/dist/core/levels.js.map +1 -0
  33. package/dist/core/parser.d.ts +57 -0
  34. package/dist/core/parser.js +201 -0
  35. package/dist/core/parser.js.map +1 -0
  36. package/dist/core/query-builder.d.ts +47 -0
  37. package/dist/core/query-builder.js +155 -0
  38. package/dist/core/query-builder.js.map +1 -0
  39. package/dist/core/skill-template.d.ts +34 -0
  40. package/dist/core/skill-template.js +259 -0
  41. package/dist/core/skill-template.js.map +1 -0
  42. package/package.json +68 -0
  43. package/web/.output/nitro.json +15 -0
  44. package/web/.output/public/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2 +0 -0
  45. package/web/.output/public/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2 +0 -0
  46. package/web/.output/public/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2 +0 -0
  47. package/web/.output/public/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2 +0 -0
  48. package/web/.output/public/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2 +0 -0
  49. package/web/.output/public/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2 +0 -0
  50. package/web/.output/public/_nuxt/BWja8e3M.js +37 -0
  51. package/web/.output/public/_nuxt/BgApMHS1.js +1 -0
  52. package/web/.output/public/_nuxt/CGPWRqbc.js +1 -0
  53. package/web/.output/public/_nuxt/DlAUqK2U.js +1 -0
  54. package/web/.output/public/_nuxt/Sgtec1U0.js +1 -0
  55. package/web/.output/public/_nuxt/builds/latest.json +1 -0
  56. package/web/.output/public/_nuxt/builds/meta/c4723e49-0623-47af-ae79-9ab6428bdcc1.json +1 -0
  57. package/web/.output/public/_nuxt/entry.9mB-pyEY.css +1 -0
  58. package/web/.output/public/_nuxt/error-404.B_PvSG-P.css +1 -0
  59. package/web/.output/public/_nuxt/error-500.CghkKCEr.css +1 -0
  60. package/web/.output/public/_nuxt/index.BlvAG7F6.css +1 -0
  61. package/web/.output/public/favicon.ico +0 -0
  62. package/web/.output/server/chunks/_/error-500.mjs +19 -0
  63. package/web/.output/server/chunks/_/error-500.mjs.map +1 -0
  64. package/web/.output/server/chunks/_/icons.mjs +6153 -0
  65. package/web/.output/server/chunks/_/icons.mjs.map +1 -0
  66. package/web/.output/server/chunks/_/icons2.mjs +11494 -0
  67. package/web/.output/server/chunks/_/icons2.mjs.map +1 -0
  68. package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs +10 -0
  69. package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs.map +1 -0
  70. package/web/.output/server/chunks/build/client.precomputed.mjs +4 -0
  71. package/web/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  72. package/web/.output/server/chunks/build/error-404-DyaaQUIS.mjs +106 -0
  73. package/web/.output/server/chunks/build/error-404-DyaaQUIS.mjs.map +1 -0
  74. package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs +8 -0
  75. package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs.map +1 -0
  76. package/web/.output/server/chunks/build/error-500-CVSP-p02.mjs +89 -0
  77. package/web/.output/server/chunks/build/error-500-CVSP-p02.mjs.map +1 -0
  78. package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs +8 -0
  79. package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs.map +1 -0
  80. package/web/.output/server/chunks/build/index-88dXYOxO.mjs +19675 -0
  81. package/web/.output/server/chunks/build/index-88dXYOxO.mjs.map +1 -0
  82. package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs +8 -0
  83. package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs.map +1 -0
  84. package/web/.output/server/chunks/build/server.mjs +7910 -0
  85. package/web/.output/server/chunks/build/server.mjs.map +1 -0
  86. package/web/.output/server/chunks/build/styles.mjs +10 -0
  87. package/web/.output/server/chunks/build/styles.mjs.map +1 -0
  88. package/web/.output/server/chunks/nitro/nitro.mjs +6944 -0
  89. package/web/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  90. package/web/.output/server/chunks/routes/api/fields.get.mjs +27 -0
  91. package/web/.output/server/chunks/routes/api/fields.get.mjs.map +1 -0
  92. package/web/.output/server/chunks/routes/api/findings.get.mjs +30 -0
  93. package/web/.output/server/chunks/routes/api/findings.get.mjs.map +1 -0
  94. package/web/.output/server/chunks/routes/api/log/contents.post.mjs +29 -0
  95. package/web/.output/server/chunks/routes/api/log/contents.post.mjs.map +1 -0
  96. package/web/.output/server/chunks/routes/api/log/path.post.mjs +30 -0
  97. package/web/.output/server/chunks/routes/api/log/path.post.mjs.map +1 -0
  98. package/web/.output/server/chunks/routes/api/repositories.get.mjs +27 -0
  99. package/web/.output/server/chunks/routes/api/repositories.get.mjs.map +1 -0
  100. package/web/.output/server/chunks/routes/api/rows.get.mjs +48 -0
  101. package/web/.output/server/chunks/routes/api/rows.get.mjs.map +1 -0
  102. package/web/.output/server/chunks/routes/renderer.mjs +451 -0
  103. package/web/.output/server/chunks/routes/renderer.mjs.map +1 -0
  104. package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  105. package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  106. package/web/.output/server/index.mjs +16 -0
  107. package/web/.output/server/index.mjs.map +1 -0
  108. package/web/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.mjs +290 -0
  109. package/web/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
  110. package/web/.output/server/node_modules/.nitro/hookable@6.1.1/dist/index.mjs +257 -0
  111. package/web/.output/server/node_modules/.nitro/hookable@6.1.1/package.json +53 -0
  112. package/web/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
  113. package/web/.output/server/node_modules/@babel/parser/package.json +50 -0
  114. package/web/.output/server/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1038 -0
  115. package/web/.output/server/node_modules/@floating-ui/core/package.json +63 -0
  116. package/web/.output/server/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +789 -0
  117. package/web/.output/server/node_modules/@floating-ui/dom/package.json +72 -0
  118. package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
  119. package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
  120. package/web/.output/server/node_modules/@floating-ui/utils/package.json +70 -0
  121. package/web/.output/server/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs +190 -0
  122. package/web/.output/server/node_modules/@floating-ui/vue/package.json +71 -0
  123. package/web/.output/server/node_modules/@iconify/utils/lib/colors/index.js +295 -0
  124. package/web/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +701 -0
  125. package/web/.output/server/node_modules/@iconify/utils/lib/css/common.js +75 -0
  126. package/web/.output/server/node_modules/@iconify/utils/lib/css/format.js +39 -0
  127. package/web/.output/server/node_modules/@iconify/utils/lib/css/icon.js +47 -0
  128. package/web/.output/server/node_modules/@iconify/utils/lib/css/icons.js +128 -0
  129. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +19 -0
  130. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +13 -0
  131. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +17 -0
  132. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +16 -0
  133. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +30 -0
  134. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +78 -0
  135. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +100 -0
  136. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +28 -0
  137. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +58 -0
  138. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +48 -0
  139. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +203 -0
  140. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +33 -0
  141. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +132 -0
  142. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +165 -0
  143. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +79 -0
  144. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +92 -0
  145. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +26 -0
  146. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +76 -0
  147. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +66 -0
  148. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +45 -0
  149. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +103 -0
  150. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +36 -0
  151. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +92 -0
  152. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +62 -0
  153. package/web/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +25 -0
  154. package/web/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +16 -0
  155. package/web/.output/server/node_modules/@iconify/utils/lib/icon/name.js +57 -0
  156. package/web/.output/server/node_modules/@iconify/utils/lib/icon/square.js +33 -0
  157. package/web/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +12 -0
  158. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +125 -0
  159. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +19 -0
  160. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +25 -0
  161. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +36 -0
  162. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +91 -0
  163. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +46 -0
  164. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +23 -0
  165. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +42 -0
  166. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +123 -0
  167. package/web/.output/server/node_modules/@iconify/utils/lib/index.js +52 -0
  168. package/web/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +30 -0
  169. package/web/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +26 -0
  170. package/web/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +27 -0
  171. package/web/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +105 -0
  172. package/web/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +26 -0
  173. package/web/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +26 -0
  174. package/web/.output/server/node_modules/@iconify/utils/lib/misc/title.js +9 -0
  175. package/web/.output/server/node_modules/@iconify/utils/lib/svg/build.js +113 -0
  176. package/web/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +31 -0
  177. package/web/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +13 -0
  178. package/web/.output/server/node_modules/@iconify/utils/lib/svg/html.js +9 -0
  179. package/web/.output/server/node_modules/@iconify/utils/lib/svg/id.js +41 -0
  180. package/web/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +22 -0
  181. package/web/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +67 -0
  182. package/web/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +54 -0
  183. package/web/.output/server/node_modules/@iconify/utils/lib/svg/size.js +27 -0
  184. package/web/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +7 -0
  185. package/web/.output/server/node_modules/@iconify/utils/lib/svg/url.js +22 -0
  186. package/web/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +8 -0
  187. package/web/.output/server/node_modules/@iconify/utils/package.json +119 -0
  188. package/web/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1896 -0
  189. package/web/.output/server/node_modules/@iconify/vue/package.json +62 -0
  190. package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/index.js +1268 -0
  191. package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +34 -0
  192. package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/utils.js +74 -0
  193. package/web/.output/server/node_modules/@tanstack/virtual-core/package.json +56 -0
  194. package/web/.output/server/node_modules/@tanstack/vue-virtual/dist/esm/index.js +66 -0
  195. package/web/.output/server/node_modules/@tanstack/vue-virtual/package.json +68 -0
  196. package/web/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
  197. package/web/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  198. package/web/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  199. package/web/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  200. package/web/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  201. package/web/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  202. package/web/.output/server/node_modules/@vue/devtools-api/dist/index.js +2 -0
  203. package/web/.output/server/node_modules/@vue/devtools-api/package.json +34 -0
  204. package/web/.output/server/node_modules/@vue/devtools-kit/dist/index.js +5670 -0
  205. package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/dist/index.mjs +290 -0
  206. package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/package.json +49 -0
  207. package/web/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
  208. package/web/.output/server/node_modules/@vue/devtools-shared/dist/index.js +239 -0
  209. package/web/.output/server/node_modules/@vue/devtools-shared/package.json +33 -0
  210. package/web/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
  211. package/web/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  212. package/web/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
  213. package/web/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  214. package/web/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
  215. package/web/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  216. package/web/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
  217. package/web/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  218. package/web/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  219. package/web/.output/server/node_modules/@vue/shared/package.json +47 -0
  220. package/web/.output/server/node_modules/@vueuse/core/dist/index.js +8464 -0
  221. package/web/.output/server/node_modules/@vueuse/core/package.json +49 -0
  222. package/web/.output/server/node_modules/@vueuse/shared/dist/index.js +2013 -0
  223. package/web/.output/server/node_modules/@vueuse/shared/package.json +42 -0
  224. package/web/.output/server/node_modules/aria-hidden/dist/es5/index.js +174 -0
  225. package/web/.output/server/node_modules/aria-hidden/package.json +71 -0
  226. package/web/.output/server/node_modules/birpc/dist/index.mjs +291 -0
  227. package/web/.output/server/node_modules/birpc/package.json +57 -0
  228. package/web/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  229. package/web/.output/server/node_modules/consola/dist/core.mjs +512 -0
  230. package/web/.output/server/node_modules/consola/dist/index.mjs +651 -0
  231. package/web/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  232. package/web/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  233. package/web/.output/server/node_modules/consola/package.json +136 -0
  234. package/web/.output/server/node_modules/devalue/index.js +4 -0
  235. package/web/.output/server/node_modules/devalue/package.json +40 -0
  236. package/web/.output/server/node_modules/devalue/src/base64.js +60 -0
  237. package/web/.output/server/node_modules/devalue/src/constants.js +12 -0
  238. package/web/.output/server/node_modules/devalue/src/parse.js +283 -0
  239. package/web/.output/server/node_modules/devalue/src/stringify.js +401 -0
  240. package/web/.output/server/node_modules/devalue/src/uneval.js +552 -0
  241. package/web/.output/server/node_modules/devalue/src/utils.js +160 -0
  242. package/web/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  243. package/web/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  244. package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  245. package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  246. package/web/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  247. package/web/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  248. package/web/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  249. package/web/.output/server/node_modules/entities/package.json +120 -0
  250. package/web/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  251. package/web/.output/server/node_modules/estree-walker/package.json +37 -0
  252. package/web/.output/server/node_modules/hookable/dist/index.mjs +257 -0
  253. package/web/.output/server/node_modules/hookable/package.json +53 -0
  254. package/web/.output/server/node_modules/nostics/dist/index.mjs +179 -0
  255. package/web/.output/server/node_modules/nostics/package.json +124 -0
  256. package/web/.output/server/node_modules/perfect-debounce/dist/index.mjs +89 -0
  257. package/web/.output/server/node_modules/perfect-debounce/package.json +41 -0
  258. package/web/.output/server/node_modules/rou3/dist/index.mjs +501 -0
  259. package/web/.output/server/node_modules/rou3/package.json +48 -0
  260. package/web/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  261. package/web/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  262. package/web/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  263. package/web/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  264. package/web/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  265. package/web/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  266. package/web/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  267. package/web/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  268. package/web/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  269. package/web/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  270. package/web/.output/server/node_modules/source-map-js/package.json +71 -0
  271. package/web/.output/server/node_modules/source-map-js/source-map.js +8 -0
  272. package/web/.output/server/node_modules/srvx/dist/_chunks/_body-limit.mjs +39 -0
  273. package/web/.output/server/node_modules/srvx/dist/_chunks/_plugins.mjs +56 -0
  274. package/web/.output/server/node_modules/srvx/dist/_chunks/_trust-proxy.mjs +58 -0
  275. package/web/.output/server/node_modules/srvx/dist/_chunks/_url.mjs +134 -0
  276. package/web/.output/server/node_modules/srvx/dist/_chunks/_utils.mjs +15 -0
  277. package/web/.output/server/node_modules/srvx/dist/_chunks/_utils2.mjs +75 -0
  278. package/web/.output/server/node_modules/srvx/dist/adapters/node.mjs +976 -0
  279. package/web/.output/server/node_modules/srvx/package.json +102 -0
  280. package/web/.output/server/node_modules/tailwind-merge/dist/bundle-mjs.mjs +3365 -0
  281. package/web/.output/server/node_modules/tailwind-merge/package.json +93 -0
  282. package/web/.output/server/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +112 -0
  283. package/web/.output/server/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +269 -0
  284. package/web/.output/server/node_modules/tailwind-variants/dist/index.js +38 -0
  285. package/web/.output/server/node_modules/tailwind-variants/package.json +122 -0
  286. package/web/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
  287. package/web/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
  288. package/web/.output/server/node_modules/tailwindcss/package.json +89 -0
  289. package/web/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  290. package/web/.output/server/node_modules/ufo/package.json +48 -0
  291. package/web/.output/server/node_modules/unhead/dist/index.mjs +9 -0
  292. package/web/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  293. package/web/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  294. package/web/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
  295. package/web/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  296. package/web/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
  297. package/web/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  298. package/web/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
  299. package/web/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
  300. package/web/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  301. package/web/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
  302. package/web/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  303. package/web/.output/server/node_modules/unhead/dist/shared/unhead.Dh1cQCTe.mjs +44 -0
  304. package/web/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
  305. package/web/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  306. package/web/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  307. package/web/.output/server/node_modules/unhead/node_modules/hookable/dist/index.mjs +257 -0
  308. package/web/.output/server/node_modules/unhead/node_modules/hookable/package.json +53 -0
  309. package/web/.output/server/node_modules/unhead/package.json +105 -0
  310. package/web/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  311. package/web/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  312. package/web/.output/server/node_modules/vue/index.js +7 -0
  313. package/web/.output/server/node_modules/vue/index.mjs +1 -0
  314. package/web/.output/server/node_modules/vue/package.json +112 -0
  315. package/web/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  316. package/web/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
  317. package/web/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
  318. package/web/.output/server/node_modules/vue-demi/lib/index.mjs +34 -0
  319. package/web/.output/server/node_modules/vue-demi/package.json +47 -0
  320. package/web/.output/server/node_modules/vue-router/dist/devtools-Bpr7ZAVB.js +1056 -0
  321. package/web/.output/server/node_modules/vue-router/dist/useApi-CROJJdhE.js +436 -0
  322. package/web/.output/server/node_modules/vue-router/dist/vue-router.js +1543 -0
  323. package/web/.output/server/node_modules/vue-router/package.json +214 -0
  324. package/web/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
  325. package/web/.output/server/package.json +51 -0
@@ -0,0 +1,1543 @@
1
+ /*!
2
+ * vue-router v5.2.0
3
+ * (c) 2026 Eduardo San Martin Morote
4
+ * @license MIT
5
+ */
6
+ import { C as isSameRouteLocation, E as parseURL, F as isBrowser, M as encodeHash, N as encodeParam, O as stringifyURL, S as START_LOCATION_NORMALIZED, T as isSameRouteRecord, _ as saveScrollPosition, a as loadRouteLocation, b as normalizeBase, c as useCallbacks, d as stringifyQuery, f as isRouteLocation, g as getScrollKey, h as getSavedScrollPosition, i as guardToPromiseFn, j as decode, k as stripBase, l as normalizeQuery, m as computeScrollPosition, n as extractChangingRecords, o as onBeforeRouteLeave, p as isRouteName, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as parseQuery, v as scrollToPosition, w as isSameRouteLocationParams, y as createHref } from "./devtools-Bpr7ZAVB.js";
7
+ import { a as routerKey, c as diagnostics, d as isNavigationFailure, f as applyToParams, h as isArray, i as routeLocationKey, l as NavigationFailureType, n as useRouter, o as routerViewLocationKey, p as assign, r as matchedRouteKey, s as viewDepthKey, t as useRoute, u as createRouterError, v as mergeOptions, y as noop } from "./useApi-CROJJdhE.js";
8
+ import { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from "vue";
9
+ //#region src/history/html5.ts
10
+ let createBaseLocation = () => location.protocol + "//" + location.host;
11
+ /**
12
+ * Creates a normalized history location from a window.location object
13
+ * @param base - The base path
14
+ * @param location - The window.location object
15
+ */
16
+ function createCurrentLocation(base, location) {
17
+ const { pathname, search, hash } = location;
18
+ const hashPos = base.indexOf("#");
19
+ if (hashPos > -1) {
20
+ let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;
21
+ let pathFromHash = hash.slice(slicePos);
22
+ if (pathFromHash[0] !== "/") pathFromHash = "/" + pathFromHash;
23
+ return stripBase(pathFromHash, "");
24
+ }
25
+ return stripBase(pathname, base) + search + hash;
26
+ }
27
+ function useHistoryListeners(base, historyState, currentLocation, replace) {
28
+ let listeners = [];
29
+ let teardowns = [];
30
+ let pauseState = null;
31
+ const popStateHandler = ({ state }) => {
32
+ const to = createCurrentLocation(base, location);
33
+ const from = currentLocation.value;
34
+ const fromState = historyState.value;
35
+ let delta = 0;
36
+ if (state) {
37
+ currentLocation.value = to;
38
+ historyState.value = state;
39
+ if (pauseState && pauseState === from) {
40
+ pauseState = null;
41
+ return;
42
+ }
43
+ delta = fromState ? state.position - fromState.position : 0;
44
+ } else replace(to);
45
+ listeners.forEach((listener) => {
46
+ listener(currentLocation.value, from, {
47
+ delta,
48
+ type: "pop",
49
+ direction: delta ? delta > 0 ? "forward" : "back" : ""
50
+ });
51
+ });
52
+ };
53
+ function pauseListeners() {
54
+ pauseState = currentLocation.value;
55
+ }
56
+ function listen(callback) {
57
+ listeners.push(callback);
58
+ const teardown = () => {
59
+ const index = listeners.indexOf(callback);
60
+ if (index > -1) listeners.splice(index, 1);
61
+ };
62
+ teardowns.push(teardown);
63
+ return teardown;
64
+ }
65
+ function beforeUnloadListener() {
66
+ if (document.visibilityState === "hidden") {
67
+ const { history } = window;
68
+ if (!history.state) return;
69
+ history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
70
+ }
71
+ }
72
+ function destroy() {
73
+ for (const teardown of teardowns) teardown();
74
+ teardowns = [];
75
+ window.removeEventListener("popstate", popStateHandler);
76
+ window.removeEventListener("pagehide", beforeUnloadListener);
77
+ document.removeEventListener("visibilitychange", beforeUnloadListener);
78
+ }
79
+ window.addEventListener("popstate", popStateHandler);
80
+ window.addEventListener("pagehide", beforeUnloadListener);
81
+ document.addEventListener("visibilitychange", beforeUnloadListener);
82
+ return {
83
+ pauseListeners,
84
+ listen,
85
+ destroy
86
+ };
87
+ }
88
+ /**
89
+ * Creates a state object
90
+ */
91
+ function buildState(back, current, forward, replaced = false, computeScroll = false) {
92
+ return {
93
+ back,
94
+ current,
95
+ forward,
96
+ replaced,
97
+ position: window.history.length,
98
+ scroll: computeScroll ? computeScrollPosition() : null
99
+ };
100
+ }
101
+ function useHistoryStateNavigation(base) {
102
+ const { history, location } = window;
103
+ const currentLocation = { value: createCurrentLocation(base, location) };
104
+ const historyState = { value: history.state };
105
+ if (!historyState.value) changeLocation(currentLocation.value, {
106
+ back: null,
107
+ current: currentLocation.value,
108
+ forward: null,
109
+ position: history.length - 1,
110
+ replaced: true,
111
+ scroll: null
112
+ }, true);
113
+ function changeLocation(to, state, replace) {
114
+ /**
115
+ * if a base tag is provided, and we are on a normal domain, we have to
116
+ * respect the provided `base` attribute because pushState() will use it and
117
+ * potentially erase anything before the `#` like at
118
+ * https://github.com/vuejs/router/issues/685 where a base of
119
+ * `/folder/#` but a base of `/` would erase the `/folder/` section. If
120
+ * there is no host, the `<base>` tag makes no sense and if there isn't a
121
+ * base tag we can just use everything after the `#`.
122
+ */
123
+ const hashIndex = base.indexOf("#");
124
+ const url = hashIndex > -1 ? (location.host && document.querySelector("base") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;
125
+ try {
126
+ history[replace ? "replaceState" : "pushState"](state, "", url);
127
+ historyState.value = state;
128
+ } catch (err) {
129
+ if (process.env.NODE_ENV !== "production") diagnostics.VUE_ROUTER_R0120({ cause: err });
130
+ else console.error(err);
131
+ location[replace ? "replace" : "assign"](url);
132
+ }
133
+ }
134
+ function replace(to, data) {
135
+ changeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);
136
+ currentLocation.value = to;
137
+ }
138
+ function push(to, data) {
139
+ const currentState = assign({}, historyState.value, history.state, {
140
+ forward: to,
141
+ scroll: computeScrollPosition()
142
+ });
143
+ if (process.env.NODE_ENV !== "production" && !history.state) diagnostics.VUE_ROUTER_R0121();
144
+ changeLocation(currentState.current, currentState, true);
145
+ changeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);
146
+ currentLocation.value = to;
147
+ }
148
+ return {
149
+ location: currentLocation,
150
+ state: historyState,
151
+ push,
152
+ replace
153
+ };
154
+ }
155
+ /**
156
+ * Creates an HTML5 history. Most common history for single page applications.
157
+ *
158
+ * @param base -
159
+ */
160
+ function createWebHistory(base) {
161
+ base = normalizeBase(base);
162
+ const historyNavigation = useHistoryStateNavigation(base);
163
+ const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);
164
+ function go(delta, triggerListeners = true) {
165
+ if (!triggerListeners) historyListeners.pauseListeners();
166
+ history.go(delta);
167
+ }
168
+ const routerHistory = assign({
169
+ location: "",
170
+ base,
171
+ go,
172
+ createHref: createHref.bind(null, base)
173
+ }, historyNavigation, historyListeners);
174
+ Object.defineProperty(routerHistory, "location", {
175
+ enumerable: true,
176
+ get: () => historyNavigation.location.value
177
+ });
178
+ Object.defineProperty(routerHistory, "state", {
179
+ enumerable: true,
180
+ get: () => historyNavigation.state.value
181
+ });
182
+ return routerHistory;
183
+ }
184
+ //#endregion
185
+ //#region src/history/hash.ts
186
+ /**
187
+ * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to
188
+ * handle any URL is not possible.
189
+ *
190
+ * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag
191
+ * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()
192
+ * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything
193
+ * after the `#`).
194
+ *
195
+ * @example
196
+ * ```js
197
+ * // at https://example.com/folder
198
+ * createWebHashHistory() // gives a url of `https://example.com/folder#`
199
+ * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`
200
+ * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`
201
+ * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`
202
+ * // you should avoid doing this because it changes the original url and breaks copying urls
203
+ * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`
204
+ *
205
+ * // at file:///usr/etc/folder/index.html
206
+ * // for locations with no `host`, the base is ignored
207
+ * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`
208
+ * ```
209
+ */
210
+ function createWebHashHistory(base) {
211
+ base = location.host ? base || location.pathname + location.search : "";
212
+ if (!base.includes("#")) base += "#";
213
+ if (process.env.NODE_ENV !== "production" && !base.endsWith("#/") && !base.endsWith("#")) diagnostics.VUE_ROUTER_R0110({
214
+ base,
215
+ suggestion: base.replace(/#.*$/, "#")
216
+ });
217
+ return createWebHistory(base);
218
+ }
219
+ //#endregion
220
+ //#region src/history/memory.ts
221
+ /**
222
+ * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.
223
+ * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.
224
+ *
225
+ * @param base - Base applied to all urls, defaults to '/'
226
+ * @returns a history object that can be passed to the router constructor
227
+ */
228
+ function createMemoryHistory(base = "") {
229
+ let listeners = [];
230
+ let queue = [["", {}]];
231
+ let position = 0;
232
+ base = normalizeBase(base);
233
+ function setLocation(location, state = {}) {
234
+ position++;
235
+ if (position !== queue.length) queue.splice(position);
236
+ queue.push([location, state]);
237
+ }
238
+ function triggerListeners(to, from, { direction, delta }) {
239
+ const info = {
240
+ direction,
241
+ delta,
242
+ type: "pop"
243
+ };
244
+ for (const callback of listeners) callback(to, from, info);
245
+ }
246
+ const routerHistory = {
247
+ location: "",
248
+ state: {},
249
+ base,
250
+ createHref: createHref.bind(null, base),
251
+ replace(to, state) {
252
+ queue.splice(position--, 1);
253
+ setLocation(to, state);
254
+ },
255
+ push(to, state) {
256
+ setLocation(to, state);
257
+ },
258
+ listen(callback) {
259
+ listeners.push(callback);
260
+ return () => {
261
+ const index = listeners.indexOf(callback);
262
+ if (index > -1) listeners.splice(index, 1);
263
+ };
264
+ },
265
+ destroy() {
266
+ listeners = [];
267
+ queue = [["", {}]];
268
+ position = 0;
269
+ },
270
+ go(delta, shouldTrigger = true) {
271
+ const from = this.location;
272
+ const direction = delta < 0 ? "back" : "forward";
273
+ position = Math.max(0, Math.min(position + delta, queue.length - 1));
274
+ if (shouldTrigger) triggerListeners(this.location, from, {
275
+ direction,
276
+ delta
277
+ });
278
+ }
279
+ };
280
+ Object.defineProperty(routerHistory, "location", {
281
+ enumerable: true,
282
+ get: () => queue[position][0]
283
+ });
284
+ Object.defineProperty(routerHistory, "state", {
285
+ enumerable: true,
286
+ get: () => queue[position][1]
287
+ });
288
+ return routerHistory;
289
+ }
290
+ //#endregion
291
+ //#region src/matcher/pathTokenizer.ts
292
+ const ROOT_TOKEN = {
293
+ type: 0,
294
+ value: ""
295
+ };
296
+ const VALID_PARAM_RE = /[a-zA-Z0-9_]/;
297
+ function tokenizePath(path) {
298
+ if (!path) return [[]];
299
+ if (path === "/") return [[ROOT_TOKEN]];
300
+ if (!path.startsWith("/")) throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${path}" should be "/${path}".` : `Invalid path "${path}"`);
301
+ function crash(message) {
302
+ throw new Error(`ERR (${state})/"${buffer}": ${message}`);
303
+ }
304
+ let state = 0;
305
+ let previousState = state;
306
+ const tokens = [];
307
+ let segment;
308
+ function finalizeSegment() {
309
+ if (segment) tokens.push(segment);
310
+ segment = [];
311
+ }
312
+ let i = 0;
313
+ let char;
314
+ let buffer = "";
315
+ let customRe = "";
316
+ function consumeBuffer() {
317
+ if (!buffer) return;
318
+ if (state === 0) segment.push({
319
+ type: 0,
320
+ value: buffer
321
+ });
322
+ else if (state === 1 || state === 2 || state === 3) {
323
+ if (segment.length > 1 && (char === "*" || char === "+")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);
324
+ segment.push({
325
+ type: 1,
326
+ value: buffer,
327
+ regexp: customRe,
328
+ repeatable: char === "*" || char === "+",
329
+ optional: char === "*" || char === "?"
330
+ });
331
+ } else crash("Invalid state to consume buffer");
332
+ buffer = "";
333
+ }
334
+ function addCharToBuffer() {
335
+ buffer += char;
336
+ }
337
+ while (i < path.length) {
338
+ char = path[i++];
339
+ switch (state) {
340
+ case 0:
341
+ if (char === "\\") {
342
+ previousState = state;
343
+ state = 4;
344
+ } else if (char === "/") {
345
+ if (buffer) consumeBuffer();
346
+ finalizeSegment();
347
+ } else if (char === ":") {
348
+ consumeBuffer();
349
+ state = 1;
350
+ } else addCharToBuffer();
351
+ break;
352
+ case 4:
353
+ addCharToBuffer();
354
+ state = previousState;
355
+ break;
356
+ case 1:
357
+ if (char === "(") state = 2;
358
+ else if (VALID_PARAM_RE.test(char)) addCharToBuffer();
359
+ else {
360
+ consumeBuffer();
361
+ state = 0;
362
+ if (char !== "*" && char !== "?" && char !== "+") i--;
363
+ }
364
+ break;
365
+ case 2:
366
+ if (char === ")") if (customRe[customRe.length - 1] == "\\") customRe = customRe.slice(0, -1) + char;
367
+ else state = 3;
368
+ else customRe += char;
369
+ break;
370
+ case 3:
371
+ consumeBuffer();
372
+ state = 0;
373
+ if (char !== "*" && char !== "?" && char !== "+") i--;
374
+ customRe = "";
375
+ break;
376
+ default:
377
+ crash("Unknown state");
378
+ break;
379
+ }
380
+ }
381
+ if (state === 2) crash(`Unfinished custom RegExp for param "${buffer}"`);
382
+ consumeBuffer();
383
+ finalizeSegment();
384
+ return tokens;
385
+ }
386
+ //#endregion
387
+ //#region src/matcher/pathParserRanker.ts
388
+ const BASE_PARAM_PATTERN = "[^/]+?";
389
+ const BASE_PATH_PARSER_OPTIONS = {
390
+ sensitive: false,
391
+ strict: false,
392
+ start: true,
393
+ end: true
394
+ };
395
+ const REGEX_CHARS_RE = /[.+*?^${}()[\]/\\]/g;
396
+ /**
397
+ * Creates a path parser from an array of Segments (a segment is an array of Tokens)
398
+ *
399
+ * @param segments - array of segments returned by tokenizePath
400
+ * @param extraOptions - optional options for the regexp
401
+ * @returns a PathParser
402
+ */
403
+ function tokensToParser(segments, extraOptions) {
404
+ const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);
405
+ const score = [];
406
+ let pattern = options.start ? "^" : "";
407
+ const keys = [];
408
+ for (const segment of segments) {
409
+ const segmentScores = segment.length ? [] : [90];
410
+ if (options.strict && !segment.length) pattern += "/";
411
+ for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {
412
+ const token = segment[tokenIndex];
413
+ let subSegmentScore = 40 + (options.sensitive ? .25 : 0);
414
+ if (token.type === 0) {
415
+ if (!tokenIndex) pattern += "/";
416
+ pattern += token.value.replace(REGEX_CHARS_RE, "\\$&");
417
+ subSegmentScore += 40;
418
+ } else if (token.type === 1) {
419
+ const { value, repeatable, optional, regexp } = token;
420
+ keys.push({
421
+ name: value,
422
+ repeatable,
423
+ optional
424
+ });
425
+ const re = regexp ? regexp : BASE_PARAM_PATTERN;
426
+ if (re !== BASE_PARAM_PATTERN) {
427
+ subSegmentScore += 10;
428
+ try {
429
+ new RegExp(`(${re})`);
430
+ } catch (err) {
431
+ throw new Error(`Invalid custom RegExp for param "${value}" (${re}): ` + err.message);
432
+ }
433
+ }
434
+ let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;
435
+ if (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : "/" + subPattern;
436
+ if (optional) subPattern += "?";
437
+ pattern += subPattern;
438
+ subSegmentScore += 20;
439
+ if (optional) subSegmentScore += -8;
440
+ if (repeatable) subSegmentScore += -20;
441
+ if (re === ".*") subSegmentScore += -50;
442
+ }
443
+ segmentScores.push(subSegmentScore);
444
+ }
445
+ score.push(segmentScores);
446
+ }
447
+ if (options.strict && options.end) {
448
+ const i = score.length - 1;
449
+ score[i][score[i].length - 1] += .7000000000000001;
450
+ }
451
+ if (!options.strict) pattern += "/?";
452
+ if (options.end) pattern += "$";
453
+ else if (options.strict && !pattern.endsWith("/")) pattern += "(?:/|$)";
454
+ const re = new RegExp(pattern, options.sensitive ? "" : "i");
455
+ function parse(path) {
456
+ const match = path.match(re);
457
+ const params = {};
458
+ if (!match) return null;
459
+ for (let i = 1; i < match.length; i++) {
460
+ const value = match[i] || "";
461
+ const key = keys[i - 1];
462
+ params[key.name] = value && key.repeatable ? value.split("/") : value;
463
+ }
464
+ return params;
465
+ }
466
+ function stringify(params) {
467
+ let path = "";
468
+ let avoidDuplicatedSlash = false;
469
+ for (const segment of segments) {
470
+ if (!avoidDuplicatedSlash || !path.endsWith("/")) path += "/";
471
+ avoidDuplicatedSlash = false;
472
+ for (const token of segment) if (token.type === 0) path += token.value;
473
+ else if (token.type === 1) {
474
+ const { value, repeatable, optional } = token;
475
+ const param = value in params ? params[value] : "";
476
+ if (isArray(param) && !repeatable) throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
477
+ const text = isArray(param) ? param.join("/") : param;
478
+ if (!text) if (optional) {
479
+ if (segment.length < 2) if (path.endsWith("/")) path = path.slice(0, -1);
480
+ else avoidDuplicatedSlash = true;
481
+ } else throw new Error(`Missing required param "${value}"`);
482
+ path += text;
483
+ }
484
+ }
485
+ return path || "/";
486
+ }
487
+ return {
488
+ re,
489
+ score,
490
+ keys,
491
+ parse,
492
+ stringify
493
+ };
494
+ }
495
+ /**
496
+ * Compares an array of numbers as used in PathParser.score and returns a
497
+ * number. This function can be used to `sort` an array
498
+ *
499
+ * @param a - first array of numbers
500
+ * @param b - second array of numbers
501
+ * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
502
+ * should be sorted first
503
+ */
504
+ function compareScoreArray(a, b) {
505
+ let i = 0;
506
+ while (i < a.length && i < b.length) {
507
+ const diff = b[i] - a[i];
508
+ if (diff) return diff;
509
+ i++;
510
+ }
511
+ if (a.length < b.length) return a.length === 1 && a[0] === 80 ? -1 : 1;
512
+ else if (a.length > b.length) return b.length === 1 && b[0] === 80 ? 1 : -1;
513
+ return 0;
514
+ }
515
+ /**
516
+ * Compare function that can be used with `sort` to sort an array of PathParser
517
+ *
518
+ * @param a - first PathParser
519
+ * @param b - second PathParser
520
+ * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b
521
+ */
522
+ function comparePathParserScore(a, b) {
523
+ let i = 0;
524
+ const aScore = a.score;
525
+ const bScore = b.score;
526
+ while (i < aScore.length && i < bScore.length) {
527
+ const comp = compareScoreArray(aScore[i], bScore[i]);
528
+ if (comp) return comp;
529
+ i++;
530
+ }
531
+ if (Math.abs(bScore.length - aScore.length) === 1) {
532
+ if (isLastScoreNegative(aScore)) return 1;
533
+ if (isLastScoreNegative(bScore)) return -1;
534
+ }
535
+ return bScore.length - aScore.length;
536
+ }
537
+ /**
538
+ * This allows detecting splats at the end of a path: /home/:id(.*)*
539
+ *
540
+ * @param score - score to check
541
+ * @returns true if the last entry is negative
542
+ */
543
+ function isLastScoreNegative(score) {
544
+ const last = score[score.length - 1];
545
+ return score.length > 0 && last[last.length - 1] < 0;
546
+ }
547
+ const PATH_PARSER_OPTIONS_DEFAULTS = {
548
+ strict: false,
549
+ end: true,
550
+ sensitive: false
551
+ };
552
+ //#endregion
553
+ //#region src/matcher/pathMatcher.ts
554
+ function createRouteRecordMatcher(record, parent, options) {
555
+ const parser = tokensToParser(tokenizePath(record.path), options);
556
+ if (process.env.NODE_ENV !== "production") {
557
+ const existingKeys = /* @__PURE__ */ new Set();
558
+ for (const key of parser.keys) {
559
+ if (existingKeys.has(key.name)) diagnostics.VUE_ROUTER_R0090({
560
+ name: key.name,
561
+ path: record.path
562
+ });
563
+ existingKeys.add(key.name);
564
+ }
565
+ }
566
+ const matcher = assign(parser, {
567
+ record,
568
+ parent,
569
+ children: [],
570
+ alias: []
571
+ });
572
+ if (parent) {
573
+ if (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);
574
+ }
575
+ return matcher;
576
+ }
577
+ //#endregion
578
+ //#region src/matcher/index.ts
579
+ /**
580
+ * Creates a Router Matcher.
581
+ *
582
+ * @internal
583
+ * @param routes - array of initial routes
584
+ * @param globalOptions - global route options
585
+ */
586
+ function createRouterMatcher(routes, globalOptions) {
587
+ const matchers = [];
588
+ const matcherMap = /* @__PURE__ */ new Map();
589
+ globalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);
590
+ function getRecordMatcher(name) {
591
+ return matcherMap.get(name);
592
+ }
593
+ function addRoute(record, parent, originalRecord) {
594
+ const isRootAdd = !originalRecord;
595
+ const mainNormalizedRecord = normalizeRouteRecord(record);
596
+ if (process.env.NODE_ENV !== "production") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);
597
+ mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;
598
+ const options = mergeOptions(globalOptions, record);
599
+ const normalizedRecords = [mainNormalizedRecord];
600
+ if ("alias" in record) {
601
+ const aliases = typeof record.alias === "string" ? [record.alias] : record.alias;
602
+ for (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {
603
+ components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,
604
+ path: alias,
605
+ aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord
606
+ })));
607
+ }
608
+ let matcher;
609
+ let originalMatcher;
610
+ for (const normalizedRecord of normalizedRecords) {
611
+ const { path } = normalizedRecord;
612
+ if (parent && path[0] !== "/") {
613
+ const parentPath = parent.record.path;
614
+ const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/";
615
+ normalizedRecord.path = parent.record.path + (path && connectingSlash + path);
616
+ }
617
+ if (process.env.NODE_ENV !== "production" && normalizedRecord.path === "*") throw new Error("Catch all routes (\"*\") must now be defined using a param with a custom regexp.\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.");
618
+ matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
619
+ if (process.env.NODE_ENV !== "production" && parent && path[0] === "/") checkMissingParamsInAbsolutePath(matcher, parent);
620
+ if (originalRecord) {
621
+ originalRecord.alias.push(matcher);
622
+ if (process.env.NODE_ENV !== "production") checkSameParams(originalRecord, matcher);
623
+ } else {
624
+ originalMatcher = originalMatcher || matcher;
625
+ if (originalMatcher !== matcher) originalMatcher.alias.push(matcher);
626
+ if (isRootAdd && record.name && !isAliasRecord(matcher)) {
627
+ if (process.env.NODE_ENV !== "production") checkSameNameAsAncestor(record, parent);
628
+ removeRoute(record.name);
629
+ }
630
+ }
631
+ if (isMatchable(matcher)) insertMatcher(matcher);
632
+ if (mainNormalizedRecord.children) {
633
+ const children = mainNormalizedRecord.children;
634
+ for (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);
635
+ }
636
+ originalRecord = originalRecord || matcher;
637
+ }
638
+ return originalMatcher ? () => {
639
+ removeRoute(originalMatcher);
640
+ } : noop;
641
+ }
642
+ function removeRoute(matcherRef) {
643
+ if (isRouteName(matcherRef)) {
644
+ const matcher = matcherMap.get(matcherRef);
645
+ if (matcher) {
646
+ matcherMap.delete(matcherRef);
647
+ matchers.splice(matchers.indexOf(matcher), 1);
648
+ matcher.children.forEach(removeRoute);
649
+ matcher.alias.forEach(removeRoute);
650
+ }
651
+ } else {
652
+ const index = matchers.indexOf(matcherRef);
653
+ if (index > -1) {
654
+ matchers.splice(index, 1);
655
+ if (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);
656
+ matcherRef.children.forEach(removeRoute);
657
+ matcherRef.alias.forEach(removeRoute);
658
+ }
659
+ }
660
+ }
661
+ function getRoutes() {
662
+ return matchers;
663
+ }
664
+ function insertMatcher(matcher) {
665
+ const index = findInsertionIndex(matcher, matchers);
666
+ matchers.splice(index, 0, matcher);
667
+ if (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);
668
+ }
669
+ function resolve(location, currentLocation) {
670
+ let matcher;
671
+ let params = {};
672
+ let path;
673
+ let name;
674
+ if ("name" in location && location.name) {
675
+ matcher = matcherMap.get(location.name);
676
+ if (!matcher) throw createRouterError(1, { location });
677
+ if (process.env.NODE_ENV !== "production") {
678
+ const invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));
679
+ if (invalidParams.length) {
680
+ const isInherited = !matcher.keys.length && invalidParams.some((name) => name in currentLocation.params);
681
+ diagnostics.VUE_ROUTER_R0100({
682
+ params: invalidParams.join("\", \""),
683
+ inherited: isInherited ? ` If you are using a catch-all route with a named redirect, pass an empty \`params\` object: \`redirect: { name: '...', params: {} }\`.` : ""
684
+ });
685
+ }
686
+ }
687
+ name = matcher.record.name;
688
+ params = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));
689
+ path = matcher.stringify(params);
690
+ } else if (location.path != null) {
691
+ path = location.path;
692
+ if (process.env.NODE_ENV !== "production" && !path.startsWith("/")) diagnostics.VUE_ROUTER_R0101({ path });
693
+ matcher = matchers.find((m) => m.re.test(path));
694
+ if (matcher) {
695
+ params = matcher.parse(path);
696
+ name = matcher.record.name;
697
+ matcher.keys.forEach((key) => {
698
+ if (key.optional && !params[key.name]) delete params[key.name];
699
+ });
700
+ }
701
+ } else {
702
+ matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));
703
+ if (!matcher) throw createRouterError(1, {
704
+ location,
705
+ currentLocation
706
+ });
707
+ name = matcher.record.name;
708
+ params = assign({}, currentLocation.params, location.params);
709
+ path = matcher.stringify(params);
710
+ }
711
+ const matched = [];
712
+ let parentMatcher = matcher;
713
+ while (parentMatcher) {
714
+ matched.unshift(parentMatcher.record);
715
+ parentMatcher = parentMatcher.parent;
716
+ }
717
+ return {
718
+ name,
719
+ path,
720
+ params,
721
+ matched,
722
+ meta: mergeMetaFields(matched)
723
+ };
724
+ }
725
+ routes.forEach((route) => addRoute(route));
726
+ function clearRoutes() {
727
+ matchers.length = 0;
728
+ matcherMap.clear();
729
+ }
730
+ return {
731
+ addRoute,
732
+ resolve,
733
+ removeRoute,
734
+ clearRoutes,
735
+ getRoutes,
736
+ getRecordMatcher
737
+ };
738
+ }
739
+ /**
740
+ * Picks an object param to contain only specified keys.
741
+ *
742
+ * @param params - params object to pick from
743
+ * @param keys - keys to pick
744
+ */
745
+ function pickParams(params, keys) {
746
+ const newParams = {};
747
+ for (const key of keys) if (key in params) newParams[key] = params[key];
748
+ return newParams;
749
+ }
750
+ /**
751
+ * Normalizes a RouteRecordRaw. Creates a copy
752
+ *
753
+ * @param record
754
+ * @returns the normalized version
755
+ */
756
+ function normalizeRouteRecord(record) {
757
+ const normalized = {
758
+ path: record.path,
759
+ redirect: record.redirect,
760
+ name: record.name,
761
+ meta: record.meta || {},
762
+ aliasOf: record.aliasOf,
763
+ beforeEnter: record.beforeEnter,
764
+ props: normalizeRecordProps(record),
765
+ children: record.children || [],
766
+ instances: {},
767
+ leaveGuards: /* @__PURE__ */ new Set(),
768
+ updateGuards: /* @__PURE__ */ new Set(),
769
+ enterCallbacks: {},
770
+ components: "components" in record ? record.components || null : record.component && { default: record.component }
771
+ };
772
+ Object.defineProperty(normalized, "mods", { value: {} });
773
+ return normalized;
774
+ }
775
+ /**
776
+ * Normalize the optional `props` in a record to always be an object similar to
777
+ * components. Also accept a boolean for components.
778
+ * @param record
779
+ */
780
+ function normalizeRecordProps(record) {
781
+ const propsObject = {};
782
+ const props = record.props || false;
783
+ if ("component" in record) propsObject.default = props;
784
+ else for (const name in record.components) propsObject[name] = typeof props === "object" ? props[name] : props;
785
+ return propsObject;
786
+ }
787
+ /**
788
+ * Checks if a record or any of its parent is an alias
789
+ * @param record
790
+ */
791
+ function isAliasRecord(record) {
792
+ while (record) {
793
+ if (record.record.aliasOf) return true;
794
+ record = record.parent;
795
+ }
796
+ return false;
797
+ }
798
+ /**
799
+ * Merge meta fields of an array of records
800
+ *
801
+ * @param matched - array of matched records
802
+ */
803
+ function mergeMetaFields(matched) {
804
+ return matched.reduce((meta, record) => assign(meta, record.meta), {});
805
+ }
806
+ function isSameParam(a, b) {
807
+ return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;
808
+ }
809
+ /**
810
+ * Check if a path and its alias have the same required params
811
+ *
812
+ * @param a - original record
813
+ * @param b - alias record
814
+ */
815
+ function checkSameParams(a, b) {
816
+ for (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) {
817
+ diagnostics.VUE_ROUTER_R0102({
818
+ alias: b.record.path,
819
+ original: a.record.path,
820
+ name: key.name
821
+ });
822
+ return;
823
+ }
824
+ for (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) {
825
+ diagnostics.VUE_ROUTER_R0102({
826
+ alias: b.record.path,
827
+ original: a.record.path,
828
+ name: key.name
829
+ });
830
+ return;
831
+ }
832
+ }
833
+ /**
834
+ * A route with a name and a child with an empty path without a name should warn when adding the route
835
+ *
836
+ * @param mainNormalizedRecord - RouteRecordNormalized
837
+ * @param parent - RouteRecordMatcher
838
+ */
839
+ function checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {
840
+ if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) diagnostics.VUE_ROUTER_R0103({ name: String(parent.record.name) });
841
+ }
842
+ function checkSameNameAsAncestor(record, parent) {
843
+ for (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named "${String(record.name)}" has been added as a ${parent === ancestor ? "child" : "descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);
844
+ }
845
+ function checkMissingParamsInAbsolutePath(record, parent) {
846
+ for (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) {
847
+ diagnostics.VUE_ROUTER_R0104({
848
+ path: record.record.path,
849
+ name: key.name,
850
+ parent: parent.record.path
851
+ });
852
+ return;
853
+ }
854
+ }
855
+ /**
856
+ * Performs a binary search to find the correct insertion index for a new matcher.
857
+ *
858
+ * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,
859
+ * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.
860
+ *
861
+ * @param matcher - new matcher to be inserted
862
+ * @param matchers - existing matchers
863
+ */
864
+ function findInsertionIndex(matcher, matchers) {
865
+ let lower = 0;
866
+ let upper = matchers.length;
867
+ while (lower !== upper) {
868
+ const mid = lower + upper >> 1;
869
+ if (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;
870
+ else lower = mid + 1;
871
+ }
872
+ const insertionAncestor = getInsertionAncestor(matcher);
873
+ if (insertionAncestor) {
874
+ upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
875
+ if (process.env.NODE_ENV !== "production" && upper < 0) diagnostics.VUE_ROUTER_R0105({
876
+ ancestor: insertionAncestor.record.path,
877
+ record: matcher.record.path
878
+ });
879
+ }
880
+ return upper;
881
+ }
882
+ function getInsertionAncestor(matcher) {
883
+ let ancestor = matcher;
884
+ while (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;
885
+ }
886
+ /**
887
+ * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without
888
+ * a component, or name, or redirect, are just used to group other routes.
889
+ * @param matcher
890
+ * @param matcher.record record of the matcher
891
+ * @returns
892
+ */
893
+ function isMatchable({ record }) {
894
+ return !!(record.name || record.components && Object.keys(record.components).length || record.redirect);
895
+ }
896
+ //#endregion
897
+ //#region src/RouterLink.ts
898
+ /**
899
+ * Returns the internal behavior of a {@link RouterLink} without the rendering part.
900
+ *
901
+ * @param props - a `to` location and an optional `replace` flag
902
+ */
903
+ function useLink(props) {
904
+ const router = inject(routerKey);
905
+ const currentRoute = inject(routeLocationKey);
906
+ let hasPrevious = false;
907
+ let previousTo = null;
908
+ const route = computed(() => {
909
+ const to = unref(props.to);
910
+ if (process.env.NODE_ENV !== "production" && (!hasPrevious || to !== previousTo)) {
911
+ if (!isRouteLocation(to)) diagnostics.VUE_ROUTER_R0050({ to });
912
+ previousTo = to;
913
+ hasPrevious = true;
914
+ }
915
+ return router.resolve(to);
916
+ });
917
+ const activeRecordIndex = computed(() => {
918
+ const { matched } = route.value;
919
+ const { length } = matched;
920
+ const routeMatched = matched[length - 1];
921
+ const currentMatched = currentRoute.matched;
922
+ if (!routeMatched || !currentMatched.length) return -1;
923
+ const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));
924
+ if (index > -1) return index;
925
+ const parentRecordPath = getOriginalPath(matched[length - 2]);
926
+ return length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;
927
+ });
928
+ const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));
929
+ const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));
930
+ function navigate(e = {}) {
931
+ if (guardEvent(e)) {
932
+ const p = router[unref(props.replace) ? "replace" : "push"](unref(props.to)).catch(noop);
933
+ if (props.viewTransition && typeof document !== "undefined" && "startViewTransition" in document) document.startViewTransition(() => p);
934
+ return p;
935
+ }
936
+ return Promise.resolve();
937
+ }
938
+ if ((process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && isBrowser) {
939
+ const instance = getCurrentInstance();
940
+ if (instance) {
941
+ const linkContextDevtools = {
942
+ route: route.value,
943
+ isActive: isActive.value,
944
+ isExactActive: isExactActive.value,
945
+ error: null
946
+ };
947
+ instance.__vrl_devtools = instance.__vrl_devtools || [];
948
+ instance.__vrl_devtools.push(linkContextDevtools);
949
+ watchEffect(() => {
950
+ linkContextDevtools.route = route.value;
951
+ linkContextDevtools.isActive = isActive.value;
952
+ linkContextDevtools.isExactActive = isExactActive.value;
953
+ linkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : "Invalid \"to\" value";
954
+ }, { flush: "post" });
955
+ }
956
+ }
957
+ /**
958
+ * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this
959
+ */
960
+ return {
961
+ route,
962
+ href: computed(() => route.value.href),
963
+ isActive,
964
+ isExactActive,
965
+ navigate
966
+ };
967
+ }
968
+ function preferSingleVNode(vnodes) {
969
+ return vnodes.length === 1 ? vnodes[0] : vnodes;
970
+ }
971
+ /**
972
+ * Component to render a link that triggers a navigation on click.
973
+ */
974
+ const RouterLink = /* @__PURE__ */ defineComponent({
975
+ name: "RouterLink",
976
+ compatConfig: { MODE: 3 },
977
+ props: {
978
+ to: {
979
+ type: [String, Object],
980
+ required: true
981
+ },
982
+ replace: Boolean,
983
+ activeClass: String,
984
+ exactActiveClass: String,
985
+ custom: Boolean,
986
+ ariaCurrentValue: {
987
+ type: String,
988
+ default: "page"
989
+ },
990
+ viewTransition: Boolean
991
+ },
992
+ useLink,
993
+ setup(props, { slots }) {
994
+ const link = reactive(useLink(props));
995
+ const { options } = inject(routerKey);
996
+ const elClass = computed(() => ({
997
+ [getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive,
998
+ [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive
999
+ }));
1000
+ return () => {
1001
+ const children = slots.default && preferSingleVNode(slots.default(link));
1002
+ return props.custom ? children : h("a", {
1003
+ "aria-current": link.isExactActive ? props.ariaCurrentValue : null,
1004
+ href: link.href,
1005
+ onClick: link.navigate,
1006
+ class: elClass.value
1007
+ }, children);
1008
+ };
1009
+ }
1010
+ });
1011
+ function guardEvent(e) {
1012
+ if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
1013
+ if (e.defaultPrevented) return;
1014
+ if (e.button !== void 0 && e.button !== 0) return;
1015
+ if (e.currentTarget && e.currentTarget.getAttribute) {
1016
+ const target = e.currentTarget.getAttribute("target");
1017
+ if (/\b_blank\b/i.test(target)) return;
1018
+ }
1019
+ if (e.preventDefault) e.preventDefault();
1020
+ return true;
1021
+ }
1022
+ function includesParams(outer, inner) {
1023
+ for (const key in inner) {
1024
+ const innerValue = inner[key];
1025
+ const outerValue = outer[key];
1026
+ if (typeof innerValue === "string") {
1027
+ if (innerValue !== outerValue) return false;
1028
+ } else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;
1029
+ }
1030
+ return true;
1031
+ }
1032
+ /**
1033
+ * Get the original path value of a record by following its aliasOf
1034
+ * @param record
1035
+ */
1036
+ function getOriginalPath(record) {
1037
+ return record ? record.aliasOf ? record.aliasOf.path : record.path : "";
1038
+ }
1039
+ /**
1040
+ * Utility class to get the active class based on defaults.
1041
+ * @param propClass
1042
+ * @param globalClass
1043
+ * @param defaultClass
1044
+ */
1045
+ const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
1046
+ //#endregion
1047
+ //#region src/RouterView.ts
1048
+ const RouterViewImpl = /*#__PURE__*/ defineComponent({
1049
+ name: "RouterView",
1050
+ inheritAttrs: false,
1051
+ props: {
1052
+ name: {
1053
+ type: String,
1054
+ default: "default"
1055
+ },
1056
+ route: Object
1057
+ },
1058
+ compatConfig: { MODE: 3 },
1059
+ setup(props, { attrs, slots }) {
1060
+ process.env.NODE_ENV !== "production" && warnDeprecatedUsage();
1061
+ const injectedRoute = inject(routerViewLocationKey);
1062
+ const routeToDisplay = computed(() => props.route || injectedRoute.value);
1063
+ const injectedDepth = inject(viewDepthKey, 0);
1064
+ const depth = computed(() => {
1065
+ let initialDepth = unref(injectedDepth);
1066
+ const { matched } = routeToDisplay.value;
1067
+ let matchedRoute;
1068
+ while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;
1069
+ return initialDepth;
1070
+ });
1071
+ const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);
1072
+ provide(viewDepthKey, computed(() => depth.value + 1));
1073
+ provide(matchedRouteKey, matchedRouteRef);
1074
+ provide(routerViewLocationKey, routeToDisplay);
1075
+ const viewRef = ref();
1076
+ watch(() => [
1077
+ viewRef.value,
1078
+ matchedRouteRef.value,
1079
+ props.name
1080
+ ], ([instance, to, name], [oldInstance, from, _oldName]) => {
1081
+ if (to) {
1082
+ to.instances[name] = instance;
1083
+ if (from && from !== to && instance && instance === oldInstance) {
1084
+ if (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;
1085
+ if (!to.updateGuards.size) to.updateGuards = from.updateGuards;
1086
+ }
1087
+ }
1088
+ if (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));
1089
+ }, { flush: "post" });
1090
+ return () => {
1091
+ const route = routeToDisplay.value;
1092
+ const currentName = props.name;
1093
+ const matchedRoute = matchedRouteRef.value;
1094
+ const ViewComponent = matchedRoute && matchedRoute.components[currentName];
1095
+ if (!ViewComponent) return normalizeSlot(slots.default, {
1096
+ Component: ViewComponent,
1097
+ route
1098
+ });
1099
+ const routePropsOption = matchedRoute.props[currentName];
1100
+ const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === "function" ? routePropsOption(route) : routePropsOption : null;
1101
+ const onVnodeUnmounted = (vnode) => {
1102
+ if (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;
1103
+ };
1104
+ const component = h(ViewComponent, assign({}, routeProps, attrs, {
1105
+ onVnodeUnmounted,
1106
+ ref: viewRef
1107
+ }));
1108
+ if ((process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {
1109
+ const info = {
1110
+ depth: depth.value,
1111
+ name: matchedRoute.name,
1112
+ path: matchedRoute.path,
1113
+ meta: matchedRoute.meta
1114
+ };
1115
+ (isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {
1116
+ instance.__vrv_devtools = info;
1117
+ });
1118
+ }
1119
+ return normalizeSlot(slots.default, {
1120
+ Component: component,
1121
+ route
1122
+ }) || component;
1123
+ };
1124
+ }
1125
+ });
1126
+ function normalizeSlot(slot, data) {
1127
+ if (!slot) return null;
1128
+ const slotContent = slot(data);
1129
+ return slotContent.length === 1 ? slotContent[0] : slotContent;
1130
+ }
1131
+ /**
1132
+ * Component to display the current route the user is at.
1133
+ */
1134
+ const RouterView = RouterViewImpl;
1135
+ function warnDeprecatedUsage() {
1136
+ const instance = getCurrentInstance();
1137
+ const parentName = instance.parent && instance.parent.type.name;
1138
+ const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;
1139
+ if (parentName && (parentName === "KeepAlive" || parentName.includes("Transition")) && typeof parentSubTreeType === "object" && parentSubTreeType.name === "RouterView") {
1140
+ const comp = parentName === "KeepAlive" ? "keep-alive" : "transition";
1141
+ diagnostics.VUE_ROUTER_R0060({ comp });
1142
+ }
1143
+ }
1144
+ //#endregion
1145
+ //#region src/router.ts
1146
+ /**
1147
+ * Creates a Router instance that can be used by a Vue app.
1148
+ *
1149
+ * @param options - {@link RouterOptions}
1150
+ */
1151
+ function createRouter(options) {
1152
+ const matcher = createRouterMatcher(options.routes, options);
1153
+ const parseQuery$1 = options.parseQuery || parseQuery;
1154
+ const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
1155
+ const routerHistory = options.history;
1156
+ if (process.env.NODE_ENV !== "production" && !routerHistory) throw new Error("Provide the \"history\" option when calling \"createRouter()\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history");
1157
+ const beforeGuards = useCallbacks();
1158
+ const beforeResolveGuards = useCallbacks();
1159
+ const afterGuards = useCallbacks();
1160
+ const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
1161
+ let pendingLocation = START_LOCATION_NORMALIZED;
1162
+ if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
1163
+ const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
1164
+ const encodeParams = applyToParams.bind(null, encodeParam);
1165
+ const decodeParams = applyToParams.bind(null, decode);
1166
+ function addRoute(parentOrRoute, route) {
1167
+ let parent;
1168
+ let record;
1169
+ if (isRouteName(parentOrRoute)) {
1170
+ parent = matcher.getRecordMatcher(parentOrRoute);
1171
+ if (process.env.NODE_ENV !== "production" && !parent) diagnostics.VUE_ROUTER_R0001({ name: String(parentOrRoute) });
1172
+ record = route;
1173
+ } else record = parentOrRoute;
1174
+ return matcher.addRoute(record, parent);
1175
+ }
1176
+ function removeRoute(name) {
1177
+ const recordMatcher = matcher.getRecordMatcher(name);
1178
+ if (recordMatcher) matcher.removeRoute(recordMatcher);
1179
+ else if (process.env.NODE_ENV !== "production") diagnostics.VUE_ROUTER_R0002({ name: String(name) });
1180
+ }
1181
+ function getRoutes() {
1182
+ return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
1183
+ }
1184
+ function hasRoute(name) {
1185
+ return !!matcher.getRecordMatcher(name);
1186
+ }
1187
+ function resolve(rawLocation, currentLocation) {
1188
+ currentLocation = assign({}, currentLocation || currentRoute.value);
1189
+ if (typeof rawLocation === "string") {
1190
+ const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
1191
+ const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
1192
+ const href = routerHistory.createHref(locationNormalized.fullPath);
1193
+ if (process.env.NODE_ENV !== "production") {
1194
+ if (href.startsWith("//")) diagnostics.VUE_ROUTER_R0003({
1195
+ location: rawLocation,
1196
+ href
1197
+ });
1198
+ else if (!matchedRoute.matched.length) diagnostics.VUE_ROUTER_R0004({ path: rawLocation });
1199
+ }
1200
+ return assign(locationNormalized, matchedRoute, {
1201
+ params: decodeParams(matchedRoute.params),
1202
+ redirectedFrom: void 0,
1203
+ href
1204
+ });
1205
+ }
1206
+ if (process.env.NODE_ENV !== "production" && !isRouteLocation(rawLocation)) {
1207
+ diagnostics.VUE_ROUTER_R0005({ rawLocation });
1208
+ return resolve({});
1209
+ }
1210
+ let matcherLocation;
1211
+ if (rawLocation.path != null) {
1212
+ if (process.env.NODE_ENV !== "production" && "params" in rawLocation && !("name" in rawLocation) && Object.keys(rawLocation.params).length) diagnostics.VUE_ROUTER_R0006({ path: rawLocation.path });
1213
+ matcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });
1214
+ } else {
1215
+ const targetParams = assign({}, rawLocation.params);
1216
+ for (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];
1217
+ matcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });
1218
+ currentLocation.params = encodeParams(currentLocation.params);
1219
+ }
1220
+ const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
1221
+ const hash = rawLocation.hash || "";
1222
+ if (process.env.NODE_ENV !== "production" && hash && !hash.startsWith("#")) diagnostics.VUE_ROUTER_R0007({ hash });
1223
+ matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
1224
+ const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {
1225
+ hash: encodeHash(hash),
1226
+ path: matchedRoute.path
1227
+ }));
1228
+ const href = routerHistory.createHref(fullPath);
1229
+ if (process.env.NODE_ENV !== "production") {
1230
+ if (href.startsWith("//")) diagnostics.VUE_ROUTER_R0003({
1231
+ location: rawLocation,
1232
+ href
1233
+ });
1234
+ else if (!matchedRoute.matched.length) diagnostics.VUE_ROUTER_R0004({ path: rawLocation.path != null ? rawLocation.path : rawLocation });
1235
+ }
1236
+ return assign({
1237
+ fullPath,
1238
+ hash,
1239
+ query: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}
1240
+ }, matchedRoute, {
1241
+ redirectedFrom: void 0,
1242
+ href
1243
+ });
1244
+ }
1245
+ function locationAsObject(to) {
1246
+ return typeof to === "string" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);
1247
+ }
1248
+ function checkCanceledNavigation(to, from) {
1249
+ if (pendingLocation !== to) return createRouterError(8, {
1250
+ from,
1251
+ to
1252
+ });
1253
+ }
1254
+ function push(to) {
1255
+ return pushWithRedirect(to);
1256
+ }
1257
+ function replace(to) {
1258
+ return push(assign(locationAsObject(to), { replace: true }));
1259
+ }
1260
+ function handleRedirectRecord(to, from) {
1261
+ const lastMatched = to.matched[to.matched.length - 1];
1262
+ if (lastMatched && lastMatched.redirect) {
1263
+ const { redirect } = lastMatched;
1264
+ let newTargetLocation = typeof redirect === "function" ? redirect(to, from) : redirect;
1265
+ if (typeof newTargetLocation === "string") {
1266
+ newTargetLocation = newTargetLocation.includes("?") || newTargetLocation.includes("#") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };
1267
+ newTargetLocation.params = {};
1268
+ }
1269
+ if (process.env.NODE_ENV !== "production" && newTargetLocation.path == null && !("name" in newTargetLocation)) {
1270
+ diagnostics.VUE_ROUTER_R0008({
1271
+ target: JSON.stringify(newTargetLocation, null, 2),
1272
+ to: to.fullPath
1273
+ });
1274
+ throw new Error("Invalid redirect");
1275
+ }
1276
+ return assign({
1277
+ query: to.query,
1278
+ hash: to.hash,
1279
+ params: newTargetLocation.path != null ? {} : to.params
1280
+ }, newTargetLocation);
1281
+ }
1282
+ }
1283
+ function pushWithRedirect(to, redirectedFrom) {
1284
+ const targetLocation = pendingLocation = resolve(to);
1285
+ const from = currentRoute.value;
1286
+ const data = to.state;
1287
+ const force = to.force;
1288
+ const replace = to.replace === true;
1289
+ const shouldRedirect = handleRedirectRecord(targetLocation, from);
1290
+ if (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {
1291
+ state: typeof shouldRedirect === "object" ? assign({}, data, shouldRedirect.state) : data,
1292
+ force,
1293
+ replace
1294
+ }), redirectedFrom || targetLocation);
1295
+ const toLocation = targetLocation;
1296
+ toLocation.redirectedFrom = redirectedFrom;
1297
+ let failure;
1298
+ if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {
1299
+ failure = createRouterError(16, {
1300
+ to: toLocation,
1301
+ from
1302
+ });
1303
+ handleScroll(from, from, true, false);
1304
+ }
1305
+ return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, 2) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {
1306
+ if (failure) {
1307
+ if (isNavigationFailure(failure, 2)) {
1308
+ if (process.env.NODE_ENV !== "production" && isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {
1309
+ diagnostics.VUE_ROUTER_R0009({
1310
+ from: from.fullPath,
1311
+ to: toLocation.fullPath
1312
+ });
1313
+ return Promise.reject(/* @__PURE__ */ new Error("Infinite redirect in navigation guard"));
1314
+ }
1315
+ return pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {
1316
+ state: typeof failure.to === "object" ? assign({}, data, failure.to.state) : data,
1317
+ force
1318
+ }), redirectedFrom || toLocation);
1319
+ }
1320
+ } else failure = finalizeNavigation(toLocation, from, true, replace, data);
1321
+ triggerAfterEach(toLocation, from, failure);
1322
+ return failure;
1323
+ });
1324
+ }
1325
+ /**
1326
+ * Helper to reject and skip all navigation guards if a new navigation happened
1327
+ * @param to
1328
+ * @param from
1329
+ */
1330
+ function checkCanceledNavigationAndReject(to, from) {
1331
+ const error = checkCanceledNavigation(to, from);
1332
+ return error ? Promise.reject(error) : Promise.resolve();
1333
+ }
1334
+ function runWithContext(fn) {
1335
+ const app = installedApps.values().next().value;
1336
+ return app && typeof app.runWithContext === "function" ? app.runWithContext(fn) : fn();
1337
+ }
1338
+ function navigate(to, from) {
1339
+ let guards;
1340
+ const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);
1341
+ guards = extractComponentsGuards(leavingRecords.reverse(), "beforeRouteLeave", to, from);
1342
+ for (const record of leavingRecords) record.leaveGuards.forEach((guard) => {
1343
+ guards.push(guardToPromiseFn(guard, to, from));
1344
+ });
1345
+ const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);
1346
+ guards.push(canceledNavigationCheck);
1347
+ return runGuardQueue(guards).then(() => {
1348
+ guards = [];
1349
+ for (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));
1350
+ guards.push(canceledNavigationCheck);
1351
+ return runGuardQueue(guards);
1352
+ }).then(() => {
1353
+ guards = extractComponentsGuards(updatingRecords, "beforeRouteUpdate", to, from);
1354
+ for (const record of updatingRecords) record.updateGuards.forEach((guard) => {
1355
+ guards.push(guardToPromiseFn(guard, to, from));
1356
+ });
1357
+ guards.push(canceledNavigationCheck);
1358
+ return runGuardQueue(guards);
1359
+ }).then(() => {
1360
+ guards = [];
1361
+ for (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));
1362
+ else guards.push(guardToPromiseFn(record.beforeEnter, to, from));
1363
+ guards.push(canceledNavigationCheck);
1364
+ return runGuardQueue(guards);
1365
+ }).then(() => {
1366
+ to.matched.forEach((record) => record.enterCallbacks = {});
1367
+ guards = extractComponentsGuards(enteringRecords, "beforeRouteEnter", to, from, runWithContext);
1368
+ guards.push(canceledNavigationCheck);
1369
+ return runGuardQueue(guards);
1370
+ }).then(() => {
1371
+ guards = [];
1372
+ for (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));
1373
+ guards.push(canceledNavigationCheck);
1374
+ return runGuardQueue(guards);
1375
+ }).catch((err) => isNavigationFailure(err, 8) ? err : Promise.reject(err));
1376
+ }
1377
+ function triggerAfterEach(to, from, failure) {
1378
+ afterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));
1379
+ }
1380
+ /**
1381
+ * - Cleans up any navigation guards
1382
+ * - Changes the url if necessary
1383
+ * - Calls the scrollBehavior
1384
+ */
1385
+ function finalizeNavigation(toLocation, from, isPush, replace, data) {
1386
+ const error = checkCanceledNavigation(toLocation, from);
1387
+ if (error) return error;
1388
+ const isFirstNavigation = from === START_LOCATION_NORMALIZED;
1389
+ const state = !isBrowser ? {} : history.state;
1390
+ if (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
1391
+ else routerHistory.push(toLocation.fullPath, data);
1392
+ currentRoute.value = toLocation;
1393
+ handleScroll(toLocation, from, isPush, isFirstNavigation);
1394
+ markAsReady();
1395
+ }
1396
+ let removeHistoryListener;
1397
+ function setupListeners() {
1398
+ if (removeHistoryListener) return;
1399
+ removeHistoryListener = routerHistory.listen((to, _from, info) => {
1400
+ if (!router.listening) return;
1401
+ const toLocation = resolve(to);
1402
+ const shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);
1403
+ if (shouldRedirect) {
1404
+ pushWithRedirect(assign(shouldRedirect, {
1405
+ replace: true,
1406
+ force: true
1407
+ }), toLocation).catch(noop);
1408
+ return;
1409
+ }
1410
+ pendingLocation = toLocation;
1411
+ const from = currentRoute.value;
1412
+ if (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
1413
+ navigate(toLocation, from).catch((error) => {
1414
+ if (isNavigationFailure(error, 12)) return error;
1415
+ if (isNavigationFailure(error, 2)) {
1416
+ pushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {
1417
+ if (isNavigationFailure(failure, 20) && !info.delta && info.type === "pop") routerHistory.go(-1, false);
1418
+ }).catch(noop);
1419
+ return Promise.reject();
1420
+ }
1421
+ if (info.delta) routerHistory.go(-info.delta, false);
1422
+ return triggerError(error, toLocation, from);
1423
+ }).then((failure) => {
1424
+ failure = failure || finalizeNavigation(toLocation, from, false);
1425
+ if (failure) {
1426
+ if (info.delta && !isNavigationFailure(failure, 8)) routerHistory.go(-info.delta, false);
1427
+ else if (info.type === "pop" && isNavigationFailure(failure, 20)) routerHistory.go(-1, false);
1428
+ }
1429
+ triggerAfterEach(toLocation, from, failure);
1430
+ }).catch(noop);
1431
+ });
1432
+ }
1433
+ let readyHandlers = useCallbacks();
1434
+ let errorListeners = useCallbacks();
1435
+ let ready;
1436
+ /**
1437
+ * Trigger errorListeners added via onError and throws the error as well
1438
+ *
1439
+ * @param error - error to throw
1440
+ * @param to - location we were navigating to when the error happened
1441
+ * @param from - location we were navigating from when the error happened
1442
+ * @returns the error as a rejected promise
1443
+ */
1444
+ function triggerError(error, to, from) {
1445
+ markAsReady(error);
1446
+ const list = errorListeners.list();
1447
+ if (list.length) list.forEach((handler) => handler(error, to, from));
1448
+ else {
1449
+ if (process.env.NODE_ENV !== "production") diagnostics.VUE_ROUTER_R0010();
1450
+ console.error(error);
1451
+ }
1452
+ return Promise.reject(error);
1453
+ }
1454
+ function isReady() {
1455
+ if (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();
1456
+ return new Promise((resolve, reject) => {
1457
+ readyHandlers.add([resolve, reject]);
1458
+ });
1459
+ }
1460
+ function markAsReady(err) {
1461
+ if (!ready) {
1462
+ ready = !err;
1463
+ setupListeners();
1464
+ readyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());
1465
+ readyHandlers.reset();
1466
+ }
1467
+ return err;
1468
+ }
1469
+ function handleScroll(to, from, isPush, isFirstNavigation) {
1470
+ const { scrollBehavior } = options;
1471
+ if (!isBrowser || !scrollBehavior) return Promise.resolve();
1472
+ const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;
1473
+ return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => to === currentRoute.value && position && scrollToPosition(position)).catch((err) => to === currentRoute.value && triggerError(err, to, from));
1474
+ }
1475
+ const go = (delta) => routerHistory.go(delta);
1476
+ let started;
1477
+ const installedApps = /* @__PURE__ */ new Set();
1478
+ const router = {
1479
+ currentRoute,
1480
+ listening: true,
1481
+ addRoute,
1482
+ removeRoute,
1483
+ clearRoutes: matcher.clearRoutes,
1484
+ hasRoute,
1485
+ getRoutes,
1486
+ resolve,
1487
+ options,
1488
+ push,
1489
+ replace,
1490
+ go,
1491
+ back: () => go(-1),
1492
+ forward: () => go(1),
1493
+ beforeEach: beforeGuards.add,
1494
+ beforeResolve: beforeResolveGuards.add,
1495
+ afterEach: afterGuards.add,
1496
+ onError: errorListeners.add,
1497
+ isReady,
1498
+ install(app) {
1499
+ app.component("RouterLink", RouterLink);
1500
+ app.component("RouterView", RouterView);
1501
+ app.config.globalProperties.$router = router;
1502
+ Object.defineProperty(app.config.globalProperties, "$route", {
1503
+ enumerable: true,
1504
+ get: () => unref(currentRoute)
1505
+ });
1506
+ if (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {
1507
+ started = true;
1508
+ push(routerHistory.location).catch((err) => {
1509
+ if (process.env.NODE_ENV !== "production") diagnostics.VUE_ROUTER_R0011({ cause: err });
1510
+ });
1511
+ }
1512
+ const reactiveRoute = {};
1513
+ for (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {
1514
+ get: () => currentRoute.value[key],
1515
+ enumerable: true
1516
+ });
1517
+ app.provide(routerKey, router);
1518
+ app.provide(routeLocationKey, shallowReactive(reactiveRoute));
1519
+ app.provide(routerViewLocationKey, currentRoute);
1520
+ const unmountApp = app.unmount;
1521
+ installedApps.add(app);
1522
+ app.unmount = function() {
1523
+ installedApps.delete(app);
1524
+ if (installedApps.size < 1) {
1525
+ pendingLocation = START_LOCATION_NORMALIZED;
1526
+ removeHistoryListener && removeHistoryListener();
1527
+ removeHistoryListener = null;
1528
+ currentRoute.value = START_LOCATION_NORMALIZED;
1529
+ started = false;
1530
+ ready = false;
1531
+ }
1532
+ unmountApp();
1533
+ };
1534
+ if ((process.env.NODE_ENV !== "production" || __VUE_PROD_DEVTOOLS__) && isBrowser && true) addDevtools(app, router, matcher);
1535
+ }
1536
+ };
1537
+ function runGuardQueue(guards) {
1538
+ return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());
1539
+ }
1540
+ return router;
1541
+ }
1542
+ //#endregion
1543
+ export { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };