error-404-BRnVQQNb.mjs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. import { mergeProps, withCtx, createTextVNode, toDisplayString, defineComponent, shallowRef, h, resolveComponent, computed, useSSRContext } from 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/vue@3.5.14_typescript@5.8.3/node_modules/vue/index.mjs';
  2. import { parseQuery, hasProtocol, joinURL, withTrailingSlash, withoutTrailingSlash } from 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.mjs';
  3. import { _ as _export_sfc, u as useRouter, a as useNuxtApp, r as resolveRouteObject, b as useRuntimeConfig, n as navigateTo, c as nuxtLinkDefaults } from './server.mjs';
  4. import { ssrRenderAttrs, ssrInterpolate, ssrRenderComponent } from 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/vue@3.5.14_typescript@5.8.3/node_modules/vue/server-renderer/index.mjs';
  5. import { u as useHead } from './v3-Xop4u8gK.mjs';
  6. import 'node:http';
  7. import 'node:https';
  8. import 'node:zlib';
  9. import 'node:stream';
  10. import 'node:buffer';
  11. import 'node:util';
  12. import 'node:url';
  13. import 'node:net';
  14. import 'node:fs';
  15. import 'node:path';
  16. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs';
  17. import '../_/renderer.mjs';
  18. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/vue-bundle-renderer@2.1.1/node_modules/vue-bundle-renderer/dist/runtime.mjs';
  19. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/h3@1.15.3/node_modules/h3/dist/index.mjs';
  20. import '../nitro/nitro.mjs';
  21. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs';
  22. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/node.mjs';
  23. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/node-mock-http@1.0.0/node_modules/node-mock-http/dist/index.mjs';
  24. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unstorage@1.16.0_db0@0.3.2_ioredis@5.6.1/node_modules/unstorage/dist/index.mjs';
  25. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unstorage@1.16.0_db0@0.3.2_ioredis@5.6.1/node_modules/unstorage/drivers/fs.mjs';
  26. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unstorage@1.16.0_db0@0.3.2_ioredis@5.6.1/node_modules/unstorage/drivers/fs-lite.mjs';
  27. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unstorage@1.16.0_db0@0.3.2_ioredis@5.6.1/node_modules/unstorage/drivers/lru-cache.mjs';
  28. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs';
  29. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs';
  30. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs';
  31. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs';
  32. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unctx@2.4.1/node_modules/unctx/dist/index.mjs';
  33. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs';
  34. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs';
  35. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unhead@2.0.9/node_modules/unhead/dist/server.mjs';
  36. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/devalue@5.1.1/node_modules/devalue/index.js';
  37. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unhead@2.0.9/node_modules/unhead/dist/utils.mjs';
  38. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/unhead@2.0.9/node_modules/unhead/dist/plugins.mjs';
  39. import 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/vue-router@4.5.1_vue@3.5.14_typescript@5.8.3_/node_modules/vue-router/dist/vue-router.node.mjs';
  40. const firstNonUndefined = (...args) => args.find((arg) => arg !== void 0);
  41. // @__NO_SIDE_EFFECTS__
  42. function defineNuxtLink(options) {
  43. const componentName = options.componentName || "NuxtLink";
  44. function isHashLinkWithoutHashMode(link) {
  45. return typeof link === "string" && link.startsWith("#");
  46. }
  47. function resolveTrailingSlashBehavior(to, resolve, trailingSlash) {
  48. const effectiveTrailingSlash = trailingSlash != null ? trailingSlash : options.trailingSlash;
  49. if (!to || effectiveTrailingSlash !== "append" && effectiveTrailingSlash !== "remove") {
  50. return to;
  51. }
  52. if (typeof to === "string") {
  53. return applyTrailingSlashBehavior(to, effectiveTrailingSlash);
  54. }
  55. const path = "path" in to && to.path !== void 0 ? to.path : resolve(to).path;
  56. const resolvedPath = {
  57. ...to,
  58. name: void 0,
  59. // named routes would otherwise always override trailing slash behavior
  60. path: applyTrailingSlashBehavior(path, effectiveTrailingSlash)
  61. };
  62. return resolvedPath;
  63. }
  64. function useNuxtLink(props) {
  65. var _a, _b, _c;
  66. const router = useRouter();
  67. const config = useRuntimeConfig();
  68. const hasTarget = computed(() => !!props.target && props.target !== "_self");
  69. const isAbsoluteUrl = computed(() => {
  70. const path = props.to || props.href || "";
  71. return typeof path === "string" && hasProtocol(path, { acceptRelative: true });
  72. });
  73. const builtinRouterLink = resolveComponent("RouterLink");
  74. const useBuiltinLink = builtinRouterLink && typeof builtinRouterLink !== "string" ? builtinRouterLink.useLink : void 0;
  75. const isExternal = computed(() => {
  76. if (props.external) {
  77. return true;
  78. }
  79. const path = props.to || props.href || "";
  80. if (typeof path === "object") {
  81. return false;
  82. }
  83. return path === "" || isAbsoluteUrl.value;
  84. });
  85. const to = computed(() => {
  86. const path = props.to || props.href || "";
  87. if (isExternal.value) {
  88. return path;
  89. }
  90. return resolveTrailingSlashBehavior(path, router.resolve, props.trailingSlash);
  91. });
  92. const link = isExternal.value ? void 0 : useBuiltinLink == null ? void 0 : useBuiltinLink({ ...props, to });
  93. const href = computed(() => {
  94. var _a3, _b2;
  95. var _a2;
  96. const effectiveTrailingSlash = (_a3 = props.trailingSlash) != null ? _a3 : options.trailingSlash;
  97. if (!to.value || isAbsoluteUrl.value || isHashLinkWithoutHashMode(to.value)) {
  98. return to.value;
  99. }
  100. if (isExternal.value) {
  101. const path = typeof to.value === "object" && "path" in to.value ? resolveRouteObject(to.value) : to.value;
  102. const href2 = typeof path === "object" ? router.resolve(path).href : path;
  103. return applyTrailingSlashBehavior(href2, effectiveTrailingSlash);
  104. }
  105. if (typeof to.value === "object") {
  106. return (_b2 = (_a2 = router.resolve(to.value)) == null ? void 0 : _a2.href) != null ? _b2 : null;
  107. }
  108. return applyTrailingSlashBehavior(joinURL(config.app.baseURL, to.value), effectiveTrailingSlash);
  109. });
  110. return {
  111. to,
  112. hasTarget,
  113. isAbsoluteUrl,
  114. isExternal,
  115. //
  116. href,
  117. isActive: (_a = link == null ? void 0 : link.isActive) != null ? _a : computed(() => to.value === router.currentRoute.value.path),
  118. isExactActive: (_b = link == null ? void 0 : link.isExactActive) != null ? _b : computed(() => to.value === router.currentRoute.value.path),
  119. route: (_c = link == null ? void 0 : link.route) != null ? _c : computed(() => router.resolve(to.value)),
  120. async navigate(_e) {
  121. await navigateTo(href.value, { replace: props.replace, external: isExternal.value || hasTarget.value });
  122. }
  123. };
  124. }
  125. return defineComponent({
  126. name: componentName,
  127. props: {
  128. // Routing
  129. to: {
  130. type: [String, Object],
  131. default: void 0,
  132. required: false
  133. },
  134. href: {
  135. type: [String, Object],
  136. default: void 0,
  137. required: false
  138. },
  139. // Attributes
  140. target: {
  141. type: String,
  142. default: void 0,
  143. required: false
  144. },
  145. rel: {
  146. type: String,
  147. default: void 0,
  148. required: false
  149. },
  150. noRel: {
  151. type: Boolean,
  152. default: void 0,
  153. required: false
  154. },
  155. // Prefetching
  156. prefetch: {
  157. type: Boolean,
  158. default: void 0,
  159. required: false
  160. },
  161. prefetchOn: {
  162. type: [String, Object],
  163. default: void 0,
  164. required: false
  165. },
  166. noPrefetch: {
  167. type: Boolean,
  168. default: void 0,
  169. required: false
  170. },
  171. // Styling
  172. activeClass: {
  173. type: String,
  174. default: void 0,
  175. required: false
  176. },
  177. exactActiveClass: {
  178. type: String,
  179. default: void 0,
  180. required: false
  181. },
  182. prefetchedClass: {
  183. type: String,
  184. default: void 0,
  185. required: false
  186. },
  187. // Vue Router's `<RouterLink>` additional props
  188. replace: {
  189. type: Boolean,
  190. default: void 0,
  191. required: false
  192. },
  193. ariaCurrentValue: {
  194. type: String,
  195. default: void 0,
  196. required: false
  197. },
  198. // Edge cases handling
  199. external: {
  200. type: Boolean,
  201. default: void 0,
  202. required: false
  203. },
  204. // Slot API
  205. custom: {
  206. type: Boolean,
  207. default: void 0,
  208. required: false
  209. },
  210. // Behavior
  211. trailingSlash: {
  212. type: String,
  213. default: void 0,
  214. required: false
  215. }
  216. },
  217. useLink: useNuxtLink,
  218. setup(props, { slots }) {
  219. useRouter();
  220. const { to, href, navigate, isExternal, hasTarget, isAbsoluteUrl } = useNuxtLink(props);
  221. shallowRef(false);
  222. const el = void 0;
  223. const elRef = void 0;
  224. async function prefetch(nuxtApp = useNuxtApp()) {
  225. {
  226. return;
  227. }
  228. }
  229. return () => {
  230. var _a;
  231. if (!isExternal.value && !hasTarget.value && !isHashLinkWithoutHashMode(to.value)) {
  232. const routerLinkProps = {
  233. ref: elRef,
  234. to: to.value,
  235. activeClass: props.activeClass || options.activeClass,
  236. exactActiveClass: props.exactActiveClass || options.exactActiveClass,
  237. replace: props.replace,
  238. ariaCurrentValue: props.ariaCurrentValue,
  239. custom: props.custom
  240. };
  241. if (!props.custom) {
  242. routerLinkProps.rel = props.rel || void 0;
  243. }
  244. return h(
  245. resolveComponent("RouterLink"),
  246. routerLinkProps,
  247. slots.default
  248. );
  249. }
  250. const target = props.target || null;
  251. const rel = firstNonUndefined(
  252. // converts `""` to `null` to prevent the attribute from being added as empty (`rel=""`)
  253. props.noRel ? "" : props.rel,
  254. options.externalRelAttribute,
  255. /*
  256. * A fallback rel of `noopener noreferrer` is applied for external links or links that open in a new tab.
  257. * This solves a reverse tabnapping security flaw in browsers pre-2021 as well as improving privacy.
  258. */
  259. isAbsoluteUrl.value || hasTarget.value ? "noopener noreferrer" : ""
  260. ) || null;
  261. if (props.custom) {
  262. if (!slots.default) {
  263. return null;
  264. }
  265. return slots.default({
  266. href: href.value,
  267. navigate,
  268. prefetch,
  269. get route() {
  270. if (!href.value) {
  271. return void 0;
  272. }
  273. const url = new URL(href.value, "http://localhost");
  274. return {
  275. path: url.pathname,
  276. fullPath: url.pathname,
  277. get query() {
  278. return parseQuery(url.search);
  279. },
  280. hash: url.hash,
  281. params: {},
  282. name: void 0,
  283. matched: [],
  284. redirectedFrom: void 0,
  285. meta: {},
  286. href: href.value
  287. };
  288. },
  289. rel,
  290. target,
  291. isExternal: isExternal.value || hasTarget.value,
  292. isActive: false,
  293. isExactActive: false
  294. });
  295. }
  296. return h("a", { ref: el, href: href.value || null, rel, target }, (_a = slots.default) == null ? void 0 : _a.call(slots));
  297. };
  298. }
  299. // }) as unknown as DefineComponent<NuxtLinkProps, object, object, ComputedOptions, MethodOptions, object, object, EmitsOptions, string, object, NuxtLinkProps, object, SlotsType<NuxtLinkSlots>>
  300. });
  301. }
  302. const __nuxt_component_0 = /* @__PURE__ */ defineNuxtLink(nuxtLinkDefaults);
  303. function applyTrailingSlashBehavior(to, trailingSlash) {
  304. const normalizeFn = trailingSlash === "append" ? withTrailingSlash : withoutTrailingSlash;
  305. const hasProtocolDifferentFromHttp = hasProtocol(to) && !to.startsWith("http");
  306. if (hasProtocolDifferentFromHttp) {
  307. return to;
  308. }
  309. return normalizeFn(to, true);
  310. }
  311. const _sfc_main = {
  312. __name: "error-404",
  313. __ssrInlineRender: true,
  314. props: {
  315. appName: {
  316. type: String,
  317. default: "Nuxt"
  318. },
  319. version: {
  320. type: String,
  321. default: ""
  322. },
  323. statusCode: {
  324. type: Number,
  325. default: 404
  326. },
  327. statusMessage: {
  328. type: String,
  329. default: "Not Found"
  330. },
  331. description: {
  332. type: String,
  333. default: "Sorry, the page you are looking for could not be found."
  334. },
  335. backHome: {
  336. type: String,
  337. default: "Go back home"
  338. }
  339. },
  340. setup(__props) {
  341. const props = __props;
  342. useHead({
  343. title: `${props.statusCode} - ${props.statusMessage} | ${props.appName}`,
  344. script: [
  345. {
  346. innerHTML: `!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)}}();`
  347. }
  348. ],
  349. style: [
  350. {
  351. innerHTML: `*,: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}a{color:inherit;text-decoration: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: }`
  352. }
  353. ]
  354. });
  355. return (_ctx, _push, _parent, _attrs) => {
  356. const _component_NuxtLink = __nuxt_component_0;
  357. _push(`<div${ssrRenderAttrs(mergeProps({ class: "antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black" }, _attrs))} data-v-90ff7bf9><div class="fixed left-0 right-0 spotlight z-10" data-v-90ff7bf9></div><div class="max-w-520px text-center z-20" data-v-90ff7bf9><h1 class="font-medium mb-8 sm:text-10xl text-8xl" data-v-90ff7bf9>${ssrInterpolate(__props.statusCode)}</h1><p class="font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl" data-v-90ff7bf9>${ssrInterpolate(__props.description)}</p><div class="flex items-center justify-center w-full" data-v-90ff7bf9>`);
  358. _push(ssrRenderComponent(_component_NuxtLink, {
  359. to: "/",
  360. class: "cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"
  361. }, {
  362. default: withCtx((_, _push2, _parent2, _scopeId) => {
  363. if (_push2) {
  364. _push2(`${ssrInterpolate(__props.backHome)}`);
  365. } else {
  366. return [
  367. createTextVNode(toDisplayString(__props.backHome), 1)
  368. ];
  369. }
  370. }),
  371. _: 1
  372. }, _parent));
  373. _push(`</div></div></div>`);
  374. };
  375. }
  376. };
  377. const _sfc_setup = _sfc_main.setup;
  378. _sfc_main.setup = (props, ctx) => {
  379. const ssrContext = useSSRContext();
  380. (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/.pnpm/nuxt@3.17.4_@parcel+watcher@2.5.1_@types+node@22.15.21_db0@0.3.2_ioredis@5.6.1_magicast_e2b60321bafda6f7a9390f7ac7478d38/node_modules/nuxt/dist/app/components/error-404.vue");
  381. return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
  382. };
  383. const error404 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-90ff7bf9"]]);
  384. export { error404 as default };
  385. //# sourceMappingURL=error-404-BRnVQQNb.mjs.map