/*! * vue-router v3.6.5 * (c) 2022 Evan You * @license MIT */function C(t,e){for(var r in e)t[r]=e[r];return t}var Wt=/[!'()*]/g,Xt=function(t){return"%"+t.charCodeAt(0).toString(16)},Yt=/%2C/g,j=function(t){return encodeURIComponent(t).replace(Wt,Xt).replace(Yt,",")};function rt(t){try{return decodeURIComponent(t)}catch{}return t}function Zt(t,e,r){e===void 0&&(e={});var i=r||Dt,n;try{n=i(t||"")}catch{n={}}for(var a in e){var o=e[a];n[a]=Array.isArray(o)?o.map(dt):dt(o)}return n}var dt=function(t){return t==null||typeof t=="object"?t:String(t)};function Dt(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t&&t.split("&").forEach(function(r){var i=r.replace(/\+/g," ").split("="),n=rt(i.shift()),a=i.length>0?rt(i.join("=")):null;e[n]===void 0?e[n]=a:Array.isArray(e[n])?e[n].push(a):e[n]=[e[n],a]}),e}function te(t){var e=t?Object.keys(t).map(function(r){var i=t[r];if(i===void 0)return"";if(i===null)return j(r);if(Array.isArray(i)){var n=[];return i.forEach(function(a){a!==void 0&&(a===null?n.push(j(r)):n.push(j(r)+"="+j(a)))}),n.join("&")}return j(r)+"="+j(i)}).filter(function(r){return r.length>0}).join("&"):null;return e?"?"+e:""}var G=/\/?$/;function K(t,e,r,i){var n=i&&i.options.stringifyQuery,a=e.query||{};try{a=nt(a)}catch{}var o={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:a,params:e.params||{},fullPath:yt(e,n),matched:t?ee(t):[]};return r&&(o.redirectedFrom=yt(r,n)),Object.freeze(o)}function nt(t){if(Array.isArray(t))return t.map(nt);if(t&&typeof t=="object"){var e={};for(var r in t)e[r]=nt(t[r]);return e}else return t}var L=K(null,{path:"/"});function ee(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function yt(t,e){var r=t.path,i=t.query;i===void 0&&(i={});var n=t.hash;n===void 0&&(n="");var a=e||te;return(r||"/")+a(i)+n}function St(t,e,r){return e===L?t===e:e?t.path&&e.path?t.path.replace(G,"")===e.path.replace(G,"")&&(r||t.hash===e.hash&&B(t.query,e.query)):t.name&&e.name?t.name===e.name&&(r||t.hash===e.hash&&B(t.query,e.query)&&B(t.params,e.params)):!1:!1}function B(t,e){if(t===void 0&&(t={}),e===void 0&&(e={}),!t||!e)return t===e;var r=Object.keys(t).sort(),i=Object.keys(e).sort();return r.length!==i.length?!1:r.every(function(n,a){var o=t[n],s=i[a];if(s!==n)return!1;var u=e[n];return o==null||u==null?o===u:typeof o=="object"&&typeof u=="object"?B(o,u):String(o)===String(u)})}function re(t,e){return t.path.replace(G,"/").indexOf(e.path.replace(G,"/"))===0&&(!e.hash||t.hash===e.hash)&&ne(t.query,e.query)}function ne(t,e){for(var r in e)if(!(r in t))return!1;return!0}function Lt(t){for(var e=0;e=0&&(e=t.slice(i),t=t.slice(0,i));var n=t.indexOf("?");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{path:t,query:r,hash:e}}function _(t){return t.replace(/\/(?:\s*\/)+/g,"/")}var Q=Array.isArray||function(t){return Object.prototype.toString.call(t)=="[object Array]"},I=It,se=ut,ue=pe,fe=jt,ce=qt,he=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function ut(t,e){for(var r=[],i=0,n=0,a="",o=e&&e.delimiter||"/",s;(s=he.exec(t))!=null;){var u=s[0],f=s[1],v=s.index;if(a+=t.slice(n,v),n=v+u.length,f){a+=f[1];continue}var d=t[n],y=s[2],l=s[3],p=s[4],c=s[5],h=s[6],g=s[7];a&&(r.push(a),a="");var R=y!=null&&d!=null&&d!==y,m=h==="+"||h==="*",b=h==="?"||h==="*",x=s[2]||o,E=p||c;r.push({name:l||i++,prefix:y||"",delimiter:x,optional:b,repeat:m,partial:R,asterisk:!!g,pattern:E?de(E):g?".*":"[^"+V(x)+"]+?"})}return n1||!x.length)return x.length===0?e():e("span",{},x)}if(this.tag==="a")b.on=m,b.attrs={href:u,"aria-current":g};else{var E=Mt(this.$slots.default);if(E){E.isStatic=!1;var P=E.data=C({},E.data);P.on=P.on||{};for(var A in P.on){var tt=P.on[A];A in m&&(P.on[A]=Array.isArray(tt)?tt:[tt])}for(var N in m)N in P.on?P.on[N].push(m[N]):P.on[N]=R;var vt=E.data.attrs=C({},E.data.attrs);vt.href=u,vt["aria-current"]=g}else b.on=m}return e(this.tag,b,this.$slots.default)}};function Rt(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Mt(t){if(t){for(var e,r=0;r-1&&(h.params[b]=p.params[b]);return h.path=k(R.path,h.params),y(R,h,c)}else if(h.path){h.params={};for(var x=0;x-1}function D(t,e){return X(t)&&t._isRouter&&(e==null||t.type===e)}function Tt(t,e,r){var i=function(n){n>=t.length?r():t[n]?e(t[n],function(){i(n+1)}):i(n+1)};i(0)}function Ue(t){return function(e,r,i){var n=!1,a=0,o=null;zt(t,function(s,u,f,v){if(typeof s=="function"&&s.cid===void 0){n=!0,a++;var d=At(function(c){He(c)&&(c=c.default),s.resolved=typeof c=="function"?c:J.extend(c),f.components[v]=c,a--,a<=0&&i()}),y=At(function(c){var h="Failed to resolve async component "+v+": "+c;o||(o=X(c)?c:new Error(h),i(o))}),l;try{l=s(d,y)}catch(c){y(c)}if(l)if(typeof l.then=="function")l.then(d,y);else{var p=l.component;p&&typeof p.then=="function"&&p.then(d,y)}}}),n||i()}}function zt(t,e){return Ft(t.map(function(r){return Object.keys(r.components).map(function(i){return e(r.components[i],r.instances[i],r,i)})}))}function Ft(t){return Array.prototype.concat.apply([],t)}var Ne=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function He(t){return t.__esModule||Ne&&t[Symbol.toStringTag]==="Module"}function At(t){var e=!1;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];if(!e)return e=!0,t.apply(this,r)}}var T=function(e,r){this.router=e,this.base=Be(r),this.current=L,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};T.prototype.listen=function(e){this.cb=e};T.prototype.onReady=function(e,r){this.ready?e():(this.readyCbs.push(e),r&&this.readyErrorCbs.push(r))};T.prototype.onError=function(e){this.errorCbs.push(e)};T.prototype.transitionTo=function(e,r,i){var n=this,a;try{a=this.router.match(e,this.current)}catch(s){throw this.errorCbs.forEach(function(u){u(s)}),s}var o=this.current;this.confirmTransition(a,function(){n.updateRoute(a),r&&r(a),n.ensureURL(),n.router.afterHooks.forEach(function(s){s&&s(a,o)}),n.ready||(n.ready=!0,n.readyCbs.forEach(function(s){s(a)}))},function(s){i&&i(s),s&&!n.ready&&(!D(s,O.redirected)||o!==L)&&(n.ready=!0,n.readyErrorCbs.forEach(function(u){u(s)}))})};T.prototype.confirmTransition=function(e,r,i){var n=this,a=this.current;this.pending=e;var o=function(c){!D(c)&&X(c)&&(n.errorCbs.length?n.errorCbs.forEach(function(h){h(c)}):console.error(c)),i&&i(c)},s=e.matched.length-1,u=a.matched.length-1;if(St(e,a)&&s===u&&e.matched[s]===a.matched[u])return this.ensureURL(),e.hash&&$(this.router,a,e,!1),o(je(a,e));var f=Ve(this.current.matched,e.matched),v=f.updated,d=f.deactivated,y=f.activated,l=[].concat(ze(d),this.router.beforeHooks,Fe(v),y.map(function(c){return c.beforeEnter}),Ue(y)),p=function(c,h){if(n.pending!==e)return o(Ct(a,e));try{c(e,a,function(g){g===!1?(n.ensureURL(!0),o(qe(a,e))):X(g)?(n.ensureURL(!0),o(g)):typeof g=="string"||typeof g=="object"&&(typeof g.path=="string"||typeof g.name=="string")?(o(Oe(a,e)),typeof g=="object"&&g.replace?n.replace(g):n.push(g)):h(g)})}catch(g){o(g)}};Tt(l,p,function(){var c=Ge(y),h=c.concat(n.router.resolveHooks);Tt(h,p,function(){if(n.pending!==e)return o(Ct(a,e));n.pending=null,r(e),n.router.app&&n.router.app.$nextTick(function(){Lt(e)})})})};T.prototype.updateRoute=function(e){this.current=e,this.cb&&this.cb(e)};T.prototype.setupListeners=function(){};T.prototype.teardown=function(){this.listeners.forEach(function(e){e()}),this.listeners=[],this.current=L,this.pending=null};function Be(t){if(!t)if(U){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return t.charAt(0)!=="/"&&(t="/"+t),t.replace(/\/$/,"")}function Ve(t,e){var r,i=Math.max(t.length,e.length);for(r=0;r0)){var n=this.router,a=n.options.scrollBehavior,o=S&&a;o&&this.listeners.push(Vt());var s=function(){var u=i.current,f=M(i.base);i.current===L&&f===i._startLocation||i.transitionTo(f,function(v){o&&$(n,v,u,!0)})};window.addEventListener("popstate",s),this.listeners.push(function(){window.removeEventListener("popstate",s)})}},e.prototype.go=function(i){window.history.go(i)},e.prototype.push=function(i,n,a){var o=this,s=this,u=s.current;this.transitionTo(i,function(f){W(_(o.base+f.fullPath)),$(o.router,f,u,!1),n&&n(f)},a)},e.prototype.replace=function(i,n,a){var o=this,s=this,u=s.current;this.transitionTo(i,function(f){ot(_(o.base+f.fullPath)),$(o.router,f,u,!1),n&&n(f)},a)},e.prototype.ensureURL=function(i){if(M(this.base)!==this.current.fullPath){var n=_(this.base+this.current.fullPath);i?W(n):ot(n)}},e.prototype.getCurrentLocation=function(){return M(this.base)},e}(T);function M(t){var e=window.location.pathname,r=e.toLowerCase(),i=t.toLowerCase();return t&&(r===i||r.indexOf(_(i+"/"))===0)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Qt=function(t){function e(r,i,n){t.call(this,r,i),!(n&&Qe(this.base))&&_t()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var i=this;if(!(this.listeners.length>0)){var n=this.router,a=n.options.scrollBehavior,o=S&&a;o&&this.listeners.push(Vt());var s=function(){var f=i.current;!_t()||i.transitionTo(z(),function(v){o&&$(i.router,v,f,!0),S||F(v.fullPath)})},u=S?"popstate":"hashchange";window.addEventListener(u,s),this.listeners.push(function(){window.removeEventListener(u,s)})}},e.prototype.push=function(i,n,a){var o=this,s=this,u=s.current;this.transitionTo(i,function(f){$t(f.fullPath),$(o.router,f,u,!1),n&&n(f)},a)},e.prototype.replace=function(i,n,a){var o=this,s=this,u=s.current;this.transitionTo(i,function(f){F(f.fullPath),$(o.router,f,u,!1),n&&n(f)},a)},e.prototype.go=function(i){window.history.go(i)},e.prototype.ensureURL=function(i){var n=this.current.fullPath;z()!==n&&(i?$t(n):F(n))},e.prototype.getCurrentLocation=function(){return z()},e}(T);function Qe(t){var e=M(t);if(!/^\/#/.test(e))return window.location.replace(_(t+"/#"+e)),!0}function _t(){var t=z();return t.charAt(0)==="/"?!0:(F("/"+t),!1)}function z(){var t=window.location.href,e=t.indexOf("#");return e<0?"":(t=t.slice(e+1),t)}function st(t){var e=window.location.href,r=e.indexOf("#"),i=r>=0?e.slice(0,r):e;return i+"#"+t}function $t(t){S?W(st(t)):window.location.hash=t}function F(t){S?ot(st(t)):window.location.replace(st(t))}var Je=function(t){function e(r,i){t.call(this,r,i),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(i,n,a){var o=this;this.transitionTo(i,function(s){o.stack=o.stack.slice(0,o.index+1).concat(s),o.index++,n&&n(s)},a)},e.prototype.replace=function(i,n,a){var o=this;this.transitionTo(i,function(s){o.stack=o.stack.slice(0,o.index).concat(s),n&&n(s)},a)},e.prototype.go=function(i){var n=this,a=this.index+i;if(!(a<0||a>=this.stack.length)){var o=this.stack[a];this.confirmTransition(o,function(){var s=n.current;n.index=a,n.updateRoute(o),n.router.afterHooks.forEach(function(u){u&&u(o,s)})},function(s){D(s,O.duplicated)&&(n.index=a)})}},e.prototype.getCurrentLocation=function(){var i=this.stack[this.stack.length-1];return i?i.fullPath:"/"},e.prototype.ensureURL=function(){},e}(T),w=function(e){e===void 0&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Pe(e.routes||[],this);var r=e.mode||"hash";switch(this.fallback=r==="history"&&!S&&e.fallback!==!1,this.fallback&&(r="hash"),U||(r="abstract"),this.mode=r,r){case"history":this.history=new Kt(this,e.base);break;case"hash":this.history=new Qt(this,e.base,this.fallback);break;case"abstract":this.history=new Je(this,e.base);break}},Jt={currentRoute:{configurable:!0}};w.prototype.match=function(e,r,i){return this.matcher.match(e,r,i)};Jt.currentRoute.get=function(){return this.history&&this.history.current};w.prototype.init=function(e){var r=this;if(this.apps.push(e),e.$once("hook:destroyed",function(){var o=r.apps.indexOf(e);o>-1&&r.apps.splice(o,1),r.app===e&&(r.app=r.apps[0]||null),r.app||r.history.teardown()}),!this.app){this.app=e;var i=this.history;if(i instanceof Kt||i instanceof Qt){var n=function(o){var s=i.current,u=r.options.scrollBehavior,f=S&&u;f&&"fullPath"in o&&$(r,o,s,!1)},a=function(o){i.setupListeners(),n(o)};i.transitionTo(i.getCurrentLocation(),a,a)}i.listen(function(o){r.apps.forEach(function(s){s._route=o})})}};w.prototype.beforeEach=function(e){return lt(this.beforeHooks,e)};w.prototype.beforeResolve=function(e){return lt(this.resolveHooks,e)};w.prototype.afterEach=function(e){return lt(this.afterHooks,e)};w.prototype.onReady=function(e,r){this.history.onReady(e,r)};w.prototype.onError=function(e){this.history.onError(e)};w.prototype.push=function(e,r,i){var n=this;if(!r&&!i&&typeof Promise!="undefined")return new Promise(function(a,o){n.history.push(e,a,o)});this.history.push(e,r,i)};w.prototype.replace=function(e,r,i){var n=this;if(!r&&!i&&typeof Promise!="undefined")return new Promise(function(a,o){n.history.replace(e,a,o)});this.history.replace(e,r,i)};w.prototype.go=function(e){this.history.go(e)};w.prototype.back=function(){this.go(-1)};w.prototype.forward=function(){this.go(1)};w.prototype.getMatchedComponents=function(e){var r=e?e.matched?e:this.resolve(e).route:this.currentRoute;return r?[].concat.apply([],r.matched.map(function(i){return Object.keys(i.components).map(function(n){return i.components[n]})})):[]};w.prototype.resolve=function(e,r,i){r=r||this.history.current;var n=ht(e,r,i,this),a=this.match(n,r),o=a.redirectedFrom||a.fullPath,s=this.history.base,u=We(s,o,this.mode);return{location:n,route:a,href:u,normalizedTo:n,resolved:a}};w.prototype.getRoutes=function(){return this.matcher.getRoutes()};w.prototype.addRoute=function(e,r){this.matcher.addRoute(e,r),this.history.current!==L&&this.history.transitionTo(this.history.getCurrentLocation())};w.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==L&&this.history.transitionTo(this.history.getCurrentLocation())};Object.defineProperties(w.prototype,Jt);var Xe=w;function lt(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function We(t,e,r){var i=r==="hash"?"#"+e:e;return t?_(t+"/"+i):i}w.install=it;w.version="3.6.5";w.isNavigationFailure=D;w.NavigationFailureType=O;w.START_LOCATION=L;U&&window.Vue&&window.Vue.use(w);export{Xe as V};