yansu 0.0.0-beta.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 (142) hide show
  1. package/README.md +1 -0
  2. package/bin.mjs +18 -0
  3. package/dist/cli.d.mts +2 -0
  4. package/dist/cli.mjs +68 -0
  5. package/dist/dirs.d.mts +4 -0
  6. package/dist/dirs.mjs +6 -0
  7. package/dist/index.d.mts +78 -0
  8. package/dist/index.mjs +121 -0
  9. package/dist/nitro.json +15 -0
  10. package/dist/public/_nuxt/BHIHUtPz.js +4 -0
  11. package/dist/public/_nuxt/CCgOhniq.js +1 -0
  12. package/dist/public/_nuxt/CR6vfq1R.js +1 -0
  13. package/dist/public/_nuxt/DmxzK6E8.js +1 -0
  14. package/dist/public/_nuxt/builds/latest.json +1 -0
  15. package/dist/public/_nuxt/builds/meta/e9079134-f314-434b-b3a7-092c4a1e187d.json +1 -0
  16. package/dist/public/_nuxt/entry.DJ3VOi_0.css +1 -0
  17. package/dist/public/_nuxt/error-404.lC6KBLNm.css +1 -0
  18. package/dist/public/_nuxt/error-500.NtBcR2wE.css +1 -0
  19. package/dist/server/chunks/_/error-500.mjs +9 -0
  20. package/dist/server/chunks/build/_plugin-vue_export-helper-DjsbPc54.mjs +29 -0
  21. package/dist/server/chunks/build/client.precomputed.mjs +3 -0
  22. package/dist/server/chunks/build/error-404-Du0ot2hm.mjs +369 -0
  23. package/dist/server/chunks/build/error-500-Y3RUV6n2.mjs +73 -0
  24. package/dist/server/chunks/build/server.mjs +727 -0
  25. package/dist/server/chunks/nitro/nitro.mjs +5176 -0
  26. package/dist/server/chunks/routes/api/metadata.json.mjs +147 -0
  27. package/dist/server/chunks/routes/api/platform.json.mjs +20 -0
  28. package/dist/server/chunks/routes/renderer.mjs +408 -0
  29. package/dist/server/chunks/virtual/_virtual_spa-template.mjs +3 -0
  30. package/dist/server/index.mjs +9 -0
  31. package/dist/server/node_modules/.nitro/@vue/shared@3.5.25/dist/shared.cjs.prod.js +604 -0
  32. package/dist/server/node_modules/.nitro/@vue/shared@3.5.25/package.json +47 -0
  33. package/dist/server/node_modules/.nitro/@vue/shared@3.5.26/dist/shared.cjs.prod.js +604 -0
  34. package/dist/server/node_modules/.nitro/@vue/shared@3.5.26/package.json +47 -0
  35. package/dist/server/node_modules/@babel/parser/lib/index.js +14662 -0
  36. package/dist/server/node_modules/@babel/parser/package.json +50 -0
  37. package/dist/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
  38. package/dist/server/node_modules/@vue/compiler-core/package.json +58 -0
  39. package/dist/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  40. package/dist/server/node_modules/@vue/compiler-dom/package.json +57 -0
  41. package/dist/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  42. package/dist/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  43. package/dist/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1853 -0
  44. package/dist/server/node_modules/@vue/reactivity/package.json +55 -0
  45. package/dist/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6770 -0
  46. package/dist/server/node_modules/@vue/runtime-core/package.json +52 -0
  47. package/dist/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1732 -0
  48. package/dist/server/node_modules/@vue/runtime-dom/package.json +60 -0
  49. package/dist/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +879 -0
  50. package/dist/server/node_modules/@vue/server-renderer/package.json +55 -0
  51. package/dist/server/node_modules/ansis/index.cjs +1 -0
  52. package/dist/server/node_modules/ansis/index.mjs +1 -0
  53. package/dist/server/node_modules/ansis/package.json +25 -0
  54. package/dist/server/node_modules/birpc/dist/index.mjs +173 -0
  55. package/dist/server/node_modules/birpc/package.json +56 -0
  56. package/dist/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  57. package/dist/server/node_modules/consola/dist/core.mjs +512 -0
  58. package/dist/server/node_modules/consola/dist/index.mjs +651 -0
  59. package/dist/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  60. package/dist/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  61. package/dist/server/node_modules/consola/package.json +136 -0
  62. package/dist/server/node_modules/devalue/index.js +4 -0
  63. package/dist/server/node_modules/devalue/package.json +37 -0
  64. package/dist/server/node_modules/devalue/src/base64.js +110 -0
  65. package/dist/server/node_modules/devalue/src/constants.js +6 -0
  66. package/dist/server/node_modules/devalue/src/parse.js +205 -0
  67. package/dist/server/node_modules/devalue/src/stringify.js +265 -0
  68. package/dist/server/node_modules/devalue/src/uneval.js +407 -0
  69. package/dist/server/node_modules/devalue/src/utils.js +118 -0
  70. package/dist/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  71. package/dist/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  72. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  73. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  74. package/dist/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  75. package/dist/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  76. package/dist/server/node_modules/entities/dist/commonjs/package.json +3 -0
  77. package/dist/server/node_modules/entities/package.json +113 -0
  78. package/dist/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  79. package/dist/server/node_modules/estree-walker/package.json +37 -0
  80. package/dist/server/node_modules/get-port-please/dist/index.mjs +430 -0
  81. package/dist/server/node_modules/get-port-please/package.json +39 -0
  82. package/dist/server/node_modules/hookable/dist/index.mjs +290 -0
  83. package/dist/server/node_modules/hookable/package.json +49 -0
  84. package/dist/server/node_modules/source-map-js/lib/array-set.js +121 -0
  85. package/dist/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  86. package/dist/server/node_modules/source-map-js/lib/base64.js +67 -0
  87. package/dist/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  88. package/dist/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  89. package/dist/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  90. package/dist/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  91. package/dist/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  92. package/dist/server/node_modules/source-map-js/lib/source-node.js +413 -0
  93. package/dist/server/node_modules/source-map-js/lib/util.js +594 -0
  94. package/dist/server/node_modules/source-map-js/package.json +71 -0
  95. package/dist/server/node_modules/source-map-js/source-map.js +8 -0
  96. package/dist/server/node_modules/structured-clone-es/dist/index.mjs +285 -0
  97. package/dist/server/node_modules/structured-clone-es/package.json +56 -0
  98. package/dist/server/node_modules/ufo/dist/index.mjs +638 -0
  99. package/dist/server/node_modules/ufo/package.json +47 -0
  100. package/dist/server/node_modules/unhead/dist/index.mjs +9 -0
  101. package/dist/server/node_modules/unhead/dist/parser.mjs +508 -0
  102. package/dist/server/node_modules/unhead/dist/plugins.mjs +101 -0
  103. package/dist/server/node_modules/unhead/dist/scripts.mjs +30 -0
  104. package/dist/server/node_modules/unhead/dist/server.mjs +182 -0
  105. package/dist/server/node_modules/unhead/dist/shared/unhead.B578PsDV.mjs +266 -0
  106. package/dist/server/node_modules/unhead/dist/shared/unhead.BPM0-cfG.mjs +44 -0
  107. package/dist/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  108. package/dist/server/node_modules/unhead/dist/shared/unhead.BpRRHAhY.mjs +194 -0
  109. package/dist/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
  110. package/dist/server/node_modules/unhead/dist/shared/unhead.DH45uomy.mjs +180 -0
  111. package/dist/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  112. package/dist/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
  113. package/dist/server/node_modules/unhead/dist/shared/unhead.Djo8ep_Y.mjs +166 -0
  114. package/dist/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  115. package/dist/server/node_modules/unhead/dist/utils.mjs +5 -0
  116. package/dist/server/node_modules/unhead/package.json +105 -0
  117. package/dist/server/node_modules/vue/dist/vue.cjs.js +80 -0
  118. package/dist/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  119. package/dist/server/node_modules/vue/index.js +7 -0
  120. package/dist/server/node_modules/vue/index.mjs +1 -0
  121. package/dist/server/node_modules/vue/package.json +112 -0
  122. package/dist/server/node_modules/vue/server-renderer/index.mjs +1 -0
  123. package/dist/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
  124. package/dist/server/node_modules/vue-bundle-renderer/package.json +55 -0
  125. package/dist/server/node_modules/ws/lib/buffer-util.js +131 -0
  126. package/dist/server/node_modules/ws/lib/constants.js +19 -0
  127. package/dist/server/node_modules/ws/lib/event-target.js +292 -0
  128. package/dist/server/node_modules/ws/lib/extension.js +203 -0
  129. package/dist/server/node_modules/ws/lib/limiter.js +55 -0
  130. package/dist/server/node_modules/ws/lib/permessage-deflate.js +528 -0
  131. package/dist/server/node_modules/ws/lib/receiver.js +706 -0
  132. package/dist/server/node_modules/ws/lib/sender.js +602 -0
  133. package/dist/server/node_modules/ws/lib/stream.js +161 -0
  134. package/dist/server/node_modules/ws/lib/subprotocol.js +62 -0
  135. package/dist/server/node_modules/ws/lib/validation.js +152 -0
  136. package/dist/server/node_modules/ws/lib/websocket-server.js +554 -0
  137. package/dist/server/node_modules/ws/lib/websocket.js +1393 -0
  138. package/dist/server/node_modules/ws/package.json +69 -0
  139. package/dist/server/node_modules/ws/wrapper.mjs +8 -0
  140. package/dist/server/package.json +32 -0
  141. package/dist/shared/yansu.DmdNF4qf.mjs +151 -0
  142. package/package.json +50 -0
