rari 0.17.2 → 0.17.4

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 (53) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/dist/{define-B_ozIapW.mjs → define-CuBTL1jt.mjs} +1 -1
  3. package/dist/{execute-CbhDMAQ3.mjs → execute-DJ7w3uhW.mjs} +1 -1
  4. package/dist/{feed-NrJzjZyg.mjs → feed-CfjUO7Zz.mjs} +1 -1
  5. package/dist/get-client-component-D2K213pV.mjs +1 -0
  6. package/dist/image/static.d.mts +1 -1
  7. package/dist/image.d.mts +1 -1
  8. package/dist/image.mjs +1 -1
  9. package/dist/index.d.mts +1 -1
  10. package/dist/mdx/define.mjs +1 -1
  11. package/dist/mdx.mjs +1 -1
  12. package/dist/navigation-transition-store-dfNJmkIX.mjs +1 -0
  13. package/dist/og.mjs +1 -1
  14. package/dist/preload-modules-BDQFWAlZ.mjs +2 -0
  15. package/dist/proxy/{runtime-executor.d.mts → executor.d.mts} +1 -1
  16. package/dist/proxy/{runtime-executor.mjs → executor.mjs} +2 -2
  17. package/dist/react-helpers-GTRYJwF2.d.mts +5 -0
  18. package/dist/react-helpers-duOBWuYF.mjs +1 -0
  19. package/dist/{robots-BOPIkPcN.mjs → robots-C4JcczMZ.mjs} +1 -1
  20. package/dist/route-cache-D2iIKQIU.mjs +1 -0
  21. package/dist/router-Cc9lVbtA.mjs +1 -0
  22. package/dist/router.d.mts +2 -1
  23. package/dist/router.mjs +1 -1
  24. package/dist/{rsc-vite-build-CSnu8C3P.mjs → rsc-vite-build-Cyc5ad0S.mjs} +1 -1
  25. package/dist/runtime/AppRouterProvider.d.mts +15 -5
  26. package/dist/runtime/AppRouterProvider.mjs +1 -1
  27. package/dist/runtime/ClientRouter.d.mts +3 -3
  28. package/dist/runtime/ClientRouter.mjs +4 -4
  29. package/dist/runtime/ErrorBoundaryWrapper.d.mts +3 -4
  30. package/dist/runtime/ErrorBoundaryWrapper.mjs +1 -1
  31. package/dist/runtime/action-flight-refresh.mjs +1 -1
  32. package/dist/runtime/call-server.mjs +1 -1
  33. package/dist/runtime/entry-client.mjs +2 -2
  34. package/dist/runtime/merge-flight-refresh.d.mts +7 -7
  35. package/dist/runtime/merge-flight-refresh.mjs +1 -1
  36. package/dist/runtime/rsc-client-runtime.mjs +1 -1
  37. package/dist/{sitemap--bdIkWl5.mjs → sitemap-BcUkIffd.mjs} +1 -1
  38. package/dist/{static-modules-DBL6iFbg.d.mts → static-modules-e8GEN_C9.d.mts} +4 -3
  39. package/dist/type-guards-BLY2PlGR.mjs +1 -0
  40. package/dist/{types-CkJ_86mo.d.mts → types-Cp7dbLe7.d.mts} +10 -14
  41. package/dist/vite.d.mts +1 -1
  42. package/dist/vite.mjs +56 -56
  43. package/package.json +12 -20
  44. package/dist/get-client-component-s7qprTUa.mjs +0 -1
  45. package/dist/navigation-transition-store-CSKrbtbK.mjs +0 -1
  46. package/dist/preload-modules-Dv_GzGCm.mjs +0 -2
  47. package/dist/router-Cl4J7j1A.mjs +0 -1
  48. package/dist/runtime/flight-route-cache.d.mts +0 -27
  49. package/dist/runtime/flight-route-cache.mjs +0 -1
  50. package/dist/runtime/flight-router-state.d.mts +0 -11
  51. package/dist/runtime/flight-router-state.mjs +0 -1
  52. package/dist/serialize-router-state-uOGGpmBr.mjs +0 -1
  53. package/dist/type-guards-BJXKlA6x.mjs +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rari",
3
3
  "type": "module",
4
- "version": "0.17.2",
4
+ "version": "0.17.4",
5
5
  "description": "Runtime Accelerated Rendering Infrastructure (rari)",
6
6
  "author": "Ryan Skinner",
7
7
  "license": "MIT",
