veryfront 0.1.1133 → 0.1.1136

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 (25) hide show
  1. package/esm/deno.js +1 -1
  2. package/esm/src/html/hydration-script-builder/templates/renderer.d.ts.map +1 -1
  3. package/esm/src/html/hydration-script-builder/templates/renderer.js +1 -0
  4. package/esm/src/html/hydration-script-builder/templates/router.d.ts.map +1 -1
  5. package/esm/src/html/hydration-script-builder/templates/router.js +1 -0
  6. package/esm/src/react/head-collector.d.ts.map +1 -1
  7. package/esm/src/react/head-collector.js +74 -2
  8. package/esm/src/react/runtime/core.d.ts +27 -2
  9. package/esm/src/react/runtime/core.d.ts.map +1 -1
  10. package/esm/src/react/runtime/core.js +35 -10
  11. package/esm/src/rendering/layouts/layout-applicator.d.ts +3 -0
  12. package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
  13. package/esm/src/rendering/layouts/layout-applicator.js +3 -0
  14. package/esm/src/rendering/orchestrator/layout.d.ts +1 -1
  15. package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
  16. package/esm/src/rendering/orchestrator/layout.js +2 -1
  17. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  18. package/esm/src/rendering/orchestrator/pipeline.js +1 -1
  19. package/esm/src/rendering/rsc/client-module-strategy.d.ts +6 -0
  20. package/esm/src/rendering/rsc/client-module-strategy.d.ts.map +1 -1
  21. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
  22. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +1 -1
  23. package/esm/src/utils/version-constant.d.ts +1 -1
  24. package/esm/src/utils/version-constant.js +1 -1
  25. package/package.json +5 -5
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1133",
3
+ "version": "0.1.1136",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/renderer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,cAoT7B,CAAC"}
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/renderer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,cAqT7B,CAAC"}
@@ -231,6 +231,7 @@ export const getRendererScript = () => `
231
231
  params: normalizedParams,
232
232
  query: Object.fromEntries(new URLSearchParams(window.location.search)),
233
233
  frontmatter: data.frontmatter || {},
234
+ data: data.props || {},
234
235
  headings,
235
236
  mdxHeadings: headings, // Alias for backwards compatibility
236
237
  };
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cA8uC3B,CAAC"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cA+uC3B,CAAC"}
@@ -808,6 +808,7 @@ export const getRouterScript = () => `
808
808
  params: normalizedParams,
809
809
  query: Object.fromEntries(new URLSearchParams(window.location.search)),
810
810
  frontmatter: pageData.frontmatter || {},
811
+ data: pageData.props || {},
811
812
  headings: headingsArray,
812
813
  mdxHeadings: headingsArray
813
814
  };
