/*! * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT */ System.register(["vue"],(function(e){"use strict";var t,n,r,o,a,c,i,s,l,u,f,p,h,d,m;return{setters:[function(e){t=e.inject,n=e.onUnmounted,r=e.onDeactivated,o=e.onActivated,a=e.computed,c=e.unref,i=e.defineComponent,s=e.reactive,l=e.h,u=e.provide,f=e.ref,p=e.watch,h=e.shallowRef,d=e.shallowReactive,m=e.nextTick}],execute:function(){e({createMemoryHistory:function(e=""){let t=[],n=[L],r=0;function o(e){r++,r!==n.length&&n.splice(r),n.push(e)}e=q(e);const a={location:L,state:{},base:e,createHref:B.bind(null,e),replace(e){n.splice(r--,1),o(e)},push(e,t){o(e)},listen:e=>(t.push(e),()=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)}),destroy(){t=[],n=[L],r=0},go(e,o=!0){const a=this.location,c=e<0?A.back:A.forward;r=Math.max(0,Math.min(r+e,n.length-1)),o&&function(e,n,{direction:r,delta:o}){const a={direction:r,delta:o,type:S.pop};for(const r of t)r(e,n,a)}(this.location,a,{direction:c,delta:e})}};return Object.defineProperty(a,"location",{enumerable:!0,get:()=>n[r]}),a},createRouter:function(e){const t=ce(e.routes,e),n=e.parseQuery||Ae,r=e.stringifyQuery||Le,o=e.history,a=_e(),i=_e(),s=_e(),l=h(K);let u=K;g&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=b.bind(null,(e=>""+e)),p=b.bind(null,je),v=b.bind(null,Se);function R(e,a){if(a=y({},a||l.value),"string"==typeof e){const r=k(n,e,a.path),c=t.resolve({path:r.path},a),i=o.createHref(r.fullPath);return y(r,c,{params:v(c.params),hash:Se(r.hash),redirectedFrom:void 0,href:i})}let c;if("path"in e)c=y({},e,{path:k(n,e.path,a.path).path});else{const t=y({},e.params);for(const e in t)null==t[e]&&delete t[e];c=y({},e,{params:p(t)}),a.params=p(a.params)}const i=t.resolve(c,a),s=e.hash||"";i.params=f(v(i.params));const u=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(r,y({},e,{hash:(h=s,xe(h).replace(Oe,"{").replace(Pe,"}").replace(Ee,"^")),path:i.path}));var h;const d=o.createHref(u);return y({fullPath:u,hash:s,query:r===Le?qe(e.query):e.query||{}},i,{redirectedFrom:void 0,href:d})}function O(e){return"string"==typeof e?k(n,e,l.value.path):y({},e)}function P(e,t){if(u!==e)return z(8,{from:t,to:e})}function C(e){return A(e)}function j(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let r="function"==typeof n?n(e):n;return"string"==typeof r&&(r=r.includes("?")||r.includes("#")?r=O(r):{path:r},r.params={}),y({query:e.query,hash:e.hash,params:"path"in r?{}:e.params},r)}}function A(e,t){const n=u=R(e),o=l.value,a=e.state,c=e.force,i=!0===e.replace,s=j(n);if(s)return A(y(O(s),{state:"object"==typeof s?y({},a,s.state):a,force:c,replace:i}),t||n);const f=n;let p;return f.redirectedFrom=t,!c&&function(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&$(t.matched[r],n.matched[o])&&x(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(r,o,n)&&(p=z(16,{to:f,from:o}),X(o,o,!0,!1)),(p?Promise.resolve(p):M(f,o)).catch((e=>Q(e)?Q(e,2)?e:J(e):V(e,f,o))).then((e=>{if(e){if(Q(e,2))return A(y({replace:i},O(e.to),{state:"object"==typeof e.to?y({},a,e.to.state):a,force:c}),t||f)}else e=_(f,o,!0,i,a);return B(f,o,e),e}))}function L(e,t){const n=P(e,t);return n?Promise.reject(n):Promise.resolve()}function q(e){const t=ee.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function M(e,t){let n;const[r,o,c]=function(e,t){const n=[],r=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let c=0;c<a;c++){const a=t.matched[c];a&&(e.matched.find((e=>$(e,a)))?r.push(a):n.push(a));const i=e.matched[c];i&&(t.matched.find((e=>$(e,i)))||o.push(i))}return[n,r,o]}(e,t);n=Fe(r.reverse(),"beforeRouteLeave",e,t);for(const o of r)o.leaveGuards.forEach((r=>{n.push(De(r,e,t))}));const s=L.bind(null,e,t);return n.push(s),ne(n).then((()=>{n=[];for(const r of a.list())n.push(De(r,e,t));return n.push(s),ne(n)})).then((()=>{n=Fe(o,"beforeRouteUpdate",e,t);for(const r of o)r.updateGuards.forEach((r=>{n.push(De(r,e,t))}));return n.push(s),ne(n)})).then((()=>{n=[];for(const r of c)if(r.beforeEnter)if(E(r.beforeEnter))for(const o of r.beforeEnter)n.push(De(o,e,t));else n.push(De(r.beforeEnter,e,t));return n.push(s),ne(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Fe(c,"beforeRouteEnter",e,t),n.push(s),ne(n)))).then((()=>{n=[];for(const r of i.list())n.push(De(r,e,t));return n.push(s),ne(n)})).catch((e=>Q(e,8)?e:Promise.reject(e)))}function B(e,t,n){s.list().forEach((r=>q((()=>r(e,t,n)))))}function _(e,t,n,r,a){const c=P(e,t);if(c)return c;const i=t===K,s=g?history.state:{};n&&(r||i?o.replace(e.fullPath,y({scroll:i&&s&&s.scroll},a)):o.push(e.fullPath,a)),l.value=e,X(e,t,n,i),J()}let W;function D(){W||(W=o.listen(((e,t,n)=>{if(!te.listening)return;const r=R(e),a=j(r);if(a)return void A(y(a,{replace:!0}),r).catch(w);u=r;const c=l.value;var i,s;g&&(i=N(c.fullPath,n.delta),s=G(),T.set(i,s)),M(r,c).catch((e=>Q(e,12)?e:Q(e,2)?(A(e.to,r).then((e=>{Q(e,20)&&!n.delta&&n.type===S.pop&&o.go(-1,!1)})).catch(w),Promise.reject()):(n.delta&&o.go(-n.delta,!1),V(e,r,c)))).then((e=>{(e=e||_(r,c,!1))&&(n.delta&&!Q(e,8)?o.go(-n.delta,!1):n.type===S.pop&&Q(e,20)&&o.go(-1,!1)),B(r,c,e)})).catch(w)})))}let F,U=_e(),H=_e();function V(e,t,n){J(e);const r=H.list();return r.length?r.forEach((r=>r(e,t,n))):console.error(e),Promise.reject(e)}function J(e){return F||(F=!e,D(),U.list().forEach((([t,n])=>e?n(e):t())),U.reset()),e}function X(t,n,r,o){const{scrollBehavior:a}=e;if(!g||!a)return Promise.resolve();const c=!r&&function(e){const t=T.get(e);return T.delete(e),t}(N(t.fullPath,0))||(o||!r)&&history.state&&history.state.scroll||null;return m().then((()=>a(t,n,c))).then((e=>e&&function(e){let t;if("el"in e){const n=e.el,r="string"==typeof n&&n.startsWith("#"),o="string"==typeof n?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=function(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)}}(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}(e))).catch((e=>V(e,t,n)))}const Y=e=>o.go(e);let Z;const ee=new Set,te={currentRoute:l,listening:!0,addRoute:function(e,n){let r,o;return I(e)?(r=t.getRecordMatcher(e),o=n):o=e,t.addRoute(o,r)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:R,options:e,push:C,replace:function(e){return C(y(O(e),{replace:!0}))},go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:a.add,beforeResolve:i.add,afterEach:s.add,onError:H.add,isReady:function(){return F&&l.value!==K?Promise.resolve():new Promise(((e,t)=>{U.add([e,t])}))},install(e){e.component("RouterLink",Ue),e.component("RouterView",Qe),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>c(l)}),g&&!Z&&l.value===K&&(Z=!0,C(o.location).catch((e=>{})));const t={};for(const e in K)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(Ge,this),e.provide(Ne,d(t)),e.provide(Te,l);const n=e.unmount;ee.add(e),e.unmount=function(){ee.delete(e),ee.size<1&&(u=K,W&&W(),W=null,l.value=K,Z=!1,F=!1),n()}}};function ne(e){return e.reduce(((e,t)=>e.then((()=>q(t)))),Promise.resolve())}return te},createRouterMatcher:ce,createWebHashHistory:function(e){(e=location.host?e||location.pathname+location.search:"").includes("#")||(e+="#");return F(e)},createWebHistory:F,isNavigationFailure:Q,loadRouteLocation:function(e){return e.matched.every((e=>e.redirect))?Promise.reject(new Error("Cannot load a route that redirects.")):Promise.all(e.matched.map((e=>e.components&&Promise.all(Object.keys(e.components).reduce(((t,n)=>{const r=e.components[n];return"function"!=typeof r||"displayName"in r||t.push(r().then((t=>{if(!t)return Promise.reject(new Error(`Couldn't resolve component "${n}" at "${e.path}". Ensure you passed a function that returns a promise.`));const r=v(t)?t.default:t;e.components[n]=r}))),t}),[]))))).then((()=>e))},onBeforeRouteLeave:function(e){const n=t(Me,{}).value;if(!n)return;We(n,"leaveGuards",e)},onBeforeRouteUpdate:function(e){const n=t(Me,{}).value;if(!n)return;We(n,"updateGuards",e)},parseQuery:Ae,stringifyQuery:Le,useLink:Ie,useRoute:function(){return t(Ne)},useRouter:function(){return t(Ge)}});const g="undefined"!=typeof window;function v(e){return e.__esModule||"Module"===e[Symbol.toStringTag]}const y=Object.assign;function b(e,t){const n={};for(const r in t){const o=t[r];n[r]=E(o)?o.map(e):e(o)}return n}const w=()=>{},E=Array.isArray,R=/\/$/,O=e=>e.replace(R,"");function k(e,t,n="/"){let r,o={},a="",c="";const i=t.indexOf("#");let s=t.indexOf("?");return i<s&&i>=0&&(s=-1),s>-1&&(r=t.slice(0,s),a=t.slice(s+1,i>-1?i:t.length),o=e(a)),i>-1&&(r=r||t.slice(0,i),c=t.slice(i,t.length)),r=function(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 a,c,i=n.length-1;for(a=0;a<r.length;a++)if(c=r[a],"."!==c){if(".."!==c)break;i>1&&i--}return n.slice(0,i).join("/")+"/"+r.slice(a-(a===r.length?1:0)).join("/")}(null!=r?r:t,n),{fullPath:r+(a&&"?")+a+c,path:r,query:o,hash:c}}function P(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function $(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function x(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!C(e[n],t[n]))return!1;return!0}function C(e,t){return E(e)?j(e,t):E(t)?j(t,e):e===t}function j(e,t){return E(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}var S,A;!function(e){e.pop="pop",e.push="push"}(S||(S={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(A||(A={}));const L="";function q(e){if(!e)if(g){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),O(e)}const M=/^[^#]+#/;function B(e,t){return e.replace(M,"#")+t}const G=()=>({left:window.pageXOffset,top:window.pageYOffset});function N(e,t){return(history.state?history.state.position-t:-1)+e}const T=new Map;let _=()=>location.protocol+"//"+location.host;function W(e,t){const{pathname:n,search:r,hash:o}=t,a=e.indexOf("#");if(a>-1){let t=o.includes(e.slice(a))?e.slice(a).length:1,n=o.slice(t);return"/"!==n[0]&&(n="/"+n),P(n,"")}return P(n,e)+r+o}function D(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?G():null}}function F(e){const t=function(e){const{history:t,location:n}=window,r={value:W(e,n)},o={value:t.state};function a(r,a,c){const i=e.indexOf("#"),s=i>-1?(n.host&&document.querySelector("base")?e:e.slice(i))+r:_()+e+r;try{t[c?"replaceState":"pushState"](a,"",s),o.value=a}catch(e){console.error(e),n[c?"replace":"assign"](s)}}return o.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:function(e,n){const c=y({},o.value,t.state,{forward:e,scroll:G()});a(c.current,c,!0),a(e,y({},D(r.value,e,null),{position:c.position+1},n),!1),r.value=e},replace:function(e,n){a(e,y({},t.state,D(o.value.back,e,o.value.forward,!0),n,{position:o.value.position}),!0),r.value=e}}}(e=q(e)),n=function(e,t,n,r){let o=[],a=[],c=null;const i=({state:a})=>{const i=W(e,location),s=n.value,l=t.value;let u=0;if(a){if(n.value=i,t.value=a,c&&c===s)return void(c=null);u=l?a.position-l.position:0}else r(i);o.forEach((e=>{e(n.value,s,{delta:u,type:S.pop,direction:u?u>0?A.forward:A.back:A.unknown})}))};function s(){const{history:e}=window;e.state&&e.replaceState(y({},e.state,{scroll:G()}),"")}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",s,{passive:!0}),{pauseListeners:function(){c=n.value},listen:function(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return a.push(t),t},destroy:function(){for(const e of a)e();a=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",s)}}}(e,t.state,t.location,t.replace);const r=y({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:B.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function I(e){return"string"==typeof e||"symbol"==typeof e}const K=e("START_LOCATION",{path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0}),U=Symbol("");var H;e("NavigationFailureType",H),function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(H||e("NavigationFailureType",H={}));const V={1:({location:e,currentLocation:t})=>`No match for\n ${JSON.stringify(e)}${t?"\nwhile being at\n"+JSON.stringify(t):""}`,2:({from:e,to:t})=>`Redirected from "${e.fullPath}" to "${function(e){if("string"==typeof e)return e;if("path"in e)return e.path;const t={};for(const n of J)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}(t)}" via a navigation guard.`,4:({from:e,to:t})=>`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`,8:({from:e,to:t})=>`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`,16:({from:e})=>`Avoided redundant navigation to current location: "${e.fullPath}".`};function z(e,t){return y(new Error(V[e](t)),{type:e,[U]:!0},t)}function Q(e,t){return e instanceof Error&&U in e&&(null==t||!!(e.type&t))}const J=["params","query","hash"];const X="[^/]+?",Y={sensitive:!1,strict:!1,start:!0,end:!0},Z=/[.+*?^${}()[\]/\\]/g;function ee(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?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}function te(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const e=ee(r[n],o[n]);if(e)return e;n++}if(1===Math.abs(o.length-r.length)){if(ne(r))return 1;if(ne(o))return-1}return o.length-r.length}function ne(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const re={type:0,value:""},oe=/[a-zA-Z0-9_]/;function ae(e,t,n){const r=function(e,t){const n=y({},Y,t),r=[];let o=n.start?"^":"";const a=[];for(const t of e){const e=t.length?[]:[90];n.strict&&!t.length&&(o+="/");for(let r=0;r<t.length;r++){const c=t[r];let i=40+(n.sensitive?.25:0);if(0===c.type)r||(o+="/"),o+=c.value.replace(Z,"\\$&"),i+=40;else if(1===c.type){const{value:e,repeatable:n,optional:s,regexp:l}=c;a.push({name:e,repeatable:n,optional:s});const u=l||X;if(u!==X){i+=10;try{new RegExp(`(${u})`)}catch(t){throw new Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let f=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(f=s&&t.length<2?`(?:/${f})`:"/"+f),s&&(f+="?"),o+=f,i+=20,s&&(i+=-8),n&&(i+=-20),".*"===u&&(i+=-50)}e.push(i)}r.push(e)}if(n.strict&&n.end){const e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&(o+="(?:/|$)");const c=new RegExp(o,n.sensitive?"":"i");return{re:c,score:r,keys:a,parse:function(e){const t=e.match(c),n={};if(!t)return null;for(let e=1;e<t.length;e++){const r=t[e]||"",o=a[e-1];n[o.name]=r&&o.repeatable?r.split("/"):r}return n},stringify:function(t){let n="",r=!1;for(const o of e){r&&n.endsWith("/")||(n+="/"),r=!1;for(const e of o)if(0===e.type)n+=e.value;else if(1===e.type){const{value:a,repeatable:c,optional:i}=e,s=a in t?t[a]:"";if(E(s)&&!c)throw new Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);const l=E(s)?s.join("/"):s;if(!l){if(!i)throw new Error(`Missing required param "${a}"`);o.length<2&&(n.endsWith("/")?n=n.slice(0,-1):r=!0)}n+=l}}return n||"/"}}}(function(e){if(!e)return[[]];if("/"===e)return[[re]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n;const o=[];let a;function c(){a&&o.push(a),a=[]}let i,s=0,l="",u="";function f(){l&&(0===n?a.push({type:0,value:l}):1===n||2===n||3===n?(a.length>1&&("*"===i||"+"===i)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:"*"===i||"+"===i,optional:"*"===i||"?"===i})):t("Invalid state to consume buffer"),l="")}function p(){l+=i}for(;s<e.length;)if(i=e[s++],"\\"!==i||2===n)switch(n){case 0:"/"===i?(l&&f(),c()):":"===i?(f(),n=1):p();break;case 4:p(),n=r;break;case 1:"("===i?n=2:oe.test(i)?p():(f(),n=0,"*"!==i&&"?"!==i&&"+"!==i&&s--);break;case 2:")"===i?"\\"==u[u.length-1]?u=u.slice(0,-1)+i:n=3:u+=i;break;case 3:f(),n=0,"*"!==i&&"?"!==i&&"+"!==i&&s--,u="";break;default:t("Unknown state")}else r=n,n=4;return 2===n&&t(`Unfinished custom RegExp for param "${l}"`),f(),c(),o}(e.path),n),o=y(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function ce(e,t){const n=[],r=new Map;function o(e,n,r){const i=!r,s=function(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:se(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}(e);s.aliasOf=r&&r.record;const l=fe(t,e),u=[s];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)u.push(y({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s}))}let f,p;for(const t of u){const{path:u}=t;if(n&&"/"!==u[0]){const e=n.record.path;t.path=n.record.path+(u&&("/"===e[e.length-1]?"":"/")+u)}if(f=ae(t,n,l),r?r.alias.push(f):(p=p||f,p!==f&&p.alias.push(f),i&&e.name&&!le(f)&&a(e.name)),s.children){const e=s.children;for(let t=0;t<e.length;t++)o(e[t],f,r&&r.children[t])}r=r||f,(f.record.components&&Object.keys(f.record.components).length||f.record.name||f.record.redirect)&&c(f)}return p?()=>{a(p)}:w}function a(e){if(I(e)){const t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(a),t.alias.forEach(a))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(a),e.alias.forEach(a))}}function c(e){let t=0;for(;t<n.length&&te(e,n[t])>=0&&(e.record.path!==n[t].record.path||!pe(e,n[t]));)t++;n.splice(t,0,e),e.record.name&&!le(e)&&r.set(e.record.name,e)}return t=fe({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>o(e))),{addRoute:o,resolve:function(e,t){let o,a,c,i={};if("name"in e&&e.name){if(o=r.get(e.name),!o)throw z(1,{location:e});c=o.record.name,i=y(ie(t.params,o.keys.filter((e=>!e.optional)).map((e=>e.name))),e.params&&ie(e.params,o.keys.map((e=>e.name)))),a=o.stringify(i)}else if("path"in e)a=e.path,o=n.find((e=>e.re.test(a))),o&&(i=o.parse(a),c=o.record.name);else{if(o=t.name?r.get(t.name):n.find((e=>e.re.test(t.path))),!o)throw z(1,{location:e,currentLocation:t});c=o.record.name,i=y({},t.params,e.params),a=o.stringify(i)}const s=[];let l=o;for(;l;)s.unshift(l.record),l=l.parent;return{name:c,path:a,params:i,matched:s,meta:ue(s)}},removeRoute:a,getRoutes:function(){return n},getRecordMatcher:function(e){return r.get(e)}}}function ie(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function se(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]="object"==typeof n?n[r]:n;return t}function le(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ue(e){return e.reduce(((e,t)=>y(e,t.meta)),{})}function fe(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function pe(e,t){return t.children.some((t=>t===e||pe(e,t)))}const he=/#/g,de=/&/g,me=/\//g,ge=/=/g,ve=/\?/g,ye=/\+/g,be=/%5B/g,we=/%5D/g,Ee=/%5E/g,Re=/%60/g,Oe=/%7B/g,ke=/%7C/g,Pe=/%7D/g,$e=/%20/g;function xe(e){return encodeURI(""+e).replace(ke,"|").replace(be,"[").replace(we,"]")}function Ce(e){return xe(e).replace(ye,"%2B").replace($e,"+").replace(he,"%23").replace(de,"%26").replace(Re,"`").replace(Oe,"{").replace(Pe,"}").replace(Ee,"^")}function je(e){return null==e?"":function(e){return xe(e).replace(he,"%23").replace(ve,"%3F")}(e).replace(me,"%2F")}function Se(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}function Ae(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;e<n.length;++e){const r=n[e].replace(ye," "),o=r.indexOf("="),a=Se(o<0?r:r.slice(0,o)),c=o<0?null:Se(r.slice(o+1));if(a in t){let e=t[a];E(e)||(e=t[a]=[e]),e.push(c)}else t[a]=c}return t}function Le(e){let t="";for(let n in e){const r=e[n];if(n=Ce(n).replace(ge,"%3D"),null==r){void 0!==r&&(t+=(t.length?"&":"")+n);continue}(E(r)?r.map((e=>e&&Ce(e))):[r&&Ce(r)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}))}return t}function qe(e){const t={};for(const n in e){const r=e[n];void 0!==r&&(t[n]=E(r)?r.map((e=>null==e?null:""+e)):null==r?r:""+r)}return t}const Me=e("matchedRouteKey",Symbol("")),Be=e("viewDepthKey",Symbol("")),Ge=e("routerKey",Symbol("")),Ne=e("routeLocationKey",Symbol("")),Te=e("routerViewLocationKey",Symbol(""));function _e(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function We(e,t,a){const c=()=>{e[t].delete(a)};n(c),r(c),o((()=>{e[t].add(a)})),e[t].add(a)}function De(e,t,n,r,o){const a=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise(((c,i)=>{const s=e=>{var s;!1===e?i(z(4,{from:n,to:t})):e instanceof Error?i(e):"string"==typeof(s=e)||s&&"object"==typeof s?i(z(2,{from:t,to:e})):(a&&r.enterCallbacks[o]===a&&"function"==typeof e&&a.push(e),c())},l=e.call(r&&r.instances[o],t,n,s);let u=Promise.resolve(l);e.length<3&&(u=u.then(s)),u.catch((e=>i(e)))}))}function Fe(e,t,n,r){const o=[];for(const c of e)for(const e in c.components){let i=c.components[e];if("beforeRouteEnter"===t||c.instances[e])if("object"==typeof(a=i)||"displayName"in a||"props"in a||"__vccOpts"in a){const a=(i.__vccOpts||i)[t];a&&o.push(De(a,n,r,c,e))}else{let a=i();o.push((()=>a.then((o=>{if(!o)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${c.path}"`));const a=v(o)?o.default:o;c.components[e]=a;const i=(a.__vccOpts||a)[t];return i&&De(i,n,r,c,e)()}))))}}var a;return o}function Ie(e){const n=t(Ge),r=t(Ne),o=a((()=>n.resolve(c(e.to)))),i=a((()=>{const{matched:e}=o.value,{length:t}=e,n=e[t-1],a=r.matched;if(!n||!a.length)return-1;const c=a.findIndex($.bind(null,n));if(c>-1)return c;const i=He(e[t-2]);return t>1&&He(n)===i&&a[a.length-1].path!==i?a.findIndex($.bind(null,e[t-2])):c})),s=a((()=>i.value>-1&&function(e,t){for(const n in t){const r=t[n],o=e[n];if("string"==typeof r){if(r!==o)return!1}else if(!E(o)||o.length!==r.length||r.some(((e,t)=>e!==o[t])))return!1}return!0}(r.params,o.value.params))),l=a((()=>i.value>-1&&i.value===r.matched.length-1&&x(r.params,o.value.params)));return{route:o,href:a((()=>o.value.href)),isActive:s,isExactActive:l,navigate:function(t={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(t)?n[c(e.replace)?"replace":"push"](c(e.to)).catch(w):Promise.resolve()}}}const Ke=i({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:n}){const r=s(Ie(e)),{options:o}=t(Ge),c=a((()=>({[Ve(e.activeClass,o.linkActiveClass,"router-link-active")]:r.isActive,[Ve(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive})));return()=>{const t=n.default&&n.default(r);return e.custom?t:l("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:c.value},t)}}}),Ue=e("RouterLink",Ke);function He(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ve=(e,t,n)=>null!=e?e:null!=t?t:n;function ze(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const Qe=e("RouterView",i({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:n,slots:r}){const o=t(Te),i=a((()=>e.route||o.value)),s=t(Be,0),h=a((()=>{let e=c(s);const{matched:t}=i.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),d=a((()=>i.value.matched[h.value]));u(Be,a((()=>h.value+1))),u(Me,d),u(Te,i);const m=f();return p((()=>[m.value,d.value,e.name]),(([e,t,n],[r,o,a])=>{t&&(t.instances[n]=e,o&&o!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=o.leaveGuards),t.updateGuards.size||(t.updateGuards=o.updateGuards))),!e||!t||o&&$(t,o)&&r||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const t=i.value,o=e.name,a=d.value,c=a&&a.components[o];if(!c)return ze(r.default,{Component:c,route:t});const s=a.props[o],u=s?!0===s?t.params:"function"==typeof s?s(t):s:null,f=l(c,y({},u,n,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[o]=null)},ref:m}));return ze(r.default,{Component:f,route:t})||f}}}))}}}));