import{c as d,b as f}from"./vue-router.41e9d860.js";import{a as y,w as _,l as w,v as h}from"./index.4b887428.js";const c=(t,r,n)=>{const e=r[n];return e?()=>{const a=c(t,r,n+1);e({...t,next:a})}:t.next},v=(t,r)=>{const n=d({history:f(`wp-admin/admin.php?page=aioseo-${window.aioseo.page}`),routes:t,scrollBehavior(e,a,o){return o||(e.hash?{selector:e.hash}:{left:0,top:0})}});return n.beforeEach((e,a,o)=>{const s=y(),l=_();s.loaded||w(r),s.ping();const m=e.meta.access;if(!h(m))return e.meta.home!==a.name?n.replace({name:e.meta.home}):null;if(e.meta.middleware){const i=Array.isArray(e.meta.middleware)?e.meta.middleware:[e.meta.middleware],u={app:r,from:a,next:o,router:n,to:e},p=c(u,i,1);return i[0]({...u,next:p})}return l.resetPageNumbers(),o()}),n},x=(t,r,n)=>{const e=t[r];return e?typeof e=="function"?e():Promise.resolve(e):new Promise((a,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+r+(r.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})};export{x as _,v as s};
