From 2aa685a34e006cc4fe846d459529748d8929af65 Mon Sep 17 00:00:00 2001 From: magne4000 Date: Mon, 20 Nov 2023 09:39:50 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20batijs/b?= =?UTF-8?q?ati@34773c636237511acc48c123b1e53612397ef0c3=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 5 +++-- assets/entries/entry-client-routing.514aa75f.js | 3 +++ assets/entries/entry-client-routing.90d43fd4.js | 3 --- assets/entries/pages_error.8b35f51e.js | 1 + assets/entries/pages_error.e76db8c7.js | 1 - assets/entries/pages_index.bdac063c.js | 2 ++ assets/entries/pages_index.deb0d3ca.js | 2 -- index.html | 5 +++-- vike.json | 2 +- 9 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 assets/entries/entry-client-routing.514aa75f.js delete mode 100644 assets/entries/entry-client-routing.90d43fd4.js create mode 100644 assets/entries/pages_error.8b35f51e.js delete mode 100644 assets/entries/pages_error.e76db8c7.js create mode 100644 assets/entries/pages_index.bdac063c.js delete mode 100644 assets/entries/pages_index.deb0d3ca.js diff --git a/404.html b/404.html index 8801ee0..45effb7 100644 --- a/404.html +++ b/404.html @@ -11,9 +11,10 @@

404 Page Not Found

This page could not be found.

