vuer 0.0.25__py3-none-any.whl → 0.0.29rc8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vuer might be problematic. Click here for more details.

Files changed (90) hide show
  1. vuer/__init__.py +2 -0
  2. vuer/__pycache__/__init__.cpython-38.pyc +0 -0
  3. vuer/__pycache__/base.cpython-38.pyc +0 -0
  4. vuer/__pycache__/serdes.cpython-38.pyc +0 -0
  5. vuer/__pycache__/server.cpython-38.pyc +0 -0
  6. vuer/base.py +35 -11
  7. vuer/client_build/404.html +18 -0
  8. vuer/client_build/assets/chunks/chunk-033cd999.js +87 -0
  9. vuer/client_build/assets/chunks/chunk-0c07adda.js +17 -0
  10. vuer/client_build/assets/chunks/chunk-0c7b0c67.js +4502 -0
  11. vuer/client_build/assets/chunks/chunk-11242fef.js +87 -0
  12. vuer/client_build/assets/chunks/chunk-11d172c6.js +220 -0
  13. vuer/client_build/assets/chunks/chunk-1573e13d.js +87 -0
  14. vuer/client_build/assets/chunks/chunk-1581dd07.js +4502 -0
  15. vuer/client_build/assets/chunks/chunk-181cf52e.js +4502 -0
  16. vuer/client_build/assets/chunks/chunk-1ffa2560.js +1 -0
  17. vuer/client_build/assets/chunks/chunk-2b009735.js +87 -0
  18. vuer/client_build/assets/chunks/chunk-2c9e68dc.js +220 -0
  19. vuer/client_build/assets/chunks/chunk-32d88b6c.js +87 -0
  20. vuer/client_build/assets/chunks/chunk-3d6a174a.js +87 -0
  21. vuer/client_build/assets/chunks/chunk-3d735b94.js +2 -0
  22. vuer/client_build/assets/chunks/chunk-4291d1b1.js +4502 -0
  23. vuer/client_build/assets/chunks/chunk-46602646.js +1 -0
  24. vuer/client_build/assets/chunks/chunk-4909c71c.js +1 -0
  25. vuer/client_build/assets/chunks/chunk-6b435eb3.js +220 -0
  26. vuer/client_build/assets/chunks/chunk-98620ee4.js +87 -0
  27. vuer/client_build/assets/chunks/chunk-9d4c7361.js +220 -0
  28. vuer/client_build/assets/chunks/chunk-a6eac392.js +220 -0
  29. vuer/client_build/assets/chunks/chunk-b0bf2d23.js +1 -0
  30. vuer/client_build/assets/chunks/chunk-bdd7c22e.js +220 -0
  31. vuer/client_build/assets/chunks/chunk-c353222d.js +4502 -0
  32. vuer/client_build/assets/chunks/chunk-c7c41535.js +4502 -0
  33. vuer/client_build/assets/chunks/chunk-cd30d081.js +1 -0
  34. vuer/client_build/assets/chunks/chunk-ceb3463c.js +24 -0
  35. vuer/client_build/assets/chunks/chunk-cf010ec4.js +1 -0
  36. vuer/client_build/assets/chunks/chunk-d7665daa.js +1 -0
  37. vuer/client_build/assets/chunks/chunk-d8996854.js +1 -0
  38. vuer/client_build/assets/chunks/chunk-e1dbff7e.js +220 -0
  39. vuer/client_build/assets/chunks/chunk-f6ac826f.js +4502 -0
  40. vuer/client_build/assets/entries/entry-client-routing.09665e16.js +2 -0
  41. vuer/client_build/assets/entries/entry-client-routing.9b421a83.js +2 -0
  42. vuer/client_build/assets/entries/entry-client-routing.b091f770.js +2 -0
  43. vuer/client_build/assets/entries/entry-client-routing.b0e9432f.js +2 -0
  44. vuer/client_build/assets/entries/entry-client-routing.d2f1fe7f.js +2 -0
  45. vuer/client_build/assets/entries/entry-client-routing.f109ec3a.js +2 -0
  46. vuer/client_build/assets/entries/entry-client-routing.fef74cf7.js +2 -0
  47. vuer/client_build/assets/entries/entry-server-routing.05de3b91.js +1 -0
  48. vuer/client_build/assets/entries/entry-server-routing.05f74fe9.js +1 -0
  49. vuer/client_build/assets/entries/entry-server-routing.9a7f23b8.js +1 -0
  50. vuer/client_build/assets/entries/entry-server-routing.c86174f6.js +1 -0
  51. vuer/client_build/assets/entries/entry-server-routing.cdb49a95.js +1 -0
  52. vuer/client_build/assets/entries/entry-server-routing.ed130910.js +1 -0
  53. vuer/client_build/assets/entries/entry-server-routing.fddd53eb.js +1 -0
  54. vuer/client_build/assets/entries/pages_hands.page.08c7d15b.js +1 -0
  55. vuer/client_build/assets/entries/pages_hands.page.12ccbd32.js +1 -0
  56. vuer/client_build/assets/entries/pages_hands.page.40ebd865.js +1 -0
  57. vuer/client_build/assets/entries/pages_hands.page.6f1e3303.js +1 -0
  58. vuer/client_build/assets/entries/pages_hands.page.724feffe.js +1 -0
  59. vuer/client_build/assets/entries/pages_hands.page.85f51479.js +1 -0
  60. vuer/client_build/assets/entries/pages_hands.page.fb90f80e.js +1 -0
  61. vuer/client_build/assets/entries/pages_index.page.25e5c467.js +97 -0
  62. vuer/client_build/assets/entries/pages_index.page.25ffff8e.js +97 -0
  63. vuer/client_build/assets/entries/pages_index.page.323784ad.js +97 -0
  64. vuer/client_build/assets/entries/pages_index.page.76e4864a.js +97 -0
  65. vuer/client_build/assets/entries/pages_index.page.95009002.js +97 -0
  66. vuer/client_build/assets/entries/pages_index.page.fb9c94fd.js +97 -0
  67. vuer/client_build/assets/entries/pages_index.page.fbb86891.js +97 -0
  68. vuer/client_build/assets/entries/renderer_default.page.client.98b62a91.js +1 -0
  69. vuer/client_build/assets/entries/renderer_default.page.server.extractAssets.4ed993c7.js +1 -0
  70. vuer/client_build/assets/entries/renderer_error.page.4485c2ac.js +1 -0
  71. vuer/client_build/assets/static/default.page.client.7be06a4d.css +1 -0
  72. vuer/client_build/assets/static/loading.ade72bfe.svg +5 -0
  73. vuer/client_build/assets/static/logo.bebe2e90.svg +36 -0
  74. vuer/client_build/hands/index.html +19 -0
  75. vuer/client_build/hands/index.pageContext.json +1 -0
  76. vuer/client_build/index.html +19 -0
  77. vuer/client_build/index.pageContext.json +1 -0
  78. vuer/client_build/vike.json +11 -0
  79. vuer/schemas/__pycache__/html_components.cpython-38.pyc +0 -0
  80. vuer/schemas/__pycache__/scene_components.cpython-38.pyc +0 -0
  81. vuer/schemas/html_components.py +7 -3
  82. vuer/schemas/scene_components.py +60 -6
  83. vuer/server.py +61 -16
  84. {vuer-0.0.25.dist-info → vuer-0.0.29rc8.dist-info}/METADATA +20 -10
  85. vuer-0.0.29rc8.dist-info/RECORD +109 -0
  86. vuer-0.0.25.dist-info/RECORD +0 -37
  87. {vuer-0.0.25.dist-info → vuer-0.0.29rc8.dist-info}/LICENSE +0 -0
  88. {vuer-0.0.25.dist-info → vuer-0.0.29rc8.dist-info}/WHEEL +0 -0
  89. {vuer-0.0.25.dist-info → vuer-0.0.29rc8.dist-info}/entry_points.txt +0 -0
  90. {vuer-0.0.25.dist-info → vuer-0.0.29rc8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ function Pe(){return!(typeof process>"u"||!process.cwd||!process.versions||typeof process.versions.node>"u"||!process.release||process.release.name!=="node")}function U(e,t){let n;{var r=Error.stackTraceLimit;Error.stackTraceLimit=1/0,n=new Error(e),Error.stackTraceLimit=r}return Pe()&&(n.stack=Re(n.stack,t)),n}function Re(e,t){if(!e)return e;const n=Ie(e);let r=0;return n.filter(s=>s.includes(" (internal/")||s.includes(" (node:internal")?!1:r<t&&ke(s)?(r++,!1):!0).join(`
2
+ `)}function ke(e){return e.startsWith(" at ")}function Ie(e){return e.split(/\r?\n/)}function R(e,t){const n=globalThis.__vike=globalThis.__vike||{};return n[e]=n[e]||t}function $(e){return typeof e=="object"&&e!==null}function G(e){return Array.from(new Set(e))}const S=R("assertPackageInstances.ts",{instances:[],alreadyLogged:new Set}),ae="The client runtime of Server Routing as well as the client runtime of Client Routing are both being loaded. Make sure they aren't loaded both at the same time for a given page. See https://vike.dev/client-runtimes-conflict",B="Two vike client runtime instances are being loaded. Make sure your client-side bundles don't include vike twice. (In order to reduce the size of your client-side JavaScript bundles.)";function M(){{const e=G(S.instances);Oe(e.length<=1,`Both vike@${e[0]} and vike@${e[1]} loaded. Only one version should be loaded.`)}S.checkSingleInstance&&S.instances.length>1&&I(!1,B,{onlyOnce:!0,showStackTrace:!0})}function Xt(e){I(S.isClientRouting!==!0,ae,{onlyOnce:!0,showStackTrace:!0}),I(S.isClientRouting===void 0,B,{onlyOnce:!0,showStackTrace:!0}),S.isClientRouting=!1,e&&(S.checkSingleInstance=!0),M()}function Kt(e){I(S.isClientRouting!==!1,ae,{onlyOnce:!0,showStackTrace:!0}),I(S.isClientRouting===void 0,B,{onlyOnce:!0,showStackTrace:!0}),S.isClientRouting=!0,e&&(S.checkSingleInstance=!0),M()}function je(e){S.instances.push(e),M()}function Oe(e,t){if(e)return;const n=`[vike][Wrong Usage] ${t}`;throw new Error(n)}function I(e,t,{onlyOnce:n,showStackTrace:r}){if(e)return;const i=`[vike][Warning] ${t}`;if(n){const{alreadyLogged:s}=S,l=n===!0?i:n;if(s.has(l))return;s.add(l)}console.warn(r?new Error(i):i)}const _e="0.4.148",b={projectName:"Vike",projectVersion:_e,npmPackageName:"vike",githubRepository:"https://github.com/vikejs/vike"};je(b.projectVersion);const le=new Proxy(e=>e,{get:()=>le}),p=le,E=R("utils/assert.ts",{alreadyLogged:new Set,logger(e,t){t==="info"?console.log(e):console.warn(e)},showStackTraceList:new WeakSet}),xe=`[${b.npmPackageName}]`,Ce=`[${b.npmPackageName}@${b.projectVersion}]`,J=2;function o(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 ${b.projectName} maintainers; you can ignore this): ${a}`)})(),r=`${b.githubRepository}/issues/new`;let i=[`You stumbled upon a bug in ${b.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=O(i),i=W(i,"Bug"),i=_(i,!0);const s=U(i,J);throw(l=E.onBeforeLog)==null||l.call(E),s}function g(e,t,{showStackTrace:n}={}){var i;if(e)return;t=O(t),t=W(t,"Wrong Usage"),t=_(t);const r=U(t,J);throw n&&E.showStackTraceList.add(r),(i=E.onBeforeLog)==null||i.call(E),r}function Fe(e){return e=O(e),e=W(e,"Error"),e=_(e),U(e,J)}function j(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(t=O(t),t=W(t,"Warning"),t=_(t),n){const{alreadyLogged:s}=E,l=n===!0?t:n;if(s.has(l))return;s.add(l)}if((i=E.onBeforeLog)==null||i.call(E),r){const s=new Error(t);E.showStackTraceList.add(s),E.logger(s,"warn")}else E.logger(t,"warn")}}function Qt(e,t,{onlyOnce:n}){var r;if(!e){if(t=O(t),t=_(t),n){const{alreadyLogged:i}=E,s=t;if(i.has(s))return;i.add(s)}(r=E.onBeforeLog)==null||r.call(E),E.logger(t,"info")}}function W(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=p.bold(p[r](n)),`${n}${e}`}function O(e){return e.startsWith("[")?e:` ${e}`}function _(e,t=!1){return`${t?Ce:xe}${e}`}function Y(){return typeof window<"u"&&typeof window.scrollY=="number"}const C=R("utils/assertRouterType.ts",{});function Zt(){ce(Le()),C.isClientRouting=!0}function Le(){return C.isClientRouting!==!1}function en(){ce(C.isClientRouting!==!0),C.isClientRouting=!1}function ce(e){g(Y(),`${p.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),j(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 We=["js","ts","cjs","cts","mjs","mts","jsx","tsx","cjsx","ctsx","mjsx","mtsx"],ue=["vue","svelte","marko","md","mdx"],Ae=[...We,...ue];function fe(e){const t=Ae.some(n=>e.endsWith("."+n));return o(!Ve(e)||t),t}function Ve(e){return/\.(c|m)?(j|t)sx?$/.test(e)}function De(e){return ue.some(t=>e.endsWith("."+t))}function F(e,t,n){return typeof e=="string"?Q(e.split(""),t,n).join(""):Q(e,t,n)}function Q(e,t,n){const r=[];let i=t>=0?t:e.length+t;o(i>=0&&i<=e.length);let s=n>=0?n:e.length+n;for(o(s>=0&&s<=e.length);!(i===s||(i===e.length&&(i=0),i===s));){const l=e[i];o(l!==void 0),r.push(l),i++}return r}const de=["http://","https://","tauri://"];function ge(e){return de.some(t=>e.startsWith(t))||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function tn(e,t){o(t.includes(" but ")),g(typeof e=="string",`${t} should be a string`),!ge(e)&&(!e.startsWith("/")&&!e.includes(":")?g(!1,`${t} is ${p.cyan(e)} and it should be /${p.cyan(e)} instead (URL pathnames should start with a leading slash)`):g(!1,`${t} isn't a valid URL`))}function ze(e,t){o(ge(e)),o(t.startsWith("/"));const[n,...r]=e.split("#");o(n!==void 0);const i=["",...r].join("#")||null;o(i===null||i.startsWith("#"));const s=i===null?"":D(i.slice(1)),[l,...a]=n.split("?");o(l!==void 0);const c=["",...a].join("?")||null;o(c===null||c.startsWith("?"));const u={},f={};Array.from(new URLSearchParams(c||"")).forEach(([v,K])=>{u[v]=K,f[v]=[...f.hasOwnProperty(v)?f[v]:[],K]});const{origin:d,pathname:h}=He(l,t);o(d===null||d===D(d)),o(h.startsWith("/")),o(d===null||e.startsWith(d));const m=l.slice((d||"").length);Je(e,d,m,c,i);let{pathname:w,hasBaseServer:k}=Be(h,t);return w=Ne(w),o(w.startsWith("/")),{origin:d,pathname:w,pathnameOriginal:m,hasBaseServer:k,search:u,searchAll:f,searchOriginal:c,hash:s,hashOriginal:i}}function D(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function Ne(e){return e=e.replace(/\s+$/,""),e=e.split("/").map(t=>D(t).split("/").join("%2F")).join("/"),e}function He(e,t){var n;o(!e.includes("?")&&!e.includes("#"));{const{origin:r,pathname:i}=Z(e);if(r)return{origin:r,pathname:i};o(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{const r=typeof window<"u"?(n=window==null?void 0:window.document)==null?void 0:n.baseURI:void 0;let i;return r?i=Z(r.split("?")[0]).pathname:i=t,{origin:null,pathname:Ue(e,i)}}}function Z(e){if(de.some(t=>e.startsWith(t))){const[t,n,r,...i]=e.split("/"),s=[t,n,r].join("/"),l=["",...i].join("/")||"/";return{origin:s,pathname:l}}else return{pathname:e,origin:null}}function Ue(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 s=n.join("/");return i&&!s.endsWith("/")&&(s+="/"),s.startsWith("/")||(s="/"+s),s}function Ge(e){o(e.startsWith("/")),o(!e.includes("?")),o(!e.includes("#"))}function Be(e,t){Ge(e),o(Me(t));let n=e;if(o(n.startsWith("/")),o(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===F(t,0,-1)&&(r=F(t,0,-1),o(n===r)),n.startsWith(r)?(o(n.startsWith("/")||n.startsWith("http")),o(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),o(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function Me(e){return e.startsWith("/")}function Je(e,t,n,r,i){const s=Ye(t,n,r,i);o(e===s)}function Ye(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function q(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function A(e){return e instanceof Function||typeof e=="function"}function nn(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function rn(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r<i?-1:1}}function qe(e){return(t,n)=>{const r=e(t),i=e(n);if(o([!0,!1,null].includes(r)),o([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;o(!1)}}function Xe(e){return qe(t=>{const n=e(t);return n===null?null:!n})}function y(e,t,n="unknown"){if(!$(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"?$(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 Ke(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}const Qe=e=>e!=null;function he(e){const t=n=>`Not a posix path: ${n}`;o(e!==null,t("null")),o(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),o(e!=="",t("(empty string)")),o(e),o(!e.includes("\\"),t(e))}const Ze=["clientRouting"];function et(e){Ze.forEach(t=>{if(o(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;g(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),g(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const pe=["render","clientRouting","prerender","doNotPrerender"];function tt(e,t){g(!pe.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function nt(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;o(n!=="*");let i="",s="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(a=>{i=`${i} { ${a}`,s=` }${s}`}),i+s}function me(e,t,{definedAt:n}){const r=rt(n,t),i=r==="internally"?r:`at ${r}`;let s=`${t}`;return`${e} ${p.cyan(s)} defined ${i}`}function rt(e,t){if("isComputed"in e)return"internally";let n;return"files"in e?n=e.files:n=[e],o(n.length>=1),n.map(i=>{const{filePathToShowToUser:s,fileExportPathToShowToUser:l}=i;let a=s;const c=nt(l,t);return c&&(a=`${a} > ${p.cyan(c)}`),a}).join(" / ")}function sn(e,t){const n=t.find(r=>r.pageId===e);return o(t.length>0),o(n),n}function ye({definedAt:e}){if("isComputed"in e||"files"in e)return null;const{filePathToShowToUser:t}=e;return o(t),t}function it({definedAt:e}){const t=ye({definedAt:e});return o(t),t}function st(e,t){const n={},r={},i={};e.forEach(a=>{ot(a).forEach(({exportName:u,exportValue:f,isFromDefaultExport:d})=>{o(u!=="default"),i[u]=i[u]??[],i[u].push({exportValue:f,exportSource:`${a.filePath} > ${d?`\`export default { ${u} }\``:`\`export { ${u} }\``}`,filePath:a.filePath,_filePath:a.filePath,_fileType:a.fileType,_isFromDefaultExport:d})})}),t&&Object.entries(t.configValues).forEach(([a,c])=>{const{value:u}=c,f=ye(c),d=me("Config",a,c);r[a]=r[a]??u,n[a]=n[a]??[],o(n[a].length===0),n[a].push({configValue:u,configDefinedAt:d,configDefinedByFile:f});const h=a;i[h]=i[h]??[],i[h].push({exportValue:u,exportSource:d,filePath:f,_filePath:f,_fileType:null,_isFromDefaultExport:null})});const s=at(),l={};return Object.entries(i).forEach(([a,c])=>{c.forEach(({exportValue:u,_fileType:f,_isFromDefaultExport:d})=>{l[a]=l[a]??u,f===".page"&&!d&&(a in s||(s[a]=u))})}),o(!("default"in l)),o(!("default"in i)),{config:r,configEntries:n,exports:l,exportsAll:i,pageExports:s}}function ot(e){const{filePath:t,fileExports:n}=e;o(n),o(fe(t));const r=[];return Object.entries(n).sort(Xe(([i])=>i==="default")).forEach(([i,s])=>{let l=i==="default";if(l)if(De(t))i="Page";else{g($(s),`The ${p.cyan("export default")} of ${t} should be an object.`),Object.entries(s).forEach(([a,c])=>{tt(a,t),r.push({exportName:a,exportValue:c,isFromDefaultExport:l})});return}r.push({exportName:i,exportValue:s,isFromDefaultExport:l})}),r.forEach(({exportName:i,isFromDefaultExport:s})=>{o(!(s&&pe.includes(i)))}),r}function at(){return new Proxy({},{get(...e){return Y()||j(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}function lt(e){const t=".page.",n=F(e.split(t),0,-1).join(t);return o(!n.includes("\\")),n}function P(e){he(e)}function on(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(g(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=G(e.map(({pageId:r})=>r).filter(r=>V(r)));if(g(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return o(r),r}return null}function V(e,t){return o(!e.includes("\\")),e.includes("/_error")}function ct(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return o(n),!!n.isErrorPage}else return V(e)}const ut=[".page",".page.server",".page.route",".page.client",".css"];function ft(e){if(he(e),e.endsWith(".css"))return".css";o(fe(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(o(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";o(!1,e)}function Ee(e){const t=s=>i.pageId===s||i.isDefaultPageFile&&(ee(i.filePath)||dt(s,i.filePath)),n=ft(e),i={filePath:e,fileType:n,isEnv:s=>{if(o(n!==".page.route"),s==="CLIENT_ONLY")return n===".page.client"||n===".css";if(s==="SERVER_ONLY")return n===".page.server";if(s==="CLIENT_AND_SERVER")return n===".page";o(!1)},isRelevant:t,isDefaultPageFile:z(e),isRendererPageFile:n!==".css"&&z(e)&&ee(e),isErrorPageFile:V(e),pageId:lt(e)};return i}function z(e){return P(e),V(e)?!1:e.includes("/_default")}function ee(e){return P(e),e.includes("/renderer/")}function dt(e,t){P(e),P(t),o(!e.endsWith("/")),o(!t.endsWith("/")),o(z(t));const n=F(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function gt(e){o(Array.isArray(e)),e.forEach(t=>{o($(t)),o(y(t,"pageId","string")),o(y(t,"routeFilesystem")),o(y(t,"configValuesSerialized")),o(y(t,"configValuesImported"))})}function ht(e){o(y(e,"configValuesImported"))}const pt=["$$registrations","_rerender_only"],mt=[".md",".mdx"];function yt(e,t,n){Et(e,t,n)}function Et(e,t,n){const i=Object.keys(e).filter(l=>!pt.includes(l)),s=i.filter(l=>l!=="default"&&l!==n);if(s.length===0){if(i.length===1)return;{o(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} }`)}`),g(!1,l)}}else if(n){if(mt.some(l=>t.endsWith(l)))return;s.forEach(l=>{j(!1,`${t} should have only a single export: move ${p.cyan(`export { ${l} }`)} to +config.h.js or its own +${s}.js`,{onlyOnce:!0})})}else{const l=s.join(", ");g(!1,`${t} replace ${p.cyan(`export { ${l} }`)} with ${p.cyan(`export default { ${l} }`)}`)}}function N(e){const t={},n=(r,i,s,l)=>{t[r]={value:i,definedAt:{filePathToShowToUser:s,fileExportPathToShowToUser:[r,"default"].includes(l)?[]:[l]}},wt(i,r,s)};return e.forEach(r=>{if(r.isValueFile){const{exportValues:i,importPath:s,configName:l}=r;l!=="client"&&yt(i,s,l),Object.entries(i).forEach(([a,c])=>{const u=a!=="default",f=u?a:r.configName;u&&f in t||n(f,c,s,a)})}else{const{configName:i,importPath:s,exportValue:l,exportName:a}=r;n(i,l,s,a)}}),t}function wt(e,t,n){o(!n.includes("+config."))}const St=[{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 X(e){const t=JSON.parse(e);return we(t)}function we(e){return typeof e=="string"?$t(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=we(n)}),e)}function $t(e){for(const{match:t,deserialize:n}of St)if(t(e))return n(e,X);return e}function Se(e){const t={};return Object.entries(e).forEach(([n,r])=>{const{valueSerialized:i,definedAt:s}=r;o(i),o(!t[n]),t[n]={value:X(i),definedAt:s}}),t}function vt(e,t){const n=e.map(i=>{const s={};{const{configValuesSerialized:f}=i,d=Se(f);Object.assign(s,d)}{const{configValuesImported:f}=i,d=N(f);Object.assign(s,d)}const{pageId:l,isErrorPage:a,routeFilesystem:c,loadConfigValuesAll:u}=i;return Tt(s),{pageId:l,isErrorPage:a,routeFilesystem:c,configValues:s,loadConfigValuesAll:u}}),r={configValues:{}};{const i=N(t.configValuesImported);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function Tt(e){const t="route",n=e[t];if(!n)return;const{value:r}=n,i=typeof r,s=me("Config",t,n);g(i==="string"||A(r),`${s} has an invalid type '${i}': it should be a string or a function instead, see https://vike.dev/route`)}function bt(e){o(y(e,"isGeneratedFile")),o(e.isGeneratedFile!==!1,"vike was re-installed(/re-built). Restart your app."),o(e.isGeneratedFile===!0,`\`isGeneratedFile === ${e.isGeneratedFile}\``),o(y(e,"pageFilesLazy","object")),o(y(e,"pageFilesEager","object")),o(y(e,"pageFilesExportNamesLazy","object")),o(y(e,"pageFilesExportNamesEager","object")),o(y(e.pageFilesLazy,".page")),o(y(e.pageFilesLazy,".page.client")||y(e.pageFilesLazy,".page.server")),o(y(e,"pageFilesList","string[]")),o(y(e,"pageConfigsSerialized")),o(y(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;gt(t),ht(n);const{pageConfigs:r,pageConfigGlobal:i}=vt(t,n),s={};x(e.pageFilesLazy).forEach(({filePath:a,pageFile:c,globValue:u})=>{c=s[a]=s[a]??c;const f=u;te(f),c.loadFile=async()=>{"fileExports"in c||(c.fileExports=await f(),et(c))}}),x(e.pageFilesExportNamesLazy).forEach(({filePath:a,pageFile:c,globValue:u})=>{c=s[a]=s[a]??c;const f=u;te(f),c.loadExportNames=async()=>{if(!("exportNames"in c)){const d=await f();g("exportNames"in d,"You seem to be using Vite 2 but the latest vike versions only work with Vite 3"),o(y(d,"exportNames","string[]"),c.filePath),c.exportNames=d.exportNames}}}),x(e.pageFilesEager).forEach(({filePath:a,pageFile:c,globValue:u})=>{c=s[a]=s[a]??c;const f=u;o($(f)),c.fileExports=f}),x(e.pageFilesExportNamesEager).forEach(({filePath:a,pageFile:c,globValue:u})=>{c=s[a]=s[a]??c;const f=u;o($(f)),o(y(f,"exportNames","string[]"),c.filePath),c.exportNames=f.exportNames}),e.pageFilesList.forEach(a=>{s[a]=s[a]??Ee(a)});const l=Object.values(s);return l.forEach(({filePath:a})=>{o(!a.includes("\\"))}),{pageFiles:l,pageConfigs:r,pageConfigGlobal:i}}function x(e){const t=[];return Object.entries(e).forEach(([n,r])=>{o(ut.includes(n)),o($(r)),Object.entries(r).forEach(([i,s])=>{const l=Ee(i);o(l.fileType===n),t.push({filePath:i,pageFile:l,globValue:s})})}),t}function te(e){o(A(e))}const T=R("setPageFiles.ts",{});function an(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=bt(e);T.pageFilesAll=t,T.pageConfigs=n,T.pageConfigGlobal=r}async function ln(e,t){e?(o(!T.pageFilesGetter),o(t===void 0)):(o(T.pageFilesGetter),o(typeof t=="boolean"),(!T.pageFilesAll||!t)&&await T.pageFilesGetter());const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=T;o(n&&r&&i);const s=Pt(n,r);return{pageFilesAll:n,allPageIds:s,pageConfigs:r,pageConfigGlobal:i}}function Pt(e,t){const n=e.filter(({isDefaultPageFile:s})=>!s).map(({pageId:s})=>s),r=G(n),i=t.map(s=>s.pageId);return[...r,...i]}function Rt(e,t){return $e(e,t,!0)}function cn(e,t){return $e(e,t,!1)}function $e(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(m=>m.isRelevant(t)&&m.fileType!==".page.route").sort(kt(n,t)),s=m=>{const w=i.filter(v=>v.pageId===t&&v.isEnv(m?"CLIENT_AND_SERVER":r));g(w.length<=1,`Merge the following files into a single file: ${w.map(v=>v.filePath).join(" ")}`);const k=w[0];return o(k===void 0||!k.isDefaultPageFile),k},l=s(!1),a=s(!0),c=m=>i.filter(w=>w.isRendererPageFile&&w.isEnv(m?"CLIENT_AND_SERVER":r))[0],u=c(!1),f=c(!0),d=i.filter(m=>m.isDefaultPageFile&&!m.isRendererPageFile&&(m.isEnv(r)||m.isEnv("CLIENT_AND_SERVER")));return[l,a,...d,u,f].filter(Qe)}function kt(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,s=0;return(l,a)=>{if(!l.isDefaultPageFile&&a.isDefaultPageFile)return r;if(!a.isDefaultPageFile&&l.isDefaultPageFile)return i;{const c=l.isRendererPageFile,u=a.isRendererPageFile;if(!c&&u)return r;if(!u&&c)return i;o(c===u)}{const c=ne(t,l.filePath),u=ne(t,a.filePath);if(c<u)return r;if(u<c)return i;o(c===u)}{if(l.isEnv(n)&&a.isEnv("CLIENT_AND_SERVER"))return r;if(a.isEnv(n)&&l.isEnv("CLIENT_AND_SERVER"))return i}return s}}function ne(e,t){P(e),P(t);let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);const r=e.slice(n),i=t.slice(n),s=r.split("/").length,l=i.split("/").length;return s+l}function It(){o(Y())}function jt(){It()}function re(e){const t=e/1e3;if(t<120){const n=ie(t);return`${n} second${se(n)}`}{const n=t/60,r=ie(n);return`${r} minute${se(r)}`}}function ie(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function se(e){return e==="1"?"":"s"}const Ot=R("utils/executeHook.ts",{userHookErrors:new Map});function _t(e,t){const{hookName:n,hookFilePath:r,hookTimeout:{error:i,warning:s}}=t;let l,a;const c=new Promise((h,m)=>{l=w=>{u(),h(w)},a=w=>{u(),m(w)}}),u=()=>{f&&clearTimeout(f),d&&clearTimeout(d)},f=oe(s)&&setTimeout(()=>{j(!1,`The ${n}() hook defined by ${r} is slow: it's taking more than ${re(s)} (https://vike.dev/hooksTimeout)`,{onlyOnce:!1})},s),d=oe(i)&&setTimeout(()=>{const h=Fe(`The ${n}() hook defined by ${r} timed out: it didn't finish after ${re(i)} (https://vike.dev/hooksTimeout)`);a(h)},i);return(async()=>{try{const h=await e();l(h)}catch(h){$(h)&&Ot.userHookErrors.set(h,{hookName:n,hookFilePath:r}),a(h)}})(),c}function oe(e){return!!e&&e!==1/0}function un(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=ze(t,"/");let s;return e!=null&&e.withoutHash?s=`${i}${n||""}`:s=`${i}${n||""}${r||""}`,o(s.startsWith("/")),s}jt();function fn(){const e="vike_pageContext",t=document.getElementById(e);g(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;o(n);const r=X(n);return o(y(r,"_pageId","string")),q(r,{_hasPageContextFromServer:!0}),r}function H(e,t){if(!(t in e.exports))return null;const{hooksTimeout:n}=e.config,r=xt(n,t),i=e.exports[t],s=e.exportsAll[t][0];if(o(s.exportValue===i),i===null)return null;const l=s.filePath;return o(l),o(!l.endsWith(" ")),ve(i,{hookName:t,hookFilePath:l}),{hookFn:i,hookName:t,hookFilePath:l,hookTimeout:r}}function dn(e,t){const n=e.configValues[t];if(!n)return null;const r=n.value;if(!r)return null;const i=it(n);o(i),ve(r,{hookName:t,hookFilePath:i});const s=Te(t);return{hookFn:r,hookName:t,hookFilePath:i,hookTimeout:s}}function gn(e,t){H(e,t)}function ve(e,{hookName:t,hookFilePath:n}){o(t&&n),o(!t.endsWith(")")),g(A(e),`Hook ${t}() defined by ${n} should be a function`)}function xt(e,t){const n=Ct(e);if(n===!1)return{error:!1,warning:!1};const r=n[t],i=Te(t);return(r==null?void 0:r.error)!==void 0&&(i.error=r.error),(r==null?void 0:r.warning)!==void 0&&(i.warning=r.warning),i}function Ct(e){if(e===void 0)return{};if(e===!1)return!1;g($(e),`Setting ${p.cyan("hooksTimeout")} should be ${p.cyan("false")} or an object`);const t={};return Object.entries(e).forEach(([n,r])=>{if(r===!1){t[n]={error:!1,warning:!1};return}g($(r),`Setting ${p.cyan(`hooksTimeout.${n}`)} should be ${p.cyan("false")} or an object`);const[i,s]=["error","warning"].map(l=>{const a=r[l];if(a===void 0||a===!1)return a;const c=`Setting ${p.cyan(`hooksTimeout.${n}.${l}`)} should be`;return g(typeof a=="number",`${c} ${p.cyan("false")} or a number`),g(a>0,`${c} a positive number`),a});t[n]={error:i,warning:s}}),t}function Te(e){return e==="onBeforeRoute"?{error:5*1e3,warning:1*1e3}:e==="onPrerenderStart"||e==="onBeforePrerenderStart"||e==="onBeforePrerender"||e==="prerender"?{error:10*60*1e3,warning:30*1e3}:{error:30*1e3,warning:4*1e3}}function Ft(e){const t=Object.entries(e);for(const n in e)delete e[n];t.sort(([n],[r])=>Ke(n,r)).forEach(([n,r])=>{e[n]=r})}function Lt(e){Wt(e),At(e)}function Wt(e){ct(e._pageId,e._pageConfigs)&&o(y(e,"is404","boolean"))}function At(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!$(t)){j(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const Vt="not-serializable",L=R("getPageContextProxyForUser.ts",{});function Dt(e){return o([!0,!1].includes(e._hasPageContextFromServer)),o([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=JSON.stringify(n);return g(r!==Vt,`pageContext[${i}] couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),zt(e,n),r}})}function zt(e,t){if(L.prev===t||L.prev==="__v_raw"||(Ut(t),t in e)||Ht(t))return;const n=JSON.stringify(t);e._hasPageContextFromServer&&!e._hasPageContextFromClient&&g(!1,`pageContext[${n}] isn't available on the client-side because ${n} is missing in passToClient, see https://vike.dev/passToClient`)}const Nt=["then","toJSON"];function Ht(e){return!!(Nt.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function Ut(e){L.prev=e,window.setTimeout(()=>{L.prev=void 0},0)}function Gt(e,t){if(t){const i=e;o([!0,!1].includes(i.isHydration)),o([!0,!1,null].includes(i.isBackwardNavigation))}else{const i=e;o(i.isHydration===!0),o(i.isBackwardNavigation===null)}o("config"in e),o("configEntries"in e),o("exports"in e),o("exportsAll"in e),o("pageExports"in e),o($(e.pageExports));const n=e.exports.Page;q(e,{Page:n}),Bt(e),Ft(e);const r=Dt(e);return Lt(e),r}function Bt(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}function Mt(e,t){const n=e.filter(i=>i.pageId===t);return o(n.length<=1),n[0]??null}async function Jt(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll();{const{configValuesImported:r}=n,i=N(r);Object.assign(e.configValues,i)}{const{configValuesSerialized:r}=n,i=Se(r);Object.assign(e.configValues,i)}return q(e,{isAllLoaded:!0}),e}const be="__whileFetchingAssets";async function hn(e,t){const n=Rt(t._pageFilesAll,e),r=Mt(t._pageConfigs,e);let i;const s=!1;try{i=(await Promise.all([r&&Jt(r,s),...n.map(m=>{var w;return(w=m.loadFile)==null?void 0:w.call(m)})]))[0]}catch(h){throw Yt(h)&&Object.assign(h,{[be]:!0}),h}const{config:l,configEntries:a,exports:c,exportsAll:u,pageExports:f}=st(n,i);return{config:l,configEntries:a,exports:c,exportsAll:u,pageExports:f,_pageFilesLoaded:n}}function pn(e){return e?e[be]===!0:!1}function Yt(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}async function mn(e,t){const n=Gt(e,t);let r=null,i;r=H(e,"render"),i="render";{const a=H(e,"onRenderClient");a&&(r=a,i="onRenderClient")}if(!r){const a=qt(e);if(o(a),e._pageConfigs.length>0)g(!1,`No onRenderClient() hook defined for URL '${a}', but it's needed, see https://vike.dev/onRenderClient`);else{const c=e._pageFilesLoaded.filter(f=>f.fileType===".page.client");let u;c.length===0?u="No file `*.page.client.*` found for URL "+a:u="One of the following files should export a render() hook: "+c.map(f=>f.filePath).join(" "),g(!1,u)}}o(r);const s=r.hookFn;o(i);const l=await _t(()=>s(n),r);g(l===void 0,`The ${i}() hook defined by ${r.hookFilePath} isn't allowed to return a value`)}function qt(e){let t;try{t=e.urlPathname??e.urlOriginal}catch{}return t=t??window.location.href,t}export{_t as A,Te as B,Qt as C,on as D,Gt as E,sn as F,X as G,Fe as H,nn as I,rt as J,V as K,dn as L,Me as M,ge as N,Rt as O,Mt as P,qe as Q,rn as R,tn as S,pn as T,Kt as U,fn as a,g as b,ln as c,j as d,en as e,Xt as f,un as g,mn as h,gn as i,A as j,o as k,hn as l,me as m,It as n,q as o,p,Zt as q,$ as r,an as s,R as t,y as u,cn as v,ze as w,F as x,Y as y,H as z};