nuxt-ignis 0.3.3 → 0.4.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.data/content/contents.sqlite +0 -0
  2. package/.env +8 -2
  3. package/.nuxt/app.config.mjs +2 -2
  4. package/.nuxt/cache/fonts/EP1810cmAtyahQPDHB6nvBzRkIG5RcNv4u5vTy1aYHU-Ih_Po7WkbhDymI0Y_ntmpz__bZJprHiu7_c5N_X6AAA.woff2 +0 -0
  5. package/.nuxt/cache/fonts/JNWOTRocaYj0gq52vW_s7sHAdSMUetrRmhhggCVxyZ0-TnR4PP30hI5UWldZ0knUBrHkvIoiDWYXwn2v1NtCh80.woff2 +0 -0
  6. package/.nuxt/cache/fonts/XbAtjIvy1UErjg9eu_v7X3zPLS_AwsmqVsR9fG-JB6o-H99o9_8BZXq7ey5UyS99Wn9zX0V0anvpXEqAqavcJlQ.woff2 +0 -0
  7. package/.nuxt/cache/fonts/ZLm6CLvwhQbamZ73M80jbqz7DuOkHlT_HRyXHG7YfVs-eYLoSJPWhqR5CE0c8XPABls8kE_7Fc7F2x7Gtfsg_8M.woff2 +0 -0
  8. package/.nuxt/cache/fonts/aPa9az0DeE4U5rqM-Ov0Vl_obQis_d6sScLNygGkvxw-s32Y9TxBLZRr_ebRHQ3l3q1g2j_0tPT879PPSBGrj8A.woff2 +0 -0
  9. package/.nuxt/cache/fonts/kgyHMsxRmhh06xcV0yKMKdTKQBsQpXGi7erqwaqgjXg-55rzD39AWoqYSkQOLHuoKZUDVcDSlXRKdaymIN2dXes.woff +0 -0
  10. package/.nuxt/components.d.ts +606 -394
  11. package/.nuxt/content/components.ts +107 -98
  12. package/.nuxt/content/database.compressed.mjs +1 -1
  13. package/.nuxt/content/manifest.ts +6 -6
  14. package/.nuxt/content/sql_dump.txt +5 -0
  15. package/.nuxt/content/types.d.ts +8 -0
  16. package/.nuxt/dev/index.mjs +1584 -544
  17. package/.nuxt/dev/index.mjs.map +1 -1
  18. package/.nuxt/dist/server/client.manifest.json +2 -2
  19. package/.nuxt/dist/server/client.manifest.mjs +2 -2
  20. package/.nuxt/eslint-typegen.d.ts +256 -225
  21. package/.nuxt/eslint.config.d.mts +3 -3
  22. package/.nuxt/eslint.config.mjs +11 -11
  23. package/.nuxt/imports.d.ts +70 -54
  24. package/.nuxt/manifest/latest.json +1 -1
  25. package/.nuxt/manifest/meta/dev.json +1 -1
  26. package/.nuxt/mdc-image-component.mjs +1 -1
  27. package/.nuxt/module/@nuxtjs-sitemap.d.ts +9 -8
  28. package/.nuxt/module/nuxt-robots.d.ts +37 -7
  29. package/.nuxt/{modules/@nuxt-scripts.d.ts → module/nuxt-scripts.d.ts} +1 -2
  30. package/.nuxt/module/nuxt-seo-utils.assets.d.ts +3 -3
  31. package/.nuxt/module/nuxt-seo-utils.d.ts +20 -6
  32. package/.nuxt/module/nuxt-site-config.d.ts +8 -8
  33. package/.nuxt/nitro.json +5 -5
  34. package/.nuxt/nuxt.d.ts +13 -10
  35. package/.nuxt/nuxt.json +2 -2
  36. package/.nuxt/tsconfig.json +235 -153
  37. package/.nuxt/tsconfig.server.json +126 -92
  38. package/.nuxt/types/app.config.d.ts +2 -2
  39. package/.nuxt/types/build.d.ts +2 -1
  40. package/.nuxt/types/i18n-plugin.d.ts +2 -2
  41. package/.nuxt/types/imports.d.ts +407 -314
  42. package/.nuxt/types/nitro-config.d.ts +2 -2
  43. package/.nuxt/types/nitro-imports.d.ts +143 -134
  44. package/.nuxt/types/nitro-nuxt.d.ts +2 -0
  45. package/.nuxt/types/nitro-routes.d.ts +17 -17
  46. package/.nuxt/types/plugins.d.ts +34 -34
  47. package/.nuxt/types/schema.d.ts +322 -12
  48. package/.nuxt/ui/avatar.ts +1 -1
  49. package/.nuxt/ui/card.ts +1 -1
  50. package/.nuxt/ui/carousel.ts +1 -1
  51. package/.nuxt/ui/command-palette.ts +1 -0
  52. package/.nuxt/ui/drawer.ts +1 -1
  53. package/.nuxt/ui/index.ts +2 -0
  54. package/.nuxt/ui/input-menu.ts +24 -10
  55. package/.nuxt/ui/input-tags.ts +310 -0
  56. package/.nuxt/ui/modal.ts +1 -1
  57. package/.nuxt/ui/navigation-menu.ts +1 -1
  58. package/.nuxt/ui/select-menu.ts +11 -6
  59. package/.nuxt/ui/select.ts +11 -6
  60. package/.nuxt/ui/table.ts +3 -2
  61. package/.nuxt/ui/timeline.ts +321 -0
  62. package/.nuxt/ui/toaster.ts +1 -1
  63. package/.nuxt/ui-image-component.ts +1 -1
  64. package/app.vue +2 -6
  65. package/assets/css/ignis-nuxt-ui.css +24 -0
  66. package/assets/css/{open-props.css → ignis-open-props.css} +1 -1
  67. package/assets/css/ignis-tailwind.css +23 -0
  68. package/assets/css/ignis.css +31 -0
  69. package/bin/make-eslint.js +55 -0
  70. package/components/CurrentTime.vue +1 -1
  71. package/components/ignis/IgnisConfig.vue +38 -0
  72. package/components/{AppFeature.vue → ignis/IgnisFeature.vue} +2 -1
  73. package/components/ignis/IgnisFeatureList.vue +125 -0
  74. package/components/ignis/IgnisFooter.vue +2 -2
  75. package/components/ignis/IgnisHeader.vue +4 -3
  76. package/components/ignis/IgnisInfo.vue +14 -13
  77. package/components/ignis/IgnisWelcome.vue +65 -0
  78. package/composables/useTranslation.ts +18 -9
  79. package/features.ts +52 -10
  80. package/formkit.config.ts +8 -8
  81. package/i18n/locales/en.json +10 -4
  82. package/nuxt.config.ts +30 -2
  83. package/package.json +29 -21
  84. package/pages/_ignis-config.vue +3 -0
  85. package/pages/_ignis-info.vue +3 -0
  86. package/pages/index.vue +4 -6
  87. package/public/_ignis-config.json +97 -0
  88. package/test/config/css-multiple.txt +30 -0
  89. package/test/config/css-nuxt-ui.txt +34 -0
  90. package/test/config/css-open-props.txt +2307 -0
  91. package/test/config/css-single.txt +28 -0
  92. package/test/config/css-tailwind.txt +58 -0
  93. package/test/config/custom-lang.txt +27 -0
  94. package/test/config/db-neon.txt +28 -0
  95. package/test/config/db-supabase.txt +31 -0
  96. package/test/config/default.txt +26 -15
  97. package/test/config/equipment-1-composable.txt +32 -21
  98. package/test/config/equipment-2-plugins.txt +33 -22
  99. package/test/config/equipment-all.txt +38 -27
  100. package/test/config/forms-formkit.txt +32 -0
  101. package/test/config/forms-vueform.txt +28 -0
  102. package/test/config/i18n.txt +38 -0
  103. package/test/config/no-default-css.txt +24 -0
  104. package/test/config/open-props.txt +2306 -0
  105. package/test/config/seo-ssr-false.txt +35 -0
  106. package/test/config/ui-nuxt-ui.txt +33 -0
  107. package/test/config/ui-tailwind.txt +57 -0
  108. package/test/config.test.ts +115 -0
  109. package/test/features/charts.txt +4 -0
  110. package/test/features/custom-css.txt +4 -0
  111. package/test/features/custom-title.txt +4 -0
  112. package/test/features/db-neon.txt +4 -3
  113. package/test/features/db-off.txt +4 -3
  114. package/test/features/db-supabase.txt +4 -3
  115. package/test/features/default.txt +4 -3
  116. package/test/features/disable-core.txt +2 -1
  117. package/test/features/enable-all.txt +5 -4
  118. package/test/features/equipment.txt +4 -3
  119. package/test/features/forms-formkit.txt +4 -3
  120. package/test/features/forms-off.txt +4 -3
  121. package/test/features/forms-vueform.txt +4 -3
  122. package/test/features/no-default-css.txt +4 -0
  123. package/test/features/regexp.txt +4 -0
  124. package/test/features/ui-nuxt-ui.txt +4 -3
  125. package/test/features/ui-off.txt +4 -3
  126. package/test/features/ui-tailwind.txt +5 -4
  127. package/test/features/validation-off.txt +4 -3
  128. package/test/features/validation-valibot.txt +5 -4
  129. package/test/features/validation-zod.txt +5 -4
  130. package/test/features.test.ts +37 -1
  131. package/utils/config/formkit.ts +23 -0
  132. package/utils/formkit.ts +16 -0
  133. package/.nuxt/content/sql_dump +0 -6
  134. package/app.config.ts +0 -3
  135. package/assets/css/nuxt-ui.css +0 -16
  136. package/assets/css/tailwind.css +0 -15
  137. package/components/AppFeatureList.vue +0 -124
  138. package/content/second.md +0 -11
  139. package/pages/ignis.vue +0 -3
  140. package/pages/second.vue +0 -59
  141. package/tailwind.config.ts +0 -29
@@ -3,50 +3,51 @@ import { Server } from 'node:http';
3
3
  import { resolve as resolve$1, dirname, join } from 'node:path';
4
4
  import crypto$1, { webcrypto } from 'node:crypto';
5
5
  import { parentPort, threadId } from 'node:worker_threads';
6
- import { defineEventHandler, handleCacheHeaders, splitCookiesString, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, getRequestHeader, setResponseHeaders, setResponseStatus, send, getRequestHeaders, setResponseHeader, getRequestURL, getResponseHeader, getResponseStatus, createError, getRequestHost, getRequestProtocol, getQuery as getQuery$1, useSession, removeResponseHeader, handleCors, getRequestIP, readMultipartFormData, readBody, setHeader, getHeader, getRouterParam, lazyEventHandler, useBase, createApp, createRouter as createRouter$1, toNodeListener, getResponseStatusText } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/h3@1.15.3/node_modules/h3/dist/index.mjs';
7
- import { escapeHtml } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@vue+shared@3.5.16/node_modules/@vue/shared/dist/shared.cjs.js';
6
+ import { defineEventHandler, handleCacheHeaders, splitCookiesString, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, getRequestHeader, setResponseHeaders, setResponseStatus, send, getRequestHeaders, setResponseHeader, appendResponseHeader, getRequestURL, getResponseHeader, getResponseStatus, createError, getRequestHost, getRequestProtocol, getQuery as getQuery$1, useSession, removeResponseHeader, handleCors, getRequestIP, readMultipartFormData, readBody, setHeader, getHeader, getRouterParam, lazyEventHandler, useBase, createApp, createRouter as createRouter$1, toNodeListener, getResponseStatusText } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/h3@1.15.3/node_modules/h3/dist/index.mjs';
7
+ import { escapeHtml } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@vue+shared@3.5.17/node_modules/@vue/shared/dist/shared.cjs.js';
8
8
  import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue-bundle-renderer@2.1.1/node_modules/vue-bundle-renderer/dist/runtime.mjs';
9
- import { renderToString } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue/server-renderer/index.mjs';
9
+ import { renderToString } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue/server-renderer/index.mjs';
10
10
  import { klona } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs';
11
11
  import defu, { defuFn, defu as defu$1, createDefu } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs';
12
12
  import destr, { destr as destr$1 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs';
13
13
  import { snakeCase } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs';
14
- import { createHead as createHead$1, propsToString, renderSSRHead } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.10/node_modules/unhead/dist/server.mjs';
14
+ import { createHead as createHead$1, propsToString, renderSSRHead } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/server.mjs';
15
15
  import { stringify, uneval } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/devalue@5.1.1/node_modules/devalue/index.js';
16
- import { isVNode, toValue, isRef } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue/index.mjs';
17
- import { DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.10/node_modules/unhead/dist/plugins.mjs';
16
+ import { isVNode, toValue, isRef } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue/index.mjs';
17
+ import { DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/plugins.mjs';
18
18
  import { createHooks } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs';
19
19
  import { createFetch, Headers as Headers$1 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/node.mjs';
20
- import { fetchNodeRequestHandler, callNodeRequestHandler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/node-mock-http@1.0.0/node_modules/node-mock-http/dist/index.mjs';
21
- import { createStorage, prefixStorage } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.0_@netlify+b_596bed31c9e97c37983dc6871eaece34/node_modules/unstorage/dist/index.mjs';
22
- import unstorage_47drivers_47fs from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.0_@netlify+b_596bed31c9e97c37983dc6871eaece34/node_modules/unstorage/drivers/fs.mjs';
23
- import unstorage_47drivers_47lru_45cache from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.0_@netlify+b_596bed31c9e97c37983dc6871eaece34/node_modules/unstorage/drivers/lru-cache.mjs';
20
+ import { fetchNodeRequestHandler, callNodeRequestHandler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/node-mock-http@1.0.1/node_modules/node-mock-http/dist/index.mjs';
21
+ import { createStorage, prefixStorage } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.1_@netlify+b_bf21166e867540e0850e41f8c1330438/node_modules/unstorage/dist/index.mjs';
22
+ import unstorage_47drivers_47fs from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.1_@netlify+b_bf21166e867540e0850e41f8c1330438/node_modules/unstorage/drivers/fs.mjs';
23
+ import unstorage_47drivers_47lru_45cache from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.1_@netlify+b_bf21166e867540e0850e41f8c1330438/node_modules/unstorage/drivers/lru-cache.mjs';
24
24
  import { digest, hash as hash$1 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs';
25
25
  import { toRouteMatcher, createRouter } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs';
26
26
  import { readFile } from 'node:fs/promises';
27
27
  import consola, { consola as consola$1, createConsola } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs';
28
- import { ErrorParser } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch-core@0.3.2/node_modules/youch-core/build/index.js';
29
- import { Youch } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch@4.1.0-beta.7/node_modules/youch/build/index.js';
28
+ import { ErrorParser } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch-core@0.3.3/node_modules/youch-core/build/index.js';
29
+ import { Youch } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch@4.1.0-beta.8/node_modules/youch/build/index.js';
30
30
  import { SourceMapConsumer } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/source-map@0.7.4/node_modules/source-map/source-map.js';
31
31
  import { AsyncLocalStorage } from 'node:async_hooks';
32
32
  import { getContext } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unctx@2.4.1/node_modules/unctx/dist/index.mjs';
33
33
  import { captureRawStackTrace, parseRawStackTrace } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/errx@0.1.0/node_modules/errx/dist/index.js';
34
34
  import devalue from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs';
35
35
  import { preventSingleLetterOrphans } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/elrh-pslo@1.1.6/node_modules/elrh-pslo/dist/elrh-pslo.cjs';
36
+ import fs, { promises } from 'node:fs';
37
+ import { fileURLToPath } from 'node:url';
38
+ import { dirname as dirname$1, resolve as resolve$2 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/index.mjs';
36
39
  import { FilterXSS } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/xss@1.0.15/node_modules/xss/lib/index.js';
37
- import { basename, resolve as resolve$2, isAbsolute } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs';
40
+ import { basename, resolve as resolve$3, isAbsolute } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs';
38
41
  import { getIcons } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/index.mjs';
39
42
  import { collections } from 'file://C:/Git/nuxt-ignis/core/.nuxt/nuxt-icon-server-bundle.mjs';
40
43
  import { neon } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@neondatabase+serverless@1.0.0/node_modules/@neondatabase/serverless/index.mjs';
41
44
  import SqlString from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js';
42
45
  import Fuse from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/fuse.js@7.1.0/node_modules/fuse.js/dist/fuse.mjs';
43
- import { diffLines } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/index.mjs';
46
+ import { diffLines } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/diff@8.0.2/node_modules/diff/libesm/index.js';
44
47
  import MagicString from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs';
45
- import fs from 'node:fs';
46
- import { walkResolver } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.10/node_modules/unhead/dist/utils.mjs';
47
- import localAdapter from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/db0@0.3.2_better-sqlite3@11.9.1/node_modules/db0/dist/connectors/better-sqlite3.mjs';
48
- import { fileURLToPath } from 'node:url';
49
- import { ipxFSStorage, ipxHttpStorage, createIPX, createIPXH3Handler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ipx@2.1.0_@netlify+blobs@8._f7b76bddf163aa8be609581d2cbf5962/node_modules/ipx/dist/index.mjs';
48
+ import { walkResolver } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/utils.mjs';
49
+ import localAdapter from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/db0@0.3.2_better-sqlite3@12.2.0/node_modules/db0/dist/connectors/better-sqlite3.mjs';
50
+ import { ipxFSStorage, ipxHttpStorage, createIPX, createIPXH3Handler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ipx@2.1.0_@netlify+blobs@9._21c037d6c18a84e7aae7ac41a6abbab8/node_modules/ipx/dist/index.mjs';
50
51
 
51
52
  const HASH_RE = /#/g;
52
53
  const AMPERSAND_RE = /&/g;
@@ -58,6 +59,7 @@ const ENC_CARET_RE = /%5e/gi;
58
59
  const ENC_BACKTICK_RE = /%60/gi;
59
60
  const ENC_PIPE_RE = /%7c/gi;
60
61
  const ENC_SPACE_RE = /%20/gi;
62
+ const ENC_SLASH_RE = /%2f/gi;
61
63
  const ENC_ENC_SLASH_RE = /%252f/gi;
62
64
  function encode(text) {
63
65
  return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
@@ -78,6 +80,9 @@ function decode(text = "") {
78
80
  return "" + text;
79
81
  }
80
82
  }
83
+ function decodePath(text) {
84
+ return decode(text.replace(ENC_SLASH_RE, "%252F"));
85
+ }
81
86
  function decodeQueryKey(text) {
82
87
  return decode(text.replace(PLUS_RE, " "));
83
88
  }
@@ -327,15 +332,15 @@ function stringifyParsedURL(parsed) {
327
332
 
328
333
  const serverAssets = [{"baseName":"server","dir":"C:/Git/nuxt-ignis/core/server/assets"}];
329
334
 
330
- const assets = createStorage();
335
+ const assets$1 = createStorage();
331
336
 
332
337
  for (const asset of serverAssets) {
333
- assets.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) }));
338
+ assets$1.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) }));
334
339
  }
335
340
 
336
341
  const storage$1 = createStorage({});
337
342
 
338
- storage$1.mount('/assets', assets);
343
+ storage$1.mount('/assets', assets$1);
339
344
 
340
345
  storage$1.mount('#rate-limiter-storage', unstorage_47drivers_47lru_45cache({"driver":"lruCache"}));
341
346
  storage$1.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"C:/Git/nuxt-ignis/core","watchOptions":{"ignored":[null]}}));
@@ -866,12 +871,6 @@ function cloneWithProxy(obj, overrides) {
866
871
  }
867
872
  const cachedEventHandler = defineCachedEventHandler;
868
873
 