@@ -90,14 +90,6 @@
90
90
  "types": "./dist/runtime/merge-flight-refresh.d.mts",
91
91
  "default": "./dist/runtime/merge-flight-refresh.mjs"
92
92
  },
93
- "./runtime/flight-route-cache": {
94
- "types": "./dist/runtime/flight-route-cache.d.mts",
95
- "default": "./dist/runtime/flight-route-cache.mjs"
96
- },
97
- "./runtime/flight-router-state": {
98
- "types": "./dist/runtime/flight-router-state.d.mts",
99
- "default": "./dist/runtime/flight-router-state.mjs"
100
- },
101
93
  "./runtime/action-revalidation-kind": {
102
94
  "types": "./dist/runtime/action-revalidation-kind.d.mts",
103
95
  "default": "./dist/runtime/action-revalidation-kind.mjs"
@@ -142,8 +134,8 @@
142
134
  },
143
135
  "peerDependencies": {
144
136
  "@mdx-js/mdx": "^3.1.1",
145
- "@rari/use-cache": "^0.17.1",
146
- "oxc-transform-react": "^0.151.0",
137
+ "@rari/use-cache": "^0.17.4",
138
+ "oxc-transform-react": "^0.153.0",
147
139
  "react": "^19.3.0",
148
140
  "react-dom": "^19.3.0"
149
141
  },
@@ -164,22 +156,22 @@
164
156
  "react-server-dom-webpack": "^19.3.0"
165
157
  },
166
158
  "optionalDependencies": {
167
- "rari-darwin-arm64": "0.17.1",
168
- "rari-darwin-x64": "0.17.1",
169
- "rari-linux-arm64": "0.17.1",
170
- "rari-linux-x64": "0.17.1",
171
- "rari-win32-arm64": "0.17.1",
172
- "rari-win32-x64": "0.17.1"
159
+ "rari-darwin-arm64": "0.17.4",
160
+ "rari-darwin-x64": "0.17.4",
161
+ "rari-linux-arm64": "0.17.4",
162
+ "rari-linux-x64": "0.17.4",
163
+ "rari-win32-arm64": "0.17.4",
164
+ "rari-win32-x64": "0.17.4"
173
165
  },
