var M=Object.defineProperty;var E=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var P=(o,e,t)=>e in o?M(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,g=(o,e)=>{for(var t in e||(e={}))N.call(e,t)&&P(o,t,e[t]);if(E)for(var t of E(e))V.call(e,t)&&P(o,t,e[t]);return o};var d=(o,e,t)=>new Promise((_,i)=>{var l=n=>{try{r(t.next(n))}catch(c){i(c)}},a=n=>{try{r(t.throw(n))}catch(c){i(c)}},r=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(o,e)).next())});import{useRoute as W}from"./vue-router-BUqJHGtN.js";import{v as z}from"./@vueuse-DQGZ4KR4.js";import{M as J,I as U,E as j,a as D,c as v,s as G,i as C}from"./Editor-BYRlEJ7f-DrA-LA5d.js";import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{E as K,a as S,n as A,l as L}from"./utils-DY6MzNJy.js";import{d as O,e as Q,az as B,f as X,c as Y,o as Z}from"./vue-CWi9lEhc.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-xcHgnT1C.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-DhpLkc3z.js";import"./dayjs-C1e0w4cr.js";import"./marked-BQZxLJfc.js";import"./lodash-es-BaeSyToa.js";import"./shared-CiMZBXIr.js";const te=O({__name:"index",setup(o){return d(this,null,function*(){let e,t;const _=W(),i=Q(),l=new J(U(A)),a=([e,t]=B(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),r=j({loading:L,notify:A,useTitle:z,alert:S,access:a==null?void 0:a.access}),n=D(g({alert:S},a==null?void 0:a.__ACCESS__)),c=a?([e,t]=B(()=>new K(a).load()),e=yield e,t(),e):{},{__BASE_PATH__:h="/",history:k="hash",base:$="/",pageRouteName:y="page",remote:R,auth:F,checkVersion:I=!0,enhance:T}=a||{},b=()=>k==="hash",q=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);v.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",p=location.pathname;let m=p===`${h}__vtj__/`?h:p;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const H=a.pageBasePath?`/${y}`:"",x=`${q($)}${u?`pages${H}`:y}/${f.id}`;m=b()?`${m}#/${x}`:`${m}${x}`}window.open(m,"VTJProject")}}}),v.set("Previewer",{props:{path:(s,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${s.id}`:`${p}#/preview/${s.id}`}}});const w=new G(g({container:i,service:l,materialPath:h,pageBasePath:$==="/"?"":$,adapter:r,access:n,remote:R,auth:F,checkVersion:I,enhance:T},c));return w.ready(()=>d(null,null,function*(){yield C(300),w.openFile(_.query.id)})),X(()=>_.query.id,s=>d(null,null,function*(){yield C(300),w.openFile(s)})),(s,u)=>(Z(),Y("div",{class:"designer",ref_key:"container",ref:i},null,512))})}}),ge=ee(te,[["__scopeId","data-v-79f08aff"]]);export{ge as default};