- - + + + \ No newline at end of file diff --git a/assets/entries/entry-client-routing.514aa75f.js b/assets/entries/entry-client-routing.514aa75f.js new file mode 100644 index 0000000..2724c88 --- /dev/null +++ b/assets/entries/entry-client-routing.514aa75f.js @@ -0,0 +1,3 @@ +function an(){return!(typeof process>"u"||!process.cwd||!process.versions||typeof process.versions.node>"u"||!process.release||process.release.name!=="node")}function _e(e,t){let n;{var r=Error.stackTraceLimit;Error.stackTraceLimit=1/0,n=new Error(e),Error.stackTraceLimit=r}return an()&&(n.stack=ln(n.stack,t)),n}function ln(e,t){if(!e)return e;const n=cn(e);let r=0;return n.filter(o=>o.includes(" (internal/")||o.includes(" (node:internal")?!1:r1&&ye(!1,lt,{onlyOnce:!0,showStackTrace:!0})}function dn(e){ye(T.isClientRouting!==!1,fn,{onlyOnce:!0,showStackTrace:!0}),ye(T.isClientRouting===void 0,lt,{onlyOnce:!0,showStackTrace:!0}),T.isClientRouting=!0,e&&(T.checkSingleInstance=!0),ut()}function gn(e){T.instances.push(e),ut()}function hn(e,t){if(e)return;const n=`[vike][Wrong Usage] ${t}`;throw new Error(n)}function ye(e,t,{onlyOnce:n,showStackTrace:r}){if(e)return;const i=`[vike][Warning] ${t}`;if(n){const{alreadyLogged:o}=T,l=n===!0?i:n;if(o.has(l))return;o.add(l)}console.warn(r?new Error(i):i)}const pn="0.4.147",N={projectName:"Vike",projectVersion:pn,npmPackageName:"vike",githubRepository:"https://github.com/vikejs/vike"};gn(N.projectVersion);const ct=new Proxy(e=>e,{get:()=>ct}),p=ct,v=C("utils/assert.ts",{alreadyLogged:new Set,logger(e,t){t==="info"?console.log(e):console.warn(e)},showStackTraceList:new WeakSet}),mn=`[${N.npmPackageName}]`,yn=`[${N.npmPackageName}@${N.projectVersion}]`,$e=2;function s(e,t){var l;if(e)return;const n=(()=>{if(!t)return null;const a=typeof t=="string"?t:JSON.stringify(t);return p.dim(`Debug info (for ${N.projectName} maintainers; you can ignore this): ${a}`)})(),r=`${N.githubRepository}/issues/new`;let i=[`You stumbled upon a bug in ${N.projectName}'s source code.`,`Go to ${p.blue(r)} and copy-paste this error; a maintainer will fix the bug (usually under 24 hours).`,n].filter(Boolean).join(" ");i=M(i),i=se(i,"Bug"),i=J(i,!0);const o=_e(i,$e);throw(l=v.onBeforeLog)==null||l.call(v),o}function h(e,t,{showStackTrace:n}={}){var i;if(e)return;t=M(t),t=se(t,"Wrong Usage"),t=J(t);const r=_e(t,$e);throw n&&v.showStackTraceList.add(r),(i=v.onBeforeLog)==null||i.call(v),r}function ft(e){return e=M(e),e=se(e,"Error"),e=J(e),_e(e,$e)}function R(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(t=M(t),t=se(t,"Warning"),t=J(t),n){const{alreadyLogged:o}=v,l=n===!0?t:n;if(o.has(l))return;o.add(l)}if((i=v.onBeforeLog)==null||i.call(v),r){const o=new Error(t);v.showStackTraceList.add(o),v.logger(o,"warn")}else v.logger(t,"warn")}}function Oe(e,t,{onlyOnce:n}){var r;if(!e){if(t=M(t),t=J(t),n){const{alreadyLogged:i}=v,o=t;if(i.has(o))return;i.add(o)}(r=v.onBeforeLog)==null||r.call(v),v.logger(t,"info")}}function se(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=p.bold(p[r](n)),`${n}${e}`}function M(e){return e.startsWith("[")?e:` ${e}`}function J(e,t=!1){return`${t?yn:mn}${e}`}function H(){return typeof window<"u"&&typeof window.scrollY=="number"}const dt=C("utils/assertRouterType.ts",{});function Y(){wn(bn()),dt.isClientRouting=!0}function bn(){return dt.isClientRouting!==!1}function wn(e){h(H(),`${p.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),R(e,"You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.",{showStackTrace:!0,onlyOnce:!0})}const Sn=["js","ts","cjs","cts","mjs","mts","jsx","tsx","cjsx","ctsx","mjsx","mtsx"],gt=["vue","svelte","marko","md","mdx"],Pn=[...Sn,...gt];function ht(e){const t=Pn.some(n=>e.endsWith("."+n));return s(!Rn(e)||t),t}function Rn(e){return/\.(c|m)?(j|t)sx?$/.test(e)}function vn(e){return gt.some(t=>e.endsWith("."+t))}function x(e,t,n){return typeof e=="string"?De(e.split(""),t,n).join(""):De(e,t,n)}function De(e,t,n){const r=[];let i=t>=0?t:e.length+t;s(i>=0&&i<=e.length);let o=n>=0?n:e.length+n;for(s(o>=0&&o<=e.length);!(i===o||(i===e.length&&(i=0),i===o));){const l=e[i];s(l!==void 0),r.push(l),i++}return r}const pt=["http://","https://","tauri://"];function ke(e){return pt.some(t=>e.startsWith(t))||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function En(e,t){s(t.includes(" but ")),h(typeof e=="string",`${t} should be a string`),!ke(e)&&(!e.startsWith("/")&&!e.includes(":")?h(!1,`${t} is ${p.cyan(e)} and it should be /${p.cyan(e)} instead (URL pathnames should start with a leading slash)`):h(!1,`${t} isn't a valid URL`))}function K(e,t){s(ke(e)),s(t.startsWith("/"));const[n,...r]=e.split("#");s(n!==void 0);const i=["",...r].join("#")||null;s(i===null||i.startsWith("#"));const o=i===null?"":be(i.slice(1)),[l,...a]=n.split("?");s(l!==void 0);const u=["",...a].join("?")||null;s(u===null||u.startsWith("?"));const c={},d={};Array.from(new URLSearchParams(u||"")).forEach(([$,D])=>{c[$]=D,d[$]=[...d.hasOwnProperty($)?d[$]:[],D]});const{origin:f,pathname:g}=Cn(l,t);s(f===null||f===be(f)),s(g.startsWith("/")),s(f===null||e.startsWith(f));const m=l.slice((f||"").length);Tn(e,f,m,u,i);let{pathname:P,hasBaseServer:O}=kn(g,t);return P=_n(P),s(P.startsWith("/")),{origin:f,pathname:P,pathnameOriginal:m,hasBaseServer:O,search:c,searchAll:d,searchOriginal:u,hash:o,hashOriginal:i}}function be(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function _n(e){return e=e.split("/").map(t=>be(t).split("/").join("%2F")).join("/"),e=e.replace(/\s/g,""),e}function Cn(e,t){var n;{const{origin:r,pathname:i}=de(e);if(r)return{origin:r,pathname:i};s(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{let r=typeof window<"u"&&((n=window==null?void 0:window.document)==null?void 0:n.baseURI);r&&(r=de(r).pathname);const o=$n(e,r||t);return de(o)}}function de(e){if(pt.some(t=>e.startsWith(t))){const[t,n,r,...i]=e.split("/"),o=[t,n,r].join("/"),l=["",...i].join("/")||"/";return{origin:o,pathname:l}}else return{pathname:e,origin:null}}function $n(e,t){const n=t.split("/"),r=e.split("/");let i=t.endsWith("/");e.startsWith(".")&&n.pop();for(const l in r){const a=r[l];a==""&&l==="0"||a!="."&&(a==".."?n.pop():(i=!1,n.push(a)))}let o=n.join("/");return i&&!o.endsWith("/")&&(o+="/"),o.startsWith("/")||(o="/"+o),o}function On(e){s(e.startsWith("/")),s(!e.includes("?")),s(!e.includes("#"))}function kn(e,t){On(e),s(Te(t));let n=e;if(s(n.startsWith("/")),s(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===x(t,0,-1)&&(r=x(t,0,-1),s(n===r)),n.startsWith(r)?(s(n.startsWith("/")||n.startsWith("http")),s(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),s(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function Te(e){return e.startsWith("/")}function Tn(e,t,n,r,i){const o=xn(t,n,r,i);s(e===o)}function xn(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function b(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function A(e){return e instanceof Function||typeof e=="function"}function te(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function Fn(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r{const r=e(t),i=e(n);if(s([!0,!1,null].includes(r)),s([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;s(!1)}}function In(e){return j(t=>{const n=e(t);return n===null?null:!n})}function y(e,t,n="unknown"){if(!E(e))return!1;if(!(t in e))return n==="undefined";if(n==="unknown")return!0;const r=e[t];return n==="array"?Array.isArray(r):n==="object"?E(r):n==="string[]"?Array.isArray(r)&&r.every(i=>typeof i=="string"):n==="function"?A(r):Array.isArray(n)?typeof r=="string"&&n.includes(r):n==="null"?r===null:n==="undefined"?r===void 0:n==="true"?r===!0:n==="false"?r===!1:typeof r===n}function I(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function An(e,t){return e.toLowerCase()t.toLowerCase()?1:0}const jn=e=>e!=null;function Ue(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function mt(e){const t=n=>`Not a posix path: ${n}`;s(e!==null,t("null")),s(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),s(e!=="",t("(empty string)")),s(e),s(!e.includes("\\"),t(e))}function ge(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function Ln(e){return typeof e=="object"&&e!==null&&"then"in e&&A(e.then)}function Nn(e){return[null,void 0].includes(e)?String(e):["boolean","number","string"].includes(typeof e)?JSON.stringify(e):null}function Hn(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}const Wn=["clientRouting"];function Bn(e){Wn.forEach(t=>{if(s(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;h(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),h(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const yt=["render","clientRouting","prerender","doNotPrerender"];function Vn(e,t){h(!yt.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function Dn(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;s(n!=="*");let i="",o="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(a=>{i=`${i} { ${a}`,o=` }${o}`}),i+o}function ae(e,t,{definedAt:n}){const r=bt(n,t),i=r==="internally"?r:`at ${r}`;let o=`${t}${e==="Hook"?"()":""}`;return`${e} ${p.cyan(o)} defined ${i}`}function bt(e,t){if("isComputed"in e)return"internally";let n;return"files"in e?n=e.files:n=[e],s(n.length>=1),n.map(i=>{const{filePathToShowToUser:o,fileExportPathToShowToUser:l}=i;let a=o;const u=Dn(l,t);return u&&(a=`${a} > ${p.cyan(u)}`),a}).join(" / ")}function B(e,t,n){const r=zn(e,t);if(r===null)return null;const{value:i,definedAt:o}=r;return n&&Un(i,n,t,o),r}function Un(e,t,n,r){s(e!==null);const i=typeof e;if(i===t)return;const o=Nn(e),l=o!==null?`value ${p.cyan(o)}`:`type ${p.cyan(i)}`,u=`${ae("Config",n,{definedAt:r})} has an invalid ${l}: it should be a ${p.cyan(t)} instead`;h(!1,u)}function zn(e,t){const n=e.configValues[t];return!n||n.value===null?null:n}function wt(e,t){const n=t.find(r=>r.pageId===e);return s(t.length>0),s(n),n}function St({definedAt:e}){if("isComputed"in e||"files"in e)return null;const{filePathToShowToUser:t}=e;return s(t),t}function Gn({definedAt:e}){const t=St({definedAt:e});return s(t),t}function Mn(e,t){const n={},r={},i={};e.forEach(a=>{Jn(a).forEach(({exportName:c,exportValue:d,isFromDefaultExport:f})=>{s(c!=="default"),i[c]=i[c]??[],i[c].push({exportValue:d,exportSource:`${a.filePath} > ${f?`\`export default { ${c} }\``:`\`export { ${c} }\``}`,filePath:a.filePath,_filePath:a.filePath,_fileType:a.fileType,_isFromDefaultExport:f})})}),t&&Object.entries(t.configValues).forEach(([a,u])=>{const{value:c}=u,d=St(u),f=ae("Config",a,u);r[a]=r[a]??c,n[a]=n[a]??[],s(n[a].length===0),n[a].push({configValue:c,configDefinedAt:f,configDefinedByFile:d});const g=a;i[g]=i[g]??[],i[g].push({exportValue:c,exportSource:f,filePath:d,_filePath:d,_fileType:null,_isFromDefaultExport:null})});const o=Yn(),l={};return Object.entries(i).forEach(([a,u])=>{u.forEach(({exportValue:c,_fileType:d,_isFromDefaultExport:f})=>{l[a]=l[a]??c,d===".page"&&!f&&(a in o||(o[a]=c))})}),s(!("default"in l)),s(!("default"in i)),{config:r,configEntries:n,exports:l,exportsAll:i,pageExports:o}}function Jn(e){const{filePath:t,fileExports:n}=e;s(n),s(ht(t));const r=[];return Object.entries(n).sort(In(([i])=>i==="default")).forEach(([i,o])=>{let l=i==="default";if(l)if(vn(t))i="Page";else{h(E(o),`The ${p.cyan("export default")} of ${t} should be an object.`),Object.entries(o).forEach(([a,u])=>{Vn(a,t),r.push({exportName:a,exportValue:u,isFromDefaultExport:l})});return}r.push({exportName:i,exportValue:o,isFromDefaultExport:l})}),r.forEach(({exportName:i,isFromDefaultExport:o})=>{s(!(o&&yt.includes(i)))}),r}function Yn(){return new Proxy({},{get(...e){return H()||R(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}function Kn(e){const t=".page.",n=x(e.split(t),0,-1).join(t);return s(!n.includes("\\")),n}function V(e){mt(e)}function Pt(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(h(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=Ce(e.map(({pageId:r})=>r).filter(r=>q(r)));if(h(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return s(r),r}return null}function q(e,t){return s(!e.includes("\\")),e.includes("/_error")}function qn(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return s(n),!!n.isErrorPage}else return q(e)}const Xn=[".page",".page.server",".page.route",".page.client",".css"];function Qn(e){if(mt(e),e.endsWith(".css"))return".css";s(ht(e),e);const n=e.split("/").slice(-1)[0].split("."),r=n.slice(-3)[0],i=n.slice(-2)[0];if(i==="page")return".page";if(s(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";s(!1,e)}function Rt(e){const t=o=>i.pageId===o||i.isDefaultPageFile&&(ze(i.filePath)||Zn(o,i.filePath)),n=Qn(e),i={filePath:e,fileType:n,isEnv:o=>{if(s(n!==".page.route"),o==="CLIENT_ONLY")return n===".page.client"||n===".css";if(o==="SERVER_ONLY")return n===".page.server";if(o==="CLIENT_AND_SERVER")return n===".page";s(!1)},isRelevant:t,isDefaultPageFile:we(e),isRendererPageFile:n!==".css"&&we(e)&&ze(e),isErrorPageFile:q(e),pageId:Kn(e)};return i}function we(e){return V(e),q(e)?!1:e.includes("/_default")}function ze(e){return V(e),e.includes("/renderer/")}function Zn(e,t){V(e),V(t),s(!e.endsWith("/")),s(!t.endsWith("/")),s(we(t));const n=x(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function er(e){s(Array.isArray(e)),e.forEach(t=>{s(E(t)),s(y(t,"pageId","string")),s(y(t,"routeFilesystem")),s(y(t,"configValuesSerialized")),s(y(t,"configValuesImported"))})}function tr(e){s(y(e,"configValuesImported"))}const nr=["$$registrations","_rerender_only"],rr=[".md",".mdx"];function ir(e,t,n){or(e,t,n)}function or(e,t,n){const i=Object.keys(e).filter(l=>!nr.includes(l)),o=i.filter(l=>l!=="default"&&l!==n);if(o.length===0){if(i.length===1)return;{s(i.length===0);let l=`${t} doesn't export any value, but it should have a ${p.cyan("export default")}`;n&&(l+=` or ${p.cyan(`export { ${n} }`)}`),h(!1,l)}}else if(n){if(rr.some(l=>t.endsWith(l)))return;o.forEach(l=>{R(!1,`${t} should have only a single export: move ${p.cyan(`export { ${l} }`)} to +config.h.js or its own +${o}.js`,{onlyOnce:!0})})}else{const l=o.join(", ");h(!1,`${t} replace ${p.cyan(`export { ${l} }`)} with ${p.cyan(`export default { ${l} }`)}`)}}function Se(e){const t={},n=(r,i,o,l)=>{t[r]={value:i,definedAt:{filePathToShowToUser:o,fileExportPathToShowToUser:[r,"default"].includes(l)?[]:[l]}},sr(i,r,o)};return e.forEach(r=>{if(r.isValueFile){const{exportValues:i,importPath:o,configName:l}=r;l!=="client"&&ir(i,o,l),Object.entries(i).forEach(([a,u])=>{const c=a!=="default",d=c?a:r.configName;c&&d in t||n(d,u,o,a)})}else{const{configName:i,importPath:o,exportValue:l,exportName:a}=r;n(i,l,o,a)}}),t}function sr(e,t,n){s(!n.includes("+config."))}const ar=[{is:e=>e===void 0,match:e=>e==="!undefined",serialize:()=>"!undefined",deserialize:()=>{}},{is:e=>e===1/0,match:e=>e==="!Infinity",serialize:()=>"!Infinity",deserialize:()=>1/0},{is:e=>e===-1/0,match:e=>e==="!-Infinity",serialize:()=>"!-Infinity",deserialize:()=>-1/0},{is:e=>typeof e=="number"&&isNaN(e),match:e=>e==="!NaN",serialize:()=>"!NaN",deserialize:()=>NaN},{is:e=>e instanceof Date,match:e=>e.startsWith("!Date:"),serialize:e=>"!Date:"+e.toISOString(),deserialize:e=>new Date(e.slice(6))},{is:e=>typeof e=="bigint",match:e=>e.startsWith("!BigInt:"),serialize:e=>"!BigInt:"+e.toString(),deserialize:e=>{if(typeof BigInt>"u")throw new Error("Your JavaScript environement does not support BigInt. Consider adding a polyfill.");return BigInt(e.slice(8))}},{is:e=>e instanceof RegExp,match:e=>e.startsWith("!RegExp:"),serialize:e=>"!RegExp:"+e.toString(),deserialize:e=>{e=e.slice(8);const t=e.match(/\/(.*)\/(.*)?/),n=t[1],r=t[2];return new RegExp(n,r)}},{is:e=>e instanceof Map,match:e=>e.startsWith("!Map:"),serialize:(e,t)=>"!Map:"+t(Array.from(e.entries())),deserialize:(e,t)=>new Map(t(e.slice(5)))},{is:e=>e instanceof Set,match:e=>e.startsWith("!Set:"),serialize:(e,t)=>"!Set:"+t(Array.from(e.values())),deserialize:(e,t)=>new Set(t(e.slice(5)))},{is:e=>typeof e=="string"&&e.startsWith("!"),match:e=>e.startsWith("!"),serialize:e=>"!"+e,deserialize:e=>e.slice(1)}];function le(e){const t=JSON.parse(e);return vt(t)}function vt(e){return typeof e=="string"?lr(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=vt(n)}),e)}function lr(e){for(const{match:t,deserialize:n}of ar)if(t(e))return n(e,le);return e}function Et(e){const t={};return Object.entries(e).forEach(([n,r])=>{const{valueSerialized:i,definedAt:o}=r;s(i),s(!t[n]),t[n]={value:le(i),definedAt:o}}),t}function ur(e,t){const n=e.map(i=>{const o={};{const{configValuesSerialized:d}=i,f=Et(d);Object.assign(o,f)}{const{configValuesImported:d}=i,f=Se(d);Object.assign(o,f)}const{pageId:l,isErrorPage:a,routeFilesystem:u,loadConfigValuesAll:c}=i;return cr(o),{pageId:l,isErrorPage:a,routeFilesystem:u,configValues:o,loadConfigValuesAll:c}}),r={configValues:{}};{const i=Se(t.configValuesImported);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function cr(e){const t="route",n=e[t];if(!n)return;const{value:r}=n,i=typeof r,o=ae("Config",t,n);h(i==="string"||A(r),`${o} has an invalid type '${i}': it should be a string or a function instead, see https://vike.dev/route`)}function fr(e){s(y(e,"isGeneratedFile")),s(e.isGeneratedFile!==!1,"vike was re-installed(/re-built). Restart your app."),s(e.isGeneratedFile===!0,`\`isGeneratedFile === ${e.isGeneratedFile}\``),s(y(e,"pageFilesLazy","object")),s(y(e,"pageFilesEager","object")),s(y(e,"pageFilesExportNamesLazy","object")),s(y(e,"pageFilesExportNamesEager","object")),s(y(e.pageFilesLazy,".page")),s(y(e.pageFilesLazy,".page.client")||y(e.pageFilesLazy,".page.server")),s(y(e,"pageFilesList","string[]")),s(y(e,"pageConfigsSerialized")),s(y(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;er(t),tr(n);const{pageConfigs:r,pageConfigGlobal:i}=ur(t,n),o={};X(e.pageFilesLazy).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;Ge(d),u.loadFile=async()=>{"fileExports"in u||(u.fileExports=await d(),Bn(u))}}),X(e.pageFilesExportNamesLazy).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;Ge(d),u.loadExportNames=async()=>{if(!("exportNames"in u)){const f=await d();h("exportNames"in f,"You seem to be using Vite 2 but the latest vike versions only work with Vite 3"),s(y(f,"exportNames","string[]"),u.filePath),u.exportNames=f.exportNames}}}),X(e.pageFilesEager).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;s(E(d)),u.fileExports=d}),X(e.pageFilesExportNamesEager).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;s(E(d)),s(y(d,"exportNames","string[]"),u.filePath),u.exportNames=d.exportNames}),e.pageFilesList.forEach(a=>{o[a]=o[a]??Rt(a)});const l=Object.values(o);return l.forEach(({filePath:a})=>{s(!a.includes("\\"))}),{pageFiles:l,pageConfigs:r,pageConfigGlobal:i}}function X(e){const t=[];return Object.entries(e).forEach(([n,r])=>{s(Xn.includes(n)),s(E(r)),Object.entries(r).forEach(([i,o])=>{const l=Rt(i);s(l.fileType===n),t.push({filePath:i,pageFile:l,globValue:o})})}),t}function Ge(e){s(A(e))}const F=C("setPageFiles.ts",{});function dr(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=fr(e);F.pageFilesAll=t,F.pageConfigs=n,F.pageConfigGlobal=r}async function gr(e,t){e?(s(!F.pageFilesGetter),s(t===void 0)):(s(F.pageFilesGetter),s(typeof t=="boolean"),(!F.pageFilesAll||!t)&&await F.pageFilesGetter());const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=F;s(n&&r&&i);const o=hr(n,r);return{pageFilesAll:n,allPageIds:o,pageConfigs:r,pageConfigGlobal:i}}function hr(e,t){const n=e.filter(({isDefaultPageFile:o})=>!o).map(({pageId:o})=>o),r=Ce(n),i=t.map(o=>o.pageId);return[...r,...i]}function xe(e,t){return Ct(e,t,!0)}function _t(e,t){return Ct(e,t,!1)}function Ct(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(m=>m.isRelevant(t)&&m.fileType!==".page.route").sort(pr(n,t)),o=m=>{const P=i.filter($=>$.pageId===t&&$.isEnv(m?"CLIENT_AND_SERVER":r));h(P.length<=1,`Merge the following files into a single file: ${P.map($=>$.filePath).join(" ")}`);const O=P[0];return s(O===void 0||!O.isDefaultPageFile),O},l=o(!1),a=o(!0),u=m=>i.filter(P=>P.isRendererPageFile&&P.isEnv(m?"CLIENT_AND_SERVER":r))[0],c=u(!1),d=u(!0),f=i.filter(m=>m.isDefaultPageFile&&!m.isRendererPageFile&&(m.isEnv(r)||m.isEnv("CLIENT_AND_SERVER")));return[l,a,...f,c,d].filter(jn)}function pr(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,o=0;return(l,a)=>{if(!l.isDefaultPageFile&&a.isDefaultPageFile)return r;if(!a.isDefaultPageFile&&l.isDefaultPageFile)return i;{const u=l.isRendererPageFile,c=a.isRendererPageFile;if(!u&&c)return r;if(!c&&u)return i;s(u===c)}{const u=Me(t,l.filePath),c=Me(t,a.filePath);if(u{if(o=yr(o),o in Je)return;Je[o]=!0;const l=o.endsWith(".css"),a=l?'[rel="stylesheet"]':"";if(!!r)for(let d=i.length-1;d>=0;d--){const f=i[d];if(f.href===o&&(!l||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":mr,l||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),l)return new Promise((d,f)=>{c.addEventListener("load",d),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o})},Fe={},$t={},br={},ue={},wr=[],Ot={},Sr=!0,Pr=[{pageId:"/pages/_error",isErrorPage:!0,routeFilesystem:void 0,loadConfigValuesAll:()=>Ye(()=>import("./pages_error.8b35f51e.js"),["assets/entries/pages_error.8b35f51e.js","assets/chunks/chunk-aca7cee1.js","assets/static/LayoutDefault.d4faae46.css"]),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]},{pageId:"/pages/index",isErrorPage:void 0,routeFilesystem:{routeString:"/",definedBy:"/pages/index/"},loadConfigValuesAll:()=>Ye(()=>import("./pages_index.bdac063c.js"),["assets/entries/pages_index.bdac063c.js","assets/chunks/chunk-aca7cee1.js","assets/static/LayoutDefault.d4faae46.css"]),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]}],Rr={configValuesImported:[]},vr=Object.assign({}),Er={...vr};Fe[".page"]=Er;const _r=Object.assign({}),Cr={..._r};ue[".page"]=Cr;const $r=Object.assign({}),Or={...$r};ue[".page.server"]=Or;const kr=Object.assign({}),Tr={...kr};$t[".page.route"]=Tr;const xr=Object.assign({}),Fr={...xr};Fe[".page.client"]=Fr;const Ir=Object.assign({}),Ar={...Ir};ue[".page.client"]=Ar;const jr=Object.assign({}),Lr={...jr};Ot[".page.server"]=Lr;const Nr=Object.freeze(Object.defineProperty({__proto__:null,isGeneratedFile:Sr,neverLoaded:Ot,pageConfigGlobalSerialized:Rr,pageConfigsSerialized:Pr,pageFilesEager:$t,pageFilesExportNamesEager:ue,pageFilesExportNamesLazy:br,pageFilesLazy:Fe,pageFilesList:wr},Symbol.toStringTag,{value:"Module"}));dr(Nr);function kt(){s(H())}function Hr(){kt(),Y()}function Wr(){kt()}function Ke(e){const t=e/1e3;if(t<120){const n=qe(t);return`${n} second${Xe(n)}`}{const n=t/60,r=qe(n);return`${r} minute${Xe(r)}`}}function qe(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function Xe(e){return e==="1"?"":"s"}const Br=C("utils/executeHook.ts",{userHookErrors:new Map});function ce(e,t,n){const{timeoutErr:r,timeoutWarn:i}=Vr(t);let o,l;const a=new Promise((f,g)=>{o=m=>{u(),f(m)},l=m=>{u(),g(m)}}),u=()=>{clearTimeout(c),clearTimeout(d)},c=setTimeout(()=>{R(!1,`The ${t}() hook defined by ${n} is taking more than ${Ke(i)}`,{onlyOnce:!1})},i),d=setTimeout(()=>{const f=ft(`Hook timeout: the ${t}() hook defined by ${n} didn't finish after ${Ke(r)}`);l(f)},r);return(async()=>{try{const f=await e();o(f)}catch(f){E(f)&&Br.userHookErrors.set(f,{hookName:t,hookFilePath:n}),l(f)}})(),a}function Vr(e){return e==="onBeforeRoute"?{timeoutErr:5*1e3,timeoutWarn:1*1e3}:e==="onBeforePrerender"?{timeoutErr:10*60*1e3,timeoutWarn:30*1e3}:{timeoutErr:40*1e3,timeoutWarn:4*1e3}}function Ie(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=K(t,"/");let o;return e!=null&&e.withoutHash?o=`${i}${n||""}`:o=`${i}${n||""}${r||""}`,s(o.startsWith("/")),o}Wr();function Dr(){var r,i,o,l;const e=!!((i=(r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:r.renderers)!=null&&i.size),t=!!((l=(o=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:o.rendererInterfaces)!=null&&l.size),n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}function Tt(e,t){const n=Object.keys,r=typeof e;return e&&t&&r==="object"&&r===typeof t?n(e).length===n(t).length&&n(e).every(o=>Tt(e[o],t[o])):e===t}function Ur(e,t){return E(e)&&E(t)&&e.constructor===t.constructor&&Tt({...e,stack:null},{...t,stack:null})&&t.message===t.message}function ne(e){window.location.href=e}function zr(e){return new Promise(t=>setTimeout(t,e))}function Gr(e,t){let n=!1;return()=>{n||(n=!0,setTimeout(()=>{n=!1,e()},t))}}function xt(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()})}function Mr(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function Jr(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}Hr();const Pe=C("history.ts",{});function Ft(){let e=window.history.state;e||(e={});let t=!1;"timestamp"in e||(t=!0,e.timestamp=Le()),"scrollPosition"in e||(t=!0,e.scrollPosition=je()),"triggedBy"in e||(e.triggedBy="browser"),It(e),t&&Ne(e)}function Ae(){const e=window.history.state||{};return It(e),e}function je(){return{x:window.scrollX,y:window.scrollY}}function Le(){return new Date().getTime()}function Qe(){const e=je(),t=Ae();Ne({...t,scrollPosition:e})}function Yr(e,t){if(t)Ne(Ae(),e);else{const n=Le();Kr({timestamp:n,scrollPosition:null,triggedBy:"vike"},e)}}function It(e){if(s(E(e)),"timestamp"in e){const{timestamp:t}=e;s(typeof t=="number")}if("scrollPosition"in e){const{scrollPosition:t}=e;t!==null&&s(y(t,"x","number")&&y(t,"y","number"))}}function Ne(e,t){window.history.replaceState(e,"",t??null)}function Kr(e,t){At(e,"",t)}function qr(){Pe.pushStateOriginal=Pe.pushStateOriginal??window.history.pushState,window.history.pushState=(e={},...t)=>{h(e==null||E(e),"history.pushState(state) argument state must be an object");const n={scrollPosition:je(),timestamp:Le(),...e,triggedBy:"user"};return At(n,...t)}}function At(...e){Pe.pushStateOriginal.apply(history,e)}function Xr(){const e="vike_pageContext",t=document.getElementById(e);h(t,`The element #${e} (which vike automatically injects into the HTML) is missing from the DOM. This may happen if your HTML is malformed. Make sure your HTML isn't malformed, and make sure you don't remove #${e} from the HTML nor from the DOM.`);const n=t.textContent;s(n);const r=le(n);return s(y(r,"_pageId","string")),b(r,{_hasPageContextFromServer:!0}),r}async function Qr(e,t){const r=_t(e,t).filter(o=>o.fileType===".page.server");return await Promise.all(r.map(async o=>{o.exportNames||(s(o.loadExportNames,t),await o.loadExportNames())})),{hasOnBeforeRenderServerSideOnlyHook:r.some(({exportNames:o})=>(s(o),o.includes("onBeforeRender")))}}function z(e,t){if(!(t in e.exports))return null;const n=e.exports[t],r=e.exportsAll[t][0];if(s(r.exportValue===n),n===null)return null;const i=r.filePath;return s(i),s(!i.endsWith(" ")),Zr(n,{hookName:t,hookFilePath:i}),{hookFn:n,hookName:t,hookFilePath:i}}function he(e,t){z(e,t)}function Zr(e,{hookName:t,hookFilePath:n}){s(t&&n),s(!t.endsWith(")")),h(A(e),`Hook ${t}() defined by ${n} should be a function`)}function ei(e){const t=Object.entries(e);for(const n in e)delete e[n];t.sort(([n],[r])=>An(n,r)).forEach(([n,r])=>{e[n]=r})}function ti(e){ni(e),ri(e)}function ni(e){qn(e._pageId,e._pageConfigs)&&s(y(e,"is404","boolean"))}function ri(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!E(t)){R(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const ii="not-serializable",re=C("getPageContextProxyForUser.ts",{});function oi(e){return s([!0,!1].includes(e._hasPageContextFromServer)),s([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=JSON.stringify(n);return h(r!==ii,`pageContext[${i}] couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),si(e,n),r}})}function si(e,t){if(re.prev===t||re.prev==="__v_raw"||(ui(t),t in e)||li(t))return;const n=JSON.stringify(t);e._hasPageContextFromServer&&!e._hasPageContextFromClient&&h(!1,`pageContext[${n}] isn't available on the client-side because ${n} is missing in passToClient, see https://vike.dev/passToClient`)}const ai=["then","toJSON"];function li(e){return!!(ai.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function ui(e){re.prev=e,window.setTimeout(()=>{re.prev=void 0},0)}function He(e,t){if(t){const i=e;s([!0,!1].includes(i.isHydration)),s([!0,!1,null].includes(i.isBackwardNavigation))}else{const i=e;s(i.isHydration===!0),s(i.isBackwardNavigation===null)}s("config"in e),s("configEntries"in e),s("exports"in e),s("exportsAll"in e),s("pageExports"in e),s(E(e.pageExports));const n=e.exports.Page;b(e,{Page:n}),ci(e),ei(e);const r=oi(e);return ti(e),r}function ci(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}function jt(e,t){const n=e.filter(i=>i.pageId===t);return s(n.length<=1),n[0]??null}async function fi(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll();{const{configValuesImported:r}=n,i=Se(r);Object.assign(e.configValues,i)}{const{configValuesSerialized:r}=n,i=Et(r);Object.assign(e.configValues,i)}return b(e,{isAllLoaded:!0}),e}const Lt="__whileFetchingAssets";async function ie(e,t){const n=xe(t._pageFilesAll,e),r=jt(t._pageConfigs,e);let i;const o=!1;try{i=(await Promise.all([r&&fi(r,o),...n.map(m=>{var P;return(P=m.loadFile)==null?void 0:P.call(m)})]))[0]}catch(g){throw di(g)&&Object.assign(g,{[Lt]:!0}),g}const{config:l,configEntries:a,exports:u,exportsAll:c,pageExports:d}=Mn(n,i);return{config:l,configEntries:a,exports:u,exportsAll:c,pageExports:d,_pageFilesLoaded:n}}function We(e){return e?e[Lt]===!0:!1}function di(e){return e instanceof Error?["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed","error resolving module specifier","failed to resolve module"].some(n=>e.message.toLowerCase().includes(n.toLowerCase())):!1}const Ze=["urlPathname","urlParsed"],gi=["Page","pageExports","exports"];function Nt(e){[...gi,...Ze].forEach(n=>{n in e&&(Ze.includes(n)?(s(n.startsWith("url")),R(!1,`pageContext.${n} is already available in the browser when using Client Routing; adding '${n}' to passToClient has no effect`,{onlyOnce:!0})):R(!1,`pageContext.${n} is a built-in that cannot be overriden; adding '${n}' to passToClient has no effect`,{onlyOnce:!0}),delete e[n])})}const hi="/";function pi(e,t,n){const{pathnameOriginal:r,searchOriginal:i,hashOriginal:o}=K(e,hi);e.startsWith("/")&&s(e===`${r}${i||""}${o||""}`,{url:e});const l=r.endsWith("/");let a;return n&&r!=="/"?(l?a=x(r,0,-1):a=r,s(!a.endsWith("/"),{url:e}),s(a!=="")):a=r+(l?"":"/")+"index",s(a),a=a+t,`${a}${i||""}${o||""}`}const mi=".pageContext.json",yi=!1;function bi(e){return pi(e,mi,yi)}function Ht(e,{hookName:t,hookFilePath:n}){if(e==null)return;s(!t.endsWith(")"));const r=`The ${p.cyan("pageContext")} object provided by the ${t}() hook defined by ${n}`;h(E(e),`${r} should be an object (but it's ${p.cyan(`typeof pageContext === ${JSON.stringify(typeof e)}`)} instead)`),h(!("_objectCreatedByVike"in e),`${r} shouldn't be the whole ${p.cyan("pageContext")} object, see https://vike.dev/pageContext-manipulation#do-not-return-entire-pagecontext`),R(!("_pageId"in e),`${r} sets ${p.cyan("pageContext._pageId")} which means that Vike's routing is overriden. This is an experimental feature: make sure to contact a vike maintainer before using this.`,{onlyOnce:!0}),h(!("is404"in e),`${r} sets ${p.cyan("pageContext.is404")} which is forbidden, use ${p.cyan("throw render()")} instead, see https://vike.dev/render`)}function wi(e,t,n){s(!n.endsWith(" "));const r=[],i=Object.keys(e);for(const o of i)t.includes(o)||r.push(o);h(r.length===0,[n,"returned an object with following unknown keys:",Ue(r)+".","Only following keys are allowed:",Ue(t)+"."].join(" "))}function Si(e,t){if(e==null)return;const n=`The onBeforeRender() hook defined by ${t}`;h(I(e),`${n} should return a plain JavaScript object, ${p.cyan("undefined")}, or ${p.cyan("null")}`),wi(e,["pageContext"],n),e.pageContext&&Ht(e.pageContext,{hookName:"onBeforeRender",hookFilePath:t})}function Pi(e,t){if(!I(e))return!1;for(const n of Object.keys(e))if(!t.includes(n))return!1;return!0}function Ri(e){return typeof e=="object"&&e!==null&&Object.values(e).every(t=>typeof t=="string")}function vi(e,t,n=r=>r){if(s(e.length>0),e.length===1)return n(e[0]);const r=e.slice(0,e.length-1),i=e[e.length-1];return r.map(n).join(", ")+` ${t} `+n(i)}H()&&Y();async function Ei(e,t){let n;if(e._pageFilesAll.length>0?(s(e._pageConfigs.length===0),n=_i(e._pageId,e._pageFilesAll)):n=z(e,"guard"),!n)return;const r=n.hookFn;let i=e;const o=t(e);o&&(i=o);const l=await ce(()=>r(i),"guard",n.hookFilePath);h(l===void 0,`The guard() hook of ${n.hookFilePath} returns a value, but guard() doesn't accept any return value`)}function _i(e,t){const n=t.find(a=>a.pageId===e&&a.fileType===".page.route");if(!n)return null;const{filePath:r,fileExports:i}=n;s(i);const o=i.guard;if(!o)return null;const l=r;return h(A(o),`guard() defined by ${l} should be a function`),{hookFn:o,hookName:"guard",hookFilePath:l}}function Ci(e){const t=new Error("AbortRender");return b(t,{_pageContextAbort:e,[Wt]:!0}),t}const Wt="_isAbortError";function et(e){return typeof e=="object"&&e!==null&&Wt in e}function $i(e){return e._urlRewrite||e._urlRedirect||e.abortStatusCode?(s(y(e,"_abortCall","string")),!0):!1}function Oi(e,t,n){if(t)return;const r=n._urlRewrite??n.urlOriginal;s(r);const i=e._pageContextAbort._abortCall;Oe(!1,`${p.cyan(i)} intercepted while rendering ${p.cyan(r)}`,{onlyOnce:!1})}function ki(e){Ti(e);const t={_urlRewrite:null};return e.forEach(n=>{Object.assign(t,n)}),t}function Ti(e){const t=[];e.forEach(n=>{const r=n._urlRewrite;{const i=t.indexOf(r);if(i!==-1){const o=[...t.slice(i),r].map(l=>`render('${l}')`).join(" => ");h(!1,`Infinite loop of render() calls: ${o}`)}}t.push(r)})}function xi(e,t){const n=[e>0&&p.cyan("throw render('/some-url')"),t>0&&p.cyan("throw redirect('/some-url')")].filter(Boolean).join(" and ");h(e+t<=7,`Maximum chain length of 7 ${n} exceeded. Did you define an infinite loop of ${n}?`)}const Bt=C("router/getPageContext.ts",{});async function Fi(e){const t=Xr();Nt(t),b(t,{isHydration:!0,_hasPageContextFromClient:!1}),b(t,await ie(t._pageId,e));{const n={...e,...t};if(await Ni(n)){const r=await Dt(n);b(t,r)}}return Ut(t),t}async function Ii(e){const t=Pt(e._pageFilesAll,e._pageConfigs);if(!t)throw new Error("No error page defined.");const n={isHydration:!1,_pageId:t};return b(n,await Vt({...e,...n},!0)),n}async function Ai(e){const t={isHydration:!1,_pageId:e._pageId};return b(t,await Vt({...e,...t},!1)),Ut(t),t}async function Vt(e,t){let n={};if(b(n,await ie(e._pageId,e)),!t&&await ji({...e,...n})){const r=await Hi(e);if(!r._isError)b(n,r);else{const i=Pt(e._pageFilesAll,e._pageConfigs);s(i),n={},b(n,{isHydration:!1,_pageId:i}),b(n,await ie(n._pageId,e)),s(y(r,"is404","boolean")),s(y(r,"pageProps","object")),s(y(r.pageProps,"is404","boolean")),s(!("serverSideError"in r)),b(n,r)}}else b(n,{_hasPageContextFromServer:!1}),t||await Ei({_hasPageContextFromClient:!1,...e,...n},r=>He(r,!0));{const r=await Dt({...e,...n});b(n,r)}return n}async function Dt(e){const t=z(e,"onBeforeRender");if(!t)return{_hasPageContextFromClient:!1};const n=t.hookFn,r={_hasPageContextFromClient:!0},i=He({...e,...r},!0),o=await ce(()=>n(i),"onBeforeRender",t.hookFilePath);Si(o,t.hookFilePath);const l=o==null?void 0:o.pageContext;return b(r,l),r}function Ut(e){e._pageContextInitHasClientData&&(Bt.pageContextInitHasClientData=!0)}async function ji(e){return!!Bt.pageContextInitHasClientData||await Li(e)}async function Li(e){var t;if(e._pageConfigs.length>0){const n=wt(e._pageId,e._pageConfigs),r=((t=B(n,"onBeforeRenderEnv"))==null?void 0:t.value)??{};return s(E(r)),!!r.server&&!r.client}else{const{hasOnBeforeRenderServerSideOnlyHook:n}=await Qr(e._pageFilesAll,e._pageId);return n}}async function Ni(e){var t;if(e._pageConfigs.length>0){const n=wt(e._pageId,e._pageConfigs),r=((t=B(n,"onBeforeRenderEnv"))==null?void 0:t.value)??{};return s(E(r)),!!r.client&&!r.server}else return!1}async function Hi(e){const t=bi(e._urlRewrite??e.urlOriginal),n=await fetch(t);{const o=n.headers.get("content-type"),l="application/json",a=o&&o.includes(l);if(!a&&n.status===404)throw ne(e.urlOriginal),Bi();h(a,`Wrong Content-Type for ${t}: it should be ${l} but it's ${o} instead. Make sure to properly use pageContext.httpResponse.headers, see https://vike.dev/renderPage`)}const r=await n.text(),i=le(r);if(s(E(i)),"serverSideError"in i)throw ft("The pageContext object couldn't be fetched from the server as an error occurred on the server-side. Check your server logs.");if($i(i))throw Ci(i);return s(y(i,"_pageId","string")),Nt(i),b(i,{_hasPageContextFromServer:!0}),i}function Wi(e){return E(e)&&!!e._alreadyServerSideRouted}function Bi(){const e=new Error("Page doesn't exist");return Object.assign(e,{_alreadyServerSideRouted:!0}),e}function zt(e,t=!0){s(e.urlOriginal),"urlPathname"in e&&(s(typeof e.urlPathname=="string"),s(ge(e,"urlPathname"))),"urlParsed"in e&&s(ge(e,"urlParsed")),"url"in e&&s(ge(e,"url")),Object.defineProperty(e,"urlPathname",{get:Mt,enumerable:t,configurable:!0}),Object.defineProperty(e,"url",{get:Vi,enumerable:!1,configurable:!0}),Object.defineProperty(e,"urlParsed",{get:Di,enumerable:t,configurable:!0})}function Gt(e){let t=e._urlHandler;t||(t=i=>i);let n=e._urlRewrite??e.urlLogical??e.urlOriginal;n=t(n);const r=e._baseServer;return s(n&&typeof n=="string"),s(r.startsWith("/")),K(n,r)}function Mt(){const{pathname:e}=Gt(this),t=e;return s(t.startsWith("/")),t}function Vi(){return R(!1,"`pageContext.url` is outdated. Use `pageContext.urlPathname`, `pageContext.urlParsed`, or `pageContext.urlOriginal` instead. (See https://vike.dev/migration/0.4.23 for more information.)",{onlyOnce:!0,showStackTrace:!0}),Mt.call(this)}function Di(){const e=Gt(this),{origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:l,hash:a,hashOriginal:u}=e,c=H(),d=g=>{R(c,`pageContext.urlParsed.${g} isn't available on the server-side (HTTP requests don't include the URL hash by design)`,{onlyOnce:!0,showStackTrace:!0})},f={origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:l,get hash(){return d("hash"),a},get hashOriginal(){return d("hashOriginal"),u},get hashString(){return R(!1,"pageContext.urlParsed.hashString has been renamed to pageContext.urlParsed.hashOriginal",{onlyOnce:!0,showStackTrace:!0}),d("hashString"),u},get searchString(){return R(!1,"pageContext.urlParsed.searchString has been renamed to pageContext.urlParsed.searchOriginal",{onlyOnce:!0,showStackTrace:!0}),l}};return Q(f,"hashString"),Q(f,"searchString"),c||(Q(f,"hash"),Q(f,"hashOriginal")),f}function Q(e,t){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(e,t,{...n,enumerable:!1})}function Ui(e){s(typeof e.urlOriginal=="string"),s(typeof e.urlPathname=="string"),s(I(e.urlParsed)),s(e.urlPathname===e.urlParsed.pathname)}function zi(e,t){const r=t.filter(({filesystemRoot:o})=>e.startsWith(o)).sort(te(({filesystemRoot:o})=>o.length))[0];let i;if(r){const{filesystemRoot:o,urlRoot:l}=r,a={pageId:e,filesystemRoot:o,urlRoot:l};s(l.startsWith("/")&&e.startsWith("/")&&o.startsWith("/"),a),s(e.startsWith(o),a),o!=="/"?(s(!o.endsWith("/"),a),i=x(e,o.length,0)):i=e,s(i.startsWith("/"),a),i=l+(l.endsWith("/")?"":"/")+x(i,1,0)}else i=e;return s(i.startsWith("/")),i=i.split("/").filter(o=>o!=="pages"&&o!=="src"&&o!=="index").join("/"),s(!i.includes(".page.")),s(!i.endsWith(".")),i.endsWith("/index")&&(i=x(i,0,-6)),i===""&&(i="/"),s(i.startsWith("/")),s(!i.endsWith("/")||i==="/"),i}async function Gi(e,t,n){Ui(t);let r=e(t);if(Jt(r,`The Route Function ${n}`),r=await r,r===!1)return null;if(r===!0&&(r={}),h(I(r),`The Route Function ${n} should return a boolean or a plain JavaScript object (but it's ${p.cyan(`typeof result === ${JSON.stringify(typeof r)}`)} instead)`),"match"in r){const{match:l}=r;if(h(typeof l=="boolean",`The ${p.cyan("match")} value returned by the Route Function ${n} should be a boolean.`),!l)return null}let i=null;"precedence"in r&&(i=r.precedence,h(typeof i=="number",`The ${p.cyan("precedence")} value returned by the Route Function ${n} should be a number.`)),Yt(r,`The ${p.cyan("routeParams")} object returned by the Route Function ${n} should`);const o=r.routeParams||{};return h(!("pageContext"in r),`Providing ${p.cyan("pageContext")} in Route Functions is prohibited, see https://vike.dev/route-function#cannot-provide-pagecontext`),s(I(o)),Object.keys(r).forEach(l=>{h(l==="match"||l==="routeParams"||l==="precedence",`The Route Function ${n} returned an object with an unknown property ${p.cyan(l)} (the known properties are ${p.cyan("match")}, ${p.cyan("routeParams")}, and ${p.cyan("precedence")})`)}),{precedence:i,routeParams:o}}function Jt(e,t){R(!Ln(e),`${t} returned a promise, but asynchronous routing is deprecated and will be removed in the next major release, see https://vike.dev/route-function#async`,{onlyOnce:!0})}function tt(){const e=p.cyan("iKnowThePerformanceRisksOfAsyncRouteFunctions");R(!1,`${e} is deprecated and will be removed in the next major release`,{onlyOnce:!0})}function Yt(e,t){s(t.endsWith(" should")),y(e,"routeParams")&&(s(t.endsWith(" should")),h(I(e.routeParams),`${t} be a plain JavaScript object.`),h(Ri(e.routeParams),`${t} only hold string values.`))}async function Mi(e,t,n,r){await Promise.all(e.filter(a=>a.fileType===".page.route").map(a=>{var u;return(u=a.loadFile)==null?void 0:u.call(a)}));const{onBeforeRouteHook:i,filesystemRoots:o}=Yi(e,t,n);return{pageRoutes:Ji(o,e,t,r),onBeforeRouteHook:i}}function Ji(e,t,n,r){const i=[];let o=[...r];if(n.length>0){s(e===null);const l=!0;n.filter(a=>!a.isErrorPage).forEach(a=>{const u=a.pageId;o=qi(o,u);let c=null;{const d="route",f=B(a,d);if(f){const g=f.value,m=bt(f.definedAt,d);typeof g=="string"?c={pageId:u,comesFromV1PageConfig:l,routeString:g,routeDefinedAt:m,routeType:"STRING"}:(s(A(g)),B(a,"iKnowThePerformanceRisksOfAsyncRouteFunctions","boolean")&&tt(),c={pageId:u,comesFromV1PageConfig:l,routeFunction:g,routeDefinedAt:m,routeType:"FUNCTION"})}}if(!c){const{routeFilesystem:d}=a;s(d);const{routeString:f,definedBy:g}=d;s(d.routeString.startsWith("/")),c={pageId:u,routeFilesystemDefinedBy:g,comesFromV1PageConfig:l,routeString:f,routeDefinedAt:null,routeType:"FILESYSTEM"}}s(c),i.push(c)})}if(n.length===0){s(e);const l=!1;o.filter(a=>!q(a)).forEach(a=>{const u=t.find(c=>c.pageId===a&&c.fileType===".page.route");if(!u||!("default"in u.fileExports)){const c=zi(a,e);s(c.startsWith("/")),s(!c.endsWith("/")||c==="/"),i.push({pageId:a,comesFromV1PageConfig:l,routeString:c,routeDefinedAt:null,routeFilesystemDefinedBy:`${a}.page.*`,routeType:"FILESYSTEM"})}else{const{filePath:c,fileExports:d}=u;if(s(d.default),y(d,"default","string")){const f=d.default;h(f.startsWith("/"),`A Route String should start with a leading slash '/' but ${c} has \`export default '${f}'\`. Make sure to \`export default '/${f}'\` instead.`),i.push({pageId:a,comesFromV1PageConfig:l,routeString:f,routeDefinedAt:c,routeType:"STRING"});return}if(y(d,"default","function")){const f=d.default;"iKnowThePerformanceRisksOfAsyncRouteFunctions"in d&&tt(),i.push({pageId:a,comesFromV1PageConfig:l,routeFunction:f,routeDefinedAt:c,routeType:"FUNCTION"});return}h(!1,`The default export of ${c} should be a string or a function.`)}})}return i}function Yi(e,t,n){var o;if(t.length>0){const l="onBeforeRoute";if((o=n.configValues[l])!=null&&o.value){const a=n.configValues[l],{value:u}=a,c=Gn(a),d=ae("Hook",l,a);return h(A(u),`${d} should be a function.`),{onBeforeRouteHook:{hookFilePath:c,onBeforeRoute:u},filesystemRoots:null}}return{onBeforeRouteHook:null,filesystemRoots:null}}let r=null;const i=[];return e.filter(l=>l.fileType===".page.route"&&l.isDefaultPageFile).forEach(({filePath:l,fileExports:a})=>{if(s(a),"onBeforeRoute"in a){h(y(a,"onBeforeRoute","function"),`\`export { onBeforeRoute }\` of ${l} should be a function.`);const{onBeforeRoute:u}=a;r={hookFilePath:`${l} > \`export { onBeforeRoute }\``,onBeforeRoute:u}}"filesystemRoutingRoot"in a&&(h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${l} should be a string.`),h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${l} is \`'${a.filesystemRoutingRoot}'\` but it should start with a leading slash \`/\`.`),i.push({filesystemRoot:Ki(l),urlRoot:a.filesystemRoutingRoot}))}),{onBeforeRouteHook:r,filesystemRoots:i}}function Ki(e){s(e.startsWith("/")),s(!e.endsWith("/"));const t=e.split("/"),n=x(t,0,-1).join("/")||"/";return s(n.startsWith("/")),s(!n.endsWith("/")||n==="/"),n}function qi(e,t){const{length:n}=e;return e=e.filter(r=>r!==t),s(e.length===n-1),e}function Kt(){const e="/";return s(Xi(e)),e}function Xi(e){return e.startsWith("/")}const pe=C("createPageContext.ts",{});async function qt(e){pe.pageFilesData||(pe.pageFilesData=await gr(!0));const{pageFilesAll:t,allPageIds:n,pageConfigs:r,pageConfigGlobal:i}=pe.pageFilesData,{pageRoutes:o,onBeforeRouteHook:l}=await Mi(t,r,i,n),a=Kt();s(Te(a));const c={urlOriginal:e,_objectCreatedByVike:!0,_urlHandler:null,_urlRewrite:null,_baseServer:a,_isProduction:!0,_pageFilesAll:t,_pageConfigs:r,_pageConfigGlobal:i,_allPageIds:n,_pageRoutes:o,_onBeforeRouteHook:l};return zt(c),c}function Xt(e){const t=e.getAttribute("href");return!!(t===null||t===""||Jr(t)||Zi(e)||eo(t)||!to(t)||!ke(t)||!Qi(e))}function Qi(e){if(no()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function Zi(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function eo(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function to(e){const t=Kt();s(Te(t));const{hasBaseServer:n}=K(e,t);return n}function no(){return!!window._disableAutomaticLinkInterception}function ro(e,t){let n=io(e,t);return n==="viewport"&&!e._isProduction&&(Oe(!1,"Viewport prefetching is disabled in development",{onlyOnce:!0}),n="hover"),{prefetchStaticAssets:n}}function io(e,t){{const n=oo(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&h(!1,"`export { prefetchLinks }` is deprecated, use `export { prefetchStaticAssets }` instead."),"prefetchStaticAssets"in e.exports){const{prefetchStaticAssets:n}=e.exports;if(n===!1)return!1;if(n==="hover")return"hover";if(n==="viewport")return"viewport";const r="prefetchStaticAssets value should be false, 'hover', or 'viewport'";h(I(n),r);const i=Object.keys(n);h(i.length===1&&i[0]==="when",r);const{when:o}=n;if(o==="HOVER"||o==="VIEWPORT"){const l=o.toLowerCase();return R(!1,`prefetchStaticAssets value \`{ when: '${o}' }\` is outdated: set prefetchStaticAssets to '${l}' instead`,{onlyOnce:!0}),l}h(!1,r)}return"hover"}function oo(e){const t=e.getAttribute("data-prefetch-static-assets"),n=e.getAttribute("data-prefetch");if(t===null&&n===null)return null;const r="The attribute data-prefetch is outdated, use data-prefetch-static-assets instead.";if(t){if(h(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;h(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(s(!t),R(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";h(!1,`data-prefetch has value "${n}" but it should instead be "true" or "false"`)}s(!1)}const Qt=new Map;function so(e){const t=Zt(e);return Qt.has(t)}function ao(e){const t=Zt(e);Qt.set(t,!0)}function Zt(e){return K(e,"/").pathname}function U(e){return e.fileType===".css"?[]:e.exportNames?e.exportNames:(s(e.fileExports,e.filePath),Object.keys(e.fileExports))}function lo({pageFilesClientSide:e,pageFilesServerSide:t,pageId:n}){return{isHtmlOnly:r(),isClientRouting:o()};function r(){return t.some(a=>a.pageId===n&&a.fileType===".page")?(i(),!1):!(!t.some(a=>a.pageId===n&&a.fileType===".page.server")||e.some(a=>a.pageId===n&&a.fileType===".page.client"&&U(a).includes("render")))}function i(){const l=e.some(a=>U(a).includes("render"));h(l,["No client-side `render()` hook found.","See https://vike.dev/render-modes for more information.",["Loaded client-side page files (none of them `export { render }`):",...e.map((a,u)=>` (${u+1}): ${a.filePath}`)].join(` +`)].join(" "))}function o(){return e.some(a=>U(a).includes("clientRouting"))}}function uo({pageFilesClientSide:e,pageFilesServerSide:t,isHtmlOnly:n,isClientRouting:r}){let i=[];const o=t.filter(a=>!e.includes(a)),l=[];if(l.push(...e.map(a=>({id:a.filePath,onlyAssets:!1,eagerlyImported:!1}))),l.push(...o.map(a=>({id:a.filePath,onlyAssets:!0,eagerlyImported:!1}))),n)i=e.map(a=>a.filePath);else{const a=co(r);l.push({id:a,onlyAssets:!1,eagerlyImported:!1}),i=[a]}return{clientEntries:i,clientDependencies:l}}function co(e){return e?"@@vike/dist/esm/client/client-routing-runtime/entry.js":"@@vike/dist/esm/client/server-routing-runtime/entry.js"}function fo(e,t){let n=xe(e,t);const r=_t(e,t),{isHtmlOnly:i,isClientRouting:o}=lo({pageFilesClientSide:n,pageFilesServerSide:r,pageId:t});i&&(n=n.filter(u=>u.isEnv("CLIENT_ONLY")&&!U(u).includes("render")),n=ho(n));const{clientEntries:l,clientDependencies:a}=uo({pageFilesClientSide:n,pageFilesServerSide:r,isHtmlOnly:i,isClientRouting:o});return{isHtmlOnly:i,isClientRouting:o,clientEntries:l,clientDependencies:a,pageFilesClientSide:n,pageFilesServerSide:r}}async function go(e,t,{sharedPageFilesAlreadyLoaded:n}){const r=xe(e,t);await Promise.all(r.map(async i=>{var o;s(i.isEnv("CLIENT_ONLY")||i.isEnv("CLIENT_AND_SERVER")),!(n&&i.isEnv("CLIENT_AND_SERVER"))&&await((o=i.loadExportNames)==null?void 0:o.call(i))}))}function ho(e){const t=[];for(const n of e)if(t.push(n),U(n).includes("overrideDefaultPages"))break;return t}function po(e,t,n){var r,i;if(e){const o=((r=B(e,"clientRouting","boolean"))==null?void 0:r.value)??!1;return{isClientSideRenderable:((i=B(e,"isClientSideRenderable","boolean"))==null?void 0:i.value)??!1,isClientRouting:o}}else{const{isHtmlOnly:o,isClientRouting:l}=fo(t,n);return{isClientSideRenderable:!o,isClientRouting:l}}}async function en(e,t){await go(t._pageFilesAll,e,{sharedPageFilesAlreadyLoaded:!1});const n=jt(t._pageConfigs,e),{isClientSideRenderable:r,isClientRouting:i}=po(n,t._pageFilesAll,e);return r&&i}const tn="@",Re=":";function mo(e,t="Invalid"){let n=`${t} Route String ${L(e)}`;h(e!=="",`${n} (empty string): set it to ${L("/")} instead`),h(["/","*"].includes(e[0]),`${n}: it should start with ${L("/")} or ${L("*")}`),h(!e.includes("**"),`${n}: set it to ${L(e.split("**").join("*"))} instead`)}function ve(e,t){mo(e);const n=nn(e),r=n.map(f=>f.param?"[^/]+":f.glob?f.isLastDir?"|/.*":".*":Hn(f.static)).map(f=>`(${f})`).join(""),i=new RegExp(`^${r}/?$`),o=t.match(i);if(!o)return null;const l={},[a,...u]=o;let c=0;const d=n.filter(f=>f.glob).length>1;return n.forEach((f,g)=>{let m=u[g];if(f.param&&(l[f.param]=m),f.glob){const P=`*${d?++c:""}`;f.isLastDir&&(m=m.slice(1)),l[P]=m}}),{routeParams:l}}function nn(e){const t=[],n=i=>{const o=t[t.length-1];o!=null&&o.static?o.static+=i:t.push({static:i})},r=e.split("/");return r.forEach((i,o)=>{const l=o===0,a=o===r.length-1;yo(i)?(R(!i.startsWith(Re),`Outdated Route String ${L(e)}, use ${L(e.split(Re).join(tn))} instead`,{onlyOnce:!0}),l||n("/"),t.push({param:i.slice(1)})):i==="*"&&a&&e!=="*"&&e!=="/*"?t.push({glob:!0,isLastDir:!0}):(l||n("/"),i.split("*").forEach((u,c)=>{c!==0&&t.push({glob:!0}),u!==""&&n(u)}))}),t}function Z(e){const t=nn(e),n=a=>(a==null?void 0:a.split("/").filter(Boolean).length)||0;let r=0;for(const a of t){if(!a.static)break;r+=n(a.static)}const i=t.map(a=>n(a.static)).reduce((a,u)=>a+u,0),o=t.filter(a=>a.param).length,l=t.filter(a=>a.glob).length;return{numberOfStaticPartsBeginning:r,numberOfStaticParts:i,numberOfParams:o,numberOfGlobs:l}}function yo(e){return e.startsWith(tn)||e.startsWith(Re)}function nt(e){const n=ve(e,e);return s(n),Object.keys(n.routeParams).length===0}function L(e){return H()?`'${e}'`:(e===""&&(e="''"),p.cyan(e))}function bo(e){e.sort(wo).sort(j(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence<0)).sort(j(t=>t.routeType==="STRING"&&nt(t.routeString)===!1)).sort(j(t=>t.routeType==="FUNCTION"&&!t.precedence)).sort(j(t=>t.routeType==="STRING"&&nt(t.routeString)===!0)).sort(j(t=>t.routeType==="FILESYSTEM")).sort(j(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence>0))}function wo(e,t){{const n=e.precedence??0,r=t.precedence??0;if(n!==r)return n>r?-1:1}if(!t.routeString||!e.routeString)return 0;{const r=te(i=>Z(i).numberOfStaticPartsBeginning)(e.routeString,t.routeString);if(r!==0)return r}{const r=te(i=>Z(i).numberOfStaticParts)(e.routeString,t.routeString);if(r!==0)return r}{const r=Fn(i=>Z(i).numberOfGlobs)(e.routeString,t.routeString);if(r!==0)return r}{const r=te(i=>Z(i).numberOfParams)(e.routeString,t.routeString);if(r!==0)return r}return 0}async function So(e){const t={};if(!e._onBeforeRouteHook)return null;const n=await Po(e._onBeforeRouteHook,e);return n&&(b(t,n),y(t,"_pageId","string")||y(t,"_pageId","null"))?(y(t,"routeParams")?s(y(t,"routeParams","object")):b(t,{routeParams:{}}),b(t,{_routingProvidedByOnBeforeRouteHook:!0,_debugRouteMatches:"CUSTOM_ROUTING"}),t):(b(t,{_routingProvidedByOnBeforeRouteHook:!1}),t)}async function Po(e,t){let n=e.onBeforeRoute(t);Jt(n,`The onBeforeRoute() hook ${e.hookFilePath}`),n=await n;const r=`The onBeforeRoute() hook defined by ${e.hookFilePath}`;if(h(n==null||Pi(n,["pageContext"])&&y(n,"pageContext"),`${r} should return ${p.cyan("null")}, ${p.cyan("undefined")}, or a plain JavaScript object ${p.cyan("{ pageContext: { /* ... */ } }")}`),n==null)return null;if(h(y(n,"pageContext","object"),`${r} returned ${p.cyan("{ pageContext }")} but pageContext should be a plain JavaScript object.`),y(n.pageContext,"_pageId")&&!y(n.pageContext,"_pageId","null")){const l=`${r} returned ${p.cyan("{ pageContext: { _pageId } }")} but ${p.cyan("_pageId")} should be`;h(y(n.pageContext,"_pageId","string"),`${l} a string or null`),h(t._allPageIds.includes(n.pageContext._pageId),`${l} ${vi(t._allPageIds.map(a=>p.cyan(a)),"or")}`)}y(n.pageContext,"routeParams")&&Yt(n.pageContext,`${r} returned ${p.cyan("{ pageContext: { routeParams } }")} but routeParams should`);const i=l=>`${r} returned ${p.cyan(`{ pageContext: { ${l} } }`)} which is deprecated. Return ${p.cyan("{ pageContext: { urlLogical } }")} instead.`;y(n.pageContext,"url")&&(R(!1,i("url"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.url,delete n.pageContext.url),y(n.pageContext,"urlOriginal")&&(R(!1,i("urlOriginal"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.urlOriginal,delete n.pageContext.urlOriginal),y(n.pageContext,"urlLogical")&&En(n.pageContext.urlLogical,`${r} returned ${p.cyan("{ pageContext: { urlLogical } }")} but ${p.cyan("urlLogical")}`),Ht(n.pageContext,{hookFilePath:e.hookFilePath,hookName:"onBeforeRoute"});const o={};return b(o,n.pageContext),o}var ee;function rt(...e){var t;ee||(ee=(t=globalThis.__brillout_debug_createDebugger)==null?void 0:t.call(globalThis,"vike:routing")),ee&&ee(...e)}H()&&Y();async function rn(e){rt("Pages routes:",e._pageRoutes),zt(e);const t={},n=await So(e);if(n){if(n._routingProvidedByOnBeforeRouteHook)return s(n._pageId),n;b(t,n)}const r={};b(r,e),b(r,n);const i=r._allPageIds;s(i.length>=0),h(r._pageFilesAll.length>0||r._pageConfigs.length>0,"No *.page.js file found. You must create at least one *.page.js file."),h(i.length>0,"You must create at least one *.page.js file that isn't _default.page.*");const{urlPathname:o}=r;s(o.startsWith("/"));const l=[];await Promise.all(r._pageRoutes.map(async u=>{const{pageId:c,routeType:d}=u;if(u.routeType==="FILESYSTEM"){const{routeString:f}=u,g=ve(f,o);if(g){const{routeParams:m}=g;l.push({pageId:c,routeParams:m,routeString:f,routeType:d})}return}if(u.routeType==="STRING"){const{routeString:f}=u,g=ve(f,o);if(g){const{routeParams:m}=g;s(d==="STRING"),l.push({pageId:c,routeString:f,routeParams:m,routeType:d})}return}if(u.routeType==="FUNCTION"){const{routeFunction:f,routeDefinedAt:g}=u,m=await Gi(f,r,g);if(m){const{routeParams:P,precedence:O}=m;l.push({pageId:c,precedence:O,routeParams:P,routeType:d})}return}s(!1)})),bo(l);const a=l[0];if(rt(`Route matches for URL ${p.cyan(o)} (in precedence order):`,l),b(t,{_debugRouteMatches:l}),!a)return b(t,{_pageId:null,routeParams:{}}),t;{const{routeParams:u}=a;s(I(u)),b(t,{_pageId:a.pageId,routeParams:a.routeParams})}return t}Y();const it=C("prefetch.ts",{linkPrefetchHandlerAdded:new Map});async function Ro(e,t){try{await ie(e,t)}catch(n){if(We(n))Ee(n,!0);else throw n}}function vo(e){ao(e.urlPathname),[...document.getElementsByTagName("A")].forEach(n=>{if(it.linkPrefetchHandlerAdded.has(n))return;it.linkPrefetchHandlerAdded.set(n,!0);const r=n.getAttribute("href");if(Xt(n)||(s(r),so(r)))return;const{prefetchStaticAssets:i}=ro(e,n);if(i&&(i==="hover"&&(n.addEventListener("mouseover",()=>{me(r)}),n.addEventListener("touchstart",()=>{me(r)},{passive:!0})),i==="viewport")){const o=new IntersectionObserver(l=>{l.forEach(a=>{a.isIntersecting&&(me(r),o.disconnect())})});o.observe(n)}})}async function me(e){const t=await qt(e);let n;try{n=await rn(t)}catch{return}n!=null&&n._pageId&&await en(n._pageId,t)&&await Ro(n._pageId,t)}async function Eo(e,t){const n=He(e,t);let r=null,i;r=z(e,"render"),i="render";{const a=z(e,"onRenderClient");a&&(r=a,i="onRenderClient")}if(!r){const a=_o(e);if(s(a),e._pageConfigs.length>0)h(!1,`No onRenderClient() hook defined for URL '${a}', but it's needed, see https://vike.dev/onRenderClient`);else{const u=e._pageFilesLoaded.filter(d=>d.fileType===".page.client");let c;u.length===0?c="No file `*.page.client.*` found for URL "+a:c="One of the following files should export a render() hook: "+u.map(d=>d.filePath).join(" "),h(!1,c)}}s(r);const o=r.hookFn;s(i);const l=await ce(()=>o(n),i,r.hookFilePath);h(l===void 0,`The ${i}() hook defined by ${r.hookFilePath} isn't allowed to return a value`)}function _o(e){let t;try{t=e.urlPathname??e.urlOriginal}catch{}return t=t??window.location.href,t}function on(e){if(e==="preserve-scroll")return;let t;if(e==="scroll-to-top-or-hash"){const n=$o();if(n&&n!=="top"){const r=document.getElementById(n)||document.getElementsByName(n)[0];if(r){r.scrollIntoView();return}}t={x:0,y:0}}else s("x"in e&&"y"in e),t=e;Co(t)}function Co(e){const t=()=>window.scrollTo(e.x,e.y),n=()=>window.scrollX===e.x&&window.scrollY===e.y;n()||(t(),!n()&&requestAnimationFrame(()=>{t(),!n()&&setTimeout(async()=>{if(t(),n())return;const r=new Date().getTime();for(;;)if(await zr(10),t(),n()||new Date().getTime()-r>100)return},0)}))}function $o(){let{hash:e}=window.location;return e===""?null:(s(e.startsWith("#")),e=e.slice(1),e)}function Oo(){window.addEventListener("scroll",Gr(Qe,Math.ceil(1e3/3)),{passive:!0}),xt(Qe)}const W=C("onBrowserHistoryNavigation.ts",{previousState:oe()});function ko(){window.addEventListener("popstate",()=>{const e=oe(),t=e.historyState.scrollPosition||"scroll-to-top-or-hash",n=e.historyState.triggedBy==="user",r=e.urlWithoutHash===W.previousState.urlWithoutHash,i=!e.historyState.timestamp||!W.previousState.historyState.timestamp?null:e.historyState.timestampsn.initialRenderIsDone&&Be())}function Fo(){sn.initialRenderIsDone=!0}function Be(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual")}function ot(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto")}const S=C("renderPageClientSide.ts",{renderCounter:0});async function G(e){var D,Ve;const{scrollTarget:t,urlOriginal:n=Ie(),overwriteLastHistoryEntry:r=!1,isBackwardNavigation:i,pageContextsFromRewrite:o=[],redirectCount:l=0,isUserLandPushStateNavigation:a,isClientSideNavigation:u=!0}=e,{abortRender:c,setHydrationCanBeAborted:d,isFirstRender:f}=jo();if(s(u===!f),xi(o.length,l),S.clientRoutingIsDisabled){ne(n);return}const g=await qt(n);if(c())return;b(g,{isBackwardNavigation:i,isClientSideNavigation:u});{const w=ki(o);b(g,w)}let m={};const P=w=>{s(w),s(!("err"in m)),s(!("errorWhileRendering"in g)),m.err=w,g.errorWhileRendering=w};if(!f){try{m={pageContextFromRoute:await rn(g)}}catch(w){P(w)}if(c())return;if(m.pageContextFromRoute){const{pageContextFromRoute:w}=m;b(g,w);let _;if(!w._pageId)_=!1;else if(_=await en(w._pageId,g),c())return;if(!_){ne(n);return}const k=w._pageId&&((D=S.previousPageContext)==null?void 0:D._pageId)&&w._pageId===S.previousPageContext._pageId;if(a&&k)return}}const O=!f;if(O&&!S.isTransitioning&&(await((Ve=S.onPageTransitionStart)==null?void 0:Ve.call(S,g)),S.isTransitioning=!0,c()))return;if(f){s(!m.pageContextFromRoute),s(!m.err);try{m.pageContextFromHooks=await Fi(g)}catch(w){P(w)}if(c())return}else if(!m.err){const{pageContextFromRoute:w}=m;s(w),s(w._pageId),s(y(w,"_pageId","string")),b(g,w);try{m.pageContextFromHooks=await Ai(g)}catch(_){P(_)}if(c())return}if("err"in m){const{err:w}=m;if(et(w)||console.error(w),st(w,g,f))return;if(et(w)){const _=w;Oi(w,g._isProduction,g);const k=_._pageContextAbort;if(k._urlRewrite){await G({...e,scrollTarget:"scroll-to-top-or-hash",pageContextsFromRewrite:[...o,k]});return}if(k._urlRedirect){const fe=k._urlRedirect.url;if(fe.startsWith("http")){window.location.href=fe;return}else await G({...e,scrollTarget:"scroll-to-top-or-hash",urlOriginal:fe,overwriteLastHistoryEntry:!1,isBackwardNavigation:!1,redirectCount:l+1});return}s(k.abortStatusCode),b(g,k),k.abortStatusCode===404&&b(g,{is404:!0})}else b(g,{is404:!1});try{m.pageContextFromHooks=await Ii(g)}catch(_){if(st(_,g,f)||(f||setTimeout(()=>{window.location.pathname=n},0),Ur(w,_)))return;throw _}if(c())return}const{pageContextFromHooks:$}=m;if(s($),b(g,$),he(g,"onPageTransitionStart"),S.onPageTransitionStart=g.exports.onPageTransitionStart,g.exports.hydrationCanBeAborted?d():R(!Dr(),"You seem to be using React; we recommend setting hydrationCanBeAborted to true, see https://vike.dev/clientRouting",{onlyOnce:!0}),!c()&&!(S.renderPromise&&(await S.renderPromise,s(S.renderPromise===void 0),c()))){if(Io(n,r),S.previousPageContext=g,s(S.renderPromise===void 0),S.renderPromise=(async()=>{await Eo(g,!0),vo(g),S.renderPromise=void 0})(),await S.renderPromise,s(S.renderPromise===void 0),f){he(g,"onHydrationEnd");const{onHydrationEnd:w}=g.exports;if(w){const _=g.exportsAll.onHydrationEnd[0].exportSource;if(s(_),await ce(()=>w(g),"onHydrationEnd",_),c(!0))return}}if(!c(!0)){if(O){if(g.exports.onPageTransitionEnd&&(he(g,"onPageTransitionEnd"),await g.exports.onPageTransitionEnd(g),c(!0)))return;S.isTransitioning=void 0}on(t),Be(),Fo()}}}function Io(e,t){Ie()!==e&&(Be(),Yr(e,t),To())}function st(e,t,n){return!!(Wi(e)||Ao(e,t,n))}function Ao(e,t,n){if(!We(e))return!1;if(n)throw Ee(e,!1),e;return Ee(e,!0),ne(t.urlOriginal),!0}function Ee(e,t){s(We(e)),S.clientRoutingIsDisabled=!0,t&&console.log(e),Oe(!1,["Failed to fetch static asset.","This usually happens when a new frontend is deployed.","Falling back to Server Routing.","(The next page navigation will use Server Routing instead of Client Routing.)"].filter(Boolean).join(" "),{onlyOnce:!0})}function jo(){const e=++S.renderCounter;s(e>=1);let t=!1;return{abortRender:i=>!i&&e===1&&!t?!1:e!==S.renderCounter,setHydrationCanBeAborted:()=>{t=!0},isFirstRender:e===1}}function at(){return S.renderCounter}function Lo(){document.addEventListener("click",No)}function No(e){if(!Ho(e))return;const t=Wo(e.target);if(!t)return;const n=t.getAttribute("href");if(Xt(t))return;s(n),e.preventDefault();const i=![null,"false"].includes(t.getAttribute("keep-scroll-position"))?"preserve-scroll":"scroll-to-top-or-hash";G({scrollTarget:i,urlOriginal:n,isBackwardNavigation:!1})}function Ho(e){return e.button===0&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}function Wo(e){for(;e.tagName!=="A";){const{parentNode:t}=e;if(!t)return null;e=t}return e}function Bo(){xo(),Ft(),Oo(),qr(),s(at()===0),G({scrollTarget:"preserve-scroll",isBackwardNavigation:null,isClientSideNavigation:!1}),s(at()===1),Lo(),ko()}Y();const Vo=!0;dn(Vo);Bo(); diff --git a/assets/entries/entry-client-routing.90d43fd4.js b/assets/entries/entry-client-routing.90d43fd4.js deleted file mode 100644 index a1ccd19..0000000 --- a/assets/entries/entry-client-routing.90d43fd4.js +++ /dev/null @@ -1,3 +0,0 @@ -function rn(){return!(typeof process>"u"||!process.cwd||!process.versions||typeof process.versions.node>"u"||!process.release||process.release.name!=="node")}function Ee(e,t){let n;{var r=Error.stackTraceLimit;Error.stackTraceLimit=1/0,n=new Error(e),Error.stackTraceLimit=r}return rn()&&(n.stack=on(n.stack,t)),n}function on(e,t){if(!e)return e;const n=an(e);let r=0;return n.filter(o=>o.includes(" (internal/")||o.includes(" (node:internal")?!1:r1&&ye(!1,at,{onlyOnce:!0,showStackTrace:!0})}function un(e){ye(O.isClientRouting!==!1,ln,{onlyOnce:!0,showStackTrace:!0}),ye(O.isClientRouting===void 0,at,{onlyOnce:!0,showStackTrace:!0}),O.isClientRouting=!0,e&&(O.checkSingleInstance=!0),lt()}function cn(e){O.instances.push(e),lt()}function fn(e,t){if(e)return;const n=`[vike][Wrong Usage] ${t}`;throw new Error(n)}function ye(e,t,{onlyOnce:n,showStackTrace:r}){if(e)return;const i=`[vike][Warning] ${t}`;if(n){const{alreadyLogged:o}=O,l=n===!0?i:n;if(o.has(l))return;o.add(l)}console.warn(r?new Error(i):i)}const dn="0.4.145",N={projectName:"Vike",projectVersion:dn,npmPackageName:"vike",githubRepository:"https://github.com/vikejs/vike"};cn(N.projectVersion);const ut=new Proxy(e=>e,{get:()=>ut}),m=ut,R=$("utils/assert.ts",{alreadyLogged:new Set,logger(e,t){t==="info"?console.log(e):console.warn(e)},showStackTraceList:new WeakSet}),gn=`[${N.npmPackageName}]`,hn=`[${N.npmPackageName}@${N.projectVersion}]`,Ce=2;function s(e,t){var l;if(e)return;const n=(()=>{if(!t)return null;const a=typeof t=="string"?t:JSON.stringify(t);return m.dim(`Debug info (for ${N.projectName} maintainers; you can ignore this): ${a}`)})(),r=`${N.githubRepository}/issues/new`;let i=[`You stumbled upon a bug in ${N.projectName}'s source code.`,`Go to ${m.blue(r)} and copy-paste this error; a maintainer will fix the bug (usually under 24 hours).`,n].filter(Boolean).join(" ");i=M(i),i=se(i,"Bug"),i=J(i,!0);const o=Ee(i,Ce);throw(l=R.onBeforeLog)==null||l.call(R),o}function h(e,t,{showStackTrace:n}={}){var i;if(e)return;t=M(t),t=se(t,"Wrong Usage"),t=J(t);const r=Ee(t,Ce);throw n&&R.showStackTraceList.add(r),(i=R.onBeforeLog)==null||i.call(R),r}function ct(e){return e=M(e),e=se(e,"Error"),e=J(e),Ee(e,Ce)}function v(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(t=M(t),t=se(t,"Warning"),t=J(t),n){const{alreadyLogged:o}=R,l=n===!0?t:n;if(o.has(l))return;o.add(l)}if((i=R.onBeforeLog)==null||i.call(R),r){const o=new Error(t);R.showStackTraceList.add(o),R.logger(o,"warn")}else R.logger(t,"warn")}}function $e(e,t,{onlyOnce:n}){var r;if(!e){if(t=M(t),t=J(t),n){const{alreadyLogged:i}=R,o=t;if(i.has(o))return;i.add(o)}(r=R.onBeforeLog)==null||r.call(R),R.logger(t,"info")}}function se(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=m.bold(m[r](n)),`${n}${e}`}function M(e){return e.startsWith("[")?e:` ${e}`}function J(e,t=!1){return`${t?hn:gn}${e}`}function H(){return typeof window<"u"&&typeof window.scrollY=="number"}const ft=$("utils/assertRouterType.ts",{});function Y(){mn(pn()),ft.isClientRouting=!0}function pn(){return ft.isClientRouting!==!1}function mn(e){h(H(),`${m.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),v(e,"You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.",{showStackTrace:!0,onlyOnce:!0})}const yn=["js","ts","cjs","cts","mjs","mts","jsx","tsx","cjsx","ctsx","mjsx","mtsx"],dt=["vue","svelte","marko","md","mdx"],bn=[...yn,...dt];function gt(e){const t=bn.some(n=>e.endsWith("."+n));return s(!wn(e)||t),t}function wn(e){return/\.(c|m)?(j|t)sx?$/.test(e)}function Sn(e){return dt.some(t=>e.endsWith("."+t))}function x(e,t,n){return typeof e=="string"?De(e.split(""),t,n).join(""):De(e,t,n)}function De(e,t,n){const r=[];let i=t>=0?t:e.length+t;s(i>=0&&i<=e.length);let o=n>=0?n:e.length+n;for(s(o>=0&&o<=e.length);!(i===o||(i===e.length&&(i=0),i===o));){const l=e[i];s(l!==void 0),r.push(l),i++}return r}const ht=["http://","https://","tauri://"];function Te(e){return ht.some(t=>e.startsWith(t))||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function Pn(e,t){s(t.includes(" but ")),h(typeof e=="string",`${t} should be a string`),!Te(e)&&(!e.startsWith("/")&&!e.includes(":")?h(!1,`${t} is ${m.cyan(e)} and it should be /${m.cyan(e)} instead (URL pathnames should start with a leading slash)`):h(!1,`${t} isn't a valid URL`))}function K(e,t){s(Te(e)),s(t.startsWith("/"));const[n,...r]=e.split("#");s(n!==void 0);const i=["",...r].join("#")||null;s(i===null||i.startsWith("#"));const o=i===null?"":be(i.slice(1)),[l,...a]=n.split("?");s(l!==void 0);const u=["",...a].join("?")||null;s(u===null||u.startsWith("?"));const c={},d={};Array.from(new URLSearchParams(u||"")).forEach(([C,V])=>{c[C]=V,d[C]=[...d.hasOwnProperty(C)?d[C]:[],V]});const{origin:f,pathname:g}=Rn(l,t);s(f===null||f===be(f)),s(g.startsWith("/")),s(f===null||e.startsWith(f));const p=l.slice((f||"").length);$n(e,f,p,u,i);let{pathname:S,hasBaseServer:T}=Cn(g,t);return S=vn(S),s(S.startsWith("/")),{origin:f,pathname:S,pathnameOriginal:p,hasBaseServer:T,search:c,searchAll:d,searchOriginal:u,hash:o,hashOriginal:i}}function be(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function vn(e){return e=e.split("/").map(t=>be(t).split("/").join("%2F")).join("/"),e=e.replace(/\s/g,""),e}function Rn(e,t){var n;{const{origin:r,pathname:i}=de(e);if(r)return{origin:r,pathname:i};s(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{let r=typeof window<"u"&&((n=window==null?void 0:window.document)==null?void 0:n.baseURI);r&&(r=de(r).pathname);const o=En(e,r||t);return de(o)}}function de(e){if(ht.some(t=>e.startsWith(t))){const[t,n,r,...i]=e.split("/"),o=[t,n,r].join("/"),l=["",...i].join("/")||"/";return{origin:o,pathname:l}}else return{pathname:e,origin:null}}function En(e,t){const n=t.split("/"),r=e.split("/");let i=t.endsWith("/");e.startsWith(".")&&n.pop();for(const l in r){const a=r[l];a==""&&l==="0"||a!="."&&(a==".."?n.pop():(i=!1,n.push(a)))}let o=n.join("/");return i&&!o.endsWith("/")&&(o+="/"),o.startsWith("/")||(o="/"+o),o}function _n(e){s(e.startsWith("/")),s(!e.includes("?")),s(!e.includes("#"))}function Cn(e,t){_n(e),s(ke(t));let n=e;if(s(n.startsWith("/")),s(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===x(t,0,-1)&&(r=x(t,0,-1),s(n===r)),n.startsWith(r)?(s(n.startsWith("/")||n.startsWith("http")),s(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),s(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function ke(e){return e.startsWith("/")}function $n(e,t,n,r,i){const o=Tn(t,n,r,i);s(e===o)}function Tn(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function b(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function A(e){return e instanceof Function||typeof e=="function"}function te(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function kn(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r{const r=e(t),i=e(n);if(s([!0,!1,null].includes(r)),s([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;s(!1)}}function On(e){return j(t=>{const n=e(t);return n===null?null:!n})}function y(e,t,n="unknown"){if(!E(e))return!1;if(!(t in e))return n==="undefined";if(n==="unknown")return!0;const r=e[t];return n==="array"?Array.isArray(r):n==="object"?E(r):n==="string[]"?Array.isArray(r)&&r.every(i=>typeof i=="string"):n==="function"?A(r):Array.isArray(n)?typeof r=="string"&&n.includes(r):n==="null"?r===null:n==="undefined"?r===void 0:n==="true"?r===!0:n==="false"?r===!1:typeof r===n}function I(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function xn(e,t){return e.toLowerCase()t.toLowerCase()?1:0}const Fn=e=>e!=null;function Ve(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function pt(e){const t=n=>`Not a posix path: ${n}`;s(e!==null,t("null")),s(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),s(e!=="",t("(empty string)")),s(e),s(!e.includes("\\"),t(e))}function ge(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function In(e){return typeof e=="object"&&e!==null&&"then"in e&&A(e.then)}function An(e){return[null,void 0].includes(e)?String(e):["boolean","number","string"].includes(typeof e)?JSON.stringify(e):null}function jn(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}const Ln=["clientRouting"];function Nn(e){Ln.forEach(t=>{if(s(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;h(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),h(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const mt=["render","clientRouting","prerender","doNotPrerender"];function Hn(e,t){h(!mt.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function Bn(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;s(n!=="*");let i="",o="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(a=>{i=`${i} { ${a}`,o=` }${o}`}),i+o}function ae(e,t,{definedAt:n}){const r=yt(n,t),i=r==="internally"?r:`at ${r}`;let o=`${t}${e==="Hook"?"()":""}`;return`${e} ${m.cyan(o)} defined ${i}`}function yt(e,t){if("isComputed"in e)return"internally";let n;return"files"in e?n=e.files:n=[e],s(n.length>=1),n.map(i=>{const{filePathToShowToUser:o,fileExportPathToShowToUser:l}=i;let a=o;const u=Bn(l,t);return u&&(a=`${a} > ${m.cyan(u)}`),a}).join(" / ")}function W(e,t,n){const r=Dn(e,t);if(r===null)return null;const{value:i,definedAt:o}=r;return n&&Wn(i,n,t,o),r}function Wn(e,t,n,r){s(e!==null);const i=typeof e;if(i===t)return;const o=An(e),l=o!==null?`value ${m.cyan(o)}`:`type ${m.cyan(i)}`,u=`${ae("Config",n,{definedAt:r})} has an invalid ${l}: it should be a ${m.cyan(t)} instead`;h(!1,u)}function Dn(e,t){const n=e.configValues[t];return!n||n.value===null?null:n}function bt(e,t){const n=t.find(r=>r.pageId===e);return s(t.length>0),s(n),n}function wt({definedAt:e}){if("isComputed"in e||"files"in e)return null;const{filePathToShowToUser:t}=e;return s(t),t}function Vn({definedAt:e}){const t=wt({definedAt:e});return s(t),t}function Un(e,t){const n={},r={},i={};e.forEach(a=>{zn(a).forEach(({exportName:c,exportValue:d,isFromDefaultExport:f})=>{s(c!=="default"),i[c]=i[c]??[],i[c].push({exportValue:d,exportSource:`${a.filePath} > ${f?`\`export default { ${c} }\``:`\`export { ${c} }\``}`,filePath:a.filePath,_filePath:a.filePath,_fileType:a.fileType,_isFromDefaultExport:f})})}),t&&Object.entries(t.configValues).forEach(([a,u])=>{const{value:c}=u,d=wt(u),f=ae("Config",a,u);r[a]=r[a]??c,n[a]=n[a]??[],s(n[a].length===0),n[a].push({configValue:c,configDefinedAt:f,configDefinedByFile:d});const g=a;i[g]=i[g]??[],i[g].push({exportValue:c,exportSource:f,filePath:d,_filePath:d,_fileType:null,_isFromDefaultExport:null})});const o=Gn(),l={};return Object.entries(i).forEach(([a,u])=>{u.forEach(({exportValue:c,_fileType:d,_isFromDefaultExport:f})=>{l[a]=l[a]??c,d===".page"&&!f&&(a in o||(o[a]=c))})}),s(!("default"in l)),s(!("default"in i)),{config:r,configEntries:n,exports:l,exportsAll:i,pageExports:o}}function zn(e){const{filePath:t,fileExports:n}=e;s(n),s(gt(t));const r=[];return Object.entries(n).sort(On(([i])=>i==="default")).forEach(([i,o])=>{let l=i==="default";if(l)if(Sn(t))i="Page";else{h(E(o),`The ${m.cyan("export default")} of ${t} should be an object.`),Object.entries(o).forEach(([a,u])=>{Hn(a,t),r.push({exportName:a,exportValue:u,isFromDefaultExport:l})});return}r.push({exportName:i,exportValue:o,isFromDefaultExport:l})}),r.forEach(({exportName:i,isFromDefaultExport:o})=>{s(!(o&&mt.includes(i)))}),r}function Gn(){return new Proxy({},{get(...e){return H()||v(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}function Mn(e){const t=".page.",n=x(e.split(t),0,-1).join(t);return s(!n.includes("\\")),n}function D(e){pt(e)}function St(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(h(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=_e(e.map(({pageId:r})=>r).filter(r=>q(r)));if(h(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return s(r),r}return null}function q(e,t){return s(!e.includes("\\")),e.includes("/_error")}function Jn(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return s(n),!!n.isErrorPage}else return q(e)}const Yn=[".page",".page.server",".page.route",".page.client",".css"];function Kn(e){if(pt(e),e.endsWith(".css"))return".css";s(gt(e),e);const n=e.split("/").slice(-1)[0].split("."),r=n.slice(-3)[0],i=n.slice(-2)[0];if(i==="page")return".page";if(s(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";s(!1,e)}function Pt(e){const t=o=>i.pageId===o||i.isDefaultPageFile&&(Ue(i.filePath)||qn(o,i.filePath)),n=Kn(e),i={filePath:e,fileType:n,isEnv:o=>{if(s(n!==".page.route"),o==="CLIENT_ONLY")return n===".page.client"||n===".css";if(o==="SERVER_ONLY")return n===".page.server";if(o==="CLIENT_AND_SERVER")return n===".page";s(!1)},isRelevant:t,isDefaultPageFile:we(e),isRendererPageFile:n!==".css"&&we(e)&&Ue(e),isErrorPageFile:q(e),pageId:Mn(e)};return i}function we(e){return D(e),q(e)?!1:e.includes("/_default")}function Ue(e){return D(e),e.includes("/renderer/")}function qn(e,t){D(e),D(t),s(!e.endsWith("/")),s(!t.endsWith("/")),s(we(t));const n=x(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function Xn(e){s(Array.isArray(e)),e.forEach(t=>{s(E(t)),s(y(t,"pageId","string")),s(y(t,"routeFilesystem")),s(y(t,"configValuesSerialized")),s(y(t,"configValuesImported"))})}function Qn(e){s(y(e,"configValuesImported"))}const Zn=[{is:e=>e===void 0,match:e=>e==="!undefined",serialize:()=>"!undefined",deserialize:()=>{}},{is:e=>e===1/0,match:e=>e==="!Infinity",serialize:()=>"!Infinity",deserialize:()=>1/0},{is:e=>e===-1/0,match:e=>e==="!-Infinity",serialize:()=>"!-Infinity",deserialize:()=>-1/0},{is:e=>typeof e=="number"&&isNaN(e),match:e=>e==="!NaN",serialize:()=>"!NaN",deserialize:()=>NaN},{is:e=>e instanceof Date,match:e=>e.startsWith("!Date:"),serialize:e=>"!Date:"+e.toISOString(),deserialize:e=>new Date(e.slice(6))},{is:e=>typeof e=="bigint",match:e=>e.startsWith("!BigInt:"),serialize:e=>"!BigInt:"+e.toString(),deserialize:e=>{if(typeof BigInt>"u")throw new Error("Your JavaScript environement does not support BigInt. Consider adding a polyfill.");return BigInt(e.slice(8))}},{is:e=>e instanceof RegExp,match:e=>e.startsWith("!RegExp:"),serialize:e=>"!RegExp:"+e.toString(),deserialize:e=>{e=e.slice(8);const t=e.match(/\/(.*)\/(.*)?/),n=t[1],r=t[2];return new RegExp(n,r)}},{is:e=>e instanceof Map,match:e=>e.startsWith("!Map:"),serialize:(e,t)=>"!Map:"+t(Array.from(e.entries())),deserialize:(e,t)=>new Map(t(e.slice(5)))},{is:e=>e instanceof Set,match:e=>e.startsWith("!Set:"),serialize:(e,t)=>"!Set:"+t(Array.from(e.values())),deserialize:(e,t)=>new Set(t(e.slice(5)))},{is:e=>typeof e=="string"&&e.startsWith("!"),match:e=>e.startsWith("!"),serialize:e=>"!"+e,deserialize:e=>e.slice(1)}];function le(e){const t=JSON.parse(e);return vt(t)}function vt(e){return typeof e=="string"?er(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=vt(n)}),e)}function er(e){for(const{match:t,deserialize:n}of Zn)if(t(e))return n(e,le);return e}const tr=["$$registrations","_rerender_only"],nr=[".md",".mdx"];function rr(e,t,n){ir(e,t,n)}function ir(e,t,n){const i=Object.keys(e).filter(l=>!tr.includes(l)),o=i.filter(l=>l!=="default"&&l!==n);if(o.length===0){if(i.length===1)return;{s(i.length===0);let l=`${t} doesn't export any value, but it should have a ${m.cyan("export default")}`;n&&(l+=` or ${m.cyan(`export { ${n} }`)}`),h(!1,l)}}else if(n){if(nr.some(l=>t.endsWith(l)))return;o.forEach(l=>{v(!1,`${t} should have only a single export: move ${m.cyan(`export { ${l} }`)} to +config.h.js or its own +${o}.js`,{onlyOnce:!0})})}else{const l=o.join(", ");h(!1,`${t} replace ${m.cyan(`export { ${l} }`)} with ${m.cyan(`export default { ${l} }`)}`)}}function Se(e){const t={},n=(r,i,o,l)=>{t[r]={value:i,definedAt:{filePathToShowToUser:o,fileExportPathToShowToUser:[r,"default"].includes(l)?[]:[l]}},or(i,r,o)};return e.forEach(r=>{if(r.isValueFile){const{exportValues:i,importPath:o,configName:l}=r;l!=="client"&&rr(i,o,l),Object.entries(i).forEach(([a,u])=>{const c=a!=="default",d=c?a:r.configName;c&&d in t||n(d,u,o,a)})}else{const{configName:i,importPath:o,exportValue:l,exportName:a}=r;n(i,l,o,a)}}),t}function or(e,t,n){s(!n.includes("+config.")),h(e!==null,`Set ${m.cyan(t)} to ${m.cyan("null")} in a +config.h.js file instead of ${n}`)}function sr(e,t){const n=e.map(i=>{const o={};{const{configValuesSerialized:d}=i;Object.entries(d).forEach(([f,g])=>{{const{valueSerialized:p,definedAt:S}=g;s(p),s(!o[f]),o[f]={value:le(p),definedAt:S}}})}{const{configValuesImported:d}=i,f=Se(d);Object.assign(o,f)}const{pageId:l,isErrorPage:a,routeFilesystem:u,loadConfigValuesAll:c}=i;return ar(o),{pageId:l,isErrorPage:a,routeFilesystem:u,configValues:o,loadConfigValuesAll:c}}),r={configValues:{}};{const i=Se(t.configValuesImported);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function ar(e){const t="route",n=e[t];if(!n)return;const{value:r}=n,i=typeof r,o=ae("Config",t,n);h(i==="string"||A(r),`${o} has an invalid type '${i}': it should be a string or a function instead, see https://vike.dev/route`)}function lr(e){s(y(e,"isGeneratedFile")),s(e.isGeneratedFile!==!1,"vike was re-installed(/re-built). Restart your app."),s(e.isGeneratedFile===!0,`\`isGeneratedFile === ${e.isGeneratedFile}\``),s(y(e,"pageFilesLazy","object")),s(y(e,"pageFilesEager","object")),s(y(e,"pageFilesExportNamesLazy","object")),s(y(e,"pageFilesExportNamesEager","object")),s(y(e.pageFilesLazy,".page")),s(y(e.pageFilesLazy,".page.client")||y(e.pageFilesLazy,".page.server")),s(y(e,"pageFilesList","string[]")),s(y(e,"pageConfigsSerialized")),s(y(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;Xn(t),Qn(n);const{pageConfigs:r,pageConfigGlobal:i}=sr(t,n),o={};X(e.pageFilesLazy).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;ze(d),u.loadFile=async()=>{"fileExports"in u||(u.fileExports=await d(),Nn(u))}}),X(e.pageFilesExportNamesLazy).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;ze(d),u.loadExportNames=async()=>{if(!("exportNames"in u)){const f=await d();h("exportNames"in f,"You seem to be using Vite 2 but the latest vike versions only work with Vite 3"),s(y(f,"exportNames","string[]"),u.filePath),u.exportNames=f.exportNames}}}),X(e.pageFilesEager).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;s(E(d)),u.fileExports=d}),X(e.pageFilesExportNamesEager).forEach(({filePath:a,pageFile:u,globValue:c})=>{u=o[a]=o[a]??u;const d=c;s(E(d)),s(y(d,"exportNames","string[]"),u.filePath),u.exportNames=d.exportNames}),e.pageFilesList.forEach(a=>{o[a]=o[a]??Pt(a)});const l=Object.values(o);return l.forEach(({filePath:a})=>{s(!a.includes("\\"))}),{pageFiles:l,pageConfigs:r,pageConfigGlobal:i}}function X(e){const t=[];return Object.entries(e).forEach(([n,r])=>{s(Yn.includes(n)),s(E(r)),Object.entries(r).forEach(([i,o])=>{const l=Pt(i);s(l.fileType===n),t.push({filePath:i,pageFile:l,globValue:o})})}),t}function ze(e){s(A(e))}const F=$("setPageFiles.ts",{});function ur(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=lr(e);F.pageFilesAll=t,F.pageConfigs=n,F.pageConfigGlobal=r}async function cr(e,t){e?(s(!F.pageFilesGetter),s(t===void 0)):(s(F.pageFilesGetter),s(typeof t=="boolean"),(!F.pageFilesAll||!t)&&await F.pageFilesGetter());const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=F;s(n&&r&&i);const o=fr(n,r);return{pageFilesAll:n,allPageIds:o,pageConfigs:r,pageConfigGlobal:i}}function fr(e,t){const n=e.filter(({isDefaultPageFile:o})=>!o).map(({pageId:o})=>o),r=_e(n),i=t.map(o=>o.pageId);return[...r,...i]}function Oe(e,t){return Et(e,t,!0)}function Rt(e,t){return Et(e,t,!1)}function Et(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(p=>p.isRelevant(t)&&p.fileType!==".page.route").sort(dr(n,t)),o=p=>{const S=i.filter(C=>C.pageId===t&&C.isEnv(p?"CLIENT_AND_SERVER":r));h(S.length<=1,`Merge the following files into a single file: ${S.map(C=>C.filePath).join(" ")}`);const T=S[0];return s(T===void 0||!T.isDefaultPageFile),T},l=o(!1),a=o(!0),u=p=>i.filter(S=>S.isRendererPageFile&&S.isEnv(p?"CLIENT_AND_SERVER":r))[0],c=u(!1),d=u(!0),f=i.filter(p=>p.isDefaultPageFile&&!p.isRendererPageFile&&(p.isEnv(r)||p.isEnv("CLIENT_AND_SERVER")));return[l,a,...f,c,d].filter(Fn)}function dr(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,o=0;return(l,a)=>{if(!l.isDefaultPageFile&&a.isDefaultPageFile)return r;if(!a.isDefaultPageFile&&l.isDefaultPageFile)return i;{const u=l.isRendererPageFile,c=a.isRendererPageFile;if(!u&&c)return r;if(!c&&u)return i;s(u===c)}{const u=Ge(t,l.filePath),c=Ge(t,a.filePath);if(u{if(o=hr(o),o in Me)return;Me[o]=!0;const l=o.endsWith(".css"),a=l?'[rel="stylesheet"]':"";if(!!r)for(let d=i.length-1;d>=0;d--){const f=i[d];if(f.href===o&&(!l||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":gr,l||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),l)return new Promise((d,f)=>{c.addEventListener("load",d),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o})},xe={},_t={},pr={},ue={},mr=[],Ct={},yr=!0,br=[{pageId:"/pages/_error",isErrorPage:!0,routeFilesystem:void 0,loadConfigValuesAll:async()=>(await Je(()=>import("./pages_error.e76db8c7.js"),["assets/entries/pages_error.e76db8c7.js","assets/chunks/chunk-aca7cee1.js","assets/static/LayoutDefault.d4faae46.css"])).default,configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},clientRouting:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"},title:{definedAt:{filePathToShowToUser:"/pages/+config.h.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:'"Bati"'}},configValuesImported:[]},{pageId:"/pages/index",isErrorPage:void 0,routeFilesystem:{routeString:"/",definedBy:"/pages/index/"},loadConfigValuesAll:async()=>(await Je(()=>import("./pages_index.deb0d3ca.js"),["assets/entries/pages_index.deb0d3ca.js","assets/chunks/chunk-aca7cee1.js","assets/static/LayoutDefault.d4faae46.css"])).default,configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},clientRouting:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"},title:{definedAt:{filePathToShowToUser:"/pages/+config.h.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:'"Bati"'}},configValuesImported:[]}],wr={configValuesImported:[]},Sr=Object.assign({}),Pr={...Sr};xe[".page"]=Pr;const vr=Object.assign({}),Rr={...vr};ue[".page"]=Rr;const Er=Object.assign({}),_r={...Er};ue[".page.server"]=_r;const Cr=Object.assign({}),$r={...Cr};_t[".page.route"]=$r;const Tr=Object.assign({}),kr={...Tr};xe[".page.client"]=kr;const Or=Object.assign({}),xr={...Or};ue[".page.client"]=xr;const Fr=Object.assign({}),Ir={...Fr};Ct[".page.server"]=Ir;const Ar=Object.freeze(Object.defineProperty({__proto__:null,isGeneratedFile:yr,neverLoaded:Ct,pageConfigGlobalSerialized:wr,pageConfigsSerialized:br,pageFilesEager:_t,pageFilesExportNamesEager:ue,pageFilesExportNamesLazy:pr,pageFilesLazy:xe,pageFilesList:mr},Symbol.toStringTag,{value:"Module"}));ur(Ar);function $t(){s(H())}function jr(){$t(),Y()}function Lr(){$t()}function Ye(e){const t=e/1e3;if(t<120){const n=Ke(t);return`${n} second${qe(n)}`}{const n=t/60,r=Ke(n);return`${r} minute${qe(r)}`}}function Ke(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function qe(e){return e==="1"?"":"s"}const Nr=$("utils/executeHook.ts",{userHookErrors:new Map});function ce(e,t,n){const{timeoutErr:r,timeoutWarn:i}=Hr(t);let o,l;const a=new Promise((f,g)=>{o=p=>{u(),f(p)},l=p=>{u(),g(p)}}),u=()=>{clearTimeout(c),clearTimeout(d)},c=setTimeout(()=>{v(!1,`The ${t}() hook defined by ${n} is taking more than ${Ye(i)}`,{onlyOnce:!1})},i),d=setTimeout(()=>{const f=ct(`Hook timeout: the ${t}() hook defined by ${n} didn't finish after ${Ye(r)}`);l(f)},r);return(async()=>{try{const f=await e();o(f)}catch(f){E(f)&&Nr.userHookErrors.set(f,{hookName:t,hookFilePath:n}),l(f)}})(),a}function Hr(e){return e==="onBeforeRoute"?{timeoutErr:5*1e3,timeoutWarn:1*1e3}:e==="onBeforePrerender"?{timeoutErr:10*60*1e3,timeoutWarn:30*1e3}:{timeoutErr:40*1e3,timeoutWarn:4*1e3}}function Fe(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=K(t,"/");let o;return e!=null&&e.withoutHash?o=`${i}${n||""}`:o=`${i}${n||""}${r||""}`,s(o.startsWith("/")),o}Lr();function Br(){var r,i,o,l;const e=!!((i=(r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:r.renderers)!=null&&i.size),t=!!((l=(o=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:o.rendererInterfaces)!=null&&l.size),n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}function Tt(e,t){const n=Object.keys,r=typeof e;return e&&t&&r==="object"&&r===typeof t?n(e).length===n(t).length&&n(e).every(o=>Tt(e[o],t[o])):e===t}function Wr(e,t){return E(e)&&E(t)&&e.constructor===t.constructor&&Tt({...e,stack:null},{...t,stack:null})&&t.message===t.message}function ne(e){window.location.href=e}function Dr(e){return new Promise(t=>setTimeout(t,e))}function Vr(e,t){let n=!1;return()=>{n||(n=!0,setTimeout(()=>{n=!1,e()},t))}}function kt(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()})}function Ur(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function zr(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}jr();function Ot(){let e=window.history.state;e||(e={});let t=!1;"timestamp"in e||(t=!0,e.timestamp=je()),"scrollPosition"in e||(t=!0,e.scrollPosition=Ae()),"triggedBy"in e||(e.triggedBy="browser"),xt(e),t&&Le(e)}function Ie(){const e=window.history.state||{};return xt(e),e}function Ae(){return{x:window.scrollX,y:window.scrollY}}function je(){return new Date().getTime()}function Xe(){const e=Ae(),t=Ie();Le({...t,scrollPosition:e})}function Gr(e,t){if(t)Le(Ie(),e);else{const n=je();Mr({timestamp:n,scrollPosition:null,triggedBy:"vike"},e)}}function xt(e){if(s(E(e)),"timestamp"in e){const{timestamp:t}=e;s(typeof t=="number")}if("scrollPosition"in e){const{scrollPosition:t}=e;t!==null&&s(y(t,"x","number")&&y(t,"y","number"))}}function Le(e,t){window.history.replaceState(e,"",t??null)}function Mr(e,t){window.history.pushState(e,"",t)}function Jr(){const e=history.pushState;history.pushState=(t={},...n)=>{h(t==null||E(t),"history.pushState(state) argument state must be an object");const r={scrollPosition:Ae(),timestamp:je(),...t,triggedBy:"user"};return e.apply(history,[r,...n])}}function Yr(){const e="vike_pageContext",t=document.getElementById(e);h(t,`The element #${e} (which vike automatically injects into the HTML) is missing from the DOM. This may happen if your HTML is malformed. Make sure your HTML isn't malformed, and make sure you don't remove #${e} from the HTML nor from the DOM.`);const n=t.textContent;s(n);const r=le(n);return s(y(r,"_pageId","string")),b(r,{_hasPageContextFromServer:!0}),r}async function Kr(e,t){const r=Rt(e,t).filter(o=>o.fileType===".page.server");return await Promise.all(r.map(async o=>{o.exportNames||(s(o.loadExportNames,t),await o.loadExportNames())})),{hasOnBeforeRenderServerSideOnlyHook:r.some(({exportNames:o})=>(s(o),o.includes("onBeforeRender")))}}function z(e,t){if(!(t in e.exports))return null;const n=e.exports[t],r=e.exportsAll[t][0];if(s(r.exportValue===n),n===null)return null;const i=r.filePath;return s(i),s(!i.endsWith(" ")),qr(n,{hookName:t,hookFilePath:i}),{hookFn:n,hookName:t,hookFilePath:i}}function he(e,t){z(e,t)}function qr(e,{hookName:t,hookFilePath:n}){s(t&&n),s(!t.endsWith(")")),h(A(e),`Hook ${t}() defined by ${n} should be a function`)}function Xr(e){const t=Object.entries(e);for(const n in e)delete e[n];t.sort(([n],[r])=>xn(n,r)).forEach(([n,r])=>{e[n]=r})}function Qr(e){Zr(e),ei(e)}function Zr(e){Jn(e._pageId,e._pageConfigs)&&s(y(e,"is404","boolean"))}function ei(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!E(t)){v(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const ti="not-serializable",re=$("getPageContextProxyForUser.ts",{});function ni(e){return s([!0,!1].includes(e._hasPageContextFromServer)),s([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=JSON.stringify(n);return h(r!==ti,`pageContext[${i}] couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),ri(e,n),r}})}function ri(e,t){if(re.prev===t||re.prev==="__v_raw"||(si(t),t in e)||oi(t))return;const n=JSON.stringify(t);e._hasPageContextFromServer&&!e._hasPageContextFromClient&&h(!1,`pageContext[${n}] isn't available on the client-side because ${n} is missing in passToClient, see https://vike.dev/passToClient`)}const ii=["then","toJSON"];function oi(e){return!!(ii.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function si(e){re.prev=e,window.setTimeout(()=>{re.prev=void 0},0)}function Ne(e,t){if(t){const i=e;s([!0,!1].includes(i.isHydration)),s([!0,!1,null].includes(i.isBackwardNavigation))}else{const i=e;s(i.isHydration===!0),s(i.isBackwardNavigation===null)}s("config"in e),s("configEntries"in e),s("exports"in e),s("exportsAll"in e),s("pageExports"in e),s(E(e.pageExports));const n=e.exports.Page;b(e,{Page:n}),ai(e),Xr(e);const r=ni(e);return Qr(e),r}function ai(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}function Ft(e,t){const n=e.filter(i=>i.pageId===t);return s(n.length<=1),n[0]??null}async function li(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll(),r=Se(n);return Object.assign(e.configValues,r),b(e,{isAllLoaded:!0}),e}const It="__whileFetchingAssets";async function ie(e,t){const n=Oe(t._pageFilesAll,e),r=Ft(t._pageConfigs,e);let i;const o=!1;try{i=(await Promise.all([r&&li(r,o),...n.map(p=>{var S;return(S=p.loadFile)==null?void 0:S.call(p)})]))[0]}catch(g){throw ui(g)&&Object.assign(g,{[It]:!0}),g}const{config:l,configEntries:a,exports:u,exportsAll:c,pageExports:d}=Un(n,i);return{config:l,configEntries:a,exports:u,exportsAll:c,pageExports:d,_pageFilesLoaded:n}}function He(e){return e?e[It]===!0:!1}function ui(e){return e instanceof Error?["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed","error resolving module specifier","failed to resolve module"].some(n=>e.message.toLowerCase().includes(n.toLowerCase())):!1}const Qe=["urlPathname","urlParsed"],ci=["Page","pageExports","exports"];function At(e){[...ci,...Qe].forEach(n=>{n in e&&(Qe.includes(n)?(s(n.startsWith("url")),v(!1,`pageContext.${n} is already available in the browser when using Client Routing; adding '${n}' to passToClient has no effect`,{onlyOnce:!0})):v(!1,`pageContext.${n} is a built-in that cannot be overriden; adding '${n}' to passToClient has no effect`,{onlyOnce:!0}),delete e[n])})}const fi="/";function di(e,t,n){const{pathnameOriginal:r,searchOriginal:i,hashOriginal:o}=K(e,fi);e.startsWith("/")&&s(e===`${r}${i||""}${o||""}`,{url:e});const l=r.endsWith("/");let a;return n&&r!=="/"?(l?a=x(r,0,-1):a=r,s(!a.endsWith("/"),{url:e}),s(a!=="")):a=r+(l?"":"/")+"index",s(a),a=a+t,`${a}${i||""}${o||""}`}const gi=".pageContext.json",hi=!1;function pi(e){return di(e,gi,hi)}function jt(e,{hookName:t,hookFilePath:n}){if(e==null)return;s(!t.endsWith(")"));const r=`The ${m.cyan("pageContext")} object provided by the ${t}() hook defined by ${n}`;h(E(e),`${r} should be an object (but it's ${m.cyan(`typeof pageContext === ${JSON.stringify(typeof e)}`)} instead)`),h(!("_objectCreatedByVike"in e),`${r} shouldn't be the whole ${m.cyan("pageContext")} object, see https://vike.dev/pageContext-manipulation#do-not-return-entire-pagecontext`),v(!("_pageId"in e),`${r} sets ${m.cyan("pageContext._pageId")} which means that Vike's routing is overriden. This is an experimental feature: make sure to contact a vike maintainer before using this.`,{onlyOnce:!0}),h(!("is404"in e),`${r} sets ${m.cyan("pageContext.is404")} which is forbidden, use ${m.cyan("throw render()")} instead, see https://vike.dev/render`)}function mi(e,t,n){s(!n.endsWith(" "));const r=[],i=Object.keys(e);for(const o of i)t.includes(o)||r.push(o);h(r.length===0,[n,"returned an object with following unknown keys:",Ve(r)+".","Only following keys are allowed:",Ve(t)+"."].join(" "))}function yi(e,t){if(e==null)return;const n=`The onBeforeRender() hook defined by ${t}`;h(I(e),`${n} should return a plain JavaScript object, ${m.cyan("undefined")}, or ${m.cyan("null")}`),mi(e,["pageContext"],n),e.pageContext&&jt(e.pageContext,{hookName:"onBeforeRender",hookFilePath:t})}function bi(e,t){if(!I(e))return!1;for(const n of Object.keys(e))if(!t.includes(n))return!1;return!0}function wi(e){return typeof e=="object"&&e!==null&&Object.values(e).every(t=>typeof t=="string")}function Si(e,t){if(s(e.length>0),e.length===1)return e[0];const n=e.slice(0,e.length-1),r=e[e.length-1];return n.join(", ")+` ${t} `+r}H()&&Y();async function Pi(e,t){let n;if(e._pageFilesAll.length>0?(s(e._pageConfigs.length===0),n=vi(e._pageId,e._pageFilesAll)):n=z(e,"guard"),!n)return;const r=n.hookFn;let i=e;const o=t(e);o&&(i=o);const l=await ce(()=>r(i),"guard",n.hookFilePath);h(l===void 0,`The guard() hook of ${n.hookFilePath} returns a value, but guard() doesn't accept any return value`)}function vi(e,t){const n=t.find(a=>a.pageId===e&&a.fileType===".page.route");if(!n)return null;const{filePath:r,fileExports:i}=n;s(i);const o=i.guard;if(!o)return null;const l=r;return h(A(o),`guard() defined by ${l} should be a function`),{hookFn:o,hookName:"guard",hookFilePath:l}}function Ri(e){const t=new Error("AbortRender");return b(t,{_pageContextAbort:e,[Lt]:!0}),t}const Lt="_isAbortError";function Ze(e){return typeof e=="object"&&e!==null&&Lt in e}function Ei(e){return e._urlRewrite||e._urlRedirect||e.abortStatusCode?(s(y(e,"_abortCall","string")),!0):!1}function _i(e,t,n){if(t)return;const r=n._urlRewrite??n.urlOriginal;s(r);const i=e._pageContextAbort._abortCall;$e(!1,`${m.cyan(i)} intercepted while rendering ${m.cyan(r)}`,{onlyOnce:!1})}function Ci(e){$i(e);const t={_urlRewrite:null};return e.forEach(n=>{Object.assign(t,n)}),t}function $i(e){const t=[];e.forEach(n=>{const r=n._urlRewrite;{const i=t.indexOf(r);if(i!==-1){const o=[...t.slice(i),r].map(l=>`render('${l}')`).join(" => ");h(!1,`Infinite loop of render() calls: ${o}`)}}t.push(r)})}function Ti(e,t){const n=[e>0&&m.cyan("throw render('/some-url')"),t>0&&m.cyan("throw redirect('/some-url')")].filter(Boolean).join(" and ");h(e+t<=7,`Maximum chain length of 7 ${n} exceeded. Did you define an infinite loop of ${n}?`)}const Nt=$("router/getPageContext.ts",{});async function ki(e){const t=Yr();At(t),b(t,{isHydration:!0,_hasPageContextFromClient:!1}),b(t,await ie(t._pageId,e));{const n={...e,...t};if(await Ai(n)){const r=await Bt(n);b(t,r)}}return Wt(t),t}async function Oi(e){const t=St(e._pageFilesAll,e._pageConfigs);if(!t)throw new Error("No error page defined.");const n={isHydration:!1,_pageId:t};return b(n,await Ht({...e,...n},!0)),n}async function xi(e){const t={isHydration:!1,_pageId:e._pageId};return b(t,await Ht({...e,...t},!1)),Wt(t),t}async function Ht(e,t){let n={};if(b(n,await ie(e._pageId,e)),!t&&await Fi({...e,...n})){const r=await ji(e);if(!r._isError)b(n,r);else{const i=St(e._pageFilesAll,e._pageConfigs);s(i),n={},b(n,{isHydration:!1,_pageId:i}),b(n,await ie(n._pageId,e)),s(y(r,"is404","boolean")),s(y(r,"pageProps","object")),s(y(r.pageProps,"is404","boolean")),s(!("serverSideError"in r)),b(n,r)}}else b(n,{_hasPageContextFromServer:!1}),t||await Pi({_hasPageContextFromClient:!1,...e,...n},r=>Ne(r,!0));{const r=await Bt({...e,...n});b(n,r)}return n}async function Bt(e){const t=z(e,"onBeforeRender");if(!t)return{_hasPageContextFromClient:!1};const n=t.hookFn,r={_hasPageContextFromClient:!0},i=Ne({...e,...r},!0),o=await ce(()=>n(i),"onBeforeRender",t.hookFilePath);yi(o,t.hookFilePath);const l=o==null?void 0:o.pageContext;return b(r,l),r}function Wt(e){e._pageContextInitHasClientData&&(Nt.pageContextInitHasClientData=!0)}async function Fi(e){return!!Nt.pageContextInitHasClientData||await Ii(e)}async function Ii(e){var t;if(e._pageConfigs.length>0){const n=bt(e._pageId,e._pageConfigs);return((t=W(n,"onBeforeRenderEnv"))==null?void 0:t.value)==="server-only"}else{const{hasOnBeforeRenderServerSideOnlyHook:n}=await Kr(e._pageFilesAll,e._pageId);return n}}async function Ai(e){var t;if(e._pageConfigs.length>0){const n=bt(e._pageId,e._pageConfigs);return((t=W(n,"onBeforeRenderEnv"))==null?void 0:t.value)==="client-only"}else return!1}async function ji(e){const t=pi(e._urlRewrite??e.urlOriginal),n=await fetch(t);{const o=n.headers.get("content-type"),l="application/json",a=o&&o.includes(l);if(!a&&n.status===404)throw ne(e.urlOriginal),Ni();h(a,`Wrong Content-Type for ${t}: it should be ${l} but it's ${o} instead. Make sure to properly use pageContext.httpResponse.headers, see https://vike.dev/renderPage`)}const r=await n.text(),i=le(r);if(s(E(i)),"serverSideError"in i)throw ct("The pageContext object couldn't be fetched from the server as an error occurred on the server-side. Check your server logs.");if(Ei(i))throw Ri(i);return s(y(i,"_pageId","string")),At(i),b(i,{_hasPageContextFromServer:!0}),i}function Li(e){return E(e)&&!!e._alreadyServerSideRouted}function Ni(){const e=new Error("Page doesn't exist");return Object.assign(e,{_alreadyServerSideRouted:!0}),e}function Dt(e,t=!0){s(e.urlOriginal),"urlPathname"in e&&(s(typeof e.urlPathname=="string"),s(ge(e,"urlPathname"))),"urlParsed"in e&&s(ge(e,"urlParsed")),"url"in e&&s(ge(e,"url")),Object.defineProperty(e,"urlPathname",{get:Ut,enumerable:t,configurable:!0}),Object.defineProperty(e,"url",{get:Hi,enumerable:!1,configurable:!0}),Object.defineProperty(e,"urlParsed",{get:Bi,enumerable:t,configurable:!0})}function Vt(e){let t=e._urlHandler;t||(t=i=>i);let n=e._urlRewrite??e.urlLogical??e.urlOriginal;n=t(n);const r=e._baseServer;return s(n&&typeof n=="string"),s(r.startsWith("/")),K(n,r)}function Ut(){const{pathname:e}=Vt(this),t=e;return s(t.startsWith("/")),t}function Hi(){return v(!1,"`pageContext.url` is outdated. Use `pageContext.urlPathname`, `pageContext.urlParsed`, or `pageContext.urlOriginal` instead. (See https://vike.dev/migration/0.4.23 for more information.)",{onlyOnce:!0,showStackTrace:!0}),Ut.call(this)}function Bi(){const e=Vt(this),{origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:l,hash:a,hashOriginal:u}=e,c=H(),d=g=>{v(c,`pageContext.urlParsed.${g} isn't available on the server-side (HTTP requests don't include the URL hash by design)`,{onlyOnce:!0,showStackTrace:!0})},f={origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:l,get hash(){return d("hash"),a},get hashOriginal(){return d("hashOriginal"),u},get hashString(){return v(!1,"pageContext.urlParsed.hashString has been renamed to pageContext.urlParsed.hashOriginal",{onlyOnce:!0,showStackTrace:!0}),d("hashString"),u},get searchString(){return v(!1,"pageContext.urlParsed.searchString has been renamed to pageContext.urlParsed.searchOriginal",{onlyOnce:!0,showStackTrace:!0}),l}};return Q(f,"hashString"),Q(f,"searchString"),c||(Q(f,"hash"),Q(f,"hashOriginal")),f}function Q(e,t){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(e,t,{...n,enumerable:!1})}function Wi(e){s(typeof e.urlOriginal=="string"),s(typeof e.urlPathname=="string"),s(I(e.urlParsed)),s(e.urlPathname===e.urlParsed.pathname)}function Di(e,t){const r=t.filter(({filesystemRoot:o})=>e.startsWith(o)).sort(te(({filesystemRoot:o})=>o.length))[0];let i;if(r){const{filesystemRoot:o,urlRoot:l}=r,a={pageId:e,filesystemRoot:o,urlRoot:l};s(l.startsWith("/")&&e.startsWith("/")&&o.startsWith("/"),a),s(e.startsWith(o),a),o!=="/"?(s(!o.endsWith("/"),a),i=x(e,o.length,0)):i=e,s(i.startsWith("/"),a),i=l+(l.endsWith("/")?"":"/")+x(i,1,0)}else i=e;return s(i.startsWith("/")),i=i.split("/").filter(o=>o!=="pages"&&o!=="src"&&o!=="index").join("/"),s(!i.includes(".page.")),s(!i.endsWith(".")),i.endsWith("/index")&&(i=x(i,0,-6)),i===""&&(i="/"),s(i.startsWith("/")),s(!i.endsWith("/")||i==="/"),i}async function Vi(e,t,n){Wi(t);let r=e(t);if(zt(r,`The Route Function ${n}`),r=await r,r===!1)return null;if(r===!0&&(r={}),h(I(r),`The Route Function ${n} should return a boolean or a plain JavaScript object (but it's ${m.cyan(`typeof result === ${JSON.stringify(typeof r)}`)} instead)`),"match"in r){const{match:l}=r;if(h(typeof l=="boolean",`The ${m.cyan("match")} value returned by the Route Function ${n} should be a boolean.`),!l)return null}let i=null;"precedence"in r&&(i=r.precedence,h(typeof i=="number",`The ${m.cyan("precedence")} value returned by the Route Function ${n} should be a number.`)),Gt(r,`The ${m.cyan("routeParams")} object returned by the Route Function ${n} should`);const o=r.routeParams||{};return h(!("pageContext"in r),`Providing ${m.cyan("pageContext")} in Route Functions is prohibited, see https://vike.dev/route-function#cannot-provide-pagecontext`),s(I(o)),Object.keys(r).forEach(l=>{h(l==="match"||l==="routeParams"||l==="precedence",`The Route Function ${n} returned an object with an unknown property ${m.cyan(l)} (the known properties are ${m.cyan("match")}, ${m.cyan("routeParams")}, and ${m.cyan("precedence")})`)}),{precedence:i,routeParams:o}}function zt(e,t){v(!In(e),`${t} returned a promise, but asynchronous routing is deprecated and will be removed in the next major release, see https://vike.dev/route-function#async`,{onlyOnce:!0})}function et(){const e=m.cyan("iKnowThePerformanceRisksOfAsyncRouteFunctions");v(!1,`${e} is deprecated and will be removed in the next major release`,{onlyOnce:!0})}function Gt(e,t){s(t.endsWith(" should")),y(e,"routeParams")&&(s(t.endsWith(" should")),h(I(e.routeParams),`${t} be a plain JavaScript object.`),h(wi(e.routeParams),`${t} only hold string values.`))}async function Ui(e,t,n,r){await Promise.all(e.filter(a=>a.fileType===".page.route").map(a=>{var u;return(u=a.loadFile)==null?void 0:u.call(a)}));const{onBeforeRouteHook:i,filesystemRoots:o}=Gi(e,t,n);return{pageRoutes:zi(o,e,t,r),onBeforeRouteHook:i}}function zi(e,t,n,r){const i=[];let o=[...r];if(n.length>0){s(e===null);const l=!0;n.filter(a=>!a.isErrorPage).forEach(a=>{const u=a.pageId;o=Ji(o,u);let c=null;{const d="route",f=W(a,d);if(f){const g=f.value,p=yt(f.definedAt,d);typeof g=="string"?c={pageId:u,comesFromV1PageConfig:l,routeString:g,routeDefinedAt:p,routeType:"STRING"}:(s(A(g)),W(a,"iKnowThePerformanceRisksOfAsyncRouteFunctions","boolean")&&et(),c={pageId:u,comesFromV1PageConfig:l,routeFunction:g,routeDefinedAt:p,routeType:"FUNCTION"})}}if(!c){const{routeFilesystem:d}=a;s(d);const{routeString:f,definedBy:g}=d;s(d.routeString.startsWith("/")),c={pageId:u,routeFilesystemDefinedBy:g,comesFromV1PageConfig:l,routeString:f,routeDefinedAt:null,routeType:"FILESYSTEM"}}s(c),i.push(c)})}if(n.length===0){s(e);const l=!1;o.filter(a=>!q(a)).forEach(a=>{const u=t.find(c=>c.pageId===a&&c.fileType===".page.route");if(!u||!("default"in u.fileExports)){const c=Di(a,e);s(c.startsWith("/")),s(!c.endsWith("/")||c==="/"),i.push({pageId:a,comesFromV1PageConfig:l,routeString:c,routeDefinedAt:null,routeFilesystemDefinedBy:`${a}.page.*`,routeType:"FILESYSTEM"})}else{const{filePath:c,fileExports:d}=u;if(s(d.default),y(d,"default","string")){const f=d.default;h(f.startsWith("/"),`A Route String should start with a leading slash '/' but ${c} has \`export default '${f}'\`. Make sure to \`export default '/${f}'\` instead.`),i.push({pageId:a,comesFromV1PageConfig:l,routeString:f,routeDefinedAt:c,routeType:"STRING"});return}if(y(d,"default","function")){const f=d.default;"iKnowThePerformanceRisksOfAsyncRouteFunctions"in d&&et(),i.push({pageId:a,comesFromV1PageConfig:l,routeFunction:f,routeDefinedAt:c,routeType:"FUNCTION"});return}h(!1,`The default export of ${c} should be a string or a function.`)}})}return i}function Gi(e,t,n){var o;if(t.length>0){const l="onBeforeRoute";if((o=n.configValues[l])!=null&&o.value){const a=n.configValues[l],{value:u}=a,c=Vn(a),d=ae("Hook",l,a);return h(A(u),`${d} should be a function.`),{onBeforeRouteHook:{hookFilePath:c,onBeforeRoute:u},filesystemRoots:null}}return{onBeforeRouteHook:null,filesystemRoots:null}}let r=null;const i=[];return e.filter(l=>l.fileType===".page.route"&&l.isDefaultPageFile).forEach(({filePath:l,fileExports:a})=>{if(s(a),"onBeforeRoute"in a){h(y(a,"onBeforeRoute","function"),`\`export { onBeforeRoute }\` of ${l} should be a function.`);const{onBeforeRoute:u}=a;r={hookFilePath:`${l} > \`export { onBeforeRoute }\``,onBeforeRoute:u}}"filesystemRoutingRoot"in a&&(h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${l} should be a string.`),h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${l} is \`'${a.filesystemRoutingRoot}'\` but it should start with a leading slash \`/\`.`),i.push({filesystemRoot:Mi(l),urlRoot:a.filesystemRoutingRoot}))}),{onBeforeRouteHook:r,filesystemRoots:i}}function Mi(e){s(e.startsWith("/")),s(!e.endsWith("/"));const t=e.split("/"),n=x(t,0,-1).join("/")||"/";return s(n.startsWith("/")),s(!n.endsWith("/")||n==="/"),n}function Ji(e,t){const{length:n}=e;return e=e.filter(r=>r!==t),s(e.length===n-1),e}function Mt(){const e="/";return s(Yi(e)),e}function Yi(e){return e.startsWith("/")}const pe=$("createPageContext.ts",{});async function Jt(e){pe.pageFilesData||(pe.pageFilesData=await cr(!0));const{pageFilesAll:t,allPageIds:n,pageConfigs:r,pageConfigGlobal:i}=pe.pageFilesData,{pageRoutes:o,onBeforeRouteHook:l}=await Ui(t,r,i,n),a=Mt();s(ke(a));const c={urlOriginal:e,_objectCreatedByVike:!0,_urlHandler:null,_urlRewrite:null,_baseServer:a,_isProduction:!0,_pageFilesAll:t,_pageConfigs:r,_pageConfigGlobal:i,_allPageIds:n,_pageRoutes:o,_onBeforeRouteHook:l};return Dt(c),c}function Yt(e){const t=e.getAttribute("href");return!!(t===null||t===""||zr(t)||qi(e)||Xi(t)||!Qi(t)||!Te(t)||!Ki(e))}function Ki(e){if(Zi()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function qi(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function Xi(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function Qi(e){const t=Mt();s(ke(t));const{hasBaseServer:n}=K(e,t);return n}function Zi(){return!!window._disableAutomaticLinkInterception}function eo(e,t){let n=to(e,t);return n==="viewport"&&!e._isProduction&&($e(!1,"Viewport prefetching is disabled in development",{onlyOnce:!0}),n="hover"),{prefetchStaticAssets:n}}function to(e,t){{const n=no(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&h(!1,"`export { prefetchLinks }` is deprecated, use `export { prefetchStaticAssets }` instead."),"prefetchStaticAssets"in e.exports){const{prefetchStaticAssets:n}=e.exports;if(n===!1)return!1;if(n==="hover")return"hover";if(n==="viewport")return"viewport";const r="prefetchStaticAssets value should be false, 'hover', or 'viewport'";h(I(n),r);const i=Object.keys(n);h(i.length===1&&i[0]==="when",r);const{when:o}=n;if(o==="HOVER"||o==="VIEWPORT"){const l=o.toLowerCase();return v(!1,`prefetchStaticAssets value \`{ when: '${o}' }\` is outdated: set prefetchStaticAssets to '${l}' instead`,{onlyOnce:!0}),l}h(!1,r)}return"hover"}function no(e){const t=e.getAttribute("data-prefetch-static-assets"),n=e.getAttribute("data-prefetch");if(t===null&&n===null)return null;const r="The attribute data-prefetch is outdated, use data-prefetch-static-assets instead.";if(t){if(h(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;h(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(s(!t),v(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";h(!1,`data-prefetch has value "${n}" but it should instead be "true" or "false"`)}s(!1)}const Kt=new Map;function ro(e){const t=qt(e);return Kt.has(t)}function io(e){const t=qt(e);Kt.set(t,!0)}function qt(e){return K(e,"/").pathname}function U(e){return e.fileType===".css"?[]:e.exportNames?e.exportNames:(s(e.fileExports,e.filePath),Object.keys(e.fileExports))}function oo({pageFilesClientSide:e,pageFilesServerSide:t,pageId:n}){return{isHtmlOnly:r(),isClientRouting:o()};function r(){return t.some(a=>a.pageId===n&&a.fileType===".page")?(i(),!1):!(!t.some(a=>a.pageId===n&&a.fileType===".page.server")||e.some(a=>a.pageId===n&&a.fileType===".page.client"&&U(a).includes("render")))}function i(){const l=e.some(a=>U(a).includes("render"));h(l,["No client-side `render()` hook found.","See https://vike.dev/render-modes for more information.",["Loaded client-side page files (none of them `export { render }`):",...e.map((a,u)=>` (${u+1}): ${a.filePath}`)].join(` -`)].join(" "))}function o(){return e.some(a=>U(a).includes("clientRouting"))}}function so({pageFilesClientSide:e,pageFilesServerSide:t,isHtmlOnly:n,isClientRouting:r}){let i=[];const o=t.filter(a=>!e.includes(a)),l=[];if(l.push(...e.map(a=>({id:a.filePath,onlyAssets:!1,eagerlyImported:!1}))),l.push(...o.map(a=>({id:a.filePath,onlyAssets:!0,eagerlyImported:!1}))),n)i=e.map(a=>a.filePath);else{const a=ao(r);l.push({id:a,onlyAssets:!1,eagerlyImported:!1}),i=[a]}return{clientEntries:i,clientDependencies:l}}function ao(e){return e?"@@vike/dist/esm/client/client-routing-runtime/entry.js":"@@vike/dist/esm/client/server-routing-runtime/entry.js"}function lo(e,t){let n=Oe(e,t);const r=Rt(e,t),{isHtmlOnly:i,isClientRouting:o}=oo({pageFilesClientSide:n,pageFilesServerSide:r,pageId:t});i&&(n=n.filter(u=>u.isEnv("CLIENT_ONLY")&&!U(u).includes("render")),n=co(n));const{clientEntries:l,clientDependencies:a}=so({pageFilesClientSide:n,pageFilesServerSide:r,isHtmlOnly:i,isClientRouting:o});return{isHtmlOnly:i,isClientRouting:o,clientEntries:l,clientDependencies:a,pageFilesClientSide:n,pageFilesServerSide:r}}async function uo(e,t,{sharedPageFilesAlreadyLoaded:n}){const r=Oe(e,t);await Promise.all(r.map(async i=>{var o;s(i.isEnv("CLIENT_ONLY")||i.isEnv("CLIENT_AND_SERVER")),!(n&&i.isEnv("CLIENT_AND_SERVER"))&&await((o=i.loadExportNames)==null?void 0:o.call(i))}))}function co(e){const t=[];for(const n of e)if(t.push(n),U(n).includes("overrideDefaultPages"))break;return t}function fo(e,t,n){var r,i;if(e){const o=((r=W(e,"clientRouting","boolean"))==null?void 0:r.value)??!1;return{isClientSideRenderable:((i=W(e,"isClientSideRenderable","boolean"))==null?void 0:i.value)??!1,isClientRouting:o}}else{const{isHtmlOnly:o,isClientRouting:l}=lo(t,n);return{isClientSideRenderable:!o,isClientRouting:l}}}async function Xt(e,t){await uo(t._pageFilesAll,e,{sharedPageFilesAlreadyLoaded:!1});const n=Ft(t._pageConfigs,e),{isClientSideRenderable:r,isClientRouting:i}=fo(n,t._pageFilesAll,e);return r&&i}const Qt="@",Pe=":";function go(e,t="Invalid"){let n=`${t} Route String ${L(e)}`;h(e!=="",`${n} (empty string): set it to ${L("/")} instead`),h(["/","*"].includes(e[0]),`${n}: it should start with ${L("/")} or ${L("*")}`),h(!e.includes("**"),`${n}: set it to ${L(e.split("**").join("*"))} instead`)}function ve(e,t){go(e);const n=Zt(e),r=n.map(f=>f.param?"[^/]+":f.glob?f.isLastDir?"|/.*":".*":jn(f.static)).map(f=>`(${f})`).join(""),i=new RegExp(`^${r}/?$`),o=t.match(i);if(!o)return null;const l={},[a,...u]=o;let c=0;const d=n.filter(f=>f.glob).length>1;return n.forEach((f,g)=>{let p=u[g];if(f.param&&(l[f.param]=p),f.glob){const S=`*${d?++c:""}`;f.isLastDir&&(p=p.slice(1)),l[S]=p}}),{routeParams:l}}function Zt(e){const t=[],n=i=>{const o=t[t.length-1];o!=null&&o.static?o.static+=i:t.push({static:i})},r=e.split("/");return r.forEach((i,o)=>{const l=o===0,a=o===r.length-1;ho(i)?(v(!i.startsWith(Pe),`Outdated Route String ${L(e)}, use ${L(e.split(Pe).join(Qt))} instead`,{onlyOnce:!0}),l||n("/"),t.push({param:i.slice(1)})):i==="*"&&a&&e!=="*"&&e!=="/*"?t.push({glob:!0,isLastDir:!0}):(l||n("/"),i.split("*").forEach((u,c)=>{c!==0&&t.push({glob:!0}),u!==""&&n(u)}))}),t}function Z(e){const t=Zt(e),n=a=>(a==null?void 0:a.split("/").filter(Boolean).length)||0;let r=0;for(const a of t){if(!a.static)break;r+=n(a.static)}const i=t.map(a=>n(a.static)).reduce((a,u)=>a+u,0),o=t.filter(a=>a.param).length,l=t.filter(a=>a.glob).length;return{numberOfStaticPartsBeginning:r,numberOfStaticParts:i,numberOfParams:o,numberOfGlobs:l}}function ho(e){return e.startsWith(Qt)||e.startsWith(Pe)}function tt(e){const n=ve(e,e);return s(n),Object.keys(n.routeParams).length===0}function L(e){return H()?`'${e}'`:(e===""&&(e="''"),m.cyan(e))}function po(e){e.sort(mo).sort(j(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence<0)).sort(j(t=>t.routeType==="STRING"&&tt(t.routeString)===!1)).sort(j(t=>t.routeType==="FUNCTION"&&!t.precedence)).sort(j(t=>t.routeType==="STRING"&&tt(t.routeString)===!0)).sort(j(t=>t.routeType==="FILESYSTEM")).sort(j(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence>0))}function mo(e,t){{const n=e.precedence??0,r=t.precedence??0;if(n!==r)return n>r?-1:1}if(!t.routeString||!e.routeString)return 0;{const r=te(i=>Z(i).numberOfStaticPartsBeginning)(e.routeString,t.routeString);if(r!==0)return r}{const r=te(i=>Z(i).numberOfStaticParts)(e.routeString,t.routeString);if(r!==0)return r}{const r=kn(i=>Z(i).numberOfGlobs)(e.routeString,t.routeString);if(r!==0)return r}{const r=te(i=>Z(i).numberOfParams)(e.routeString,t.routeString);if(r!==0)return r}return 0}async function yo(e){const t={};if(!e._onBeforeRouteHook)return null;const n=await bo(e._onBeforeRouteHook,e);return n&&(b(t,n),y(t,"_pageId","string")||y(t,"_pageId","null"))?(y(t,"routeParams")?s(y(t,"routeParams","object")):b(t,{routeParams:{}}),b(t,{_routingProvidedByOnBeforeRouteHook:!0,_debugRouteMatches:"CUSTOM_ROUTING"}),t):(b(t,{_routingProvidedByOnBeforeRouteHook:!1}),t)}async function bo(e,t){let n=e.onBeforeRoute(t);zt(n,`The onBeforeRoute() hook ${e.hookFilePath}`),n=await n;const r=`The onBeforeRoute() hook defined by ${e.hookFilePath}`;if(h(n==null||bi(n,["pageContext"])&&y(n,"pageContext"),`${r} should return ${m.cyan("null")}, ${m.cyan("undefined")}, or a plain JavaScript object ${m.cyan("{ pageContext: { /* ... */ } }")}`),n==null)return null;if(h(y(n,"pageContext","object"),`${r} returned ${m.cyan("{ pageContext }")} but pageContext should be a plain JavaScript object.`),y(n.pageContext,"_pageId")&&!y(n.pageContext,"_pageId","null")){const l=`${r} returned ${m.cyan("{ pageContext: { _pageId } }")} but ${m.cyan("_pageId")} should be`;h(y(n.pageContext,"_pageId","string"),`${l} a string or null`),h(t._allPageIds.includes(n.pageContext._pageId),`${l} ${Si(t._allPageIds.map(a=>m.cyan(a)),"or")}`)}y(n.pageContext,"routeParams")&&Gt(n.pageContext,`${r} returned ${m.cyan("{ pageContext: { routeParams } }")} but routeParams should`);const i=l=>`${r} returned ${m.cyan(`{ pageContext: { ${l} } }`)} which is deprecated. Return ${m.cyan("{ pageContext: { urlLogical } }")} instead.`;y(n.pageContext,"url")&&(v(!1,i("url"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.url,delete n.pageContext.url),y(n.pageContext,"urlOriginal")&&(v(!1,i("urlOriginal"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.urlOriginal,delete n.pageContext.urlOriginal),y(n.pageContext,"urlLogical")&&Pn(n.pageContext.urlLogical,`${r} returned ${m.cyan("{ pageContext: { urlLogical } }")} but ${m.cyan("urlLogical")}`),jt(n.pageContext,{hookFilePath:e.hookFilePath,hookName:"onBeforeRoute"});const o={};return b(o,n.pageContext),o}var ee;function nt(...e){var t;ee||(ee=(t=globalThis.__brillout_debug_createDebugger)==null?void 0:t.call(globalThis,"vike:routing")),ee&&ee(...e)}H()&&Y();async function en(e){nt("Pages routes:",e._pageRoutes),Dt(e);const t={},n=await yo(e);if(n){if(n._routingProvidedByOnBeforeRouteHook)return s(n._pageId),n;b(t,n)}const r={};b(r,e),b(r,n);const i=r._allPageIds;s(i.length>=0),h(r._pageFilesAll.length>0||r._pageConfigs.length>0,"No *.page.js file found. You must create at least one *.page.js file."),h(i.length>0,"You must create at least one *.page.js file that isn't _default.page.*");const{urlPathname:o}=r;s(o.startsWith("/"));const l=[];await Promise.all(r._pageRoutes.map(async u=>{const{pageId:c,routeType:d}=u;if(u.routeType==="FILESYSTEM"){const{routeString:f}=u,g=ve(f,o);if(g){const{routeParams:p}=g;l.push({pageId:c,routeParams:p,routeString:f,routeType:d})}return}if(u.routeType==="STRING"){const{routeString:f}=u,g=ve(f,o);if(g){const{routeParams:p}=g;s(d==="STRING"),l.push({pageId:c,routeString:f,routeParams:p,routeType:d})}return}if(u.routeType==="FUNCTION"){const{routeFunction:f,routeDefinedAt:g}=u,p=await Vi(f,r,g);if(p){const{routeParams:S,precedence:T}=p;l.push({pageId:c,precedence:T,routeParams:S,routeType:d})}return}s(!1)})),po(l);const a=l[0];if(nt(`Route matches for URL ${m.cyan(o)} (in precedence order):`,l),b(t,{_debugRouteMatches:l}),!a)return b(t,{_pageId:null,routeParams:{}}),t;{const{routeParams:u}=a;s(I(u)),b(t,{_pageId:a.pageId,routeParams:a.routeParams})}return t}Y();const rt=$("prefetch.ts",{linkPrefetchHandlerAdded:new Map});async function wo(e,t){try{await ie(e,t)}catch(n){if(He(n))Re(n,!0);else throw n}}function So(e){io(e.urlPathname),[...document.getElementsByTagName("A")].forEach(n=>{if(rt.linkPrefetchHandlerAdded.has(n))return;rt.linkPrefetchHandlerAdded.set(n,!0);const r=n.getAttribute("href");if(Yt(n)||(s(r),ro(r)))return;const{prefetchStaticAssets:i}=eo(e,n);if(i&&(i==="hover"&&(n.addEventListener("mouseover",()=>{me(r)}),n.addEventListener("touchstart",()=>{me(r)},{passive:!0})),i==="viewport")){const o=new IntersectionObserver(l=>{l.forEach(a=>{a.isIntersecting&&(me(r),o.disconnect())})});o.observe(n)}})}async function me(e){const t=await Jt(e);let n;try{n=await en(t)}catch{return}n!=null&&n._pageId&&await Xt(n._pageId,t)&&await wo(n._pageId,t)}async function Po(e,t){const n=Ne(e,t);let r=null,i;r=z(e,"render"),i="render";{const a=z(e,"onRenderClient");a&&(r=a,i="onRenderClient")}if(!r){const a=vo(e);if(s(a),e._pageConfigs.length>0)h(!1,`No onRenderClient() hook defined for URL '${a}', but it's needed, see https://vike.dev/onRenderClient`);else{const u=e._pageFilesLoaded.filter(d=>d.fileType===".page.client");let c;u.length===0?c="No file `*.page.client.*` found for URL "+a:c="One of the following files should export a render() hook: "+u.map(d=>d.filePath).join(" "),h(!1,c)}}s(r);const o=r.hookFn;s(i);const l=await ce(()=>o(n),i,r.hookFilePath);h(l===void 0,`The ${i}() hook defined by ${r.hookFilePath} isn't allowed to return a value`)}function vo(e){let t;try{t=e.urlPathname??e.urlOriginal}catch{}return t=t??window.location.href,t}function tn(e){if(e==="preserve-scroll")return;let t;if(e==="scroll-to-top-or-hash"){const n=Eo();if(n&&n!=="top"){const r=document.getElementById(n)||document.getElementsByName(n)[0];if(r){r.scrollIntoView();return}}t={x:0,y:0}}else s("x"in e&&"y"in e),t=e;Ro(t)}function Ro(e){const t=()=>window.scrollTo(e.x,e.y),n=()=>window.scrollX===e.x&&window.scrollY===e.y;n()||(t(),!n()&&requestAnimationFrame(()=>{t(),!n()&&setTimeout(async()=>{if(t(),n())return;const r=new Date().getTime();for(;;)if(await Dr(10),t(),n()||new Date().getTime()-r>100)return},0)}))}function Eo(){let{hash:e}=window.location;return e===""?null:(s(e.startsWith("#")),e=e.slice(1),e)}function _o(){window.addEventListener("scroll",Vr(Xe,Math.ceil(1e3/3)),{passive:!0}),kt(Xe)}const B=$("onBrowserHistoryNavigation.ts",{previousState:oe()});function Co(){window.addEventListener("popstate",()=>{const e=oe(),t=e.historyState.scrollPosition||"scroll-to-top-or-hash",n=e.historyState.triggedBy==="user",r=e.urlWithoutHash===B.previousState.urlWithoutHash,i=!e.historyState.timestamp||!B.previousState.historyState.timestamp?null:e.historyState.timestampnn.initialRenderIsDone&&Be())}function ko(){nn.initialRenderIsDone=!0}function Be(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual")}function it(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto")}const P=$("renderPageClientSide.ts",{renderCounter:0});async function G(e){var V,We;const{scrollTarget:t,urlOriginal:n=Fe(),overwriteLastHistoryEntry:r=!1,isBackwardNavigation:i,pageContextsFromRewrite:o=[],redirectCount:l=0,isUserLandPushStateNavigation:a,isClientSideNavigation:u=!0}=e,{abortRender:c,setHydrationCanBeAborted:d,isFirstRender:f}=Fo();if(s(u===!f),Ti(o.length,l),P.clientRoutingIsDisabled){ne(n);return}const g=await Jt(n);if(c())return;b(g,{isBackwardNavigation:i,isClientSideNavigation:u});{const w=Ci(o);b(g,w)}let p={};const S=w=>{s(w),s(!("err"in p)),s(!("errorWhileRendering"in g)),p.err=w,g.errorWhileRendering=w};if(!f){try{p={pageContextFromRoute:await en(g)}}catch(w){S(w)}if(c())return;if(p.pageContextFromRoute){const{pageContextFromRoute:w}=p;b(g,w);let _;if(!w._pageId)_=!1;else if(_=await Xt(w._pageId,g),c())return;if(!_){ne(n);return}const k=w._pageId&&((V=P.previousPageContext)==null?void 0:V._pageId)&&w._pageId===P.previousPageContext._pageId;if(a&&k)return}}const T=!f;if(T&&!P.isTransitioning&&(await((We=P.onPageTransitionStart)==null?void 0:We.call(P,g)),P.isTransitioning=!0,c()))return;if(f){s(!p.pageContextFromRoute),s(!p.err);try{p.pageContextFromHooks=await ki(g)}catch(w){S(w)}if(c())return}else if(!p.err){const{pageContextFromRoute:w}=p;s(w),s(w._pageId),s(y(w,"_pageId","string")),b(g,w);try{p.pageContextFromHooks=await xi(g)}catch(_){S(_)}if(c())return}if("err"in p){const{err:w}=p;if(Ze(w)||console.error(w),ot(w,g,f))return;if(Ze(w)){const _=w;_i(w,g._isProduction,g);const k=_._pageContextAbort;if(k._urlRewrite){await G({...e,scrollTarget:"scroll-to-top-or-hash",pageContextsFromRewrite:[...o,k]});return}if(k._urlRedirect){const fe=k._urlRedirect.url;if(fe.startsWith("http")){window.location.href=fe;return}else await G({...e,scrollTarget:"scroll-to-top-or-hash",urlOriginal:fe,overwriteLastHistoryEntry:!1,isBackwardNavigation:!1,redirectCount:l+1});return}s(k.abortStatusCode),b(g,k),k.abortStatusCode===404&&b(g,{is404:!0})}else b(g,{is404:!1});try{p.pageContextFromHooks=await Oi(g)}catch(_){if(ot(_,g,f)||(f||setTimeout(()=>{window.location.pathname=n},0),Wr(w,_)))return;throw _}if(c())return}const{pageContextFromHooks:C}=p;if(s(C),b(g,C),he(g,"onPageTransitionStart"),P.onPageTransitionStart=g.exports.onPageTransitionStart,g.exports.hydrationCanBeAborted?d():v(!Br(),"You seem to be using React; we recommend setting hydrationCanBeAborted to true, see https://vike.dev/clientRouting",{onlyOnce:!0}),!c()&&!(P.renderPromise&&(await P.renderPromise,s(P.renderPromise===void 0),c()))){if(Oo(n,r),P.previousPageContext=g,s(P.renderPromise===void 0),P.renderPromise=(async()=>{await Po(g,!0),So(g),P.renderPromise=void 0})(),await P.renderPromise,s(P.renderPromise===void 0),f){he(g,"onHydrationEnd");const{onHydrationEnd:w}=g.exports;if(w){const _=g.exportsAll.onHydrationEnd[0].exportSource;if(s(_),await ce(()=>w(g),"onHydrationEnd",_),c(!0))return}}if(!c(!0)){if(T){if(g.exports.onPageTransitionEnd&&(he(g,"onPageTransitionEnd"),await g.exports.onPageTransitionEnd(g),c(!0)))return;P.isTransitioning=void 0}tn(t),Be(),ko()}}}function Oo(e,t){Fe()!==e&&(Be(),Gr(e,t),$o())}function ot(e,t,n){return!!(Li(e)||xo(e,t,n))}function xo(e,t,n){if(!He(e))return!1;if(n)throw Re(e,!1),e;return Re(e,!0),ne(t.urlOriginal),!0}function Re(e,t){s(He(e)),P.clientRoutingIsDisabled=!0,t&&console.log(e),$e(!1,["Failed to fetch static asset.","This usually happens when a new frontend is deployed.","Falling back to Server Routing.","(The next page navigation will use Server Routing instead of Client Routing.)"].filter(Boolean).join(" "),{onlyOnce:!0})}function Fo(){const e=++P.renderCounter;s(e>=1);let t=!1;return{abortRender:i=>!i&&e===1&&!t?!1:e!==P.renderCounter,setHydrationCanBeAborted:()=>{t=!0},isFirstRender:e===1}}function st(){return P.renderCounter}function Io(){document.addEventListener("click",Ao)}function Ao(e){if(!jo(e))return;const t=Lo(e.target);if(!t)return;const n=t.getAttribute("href");if(Yt(t))return;s(n),e.preventDefault();const i=![null,"false"].includes(t.getAttribute("keep-scroll-position"))?"preserve-scroll":"scroll-to-top-or-hash";G({scrollTarget:i,urlOriginal:n,isBackwardNavigation:!1})}function jo(e){return e.button===0&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}function Lo(e){for(;e.tagName!=="A";){const{parentNode:t}=e;if(!t)return null;e=t}return e}function No(){To(),Ot(),_o(),Jr(),s(st()===0),G({scrollTarget:"preserve-scroll",isBackwardNavigation:null,isClientSideNavigation:!1}),s(st()===1),Io(),Co()}Y();const Ho=!0;un(Ho);No(); diff --git a/assets/entries/pages_error.8b35f51e.js b/assets/entries/pages_error.8b35f51e.js new file mode 100644 index 0000000..0eb928d --- /dev/null +++ b/assets/entries/pages_error.8b35f51e.js @@ -0,0 +1 @@ +import{g as e,i as a,t,o as l,L as i}from"../chunks/chunk-aca7cee1.js";const n=t("

404 Page Not Found"),u=t("

This page could not be found."),s=t("

"),d=t("

500 Internal Server Error"),f=t("

Something went wrong.");function p(o){return o.is404?[e(n),e(u),(()=>{const r=e(s);return a(r,()=>o.errorInfo),r})()]:[e(d),e(f)]}const m=Object.freeze(Object.defineProperty({__proto__:null,default:p},Symbol.toStringTag,{value:"Module"})),h=[{configName:"onRenderClient",importPath:"vike-solid/renderer/onRenderClient",isValueFile:!1,exportValue:l,exportName:"onRenderClient"},{configName:"Page",importPath:"/pages/_error/+Page.tsx",isValueFile:!0,exportValues:m},{configName:"Layout",importPath:"/layouts/LayoutDefault.tsx",isValueFile:!1,exportValue:i,exportName:"default"}],c={onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"vike-solid",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"},title:{definedAt:{filePathToShowToUser:"/pages/+config.h.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:'"Bati"'}};export{h as configValuesImported,c as configValuesSerialized}; diff --git a/assets/entries/pages_error.e76db8c7.js b/assets/entries/pages_error.e76db8c7.js deleted file mode 100644 index 219d2ad..0000000 --- a/assets/entries/pages_error.e76db8c7.js +++ /dev/null @@ -1 +0,0 @@ -import{g as e,i as a,t,o as n,L as l}from"../chunks/chunk-aca7cee1.js";const i=t("

404 Page Not Found"),u=t("

This page could not be found."),s=t("

"),p=t("

500 Internal Server Error"),m=t("

Something went wrong.");function f(o){return o.is404?[e(i),e(u),(()=>{const r=e(s);return a(r,()=>o.errorInfo),r})()]:[e(p),e(m)]}const g=Object.freeze(Object.defineProperty({__proto__:null,default:f},Symbol.toStringTag,{value:"Module"})),_=[{configName:"onRenderClient",importPath:"vike-solid/renderer/onRenderClient",isValueFile:!1,exportValue:n,exportName:"onRenderClient"},{configName:"Page",importPath:"/pages/_error/+Page.tsx",isValueFile:!0,exportValues:g},{configName:"Layout",importPath:"/layouts/LayoutDefault.tsx",isValueFile:!1,exportValue:l,exportName:"default"}];export{_ as default}; diff --git a/assets/entries/pages_index.bdac063c.js b/assets/entries/pages_index.bdac063c.js new file mode 100644 index 0000000..b30280c --- /dev/null +++ b/assets/entries/pages_index.bdac063c.js @@ -0,0 +1,2 @@ +import{g as d,s as C,c as h,a as A,t as c,b as Q,u as R,S as M,d as y,e as o,f as b,i as s,h as J,j as X,k as I,l as Y,m as Z,F as N,n as G,p as E,D as ee,q as te,r as le,o as ne,L as ie}from"../chunks/chunk-aca7cee1.js";const re="/assets/static/logo.059a8ea3.svg",se=c('Bati logo');function oe(e){return(()=>{const t=d(se);return C(t,"src",re),h(n=>{const l=e.size,i=e.size,r=e.class;return l!==n._v$&&C(t,"height",n._v$=l),i!==n._v$2&&C(t,"width",n._v$2=i),r!==n._v$3&&A(t,n._v$3=r),n},{_v$:void 0,_v$2:void 0,_v$3:void 0}),t})()}function ae(e){let t;async function n(){clearTimeout(t);const l=window.getSelection();if(l){const i=l.toString().replaceAll(` +`," ");await navigator.clipboard.writeText(i),e.classList.add("tooltip","tooltip-open"),t=setTimeout(()=>{e.classList.remove("tooltip","tooltip-open")},3e3)}}e.addEventListener("click",n),Q(()=>e.removeEventListener("click",n))}function K(e){var t,n,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t"),ce=c(""),ue=c("Scaffolds a web app using ."),fe=new Intl.ListFormat("en"),ge={label:"Vike",url:"https://vike.dev"};function $e(e){return e.feature.url?(()=>{const t=d(de),n=t.firstChild;return s(n,()=>e.feature.label),h(l=>{const i=e.feature.url,r=B("text-primary link link-hover",e.feature.label==="Vike"&&"font-semibold");return i!==l._v$&&C(t,"href",l._v$=i),r!==l._v$2&&A(n,l._v$2=r),l},{_v$:void 0,_v$2:void 0}),t})():(()=>{const t=d(ce);return s(t,()=>e.feature.label),h(()=>A(t,B("text-primary",e.feature.label==="Vike"&&"font-semibold"))),t})()}function ve(){const{selectedFeatures:e}=R(M),t=y(()=>[ge,...e()]),n=y(()=>fe.formatToParts(t().map(l=>l.label)).map(l=>l.type==="literal"?l.value:o($e,{get feature(){return t().find(i=>i.label===l.value)}})));return(()=>{const l=d(ue),i=l.firstChild,r=i.nextSibling,[a,f]=b(r.nextSibling);return a.nextSibling,s(l,n,a,f),l})()}function _e(e,t){const n=t();n&&(e.setAttribute("data-flip-name",n),e.style.viewTransitionName=n)}const be=c('

');function me(e){return(()=>{const t=d(be),n=t.firstChild,l=n.nextSibling,[i,r]=b(l.nextSibling);return J(_e,t,()=>e.flipLabel),s(n,()=>e.label),s(t,()=>e.children,i,r),h(a=>{const f=B("form-control",e.class),$=e.style,v=e.classList;return f!==a._v$&&A(t,a._v$=f),a._v$2=X(t,$,a._v$2),a._v$3=I(t,v,a._v$3),a},{_v$:void 0,_v$2:void 0,_v$3:void 0}),t})()}const xe=c('
'),he=c('
'),we=c('
- - + + + \ No newline at end of file diff --git a/vike.json b/vike.json index 4ecc183..dd61114 100644 --- a/vike.json +++ b/vike.json @@ -1,5 +1,5 @@ { - "version": "0.4.145", + "version": "0.4.147", "usesClientRouter": false, "manifestKeyMap": {}, "baseServer": "/",