174
166
  "devDependencies": {
175
167
  "@mdx-js/mdx": "^3.1.1",
176
168
  "@rari/deploy": "0.0.0",
177
169
  "@rari/logger": "0.0.0",
178
- "@rari/use-cache": "0.17.1",
179
- "@types/node": "^26.6.3",
170
+ "@rari/use-cache": "0.17.4",
171
+ "@types/node": "^26.6.4",
180
172
  "@types/react": "^19.3.0",
181
173
  "@types/react-dom": "^19.3.0",
182
- "oxc-transform-react": "^0.151.0",
174
+ "oxc-transform-react": "^0.153.0",
183
175
  "typescript": "npm:@typescript/typescript6@^6.0.2",
184
176
  "typescript-7": "npm:typescript@^7.0.2",
185
177
  "vite-plus": "^1.0.0"
@@ -1 +0,0 @@
1
- import{m as e,u as t,v as n,w as r}from"./type-guards-BJXKlA6x.mjs";import{o as i}from"./path-CTEC1xmy.mjs";import{n as a,r as o,t as s}from"./rari-global-5vGzhToD.mjs";import*as c from"react";function l(e){return e.startsWith(`./`)?[e,e.slice(2)]:[e,`./${e}`]}function u(e){let t=i(e),n=/* @__PURE__ */ new Set([t]),r=t.indexOf(`/src/`);r!==-1&&n.add(t.slice(r+1));let a=t.indexOf(`/components/`);return a!==-1&&n.add(t.slice(a+1)),[...n]}function d(e,t){if(t!==void 0)return t;let n=e.exportName;if(n!=null&&n!==``)return n}function f(e,t){let n=i(e),r=i(t);return!!(n===r||r.includes(`/`)&&n.endsWith(`/${r}`)||n.includes(`/`)&&r.endsWith(`/${n}`))}function p(e,t,n){for(let r of u(e))for(let e of l(r)){let r=Object.values(n).find(t=>typeof t.path!=`string`||t.path===``?!1:f(t.path,e));if(r)return{info:r,exportName:d(r,t)}}return null}function m(e){return e.loading=!0,e.loadPromise=e.loader().then(t=>(e.component=t,e.registered=!0,e.loading=!1,t)).catch(t=>{throw console.error(`[rari] Failed to load component ${e.id}:`,t),e.loading=!1,e.loadError=t,e.loadPromise=void 0,t}),e.loadPromise}async function h(e,t){return e.component==null?e.loadPromise?(await e.loadPromise,g(e,t)):e.loader?await m(e)==null?null:g(e,t):null:g(e,t)}function g(t,r){let i=t.component;if(i==null)return null;if(e(i))return i;if(!n(i))return null;if(r==null||r===``||r==="default")return i.default??i;if(r in i)return i[r];let a=i.default;return n(a)&&r in a?a[r]:null}function _(e){let t=i(e);return t===e?[t]:[t,e]}function v(e){let t=o(),n=a(),r=s(),c=i(e),l=y(e,t);if(l!=null)return l;let u=c.indexOf(`#`),d=u===-1?c:c.slice(0,u),f=u===-1?void 0:c.slice(u+1);return b(e,f,t)??x(e,d,f,t,n,r)??p(d,f,t)}function y(e,t){for(let n of _(e)){if(!(n in t))continue;let e=t[n],r=n.indexOf(`#`);return{info:e,exportName:d(e,r===-1?void 0:n.slice(r+1))}}return null}function b(e,t,n){for(let r of _(e)){let e=r.indexOf(`#`),i=e===-1?r:r.slice(0,e);if(i in n)return{info:n[i],exportName:d(n[i],t)}}return null}function x(e,t,n,r,a,o){let s=i(e)===e?[t]:[t,e.includes(`#`)?e.slice(0,e.indexOf(`#`)):e];for(let e of s){let t=S(e,n,r,a);if(t!=null)return t;let i=C(e,n,r,o);if(i!=null)return i}return null}function S(e,t,n,r){for(let i of l(e)){if(!(i in r))continue;let e=r[i];if(e!==``&&e in n)return{info:n[e],exportName:d(n[e],t)}}return null}function C(e,t,n,r){if(!(e in r))return null;let i=r[e];return i===``||!(i in n)?null:{info:n[i],exportName:d(n[i],t)}}function w(e){return e.component!=null||e.loader==null?e.loadPromise:e.loadError==null?e.loadPromise?e.loadPromise:m(e):Promise.reject(r(e.loadError))}function T(t,r,i){let a=d(t,i),o=g({...t,component:r},a);if(o==null)return n(r)&&(`default`in r||`__esModule`in r)?r:e(r)?{default:r,[a!=null&&a!==``?a:`default`]:r,__esModule:!0}:r;let s=a!=null&&a!==``?a:`default`;return{...n(r)?r:{},default:o,[s]:o,__esModule:!0}}function E(e,n,i,a){let o=d(e,a),s=o!=null&&o!==``?o:`default`,l=a=>{if(e.loadError!=null)throw r(e.loadError);if(e.component!=null){let r=g(e,o);if(r==null)throw Error(`[rari] Lazy component "${n}" loaded but export "${s}" is missing`);if(!t(r))throw Error(`[rari] Lazy component "${n}" export "${s}" is not a component`);return c.createElement(r,a)}throw i};return l.displayName=`Lazy(${e.displayName??e.exportName??n})`,{default:l,[s]:l,__esModule:!0}}function D(e){let t=v(e);if(!t)return import.meta.env.DEV&&console.warn(`[rari] __rari_rsc_require__: component "${e}" not found in registry`),{};let{info:n,exportName:r}=t;if(n.component!=null)return T(n,n.component,r);if(n.loader){if(n.loadError!=null)return E(n,e,Promise.resolve(),r);let t=w(n);if(t)return E(n,e,t,r)}return{}}async function O(e){let t=v(e);return t?h(t.info,t.exportName):null}function k(){if(typeof window>`u`)return;let e=e=>{let t=o(),n=i(e);return e in t?t[e]:n in t?t[n]:Object.values(t).find(t=>t.path===e||t.path===n)};Reflect.set(globalThis,`__rari_get_script_filename__`,t=>{let n=e(t)?.path??i(t),r=i(n);if(r.startsWith(`http://`)||r.startsWith(`https://`))return r;let a=r.indexOf(`/src/`);return a===-1?r.startsWith(`src/`)?`/${r}`:r.startsWith(`/`)?r:`/${r}`:r.slice(a)}),Reflect.set(globalThis,`__rari_chunk_load__`,async t=>{let n=e(t);if(n&&n.component==null&&n.loader!=null){let e=w(n);if(e)return e.then(()=>void 0)}return n?.loadPromise==null?Promise.resolve():n.loadPromise.then(()=>void 0)})}export{k as n,D as r,O as t};
@@ -1 +0,0 @@
1
- let e=0,t=`/`,n=``,r=!1,i={generation:e,pathname:t,search:n},a=null;const o=/* @__PURE__ */ new Set;function s(){i={generation:e,pathname:t,search:n}}function c(){s();for(let e of o)e()}function l(){r||typeof window>`u`||(r=!0,t=window.location.pathname,n=window.location.search,s())}function u(){return l(),i}function d(e=`/`){return a?.pathname===e&&a.search===``&&a.generation===0||(a={generation:0,pathname:e,search:``}),a}function f(e){return o.add(e),()=>{o.delete(e)}}function p(i){r=!0,e+=1,t=i.pathname,n=i.search??``,c()}function m(){if(typeof window>`u`)return;r=!0;let e=window.location.pathname,i=window.location.search;(e!==t||i!==n)&&(t=e,n=i,c())}export{m as a,f as i,u as n,p as r,d as t};
@@ -1,2 +0,0 @@
1
- import{f as e}from"./type-guards-BJXKlA6x.mjs";import{o as t}from"./path-CTEC1xmy.mjs";import{t as n}from"./get-client-component-s7qprTUa.mjs";import*as r from"react";function i(e){return r.isValidElement(e)||e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function a(e){if(!Array.isArray(e))return e;let t=e;return t.length===1&&r.isValidElement(t[0])?t[0]:t.length>0&&t.every(i)?r.createElement(r.Fragment,null,...t):e}async function o(e,t){let r=s(e,t);r.size!==0&&await Promise.all(Array.from(r,async e=>{try{if(await n(e)==null){console.warn(`[rari] Failed to preload component: ${e}`);return}t?.add(e)}catch(t){console.error(`[rari] Error preloading component ${e}:`,t)}}))}function s(e,t){let n=/* @__PURE__ */ new Set;for(let r of e.split(`
2
- `)){let e=c(r);e!=null&&(!t||!t.has(e))&&n.add(e)}return n}function c(n){let r=n.trim();if(!r)return null;let i=r.indexOf(`:`);if(i===-1)return null;let a=r.substring(i+1);if(!a.startsWith(`I`))return null;try{let n=JSON.parse(a.substring(1));if(!e(n))return null;let r=n[0];if(!r.includes(`/`)&&r.startsWith(`$`))return null;let i=typeof n[2]==`string`?n[2]:void 0,o=t(r);return o.includes(`#`)?o:i!=null&&i!==``&&i!=="default"?`${o}#${i}`:o}catch{return null}}export{a as n,o as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./navigate-DuyUa6qD.mjs";import{i as t,v as n}from"./type-guards-BJXKlA6x.mjs";import{a as r,i,n as a,t as o}from"./navigation-transition-store-CSKrbtbK.mjs";import{c as s}from"react/compiler-runtime";import{createContext as c,use as l,useEffect as u,useRef as d,useSyncExternalStore as f}from"react";import{jsx as p}from"react/jsx-runtime";const m=c(null);function h(){let e=l(m);if(!e)throw Error(`useRouter must be used within a RouterProvider`);return e}function g(){return h().pathname}function _(){return h().searchParams}function v(){return f(i,b,y)}function y(){return o().generation}function b(){return a().generation}function x(e){return n(e)&&typeof e.navigate==`function`}function S(n){let r=s(17),{children:c,initialPathname:l}=n,h;r[0]===l?h=r[1]:(h=()=>o(l),r[0]=l,r[1]=h);let g=f(i,a,h),_=d(null),v;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],r[2]=v):v=r[2],u(D,v);let y,b;r[3]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{let n=e();n&&(_.current=n);let r=e=>{let n=t(e,x);n&&(_.current=n.navigate)},i=()=>{_.current=null};return window.addEventListener(`rari:register-navigate`,r),window.addEventListener(`rari:deregister-navigate`,i),()=>{window.removeEventListener(`rari:register-navigate`,r),window.removeEventListener(`rari:deregister-navigate`,i)}},b=[],r[3]=y,r[4]=b):(y=r[3],b=r[4]),u(y,b);let S;r[5]===g.search?S=r[6]:(S=g.search.startsWith(`?`)?g.search.slice(1):g.search,r[5]=g.search,r[6]=S);let O;r[7]===S?O=r[8]:(O=new URLSearchParams(S),r[7]=S,r[8]=O);let k=O,A,j;r[9]===Symbol.for(`react.memo_cache_sentinel`)?(A=async(e,t)=>{_.current?await _.current(e,t):(console.warn(`[rari] Router not ready, falling back to window.location`),window.location.href=e)},j=async(e,t)=>{_.current?await _.current(e,{...t,replace:!0}):(console.warn(`[rari] Router not ready, falling back to window.location`),window.location.replace(e))},r[9]=A,r[10]=j):(A=r[9],j=r[10]);let M;r[11]!==k||r[12]!==g.pathname?(M={pathname:g.pathname,searchParams:k,push:A,replace:j,back:E,forward:T,refresh:w,prefetch:C},r[11]=k,r[12]=g.pathname,r[13]=M):M=r[13];let N=M,P;return r[14]!==c||r[15]!==N?(P=/* @__PURE__ */ p(m,{value:N,children:c}),r[14]=c,r[15]=N,r[16]=P):P=r[16],P}async function C(e){try{let t=new URL(e,window.location.origin);await fetch(t.pathname+t.search,{headers:{Accept:`text/x-component`},priority:`low`})}catch(e){console.warn(`[rari] Prefetch failed:`,e)}}function w(){window.dispatchEvent(new CustomEvent(`rari:app-router-rerender`))}function T(){window.history.forward()}function E(){window.history.back()}function D(){r()}export{v as a,_ as i,g as n,h as r,S as t};
@@ -1,27 +0,0 @@
1
- import { SegmentPath } from "./flight-router-state.mjs";
2
- import { ReactNode } from "react";
3
- //#region src/runtime/flight/route-cache.d.ts
4
- export interface CacheNode {
5
- rsc: ReactNode;
6
- slots: Record<string, CacheNode> | null;
7
- }
8
- export interface FlightRouteCacheEntry {
9
- pathname: string;
10
- search: string;
11
- segmentPath: SegmentPath;
12
- node: CacheNode;
13
- }
14
- export declare class FlightRouteCache {
15
- private root;
16
- get(pathname: string, search: string): FlightRouteCacheEntry | undefined;
17
- getElement(pathname: string, search: string): ReactNode | undefined;
18
- set(pathname: string, search: string, element: ReactNode): void;
19
- invalidate(pathname: string, search?: string): void;
20
- clear(): void;
21
- }
22
- export declare const flightRouteCache: FlightRouteCache;
23
- export declare function currentRouteLocation(): {
24
- pathname: string;
25
- search: string;
26
- };
27
- //#endregion
@@ -1 +0,0 @@
1
- import{segmentPathFromPathname as e}from"./flight-router-state.mjs";function t(e=null){return{rsc:e,slots:null}}function n(e,n){return e.slots??={},e.slots[n]??=t(),e.slots[n]}function r(e,t){let r=e;for(let e of t)r=n(r,e);return r}function i(e,t){if(t.length===0){e.rsc=null,e.slots=null;return}let n=e;for(let e=0;e<t.length-1;e+=1){let r=t[e];if(!n.slots?.[r])return;n=n.slots[r]}let r=t[t.length-1];if(!n.slots?.[r])return;let i=n.slots[r];i.rsc=null,i.slots=null,delete n.slots[r],Object.keys(n.slots).length===0&&(n.slots=null)}var a=class{root=t();get(t,n){let i=e(t),a=r(this.root,i);if(a.rsc!=null)return{pathname:t,search:n,segmentPath:i,node:a}}getElement(e,t){return this.get(e,t)?.node.rsc}set(t,n,i){let a=e(t),o=r(this.root,a);o.rsc=i}invalidate(t,n=``){i(this.root,e(t))}clear(){this.root=t()}};const o=new a;function s(){return typeof window>`u`?{pathname:`/`,search:``}:{pathname:window.location.pathname,search:window.location.search}}export{a as FlightRouteCache,s as currentRouteLocation,o as flightRouteCache};
@@ -1,11 +0,0 @@
1
- //#region src/runtime/flight/router-state.d.ts
2
- export type FlightRouterState = readonly [segment: string, parallelRoutes: {
3
- readonly children?: FlightRouterState;
4
- }];
5
- export type SegmentPath = readonly string[];
6
- export declare function buildFlightRouterState(pathname: string): FlightRouterState;
7
- export declare function segmentPathFromRouterState(tree: FlightRouterState): SegmentPath;
8
- export declare function segmentPathFromPathname(pathname: string): SegmentPath;
9
- export declare function pathnameFromSegmentPath(segmentPath: SegmentPath): string;
10
- export declare function sharedSegmentPath(fromPathname: string, toPathname: string): SegmentPath;
11
- //#endregion
@@ -1 +0,0 @@
1
- const e=`children`;function t(e){let t=e.length;for(;t>1&&e[t-1]===`/`;)--t;return e.slice(0,t)}function n(n){let r=n===`/`||n===``?`/`:t(n)||`/`,i=r===`/`?[]:r.slice(1).split(`/`).filter(Boolean),a=[``,{}];for(let t=i.length-1;t>=0;--t)a=[i[t],{[e]:a}];return[``,{[e]:a}]}function r(e){let t=[],n=e;for(;n;){let e=n[0],r=n[1];e&&t.push(e),n=r.children}return t}function i(e){return r(n(e))}function a(e){return e.length===0?`/`:`/${e.join(`/`)}`}function o(e,t){let n=i(e),r=i(t),a=[],o=Math.min(n.length,r.length);for(let e=0;e<o&&n[e]===r[e];e+=1)a.push(n[e]);return a}export{n as buildFlightRouterState,a as pathnameFromSegmentPath,i as segmentPathFromPathname,r as segmentPathFromRouterState,o as sharedSegmentPath};
@@ -1 +0,0 @@
1
- import{buildFlightRouterState as e}from"./runtime/flight-router-state.mjs";function t(){if(typeof window>`u`)return{pathname:`/`,search:``,tree:e(`/`)};let t=window.location.pathname;return{pathname:t,search:window.location.search,tree:e(t)}}function n(){return JSON.stringify(t())}export{n as t};
@@ -1 +0,0 @@
1
- function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function t(t){return e(t)&&typeof t.then==`function`}function n(e){return typeof e==`object`&&!!e&&`$$typeof`in e}function r(e){return i(e)&&`code`in e}function i(e){return typeof Error.isError==`function`?Error.isError(e):e instanceof Error}function a(e){return i(e)?e:void 0}function o(e){return a(e)??Error(String(e))}function s(e,t=`Unknown error`){return i(e)?e.message:typeof e==`string`?e:t}function c(e){return typeof e==`function`}function l(t){try{let n=JSON.parse(t);return e(n)?n:null}catch{return null}}function u(e){let t=e.packageManager;return typeof t==`string`?t.startsWith(`pnpm`)?`pnpm`:t.startsWith(`yarn`)?`yarn`:t.startsWith(`bun`)?`bun`:t.startsWith(`npm`)?`npm`:null:null}function d(t){let n=e(t.dependencies)?t.dependencies:{},r=e(t.devDependencies)?t.devDependencies:{},i={...n,...r};return typeof i[`vite-plus`]==`string`?`vp`:typeof i.vite==`string`?`vite`:null}function f(e,t){if(!(e instanceof CustomEvent))return;let n=e.detail;if(t(n))return n}function p(e){return r(e)?e.code:void 0}function m(t,n){let r=l(t);if(!r)return null;let i=r[n];return Array.isArray(i)?i.filter(e):null}function h(t){return Array.isArray(t)?t.every(t=>{if(!e(t))return!1;let{find:n,replacement:r}=t;return(typeof n==`string`||n instanceof RegExp)&&typeof r==`string`}):!1}function g(t){return typeof t==`function`||e(t)&&(`$$typeof`in t||`render`in t)}function _(e){return`type`in e}function v(e){return Array.isArray(e)&&typeof e[0]==`string`}function y(t){return e(t)&&t.$$typeof===Symbol.for(`react.client.reference`)}function b(t){return e(t)&&typeof t.$$id==`string`}function x(e){return e.props}function S(e){return Object.entries(e).flatMap(([e,t])=>typeof t==`string`?[{find:e,replacement:t}]:[])}function C(t){return e(t)&&typeof t.route==`string`&&typeof t.navigationId==`number`&&typeof t.timestamp==`number`&&typeof t.key==`string`}function w(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function T(t){return Array.isArray(t)?t.every(t=>e(t)?Object.values(t).every(e=>typeof e==`string`||w(e)):!1):!1}function E(e){console.warn(`[rari] generateStaticParams() in ${e} returned invalid params. Expected Array<Record<string, string | string[]>> (e.g. [{ slug: "post" }]). Static routes for this page will not be generated.`)}export{d as C,u as S,E as T,_,p as a,m as b,h as c,i as d,v as f,n as g,C as h,f as i,y as l,c as m,a as n,x as o,t as p,s as r,b as s,S as t,g as u,e as v,o as w,l as x,T as y};