@@ -1 +1 @@
1
- {"version":3,"file":"head-collector.d.ts","sourceRoot":"","sources":["../../../src/src/react/head-collector.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,E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AED,wBAAgB,kBAAkB,IAAI,aAAa,CAclD"}
@@ -11,6 +11,57 @@
11
11
  import * as dntShim from "../../_dnt.shims.js";
12
12
  import { AsyncLocalStorage } from "node:async_hooks";
13
13
  export const HEAD_COLLECTOR_SYMBOL = Symbol.for("veryfront.react.collect-head");
14
+ /**
15
+ * Head tags that are single-valued per the HTML / Open Graph / Twitter-card
16
+ * specs — a document has exactly one canonical URL, one title, one `og:title`,
17
+ * one robots directive, and so on. For these keys a later (page) tag overrides
18
+ * an earlier (layout) tag with the same key, honouring the documented
19
+ * page-over-layout contract.
20
+ *
21
+ * Every *other* tag accumulates, and accumulate is the deliberate safe default:
22
+ * `rel` values and OG property namespaces are open-ended and full of
23
+ * legitimately-repeatable tags (`og:image`, `<link rel="preload">`, `hreflang`
24
+ * alternates, `rel="me"`, the vertical `article:` / `video:` / `music:`
25
+ * namespaces). Mis-classifying an unlisted key as single-valued would silently
26
+ * drop valid metadata; mis-classifying an unlisted single-valued key as
27
+ * repeatable merely leaves a duplicate — the pre-existing behaviour, never data
28
+ * loss. So we enumerate the small, closed singleton set and default the
29
+ * open-ended rest to accumulate.
30
+ */
31
+ const SINGLETON_META_KEYS = new Set([
32
+ // Standard HTML metas
33
+ "description",
34
+ "robots",
35
+ "viewport",
36
+ "referrer",
37
+ "color-scheme",
38
+ "application-name",
39
+ "generator",
40
+ // Open Graph — single-valued core
41
+ "og:title",
42
+ "og:description",
43
+ "og:url",
44
+ "og:type",
45
+ "og:site_name",
46
+ "og:locale",
47
+ // Twitter cards — one per document
48
+ "twitter:card",
49
+ "twitter:site",
50
+ "twitter:creator",
51
+ "twitter:title",
52
+ "twitter:description",
53
+ "twitter:image",
54
+ "twitter:image:alt",
55
+ ]);
56
+ const SINGLETON_LINK_RELS = new Set([
57
+ "canonical",
58
+ "manifest",
59
+ "amphtml",
60
+ ]);
61
+ /** The dedupe key for a meta: `property` (og/twitter) or `name`, else none. */
62
+ function metaKey(meta) {
63
+ return meta.property ?? meta.name ?? undefined;
64
+ }
14
65
  function createEmpty() {
15
66
  return { metas: [], links: [], styles: [], scripts: [] };
16
67
  }
@@ -36,10 +87,31 @@ export function collectHead(data) {
36
87
  if (meta.name === "description" && meta.content) {
37
88
  collected.description = meta.content;
38
89
  }
90
+ const key = metaKey(meta);
91
+ // Single-valued keys override the earlier (layout) tag; every other key
92
+ // (and keyless metas) accumulates.
93
+ if (key && SINGLETON_META_KEYS.has(key)) {
94
+ const idx = collected.metas.findIndex((m) => metaKey(m) === key);
95
+ if (idx !== -1) {
96
+ collected.metas[idx] = meta;
97
+ continue;
98
+ }
99
+ }
39
100
  collected.metas.push(meta);
40
101
  }
41
- if (data.links?.length)
42
- collected.links.push(...data.links);
102
+ for (const link of data.links ?? []) {
103
+ const rel = link.rel;
104
+ // A single-valued `rel` (canonical, manifest, …) overrides the earlier
105
+ // tag; every other rel (stylesheet, preload, icon, alternate, …) accumulates.
106
+ if (rel && SINGLETON_LINK_RELS.has(rel)) {
107
+ const idx = collected.links.findIndex((l) => l.rel === rel);
108
+ if (idx !== -1) {
109
+ collected.links[idx] = link;
110
+ continue;
111
+ }
112
+ }
113
+ collected.links.push(link);
114
+ }
43
115
  if (data.styles?.length)
44
116
  collected.styles.push(...data.styles);
45
117
  for (const script of data.scripts ?? []) {
@@ -65,17 +65,35 @@ export interface PageContextValue {
65
65
  query: Record<string, string>;
66
66
  /** Parsed page frontmatter. */
67
67
  frontmatter: Record<string, unknown>;
68
+ /**
69
+ * Props returned by the page's `getServerData` (the object under its
70
+ * `props` key). Exposed here so layouts and nested components can read
71
+ * server data without prop-drilling from the page. Empty object when the
72
+ * page has no `getServerData`. Populated identically on the server render,
73
+ * the hydration seed, and client navigation.
74
+ */
75
+ data: Record<string, unknown>;
68
76
  /** Headings discovered in the page content. */
69
77
  headings: MdxHeading[];
70
78
  /** MDX headings discovered in the page content. */
71
79
  mdxHeadings: MdxHeading[];
72
80
  }
81
+ /**
82
+ * Input accepted by {@link PageContextProvider}. `data` (the page's
83
+ * `getServerData` props) is optional here so seeds built before the field
84
+ * existed keep compiling; the provider merges the seed over
85
+ * {@link defaultPageContext}, so an omitted field surfaces as its documented
86
+ * empty default rather than `undefined`.
87
+ */
88
+ export type PageContextSeed = Omit<PageContextValue, "data"> & {
89
+ data?: Record<string, unknown>;
90
+ };
73
91
  /** Props accepted by `<PageContextProvider>`. */
74
92
  export interface PageContextProviderProps {
75
93
  /** React children rendered within the page context. */
76
94
  children: React.ReactNode;
77
- /** Page context value to expose to descendants. */
78
- pageContext?: PageContextValue;
95
+ /** Page context seed to expose to descendants. */
96
+ pageContext?: PageContextSeed;
79
97
  }
80
98
  /** How a navigation should affect the history stack. */
81
99
  type HistoryMode = "push" | "replace" | "none";
@@ -120,6 +138,13 @@ export interface HydrationWrapOptions {
120
138
  params?: Record<string, string>;
121
139
  /** Page frontmatter, exposed reactively through `usePageContext()`. */
122
140
  frontmatter?: Record<string, unknown>;
141
+ /**
142
+ * Props returned by the page's `getServerData`, exposed as
143
+ * `usePageContext().data`. Seeded here so a hydrated client tree under an
144
+ * App/RSC page reads the same server data the server render saw, instead of
145
+ * an empty object.
146
+ */
147
+ data?: Record<string, unknown>;
123
148
  }
124
149
  /**
125
150
  * Wraps a hydrated client component in `RouterProvider` (router state) nested
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/src/react/runtime/core.ts"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,kDAAkD;AAClD,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;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,KAAK,CAAC,YAAY,CA0C5F;AAED,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,OAAO,GAAE,oBAAyB,GACjC,KAAK,CAAC,YAAY,CA8BpB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,WAAW,CAEvC;AAED,2EAA2E;AAC3E,wBAAgB,IAAI,CAAC,EACnB,QAAe,EACf,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,CAMhC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,WAAW,GACZ,EAAE,wBAAwB,GAAG,KAAK,CAAC,YAAY,CAkB/C;AAED,sCAAsC;AACtC,wBAAgB,cAAc,IAAI,gBAAgB,CAEjD;AAwBD,sEAAsE;AACtE,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAoIpF;AAED,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC"}
@@ -18,6 +18,7 @@ const defaultPageContext = {
18
18
  params: {},
19
19
  query: {},
20
20
  frontmatter: {},
21
+ data: {},
21
22
  headings: [],
22
23
  mdxHeadings: [],
23
24
  };
@@ -192,6 +193,7 @@ export function wrapForHydration(child, options = {}) {
192
193
  params,
193
194
  query,
194
195
  frontmatter: options.frontmatter ?? {},
196
+ data: options.data ?? {},
195
197
  };
196
198
  return React.createElement(RouterProvider, {
197
199
  router,
@@ -219,25 +221,50 @@ export function Link({ prefetch = true, children, ...rest }) {
219
221
  * `RouterProvider` (no live router) it falls back to the seed's own location.
220
222
  */
221
223
  export function PageContextProvider({ children, pageContext, }) {
222
- const seed = pageContext ?? defaultPageContext;
223
224
  const router = React.useContext(RouterContext);
224
225
  const hasRouter = router !== defaultRouter;
225
- const value = React.useMemo(() => hasRouter
226
- ? { ...seed, path: router.pathname, query: router.query, params: router.params }
227
- : seed, [seed, hasRouter, router.pathname, router.query, router.params]);
226
+ const value = React.useMemo(() => {
227
+ // Merge the seed over defaults so a seed that omits a newer field (e.g.
228
+ // `data`) still exposes it as its documented empty default, and unchecked
229
+ // JS callers never read `undefined` off the context.
230
+ const seed = { ...defaultPageContext, ...pageContext };
231
+ return hasRouter
232
+ ? { ...seed, path: router.pathname, query: router.query, params: router.params }
233
+ : seed;
234
+ }, [pageContext, hasRouter, router.pathname, router.query, router.params]);
228
235
  return React.createElement(PageContextContext.Provider, { value }, children);
229
236
  }
230
237
  /** Reads the current page context. */
231
238
  export function usePageContext() {
232
239
  return React.useContext(PageContextContext);
233
240
  }
241
+ /**
242
+ * Flattens `Head` children into host elements, unwrapping React fragments so
243
+ * `<Head><>…</></Head>` behaves like direct children — matching React's
244
+ * transparent-fragment semantics. `React.Children` already flattens arrays
245
+ * (so `.map()` works), but passes a fragment through as a single element whose
246
+ * `type` is `Symbol(react.fragment)`, which matched none of the tag branches
247
+ * and was silently dropped.
248
+ */
249
+ function flattenHeadChildren(children) {
250
+ const out = [];
251
+ React.Children.forEach(children, (child) => {
252
+ if (!React.isValidElement(child))
253
+ return;
254
+ if (child.type === React.Fragment) {
255
+ const nested = child.props.children;
256
+ out.push(...flattenHeadChildren(nested));
257
+ return;
258
+ }
259
+ out.push(child);
260
+ });
261
+ return out;
262
+ }
234
263
  /** Applies document head elements during SSR and client rendering. */
235
264
  export function Head({ children }) {
236
265
  const isSSR = isServerEnvironment();
237
266
  if (isSSR && children) {
238
- React.Children.forEach(children, (child) => {
239
- if (!React.isValidElement(child))
240
- return;
267
+ flattenHeadChildren(children).forEach((child) => {
241
268
  const { type } = child;
242
269
  const props = child.props;
243
270
  if (typeof type !== "string" || type === "body")
@@ -294,9 +321,7 @@ export function Head({ children }) {
294
321
  return;
295
322
  const addedElements = [];
296
323
  const nonce = getDocumentNonce();
297
- React.Children.forEach(children, (child) => {
298
- if (!React.isValidElement(child))
299
- return;
324
+ flattenHeadChildren(children).forEach((child) => {
300
325
  const { type } = child;
301
326
  const props = child.props;
302
327
  if (typeof type !== "string" || type === "body")
@@ -20,6 +20,8 @@ export interface LayoutApplicationOptions {
20
20
  requestUrl?: URL;
21
21
  params?: Record<string, string | string[]>;
22
22
  frontmatter?: Record<string, unknown>;
23
+ /** Props from the page's `getServerData`, exposed on the page context as `data`. */
24
+ pageProps?: Record<string, unknown>;
23
25
  headings?: Array<{
24
26
  id: string;
25
27
  text: string;
@@ -37,6 +39,7 @@ export declare class LayoutApplicator {
37
39
  private requestUrl?;
38
40
  private params?;
39
41
  private frontmatter?;
42
+ private pageProps?;
40
43
  private headings?;
41
44
  private projectId;
42
45
  private projectSlug;
@@ -1 +1 @@
1
- {"version":3,"file":"layout-applicator.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/layouts/layout-applicator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,YAAY,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAKzE,OAAO,KAAK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,OAAO,CAAC,QAAQ,CAAC,CAAqD;IACtE,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,kBAAkB,CAAC,CAAyB;IACpD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAS;IACjD,OAAO,CAAC,mBAAmB,CAAgC;IAC3D,OAAO,CAAC,+BAA+B,CAAC,CAGrC;gBAES,OAAO,EAAE,wBAAwB;IAmB7C,OAAO,CAAC,eAAe;IAOjB,YAAY,CAChB,WAAW,EAAE,YAAY,CAAC,YAAY,EACtC,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,SAAS,GAAG,SAAS,EACnC,aAAa,EAAE,UAAU,EAAE,EAC3B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACpD,gBAAgB,CAAC,EAAE;QAAE,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,GAC1D,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;YA2HvB,gBAAgB;YA0DhB,sBAAsB;YAWtB,8BAA8B;YA6D9B,oBAAoB;YAsDpB,mBAAmB;YAwCnB,0BAA0B;CAsEzC"}
@@ -26,6 +26,7 @@ export class LayoutApplicator {
26
26
  requestUrl;
27
27
  params;
28
28
  frontmatter;
29
+ pageProps;
29
30
  headings;
30
31
  projectId;
31
32
  projectSlug;
@@ -48,6 +49,7 @@ export class LayoutApplicator {
48
49
  this.requestUrl = options.requestUrl;
49
50
  this.params = options.params;
50
51
  this.frontmatter = options.frontmatter;
52
+ this.pageProps = options.pageProps;
51
53
  this.headings = options.headings;
52
54
  this.configuredReactVersion = options.reactVersion;
53
55
  }
@@ -99,6 +101,7 @@ export class LayoutApplicator {
99
101
  params: flatParams,
100
102
  query,
101
103
  frontmatter: this.frontmatter ?? pageInfo.entity.frontmatter ?? {},
104
+ data: this.pageProps ?? {},
102
105
  headings: headingsArray,
103
106
  mdxHeadings: headingsArray,
104
107
  };
@@ -57,7 +57,7 @@ export declare class LayoutOrchestrator {
57
57
  level: number;
58
58
  }>, projectSlug?: string, clientPageIsland?: {
59
59
  clientLayoutPaths: readonly string[];
60
- }): Promise<React.ReactElement>;
60
+ }, pageProps?: Record<string, unknown>): Promise<React.ReactElement>;
61
61
  }
62
62
  export {};
63
63
  //# sourceMappingURL=layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAUjF,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,oBAAoB,CAAC;IAClC,iBAAiB,EAAE,aAAa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,CAAC,YAAY,EAC/B,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,SAAS,GAAG,SAAS,EACnC,aAAa,EAAE,UAAU,EAAE,EAC3B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACpD,UAAU,CAAC,EAAE,GAAG,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAC1C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EAC7D,WAAW,CAAC,EAAE,MAAM,EACpB,gBAAgB,CAAC,EAAE;QAAE,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAC3D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC;CAuD/B"}
@@ -159,7 +159,7 @@ export class LayoutOrchestrator {
159
159
  "layout.mdxCount": nestedLayouts.filter((l) => l.kind === "mdx").length,
160
160
  });
161
161
  }
162
- applyLayoutsAndWrappers(pageElement, pageInfo, layoutBundle, nestedLayouts, layoutDataMap, requestUrl, params, frontmatter, headings, projectSlug, clientPageIsland) {
162
+ applyLayoutsAndWrappers(pageElement, pageInfo, layoutBundle, nestedLayouts, layoutDataMap, requestUrl, params, frontmatter, headings, projectSlug, clientPageIsland, pageProps) {
163
163
  return withSpan("layout.applyLayoutsAndWrappers", async () => {
164
164
  const reactVersion = await this.getReactVersion();
165
165
  const mergedComponents = {
@@ -181,6 +181,7 @@ export class LayoutOrchestrator {
181
181
  requestUrl,
182
182
  params,
183
183
  frontmatter,
184
+ pageProps,
184
185
  headings,
185
186
  re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B"}
@@ -423,7 +423,7 @@ export class RenderPipeline {
423
423
  const headings = pageBundle.headings || [];
424
424
  await layoutPreloadPromise;
425
425
  const layoutApplyStart = performance.now();
426
- const wrappedElement = await profilePhase("render.apply_layouts", () => withSpan("render.apply_layouts", () => this.config.layoutOrchestrator.applyLayoutsAndWrappers(pageElement, pageInfo, layoutResult.layoutBundle, layoutResult.nestedLayouts, layoutDataMap, options?.url, resolvedParams, mergedFrontmatter, headings, options?.projectSlug, clientPageIsland), {
426
+ const wrappedElement = await profilePhase("render.apply_layouts", () => withSpan("render.apply_layouts", () => this.config.layoutOrchestrator.applyLayoutsAndWrappers(pageElement, pageInfo, layoutResult.layoutBundle, layoutResult.nestedLayouts, layoutDataMap, options?.url, resolvedParams, mergedFrontmatter, headings, options?.projectSlug, clientPageIsland, dataFetchingProps), {
427
427
  "render.slug": slug,
428
428
  "render.layout_count": layoutResult.nestedLayouts.length,
429
429
  }));
@@ -16,6 +16,12 @@ export interface ClientRuntimeHydrationData {
16
16
  params?: Record<string, string | string[]>;
17
17
  /** Page frontmatter — exposed reactively via `usePageContext()`. */
18
18
  frontmatter?: Record<string, unknown>;
19
+ /**
20
+ * Props returned by the page's `getServerData` — exposed reactively via
21
+ * `usePageContext().data` so a hydrated client tree under an App/RSC page
22
+ * reseeds with the same server data the server render used.
23
+ */
24
+ props?: Record<string, unknown>;
19
25
  }
20
26
  export interface ClientModuleUrlOptions {
21
27
  strategy: ClientModuleStrategy;
@@ -1 +1 @@
1
- {"version":3,"file":"client-module-strategy.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/rsc/client-module-strategy.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,2BAA2B;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;CACxC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC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E,QAAmB,EACxB,OAAO,GAAE,MAA8B,GACtC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAS3C;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,GAAE,QAAmB,GAAG,MAAM,GAAG,IAAI,CAGzF"}
1
+ {"version":3,"file":"client-module-strategy.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/rsc/client-module-strategy.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,2BAA2B;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;CACxC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC3C,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,2BAA2B,GACnC,oBAAoB,CAUtB;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,GAAE,QAAmB,GACvB,0BAA0B,GAAG,IAAI,CASnC;AAED,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,0BAA0B,GAAG,IAAI,GAC/C,oBAAoB,CAMtB;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAI/E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAK7E;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGvE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,GAAG,IAAI,CAOnF;AAED,wBAAgB,iCAAiC,CAC/C,GAAG,GAAE,QAAmB,EACxB,OAAO,GAAE,MAA8B,GACtC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAS3C;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,GAAE,QAAmB,GAAG,MAAM,GAAG,IAAI,CAGzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-bundles.generated.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/services/rsc/endpoints/rsc-bundles.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,kBAAkB,EAAE,MAC49/B,CAAC;AAE9//B,eAAO,MAAM,iBAAiB,EAAE,MAC+nqB,CAAC"}
1
+ {"version":3,"file":"rsc-bundles.generated.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/services/rsc/endpoints/rsc-bundles.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,kBAAkB,EAAE,MAC8+/B,CAAC;AAEhhgC,eAAO,MAAM,iBAAiB,EAAE,MAC+nqB,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * Do not edit manually — run `deno task generate` to regenerate.
6
6
  * @module
7
7
  */
8
- export const CLIENT_BOOT_BUNDLE = 'var It=Object.defineProperty;var St=(t,e,r)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var p=(t,e,r)=>St(t,typeof e!="symbol"?e+"":e,r);var Ot="3.2.3";function Nt(t,e,r,n){let s=[];if(n?.external?.length&&s.push(`external=${n.external.join(",")}`),s.push(`target=${n?.target??"es2022"}`),n?.deps){let a=Object.entries(n.deps).map(([d,f])=>`${d}@${f}`).join(",");s.push(`deps=${a}`)}let u=e?`@${e}`:"",c=r??"",g=s.length?`?${s.join("&")}`:"";return`https://esm.sh/${t}${u}${c}${g}`}function m(t,e,r,n=!1){return Nt(t,e,r,{external:n?["react"]:void 0,deps:{csstype:Ot}})}var Dt="19.2.4",_=Dt;function z(t=_){return{react:m("react",t),"react-dom":m("react-dom",t,void 0,!0),"react-dom/client":m("react-dom",t,"/client",!0),"react-dom/server":m("react-dom",t,"/server",!0),"react/jsx-runtime":m("react",t,"/jsx-runtime",!0),"react/jsx-dev-runtime":m("react",t,"/jsx-dev-runtime",!0)}}function J(t=_){return z(t).react}function X(t=_){return z(t)["react-dom/client"]}function vt(t){return t.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function bt(t){if(typeof globalThis.btoa=="function")try{return globalThis.btoa(t)}catch{return Mt(new TextEncoder().encode(t))}let e=globalThis.Buffer;if(e)return e.from(t,"utf8").toString("base64");throw new Error("Base64 encoding is not supported in this runtime")}function Mt(t){let e=globalThis.Buffer;if(e)return e.from(t).toString("base64");if(typeof globalThis.btoa=="function"){let r="";for(let n of t)r+=String.fromCharCode(n);return globalThis.btoa(r)}throw new Error("Base64 encoding is not supported in this runtime")}function H(t){return vt(bt(t))}var io=Object.freeze({react:"","react-dom":"","react-dom/client":"","react-dom/server":"","react/jsx-runtime":"","react/jsx-dev-runtime":""});function O(t,e){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t))return!0;for(let r of Object.keys(e))if(r.endsWith("/")&&t.startsWith(r))return!0;return!1}function Lt(t){try{return JSON.parse(t)?.imports??{}}catch(e){return console.warn("Failed to parse import map JSON; treating as empty",{errorName:e instanceof Error?e.name:typeof e,inputLength:t.length}),{}}}function V(t=document){let e=t.querySelector(\'script[type="importmap"]\');return e?.textContent?Lt(e.textContent):{}}var l="/_veryfront",F={RSC:`${l}/rsc/`,FS:`${l}/fs/`,MODULES:`${l}/modules/`,PAGES:`${l}/pages/`,DATA:`${l}/data/`,LIB:`${l}/lib/`,CHUNKS:`${l}/chunks/`,CLIENT:`${l}/client/`},K={HMR_RUNTIME:`${l}/hmr-runtime.js`,HMR:`${l}/hmr.js`,ERROR_OVERLAY:`${l}/error-overlay.js`,DEV_LOADER:`${l}/dev-loader.js`,CLIENT_LOG:`${l}/log`,CLIENT_JS:`${l}/client.js`,ROUTER_JS:`${l}/router.js`,PREFETCH_JS:`${l}/prefetch.js`,MANIFEST_JSON:`${l}/manifest.json`,APP_JS:`${l}/app.js`,RSC_CLIENT:`${l}/rsc/client.js`,RSC_MANIFEST:`${l}/rsc/manifest`,RSC_STREAM:`${l}/rsc/stream`,RSC_PAYLOAD:`${l}/rsc/payload`,RSC_RENDER:`${l}/rsc/render`,RSC_PAGE:`${l}/rsc/page`,RSC_MODULE:`${l}/rsc/module`,RSC_DOM:`${l}/rsc/dom.js`,LIB_CHAT_REACT:`${l}/lib/chat/react.js`,LIB_CHAT_COMPONENTS:`${l}/lib/chat/components.js`,LIB_CHAT_PRIMITIVES:`${l}/lib/chat/primitives.js`};var Ut={ROOT:".veryfront",CACHE:".veryfront/cache",KV:".veryfront/kv",LOGS:".veryfront/logs",TMP:".veryfront/tmp"},go=Ut.CACHE;var po={HMR_RUNTIME:K.HMR_RUNTIME,ERROR_OVERLAY:K.ERROR_OVERLAY};var h=F.RSC,Z=F.FS,Q="veryfront-hydration-data",C="rsc-root";var R=class{constructor(e,r){p(this,"prefix",e);p(this,"level",r)}log(e,r,n,...s){this.level>e||r?.(n,...s)}debug(e,...r){this.log(0,console.debug,`[${this.prefix}] DEBUG: ${e}`,...r)}info(e,...r){this.log(1,console.log,`[${this.prefix}] ${e}`,...r)}warn(e,...r){this.log(2,console.warn,`[${this.prefix}] WARN: ${e}`,...r)}error(e,...r){this.log(3,console.error,`[${this.prefix}] ERROR: ${e}`,...r)}};function Pt(){if(typeof window>"u")return 2;let t=globalThis;return t.__VERYFRONT_DEV__||t.__RSC_DEV__?t.__VERYFRONT_DEBUG__||t.__RSC_DEBUG__?0:1:2}var N=Pt(),i=new R("RSC",N),yo=new R("PREFETCH",N),_o=new R("HYDRATE",N),ho=new R("VERYFRONT",N);function E(t=document){try{let e=t.getElementById(Q);return e?JSON.parse(e.textContent||"{}"):null}catch(e){return i.debug("hydration data parse failed",e),null}}function A(t){return t?.clientModuleStrategy?t.clientModuleStrategy:t?.dev?"fs":"rsc-module"}function Ht(t,e){if(!e)return t;let r=t.includes("?")?"&":"?";return`${t}${r}v=${encodeURIComponent(e)}`}function Vt(t,e){return Ht(`${Z}${H(t)}.js`,e)}function Ft(t,e){let r=e?`&v=${encodeURIComponent(e)}`:"";return`${h}module?rel=${encodeURIComponent(t)}${r}`}function D(t){if(t.strategy==="fs"){let e=t.absPath??t.rel;return e?Vt(e,t.version):null}return Ft(t.rel,t.version)}function v(t=document,e=_){let r=V(t);return{react:O("react",r)?"react":J(e),reactDomClient:O("react-dom/client",r)?"react-dom/client":X(e)}}function tt(t=document){let e=V(t);return O("veryfront/router",e)?"veryfront/router":null}function o(t){return{...t,create(e){return new k(e?.message||e?.detail||t.title,{slug:t.slug,category:t.category,status:e?.status??t.status,title:t.title,suggestion:t.suggestion,detail:e?.detail,cause:e?.cause,instance:e?.instance,context:e?.context})}}}var k=class extends Error{constructor(r,n){super(r);p(this,"slug");p(this,"category");p(this,"status");p(this,"title");p(this,"suggestion");p(this,"detail");p(this,"cause");p(this,"instance");p(this,"context");this.name="VeryfrontError",this.slug=n.slug,this.category=n.category,this.status=n.status,this.title=n.title,this.suggestion=n.suggestion,this.detail=n.detail,this.cause=n.cause,this.instance=n.instance,this.context=n.context}toRFC9457(){return{type:`https://veryfront.com/docs/errors/${this.slug}`,title:this.title,status:this.status,detail:this.detail,instance:this.instance,category:this.category,suggestion:this.suggestion,cause:typeof this.cause=="string"?this.cause:void 0}}getDocsUrl(){return`https://veryfront.com/docs/errors/${this.slug}`}};var kt=o({slug:"config-not-found",category:"CONFIG",status:404,title:"Configuration file not found",suggestion:"Run \'vf init\' to create a configuration file"}),Gt=o({slug:"config-invalid",category:"CONFIG",status:400,title:"Invalid configuration format",suggestion:"Check your veryfront.config.ts for syntax errors"}),$t=o({slug:"config-parse-error",category:"CONFIG",status:400,title:"Failed to parse configuration",suggestion:"Ensure your configuration file is valid TypeScript/JSON"}),Bt=o({slug:"config-validation-error",category:"CONFIG",status:422,title:"Configuration validation failed",suggestion:"Check the configuration against the schema requirements"}),Yt=o({slug:"config-type-error",category:"CONFIG",status:400,title:"Configuration type mismatch",suggestion:"Ensure configuration values match expected types"}),jt=o({slug:"import-map-invalid",category:"CONFIG",status:400,title:"Invalid import map configuration",suggestion:"Check your import map syntax and paths"}),Wt=o({slug:"cors-config-invalid",category:"CONFIG",status:400,title:"Invalid CORS configuration",suggestion:"Review CORS settings in your configuration"}),qt=o({slug:"config-validation-failed",category:"CONFIG",status:400,title:"Configuration validation failed",suggestion:"Check configuration values against requirements"}),zt=o({slug:"webhook-config-invalid",category:"CONFIG",status:400,title:"Invalid webhook configuration",suggestion:"Check webhook definition fields, target settings, and eventFilter conditions"}),Jt=o({slug:"schedule-config-invalid",category:"CONFIG",status:400,title:"Invalid schedule configuration",suggestion:"Check schedule definition fields, cron expression, target settings, and positive-integer limits"}),Xt=o({slug:"trigger-config-invalid",category:"CONFIG",status:400,title:"Invalid trigger configuration",suggestion:"Check trigger ID format (lowercase, alphanumeric, dots/slashes/hyphens) and ensure all input values are JSON-serializable"}),et={"config-not-found":kt,"config-invalid":Gt,"config-parse-error":$t,"config-validation-error":Bt,"config-type-error":Yt,"import-map-invalid":jt,"cors-config-invalid":Wt,"config-validation-failed":qt,"webhook-config-invalid":zt,"schedule-config-invalid":Jt,"trigger-config-invalid":Xt};var Kt=o({slug:"build-failed",category:"BUILD",status:500,title:"Build process failed",suggestion:"Check the build output for specific errors"}),Zt=o({slug:"bundle-error",category:"BUILD",status:500,title:"Bundle generation failed",suggestion:"Review bundler output for details"}),Qt=o({slug:"typescript-error",category:"BUILD",status:500,title:"TypeScript compilation error",suggestion:"Fix TypeScript errors shown in the output"}),te=o({slug:"mdx-compile-error",category:"BUILD",status:500,title:"MDX compilation failed",suggestion:"Check your MDX file syntax"}),ee=o({slug:"asset-optimization-error",category:"BUILD",status:500,title:"Asset optimization failed",suggestion:"Check asset file formats and paths"}),re=o({slug:"ssg-generation-error",category:"BUILD",status:500,title:"Static site generation failed",suggestion:"Review SSG configuration and data fetching"}),oe=o({slug:"sourcemap-error",category:"BUILD",status:500,title:"Source map generation failed",suggestion:"Check source map configuration"}),ne=o({slug:"compilation-error",category:"BUILD",status:500,title:"Compilation failed",suggestion:"Review compiler output for specific errors"}),rt={"build-failed":Kt,"bundle-error":Zt,"typescript-error":Qt,"mdx-compile-error":te,"asset-optimization-error":ee,"ssg-generation-error":re,"sourcemap-error":oe,"compilation-error":ne};var se=o({slug:"hydration-mismatch",category:"RUNTIME",status:500,title:"Client/server hydration mismatch",suggestion:"Ensure server and client render the same content"}),ie=o({slug:"render-error",category:"RUNTIME",status:500,title:"Component render failed",suggestion:"Check component for runtime errors"}),ae=o({slug:"component-error",category:"RUNTIME",status:500,title:"Component execution error",suggestion:"Review component logic and props"}),ce=o({slug:"layout-not-found",category:"RUNTIME",status:404,title:"Layout component not found",suggestion:"Ensure layout file exists at the expected path"}),le=o({slug:"page-not-found",category:"RUNTIME",status:404,title:"Page component not found",suggestion:"Check that the page file exists in the routes directory"}),ue=o({slug:"api-error",category:"RUNTIME",status:500,title:"API route handler error",suggestion:"Review API route handler for errors"}),de=o({slug:"middleware-error",category:"RUNTIME",status:500,title:"Middleware execution error",suggestion:"Check middleware function for errors"}),ge=o({slug:"trigger-target-not-found",category:"RUNTIME",status:404,title:"Trigger target not found",suggestion:"Ensure the referenced task or workflow ID is registered in the project"}),pe=o({slug:"trigger-execution-failed",category:"RUNTIME",status:500,title:"Trigger target execution failed",suggestion:"Check the task or workflow for errors and review the trigger input"}),fe=o({slug:"trigger-not-supported",category:"RUNTIME",status:501,title:"Trigger target type not supported in local runtime",suggestion:"Use a workflow or task target for local trigger runs; agent targets require the Cloud runtime"}),ot={"hydration-mismatch":se,"render-error":ie,"component-error":ae,"layout-not-found":ce,"page-not-found":le,"api-error":ue,"middleware-error":de,"trigger-target-not-found":ge,"trigger-execution-failed":pe,"trigger-not-supported":fe};var me=o({slug:"route-conflict",category:"ROUTE",status:409,title:"Conflicting route definitions",suggestion:"Rename or reorganize conflicting route files"}),Re=o({slug:"invalid-route-file",category:"ROUTE",status:400,title:"Invalid route file structure",suggestion:"Ensure route file exports required functions"}),Ee=o({slug:"route-handler-invalid",category:"ROUTE",status:400,title:"Invalid route handler export",suggestion:"Export a valid handler function from the route file"}),ye=o({slug:"dynamic-route-error",category:"ROUTE",status:500,title:"Dynamic route parsing failed",suggestion:"Check dynamic route segment syntax"}),_e=o({slug:"route-params-error",category:"ROUTE",status:400,title:"Route parameters invalid",suggestion:"Validate route parameter values"}),he=o({slug:"api-route-error",category:"ROUTE",status:500,title:"API route definition error",suggestion:"Review API route configuration"}),nt={"route-conflict":me,"invalid-route-file":Re,"route-handler-invalid":Ee,"dynamic-route-error":ye,"route-params-error":_e,"api-route-error":he};var Ce=o({slug:"module-not-found",category:"MODULE",status:404,title:"Module could not be resolved",suggestion:"Check the import path and ensure the module is installed"}),Te=o({slug:"import-resolution-error",category:"MODULE",status:500,title:"Import path resolution failed",suggestion:"Verify import paths and module configuration"}),xe=o({slug:"circular-dependency",category:"MODULE",status:500,title:"Circular dependency detected",suggestion:"Refactor imports to break the circular dependency"}),Ie=o({slug:"invalid-import",category:"MODULE",status:400,title:"Invalid import statement",suggestion:"Fix import syntax or path"}),Se=o({slug:"dependency-missing",category:"MODULE",status:404,title:"Required dependency not installed",suggestion:"Install the missing dependency with your package manager"}),Oe=o({slug:"version-mismatch",category:"MODULE",status:409,title:"Dependency version mismatch",suggestion:"Update dependencies to compatible versions"}),st={"module-not-found":Ce,"import-resolution-error":Te,"circular-dependency":xe,"invalid-import":Ie,"dependency-missing":Se,"version-mismatch":Oe};var Ne=o({slug:"port-in-use",category:"SERVER",status:409,title:"Server port already in use",suggestion:"Use a different port or stop the process using this port"}),Ae=o({slug:"server-start-error",category:"SERVER",status:500,title:"Server failed to start",suggestion:"Check server configuration and port availability"}),De=o({slug:"cache-error",category:"SERVER",status:500,title:"Cache operation failed",suggestion:"Clear the cache and try again"}),ve=o({slug:"file-watch-error",category:"SERVER",status:500,title:"File watcher error",suggestion:"Restart the development server"}),be=o({slug:"request-error",category:"SERVER",status:500,title:"HTTP request handling error",suggestion:"Check request handler and middleware"}),Me=o({slug:"service-overloaded",category:"SERVER",status:503,title:"Service overloaded",suggestion:"Reduce load or scale up resources"}),Le=o({slug:"semaphore-timeout",category:"SERVER",status:503,title:"Semaphore acquire timeout",suggestion:"Reduce concurrency or increase the semaphore acquire timeout"}),we=o({slug:"circuit-breaker-open",category:"SERVER",status:503,title:"Circuit breaker is open",suggestion:"Wait for the breaker reset timeout before retrying"}),Ue=o({slug:"cache-path-mismatch",category:"SERVER",status:500,title:"Cache path mismatch",suggestion:"Clear the cache directory and rebuild"}),Pe=o({slug:"network-error",category:"SERVER",status:502,title:"Network operation failed",suggestion:"Check network connectivity and retry"}),He=o({slug:"api-client-error",category:"SERVER",status:500,title:"API client request failed",suggestion:"Check API connectivity and authentication"}),Ve=o({slug:"token-storage-error",category:"SERVER",status:500,title:"Token storage operation failed",suggestion:"Check token storage backend and credentials"}),Fe=o({slug:"cache-invariant-violation",category:"SERVER",status:500,title:"Cache path invariant violated",suggestion:"Clear the cache and rebuild"}),ke=o({slug:"release-not-found",category:"SERVER",status:404,title:"No active release found",suggestion:"Deploy the project to create a release for this environment"}),Ge=o({slug:"fallback-exhausted",category:"SERVER",status:500,title:"Primary and fallback operations both failed",suggestion:"Check service availability and connectivity"}),it={"port-in-use":Ne,"server-start-error":Ae,"cache-error":De,"file-watch-error":ve,"request-error":be,"service-overloaded":Me,"semaphore-timeout":Le,"circuit-breaker-open":we,"cache-path-mismatch":Ue,"network-error":Pe,"api-client-error":He,"token-storage-error":Ve,"cache-invariant-violation":Fe,"release-not-found":ke,"fallback-exhausted":Ge};var $e=o({slug:"client-boundary-violation",category:"BOUNDARY",status:400,title:"Client boundary rule violation",suggestion:"Add \'use client\' directive or move code to a client component"}),Be=o({slug:"server-only-in-client",category:"BOUNDARY",status:400,title:"Server-only code in client component",suggestion:"Move server-only code to a server component"}),Ye=o({slug:"client-only-in-server",category:"BOUNDARY",status:400,title:"Client-only code in server component",suggestion:"Move client-only code to a client component"}),je=o({slug:"invalid-use-client",category:"BOUNDARY",status:400,title:"Invalid \'use client\' directive",suggestion:"Place \'use client\' at the top of the file"}),We=o({slug:"invalid-use-server",category:"BOUNDARY",status:400,title:"Invalid \'use server\' directive",suggestion:"Place \'use server\' at the top of the file or function"}),qe=o({slug:"rsc-payload-error",category:"BOUNDARY",status:500,title:"RSC payload serialization error",suggestion:"Ensure props are serializable (no functions, symbols, etc.)"}),at={"client-boundary-violation":$e,"server-only-in-client":Be,"client-only-in-server":Ye,"invalid-use-client":je,"invalid-use-server":We,"rsc-payload-error":qe};var ze=o({slug:"hmr-error",category:"DEV",status:500,title:"Hot module replacement error",suggestion:"Restart the development server"}),Je=o({slug:"dev-server-error",category:"DEV",status:500,title:"Development server error",suggestion:"Check the dev server logs and restart"}),Xe=o({slug:"fast-refresh-error",category:"DEV",status:500,title:"Fast refresh failed",suggestion:"Save the file again or restart the dev server"}),Ke=o({slug:"error-overlay-error",category:"DEV",status:500,title:"Error overlay failed",suggestion:"Check browser console for details"}),Ze=o({slug:"source-map-error",category:"DEV",status:500,title:"Source map loading error",suggestion:"Rebuild or clear cache"}),ct={"hmr-error":ze,"dev-server-error":Je,"fast-refresh-error":Xe,"error-overlay-error":Ke,"source-map-error":Ze};var Qe=o({slug:"deployment-error",category:"DEPLOY",status:500,title:"Deployment process failed",suggestion:"Check deployment logs for details"}),tr=o({slug:"platform-error",category:"DEPLOY",status:500,title:"Platform-specific error",suggestion:"Check platform documentation and requirements"}),er=o({slug:"env-var-missing",category:"DEPLOY",status:500,title:"Required environment variable missing",suggestion:"Set the required environment variable"}),rr=o({slug:"production-build-required",category:"DEPLOY",status:400,title:"Production build required",suggestion:"Run \'vf build\' before deploying"}),lt={"deployment-error":Qe,"platform-error":tr,"env-var-missing":er,"production-build-required":rr};var or=o({slug:"agent-error",category:"AGENT",status:500,title:"Agent operation error",suggestion:"Check agent configuration and logs"}),nr=o({slug:"agent-not-found",category:"AGENT",status:404,title:"Agent not found",suggestion:"Verify the agent ID exists"}),sr=o({slug:"agent-timeout",category:"AGENT",status:408,title:"Agent operation timed out",suggestion:"Increase timeout or simplify the request"}),ir=o({slug:"agent-intent-error",category:"AGENT",status:400,title:"Agent intent parsing error",suggestion:"Rephrase the request more clearly"}),ar=o({slug:"orchestration-error",category:"AGENT",status:500,title:"Multi-agent orchestration error",suggestion:"Check agent coordination logic"}),cr=o({slug:"cost-limit-exceeded",category:"AGENT",status:429,title:"Cost limit exceeded",suggestion:"Wait for the budget period to reset or increase the limit"}),lr=o({slug:"tool-id-conflict",category:"AGENT",status:409,title:"Tool ID conflict",suggestion:"Use a unique tool ID or rename one of the conflicting tools"}),ut={"agent-error":or,"agent-not-found":nr,"agent-timeout":sr,"agent-intent-error":ir,"orchestration-error":ar,"cost-limit-exceeded":cr,"tool-id-conflict":lr};var ur=o({slug:"unknown-error",category:"GENERAL",status:500,title:"Unknown/unclassified error",suggestion:"Check logs for more details"}),dr=o({slug:"permission-denied",category:"GENERAL",status:403,title:"File/resource permission denied",suggestion:"Check file permissions and access rights"}),gr=o({slug:"file-not-found",category:"GENERAL",status:404,title:"File not found",suggestion:"Verify the file path exists"}),pr=o({slug:"resource-not-found",category:"GENERAL",status:404,title:"Requested resource not found",suggestion:"Verify the referenced resource ID or name exists"}),fr=o({slug:"invalid-argument",category:"GENERAL",status:400,title:"Invalid function argument",suggestion:"Check argument types and values"}),mr=o({slug:"timeout-error",category:"GENERAL",status:408,title:"Operation timed out",suggestion:"Increase timeout or optimize the operation"}),Rr=o({slug:"initialization-error",category:"GENERAL",status:500,title:"Initialization failed",suggestion:"Check initialization requirements and dependencies"}),Er=o({slug:"not-supported",category:"GENERAL",status:501,title:"Feature not supported",suggestion:"Check documentation for supported features"}),G=o({slug:"security-violation",category:"GENERAL",status:403,title:"Security violation detected",suggestion:"Check for path traversal or unauthorized access attempts"}),yr=o({slug:"input-validation-failed",category:"GENERAL",status:400,title:"Input validation failed",suggestion:"Check request input against validation rules"}),dt={"unknown-error":ur,"permission-denied":dr,"file-not-found":gr,"resource-not-found":pr,"invalid-argument":fr,"timeout-error":mr,"initialization-error":Rr,"not-supported":Er,"security-violation":G,"input-validation-failed":yr};var En={...et,...rt,...ot,...nt,...st,...it,...at,...ct,...lt,...ut,...dt};var _r=[{source:String.raw`<script[^>]*>[\\s\\S]*?<\\/script>`,flags:"gi",name:"inline script"},{source:String.raw`javascript:`,flags:"gi",name:"javascript: URL"},{source:String.raw`\\bon\\w+\\s*=`,flags:"gi",name:"event handler attribute"},{source:String.raw`data:\\s*text\\/html`,flags:"gi",name:"data: HTML URL"}];function hr(){return _r.map(({source:t,flags:e,name:r})=>({pattern:new RegExp(t,e),name:r}))}function Cr(){let t=globalThis;return t.__VERYFRONT_DEV__===!0||t.Deno?.env?.get?.("VERYFRONT_ENV")==="development"}function T(t,e={}){let{allowInlineScripts:r=!1,strict:n=!1,warn:s=!0}=e;for(let{pattern:u,name:c}of hr())if(!(r&&c==="inline script")&&(u.lastIndex=0,!!u.test(t)&&(s&&console.warn(`[Security] Suspicious ${c} detected in server HTML`),n||!Cr())))throw G.create({detail:`Potentially unsafe HTML: ${c} detected`});return t}function x(t,e){let r=e==="root"?C:`rsc-slot-${e}`,n=t.getElementById(r);if(n)return n;let s=t.createElement("div");return s.id=r,t.body.appendChild(s),s}function Tr(t,e){if(e.type!=="slot")return;let r=x(t,e.id);r.innerHTML=T(String(e.html??""))}function gt(t,e){let r=e.split(`\n`),n=r.pop()??"";for(let s of r){let u=s.trim();if(!u)continue;let c;try{c=JSON.parse(u)}catch(a){i.debug("[client-dom] malformed NDJSON line",{line:u,error:a instanceof Error?a.message:String(a)});continue}if(!c||typeof c!="object")continue;let g=c;if(g.type==="slot"){Tr(t,g);try{Sr(t,g.id||"root")}catch(a){i.debug("[client-dom] hydration optional failed",a)}}}return n}function xr(t){return new Promise((e,r)=>{let n=()=>r(new DOMException("aborted","AbortError"));if(t.aborted){n();return}t.addEventListener("abort",n,{once:!0})})}async function pt(t,e=document,r){let n="body"in t?t:null,s=n?.body??t;if(!s)return;let u=s.getReader(),c=new TextDecoder,g="",a=!1;try{for(;;){if(r?.aborted)throw new DOMException("aborted","AbortError");let d=u.read(),{done:f,value:y}=r?await Promise.race([d,xr(r)]):await d;if(f){a=!0;break}g+=c.decode(y,{stream:!0}),g=gt(e,g)}g&&gt(e,`${g}\n`)}catch(d){throw d instanceof Error&&d.name==="AbortError"||i.debug("[client-dom] consumeNdjsonStream error",d),d}finally{try{await u.cancel()}catch(d){a||i.debug("[client-dom] reader.cancel failed",d)}try{u.releaseLock()}catch(d){i.debug("[client-dom] reader.releaseLock failed",d)}if(typeof s.cancel=="function")try{await s.cancel()}catch(d){i.debug("[client-dom] stream.cancel failed",d)}if(typeof n?.body?.cancel=="function")try{await n.body.cancel()}catch(d){i.debug("[client-dom] response.body.cancel failed",d)}}}function Ir(t,e){let r=x(t,e),n=[],s=u=>{let c=u;c.dataset?.clientRef&&n.push(c);for(let g of u.children)s(g)};return s(r),n}function Sr(t,e){let r=Ir(t,e);for(let n of r){let s=n.dataset?.clientRef;s&&(n.dataset.hydrated="true",i.debug("[client-dom] marked for hydration",s))}}var Or=new Set(["server","client","html","fragment"]);function ft(t){if(!t)return[];try{let e=JSON.parse(t);return Ar(e)?e.nodes:[]}catch{return[]}}async function B(t,e,r){return await Promise.all(t.map(n=>Nr(n,e,r)))}async function Nr(t,e,r){if(t.type==="html")return t.text??t.html??"";let n=await B(t.children??[],e,r);if(t.type==="fragment"||t.type==="server"&&!t.component)return e.createElement(e.Fragment,{},...n);if(t.type==="server")return e.createElement(t.component,t.props??{},...n);let s=await r(t.component);return s?e.createElement(s,t.props??{},...n):null}function Ar(t){return!$(t)||t.version!==1||!Array.isArray(t.nodes)?!1:t.nodes.every(e=>mt(e,0))}function mt(t,e){return e>100||!$(t)||!Or.has(t.type)||t.type==="html"&&typeof t.html!="string"&&typeof t.text!="string"||t.type==="client"&&typeof t.component!="string"||t.type==="server"&&t.component!==void 0&&typeof t.component!="string"||t.props!==void 0&&!$(t.props)?!1:t.children===void 0?!0:Array.isArray(t.children)&&t.children.every(r=>mt(r,e+1))}function $(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Dr(t){if(!t)return{};let e={};for(let[r,n]of Object.entries(t))e[r]=Array.isArray(n)?n.join("/"):n;return e}async function b(t,e,r=document){try{let n=tt(r);if(!n)return t;let u=(await import(n)).wrapForHydration;return typeof u!="function"?t:u(t,{params:Dr(e?.params),frontmatter:e?.frontmatter??{}})}catch(n){return i.debug("router provider wrap failed",n),t}}var vr=100;function br(t,e){if(globalThis.__VF_CLIENT_MOD_CACHE??(globalThis.__VF_CLIENT_MOD_CACHE=new Map),globalThis.__VF_CLIENT_MOD_CACHE.size>=vr){let r=globalThis.__VF_CLIENT_MOD_CACHE.keys().next().value;r&&globalThis.__VF_CLIENT_MOD_CACHE.delete(r)}globalThis.__VF_CLIENT_MOD_CACHE.set(t,e)}function Rt(t){let e=t.match(/^\\/app\\/(.+)#([\\w$.-]+)$/);if(e)return{rel:`/${e[1]||""}`,exportName:e[2]||"default"};let r=t.match(/^(\\/_veryfront\\/[^#]+)#([\\w$.-]+)$/);return r?{moduleUrl:r[1],exportName:r[2]||"default"}:(i.debug("hydrate: unrecognised client ref format, skipping",{ref:t}),null)}function Mr(t){let e=t.dataset?.rscProps;if(!e)return{};try{let r=JSON.parse(e);return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}catch(r){return i.debug("hydrate: invalid client boundary props, using empty props",r),{}}}function Lr(t){return ft(t.dataset?.rscChildren)}async function wr(){try{let t=await fetch("/_veryfront/rsc/manifest");return t.ok?await t.json():null}catch{return null}}async function Et(t,e,r){let n=Ur(t,e,r),s=e.moduleUrl??e.rel;if(!s)return null;let u=`${s}#${t.hash??""}`;try{let c=globalThis.__VF_CLIENT_MOD_CACHE?.get(u);if(c)return c}catch(c){i.debug("hydrate: cache get failed",c)}if(!n)return null;try{let c=await import(n);try{br(u,c)}catch(g){i.debug("hydrate: cache set failed",g)}return c}catch(c){return i.debug("hydrate: failed to import module",{moduleUrl:n,error:c}),null}}function Ur(t,e,r){if(e.moduleUrl)return e.moduleUrl;if(!e.rel)return null;let n=t.graphIds?.client.find(s=>s.rel===e.rel)?.path;return D({strategy:r,rel:e.rel,absPath:n,version:t.hash})}function Pr(t){let e=Array.from(t.querySelectorAll("[data-client-ref]")),r=new Set(e);return e.filter(n=>{let s=n.parentElement;for(;s;){if(r.has(s))return!1;s=s.parentElement}return!0})}async function yt(t=document){let e=null;try{e=await wr()}catch(a){i.debug("hydrate: fetch manifest failed",a)}if(!e){i.debug("hydrate: no manifest");return}let r=Pr(t);try{let a=globalThis.__VF_MANIFEST_HASH;if(!r.some(f=>f.dataset?.hydrated!=="true")&&a&&e.hash&&a===e.hash)return}catch(a){i.debug("hydrate: hmr hash read failed",a)}if(r.length===0){try{globalThis.__VF_MANIFEST_HASH=e.hash??""}catch(a){i.debug("hydrate: set hash failed",a)}return}let n=E(t),s=A(n);try{if(globalThis.__VF_TEST_MODE__){globalThis.__VF_HYDRATE_CALLED=!0,globalThis.__VF_MANIFEST_HASH=e.hash??"";return}}catch(a){i.debug("hydrate: test mode flags failed",a)}let u=v(t,n?.reactVersion),[{default:c},{createRoot:g}]=await Promise.all([import(u.react),import(u.reactDomClient)]);for(let a of r){let d=a.dataset?.clientRef??"";if(!d||a.dataset?.hydrated==="true")continue;let f=Rt(d);if(!f)continue;let y=await Et(e,f,s);if(!y)continue;let j=y[f.exportName]??y.default;if(typeof j=="function")try{let L=g(a),_t=Mr(a),ht=Lr(a),Ct=await B(ht,{Fragment:c.Fragment,createElement(I,w,...S){return c.createElement(I,w,...S)}},async I=>{let w=e.modules.find(xt=>xt.id===I),S=e.components?.[I],W=w?.clientRef??(S?`${S}#default`:void 0);if(!W)return null;let U=Rt(W);if(!U)return null;let P=await Et(e,U,s);if(!P)return null;let q=P[U.exportName]??P.default;return typeof q=="function"?q:null}),Tt=await b(c.createElement(j,_t,...Ct),n,t);L.render(Tt),a.dataset.hydrated="true"}catch(L){i.warn("hydrate: render failed",L)}}try{globalThis.__VF_MANIFEST_HASH=e.hash??""}catch(a){i.debug("hydrate: set hash failed (post)",a)}}async function Hr(){let t=E(document),e=v(document,t?.reactVersion),[r,n]=await Promise.all([import(e.react),import(e.reactDomClient)]);return{React:r,ReactDOM:n}}var Vr=new Set(["SCRIPT","STYLE","NOSCRIPT","TEMPLATE"]);function Y(t){let e=t.getAttribute("style")??"";return t.hasAttribute("data-veryfront-head")||t.hasAttribute("hidden")||/(?:^|;)\\s*display\\s*:\\s*none(?:\\s*;|$)/i.test(e)||Vr.has(t.tagName.toUpperCase())}function Fr(t,e){return t.find(r=>r.tagName.toUpperCase()==="DIV"&&!!r.getAttribute("class")?.trim()&&!Y(r))??e}function kr(t,e){return t===e}function Gr(t,e){let r=document.createElement("div");r.setAttribute("data-veryfront-hydration-root","page");let n=t.find(s=>!Y(s));n?.parentNode===e?e.insertBefore(r,n):e.appendChild(r);for(let s of t)!Y(s)&&s.parentNode===e&&r.appendChild(s);return r}function $r(t,e,r=document){return!!e?.pagePath&&typeof t?.__veryfrontRenderPage=="function"&&!!r.getElementById("root")}function Br(t,e){return e?.pagePath?!1:!!t.getElementById(C)}function Yr(t=import.meta.url){try{return new URL(t,"http://veryfront.local").searchParams.get("hydrate")==="1"}catch{return!1}}function jr(t){return t==="rsc-module"}async function Wr(t){try{let e=await fetch(h+"stream"+t);if(!e.ok||!e.body)return!1;let r=new AbortController;return addEventListener("pagehide",()=>r.abort(),{once:!0}),await pt(e,document,r.signal),!0}catch(e){return i.debug("tryStream failed",e),!1}}async function M(){try{await yt(document)}catch(t){i.debug("hydration failed",t)}}async function qr(t,e){try{let{React:r,ReactDOM:n}=await Hr(),s=D({strategy:e,rel:t});if(!s)return!1;i.debug("Loading component from:",s);let c=(await import(s)).default;if(typeof c!="function")return i.debug("Page component is not a function"),!1;let g=Array.from(document.body.children),a=Fr(g,document.body),d=kr(a,document.body)?Gr(g,document.body):a,f=await b(r.createElement(c,{}),E(document));return jr(e)?n.createRoot(d).render(f):n.hydrateRoot(d,f,{identifierPrefix:"vf",onRecoverableError:()=>{}}),i.debug("Page component hydrated successfully"),!0}catch(r){return i.error("Page hydration failed",r),!1}}async function zr(t){try{let e=await fetch(h+"payload"+t);if(!e.ok)return!1;let r=await e.json();if(r?.slots){for(let[n,s]of Object.entries(r.slots))x(document,n).innerHTML=T(String(s||""));return!0}return x(document,C).innerHTML=T(String(r?.html||"")),!0}catch(e){return i.debug("payload fetch failed",e),!1}}async function Jr(){try{let t=globalThis.window?.location.search??"",e=E(document);if(Yr()){await M();return}let r=e?.pagePath,n=A(e);if(r){if($r(globalThis.window,e,document)){i.debug("Page renderer owns hydration");return}i.debug("Found page component in hydration data:",r),await qr(r,n)&&i.debug("Client component hydrated successfully");return}if(!Br(document,e))return;if(await Wr(t)){await M();return}if(await zr(t)){await M();return}await M()}catch(t){i.error("boot failed",t)}}if(typeof document<"u"){let t=()=>{Jr()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t()}export{Jr as boot,Fr as selectHydrationRoot,Br as shouldAttemptRSCTransport,Yr as shouldHydrateOnly,jr as shouldRenderPageComponent,$r as shouldUsePageRendererHydration,kr as shouldWrapPageHydrationRoot};\n';
8
+ export const CLIENT_BOOT_BUNDLE = 'var It=Object.defineProperty;var St=(t,e,r)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var p=(t,e,r)=>St(t,typeof e!="symbol"?e+"":e,r);var Ot="3.2.3";function Nt(t,e,r,n){let s=[];if(n?.external?.length&&s.push(`external=${n.external.join(",")}`),s.push(`target=${n?.target??"es2022"}`),n?.deps){let a=Object.entries(n.deps).map(([d,f])=>`${d}@${f}`).join(",");s.push(`deps=${a}`)}let u=e?`@${e}`:"",c=r??"",g=s.length?`?${s.join("&")}`:"";return`https://esm.sh/${t}${u}${c}${g}`}function m(t,e,r,n=!1){return Nt(t,e,r,{external:n?["react"]:void 0,deps:{csstype:Ot}})}var Dt="19.2.4",_=Dt;function z(t=_){return{react:m("react",t),"react-dom":m("react-dom",t,void 0,!0),"react-dom/client":m("react-dom",t,"/client",!0),"react-dom/server":m("react-dom",t,"/server",!0),"react/jsx-runtime":m("react",t,"/jsx-runtime",!0),"react/jsx-dev-runtime":m("react",t,"/jsx-dev-runtime",!0)}}function J(t=_){return z(t).react}function X(t=_){return z(t)["react-dom/client"]}function vt(t){return t.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function bt(t){if(typeof globalThis.btoa=="function")try{return globalThis.btoa(t)}catch{return Mt(new TextEncoder().encode(t))}let e=globalThis.Buffer;if(e)return e.from(t,"utf8").toString("base64");throw new Error("Base64 encoding is not supported in this runtime")}function Mt(t){let e=globalThis.Buffer;if(e)return e.from(t).toString("base64");if(typeof globalThis.btoa=="function"){let r="";for(let n of t)r+=String.fromCharCode(n);return globalThis.btoa(r)}throw new Error("Base64 encoding is not supported in this runtime")}function H(t){return vt(bt(t))}var io=Object.freeze({react:"","react-dom":"","react-dom/client":"","react-dom/server":"","react/jsx-runtime":"","react/jsx-dev-runtime":""});function O(t,e){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t))return!0;for(let r of Object.keys(e))if(r.endsWith("/")&&t.startsWith(r))return!0;return!1}function Lt(t){try{return JSON.parse(t)?.imports??{}}catch(e){return console.warn("Failed to parse import map JSON; treating as empty",{errorName:e instanceof Error?e.name:typeof e,inputLength:t.length}),{}}}function V(t=document){let e=t.querySelector(\'script[type="importmap"]\');return e?.textContent?Lt(e.textContent):{}}var l="/_veryfront",F={RSC:`${l}/rsc/`,FS:`${l}/fs/`,MODULES:`${l}/modules/`,PAGES:`${l}/pages/`,DATA:`${l}/data/`,LIB:`${l}/lib/`,CHUNKS:`${l}/chunks/`,CLIENT:`${l}/client/`},K={HMR_RUNTIME:`${l}/hmr-runtime.js`,HMR:`${l}/hmr.js`,ERROR_OVERLAY:`${l}/error-overlay.js`,DEV_LOADER:`${l}/dev-loader.js`,CLIENT_LOG:`${l}/log`,CLIENT_JS:`${l}/client.js`,ROUTER_JS:`${l}/router.js`,PREFETCH_JS:`${l}/prefetch.js`,MANIFEST_JSON:`${l}/manifest.json`,APP_JS:`${l}/app.js`,RSC_CLIENT:`${l}/rsc/client.js`,RSC_MANIFEST:`${l}/rsc/manifest`,RSC_STREAM:`${l}/rsc/stream`,RSC_PAYLOAD:`${l}/rsc/payload`,RSC_RENDER:`${l}/rsc/render`,RSC_PAGE:`${l}/rsc/page`,RSC_MODULE:`${l}/rsc/module`,RSC_DOM:`${l}/rsc/dom.js`,LIB_CHAT_REACT:`${l}/lib/chat/react.js`,LIB_CHAT_COMPONENTS:`${l}/lib/chat/components.js`,LIB_CHAT_PRIMITIVES:`${l}/lib/chat/primitives.js`};var Ut={ROOT:".veryfront",CACHE:".veryfront/cache",KV:".veryfront/kv",LOGS:".veryfront/logs",TMP:".veryfront/tmp"},go=Ut.CACHE;var po={HMR_RUNTIME:K.HMR_RUNTIME,ERROR_OVERLAY:K.ERROR_OVERLAY};var h=F.RSC,Z=F.FS,Q="veryfront-hydration-data",C="rsc-root";var R=class{constructor(e,r){p(this,"prefix",e);p(this,"level",r)}log(e,r,n,...s){this.level>e||r?.(n,...s)}debug(e,...r){this.log(0,console.debug,`[${this.prefix}] DEBUG: ${e}`,...r)}info(e,...r){this.log(1,console.log,`[${this.prefix}] ${e}`,...r)}warn(e,...r){this.log(2,console.warn,`[${this.prefix}] WARN: ${e}`,...r)}error(e,...r){this.log(3,console.error,`[${this.prefix}] ERROR: ${e}`,...r)}};function Pt(){if(typeof window>"u")return 2;let t=globalThis;return t.__VERYFRONT_DEV__||t.__RSC_DEV__?t.__VERYFRONT_DEBUG__||t.__RSC_DEBUG__?0:1:2}var N=Pt(),i=new R("RSC",N),yo=new R("PREFETCH",N),_o=new R("HYDRATE",N),ho=new R("VERYFRONT",N);function E(t=document){try{let e=t.getElementById(Q);return e?JSON.parse(e.textContent||"{}"):null}catch(e){return i.debug("hydration data parse failed",e),null}}function A(t){return t?.clientModuleStrategy?t.clientModuleStrategy:t?.dev?"fs":"rsc-module"}function Ht(t,e){if(!e)return t;let r=t.includes("?")?"&":"?";return`${t}${r}v=${encodeURIComponent(e)}`}function Vt(t,e){return Ht(`${Z}${H(t)}.js`,e)}function Ft(t,e){let r=e?`&v=${encodeURIComponent(e)}`:"";return`${h}module?rel=${encodeURIComponent(t)}${r}`}function D(t){if(t.strategy==="fs"){let e=t.absPath??t.rel;return e?Vt(e,t.version):null}return Ft(t.rel,t.version)}function v(t=document,e=_){let r=V(t);return{react:O("react",r)?"react":J(e),reactDomClient:O("react-dom/client",r)?"react-dom/client":X(e)}}function tt(t=document){let e=V(t);return O("veryfront/router",e)?"veryfront/router":null}function o(t){return{...t,create(e){return new k(e?.message||e?.detail||t.title,{slug:t.slug,category:t.category,status:e?.status??t.status,title:t.title,suggestion:t.suggestion,detail:e?.detail,cause:e?.cause,instance:e?.instance,context:e?.context})}}}var k=class extends Error{constructor(r,n){super(r);p(this,"slug");p(this,"category");p(this,"status");p(this,"title");p(this,"suggestion");p(this,"detail");p(this,"cause");p(this,"instance");p(this,"context");this.name="VeryfrontError",this.slug=n.slug,this.category=n.category,this.status=n.status,this.title=n.title,this.suggestion=n.suggestion,this.detail=n.detail,this.cause=n.cause,this.instance=n.instance,this.context=n.context}toRFC9457(){return{type:`https://veryfront.com/docs/errors/${this.slug}`,title:this.title,status:this.status,detail:this.detail,instance:this.instance,category:this.category,suggestion:this.suggestion,cause:typeof this.cause=="string"?this.cause:void 0}}getDocsUrl(){return`https://veryfront.com/docs/errors/${this.slug}`}};var kt=o({slug:"config-not-found",category:"CONFIG",status:404,title:"Configuration file not found",suggestion:"Run \'vf init\' to create a configuration file"}),Gt=o({slug:"config-invalid",category:"CONFIG",status:400,title:"Invalid configuration format",suggestion:"Check your veryfront.config.ts for syntax errors"}),$t=o({slug:"config-parse-error",category:"CONFIG",status:400,title:"Failed to parse configuration",suggestion:"Ensure your configuration file is valid TypeScript/JSON"}),Bt=o({slug:"config-validation-error",category:"CONFIG",status:422,title:"Configuration validation failed",suggestion:"Check the configuration against the schema requirements"}),Yt=o({slug:"config-type-error",category:"CONFIG",status:400,title:"Configuration type mismatch",suggestion:"Ensure configuration values match expected types"}),jt=o({slug:"import-map-invalid",category:"CONFIG",status:400,title:"Invalid import map configuration",suggestion:"Check your import map syntax and paths"}),Wt=o({slug:"cors-config-invalid",category:"CONFIG",status:400,title:"Invalid CORS configuration",suggestion:"Review CORS settings in your configuration"}),qt=o({slug:"config-validation-failed",category:"CONFIG",status:400,title:"Configuration validation failed",suggestion:"Check configuration values against requirements"}),zt=o({slug:"webhook-config-invalid",category:"CONFIG",status:400,title:"Invalid webhook configuration",suggestion:"Check webhook definition fields, target settings, and eventFilter conditions"}),Jt=o({slug:"schedule-config-invalid",category:"CONFIG",status:400,title:"Invalid schedule configuration",suggestion:"Check schedule definition fields, cron expression, target settings, and positive-integer limits"}),Xt=o({slug:"trigger-config-invalid",category:"CONFIG",status:400,title:"Invalid trigger configuration",suggestion:"Check trigger ID format (lowercase, alphanumeric, dots/slashes/hyphens) and ensure all input values are JSON-serializable"}),et={"config-not-found":kt,"config-invalid":Gt,"config-parse-error":$t,"config-validation-error":Bt,"config-type-error":Yt,"import-map-invalid":jt,"cors-config-invalid":Wt,"config-validation-failed":qt,"webhook-config-invalid":zt,"schedule-config-invalid":Jt,"trigger-config-invalid":Xt};var Kt=o({slug:"build-failed",category:"BUILD",status:500,title:"Build process failed",suggestion:"Check the build output for specific errors"}),Zt=o({slug:"bundle-error",category:"BUILD",status:500,title:"Bundle generation failed",suggestion:"Review bundler output for details"}),Qt=o({slug:"typescript-error",category:"BUILD",status:500,title:"TypeScript compilation error",suggestion:"Fix TypeScript errors shown in the output"}),te=o({slug:"mdx-compile-error",category:"BUILD",status:500,title:"MDX compilation failed",suggestion:"Check your MDX file syntax"}),ee=o({slug:"asset-optimization-error",category:"BUILD",status:500,title:"Asset optimization failed",suggestion:"Check asset file formats and paths"}),re=o({slug:"ssg-generation-error",category:"BUILD",status:500,title:"Static site generation failed",suggestion:"Review SSG configuration and data fetching"}),oe=o({slug:"sourcemap-error",category:"BUILD",status:500,title:"Source map generation failed",suggestion:"Check source map configuration"}),ne=o({slug:"compilation-error",category:"BUILD",status:500,title:"Compilation failed",suggestion:"Review compiler output for specific errors"}),rt={"build-failed":Kt,"bundle-error":Zt,"typescript-error":Qt,"mdx-compile-error":te,"asset-optimization-error":ee,"ssg-generation-error":re,"sourcemap-error":oe,"compilation-error":ne};var se=o({slug:"hydration-mismatch",category:"RUNTIME",status:500,title:"Client/server hydration mismatch",suggestion:"Ensure server and client render the same content"}),ie=o({slug:"render-error",category:"RUNTIME",status:500,title:"Component render failed",suggestion:"Check component for runtime errors"}),ae=o({slug:"component-error",category:"RUNTIME",status:500,title:"Component execution error",suggestion:"Review component logic and props"}),ce=o({slug:"layout-not-found",category:"RUNTIME",status:404,title:"Layout component not found",suggestion:"Ensure layout file exists at the expected path"}),le=o({slug:"page-not-found",category:"RUNTIME",status:404,title:"Page component not found",suggestion:"Check that the page file exists in the routes directory"}),ue=o({slug:"api-error",category:"RUNTIME",status:500,title:"API route handler error",suggestion:"Review API route handler for errors"}),de=o({slug:"middleware-error",category:"RUNTIME",status:500,title:"Middleware execution error",suggestion:"Check middleware function for errors"}),ge=o({slug:"trigger-target-not-found",category:"RUNTIME",status:404,title:"Trigger target not found",suggestion:"Ensure the referenced task or workflow ID is registered in the project"}),pe=o({slug:"trigger-execution-failed",category:"RUNTIME",status:500,title:"Trigger target execution failed",suggestion:"Check the task or workflow for errors and review the trigger input"}),fe=o({slug:"trigger-not-supported",category:"RUNTIME",status:501,title:"Trigger target type not supported in local runtime",suggestion:"Use a workflow or task target for local trigger runs; agent targets require the Cloud runtime"}),ot={"hydration-mismatch":se,"render-error":ie,"component-error":ae,"layout-not-found":ce,"page-not-found":le,"api-error":ue,"middleware-error":de,"trigger-target-not-found":ge,"trigger-execution-failed":pe,"trigger-not-supported":fe};var me=o({slug:"route-conflict",category:"ROUTE",status:409,title:"Conflicting route definitions",suggestion:"Rename or reorganize conflicting route files"}),Re=o({slug:"invalid-route-file",category:"ROUTE",status:400,title:"Invalid route file structure",suggestion:"Ensure route file exports required functions"}),Ee=o({slug:"route-handler-invalid",category:"ROUTE",status:400,title:"Invalid route handler export",suggestion:"Export a valid handler function from the route file"}),ye=o({slug:"dynamic-route-error",category:"ROUTE",status:500,title:"Dynamic route parsing failed",suggestion:"Check dynamic route segment syntax"}),_e=o({slug:"route-params-error",category:"ROUTE",status:400,title:"Route parameters invalid",suggestion:"Validate route parameter values"}),he=o({slug:"api-route-error",category:"ROUTE",status:500,title:"API route definition error",suggestion:"Review API route configuration"}),nt={"route-conflict":me,"invalid-route-file":Re,"route-handler-invalid":Ee,"dynamic-route-error":ye,"route-params-error":_e,"api-route-error":he};var Ce=o({slug:"module-not-found",category:"MODULE",status:404,title:"Module could not be resolved",suggestion:"Check the import path and ensure the module is installed"}),Te=o({slug:"import-resolution-error",category:"MODULE",status:500,title:"Import path resolution failed",suggestion:"Verify import paths and module configuration"}),xe=o({slug:"circular-dependency",category:"MODULE",status:500,title:"Circular dependency detected",suggestion:"Refactor imports to break the circular dependency"}),Ie=o({slug:"invalid-import",category:"MODULE",status:400,title:"Invalid import statement",suggestion:"Fix import syntax or path"}),Se=o({slug:"dependency-missing",category:"MODULE",status:404,title:"Required dependency not installed",suggestion:"Install the missing dependency with your package manager"}),Oe=o({slug:"version-mismatch",category:"MODULE",status:409,title:"Dependency version mismatch",suggestion:"Update dependencies to compatible versions"}),st={"module-not-found":Ce,"import-resolution-error":Te,"circular-dependency":xe,"invalid-import":Ie,"dependency-missing":Se,"version-mismatch":Oe};var Ne=o({slug:"port-in-use",category:"SERVER",status:409,title:"Server port already in use",suggestion:"Use a different port or stop the process using this port"}),Ae=o({slug:"server-start-error",category:"SERVER",status:500,title:"Server failed to start",suggestion:"Check server configuration and port availability"}),De=o({slug:"cache-error",category:"SERVER",status:500,title:"Cache operation failed",suggestion:"Clear the cache and try again"}),ve=o({slug:"file-watch-error",category:"SERVER",status:500,title:"File watcher error",suggestion:"Restart the development server"}),be=o({slug:"request-error",category:"SERVER",status:500,title:"HTTP request handling error",suggestion:"Check request handler and middleware"}),Me=o({slug:"service-overloaded",category:"SERVER",status:503,title:"Service overloaded",suggestion:"Reduce load or scale up resources"}),Le=o({slug:"semaphore-timeout",category:"SERVER",status:503,title:"Semaphore acquire timeout",suggestion:"Reduce concurrency or increase the semaphore acquire timeout"}),we=o({slug:"circuit-breaker-open",category:"SERVER",status:503,title:"Circuit breaker is open",suggestion:"Wait for the breaker reset timeout before retrying"}),Ue=o({slug:"cache-path-mismatch",category:"SERVER",status:500,title:"Cache path mismatch",suggestion:"Clear the cache directory and rebuild"}),Pe=o({slug:"network-error",category:"SERVER",status:502,title:"Network operation failed",suggestion:"Check network connectivity and retry"}),He=o({slug:"api-client-error",category:"SERVER",status:500,title:"API client request failed",suggestion:"Check API connectivity and authentication"}),Ve=o({slug:"token-storage-error",category:"SERVER",status:500,title:"Token storage operation failed",suggestion:"Check token storage backend and credentials"}),Fe=o({slug:"cache-invariant-violation",category:"SERVER",status:500,title:"Cache path invariant violated",suggestion:"Clear the cache and rebuild"}),ke=o({slug:"release-not-found",category:"SERVER",status:404,title:"No active release found",suggestion:"Deploy the project to create a release for this environment"}),Ge=o({slug:"fallback-exhausted",category:"SERVER",status:500,title:"Primary and fallback operations both failed",suggestion:"Check service availability and connectivity"}),it={"port-in-use":Ne,"server-start-error":Ae,"cache-error":De,"file-watch-error":ve,"request-error":be,"service-overloaded":Me,"semaphore-timeout":Le,"circuit-breaker-open":we,"cache-path-mismatch":Ue,"network-error":Pe,"api-client-error":He,"token-storage-error":Ve,"cache-invariant-violation":Fe,"release-not-found":ke,"fallback-exhausted":Ge};var $e=o({slug:"client-boundary-violation",category:"BOUNDARY",status:400,title:"Client boundary rule violation",suggestion:"Add \'use client\' directive or move code to a client component"}),Be=o({slug:"server-only-in-client",category:"BOUNDARY",status:400,title:"Server-only code in client component",suggestion:"Move server-only code to a server component"}),Ye=o({slug:"client-only-in-server",category:"BOUNDARY",status:400,title:"Client-only code in server component",suggestion:"Move client-only code to a client component"}),je=o({slug:"invalid-use-client",category:"BOUNDARY",status:400,title:"Invalid \'use client\' directive",suggestion:"Place \'use client\' at the top of the file"}),We=o({slug:"invalid-use-server",category:"BOUNDARY",status:400,title:"Invalid \'use server\' directive",suggestion:"Place \'use server\' at the top of the file or function"}),qe=o({slug:"rsc-payload-error",category:"BOUNDARY",status:500,title:"RSC payload serialization error",suggestion:"Ensure props are serializable (no functions, symbols, etc.)"}),at={"client-boundary-violation":$e,"server-only-in-client":Be,"client-only-in-server":Ye,"invalid-use-client":je,"invalid-use-server":We,"rsc-payload-error":qe};var ze=o({slug:"hmr-error",category:"DEV",status:500,title:"Hot module replacement error",suggestion:"Restart the development server"}),Je=o({slug:"dev-server-error",category:"DEV",status:500,title:"Development server error",suggestion:"Check the dev server logs and restart"}),Xe=o({slug:"fast-refresh-error",category:"DEV",status:500,title:"Fast refresh failed",suggestion:"Save the file again or restart the dev server"}),Ke=o({slug:"error-overlay-error",category:"DEV",status:500,title:"Error overlay failed",suggestion:"Check browser console for details"}),Ze=o({slug:"source-map-error",category:"DEV",status:500,title:"Source map loading error",suggestion:"Rebuild or clear cache"}),ct={"hmr-error":ze,"dev-server-error":Je,"fast-refresh-error":Xe,"error-overlay-error":Ke,"source-map-error":Ze};var Qe=o({slug:"deployment-error",category:"DEPLOY",status:500,title:"Deployment process failed",suggestion:"Check deployment logs for details"}),tr=o({slug:"platform-error",category:"DEPLOY",status:500,title:"Platform-specific error",suggestion:"Check platform documentation and requirements"}),er=o({slug:"env-var-missing",category:"DEPLOY",status:500,title:"Required environment variable missing",suggestion:"Set the required environment variable"}),rr=o({slug:"production-build-required",category:"DEPLOY",status:400,title:"Production build required",suggestion:"Run \'vf build\' before deploying"}),lt={"deployment-error":Qe,"platform-error":tr,"env-var-missing":er,"production-build-required":rr};var or=o({slug:"agent-error",category:"AGENT",status:500,title:"Agent operation error",suggestion:"Check agent configuration and logs"}),nr=o({slug:"agent-not-found",category:"AGENT",status:404,title:"Agent not found",suggestion:"Verify the agent ID exists"}),sr=o({slug:"agent-timeout",category:"AGENT",status:408,title:"Agent operation timed out",suggestion:"Increase timeout or simplify the request"}),ir=o({slug:"agent-intent-error",category:"AGENT",status:400,title:"Agent intent parsing error",suggestion:"Rephrase the request more clearly"}),ar=o({slug:"orchestration-error",category:"AGENT",status:500,title:"Multi-agent orchestration error",suggestion:"Check agent coordination logic"}),cr=o({slug:"cost-limit-exceeded",category:"AGENT",status:429,title:"Cost limit exceeded",suggestion:"Wait for the budget period to reset or increase the limit"}),lr=o({slug:"tool-id-conflict",category:"AGENT",status:409,title:"Tool ID conflict",suggestion:"Use a unique tool ID or rename one of the conflicting tools"}),ut={"agent-error":or,"agent-not-found":nr,"agent-timeout":sr,"agent-intent-error":ir,"orchestration-error":ar,"cost-limit-exceeded":cr,"tool-id-conflict":lr};var ur=o({slug:"unknown-error",category:"GENERAL",status:500,title:"Unknown/unclassified error",suggestion:"Check logs for more details"}),dr=o({slug:"permission-denied",category:"GENERAL",status:403,title:"File/resource permission denied",suggestion:"Check file permissions and access rights"}),gr=o({slug:"file-not-found",category:"GENERAL",status:404,title:"File not found",suggestion:"Verify the file path exists"}),pr=o({slug:"resource-not-found",category:"GENERAL",status:404,title:"Requested resource not found",suggestion:"Verify the referenced resource ID or name exists"}),fr=o({slug:"invalid-argument",category:"GENERAL",status:400,title:"Invalid function argument",suggestion:"Check argument types and values"}),mr=o({slug:"timeout-error",category:"GENERAL",status:408,title:"Operation timed out",suggestion:"Increase timeout or optimize the operation"}),Rr=o({slug:"initialization-error",category:"GENERAL",status:500,title:"Initialization failed",suggestion:"Check initialization requirements and dependencies"}),Er=o({slug:"not-supported",category:"GENERAL",status:501,title:"Feature not supported",suggestion:"Check documentation for supported features"}),G=o({slug:"security-violation",category:"GENERAL",status:403,title:"Security violation detected",suggestion:"Check for path traversal or unauthorized access attempts"}),yr=o({slug:"input-validation-failed",category:"GENERAL",status:400,title:"Input validation failed",suggestion:"Check request input against validation rules"}),dt={"unknown-error":ur,"permission-denied":dr,"file-not-found":gr,"resource-not-found":pr,"invalid-argument":fr,"timeout-error":mr,"initialization-error":Rr,"not-supported":Er,"security-violation":G,"input-validation-failed":yr};var En={...et,...rt,...ot,...nt,...st,...it,...at,...ct,...lt,...ut,...dt};var _r=[{source:String.raw`<script[^>]*>[\\s\\S]*?<\\/script>`,flags:"gi",name:"inline script"},{source:String.raw`javascript:`,flags:"gi",name:"javascript: URL"},{source:String.raw`\\bon\\w+\\s*=`,flags:"gi",name:"event handler attribute"},{source:String.raw`data:\\s*text\\/html`,flags:"gi",name:"data: HTML URL"}];function hr(){return _r.map(({source:t,flags:e,name:r})=>({pattern:new RegExp(t,e),name:r}))}function Cr(){let t=globalThis;return t.__VERYFRONT_DEV__===!0||t.Deno?.env?.get?.("VERYFRONT_ENV")==="development"}function T(t,e={}){let{allowInlineScripts:r=!1,strict:n=!1,warn:s=!0}=e;for(let{pattern:u,name:c}of hr())if(!(r&&c==="inline script")&&(u.lastIndex=0,!!u.test(t)&&(s&&console.warn(`[Security] Suspicious ${c} detected in server HTML`),n||!Cr())))throw G.create({detail:`Potentially unsafe HTML: ${c} detected`});return t}function x(t,e){let r=e==="root"?C:`rsc-slot-${e}`,n=t.getElementById(r);if(n)return n;let s=t.createElement("div");return s.id=r,t.body.appendChild(s),s}function Tr(t,e){if(e.type!=="slot")return;let r=x(t,e.id);r.innerHTML=T(String(e.html??""))}function gt(t,e){let r=e.split(`\n`),n=r.pop()??"";for(let s of r){let u=s.trim();if(!u)continue;let c;try{c=JSON.parse(u)}catch(a){i.debug("[client-dom] malformed NDJSON line",{line:u,error:a instanceof Error?a.message:String(a)});continue}if(!c||typeof c!="object")continue;let g=c;if(g.type==="slot"){Tr(t,g);try{Sr(t,g.id||"root")}catch(a){i.debug("[client-dom] hydration optional failed",a)}}}return n}function xr(t){return new Promise((e,r)=>{let n=()=>r(new DOMException("aborted","AbortError"));if(t.aborted){n();return}t.addEventListener("abort",n,{once:!0})})}async function pt(t,e=document,r){let n="body"in t?t:null,s=n?.body??t;if(!s)return;let u=s.getReader(),c=new TextDecoder,g="",a=!1;try{for(;;){if(r?.aborted)throw new DOMException("aborted","AbortError");let d=u.read(),{done:f,value:y}=r?await Promise.race([d,xr(r)]):await d;if(f){a=!0;break}g+=c.decode(y,{stream:!0}),g=gt(e,g)}g&&gt(e,`${g}\n`)}catch(d){throw d instanceof Error&&d.name==="AbortError"||i.debug("[client-dom] consumeNdjsonStream error",d),d}finally{try{await u.cancel()}catch(d){a||i.debug("[client-dom] reader.cancel failed",d)}try{u.releaseLock()}catch(d){i.debug("[client-dom] reader.releaseLock failed",d)}if(typeof s.cancel=="function")try{await s.cancel()}catch(d){i.debug("[client-dom] stream.cancel failed",d)}if(typeof n?.body?.cancel=="function")try{await n.body.cancel()}catch(d){i.debug("[client-dom] response.body.cancel failed",d)}}}function Ir(t,e){let r=x(t,e),n=[],s=u=>{let c=u;c.dataset?.clientRef&&n.push(c);for(let g of u.children)s(g)};return s(r),n}function Sr(t,e){let r=Ir(t,e);for(let n of r){let s=n.dataset?.clientRef;s&&(n.dataset.hydrated="true",i.debug("[client-dom] marked for hydration",s))}}var Or=new Set(["server","client","html","fragment"]);function ft(t){if(!t)return[];try{let e=JSON.parse(t);return Ar(e)?e.nodes:[]}catch{return[]}}async function B(t,e,r){return await Promise.all(t.map(n=>Nr(n,e,r)))}async function Nr(t,e,r){if(t.type==="html")return t.text??t.html??"";let n=await B(t.children??[],e,r);if(t.type==="fragment"||t.type==="server"&&!t.component)return e.createElement(e.Fragment,{},...n);if(t.type==="server")return e.createElement(t.component,t.props??{},...n);let s=await r(t.component);return s?e.createElement(s,t.props??{},...n):null}function Ar(t){return!$(t)||t.version!==1||!Array.isArray(t.nodes)?!1:t.nodes.every(e=>mt(e,0))}function mt(t,e){return e>100||!$(t)||!Or.has(t.type)||t.type==="html"&&typeof t.html!="string"&&typeof t.text!="string"||t.type==="client"&&typeof t.component!="string"||t.type==="server"&&t.component!==void 0&&typeof t.component!="string"||t.props!==void 0&&!$(t.props)?!1:t.children===void 0?!0:Array.isArray(t.children)&&t.children.every(r=>mt(r,e+1))}function $(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Dr(t){if(!t)return{};let e={};for(let[r,n]of Object.entries(t))e[r]=Array.isArray(n)?n.join("/"):n;return e}async function b(t,e,r=document){try{let n=tt(r);if(!n)return t;let u=(await import(n)).wrapForHydration;return typeof u!="function"?t:u(t,{params:Dr(e?.params),frontmatter:e?.frontmatter??{},data:e?.props??{}})}catch(n){return i.debug("router provider wrap failed",n),t}}var vr=100;function br(t,e){if(globalThis.__VF_CLIENT_MOD_CACHE??(globalThis.__VF_CLIENT_MOD_CACHE=new Map),globalThis.__VF_CLIENT_MOD_CACHE.size>=vr){let r=globalThis.__VF_CLIENT_MOD_CACHE.keys().next().value;r&&globalThis.__VF_CLIENT_MOD_CACHE.delete(r)}globalThis.__VF_CLIENT_MOD_CACHE.set(t,e)}function Rt(t){let e=t.match(/^\\/app\\/(.+)#([\\w$.-]+)$/);if(e)return{rel:`/${e[1]||""}`,exportName:e[2]||"default"};let r=t.match(/^(\\/_veryfront\\/[^#]+)#([\\w$.-]+)$/);return r?{moduleUrl:r[1],exportName:r[2]||"default"}:(i.debug("hydrate: unrecognised client ref format, skipping",{ref:t}),null)}function Mr(t){let e=t.dataset?.rscProps;if(!e)return{};try{let r=JSON.parse(e);return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}catch(r){return i.debug("hydrate: invalid client boundary props, using empty props",r),{}}}function Lr(t){return ft(t.dataset?.rscChildren)}async function wr(){try{let t=await fetch("/_veryfront/rsc/manifest");return t.ok?await t.json():null}catch{return null}}async function Et(t,e,r){let n=Ur(t,e,r),s=e.moduleUrl??e.rel;if(!s)return null;let u=`${s}#${t.hash??""}`;try{let c=globalThis.__VF_CLIENT_MOD_CACHE?.get(u);if(c)return c}catch(c){i.debug("hydrate: cache get failed",c)}if(!n)return null;try{let c=await import(n);try{br(u,c)}catch(g){i.debug("hydrate: cache set failed",g)}return c}catch(c){return i.debug("hydrate: failed to import module",{moduleUrl:n,error:c}),null}}function Ur(t,e,r){if(e.moduleUrl)return e.moduleUrl;if(!e.rel)return null;let n=t.graphIds?.client.find(s=>s.rel===e.rel)?.path;return D({strategy:r,rel:e.rel,absPath:n,version:t.hash})}function Pr(t){let e=Array.from(t.querySelectorAll("[data-client-ref]")),r=new Set(e);return e.filter(n=>{let s=n.parentElement;for(;s;){if(r.has(s))return!1;s=s.parentElement}return!0})}async function yt(t=document){let e=null;try{e=await wr()}catch(a){i.debug("hydrate: fetch manifest failed",a)}if(!e){i.debug("hydrate: no manifest");return}let r=Pr(t);try{let a=globalThis.__VF_MANIFEST_HASH;if(!r.some(f=>f.dataset?.hydrated!=="true")&&a&&e.hash&&a===e.hash)return}catch(a){i.debug("hydrate: hmr hash read failed",a)}if(r.length===0){try{globalThis.__VF_MANIFEST_HASH=e.hash??""}catch(a){i.debug("hydrate: set hash failed",a)}return}let n=E(t),s=A(n);try{if(globalThis.__VF_TEST_MODE__){globalThis.__VF_HYDRATE_CALLED=!0,globalThis.__VF_MANIFEST_HASH=e.hash??"";return}}catch(a){i.debug("hydrate: test mode flags failed",a)}let u=v(t,n?.reactVersion),[{default:c},{createRoot:g}]=await Promise.all([import(u.react),import(u.reactDomClient)]);for(let a of r){let d=a.dataset?.clientRef??"";if(!d||a.dataset?.hydrated==="true")continue;let f=Rt(d);if(!f)continue;let y=await Et(e,f,s);if(!y)continue;let j=y[f.exportName]??y.default;if(typeof j=="function")try{let L=g(a),_t=Mr(a),ht=Lr(a),Ct=await B(ht,{Fragment:c.Fragment,createElement(I,w,...S){return c.createElement(I,w,...S)}},async I=>{let w=e.modules.find(xt=>xt.id===I),S=e.components?.[I],W=w?.clientRef??(S?`${S}#default`:void 0);if(!W)return null;let U=Rt(W);if(!U)return null;let P=await Et(e,U,s);if(!P)return null;let q=P[U.exportName]??P.default;return typeof q=="function"?q:null}),Tt=await b(c.createElement(j,_t,...Ct),n,t);L.render(Tt),a.dataset.hydrated="true"}catch(L){i.warn("hydrate: render failed",L)}}try{globalThis.__VF_MANIFEST_HASH=e.hash??""}catch(a){i.debug("hydrate: set hash failed (post)",a)}}async function Hr(){let t=E(document),e=v(document,t?.reactVersion),[r,n]=await Promise.all([import(e.react),import(e.reactDomClient)]);return{React:r,ReactDOM:n}}var Vr=new Set(["SCRIPT","STYLE","NOSCRIPT","TEMPLATE"]);function Y(t){let e=t.getAttribute("style")??"";return t.hasAttribute("data-veryfront-head")||t.hasAttribute("hidden")||/(?:^|;)\\s*display\\s*:\\s*none(?:\\s*;|$)/i.test(e)||Vr.has(t.tagName.toUpperCase())}function Fr(t,e){return t.find(r=>r.tagName.toUpperCase()==="DIV"&&!!r.getAttribute("class")?.trim()&&!Y(r))??e}function kr(t,e){return t===e}function Gr(t,e){let r=document.createElement("div");r.setAttribute("data-veryfront-hydration-root","page");let n=t.find(s=>!Y(s));n?.parentNode===e?e.insertBefore(r,n):e.appendChild(r);for(let s of t)!Y(s)&&s.parentNode===e&&r.appendChild(s);return r}function $r(t,e,r=document){return!!e?.pagePath&&typeof t?.__veryfrontRenderPage=="function"&&!!r.getElementById("root")}function Br(t,e){return e?.pagePath?!1:!!t.getElementById(C)}function Yr(t=import.meta.url){try{return new URL(t,"http://veryfront.local").searchParams.get("hydrate")==="1"}catch{return!1}}function jr(t){return t==="rsc-module"}async function Wr(t){try{let e=await fetch(h+"stream"+t);if(!e.ok||!e.body)return!1;let r=new AbortController;return addEventListener("pagehide",()=>r.abort(),{once:!0}),await pt(e,document,r.signal),!0}catch(e){return i.debug("tryStream failed",e),!1}}async function M(){try{await yt(document)}catch(t){i.debug("hydration failed",t)}}async function qr(t,e){try{let{React:r,ReactDOM:n}=await Hr(),s=D({strategy:e,rel:t});if(!s)return!1;i.debug("Loading component from:",s);let c=(await import(s)).default;if(typeof c!="function")return i.debug("Page component is not a function"),!1;let g=Array.from(document.body.children),a=Fr(g,document.body),d=kr(a,document.body)?Gr(g,document.body):a,f=await b(r.createElement(c,{}),E(document));return jr(e)?n.createRoot(d).render(f):n.hydrateRoot(d,f,{identifierPrefix:"vf",onRecoverableError:()=>{}}),i.debug("Page component hydrated successfully"),!0}catch(r){return i.error("Page hydration failed",r),!1}}async function zr(t){try{let e=await fetch(h+"payload"+t);if(!e.ok)return!1;let r=await e.json();if(r?.slots){for(let[n,s]of Object.entries(r.slots))x(document,n).innerHTML=T(String(s||""));return!0}return x(document,C).innerHTML=T(String(r?.html||"")),!0}catch(e){return i.debug("payload fetch failed",e),!1}}async function Jr(){try{let t=globalThis.window?.location.search??"",e=E(document);if(Yr()){await M();return}let r=e?.pagePath,n=A(e);if(r){if($r(globalThis.window,e,document)){i.debug("Page renderer owns hydration");return}i.debug("Found page component in hydration data:",r),await qr(r,n)&&i.debug("Client component hydrated successfully");return}if(!Br(document,e))return;if(await Wr(t)){await M();return}if(await zr(t)){await M();return}await M()}catch(t){i.error("boot failed",t)}}if(typeof document<"u"){let t=()=>{Jr()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t()}export{Jr as boot,Fr as selectHydrationRoot,Br as shouldAttemptRSCTransport,Yr as shouldHydrateOnly,jr as shouldRenderPageComponent,$r as shouldUsePageRendererHydration,kr as shouldWrapPageHydrationRoot};\n';
9
9
  export const CLIENT_DOM_BUNDLE = 'var V=Object.defineProperty;var k=(r,t,o)=>t in r?V(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o;var l=(r,t,o)=>k(r,typeof t!="symbol"?t+"":t,o);function e(r){return{...r,create(t){return new f(t?.message||t?.detail||r.title,{slug:r.slug,category:r.category,status:t?.status??r.status,title:r.title,suggestion:r.suggestion,detail:t?.detail,cause:t?.cause,instance:t?.instance,context:t?.context})}}}var f=class extends Error{constructor(o,n){super(o);l(this,"slug");l(this,"category");l(this,"status");l(this,"title");l(this,"suggestion");l(this,"detail");l(this,"cause");l(this,"instance");l(this,"context");this.name="VeryfrontError",this.slug=n.slug,this.category=n.category,this.status=n.status,this.title=n.title,this.suggestion=n.suggestion,this.detail=n.detail,this.cause=n.cause,this.instance=n.instance,this.context=n.context}toRFC9457(){return{type:`https://veryfront.com/docs/errors/${this.slug}`,title:this.title,status:this.status,detail:this.detail,instance:this.instance,category:this.category,suggestion:this.suggestion,cause:typeof this.cause=="string"?this.cause:void 0}}getDocsUrl(){return`https://veryfront.com/docs/errors/${this.slug}`}};var w=e({slug:"config-not-found",category:"CONFIG",status:404,title:"Configuration file not found",suggestion:"Run \'vf init\' to create a configuration file"}),F=e({slug:"config-invalid",category:"CONFIG",status:400,title:"Invalid configuration format",suggestion:"Check your veryfront.config.ts for syntax errors"}),H=e({slug:"config-parse-error",category:"CONFIG",status:400,title:"Failed to parse configuration",suggestion:"Ensure your configuration file is valid TypeScript/JSON"}),Y=e({slug:"config-validation-error",category:"CONFIG",status:422,title:"Configuration validation failed",suggestion:"Check the configuration against the schema requirements"}),B=e({slug:"config-type-error",category:"CONFIG",status:400,title:"Configuration type mismatch",suggestion:"Ensure configuration values match expected types"}),$=e({slug:"import-map-invalid",category:"CONFIG",status:400,title:"Invalid import map configuration",suggestion:"Check your import map syntax and paths"}),j=e({slug:"cors-config-invalid",category:"CONFIG",status:400,title:"Invalid CORS configuration",suggestion:"Review CORS settings in your configuration"}),q=e({slug:"config-validation-failed",category:"CONFIG",status:400,title:"Configuration validation failed",suggestion:"Check configuration values against requirements"}),z=e({slug:"webhook-config-invalid",category:"CONFIG",status:400,title:"Invalid webhook configuration",suggestion:"Check webhook definition fields, target settings, and eventFilter conditions"}),W=e({slug:"schedule-config-invalid",category:"CONFIG",status:400,title:"Invalid schedule configuration",suggestion:"Check schedule definition fields, cron expression, target settings, and positive-integer limits"}),J=e({slug:"trigger-config-invalid",category:"CONFIG",status:400,title:"Invalid trigger configuration",suggestion:"Check trigger ID format (lowercase, alphanumeric, dots/slashes/hyphens) and ensure all input values are JSON-serializable"}),y={"config-not-found":w,"config-invalid":F,"config-parse-error":H,"config-validation-error":Y,"config-type-error":B,"import-map-invalid":$,"cors-config-invalid":j,"config-validation-failed":q,"webhook-config-invalid":z,"schedule-config-invalid":W,"trigger-config-invalid":J};var X=e({slug:"build-failed",category:"BUILD",status:500,title:"Build process failed",suggestion:"Check the build output for specific errors"}),K=e({slug:"bundle-error",category:"BUILD",status:500,title:"Bundle generation failed",suggestion:"Review bundler output for details"}),Z=e({slug:"typescript-error",category:"BUILD",status:500,title:"TypeScript compilation error",suggestion:"Fix TypeScript errors shown in the output"}),Q=e({slug:"mdx-compile-error",category:"BUILD",status:500,title:"MDX compilation failed",suggestion:"Check your MDX file syntax"}),ee=e({slug:"asset-optimization-error",category:"BUILD",status:500,title:"Asset optimization failed",suggestion:"Check asset file formats and paths"}),te=e({slug:"ssg-generation-error",category:"BUILD",status:500,title:"Static site generation failed",suggestion:"Review SSG configuration and data fetching"}),re=e({slug:"sourcemap-error",category:"BUILD",status:500,title:"Source map generation failed",suggestion:"Check source map configuration"}),oe=e({slug:"compilation-error",category:"BUILD",status:500,title:"Compilation failed",suggestion:"Review compiler output for specific errors"}),I={"build-failed":X,"bundle-error":K,"typescript-error":Z,"mdx-compile-error":Q,"asset-optimization-error":ee,"ssg-generation-error":te,"sourcemap-error":re,"compilation-error":oe};var ne=e({slug:"hydration-mismatch",category:"RUNTIME",status:500,title:"Client/server hydration mismatch",suggestion:"Ensure server and client render the same content"}),se=e({slug:"render-error",category:"RUNTIME",status:500,title:"Component render failed",suggestion:"Check component for runtime errors"}),ie=e({slug:"component-error",category:"RUNTIME",status:500,title:"Component execution error",suggestion:"Review component logic and props"}),ae=e({slug:"layout-not-found",category:"RUNTIME",status:404,title:"Layout component not found",suggestion:"Ensure layout file exists at the expected path"}),ce=e({slug:"page-not-found",category:"RUNTIME",status:404,title:"Page component not found",suggestion:"Check that the page file exists in the routes directory"}),ue=e({slug:"api-error",category:"RUNTIME",status:500,title:"API route handler error",suggestion:"Review API route handler for errors"}),le=e({slug:"middleware-error",category:"RUNTIME",status:500,title:"Middleware execution error",suggestion:"Check middleware function for errors"}),ge=e({slug:"trigger-target-not-found",category:"RUNTIME",status:404,title:"Trigger target not found",suggestion:"Ensure the referenced task or workflow ID is registered in the project"}),pe=e({slug:"trigger-execution-failed",category:"RUNTIME",status:500,title:"Trigger target execution failed",suggestion:"Check the task or workflow for errors and review the trigger input"}),de=e({slug:"trigger-not-supported",category:"RUNTIME",status:501,title:"Trigger target type not supported in local runtime",suggestion:"Use a workflow or task target for local trigger runs; agent targets require the Cloud runtime"}),O={"hydration-mismatch":ne,"render-error":se,"component-error":ie,"layout-not-found":ae,"page-not-found":ce,"api-error":ue,"middleware-error":le,"trigger-target-not-found":ge,"trigger-execution-failed":pe,"trigger-not-supported":de};var Ee=e({slug:"route-conflict",category:"ROUTE",status:409,title:"Conflicting route definitions",suggestion:"Rename or reorganize conflicting route files"}),Re=e({slug:"invalid-route-file",category:"ROUTE",status:400,title:"Invalid route file structure",suggestion:"Ensure route file exports required functions"}),fe=e({slug:"route-handler-invalid",category:"ROUTE",status:400,title:"Invalid route handler export",suggestion:"Export a valid handler function from the route file"}),me=e({slug:"dynamic-route-error",category:"ROUTE",status:500,title:"Dynamic route parsing failed",suggestion:"Check dynamic route segment syntax"}),_e=e({slug:"route-params-error",category:"ROUTE",status:400,title:"Route parameters invalid",suggestion:"Validate route parameter values"}),ye=e({slug:"api-route-error",category:"ROUTE",status:500,title:"API route definition error",suggestion:"Review API route configuration"}),T={"route-conflict":Ee,"invalid-route-file":Re,"route-handler-invalid":fe,"dynamic-route-error":me,"route-params-error":_e,"api-route-error":ye};var Ie=e({slug:"module-not-found",category:"MODULE",status:404,title:"Module could not be resolved",suggestion:"Check the import path and ensure the module is installed"}),Oe=e({slug:"import-resolution-error",category:"MODULE",status:500,title:"Import path resolution failed",suggestion:"Verify import paths and module configuration"}),Te=e({slug:"circular-dependency",category:"MODULE",status:500,title:"Circular dependency detected",suggestion:"Refactor imports to break the circular dependency"}),he=e({slug:"invalid-import",category:"MODULE",status:400,title:"Invalid import statement",suggestion:"Fix import syntax or path"}),xe=e({slug:"dependency-missing",category:"MODULE",status:404,title:"Required dependency not installed",suggestion:"Install the missing dependency with your package manager"}),Se=e({slug:"version-mismatch",category:"MODULE",status:409,title:"Dependency version mismatch",suggestion:"Update dependencies to compatible versions"}),h={"module-not-found":Ie,"import-resolution-error":Oe,"circular-dependency":Te,"invalid-import":he,"dependency-missing":xe,"version-mismatch":Se};var Ne=e({slug:"port-in-use",category:"SERVER",status:409,title:"Server port already in use",suggestion:"Use a different port or stop the process using this port"}),ve=e({slug:"server-start-error",category:"SERVER",status:500,title:"Server failed to start",suggestion:"Check server configuration and port availability"}),Ce=e({slug:"cache-error",category:"SERVER",status:500,title:"Cache operation failed",suggestion:"Clear the cache and try again"}),Ae=e({slug:"file-watch-error",category:"SERVER",status:500,title:"File watcher error",suggestion:"Restart the development server"}),De=e({slug:"request-error",category:"SERVER",status:500,title:"HTTP request handling error",suggestion:"Check request handler and middleware"}),Le=e({slug:"service-overloaded",category:"SERVER",status:503,title:"Service overloaded",suggestion:"Reduce load or scale up resources"}),Ue=e({slug:"semaphore-timeout",category:"SERVER",status:503,title:"Semaphore acquire timeout",suggestion:"Reduce concurrency or increase the semaphore acquire timeout"}),be=e({slug:"circuit-breaker-open",category:"SERVER",status:503,title:"Circuit breaker is open",suggestion:"Wait for the breaker reset timeout before retrying"}),Me=e({slug:"cache-path-mismatch",category:"SERVER",status:500,title:"Cache path mismatch",suggestion:"Clear the cache directory and rebuild"}),Ge=e({slug:"network-error",category:"SERVER",status:502,title:"Network operation failed",suggestion:"Check network connectivity and retry"}),Pe=e({slug:"api-client-error",category:"SERVER",status:500,title:"API client request failed",suggestion:"Check API connectivity and authentication"}),Ve=e({slug:"token-storage-error",category:"SERVER",status:500,title:"Token storage operation failed",suggestion:"Check token storage backend and credentials"}),ke=e({slug:"cache-invariant-violation",category:"SERVER",status:500,title:"Cache path invariant violated",suggestion:"Clear the cache and rebuild"}),we=e({slug:"release-not-found",category:"SERVER",status:404,title:"No active release found",suggestion:"Deploy the project to create a release for this environment"}),Fe=e({slug:"fallback-exhausted",category:"SERVER",status:500,title:"Primary and fallback operations both failed",suggestion:"Check service availability and connectivity"}),x={"port-in-use":Ne,"server-start-error":ve,"cache-error":Ce,"file-watch-error":Ae,"request-error":De,"service-overloaded":Le,"semaphore-timeout":Ue,"circuit-breaker-open":be,"cache-path-mismatch":Me,"network-error":Ge,"api-client-error":Pe,"token-storage-error":Ve,"cache-invariant-violation":ke,"release-not-found":we,"fallback-exhausted":Fe};var He=e({slug:"client-boundary-violation",category:"BOUNDARY",status:400,title:"Client boundary rule violation",suggestion:"Add \'use client\' directive or move code to a client component"}),Ye=e({slug:"server-only-in-client",category:"BOUNDARY",status:400,title:"Server-only code in client component",suggestion:"Move server-only code to a server component"}),Be=e({slug:"client-only-in-server",category:"BOUNDARY",status:400,title:"Client-only code in server component",suggestion:"Move client-only code to a client component"}),$e=e({slug:"invalid-use-client",category:"BOUNDARY",status:400,title:"Invalid \'use client\' directive",suggestion:"Place \'use client\' at the top of the file"}),je=e({slug:"invalid-use-server",category:"BOUNDARY",status:400,title:"Invalid \'use server\' directive",suggestion:"Place \'use server\' at the top of the file or function"}),qe=e({slug:"rsc-payload-error",category:"BOUNDARY",status:500,title:"RSC payload serialization error",suggestion:"Ensure props are serializable (no functions, symbols, etc.)"}),S={"client-boundary-violation":He,"server-only-in-client":Ye,"client-only-in-server":Be,"invalid-use-client":$e,"invalid-use-server":je,"rsc-payload-error":qe};var ze=e({slug:"hmr-error",category:"DEV",status:500,title:"Hot module replacement error",suggestion:"Restart the development server"}),We=e({slug:"dev-server-error",category:"DEV",status:500,title:"Development server error",suggestion:"Check the dev server logs and restart"}),Je=e({slug:"fast-refresh-error",category:"DEV",status:500,title:"Fast refresh failed",suggestion:"Save the file again or restart the dev server"}),Xe=e({slug:"error-overlay-error",category:"DEV",status:500,title:"Error overlay failed",suggestion:"Check browser console for details"}),Ke=e({slug:"source-map-error",category:"DEV",status:500,title:"Source map loading error",suggestion:"Rebuild or clear cache"}),N={"hmr-error":ze,"dev-server-error":We,"fast-refresh-error":Je,"error-overlay-error":Xe,"source-map-error":Ke};var Ze=e({slug:"deployment-error",category:"DEPLOY",status:500,title:"Deployment process failed",suggestion:"Check deployment logs for details"}),Qe=e({slug:"platform-error",category:"DEPLOY",status:500,title:"Platform-specific error",suggestion:"Check platform documentation and requirements"}),et=e({slug:"env-var-missing",category:"DEPLOY",status:500,title:"Required environment variable missing",suggestion:"Set the required environment variable"}),tt=e({slug:"production-build-required",category:"DEPLOY",status:400,title:"Production build required",suggestion:"Run \'vf build\' before deploying"}),v={"deployment-error":Ze,"platform-error":Qe,"env-var-missing":et,"production-build-required":tt};var rt=e({slug:"agent-error",category:"AGENT",status:500,title:"Agent operation error",suggestion:"Check agent configuration and logs"}),ot=e({slug:"agent-not-found",category:"AGENT",status:404,title:"Agent not found",suggestion:"Verify the agent ID exists"}),nt=e({slug:"agent-timeout",category:"AGENT",status:408,title:"Agent operation timed out",suggestion:"Increase timeout or simplify the request"}),st=e({slug:"agent-intent-error",category:"AGENT",status:400,title:"Agent intent parsing error",suggestion:"Rephrase the request more clearly"}),it=e({slug:"orchestration-error",category:"AGENT",status:500,title:"Multi-agent orchestration error",suggestion:"Check agent coordination logic"}),at=e({slug:"cost-limit-exceeded",category:"AGENT",status:429,title:"Cost limit exceeded",suggestion:"Wait for the budget period to reset or increase the limit"}),ct=e({slug:"tool-id-conflict",category:"AGENT",status:409,title:"Tool ID conflict",suggestion:"Use a unique tool ID or rename one of the conflicting tools"}),C={"agent-error":rt,"agent-not-found":ot,"agent-timeout":nt,"agent-intent-error":st,"orchestration-error":it,"cost-limit-exceeded":at,"tool-id-conflict":ct};var ut=e({slug:"unknown-error",category:"GENERAL",status:500,title:"Unknown/unclassified error",suggestion:"Check logs for more details"}),lt=e({slug:"permission-denied",category:"GENERAL",status:403,title:"File/resource permission denied",suggestion:"Check file permissions and access rights"}),gt=e({slug:"file-not-found",category:"GENERAL",status:404,title:"File not found",suggestion:"Verify the file path exists"}),pt=e({slug:"resource-not-found",category:"GENERAL",status:404,title:"Requested resource not found",suggestion:"Verify the referenced resource ID or name exists"}),dt=e({slug:"invalid-argument",category:"GENERAL",status:400,title:"Invalid function argument",suggestion:"Check argument types and values"}),Et=e({slug:"timeout-error",category:"GENERAL",status:408,title:"Operation timed out",suggestion:"Increase timeout or optimize the operation"}),Rt=e({slug:"initialization-error",category:"GENERAL",status:500,title:"Initialization failed",suggestion:"Check initialization requirements and dependencies"}),ft=e({slug:"not-supported",category:"GENERAL",status:501,title:"Feature not supported",suggestion:"Check documentation for supported features"}),m=e({slug:"security-violation",category:"GENERAL",status:403,title:"Security violation detected",suggestion:"Check for path traversal or unauthorized access attempts"}),mt=e({slug:"input-validation-failed",category:"GENERAL",status:400,title:"Input validation failed",suggestion:"Check request input against validation rules"}),A={"unknown-error":ut,"permission-denied":lt,"file-not-found":gt,"resource-not-found":pt,"invalid-argument":dt,"timeout-error":Et,"initialization-error":Rt,"not-supported":ft,"security-violation":m,"input-validation-failed":mt};var fr={...y,...I,...O,...T,...h,...x,...S,...N,...v,...C,...A};var _t=[{source:String.raw`<script[^>]*>[\\s\\S]*?<\\/script>`,flags:"gi",name:"inline script"},{source:String.raw`javascript:`,flags:"gi",name:"javascript: URL"},{source:String.raw`\\bon\\w+\\s*=`,flags:"gi",name:"event handler attribute"},{source:String.raw`data:\\s*text\\/html`,flags:"gi",name:"data: HTML URL"}];function yt(){return _t.map(({source:r,flags:t,name:o})=>({pattern:new RegExp(r,t),name:o}))}function It(){let r=globalThis;return r.__VERYFRONT_DEV__===!0||r.Deno?.env?.get?.("VERYFRONT_ENV")==="development"}function D(r,t={}){let{allowInlineScripts:o=!1,strict:n=!1,warn:i=!0}=t;for(let{pattern:c,name:u}of yt())if(!(o&&u==="inline script")&&(c.lastIndex=0,!!c.test(r)&&(i&&console.warn(`[Security] Suspicious ${u} detected in server HTML`),n||!It())))throw m.create({detail:`Potentially unsafe HTML: ${u} detected`});return r}var E=class{constructor(t,o){l(this,"prefix",t);l(this,"level",o)}log(t,o,n,...i){this.level>t||o?.(n,...i)}debug(t,...o){this.log(0,console.debug,`[${this.prefix}] DEBUG: ${t}`,...o)}info(t,...o){this.log(1,console.log,`[${this.prefix}] ${t}`,...o)}warn(t,...o){this.log(2,console.warn,`[${this.prefix}] WARN: ${t}`,...o)}error(t,...o){this.log(3,console.error,`[${this.prefix}] ERROR: ${t}`,...o)}};function Ot(){if(typeof window>"u")return 2;let r=globalThis;return r.__VERYFRONT_DEV__||r.__RSC_DEV__?r.__VERYFRONT_DEBUG__||r.__RSC_DEBUG__?0:1:2}var R=Ot(),p=new E("RSC",R),br=new E("PREFETCH",R),Mr=new E("HYDRATE",R),Gr=new E("VERYFRONT",R);var s="/_veryfront",_={RSC:`${s}/rsc/`,FS:`${s}/fs/`,MODULES:`${s}/modules/`,PAGES:`${s}/pages/`,DATA:`${s}/data/`,LIB:`${s}/lib/`,CHUNKS:`${s}/chunks/`,CLIENT:`${s}/client/`},L={HMR_RUNTIME:`${s}/hmr-runtime.js`,HMR:`${s}/hmr.js`,ERROR_OVERLAY:`${s}/error-overlay.js`,DEV_LOADER:`${s}/dev-loader.js`,CLIENT_LOG:`${s}/log`,CLIENT_JS:`${s}/client.js`,ROUTER_JS:`${s}/router.js`,PREFETCH_JS:`${s}/prefetch.js`,MANIFEST_JSON:`${s}/manifest.json`,APP_JS:`${s}/app.js`,RSC_CLIENT:`${s}/rsc/client.js`,RSC_MANIFEST:`${s}/rsc/manifest`,RSC_STREAM:`${s}/rsc/stream`,RSC_PAYLOAD:`${s}/rsc/payload`,RSC_RENDER:`${s}/rsc/render`,RSC_PAGE:`${s}/rsc/page`,RSC_MODULE:`${s}/rsc/module`,RSC_DOM:`${s}/rsc/dom.js`,LIB_CHAT_REACT:`${s}/lib/chat/react.js`,LIB_CHAT_COMPONENTS:`${s}/lib/chat/components.js`,LIB_CHAT_PRIMITIVES:`${s}/lib/chat/primitives.js`};var ht={ROOT:".veryfront",CACHE:".veryfront/cache",KV:".veryfront/kv",LOGS:".veryfront/logs",TMP:".veryfront/tmp"},Hr=ht.CACHE;var Yr={HMR_RUNTIME:L.HMR_RUNTIME,ERROR_OVERLAY:L.ERROR_OVERLAY};var qr=_.RSC,zr=_.FS;var U="rsc-root";function M(r,t){let o=t==="root"?U:`rsc-slot-${t}`,n=r.getElementById(o);if(n)return n;let i=r.createElement("div");return i.id=o,r.body.appendChild(i),i}function xt(r,t){if(t.type!=="slot")return;let o=M(r,t.id);o.innerHTML=D(String(t.html??""))}function b(r,t){let o=t.split(`\n`),n=o.pop()??"";for(let i of o){let c=i.trim();if(!c)continue;let u;try{u=JSON.parse(c)}catch(d){p.debug("[client-dom] malformed NDJSON line",{line:c,error:d instanceof Error?d.message:String(d)});continue}if(!u||typeof u!="object")continue;let g=u;if(g.type==="slot"){xt(r,g);try{vt(r,g.id||"root")}catch(d){p.debug("[client-dom] hydration optional failed",d)}}}return n}function St(r){return new Promise((t,o)=>{let n=()=>o(new DOMException("aborted","AbortError"));if(r.aborted){n();return}r.addEventListener("abort",n,{once:!0})})}async function Zr(r,t=document,o){let n="body"in r?r:null,i=n?.body??r;if(!i)return;let c=i.getReader(),u=new TextDecoder,g="",d=!1;try{for(;;){if(o?.aborted)throw new DOMException("aborted","AbortError");let a=c.read(),{done:G,value:P}=o?await Promise.race([a,St(o)]):await a;if(G){d=!0;break}g+=u.decode(P,{stream:!0}),g=b(t,g)}g&&b(t,`${g}\n`)}catch(a){throw a instanceof Error&&a.name==="AbortError"||p.debug("[client-dom] consumeNdjsonStream error",a),a}finally{try{await c.cancel()}catch(a){d||p.debug("[client-dom] reader.cancel failed",a)}try{c.releaseLock()}catch(a){p.debug("[client-dom] reader.releaseLock failed",a)}if(typeof i.cancel=="function")try{await i.cancel()}catch(a){p.debug("[client-dom] stream.cancel failed",a)}if(typeof n?.body?.cancel=="function")try{await n.body.cancel()}catch(a){p.debug("[client-dom] response.body.cancel failed",a)}}}function Nt(r,t){let o=M(r,t),n=[],i=c=>{let u=c;u.dataset?.clientRef&&n.push(u);for(let g of c.children)i(g)};return i(o),n}function vt(r,t){let o=Nt(r,t);for(let n of o){let i=n.dataset?.clientRef;i&&(n.dataset.hydrated="true",p.debug("[client-dom] marked for hydration",i))}}export{Zr as consumeNdjsonStream,M as getContainer};\n';
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1133";
2
+ export declare const VERSION = "0.1.1136";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.1133";
4
+ export const VERSION = "0.1.1136";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.1133",
3
+ "version": "0.1.1136",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -332,10 +332,10 @@
332
332
  "@types/react": "19.2.14",
333
333
  "@types/react-dom": "19.2.3",
334
334
  "ws": "8.21.0",
335
- "@veryfront/ext-bundler-esbuild": "0.1.1133",
336
- "@veryfront/ext-content-mdx": "0.1.1133",
337
- "@veryfront/ext-css-tailwind": "0.1.1133",
338
- "@veryfront/ext-parser-babel": "0.1.1133"
335
+ "@veryfront/ext-bundler-esbuild": "0.1.1136",
336
+ "@veryfront/ext-content-mdx": "0.1.1136",
337
+ "@veryfront/ext-css-tailwind": "0.1.1136",
338
+ "@veryfront/ext-parser-babel": "0.1.1136"
339
339
  },
340
340
  "devDependencies": {
341
341
  "@types/node": "20.9.0"