import{bk as e,b5 as t,b7 as n,M as r,as as o,af as a,aS as c,a5 as s,q as i,bE as l,aU as u,aO as f}from"./@vue.DbmRtknU.js"; /*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */const p="undefined"!=typeof document;function h(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}const d=Object.assign;function m(e,t){const n={};for(const r in t){const o=t[r];n[r]=v(o)?o.map(e):e(o)}return n}const g=()=>{},v=Array.isArray;function E(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const y=/#/g,b=/&/g,A=/\//g,R=/=/g,O=/\?/g,N=/\+/g,I=/%5B/g,w=/%5D/g,T=/%5E/g,C=/%60/g,P=/%7B/g,S=/%7C/g,_=/%7D/g,D=/%20/g;function x(e){return null==e?"":encodeURI(""+e).replace(S,"|").replace(I,"[").replace(w,"]")}function G(e){return x(e).replace(N,"%2B").replace(D,"+").replace(y,"%23").replace(b,"%26").replace(C,"`").replace(P,"{").replace(_,"}").replace(T,"^")}function k(e){return G(e).replace(R,"%3D")}function B(e){return function(e){return x(e).replace(y,"%23").replace(O,"%3F")}(e).replace(A,"%2F")}function L(e){if(null==e)return null;try{return decodeURIComponent(""+e)}catch(t){}return""+e}const V=/\/$/;function U(e,t,n="/"){let r,o={},a="",c="";const s=t.indexOf("#");let i=t.indexOf("?");return i=s>=0&&i>s?-1:i,i>=0&&(r=t.slice(0,i),a=t.slice(i,s>0?s:t.length),o=e(a.slice(1))),s>=0&&(r=r||t.slice(0,s),c=t.slice(s,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,s=n.length-1;for(a=0;a1&&s--}return n.slice(0,s).join("/")+"/"+r.slice(a).join("/")}(null!=r?r:t,n),{fullPath:r+a+c,path:r,query:o,hash:L(c)}}function j(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 M(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!q(e[n],t[n]))return!1;return!0}function q(e,t){return v(e)?W(e,t):v(t)?W(t,e):(null==e?void 0:e.valueOf())===(null==t?void 0:t.valueOf())}function W(e,t){return v(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):1===e.length&&e[0]===t}const F={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let H=function(e){return e.pop="pop",e.push="push",e}({}),z=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function K(e){if(!e)if(p){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(V,"")}const Q=/^[^#]+#/;function X(e,t){return e.replace(Q,"#")+t}const Y=()=>({left:window.scrollX,top:window.scrollY});function Z(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.scrollX,null!=t.top?t.top:window.scrollY)}function J(e,t){return(history.state?history.state.position-t:-1)+e}const ee=new Map;function te(e){return"string"==typeof e||"symbol"==typeof e}let ne=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const re=Symbol("");function oe(e,t){return d(new Error,{type:e,[re]:!0},t)}function ae(e,t){return e instanceof Error&&re in e&&(null==t||!!(e.type&t))}ne.MATCHER_NOT_FOUND,ne.NAVIGATION_GUARD_REDIRECT,ne.NAVIGATION_ABORTED,ne.NAVIGATION_CANCELLED,ne.NAVIGATION_DUPLICATED;function ce(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let r=0;re&&G(e)):[r&&G(r)]).forEach(e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}):void 0!==r&&(t+=(t.length?"&":"")+n)}return t}function ie(e){const t={};for(const n in e){const r=e[n];void 0!==r&&(t[n]=v(r)?r.map(e=>null==e?null:""+e):null==r?r:""+r)}return t}const le=Symbol(""),ue=Symbol(""),fe=Symbol(""),pe=Symbol(""),he=Symbol("");function de(){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 me(e,t,n,r,o,a=e=>e()){const c=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((s,i)=>{const l=e=>{var a;!1===e?i(oe(ne.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?i(e):"string"==typeof(a=e)||a&&"object"==typeof a?i(oe(ne.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(c&&r.enterCallbacks[o]===c&&"function"==typeof e&&c.push(e),s())},u=a(()=>e.call(r&&r.instances[o],t,n,l));let f=Promise.resolve(u);e.length<3&&(f=f.then(l)),f.catch(e=>i(e))})}function ge(e,t,n,r,o=e=>e()){const a=[];for(const c of e)for(const e in c.components){let s=c.components[e];if("beforeRouteEnter"===t||c.instances[e])if(h(s)){const i=(s.__vccOpts||s)[t];i&&a.push(me(i,n,r,c,e,o))}else{let i=s();a.push(()=>i.then(a=>{if(!a)throw new Error(`Couldn't resolve component "${e}" at "${c.path}"`);const s=(i=a).__esModule||"Module"===i[Symbol.toStringTag]||i.default&&h(i.default)?a.default:a;var i;c.mods[e]=a,c.components[e]=s;const l=(s.__vccOpts||s)[t];return l&&me(l,n,r,c,e,o)()}))}}return a}function ve(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),j(n,"")}return j(n,e)+r+o}function Ee(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Y():null}}function ye(e){const{history:t,location:n}=window,r={value:ve(e,n)},o={value:t.state};function a(r,a,c){const s=e.indexOf("#"),i=s>-1?(n.host&&document.querySelector("base")?e:e.slice(s))+r:location.protocol+"//"+location.host+e+r;try{t[c?"replaceState":"pushState"](a,"",i),o.value=a}catch(l){n[c?"replace":"assign"](i)}}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=d({},o.value,t.state,{forward:e,scroll:Y()});a(c.current,c,!0),a(e,d({},Ee(r.value,e,null),{position:c.position+1},n),!1),r.value=e},replace:function(e,n){a(e,d({},t.state,Ee(o.value.back,e,o.value.forward,!0),n,{position:o.value.position}),!0),r.value=e}}}function be(e){const t=ye(e=K(e)),n=function(e,t,n,r){let o=[],a=[],c=null;const s=({state:a})=>{const s=ve(e,location),i=n.value,l=t.value;let u=0;if(a){if(n.value=s,t.value=a,c&&c===i)return void(c=null);u=l?a.position-l.position:0}else r(s);o.forEach(e=>{e(n.value,i,{delta:u,type:H.pop,direction:u?u>0?z.forward:z.back:z.unknown})})};function i(){if("hidden"===document.visibilityState){const{history:e}=window;if(!e.state)return;e.replaceState(d({},e.state,{scroll:Y()}),"")}}return window.addEventListener("popstate",s),window.addEventListener("pagehide",i),document.addEventListener("visibilitychange",i),{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",s),window.removeEventListener("pagehide",i),document.removeEventListener("visibilitychange",i)}}}(e,t.state,t.location,t.replace);const r=d({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:X.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 Ae(e){return(e=location.host?e||location.pathname+location.search:"").includes("#")||(e+="#"),be(e)}let Re=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Oe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Oe||{});const Ne={type:Re.Static,value:""},Ie=/[a-zA-Z0-9_]/;const we="[^/]+?",Te={sensitive:!1,strict:!1,start:!0,end:!0};var Ce=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(Ce||{});const Pe=/[.+*?^${}()[\]/\\]/g;function Se(e,t){let n=0;for(;nt.length?1===t.length&&t[0]===Ce.Static+Ce.Segment?1:-1:0}function _e(e,t){let n=0;const r=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const xe={strict:!1,end:!0,sensitive:!1};function Ge(e,t,n){const r=function(e,t){const n=d({},Te,t),r=[];let o=n.start?"^":"";const a=[];for(const s of e){const e=s.length?[]:[Ce.Root];n.strict&&!s.length&&(o+="/");for(let t=0;t1&&("*"===s||"+"===s)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Re.Param,value:l,regexp:u,repeatable:"*"===s||"+"===s,optional:"*"===s||"?"===s})):t("Invalid state to consume buffer"),l="")}function p(){l+=s}for(;i{a(p)}:g}function a(e){if(te(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){const t=function(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;_e(e,t[o])<0?r=o:n=o+1}const o=function(e){let t=e;for(;t=t.parent;)if($e(t)&&0===_e(e,t))return t}(e);o&&(r=t.lastIndexOf(o,r-1));return r}(e,n);n.splice(t,0,e),e.record.name&&!Ue(e)&&r.set(e.record.name,e)}return t=E(xe,t),e.forEach(e=>o(e)),{addRoute:o,resolve:function(e,t){let o,a,c,s={};if("name"in e&&e.name){if(o=r.get(e.name),!o)throw oe(ne.MATCHER_NOT_FOUND,{location:e});c=o.record.name,s=d(Be(t.params,o.keys.filter(e=>!e.optional).concat(o.parent?o.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Be(e.params,o.keys.map(e=>e.name))),a=o.stringify(s)}else if(null!=e.path)a=e.path,o=n.find(e=>e.re.test(a)),o&&(s=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 oe(ne.MATCHER_NOT_FOUND,{location:e,currentLocation:t});c=o.record.name,s=d({},t.params,e.params),a=o.stringify(s)}const i=[];let l=o;for(;l;)i.unshift(l.record),l=l.parent;return{name:c,path:a,params:s,matched:i,meta:je(i)}},removeRoute:a,clearRoutes:function(){n.length=0,r.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return r.get(e)}}}function Be(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Le(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ve(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ve(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 Ue(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function je(e){return e.reduce((e,t)=>d(e,t.meta),{})}function $e({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Me(t){const n=a(fe),r=a(pe),o=i(()=>{const r=e(t.to);return n.resolve(r)}),c=i(()=>{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 s=We(e[t-2]);return t>1&&We(n)===s&&a[a.length-1].path!==s?a.findIndex($.bind(null,e[t-2])):c}),s=i(()=>c.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(!v(o)||o.length!==r.length||r.some((e,t)=>e.valueOf()!==o[t].valueOf()))return!1}return!0}(r.params,o.value.params)),l=i(()=>c.value>-1&&c.value===r.matched.length-1&&M(r.params,o.value.params));return{route:o,href:i(()=>o.value.href),isActive:s,isExactActive:l,navigate:function(r={}){if(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}(r)){const r=n[e(t.replace)?"replace":"push"](e(t.to)).catch(g);return t.viewTransition&&"undefined"!=typeof document&&"startViewTransition"in document&&document.startViewTransition(()=>r),r}return Promise.resolve()}}}const qe=r({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"},viewTransition:Boolean},useLink:Me,setup(e,{slots:t}){const n=c(Me(e)),{options:r}=a(fe),o=i(()=>({[Fe(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Fe(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&(1===(a=t.default(n)).length?a[0]:a);var a;return e.custom?r:s("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}});function We(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Fe=(e,t,n)=>null!=e?e:null!=t?t:n;function He(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const ze=r({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:n,slots:r}){const o=a(he),c=i(()=>t.route||o.value),p=a(ue,0),h=i(()=>{let t=e(p);const{matched:n}=c.value;let r;for(;(r=n[t])&&!r.components;)t++;return t}),m=i(()=>c.value.matched[h.value]);f(ue,i(()=>h.value+1)),f(le,m),f(he,c);const g=u();return l(()=>[g.value,m.value,t.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 e=c.value,o=t.name,a=m.value,i=a&&a.components[o];if(!i)return He(r.default,{Component:i,route:e});const l=a.props[o],u=l?!0===l?e.params:"function"==typeof l?l(e):l:null,f=s(i,d({},u,n,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[o]=null)},ref:g}));return He(r.default,{Component:f,route:e})||f}}});function Ke(r){const a=ke(r.routes,r),c=r.parseQuery||ce,s=r.stringifyQuery||se,i=r.history,l=de(),u=de(),f=de(),h=n(F);let E=F;p&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const y=m.bind(null,e=>""+e),b=m.bind(null,B),A=m.bind(null,L);function R(e,t){if(t=d({},t||h.value),"string"==typeof e){const n=U(c,e,t.path),r=a.resolve({path:n.path},t),o=i.createHref(n.fullPath);return d(n,r,{params:A(r.params),hash:L(n.hash),redirectedFrom:void 0,href:o})}let n;if(null!=e.path)n=d({},e,{path:U(c,e.path,t.path).path});else{const r=d({},e.params);for(const e in r)null==r[e]&&delete r[e];n=d({},e,{params:b(r)}),t.params=b(t.params)}const r=a.resolve(n,t),o=e.hash||"";r.params=y(A(r.params));const l=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(s,d({},e,{hash:(u=o,x(u).replace(P,"{").replace(_,"}").replace(T,"^")),path:r.path}));var u;const f=i.createHref(l);return d({fullPath:l,hash:o,query:s===se?ie(e.query):e.query||{}},r,{redirectedFrom:void 0,href:f})}function O(e){return"string"==typeof e?U(c,e,h.value.path):d({},e)}function N(e,t){if(E!==e)return oe(ne.NAVIGATION_CANCELLED,{from:t,to:e})}function I(e){return C(e)}function w(e,t){const n=e.matched[e.matched.length-1];if(n&&n.redirect){const{redirect:r}=n;let o="function"==typeof r?r(e,t):r;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=O(o):{path:o},o.params={}),d({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function C(e,t){const n=E=R(e),r=h.value,o=e.state,a=e.force,c=!0===e.replace,i=w(n,r);if(i)return C(d(O(i),{state:"object"==typeof i?d({},o,i.state):o,force:a,replace:c}),t||n);const l=n;let u;return l.redirectedFrom=t,!a&&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])&&M(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(s,r,n)&&(u=oe(ne.NAVIGATION_DUPLICATED,{to:l,from:r}),re(r,r,!0,!1)),(u?Promise.resolve(u):G(l,r)).catch(e=>ae(e)?ae(e,ne.NAVIGATION_GUARD_REDIRECT)?e:X(e):Q(e,l,r)).then(e=>{if(e){if(ae(e,ne.NAVIGATION_GUARD_REDIRECT))return C(d({replace:c},O(e.to),{state:"object"==typeof e.to?d({},o,e.to.state):o,force:a}),t||l)}else e=V(l,r,!0,c,o);return k(l,r,e),e})}function S(e,t){const n=N(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){const t=ve.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function G(e,t){let n;const[r,o,a]=function(e,t){const n=[],r=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let c=0;c$(e,a))?r.push(a):n.push(a));const s=e.matched[c];s&&(t.matched.find(e=>$(e,s))||o.push(s))}return[n,r,o]} /*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT */(e,t);n=ge(r.reverse(),"beforeRouteLeave",e,t);for(const s of r)s.leaveGuards.forEach(r=>{n.push(me(r,e,t))});const c=S.bind(null,e,t);return n.push(c),ye(n).then(()=>{n=[];for(const r of l.list())n.push(me(r,e,t));return n.push(c),ye(n)}).then(()=>{n=ge(o,"beforeRouteUpdate",e,t);for(const r of o)r.updateGuards.forEach(r=>{n.push(me(r,e,t))});return n.push(c),ye(n)}).then(()=>{n=[];for(const r of a)if(r.beforeEnter)if(v(r.beforeEnter))for(const o of r.beforeEnter)n.push(me(o,e,t));else n.push(me(r.beforeEnter,e,t));return n.push(c),ye(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=ge(a,"beforeRouteEnter",e,t,D),n.push(c),ye(n))).then(()=>{n=[];for(const r of u.list())n.push(me(r,e,t));return n.push(c),ye(n)}).catch(e=>ae(e,ne.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function k(e,t,n){f.list().forEach(r=>D(()=>r(e,t,n)))}function V(e,t,n,r,o){const a=N(e,t);if(a)return a;const c=t===F,s=p?history.state:{};n&&(r||c?i.replace(e.fullPath,d({scroll:c&&s&&s.scroll},o)):i.push(e.fullPath,o)),h.value=e,re(e,t,n,c),X()}let j;function q(){j||(j=i.listen((e,t,n)=>{if(!Ee.listening)return;const r=R(e),o=w(r,Ee.currentRoute.value);if(o)return void C(d(o,{replace:!0,force:!0}),r).catch(g);E=r;const a=h.value;var c,s;p&&(c=J(a.fullPath,n.delta),s=Y(),ee.set(c,s)),G(r,a).catch(e=>ae(e,ne.NAVIGATION_ABORTED|ne.NAVIGATION_CANCELLED)?e:ae(e,ne.NAVIGATION_GUARD_REDIRECT)?(C(d(O(e.to),{force:!0}),r).then(e=>{ae(e,ne.NAVIGATION_ABORTED|ne.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===H.pop&&i.go(-1,!1)}).catch(g),Promise.reject()):(n.delta&&i.go(-n.delta,!1),Q(e,r,a))).then(e=>{(e=e||V(r,a,!1))&&(n.delta&&!ae(e,ne.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===H.pop&&ae(e,ne.NAVIGATION_ABORTED|ne.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),k(r,a,e)}).catch(g)}))}let W,z=de(),K=de();function Q(e,t,n){X(e);const r=K.list();return r.length&&r.forEach(r=>r(e,t,n)),Promise.reject(e)}function X(e){return W||(W=!e,q(),z.list().forEach(([t,n])=>e?n(e):t()),z.reset()),e}function re(e,t,n,a){const{scrollBehavior:c}=r;if(!p||!c)return Promise.resolve();const s=!n&&function(e){const t=ee.get(e);return ee.delete(e),t}(J(e.fullPath,0))||(a||!n)&&history.state&&history.state.scroll||null;return o().then(()=>c(e,t,s)).then(e=>e&&Z(e)).catch(n=>Q(n,e,t))}const le=e=>i.go(e);let ue;const ve=new Set,Ee={currentRoute:h,listening:!0,addRoute:function(e,t){let n,r;return te(e)?(n=a.getRecordMatcher(e),r=t):r=e,a.addRoute(r,n)},removeRoute:function(e){const t=a.getRecordMatcher(e);t&&a.removeRoute(t)},clearRoutes:a.clearRoutes,hasRoute:function(e){return!!a.getRecordMatcher(e)},getRoutes:function(){return a.getRoutes().map(e=>e.record)},resolve:R,options:r,push:I,replace:function(e){return I(d(O(e),{replace:!0}))},go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:l.add,beforeResolve:u.add,afterEach:f.add,onError:K.add,isReady:function(){return W&&h.value!==F?Promise.resolve():new Promise((e,t)=>{z.add([e,t])})},install(n){n.component("RouterLink",qe),n.component("RouterView",ze),n.config.globalProperties.$router=Ee,Object.defineProperty(n.config.globalProperties,"$route",{enumerable:!0,get:()=>e(h)}),p&&!ue&&h.value===F&&(ue=!0,I(i.location).catch(e=>{}));const r={};for(const e in F)Object.defineProperty(r,e,{get:()=>h.value[e],enumerable:!0});n.provide(fe,Ee),n.provide(pe,t(r)),n.provide(he,h);const o=n.unmount;ve.add(n),n.unmount=function(){ve.delete(n),ve.size<1&&(E=F,j&&j(),j=null,h.value=F,ue=!1,W=!1),o()}}};function ye(e){return e.reduce((e,t)=>e.then(()=>D(t)),Promise.resolve())}return Ee}function Qe(){return a(fe)}function Xe(e){return a(pe)}export{Qe as a,Ae as b,Ke as c,Xe as u};