it-tools/dist/client/assets/entries/entry-client-routing.d990dbbc.js

3 lines
39 KiB
JavaScript
Raw Normal View History

2024-04-28 00:48:29 +08:00
import{i as K,s as dt,a as gt,b as k,c as F,g as j,d as H,e as Oe,f as l,h as Y,j as R,p as M,k as c,l as u,m as $,n as D,o as p,q as ht,r as d,t as x,u as Fe,v as ie,w as ae,x as pt,y as V,z as Ae,A as $e,B as Ee,C as E,D as mt,E as yt,F as bt,G as Rt,H as St,I as wt,J as ke,K as Te,L as Pt,M as _t,N as vt,O as le,P as Q,Q as Ct,R as Ot}from"../chunks/chunk-e9714d86.js";import{_ as X}from"../chunks/chunk-cf010ec4.js";function O(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function pe(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function Z(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function Ft(e){return typeof e=="object"&&e!==null&&"then"in e&&K(e.then)}const At=["default"],$t=["default",...At],Et=Object.freeze(Object.defineProperty({__proto__:null,exportNames:$t},Symbol.toStringTag,{value:"Module"})),kt=["default"],Tt=["default",...kt],It=Object.freeze(Object.defineProperty({__proto__:null,exportNames:Tt},Symbol.toStringTag,{value:"Module"})),xt=["default"],Nt=["default",...xt],jt=Object.freeze(Object.defineProperty({__proto__:null,exportNames:Nt},Symbol.toStringTag,{value:"Module"})),ue={},Ie={},Ht={},J={},Bt=[],xe={},Lt=!0,Wt=[],Dt={onBeforeRoute:null,onPrerenderStart:null},Ut=Object.assign({"/src/pages/404.page.vue":()=>X(()=>import("./src_pages_404.page.6bb55506.js"),["assets/entries/src_pages_404.page.6bb55506.js","assets/chunks/chunk-5a4ab062.js","assets/chunks/chunk-449c23a2.js","assets/static/c-button.1b70e3dc.css","assets/chunks/chunk-ee54c1e8.js","assets/chunks/chunk-cf010ec4.js"]),"/src/pages/Home.page.vue":()=>X(()=>import("./src_pages_Home.page.16dc467b.js").then(e=>e.aR),["assets/entries/src_pages_Home.page.16dc467b.js","assets/chunks/chunk-449c23a2.js","assets/static/c-button.1b70e3dc.css","assets/chunks/chunk-a740628f.js","assets/static/lodash.af515ca7.css","assets/chunks/chunk-cf010ec4.js","assets/chunks/chunk-ee54c1e8.js","assets/static/Home.page.d5a6dada.css"]),"/src/ui/demo/demo-home.page.vue":()=>X(()=>import("./src_ui_demo_demo-home.page.4cfbf913.js"),["assets/entries/src_ui_demo_demo-home.page.4cfbf913.js","assets/chunks/chunk-fb60a83f.js","assets/chunks/chunk-449c23a2.js","assets/static/c-button.1b70e3dc.css","assets/chunks/chunk-cf010ec4.js","assets/chunks/chunk-d8b8b4f8.js","assets/static/c-alert.926bd053.css","assets/chunks/chunk-3db18d93.js","assets/chunks/chunk-a740628f.js","assets/static/lodash.af515ca7.css","assets/chunks/chunk-323c539f.js","assets/chunks/chunk-a3974c29.js","assets/chunks/chunk-e0e1a528.js","assets/chunks/chunk-6deddc2e.js","assets/chunks/chunk-9a43cce8.js","assets/chunks/chunk-340feaf0.js","assets/static/c-input-text.556101b4.css","assets/chunks/chunk-893bf84a.js","assets/chunks/chunk-153e0e77.js","assets/chunks/chunk-767079b6.js","assets/static/c-modal-value.6b78fab4.css","assets/chunks/chunk-606d31d4.js","assets/chunks/chunk-27eb844d.js","assets/static/c-select.8dd6cbf5.css","assets/chunks/chunk-baf8ab22.js","assets/chunks/chunk-a66a4022.js","assets/static/demo-home.page.a31aff5d.css"])}),Vt={...Ut};ue[".page"]=Vt;const zt=Object.assign({"/src/pages/404.page.vue":Et,"/src/pages/Home.page.vue":It,"/src/ui/demo/demo-home.page.vue":jt}),Gt={...zt};J[".page"]=Gt;const Kt=Object.assign({}),Yt={...Kt};J[".page.server"]=Yt;const Mt=Object.assign({}),Jt={...Mt};Ie[".page.route"]=Jt;const qt=Object.assign({}),Qt={...qt};ue[".page.client"]=Qt;const Xt=Object.assign({}),Zt={...Xt};J[".page.client"]=Zt;const en=Object.assign({}),tn={...en};xe[".page.server"]=tn;const nn=Object.freeze(Object.defineProperty({__proto__:null,isGeneratedFile:Lt,neverLoaded:xe,pageConfigGlobal:Dt,pageConfigs:Wt,pageFilesEager:Ie,pageFilesExportNamesEager:J,pageFilesExportNamesLazy:Ht,pageFilesLazy:ue,pageFilesList:Bt},Symbol.toStringTag,{value:"Module"}));dt(nn);function rn(){gt(),k()}function on(){const e=!!window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.renderers?.size,t=!!window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.rendererInterfaces?.size,n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}fu
`)].join(" "))}function s(){return e.some(a=>N(a).includes("clientRouting"))}}function ir({pageFilesClientSide:e,pageFilesServerSide:t,isHtmlOnly:n,isClientRouting:r}){let o=[];const s=t.filter(a=>!e.includes(a)),i=[];if(i.push(...e.map(a=>({id:a.filePath,onlyAssets:!1,eagerlyImported:!1}))),i.push(...s.map(a=>({id:a.filePath,onlyAssets:!0,eagerlyImported:!1}))),n)o=e.map(a=>a.filePath);else{const a=ar(r);i.push({id:a,onlyAssets:!1,eagerlyImported:!1}),o=[a]}return{clientEntries:o,clientDependencies:i}}function ar(e){return e?"@@vite-plugin-ssr/dist/esm/client/client-routing-runtime/entry.js":"@@vite-plugin-ssr/dist/esm/client/server-routing-runtime/entry.js"}function lr(e,t){let n=Te(e,t);const r=Oe(e,t),{isHtmlOnly:o,isClientRouting:s}=sr({pageFilesClientSide:n,pageFilesServerSide:r,pageId:t});o&&(n=n.filter(h=>h.isEnv("CLIENT_ONLY")&&!N(h).includes("render")),n=cr(n));const{clientEntries:i,clientDependencies:a}=ir({pageFilesClientSide:n,pageFilesServerSide:r,isHtmlOnly:o,isClientRouting:s});return{isHtmlOnly:o,isClientRouting:s,clientEntries:i,clientDependencies:a,pageFilesClientSide:n,pageFilesServerSide:r}}async function ur(e,t,{sharedPageFilesAlreadyLoaded:n}){const r=Te(e,t);await Promise.all(r.map(async o=>{l(o.isEnv("CLIENT_ONLY")||o.isEnv("CLIENT_AND_SERVER")),!(n&&o.isEnv("CLIENT_AND_SERVER"))&&await o.loadExportNames?.()}))}function cr(e){const t=[];for(const n of e)if(t.push(n),N(n).includes("overrideDefaultPages"))break;return t}function fr(e,t,n){if(e){const r=E(e,"clientRouting","boolean")?.value??!1;return{isClientSideRenderable:E(e,"isClientSideRenderable","boolean")?.value??!1,isClientRouting:r}}else{const{isHtmlOnly:r,isClientRouting:o}=lr(t,n);return{isClientSideRenderable:!r,isClientRouting:o}}}async function Ze(e){const{pageId:t,pageFilesAll:n,pageConfigs:r}=await Xe(e);if(!t)return!1;await ur(n,t,{sharedPageFilesAlreadyLoaded:!1});const o=Pt(r,t),{isClientSideRenderable:s,isClientRouting:i}=fr(o,n,t);return s&&i}function et(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}function tt(e){const t=e.getAttribute("href");return!!(t===null||t===""||et(t)||gr(e)||hr(t)||!pr(t)||!_t(t)||!dr(e))}function dr(e){if(Nr()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function gr(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function hr(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function pr(e){const t=qe();l(ke(t));const{hasBaseServer:n}=M(e,t);return n}function mr(e,t){let n=yr(e,t);return n==="viewport"&&!e._isProduction&&(ae(!1,"Viewport prefetching is disabled in development",{onlyOnce:!0}),n="hover"),{prefetchStaticAssets:n}}function yr(e,t){{const n=br(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&u(!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'";u(O(n),r);const o=Object.keys(n);u(o.length===1&&o[0]==="when",r);const{when:s}=n;if(s==="HOVER"||s==="VIEWPORT"){const i=s.toLowerCase();return R(!1,`prefetchStaticAssets value \`{ when: '${s}' }\` is outdated: set prefetchStaticAssets to '${i}' instead`,{onlyOnce:!0}),i}u(!1,r)}return"hover"}function br(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(u(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;u(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(l(!t),R(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";u(!1,`data-prefetch has value "${n}" but i