claude-web/node_modules/vue-router/dist/vue-router.prod.cjs

23 lines
44 KiB
JavaScript
Raw Permalink Normal View History

2026-02-23 02:23:38 +00:00
/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/
let e=require(`vue`),t=require(`@vue/devtools-api`);const n=typeof document<`u`;function r(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function i(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&r(e.default)}const a=Object.assign;function o(e,t){let n={};for(let r in t){let i=t[r];n[r]=c(i)?i.map(e):e(i)}return n}const s=()=>{},c=Array.isArray;function l(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function u(e){let t=Array.from(arguments).slice(1);console.warn.apply(console,[`[Vue Router warn]: `+e].concat(t))}const d=/#/g,f=/&/g,p=/\//g,m=/=/g,h=/\?/g,g=/\+/g,_=/%5B/g,ee=/%5D/g,v=/%5E/g,te=/%60/g,ne=/%7B/g,re=/%7C/g,ie=/%7D/g,y=/%20/g;function b(e){return e==null?``:encodeURI(``+e).replace(re,`|`).replace(_,`[`).replace(ee,`]`)}function ae(e){return b(e).replace(ne,`{`).replace(ie,`}`).replace(v,`^`)}function x(e){return b(e).replace(g,`%2B`).replace(y,`+`).replace(d,`%23`).replace(f,`%26`).replace(te,"`").replace(ne,`{`).replace(ie,`}`).replace(v,`^`)}function oe(e){return x(e).replace(m,`%3D`)}function se(e){return b(e).replace(d,`%23`).replace(h,`%3F`)}function ce(e){return se(e).replace(p,`%2F`)}function S(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{process.env.NODE_ENV!==`production`&&u(`Error decoding "${e}". Using original value`)}return``+e}const le=/\/$/,C=e=>e.replace(le,``);function ue(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=D(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:S(o)}}function de(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function fe(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function pe(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&w(t.matched[r],n.matched[i])&&T(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function w(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function T(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!me(e[n],t[n]))return!1;return!0}function me(e,t){return c(e)?E(e,t):c(t)?E(t,e):e?.valueOf()===t?.valueOf()}function E(e,t){return c(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function D(e,t){if(e.startsWith(`/`))return e;if(process.env.NODE_ENV!==`production`&&!t.startsWith(`/`))return u(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}const O={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};let he=function(e){return e.pop=`pop`,e.push=`push`,e}({}),k=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});const ge=``;function A(e){if(!e)if(n){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),C(e)}const j=/^[^#]+#/;function M(e,t){return e.replace(j,`#`)+t}function _e(e,t){let 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 N=()=>({left:window.scrollX,top:window.scrollY});function ve(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`);if(process.env.NODE_ENV!==`production`&&typeof e.el==`string`&&(!r||!document.getElementById(e.el.slice(1))))try{let t=document.querySelector(e.el);if(r&&t){u(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{u(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can
history.replaceState(history.state, '', url)
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),o(s.current,s,!0),o(e,a({},L(r.value,e,null),{position:s.position+1},n),!1),r.value=e}return{location:r,state:i,push:c,replace:s}}function z(e){e=A(e);let t=R(e),n=I(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=a({location:``,base:e,go:r,createHref:M.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function Ce(e=``){let t=[],n=[[``,{}]],r=0;e=A(e);function i(e,t={}){r++,r!==n.length&&n.splice(r),n.push([e,t])}function a(e,n,{direction:r,delta:i}){let a={direction:r,delta:i,type:he.pop};for(let r of t)r(e,n,a)}let o={location:``,state:{},base:e,createHref:M.bind(null,e),replace(e,t){n.splice(r--,1),i(e,t)},push(e,t){i(e,t)},listen(e){return t.push(e),()=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)}},destroy(){t=[],n=[[``,{}]],r=0},go(e,t=!0){let i=this.location,o=e<0?k.back:k.forward;r=Math.max(0,Math.min(r+e,n.length-1)),t&&a(this.location,i,{direction:o,delta:e})}};return Object.defineProperty(o,`location`,{enumerable:!0,get:()=>n[r][0]}),Object.defineProperty(o,`state`,{enumerable:!0,get:()=>n[r][1]}),o}function we(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),process.env.NODE_ENV!==`production`&&!e.endsWith(`#/`)&&!e.endsWith(`#`)&&u(`A hash base must end with a "#":\n"${e}" should be "${e.replace(/#.*$/,`#`)}".`),z(e)}function B(e){return typeof e==`string`||e&&typeof e==`object`}function Te(e){return typeof e==`string`||typeof e==`symbol`}let V=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 Ee=Symbol(process.env.NODE_ENV===`production`?``:`navigation failure`);let De=function(e){return e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`,e}({});const Oe={[V.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for\n ${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):``}`},[V.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ae(t)}" via a navigation guard.`},[V.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[V.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[V.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function H(e,t){if(process.env.NODE_ENV!==`production`||!0)return a(Error(Oe[e](t)),{type:e,[Ee]:!0},t)}function U(e,t){return e instanceof Error&&Ee in e&&(t==null||!!(e.type&t))}const ke=[`params`,`query`,`hash`];function Ae(e){if(typeof e==`string`)return e;if(e.path!=null)return e.path;let t={};for(let n of ke)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}let W=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({});var G=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}(G||{});const je={type:W.Static,value:``},Me=/[a-zA-Z0-9_]/;function Ne(e){if(!e)return[[]];if(e===`/`)return[[je]];if(!e.startsWith(`/`))throw Error(process.env.NODE_ENV===`production`?`Invalid path "${e}"`:`Route paths should start with a "/": "${e}" should be "/${e}".`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=G.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===G.Static?a.push({type:W.Static,value:l}):n===G.Param||n===G.ParamRegExp||n===G.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:W.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==G.ParamRegExp){r=n,n=G.EscapeNext;continue}switch(n){case G.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=G.Param):f();break;case G.EscapeNext:f(),n=r;break;case G.Param:c===`(`?n=G.ParamRegExp:Me.test(c)?f():(d(),n=G.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case G.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=G.ParamRegExpEnd:u+=c;break;case G.ParamRegExpEnd:d(),n=G.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===G.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}const Pe=`[^/]+?`,Fe={sensitive:!1,strict:!1,start:!0,end:!0};var K=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}(K||{});const Ie=/[.+*?^${}()[\]/\\]/g;function Le(e,t){let n=a({},Fe,t),r=[],i=n.start?`^`:``,o=[];for(let t of e){let e=t.length?[]:[K.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let a=t[r],s=K.Segment+(n.sensitive?K.BonusCaseSensitive:0);if(a.type===W.Static)r||(i+=`/`),i+=a.value.replace(Ie,`\\$&`),s+=K.Static;else if(a.type===W.Param){let{value:e,repeatable:n,optional:c,regexp:l}=a;o.push({name:e,repeatable:n,optional:c});let u=l||Pe;if(u!==Pe){s+=K.BonusCustomRegExp;try{`${u}`}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=K.Dynamic,c&&(s+=K.BonusOptional),n&&(s+=K.BonusRepeatable),u===`.*`&&(s+=K.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=K.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let s=new RegExp(i,n.sensitive?``:`i`);function l(e){let t=e.match(s),n={};if(!t)
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(m=He(t,n,d),process.env.NODE_ENV!==`production`&&n&&a[0]===`/`&&$e(m,n),r?(r.alias.push(m),process.env.NODE_ENV!==`production`&&Xe(r,m)):(h||=m,h!==m&&h.alias.push(m),i&&e.name&&!qe(m)&&(process.env.NODE_ENV!==`production`&&Qe(e,n),c(e.name))),nt(m)&&f(m),u.children){let e=u.children;for(let t=0;t<e.length;t++)o(e[t],m,r&&r.children[t])}r||=m}return h?()=>{c(h)}:s}function c(e){if(Te(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(c),t.alias.forEach(c))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(c),e.alias.forEach(c))}}function d(){return n}function f(e){let t=et(e,n);n.splice(t,0,e),e.record.name&&!qe(e)&&r.set(e.record.name,e)}function p(e,t){let i,o={},s,c;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw H(V.MATCHER_NOT_FOUND,{location:e});if(process.env.NODE_ENV!==`production`){let t=Object.keys(e.params||{}).filter(e=>!i.keys.find(t=>t.name===e));t.length&&u(`Discarded invalid param(s) "${t.join(`", "`)}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}c=i.record.name,o=a(We(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&We(e.params,i.keys.map(e=>e.name))),s=i.stringify(o)}else if(e.path!=null)s=e.path,process.env.NODE_ENV!==`production`&&!s.startsWith(`/`)&&u(`The Matcher cannot resolve relative paths but received "${s}". Unless you directly called \`matcher.resolve("${s}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),i=n.find(e=>e.re.test(s)),i&&(o=i.parse(s),c=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw H(V.MATCHER_NOT_FOUND,{location:e,currentLocation:t});c=i.record.name,o=a({},t.params,e.params),s=i.stringify(o)}let l=[],d=i;for(;d;)l.unshift(d.record),d=d.parent;return{name:c,path:s,params:o,matched:l,meta:Je(l)}}e.forEach(e=>o(e));function m(){n.length=0,r.clear()}return{addRoute:o,resolve:p,removeRoute:c,clearRoutes:m,getRoutes:d,getRecordMatcher:i}}function We(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ge(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ke(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 Ke(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function qe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Je(e){return e.reduce((e,t)=>a(e,t.meta),{})}function Ye(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Xe(e,t){for(let n of e.keys)if(!n.optional&&!t.keys.find(Ye.bind(null,n)))return u(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(let n of t.keys)if(!n.optional&&!e.keys.find(Ye.bind(null,n)))return u(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function Ze(e,t){t&&t.record.name&&!e.name&&!e.path&&u(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function Qe(e,t){for(let n=t;n;n=n.parent)if(n.record.name===e.name)throw Error(`A route named "${String(e.name)}" has been added as a ${t===n?`child`:`descendant`} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`)}function $e(e,t){for(l
- to:`,n,`
- previous to:`,o,`
- props:`,t):u(`Invalid value for prop "to" in useLink()
- to:`,n,`
- props:`,t)),o=n,a=!0),r.resolve(n)}),l=(0,e.computed)(()=>{let{matched:e}=c.value,{length:t}=e,n=e[t-1],r=i.matched;if(!n||!r.length)return-1;let a=r.findIndex(w.bind(null,n));if(a>-1)return a;let o=bt(e[t-2]);return t>1&&bt(n)===o&&r[r.length-1].path!==o?r.findIndex(w.bind(null,e[t-2])):a}),d=(0,e.computed)(()=>l.value>-1&&yt(i.params,c.value.params)),f=(0,e.computed)(()=>l.value>-1&&l.value===i.matched.length-1&&T(i.params,c.value.params));function p(n={}){if(vt(n)){let n=r[(0,e.unref)(t.replace)?`replace`:`push`]((0,e.unref)(t.to)).catch(s);return t.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}if(process.env.NODE_ENV!==`production`&&n){let n=(0,e.getCurrentInstance)();if(n){let r={route:c.value,isActive:d.value,isExactActive:f.value,error:null};n.__vrl_devtools=n.__vrl_devtools||[],n.__vrl_devtools.push(r),(0,e.watchEffect)(()=>{r.route=c.value,r.isActive=d.value,r.isExactActive=f.value,r.error=B((0,e.unref)(t.to))?null:`Invalid "to" value`},{flush:`post`})}}return{route:c,href:(0,e.computed)(()=>c.value.href),isActive:d,isExactActive:f,navigate:p}}function ht(e){return e.length===1?e[0]:e}const gt=(0,e.defineComponent)({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:mt,setup(t,{slots:n}){let r=(0,e.reactive)(mt(t)),{options:i}=(0,e.inject)(J),a=(0,e.computed)(()=>({[xt(t.activeClass,i.linkActiveClass,`router-link-active`)]:r.isActive,[xt(t.exactActiveClass,i.linkExactActiveClass,`router-link-exact-active`)]:r.isExactActive}));return()=>{let i=n.default&&ht(n.default(r));return t.custom?i:(0,e.h)(`a`,{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},i)}}}),_t=gt;function vt(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function yt(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!c(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function bt(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}const xt=(e,t,n)=>e??t??n,St=(0,e.defineComponent)({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:r,slots:i}){process.env.NODE_ENV!==`production`&&Tt();let o=(0,e.inject)(X),s=(0,e.computed)(()=>t.route||o.value),l=(0,e.inject)(ot,0),u=(0,e.computed)(()=>{let t=(0,e.unref)(l),{matched:n}=s.value,r;for(;(r=n[t])&&!r.components;)t++;return t}),d=(0,e.computed)(()=>s.value.matched[u.value]);(0,e.provide)(ot,(0,e.computed)(()=>u.value+1)),(0,e.provide)(q,d),(0,e.provide)(X,s);let f=(0,e.ref)();return(0,e.watch)(()=>[f.value,d.value,t.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!w(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let o=s.value,l=t.name,p=d.value,m=p&&p.components[l];if(!m)return Ct(i.default,{Component:m,route:o});let h=p.props[l],g=h?h===!0?o.params:typeof h==`function`?h(o):h:null,_=(0,e.h)(m,a({},g,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(p.instances[l]=null)},ref:f}));if(process.env.NODE_ENV!==`production`&&n&&_.ref){let e={depth:u.value,name:p.name,path:p.path,meta:p.meta};(c(_.ref)?_.ref.map(e=>e.i):[_.ref.i]).forEach(t=>{t.__vrv_devtools=e})}return Ct(i.default,{Component:_,route:o})||_}}});function Ct(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}const wt=St;function Tt(){let t=(0,e.getCurrentInstance)(),n=t.parent&&t.parent.type.name,r=t.parent&&t.parent.subTree&&t.parent.subTree.type;if(n&&(n===`KeepAlive`||
Use slot props instead:
<router-view v-slot="{ Component }">
<${e}>\n <component :is="Component" />\n </${e}>\n</router-view>`)}}function $(e,t){let n=a({},e,{matched:e.matched.map(e=>Gt(e,[`instances`,`children`,`aliasOf`]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Et(e){return{_custom:{display:e}}}let Dt=0;function Ot(n,r,i){if(r.__hasDevtools)return;r.__hasDevtools=!0;let a=Dt++;(0,t.setupDevtoolsPlugin)({id:`org.vuejs.router`+(a?`.`+a:``),label:`Vue Router`,packageName:`vue-router`,homepage:`https://router.vuejs.org`,logo:`https://router.vuejs.org/logo.png`,componentStateTypes:[`Routing`],app:n},t=>{typeof t.now!=`function`&&u(`[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.`),t.on.inspectComponent((e,t)=>{e.instanceData&&e.instanceData.state.push({type:`Routing`,key:`$route`,editable:!1,value:$(r.currentRoute.value,`Current Route`)})}),t.on.visitComponentTree(({treeNode:e,componentInstance:n})=>{if(n.__vrv_devtools){let t=n.__vrv_devtools;e.tags.push({label:(t.name?`${t.name.toString()}: `:``)+t.path,textColor:0,tooltip:`This component is rendered by &lt;router-view&gt;`,backgroundColor:jt})}c(n.__vrl_devtools)&&(n.__devtoolsApi=t,n.__vrl_devtools.forEach(t=>{let n=t.route.path,r=Ft,i=``,a=0;t.error?(n=t.error,r=Lt,a=Rt):t.isExactActive?(r=Nt,i=`This is exactly active`):t.isActive&&(r=Mt,i=`This link is active`),e.tags.push({label:n,textColor:a,tooltip:i,backgroundColor:r})}))}),(0,e.watch)(r.currentRoute,()=>{d(),t.notifyComponentUpdate(),t.sendInspectorTree(l),t.sendInspectorState(l)});let o=`router:navigations:`+a;t.addTimelineLayer({id:o,label:`Router${a?` `+a:``} Navigations`,color:4237508}),r.onError((e,n)=>{t.addTimelineEvent({layerId:o,event:{title:`Error during Navigation`,subtitle:n.fullPath,logType:`error`,time:t.now(),data:{error:e},groupId:n.meta.__navigationId}})});let s=0;r.beforeEach((e,n)=>{let r={guard:Et(`beforeEach`),from:$(n,`Current Location during this navigation`),to:$(e,`Target location`)};Object.defineProperty(e.meta,`__navigationId`,{value:s++}),t.addTimelineEvent({layerId:o,event:{time:t.now(),title:`Start of navigation`,subtitle:e.fullPath,data:r,groupId:e.meta.__navigationId}})}),r.afterEach((e,n,r)=>{let i={guard:Et(`afterEach`)};r?(i.failure={_custom:{type:Error,readOnly:!0,display:r?r.message:``,tooltip:`Navigation Failure`,value:r}},i.status=Et(``)):i.status=Et(``),i.from=$(n,`Current Location during this navigation`),i.to=$(e,`Target location`),t.addTimelineEvent({layerId:o,event:{title:`End of navigation`,subtitle:e.fullPath,time:t.now(),data:i,logType:r?`warning`:`default`,groupId:e.meta.__navigationId}})});let l=`router-inspector:`+a;t.addInspector({id:l,label:`Routes`+(a?` `+a:``),icon:`book`,treeFilterPlaceholder:`Search routes`});function d(){if(!f)return;let e=f,t=i.getRoutes().filter(e=>!e.parent||!e.parent.record.components);t.forEach(Ut),e.filter&&(t=t.filter(t=>Wt(t,e.filter.toLowerCase()))),t.forEach(e=>Ht(e,r.currentRoute.value)),e.rootNodes=t.map(zt)}let f;t.on.getInspectorTree(e=>{f=e,e.app===n&&e.inspectorId===l&&d()}),t.on.getInspectorState(e=>{if(e.app===n&&e.inspectorId===l){let t=i.getRoutes().find(t=>t.record.__vd_id===e.nodeId);t&&(e.state={options:At(t)})}}),t.sendInspectorTree(l),t.sendInspectorState(l)})}function kt(e){return e.optional?e.repeatable?`*`:`?`:e.repeatable?`+`:``}function At(e){let{record:t}=e,n=[{editable:!1,key:`path`,value:t.path}];return t.name!=null&&n.push({editable:!1,key:`name`,value:t.name}),n.push({editable:!1,key:`regexp`,value:e.re}),e.keys.length&&n.push({editable:!1,key:`keys`,value:{_custom:{type:null,readOnly:!0,display:e.keys.map(e=>`${e.name}${kt(e)}`).join(` `),tooltip:`Param keys`,value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:`redirect`,value:t.redirect}),e.alias.length&&n.push({editable:!1,key:`aliases`,value:e.alias.map(e=>e.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:`meta`,value:e.record.meta}),n.push({key:`score`,e
- Location:`,e),y({});let n;if(e.path!=null)process.env.NODE_ENV!==`production`&&`params`in e&&!(`name`in e)&&Object.keys(e.params).length&&u(`Path "${e.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),n=a({},e,{path:ue(i,e.path,t.path).path});else{let r=a({},e.params);for(let e in r)r[e]??delete r[e];n=a({},e,{params:ee(r)}),t.params=ee(t.params)}let o=r.resolve(n,t),s=e.hash||``;process.env.NODE_ENV!==`production`&&s&&!s.startsWith(`#`)&&u(`A \`hash\` should always start with the character "#". Replace "${s}" with "#${s}".`),o.params=_(v(o.params));let c=de(l,a({},e,{hash:ae(s),path:o.path})),f=d.createHref(c);return process.env.NODE_ENV!==`production`&&(f.startsWith(`//`)?u(`Location "${e}" resolved to "${f}". A resolved location cannot start with multiple slashes.`):o.matched.length||u(`No match found for location with path "${e.path==null?e:e.path}"`)),a({fullPath:c,hash:s,query:l===it?at(e.query):e.query||{}},o,{redirectedFrom:void 0,href:f})}function b(e){return typeof e==`string`?ue(i,e,h.value.path):a({},e)}function x(e,t){if(g!==e)return H(V.NAVIGATION_CANCELLED,{from:t,to:e})}function oe(e){return C(e)}function se(e){return oe(a(b(e),{replace:!0}))}function le(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;if(typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),process.env.NODE_ENV!==`production`&&i.path==null&&!(`name`in i))throw u(`Invalid redirect found:\n${JSON.stringify(i,null,2)}\n when navigating to "${e.fullPath}". A redirect must contain a name or path. This will break in production.`),Error(`Invalid redirect`);return a({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=g=y(e),r=h.value,i=e.state,o=e.force,s=e.replace===!0,c=le(n,r);if(c)return C(a(b(c),{state:typeof c==`object`?a({},i,c.state):i,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&pe(l,r,n)&&(f=H(V.NAVIGATION_DUPLICATED,{to:d,from:r}),Se(r,r,!0,!1)),(f?Promise.resolve(f):T(d,r)).catch(e=>U(e)?U(e,V.NAVIGATION_GUARD_REDIRECT)?e:P(e):M(e,d,r)).then(e=>{if(e){if(U(e,V.NAVIGATION_GUARD_REDIRECT))return process.env.NODE_ENV!==`production`&&pe(l,y(e.to),d)&&t&&(t._count=t._count?t._count+1:1)>30?(u(`Detected a possibly infinite redirection in a navigation guard when going from "${r.fullPath}" to "${d.fullPath}". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(Error(`Infinite redirect in navigation guard`))):C(a({replace:s},b(e.to),{state:typeof e.to==`object`?a({},i,e.to.state):i,force:o}),t||d)}else e=E(d,r,!0,s,i);return me(d,r,e),e})}function fe(e,t){let n=x(e,t);return n?Promise.reject(n):Promise.resolve()}function w(e){let t=L.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function T(e,t){let n,[r,i,a]=pt(e,t);n=dt(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Q(r,e,t))});let o=fe.bind(null,e,t);return n.push(o),z(n).then(()=>{n=[];for(let r of f.list())n.push(Q(r,e,t));return n.push(o),z(n)}).then(()=>{n=dt(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Q(r,e,t))});return n.push(o),z(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(c(r.beforeEnter))for(let i of r.beforeEnter)n.push(Q(i,e,t));else n.push(Q(r.beforeEnter,e,t));return n.push(o),z(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=dt(a,`beforeRouteEnter`,e,t,w),n.push(o),z(n))).then(()=>{n=[];for(let r of p.list())n.push(Q(r,e,t));return n.push(o),z(n)}).catch(e=>U(e,V.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function me(e,t,n){m.list().forEach(r=>w(()=>r(e,t,n)))}function E(e,t,r,i,o){let s=x(e,t);if(s)return s;let c=t===O,l=n?history.state:{};r&&(i||c?d.replace(e.fullPath,a({scroll:c&&l&&l.scroll},o)):d.push(e.fullPath,o)),h.value=e,Se(e,