@@ -0,0 +1,727 @@
1
+ import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { hasInjectionContext, getCurrentInstance, defineComponent, useSSRContext, createApp, mergeProps, provide, toRef, onErrorCaptured, onServerPrefetch, unref, createVNode, resolveDynamicComponent, shallowReactive, reactive, effectScope, computed, h, isReadonly, isRef, isShallow, isReactive, toRaw, inject, defineAsyncComponent, getCurrentScope } from 'vue';
2
+ import { l as hasProtocol, m as isScriptProtocol, n as joinURL, w as withQuery, s as sanitizeStatusCode, o as getContext, $ as $fetch, p as createHooks, e as createError$1, q as isEqual, r as stringifyParsedURL, t as stringifyQuery, v as parseQuery, x as toRouteMatcher, y as createRouter, z as defu } from '../nitro/nitro.mjs';
3
+ import { b as baseURL } from '../routes/renderer.mjs';
4
+ import { ssrRenderAttrs, ssrRenderSuspense, ssrRenderComponent, ssrRenderVNode } from 'vue/server-renderer';
5
+ import 'node:http';
6
+ import 'node:https';
7
+ import 'node:events';
8
+ import 'node:buffer';
9
+ import 'node:fs';
10
+ import 'node:path';
11
+ import 'node:crypto';
12
+ import 'node:url';
13
+ import 'vue-bundle-renderer/runtime';
14
+ import 'unhead/server';
15
+ import 'devalue';
16
+ import 'unhead/utils';
17
+
18
+ if (!globalThis.$fetch) {
19
+ globalThis.$fetch = $fetch.create({
20
+ baseURL: baseURL()
21
+ });
22
+ }
23
+ if (!("global" in globalThis)) {
24
+ globalThis.global = globalThis;
25
+ }
26
+ const nuxtLinkDefaults = { "componentName": "NuxtLink" };
27
+ const appId = "nuxt-app";
28
+ function getNuxtAppCtx(id = appId) {
29
+ return getContext(id, {
30
+ asyncContext: false
31
+ });
32
+ }
33
+ const NuxtPluginIndicator = "__nuxt_plugin";
34
+ function createNuxtApp(options) {
35
+ let hydratingCount = 0;
36
+ const nuxtApp = {
37
+ _id: options.id || appId || "nuxt-app",
38
+ _scope: effectScope(),
39
+ provide: void 0,
40
+ versions: {
41
+ get nuxt() {
42
+ return "4.2.2";
43
+ },
44
+ get vue() {
45
+ return nuxtApp.vueApp.version;
46
+ }
47
+ },
48
+ payload: shallowReactive({
49
+ ...options.ssrContext?.payload || {},
50
+ data: shallowReactive({}),
51
+ state: reactive({}),
52
+ once: /* @__PURE__ */ new Set(),
53
+ _errors: shallowReactive({})
54
+ }),
55
+ static: {
56
+ data: {}
57
+ },
58
+ runWithContext(fn) {
59
+ if (nuxtApp._scope.active && !getCurrentScope()) {
60
+ return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn));
61
+ }
62
+ return callWithNuxt(nuxtApp, fn);
63
+ },
64
+ isHydrating: false,
65
+ deferHydration() {
66
+ if (!nuxtApp.isHydrating) {
67
+ return () => {
68
+ };
69
+ }
70
+ hydratingCount++;
71
+ let called = false;
72
+ return () => {
73
+ if (called) {
74
+ return;
75
+ }
76
+ called = true;
77
+ hydratingCount--;
78
+ if (hydratingCount === 0) {
79
+ nuxtApp.isHydrating = false;
80
+ return nuxtApp.callHook("app:suspense:resolve");
81
+ }
82
+ };
83
+ },
84
+ _asyncDataPromises: {},
85
+ _asyncData: shallowReactive({}),
86
+ _payloadRevivers: {},
87
+ ...options
88
+ };
89
+ {
90
+ nuxtApp.payload.serverRendered = true;
91
+ }
92
+ if (nuxtApp.ssrContext) {
93
+ nuxtApp.payload.path = nuxtApp.ssrContext.url;
94
+ nuxtApp.ssrContext.nuxt = nuxtApp;
95
+ nuxtApp.ssrContext.payload = nuxtApp.payload;
96
+ nuxtApp.ssrContext.config = {
97
+ public: nuxtApp.ssrContext.runtimeConfig.public,
98
+ app: nuxtApp.ssrContext.runtimeConfig.app
99
+ };
100
+ }
101
+ nuxtApp.hooks = createHooks();
102
+ nuxtApp.hook = nuxtApp.hooks.hook;
103
+ {
104
+ const contextCaller = async function(hooks, args) {
105
+ for (const hook of hooks) {
106
+ await nuxtApp.runWithContext(() => hook(...args));
107
+ }
108
+ };
109
+ nuxtApp.hooks.callHook = (name, ...args) => nuxtApp.hooks.callHookWith(contextCaller, name, ...args);
110
+ }
111
+ nuxtApp.callHook = nuxtApp.hooks.callHook;
112
+ nuxtApp.provide = (name, value) => {
113
+ const $name = "$" + name;
114
+ defineGetter(nuxtApp, $name, value);
115
+ defineGetter(nuxtApp.vueApp.config.globalProperties, $name, value);
116
+ };
117
+ defineGetter(nuxtApp.vueApp, "$nuxt", nuxtApp);
118
+ defineGetter(nuxtApp.vueApp.config.globalProperties, "$nuxt", nuxtApp);
119
+ const runtimeConfig = options.ssrContext.runtimeConfig;
120
+ nuxtApp.provide("config", runtimeConfig);
121
+ return nuxtApp;
122
+ }
123
+ function registerPluginHooks(nuxtApp, plugin) {
124
+ if (plugin.hooks) {
125
+ nuxtApp.hooks.addHooks(plugin.hooks);
126
+ }
127
+ }
128
+ async function applyPlugin(nuxtApp, plugin) {
129
+ if (typeof plugin === "function") {
130
+ const { provide: provide2 } = await nuxtApp.runWithContext(() => plugin(nuxtApp)) || {};
131
+ if (provide2 && typeof provide2 === "object") {
132
+ for (const key in provide2) {
133
+ nuxtApp.provide(key, provide2[key]);
134
+ }
135
+ }
136
+ }
137
+ }
138
+ async function applyPlugins(nuxtApp, plugins2) {
139
+ const resolvedPlugins = /* @__PURE__ */ new Set();
140
+ const unresolvedPlugins = [];
141
+ const parallels = [];
142
+ let error = void 0;
143
+ let promiseDepth = 0;
144
+ async function executePlugin(plugin) {
145
+ const unresolvedPluginsForThisPlugin = plugin.dependsOn?.filter((name) => plugins2.some((p) => p._name === name) && !resolvedPlugins.has(name)) ?? [];
146
+ if (unresolvedPluginsForThisPlugin.length > 0) {
147
+ unresolvedPlugins.push([new Set(unresolvedPluginsForThisPlugin), plugin]);
148
+ } else {
149
+ const promise = applyPlugin(nuxtApp, plugin).then(async () => {
150
+ if (plugin._name) {
151
+ resolvedPlugins.add(plugin._name);
152
+ await Promise.all(unresolvedPlugins.map(async ([dependsOn, unexecutedPlugin]) => {
153
+ if (dependsOn.has(plugin._name)) {
154
+ dependsOn.delete(plugin._name);
155
+ if (dependsOn.size === 0) {
156
+ promiseDepth++;
157
+ await executePlugin(unexecutedPlugin);
158
+ }
159
+ }
160
+ }));
161
+ }
162
+ }).catch((e) => {
163
+ if (!plugin.parallel && !nuxtApp.payload.error) {
164
+ throw e;
165
+ }
166
+ error ||= e;
167
+ });
168
+ if (plugin.parallel) {
169
+ parallels.push(promise);
170
+ } else {
171
+ await promise;
172
+ }
173
+ }
174
+ }
175
+ for (const plugin of plugins2) {
176
+ if (nuxtApp.ssrContext?.islandContext && plugin.env?.islands === false) {
177
+ continue;
178
+ }
179
+ registerPluginHooks(nuxtApp, plugin);
180
+ }
181
+ for (const plugin of plugins2) {
182
+ if (nuxtApp.ssrContext?.islandContext && plugin.env?.islands === false) {
183
+ continue;
184
+ }
185
+ await executePlugin(plugin);
186
+ }
187
+ await Promise.all(parallels);
188
+ if (promiseDepth) {
189
+ for (let i = 0; i < promiseDepth; i++) {
190
+ await Promise.all(parallels);
191
+ }
192
+ }
193
+ if (error) {
194
+ throw nuxtApp.payload.error || error;
195
+ }
196
+ }
197
+ // @__NO_SIDE_EFFECTS__
198
+ function defineNuxtPlugin(plugin) {
199
+ if (typeof plugin === "function") {
200
+ return plugin;
201
+ }
202
+ const _name = plugin._name || plugin.name;
203
+ delete plugin.name;
204
+ return Object.assign(plugin.setup || (() => {
205
+ }), plugin, { [NuxtPluginIndicator]: true, _name });
206
+ }
207
+ function callWithNuxt(nuxt, setup, args) {
208
+ const fn = () => setup();
209
+ const nuxtAppCtx = getNuxtAppCtx(nuxt._id);
210
+ {
211
+ return nuxt.vueApp.runWithContext(() => nuxtAppCtx.callAsync(nuxt, fn));
212
+ }
213
+ }
214
+ function tryUseNuxtApp(id) {
215
+ let nuxtAppInstance;
216
+ if (hasInjectionContext()) {
217
+ nuxtAppInstance = getCurrentInstance()?.appContext.app.$nuxt;
218
+ }
219
+ nuxtAppInstance ||= getNuxtAppCtx(id).tryUse();
220
+ return nuxtAppInstance || null;
221
+ }
222
+ function useNuxtApp(id) {
223
+ const nuxtAppInstance = tryUseNuxtApp(id);
224
+ if (!nuxtAppInstance) {
225
+ {
226
+ throw new Error("[nuxt] instance unavailable");
227
+ }
228
+ }
229
+ return nuxtAppInstance;
230
+ }
231
+ // @__NO_SIDE_EFFECTS__
232
+ function useRuntimeConfig(_event) {
233
+ return useNuxtApp().$config;
234
+ }
235
+ function defineGetter(obj, key, val) {
236
+ Object.defineProperty(obj, key, { get: () => val });
237
+ }
238
+ const PageRouteSymbol = /* @__PURE__ */ Symbol("route");
239
+ globalThis._importMeta_.url.replace(/\/app\/.*$/, "/");
240
+ const useRouter = () => {
241
+ return useNuxtApp()?.$router;
242
+ };
243
+ const useRoute = () => {
244
+ if (hasInjectionContext()) {
245
+ return inject(PageRouteSymbol, useNuxtApp()._route);
246
+ }
247
+ return useNuxtApp()._route;
248
+ };
249
+ // @__NO_SIDE_EFFECTS__
250
+ function defineNuxtRouteMiddleware(middleware) {
251
+ return middleware;
252
+ }
253
+ const isProcessingMiddleware = () => {
254
+ try {
255
+ if (useNuxtApp()._processingMiddleware) {
256
+ return true;
257
+ }
258
+ } catch {
259
+ return false;
260
+ }
261
+ return false;
262
+ };
263
+ const URL_QUOTE_RE = /"/g;
264
+ const navigateTo = (to, options) => {
265
+ to ||= "/";
266
+ const toPath = typeof to === "string" ? to : "path" in to ? resolveRouteObject(to) : useRouter().resolve(to).href;
267
+ const isExternalHost = hasProtocol(toPath, { acceptRelative: true });
268
+ const isExternal = options?.external || isExternalHost;
269
+ if (isExternal) {
270
+ if (!options?.external) {
271
+ throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");
272
+ }
273
+ const { protocol } = new URL(toPath, "http://localhost");
274
+ if (protocol && isScriptProtocol(protocol)) {
275
+ throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`);
276
+ }
277
+ }
278
+ const inMiddleware = isProcessingMiddleware();
279
+ const router = useRouter();
280
+ const nuxtApp = useNuxtApp();
281
+ {
282
+ if (nuxtApp.ssrContext) {
283
+ const fullPath = typeof to === "string" || isExternal ? toPath : router.resolve(to).fullPath || "/";
284
+ const location2 = isExternal ? toPath : joinURL((/* @__PURE__ */ useRuntimeConfig()).app.baseURL, fullPath);
285
+ const redirect = async function(response) {
286
+ await nuxtApp.callHook("app:redirected");
287
+ const encodedLoc = location2.replace(URL_QUOTE_RE, "%22");
288
+ const encodedHeader = encodeURL(location2, isExternalHost);
289
+ nuxtApp.ssrContext._renderResponse = {
290
+ statusCode: sanitizeStatusCode(options?.redirectCode || 302, 302),
291
+ body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
292
+ headers: { location: encodedHeader }
293
+ };
294
+ return response;
295
+ };
296
+ if (!isExternal && inMiddleware) {
297
+ router.afterEach((final) => final.fullPath === fullPath ? redirect(false) : void 0);
298
+ return to;
299
+ }
300
+ return redirect(!inMiddleware ? void 0 : (
301
+ /* abort route navigation */
302
+ false
303
+ ));
304
+ }
305
+ }
306
+ if (isExternal) {
307
+ nuxtApp._scope.stop();
308
+ if (options?.replace) {
309
+ (void 0).replace(toPath);
310
+ } else {
311
+ (void 0).href = toPath;
312
+ }
313
+ if (inMiddleware) {
314
+ if (!nuxtApp.isHydrating) {
315
+ return false;
316
+ }
317
+ return new Promise(() => {
318
+ });
319
+ }
320
+ return Promise.resolve();
321
+ }
322
+ return options?.replace ? router.replace(to) : router.push(to);
323
+ };
324
+ function resolveRouteObject(to) {
325
+ return withQuery(to.path || "", to.query || {}) + (to.hash || "");
326
+ }
327
+ function encodeURL(location2, isExternalHost = false) {
328
+ const url = new URL(location2, "http://localhost");
329
+ if (!isExternalHost) {
330
+ return url.pathname + url.search + url.hash;
331
+ }
332
+ if (location2.startsWith("//")) {
333
+ return url.toString().replace(url.protocol, "");
334
+ }
335
+ return url.toString();
336
+ }
337
+ const NUXT_ERROR_SIGNATURE = "__nuxt_error";
338
+ const useError = /* @__NO_SIDE_EFFECTS__ */ () => toRef(useNuxtApp().payload, "error");
339
+ const showError = (error) => {
340
+ const nuxtError = createError(error);
341
+ try {
342
+ const error2 = /* @__PURE__ */ useError();
343
+ if (false) ;
344
+ error2.value ||= nuxtError;
345
+ } catch {
346
+ throw nuxtError;
347
+ }
348
+ return nuxtError;
349
+ };
350
+ const isNuxtError = (error) => !!error && typeof error === "object" && NUXT_ERROR_SIGNATURE in error;
351
+ const createError = (error) => {
352
+ const nuxtError = createError$1(error);
353
+ Object.defineProperty(nuxtError, NUXT_ERROR_SIGNATURE, {
354
+ value: true,
355
+ configurable: false,
356
+ writable: false
357
+ });
358
+ return nuxtError;
359
+ };
360
+ const unhead_taBzb1aCCXzNs2Jlf2QAry8sIkJSPbtRBd5i2u2OOok = /* @__PURE__ */ defineNuxtPlugin({
361
+ name: "nuxt:head",
362
+ enforce: "pre",
363
+ setup(nuxtApp) {
364
+ const head = nuxtApp.ssrContext.head;
365
+ nuxtApp.vueApp.use(head);
366
+ }
367
+ });
368
+ async function getRouteRules(arg) {
369
+ const path = typeof arg === "string" ? arg : arg.path;
370
+ {
371
+ useNuxtApp().ssrContext._preloadManifest = true;
372
+ const _routeRulesMatcher = toRouteMatcher(
373
+ createRouter({ routes: (/* @__PURE__ */ useRuntimeConfig()).nitro.routeRules })
374
+ );
375
+ return defu({}, ..._routeRulesMatcher.matchAll(path).reverse());
376
+ }
377
+ }
378
+ const manifest_45route_45rule = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to) => {
379
+ {
380
+ return;
381
+ }
382
+ });
383
+ const globalMiddleware = [
384
+ manifest_45route_45rule
385
+ ];
386
+ function getRouteFromPath(fullPath) {
387
+ const route = fullPath && typeof fullPath === "object" ? fullPath : {};
388
+ if (typeof fullPath === "object") {
389
+ fullPath = stringifyParsedURL({
390
+ pathname: fullPath.path || "",
391
+ search: stringifyQuery(fullPath.query || {}),
392
+ hash: fullPath.hash || ""
393
+ });
394
+ }
395
+ const url = new URL(fullPath.toString(), "http://localhost");
396
+ return {
397
+ path: url.pathname,
398
+ fullPath,
399
+ query: parseQuery(url.search),
400
+ hash: url.hash,
401
+ // stub properties for compat with vue-router
402
+ params: route.params || {},
403
+ name: void 0,
404
+ matched: route.matched || [],
405
+ redirectedFrom: void 0,
406
+ meta: route.meta || {},
407
+ href: fullPath
408
+ };
409
+ }
410
+ const router_Jne1ChYCZ2JGomD50zg6_3UhN_iibUJD0_Y1PJa04Zw = /* @__PURE__ */ defineNuxtPlugin({
411
+ name: "nuxt:router",
412
+ enforce: "pre",
413
+ setup(nuxtApp) {
414
+ const initialURL = nuxtApp.ssrContext.url;
415
+ const routes = [];
416
+ const hooks = {
417
+ "navigate:before": [],
418
+ "resolve:before": [],
419
+ "navigate:after": [],
420
+ "error": []
421
+ };
422
+ const registerHook = (hook, guard) => {
423
+ hooks[hook].push(guard);
424
+ return () => hooks[hook].splice(hooks[hook].indexOf(guard), 1);
425
+ };
426
+ (/* @__PURE__ */ useRuntimeConfig()).app.baseURL;
427
+ const route = reactive(getRouteFromPath(initialURL));
428
+ async function handleNavigation(url, replace) {
429
+ try {
430
+ const to = getRouteFromPath(url);
431
+ for (const middleware of hooks["navigate:before"]) {
432
+ const result = await middleware(to, route);
433
+ if (result === false || result instanceof Error) {
434
+ return;
435
+ }
436
+ if (typeof result === "string" && result.length) {
437
+ return handleNavigation(result, true);
438
+ }
439
+ }
440
+ for (const handler of hooks["resolve:before"]) {
441
+ await handler(to, route);
442
+ }
443
+ Object.assign(route, to);
444
+ if (false) ;
445
+ for (const middleware of hooks["navigate:after"]) {
446
+ await middleware(to, route);
447
+ }
448
+ } catch (err) {
449
+ for (const handler of hooks.error) {
450
+ await handler(err);
451
+ }
452
+ }
453
+ }
454
+ const currentRoute = computed(() => route);
455
+ const router = {
456
+ currentRoute,
457
+ isReady: () => Promise.resolve(),
458
+ // These options provide a similar API to vue-router but have no effect
459
+ options: {},
460
+ install: () => Promise.resolve(),
461
+ // Navigation
462
+ push: (url) => handleNavigation(url),
463
+ replace: (url) => handleNavigation(url),
464
+ back: () => (void 0).history.go(-1),
465
+ go: (delta) => (void 0).history.go(delta),
466
+ forward: () => (void 0).history.go(1),
467
+ // Guards
468
+ beforeResolve: (guard) => registerHook("resolve:before", guard),
469
+ beforeEach: (guard) => registerHook("navigate:before", guard),
470
+ afterEach: (guard) => registerHook("navigate:after", guard),
471
+ onError: (handler) => registerHook("error", handler),
472
+ // Routes
473
+ resolve: getRouteFromPath,
474
+ addRoute: (parentName, route2) => {
475
+ routes.push(route2);
476
+ },
477
+ getRoutes: () => routes,
478
+ hasRoute: (name) => routes.some((route2) => route2.name === name),
479
+ removeRoute: (name) => {
480
+ const index = routes.findIndex((route2) => route2.name === name);
481
+ if (index !== -1) {
482
+ routes.splice(index, 1);
483
+ }
484
+ }
485
+ };
486
+ nuxtApp.vueApp.component("RouterLink", defineComponent({
487
+ functional: true,
488
+ props: {
489
+ to: {
490
+ type: String,
491
+ required: true
492
+ },
493
+ custom: Boolean,
494
+ replace: Boolean,
495
+ // Not implemented
496
+ activeClass: String,
497
+ exactActiveClass: String,
498
+ ariaCurrentValue: String
499
+ },
500
+ setup: (props, { slots }) => {
501
+ const navigate = () => handleNavigation(props.to, props.replace);
502
+ return () => {
503
+ const route2 = router.resolve(props.to);
504
+ return props.custom ? slots.default?.({ href: props.to, navigate, route: route2 }) : h("a", { href: props.to, onClick: (e) => {
505
+ e.preventDefault();
506
+ return navigate();
507
+ } }, slots);
508
+ };
509
+ }
510
+ }));
511
+ nuxtApp._route = route;
512
+ nuxtApp._middleware ||= {
513
+ global: [],
514
+ named: {}
515
+ };
516
+ const initialLayout = nuxtApp.payload.state._layout;
517
+ nuxtApp.hooks.hookOnce("app:created", async () => {
518
+ router.beforeEach(async (to, from) => {
519
+ to.meta = reactive(to.meta || {});
520
+ if (nuxtApp.isHydrating && initialLayout && !isReadonly(to.meta.layout)) {
521
+ to.meta.layout = initialLayout;
522
+ }
523
+ nuxtApp._processingMiddleware = true;
524
+ if (!nuxtApp.ssrContext?.islandContext) {
525
+ const middlewareEntries = /* @__PURE__ */ new Set([...globalMiddleware, ...nuxtApp._middleware.global]);
526
+ {
527
+ const routeRules = await nuxtApp.runWithContext(() => getRouteRules({ path: to.path }));
528
+ if (routeRules.appMiddleware) {
529
+ for (const key in routeRules.appMiddleware) {
530
+ const guard = nuxtApp._middleware.named[key];
531
+ if (!guard) {
532
+ return;
533
+ }
534
+ if (routeRules.appMiddleware[key]) {
535
+ middlewareEntries.add(guard);
536
+ } else {
537
+ middlewareEntries.delete(guard);
538
+ }
539
+ }
540
+ }
541
+ }
542
+ for (const middleware of middlewareEntries) {
543
+ const result = await nuxtApp.runWithContext(() => middleware(to, from));
544
+ {
545
+ if (result === false || result instanceof Error) {
546
+ const error = result || createError$1({
547
+ statusCode: 404,
548
+ statusMessage: `Page Not Found: ${initialURL}`,
549
+ data: {
550
+ path: initialURL
551
+ }
552
+ });
553
+ delete nuxtApp._processingMiddleware;
554
+ return nuxtApp.runWithContext(() => showError(error));
555
+ }
556
+ }
557
+ if (result === true) {
558
+ continue;
559
+ }
560
+ if (result || result === false) {
561
+ return result;
562
+ }
563
+ }
564
+ }
565
+ });
566
+ router.afterEach(() => {
567
+ delete nuxtApp._processingMiddleware;
568
+ });
569
+ await router.replace(initialURL);
570
+ if (!isEqual(route.fullPath, initialURL)) {
571
+ await nuxtApp.runWithContext(() => navigateTo(route.fullPath));
572
+ }
573
+ });
574
+ return {
575
+ provide: {
576
+ route,
577
+ router
578
+ }
579
+ };
580
+ }
581
+ });
582
+ function definePayloadReducer(name, reduce) {
583
+ {
584
+ useNuxtApp().ssrContext._payloadReducers[name] = reduce;
585
+ }
586
+ }
587
+ const reducers = [
588
+ ["NuxtError", (data) => isNuxtError(data) && data.toJSON()],
589
+ ["EmptyShallowRef", (data) => isRef(data) && isShallow(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")],
590
+ ["EmptyRef", (data) => isRef(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")],
591
+ ["ShallowRef", (data) => isRef(data) && isShallow(data) && data.value],
592
+ ["ShallowReactive", (data) => isReactive(data) && isShallow(data) && toRaw(data)],
593
+ ["Ref", (data) => isRef(data) && data.value],
594
+ ["Reactive", (data) => isReactive(data) && toRaw(data)]
595
+ ];
596
+ const revive_payload_server_7lcpQLg5YI74iEO7M_PquaLaJt54359zuQE8vfMV17A = /* @__PURE__ */ defineNuxtPlugin({
597
+ name: "nuxt:revive-payload:server",
598
+ setup() {
599
+ for (const [reducer, fn] of reducers) {
600
+ definePayloadReducer(reducer, fn);
601
+ }
602
+ }
603
+ });
604
+ const components_plugin_4kY4pyzJIYX99vmMAAIorFf3CnAaptHitJgf7JxiED8 = /* @__PURE__ */ defineNuxtPlugin({
605
+ name: "nuxt:global-components"
606
+ });
607
+ const unocss_6Z4vW7S9aX_q2svWbGBc_X2b5QbQdkNmvzr_3kqqCd0 = /* @__PURE__ */ defineNuxtPlugin(() => {
608
+ });
609
+ const plugins = [
610
+ unhead_taBzb1aCCXzNs2Jlf2QAry8sIkJSPbtRBd5i2u2OOok,
611
+ router_Jne1ChYCZ2JGomD50zg6_3UhN_iibUJD0_Y1PJa04Zw,
612
+ revive_payload_server_7lcpQLg5YI74iEO7M_PquaLaJt54359zuQE8vfMV17A,
613
+ components_plugin_4kY4pyzJIYX99vmMAAIorFf3CnAaptHitJgf7JxiED8,
614
+ unocss_6Z4vW7S9aX_q2svWbGBc_X2b5QbQdkNmvzr_3kqqCd0
615
+ ];
616
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
617
+ __name: "app",
618
+ __ssrInlineRender: true,
619
+ setup(__props) {
620
+ return (_ctx, _push, _parent, _attrs) => {
621
+ _push(`<h1${ssrRenderAttrs(mergeProps({ class: "text-success" }, _attrs))}> 111 </h1>`);
622
+ };
623
+ }
624
+ });
625
+ const _sfc_setup$2 = _sfc_main$2.setup;
626
+ _sfc_main$2.setup = (props, ctx) => {
627
+ const ssrContext = useSSRContext();
628
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("app.vue");
629
+ return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
630
+ };
631
+ const _sfc_main$1 = {
632
+ __name: "nuxt-error-page",
633
+ __ssrInlineRender: true,
634
+ props: {
635
+ error: Object
636
+ },
637
+ setup(__props) {
638
+ const props = __props;
639
+ const _error = props.error;
640
+ const statusCode = Number(_error.statusCode || 500);
641
+ const is404 = statusCode === 404;
642
+ const statusMessage = _error.statusMessage ?? (is404 ? "Page Not Found" : "Internal Server Error");
643
+ const description = _error.message || _error.toString();
644
+ const stack = void 0;
645
+ const _Error404 = defineAsyncComponent(() => import('./error-404-Du0ot2hm.mjs'));
646
+ const _Error = defineAsyncComponent(() => import('./error-500-Y3RUV6n2.mjs'));
647
+ const ErrorTemplate = is404 ? _Error404 : _Error;
648
+ return (_ctx, _push, _parent, _attrs) => {
649
+ _push(ssrRenderComponent(unref(ErrorTemplate), mergeProps({ statusCode: unref(statusCode), statusMessage: unref(statusMessage), description: unref(description), stack: unref(stack) }, _attrs), null, _parent));
650
+ };
651
+ }
652
+ };
653
+ const _sfc_setup$1 = _sfc_main$1.setup;
654
+ _sfc_main$1.setup = (props, ctx) => {
655
+ const ssrContext = useSSRContext();
656
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_cac@6.7.14_4ec6669f18d845abd6992fd7e7988545/node_modules/nuxt/dist/app/components/nuxt-error-page.vue");
657
+ return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
658
+ };
659
+ const _sfc_main = {
660
+ __name: "nuxt-root",
661
+ __ssrInlineRender: true,
662
+ setup(__props) {
663
+ const IslandRenderer = () => null;
664
+ const nuxtApp = useNuxtApp();
665
+ nuxtApp.deferHydration();
666
+ nuxtApp.ssrContext.url;
667
+ const SingleRenderer = false;
668
+ provide(PageRouteSymbol, useRoute());
669
+ nuxtApp.hooks.callHookWith((hooks) => hooks.map((hook) => hook()), "vue:setup");
670
+ const error = /* @__PURE__ */ useError();
671
+ const abortRender = error.value && !nuxtApp.ssrContext.error;
672
+ onErrorCaptured((err, target, info) => {
673
+ nuxtApp.hooks.callHook("vue:error", err, target, info).catch((hookError) => console.error("[nuxt] Error in `vue:error` hook", hookError));
674
+ {
675
+ const p = nuxtApp.runWithContext(() => showError(err));
676
+ onServerPrefetch(() => p);
677
+ return false;
678
+ }
679
+ });
680
+ const islandContext = nuxtApp.ssrContext.islandContext;
681
+ return (_ctx, _push, _parent, _attrs) => {
682
+ ssrRenderSuspense(_push, {
683
+ default: () => {
684
+ if (unref(abortRender)) {
685
+ _push(`<div></div>`);
686
+ } else if (unref(error)) {
687
+ _push(ssrRenderComponent(unref(_sfc_main$1), { error: unref(error) }, null, _parent));
688
+ } else if (unref(islandContext)) {
689
+ _push(ssrRenderComponent(unref(IslandRenderer), { context: unref(islandContext) }, null, _parent));
690
+ } else if (unref(SingleRenderer)) {
691
+ ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(SingleRenderer)), null, null), _parent);
692
+ } else {
693
+ _push(ssrRenderComponent(unref(_sfc_main$2), null, null, _parent));
694
+ }
695
+ },
696
+ _: 1
697
+ });
698
+ };
699
+ }
700
+ };
701
+ const _sfc_setup = _sfc_main.setup;
702
+ _sfc_main.setup = (props, ctx) => {
703
+ const ssrContext = useSSRContext();
704
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../../node_modules/.pnpm/nuxt@4.2.2_@parcel+watcher@2.5.1_@types+node@25.0.3_@vue+compiler-sfc@3.5.26_cac@6.7.14_4ec6669f18d845abd6992fd7e7988545/node_modules/nuxt/dist/app/components/nuxt-root.vue");
705
+ return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
706
+ };
707
+ let entry;
708
+ {
709
+ entry = async function createNuxtAppServer(ssrContext) {
710
+ const vueApp = createApp(_sfc_main);
711
+ const nuxt = createNuxtApp({ vueApp, ssrContext });
712
+ try {
713
+ await applyPlugins(nuxt, plugins);
714
+ await nuxt.hooks.callHook("app:created", vueApp);
715
+ } catch (error) {
716
+ await nuxt.hooks.callHook("app:error", error);
717
+ nuxt.payload.error ||= createError(error);
718
+ }
719
+ if (ssrContext?._renderResponse) {
720
+ throw new Error("skipping render");
721
+ }
722
+ return vueApp;
723
+ };
724
+ }
725
+ const entry_default = (ssrContext) => entry(ssrContext);
726
+
727
+ export { useNuxtApp as a, useRuntimeConfig as b, nuxtLinkDefaults as c, entry_default as default, navigateTo as n, resolveRouteObject as r, useRouter as u };