mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
2 lines
1.4 KiB
JavaScript
2 lines
1.4 KiB
JavaScript
import{u as r,k as p,R as s,a7 as u,a8 as c,a9 as l,aa as f,ab as d,ac as m,ad as h,ae as g,af as A,ag as v,H as C,d as P,p as y,ah as _,ai as w,aj as R,ak as T}from"./chunks/framework.de5c44cb.js";import{t as b}from"./chunks/theme.64188c4c.js";const E={};const D={...b,setup(){const{lang:e}=r();p(()=>{s&&(document.cookie=`nf_lang=${e.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`)})},...E};function i(e){if(e.extends){const t=i(e.extends);return{...t,...e,async enhanceApp(a){t.enhanceApp&&await t.enhanceApp(a),e.enhanceApp&&await e.enhanceApp(a)}}}return e}const n=i(D),S=P({name:"VitePressApp",setup(){const{site:e}=r();return y(()=>{p(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),_(),w(),R(),n.setup&&n.setup(),()=>T(n.Layout)}});async function j(){const e=O(),t=x();t.provide(c,e);const a=l(e.route);return t.provide(f,a),t.component("Content",d),t.component("ClientOnly",m),Object.defineProperties(t.config.globalProperties,{$frontmatter:{get(){return a.frontmatter.value}},$params:{get(){return a.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:t,router:e,siteData:h}),{app:t,router:e,data:a}}function x(){return g(S)}function O(){let e=s,t;return A(a=>{let o=v(a);return e&&(t=o),(e||t===o)&&(o=o.replace(/\.js$/,".lean.js")),s&&(e=!1),C(()=>import(o),[])},n.NotFound)}s&&j().then(({app:e,router:t,data:a})=>{t.go().then(()=>{u(t.route,a.site),e.mount("#app")})});export{j as createApp};
|