869
- const defineAppConfig = (config) => config;
870
-
871
- const appConfig0 = defineAppConfig({
872
- textTitle: "Nuxt Ignis"
873
- });
874
-
875
874
  const inlineAppConfig = {
876
875
  "nuxt": {},
877
876
  "ui": {
@@ -1102,7 +1101,9 @@ const inlineAppConfig = {
1102
1101
  }
1103
1102
  };
1104
1103
 
1105
- const appConfig = defuFn(appConfig0, inlineAppConfig);
1104
+
1105
+
1106
+ const appConfig = defuFn(inlineAppConfig);
1106
1107
 
1107
1108
  function getEnv(key, opts) {
1108
1109
  const envKey = snakeCase(key).toUpperCase();
@@ -1183,7 +1184,7 @@ const _inlineRuntimeConfig = {
1183
1184
  "/__nuxt_content/**": {
1184
1185
  "robots": false
1185
1186
  },
1186
- "/__nuxt_content/content/sql_dump": {
1187
+ "/__nuxt_content/content/sql_dump.txt": {
1187
1188
  "prerender": true
1188
1189
  },
1189
1190
  "/_scripts/**": {
@@ -1220,12 +1221,17 @@ const _inlineRuntimeConfig = {
1220
1221
  },
1221
1222
  "public": {
1222
1223
  "ignis": {
1224
+ "html": {
1225
+ "lang": "en",
1226
+ "title": "Nuxt Ignis App"
1227
+ },
1223
1228
  "log": {
1224
1229
  "level": "info"
1225
1230
  },
1226
1231
  "error": true,
1227
1232
  "ssr": true,
1228
1233
  "pages": true,
1234
+ "css": "",
1229
1235
  "preset": {
1230
1236
  "ui": "off",
1231
1237
  "db": "off",
@@ -1233,6 +1239,7 @@ const _inlineRuntimeConfig = {
1233
1239
  "validation": "off"
1234
1240
  },
1235
1241
  "core": {
1242
+ "css": true,
1236
1243
  "eslint": true,
1237
1244
  "fonts": true,
1238
1245
  "image": true,
@@ -1271,12 +1278,14 @@ const _inlineRuntimeConfig = {
1271
1278
  "composables": "",
1272
1279
  "plugins": ""
1273
1280
  },
1281
+ "regexp": false,
1282
+ "charts": false,
1274
1283
  "warn": {
1275
1284
  "duplicates": true
1276
1285
  }
1277
1286
  },
1278
1287
  "nuxt-scripts": {
1279
- "version": "0.11.8",
1288
+ "version": "0.11.10",
1280
1289
  "defaultScriptOptions": {
1281
1290
  "trigger": "onNuxtReady"
1282
1291
  }
@@ -1286,7 +1295,7 @@ const _inlineRuntimeConfig = {
1286
1295
  "neonRawWarning": true,
1287
1296
  "neonDebugSQL": false,
1288
1297
  "nuxt-link-checker": {
1289
- "version": "4.3.0",
1298
+ "version": "4.3.1",
1290
1299
  "hasSitemapModule": true,
1291
1300
  "rootDir": "C:/Git/nuxt-ignis/core",
1292
1301
  "excludeLinks": [],
@@ -1361,11 +1370,16 @@ const _inlineRuntimeConfig = {
1361
1370
  "alternateLinkCanonicalQueries": false,
1362
1371
  "hmr": true
1363
1372
  },
1364
- "multiDomainLocales": false
1373
+ "multiDomainLocales": false,
1374
+ "domainLocales": {
1375
+ "en": {
1376
+ "domain": ""
1377
+ }
1378
+ }
1365
1379
  }
1366
1380
  },
1367
1381
  "nuxt-scripts": {
1368
- "version": "0.11.8"
1382
+ "version": "0.11.10"
1369
1383
  },
1370
1384
  "private": {
1371
1385
  "basicAuth": false
@@ -1530,7 +1544,7 @@ const _inlineRuntimeConfig = {
1530
1544
  }
1531
1545
  ],
1532
1546
  "credits": true,
1533
- "version": "7.2.10",
1547
+ "version": "7.4.3",
1534
1548
  "sitemaps": {
1535
1549
  "sitemap.xml": {
1536
1550
  "sitemapName": "sitemap.xml",
@@ -1548,7 +1562,7 @@ const _inlineRuntimeConfig = {
1548
1562
  },
1549
1563
  "content": {
1550
1564
  "databaseVersion": "v3.5.0",
1551
- "version": "3.5.1",
1565
+ "version": "3.6.3",
1552
1566
  "database": {
1553
1567
  "type": "sqlite",
1554
1568
  "filename": "./contents.sqlite"
@@ -1836,15 +1850,15 @@ const _inlineRuntimeConfig = {
1836
1850
  "_context": "package.json",
1837
1851
  "_priority": -10,
1838
1852
  "name": "nuxt-ignis",
1839
- "description": "Enhanced and customizable Nuxt application starter pack"
1853
+ "description": "A ready-to-use setup for your next application in Nuxt"
1840
1854
  }
1841
1855
  ],
1842
- "version": "3.1.9",
1856
+ "version": "3.2.2",
1843
1857
  "debug": false,
1844
1858
  "multiTenancy": []
1845
1859
  },
1846
1860
  "nuxt-robots": {
1847
- "version": "5.2.10",
1861
+ "version": "5.4.0",
1848
1862
  "isNuxtContentV2": false,
1849
1863
  "debug": false,
1850
1864
  "credits": true,
@@ -1867,7 +1881,8 @@ const _inlineRuntimeConfig = {
1867
1881
  "header": true,
1868
1882
  "robotsEnabledValue": "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
1869
1883
  "robotsDisabledValue": "noindex, nofollow",
1870
- "cacheControl": "max-age=14400, must-revalidate"
1884
+ "cacheControl": "max-age=14400, must-revalidate",
1885
+ "botDetection": true
1871
1886
  },
1872
1887
  "ipx": {
1873
1888
  "baseURL": "/_ipx",
@@ -1875,7 +1890,7 @@ const _inlineRuntimeConfig = {
1875
1890
  "fs": {
1876
1891
  "dir": [
1877
1892
  "C:/Git/nuxt-ignis/core/public",
1878
- "C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-spec@0.0.4_@types+debu_fbd62cce99e0c6b5414599c74ec32b3d/node_modules/nuxt-spec/public"
1893
+ "C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-spec@0.0.4_@types+debu_dbaf4d77b84c2665c87205cc14ddf373/node_modules/nuxt-spec/public"
1879
1894
  ]
1880
1895
  },
1881
1896
  "http": {
@@ -2090,6 +2105,10 @@ const errorHandler$0 = (async function errorhandler(error, event, { defaultHandl
2090
2105
  }
2091
2106
  const html = await res.text();
2092
2107
  for (const [header, value] of res.headers.entries()) {
2108
+ if (header === "set-cookie") {
2109
+ appendResponseHeader(event, header, value);
2110
+ continue;
2111
+ }
2093
2112
  setResponseHeader(event, header, value);
2094
2113
  }
2095
2114
  setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
@@ -2247,7 +2266,7 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
2247
2266
  window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
2248
2267
  `;
2249
2268
 
2250
- const _4xtY69JUQXVdqRY6G89AKPM78rluyxVyS_yCYbfwz2o = (function(nitro) {
2269
+ const _BUwpELsyks45lroxlJ7pWDnbGcceJZF9mVl7VPNuPm4 = (function(nitro) {
2251
2270
  nitro.hooks.hook("render:html", (htmlContext) => {
2252
2271
  htmlContext.head.push(`<script>${script$1}<\/script>`);
2253
2272
  });
@@ -2255,7 +2274,7 @@ const _4xtY69JUQXVdqRY6G89AKPM78rluyxVyS_yCYbfwz2o = (function(nitro) {
2255
2274
 
2256
2275
  const rootDir = "C:/Git/nuxt-ignis/core";
2257
2276
 
2258
- const appHead = {"link":[],"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"property":"og:type","content":"website"}],"style":[],"script":[],"noscript":[],"htmlAttrs":{}};
2277
+ const appHead = {"link":[],"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"property":"og:type","content":"website"}],"style":[],"script":[],"noscript":[],"htmlAttrs":{"lang":"en-US"},"title":"Custom Nuxt Ignis App"};
2259
2278
 
2260
2279
  const appRootTag = "div";
2261
2280
 
@@ -2272,7 +2291,7 @@ const devReducers = {
2272
2291
  URL: (data) => data instanceof URL ? data.toString() : void 0
2273
2292
  };
2274
2293
  const asyncContext = getContext("nuxt-dev", { asyncContext: true, AsyncLocalStorage });
2275
- const _pDqMicud8w2L89lzf1a9cCdBCR0n8g2d_dBPQkdnw4 = (nitroApp) => {
2294
+ const __pERcNNWV1OaEgG7uvohNfb6mvznh4KNsVmRCE4aV0 = (nitroApp) => {
2276
2295
  const handler = nitroApp.h3App.handler;
2277
2296
  nitroApp.h3App.handler = (event) => {
2278
2297
  return asyncContext.callAsync({ logs: [], event }, () => handler(event));
@@ -2433,7 +2452,7 @@ function useSiteConfig(e, _options) {
2433
2452
  return e.context.siteConfig.get(options);
2434
2453
  }
2435
2454
 
2436
- const _vFyUmRhrsoPWtOg8n3nI006gpGkcTXipKwGkXHyIU = defineNitroPlugin(async (nitroApp) => {
2455
+ const _Z5botqEqNb56svWtJhyEDnS6Z4dk8BSBwZjYp1KssfI = defineNitroPlugin(async (nitroApp) => {
2437
2456
  nitroApp.hooks.hook("render:html", async (ctx, { event }) => {
2438
2457
  getRouteRules(event);
2439
2458
  process.env.NUXT_COMPONENT_ISLANDS && event.path.startsWith("/__nuxt_island");
@@ -2447,12 +2466,364 @@ const _vFyUmRhrsoPWtOg8n3nI006gpGkcTXipKwGkXHyIU = defineNitroPlugin(async (nitr
2447
2466
  });
2448
2467
  });
2449
2468
 
2469
+ const KNOWN_SEARCH_BOTS = [
2470
+ {
2471
+ pattern: "googlebot",
2472
+ name: "googlebot",
2473
+ secondaryPatterns: ["google.com/bot.html"]
2474
+ },
2475
+ {
2476
+ pattern: "bingbot",
2477
+ name: "bingbot",
2478
+ secondaryPatterns: ["msnbot"]
2479
+ },
2480
+ {
2481
+ pattern: "yandexbot",
2482
+ name: "yandexbot"
2483
+ },
2484
+ {
2485
+ pattern: "baiduspider",
2486
+ name: "baiduspider",
2487
+ secondaryPatterns: ["baidu.com"]
2488
+ },
2489
+ {
2490
+ pattern: "duckduckbot",
2491
+ name: "duckduckbot",
2492
+ secondaryPatterns: ["duckduckgo.com"]
2493
+ },
2494
+ {
2495
+ pattern: "slurp",
2496
+ name: "yahoo"
2497
+ }
2498
+ ];
2499
+ const SOCIAL_BOTS = [
2500
+ {
2501
+ pattern: "twitterbot",
2502
+ name: "twitter",
2503
+ secondaryPatterns: ["twitter"]
2504
+ },
2505
+ {
2506
+ pattern: "facebookexternalhit",
2507
+ name: "facebook",
2508
+ secondaryPatterns: ["facebook.com"]
2509
+ },
2510
+ {
2511
+ pattern: "linkedinbot",
2512
+ name: "linkedin",
2513
+ secondaryPatterns: ["linkedin"]
2514
+ },
2515
+ {
2516
+ pattern: "pinterestbot",
2517
+ name: "pinterest",
2518
+ secondaryPatterns: ["pinterest"]
2519
+ },
2520
+ {
2521
+ pattern: "discordbot",
2522
+ name: "discord",
2523
+ secondaryPatterns: ["discordapp"]
2524
+ }
2525
+ ];
2526
+ const SEO_BOTS = [
2527
+ {
2528
+ pattern: "mj12bot",
2529
+ name: "majestic12",
2530
+ secondaryPatterns: ["majestic12.co.uk/bot"]
2531
+ },
2532
+ {
2533
+ pattern: "ahrefsbot",
2534
+ name: "ahrefs",
2535
+ secondaryPatterns: ["ahrefs.com"]
2536
+ },
2537
+ {
2538
+ pattern: "semrushbot",
2539
+ name: "semrush",
2540
+ secondaryPatterns: ["semrush.com/bot"]
2541
+ },
2542
+ {
2543
+ pattern: "screaming frog",
2544
+ name: "screaming-frog",
2545
+ secondaryPatterns: ["screamingfrog.co.uk"]
2546
+ },
2547
+ {
2548
+ pattern: "rogerbot",
2549
+ name: "moz"
2550
+ }
2551
+ ];
2552
+ const AI_BOTS = [
2553
+ {
2554
+ pattern: "anthropic",
2555
+ name: "anthropic"
2556
+ },
2557
+ {
2558
+ pattern: "claude",
2559
+ name: "claude"
2560
+ },
2561
+ {
2562
+ pattern: "gptbot",
2563
+ name: "gpt",
2564
+ secondaryPatterns: ["openai.com"]
2565
+ },
2566
+ {
2567
+ pattern: "googlebot-news",
2568
+ name: "google-news"
2569
+ },
2570
+ {
2571
+ pattern: "cohere",
2572
+ name: "cohere",
2573
+ secondaryPatterns: ["cohere.com"]
2574
+ },
2575
+ {
2576
+ pattern: "ccbot",
2577
+ name: "commoncrawl",
2578
+ secondaryPatterns: ["commoncrawl.org"]
2579
+ },
2580
+ {
2581
+ pattern: "perplexitybot",
2582
+ name: "perplexity",
2583
+ secondaryPatterns: ["perplexity.ai"]
2584
+ }
2585
+ ];
2586
+ const HTTP_TOOL_BOTS = [
2587
+ {
2588
+ pattern: "python-requests",
2589
+ name: "requests",
2590
+ secondaryPatterns: ["python"]
2591
+ },
2592
+ {
2593
+ pattern: "wget",
2594
+ name: "wget"
2595
+ },
2596
+ {
2597
+ pattern: "curl",
2598
+ name: "curl",
2599
+ secondaryPatterns: ["curl"]
2600
+ }
2601
+ ];
2602
+ const SECURITY_SCANNING_BOTS = [
2603
+ {
2604
+ pattern: "zgrab",
2605
+ name: "zgrab"
2606
+ },
2607
+ {
2608
+ pattern: "masscan",
2609
+ name: "masscan"
2610
+ },
2611
+ {
2612
+ pattern: "nmap",
2613
+ name: "nmap",
2614
+ secondaryPatterns: ["insecure.org"]
2615
+ },
2616
+ {
2617
+ pattern: "nikto",
2618
+ name: "nikto"
2619
+ },
2620
+ {
2621
+ pattern: "wpscan",
2622
+ name: "wpscan"
2623
+ }
2624
+ ];
2625
+ const SCRAPING_BOTS = [
2626
+ {
2627
+ pattern: "scrapy",
2628
+ name: "scrapy",
2629
+ secondaryPatterns: ["scrapy.org"]
2630
+ }
2631
+ ];
2632
+ const AUTOMATION_BOTS = [
2633
+ {
2634
+ pattern: "phantomjs",
2635
+ name: "phantomjs"
2636
+ },
2637
+ {
2638
+ pattern: "headless",
2639
+ name: "headless-browser"
2640
+ },
2641
+ {
2642
+ pattern: "playwright",
2643
+ name: "playwright"
2644
+ },
2645
+ {
2646
+ pattern: "selenium",
2647
+ name: "selenium",
2648
+ secondaryPatterns: ["webdriver"]
2649
+ },
2650
+ {
2651
+ pattern: "puppeteer",
2652
+ name: "puppeteer",
2653
+ secondaryPatterns: ["headless"]
2654
+ }
2655
+ ];
2656
+ const GENERIC_BOTS = [
2657
+ {
2658
+ pattern: "bot",
2659
+ name: "generic-bot"
2660
+ },
2661
+ {
2662
+ pattern: "spider",
2663
+ name: "generic-spider"
2664
+ },
2665
+ {
2666
+ pattern: "crawler",
2667
+ name: "generic-crawler"
2668
+ },
2669
+ {
2670
+ pattern: "scraper",
2671
+ name: "generic-scraper"
2672
+ }
2673
+ ];
2674
+ const BOT_MAP = [
2675
+ {
2676
+ type: "search-engine",
2677
+ bots: KNOWN_SEARCH_BOTS,
2678
+ trusted: true
2679
+ },
2680
+ {
2681
+ type: "social",
2682
+ bots: SOCIAL_BOTS,
2683
+ trusted: true
2684
+ },
2685
+ {
2686
+ type: "seo",
2687
+ bots: SEO_BOTS,
2688
+ trusted: true
2689
+ },
2690
+ {
2691
+ type: "ai",
2692
+ bots: AI_BOTS,
2693
+ trusted: true
2694
+ },
2695
+ {
2696
+ type: "generic",
2697
+ bots: GENERIC_BOTS,
2698
+ trusted: false
2699
+ },
2700
+ {
2701
+ type: "automation",
2702
+ bots: AUTOMATION_BOTS,
2703
+ trusted: false
2704
+ },
2705
+ {
2706
+ type: "http-tool",
2707
+ bots: HTTP_TOOL_BOTS,
2708
+ trusted: false
2709
+ },
2710
+ {
2711
+ type: "security-scanner",
2712
+ bots: SECURITY_SCANNING_BOTS,
2713
+ trusted: false
2714
+ },
2715
+ {
2716
+ type: "scraping",
2717
+ bots: SCRAPING_BOTS,
2718
+ trusted: false
2719
+ }
2720
+ ];
2721
+ function matches(pattern, path) {
2722
+ const pathLength = path.length;
2723
+ const patternLength = pattern.length;
2724
+ const matchingLengths = Array.from({ length: pathLength + 1 }).fill(0);
2725
+ let numMatchingLengths = 1;
2726
+ let p = 0;
2727
+ while (p < patternLength) {
2728
+ if (pattern[p] === "$" && p + 1 === patternLength) {
2729
+ return matchingLengths[numMatchingLengths - 1] === pathLength;
2730
+ }
2731
+ if (pattern[p] === "*") {
2732
+ numMatchingLengths = pathLength - matchingLengths[0] + 1;
2733
+ for (let i = 1; i < numMatchingLengths; i++) {
2734
+ matchingLengths[i] = matchingLengths[i - 1] + 1;
2735
+ }
2736
+ } else {
2737
+ let numMatches = 0;
2738
+ for (let i = 0; i < numMatchingLengths; i++) {
2739
+ const matchLength = matchingLengths[i];
2740
+ if (matchLength < pathLength && path[matchLength] === pattern[p]) {
2741
+ matchingLengths[numMatches++] = matchLength + 1;
2742
+ }
2743
+ }
2744
+ if (numMatches === 0) {
2745
+ return false;
2746
+ }
2747
+ numMatchingLengths = numMatches;
2748
+ }
2749
+ p++;
2750
+ }
2751
+ return true;
2752
+ }
2753
+ function matchPathToRule(path, _rules) {
2754
+ let matchedRule = null;
2755
+ const rules = _rules.filter(Boolean);
2756
+ const rulesLength = rules.length;
2757
+ let i = 0;
2758
+ while (i < rulesLength) {
2759
+ const rule = rules[i];
2760
+ if (!rule || !matches(rule.pattern, path)) {
2761
+ i++;
2762
+ continue;
2763
+ }
2764
+ if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
2765
+ matchedRule = rule;
2766
+ } else if (rule.pattern.length === matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
2767
+ matchedRule = rule;
2768
+ }
2769
+ i++;
2770
+ }
2771
+ return matchedRule;
2772
+ }
2773
+ function asArray(v) {
2774
+ return typeof v === "undefined" ? [] : Array.isArray(v) ? v : [v];
2775
+ }
2776
+ function generateRobotsTxt({ groups, sitemaps }) {
2777
+ const lines = [];
2778
+ for (const group of groups) {
2779
+ for (const comment of group.comment || [])
2780
+ lines.push(`# ${comment}`);
2781
+ for (const userAgent of group.userAgent || ["*"])
2782
+ lines.push(`User-agent: ${userAgent}`);
2783
+ for (const allow of group.allow || [])
2784
+ lines.push(`Allow: ${allow}`);
2785
+ for (const disallow of group.disallow || [])
2786
+ lines.push(`Disallow: ${disallow}`);
2787
+ for (const cleanParam of group.cleanParam || [])
2788
+ lines.push(`Clean-param: ${cleanParam}`);
2789
+ lines.push("");
2790
+ }
2791
+ for (const sitemap of sitemaps)
2792
+ lines.push(`Sitemap: ${sitemap}`);
2793
+ return lines.join("\n");
2794
+ }
2795
+ createDefu((obj, key, value) => {
2796
+ if (Array.isArray(obj[key]) && Array.isArray(value))
2797
+ obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
2798
+ return obj[key];
2799
+ });
2800
+ function createPatternMap() {
2801
+ const patternMap = /* @__PURE__ */ new Map();
2802
+ for (const def of BOT_MAP) {
2803
+ for (const bot of def.bots) {
2804
+ const patterns = [bot.pattern, ...bot.secondaryPatterns || []];
2805
+ for (const pattern of patterns) {
2806
+ patternMap.set(pattern.toLowerCase(), {
2807
+ botName: bot.name,
2808
+ botCategory: def.type,
2809
+ trusted: def.trusted
2810
+ });
2811
+ }
2812
+ }
2813
+ }
2814
+ return patternMap;
2815
+ }
2816
+
2817
+ function useRuntimeConfigNuxtRobots(event) {
2818
+ return useRuntimeConfig(event)["nuxt-robots"];
2819
+ }
2820
+
2450
2821
  const logger$1 = createConsola({
2451
2822
  defaults: { tag: "@nuxtjs/robots" }
2452
2823
  });
2453
2824
 
2454
2825
  async function resolveRobotsTxtContext(e, nitro = useNitroApp()) {
2455
- const { groups, sitemap: sitemaps } = useRuntimeConfig(e)["nuxt-robots"];
2826
+ const { groups, sitemap: sitemaps } = useRuntimeConfigNuxtRobots(e);
2456
2827
  const generateRobotsTxtCtx = {
2457
2828
  event: e,
2458
2829
  context: e ? "robots.txt" : "init",
@@ -2463,8 +2834,11 @@ async function resolveRobotsTxtContext(e, nitro = useNitroApp()) {
2463
2834
  return generateRobotsTxtCtx;
2464
2835
  }
2465
2836
 
2466
- const _nKKxaY6ZRQkkFJTIQmxAWxLrMtbMy3btfvk8OLgqAc8 = defineNitroPlugin(async (nitroApp) => {
2467
- const { isNuxtContentV2, robotsDisabledValue } = useRuntimeConfig()["nuxt-robots"];
2837
+ const __N1t3ZNCULqwSjGoVUR2rCd_NNid2x4qNEWZGlFs8vY = defineNitroPlugin(async (nitroApp) => {
2838
+ const { isNuxtContentV2, robotsDisabledValue, botDetection } = useRuntimeConfigNuxtRobots();
2839
+ if (botDetection !== false) {
2840
+ nitroApp._robotsPatternMap = createPatternMap();
2841
+ }
2468
2842
  nitroApp._robots = {};
2469
2843
  await resolveRobotsTxtContext(void 0, nitroApp);
2470
2844
  const nuxtContentUrls = /* @__PURE__ */ new Set();
@@ -2919,7 +3293,7 @@ async function getSQLIfAllowed() {
2919
3293
  }
2920
3294
 
2921
3295
  const checksums = {
2922
- "content": "v3.5.0--Soo3jzq7nJIWrwBhdqFllfPnBveJORe1nIuezk-x6tM"
3296
+ "content": "v3.5.0--bgIYhpjRuV8zbHJE_CfelwKpJ_Td6YuGJwixiek8lmI"
2923
3297
  };
2924
3298
  const checksumsStructure = {
2925
3299
  "content": "bgIYhpjRuV8zbHJE_CfelwKpJ_Td6YuGJwixiek8lmI"
@@ -2933,15 +3307,15 @@ const contentManifest = {
2933
3307
  "type": "page",
2934
3308
  "fields": {
2935
3309
  "id": "string",
2936
- "stem": "string",
3310
+ "title": "string",
3311
+ "body": "json",
3312
+ "description": "string",
2937
3313
  "extension": "string",
2938
3314
  "meta": "json",
3315
+ "navigation": "json",
2939
3316
  "path": "string",
2940
- "title": "string",
2941
- "description": "string",
2942
3317
  "seo": "json",
2943
- "body": "json",
2944
- "navigation": "json"
3318
+ "stem": "string"
2945
3319
  }
2946
3320
  },
2947
3321
  "info": {
@@ -3103,17 +3477,23 @@ function singleQuote(value) {
3103
3477
  }
3104
3478
 
3105
3479
  async function fetchDatabase(event, collection) {
3106
- return await $fetch(`/__nuxt_content/${collection}/sql_dump`, {
3480
+ return await $fetch(`/__nuxt_content/${collection}/sql_dump.txt`, {
3107
3481
  context: event ? { cloudflare: event.context.cloudflare } : {},
3108
3482
  responseType: "text",
3109
- headers: { "content-type": "text/plain" },
3483
+ headers: {
3484
+ "content-type": "text/plain",
3485
+ ...event?.node?.req?.headers?.cookie ? { cookie: event.node.req.headers.cookie } : {}
3486
+ },
3110
3487
  query: { v: checksums[String(collection)], t: Date.now() }
3111
3488
  });
3112
3489
  }
3113
3490
  async function fetchQuery(event, collection, sql) {
3114
3491
  return await $fetch(`/__nuxt_content/${collection}/query`, {
3115
3492
  context: event ? { cloudflare: event.context.cloudflare } : {},
3116
- headers: { "content-type": "application/json" },
3493
+ headers: {
3494
+ "content-type": "application/json",
3495
+ ...event?.node?.req?.headers?.cookie ? { cookie: event.node.req.headers.cookie } : {}
3496
+ },
3117
3497
  query: { v: checksums[String(collection)], t: Date.now() },
3118
3498
  method: "POST",
3119
3499
  body: {
@@ -3122,7 +3502,7 @@ async function fetchQuery(event, collection, sql) {
3122
3502
  });
3123
3503
  }
3124
3504
 
3125
- const queryCollectionWithEvent = (event, collection) => {
3505
+ const queryCollection = (event, collection) => {
3126
3506
  return collectionQueryBuilder(collection, (collection2, sql) => fetchQuery(event, collection2, sql));
3127
3507
  };
3128
3508
 
@@ -3330,104 +3710,28 @@ function withSiteUrl(e, path, options = {}) {
3330
3710
  });
3331
3711
  }
3332
3712
 
3333
- function matches(pattern, path) {
3334
- const pathLength = path.length;
3335
- const patternLength = pattern.length;
3336
- const matchingLengths = Array.from({ length: pathLength + 1 }).fill(0);
3337
- let numMatchingLengths = 1;
3338
- let p = 0;
3339
- while (p < patternLength) {
3340
- if (pattern[p] === "$" && p + 1 === patternLength) {
3341
- return matchingLengths[numMatchingLengths - 1] === pathLength;
3342
- }
3343
- if (pattern[p] === "*") {
3344
- numMatchingLengths = pathLength - matchingLengths[0] + 1;
3345
- for (let i = 1; i < numMatchingLengths; i++) {
3346
- matchingLengths[i] = matchingLengths[i - 1] + 1;
3347
- }
3348
- } else {
3349
- let numMatches = 0;
3350
- for (let i = 0; i < numMatchingLengths; i++) {
3351
- const matchLength = matchingLengths[i];
3352
- if (matchLength < pathLength && path[matchLength] === pattern[p]) {
3353
- matchingLengths[numMatches++] = matchLength + 1;
3354
- }
3355
- }
3356
- if (numMatches === 0) {
3357
- return false;
3358
- }
3359
- numMatchingLengths = numMatches;
3360
- }
3361
- p++;
3362
- }
3363
- return true;
3713
+ const ROBOT_DIRECTIVE_VALUES = {
3714
+ // Standard directives
3715
+ enabled: "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
3716
+ disabled: "noindex, nofollow",
3717
+ index: "index",
3718
+ noindex: "noindex",
3719
+ follow: "follow",
3720
+ nofollow: "nofollow",
3721
+ none: "none",
3722
+ all: "all",
3723
+ // Non-standard directives (not part of official robots spec)
3724
+ noai: "noai",
3725
+ noimageai: "noimageai"
3726
+ };
3727
+ function formatMaxImagePreview(value) {
3728
+ return `max-image-preview:${value}`;
3364
3729
  }
3365
- function matchPathToRule(path, _rules) {
3366
- let matchedRule = null;
3367
- const rules = _rules.filter(Boolean);
3368
- const rulesLength = rules.length;
3369
- let i = 0;
3370
- while (i < rulesLength) {
3371
- const rule = rules[i];
3372
- if (!matches(rule.pattern, path)) {
3373
- i++;
3374
- continue;
3375
- }
3376
- if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
3377
- matchedRule = rule;
3378
- } else if (rule.pattern.length === matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
3379
- matchedRule = rule;
3380
- }
3381
- i++;
3382
- }
3383
- return matchedRule;
3384
- }
3385
- function asArray(v) {
3386
- return typeof v === "undefined" ? [] : Array.isArray(v) ? v : [v];
3730
+ function formatMaxSnippet(value) {
3731
+ return `max-snippet:${value}`;
3387
3732
  }
3388
- function generateRobotsTxt({ groups, sitemaps }) {
3389
- const lines = [];
3390
- for (const group of groups) {
3391
- for (const comment of group.comment || [])
3392
- lines.push(`# ${comment}`);
3393
- for (const userAgent of group.userAgent || ["*"])
3394
- lines.push(`User-agent: ${userAgent}`);
3395
- for (const allow of group.allow || [])
3396
- lines.push(`Allow: ${allow}`);
3397
- for (const disallow of group.disallow || [])
3398
- lines.push(`Disallow: ${disallow}`);
3399
- for (const cleanParam of group.cleanParam || [])
3400
- lines.push(`Clean-param: ${cleanParam}`);
3401
- lines.push("");
3402
- }
3403
- for (const sitemap of sitemaps)
3404
- lines.push(`Sitemap: ${sitemap}`);
3405
- return lines.join("\n");
3406
- }
3407
- createDefu((obj, key, value) => {
3408
- if (Array.isArray(obj[key]) && Array.isArray(value))
3409
- obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
3410
- return obj[key];
3411
- });
3412
- function normaliseRobotsRouteRule(config) {
3413
- let allow;
3414
- if (typeof config.robots === "boolean")
3415
- allow = config.robots;
3416
- else if (typeof config.robots === "object" && typeof config.robots.indexable !== "undefined")
3417
- allow = config.robots.indexable;
3418
- let rule;
3419
- if (typeof config.robots === "object" && typeof config.robots.rule !== "undefined")
3420
- rule = config.robots.rule;
3421
- else if (typeof config.robots === "string")
3422
- rule = config.robots;
3423
- if (rule && !allow)
3424
- allow = rule !== "none" && !rule.includes("noindex");
3425
- if (typeof allow === "undefined" && typeof rule === "undefined")
3426
- return;
3427
- return {
3428
- allow,
3429
- rule
3430
- };
3733
+ function formatMaxVideoPreview(value) {
3734
+ return `max-video-preview:${value}`;
3431
3735
  }
3432
3736
 
3433
3737
  function withoutQuery$1(path) {
@@ -3450,10 +3754,56 @@ function createNitroRouteRuleMatcher$1(e) {
3450
3754
  };
3451
3755
  }
3452
3756
 
3757
+ function normaliseRobotsRouteRule(config) {
3758
+ let allow;
3759
+ if (typeof config.robots === "boolean")
3760
+ allow = config.robots;
3761
+ else if (typeof config.robots === "object" && "indexable" in config.robots && typeof config.robots.indexable !== "undefined")
3762
+ allow = config.robots.indexable;
3763
+ let rule;
3764
+ if (typeof config.robots === "object" && config.robots !== null) {
3765
+ if ("rule" in config.robots && typeof config.robots.rule !== "undefined") {
3766
+ rule = config.robots.rule;
3767
+ } else if (!("indexable" in config.robots)) {
3768
+ const directives = [];
3769
+ for (const [key, value] of Object.entries(config.robots)) {
3770
+ if (value === false || value === null || value === void 0)
3771
+ continue;
3772
+ if (key in ROBOT_DIRECTIVE_VALUES && typeof value === "boolean" && value) {
3773
+ directives.push(ROBOT_DIRECTIVE_VALUES[key]);
3774
+ } else if (key === "max-image-preview" && typeof value === "string") {
3775
+ directives.push(formatMaxImagePreview(value));
3776
+ } else if (key === "max-snippet" && typeof value === "number") {
3777
+ directives.push(formatMaxSnippet(value));
3778
+ } else if (key === "max-video-preview" && typeof value === "number") {
3779
+ directives.push(formatMaxVideoPreview(value));
3780
+ }
3781
+ }
3782
+ if (directives.length > 0) {
3783
+ rule = directives.join(", ");
3784
+ }
3785
+ }
3786
+ } else if (typeof config.robots === "string") {
3787
+ rule = config.robots;
3788
+ }
3789
+ if (rule && typeof allow === "undefined") {
3790
+ const disallowIndicators = ["none", "noindex", "noai", "noimageai"];
3791
+ allow = !disallowIndicators.some(
3792
+ (indicator) => rule === indicator || rule.split(",").some((part) => part.trim() === indicator)
3793
+ );
3794
+ }
3795
+ if (typeof allow === "undefined" && typeof rule === "undefined")
3796
+ return;
3797
+ return {
3798
+ allow,
3799
+ rule
3800
+ };
3801
+ }
3802
+
3453
3803
  function getSiteRobotConfig(e) {
3454
3804
  const query = getQuery$1(e);
3455
3805
  const hints = [];
3456
- const { groups, debug } = useRuntimeConfig(e)["nuxt-robots"];
3806
+ const { groups, debug } = useRuntimeConfigNuxtRobots(e);
3457
3807
  let indexable = getSiteIndexable(e);
3458
3808
  const queryIndexableEnabled = String(query.mockProductionEnv) === "true" || query.mockProductionEnv === "";
3459
3809
  {
@@ -3482,7 +3832,7 @@ function getSiteRobotConfig(e) {
3482
3832
 
3483
3833
  function getPathRobotConfig(e, options) {
3484
3834
  const runtimeConfig = useRuntimeConfig(e);
3485
- const { robotsDisabledValue, robotsEnabledValue, isNuxtContentV2 } = runtimeConfig["nuxt-robots"];
3835
+ const { robotsDisabledValue, robotsEnabledValue, isNuxtContentV2 } = useRuntimeConfigNuxtRobots(e);
3486
3836
  if (!options?.skipSiteIndexable) {
3487
3837
  if (!getSiteRobotConfig(e).indexable) {
3488
3838
  return {
@@ -3525,7 +3875,7 @@ function getPathRobotConfig(e, options) {
3525
3875
  }
3526
3876
  };
3527
3877
  }
3528
- const robotsTxtRule = matchPathToRule(path, group._rules);
3878
+ const robotsTxtRule = matchPathToRule(path, group._rules || []);
3529
3879
  if (robotsTxtRule) {
3530
3880
  if (!robotsTxtRule.allow) {
3531
3881
  return {
@@ -3549,7 +3899,7 @@ function getPathRobotConfig(e, options) {
3549
3899
  }
3550
3900
  };
3551
3901
  }
3552
- nitroApp._robotsRuleMactcher = nitroApp._robotsRuleMactcher || createNitroRouteRuleMatcher$1(e);
3902
+ nitroApp._robotsRuleMatcher = nitroApp._robotsRuleMatcher || createNitroRouteRuleMatcher$1(e);
3553
3903
  let routeRulesPath = path;
3554
3904
  if (runtimeConfig.public?.i18n?.locales) {
3555
3905
  const { locales } = runtimeConfig.public.i18n;
@@ -3558,10 +3908,10 @@ function getPathRobotConfig(e, options) {
3558
3908
  routeRulesPath = routeRulesPath.replace(`/${locale.code}`, "");
3559
3909
  }
3560
3910
  }
3561
- const routeRules = normaliseRobotsRouteRule(nitroApp._robotsRuleMactcher(routeRulesPath));
3911
+ const routeRules = normaliseRobotsRouteRule(nitroApp._robotsRuleMatcher(routeRulesPath));
3562
3912
  if (routeRules && (typeof routeRules.allow !== "undefined" || typeof routeRules.rule !== "undefined")) {
3563
3913
  return {
3564
- indexable: routeRules.allow,
3914
+ indexable: routeRules.allow ?? false,
3565
3915
  rule: routeRules.rule || (routeRules.allow ? robotsEnabledValue : robotsDisabledValue),
3566
3916
  debug: {
3567
3917
  source: "Route Rules"
@@ -3768,7 +4118,7 @@ function backwardsCompatibleSecurity(securityHeaders) {
3768
4118
  return securityHeadersAsObject;
3769
4119
  }
3770
4120
 
3771
- const _JvOSxtiYN5RhTtiWK4gP6Qxjgh3Y8HYwNigx1wgQzE0 = defineNitroPlugin(async (nitroApp) => {
4121
+ const _bhMjw8GUQRBOh08y1gcApVwqgcuV_Ay88JuONtrFNE = defineNitroPlugin(async (nitroApp) => {
3772
4122
  const appSecurityOptions = getAppSecurityOptions();
3773
4123
  const runtimeConfig = useRuntimeConfig();
3774
4124
  for (const route in runtimeConfig.nitro.routeRules) {
@@ -3812,11 +4162,11 @@ const _JvOSxtiYN5RhTtiWK4gP6Qxjgh3Y8HYwNigx1wgQzE0 = defineNitroPlugin(async (ni
3812
4162
  await nitroApp.hooks.callHook("nuxt-security:ready");
3813
4163
  });
3814
4164
 
3815
- const sriHashes = {"/_nuxt/builds/meta/dev.json":"sha384-kLbiWWarUmwdmSH5seg8EWHoYesSMl/Qmg9RN4mxes81mkiJdx95N4pkroCzRLy8","/_nuxt/builds/latest.json":"sha384-yS7apjYD95fXjo91FZtmR3nhq5Q9lMDZKqRUOoHWAd5N9hbhjXG5cEiWJJ4vSM5f","/favicon.ico":"sha384-qOhXBYvwwZHHuXW10XxZvVu9Mzkpqf/fw3zEOxCGyqOoKqyHbeudntAaY6nKOTro","/nuxt-ignis.png":"sha384-fXgXTmjUDLdbwf7u18hVtq6YkShXv8NyJaUskNLpnUNtypcNblNb8I7IDXKgYEeY","/unsplash.jpg":"sha384-66n0HIHfBVzK8qdw7zVfgwJ5htcrV6EtN2DQmlyxUIu46/kEKMRMqFrWKYm8bP18","/nuxt-spec.png":"sha384-lqerIwfMImy74T5uRR9ogeRAvkGehx21V4QBTVB0a6Zp+2VTFMZmjOtNAAti72LU"};
4165
+ const sriHashes = {"/_nuxt/builds/meta/dev.json":"sha384-+xgR0t5BWUZLaa0is19Xv7bl4T6SugEejeruTlXpKi36anxR8eJCBoO5aTA1E6fi","/_nuxt/builds/latest.json":"sha384-OQzkdyTtFgBXlJA68NEmNSKCnE3s+ZCXqOHq2A0ikseGlvyyreuXffoahEUtyM8J","/_fonts/aPa9az0DeE4U5rqM-Ov0Vl_obQis_d6sScLNygGkvxw-s32Y9TxBLZRr_ebRHQ3l3q1g2j_0tPT879PPSBGrj8A.woff2":"sha384-A9QxCE9lPVXbqJLKywOZu/0mfnagppo3gIkNb0hL/czBrJVkLds+u6RpiSG0NvFo","/_fonts/EP1810cmAtyahQPDHB6nvBzRkIG5RcNv4u5vTy1aYHU-Ih_Po7WkbhDymI0Y_ntmpz__bZJprHiu7_c5N_X6AAA.woff2":"sha384-+PmgyN4qjpS0OKS3tzpnBzL+tElvEVNQIl0m4fERgMbCABP2lX0btd+ZJmtW2ArI","/_fonts/JNWOTRocaYj0gq52vW_s7sHAdSMUetrRmhhggCVxyZ0-TnR4PP30hI5UWldZ0knUBrHkvIoiDWYXwn2v1NtCh80.woff2":"sha384-iUZRizg1CuPUg7n1OkqSVEIjaw34zUc6NUPJrGHoQTVQsmIF65vPx9MOTD5ONTvH","/_fonts/kgyHMsxRmhh06xcV0yKMKdTKQBsQpXGi7erqwaqgjXg-55rzD39AWoqYSkQOLHuoKZUDVcDSlXRKdaymIN2dXes.woff":"sha384-0W1DksASmFMz/uEJlqgSE9CoI0NaZE4S+FkNmGlcELBL96bPDmMQzEvaMOgKBqd1","/_fonts/XbAtjIvy1UErjg9eu_v7X3zPLS_AwsmqVsR9fG-JB6o-H99o9_8BZXq7ey5UyS99Wn9zX0V0anvpXEqAqavcJlQ.woff2":"sha384-KWAx1TYOYzHt7smA8HF6EuuKxlQjXkwztw0PEe7lPd2nXNzhGpdobMAoGJ5RXTOm","/_fonts/ZLm6CLvwhQbamZ73M80jbqz7DuOkHlT_HRyXHG7YfVs-eYLoSJPWhqR5CE0c8XPABls8kE_7Fc7F2x7Gtfsg_8M.woff2":"sha384-6OEfO361yZtm7FjffN3HFcdErLtYooL76nG9prK0CbRoC1eKwh4EPFE78Ps30v4m","/favicon.ico":"sha384-qOhXBYvwwZHHuXW10XxZvVu9Mzkpqf/fw3zEOxCGyqOoKqyHbeudntAaY6nKOTro","/nuxt-ignis.png":"sha384-fXgXTmjUDLdbwf7u18hVtq6YkShXv8NyJaUskNLpnUNtypcNblNb8I7IDXKgYEeY","/unsplash.jpg":"sha384-66n0HIHfBVzK8qdw7zVfgwJ5htcrV6EtN2DQmlyxUIu46/kEKMRMqFrWKYm8bP18","/_ignis-config.json":"sha384-ReKa9RZNgEv0mkJHvGqfucC7zBljR+iZ+DyYIRDezmxGlfOGQtyzH5FkIVs4PCaF","/nuxt-spec.png":"sha384-lqerIwfMImy74T5uRR9ogeRAvkGehx21V4QBTVB0a6Zp+2VTFMZmjOtNAAti72LU"};
3816
4166
 
3817
4167
  const SCRIPT_RE$1 = /<script((?=[^>]+\bsrc="([^"]+)")(?![^>]+\bintegrity="[^"]+")[^>]+)(?:\/>|><\/script>)/g;
3818
4168
  const LINK_RE$1 = /<link((?=[^>]+\brel="(?:stylesheet|preload|modulepreload)")(?=[^>]+\bhref="([^"]+)")(?![^>]+\bintegrity="[\w\-+/=]+")[^>]+)>/g;
3819
- const _tbxOaQl1Y3WSOzpNJdiujwdTtkhHlEhGs2foVq53CE = defineNitroPlugin((nitroApp) => {
4169
+ const _LUEXAZKBV0ePPfOhSg_6JUQdyilTeQaim2YKwW8 = defineNitroPlugin((nitroApp) => {
3820
4170
  nitroApp.hooks.hook("render:html", (html, { event }) => {
3821
4171
  const rules = resolveSecurityRules(event);
3822
4172
  if (!rules.enabled || !rules.sri) {
@@ -3860,7 +4210,7 @@ function generateRandomNonce() {
3860
4210
  return nonce;
3861
4211
  }
3862
4212
 
3863
- const _RQgJM5yHb0OFbqso6l7JH4lwg1WlOglzD4emxnWL9BA = defineNitroPlugin((nitroApp) => {
4213
+ const _UcTOs1Ung7KfBGkFiid8OwKa_mCxxlEiLE15hP_nP8 = defineNitroPlugin((nitroApp) => {
3864
4214
  {
3865
4215
  return;
3866
4216
  }
@@ -3870,7 +4220,7 @@ const LINK_RE = /<link([^>]*?>)/gi;
3870
4220
  const NONCE_RE = /nonce="[^"]+"/i;
3871
4221
  const SCRIPT_RE = /<script([^>]*?>)/gi;
3872
4222
  const STYLE_RE = /<style([^>]*?>)/gi;
3873
- const _XhOSEDieM4_mfBI7ZVt8bJwMIqkowHxufWk5iOPyG8w = defineNitroPlugin((nitroApp) => {
4223
+ const _1TnoulbyNEjnKeM7ID2u9Jhxymh2c_eJ0gaouLjpOLU = defineNitroPlugin((nitroApp) => {
3874
4224
  nitroApp.hooks.hook("request", (event) => {
3875
4225
  if (event.context.security?.nonce) {
3876
4226
  return;
@@ -3916,7 +4266,7 @@ const _XhOSEDieM4_mfBI7ZVt8bJwMIqkowHxufWk5iOPyG8w = defineNitroPlugin((nitroApp
3916
4266
  });
3917
4267
  });
3918
4268
 
3919
- const __heuFDCfzogUascLWMufI8GCNumZnqILn2FdJjW9SX4 = defineNitroPlugin((nitroApp) => {
4269
+ const _s9a6UFtdhxzyAoNtC707kPxVxb8AnaIv7TbZuBq97cA = defineNitroPlugin((nitroApp) => {
3920
4270
  nitroApp.hooks.hook("render:html", (response, { event }) => {
3921
4271
  if (response.island) {
3922
4272
  return;
@@ -3964,13 +4314,13 @@ function updateCspVariables(csp, nonce, scriptHashes, styleHashes) {
3964
4314
  return generatedCsp;
3965
4315
  }
3966
4316
 
3967
- const _aHJVv3EIEUN9vB3SE4vOkiDLzGiGhyqj6au1QIwWx8 = defineNitroPlugin((nitroApp) => {
4317
+ const _66aEGGOeNtcExwcSeAGysofsErgxIFLzvow0B4F5FtQ = defineNitroPlugin((nitroApp) => {
3968
4318
  {
3969
4319
  return;
3970
4320
  }
3971
4321
  });
3972
4322
 
3973
- const _DyMRzPH15AoEzH6bcFlYsDJQ8vPhi_NfbZ4pC9DNfyI = defineNitroPlugin((nitroApp) => {
4323
+ const _17wfgbidit_XwRLLW6jOTCpHHhL0IVyMYd6hC8p2ve8 = defineNitroPlugin((nitroApp) => {
3974
4324
  nitroApp.hooks.hook("render:response", (response, { event }) => {
3975
4325
  const rules = resolveSecurityRules(event);
3976
4326
  if (rules.enabled && rules.headers) {
@@ -3993,7 +4343,7 @@ const _DyMRzPH15AoEzH6bcFlYsDJQ8vPhi_NfbZ4pC9DNfyI = defineNitroPlugin((nitroApp
3993
4343
  });
3994
4344
  });
3995
4345
 
3996
- const _tZXTnUnKl_u8d0rfkkU0LQbiR3UDjJkyevkUpuPgMg = defineNitroPlugin((nitroApp) => {
4346
+ const _yUAn94jpUGoVq7_CVAFEN2XJYVARLEmPZsHDs6AYpDI = defineNitroPlugin((nitroApp) => {
3997
4347
  nitroApp.hooks.hook("beforeResponse", (event) => {
3998
4348
  const rules = resolveSecurityRules(event);
3999
4349
  if (rules.enabled && rules.hidePoweredBy && !event.node.res.headersSent) {
@@ -4002,7 +4352,7 @@ const _tZXTnUnKl_u8d0rfkkU0LQbiR3UDjJkyevkUpuPgMg = defineNitroPlugin((nitroApp)
4002
4352
  });
4003
4353
  });
4004
4354
 
4005
- const _KIUo4nid7mjU4TFOv7ese0pfkfn6j2t89IVe_tmybyI = defineNitroPlugin(async (nitroApp) => {
4355
+ const _E33fyVSYcixGATPXDL9sKAyq3caNnkkPFWNIqgq8uE0 = defineNitroPlugin(async (nitroApp) => {
4006
4356
  {
4007
4357
  const prerenderedHeaders = await useStorage("assets:nuxt-security").getItem("headers.json") || {};
4008
4358
  nitroApp.hooks.hook("beforeResponse", (event) => {
@@ -4018,24 +4368,113 @@ const _KIUo4nid7mjU4TFOv7ese0pfkfn6j2t89IVe_tmybyI = defineNitroPlugin(async (ni
4018
4368
  });
4019
4369
 
4020
4370
  const plugins = [
4021
- _4xtY69JUQXVdqRY6G89AKPM78rluyxVyS_yCYbfwz2o,
4022
- _pDqMicud8w2L89lzf1a9cCdBCR0n8g2d_dBPQkdnw4,
4023
- _vFyUmRhrsoPWtOg8n3nI006gpGkcTXipKwGkXHyIU,
4024
- _nKKxaY6ZRQkkFJTIQmxAWxLrMtbMy3btfvk8OLgqAc8,
4371
+ _BUwpELsyks45lroxlJ7pWDnbGcceJZF9mVl7VPNuPm4,
4372
+ __pERcNNWV1OaEgG7uvohNfb6mvznh4KNsVmRCE4aV0,
4373
+ _Z5botqEqNb56svWtJhyEDnS6Z4dk8BSBwZjYp1KssfI,
4374
+ __N1t3ZNCULqwSjGoVUR2rCd_NNid2x4qNEWZGlFs8vY,
4025
4375
  _aS6mRx7bj_kthWDco8VHtcEWB9RO7OaYZ7jDuJ2mlM,
4026
4376
  _7V99JalBsmMpJ4Im6qwrWJC2toR4GkZuF5sU0ekK6TU,
4027
4377
  _gLOeqSTdYtSmvm3NLY8ox1LOh6DY4GgpRaz2D6f9XU,
4028
- _JvOSxtiYN5RhTtiWK4gP6Qxjgh3Y8HYwNigx1wgQzE0,
4029
- _tbxOaQl1Y3WSOzpNJdiujwdTtkhHlEhGs2foVq53CE,
4030
- _RQgJM5yHb0OFbqso6l7JH4lwg1WlOglzD4emxnWL9BA,
4031
- _XhOSEDieM4_mfBI7ZVt8bJwMIqkowHxufWk5iOPyG8w,
4032
- __heuFDCfzogUascLWMufI8GCNumZnqILn2FdJjW9SX4,
4033
- _aHJVv3EIEUN9vB3SE4vOkiDLzGiGhyqj6au1QIwWx8,
4034
- _DyMRzPH15AoEzH6bcFlYsDJQ8vPhi_NfbZ4pC9DNfyI,
4035
- _tZXTnUnKl_u8d0rfkkU0LQbiR3UDjJkyevkUpuPgMg,
4036
- _KIUo4nid7mjU4TFOv7ese0pfkfn6j2t89IVe_tmybyI
4378
+ _bhMjw8GUQRBOh08y1gcApVwqgcuV_Ay88JuONtrFNE,
4379
+ _LUEXAZKBV0ePPfOhSg_6JUQdyilTeQaim2YKwW8,
4380
+ _UcTOs1Ung7KfBGkFiid8OwKa_mCxxlEiLE15hP_nP8,
4381
+ _1TnoulbyNEjnKeM7ID2u9Jhxymh2c_eJ0gaouLjpOLU,
4382
+ _s9a6UFtdhxzyAoNtC707kPxVxb8AnaIv7TbZuBq97cA,
4383
+ _66aEGGOeNtcExwcSeAGysofsErgxIFLzvow0B4F5FtQ,
4384
+ _17wfgbidit_XwRLLW6jOTCpHHhL0IVyMYd6hC8p2ve8,
4385
+ _yUAn94jpUGoVq7_CVAFEN2XJYVARLEmPZsHDs6AYpDI,
4386
+ _E33fyVSYcixGATPXDL9sKAyq3caNnkkPFWNIqgq8uE0
4037
4387
  ];
4038
4388
 
4389
+ const assets = {};
4390
+
4391
+ function readAsset (id) {
4392
+ const serverDir = dirname$1(fileURLToPath(globalThis._importMeta_.url));
4393
+ return promises.readFile(resolve$2(serverDir, assets[id].path))
4394
+ }
4395
+
4396
+ const publicAssetBases = {"/_nuxt/builds/meta/":{"maxAge":31536000},"/_nuxt/builds/":{"maxAge":1},"/_fonts/":{"maxAge":31536000},"/_scripts/":{"maxAge":31536000}};
4397
+
4398
+ function isPublicAssetURL(id = '') {
4399
+ if (assets[id]) {
4400
+ return true
4401
+ }
4402
+ for (const base in publicAssetBases) {
4403
+ if (id.startsWith(base)) { return true }
4404
+ }
4405
+ return false
4406
+ }
4407
+
4408
+ function getAsset (id) {
4409
+ return assets[id]
4410
+ }
4411
+
4412
+ const METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
4413
+ const EncodingMap = { gzip: ".gz", br: ".br" };
4414
+ const _WLD3jp = eventHandler((event) => {
4415
+ if (event.method && !METHODS.has(event.method)) {
4416
+ return;
4417
+ }
4418
+ let id = decodePath(
4419
+ withLeadingSlash(withoutTrailingSlash(parseURL(event.path).pathname))
4420
+ );
4421
+ let asset;
4422
+ const encodingHeader = String(
4423
+ getRequestHeader(event, "accept-encoding") || ""
4424
+ );
4425
+ const encodings = [
4426
+ ...encodingHeader.split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(),
4427
+ ""
4428
+ ];
4429
+ if (encodings.length > 1) {
4430
+ appendResponseHeader(event, "Vary", "Accept-Encoding");
4431
+ }
4432
+ for (const encoding of encodings) {
4433
+ for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
4434
+ const _asset = getAsset(_id);
4435
+ if (_asset) {
4436
+ asset = _asset;
4437
+ id = _id;
4438
+ break;
4439
+ }
4440
+ }
4441
+ }
4442
+ if (!asset) {
4443
+ if (isPublicAssetURL(id)) {
4444
+ removeResponseHeader(event, "Cache-Control");
4445
+ throw createError({ statusCode: 404 });
4446
+ }
4447
+ return;
4448
+ }
4449
+ const ifNotMatch = getRequestHeader(event, "if-none-match") === asset.etag;
4450
+ if (ifNotMatch) {
4451
+ setResponseStatus(event, 304, "Not Modified");
4452
+ return "";
4453
+ }
4454
+ const ifModifiedSinceH = getRequestHeader(event, "if-modified-since");
4455
+ const mtimeDate = new Date(asset.mtime);
4456
+ if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
4457
+ setResponseStatus(event, 304, "Not Modified");
4458
+ return "";
4459
+ }
4460
+ if (asset.type && !getResponseHeader(event, "Content-Type")) {
4461
+ setResponseHeader(event, "Content-Type", asset.type);
4462
+ }
4463
+ if (asset.etag && !getResponseHeader(event, "ETag")) {
4464
+ setResponseHeader(event, "ETag", asset.etag);
4465
+ }
4466
+ if (asset.mtime && !getResponseHeader(event, "Last-Modified")) {
4467
+ setResponseHeader(event, "Last-Modified", mtimeDate.toUTCString());
4468
+ }
4469
+ if (asset.encoding && !getResponseHeader(event, "Content-Encoding")) {
4470
+ setResponseHeader(event, "Content-Encoding", asset.encoding);
4471
+ }
4472
+ if (asset.size > 0 && !getResponseHeader(event, "Content-Length")) {
4473
+ setResponseHeader(event, "Content-Length", asset.size);
4474
+ }
4475
+ return readAsset(id);
4476
+ });
4477
+
4039
4478
  const defaultThrowErrorValue = { throwError: true };
4040
4479
  const defaultSecurityConfig = (serverlUrl, strict) => {
4041
4480
  const defaultConfig = {
@@ -4128,7 +4567,7 @@ const defaultSecurityConfig = (serverlUrl, strict) => {
4128
4567
 
4129
4568
  const FILE_UPLOAD_HEADER = "multipart/form-data";
4130
4569
  const defaultSizeLimiter = defaultSecurityConfig("").requestSizeLimiter;
4131
- const _nGzU2E = defineEventHandler((event) => {
4570
+ const _Jp0StA = defineEventHandler((event) => {
4132
4571
  const rules = resolveSecurityRules(event);
4133
4572
  if (rules.enabled && rules.requestSizeLimiter) {
4134
4573
  const requestSizeLimiter = defu(
@@ -4154,7 +4593,7 @@ const _nGzU2E = defineEventHandler((event) => {
4154
4593
  }
4155
4594
  });
4156
4595
 
4157
- const _DBwtAP = defineEventHandler((event) => {
4596
+ const _ji0G_c = defineEventHandler((event) => {
4158
4597
  const rules = resolveSecurityRules(event);
4159
4598
  if (rules.enabled && rules.corsHandler) {
4160
4599
  const { corsHandler } = rules;
@@ -4179,7 +4618,7 @@ const _DBwtAP = defineEventHandler((event) => {
4179
4618
  }
4180
4619
  });
4181
4620
 
4182
- const _a3BfBQ = defineEventHandler((event) => {
4621
+ const _SCmHem = defineEventHandler((event) => {
4183
4622
  const rules = resolveSecurityRules(event);
4184
4623
  if (rules.enabled && rules.allowedMethodsRestricter) {
4185
4624
  const { allowedMethodsRestricter } = rules;
@@ -4199,7 +4638,7 @@ const _a3BfBQ = defineEventHandler((event) => {
4199
4638
 
4200
4639
  const storage = useStorage("#rate-limiter-storage");
4201
4640
  const defaultRateLimiter = defaultSecurityConfig("").rateLimiter;
4202
- const _4fQwYD = defineEventHandler(async (event) => {
4641
+ const _umXuS0 = defineEventHandler(async (event) => {
4203
4642
  const rules = resolveSecurityRules(event);
4204
4643
  const route = resolveSecurityRoute(event);
4205
4644
  if (rules.enabled && rules.rateLimiter) {
@@ -4262,7 +4701,7 @@ function getIP(event) {
4262
4701
  return ip;
4263
4702
  }
4264
4703
 
4265
- const _DJziEh = defineEventHandler(async (event) => {
4704
+ const _dtrJEZ = defineEventHandler(async (event) => {
4266
4705
  const rules = resolveSecurityRules(event);
4267
4706
  if (rules.enabled && rules.xssValidator) {
4268
4707
  const filterOpt = {
@@ -4306,7 +4745,7 @@ const _DJziEh = defineEventHandler(async (event) => {
4306
4745
 
4307
4746
  const warnOnceSet = /* @__PURE__ */ new Set();
4308
4747
  const DEFAULT_ENDPOINT = "https://api.iconify.design";
4309
- const _iea_TL = defineCachedEventHandler(async (event) => {
4748
+ const _Vmc_bU = defineCachedEventHandler(async (event) => {
4310
4749
  const url = getRequestURL(event);
4311
4750
  if (!url)
4312
4751
  return createError({ status: 400, message: "Invalid icon request" });
@@ -4454,7 +4893,7 @@ const _ZwvYdn = defineEventHandler(async (event) => {
4454
4893
  }
4455
4894
  });
4456
4895
 
4457
- const _2TCn_1 = defineEventHandler(async (e) => {
4896
+ const _XVpHng = eventHandler(async (e) => {
4458
4897
  if (e.context._initedSiteConfig)
4459
4898
  return;
4460
4899
  const runtimeConfig = useRuntimeConfig(e);
@@ -4506,7 +4945,7 @@ const _2TCn_1 = defineEventHandler(async (e) => {
4506
4945
  e.context._initedSiteConfig = true;
4507
4946
  });
4508
4947
 
4509
- const _ORf4yf = defineEventHandler(async (e) => {
4948
+ const _LgdZze = eventHandler(async (e) => {
4510
4949
  const siteConfig = useSiteConfig(e);
4511
4950
  const nitroOrigin = useNitroOrigin(e);
4512
4951
  const runtimeConfig = useRuntimeConfig(e);
@@ -4520,10 +4959,10 @@ const _ORf4yf = defineEventHandler(async (e) => {
4520
4959
  };
4521
4960
  });
4522
4961
 
4523
- const _0QOObO = defineEventHandler(async (e) => {
4524
- const nitro = useNitroApp();
4962
+ const _uMK4YT = defineEventHandler(async (e) => {
4963
+ const nitroApp = useNitroApp();
4525
4964
  const { indexable, hints } = getSiteRobotConfig(e);
4526
- const { credits, isNuxtContentV2, cacheControl } = useRuntimeConfig(e)["nuxt-robots"];
4965
+ const { credits, isNuxtContentV2, cacheControl } = useRuntimeConfigNuxtRobots(e);
4527
4966
  let robotsTxtCtx = {
4528
4967
  sitemaps: [],
4529
4968
  groups: [
@@ -4575,14 +5014,14 @@ const _0QOObO = defineEventHandler(async (e) => {
4575
5014
  setHeader(e, "Content-Type", "text/plain; charset=utf-8");
4576
5015
  setHeader(e, "Cache-Control", "no-store" );
4577
5016
  const hookCtx = { robotsTxt, e };
4578
- await nitro.hooks.callHook("robots:robots-txt", hookCtx);
5017
+ await nitroApp.hooks.callHook("robots:robots-txt", hookCtx);
4579
5018
  return hookCtx.robotsTxt;
4580
5019
  });
4581
5020
 
4582
- const _2nM3bx = defineEventHandler(async (e) => {
5021
+ const _XpKgU4 = defineEventHandler(async (e) => {
4583
5022
  if (e.path === "/robots.txt" || e.path.startsWith("/__") || e.path.startsWith("/api") || e.path.startsWith("/_nuxt"))
4584
5023
  return;
4585
- const nuxtRobotsConfig = useRuntimeConfig(e)["nuxt-robots"];
5024
+ const nuxtRobotsConfig = useRuntimeConfigNuxtRobots(e);
4586
5025
  if (nuxtRobotsConfig) {
4587
5026
  const { header } = nuxtRobotsConfig;
4588
5027
  const robotConfig = getPathRobotConfig(e, { skipSiteIndexable: Boolean(getQuery$1(e)?.mockProductionEnv) });
@@ -4593,8 +5032,8 @@ const _2nM3bx = defineEventHandler(async (e) => {
4593
5032
  }
4594
5033
  });
4595
5034
 
4596
- const _4v3OAr = defineEventHandler(async (e) => {
4597
- const runtimeConfig = useRuntimeConfig(e)["nuxt-robots"];
5035
+ const _WlQo7G = defineEventHandler(async (e) => {
5036
+ const runtimeConfig = useRuntimeConfigNuxtRobots(e);
4598
5037
  const { indexable, hints } = getSiteRobotConfig(e);
4599
5038
  const siteConfig = useSiteConfig(e);
4600
5039
  const robotsTxt = await e.$fetch("/robots.txt", {
@@ -4613,14 +5052,14 @@ const _4v3OAr = defineEventHandler(async (e) => {
4613
5052
  };
4614
5053
  });
4615
5054
 
4616
- const _QTLJrY = defineEventHandler(async (e) => {
5055
+ const _MyEbKg = defineEventHandler(async (e) => {
4617
5056
  const query = getQuery$1(e);
4618
5057
  const path = query.path;
4619
5058
  delete query.path;
4620
5059
  const res = await $fetch.raw(withQuery(path, query));
4621
5060
  const html = res._data;
4622
5061
  const robotsHeader = String(res.headers.get("x-robots-tag"));
4623
- const robotsMeta = html.match(/<meta[^>]+name=["']robots["'][^>]+content=["']([^"']+)["'](?:[^>]+data-hint=["']([^"']+)["'])?[^>]*>/i);
5062
+ const robotsMeta = String(html).match(/<meta[^>]+name=["']robots["'][^>]+content=["']([^"']+)["'](?:[^>]+data-hint=["']([^"']+)["'])?[^>]*>/i);
4624
5063
  const [, robotsContent = null, robotsHint = null] = robotsMeta || [];
4625
5064
  const [source, line] = robotsHint ? robotsHint.split(",") : [null, null];
4626
5065
  return {
@@ -4637,7 +5076,7 @@ const _QTLJrY = defineEventHandler(async (e) => {
4637
5076
  };
4638
5077
  });
4639
5078
 
4640
- const _CkQE1q = defineEventHandler(async (e) => {
5079
+ const _fUzllO = defineEventHandler(async (e) => {
4641
5080
  const collections = [];
4642
5081
  for (const collection in contentManifest) {
4643
5082
  if (contentManifest[collection].fields.sitemap) {
@@ -4646,7 +5085,9 @@ const _CkQE1q = defineEventHandler(async (e) => {
4646
5085
  }
4647
5086
  const contentList = [];
4648
5087
  for (const collection of collections) {
4649
- contentList.push(queryCollectionWithEvent(e, collection).select("path", "sitemap").where("path", "IS NOT NULL").where("sitemap", "IS NOT NULL").all());
5088
+ contentList.push(
5089
+ queryCollection(e, collection).select("path", "sitemap").where("path", "IS NOT NULL").where("sitemap", "IS NOT NULL").all()
5090
+ );
4650
5091
  }
4651
5092
  const results = await Promise.all(contentList);
4652
5093
  return results.flatMap((c) => {
@@ -4668,12 +5109,20 @@ const merger$1 = createDefu((obj, key, value) => {
4668
5109
  return obj[key];
4669
5110
  });
4670
5111
  function mergeOnKey$1(arr, key) {
4671
- const res = {};
4672
- arr.forEach((item) => {
5112
+ const seen = /* @__PURE__ */ new Map();
5113
+ let resultLength = 0;
5114
+ const result = Array.from({ length: arr.length });
5115
+ for (const item of arr) {
4673
5116
  const k = item[key];
4674
- res[k] = merger$1(item, res[k] || {});
4675
- });
4676
- return Object.values(res);
5117
+ if (seen.has(k)) {
5118
+ const existingIndex = seen.get(k);
5119
+ result[existingIndex] = merger$1(item, result[existingIndex]);
5120
+ } else {
5121
+ seen.set(k, resultLength);
5122
+ result[resultLength++] = item;
5123
+ }
5124
+ }
5125
+ return result.slice(0, resultLength);
4677
5126
  }
4678
5127
  function splitForLocales(path, locales) {
4679
5128
  const prefix = withLeadingSlash(path).split("/")[1];
@@ -4731,6 +5180,9 @@ function createFilter(options = {}) {
4731
5180
  };
4732
5181
  }
4733
5182
 
5183
+ function xmlEscape(str) {
5184
+ return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
5185
+ }
4734
5186
  function useSitemapRuntimeConfig(e) {
4735
5187
  const clone = JSON.parse(JSON.stringify(useRuntimeConfig(e).sitemap));
4736
5188
  for (const k in clone.sitemaps) {
@@ -4742,111 +5194,432 @@ function useSitemapRuntimeConfig(e) {
4742
5194
  return Object.freeze(clone);
4743
5195
  }
4744
5196
 
4745
- function extractSitemapXML(xml) {
4746
- const urls = xml.match(/<url>[\s\S]*?<\/url>/g) || [];
4747
- return urls.map((url) => {
4748
- const loc = url.match(/<loc>([^<]+)<\/loc>/)?.[1];
4749
- if (!loc) return null;
4750
- const lastmod = url.match(/<lastmod>([^<]+)<\/lastmod>/)?.[1];
4751
- const changefreq = url.match(/<changefreq>([^<]+)<\/changefreq>/)?.[1];
4752
- const priority = url.match(/<priority>([^<]+)<\/priority>/) ? Number.parseFloat(url.match(/<priority>([^<]+)<\/priority>/)[1]) : void 0;
4753
- const images = (url.match(/<image:image>[\s\S]*?<\/image:image>/g) || []).map((image) => {
4754
- const imageLoc = image.match(/<image:loc>([^<]+)<\/image:loc>/)?.[1];
4755
- return imageLoc ? { loc: imageLoc } : null;
4756
- }).filter(Boolean);
4757
- const videos = (url.match(/<video:video>[\s\S]*?<\/video:video>/g) || []).map((video) => {
4758
- const videoObj = {};
4759
- const title = video.match(/<video:title>([^<]+)<\/video:title>/)?.[1];
4760
- const thumbnail_loc = video.match(/<video:thumbnail_loc>([^<]+)<\/video:thumbnail_loc>/)?.[1];
4761
- const description = video.match(/<video:description>([^<]+)<\/video:description>/)?.[1];
4762
- const content_loc = video.match(/<video:content_loc>([^<]+)<\/video:content_loc>/)?.[1];
4763
- if (!title || !thumbnail_loc || !description || !content_loc) return null;
4764
- videoObj.title = title;
4765
- videoObj.thumbnail_loc = thumbnail_loc;
4766
- videoObj.description = description;
4767
- videoObj.content_loc = content_loc;
4768
- const player_loc = video.match(/<video:player_loc>([^<]+)<\/video:player_loc>/)?.[1];
4769
- if (player_loc) videoObj.player_loc = player_loc;
4770
- const duration = video.match(/<video:duration>([^<]+)<\/video:duration>/) ? Number.parseInt(video.match(/<video:duration>([^<]+)<\/video:duration>/)[1], 10) : void 0;
4771
- if (duration) videoObj.duration = duration;
4772
- const expiration_date = video.match(/<video:expiration_date>([^<]+)<\/video:expiration_date>/)?.[1];
4773
- if (expiration_date) videoObj.expiration_date = expiration_date;
4774
- const rating = video.match(/<video:rating>([^<]+)<\/video:rating>/) ? Number.parseFloat(video.match(/<video:rating>([^<]+)<\/video:rating>/)[1]) : void 0;
4775
- if (rating) videoObj.rating = rating;
4776
- const view_count = video.match(/<video:view_count>([^<]+)<\/video:view_count>/) ? Number.parseInt(video.match(/<video:view_count>([^<]+)<\/video:view_count>/)[1], 10) : void 0;
4777
- if (view_count) videoObj.view_count = view_count;
4778
- const publication_date = video.match(/<video:publication_date>([^<]+)<\/video:publication_date>/)?.[1];
4779
- if (publication_date) videoObj.publication_date = publication_date;
4780
- const family_friendly = video.match(/<video:family_friendly>([^<]+)<\/video:family_friendly>/)?.[1];
4781
- if (family_friendly) videoObj.family_friendly = family_friendly;
4782
- const restriction = video.match(/<video:restriction relationship="([^"]+)">([^<]+)<\/video:restriction>/);
4783
- if (restriction) videoObj.restriction = { relationship: restriction[1], restriction: restriction[2] };
4784
- const platform = video.match(/<video:platform relationship="([^"]+)">([^<]+)<\/video:platform>/);
4785
- if (platform) videoObj.platform = { relationship: platform[1], platform: platform[2] };
4786
- const price = (video.match(/<video:price [^>]+>([^<]+)<\/video:price>/g) || []).map((price2) => {
4787
- const priceValue = price2.match(/<video:price [^>]+>([^<]+)<\/video:price>/)?.[1];
4788
- const currency = price2.match(/currency="([^"]+)"/)?.[1];
4789
- const type = price2.match(/type="([^"]+)"/)?.[1];
4790
- return priceValue ? { price: priceValue, currency, type } : null;
4791
- }).filter(Boolean);
4792
- if (price.length) videoObj.price = price;
4793
- const requires_subscription = video.match(/<video:requires_subscription>([^<]+)<\/video:requires_subscription>/)?.[1];
4794
- if (requires_subscription) videoObj.requires_subscription = requires_subscription;
4795
- const uploader = video.match(/<video:uploader info="([^"]+)">([^<]+)<\/video:uploader>/);
4796
- if (uploader) videoObj.uploader = { uploader: uploader[2], info: uploader[1] };
4797
- const live = video.match(/<video:live>([^<]+)<\/video:live>/)?.[1];
4798
- if (live) videoObj.live = live;
4799
- const tag = (video.match(/<video:tag>([^<]+)<\/video:tag>/g) || []).map((tag2) => tag2.match(/<video:tag>([^<]+)<\/video:tag>/)?.[1]).filter(Boolean);
4800
- if (tag.length) videoObj.tag = tag;
5197
+ function isValidString(value) {
5198
+ return typeof value === "string" && value.trim().length > 0;
5199
+ }
5200
+ function parseNumber(value) {
5201
+ if (typeof value === "number") return value;
5202
+ if (typeof value === "string" && value.trim()) {
5203
+ const num = Number.parseFloat(value.trim());
5204
+ return Number.isNaN(num) ? void 0 : num;
5205
+ }
5206
+ return void 0;
5207
+ }
5208
+ function parseInteger(value) {
5209
+ if (typeof value === "number") return Math.floor(value);
5210
+ if (typeof value === "string" && value.trim()) {
5211
+ const num = Number.parseInt(value.trim(), 10);
5212
+ return Number.isNaN(num) ? void 0 : num;
5213
+ }
5214
+ return void 0;
5215
+ }
5216
+ function extractUrlFromParsedElement(urlElement, warnings) {
5217
+ if (!isValidString(urlElement.loc)) {
5218
+ warnings.push({
5219
+ type: "validation",
5220
+ message: "URL entry missing required loc element",
5221
+ context: { url: String(urlElement.loc || "undefined") }
5222
+ });
5223
+ return null;
5224
+ }
5225
+ const urlObj = { loc: urlElement.loc };
5226
+ if (isValidString(urlElement.lastmod)) {
5227
+ urlObj.lastmod = urlElement.lastmod;
5228
+ }
5229
+ if (isValidString(urlElement.changefreq)) {
5230
+ const validFreqs = ["always", "hourly", "daily", "weekly", "monthly", "yearly", "never"];
5231
+ if (validFreqs.includes(urlElement.changefreq)) {
5232
+ urlObj.changefreq = urlElement.changefreq;
5233
+ } else {
5234
+ warnings.push({
5235
+ type: "validation",
5236
+ message: "Invalid changefreq value",
5237
+ context: { url: urlElement.loc, field: "changefreq", value: urlElement.changefreq }
5238
+ });
5239
+ }
5240
+ }
5241
+ const priority = parseNumber(urlElement.priority);
5242
+ if (priority !== void 0 && !Number.isNaN(priority)) {
5243
+ if (priority < 0 || priority > 1) {
5244
+ warnings.push({
5245
+ type: "validation",
5246
+ message: "Priority value should be between 0.0 and 1.0, clamping to valid range",
5247
+ context: { url: urlElement.loc, field: "priority", value: priority }
5248
+ });
5249
+ }
5250
+ urlObj.priority = Math.max(0, Math.min(1, priority));
5251
+ } else if (urlElement.priority !== void 0) {
5252
+ warnings.push({
5253
+ type: "validation",
5254
+ message: "Invalid priority value",
5255
+ context: { url: urlElement.loc, field: "priority", value: urlElement.priority }
5256
+ });
5257
+ }
5258
+ if (urlElement.image) {
5259
+ const images = Array.isArray(urlElement.image) ? urlElement.image : [urlElement.image];
5260
+ const validImages = images.map((img) => {
5261
+ if (isValidString(img.loc)) {
5262
+ return { loc: img.loc };
5263
+ } else {
5264
+ warnings.push({
5265
+ type: "validation",
5266
+ message: "Image missing required loc element",
5267
+ context: { url: urlElement.loc, field: "image.loc" }
5268
+ });
5269
+ return null;
5270
+ }
5271
+ }).filter((img) => img !== null);
5272
+ if (validImages.length > 0) {
5273
+ urlObj.images = validImages;
5274
+ }
5275
+ }
5276
+ if (urlElement.video) {
5277
+ const videos = Array.isArray(urlElement.video) ? urlElement.video : [urlElement.video];
5278
+ const validVideos = videos.map((video) => {
5279
+ const missingFields = [];
5280
+ if (!isValidString(video.title)) missingFields.push("title");
5281
+ if (!isValidString(video.thumbnail_loc)) missingFields.push("thumbnail_loc");
5282
+ if (!isValidString(video.description)) missingFields.push("description");
5283
+ if (!isValidString(video.content_loc)) missingFields.push("content_loc");
5284
+ if (missingFields.length > 0) {
5285
+ warnings.push({
5286
+ type: "validation",
5287
+ message: `Video missing required fields: ${missingFields.join(", ")}`,
5288
+ context: { url: urlElement.loc, field: "video" }
5289
+ });
5290
+ return null;
5291
+ }
5292
+ const videoObj = {
5293
+ title: video.title,
5294
+ thumbnail_loc: video.thumbnail_loc,
5295
+ description: video.description,
5296
+ content_loc: video.content_loc
5297
+ };
5298
+ if (isValidString(video.player_loc)) {
5299
+ videoObj.player_loc = video.player_loc;
5300
+ }
5301
+ const duration = parseInteger(video.duration);
5302
+ if (duration !== void 0) {
5303
+ videoObj.duration = duration;
5304
+ } else if (video.duration !== void 0) {
5305
+ warnings.push({
5306
+ type: "validation",
5307
+ message: "Invalid video duration value",
5308
+ context: { url: urlElement.loc, field: "video.duration", value: video.duration }
5309
+ });
5310
+ }
5311
+ if (isValidString(video.expiration_date)) {
5312
+ videoObj.expiration_date = video.expiration_date;
5313
+ }
5314
+ const rating = parseNumber(video.rating);
5315
+ if (rating !== void 0) {
5316
+ if (rating < 0 || rating > 5) {
5317
+ warnings.push({
5318
+ type: "validation",
5319
+ message: "Video rating should be between 0.0 and 5.0",
5320
+ context: { url: urlElement.loc, field: "video.rating", value: rating }
5321
+ });
5322
+ }
5323
+ videoObj.rating = rating;
5324
+ } else if (video.rating !== void 0) {
5325
+ warnings.push({
5326
+ type: "validation",
5327
+ message: "Invalid video rating value",
5328
+ context: { url: urlElement.loc, field: "video.rating", value: video.rating }
5329
+ });
5330
+ }
5331
+ const viewCount = parseInteger(video.view_count);
5332
+ if (viewCount !== void 0) {
5333
+ videoObj.view_count = viewCount;
5334
+ } else if (video.view_count !== void 0) {
5335
+ warnings.push({
5336
+ type: "validation",
5337
+ message: "Invalid video view_count value",
5338
+ context: { url: urlElement.loc, field: "video.view_count", value: video.view_count }
5339
+ });
5340
+ }
5341
+ if (isValidString(video.publication_date)) {
5342
+ videoObj.publication_date = video.publication_date;
5343
+ }
5344
+ if (isValidString(video.family_friendly)) {
5345
+ const validValues = ["yes", "no"];
5346
+ if (validValues.includes(video.family_friendly)) {
5347
+ videoObj.family_friendly = video.family_friendly;
5348
+ } else {
5349
+ warnings.push({
5350
+ type: "validation",
5351
+ message: 'Invalid video family_friendly value, should be "yes" or "no"',
5352
+ context: { url: urlElement.loc, field: "video.family_friendly", value: video.family_friendly }
5353
+ });
5354
+ }
5355
+ }
5356
+ if (isValidString(video.requires_subscription)) {
5357
+ const validValues = ["yes", "no"];
5358
+ if (validValues.includes(video.requires_subscription)) {
5359
+ videoObj.requires_subscription = video.requires_subscription;
5360
+ } else {
5361
+ warnings.push({
5362
+ type: "validation",
5363
+ message: 'Invalid video requires_subscription value, should be "yes" or "no"',
5364
+ context: { url: urlElement.loc, field: "video.requires_subscription", value: video.requires_subscription }
5365
+ });
5366
+ }
5367
+ }
5368
+ if (isValidString(video.live)) {
5369
+ const validValues = ["yes", "no"];
5370
+ if (validValues.includes(video.live)) {
5371
+ videoObj.live = video.live;
5372
+ } else {
5373
+ warnings.push({
5374
+ type: "validation",
5375
+ message: 'Invalid video live value, should be "yes" or "no"',
5376
+ context: { url: urlElement.loc, field: "video.live", value: video.live }
5377
+ });
5378
+ }
5379
+ }
5380
+ if (video.restriction && typeof video.restriction === "object") {
5381
+ const restriction = video.restriction;
5382
+ if (isValidString(restriction.relationship) && isValidString(restriction["#text"])) {
5383
+ const validRelationships = ["allow", "deny"];
5384
+ if (validRelationships.includes(restriction.relationship)) {
5385
+ videoObj.restriction = {
5386
+ relationship: restriction.relationship,
5387
+ restriction: restriction["#text"]
5388
+ };
5389
+ } else {
5390
+ warnings.push({
5391
+ type: "validation",
5392
+ message: 'Invalid video restriction relationship, should be "allow" or "deny"',
5393
+ context: { url: urlElement.loc, field: "video.restriction.relationship", value: restriction.relationship }
5394
+ });
5395
+ }
5396
+ }
5397
+ }
5398
+ if (video.platform && typeof video.platform === "object") {
5399
+ const platform = video.platform;
5400
+ if (isValidString(platform.relationship) && isValidString(platform["#text"])) {
5401
+ const validRelationships = ["allow", "deny"];
5402
+ if (validRelationships.includes(platform.relationship)) {
5403
+ videoObj.platform = {
5404
+ relationship: platform.relationship,
5405
+ platform: platform["#text"]
5406
+ };
5407
+ } else {
5408
+ warnings.push({
5409
+ type: "validation",
5410
+ message: 'Invalid video platform relationship, should be "allow" or "deny"',
5411
+ context: { url: urlElement.loc, field: "video.platform.relationship", value: platform.relationship }
5412
+ });
5413
+ }
5414
+ }
5415
+ }
5416
+ if (video.price) {
5417
+ const prices = Array.isArray(video.price) ? video.price : [video.price];
5418
+ const validPrices = prices.map((price) => {
5419
+ const priceValue = price["#text"];
5420
+ if (priceValue == null || typeof priceValue !== "string" && typeof priceValue !== "number") {
5421
+ warnings.push({
5422
+ type: "validation",
5423
+ message: "Video price missing value",
5424
+ context: { url: urlElement.loc, field: "video.price" }
5425
+ });
5426
+ return null;
5427
+ }
5428
+ const validTypes = ["rent", "purchase", "package", "subscription"];
5429
+ if (price.type && !validTypes.includes(price.type)) {
5430
+ warnings.push({
5431
+ type: "validation",
5432
+ message: `Invalid video price type "${price.type}", should be one of: ${validTypes.join(", ")}`,
5433
+ context: { url: urlElement.loc, field: "video.price.type", value: price.type }
5434
+ });
5435
+ }
5436
+ return {
5437
+ price: String(priceValue),
5438
+ currency: price.currency,
5439
+ type: price.type
5440
+ };
5441
+ }).filter((p) => p !== null);
5442
+ if (validPrices.length > 0) {
5443
+ videoObj.price = validPrices;
5444
+ }
5445
+ }
5446
+ if (video.uploader && typeof video.uploader === "object") {
5447
+ const uploader = video.uploader;
5448
+ if (isValidString(uploader.info) && isValidString(uploader["#text"])) {
5449
+ videoObj.uploader = {
5450
+ uploader: uploader["#text"],
5451
+ info: uploader.info
5452
+ };
5453
+ } else {
5454
+ warnings.push({
5455
+ type: "validation",
5456
+ message: "Video uploader missing required info or name",
5457
+ context: { url: urlElement.loc, field: "video.uploader" }
5458
+ });
5459
+ }
5460
+ }
5461
+ if (video.tag) {
5462
+ const tags = Array.isArray(video.tag) ? video.tag : [video.tag];
5463
+ const validTags = tags.filter(isValidString);
5464
+ if (validTags.length > 0) {
5465
+ videoObj.tag = validTags;
5466
+ }
5467
+ }
4801
5468
  return videoObj;
4802
- }).filter(Boolean);
4803
- const alternatives = (url.match(/<xhtml:link[\s\S]*?\/>/g) || []).map((link) => {
4804
- const hreflang = link.match(/hreflang="([^"]+)"/)?.[1];
4805
- const href = link.match(/href="([^"]+)"/)?.[1];
4806
- return hreflang && href ? { hreflang, href } : null;
4807
- }).filter(Boolean);
4808
- const news = url.match(/<news:news>[\s\S]*?<\/news:news>/) ? {
4809
- title: url.match(/<news:title>([^<]+)<\/news:title>/)?.[1],
4810
- publication_date: url.match(/<news:publication_date>([^<]+)<\/news:publication_date>/)?.[1],
4811
- publication: {
4812
- name: url.match(/<news:name>([^<]+)<\/news:name>/)?.[1],
4813
- language: url.match(/<news:language>([^<]+)<\/news:language>/)?.[1]
4814
- }
4815
- } : void 0;
4816
- const urlObj = { loc, lastmod, changefreq, priority, images, videos, alternatives, news };
4817
- return Object.fromEntries(Object.entries(urlObj).filter(([_, v]) => v != null && v.length !== 0));
4818
- }).filter(Boolean);
5469
+ }).filter((video) => video !== null);
5470
+ if (validVideos.length > 0) {
5471
+ urlObj.videos = validVideos;
5472
+ }
5473
+ }
5474
+ if (urlElement.link) {
5475
+ const links = Array.isArray(urlElement.link) ? urlElement.link : [urlElement.link];
5476
+ const alternatives = links.map((link) => {
5477
+ if (link.rel === "alternate" && isValidString(link.hreflang) && isValidString(link.href)) {
5478
+ return {
5479
+ hreflang: link.hreflang,
5480
+ href: link.href
5481
+ };
5482
+ } else {
5483
+ warnings.push({
5484
+ type: "validation",
5485
+ message: 'Alternative link missing required rel="alternate", hreflang, or href',
5486
+ context: { url: urlElement.loc, field: "link" }
5487
+ });
5488
+ return null;
5489
+ }
5490
+ }).filter((alt) => alt !== null);
5491
+ if (alternatives.length > 0) {
5492
+ urlObj.alternatives = alternatives;
5493
+ }
5494
+ }
5495
+ if (urlElement.news && typeof urlElement.news === "object") {
5496
+ const news = urlElement.news;
5497
+ if (isValidString(news.title) && isValidString(news.publication_date) && news.publication && isValidString(news.publication.name) && isValidString(news.publication.language)) {
5498
+ urlObj.news = {
5499
+ title: news.title,
5500
+ publication_date: news.publication_date,
5501
+ publication: {
5502
+ name: news.publication.name,
5503
+ language: news.publication.language
5504
+ }
5505
+ };
5506
+ } else {
5507
+ warnings.push({
5508
+ type: "validation",
5509
+ message: "News entry missing required fields (title, publication_date, publication.name, publication.language)",
5510
+ context: { url: urlElement.loc, field: "news" }
5511
+ });
5512
+ }
5513
+ }
5514
+ const filteredUrlObj = Object.fromEntries(
5515
+ Object.entries(urlObj).filter(
5516
+ ([_, value]) => value != null && (!Array.isArray(value) || value.length > 0)
5517
+ )
5518
+ );
5519
+ return filteredUrlObj;
5520
+ }
5521
+ async function parseSitemapXml(xml) {
5522
+ const warnings = [];
5523
+ if (!xml) {
5524
+ throw new Error("Empty XML input provided");
5525
+ }
5526
+ const { XMLParser } = await import('file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/fast-xml-parser@5.2.5/node_modules/fast-xml-parser/src/fxp.js');
5527
+ const parser = new XMLParser({
5528
+ isArray: (tagName) => ["url", "image", "video", "link", "tag", "price"].includes(tagName),
5529
+ removeNSPrefix: true,
5530
+ parseAttributeValue: false,
5531
+ ignoreAttributes: false,
5532
+ attributeNamePrefix: "",
5533
+ trimValues: true
5534
+ });
5535
+ try {
5536
+ const parsed = parser.parse(xml);
5537
+ if (!parsed?.urlset) {
5538
+ throw new Error("XML does not contain a valid urlset element");
5539
+ }
5540
+ if (!parsed.urlset.url) {
5541
+ throw new Error("Sitemap contains no URL entries");
5542
+ }
5543
+ const urls = Array.isArray(parsed.urlset.url) ? parsed.urlset.url : [parsed.urlset.url];
5544
+ const validUrls = urls.map((url) => extractUrlFromParsedElement(url, warnings)).filter((url) => url !== null);
5545
+ if (validUrls.length === 0 && urls.length > 0) {
5546
+ warnings.push({
5547
+ type: "validation",
5548
+ message: "No valid URLs found in sitemap after validation"
5549
+ });
5550
+ }
5551
+ return { urls: validUrls, warnings };
5552
+ } catch (error) {
5553
+ if (error instanceof Error && (error.message === "Empty XML input provided" || error.message === "XML does not contain a valid urlset element" || error.message === "Sitemap contains no URL entries")) {
5554
+ throw error;
5555
+ }
5556
+ throw new Error(`Failed to parse XML: ${error instanceof Error ? error.message : String(error)}`);
5557
+ }
4819
5558
  }
4820
5559
 
5560
+ async function tryFetchWithFallback(url, options, event) {
5561
+ const isExternalUrl = !url.startsWith("/");
5562
+ if (isExternalUrl) {
5563
+ const strategies = [
5564
+ // Strategy 1: Use globalThis.$fetch (original approach)
5565
+ () => globalThis.$fetch(url, options),
5566
+ // Strategy 2: If event is available, try using event context even for external URLs
5567
+ event ? () => event.$fetch(url, options) : null,
5568
+ // Strategy 3: Use native fetch as last resort
5569
+ () => $fetch(url, options)
5570
+ ].filter(Boolean);
5571
+ let lastError = null;
5572
+ for (const strategy of strategies) {
5573
+ try {
5574
+ return await strategy();
5575
+ } catch (error) {
5576
+ lastError = error;
5577
+ continue;
5578
+ }
5579
+ }
5580
+ throw lastError;
5581
+ }
5582
+ const fetchContainer = url.startsWith("/") && event ? event : globalThis;
5583
+ return await fetchContainer.$fetch(url, options);
5584
+ }
4821
5585
  async function fetchDataSource(input, event) {
4822
5586
  const context = typeof input.context === "string" ? { name: input.context } : input.context || { name: "fetch" };
4823
- context.tips = context.tips || [];
4824
5587
  const url = typeof input.fetch === "string" ? input.fetch : input.fetch[0];
4825
5588
  const options = typeof input.fetch === "string" ? {} : input.fetch[1];
4826
5589
  const start = Date.now();
4827
- const timeout = options.timeout || 5e3;
5590
+ const isExternalUrl = !url.startsWith("/");
5591
+ const timeout = isExternalUrl ? 1e4 : options.timeout || 5e3;
4828
5592
  const timeoutController = new AbortController();
4829
5593
  const abortRequestTimeout = setTimeout(() => timeoutController.abort(), timeout);
4830
- let isMaybeErrorResponse = false;
4831
- const isXmlRequest = parseURL(url).pathname.endsWith(".xml");
4832
- const fetchContainer = url.startsWith("/") && event ? event : globalThis;
4833
5594
  try {
4834
- const res = await fetchContainer.$fetch(url, {
5595
+ let isMaybeErrorResponse = false;
5596
+ const isXmlRequest = parseURL(url).pathname.endsWith(".xml");
5597
+ const mergedHeaders = defu$1(
5598
+ options?.headers,
5599
+ {
5600
+ Accept: isXmlRequest ? "text/xml" : "application/json"
5601
+ },
5602
+ event ? { host: getRequestHost(event, { xForwardedHost: true }) } : {}
5603
+ );
5604
+ const fetchOptions = {
4835
5605
  ...options,
4836
5606
  responseType: isXmlRequest ? "text" : "json",
4837
5607
  signal: timeoutController.signal,
4838
- headers: defu$1(options?.headers, {
4839
- Accept: isXmlRequest ? "text/xml" : "application/json"
4840
- }, event ? { host: getRequestHost(event, { xForwardedHost: true }) } : {}),
5608
+ headers: mergedHeaders,
5609
+ // Use ofetch's built-in retry for external sources
5610
+ ...isExternalUrl && {
5611
+ retry: 2,
5612
+ retryDelay: 200
5613
+ },
4841
5614
  // @ts-expect-error untyped
4842
5615
  onResponse({ response }) {
4843
5616
  if (typeof response._data === "string" && response._data.startsWith("<!DOCTYPE html>"))
4844
5617
  isMaybeErrorResponse = true;
4845
5618
  }
4846
- });
5619
+ };
5620
+ const res = await tryFetchWithFallback(url, fetchOptions, event);
4847
5621
  const timeTakenMs = Date.now() - start;
4848
5622
  if (isMaybeErrorResponse) {
4849
- context.tips.push("This is usually because the URL isn't correct or is throwing an error. Please check the URL");
4850
5623
  return {
4851
5624
  ...input,
4852
5625
  context,
@@ -4859,7 +5632,8 @@ async function fetchDataSource(input, event) {
4859
5632
  if (typeof res === "object") {
4860
5633
  urls = res.urls || res;
4861
5634
  } else if (typeof res === "string" && parseURL(url).pathname.endsWith(".xml")) {
4862
- urls = extractSitemapXML(res);
5635
+ const result = await parseSitemapXml(res);
5636
+ urls = result.urls;
4863
5637
  }
4864
5638
  return {
4865
5639
  ...input,
@@ -4869,16 +5643,26 @@ async function fetchDataSource(input, event) {
4869
5643
  };
4870
5644
  } catch (_err) {
4871
5645
  const error = _err;
4872
- if (error.message.includes("This operation was aborted"))
4873
- context.tips.push("The request has taken too long. Make sure app sources respond within 5 seconds or adjust the timeout fetch option.");
4874
- else
4875
- context.tips.push(`Response returned a status of ${error.response?.status || "unknown"}.`);
4876
- console.error("[@nuxtjs/sitemap] Failed to fetch source.", { url, error });
5646
+ if (isExternalUrl) {
5647
+ const errorInfo = {
5648
+ url,
5649
+ timeout,
5650
+ error: error.message,
5651
+ statusCode: error.response?.status,
5652
+ statusText: error.response?.statusText,
5653
+ method: options?.method || "GET"
5654
+ };
5655
+ logger.error("Failed to fetch external source.", errorInfo);
5656
+ } else {
5657
+ logger.error("Failed to fetch source.", { url, error: error.message });
5658
+ }
4877
5659
  return {
4878
5660
  ...input,
4879
5661
  context,
4880
5662
  urls: [],
4881
- error: error.message
5663
+ error: error.message,
5664
+ _isFailure: true
5665
+ // Mark as failure to prevent caching
4882
5666
  };
4883
5667
  } finally {
4884
5668
  if (abortRequestTimeout) {
@@ -4912,7 +5696,7 @@ async function resolveSitemapSources(sources, event) {
4912
5696
  )).flat();
4913
5697
  }
4914
5698
 
4915
- const _CJfHt9 = defineEventHandler(async (e) => {
5699
+ const _xIZ_0x = defineEventHandler(async (e) => {
4916
5700
  const _runtimeConfig = useSitemapRuntimeConfig();
4917
5701
  const { sitemaps: _sitemaps } = _runtimeConfig;
4918
5702
  const runtimeConfig = { ..._runtimeConfig };
@@ -4923,18 +5707,18 @@ const _CJfHt9 = defineEventHandler(async (e) => {
4923
5707
  for (const s of Object.keys(_sitemaps)) {
4924
5708
  sitemaps[s] = {
4925
5709
  ..._sitemaps[s],
4926
- sources: await resolveSitemapSources(await childSitemapSources(_sitemaps[s]))
5710
+ sources: await resolveSitemapSources(await childSitemapSources(_sitemaps[s]), e)
4927
5711
  };
4928
5712
  }
4929
5713
  return {
4930
5714
  nitroOrigin,
4931
5715
  sitemaps,
4932
5716
  runtimeConfig,
4933
- globalSources: await resolveSitemapSources(globalSources)
5717
+ globalSources: await resolveSitemapSources(globalSources, e)
4934
5718
  };
4935
5719
  });
4936
5720
 
4937
- const _be_eqJ = defineEventHandler(async (e) => {
5721
+ const _4BAWff = defineEventHandler(async (e) => {
4938
5722
  const fixPath = createSitePathResolver(e, { absolute: false, withBase: true });
4939
5723
  const { sitemapName: fallbackSitemapName, cacheMaxAgeSeconds, version, xslColumns, xslTips } = useSitemapRuntimeConfig();
4940
5724
  setHeader(e, "Content-Type", "application/xslt+xml");
@@ -4954,17 +5738,37 @@ const _be_eqJ = defineEventHandler(async (e) => {
4954
5738
  const isShowingCanonical = typeof canonicalQuery !== "undefined" && canonicalQuery !== "false";
4955
5739
  const conditionalTips = [
4956
5740
  'You are looking at a <a href="https://developer.mozilla.org/en-US/docs/Web/XSLT/Transforming_XML_with_XSLT/An_Overview" style="color: #398465" target="_blank">XML stylesheet</a>. Read the <a href="https://nuxtseo.com/sitemap/guides/customising-ui" style="color: #398465" target="_blank">docs</a> to learn how to customize it. View the page source to see the raw XML.',
4957
- `URLs missing? Check Nuxt Devtools Sitemap tab (or the <a href="${withQuery("/__sitemap__/debug.json", { sitemap: sitemapName })}" style="color: #398465" target="_blank">debug endpoint</a>).`
5741
+ `URLs missing? Check Nuxt Devtools Sitemap tab (or the <a href="${xmlEscape(withQuery("/__sitemap__/debug.json", { sitemap: sitemapName }))}" style="color: #398465" target="_blank">debug endpoint</a>).`
4958
5742
  ];
5743
+ const fetchErrors = [];
5744
+ const xslQuery = getQuery$1(e);
5745
+ if (xslQuery.error_messages) {
5746
+ const errorMessages = xslQuery.error_messages;
5747
+ const errorUrls = xslQuery.error_urls;
5748
+ if (errorMessages) {
5749
+ const messages = Array.isArray(errorMessages) ? errorMessages : [errorMessages];
5750
+ const urls = Array.isArray(errorUrls) ? errorUrls : errorUrls ? [errorUrls] : [];
5751
+ messages.forEach((msg, i) => {
5752
+ const errorParts = [xmlEscape(msg)];
5753
+ if (urls[i]) {
5754
+ errorParts.push(xmlEscape(urls[i]));
5755
+ }
5756
+ fetchErrors.push(`<strong style="color: #dc2626;">Error ${i + 1}:</strong> ${errorParts.join(" - ")}`);
5757
+ });
5758
+ }
5759
+ }
4959
5760
  if (!isShowingCanonical) {
4960
5761
  const canonicalPreviewUrl = withQuery(referrer, { canonical: "" });
4961
- conditionalTips.push(`Your canonical site URL is <strong>${siteUrl}</strong>.`);
4962
- conditionalTips.push(`You can preview your canonical sitemap by visiting <a href="${canonicalPreviewUrl}" style="color: #398465; white-space: nowrap;">${fixPath(canonicalPreviewUrl)}?canonical</a>`);
5762
+ conditionalTips.push(`Your canonical site URL is <strong>${xmlEscape(siteUrl)}</strong>.`);
5763
+ conditionalTips.push(`You can preview your canonical sitemap by visiting <a href="${xmlEscape(canonicalPreviewUrl)}" style="color: #398465; white-space: nowrap;">${xmlEscape(fixPath(canonicalPreviewUrl))}?canonical</a>`);
4963
5764
  } else {
4964
- conditionalTips.push(`You are viewing the canonical sitemap. You can switch to using the request origin: <a href="${fixPath(referrer)}" style="color: #398465; white-space: nowrap ">${fixPath(referrer)}</a>`);
5765
+ conditionalTips.push(`You are viewing the canonical sitemap. You can switch to using the request origin: <a href="${xmlEscape(fixPath(referrer))}" style="color: #398465; white-space: nowrap ">${xmlEscape(fixPath(referrer))}</a>`);
4965
5766
  }
4966
- const tips = conditionalTips.map((t) => `<li><p>${t}</p></li>`).join("\n");
4967
- const showTips = xslTips !== false;
5767
+ const hasRuntimeErrors = fetchErrors.length > 0;
5768
+ const showDevTips = xslTips !== false;
5769
+ const showSidebar = showDevTips || hasRuntimeErrors;
5770
+ const devTips = showDevTips ? conditionalTips.map((t) => `<li><p>${t}</p></li>`).join("\n") : "";
5771
+ const runtimeErrors = hasRuntimeErrors ? fetchErrors.map((t) => `<li><p>${t}</p></li>`).join("\n") : "";
4968
5772
  let columns = [...xslColumns];
4969
5773
  if (!columns.length) {
4970
5774
  columns = [
@@ -5028,12 +5832,12 @@ const _be_eqJ = defineEventHandler(async (e) => {
5028
5832
  }
5029
5833
 
5030
5834
  .expl a {
5031
- color: #398465
5835
+ color: #398465;
5032
5836
  font-weight: 600;
5033
5837
  }
5034
5838
 
5035
5839
  .expl a:visited {
5036
- color: #398465
5840
+ color: #398465;
5037
5841
  }
5038
5842
 
5039
5843
  a {
@@ -5084,8 +5888,8 @@ const _be_eqJ = defineEventHandler(async (e) => {
5084
5888
  <div>
5085
5889
  <div id="content">
5086
5890
  <h1 class="text-2xl mb-3">XML Sitemap</h1>
5087
- <h2>${title}</h2>
5088
- ${isNotIndexButHasIndex ? `<p style="font-size: 12px; margin-bottom: 1rem;"><a href="${fixPath("/sitemap_index.xml")}">${fixPath("/sitemap_index.xml")}</a></p>` : ""}
5891
+ <h2>${xmlEscape(title)}</h2>
5892
+ ${isNotIndexButHasIndex ? `<p style="font-size: 12px; margin-bottom: 1rem;"><a href="${xmlEscape(fixPath("/sitemap_index.xml"))}">${xmlEscape(fixPath("/sitemap_index.xml"))}</a></p>` : ""}
5089
5893
  <xsl:if test="count(sitemap:sitemapindex/sitemap:sitemap) &gt; 0">
5090
5894
  <p class="expl" style="margin-bottom: 1rem;">
5091
5895
  This XML Sitemap Index file contains
@@ -5152,7 +5956,11 @@ const _be_eqJ = defineEventHandler(async (e) => {
5152
5956
  </xsl:if>
5153
5957
  </div>
5154
5958
  </div>
5155
- ${showTips ? `<div class="w-30 top-2 shadow rounded p-5 right-2" style="margin: 0 auto;"><p><strong>Sitemap Tips (development only)</strong></p><ul style="margin: 1rem; padding: 0;">${tips}</ul><p style="margin-top: 1rem;">${creditName}</p></div>` : ""}
5959
+ ${showSidebar ? `<div class="w-30 top-2 shadow rounded p-5 right-2" style="margin: 0 auto;">
5960
+ ${showDevTips ? `<div><p><strong>Development Tips</strong></p><ul style="margin: 1rem 0; padding: 0;">${devTips}</ul></div>` : ""}
5961
+ ${hasRuntimeErrors ? `<div${showDevTips ? ' style="margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e5e7eb;"' : ""}><p><strong style="color: #dc2626;">Runtime Errors</strong></p><ul style="margin: 1rem 0; padding: 0;">${runtimeErrors}</ul></div>` : ""}
5962
+ ${showDevTips ? `<p style="margin-top: 1rem;">${creditName}</p>` : ""}
5963
+ </div>` : ""}
5156
5964
  </div>
5157
5965
  </body>
5158
5966
  </html>
@@ -5248,29 +6056,32 @@ function normaliseEntry(_e, defaults, resolvers) {
5248
6056
  delete e.lastmod;
5249
6057
  e.loc = resolve(e.loc, resolvers);
5250
6058
  if (e.alternatives) {
5251
- e.alternatives = mergeOnKey$1(e.alternatives.map((e2) => {
5252
- const a = { ...e2 };
5253
- if (typeof a.href === "string")
5254
- a.href = resolve(a.href, resolvers);
5255
- else if (typeof a.href === "object" && a.href)
5256
- a.href = resolve(a.href.href, resolvers);
5257
- return a;
5258
- }), "hreflang");
6059
+ const alternatives = e.alternatives.map((a) => ({ ...a }));
6060
+ for (let i = 0; i < alternatives.length; i++) {
6061
+ const alt = alternatives[i];
6062
+ if (typeof alt.href === "string") {
6063
+ alt.href = resolve(alt.href, resolvers);
6064
+ } else if (typeof alt.href === "object" && alt.href) {
6065
+ alt.href = resolve(alt.href.href, resolvers);
6066
+ }
6067
+ }
6068
+ e.alternatives = mergeOnKey$1(alternatives, "hreflang");
5259
6069
  }
5260
6070
  if (e.images) {
5261
- e.images = mergeOnKey$1(e.images.map((i) => {
5262
- i = { ...i };
5263
- i.loc = resolve(i.loc, resolvers);
5264
- return i;
5265
- }), "loc");
6071
+ const images = e.images.map((i) => ({ ...i }));
6072
+ for (let i = 0; i < images.length; i++) {
6073
+ images[i].loc = resolve(images[i].loc, resolvers);
6074
+ }
6075
+ e.images = mergeOnKey$1(images, "loc");
5266
6076
  }
5267
6077
  if (e.videos) {
5268
- e.videos = e.videos.map((v) => {
5269
- v = { ...v };
5270
- if (v.content_loc)
5271
- v.content_loc = resolve(v.content_loc, resolvers);
5272
- return v;
5273
- });
6078
+ const videos = e.videos.map((v) => ({ ...v }));
6079
+ for (let i = 0; i < videos.length; i++) {
6080
+ if (videos[i].content_loc) {
6081
+ videos[i].content_loc = resolve(videos[i].content_loc, resolvers);
6082
+ }
6083
+ }
6084
+ e.videos = mergeOnKey$1(videos, "content_loc");
5274
6085
  }
5275
6086
  return e;
5276
6087
  }
@@ -5306,111 +6117,257 @@ function normaliseDate(d) {
5306
6117
  return date;
5307
6118
  }
5308
6119
 
5309
- function sortSitemapUrls(urls) {
5310
- return urls.sort(
5311
- (a, b) => {
5312
- const aLoc = typeof a === "string" ? a : a.loc;
5313
- const bLoc = typeof b === "string" ? b : b.loc;
5314
- return aLoc.localeCompare(bLoc, void 0, { numeric: true });
5315
- }
5316
- ).sort((a, b) => {
5317
- const aLoc = (typeof a === "string" ? a : a.loc) || "";
5318
- const bLoc = (typeof b === "string" ? b : b.loc) || "";
6120
+ function sortInPlace(urls) {
6121
+ urls.sort((a, b) => {
6122
+ const aLoc = typeof a === "string" ? a : a.loc;
6123
+ const bLoc = typeof b === "string" ? b : b.loc;
5319
6124
  const aSegments = aLoc.split("/").length;
5320
6125
  const bSegments = bLoc.split("/").length;
5321
- if (aSegments > bSegments)
5322
- return 1;
5323
- if (aSegments < bSegments)
5324
- return -1;
5325
- return 0;
6126
+ if (aSegments !== bSegments) {
6127
+ return aSegments - bSegments;
6128
+ }
6129
+ return aLoc.localeCompare(bLoc, void 0, { numeric: true });
5326
6130
  });
6131
+ return urls;
5327
6132
  }
5328
6133
 
5329
- function resolveKey(k) {
5330
- switch (k) {
5331
- case "images":
5332
- return "image";
5333
- case "videos":
5334
- return "video";
5335
- // news & others?
5336
- case "news":
5337
- return "news";
5338
- default:
5339
- return k;
6134
+ function parseChunkInfo(sitemapName, sitemaps, defaultChunkSize = 1e3) {
6135
+ if (typeof sitemaps.chunks !== "undefined" && !Number.isNaN(Number(sitemapName))) {
6136
+ return {
6137
+ isChunked: true,
6138
+ baseSitemapName: "sitemap",
6139
+ chunkIndex: Number(sitemapName),
6140
+ chunkSize: defaultChunkSize
6141
+ };
5340
6142
  }
5341
- }
5342
- function handleObject(key, obj) {
5343
- return [
5344
- ` <${key}:${key}>`,
5345
- ...Object.entries(obj).map(([sk, sv]) => {
5346
- if (key === "video" && Array.isArray(sv)) {
5347
- return sv.map((v) => {
5348
- if (typeof v === "string") {
5349
- return [
5350
- ` `,
5351
- `<${key}:${sk}>`,
5352
- escapeValueForXml(v),
5353
- `</${key}:${sk}>`
5354
- ].join("");
5355
- }
5356
- const attributes = Object.entries(v).filter(([ssk]) => ssk !== sk).map(([ssk, ssv]) => `${ssk}="${escapeValueForXml(ssv)}"`).join(" ");
5357
- return [
5358
- ` <${key}:${sk} ${attributes}>`,
5359
- // value is the same sk
5360
- v[sk],
5361
- `</${key}:${sk}>`
5362
- ].join("");
5363
- }).join("\n");
5364
- }
5365
- if (typeof sv === "object") {
5366
- if (key === "video") {
5367
- const attributes = Object.entries(sv).filter(([ssk]) => ssk !== sk).map(([ssk, ssv]) => `${ssk}="${escapeValueForXml(ssv)}"`).join(" ");
5368
- return [
5369
- ` <${key}:${sk} ${attributes}>`,
5370
- // value is the same sk
5371
- sv[sk],
5372
- `</${key}:${sk}>`
5373
- ].join("");
5374
- }
5375
- return [
5376
- ` <${key}:${sk}>`,
5377
- ...Object.entries(sv).map(([ssk, ssv]) => ` <${key}:${ssk}>${escapeValueForXml(ssv)}</${key}:${ssk}>`),
5378
- ` </${key}:${sk}>`
5379
- ].join("\n");
6143
+ if (sitemapName.includes("-")) {
6144
+ const parts = sitemapName.split("-");
6145
+ const lastPart = parts.pop();
6146
+ if (!Number.isNaN(Number(lastPart))) {
6147
+ const baseSitemapName = parts.join("-");
6148
+ const baseSitemap = sitemaps[baseSitemapName];
6149
+ if (baseSitemap && (baseSitemap.chunks || baseSitemap._isChunking)) {
6150
+ const chunkSize = typeof baseSitemap.chunks === "number" ? baseSitemap.chunks : baseSitemap.chunkSize || defaultChunkSize;
6151
+ return {
6152
+ isChunked: true,
6153
+ baseSitemapName,
6154
+ chunkIndex: Number(lastPart),
6155
+ chunkSize
6156
+ };
5380
6157
  }
5381
- return ` <${key}:${sk}>${escapeValueForXml(sv)}</${key}:${sk}>`;
5382
- }),
5383
- ` </${key}:${key}>`
5384
- ].join("\n");
6158
+ }
6159
+ }
6160
+ return {
6161
+ isChunked: false,
6162
+ baseSitemapName: sitemapName,
6163
+ chunkIndex: void 0,
6164
+ chunkSize: defaultChunkSize
6165
+ };
5385
6166
  }
5386
- function handleArray(key, arr) {
5387
- if (arr.length === 0)
5388
- return false;
5389
- key = resolveKey(key);
5390
- if (key === "alternatives") {
5391
- return arr.map((obj) => [
5392
- ` <xhtml:link rel="alternate" ${Object.entries(obj).map(([sk, sv]) => `${sk}="${escapeValueForXml(sv)}"`).join(" ")} />`
5393
- ].join("\n")).join("\n");
5394
- }
5395
- return arr.map((obj) => handleObject(key, obj)).join("\n");
5396
- }
5397
- function handleEntry(k, e) {
5398
- return Array.isArray(e[k]) ? handleArray(k, e[k]) : typeof e[k] === "object" ? handleObject(k, e[k]) : ` <${k}>${escapeValueForXml(e[k])}</${k}>`;
5399
- }
5400
- function wrapSitemapXml(input, resolvers, options) {
5401
- const xsl = options.xsl ? resolvers.relativeBaseUrlResolver(options.xsl) : false;
5402
- const credits = options.credits;
5403
- input.unshift(`<?xml version="1.0" encoding="UTF-8"?>${xsl ? `<?xml-stylesheet type="text/xsl" href="${xsl}"?>` : ""}`);
5404
- if (credits)
5405
- input.push(`<!-- XML Sitemap generated by @nuxtjs/sitemap v${options.version} at ${(/* @__PURE__ */ new Date()).toISOString()} -->`);
5406
- if (options.minify)
5407
- return input.join("").replace(/(?<!<[^>]*)\s(?![^<]*>)/g, "");
5408
- return input.join("\n");
6167
+ function sliceUrlsForChunk(urls, sitemapName, sitemaps, defaultChunkSize = 1e3) {
6168
+ const chunkInfo = parseChunkInfo(sitemapName, sitemaps, defaultChunkSize);
6169
+ if (chunkInfo.isChunked && chunkInfo.chunkIndex !== void 0) {
6170
+ const startIndex = chunkInfo.chunkIndex * chunkInfo.chunkSize;
6171
+ const endIndex = (chunkInfo.chunkIndex + 1) * chunkInfo.chunkSize;
6172
+ return urls.slice(startIndex, endIndex);
6173
+ }
6174
+ return urls;
5409
6175
  }
6176
+
5410
6177
  function escapeValueForXml(value) {
5411
6178
  if (value === true || value === false)
5412
6179
  return value ? "yes" : "no";
5413
- return String(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
6180
+ return xmlEscape(String(value));
6181
+ }
6182
+ const URLSET_OPENING_TAG = '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
6183
+ function buildUrlXml(url) {
6184
+ const capacity = 50;
6185
+ const parts = Array.from({ length: capacity });
6186
+ let partIndex = 0;
6187
+ parts[partIndex++] = " <url>";
6188
+ if (url.loc) {
6189
+ parts[partIndex++] = ` <loc>${escapeValueForXml(url.loc)}</loc>`;
6190
+ }
6191
+ if (url.lastmod) {
6192
+ parts[partIndex++] = ` <lastmod>${url.lastmod}</lastmod>`;
6193
+ }
6194
+ if (url.changefreq) {
6195
+ parts[partIndex++] = ` <changefreq>${url.changefreq}</changefreq>`;
6196
+ }
6197
+ if (url.priority !== void 0) {
6198
+ const priorityValue = Number.parseFloat(String(url.priority));
6199
+ const formattedPriority = priorityValue % 1 === 0 ? String(priorityValue) : priorityValue.toFixed(1);
6200
+ parts[partIndex++] = ` <priority>${formattedPriority}</priority>`;
6201
+ }
6202
+ const keys = Object.keys(url).filter((k) => !k.startsWith("_") && !["loc", "lastmod", "changefreq", "priority"].includes(k));
6203
+ for (const key of keys) {
6204
+ const value = url[key];
6205
+ if (value === void 0 || value === null) continue;
6206
+ switch (key) {
6207
+ case "alternatives":
6208
+ if (Array.isArray(value) && value.length > 0) {
6209
+ for (const alt of value) {
6210
+ const attrs = Object.entries(alt).map(([k, v]) => `${k}="${escapeValueForXml(v)}"`).join(" ");
6211
+ parts[partIndex++] = ` <xhtml:link rel="alternate" ${attrs} />`;
6212
+ }
6213
+ }
6214
+ break;
6215
+ case "images":
6216
+ if (Array.isArray(value) && value.length > 0) {
6217
+ for (const img of value) {
6218
+ parts[partIndex++] = " <image:image>";
6219
+ parts[partIndex++] = ` <image:loc>${escapeValueForXml(img.loc)}</image:loc>`;
6220
+ if (img.title) parts[partIndex++] = ` <image:title>${escapeValueForXml(img.title)}</image:title>`;
6221
+ if (img.caption) parts[partIndex++] = ` <image:caption>${escapeValueForXml(img.caption)}</image:caption>`;
6222
+ if (img.geo_location) parts[partIndex++] = ` <image:geo_location>${escapeValueForXml(img.geo_location)}</image:geo_location>`;
6223
+ if (img.license) parts[partIndex++] = ` <image:license>${escapeValueForXml(img.license)}</image:license>`;
6224
+ parts[partIndex++] = " </image:image>";
6225
+ }
6226
+ }
6227
+ break;
6228
+ case "videos":
6229
+ if (Array.isArray(value) && value.length > 0) {
6230
+ for (const video of value) {
6231
+ parts[partIndex++] = " <video:video>";
6232
+ parts[partIndex++] = ` <video:title>${escapeValueForXml(video.title)}</video:title>`;
6233
+ if (video.thumbnail_loc) {
6234
+ parts[partIndex++] = ` <video:thumbnail_loc>${escapeValueForXml(video.thumbnail_loc)}</video:thumbnail_loc>`;
6235
+ }
6236
+ parts[partIndex++] = ` <video:description>${escapeValueForXml(video.description)}</video:description>`;
6237
+ if (video.content_loc) {
6238
+ parts[partIndex++] = ` <video:content_loc>${escapeValueForXml(video.content_loc)}</video:content_loc>`;
6239
+ }
6240
+ if (video.player_loc) {
6241
+ const attrs = video.player_loc.allow_embed ? ' allow_embed="yes"' : "";
6242
+ const autoplay = video.player_loc.autoplay ? ' autoplay="yes"' : "";
6243
+ parts[partIndex++] = ` <video:player_loc${attrs}${autoplay}>${escapeValueForXml(video.player_loc)}</video:player_loc>`;
6244
+ }
6245
+ if (video.duration !== void 0) {
6246
+ parts[partIndex++] = ` <video:duration>${video.duration}</video:duration>`;
6247
+ }
6248
+ if (video.expiration_date) {
6249
+ parts[partIndex++] = ` <video:expiration_date>${video.expiration_date}</video:expiration_date>`;
6250
+ }
6251
+ if (video.rating !== void 0) {
6252
+ parts[partIndex++] = ` <video:rating>${video.rating}</video:rating>`;
6253
+ }
6254
+ if (video.view_count !== void 0) {
6255
+ parts[partIndex++] = ` <video:view_count>${video.view_count}</video:view_count>`;
6256
+ }
6257
+ if (video.publication_date) {
6258
+ parts[partIndex++] = ` <video:publication_date>${video.publication_date}</video:publication_date>`;
6259
+ }
6260
+ if (video.family_friendly !== void 0) {
6261
+ parts[partIndex++] = ` <video:family_friendly>${video.family_friendly === "yes" || video.family_friendly === true ? "yes" : "no"}</video:family_friendly>`;
6262
+ }
6263
+ if (video.restriction) {
6264
+ const relationship = video.restriction.relationship || "allow";
6265
+ parts[partIndex++] = ` <video:restriction relationship="${relationship}">${escapeValueForXml(video.restriction.restriction)}</video:restriction>`;
6266
+ }
6267
+ if (video.platform) {
6268
+ const relationship = video.platform.relationship || "allow";
6269
+ parts[partIndex++] = ` <video:platform relationship="${relationship}">${escapeValueForXml(video.platform.platform)}</video:platform>`;
6270
+ }
6271
+ if (video.requires_subscription !== void 0) {
6272
+ parts[partIndex++] = ` <video:requires_subscription>${video.requires_subscription === "yes" || video.requires_subscription === true ? "yes" : "no"}</video:requires_subscription>`;
6273
+ }
6274
+ if (video.price) {
6275
+ const prices = Array.isArray(video.price) ? video.price : [video.price];
6276
+ for (const price of prices) {
6277
+ const attrs = [];
6278
+ if (price.currency) attrs.push(`currency="${price.currency}"`);
6279
+ if (price.type) attrs.push(`type="${price.type}"`);
6280
+ const attrsStr = attrs.length > 0 ? " " + attrs.join(" ") : "";
6281
+ parts[partIndex++] = ` <video:price${attrsStr}>${escapeValueForXml(price.price)}</video:price>`;
6282
+ }
6283
+ }
6284
+ if (video.uploader) {
6285
+ const info = video.uploader.info ? ` info="${escapeValueForXml(video.uploader.info)}"` : "";
6286
+ parts[partIndex++] = ` <video:uploader${info}>${escapeValueForXml(video.uploader.uploader)}</video:uploader>`;
6287
+ }
6288
+ if (video.live !== void 0) {
6289
+ parts[partIndex++] = ` <video:live>${video.live === "yes" || video.live === true ? "yes" : "no"}</video:live>`;
6290
+ }
6291
+ if (video.tag) {
6292
+ const tags = Array.isArray(video.tag) ? video.tag : [video.tag];
6293
+ for (const tag of tags) {
6294
+ parts[partIndex++] = ` <video:tag>${escapeValueForXml(tag)}</video:tag>`;
6295
+ }
6296
+ }
6297
+ if (video.category) {
6298
+ parts[partIndex++] = ` <video:category>${escapeValueForXml(video.category)}</video:category>`;
6299
+ }
6300
+ if (video.gallery_loc) {
6301
+ const title = video.gallery_loc.title ? ` title="${escapeValueForXml(video.gallery_loc.title)}"` : "";
6302
+ parts[partIndex++] = ` <video:gallery_loc${title}>${escapeValueForXml(video.gallery_loc)}</video:gallery_loc>`;
6303
+ }
6304
+ parts[partIndex++] = " </video:video>";
6305
+ }
6306
+ }
6307
+ break;
6308
+ case "news":
6309
+ if (value) {
6310
+ parts[partIndex++] = " <news:news>";
6311
+ parts[partIndex++] = " <news:publication>";
6312
+ parts[partIndex++] = ` <news:name>${escapeValueForXml(value.publication.name)}</news:name>`;
6313
+ parts[partIndex++] = ` <news:language>${escapeValueForXml(value.publication.language)}</news:language>`;
6314
+ parts[partIndex++] = " </news:publication>";
6315
+ if (value.title) {
6316
+ parts[partIndex++] = ` <news:title>${escapeValueForXml(value.title)}</news:title>`;
6317
+ }
6318
+ if (value.publication_date) {
6319
+ parts[partIndex++] = ` <news:publication_date>${value.publication_date}</news:publication_date>`;
6320
+ }
6321
+ if (value.access) {
6322
+ parts[partIndex++] = ` <news:access>${value.access}</news:access>`;
6323
+ }
6324
+ if (value.genres) {
6325
+ parts[partIndex++] = ` <news:genres>${escapeValueForXml(value.genres)}</news:genres>`;
6326
+ }
6327
+ if (value.keywords) {
6328
+ parts[partIndex++] = ` <news:keywords>${escapeValueForXml(value.keywords)}</news:keywords>`;
6329
+ }
6330
+ if (value.stock_tickers) {
6331
+ parts[partIndex++] = ` <news:stock_tickers>${escapeValueForXml(value.stock_tickers)}</news:stock_tickers>`;
6332
+ }
6333
+ parts[partIndex++] = " </news:news>";
6334
+ }
6335
+ break;
6336
+ }
6337
+ }
6338
+ parts[partIndex++] = " </url>";
6339
+ return parts.slice(0, partIndex).join("\n");
6340
+ }
6341
+ function urlsToXml(urls, resolvers, { version, xsl, credits, minify }, errorInfo) {
6342
+ const estimatedSize = urls.length + 5;
6343
+ const xmlParts = Array.from({ length: estimatedSize });
6344
+ let partIndex = 0;
6345
+ let xslHref = xsl ? resolvers.relativeBaseUrlResolver(xsl) : false;
6346
+ if (xslHref && errorInfo && errorInfo.messages.length > 0) {
6347
+ xslHref = withQuery(xslHref, {
6348
+ errors: "true",
6349
+ error_messages: errorInfo.messages,
6350
+ error_urls: errorInfo.urls
6351
+ });
6352
+ }
6353
+ if (xslHref) {
6354
+ xmlParts[partIndex++] = `<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="${escapeValueForXml(xslHref)}"?>`;
6355
+ } else {
6356
+ xmlParts[partIndex++] = '<?xml version="1.0" encoding="UTF-8"?>';
6357
+ }
6358
+ xmlParts[partIndex++] = URLSET_OPENING_TAG;
6359
+ for (const url of urls) {
6360
+ xmlParts[partIndex++] = buildUrlXml(url);
6361
+ }
6362
+ xmlParts[partIndex++] = "</urlset>";
6363
+ if (credits) {
6364
+ xmlParts[partIndex++] = `<!-- XML Sitemap generated by @nuxtjs/sitemap v${version} at ${(/* @__PURE__ */ new Date()).toISOString()} -->`;
6365
+ }
6366
+ const xmlContent = xmlParts.slice(0, partIndex);
6367
+ if (minify) {
6368
+ return xmlContent.join("").replace(/(?<!<[^>]*)\s(?![^<]*>)/g, "");
6369
+ }
6370
+ return xmlContent.join("\n");
5414
6371
  }
5415
6372
 
5416
6373
  function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
@@ -5493,9 +6450,23 @@ function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
5493
6450
  });
5494
6451
  } else {
5495
6452
  for (const l of autoI18n.locales) {
5496
- let loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
5497
- if (autoI18n.differentDomains || ["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale)
5498
- loc = e._pathWithoutPrefix;
6453
+ let loc = e._pathWithoutPrefix;
6454
+ if (autoI18n.pages) {
6455
+ const pageKey = e._pathWithoutPrefix.replace(/^\//, "").replace(/\/index$/, "") || "index";
6456
+ const pageMappings = autoI18n.pages[pageKey];
6457
+ if (pageMappings && pageMappings[l.code] !== void 0) {
6458
+ const customPath = pageMappings[l.code];
6459
+ if (customPath === false)
6460
+ continue;
6461
+ if (typeof customPath === "string")
6462
+ loc = customPath.startsWith("/") ? customPath : `/${customPath}`;
6463
+ } else if (!autoI18n.differentDomains && !(["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale)) {
6464
+ loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
6465
+ }
6466
+ } else {
6467
+ if (!autoI18n.differentDomains && !(["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale))
6468
+ loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
6469
+ }
5499
6470
  const _sitemap = isI18nMapped ? l._sitemap : void 0;
5500
6471
  const newEntry = preNormalizeEntry({
5501
6472
  _sitemap,
@@ -5507,14 +6478,30 @@ function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
5507
6478
  alternatives: [{ code: "x-default", _hreflang: "x-default" }, ...autoI18n.locales].map((locale) => {
5508
6479
  const code = locale.code === "x-default" ? autoI18n.defaultLocale : locale.code;
5509
6480
  const isDefault = locale.code === "x-default" || locale.code === autoI18n.defaultLocale;
5510
- let href = "";
5511
- if (autoI18n.strategy === "prefix") {
5512
- href = joinURL("/", code, e._pathWithoutPrefix);
5513
- } else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
5514
- if (isDefault) {
5515
- href = e._pathWithoutPrefix;
5516
- } else {
6481
+ let href = e._pathWithoutPrefix;
6482
+ if (autoI18n.pages) {
6483
+ const pageKey = e._pathWithoutPrefix.replace(/^\//, "").replace(/\/index$/, "") || "index";
6484
+ const pageMappings = autoI18n.pages[pageKey];
6485
+ if (pageMappings && pageMappings[code] !== void 0) {
6486
+ const customPath = pageMappings[code];
6487
+ if (customPath === false)
6488
+ return false;
6489
+ if (typeof customPath === "string")
6490
+ href = customPath.startsWith("/") ? customPath : `/${customPath}`;
6491
+ } else if (autoI18n.strategy === "prefix") {
5517
6492
  href = joinURL("/", code, e._pathWithoutPrefix);
6493
+ } else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
6494
+ if (!isDefault) {
6495
+ href = joinURL("/", code, e._pathWithoutPrefix);
6496
+ }
6497
+ }
6498
+ } else {
6499
+ if (autoI18n.strategy === "prefix") {
6500
+ href = joinURL("/", code, e._pathWithoutPrefix);
6501
+ } else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
6502
+ if (!isDefault) {
6503
+ href = joinURL("/", code, e._pathWithoutPrefix);
6504
+ }
5518
6505
  }
5519
6506
  }
5520
6507
  if (!filterPath(href))
@@ -5559,16 +6546,12 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
5559
6546
  // chunking
5560
6547
  defaultSitemapsChunkSize
5561
6548
  } = runtimeConfig;
5562
- const isChunking = typeof sitemaps.chunks !== "undefined" && !Number.isNaN(Number(sitemap.sitemapName));
5563
- function maybeSort(urls) {
5564
- return sortEntries ? sortSitemapUrls(urls) : urls;
6549
+ const chunkInfo = parseChunkInfo(sitemap.sitemapName, sitemaps, defaultSitemapsChunkSize);
6550
+ function maybeSort(urls2) {
6551
+ return sortEntries ? sortInPlace(urls2) : urls2;
5565
6552
  }
5566
- function maybeSlice(urls) {
5567
- if (isChunking && defaultSitemapsChunkSize) {
5568
- const chunk = Number(sitemap.sitemapName);
5569
- return urls.slice(chunk * defaultSitemapsChunkSize, (chunk + 1) * defaultSitemapsChunkSize);
5570
- }
5571
- return urls;
6553
+ function maybeSlice(urls2) {
6554
+ return sliceUrlsForChunk(urls2, sitemap.sitemapName, sitemaps, defaultSitemapsChunkSize);
5572
6555
  }
5573
6556
  if (autoI18n?.differentDomains) {
5574
6557
  const domain = autoI18n.locales.find((e) => [e.language, e.code].includes(sitemap.sitemapName))?.domain;
@@ -5583,9 +6566,27 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
5583
6566
  });
5584
6567
  }
5585
6568
  }
5586
- const sourcesInput = sitemap.includeAppSources ? await globalSitemapSources() : [];
5587
- sourcesInput.push(...await childSitemapSources(sitemap));
6569
+ let effectiveSitemap = sitemap;
6570
+ const baseSitemapName = chunkInfo.baseSitemapName;
6571
+ if (chunkInfo.isChunked && baseSitemapName !== sitemap.sitemapName && sitemaps[baseSitemapName]) {
6572
+ effectiveSitemap = sitemaps[baseSitemapName];
6573
+ }
6574
+ let sourcesInput = effectiveSitemap.includeAppSources ? await globalSitemapSources() : [];
6575
+ sourcesInput.push(...await childSitemapSources(effectiveSitemap));
6576
+ if (nitro && resolvers.event) {
6577
+ const ctx = {
6578
+ event: resolvers.event,
6579
+ sitemapName: baseSitemapName,
6580
+ sources: sourcesInput
6581
+ };
6582
+ await nitro.hooks.callHook("sitemap:sources", ctx);
6583
+ sourcesInput = ctx.sources;
6584
+ }
5588
6585
  const sources = await resolveSitemapSources(sourcesInput, resolvers.event);
6586
+ const failedSources = sources.filter((source) => source.error && source._isFailure).map((source) => ({
6587
+ url: typeof source.fetch === "string" ? source.fetch : source.fetch?.[0] || "unknown",
6588
+ error: source.error || "Unknown error"
6589
+ }));
5589
6590
  const resolvedCtx = {
5590
6591
  urls: sources.flatMap((s) => s.urls),
5591
6592
  sitemapName: sitemap.sitemapName,
@@ -5599,22 +6600,8 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
5599
6600
  return true;
5600
6601
  });
5601
6602
  const sortedUrls = maybeSort(filteredUrls);
5602
- return maybeSlice(sortedUrls);
5603
- }
5604
- function urlsToXml(urls, resolvers, { version, xsl, credits, minify }) {
5605
- const urlset = urls.map((e) => {
5606
- const keys = Object.keys(e).filter((k) => !k.startsWith("_"));
5607
- return [
5608
- " <url>",
5609
- keys.map((k) => handleEntry(k, e)).filter(Boolean).join("\n"),
5610
- " </url>"
5611
- ].join("\n");
5612
- });
5613
- return wrapSitemapXml([
5614
- '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
5615
- urlset.join("\n"),
5616
- "</urlset>"
5617
- ], resolvers, { version, xsl, credits, minify });
6603
+ const urls = maybeSlice(sortedUrls);
6604
+ return { urls, failedSources };
5618
6605
  }
5619
6606
 
5620
6607
  function useNitroUrlResolvers(e) {
@@ -5633,17 +6620,18 @@ function useNitroUrlResolvers(e) {
5633
6620
  relativeBaseUrlResolver: createSitePathResolver(e, { absolute: false, withBase: true })
5634
6621
  };
5635
6622
  }
5636
- async function createSitemap(event, definition, runtimeConfig) {
6623
+ async function buildSitemapXml(event, definition, resolvers, runtimeConfig) {
5637
6624
  const { sitemapName } = definition;
5638
6625
  const nitro = useNitroApp();
5639
- const resolvers = useNitroUrlResolvers(event);
5640
- let sitemapUrls = await buildSitemapUrls(definition, resolvers, runtimeConfig, nitro);
6626
+ const { urls: sitemapUrls, failedSources } = await buildSitemapUrls(definition, resolvers, runtimeConfig, nitro);
5641
6627
  const routeRuleMatcher = createNitroRouteRuleMatcher();
5642
6628
  const { autoI18n } = runtimeConfig;
5643
- sitemapUrls = sitemapUrls.map((u) => {
6629
+ let validCount = 0;
6630
+ for (let i = 0; i < sitemapUrls.length; i++) {
6631
+ const u = sitemapUrls[i];
5644
6632
  const path = u._path?.pathname || u.loc;
5645
6633
  if (!getPathRobotConfig(event, { path, skipSiteIndexable: true }).indexable)
5646
- return false;
6634
+ continue;
5647
6635
  let routeRules = routeRuleMatcher(path);
5648
6636
  if (autoI18n?.locales && autoI18n?.strategy !== "no_prefix") {
5649
6637
  const match = splitForLocales(path, autoI18n.locales.map((l) => l.code));
@@ -5652,15 +6640,15 @@ async function createSitemap(event, definition, runtimeConfig) {
5652
6640
  routeRules = defu$1(routeRules, routeRuleMatcher(pathWithoutPrefix));
5653
6641
  }
5654
6642
  if (routeRules.sitemap === false)
5655
- return false;
5656
- if (typeof routeRules.robots !== "undefined" && !routeRules.robots) {
5657
- return false;
5658
- }
6643
+ continue;
6644
+ if (typeof routeRules.robots !== "undefined" && !routeRules.robots)
6645
+ continue;
5659
6646
  const hasRobotsDisabled = Object.entries(routeRules.headers || {}).some(([name, value]) => name.toLowerCase() === "x-robots-tag" && value.toLowerCase().includes("noindex"));
5660
6647
  if (routeRules.redirect || hasRobotsDisabled)
5661
- return false;
5662
- return routeRules.sitemap ? defu$1(u, routeRules.sitemap) : u;
5663
- }).filter(Boolean);
6648
+ continue;
6649
+ sitemapUrls[validCount++] = routeRules.sitemap ? defu$1(u, routeRules.sitemap) : u;
6650
+ }
6651
+ sitemapUrls.length = validCount;
5664
6652
  const locSize = sitemapUrls.length;
5665
6653
  const resolvedCtx = {
5666
6654
  urls: sitemapUrls,
@@ -5671,22 +6659,72 @@ async function createSitemap(event, definition, runtimeConfig) {
5671
6659
  if (resolvedCtx.urls.length !== locSize) {
5672
6660
  resolvedCtx.urls = resolvedCtx.urls.map((e) => preNormalizeEntry(e, resolvers));
5673
6661
  }
5674
- const maybeSort = (urls2) => runtimeConfig.sortEntries ? sortSitemapUrls(urls2) : urls2;
6662
+ const maybeSort = (urls2) => runtimeConfig.sortEntries ? sortInPlace(urls2) : urls2;
5675
6663
  const normalizedPreDedupe = resolvedCtx.urls.map((e) => normaliseEntry(e, definition.defaults, resolvers));
5676
6664
  const urls = maybeSort(mergeOnKey$1(normalizedPreDedupe, "_key").map((e) => normaliseEntry(e, definition.defaults, resolvers)));
5677
- const sitemap = urlsToXml(urls, resolvers, runtimeConfig);
6665
+ if (definition._isChunking && definition.sitemapName.includes("-")) {
6666
+ const parts = definition.sitemapName.split("-");
6667
+ const lastPart = parts.pop();
6668
+ if (!Number.isNaN(Number(lastPart))) {
6669
+ const chunkIndex = Number(lastPart);
6670
+ const baseSitemapName = parts.join("-");
6671
+ if (urls.length === 0 && chunkIndex > 0) {
6672
+ throw createError({
6673
+ statusCode: 404,
6674
+ message: `Sitemap chunk ${chunkIndex} for "${baseSitemapName}" does not exist.`
6675
+ });
6676
+ }
6677
+ }
6678
+ }
6679
+ const errorInfo = failedSources.length > 0 ? {
6680
+ messages: failedSources.map((f) => f.error),
6681
+ urls: failedSources.map((f) => f.url)
6682
+ } : void 0;
6683
+ const sitemap = urlsToXml(urls, resolvers, runtimeConfig, errorInfo);
5678
6684
  const ctx = { sitemap, sitemapName, event };
5679
6685
  await nitro.hooks.callHook("sitemap:output", ctx);
6686
+ return ctx.sitemap;
6687
+ }
6688
+ defineCachedFunction(
6689
+ buildSitemapXml,
6690
+ {
6691
+ name: "sitemap:xml",
6692
+ group: "sitemap",
6693
+ maxAge: 60 * 10,
6694
+ // Default 10 minutes
6695
+ base: "sitemap",
6696
+ // Use the sitemap storage
6697
+ getKey: (event, definition) => {
6698
+ const host = getHeader(event, "host") || getHeader(event, "x-forwarded-host") || "";
6699
+ const proto = getHeader(event, "x-forwarded-proto") || "https";
6700
+ const sitemapName = definition.sitemapName || "default";
6701
+ return `${sitemapName}-${proto}-${host}`;
6702
+ },
6703
+ swr: true
6704
+ // Enable stale-while-revalidate
6705
+ }
6706
+ );
6707
+ async function createSitemap(event, definition, runtimeConfig) {
6708
+ const resolvers = useNitroUrlResolvers(event);
6709
+ const xml = await buildSitemapXml(event, definition, resolvers, runtimeConfig);
5680
6710
  setHeader(event, "Content-Type", "text/xml; charset=UTF-8");
5681
- if (runtimeConfig.cacheMaxAgeSeconds)
5682
- setHeader(event, "Cache-Control", `public, max-age=${runtimeConfig.cacheMaxAgeSeconds}, must-revalidate`);
5683
- else
6711
+ if (runtimeConfig.cacheMaxAgeSeconds) {
6712
+ setHeader(event, "Cache-Control", `public, max-age=${runtimeConfig.cacheMaxAgeSeconds}, s-maxage=${runtimeConfig.cacheMaxAgeSeconds}, stale-while-revalidate=3600`);
6713
+ const now = /* @__PURE__ */ new Date();
6714
+ setHeader(event, "X-Sitemap-Generated", now.toISOString());
6715
+ setHeader(event, "X-Sitemap-Cache-Duration", `${runtimeConfig.cacheMaxAgeSeconds}s`);
6716
+ const expiryTime = new Date(now.getTime() + runtimeConfig.cacheMaxAgeSeconds * 1e3);
6717
+ setHeader(event, "X-Sitemap-Cache-Expires", expiryTime.toISOString());
6718
+ const remainingSeconds = Math.floor((expiryTime.getTime() - now.getTime()) / 1e3);
6719
+ setHeader(event, "X-Sitemap-Cache-Remaining", `${remainingSeconds}s`);
6720
+ } else {
5684
6721
  setHeader(event, "Cache-Control", `no-cache, no-store`);
6722
+ }
5685
6723
  event.context._isSitemap = true;
5686
- return ctx.sitemap;
6724
+ return xml;
5687
6725
  }
5688
6726
 
5689
- const _ra8Qej = defineEventHandler(async (e) => {
6727
+ const _n1jDWd = defineEventHandler(async (e) => {
5690
6728
  const runtimeConfig = useSitemapRuntimeConfig();
5691
6729
  const { sitemaps } = runtimeConfig;
5692
6730
  if ("index" in sitemaps) {
@@ -6280,7 +7318,7 @@ function isInternalRoute(path) {
6280
7318
  const lastSegment = path.split("/").pop() || path;
6281
7319
  return lastSegment.includes(".") || path.startsWith("/__") || path.startsWith("@");
6282
7320
  }
6283
- const _DcvS2K = defineEventHandler(async (e) => {
7321
+ const _3rIYDU = defineEventHandler(async (e) => {
6284
7322
  const { tasks, ids, path } = await readBody(e);
6285
7323
  const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
6286
7324
  const partialCtx = {
@@ -6316,7 +7354,7 @@ const _DcvS2K = defineEventHandler(async (e) => {
6316
7354
  skipInspections: runtimeConfig.skipInspections
6317
7355
  });
6318
7356
  const filePaths = [
6319
- resolve$2(runtimeConfig.rootDir, links.find((l) => l.file && l.link === path)?.file),
7357
+ resolve$3(runtimeConfig.rootDir, links.find((l) => l.file && l.link === path)?.file),
6320
7358
  ...paths.map((p) => {
6321
7359
  const [filepath] = p.split(":");
6322
7360
  return filepath;
@@ -6340,7 +7378,7 @@ const contentLinkProvider = async (e) => {
6340
7378
  }
6341
7379
  const contentList = [];
6342
7380
  for (const collection of collections) {
6343
- contentList.push(queryCollectionWithEvent(e, collection).select("id", "path", "title").where("path", "IS NOT NULL").all());
7381
+ contentList.push(queryCollection(e, collection).select("id", "path", "title").where("path", "IS NOT NULL").all());
6344
7382
  }
6345
7383
  const results = await Promise.all(contentList);
6346
7384
  return results.flat().map((d) => {
@@ -6355,19 +7393,19 @@ const contentLinkProvider = async (e) => {
6355
7393
  const pagePaths = [
6356
7394
  {
6357
7395
  "title": "",
6358
- "link": "/ignis"
7396
+ "link": "/"
6359
7397
  },
6360
7398
  {
6361
7399
  "title": "",
6362
- "link": "/"
7400
+ "link": "/_ignis-info"
6363
7401
  },
6364
7402
  {
6365
7403
  "title": "",
6366
- "link": "/second"
7404
+ "link": "/_ignis-config"
6367
7405
  }
6368
7406
  ];
6369
7407
 
6370
- const _Utkbv0 = defineCachedEventHandler(async (e) => {
7408
+ const _Rhm_9d = defineCachedEventHandler(async (e) => {
6371
7409
  const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
6372
7410
  const linkDb = [
6373
7411
  ...pagePaths
@@ -6387,7 +7425,7 @@ const _Utkbv0 = defineCachedEventHandler(async (e) => {
6387
7425
  // avoid thrashing
6388
7426
  });
6389
7427
 
6390
- const _IFlV15 = defineEventHandler(async (e) => {
7428
+ const _tz9NUt = defineEventHandler(async (e) => {
6391
7429
  return {
6392
7430
  runtimeConfig: useRuntimeConfig(e).public["nuxt-link-checker"]
6393
7431
  };
@@ -6395,7 +7433,7 @@ const _IFlV15 = defineEventHandler(async (e) => {
6395
7433
 
6396
7434
  const fileMapping = {};
6397
7435
 
6398
- const _LGeMLz = defineEventHandler(async (e) => {
7436
+ const _vGgZzc = defineEventHandler(async (e) => {
6399
7437
  const path = parseURL(e.path).pathname;
6400
7438
  if (fileMapping[path]) {
6401
7439
  if (path.endsWith(".svg"))
@@ -6728,7 +7766,7 @@ async function getIslandContext(event) {
6728
7766
  return ctx;
6729
7767
  }
6730
7768
 
6731
- const _eFmz18 = eventHandler(async (event) => {
7769
+ const _rFIeAt = eventHandler(async (event) => {
6732
7770
  const collection = getRouterParam(event, "collection");
6733
7771
  setHeader(event, "Content-Type", "text/plain");
6734
7772
  const data = await useStorage().getItem(`build:content:database.compressed.mjs`) || "";
@@ -6746,8 +7784,8 @@ async function decompressSQLDump(base64Str, compressionType = "gzip") {
6746
7784
  const binaryData = Uint8Array.from(atob(base64Str), (c) => c.charCodeAt(0));
6747
7785
  const response = new Response(new Blob([binaryData]));
6748
7786
  const decompressedStream = response.body?.pipeThrough(new DecompressionStream(compressionType));
6749
- const decompressedText = await new Response(decompressedStream).text();
6750
- return decompressedText.split("\n");
7787
+ const text = await new Response(decompressedStream).text();
7788
+ return JSON.parse(text);
6751
7789
  }
6752
7790
 
6753
7791
  function refineContentFields(sql, doc) {
@@ -7010,7 +8048,7 @@ function cleanupQuery(query, options = { removeString: false }) {
7010
8048
  return result;
7011
8049
  }
7012
8050
 
7013
- const _Ye6p8H = eventHandler(async (event) => {
8051
+ const _1L1dwH = eventHandler(async (event) => {
7014
8052
  const { sql } = await readBody(event);
7015
8053
  const collection = getRouterParam(event, "collection");
7016
8054
  assertSafeQuery(sql, collection);
@@ -7021,7 +8059,7 @@ const _Ye6p8H = eventHandler(async (event) => {
7021
8059
  return loadDatabaseAdapter(conf).all(sql);
7022
8060
  });
7023
8061
 
7024
- const _uQBwCY = lazyEventHandler(() => {
8062
+ const _O1mb7t = lazyEventHandler(() => {
7025
8063
  const opts = useRuntimeConfig().ipx || {};
7026
8064
  const fsDir = opts?.fs?.dir ? (Array.isArray(opts.fs.dir) ? opts.fs.dir : [opts.fs.dir]).map((dir) => isAbsolute(dir) ? dir : fileURLToPath(new URL(dir, globalThis._importMeta_.url))) : void 0;
7027
8065
  const fsStorage = opts.fs?.dir ? ipxFSStorage({ ...opts.fs, dir: fsDir }) : void 0;
@@ -7040,46 +8078,47 @@ const _uQBwCY = lazyEventHandler(() => {
7040
8078
  });
7041
8079
 
7042
8080
  const _lazy_u5Dhoc = () => Promise.resolve().then(function () { return neonTest$1; });
7043
- const _lazy_qiBCDg = () => Promise.resolve().then(function () { return renderer$1; });
8081
+ const _lazy_MPEx63 = () => Promise.resolve().then(function () { return renderer$1; });
7044
8082
 
7045
8083
  const handlers = [
8084
+ { route: '', handler: _WLD3jp, lazy: false, middleware: true, method: undefined },
7046
8085
  { route: '/api/neonTest', handler: _lazy_u5Dhoc, lazy: true, middleware: false, method: undefined },
7047
- { route: '/__nuxt_error', handler: _lazy_qiBCDg, lazy: true, middleware: false, method: undefined },
7048
- { route: '', handler: _nGzU2E, lazy: false, middleware: false, method: undefined },
7049
- { route: '', handler: _DBwtAP, lazy: false, middleware: false, method: undefined },
7050
- { route: '', handler: _a3BfBQ, lazy: false, middleware: false, method: undefined },
7051
- { route: '', handler: _4fQwYD, lazy: false, middleware: false, method: undefined },
7052
- { route: '', handler: _DJziEh, lazy: false, middleware: false, method: undefined },
7053
- { route: '/api/_nuxt_icon/:collection', handler: _iea_TL, lazy: false, middleware: false, method: undefined },
8086
+ { route: '/__nuxt_error', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
8087
+ { route: '', handler: _Jp0StA, lazy: false, middleware: false, method: undefined },
8088
+ { route: '', handler: _ji0G_c, lazy: false, middleware: false, method: undefined },
8089
+ { route: '', handler: _SCmHem, lazy: false, middleware: false, method: undefined },
8090
+ { route: '', handler: _umXuS0, lazy: false, middleware: false, method: undefined },
8091
+ { route: '', handler: _dtrJEZ, lazy: false, middleware: false, method: undefined },
8092
+ { route: '/api/_nuxt_icon/:collection', handler: _Vmc_bU, lazy: false, middleware: false, method: undefined },
7054
8093
  { route: '/api/_neon/raw', handler: _mgiUeJ, lazy: false, middleware: false, method: undefined },
7055
8094
  { route: '/api/_neon/count', handler: _BzfLgA, lazy: false, middleware: false, method: undefined },
7056
8095
  { route: '/api/_neon/select', handler: _vZyrES, lazy: false, middleware: false, method: undefined },
7057
8096
  { route: '/api/_neon/insert', handler: _8fc9Bi, lazy: false, middleware: false, method: undefined },
7058
8097
  { route: '/api/_neon/update', handler: _cKepiO, lazy: false, middleware: false, method: undefined },
7059
8098
  { route: '/api/_neon/delete', handler: _ZwvYdn, lazy: false, middleware: false, method: undefined },
7060
- { route: '', handler: _2TCn_1, lazy: false, middleware: true, method: undefined },
7061
- { route: '/__site-config__/debug.json', handler: _ORf4yf, lazy: false, middleware: false, method: undefined },
7062
- { route: '/robots.txt', handler: _0QOObO, lazy: false, middleware: false, method: undefined },
7063
- { route: '', handler: _2nM3bx, lazy: false, middleware: true, method: undefined },
7064
- { route: '/__robots__/debug.json', handler: _4v3OAr, lazy: false, middleware: false, method: undefined },
7065
- { route: '/__robots__/debug-path.json', handler: _QTLJrY, lazy: false, middleware: false, method: undefined },
7066
- { route: '/__sitemap__/nuxt-content-urls.json', handler: _CkQE1q, lazy: false, middleware: false, method: undefined },
7067
- { route: '/__sitemap__/debug.json', handler: _CJfHt9, lazy: false, middleware: false, method: undefined },
7068
- { route: '/__sitemap__/style.xsl', handler: _be_eqJ, lazy: false, middleware: false, method: undefined },
7069
- { route: '/sitemap.xml', handler: _ra8Qej, lazy: false, middleware: false, method: undefined },
7070
- { route: '/__link-checker__/inspect', handler: _DcvS2K, lazy: false, middleware: false, method: undefined },
7071
- { route: '/__link-checker__/links', handler: _Utkbv0, lazy: false, middleware: false, method: undefined },
7072
- { route: '/__link-checker__/debug.json', handler: _IFlV15, lazy: false, middleware: false, method: undefined },
7073
- { route: '', handler: _LGeMLz, lazy: false, middleware: true, method: undefined },
8099
+ { route: '', handler: _XVpHng, lazy: false, middleware: true, method: undefined },
8100
+ { route: '/__site-config__/debug.json', handler: _LgdZze, lazy: false, middleware: false, method: undefined },
8101
+ { route: '/robots.txt', handler: _uMK4YT, lazy: false, middleware: false, method: undefined },
8102
+ { route: '', handler: _XpKgU4, lazy: false, middleware: true, method: undefined },
8103
+ { route: '/__robots__/debug.json', handler: _WlQo7G, lazy: false, middleware: false, method: undefined },
8104
+ { route: '/__robots__/debug-path.json', handler: _MyEbKg, lazy: false, middleware: false, method: undefined },
8105
+ { route: '/__sitemap__/nuxt-content-urls.json', handler: _fUzllO, lazy: false, middleware: false, method: undefined },
8106
+ { route: '/__sitemap__/debug.json', handler: _xIZ_0x, lazy: false, middleware: false, method: undefined },
8107
+ { route: '/__sitemap__/style.xsl', handler: _4BAWff, lazy: false, middleware: false, method: undefined },
8108
+ { route: '/sitemap.xml', handler: _n1jDWd, lazy: false, middleware: false, method: undefined },
8109
+ { route: '/__link-checker__/inspect', handler: _3rIYDU, lazy: false, middleware: false, method: undefined },
8110
+ { route: '/__link-checker__/links', handler: _Rhm_9d, lazy: false, middleware: false, method: undefined },
8111
+ { route: '/__link-checker__/debug.json', handler: _tz9NUt, lazy: false, middleware: false, method: undefined },
8112
+ { route: '', handler: _vGgZzc, lazy: false, middleware: true, method: undefined },
7074
8113
  { route: '/api/_auth/session', handler: _MGSDdR, lazy: false, middleware: false, method: "delete" },
7075
8114
  { route: '/api/_auth/session', handler: _7djcCh, lazy: false, middleware: false, method: "get" },
7076
8115
  { route: '/__nuxt_island/**', handler: _SxA8c9, lazy: false, middleware: false, method: undefined },
7077
- { route: '/__nuxt_content/:collection/sql_dump', handler: _eFmz18, lazy: false, middleware: false, method: undefined },
7078
- { route: '/__nuxt_content/:collection/query', handler: _Ye6p8H, lazy: false, middleware: false, method: undefined },
7079
- { route: '/_ipx/**', handler: _uQBwCY, lazy: false, middleware: false, method: undefined },
7080
- { route: '/_fonts/**', handler: _lazy_qiBCDg, lazy: true, middleware: false, method: undefined },
7081
- { route: '/_scripts/**', handler: _lazy_qiBCDg, lazy: true, middleware: false, method: undefined },
7082
- { route: '/**', handler: _lazy_qiBCDg, lazy: true, middleware: false, method: undefined }
8116
+ { route: '/__nuxt_content/:collection/sql_dump.txt', handler: _rFIeAt, lazy: false, middleware: false, method: undefined },
8117
+ { route: '/__nuxt_content/:collection/query', handler: _1L1dwH, lazy: false, middleware: false, method: undefined },
8118
+ { route: '/_ipx/**', handler: _O1mb7t, lazy: false, middleware: false, method: undefined },
8119
+ { route: '/_fonts/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
8120
+ { route: '/_scripts/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
8121
+ { route: '/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined }
7083
8122
  ];
7084
8123
 
7085
8124
  function createNitroApp() {
@@ -7312,10 +8351,10 @@ const template$1 = (messages) => {
7312
8351
  return '<!DOCTYPE html><html lang="en"><head><title>' + escapeHtml(messages.statusCode) + " - " + escapeHtml(messages.statusMessage || "Internal Server Error") + `</title><meta charset="utf-8"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0" name="viewport"><style>.spotlight{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-40vh;filter:blur(30vh);height:60vh;opacity:.8}*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.pointer-events-none{pointer-events:none}.fixed{position:fixed}.left-0{left:0}.right-0{right:0}.z-10{z-index:10}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.h-auto{height:auto}.min-h-screen{min-height:100vh}.flex{display:flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-black\\/5{background-color:#0000000d}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.pt-14{padding-top:3.5rem}.text-6xl{font-size:3.75rem;line-height:1}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:bg-white\\/10{background-color:#ffffff1a}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:text-8xl{font-size:6rem;line-height:1}}</style><script>!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();<\/script></head><body class="antialiased bg-white dark:bg-black dark:text-white flex flex-col font-sans min-h-screen pt-14 px-10 text-black"><div class="fixed left-0 pointer-events-none right-0 spotlight"></div><h1 class="font-medium mb-6 sm:text-8xl text-6xl">` + escapeHtml(messages.statusCode) + '</h1><p class="font-light leading-tight mb-8 sm:text-2xl text-xl">' + escapeHtml(messages.description) + '</p><div class="bg-black/5 bg-white dark:bg-white/10 flex-1 h-auto overflow-y-auto rounded-t-md"><div class="font-light leading-tight p-8 text-xl z-10">' + escapeHtml(messages.stack) + "</div></div></body></html>";
7313
8352
  };
7314
8353
 
7315
- const errorDev = /*#__PURE__*/Object.freeze({
8354
+ const errorDev = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7316
8355
  __proto__: null,
7317
8356
  template: template$1
7318
- });
8357
+ }, Symbol.toStringTag, { value: 'Module' }));
7319
8358
 
7320
8359
  const sources$1 = [
7321
8360
  {
@@ -7347,51 +8386,51 @@ const sources$1 = [
7347
8386
  },
7348
8387
  "urls": [
7349
8388
  {
7350
- "loc": "/ignis"
8389
+ "loc": "/"
7351
8390
  },
7352
8391
  {
7353
- "loc": "/"
8392
+ "loc": "/_ignis-info"
7354
8393
  },
7355
8394
  {
7356
- "loc": "/second"
8395
+ "loc": "/_ignis-config"
7357
8396
  }
7358
8397
  ],
7359
8398
  "sourceType": "app"
7360
8399
  }
7361
8400
  ];
7362
8401
 
7363
- const globalSources = /*#__PURE__*/Object.freeze({
8402
+ const globalSources = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7364
8403
  __proto__: null,
7365
8404
  sources: sources$1
7366
- });
8405
+ }, Symbol.toStringTag, { value: 'Module' }));
7367
8406
 
7368
8407
  const sources = {};
7369
8408
 
7370
- const childSources = /*#__PURE__*/Object.freeze({
8409
+ const childSources = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7371
8410
  __proto__: null,
7372
8411
  sources: sources
7373
- });
8412
+ }, Symbol.toStringTag, { value: 'Module' }));
7374
8413
 
7375
8414
  const server = () => {};
7376
8415
 
7377
- const server$1 = /*#__PURE__*/Object.freeze({
8416
+ const server$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7378
8417
  __proto__: null,
7379
8418
  default: server
7380
- });
8419
+ }, Symbol.toStringTag, { value: 'Module' }));
7381
8420
 
7382
8421
  const template = "";
7383
8422
 
7384
- const _virtual__spaTemplate = /*#__PURE__*/Object.freeze({
8423
+ const _virtual__spaTemplate = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7385
8424
  __proto__: null,
7386
8425
  template: template
7387
- });
8426
+ }, Symbol.toStringTag, { value: 'Module' }));
7388
8427
 
7389
8428
  const styles = {};
7390
8429
 
7391
- const styles$1 = /*#__PURE__*/Object.freeze({
8430
+ const styles$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7392
8431
  __proto__: null,
7393
8432
  default: styles
7394
- });
8433
+ }, Symbol.toStringTag, { value: 'Module' }));
7395
8434
 
7396
8435
  const neonTest = defineEventHandler(async () => {
7397
8436
  const config = useRuntimeConfig().public.ignis;
@@ -7411,10 +8450,10 @@ const neonTest = defineEventHandler(async () => {
7411
8450
  }
7412
8451
  });
7413
8452
 
7414
- const neonTest$1 = /*#__PURE__*/Object.freeze({
8453
+ const neonTest$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7415
8454
  __proto__: null,
7416
8455
  default: neonTest
7417
- });
8456
+ }, Symbol.toStringTag, { value: 'Module' }));
7418
8457
 
7419
8458
  function renderPayloadResponse(ssrContext) {
7420
8459
  return {
@@ -7551,6 +8590,7 @@ const renderer = defineRenderHandler(async (event) => {
7551
8590
  });
7552
8591
  }
7553
8592
  if (!routeOptions.noScripts) {
8593
+ const tagPosition = "head";
7554
8594
  ssrContext.head.push({
7555
8595
  script: Object.values(scripts).map((resource) => ({
7556
8596
  type: resource.module ? "module" : null,
@@ -7558,7 +8598,7 @@ const renderer = defineRenderHandler(async (event) => {
7558
8598
  defer: resource.module ? null : true,
7559
8599
  // if we are rendering script tag payloads that import an async payload
7560
8600
  // we need to ensure this resolves before executing the Nuxt entry
7561
- tagPosition: "head",
8601
+ tagPosition,
7562
8602
  crossorigin: ""
7563
8603
  }))
7564
8604
  }, headEntryOptions);
@@ -7602,8 +8642,8 @@ function renderHTMLDocument(html) {
7602
8642
  return `<!DOCTYPE html><html${joinAttrs(html.htmlAttrs)}><head>${joinTags(html.head)}</head><body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body></html>`;
7603
8643
  }
7604
8644
 
7605
- const renderer$1 = /*#__PURE__*/Object.freeze({
8645
+ const renderer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
7606
8646
  __proto__: null,
7607
8647
  default: renderer
7608
- });
8648
+ }, Symbol.toStringTag, { value: 'Module' }));
7609
8649
  //# sourceMappingURL=index.mjs.map