OwlCyberSecurity - MANAGER
Edit File: vue-router.DZeOtREl.js
import{s as tt,u as Q,e as nt,n as rt,f as Be,r as ot,i as Y,g as N,h as qe,p as ae,j as st,w as ct}from"./vue.esm-bundler.CWQFYt9y.js";/*! * vue-router v4.3.0 * (c) 2024 Eduardo San Martin Morote * @license MIT */const q=typeof document<"u";function it(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const S=Object.assign;function le(e,t){const n={};for(const r in t){const o=t[r];n[r]=L(o)?o.map(e):e(o)}return n}const W=()=>{},L=Array.isArray,ze=/#/g,at=/&/g,lt=/\//g,ut=/=/g,ft=/\?/g,Ge=/\+/g,ht=/%5B/g,pt=/%5D/g,Ke=/%5E/g,dt=/%60/g,Ue=/%7B/g,mt=/%7C/g,Ve=/%7D/g,gt=/%20/g;function me(e){return encodeURI(""+e).replace(mt,"|").replace(ht,"[").replace(pt,"]")}function vt(e){return me(e).replace(Ue,"{").replace(Ve,"}").replace(Ke,"^")}function he(e){return me(e).replace(Ge,"%2B").replace(gt,"+").replace(ze,"%23").replace(at,"%26").replace(dt,"`").replace(Ue,"{").replace(Ve,"}").replace(Ke,"^")}function yt(e){return he(e).replace(ut,"%3D")}function Rt(e){return me(e).replace(ze,"%23").replace(ft,"%3F")}function Et(e){return e==null?"":Rt(e).replace(lt,"%2F")}function X(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Pt=/\/$/,wt=e=>e.replace(Pt,"");function ue(e,t,n="/"){let r,o={},u="",p="";const g=t.indexOf("#");let i=t.indexOf("?");return g<i&&g>=0&&(i=-1),i>-1&&(r=t.slice(0,i),u=t.slice(i+1,g>-1?g:t.length),o=e(u)),g>-1&&(r=r||t.slice(0,g),p=t.slice(g,t.length)),r=kt(r??t,n),{fullPath:r+(u&&"?")+u+p,path:r,query:o,hash:X(p)}}function St(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Se(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ct(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&z(t.matched[r],n.matched[o])&&De(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function z(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function De(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!_t(e[n],t[n]))return!1;return!0}function _t(e,t){return L(e)?Ce(e,t):L(t)?Ce(t,e):e===t}function Ce(e,t){return L(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function kt(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let u=n.length-1,p,g;for(p=0;p<r.length;p++)if(g=r[p],g!==".")if(g==="..")u>1&&u--;else break;return n.slice(0,u).join("/")+"/"+r.slice(p).join("/")}var Z;(function(e){e.pop="pop",e.push="push"})(Z||(Z={}));var F;(function(e){e.back="back",e.forward="forward",e.unknown=""})(F||(F={}));function bt(e){if(!e)if(q){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),wt(e)}const At=/^[^#]+#/;function Ot(e,t){return e.replace(At,"#")+t}function xt(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const te=()=>({left:window.scrollX,top:window.scrollY});function Mt(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=xt(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _e(e,t){return(history.state?history.state.position-t:-1)+e}const pe=new Map;function Lt(e,t){pe.set(e,t)}function Nt(e){const t=pe.get(e);return pe.delete(e),t}let jt=()=>location.protocol+"//"+location.host;function Qe(e,t){const{pathname:n,search:r,hash:o}=t,u=e.indexOf("#");if(u>-1){let g=o.includes(e.slice(u))?e.slice(u).length:1,i=o.slice(g);return i[0]!=="/"&&(i="/"+i),Se(i,"")}return Se(n,e)+r+o}function It(e,t,n,r){let o=[],u=[],p=null;const g=({state:a})=>{const m=Qe(e,location),R=n.value,k=t.value;let _=0;if(a){if(n.value=m,t.value=a,p&&p===R){p=null;return}_=k?a.position-k.position:0}else r(m);o.forEach(E=>{E(n.value,R,{delta:_,type:Z.pop,direction:_?_>0?F.forward:F.back:F.unknown})})};function i(){p=n.value}function f(a){o.push(a);const m=()=>{const R=o.indexOf(a);R>-1&&o.splice(R,1)};return u.push(m),m}function s(){const{history:a}=window;a.state&&a.replaceState(S({},a.state,{scroll:te()}),"")}function l(){for(const a of u)a();u=[],window.removeEventListener("popstate",g),window.removeEventListener("beforeunload",s)}return window.addEventListener("popstate",g),window.addEventListener("beforeunload",s,{passive:!0}),{pauseListeners:i,listen:f,destroy:l}}function ke(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?te():null}}function Tt(e){const{history:t,location:n}=window,r={value:Qe(e,n)},o={value:t.state};o.value||u(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function u(i,f,s){const l=e.indexOf("#"),a=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+i:jt()+e+i;try{t[s?"replaceState":"pushState"](f,"",a),o.value=f}catch(m){console.error(m),n[s?"replace":"assign"](a)}}function p(i,f){const s=S({},t.state,ke(o.value.back,i,o.value.forward,!0),f,{position:o.value.position});u(i,s,!0),r.value=i}function g(i,f){const s=S({},o.value,t.state,{forward:i,scroll:te()});u(s.current,s,!0);const l=S({},ke(r.value,i,null),{position:s.position+1},f);u(i,l,!1),r.value=i}return{location:r,state:o,push:g,replace:p}}function $t(e){e=bt(e);const t=Tt(e),n=It(e,t.state,t.location,t.replace);function r(u,p=!0){p||n.pauseListeners(),history.go(u)}const o=S({location:"",base:e,go:r,createHref:Ot.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function fn(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),$t(e)}function Ht(e){return typeof e=="string"||e&&typeof e=="object"}function We(e){return typeof e=="string"||typeof e=="symbol"}const T={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Fe=Symbol("");var be;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(be||(be={}));function G(e,t){return S(new Error,{type:e,[Fe]:!0},t)}function I(e,t){return e instanceof Error&&Fe in e&&(t==null||!!(e.type&t))}const Ae="[^/]+?",Bt={sensitive:!1,strict:!1,start:!0,end:!0},qt=/[.+*?^${}()[\]/\\]/g;function zt(e,t){const n=S({},Bt,t),r=[];let o=n.start?"^":"";const u=[];for(const f of e){const s=f.length?[]:[90];n.strict&&!f.length&&(o+="/");for(let l=0;l<f.length;l++){const a=f[l];let m=40+(n.sensitive?.25:0);if(a.type===0)l||(o+="/"),o+=a.value.replace(qt,"\\$&"),m+=40;else if(a.type===1){const{value:R,repeatable:k,optional:_,regexp:E}=a;u.push({name:R,repeatable:k,optional:_});const P=E||Ae;if(P!==Ae){m+=10;try{new RegExp(`(${P})`)}catch(M){throw new Error(`Invalid custom RegExp for param "${R}" (${P}): `+M.message)}}let O=k?`((?:${P})(?:/(?:${P}))*)`:`(${P})`;l||(O=_&&f.length<2?`(?:/${O})`:"/"+O),_&&(O+="?"),o+=O,m+=20,_&&(m+=-8),k&&(m+=-20),P===".*"&&(m+=-50)}s.push(m)}r.push(s)}if(n.strict&&n.end){const f=r.length-1;r[f][r[f].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&(o+="(?:/|$)");const p=new RegExp(o,n.sensitive?"":"i");function g(f){const s=f.match(p),l={};if(!s)return null;for(let a=1;a<s.length;a++){const m=s[a]||"",R=u[a-1];l[R.name]=m&&R.repeatable?m.split("/"):m}return l}function i(f){let s="",l=!1;for(const a of e){(!l||!s.endsWith("/"))&&(s+="/"),l=!1;for(const m of a)if(m.type===0)s+=m.value;else if(m.type===1){const{value:R,repeatable:k,optional:_}=m,E=R in f?f[R]:"";if(L(E)&&!k)throw new Error(`Provided param "${R}" is an array but it is not repeatable (* or + modifiers)`);const P=L(E)?E.join("/"):E;if(!P)if(_)a.length<2&&(s.endsWith("/")?s=s.slice(0,-1):l=!0);else throw new Error(`Missing required param "${R}"`);s+=P}}return s||"/"}return{re:p,score:r,keys:u,parse:g,stringify:i}}function Gt(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Kt(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const u=Gt(r[n],o[n]);if(u)return u;n++}if(Math.abs(o.length-r.length)===1){if(Oe(r))return 1;if(Oe(o))return-1}return o.length-r.length}function Oe(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Ut={type:0,value:""},Vt=/[a-zA-Z0-9_]/;function Dt(e){if(!e)return[[]];if(e==="/")return[[Ut]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${f}": ${m}`)}let n=0,r=n;const o=[];let u;function p(){u&&o.push(u),u=[]}let g=0,i,f="",s="";function l(){f&&(n===0?u.push({type:0,value:f}):n===1||n===2||n===3?(u.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),u.push({type:1,value:f,regexp:s,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),f="")}function a(){f+=i}for(;g<e.length;){if(i=e[g++],i==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:i==="/"?(f&&l(),p()):i===":"?(l(),n=1):a();break;case 4:a(),n=r;break;case 1:i==="("?n=2:Vt.test(i)?a():(l(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&g--);break;case 2:i===")"?s[s.length-1]=="\\"?s=s.slice(0,-1)+i:n=3:s+=i;break;case 3:l(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&g--,s="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${f}"`),l(),p(),o}function Qt(e,t,n){const r=zt(Dt(e.path),n),o=S(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Wt(e,t){const n=[],r=new Map;t=Le({strict:!1,end:!0,sensitive:!1},t);function o(s){return r.get(s)}function u(s,l,a){const m=!a,R=Ft(s);R.aliasOf=a&&a.record;const k=Le(t,s),_=[R];if("alias"in s){const O=typeof s.alias=="string"?[s.alias]:s.alias;for(const M of O)_.push(S({},R,{components:a?a.record.components:R.components,path:M,aliasOf:a?a.record:R}))}let E,P;for(const O of _){const{path:M}=O;if(l&&M[0]!=="/"){const H=l.record.path,j=H[H.length-1]==="/"?"":"/";O.path=l.record.path+(M&&j+M)}if(E=Qt(O,l,k),a?a.alias.push(E):(P=P||E,P!==E&&P.alias.push(E),m&&s.name&&!Me(E)&&p(s.name)),R.children){const H=R.children;for(let j=0;j<H.length;j++)u(H[j],E,a&&a.children[j])}a=a||E,(E.record.components&&Object.keys(E.record.components).length||E.record.name||E.record.redirect)&&i(E)}return P?()=>{p(P)}:W}function p(s){if(We(s)){const l=r.get(s);l&&(r.delete(s),n.splice(n.indexOf(l),1),l.children.forEach(p),l.alias.forEach(p))}else{const l=n.indexOf(s);l>-1&&(n.splice(l,1),s.record.name&&r.delete(s.record.name),s.children.forEach(p),s.alias.forEach(p))}}function g(){return n}function i(s){let l=0;for(;l<n.length&&Kt(s,n[l])>=0&&(s.record.path!==n[l].record.path||!Ye(s,n[l]));)l++;n.splice(l,0,s),s.record.name&&!Me(s)&&r.set(s.record.name,s)}function f(s,l){let a,m={},R,k;if("name"in s&&s.name){if(a=r.get(s.name),!a)throw G(1,{location:s});k=a.record.name,m=S(xe(l.params,a.keys.filter(P=>!P.optional).concat(a.parent?a.parent.keys.filter(P=>P.optional):[]).map(P=>P.name)),s.params&&xe(s.params,a.keys.map(P=>P.name))),R=a.stringify(m)}else if(s.path!=null)R=s.path,a=n.find(P=>P.re.test(R)),a&&(m=a.parse(R),k=a.record.name);else{if(a=l.name?r.get(l.name):n.find(P=>P.re.test(l.path)),!a)throw G(1,{location:s,currentLocation:l});k=a.record.name,m=S({},l.params,s.params),R=a.stringify(m)}const _=[];let E=a;for(;E;)_.unshift(E.record),E=E.parent;return{name:k,path:R,params:m,matched:_,meta:Xt(_)}}return e.forEach(s=>u(s)),{addRoute:u,resolve:f,removeRoute:p,getRoutes:g,getRecordMatcher:o}}function xe(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ft(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Yt(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Yt(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Me(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Xt(e){return e.reduce((t,n)=>S(t,n.meta),{})}function Le(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ye(e,t){return t.children.some(n=>n===e||Ye(e,n))}function Zt(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const u=r[o].replace(Ge," "),p=u.indexOf("="),g=X(p<0?u:u.slice(0,p)),i=p<0?null:X(u.slice(p+1));if(g in t){let f=t[g];L(f)||(f=t[g]=[f]),f.push(i)}else t[g]=i}return t}function Ne(e){let t="";for(let n in e){const r=e[n];if(n=yt(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(L(r)?r.map(u=>u&&he(u)):[r&&he(r)]).forEach(u=>{u!==void 0&&(t+=(t.length?"&":"")+n,u!=null&&(t+="="+u))})}return t}function Jt(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=L(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const en=Symbol(""),je=Symbol(""),ge=Symbol(""),Xe=Symbol(""),de=Symbol("");function D(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $(e,t,n,r,o,u=p=>p()){const p=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((g,i)=>{const f=a=>{a===!1?i(G(4,{from:n,to:t})):a instanceof Error?i(a):Ht(a)?i(G(2,{from:t,to:a})):(p&&r.enterCallbacks[o]===p&&typeof a=="function"&&p.push(a),g())},s=u(()=>e.call(r&&r.instances[o],t,n,f));let l=Promise.resolve(s);e.length<3&&(l=l.then(f)),l.catch(a=>i(a))})}function fe(e,t,n,r,o=u=>u()){const u=[];for(const p of e)for(const g in p.components){let i=p.components[g];if(!(t!=="beforeRouteEnter"&&!p.instances[g]))if(tn(i)){const s=(i.__vccOpts||i)[t];s&&u.push($(s,n,r,p,g,o))}else{let f=i();u.push(()=>f.then(s=>{if(!s)return Promise.reject(new Error(`Couldn't resolve component "${g}" at "${p.path}"`));const l=it(s)?s.default:s;p.components[g]=l;const m=(l.__vccOpts||l)[t];return m&&$(m,n,r,p,g,o)()}))}}return u}function tn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ie(e){const t=Y(ge),n=Y(Xe),r=N(()=>t.resolve(Q(e.to))),o=N(()=>{const{matched:i}=r.value,{length:f}=i,s=i[f-1],l=n.matched;if(!s||!l.length)return-1;const a=l.findIndex(z.bind(null,s));if(a>-1)return a;const m=Te(i[f-2]);return f>1&&Te(s)===m&&l[l.length-1].path!==m?l.findIndex(z.bind(null,i[f-2])):a}),u=N(()=>o.value>-1&&sn(n.params,r.value.params)),p=N(()=>o.value>-1&&o.value===n.matched.length-1&&De(n.params,r.value.params));function g(i={}){return on(i)?t[Q(e.replace)?"replace":"push"](Q(e.to)).catch(W):Promise.resolve()}return{route:r,href:N(()=>r.value.href),isActive:u,isExactActive:p,navigate:g}}const nn=Be({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ie,setup(e,{slots:t}){const n=ot(Ie(e)),{options:r}=Y(ge),o=N(()=>({[$e(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[$e(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const u=t.default&&t.default(n);return e.custom?u:qe("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},u)}}}),rn=nn;function on(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function sn(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!L(o)||o.length!==r.length||r.some((u,p)=>u!==o[p]))return!1}return!0}function Te(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const $e=(e,t,n)=>e??t??n,cn=Be({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Y(de),o=N(()=>e.route||r.value),u=Y(je,0),p=N(()=>{let f=Q(u);const{matched:s}=o.value;let l;for(;(l=s[f])&&!l.components;)f++;return f}),g=N(()=>o.value.matched[p.value]);ae(je,N(()=>p.value+1)),ae(en,g),ae(de,o);const i=st();return ct(()=>[i.value,g.value,e.name],([f,s,l],[a,m,R])=>{s&&(s.instances[l]=f,m&&m!==s&&f&&f===a&&(s.leaveGuards.size||(s.leaveGuards=m.leaveGuards),s.updateGuards.size||(s.updateGuards=m.updateGuards))),f&&s&&(!m||!z(s,m)||!a)&&(s.enterCallbacks[l]||[]).forEach(k=>k(f))},{flush:"post"}),()=>{const f=o.value,s=e.name,l=g.value,a=l&&l.components[s];if(!a)return He(n.default,{Component:a,route:f});const m=l.props[s],R=m?m===!0?f.params:typeof m=="function"?m(f):m:null,_=qe(a,S({},R,t,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(l.instances[s]=null)},ref:i}));return He(n.default,{Component:_,route:f})||_}}});function He(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const an=cn;function hn(e){const t=Wt(e.routes,e),n=e.parseQuery||Zt,r=e.stringifyQuery||Ne,o=e.history,u=D(),p=D(),g=D(),i=tt(T);let f=T;q&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const s=le.bind(null,c=>""+c),l=le.bind(null,Et),a=le.bind(null,X);function m(c,d){let h,v;return We(c)?(h=t.getRecordMatcher(c),v=d):v=c,t.addRoute(v,h)}function R(c){const d=t.getRecordMatcher(c);d&&t.removeRoute(d)}function k(){return t.getRoutes().map(c=>c.record)}function _(c){return!!t.getRecordMatcher(c)}function E(c,d){if(d=S({},d||i.value),typeof c=="string"){const y=ue(n,c,d.path),A=t.resolve({path:y.path},d),V=o.createHref(y.fullPath);return S(y,A,{params:a(A.params),hash:X(y.hash),redirectedFrom:void 0,href:V})}let h;if(c.path!=null)h=S({},c,{path:ue(n,c.path,d.path).path});else{const y=S({},c.params);for(const A in y)y[A]==null&&delete y[A];h=S({},c,{params:l(y)}),d.params=l(d.params)}const v=t.resolve(h,d),C=c.hash||"";v.params=s(a(v.params));const b=St(r,S({},c,{hash:vt(C),path:v.path})),w=o.createHref(b);return S({fullPath:b,hash:C,query:r===Ne?Jt(c.query):c.query||{}},v,{redirectedFrom:void 0,href:w})}function P(c){return typeof c=="string"?ue(n,c,i.value.path):S({},c)}function O(c,d){if(f!==c)return G(8,{from:d,to:c})}function M(c){return K(c)}function H(c){return M(S(P(c),{replace:!0}))}function j(c){const d=c.matched[c.matched.length-1];if(d&&d.redirect){const{redirect:h}=d;let v=typeof h=="function"?h(c):h;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=P(v):{path:v},v.params={}),S({query:c.query,hash:c.hash,params:v.path!=null?{}:c.params},v)}}function K(c,d){const h=f=E(c),v=i.value,C=c.state,b=c.force,w=c.replace===!0,y=j(h);if(y)return K(S(P(y),{state:typeof y=="object"?S({},C,y.state):C,force:b,replace:w}),d||h);const A=h;A.redirectedFrom=d;let V;return!b&&Ct(r,v,h)&&(V=G(16,{to:A,from:v}),Pe(v,v,!0,!1)),(V?Promise.resolve(V):ve(A,v)).catch(x=>I(x)?I(x,2)?x:se(x):oe(x,A,v)).then(x=>{if(x){if(I(x,2))return K(S({replace:w},P(x.to),{state:typeof x.to=="object"?S({},C,x.to.state):C,force:b}),d||A)}else x=Re(A,v,!0,w,C);return ye(A,v,x),x})}function Ze(c,d){const h=O(c,d);return h?Promise.reject(h):Promise.resolve()}function ne(c){const d=ee.values().next().value;return d&&typeof d.runWithContext=="function"?d.runWithContext(c):c()}function ve(c,d){let h;const[v,C,b]=ln(c,d);h=fe(v.reverse(),"beforeRouteLeave",c,d);for(const y of v)y.leaveGuards.forEach(A=>{h.push($(A,c,d))});const w=Ze.bind(null,c,d);return h.push(w),B(h).then(()=>{h=[];for(const y of u.list())h.push($(y,c,d));return h.push(w),B(h)}).then(()=>{h=fe(C,"beforeRouteUpdate",c,d);for(const y of C)y.updateGuards.forEach(A=>{h.push($(A,c,d))});return h.push(w),B(h)}).then(()=>{h=[];for(const y of b)if(y.beforeEnter)if(L(y.beforeEnter))for(const A of y.beforeEnter)h.push($(A,c,d));else h.push($(y.beforeEnter,c,d));return h.push(w),B(h)}).then(()=>(c.matched.forEach(y=>y.enterCallbacks={}),h=fe(b,"beforeRouteEnter",c,d,ne),h.push(w),B(h))).then(()=>{h=[];for(const y of p.list())h.push($(y,c,d));return h.push(w),B(h)}).catch(y=>I(y,8)?y:Promise.reject(y))}function ye(c,d,h){g.list().forEach(v=>ne(()=>v(c,d,h)))}function Re(c,d,h,v,C){const b=O(c,d);if(b)return b;const w=d===T,y=q?history.state:{};h&&(v||w?o.replace(c.fullPath,S({scroll:w&&y&&y.scroll},C)):o.push(c.fullPath,C)),i.value=c,Pe(c,d,h,w),se()}let U;function Je(){U||(U=o.listen((c,d,h)=>{if(!we.listening)return;const v=E(c),C=j(v);if(C){K(S(C,{replace:!0}),v).catch(W);return}f=v;const b=i.value;q&&Lt(_e(b.fullPath,h.delta),te()),ve(v,b).catch(w=>I(w,12)?w:I(w,2)?(K(w.to,v).then(y=>{I(y,20)&&!h.delta&&h.type===Z.pop&&o.go(-1,!1)}).catch(W),Promise.reject()):(h.delta&&o.go(-h.delta,!1),oe(w,v,b))).then(w=>{w=w||Re(v,b,!1),w&&(h.delta&&!I(w,8)?o.go(-h.delta,!1):h.type===Z.pop&&I(w,20)&&o.go(-1,!1)),ye(v,b,w)}).catch(W)}))}let re=D(),Ee=D(),J;function oe(c,d,h){se(c);const v=Ee.list();return v.length?v.forEach(C=>C(c,d,h)):console.error(c),Promise.reject(c)}function et(){return J&&i.value!==T?Promise.resolve():new Promise((c,d)=>{re.add([c,d])})}function se(c){return J||(J=!c,Je(),re.list().forEach(([d,h])=>c?h(c):d()),re.reset()),c}function Pe(c,d,h,v){const{scrollBehavior:C}=e;if(!q||!C)return Promise.resolve();const b=!h&&Nt(_e(c.fullPath,0))||(v||!h)&&history.state&&history.state.scroll||null;return rt().then(()=>C(c,d,b)).then(w=>w&&Mt(w)).catch(w=>oe(w,c,d))}const ce=c=>o.go(c);let ie;const ee=new Set,we={currentRoute:i,listening:!0,addRoute:m,removeRoute:R,hasRoute:_,getRoutes:k,resolve:E,options:e,push:M,replace:H,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:u.add,beforeResolve:p.add,afterEach:g.add,onError:Ee.add,isReady:et,install(c){const d=this;c.component("RouterLink",rn),c.component("RouterView",an),c.config.globalProperties.$router=d,Object.defineProperty(c.config.globalProperties,"$route",{enumerable:!0,get:()=>Q(i)}),q&&!ie&&i.value===T&&(ie=!0,M(o.location).catch(C=>{}));const h={};for(const C in T)Object.defineProperty(h,C,{get:()=>i.value[C],enumerable:!0});c.provide(ge,d),c.provide(Xe,nt(h)),c.provide(de,i);const v=c.unmount;ee.add(c),c.unmount=function(){ee.delete(c),ee.size<1&&(f=T,U&&U(),U=null,i.value=T,ie=!1,J=!1),v()}}};function B(c){return c.reduce((d,h)=>d.then(()=>ne(h)),Promise.resolve())}return we}function ln(e,t){const n=[],r=[],o=[],u=Math.max(t.matched.length,e.matched.length);for(let p=0;p<u;p++){const g=t.matched[p];g&&(e.matched.find(f=>z(f,g))?r.push(g):n.push(g));const i=e.matched[p];i&&(t.matched.find(f=>z(f,i))||o.push(i))}return[n,r,o]}export{fn as a,$t as b,hn as c};