/** * vue-router v3.0.1 * (c) 2017 Evan You * @license MIT */!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define(e):t.VueRouter=e()}(this,function(){"use strict";functiont(t,e){}functione(t){returnObject.prototype.toString.call(t).indexOf("Error")>-1}functionr(t,e){switch(typeofe){case"undefined":return;case"object":returne;case"function":returne(t);case"boolean":returne?t.params:void0}}functionn(t,e){for(varrine)t[r]=e[r];returnt}functiono(t,e,r){void0===e&&(e={});varn,o=r||i;try{n=o(t||"")}catch(t){n={}}for(varaine)n[a]=e[a];returnn}functioni(t){vare={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){varr=t.replace(/\+/g," ").split("="),n=Ut(r.shift()),o=r.length>0?Ut(r.join("=")):null;void0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]}),e):e}functiona(t){vare=t?Object.keys(t).map(function(e){varr=t[e];if(void0===r)return"";if(null===r)returnPt(e);if(Array.isArray(r)){varn=[];returnr.forEach(function(t){void0!==t&&(null===t?n.push(Pt(e)):n.push(Pt(e)+"="+Pt(t)))}),n.join("&")}returnPt(e)+"="+Pt(r)}).filter(function(t){returnt.length>0}).join("&"):null;returne?"?"+e:""}functionu(t,e,r,n){varo=n&&n.options.stringifyQuery,i=e.query||{};try{i=c(i)}catch(t){}vara={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:p(e,o),matched:t?s(t):[]};returnr&&(a.redirectedFrom=p(r,o)),Object.freeze(a)}functionc(t){if(Array.isArray(t))returnt.map(c);if(t&&"object"==typeoft){vare={};for(varrint)e[r]=c(t[r]);returne}returnt}functions(t){for(vare=[];t;)e.unshift(t),t=t.parent;returne}functionp(t,e){varr=t.path,n=t.query;void0===n&&(n={});varo=t.hash;void0===o&&(o="");vari=e||a;return(r||"/")+i(n)+o}functionf(t,e){returne===Ht?t===e:!!e&&(t.path&&e.path?t.path.replace(Mt,"")===e.path.replace(Mt,"")&&t.hash===e.hash&&h(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&h(t.query,e.query)&&h(t.params,e.params)))}functionh(t,e){if(void0===t&&(t={}),void0===e&&(e={}),!t||!e)returnt===e;varr=Object.keys(t),n=Object.keys(e);returnr.length===n.length&&r.every(function(r){varn=t[r],o=e[r];return"object"==typeofn&&"object"==typeofo?h(n,o):String(n)===String(o)})}functionl(t,e){return0===t.path.replace(Mt,"/").indexOf(e.path.replace(Mt,"/"))&&(!e.hash||t.hash===e.hash)&&d(t.query,e.query)}functiond(t,e){for(varrine)if(!(rint))return!1;return!0}functiony(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){vare=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}returnt.preventDefault&&t.preventDefault(),!0}}functionv(t){if(t)for(vare,r=0;r<t.length;r++){if("a"===(e=t[r]).tag)returne;if(e.children&&(e=v(e.children)))returne}}functionm(t){if(!m.installed||Tt!==t){m.installed=!0,Tt=t;vare=function(t){returnvoid0!==t},r=function(t,r){varn=t.$options._parentVnode;e(n)&&e(n=n.data)&&e(n=n.registerRouteInstance)&&n(t,r)};t.mixin({beforeCreate:function(){e(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){returnthis._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){returnthis._routerRoot._route}}),t.component("router-view",St),t.component("router-link",zt);varn=t.config.optionMergeStrategies;n.beforeRouteEnter=n.beforeRouteLeave=n.beforeRouteUpdate=n.created}}functiong(t,e,r){varn=t.charAt(0);if("/"===n)returnt;if("?"===n||"#"===n)returne+t;varo=e.split("/");r&&o[o.length-1]||o.pop();for(vari=t.replace(/^\//,"").split("/"),a=0;a<i.length;a++){varu=i[a];".."===u?o.pop():"."!==u&&o.push(u)}return""!==o[0]&&o.unshift(""),o.join("/")}functionb(t){vare="",r="",n=t.indexOf("#");n>=0&&(e=t.slice(n),t=t.slice(0,n));varo=t.indexOf("?");returno>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{path:t,query:r,hash:e}}functionw(t){returnt.replace(/\/\//g,"/")}functionx(t,e){for(varr,n=[],o=0,i=0,a="",u=e&&e.delimiter||"/";null!=(r=Qt.exec(t));){varc=r[0],s=r[1],p=r.index;if(a+=t.slice(i,p),i=p+c.length,s)a+=s[1];else{varf=t[i],h=r[2],l=r[3],d=r[4],y=r[5],v=r[6],m=r[7];a&&(n.push(a),a="");varg=null!=h&&null!=f&&f!==h,b="+"===v||"*"===v,w="?"===v||"*"===v,x=r[2]||u,k=d||y;n.push({name:l||o++,prefix:h||"",delimiter:x,optional:w,repeat:b,partial:g,asterisk:!!m,pattern:k?C(k):m?".*":"[^"+O(x)+"]+?"})}}returni<t.length&&(a+=t.substr(i)),a&&n.push(a),n}functionk(t){returnencodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}functionR(t){returnencodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}functionE(t){for(vare=newArray(t.length),r=0;r<t.length;r++)"object"==typeoft[r]&&(e[r]=newRegExp("^(?:"+t[r].pattern+")$"));returnfunction(r,n){for(varo="",i=r||{},a=(n||{}).pretty?k:encodeURIComponent,u=0;u<t.length;u++){varc=t[u];if("string"!=typeofc){vars,p=i[c.name];if(null==p){if(c.optional){c.partial&&(o+=c.prefix);continue}thrownewTypeError('Expected "'+c.name+'" to be defined')}if(Ft(p)){if(!c.repeat)thrownewTypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;thrownewTypeError('Expected "'+c.name+'" to not be empty')}for(varf=0;f<p.length;f++){if(s=a(p[f]),!e[u].test(s))thrownewTypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===f?c.prefix:c.delimiter)+s}}else{if(s=c.asterisk?R(p):a(p),!e[u].test(s))thrownewTypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+s+'"');o+=c.prefix+s}}elseo+=c}returno}}functionO(t){returnt.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}functionC(t){returnt.replace(/([=!:$\/()])/g,"\\$1")}functionj(t,e){returnt.keys=e,t}functionA(t){returnt.sensitive?"":"i"}function_(t,e){varr=t.source.match(/\((?!\?)/g);if(r)for(varn=0;n<r.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});returnj(t,e)}functionT(t,e,r){for(varn=[],o=0;o<t.length;o++)n.push(q(t[o],e,r).source);returnj(newRegExp("(?:"+n.join("|")+")",A(r)),e)}functionS(t,e,r){return$(x(t,r),e,r)}function$(t,e,r){Ft(e)||(r=e||r,e=[]);for(varn=(r=r||{}).strict,o=!1!==r.end,i="",a=0;a<t.length;a++){varu=t[a];if("string"==typeofu)i+=O(u);else{varc=O(u.prefix),s="(?:"+u.pattern+")";e.push(u),u.repeat&&(s+="(?:"+c+s+")*"),i+=s=u.optional?u.partial?c+"("+s+")?":"(?:"+c+"("+s+"))?":c+"("+s+")"}}varp=O(r.delimiter||"/"),f=i.slice(-p.length)===p;returnn||(i=(f?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":n&&f?"":"(?="+p+"|$)",j(newRegExp("^"+i,A(r)),e)}functionq(t,e,r){returnFt(e)||(r=e||r,e=[]),r=r||{},tinstanceofRegExp?_(t,e):Ft(t)?T(t,e,r):S(t,e,r)}functionL(t,e,r){try{return(Xt[t]||(Xt[t]=Dt.compile(t)))(e||{},{pretty:!0})}catch(t){return""}}functionP(t,e,r,n){varo=e||[],i=r||Object.create(null),a=n||Object.create(null);t.forEach(function(t){U(o,i,a,t)});for(varu=0,c=o.length;u<c;u++)"*"===o[u]&&(o.push(o.splice(u,1)[0]),c--,u--);return{pathList:o,pathMap:i,nameMap:a}}functionU(t,e,r,n,o,i){vara=n.path,u=n.name,c=n.pathToRegexpOptions||{},s=H(a,o,c.strict);"boolean"==typeofn.caseSensitive&&(c.sensitive=n.caseSensitive);varp={path:s,regex:M(s,c),components:n.components||{default:n.component},instances:{},name:u,parent:o,matchAs:i,redirect:n.redirect,beforeEnter:n.beforeEnter,meta:n.meta||{},props:null==n.props?{}:n.components?n.props:{default:n.props}};n.children&&n.children.forEach(function(n){varo=i?w(i+"/"+n.path):void0;U(t,e,r,n,p,o)}),void0!==n.alias&&(Array.isArray(n.alias)?n.alias:[n.alias]).forEach(function(i){vara={path:i,children:n.children};U(t,e,r,a,o,p.path||"/")}),e[p.path]||(t.push(p.path),e[p.path]=p),u&&(r[u]||(r[u]=p))}functionM(t,e){returnDt(t,[],e)}functionH(t,e,r){returnr||(t=t.replace(/\/$/,"")),"/"===t[0]?t:null==e?t:w(e.path+"/"+t)}functionI(t,e,r,n){vari="string"==typeoft?{path:t}:t;if(i.name||i._normalized)returni;if(!i.path&&i.params&&e){(i=V({},i))._normalized=!0;vara=V(V({},e.params),i.params);if(e.name)i.name=e.name,i.params=a;elseif(e.matched.length){varu=e.matched[e.matched.length-1].path;i.path=L(u,a,"path "+e.path)}returni}varc=b(i.path||""),s=e&&e.path||"/",p=c.path?g(c.path,s,r||i.append):s,f=o(c.query,i.query,n&&n.options.parseQuery),h=i.hash||c.hash;returnh&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:p,query:f,hash:h}}functionV(t,e){for(varrine)t[r]=e[r];returnt}functionz(t,e){functionr(t,r,n){varo=I(t,r,!1,e),a=o.name;if(a){varu=p[a];if(!u)returni(null,o);varf=u.regex.keys.filter(function(t){return!t.optional}).map(function(t){returnt.name});if("object"!=typeofo.params&&(o.params={}),r&&"object"==typeofr.params)for(varhinr.params)!(hino.params)&&f.indexOf(h)>-1&&(o.params[h]=r.params[h]);if(u)returno.path=L(u.path,o.params,'named route "'+a+'"'),i(u,o,n)}elseif(o.path){o.params={};for(varl=0;l<c.length;l++){vard=c[l],y=s[d];if(B(y.regex,o.path,o.params))returni(y,o,n)}}returni(null,o)}functionn(t,n){varo=t.redirect,a="function"==typeofo?o(u(t,n,null,e)):o;if("string"==typeofa&&(a={path:a}),!a||"object"!=typeofa)returni(null,n);varc=a,s=c.name,p=c.path,f=n.query,h=n.hash,l=n.params;if(f=c.hasOwnProperty("query")?c.query:f,h=c.hasOwnProperty("hash")?c.hash:h,l=c.hasOwnProperty("params")?c.params:l,s)returnr({_normalized:!0,name:s,query:f,hash:h,params:l},void0,n);if(p){vard=F(p,t);returnr({_normalized:!0,path:L(d,l,'redirect route with path "'+d+'"'),query:f,hash:h},void0,n)}returni(null,n)}functiono(t,e,n){varo=r({_normalized:!0,path:L(n,e.params,'aliased route with path "'+n+'"')});if(o){vara=o.matched,u=a[a.length-1];returne.params=o.params,i(u,e)}returni(null,e)}functioni(t,r,i){returnt&&t.redirect?n(t,i||r):t&&t.matchAs?o(t,r,t.matchAs):u(t,r,i,e)}vara=P(t),c=a.pathList,s=a.pathMap,p=a.nameMap;return{match:r,addRoutes:function(t){P(t,c,s,p)}}}functionB(t,e,r){varn=e.match(t);if(!n)return!1;if(!r)return!0;for(varo=1,i=n.length;o<i;++o){vara=t.keys[o-1],u="string"==typeofn[o]?decodeURIComponent(n[o]):n[o];a&&(r[a.name]=u)}return!0}functionF(t,e){returng(t,e.parent?e.parent.path:"/",!0)}functionD(){window.history.replaceState({key:et()},""),window.addEventListener("popstate",function(t){J(),t.state&&t.state.key&&rt(t.state.key)})}functionK(t,e,r,n){if(t.app){varo=t.options.scrollBehavior;o&&t.app.$nextTick(function(){vart=N(),i=o(e,r,n?t:null);i&&("function"==typeofi.then?i.then(function(e){Z(e,t)}).catch(function(t){}):Z(i,t))})}}functionJ(){vart=et();t&&(Yt[t]={x:window.pageXOffset,y:window.pageYOffset})}functionN(){vart=et();if(t)returnYt[t]}functionQ(t,e){varr=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.left-r.left-e.x,y:n.top-r.top-e.y}}functionX(t){returnG(t.x)||G(t.y)}functionY(t){return{x:G(t.x)?t.x:window.pageXOffset,y:G(t.y)?t.y:window.pageYOffset}}functionW(t){return{x:G(t.x)?t.x:0,y:G(t.y)?t.y:0}}functionG(t){return"number"==typeoft}functionZ(t,e){varr="object"==typeoft;if(r&&"string"==typeoft.selector){varn=document.querySelector(t.selector);if(n){varo=t.offset&&"object"==typeoft.offset?t.offset:{};e=Q(n,o=W(o))}elseX(t)&&(e=Y(t))}elser&&X(t)&&(e=Y(t));e&&window.scrollTo(e.x,e.y)}functiontt(){returnGt.now().toFixed(3)}functionet(){returnZt}functionrt(t){Zt=t}functionnt(t,e){J();varr=window.history;try{e?r.replaceState({key:Zt},"",t):(Zt=tt(),r.pushState({key:Zt},"",t))}catch(r){window.location[e?"replace":"assign"](t)}}functionot(t){nt(t,!0)}functionit(t,e,r){varn=function(o){o>=t.length?r():t[o]?e(t[o],function(){n(o+1)}):n(o+1)};n(0)}functionat(t){returnfunction(r,n,o){vari=!1,a=0,u=null;ut(t,function(t,r,n,c){if("function"==typeoft&&void0===t.cid){i=!0,a++;vars,p=pt(function(e){st(e)&&(e=e.default),t.resolved="function"==typeofe?e:Tt.extend(e),n.components[c]=e,--a<=0&&o()}),f=pt(function(t){varr="Failed to resolve async component "+c+": "+t;u||(u=e(t)?t:newError(r),o(u))});try{s=t(p,f)}catch(t){f(t)}if(s)if("function"==typeofs.then)s.then(p,f);else{varh=s.component;h&&"function"==typeofh.then&&h.then(p,f)}}}),i||o()}}functionut(t,e){returnct(t.map(function(t){returnObject.keys(t.components).map(function(r){returne(t.components[r],t.instances[r],t,r)})}))}functionct(t){returnArray.prototype.concat.apply([],t)}functionst(t){returnt.__esModule||te&&"Module"===t[Symbol.toStringTag]}functionpt(t){vare=!1;returnfunction(){for(varr=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)returne=!0,t.apply(this,r)}}functionft(t){if(!t)if(Bt){vare=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}elset="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}functionht(t,e){varr,n=Math.max(t.length,e.length);for(r=0;r<n&&t[r]===e[r];r++);return{updated:e.slice(0,r),activated:e.slice(r),deactivated:t.slice(r)}}functionlt(t,e,r,n){varo=ut(t,function(t,n,o,i){vara=dt(t,e);if(a)returnArray.isArray(a)?a.map(function(t){returnr(t,n,o,i)}):r(a,n,o,i)});returnct(n?o.reverse():o)}functiondt(t,e){return"function"!=typeoft&&(t=Tt.extend(t)),t.options[e]}functionyt(t){returnlt(t,"beforeRouteLeave",mt,!0)}functionvt(t){returnlt(t,"beforeRouteUpdate",mt)}functionmt(t,e){if(e)returnfunction(){returnt.apply(e,arguments)}}functiongt(t,e,r){returnlt(t,"beforeRouteEnter",function(t,n,o,i){returnbt(t,o,i,e,r)})}functionbt(t,e,r,n,o){returnfunction(i,a,u){returnt(i,a,function(t){u(t),"function"==typeoft&&n.push(function(){wt(t,e.instances,r,o)})})}}functionwt(t,e,r,n){e[r]?t(e[r]):n()&&setTimeout(function(){wt(t,e,r,n)},16)}functionxt(t){vare=window.location.pathname;returnt&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}functionkt(t){vare=xt(t);if(!/^\/#/.test(e))returnwindow.location.replace(w(t+"/#"+e)),!0}functionRt(){vart=Et();return"/"===t.charAt(0)||(jt("/"+t),!1)}functionEt(){vart=window.location.href,e=t.indexOf("#");return-1===e?"":t.slice(e+1)}functionOt(t){vare=window.location.href,r=e.indexOf("#");return(r>=0?e.slice(0,r):e)+"#"+t}functionCt(t){Wt?nt(Ot(t)):window.location.hash=t}functionjt(t){Wt?ot(Ot(t)):window.location.replace(Ot(t))}functionAt(t,e){returnt.push(e),function(){varr=t.indexOf(e);r>-1&&t.splice(r,1)}}function_t(t,e,r){varn="hash"===r?"#"+e:e;returnt?w(t+"/"+n):n}varTt,St={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){varo=e.props,i=e.children,a=e.parent,u=e.data;u.routerView=!0;for(varc=a.$createElement,s=o.name,p=a.$route,f=a._routerViewCache||(a._routerViewCache={}),h=0,l=!1;a&&a._routerRoot!==a;)a.$vnode&&a.$vnode.data.routerView&&h++,a._inactive&&(l=!0),a=a.$parent;if(u.routerViewDepth=h,l)returnc(f[s],u,i);vard=p.matched[h];if(!d)returnf[s]=null,c();vary=f[s]=d.components[s];u.registerRouteInstance=function(t,e){varr=d.instances[s];(e&&r!==t||!e&&r===t)&&(d.instances[s]=e)},(u.hook||(u.hook={})).prepatch=function(t,e){d.instances[s]=e.componentInstance};varv=u.props=r(p,d.props&&d.props[s]);if(v){v=u.props=n({},v);varm=u.attrs=u.attrs||{};for(varginv)y.props&&giny.props||(m[g]=v[g],deletev[g])}returnc(y,u,i)}},$t=/[!'()*]/g,qt=function(t){return"%"+t.charCodeAt(0).toString(16)},Lt=/%2C/g,Pt=function(t){returnencodeURIComponent(t).replace($t,qt).replace(Lt,",")},Ut=decodeURIComponent,Mt=/\/?$/,Ht=u(null,{path:"/"}),It=[String,Object],Vt=[String,Array],zt={name:"router-link",props:{to:{type:It,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:Vt,default:"click"}},render:function(t){vare=this,r=this.$router,n=this.$route,o=r.resolve(this.to,n,this.append),i=o.location,a=o.route,c=o.href,s={},p=r.options.linkActiveClass,h=r.options.linkExactActiveClass,d=null==p?"router-link-active":p,m=null==h?"router-link-exact-active":h,g=null==this.activeClass?d:this.activeClass,b=null==this.exactActiveClass?m:this.exactActiveClass,w=i.path?u(null,i,null,r):a;s[b]=f(n,w),s[g]=this.exact?s[b]:l(n,w);varx=function(t){y(t)&&(e.replace?r.replace(i):r.push(i))},k={click:y};Array.isArray(this.event)?this.event.forEach(function(t){k[t]=x}):k[this.event]=x;varR={class:s};if("a"===this.tag)R.on=k,R.attrs={href:c};else{varE=v(this.$slots.default);if(E){E.isStatic=!1;varO=Tt.util.extend;(E.data=O({},E.data)).on=k,(E.data.attrs=O({},E.data.attrs)).href=c}elseR.on=k}returnt(this.tag,R,this.$slots.default)}},Bt="undefined"!=typeofwindow,Ft=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},Dt=q,Kt=x,Jt=E,Nt=$,Qt=newRegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");Dt.parse=Kt,Dt.compile=function(t,e){returnE(x(t,e))},Dt.tokensToFunction=Jt,Dt.tokensToRegExp=Nt;varXt=Object.create(null),Yt=Object.create(null),Wt=Bt&&function(){vart=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"inwindow.history)}(),Gt=Bt&&window.performance&&window.performance.now?window.performance:Date,Zt=tt(),te="function"==typeofSymbol&&"symbol"==typeofSymbol.toStringTag,ee=function(t,e){this.router=t,this.base=ft(e),this.current=Ht,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};ee.prototype.listen=function(t){this.cb=t},ee.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},ee.prototype.onError=function(t){this.errorCbs.push(t)},ee.prototype.transitionTo=function(t,e,r){varn=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){n.updateRoute(o),e&&e(o),n.ensureURL(),n.ready||(n.ready=!0,n.readyCbs.forEach(function(t){t(o)}))},function(t){r&&r(t),t&&!n.ready&&(n.ready=!0,n.readyErrorCbs.forEach(function(e){e(t)}))})},ee.prototype.confirmTransition=function(r,n,o){vari=this,a=this.current,u=function(r){e(r)&&(i.errorCbs.length?i.errorCbs.forEach(function(t){t(r)}):(t(!1,"uncaught error during route navigation:"),console.error(r))),o&&o(r)};if(f(r,a)&&r.matched.length===a.matched.length)returnthis.ensureURL(),u();varc=ht(this.current.matched,r.matched),s=c.updated,p=c.deactivated,h=c.activated,l=[].concat(yt(p),this.router.beforeHooks,vt(s),h.map(function(t){returnt.beforeEnter}),at(h));this.pending=r;vard=function(t,n){if(i.pending!==r)returnu();try{t(r,a,function(t){!1===t||e(t)?(i.ensureURL(!0),u(t)):"string"==typeoft||"object"==typeoft&&("string"==typeoft.path||"string"==typeoft.name)?(u(),"object"==typeoft&&t.replace?i.replace(t):i.push(t)):n(t)})}catch(t){u(t)}};it(l,d,function(){vart=[];it(gt(h,t,function(){returni.current===r}).concat(i.router.resolveHooks),d,function(){if(i.pending!==r)returnu();i.pending=null,n(r),i.router.app&&i.router.app.$nextTick(function(){t.forEach(function(t){t()})})})})},ee.prototype.updateRoute=function(t){vare=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(r){r&&r(t,e)})};varre=function(t){functione(e,r){varn=this;t.call(this,e,r);varo=e.options.scrollBehavior;o&&D();vari=xt(this.base);window.addEventListener("popstate",function(t){varr=n.current,a=xt(n.base);n.current===Ht&&a===i||n.transitionTo(a,function(t){o&&K(e,t,r,!0)})})}returnt&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){varn=this,o=this.current;this.transitionTo(t,function(t){nt(w(n.base+t.fullPath)),K(n.router,t,o,!1),e&&e(t)},r)},e.prototype.replace=function(t,e,r){varn=this,o=this.current;this.transitionTo(t,function(t){ot(w(n.base+t.fullPath)),K(n.router,t,o,!1),e&&e(t)},r)},e.prototype.ensureURL=function(t){if(xt(this.base)!==this.current.fullPath){vare=w(this.base+this.current.fullPath);t?nt(e):ot(e)}},e.prototype.getCurrentLocation=function(){returnxt(this.base)},e}(ee),ne=function(t){functione(e,r,n){t.call(this,e,r),n&&kt(this.base)||Rt()}returnt&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){vart=this,e=this.router.options.scrollBehavior,r=Wt&&e;r&&D(),window.addEventListener(Wt?"popstate":"hashchange",function(){vare=t.current;Rt()&&t.transitionTo(Et(),function(n){r&&K(t.router,n,e,!0),Wt||jt(n.fullPath)})})},e.prototype.push=function(t,e,r){varn=this,o=this.current;this.transitionTo(t,function(t){Ct(t.fullPath),K(n.router,t,o,!1),e&&e(t)},r)},e.prototype.replace=function(t,e,r){varn=this,o=this.current;this.transitionTo(t,function(t){jt(t.fullPath),K(n.router,t,o,!1),e&&e(t)},r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){vare=this.current.fullPath;Et()!==e&&(t?Ct(e):jt(e))},e.prototype.getCurrentLocation=function(){returnEt()},e}(ee),oe=function(t){functione(e,r){t.call(this,e,r),this.stack=[],this.index=-1}returnt&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){varn=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)},r)},e.prototype.replace=function(t,e,r){varn=this;this.transitionTo(t,function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)},r)},e.prototype.go=function(t){vare=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){varn=this.stack[r];this.confirmTransition(n,function(){e.index=r,e.updateRoute(n)})}},e.prototype.getCurrentLocation=function(){vart=this.stack[this.stack.length-1];returnt?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(ee),ie=function(t){void0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=z(t.routes||[],this);vare=t.mode||"hash";switch(this.fallback="history"===e&&!Wt&&!1!==t.fallback,this.fallback&&(e="hash"),Bt||(e="abstract"),this.mode=e,e){case"history":this.history=newre(this,t.base);break;case"hash":this.history=newne(this,t.base,this.fallback);break;case"abstract":this.history=newoe(this,t.base)}},ae={currentRoute:{configurable:!0}};returnie.prototype.match=function(t,e,r){returnthis.matcher.match(t,e,r)},ae.currentRoute.get=function(){returnthis.history&&this.history.current},ie.prototype.init=function(t){vare=this;if(this.apps.push(t),!this.app){this.app=t;varr=this.history;if(rinstanceofre)r.transitionTo(r.getCurrentLocation());elseif(rinstanceofne){varn=function(){r.setupListeners()};r.transitionTo(r.getCurrentLocation(),n,n)}r.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},ie.prototype.beforeEach=function(t){returnAt(this.beforeHooks,t)},ie.prototype.beforeResolve=function(t){returnAt(this.resolveHooks,t)},ie.prototype.afterEach=function(t){returnAt(this.afterHooks,t)},ie.prototype.onReady=function(t,e){this.history.onReady(t,e)},ie.prototype.onError=function(t){this.history.onError(t)},ie.prototype.push=function(t,e,r){this.history.push(t,e,r)},ie.prototype.replace=function(t,e,r){this.history.replace(t,e,r)},ie.prototype.go=function(t){this.history.go(t)},ie.prototype.back=function(){this.go(-1)},ie.prototype.forward=function(){this.go(1)},ie.prototype.getMatchedComponents=function(t){vare=t?t.matched?t:this.resolve(t).route:this.currentRoute;returne?[].concat.apply([],e.matched.map(function(t){returnObject.keys(t.components).map(function(e){returnt.components[e]})})):[]},ie.prototype.resolve=function(t,e,r){varn=I(t,e||this.history.current,r,this),o=this.match(n,e),i=o.redirectedFrom||o.fullPath;return{location:n,route:o,href:_t(this.history.base,i,this.mode),normalizedTo:n,resolved:o}},ie.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==Ht&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(ie.prototype,ae),ie.install=m,ie.version="3.0.1",Bt&&window.Vue&&window.Vue.use(ie),ie});