@kitbag/router 0.20.11 → 0.20.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(B,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(B=typeof globalThis<"u"?globalThis:B||self,f(B["@kitbag/router"]={},B.Vue))})(this,(function(B,f){"use strict";class bt extends Error{constructor(t){super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`)}}function D(e){return Array.isArray(e)?e:[e]}function Pt(e,t){return e.filter(r=>t===r).length}function pe(...e){const t=e.flatMap(r=>Array.isArray(r)?r:Object.keys(r));for(const r of t)if(Pt(t,r)>1)throw new bt(r)}class Y extends Error{}const Ee="[",Ue="]";function Br(e){return e!==String&&e!==Boolean&&e!==Number&&e!==Date}function Nr(e){return typeof e=="function"&&Br(e)}function ke(e){return typeof e=="object"&&"get"in e&&typeof e.get=="function"&&"set"in e&&typeof e.set=="function"}function Ut(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function kt(e,t){return ke(e)?{...e,defaultValue:t??e.defaultValue}:{get:r=>re(r,e),set:r=>X(r,e),defaultValue:t}}function Vr(e){return ke(e)&&e.defaultValue!==void 0}function Cr(e,t){return kt(e,t)}function xr(e){return e!==void 0}function le(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function G(e){return typeof e=="string"&&e.length>0}let m=null;async function Zr(){const{ZodType:e,ZodString:t,ZodIPv4:r,ZodIPv6:n,ZodCIDRv4:o,ZodCIDRv6:a,ZodURL:i,ZodEmail:u,ZodUUID:c,ZodBase64:h,ZodCUID:w,ZodCUID2:A,ZodULID:g,ZodJWT:E,ZodBigInt:C,ZodNaN:S,ZodBoolean:P,ZodDate:b,ZodISODateTime:v,ZodISODate:p,ZodISOTime:s,ZodNumber:l,ZodLiteral:k,ZodObject:y,ZodEnum:d,ZodArray:R,ZodTuple:L,ZodUnion:N,ZodDiscriminatedUnion:V,ZodRecord:x,ZodMap:$,ZodSet:T,ZodIntersection:Pe,ZodPromise:At}=await import("zod");return{ZodType:e,ZodString:t,ZodIPv4:r,ZodIPv6:n,ZodCIDRv4:o,ZodCIDRv6:a,ZodURL:i,ZodEmail:u,ZodUUID:c,ZodBase64:h,ZodCUID:w,ZodCUID2:A,ZodULID:g,ZodJWT:E,ZodBigInt:C,ZodNaN:S,ZodBoolean:P,ZodDate:b,ZodISODateTime:v,ZodISODate:p,ZodISOTime:s,ZodNumber:l,ZodLiteral:k,ZodObject:y,ZodEnum:d,ZodArray:R,ZodTuple:L,ZodUnion:N,ZodDiscriminatedUnion:V,ZodRecord:x,ZodMap:$,ZodSet:T,ZodIntersection:Pe,ZodPromise:At}}function Or(e){return Object.values(e).some(t=>Object.values(t.host.params).some(r=>$e(r))||Object.values(t.path.params).some(r=>$e(r))||Object.values(t.query.params).some(r=>$e(r)))}function $e(e){return le(e)&&"parse"in e&&typeof e.parse=="function"&&"~standard"in e&&le(e["~standard"])&&"vendor"in e["~standard"]&&e["~standard"].vendor==="zod"}async function jr(){try{m=await Zr()}catch{throw new Error("Failed to initialize Zod")}}function Lt(e){return m?e instanceof m.ZodType:!1}function Bt(e){return{get:(t,{invalid:r})=>{try{return qe(t,e)}catch{throw r()}},set:(t,{invalid:r})=>{try{return Te(t,e)}catch{throw r()}}}}const Ir=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function he(e,t){if(typeof t=="string"&&Ir.test(t)){const r=new Date(t);return isNaN(r.getTime())?t:r}return t}function ve(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function Le(e,t){return m?.ZodString&&e instanceof m.ZodString?1:m?.ZodString&&t instanceof m.ZodString?-1:0}function qe(e,t){if(!m)throw new Error("Zod is not initialized");if(t instanceof m.ZodString)return t.parse(e);if(t instanceof m.ZodBoolean)return t.parse(!!e);if(t instanceof m.ZodDate)return t.parse(new Date(e));if(t instanceof m.ZodNumber)return t.parse(Number(e));if(t instanceof m.ZodBigInt)return t.parse(BigInt(e));if(t instanceof m.ZodNaN)return t.parse(Number(e));if(t instanceof m.ZodLiteral)return ve([()=>t.parse(Number(e)),()=>t.parse(!!e),()=>t.parse(e)]);if(t instanceof m.ZodObject)return t.parse(JSON.parse(e,he));if(t instanceof m.ZodEnum)return t.parse(e);if(t instanceof m.ZodArray||t instanceof m.ZodTuple)return t.parse(JSON.parse(e,he));if(t instanceof m.ZodUnion){const r=Array.from(t.def.options).sort(Le).map(n=>()=>qe(e,n));return ve(r)}if(t instanceof m.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Le).map(n=>()=>qe(e,n));return ve(r)}if(t instanceof m.ZodRecord)return t.parse(JSON.parse(e,he));if(t instanceof m.ZodMap)return t.parse(new Map(JSON.parse(e,he)));if(t instanceof m.ZodSet)return t.parse(new Set(JSON.parse(e,he)));if(t instanceof m.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof m.ZodPromise)throw new Error("Promise schemas are not supported");return t.parse(e)}function Te(e,t){if(!m)throw new Error("Zod is not initialized");if(t instanceof m.ZodString||t instanceof m.ZodISODateTime||t instanceof m.ZodISODate||t instanceof m.ZodISOTime||t instanceof m.ZodIPv4||t instanceof m.ZodIPv6||t instanceof m.ZodCIDRv4||t instanceof m.ZodCIDRv6||t instanceof m.ZodURL||t instanceof m.ZodEmail||t instanceof m.ZodUUID||t instanceof m.ZodBase64||t instanceof m.ZodCUID||t instanceof m.ZodCUID2||t instanceof m.ZodULID||t instanceof m.ZodJWT)return t.parse(e);if(t instanceof m.ZodBoolean)return t.parse(e).toString();if(t instanceof m.ZodDate)return t.parse(e).toISOString();if(t instanceof m.ZodNumber)return t.parse(Number(e)).toString();if(t instanceof m.ZodBigInt)return t.parse(BigInt(String(e))).toString();if(t instanceof m.ZodNaN)return t.parse(e).toString();if(t instanceof m.ZodLiteral){const r=t.parse(e);return r!=null?r.toString():String(r)}if(t instanceof m.ZodObject)return JSON.stringify(t.parse(e));if(t instanceof m.ZodEnum){const r=t.parse(e);return typeof r=="string"?r:String(r)}if(t instanceof m.ZodArray||t instanceof m.ZodTuple)return JSON.stringify(t.parse(e));if(t instanceof m.ZodUnion){const r=Array.from(t.def.options).sort(Le).map(n=>()=>Te(e,n));return ve(r)}if(t instanceof m.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Le).map(n=>()=>Te(e,n));return ve(r)}if(t instanceof m.ZodRecord)return JSON.stringify(t.parse(e));if(t instanceof m.ZodMap){const r=t.parse(e);return JSON.stringify(Array.from(r.entries()))}if(t instanceof m.ZodSet){const r=t.parse(e);return JSON.stringify(Array.from(r.values()))}if(t instanceof m.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof m.ZodPromise)throw new Error("Promise schemas are not supported");return JSON.stringify(t.parse(e))}function _e(e){return typeof e=="object"&&e!==null&&"then"in e}function Z(e,t){const r=e["~standard"].validate(t);if(_e(r))throw new Error("Promise schemas are not supported");if(r.issues)throw new Error("Validation failed");return r.value}function Dr(e){return le(e)&&"type"in e&&typeof e.type=="string"&&"~standard"in e&&le(e["~standard"])&&"vendor"in e["~standard"]&&e["~standard"].vendor==="valibot"}function Nt(e){return Dr(e)}function Vt(e){return{get:(t,{invalid:r})=>{try{return Je(t,e)}catch{throw r()}},set:(t,{invalid:r})=>{try{return Me(t,e)}catch{throw r()}}}}const Hr=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function Re(e,t){if(typeof t=="string"&&Hr.test(t)){const r=new Date(t);return isNaN(r.getTime())?t:r}return t}function ye(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function Be(e,t){return e.type==="string"?1:t.type==="string"?-1:0}function Je(e,t){if(t.type==="boolean")return Z(t,!!e);if(t.type==="date")return Z(t,new Date(e));if(t.type==="number")return Z(t,Number(e));if(t.type==="literal")return ye([()=>Z(t,Number(e)),()=>Z(t,!!e),()=>Z(t,e)]);if(t.type==="object")return Z(t,JSON.parse(e,Re));if(t.type==="enum")return ye([()=>Z(t,Number(e)),()=>Z(t,!!e),()=>Z(t,e)]);if(t.type==="array"||t.type==="tuple")return Z(t,JSON.parse(e,Re));if(t.type==="union"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Je(e,n));return ye(r)}if(t.type==="variant"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Je(e,n));return ye(r)}if(t.type==="record")return Z(t,JSON.parse(e,Re));if(t.type==="map")return Z(t,new Map(JSON.parse(e,Re)));if(t.type==="set")return Z(t,new Set(JSON.parse(e,Re)));if(t.type==="intersection")throw new Error("Intersection schemas are not supported");if(t.type==="promise")throw new Error("Promise schemas are not supported");if(t.type==="function")throw new Error("Function schemas are not supported");return Z(t,e)}function Me(e,t){if(t.type==="string"||t.type==="boolean")return Z(t,e).toString();if(t.type==="date")return Z(t,e).toISOString();if(t.type==="number")return Z(t,Number(e)).toString();if(t.type==="literal")return Z(t,e).toString();if(t.type==="object")return JSON.stringify(Z(t,e));if(t.type==="enum"||t.type==="nativeEnum")return Z(t,e).toString();if(t.type==="array"||t.type==="tuple")return JSON.stringify(Z(t,e));if(t.type==="union"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Me(e,n));return ye(r)}if(t.type==="variant"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Me(e,n));return ye(r)}if(t.type==="record")return JSON.stringify(Z(t,e));if(t.type==="map"){const r=Z(t,e);return JSON.stringify(Array.from(r.entries()))}if(t.type==="set"){const r=Z(t,e);return JSON.stringify(Array.from(r.values()))}if(t.type==="intersection")throw new Error("Intersection schemas are not supported");if(t.type==="promise")throw new Error("Promise schemas are not supported");if(t.type==="function")throw new Error("Function schemas are not supported");return JSON.stringify(Z(t,e))}function $r(e,t){return e[t]??String}const I={invalid:e=>{throw new Y(e)}},Ct={get:e=>e,set:(e,{invalid:t})=>{if(typeof e!="string")throw t();return e}},Fe={get:(e,{invalid:t})=>{if(e==="true")return!0;if(e==="false")return!1;throw t()},set:(e,{invalid:t})=>{if(typeof e!="boolean")throw t();return e.toString()}},We={get:(e,{invalid:t})=>{const r=Number(e);if(isNaN(r))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="number")throw t();return e.toString()}},xt={get:(e,{invalid:t})=>{const r=new Date(e);if(isNaN(r.getTime()))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="object"||!(e instanceof Date))throw t();return e.toISOString()}},Zt={get:(e,{invalid:t})=>{try{return JSON.parse(e)}catch{throw t()}},set:(e,{invalid:t})=>{try{return JSON.stringify(e)}catch{throw t()}}};function qr(e,t){switch(typeof t){case"string":return Ct.get(e,I)===t;case"number":return We.get(e,I)===t;case"boolean":return Fe.get(e,I)===t;default:return!1}}function re(e,t,r=!1){if(e===void 0||!G(e)){if(Vr(t))return t.defaultValue;if(r)return;throw new Y}if(t===String)return Ct.get(e,I);if(t===Boolean)return Fe.get(e,I);if(t===Number)return We.get(e,I);if(t===Date)return xt.get(e,I);if(t===JSON)return Zt.get(e,I);if(Nr(t))return t(e,I);if(ke(t))return t.get(e,I);if(t instanceof RegExp){if(t.test(e))return e;throw new Y}if(Ut(t)){if(qr(e,t))return t;throw new Y}return Lt(t)?Bt(t).get(e,I):Nt(t)?Vt(t).get(e,I):e}function Ge(e,t,r=!1){try{return re(e,t,r)}catch(n){if(n instanceof Y)return;throw n}}function Tr(e,t,r=!1){try{return X(e,t,r)}catch(n){if(n instanceof Y)return;throw n}}function X(e,t,r=!1){if(e===void 0){if(r)return"";throw new Y}if(t===Boolean)return Fe.set(e,I);if(t===Number)return We.set(e,I);if(t===Date)return xt.set(e,I);if(t===JSON)return Zt.set(e,I);if(ke(t))return t.set(e,I);if(Ut(t)){if(t!==e)throw new Y;return e.toString()}if(Lt(t))return Bt(t).set(e,I);if(Nt(t))return Vt(t).set(e,I);try{return e.toString()}catch{throw new Y}}function Qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _r(e,t){const r=Array.from(e.matchAll(t));if(r.length===0)return[e];let n=0;const o=r.reduce((i,u)=>{const c=Qe(e.slice(n,u.index));c.length&&i.push(c);const[h]=u;return i.push(h),n=u.index+h.length,i},[]),a=e.slice(n);return a&&o.push(a),o}function Jr(e){const t=ze(e.host.value);return new RegExp(`^${t}$`,"i")}function Mr(e){const t=ze(e.path.value);return new RegExp(`^${t}$`,"i")}function Fr(e){const t=new URLSearchParams(e.query.value);return Array.from(t.entries()).filter(([,r])=>!Xe(r)).map(([r,n])=>{const o=ze(n);return new RegExp(`${Qe(r)}=${o}(&|$)`,"i")})}function ze(e){return _r(e,new RegExp(Ne,"g")).map(t=>t.startsWith(Ee)?Ot(t):Qe(t)).join("")}function Ot(e){return e.replace(new RegExp(Ne,"g"),Qr)}function Wr(e,t){const r=jt(t);return e.replace(r,zr)}function Ye(e,t){return Yr(t).test(e.value)}function Xe(e){return new RegExp(Gr,"g").test(e)}const Ne=`\\${Ee}\\??([\\w-_]+)\\${Ue}`,Gr=`\\${Ee}\\?([\\w-_]+)\\${Ue}`,Qr=".*",zr="(.*)";function Ke(e){const[t]=It(e,new RegExp(Ne,"g"));return t}function jt(e){return new RegExp(`\\${Ee}\\??${e}\\${Ue}`,"g")}function Yr(e){return new RegExp(`\\${Ee}\\?${e}\\${Ue}`,"g")}function It(e,t){return Array.from(e.matchAll(t)).flatMap(([,...n])=>n.map(o=>G(o)?o:""))}function Xr(e="",t={}){return G(e)?Array.from(e.matchAll(new RegExp(Ne,"g"))).reduce((n,[o,a])=>{const i=Ke(o);if(!i)return n;const u=$r(t,i);return pe([i],n),n[a]=u,n},{}):{}}function Kr(e){return le(e)&&typeof e.value=="string"}function ne(e){return e===void 0?z():Kr(e)?e:z(e,{})}function z(e,t){return{value:e??"",params:Xr(e,t)}}function Dt(e,t){pe(e.params,t.params);const r=`${e.value}${t.value}`;return z(r,{...e.params,...t.params})}function en(e,t){return Dt(e,t)}class Ht extends Error{constructor(t){super(`Child property on meta for ${t} conflicts with the parent meta.`)}}function tn(e,t){return rn(e,t),{...e,...t}}function rn(e,t){const r=Object.keys(e).find(n=>n in t&&typeof t[n]!=typeof e[n]);if(r)throw new Ht(r)}function nn(e,t){pe(e.params,t.params);const r=[e.value,t.value].filter(G).join("&");return z(r,{...e.params,...t.params})}function on(e,t){return pe(e,t),{...e,...t}}function et(e){return"parent"in e&&!!e.parent}function tt(e){return"component"in e&&!!e.component}function rt(e){return"props"in e&&typeof e.props=="function"}function nt(e){return"components"in e&&!!e.components}function ot(e){return"props"in e&&typeof e.props=="object"}function at(e,t){return{...t,path:Dt(e.path,t.path),query:nn(e.query,t.query),meta:tn(e.meta,t.meta),state:on(e.state,t.state),hash:en(e.hash,t.hash),hooks:[...e.hooks,...t.hooks],matches:[...e.matches,t.matched],context:[...e.context,...t.context],host:e.host,depth:e.depth+1}}function J(e){return typeof e!="string"?!1:/^(https?:\/\/|\/).*/g.test(e)}function st(e){return J(e)?e:`/${e}`}class oe extends Error{constructor(){super("Router not installed")}}class $t extends Error{constructor(t,r){super(`useRoute called with incorrect route. Given ${t}, expected ${r}`)}}function it(){let e=0;return()=>(++e).toString()}const an=it()();function sn(e){return e===an}const ut=it();function qt(e){return e===void 0?"":e}class K{onBeforeRouteEnter=new Set;onBeforeRouteUpdate=new Set;onBeforeRouteLeave=new Set;onAfterRouteEnter=new Set;onAfterRouteUpdate=new Set;onAfterRouteLeave=new Set;onError=new Set}function ct(){const e=new K;return{onBeforeRouteEnter:c=>(e.onBeforeRouteEnter.add(c),()=>e.onBeforeRouteEnter.delete(c)),onBeforeRouteUpdate:c=>(e.onBeforeRouteUpdate.add(c),()=>e.onBeforeRouteUpdate.delete(c)),onBeforeRouteLeave:c=>(e.onBeforeRouteLeave.add(c),()=>e.onBeforeRouteLeave.delete(c)),onAfterRouteEnter:c=>(e.onAfterRouteEnter.add(c),()=>e.onAfterRouteEnter.delete(c)),onAfterRouteUpdate:c=>(e.onAfterRouteUpdate.add(c),()=>e.onAfterRouteUpdate.delete(c)),onAfterRouteLeave:c=>(e.onAfterRouteLeave.add(c),()=>e.onAfterRouteLeave.delete(c)),onError:c=>(e.onError.add(c),()=>e.onError.delete(c)),store:e}}function ae(e,t){const r=ut(),n=qt(e.name),o=ne(e.path),a=ne(e.query),i=ne(e.hash),u=e.meta??{},c=e.state??{},h=e.context??[],{store:w,...A}=ct(),g=f.markRaw({id:r,meta:u,state:c,...e,props:t}),E={id:r,matched:g,matches:[g],hooks:[w],name:n,path:o,query:a,hash:i,meta:u,state:c,context:h,depth:1,host:z(),prefetch:e.prefetch,...A},C=et(e)?at(e.parent,E):E;return pe(C.path.params,C.query.params,C.hash.params),C}function Tt(e){return f.defineComponent(()=>()=>f.h("h1",e),{name:e,props:[]})}function un(e){const t=e.component??Tt(e.type);return{type:e.type,component:t}}function cn(e){const t=ut(),r=qt(e.name),n=ne(e.path),o=ne(e.query),a=ne(e.hash),i=e.meta??{},u=ne(e.host),c=e.context??[],{store:h,onBeforeRouteEnter:w}=ct(),A=f.markRaw({id:t,meta:{},state:{},...e}),g={id:t,matched:A,matches:[A],hooks:[h],name:r,host:u,path:n,query:o,hash:a,meta:i,depth:1,state:{},context:c,onBeforeRouteEnter:w},E=et(e)?at(e.parent,g):g;return pe(E.path.params,E.query.params,E.host.params,E.hash.params),E}function Ae(){const e=new Map;return t=>{const r=e.get(t);if(!r){const n=Symbol();return e.set(t,n),n}return r}}const fn=Ae();function ft(e){const t=fn(e);return({increment:r=!1}={})=>{const n=f.inject(t,0);return r&&f.provide(t,n+1),n}}const se=(e,t,r)=>{const n=e.matches,o=t?.matches??[];return n.at(r)?.id!==o.at(r)?.id},ie=(e,t,r)=>{const n=e.matches,o=t?.matches??[];return n.at(r)?.id!==o.at(r)?.id},ue=(e,t,r)=>e.matches.at(r)?.id===t?.matches.at(r)?.id;function _t(e){switch(e){case"onBeforeRouteEnter":case"onAfterRouteEnter":return se;case"onBeforeRouteUpdate":case"onAfterRouteUpdate":return ue;case"onBeforeRouteLeave":case"onAfterRouteLeave":return ie;default:throw new Error(`Switch is not exhaustive for lifecycle: ${e}`)}}class Jt{onBeforeRouteEnter=new Set;onBeforeRouteUpdate=new Set;onBeforeRouteLeave=new Set;onAfterRouteEnter=new Set;onAfterRouteUpdate=new Set;onAfterRouteLeave=new Set}function dn(e,t){const r=new Jt;return e.matches.forEach((n,o)=>{n.onBeforeRouteEnter&&se(e,t,o)&&D(n.onBeforeRouteEnter).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onBeforeRouteEnter is deprecated. Use router.onBeforeRouteEnter instead"),r.onBeforeRouteEnter.add(a)}),n.onBeforeRouteUpdate&&ue(e,t,o)&&D(n.onBeforeRouteUpdate).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onBeforeRouteUpdate is deprecated. Use router.onBeforeRouteUpdate instead"),r.onBeforeRouteUpdate.add(a)})}),t?.matches.forEach((n,o)=>{n.onBeforeRouteLeave&&ie(e,t,o)&&D(n.onBeforeRouteLeave).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onBeforeRouteLeave is deprecated. Use router.onBeforeRouteLeave instead"),r.onBeforeRouteLeave.add(a)})}),r}function pn(e,t){const r=new Jt;return e.matches.forEach((n,o)=>{n.onAfterRouteEnter&&se(e,t,o)&&D(n.onAfterRouteEnter).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onAfterRouteEnter is deprecated. Use router.onAfterRouteEnter instead"),r.onAfterRouteEnter.add(a)}),n.onAfterRouteUpdate&&ue(e,t,o)&&D(n.onAfterRouteUpdate).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onAfterRouteUpdate is deprecated. Use router.onAfterRouteUpdate instead"),r.onAfterRouteUpdate.add(a)})}),t?.matches.forEach((n,o)=>{n.onAfterRouteLeave&&ie(e,t,o)&&D(n.onAfterRouteLeave).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onAfterRouteLeave is deprecated. Use router.onAfterRouteLeave instead"),r.onAfterRouteLeave.add(a)})}),r}function ln(e,t){const r=new K;return e.hooks.forEach((n,o)=>{if(se(e,t,o))return n.onBeforeRouteEnter.forEach(a=>r.onBeforeRouteEnter.add(a));if(ue(e,t,o))return n.onBeforeRouteUpdate.forEach(a=>r.onBeforeRouteUpdate.add(a))}),t?.hooks.forEach((n,o)=>{if(ie(e,t,o))return n.onBeforeRouteLeave.forEach(a=>r.onBeforeRouteLeave.add(a))}),r}function hn(e,t){const r=new K;return e.hooks.forEach((n,o)=>{if(se(e,t,o))return n.onAfterRouteEnter.forEach(a=>r.onAfterRouteEnter.add(a));if(ue(e,t,o))return n.onAfterRouteUpdate.forEach(a=>r.onAfterRouteUpdate.add(a))}),t?.hooks.forEach((n,o)=>{if(ie(e,t,o))return n.onAfterRouteLeave.forEach(a=>r.onAfterRouteLeave.add(a))}),r}class Ve extends Error{}class M extends Ve{response;constructor(t){super("Uncaught ContextPushError"),this.response={status:"PUSH",to:t}}}class ee extends Ve{response;constructor(t){super("Uncaught ContextRejectionError"),this.response={status:"REJECT",type:t}}}class dt extends Ve{response;constructor(){super("Uncaught ContextAbortError"),this.response={status:"ABORT"}}}function Rn(e,t,r){const n=new K;return e.matches.forEach((o,a)=>{se(e,t,a)&&r.onBeforeRouteEnter.forEach(i=>n.onBeforeRouteEnter.add(i)),ue(e,t,a)&&r.onBeforeRouteUpdate.forEach(i=>n.onBeforeRouteUpdate.add(i))}),t?.matches.forEach((o,a)=>{ie(e,t,a)&&r.onBeforeRouteLeave.forEach(i=>n.onBeforeRouteLeave.add(i))}),n}function yn(e,t,r){const n=new K;return e.matches.forEach((o,a)=>{se(e,t,a)&&r.onAfterRouteEnter.forEach(i=>n.onAfterRouteEnter.add(i)),ue(e,t,a)&&r.onAfterRouteUpdate.forEach(i=>n.onAfterRouteUpdate.add(i))}),t?.matches.forEach((o,a)=>{ie(e,t,a)&&r.onAfterRouteLeave.forEach(i=>n.onAfterRouteLeave.add(i))}),n}function Mt(){let e=null;function t(n){e=n}function r(n){return e?e.runWithContext(n):n()}return{setVueApp:t,runWithContext:r}}function mn(){return{reject:o=>{throw new ee(o)},push:(...o)=>{throw new M(o)},replace:(o,a,i)=>{if(J(o)){const h=a??{};throw new M([o,{...h,replace:!0}])}const u=a,c=i??{};throw new M([o,u,{...c,replace:!0}])},abort:()=>{throw new dt}}}const Ft=Ae();function gn(){const{setVueApp:e,runWithContext:t}=Mt(),r={global:new K,component:new K},{reject:n,push:o,replace:a,abort:i}=mn(),u=s=>(r.global.onBeforeRouteEnter.add(s),()=>r.global.onBeforeRouteEnter.delete(s)),c=s=>(r.global.onBeforeRouteUpdate.add(s),()=>r.global.onBeforeRouteUpdate.delete(s)),h=s=>(r.global.onBeforeRouteLeave.add(s),()=>r.global.onBeforeRouteLeave.delete(s)),w=s=>(r.global.onAfterRouteEnter.add(s),()=>r.global.onAfterRouteEnter.delete(s)),A=s=>(r.global.onAfterRouteUpdate.add(s),()=>r.global.onAfterRouteUpdate.delete(s)),g=s=>(r.global.onAfterRouteLeave.add(s),()=>r.global.onAfterRouteLeave.delete(s)),E=s=>(r.global.onError.add(s),()=>r.global.onError.delete(s));async function C({to:s,from:l}){const{global:k,component:y}=r,d=dn(s,l),R=ln(s,l),L=Rn(s,l,k),N=[...L.onBeforeRouteEnter,...d.onBeforeRouteEnter,...R.onBeforeRouteEnter,...L.onBeforeRouteUpdate,...d.onBeforeRouteUpdate,...R.onBeforeRouteUpdate,...y.onBeforeRouteUpdate,...L.onBeforeRouteLeave,...d.onBeforeRouteLeave,...R.onBeforeRouteLeave,...y.onBeforeRouteLeave];try{const V=N.map(x=>t(()=>x(s,{from:l,reject:n,push:o,replace:a,abort:i})));await Promise.all(V)}catch(V){if(V instanceof M||V instanceof ee||V instanceof dt)return V.response;try{P(V,{to:s,from:l,source:"hook"})}catch(x){if(x instanceof M||x instanceof ee)return x.response;throw x}}return{status:"SUCCESS"}}async function S({to:s,from:l}){const{global:k,component:y}=r,d=pn(s,l),R=hn(s,l),L=yn(s,l,k),N=[...y.onAfterRouteLeave,...d.onAfterRouteLeave,...R.onAfterRouteLeave,...L.onAfterRouteLeave,...y.onAfterRouteUpdate,...d.onAfterRouteUpdate,...R.onAfterRouteUpdate,...L.onAfterRouteUpdate,...y.onAfterRouteEnter,...d.onAfterRouteEnter,...R.onAfterRouteEnter,...L.onAfterRouteEnter];try{const V=N.map(x=>t(()=>x(s,{from:l,reject:n,push:o,replace:a})));await Promise.all(V)}catch(V){if(V instanceof M||V instanceof ee)return V.response;try{P(V,{to:s,from:l,source:"hook"})}catch(x){if(x instanceof M||x instanceof ee)return x.response;throw x}}return{status:"SUCCESS"}}function P(s,{to:l,from:k,source:y}){for(const d of r.global.onError)try{d(s,{to:l,from:k,source:y,reject:n,push:o,replace:a});return}catch(R){if(R instanceof Ve)throw R;if(R===s)continue;throw R}}return{runBeforeRouteHooks:C,runAfterRouteHooks:S,runErrorHooks:P,addComponentBeforeRouteHook:({lifecycle:s,depth:l,hook:k})=>{const y=_t(s),d=r.component[s],R=(L,N)=>{if(y(L,N.from,l))return k(L,N)};return d.add(R),()=>d.delete(R)},addComponentAfterRouteHook:({lifecycle:s,depth:l,hook:k})=>{const y=_t(s),d=r.component[s],R=(L,N)=>{if(y(L,N.from,l))return k(L,N)};return d.add(R),()=>d.delete(R)},addGlobalRouteHooks:s=>{s.onBeforeRouteEnter.forEach(l=>u(l)),s.onBeforeRouteUpdate.forEach(l=>c(l)),s.onBeforeRouteLeave.forEach(l=>h(l)),s.onAfterRouteEnter.forEach(l=>w(l)),s.onAfterRouteUpdate.forEach(l=>A(l)),s.onAfterRouteLeave.forEach(l=>g(l)),s.onError.forEach(l=>E(l))},onBeforeRouteEnter:u,onBeforeRouteUpdate:c,onBeforeRouteLeave:h,onAfterRouteEnter:w,onAfterRouteUpdate:A,onAfterRouteLeave:g,onError:E,setVueApp:e}}function Wt(e){const t=Ft(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}function Gt(e,t){const r=ft(e),n=Wt(e);return o=>{const a=r(),u=n().addComponentBeforeRouteHook({lifecycle:t,hook:o,depth:a-1});return f.onUnmounted(u),u}}function Qt(e,t){const r=ft(e),n=Wt(e);return o=>{const a=r(),u=n().addComponentAfterRouteHook({lifecycle:t,hook:o,depth:a-1});return f.onUnmounted(u),u}}function wn(e){const t=Gt(e,"onBeforeRouteLeave"),r=Gt(e,"onBeforeRouteUpdate"),n=Qt(e,"onAfterRouteLeave"),o=Qt(e,"onAfterRouteUpdate");return{onBeforeRouteLeave:t,onBeforeRouteUpdate:r,onAfterRouteLeave:n,onAfterRouteUpdate:o}}const zt=Ae();function En(e){const t=zt(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}const Yt=Ae();function vn(e){const t=Yt(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}function Se(e){return()=>{const t=f.inject(e);if(!t)throw new oe;return t}}const Xt=Symbol("isRouterRouteSymbol");function An(e,t){return typeof t=="object"&&t!==null&&Xt in t&&e in t}function Sn(e,t,r){function n(v,p,s){if(typeof v=="object"){const k={...t.params,...v};return r(t.name,k,p)}const l={...t.params,[v]:p};return r(t.name,l,s)}const o=(...v)=>{const p=new URLSearchParams(t.query);p.set(...v),n({},{query:p})},a=(...v)=>{const p=new URLSearchParams(t.query);p.append(...v),n({},{query:p})},i=(...v)=>{const p=new URLSearchParams(t.query);p.delete(...v),n({},{query:p})},{id:u,matched:c,matches:h,hooks:w,name:A,hash:g,href:E}=f.toRefs(t),C=f.computed({get(){return new Proxy(t.params,{set(v,p,s){return n(p,s),!0}})},set(v){n(v)}}),S=f.computed({get(){return new Proxy(t.query,{get(v,p,s){switch(p){case"append":return a;case"set":return o;case"delete":return i;default:return Reflect.get(v,p,s)}}})},set(v){n({},{query:v})}}),P=f.computed({get(){return new Proxy(t.state,{set(v,p,s){return n({},{state:{...t.state,[p]:s}}),!0}})},set(v){n({},{state:v})}});return f.reactive({id:u,matched:c,matches:h,hooks:w,state:P,query:S,hash:g,params:C,name:A,href:E,update:n,[Xt]:!0,[e]:!0})}function pt(e){return(t,r,{exact:n}={})=>An(e,t)?r===void 0?!0:n?t.matched.name===r:t.matches.map(o=>o.name).includes(r):!1}function Ce(e){const t=Se(e),r=pt(e);return(n,o)=>{const a=t();function i(){if(!n)return;if(!r(a.route,n,o))throw new $t(n,a.route.name)}return f.watch(a.route,i,{immediate:!0,deep:!0}),a.route}}function lt(e){const t=Ce(e),r=Se(e),n=vn(e),o=ft(e),a=En(e);return f.defineComponent((i,u)=>{const c=t(),h=r(),w=n(),A=o({increment:!0});f.onServerPrefetch(async()=>{await h.start()});const{getRouteComponents:g}=a(),E=f.computed(()=>{if(!h.started.value)return null;if(w.value)return w.value.component;const C=c.matches.at(A);if(!C)return null;const S=g(C),P=i.name??"default";return S[P]});return()=>u.slots.default?u.slots.default({route:c,component:E,rejection:w.value}):E.value?f.h(E.value):null},{name:"RouterView",props:["name"]})}const Kt=Ae();function er(e){const t=Kt(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}const bn="lazy",Pn={components:!0,props:!1};function xe(e){return["eager","lazy","intent"].includes(e)}function tr({routerPrefetch:e,routePrefetch:t,linkPrefetch:r},n){const o=ht(r,n),a=ht(t,n),i=ht(e,n),u=[o,a,i,Pn[n],bn].reduce((c,h)=>xe(c)?c:c===!0&&xe(h)?h:c===!0&&!xe(h)?c:c===void 0?h:c,void 0);return xe(u)?u:!1}function ht(e,t){return le(e)?e[t]:e}const Un=f.defineAsyncComponent(()=>new Promise(e=>{e({default:{template:"foo"}})}));function rr(e){return e.name===Un.name&&"__asyncLoader"in e}const nr=Symbol("visibilityObserver");function kn(e){const t=f.inject(nr);if(!t)throw new oe;return f.watch(e,(n,o)=>{n&&t.observe(n),o&&t.unobserve(o)},{immediate:!0}),f.onUnmounted(()=>{e.value&&t.unobserve(e.value)}),{isElementVisible:f.computed(()=>e.value?t.isElementVisible(e.value):!1)}}function or(e,t,r){f.watch(e,(n,o)=>{n&&n.addEventListener(t,r),o&&o.removeEventListener(t,r)},{immediate:!0}),f.onUnmounted(()=>{e.value&&e.value.removeEventListener(t,r)})}function Ln(e){const t=er(e);return r=>{const n=new Map,o=f.ref(),{getPrefetchProps:a,setPrefetchProps:i}=t(),{isElementVisible:u}=kn(o),c=()=>{const A=Array.from(n.values()).reduce((g,E)=>(Object.assign(g,E),g),{});i(A)};f.watch(()=>f.toValue(r),({route:A,...g})=>{n.clear(),A&&w("eager",A,g)},{immediate:!0}),f.watch(u,A=>{const{route:g,...E}=f.toValue(r);!g||!A||w("lazy",g,E)},{immediate:!0}),or(o,"focusin",h),or(o,"mouseover",h);function h(){const{route:A,...g}=f.toValue(r);A&&w("intent",A,g)}function w(A,g,E){Bn(A,g,E),n.has(A)||n.set(A,a(A,g,E))}return{element:o,commit:c}}}function Bn(e,t,r){t.matches.forEach(n=>{tr({...r,routePrefetch:n.prefetch},"components")===e&&(tt(n)&&rr(n.component)&&n.component.__asyncLoader(),nt(n)&&Object.values(n.components).forEach(a=>{rr(a)&&a.__asyncLoader()}))})}function Rt(...e){const t=new URLSearchParams;for(const r of e){const n=new URLSearchParams(r);for(const[o,a]of n.entries())t.append(o,a)}return t}function ar(e){const t=Se(e),r=Ln(e),n=pt(e);return(o,a={},i={})=>{const u=t(),c=f.computed(()=>{const s=f.toValue(o);return typeof s!="string"?s:J(s)?u.find(s,f.toValue(i)):u.resolve(s,f.toValue(a),f.toValue(i))}),h=f.computed(()=>{if(c.value)return c.value.href;const s=f.toValue(o);if(J(s))return s;console.error(new Error("Failed to resolve route in RouterLink."))}),w=f.computed(()=>n(u.route)&&u.route.matches.some(s=>s.id===c.value?.id)),A=f.computed(()=>u.route.id===c.value?.id),g=f.computed(()=>n(u.route)&&xr(c.value)&&u.route.href.startsWith(c.value.href)),E=f.computed(()=>u.route.href===c.value?.href),C=f.computed(()=>!!h.value&&u.isExternal(h.value)),S=f.computed(()=>{const s=f.toValue(o);return typeof s!="string"||J(s)?f.toValue(a):f.toValue(i)}),{element:P,commit:b}=r(()=>({route:c.value,routerPrefetch:u.prefetch,linkPrefetch:S.value.prefetch})),v=s=>{b();const l={replace:s?.replace??S.value.replace,query:Rt(S.value.query,s?.query),hash:s?.hash??S.value.hash,state:{...S.value.state,...s?.state}},k=f.toValue(o);return J(k)||typeof k=="object"?u.push(k,l):u.push(k,f.toValue(a),l)};return{element:P,route:c,href:h,isMatch:w,isExactMatch:A,isActive:g,isExactActive:E,isExternal:C,push:v,replace:s=>v({...s,replace:!0})}}}function sr(e){const t=Se(e),r=ar(e);return f.defineComponent((n,o)=>{const a=t(),i=f.computed(()=>b(n.to)),u=f.computed(()=>v(n.to)),c=f.computed(()=>{const{to:s,...l}=n;return l}),{element:h,isMatch:w,isExactMatch:A,isActive:g,isExactActive:E,isExternal:C,push:S}=r(()=>typeof n.to=="function"?n.to(a.resolve):n.to,c),P=f.computed(()=>({"router-link--match":w.value,"router-link--exact-match":A.value,"router-link--active":g.value,"router-link--exact-active":E.value}));function b(s){if(typeof s=="function"){const l=s(a.resolve);return b(l)}return J(s)?a.find(s):s}function v(s){if(typeof s=="function"){const l=s(a.resolve);return v(l)}return J(s)?s:s?.href}function p(s){s.preventDefault(),S()}return()=>f.h("a",{href:u.value,class:["router-link",P.value],ref:h,onClick:p},o.slots.default?.({route:i.value,isMatch:w.value,isExactMatch:A.value,isActive:g.value,isExactActive:E.value,isExternal:C.value}))},{name:"RouterLink",props:["to","prefetch","query","hash","replace","state"]})}function Nn(e){const t=Ce(e);return(r,n=String)=>{const o=t(),a=f.computed({get(){const u=o.query.get(f.toValue(r));return u===null?null:Ge(u,n)},set(u){o.query.set(f.toValue(r),X(u,n))}}),i=f.computed({get(){return o.query.getAll(f.toValue(r)).map(c=>Ge(c,n)).filter(c=>c!==null)},set(u){const c=new URLSearchParams(o.query);c.delete(f.toValue(r)),u.forEach(h=>{c.append(f.toValue(r),X(h,n))}),o.query=c}});return{value:a,values:i,remove:()=>{o.query.delete(f.toValue(r))}}}}function ir(e){const t=typeof e=="object"?e.key:e,{onBeforeRouteLeave:r,onBeforeRouteUpdate:n,onAfterRouteLeave:o,onAfterRouteUpdate:a}=wn(t),i=pt(t),u=lt(t),c=sr(t),h=Ce(t),w=Se(t),A=Nn(t),g=ar(t);return{onBeforeRouteLeave:r,onBeforeRouteUpdate:n,onAfterRouteLeave:o,onAfterRouteUpdate:a,isRoute:i,RouterView:u,RouterLink:c,useRoute:h,useRouter:w,useQueryValue:A,useLink:g}}function yt(){return typeof window<"u"&&typeof window.document<"u"}const Ze={template:"<div>This is component</div>"},mt=ae({name:"parentA",path:"/parentA/[paramA]"}),ur=ae({parent:mt,name:"parentA.childA",path:"/childA/[?paramB]"}),Vn=ae({parent:mt,name:"parentA.childB",path:"/childB/[paramD]",component:Ze}),Cn=ae({parent:ur,name:"parentA.childA.grandChildA",path:"/[paramC]",component:Ze});ae({name:"parentB",path:"/parentB",component:Ze}),ae({name:"parentC",path:"/",component:Ze});function xn(e){const{store:t,...r}=ct();return D(e.onBeforeRouteEnter??[]).forEach(n=>{r.onBeforeRouteEnter(n)}),D(e.onAfterRouteEnter??[]).forEach(n=>{r.onAfterRouteEnter(n)}),D(e.onBeforeRouteUpdate??[]).forEach(n=>{r.onBeforeRouteUpdate(n)}),D(e.onAfterRouteUpdate??[]).forEach(n=>{r.onAfterRouteUpdate(n)}),D(e.onBeforeRouteLeave??[]).forEach(n=>{r.onBeforeRouteLeave(n)}),D(e.onAfterRouteLeave??[]).forEach(n=>{r.onAfterRouteLeave(n)}),{routes:e.routes??[],rejections:e.rejections??[],hooks:t,...r}}function cr(e){return{get:(t,{invalid:r})=>{for(const n of e){const o=Ge(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)},set:(t,{invalid:r})=>{for(const n of e){const o=Tr(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)}}}const Zn={separator:","};function On(e,t={}){const{separator:r}={...Zn,...t},n=cr(e);return{get:(o,a)=>o.split(r).map(i=>n.get(i,a)),set:(o,a)=>{if(!Array.isArray(o))throw a.invalid("Expected an array");return o.map(i=>n.set(i,a)).join(r)}}}const jn={separator:","};function In(e,t={}){const{separator:r}={...jn,...t};return{get:n=>{const o=n.split(r);return e.map((a,i)=>re(o.at(i),a))},set:(n,{invalid:o})=>{if(!Array.isArray(n))throw o("Expected a tuple");if(n.length!==e.length)throw o(`Expected tuple with ${e.length} values but received ${n.length} values`);return e.map((a,i)=>X(n.at(i),a)).join(r)}}}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(null,arguments)}var q;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(q||(q={}));var me=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}var Oe="beforeunload",Dn="hashchange",fr="popstate";function dr(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var y=n.location,d=y.pathname,R=y.search,L=y.hash,N=o.state||{};return[N.idx,me({pathname:d,search:R,hash:L,state:N.usr||null,key:N.key||"default"})]}var i=null;function u(){if(i)E.call(i),i=null;else{var y=q.Pop,d=a(),R=d[0],L=d[1];if(E.length)if(R!=null){var N=w-R;N&&(i={action:y,location:L,retry:function(){l(N*-1)}},l(N))}else process.env.NODE_ENV!=="production"&&ce(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else v(y)}}n.addEventListener(fr,u);var c=q.Pop,h=a(),w=h[0],A=h[1],g=ge(),E=ge();w==null&&(w=0,o.replaceState(te({},o.state,{idx:w}),""));function C(y){return typeof y=="string"?y:fe(y)}function S(y,d){return d===void 0&&(d=null),me(te({pathname:A.pathname,hash:"",search:""},typeof y=="string"?be(y):y,{state:d,key:Ie()}))}function P(y,d){return[{usr:y.state,key:y.key,idx:d},C(y)]}function b(y,d,R){return!E.length||(E.call({action:y,location:d,retry:R}),!1)}function v(y){c=y;var d=a();w=d[0],A=d[1],g.call({action:c,location:A})}function p(y,d){var R=q.Push,L=S(y,d);function N(){p(y,d)}if(b(R,L,N)){var V=P(L,w+1),x=V[0],$=V[1];try{o.pushState(x,"",$)}catch{n.location.assign($)}v(R)}}function s(y,d){var R=q.Replace,L=S(y,d);function N(){s(y,d)}if(b(R,L,N)){var V=P(L,w),x=V[0],$=V[1];o.replaceState(x,"",$),v(R)}}function l(y){o.go(y)}var k={get action(){return c},get location(){return A},createHref:C,push:p,replace:s,go:l,back:function(){l(-1)},forward:function(){l(1)},listen:function(d){return g.push(d)},block:function(d){var R=E.push(d);return E.length===1&&n.addEventListener(Oe,je),function(){R(),E.length||n.removeEventListener(Oe,je)}}};return k}function Hn(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var d=be(n.location.hash.substr(1)),R=d.pathname,L=R===void 0?"/":R,N=d.search,V=N===void 0?"":N,x=d.hash,$=x===void 0?"":x,T=o.state||{};return[T.idx,me({pathname:L,search:V,hash:$,state:T.usr||null,key:T.key||"default"})]}var i=null;function u(){if(i)E.call(i),i=null;else{var d=q.Pop,R=a(),L=R[0],N=R[1];if(E.length)if(L!=null){var V=w-L;V&&(i={action:d,location:N,retry:function(){k(V*-1)}},k(V))}else process.env.NODE_ENV!=="production"&&ce(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else p(d)}}n.addEventListener(fr,u),n.addEventListener(Dn,function(){var d=a(),R=d[1];fe(R)!==fe(A)&&u()});var c=q.Pop,h=a(),w=h[0],A=h[1],g=ge(),E=ge();w==null&&(w=0,o.replaceState(te({},o.state,{idx:w}),""));function C(){var d=document.querySelector("base"),R="";if(d&&d.getAttribute("href")){var L=n.location.href,N=L.indexOf("#");R=N===-1?L:L.slice(0,N)}return R}function S(d){return C()+"#"+(typeof d=="string"?d:fe(d))}function P(d,R){return R===void 0&&(R=null),me(te({pathname:A.pathname,hash:"",search:""},typeof d=="string"?be(d):d,{state:R,key:Ie()}))}function b(d,R){return[{usr:d.state,key:d.key,idx:R},S(d)]}function v(d,R,L){return!E.length||(E.call({action:d,location:R,retry:L}),!1)}function p(d){c=d;var R=a();w=R[0],A=R[1],g.call({action:c,location:A})}function s(d,R){var L=q.Push,N=P(d,R);function V(){s(d,R)}if(process.env.NODE_ENV!=="production"&&ce(N.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(d)+")"),v(L,N,V)){var x=b(N,w+1),$=x[0],T=x[1];try{o.pushState($,"",T)}catch{n.location.assign(T)}p(L)}}function l(d,R){var L=q.Replace,N=P(d,R);function V(){l(d,R)}if(process.env.NODE_ENV!=="production"&&ce(N.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(d)+")"),v(L,N,V)){var x=b(N,w),$=x[0],T=x[1];o.replaceState($,"",T),p(L)}}function k(d){o.go(d)}var y={get action(){return c},get location(){return A},createHref:S,push:s,replace:l,go:k,back:function(){k(-1)},forward:function(){k(1)},listen:function(R){return g.push(R)},block:function(R){var L=E.push(R);return E.length===1&&n.addEventListener(Oe,je),function(){L(),E.length||n.removeEventListener(Oe,je)}}};return y}function pr(e){e===void 0&&(e={});var t=e,r=t.initialEntries,n=r===void 0?["/"]:r,o=t.initialIndex,a=n.map(function(p){var s=me(te({pathname:"/",search:"",hash:"",state:null,key:Ie()},typeof p=="string"?be(p):p));return process.env.NODE_ENV!=="production"&&ce(s.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(p)+")"),s}),i=lr(o??a.length-1,0,a.length-1),u=q.Pop,c=a[i],h=ge(),w=ge();function A(p){return typeof p=="string"?p:fe(p)}function g(p,s){return s===void 0&&(s=null),me(te({pathname:c.pathname,search:"",hash:""},typeof p=="string"?be(p):p,{state:s,key:Ie()}))}function E(p,s,l){return!w.length||(w.call({action:p,location:s,retry:l}),!1)}function C(p,s){u=p,c=s,h.call({action:u,location:c})}function S(p,s){var l=q.Push,k=g(p,s);function y(){S(p,s)}process.env.NODE_ENV!=="production"&&ce(c.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(p)+")"),E(l,k,y)&&(i+=1,a.splice(i,a.length,k),C(l,k))}function P(p,s){var l=q.Replace,k=g(p,s);function y(){P(p,s)}process.env.NODE_ENV!=="production"&&ce(c.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(p)+")"),E(l,k,y)&&(a[i]=k,C(l,k))}function b(p){var s=lr(i+p,0,a.length-1),l=q.Pop,k=a[s];function y(){b(p)}E(l,k,y)&&(i=s,C(l,k))}var v={get index(){return i},get action(){return u},get location(){return c},createHref:A,push:S,replace:P,go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(s){return h.push(s)},block:function(s){return w.push(s)}};return v}function lr(e,t,r){return Math.min(Math.max(e,t),r)}function je(e){e.preventDefault(),e.returnValue=""}function ge(){var e=[];return{get length(){return e.length},push:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},call:function(r){e.forEach(function(n){return n&&n(r)})}}}function Ie(){return Math.random().toString(36).substr(2,8)}function fe(e){var t=e.pathname,r=t===void 0?"/":t,n=e.search,o=n===void 0?"":n,a=e.hash,i=a===void 0?"":a;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),i&&i!=="#"&&(r+=i.charAt(0)==="#"?i:"#"+i),r}function be(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function $n(e,t,r){const n=f.reactive({...t}),o=u=>{Object.assign(n,{...u})},a=n,i=Sn(e,a,r);return{currentRoute:a,routerRoute:i,updateRoute:o}}function _(e){return!e.startsWith("http")?Tn(e):qn(e)}function qn(e){const{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:i}=new URL(e,e);return{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:i}}function Tn(e){const{pathname:t,search:r,searchParams:n,hash:o}=new URL(e,"https://localhost");return{pathname:t,search:r,searchParams:n,hash:o}}function _n(e){return t=>{const{host:r}=_(t);return!(r===void 0||r===e)}}function Jn(){return{reject:o=>{throw new ee(o)},push:(...o)=>{throw new M(o)},replace:(o,a,i)=>{if(J(o)){const h=a??{};throw new M([o,{...h,replace:!0}])}const u=a,c=i??{};throw new M([o,u,{...c,replace:!0}])},abort:()=>{throw new dt}}}function hr(e){try{const t=e();return _e(t)?t.catch(r=>r):t}catch(t){return t}}function Mn(){const{setVueApp:e,runWithContext:t}=Mt(),r=f.reactive(new Map),{push:n,replace:o,reject:a}=Jn(),i=(S,P,b)=>P.matches.filter(v=>tr({...b,routePrefetch:v.prefetch},"props")===S).flatMap(v=>E(v)).reduce((v,{id:p,name:s,props:l})=>{if(!l)return v;const k=g(p,s,P),y=t(()=>hr(()=>l(P,{push:n,replace:o,reject:a,parent:w(P,!0)})));return v[k]=y,v},{}),u=S=>{Object.entries(S).forEach(([P,b])=>{r.set(P,b)})},c=async S=>{const P=S.matches.flatMap(E),b=[],v=[];for(const{id:p,name:s,props:l}of P){if(!l)continue;const k=g(p,s,S);if(b.push(k),!r.has(k)){const y=t(()=>hr(()=>l(S,{push:n,replace:o,reject:a,parent:w(S)})));r.set(k,y)}v.push((async()=>{const y=await r.get(k);if(y instanceof Error)throw y})())}C(b);try{return await Promise.all(v),{status:"SUCCESS"}}catch(p){if(p instanceof M||p instanceof ee)return p.response;throw p}},h=(S,P,b)=>{const v=g(S,P,b);return r.get(v)};function w(S,P=!1){const b=S.matches.at(-2);if(b)return rt(b)?{name:b.name??"",get props(){return A(b,"default",S,P)}}:ot(b)?{name:b.name??"",props:new Proxy({},{get(v,p){return typeof p!="string"?Reflect.get(v,p):A(b,p,S,P)}})}:{name:b.name??"",props:void 0}}function A(S,P,b,v=!1){const p=h(S.id,P,b);if(v&&!p){const s=S.name??"unknown",l=b.name||"unknown";console.warn(`
1
+ (function(B,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(B=typeof globalThis<"u"?globalThis:B||self,f(B["@kitbag/router"]={},B.Vue))})(this,(function(B,f){"use strict";class bt extends Error{constructor(t){super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`)}}function D(e){return Array.isArray(e)?e:[e]}function Pt(e,t){return e.filter(r=>t===r).length}function pe(...e){const t=e.flatMap(r=>Array.isArray(r)?r:Object.keys(r));for(const r of t)if(Pt(t,r)>1)throw new bt(r)}class Y extends Error{}const Ee="[",Ue="]";function Nr(e){return e!==String&&e!==Boolean&&e!==Number&&e!==Date}function Vr(e){return typeof e=="function"&&Nr(e)}function ke(e){return typeof e=="object"&&"get"in e&&typeof e.get=="function"&&"set"in e&&typeof e.set=="function"}function Ut(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function kt(e,t){return ke(e)?{...e,defaultValue:t??e.defaultValue}:{get:r=>re(r,e),set:r=>X(r,e),defaultValue:t}}function Cr(e){return ke(e)&&e.defaultValue!==void 0}function xr(e,t){return kt(e,t)}function Zr(e){return e!==void 0}function le(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function G(e){return typeof e=="string"&&e.length>0}let m=null;async function Or(){const{ZodType:e,ZodString:t,ZodIPv4:r,ZodIPv6:n,ZodCIDRv4:o,ZodCIDRv6:a,ZodURL:i,ZodEmail:u,ZodUUID:c,ZodBase64:h,ZodCUID:w,ZodCUID2:A,ZodULID:g,ZodJWT:E,ZodBigInt:C,ZodNaN:S,ZodBoolean:P,ZodDate:b,ZodISODateTime:v,ZodISODate:p,ZodISOTime:s,ZodNumber:l,ZodLiteral:k,ZodObject:y,ZodEnum:d,ZodArray:R,ZodTuple:L,ZodUnion:N,ZodDiscriminatedUnion:V,ZodRecord:x,ZodMap:$,ZodSet:T,ZodIntersection:Pe,ZodPromise:At}=await import("zod");return{ZodType:e,ZodString:t,ZodIPv4:r,ZodIPv6:n,ZodCIDRv4:o,ZodCIDRv6:a,ZodURL:i,ZodEmail:u,ZodUUID:c,ZodBase64:h,ZodCUID:w,ZodCUID2:A,ZodULID:g,ZodJWT:E,ZodBigInt:C,ZodNaN:S,ZodBoolean:P,ZodDate:b,ZodISODateTime:v,ZodISODate:p,ZodISOTime:s,ZodNumber:l,ZodLiteral:k,ZodObject:y,ZodEnum:d,ZodArray:R,ZodTuple:L,ZodUnion:N,ZodDiscriminatedUnion:V,ZodRecord:x,ZodMap:$,ZodSet:T,ZodIntersection:Pe,ZodPromise:At}}function jr(e){return Object.values(e).some(t=>Object.values(t.host.params).some(r=>$e(r))||Object.values(t.path.params).some(r=>$e(r))||Object.values(t.query.params).some(r=>$e(r)))}function $e(e){return le(e)&&"parse"in e&&typeof e.parse=="function"&&"~standard"in e&&le(e["~standard"])&&"vendor"in e["~standard"]&&e["~standard"].vendor==="zod"}async function Ir(){try{m=await Or()}catch{throw new Error("Failed to initialize Zod")}}function Lt(e){return m?e instanceof m.ZodType:!1}function Bt(e){return{get:(t,{invalid:r})=>{try{return qe(t,e)}catch{throw r()}},set:(t,{invalid:r})=>{try{return Te(t,e)}catch{throw r()}}}}const Dr=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function he(e,t){if(typeof t=="string"&&Dr.test(t)){const r=new Date(t);return isNaN(r.getTime())?t:r}return t}function ve(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function Le(e,t){return m?.ZodString&&e instanceof m.ZodString?1:m?.ZodString&&t instanceof m.ZodString?-1:0}function qe(e,t){if(!m)throw new Error("Zod is not initialized");if(t instanceof m.ZodString)return t.parse(e);if(t instanceof m.ZodBoolean)return t.parse(!!e);if(t instanceof m.ZodDate)return t.parse(new Date(e));if(t instanceof m.ZodNumber)return t.parse(Number(e));if(t instanceof m.ZodBigInt)return t.parse(BigInt(e));if(t instanceof m.ZodNaN)return t.parse(Number(e));if(t instanceof m.ZodLiteral)return ve([()=>t.parse(Number(e)),()=>t.parse(!!e),()=>t.parse(e)]);if(t instanceof m.ZodObject)return t.parse(JSON.parse(e,he));if(t instanceof m.ZodEnum)return t.parse(e);if(t instanceof m.ZodArray||t instanceof m.ZodTuple)return t.parse(JSON.parse(e,he));if(t instanceof m.ZodUnion){const r=Array.from(t.def.options).sort(Le).map(n=>()=>qe(e,n));return ve(r)}if(t instanceof m.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Le).map(n=>()=>qe(e,n));return ve(r)}if(t instanceof m.ZodRecord)return t.parse(JSON.parse(e,he));if(t instanceof m.ZodMap)return t.parse(new Map(JSON.parse(e,he)));if(t instanceof m.ZodSet)return t.parse(new Set(JSON.parse(e,he)));if(t instanceof m.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof m.ZodPromise)throw new Error("Promise schemas are not supported");return t.parse(e)}function Te(e,t){if(!m)throw new Error("Zod is not initialized");if(t instanceof m.ZodString||t instanceof m.ZodISODateTime||t instanceof m.ZodISODate||t instanceof m.ZodISOTime||t instanceof m.ZodIPv4||t instanceof m.ZodIPv6||t instanceof m.ZodCIDRv4||t instanceof m.ZodCIDRv6||t instanceof m.ZodURL||t instanceof m.ZodEmail||t instanceof m.ZodUUID||t instanceof m.ZodBase64||t instanceof m.ZodCUID||t instanceof m.ZodCUID2||t instanceof m.ZodULID||t instanceof m.ZodJWT)return t.parse(e);if(t instanceof m.ZodBoolean)return t.parse(e).toString();if(t instanceof m.ZodDate)return t.parse(e).toISOString();if(t instanceof m.ZodNumber)return t.parse(Number(e)).toString();if(t instanceof m.ZodBigInt)return t.parse(BigInt(String(e))).toString();if(t instanceof m.ZodNaN)return t.parse(e).toString();if(t instanceof m.ZodLiteral){const r=t.parse(e);return r!=null?r.toString():String(r)}if(t instanceof m.ZodObject)return JSON.stringify(t.parse(e));if(t instanceof m.ZodEnum){const r=t.parse(e);return typeof r=="string"?r:String(r)}if(t instanceof m.ZodArray||t instanceof m.ZodTuple)return JSON.stringify(t.parse(e));if(t instanceof m.ZodUnion){const r=Array.from(t.def.options).sort(Le).map(n=>()=>Te(e,n));return ve(r)}if(t instanceof m.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Le).map(n=>()=>Te(e,n));return ve(r)}if(t instanceof m.ZodRecord)return JSON.stringify(t.parse(e));if(t instanceof m.ZodMap){const r=t.parse(e);return JSON.stringify(Array.from(r.entries()))}if(t instanceof m.ZodSet){const r=t.parse(e);return JSON.stringify(Array.from(r.values()))}if(t instanceof m.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof m.ZodPromise)throw new Error("Promise schemas are not supported");return JSON.stringify(t.parse(e))}function _e(e){return typeof e=="object"&&e!==null&&"then"in e}function Z(e,t){const r=e["~standard"].validate(t);if(_e(r))throw new Error("Promise schemas are not supported");if(r.issues)throw new Error("Validation failed");return r.value}function Hr(e){return le(e)&&"type"in e&&typeof e.type=="string"&&"~standard"in e&&le(e["~standard"])&&"vendor"in e["~standard"]&&e["~standard"].vendor==="valibot"}function Nt(e){return Hr(e)}function Vt(e){return{get:(t,{invalid:r})=>{try{return Je(t,e)}catch{throw r()}},set:(t,{invalid:r})=>{try{return Me(t,e)}catch{throw r()}}}}const $r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function Re(e,t){if(typeof t=="string"&&$r.test(t)){const r=new Date(t);return isNaN(r.getTime())?t:r}return t}function ye(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function Be(e,t){return e.type==="string"?1:t.type==="string"?-1:0}function Je(e,t){if(t.type==="boolean")return Z(t,!!e);if(t.type==="date")return Z(t,new Date(e));if(t.type==="number")return Z(t,Number(e));if(t.type==="literal")return ye([()=>Z(t,Number(e)),()=>Z(t,!!e),()=>Z(t,e)]);if(t.type==="object")return Z(t,JSON.parse(e,Re));if(t.type==="enum")return ye([()=>Z(t,Number(e)),()=>Z(t,!!e),()=>Z(t,e)]);if(t.type==="array"||t.type==="tuple")return Z(t,JSON.parse(e,Re));if(t.type==="union"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Je(e,n));return ye(r)}if(t.type==="variant"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Je(e,n));return ye(r)}if(t.type==="record")return Z(t,JSON.parse(e,Re));if(t.type==="map")return Z(t,new Map(JSON.parse(e,Re)));if(t.type==="set")return Z(t,new Set(JSON.parse(e,Re)));if(t.type==="intersection")throw new Error("Intersection schemas are not supported");if(t.type==="promise")throw new Error("Promise schemas are not supported");if(t.type==="function")throw new Error("Function schemas are not supported");return Z(t,e)}function Me(e,t){if(t.type==="string"||t.type==="boolean")return Z(t,e).toString();if(t.type==="date")return Z(t,e).toISOString();if(t.type==="number")return Z(t,Number(e)).toString();if(t.type==="literal")return Z(t,e).toString();if(t.type==="object")return JSON.stringify(Z(t,e));if(t.type==="enum"||t.type==="nativeEnum")return Z(t,e).toString();if(t.type==="array"||t.type==="tuple")return JSON.stringify(Z(t,e));if(t.type==="union"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Me(e,n));return ye(r)}if(t.type==="variant"&&"options"in t){const r=t.options.sort(Be).map(n=>()=>Me(e,n));return ye(r)}if(t.type==="record")return JSON.stringify(Z(t,e));if(t.type==="map"){const r=Z(t,e);return JSON.stringify(Array.from(r.entries()))}if(t.type==="set"){const r=Z(t,e);return JSON.stringify(Array.from(r.values()))}if(t.type==="intersection")throw new Error("Intersection schemas are not supported");if(t.type==="promise")throw new Error("Promise schemas are not supported");if(t.type==="function")throw new Error("Function schemas are not supported");return JSON.stringify(Z(t,e))}function qr(e,t){return e[t]??String}const I={invalid:e=>{throw new Y(e)}},Ct={get:e=>e,set:(e,{invalid:t})=>{if(typeof e!="string")throw t();return e}},Fe={get:(e,{invalid:t})=>{if(e==="true")return!0;if(e==="false")return!1;throw t()},set:(e,{invalid:t})=>{if(typeof e!="boolean")throw t();return e.toString()}},We={get:(e,{invalid:t})=>{const r=Number(e);if(isNaN(r))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="number")throw t();return e.toString()}},xt={get:(e,{invalid:t})=>{const r=new Date(e);if(isNaN(r.getTime()))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="object"||!(e instanceof Date))throw t();return e.toISOString()}},Zt={get:(e,{invalid:t})=>{try{return JSON.parse(e)}catch{throw t()}},set:(e,{invalid:t})=>{try{return JSON.stringify(e)}catch{throw t()}}};function Tr(e,t){switch(typeof t){case"string":return Ct.get(e,I)===t;case"number":return We.get(e,I)===t;case"boolean":return Fe.get(e,I)===t;default:return!1}}function re(e,t,r=!1){if(e===void 0||!G(e)){if(Cr(t))return t.defaultValue;if(r)return;throw new Y}if(t===String)return Ct.get(e,I);if(t===Boolean)return Fe.get(e,I);if(t===Number)return We.get(e,I);if(t===Date)return xt.get(e,I);if(t===JSON)return Zt.get(e,I);if(Vr(t))return t(e,I);if(ke(t))return t.get(e,I);if(t instanceof RegExp){if(t.test(e))return e;throw new Y}if(Ut(t)){if(Tr(e,t))return t;throw new Y}return Lt(t)?Bt(t).get(e,I):Nt(t)?Vt(t).get(e,I):e}function Ge(e,t,r=!1){try{return re(e,t,r)}catch(n){if(n instanceof Y)return;throw n}}function _r(e,t,r=!1){try{return X(e,t,r)}catch(n){if(n instanceof Y)return;throw n}}function X(e,t,r=!1){if(e===void 0){if(r)return"";throw new Y}if(t===Boolean)return Fe.set(e,I);if(t===Number)return We.set(e,I);if(t===Date)return xt.set(e,I);if(t===JSON)return Zt.set(e,I);if(ke(t))return t.set(e,I);if(Ut(t)){if(t!==e)throw new Y;return e.toString()}if(Lt(t))return Bt(t).set(e,I);if(Nt(t))return Vt(t).set(e,I);try{return e.toString()}catch{throw new Y}}function Qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jr(e,t){const r=Array.from(e.matchAll(t));if(r.length===0)return[e];let n=0;const o=r.reduce((i,u)=>{const c=Qe(e.slice(n,u.index));c.length&&i.push(c);const[h]=u;return i.push(h),n=u.index+h.length,i},[]),a=e.slice(n);return a&&o.push(a),o}function Mr(e){const t=ze(e.host.value);return new RegExp(`^${t}$`,"i")}function Fr(e){const t=ze(e.path.value);return new RegExp(`^${t}$`,"i")}function Wr(e){const t=new URLSearchParams(e.query.value);return Array.from(t.entries()).filter(([,r])=>!Xe(r)).map(([r,n])=>{const o=ze(n);return new RegExp(`${Qe(r)}=${o}(&|$)`,"i")})}function ze(e){return Jr(e,new RegExp(Ne,"g")).map(t=>t.startsWith(Ee)?Ot(t):Qe(t)).join("")}function Ot(e){return e.replace(new RegExp(Ne,"g"),zr)}function Gr(e,t){const r=jt(t);return e.replace(r,Yr)}function Ye(e,t){return Xr(t).test(e.value)}function Xe(e){return new RegExp(Qr,"g").test(e)}const Ne=`\\${Ee}\\??([\\w-_]+)\\${Ue}`,Qr=`\\${Ee}\\?([\\w-_]+)\\${Ue}`,zr=".*",Yr="(.*)";function Ke(e){const[t]=It(e,new RegExp(Ne,"g"));return t}function jt(e){return new RegExp(`\\${Ee}\\??${e}\\${Ue}`,"g")}function Xr(e){return new RegExp(`\\${Ee}\\?${e}\\${Ue}`,"g")}function It(e,t){return Array.from(e.matchAll(t)).flatMap(([,...n])=>n.map(o=>G(o)?o:""))}function Kr(e="",t={}){return G(e)?Array.from(e.matchAll(new RegExp(Ne,"g"))).reduce((n,[o,a])=>{const i=Ke(o);if(!i)return n;const u=qr(t,i);return pe([i],n),n[a]=u,n},{}):{}}function en(e){return le(e)&&typeof e.value=="string"}function ne(e){return e===void 0?z():en(e)?e:z(e,{})}function z(e,t){return{value:e??"",params:Kr(e,t)}}function Dt(e,t){pe(e.params,t.params);const r=`${e.value}${t.value}`;return z(r,{...e.params,...t.params})}function tn(e,t){return Dt(e,t)}class Ht extends Error{constructor(t){super(`Child property on meta for ${t} conflicts with the parent meta.`)}}function rn(e,t){return nn(e,t),{...e,...t}}function nn(e,t){const r=Object.keys(e).find(n=>n in t&&typeof t[n]!=typeof e[n]);if(r)throw new Ht(r)}function on(e,t){pe(e.params,t.params);const r=[e.value,t.value].filter(G).join("&");return z(r,{...e.params,...t.params})}function an(e,t){return pe(e,t),{...e,...t}}function et(e){return"parent"in e&&!!e.parent}function tt(e){return"component"in e&&!!e.component}function rt(e){return"props"in e&&typeof e.props=="function"}function nt(e){return"components"in e&&!!e.components}function ot(e){return"props"in e&&typeof e.props=="object"}function at(e,t){return{...t,path:Dt(e.path,t.path),query:on(e.query,t.query),meta:rn(e.meta,t.meta),state:an(e.state,t.state),hash:tn(e.hash,t.hash),hooks:[...e.hooks,...t.hooks],matches:[...e.matches,t.matched],context:[...e.context,...t.context],host:e.host,depth:e.depth+1}}function J(e){return typeof e!="string"?!1:/^(https?:\/\/|\/).*/g.test(e)}function st(e){return J(e)?e:`/${e}`}class oe extends Error{constructor(){super("Router not installed")}}class $t extends Error{constructor(t,r){super(`useRoute called with incorrect route. Given ${t}, expected ${r}`)}}function it(){let e=0;return()=>(++e).toString()}const sn=it()();function un(e){return e===sn}const ut=it();function qt(e){return e===void 0?"":e}class K{onBeforeRouteEnter=new Set;onBeforeRouteUpdate=new Set;onBeforeRouteLeave=new Set;onAfterRouteEnter=new Set;onAfterRouteUpdate=new Set;onAfterRouteLeave=new Set;onError=new Set}function ct(){const e=new K;return{onBeforeRouteEnter:c=>(e.onBeforeRouteEnter.add(c),()=>e.onBeforeRouteEnter.delete(c)),onBeforeRouteUpdate:c=>(e.onBeforeRouteUpdate.add(c),()=>e.onBeforeRouteUpdate.delete(c)),onBeforeRouteLeave:c=>(e.onBeforeRouteLeave.add(c),()=>e.onBeforeRouteLeave.delete(c)),onAfterRouteEnter:c=>(e.onAfterRouteEnter.add(c),()=>e.onAfterRouteEnter.delete(c)),onAfterRouteUpdate:c=>(e.onAfterRouteUpdate.add(c),()=>e.onAfterRouteUpdate.delete(c)),onAfterRouteLeave:c=>(e.onAfterRouteLeave.add(c),()=>e.onAfterRouteLeave.delete(c)),onError:c=>(e.onError.add(c),()=>e.onError.delete(c)),store:e}}function ae(e,t){const r=ut(),n=qt(e.name),o=ne(e.path),a=ne(e.query),i=ne(e.hash),u=e.meta??{},c=e.state??{},h=e.context??[],{store:w,...A}=ct(),g=f.markRaw({id:r,meta:u,state:c,...e,props:t}),E={id:r,matched:g,matches:[g],hooks:[w],name:n,path:o,query:a,hash:i,meta:u,state:c,context:h,depth:1,host:z(),prefetch:e.prefetch,...A},C=et(e)?at(e.parent,E):E;return pe(C.path.params,C.query.params,C.hash.params),C}function Tt(e){return f.defineComponent(()=>()=>f.h("h1",e),{name:e,props:[]})}function cn(e){const t=e.component??Tt(e.type);return{type:e.type,component:t}}function fn(e){const t=ut(),r=qt(e.name),n=ne(e.path),o=ne(e.query),a=ne(e.hash),i=e.meta??{},u=ne(e.host),c=e.context??[],{store:h,onBeforeRouteEnter:w}=ct(),A=f.markRaw({id:t,meta:{},state:{},...e}),g={id:t,matched:A,matches:[A],hooks:[h],name:r,host:u,path:n,query:o,hash:a,meta:i,depth:1,state:{},context:c,onBeforeRouteEnter:w},E=et(e)?at(e.parent,g):g;return pe(E.path.params,E.query.params,E.host.params,E.hash.params),E}function Ae(){const e=new Map;return t=>{const r=e.get(t);if(!r){const n=Symbol();return e.set(t,n),n}return r}}const dn=Ae();function ft(e){const t=dn(e);return({increment:r=!1}={})=>{const n=f.inject(t,0);return r&&f.provide(t,n+1),n}}const se=(e,t,r)=>{const n=e.matches,o=t?.matches??[];return n.at(r)?.id!==o.at(r)?.id},ie=(e,t,r)=>{const n=e.matches,o=t?.matches??[];return n.at(r)?.id!==o.at(r)?.id},ue=(e,t,r)=>e.matches.at(r)?.id===t?.matches.at(r)?.id;function _t(e){switch(e){case"onBeforeRouteEnter":case"onAfterRouteEnter":return se;case"onBeforeRouteUpdate":case"onAfterRouteUpdate":return ue;case"onBeforeRouteLeave":case"onAfterRouteLeave":return ie;default:throw new Error(`Switch is not exhaustive for lifecycle: ${e}`)}}class Jt{onBeforeRouteEnter=new Set;onBeforeRouteUpdate=new Set;onBeforeRouteLeave=new Set;onAfterRouteEnter=new Set;onAfterRouteUpdate=new Set;onAfterRouteLeave=new Set}function pn(e,t){const r=new Jt;return e.matches.forEach((n,o)=>{n.onBeforeRouteEnter&&se(e,t,o)&&D(n.onBeforeRouteEnter).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onBeforeRouteEnter is deprecated. Use router.onBeforeRouteEnter instead"),r.onBeforeRouteEnter.add(a)}),n.onBeforeRouteUpdate&&ue(e,t,o)&&D(n.onBeforeRouteUpdate).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onBeforeRouteUpdate is deprecated. Use router.onBeforeRouteUpdate instead"),r.onBeforeRouteUpdate.add(a)})}),t?.matches.forEach((n,o)=>{n.onBeforeRouteLeave&&ie(e,t,o)&&D(n.onBeforeRouteLeave).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onBeforeRouteLeave is deprecated. Use router.onBeforeRouteLeave instead"),r.onBeforeRouteLeave.add(a)})}),r}function ln(e,t){const r=new Jt;return e.matches.forEach((n,o)=>{n.onAfterRouteEnter&&se(e,t,o)&&D(n.onAfterRouteEnter).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onAfterRouteEnter is deprecated. Use router.onAfterRouteEnter instead"),r.onAfterRouteEnter.add(a)}),n.onAfterRouteUpdate&&ue(e,t,o)&&D(n.onAfterRouteUpdate).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onAfterRouteUpdate is deprecated. Use router.onAfterRouteUpdate instead"),r.onAfterRouteUpdate.add(a)})}),t?.matches.forEach((n,o)=>{n.onAfterRouteLeave&&ie(e,t,o)&&D(n.onAfterRouteLeave).forEach(a=>{process.env.NODE_ENV==="development"&&console.warn("[vue-router] onAfterRouteLeave is deprecated. Use router.onAfterRouteLeave instead"),r.onAfterRouteLeave.add(a)})}),r}function hn(e,t){const r=new K;return e.hooks.forEach((n,o)=>{if(se(e,t,o))return n.onBeforeRouteEnter.forEach(a=>r.onBeforeRouteEnter.add(a));if(ue(e,t,o))return n.onBeforeRouteUpdate.forEach(a=>r.onBeforeRouteUpdate.add(a))}),t?.hooks.forEach((n,o)=>{if(ie(e,t,o))return n.onBeforeRouteLeave.forEach(a=>r.onBeforeRouteLeave.add(a))}),r}function Rn(e,t){const r=new K;return e.hooks.forEach((n,o)=>{if(se(e,t,o))return n.onAfterRouteEnter.forEach(a=>r.onAfterRouteEnter.add(a));if(ue(e,t,o))return n.onAfterRouteUpdate.forEach(a=>r.onAfterRouteUpdate.add(a))}),t?.hooks.forEach((n,o)=>{if(ie(e,t,o))return n.onAfterRouteLeave.forEach(a=>r.onAfterRouteLeave.add(a))}),r}class Ve extends Error{}class M extends Ve{response;constructor(t){super("Uncaught ContextPushError"),this.response={status:"PUSH",to:t}}}class ee extends Ve{response;constructor(t){super("Uncaught ContextRejectionError"),this.response={status:"REJECT",type:t}}}class dt extends Ve{response;constructor(){super("Uncaught ContextAbortError"),this.response={status:"ABORT"}}}function yn(e,t,r){const n=new K;return e.matches.forEach((o,a)=>{se(e,t,a)&&r.onBeforeRouteEnter.forEach(i=>n.onBeforeRouteEnter.add(i)),ue(e,t,a)&&r.onBeforeRouteUpdate.forEach(i=>n.onBeforeRouteUpdate.add(i))}),t?.matches.forEach((o,a)=>{ie(e,t,a)&&r.onBeforeRouteLeave.forEach(i=>n.onBeforeRouteLeave.add(i))}),n}function mn(e,t,r){const n=new K;return e.matches.forEach((o,a)=>{se(e,t,a)&&r.onAfterRouteEnter.forEach(i=>n.onAfterRouteEnter.add(i)),ue(e,t,a)&&r.onAfterRouteUpdate.forEach(i=>n.onAfterRouteUpdate.add(i))}),t?.matches.forEach((o,a)=>{ie(e,t,a)&&r.onAfterRouteLeave.forEach(i=>n.onAfterRouteLeave.add(i))}),n}function Mt(){let e=null;function t(n){e=n}function r(n){return e?e.runWithContext(n):n()}return{setVueApp:t,runWithContext:r}}function gn(){return{reject:o=>{throw new ee(o)},push:(...o)=>{throw new M(o)},replace:(o,a,i)=>{if(J(o)){const h=a??{};throw new M([o,{...h,replace:!0}])}const u=a,c=i??{};throw new M([o,u,{...c,replace:!0}])},abort:()=>{throw new dt}}}const Ft=Ae();function wn(){const{setVueApp:e,runWithContext:t}=Mt(),r={global:new K,component:new K},{reject:n,push:o,replace:a,abort:i}=gn(),u=s=>(r.global.onBeforeRouteEnter.add(s),()=>r.global.onBeforeRouteEnter.delete(s)),c=s=>(r.global.onBeforeRouteUpdate.add(s),()=>r.global.onBeforeRouteUpdate.delete(s)),h=s=>(r.global.onBeforeRouteLeave.add(s),()=>r.global.onBeforeRouteLeave.delete(s)),w=s=>(r.global.onAfterRouteEnter.add(s),()=>r.global.onAfterRouteEnter.delete(s)),A=s=>(r.global.onAfterRouteUpdate.add(s),()=>r.global.onAfterRouteUpdate.delete(s)),g=s=>(r.global.onAfterRouteLeave.add(s),()=>r.global.onAfterRouteLeave.delete(s)),E=s=>(r.global.onError.add(s),()=>r.global.onError.delete(s));async function C({to:s,from:l}){const{global:k,component:y}=r,d=pn(s,l),R=hn(s,l),L=yn(s,l,k),N=[...L.onBeforeRouteEnter,...d.onBeforeRouteEnter,...R.onBeforeRouteEnter,...L.onBeforeRouteUpdate,...d.onBeforeRouteUpdate,...R.onBeforeRouteUpdate,...y.onBeforeRouteUpdate,...L.onBeforeRouteLeave,...d.onBeforeRouteLeave,...R.onBeforeRouteLeave,...y.onBeforeRouteLeave];try{const V=N.map(x=>t(()=>x(s,{from:l,reject:n,push:o,replace:a,abort:i})));await Promise.all(V)}catch(V){if(V instanceof M||V instanceof ee||V instanceof dt)return V.response;try{P(V,{to:s,from:l,source:"hook"})}catch(x){if(x instanceof M||x instanceof ee)return x.response;throw x}}return{status:"SUCCESS"}}async function S({to:s,from:l}){const{global:k,component:y}=r,d=ln(s,l),R=Rn(s,l),L=mn(s,l,k),N=[...y.onAfterRouteLeave,...d.onAfterRouteLeave,...R.onAfterRouteLeave,...L.onAfterRouteLeave,...y.onAfterRouteUpdate,...d.onAfterRouteUpdate,...R.onAfterRouteUpdate,...L.onAfterRouteUpdate,...y.onAfterRouteEnter,...d.onAfterRouteEnter,...R.onAfterRouteEnter,...L.onAfterRouteEnter];try{const V=N.map(x=>t(()=>x(s,{from:l,reject:n,push:o,replace:a})));await Promise.all(V)}catch(V){if(V instanceof M||V instanceof ee)return V.response;try{P(V,{to:s,from:l,source:"hook"})}catch(x){if(x instanceof M||x instanceof ee)return x.response;throw x}}return{status:"SUCCESS"}}function P(s,{to:l,from:k,source:y}){for(const d of r.global.onError)try{d(s,{to:l,from:k,source:y,reject:n,push:o,replace:a});return}catch(R){if(R instanceof Ve)throw R;if(R===s)continue;throw R}}return{runBeforeRouteHooks:C,runAfterRouteHooks:S,runErrorHooks:P,addComponentBeforeRouteHook:({lifecycle:s,depth:l,hook:k})=>{const y=_t(s),d=r.component[s],R=(L,N)=>{if(y(L,N.from,l))return k(L,N)};return d.add(R),()=>d.delete(R)},addComponentAfterRouteHook:({lifecycle:s,depth:l,hook:k})=>{const y=_t(s),d=r.component[s],R=(L,N)=>{if(y(L,N.from,l))return k(L,N)};return d.add(R),()=>d.delete(R)},addGlobalRouteHooks:s=>{s.onBeforeRouteEnter.forEach(l=>u(l)),s.onBeforeRouteUpdate.forEach(l=>c(l)),s.onBeforeRouteLeave.forEach(l=>h(l)),s.onAfterRouteEnter.forEach(l=>w(l)),s.onAfterRouteUpdate.forEach(l=>A(l)),s.onAfterRouteLeave.forEach(l=>g(l)),s.onError.forEach(l=>E(l))},onBeforeRouteEnter:u,onBeforeRouteUpdate:c,onBeforeRouteLeave:h,onAfterRouteEnter:w,onAfterRouteUpdate:A,onAfterRouteLeave:g,onError:E,setVueApp:e}}function Wt(e){const t=Ft(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}function Gt(e,t){const r=ft(e),n=Wt(e);return o=>{const a=r(),u=n().addComponentBeforeRouteHook({lifecycle:t,hook:o,depth:a-1});return f.onUnmounted(u),u}}function Qt(e,t){const r=ft(e),n=Wt(e);return o=>{const a=r(),u=n().addComponentAfterRouteHook({lifecycle:t,hook:o,depth:a-1});return f.onUnmounted(u),u}}function En(e){const t=Gt(e,"onBeforeRouteLeave"),r=Gt(e,"onBeforeRouteUpdate"),n=Qt(e,"onAfterRouteLeave"),o=Qt(e,"onAfterRouteUpdate");return{onBeforeRouteLeave:t,onBeforeRouteUpdate:r,onAfterRouteLeave:n,onAfterRouteUpdate:o}}const zt=Ae();function vn(e){const t=zt(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}const Yt=Ae();function An(e){const t=Yt(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}function Se(e){return()=>{const t=f.inject(e);if(!t)throw new oe;return t}}const Xt=Symbol("isRouterRouteSymbol");function Sn(e,t){return typeof t=="object"&&t!==null&&Xt in t&&e in t}function bn(e,t,r){function n(v,p,s){if(typeof v=="object"){const k={...t.params,...v};return r(t.name,k,p)}const l={...t.params,[v]:p};return r(t.name,l,s)}const o=(...v)=>{const p=new URLSearchParams(t.query);p.set(...v),n({},{query:p})},a=(...v)=>{const p=new URLSearchParams(t.query);p.append(...v),n({},{query:p})},i=(...v)=>{const p=new URLSearchParams(t.query);p.delete(...v),n({},{query:p})},{id:u,matched:c,matches:h,hooks:w,name:A,hash:g,href:E}=f.toRefs(t),C=f.computed({get(){return new Proxy(t.params,{set(v,p,s){return n(p,s),!0}})},set(v){n(v)}}),S=f.computed({get(){return new Proxy(t.query,{get(v,p,s){switch(p){case"append":return a;case"set":return o;case"delete":return i;default:return Reflect.get(v,p,s)}}})},set(v){n({},{query:v})}}),P=f.computed({get(){return new Proxy(t.state,{set(v,p,s){return n({},{state:{...t.state,[p]:s}}),!0}})},set(v){n({},{state:v})}});return f.reactive({id:u,matched:c,matches:h,hooks:w,state:P,query:S,hash:g,params:C,name:A,href:E,update:n,[Xt]:!0,[e]:!0})}function pt(e){return(t,r,{exact:n}={})=>Sn(e,t)?r===void 0?!0:n?t.matched.name===r:t.matches.map(o=>o.name).includes(r):!1}function Ce(e){const t=Se(e),r=pt(e);return(n,o)=>{const a=t();function i(){if(!n)return;if(!r(a.route,n,o))throw new $t(n,a.route.name)}return f.watch(a.route,i,{immediate:!0,deep:!0}),a.route}}function lt(e){const t=Ce(e),r=Se(e),n=An(e),o=ft(e),a=vn(e);return f.defineComponent((i,u)=>{const c=t(),h=r(),w=n(),A=o({increment:!0});f.onServerPrefetch(async()=>{await h.start()});const{getRouteComponents:g}=a(),E=f.computed(()=>{if(!h.started.value)return null;if(w.value)return w.value.component;const C=c.matches.at(A);if(!C)return null;const S=g(C),P=i.name??"default";return S[P]});return()=>u.slots.default?u.slots.default({route:c,component:E,rejection:w.value}):E.value?f.h(E.value):null},{name:"RouterView",props:["name"]})}const Kt=Ae();function er(e){const t=Kt(e);return()=>{const r=f.inject(t);if(!r)throw new oe;return r}}const Pn="lazy",Un={components:!0,props:!1};function xe(e){return["eager","lazy","intent"].includes(e)}function tr({routerPrefetch:e,routePrefetch:t,linkPrefetch:r},n){const o=ht(r,n),a=ht(t,n),i=ht(e,n),u=[o,a,i,Un[n],Pn].reduce((c,h)=>xe(c)?c:c===!0&&xe(h)?h:c===!0&&!xe(h)?c:c===void 0?h:c,void 0);return xe(u)?u:!1}function ht(e,t){return le(e)?e[t]:e}const kn=f.defineAsyncComponent(()=>new Promise(e=>{e({default:{template:"foo"}})}));function rr(e){return e.name===kn.name&&"__asyncLoader"in e}const nr=Symbol("visibilityObserver");function Ln(e){const t=f.inject(nr);if(!t)throw new oe;return f.watch(e,(n,o)=>{n&&t.observe(n),o&&t.unobserve(o)},{immediate:!0}),f.onUnmounted(()=>{e.value&&t.unobserve(e.value)}),{isElementVisible:f.computed(()=>e.value?t.isElementVisible(e.value):!1)}}function or(e,t,r){f.watch(e,(n,o)=>{n&&n.addEventListener(t,r),o&&o.removeEventListener(t,r)},{immediate:!0}),f.onUnmounted(()=>{e.value&&e.value.removeEventListener(t,r)})}function Bn(e){const t=er(e);return r=>{const n=new Map,o=f.ref(),{getPrefetchProps:a,setPrefetchProps:i}=t(),{isElementVisible:u}=Ln(o),c=()=>{const A=Array.from(n.values()).reduce((g,E)=>(Object.assign(g,E),g),{});i(A)};f.watch(()=>f.toValue(r),({route:A,...g})=>{n.clear(),A&&w("eager",A,g)},{immediate:!0}),f.watch(u,A=>{const{route:g,...E}=f.toValue(r);!g||!A||w("lazy",g,E)},{immediate:!0}),or(o,"focusin",h),or(o,"mouseover",h);function h(){const{route:A,...g}=f.toValue(r);A&&w("intent",A,g)}function w(A,g,E){Nn(A,g,E),n.has(A)||n.set(A,a(A,g,E))}return{element:o,commit:c}}}function Nn(e,t,r){t.matches.forEach(n=>{tr({...r,routePrefetch:n.prefetch},"components")===e&&(tt(n)&&rr(n.component)&&n.component.__asyncLoader(),nt(n)&&Object.values(n.components).forEach(a=>{rr(a)&&a.__asyncLoader()}))})}function Rt(...e){const t=new URLSearchParams;for(const r of e){const n=new URLSearchParams(r);for(const[o,a]of n.entries())t.append(o,a)}return t}function ar(e){const t=Se(e),r=Bn(e),n=pt(e);return(o,a={},i={})=>{const u=t(),c=f.computed(()=>{const s=f.toValue(o);return typeof s!="string"?s:J(s)?u.find(s,f.toValue(i)):u.resolve(s,f.toValue(a),f.toValue(i))}),h=f.computed(()=>{if(c.value)return c.value.href;const s=f.toValue(o);if(J(s))return s;console.error(new Error("Failed to resolve route in RouterLink."))}),w=f.computed(()=>n(u.route)&&u.route.matches.some(s=>s.id===c.value?.id)),A=f.computed(()=>u.route.id===c.value?.id),g=f.computed(()=>n(u.route)&&Zr(c.value)&&u.route.href.startsWith(c.value.href)),E=f.computed(()=>u.route.href===c.value?.href),C=f.computed(()=>!!h.value&&u.isExternal(h.value)),S=f.computed(()=>{const s=f.toValue(o);return typeof s!="string"||J(s)?f.toValue(a):f.toValue(i)}),{element:P,commit:b}=r(()=>({route:c.value,routerPrefetch:u.prefetch,linkPrefetch:S.value.prefetch})),v=s=>{b();const l={replace:s?.replace??S.value.replace,query:Rt(S.value.query,s?.query),hash:s?.hash??S.value.hash,state:{...S.value.state,...s?.state}},k=f.toValue(o);return J(k)||typeof k=="object"?u.push(k,l):u.push(k,f.toValue(a),l)};return{element:P,route:c,href:h,isMatch:w,isExactMatch:A,isActive:g,isExactActive:E,isExternal:C,push:v,replace:s=>v({...s,replace:!0})}}}function sr(e){const t=Se(e),r=ar(e);return f.defineComponent((n,o)=>{const a=t(),i=f.computed(()=>b(n.to)),u=f.computed(()=>v(n.to)),c=f.computed(()=>{const{to:s,...l}=n;return l}),{element:h,isMatch:w,isExactMatch:A,isActive:g,isExactActive:E,isExternal:C,push:S}=r(()=>typeof n.to=="function"?n.to(a.resolve):n.to,c),P=f.computed(()=>({"router-link--match":w.value,"router-link--exact-match":A.value,"router-link--active":g.value,"router-link--exact-active":E.value}));function b(s){if(typeof s=="function"){const l=s(a.resolve);return b(l)}return J(s)?a.find(s):s}function v(s){if(typeof s=="function"){const l=s(a.resolve);return v(l)}return J(s)?s:s?.href}function p(s){s.preventDefault(),S()}return()=>f.h("a",{href:u.value,class:["router-link",P.value],ref:h,onClick:p},o.slots.default?.({route:i.value,isMatch:w.value,isExactMatch:A.value,isActive:g.value,isExactActive:E.value,isExternal:C.value}))},{name:"RouterLink",props:["to","prefetch","query","hash","replace","state"]})}function Vn(e){const t=Ce(e);return(r,n=String)=>{const o=t(),a=f.computed({get(){const u=o.query.get(f.toValue(r));return u===null?null:Ge(u,n)},set(u){o.query.set(f.toValue(r),X(u,n))}}),i=f.computed({get(){return o.query.getAll(f.toValue(r)).map(c=>Ge(c,n)).filter(c=>c!==null)},set(u){const c=new URLSearchParams(o.query);c.delete(f.toValue(r)),u.forEach(h=>{c.append(f.toValue(r),X(h,n))}),o.query=c}});return{value:a,values:i,remove:()=>{o.query.delete(f.toValue(r))}}}}function ir(e){const t=typeof e=="object"?e.key:e,{onBeforeRouteLeave:r,onBeforeRouteUpdate:n,onAfterRouteLeave:o,onAfterRouteUpdate:a}=En(t),i=pt(t),u=lt(t),c=sr(t),h=Ce(t),w=Se(t),A=Vn(t),g=ar(t);return{onBeforeRouteLeave:r,onBeforeRouteUpdate:n,onAfterRouteLeave:o,onAfterRouteUpdate:a,isRoute:i,RouterView:u,RouterLink:c,useRoute:h,useRouter:w,useQueryValue:A,useLink:g}}function yt(){return typeof window<"u"&&typeof window.document<"u"}const Ze={template:"<div>This is component</div>"},mt=ae({name:"parentA",path:"/parentA/[paramA]"}),ur=ae({parent:mt,name:"parentA.childA",path:"/childA/[?paramB]"}),Cn=ae({parent:mt,name:"parentA.childB",path:"/childB/[paramD]",component:Ze}),xn=ae({parent:ur,name:"parentA.childA.grandChildA",path:"/[paramC]",component:Ze});ae({name:"parentB",path:"/parentB",component:Ze}),ae({name:"parentC",path:"/",component:Ze});function Zn(e){const{store:t,...r}=ct();return D(e.onBeforeRouteEnter??[]).forEach(n=>{r.onBeforeRouteEnter(n)}),D(e.onAfterRouteEnter??[]).forEach(n=>{r.onAfterRouteEnter(n)}),D(e.onBeforeRouteUpdate??[]).forEach(n=>{r.onBeforeRouteUpdate(n)}),D(e.onAfterRouteUpdate??[]).forEach(n=>{r.onAfterRouteUpdate(n)}),D(e.onBeforeRouteLeave??[]).forEach(n=>{r.onBeforeRouteLeave(n)}),D(e.onAfterRouteLeave??[]).forEach(n=>{r.onAfterRouteLeave(n)}),{routes:e.routes??[],rejections:e.rejections??[],hooks:t,...r}}function cr(e){return{get:(t,{invalid:r})=>{for(const n of e){const o=Ge(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)},set:(t,{invalid:r})=>{for(const n of e){const o=_r(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)}}}const On={separator:","};function jn(e,t={}){const{separator:r}={...On,...t},n=cr(e);return{get:(o,a)=>o.split(r).map(i=>n.get(i,a)),set:(o,a)=>{if(!Array.isArray(o))throw a.invalid("Expected an array");return o.map(i=>n.set(i,a)).join(r)}}}const In={separator:","};function Dn(e,t={}){const{separator:r}={...In,...t};return{get:n=>{const o=n.split(r);return e.map((a,i)=>re(o.at(i),a))},set:(n,{invalid:o})=>{if(!Array.isArray(n))throw o("Expected a tuple");if(n.length!==e.length)throw o(`Expected tuple with ${e.length} values but received ${n.length} values`);return e.map((a,i)=>X(n.at(i),a)).join(r)}}}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(null,arguments)}var q;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(q||(q={}));var me=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}var Oe="beforeunload",Hn="hashchange",fr="popstate";function dr(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var y=n.location,d=y.pathname,R=y.search,L=y.hash,N=o.state||{};return[N.idx,me({pathname:d,search:R,hash:L,state:N.usr||null,key:N.key||"default"})]}var i=null;function u(){if(i)E.call(i),i=null;else{var y=q.Pop,d=a(),R=d[0],L=d[1];if(E.length)if(R!=null){var N=w-R;N&&(i={action:y,location:L,retry:function(){l(N*-1)}},l(N))}else process.env.NODE_ENV!=="production"&&ce(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else v(y)}}n.addEventListener(fr,u);var c=q.Pop,h=a(),w=h[0],A=h[1],g=ge(),E=ge();w==null&&(w=0,o.replaceState(te({},o.state,{idx:w}),""));function C(y){return typeof y=="string"?y:fe(y)}function S(y,d){return d===void 0&&(d=null),me(te({pathname:A.pathname,hash:"",search:""},typeof y=="string"?be(y):y,{state:d,key:Ie()}))}function P(y,d){return[{usr:y.state,key:y.key,idx:d},C(y)]}function b(y,d,R){return!E.length||(E.call({action:y,location:d,retry:R}),!1)}function v(y){c=y;var d=a();w=d[0],A=d[1],g.call({action:c,location:A})}function p(y,d){var R=q.Push,L=S(y,d);function N(){p(y,d)}if(b(R,L,N)){var V=P(L,w+1),x=V[0],$=V[1];try{o.pushState(x,"",$)}catch{n.location.assign($)}v(R)}}function s(y,d){var R=q.Replace,L=S(y,d);function N(){s(y,d)}if(b(R,L,N)){var V=P(L,w),x=V[0],$=V[1];o.replaceState(x,"",$),v(R)}}function l(y){o.go(y)}var k={get action(){return c},get location(){return A},createHref:C,push:p,replace:s,go:l,back:function(){l(-1)},forward:function(){l(1)},listen:function(d){return g.push(d)},block:function(d){var R=E.push(d);return E.length===1&&n.addEventListener(Oe,je),function(){R(),E.length||n.removeEventListener(Oe,je)}}};return k}function $n(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var d=be(n.location.hash.substr(1)),R=d.pathname,L=R===void 0?"/":R,N=d.search,V=N===void 0?"":N,x=d.hash,$=x===void 0?"":x,T=o.state||{};return[T.idx,me({pathname:L,search:V,hash:$,state:T.usr||null,key:T.key||"default"})]}var i=null;function u(){if(i)E.call(i),i=null;else{var d=q.Pop,R=a(),L=R[0],N=R[1];if(E.length)if(L!=null){var V=w-L;V&&(i={action:d,location:N,retry:function(){k(V*-1)}},k(V))}else process.env.NODE_ENV!=="production"&&ce(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else p(d)}}n.addEventListener(fr,u),n.addEventListener(Hn,function(){var d=a(),R=d[1];fe(R)!==fe(A)&&u()});var c=q.Pop,h=a(),w=h[0],A=h[1],g=ge(),E=ge();w==null&&(w=0,o.replaceState(te({},o.state,{idx:w}),""));function C(){var d=document.querySelector("base"),R="";if(d&&d.getAttribute("href")){var L=n.location.href,N=L.indexOf("#");R=N===-1?L:L.slice(0,N)}return R}function S(d){return C()+"#"+(typeof d=="string"?d:fe(d))}function P(d,R){return R===void 0&&(R=null),me(te({pathname:A.pathname,hash:"",search:""},typeof d=="string"?be(d):d,{state:R,key:Ie()}))}function b(d,R){return[{usr:d.state,key:d.key,idx:R},S(d)]}function v(d,R,L){return!E.length||(E.call({action:d,location:R,retry:L}),!1)}function p(d){c=d;var R=a();w=R[0],A=R[1],g.call({action:c,location:A})}function s(d,R){var L=q.Push,N=P(d,R);function V(){s(d,R)}if(process.env.NODE_ENV!=="production"&&ce(N.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(d)+")"),v(L,N,V)){var x=b(N,w+1),$=x[0],T=x[1];try{o.pushState($,"",T)}catch{n.location.assign(T)}p(L)}}function l(d,R){var L=q.Replace,N=P(d,R);function V(){l(d,R)}if(process.env.NODE_ENV!=="production"&&ce(N.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(d)+")"),v(L,N,V)){var x=b(N,w),$=x[0],T=x[1];o.replaceState($,"",T),p(L)}}function k(d){o.go(d)}var y={get action(){return c},get location(){return A},createHref:S,push:s,replace:l,go:k,back:function(){k(-1)},forward:function(){k(1)},listen:function(R){return g.push(R)},block:function(R){var L=E.push(R);return E.length===1&&n.addEventListener(Oe,je),function(){L(),E.length||n.removeEventListener(Oe,je)}}};return y}function pr(e){e===void 0&&(e={});var t=e,r=t.initialEntries,n=r===void 0?["/"]:r,o=t.initialIndex,a=n.map(function(p){var s=me(te({pathname:"/",search:"",hash:"",state:null,key:Ie()},typeof p=="string"?be(p):p));return process.env.NODE_ENV!=="production"&&ce(s.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(p)+")"),s}),i=lr(o??a.length-1,0,a.length-1),u=q.Pop,c=a[i],h=ge(),w=ge();function A(p){return typeof p=="string"?p:fe(p)}function g(p,s){return s===void 0&&(s=null),me(te({pathname:c.pathname,search:"",hash:""},typeof p=="string"?be(p):p,{state:s,key:Ie()}))}function E(p,s,l){return!w.length||(w.call({action:p,location:s,retry:l}),!1)}function C(p,s){u=p,c=s,h.call({action:u,location:c})}function S(p,s){var l=q.Push,k=g(p,s);function y(){S(p,s)}process.env.NODE_ENV!=="production"&&ce(c.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(p)+")"),E(l,k,y)&&(i+=1,a.splice(i,a.length,k),C(l,k))}function P(p,s){var l=q.Replace,k=g(p,s);function y(){P(p,s)}process.env.NODE_ENV!=="production"&&ce(c.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(p)+")"),E(l,k,y)&&(a[i]=k,C(l,k))}function b(p){var s=lr(i+p,0,a.length-1),l=q.Pop,k=a[s];function y(){b(p)}E(l,k,y)&&(i=s,C(l,k))}var v={get index(){return i},get action(){return u},get location(){return c},createHref:A,push:S,replace:P,go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(s){return h.push(s)},block:function(s){return w.push(s)}};return v}function lr(e,t,r){return Math.min(Math.max(e,t),r)}function je(e){e.preventDefault(),e.returnValue=""}function ge(){var e=[];return{get length(){return e.length},push:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},call:function(r){e.forEach(function(n){return n&&n(r)})}}}function Ie(){return Math.random().toString(36).substr(2,8)}function fe(e){var t=e.pathname,r=t===void 0?"/":t,n=e.search,o=n===void 0?"":n,a=e.hash,i=a===void 0?"":a;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),i&&i!=="#"&&(r+=i.charAt(0)==="#"?i:"#"+i),r}function be(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function qn(e,t,r){const n=f.reactive({...t}),o=u=>{Object.assign(n,{...u})},a=n,i=bn(e,a,r);return{currentRoute:a,routerRoute:i,updateRoute:o}}function _(e){return!e.startsWith("http")?_n(e):Tn(e)}function Tn(e){const{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:i}=new URL(e,e);return{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:i}}function _n(e){const{pathname:t,search:r,searchParams:n,hash:o}=new URL(e,"https://localhost");return{pathname:t,search:r,searchParams:n,hash:o}}function Jn(e){return t=>{const{host:r}=_(t);return!(r===void 0||r===e)}}function Mn(){return{reject:o=>{throw new ee(o)},push:(...o)=>{throw new M(o)},replace:(o,a,i)=>{if(J(o)){const h=a??{};throw new M([o,{...h,replace:!0}])}const u=a,c=i??{};throw new M([o,u,{...c,replace:!0}])},abort:()=>{throw new dt}}}function hr(e){try{const t=e();return _e(t)?t.catch(r=>r):t}catch(t){return t}}function Fn(){const{setVueApp:e,runWithContext:t}=Mt(),r=f.reactive(new Map),{push:n,replace:o,reject:a}=Mn(),i=(S,P,b)=>P.matches.filter(v=>tr({...b,routePrefetch:v.prefetch},"props")===S).flatMap(v=>E(v)).reduce((v,{id:p,name:s,props:l})=>{if(!l)return v;const k=g(p,s,P),y=t(()=>hr(()=>l(P,{push:n,replace:o,reject:a,parent:w(P,!0)})));return v[k]=y,v},{}),u=S=>{Object.entries(S).forEach(([P,b])=>{r.set(P,b)})},c=async S=>{const P=S.matches.flatMap(E),b=[],v=[];for(const{id:p,name:s,props:l}of P){if(!l)continue;const k=g(p,s,S);if(b.push(k),!r.has(k)){const y=t(()=>hr(()=>l(S,{push:n,replace:o,reject:a,parent:w(S)})));r.set(k,y)}v.push((async()=>{const y=await r.get(k);if(y instanceof Error)throw y})())}C(b);try{return await Promise.all(v),{status:"SUCCESS"}}catch(p){if(p instanceof M||p instanceof ee)return p.response;throw p}},h=(S,P,b)=>{const v=g(S,P,b);return r.get(v)};function w(S,P=!1){const b=S.matches.at(-2);if(b)return rt(b)?{name:b.name??"",get props(){return A(b,"default",S,P)}}:ot(b)?{name:b.name??"",props:new Proxy({},{get(v,p){return typeof p!="string"?Reflect.get(v,p):A(b,p,S,P)}})}:{name:b.name??"",props:void 0}}function A(S,P,b,v=!1){const p=h(S.id,P,b);if(v&&!p){const s=S.name??"unknown",l=b.name||"unknown";console.warn(`
2
2
  Unable to access parent props "${P}" from route "${s}" while prefetching props for route "${l}".
3
3
  This may occur if the parent route's props were not also prefetched.
4
- `)}return p}function g(S,P,b){return[S,P,b.id,JSON.stringify(b.params)].join("-")}function E(S){return rt(S)?[{id:S.id,name:"default",props:S.props}]:ot(S)?Object.entries(S.props).map(([P,b])=>({id:S.id,name:P,props:b})):[]}function C(S){for(const P of r.keys())S.includes(P)||r.delete(P)}return{getPrefetchProps:i,setPrefetchProps:u,getProps:h,setProps:c,setVueApp:e}}function Fn({mode:e,listener:t}){const r=Wn(e),n=(c,h)=>{if(h?.replace){r.replace(c,h.state);return}r.push(c,h?.state)},o=()=>{const c=fe(r.location);r.replace(c)};let a;return{...r,update:n,refresh:o,startListening:()=>{a?.(),a=r.listen(t)},stopListening:()=>{a?.()}}}function Wn(e="auto"){switch(e){case"auto":return yt()?dr():pr();case"browser":return dr();case"memory":return pr();case"hash":return Hn();default:const t=e;throw new Error(`Switch is not exhaustive for mode: ${t}`)}}function gt(e){const t=new URLSearchParams(e);return{get:(...r)=>t.get(...r),getAll:(...r)=>t.getAll(...r),set:(...r)=>{t.set(...r)},append:(...r)=>{t.append(...r)},delete:(...r)=>{t.delete(...r)},toString:(...r)=>t.toString(...r),forEach:(...r)=>{t.forEach(...r)},entries:(...r)=>t.entries(...r),keys:(...r)=>t.keys(...r),values:(...r)=>t.values(...r),has:(...r)=>t.has(...r),size:t.size,sort:()=>{t.sort()},[Symbol.iterator]:()=>t[Symbol.iterator]()}}function Gn(e){const t=a=>{const i=e.find(u=>u.type===a);return f.markRaw(i?.component??Tt(a))},r=a=>{const i=f.markRaw(t(a)),u={id:ut(),component:i,meta:{},state:{}};return{id:u.id,matched:u,matches:[u],hooks:[],name:a,query:gt(""),params:{},state:{},href:"/",hash:""}},n=a=>{if(!a){o.value=null;return}const i=t(a);o.value={type:a,component:i}},o=f.ref(null);return{setRejection:n,rejection:o,getRejectionRoute:r}}class Qn extends Error{constructor(){super("initialUrl must be set if window.location is unavailable")}}function zn(e){if(e)return e;if(yt())return window.location.toString();throw new Qn}function Rr(e){return!!e&&typeof e=="object"}const De=!0;function Yn(e,t,r){if(Rr(e)&&t in e){const n=e[t];return typeof n=="string"?re(n,r,De):n}return re(void 0,r,De)}function yr(e,t){const r={};for(const[n,o]of Object.entries(e)){const a=Yn(t,n,o);r[n]=a}return r}function Xn(e,t,r){if(Rr(e)&&t in e){const n=e[t];return X(n,r,De)}return X(void 0,r,De)}const mr=(e,t)=>{const r={};for(const[n,o]of Object.entries(e)){const a=Xn(t,n,o);r[n]=a}return r};function Kn(){const e=f.reactive(new Map),t=yt()?i():null,r=u=>{e.set(u,!1),t?.observe(u)},n=u=>{e.delete(u),t?.unobserve(u)},o=()=>{t?.disconnect()},a=u=>e.get(u)??!1;function i(){return new IntersectionObserver(u=>{u.forEach(c=>{e.set(c.target,c.isIntersecting)})})}return{observe:r,unobserve:n,disconnect:o,isElementVisible:a}}class eo extends Error{constructor(t){super(`Route not found: "${t}"`)}}function gr(e,t,r){const n=Wr(t.value,r),o=Ot(n),[a]=It(e,new RegExp(o,"g"));return a}function wr(e,t,r,n){const o=Ye(t,r),a=X(n,t.params[r],o);return e.replace(jt(r),a)}function Er({protocol:e,host:t,pathname:r,search:n,searchParams:o,hash:a}){const i=new URL("https://localhost");e&&(i.protocol=e),t&&(i.host=t),r&&(i.pathname=r),o?i.search=new URLSearchParams(o).toString():n&&(i.search=n),a&&(i.hash=a);const u=i.toString().replace(/^https:\/\/localhost\/*/,"/");return st(u)}function to(e,t={}){const{params:r={},query:n}=t,o=no(e.query,r),a=Rt(o,n),i=vr(e.path,r),u=e.hash.value?vr(e.hash,r):t.hash,c=ro(e.host,r),{protocol:h,host:w}=_(c);return Er({protocol:h,host:w,pathname:i,searchParams:a,hash:u})}function ro(e,t){const r=e.value&&!e.value.startsWith("http")?`https://${e.value}`:e.value;return Object.keys(e.params).reduce((n,o)=>wr(n,e,o,t[o]),r)}function vr(e,t){return Object.keys(e.params).reduce((r,n)=>wr(r,e,n,t[n]),e.value)}function no(e,t){const r=new URLSearchParams(e.value);if(!e.value)return r;for(const[n,o]of Array.from(r.entries())){const a=Ke(o);if(!a)continue;const u=Xe(o),c=X(t[a],e.params[a],u),h=t[a]===void 0&&c==="";u&&h?r.delete(n,o):r.set(n,c)}return r}const oo=(e,t)=>{try{wt(e,t)}catch{return!1}return!0},wt=(e,t)=>{const{protocol:r,host:n,pathname:o,search:a,hash:i}=_(t);return{...Et(e.host,`${r}//${n}`),...Et(e.path,o),...ao(e.query,a),...Et(e.hash,i)}};function Et(e,t){const r={},n=decodeURIComponent(t);for(const[o,a]of Object.entries(e.params)){const i=gr(n,e,o),u=Ye(e,o),c=re(i,a,u);r[o]=c}return r}function ao(e,t){const r={},n=new URLSearchParams(e.value),o=new URLSearchParams(t);for(const[a,i]of Array.from(n.entries())){const u=Ke(i);if(!u)continue;const h=Xe(i),w=o.get(a)??void 0,A=re(w,e.params[u],h);r[u]=A}return r}function so(e,t={},r={}){const n=to(e,{params:t,query:r.query,hash:r.hash}),{search:o,hash:a}=_(n);return{id:e.id,matched:e.matched,matches:e.matches,name:e.name,hooks:e.hooks,query:gt(o),params:wt(e,n),state:yr(e.state,r.state),hash:a,href:n}}const io=e=>"name"in e.matched&&!!e.matched.name,uo=(e,t)=>{const{protocol:r,host:n}=_(t),o=!n,a=!e.host.value;return o?a:Jr(e).test(`${r}//${n}`)},co=(e,t)=>{const{pathname:r}=_(t);return Mr(e).test(r)},fo=(e,t)=>{const{search:r}=_(t);return Fr(e).every(o=>o.test(r))},vt=(e,t)=>{const{hash:r}=_(t),{value:n}=e.hash;return G(n)?`#${n.replace(/^#*/,"")}`.toLowerCase()===r.toLowerCase():!0};function po(e){const{searchParams:t,pathname:r}=_(e),n=-1,o=1;return(a,i)=>{const u=Sr(a,t),c=Ar(a,r),h=Sr(i,t),w=Ar(i,r);return a.depth>i.depth?n:a.depth<i.depth?o:u+c>h+w?n:u+c<h+w?o:vt(a,e)?n:vt(i,e)?o:0}}function Ar(e,t){const r=Object.keys(e.path.params).filter(o=>Ye(e.path,o)).map(o=>o),n=r.filter(o=>gr(t,e.path,o)===void 0);return r.length-n.length}function Sr(e,t){const r=new URLSearchParams(t),n=new URLSearchParams(e.query.value),o=Array.from(n.keys()),a=o.filter(i=>!r.has(i));return o.length-a.length}const lo=[io,uo,co,fo,vt,oo];function ho(e,t){const r=po(t);return e.filter(n=>lo.every(o=>o(n,t))).sort(r)}function Ro(e,t,r){const n=ho(e,t);if(!n.length)return;const[o]=n,{searchParams:a,hash:i}=_(t);return{id:o.id,matched:o.matched,matches:o.matches,name:o.name,hooks:o.hooks,query:gt(a),params:wt(o,t),state:yr(o.state,r),hash:i,href:st(t)}}function br(e,t){const r=typeof e=="string"?_(e):e,n=typeof t=="string"?_(t):t,o=r.searchParams??new URLSearchParams(r.search),a=n.searchParams??new URLSearchParams(n.search);return Er({protocol:G(n.protocol)?n.protocol:r.protocol,host:G(n.host)?n.host:r.host,pathname:G(n.pathname)?n.pathname:r.pathname,searchParams:Rt(a,o),hash:G(n.hash)?n.hash:r.hash})}function yo(e,t){return G(t)?e.map(r=>{const n=`${t}${r.path.value}`;return{...r,path:z(n,r.path.params)}}):e}class mo extends Error{constructor(t){super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`)}}function go(e){const t=e.map(({name:r})=>r);for(const r of t)if(Pt(t,r)>1)throw new mo(r)}class wo extends Error{constructor(t){super(`Missing Route Context: Router is missing the route "${t}", which was declared as context for at least one route.`)}}function Eo(e){const t=new Set(e.map(n=>n.id)),r=e.flatMap(n=>n.context).filter(vo);for(const n of r)if(!t.has(n.id))throw new wo(n.name)}function vo(e){return"id"in e}function Ao(e,t=[],r){const n=[...e,...t.map(o=>o.routes)].flat().filter(o=>G(o.name));return go(n),Eo(n),yo(n,r)}function So(e={},t=[]){const r=new K;return D(e.onBeforeRouteEnter??[]).forEach(n=>r.onBeforeRouteEnter.add(n)),D(e.onBeforeRouteUpdate??[]).forEach(n=>r.onBeforeRouteUpdate.add(n)),D(e.onBeforeRouteLeave??[]).forEach(n=>r.onBeforeRouteLeave.add(n)),D(e.onAfterRouteEnter??[]).forEach(n=>r.onAfterRouteEnter.add(n)),D(e.onAfterRouteUpdate??[]).forEach(n=>r.onAfterRouteUpdate.add(n)),D(e.onAfterRouteLeave??[]).forEach(n=>r.onAfterRouteLeave.add(n)),t.forEach(n=>{n.hooks.onBeforeRouteEnter.forEach(o=>r.onBeforeRouteEnter.add(o)),n.hooks.onBeforeRouteUpdate.forEach(o=>r.onBeforeRouteUpdate.add(o)),n.hooks.onBeforeRouteLeave.forEach(o=>r.onBeforeRouteLeave.add(o)),n.hooks.onAfterRouteEnter.forEach(o=>r.onAfterRouteEnter.add(o)),n.hooks.onAfterRouteUpdate.forEach(o=>r.onAfterRouteUpdate.add(o)),n.hooks.onAfterRouteLeave.forEach(o=>r.onAfterRouteLeave.add(o))}),r}function bo(e,{match:t,name:r,component:n}){const o=er(e),a=Ce(e);return f.defineComponent({name:"PropsWrapper",expose:[],setup(){const i=f.getCurrentInstance(),u=o(),c=a();return()=>{const h=u.getProps(t.id,r,c);return h instanceof Error?"":_e(h)?i?.suspense?f.h(Uo,{component:n,props:h}):f.h(Po,{component:n,props:h}):f.h(n,h)}}})}const Po=f.defineComponent(e=>{const t=f.ref();return f.watch(()=>e.props,async r=>{t.value=await r},{immediate:!0,deep:!0}),()=>t.value instanceof Error?"":t.value?f.h(e.component,t.value):""},{props:["component","props"]}),Uo=f.defineComponent(async e=>{const t=f.ref();return t.value=await e.props,f.watch(()=>t.value,async r=>{t.value=await r},{deep:!0}),()=>t.value instanceof Error?"":t.value?f.h(e.component,t.value):""},{props:["component","props"]});function ko(e){const t=new Map;return{getRouteComponents:n=>{const o=t.get(n.id);if(o)return o;const a=Lo(e,n);return t.set(n.id,a),a}}}function Lo(e,t){const r=lt(e);return nt(t)?Pr(e,t,t.components):tt(t)?Pr(e,t,{default:t.component}):{default:r}}function Pr(e,t,r){return Object.fromEntries(Object.entries(r).map(([n,o])=>[n,bo(e,{match:t,name:n,component:o})]))}const Ur=Symbol();function Bo(e,t,r=[]){const o=t?.isGlobalRouter??!0?Ur:Symbol(),a=[...r.flatMap(U=>U.rejections),...t?.rejections??[]],i=Ao(e,r,t?.base),u=gn();u.addGlobalRouteHooks(So(t,r));const c=it(),h=Mn(),w=ko(o),A=Kn(),g=Fn({mode:t?.historyMode,listener:({location:U})=>{const O=fe(U);C(O,{state:U.state,replace:!0})}});function E(U,O={}){return Ro(i,U,O.state)}async function C(U,O={}){const F=c();g.stopListening();const W=E(U,O)??k("NotFound"),j=Fo(F),H=await u.runBeforeRouteHooks({to:W,from:j});switch(H.status){case"ABORT":return;case"PUSH":g.update(U,O),await b(...H.to);return;case"REJECT":g.update(U,O),s(H.type);break;case"SUCCESS":g.update(U,O),s(null);break;default:throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(H)}`)}$(U)||S(F,W,j);const we=await u.runAfterRouteHooks({to:W,from:j});switch(we.status){case"PUSH":await b(...we.to);break;case"REJECT":s(we.type);break;case"SUCCESS":break;default:const de=we;throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(de)}`)}g.startListening()}function S(U,O,F){const W=U;h.setProps(O).then(j=>{if(W===U)switch(j.status){case"SUCCESS":break;case"PUSH":b(...j.to);break;case"REJECT":s(j.type);break;default:const H=j;throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(H)}`)}}).catch(j=>{try{u.runErrorHooks(j,{to:O,from:F,source:"props"})}catch(H){if(H instanceof M){b(...H.response.to);return}if(H instanceof ee){s(H.response.type);return}throw H}}),L(O)}const P=(U,O={},F={})=>{const W=i.find(j=>j.name===U);if(!W)throw new eo(U);return so(W,O,F)},b=(U,O,F)=>{if(J(U)){const de={...O},He=br(U,{searchParams:de.query,hash:de.hash});return C(He,de)}if(typeof U=="string"){const{replace:de,...He}={...F},Go={...O},St=P(U,Go,He),Qo=mr({...St.matched.state},{...St.state,...He.state});return C(St.href,{replace:de,state:Qo})}const{replace:W,...j}={...O},H=mr({...U.matched.state},{...U.state,...j.state}),we=br(U.href,{searchParams:j.query,hash:j.hash});return C(we,{replace:W,state:H})},v=(U,O,F)=>{if(J(U)){const j={...O,replace:!0};return b(U,j)}if(typeof U=="string"){const j={...F,replace:!0},H={...O};return b(U,H,j)}const W={...O,replace:!0};return b(U,W)},p=U=>{s(U)},{setRejection:s,rejection:l,getRejectionRoute:k}=Gn(a),y=k("NotFound"),{currentRoute:d,routerRoute:R,updateRoute:L}=$n(o,y,b),N=zn(t?.initialUrl),V=g.location.state,{host:x}=_(N),$=_n(x);let T=!1;const Pe=f.ref(!1),{promise:At,resolve:Jo}=Promise.withResolvers();async function kr(){if(T)return At;T=!0,Or(i)&&await jr(),await C(N,{replace:!0,state:V}),g.startListening(),Jo(),Pe.value=!0}function Mo(){g.stopListening()}function Fo(U){return sn(U)?null:{...d}}function Wo(U){u.setVueApp(U),h.setVueApp(U);const O=lt(o),F=sr(o);U.component("RouterView",O),U.component("RouterLink",F),U.provide(Yt(o),l),U.provide(Ft(o),u),U.provide(Kt(o),h),U.provide(zt(o),w),U.provide(nr,A),U.provide(o,Lr),kr()}const Lr={route:R,resolve:P,find:E,push:b,replace:v,reject:p,refresh:g.refresh,forward:g.forward,back:g.back,go:g.go,install:Wo,isExternal:$,onBeforeRouteEnter:u.onBeforeRouteEnter,onBeforeRouteUpdate:u.onBeforeRouteUpdate,onBeforeRouteLeave:u.onBeforeRouteLeave,onAfterRouteEnter:u.onAfterRouteEnter,onAfterRouteUpdate:u.onAfterRouteUpdate,onAfterRouteLeave:u.onAfterRouteLeave,onError:u.onError,prefetch:t?.prefetch,start:kr,started:Pe,stop:Mo,key:o};return Lr}const No=z,Vo=z,Co=z,Q=ir(Ur),xo=Q.onBeforeRouteLeave,Zo=Q.onBeforeRouteUpdate,Oo=Q.onAfterRouteLeave,jo=Q.onAfterRouteUpdate,Io=Q.isRoute,Do=Q.RouterView,Ho=Q.RouterLink,$o=Q.useRoute,qo=Q.useRouter,To=Q.useQueryValue,_o=Q.useLink;B.DuplicateParamsError=bt,B.MetaPropertyConflict=Ht,B.RouterLink=Ho,B.RouterNotInstalledError=oe,B.RouterView=Do,B.UseRouteInvalidError=$t,B.arrayOf=On,B.asUrl=st,B.combineRoutes=at,B.createExternalRoute=cn,B.createParam=kt,B.createRejection=un,B.createRoute=ae,B.createRouter=Bo,B.createRouterAssets=ir,B.createRouterPlugin=xn,B.host=Vo,B.isRoute=Io,B.isUrl=J,B.isWithComponent=tt,B.isWithComponentProps=rt,B.isWithComponentPropsRecord=ot,B.isWithComponents=nt,B.isWithParent=et,B.onAfterRouteLeave=Oo,B.onAfterRouteUpdate=jo,B.onBeforeRouteLeave=xo,B.onBeforeRouteUpdate=Zo,B.path=No,B.query=Co,B.tupleOf=In,B.unionOf=cr,B.useLink=_o,B.useQueryValue=To,B.useRoute=$o,B.useRouter=qo,B.withDefault=Cr,B.withParams=z,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})}));
4
+ `)}return p}function g(S,P,b){return[S,P,b.id,JSON.stringify(b.params)].join("-")}function E(S){return rt(S)?[{id:S.id,name:"default",props:S.props}]:ot(S)?Object.entries(S.props).map(([P,b])=>({id:S.id,name:P,props:b})):[]}function C(S){for(const P of r.keys())S.includes(P)||r.delete(P)}return{getPrefetchProps:i,setPrefetchProps:u,getProps:h,setProps:c,setVueApp:e}}function Wn({mode:e,listener:t}){const r=Gn(e),n=(c,h)=>{if(h?.replace){r.replace(c,h.state);return}r.push(c,h?.state)},o=()=>{const c=fe(r.location);r.replace(c)};let a;return{...r,update:n,refresh:o,startListening:()=>{a?.(),a=r.listen(t)},stopListening:()=>{a?.()}}}function Gn(e="auto"){switch(e){case"auto":return yt()?dr():pr();case"browser":return dr();case"memory":return pr();case"hash":return $n();default:const t=e;throw new Error(`Switch is not exhaustive for mode: ${t}`)}}function gt(e){const t=new URLSearchParams(e);return{get:(...r)=>t.get(...r),getAll:(...r)=>t.getAll(...r),set:(...r)=>{t.set(...r)},append:(...r)=>{t.append(...r)},delete:(...r)=>{t.delete(...r)},toString:(...r)=>t.toString(...r),forEach:(...r)=>{t.forEach(...r)},entries:(...r)=>t.entries(...r),keys:(...r)=>t.keys(...r),values:(...r)=>t.values(...r),has:(...r)=>t.has(...r),size:t.size,sort:()=>{t.sort()},[Symbol.iterator]:()=>t[Symbol.iterator]()}}function Qn(e){const t=a=>{const i=e.find(u=>u.type===a);return f.markRaw(i?.component??Tt(a))},r=a=>{const i=f.markRaw(t(a)),u={id:ut(),component:i,meta:{},state:{}};return{id:u.id,matched:u,matches:[u],hooks:[],name:a,query:gt(""),params:{},state:{},href:"/",hash:""}},n=a=>{if(!a){o.value=null;return}const i=t(a);o.value={type:a,component:i}},o=f.ref(null);return{setRejection:n,rejection:o,getRejectionRoute:r}}class zn extends Error{constructor(){super("initialUrl must be set if window.location is unavailable")}}function Yn(e){if(e)return e;if(yt())return window.location.toString();throw new zn}function Rr(e){return!!e&&typeof e=="object"}const De=!0;function Xn(e,t,r){if(Rr(e)&&t in e){const n=e[t];return typeof n=="string"?re(n,r,De):n}return re(void 0,r,De)}function yr(e,t){const r={};for(const[n,o]of Object.entries(e)){const a=Xn(t,n,o);r[n]=a}return r}function Kn(e,t,r){if(Rr(e)&&t in e){const n=e[t];return X(n,r,De)}return X(void 0,r,De)}const mr=(e,t)=>{const r={};for(const[n,o]of Object.entries(e)){const a=Kn(t,n,o);r[n]=a}return r};function eo(){const e=f.reactive(new Map),t=yt()?i():null,r=u=>{e.set(u,!1),t?.observe(u)},n=u=>{e.delete(u),t?.unobserve(u)},o=()=>{t?.disconnect()},a=u=>e.get(u)??!1;function i(){return new IntersectionObserver(u=>{u.forEach(c=>{e.set(c.target,c.isIntersecting)})})}return{observe:r,unobserve:n,disconnect:o,isElementVisible:a}}class to extends Error{constructor(t){super(`Route not found: "${t}"`)}}function gr(e,t,r){const n=Gr(t.value,r),o=Ot(n),[a]=It(e,new RegExp(o,"g"));return a}function wr(e,t,r,n){const o=Ye(t,r),a=X(n,t.params[r],o);return e.replace(jt(r),a)}function Er({protocol:e,host:t,pathname:r,search:n,searchParams:o,hash:a}){const i=new URL("https://localhost");e&&(i.protocol=e),t&&(i.host=t),r&&(i.pathname=r),o?i.search=new URLSearchParams(o).toString():n&&(i.search=n),a&&(i.hash=a);const u=i.toString().replace(/^https:\/\/localhost\/*/,"/");return st(u)}function ro(e,t={}){const{params:r={},query:n}=t,o=oo(e.query,r),a=Rt(o,n),i=vr(e.path,r),u=e.hash.value?vr(e.hash,r):t.hash,c=no(e.host,r),{protocol:h,host:w}=_(c);return Er({protocol:h,host:w,pathname:i,searchParams:a,hash:u})}function no(e,t){const r=e.value&&!e.value.startsWith("http")?`https://${e.value}`:e.value;return Object.keys(e.params).reduce((n,o)=>wr(n,e,o,t[o]),r)}function vr(e,t){return Object.keys(e.params).reduce((r,n)=>wr(r,e,n,t[n]),e.value)}function oo(e,t){const r=new URLSearchParams(e.value);if(!e.value)return r;for(const[n,o]of Array.from(r.entries())){const a=Ke(o);if(!a)continue;const u=Xe(o),c=X(t[a],e.params[a],u),h=t[a]===void 0&&c==="";u&&h?r.delete(n,o):r.set(n,c)}return r}const ao=(e,t)=>{try{wt(e,t)}catch{return!1}return!0},wt=(e,t)=>{const{protocol:r,host:n,pathname:o,search:a,hash:i}=_(t);return{...Et(e.host,`${r}//${n}`),...Et(e.path,o),...so(e.query,a),...Et(e.hash,i)}};function Et(e,t){const r={},n=decodeURIComponent(t);for(const[o,a]of Object.entries(e.params)){const i=gr(n,e,o),u=Ye(e,o),c=re(i,a,u);r[o]=c}return r}function so(e,t){const r={},n=new URLSearchParams(e.value),o=new URLSearchParams(t);for(const[a,i]of Array.from(n.entries())){const u=Ke(i);if(!u)continue;const h=Xe(i),w=o.get(a)??void 0,A=re(w,e.params[u],h);r[u]=A}return r}function io(e,t={},r={}){const n=ro(e,{params:t,query:r.query,hash:r.hash}),{search:o,hash:a}=_(n);return{id:e.id,matched:e.matched,matches:e.matches,name:e.name,hooks:e.hooks,query:gt(o),params:wt(e,n),state:yr(e.state,r.state),hash:a,href:n}}const uo=e=>"name"in e.matched&&!!e.matched.name,Ar=(e,t)=>{const{protocol:r,host:n}=_(t),o=!n;return e.host.value?Mr(e).test(`${r}//${n}`):o},co=(e,t)=>{const{pathname:r}=_(t);return Fr(e).test(r)},fo=(e,t)=>{const{search:r}=_(t);return Wr(e).every(o=>o.test(r))},vt=(e,t)=>{const{hash:r}=_(t),{value:n}=e.hash;return G(n)?`#${n.replace(/^#*/,"")}`.toLowerCase()===r.toLowerCase():!0};function po(e){const{searchParams:t,pathname:r}=_(e),n=-1,o=1;return(a,i)=>{const u=br(a,t),c=Sr(a,r),h=br(i,t),w=Sr(i,r);return a.depth>i.depth?n:a.depth<i.depth?o:u+c>h+w?n:u+c<h+w?o:Ar(a,e)?n:Ar(i,e)?o:vt(a,e)?n:vt(i,e)?o:0}}function Sr(e,t){const r=Object.keys(e.path.params).filter(o=>Ye(e.path,o)).map(o=>o),n=r.filter(o=>gr(t,e.path,o)===void 0);return r.length-n.length}function br(e,t){const r=new URLSearchParams(t),n=new URLSearchParams(e.query.value),o=Array.from(n.keys()),a=o.filter(i=>!r.has(i));return o.length-a.length}const lo=[uo,co,fo,vt,ao];function ho(e,t){const r=po(t);return e.filter(n=>lo.every(o=>o(n,t))).sort(r)}function Ro(e,t,r){const n=ho(e,t);if(!n.length)return;const[o]=n,{searchParams:a,hash:i}=_(t);return{id:o.id,matched:o.matched,matches:o.matches,name:o.name,hooks:o.hooks,query:gt(a),params:wt(o,t),state:yr(o.state,r),hash:i,href:st(t)}}function Pr(e,t){const r=typeof e=="string"?_(e):e,n=typeof t=="string"?_(t):t,o=r.searchParams??new URLSearchParams(r.search),a=n.searchParams??new URLSearchParams(n.search);return Er({protocol:G(n.protocol)?n.protocol:r.protocol,host:G(n.host)?n.host:r.host,pathname:G(n.pathname)?n.pathname:r.pathname,searchParams:Rt(a,o),hash:G(n.hash)?n.hash:r.hash})}function yo(e,t){return G(t)?e.map(r=>{const n=`${t}${r.path.value}`;return{...r,path:z(n,r.path.params)}}):e}class mo extends Error{constructor(t){super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`)}}function go(e){const t=e.map(({name:r})=>r);for(const r of t)if(Pt(t,r)>1)throw new mo(r)}class wo extends Error{constructor(t){super(`Missing Route Context: Router is missing the route "${t}", which was declared as context for at least one route.`)}}function Eo(e){const t=new Set(e.map(n=>n.id)),r=e.flatMap(n=>n.context).filter(vo);for(const n of r)if(!t.has(n.id))throw new wo(n.name)}function vo(e){return"id"in e}function Ao(e,t=[],r){const n=[...e,...t.map(o=>o.routes)].flat().filter(o=>G(o.name));return go(n),Eo(n),yo(n,r)}function So(e={},t=[]){const r=new K;return D(e.onBeforeRouteEnter??[]).forEach(n=>r.onBeforeRouteEnter.add(n)),D(e.onBeforeRouteUpdate??[]).forEach(n=>r.onBeforeRouteUpdate.add(n)),D(e.onBeforeRouteLeave??[]).forEach(n=>r.onBeforeRouteLeave.add(n)),D(e.onAfterRouteEnter??[]).forEach(n=>r.onAfterRouteEnter.add(n)),D(e.onAfterRouteUpdate??[]).forEach(n=>r.onAfterRouteUpdate.add(n)),D(e.onAfterRouteLeave??[]).forEach(n=>r.onAfterRouteLeave.add(n)),t.forEach(n=>{n.hooks.onBeforeRouteEnter.forEach(o=>r.onBeforeRouteEnter.add(o)),n.hooks.onBeforeRouteUpdate.forEach(o=>r.onBeforeRouteUpdate.add(o)),n.hooks.onBeforeRouteLeave.forEach(o=>r.onBeforeRouteLeave.add(o)),n.hooks.onAfterRouteEnter.forEach(o=>r.onAfterRouteEnter.add(o)),n.hooks.onAfterRouteUpdate.forEach(o=>r.onAfterRouteUpdate.add(o)),n.hooks.onAfterRouteLeave.forEach(o=>r.onAfterRouteLeave.add(o))}),r}function bo(e,{match:t,name:r,component:n}){const o=er(e),a=Ce(e);return f.defineComponent({name:"PropsWrapper",expose:[],setup(){const i=f.getCurrentInstance(),u=o(),c=a();return()=>{const h=u.getProps(t.id,r,c);return h instanceof Error?"":_e(h)?i?.suspense?f.h(Uo,{component:n,props:h}):f.h(Po,{component:n,props:h}):f.h(n,h)}}})}const Po=f.defineComponent(e=>{const t=f.ref();return f.watch(()=>e.props,async r=>{t.value=await r},{immediate:!0,deep:!0}),()=>t.value instanceof Error?"":t.value?f.h(e.component,t.value):""},{props:["component","props"]}),Uo=f.defineComponent(async e=>{const t=f.ref();return t.value=await e.props,f.watch(()=>t.value,async r=>{t.value=await r},{deep:!0}),()=>t.value instanceof Error?"":t.value?f.h(e.component,t.value):""},{props:["component","props"]});function ko(e){const t=new Map;return{getRouteComponents:n=>{const o=t.get(n.id);if(o)return o;const a=Lo(e,n);return t.set(n.id,a),a}}}function Lo(e,t){const r=lt(e);return nt(t)?Ur(e,t,t.components):tt(t)?Ur(e,t,{default:t.component}):{default:r}}function Ur(e,t,r){return Object.fromEntries(Object.entries(r).map(([n,o])=>[n,bo(e,{match:t,name:n,component:o})]))}const kr=Symbol();function Bo(e,t,r=[]){const o=t?.isGlobalRouter??!0?kr:Symbol(),a=[...r.flatMap(U=>U.rejections),...t?.rejections??[]],i=Ao(e,r,t?.base),u=wn();u.addGlobalRouteHooks(So(t,r));const c=it(),h=Fn(),w=ko(o),A=eo(),g=Wn({mode:t?.historyMode,listener:({location:U})=>{const O=fe(U);C(O,{state:U.state,replace:!0})}});function E(U,O={}){return Ro(i,U,O.state)}async function C(U,O={}){const F=c();g.stopListening();const W=E(U,O)??k("NotFound"),j=Fo(F),H=await u.runBeforeRouteHooks({to:W,from:j});switch(H.status){case"ABORT":return;case"PUSH":g.update(U,O),await b(...H.to);return;case"REJECT":g.update(U,O),s(H.type);break;case"SUCCESS":g.update(U,O),s(null);break;default:throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(H)}`)}$(U)||S(F,W,j);const we=await u.runAfterRouteHooks({to:W,from:j});switch(we.status){case"PUSH":await b(...we.to);break;case"REJECT":s(we.type);break;case"SUCCESS":break;default:const de=we;throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(de)}`)}g.startListening()}function S(U,O,F){const W=U;h.setProps(O).then(j=>{if(W===U)switch(j.status){case"SUCCESS":break;case"PUSH":b(...j.to);break;case"REJECT":s(j.type);break;default:const H=j;throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(H)}`)}}).catch(j=>{try{u.runErrorHooks(j,{to:O,from:F,source:"props"})}catch(H){if(H instanceof M){b(...H.response.to);return}if(H instanceof ee){s(H.response.type);return}throw H}}),L(O)}const P=(U,O={},F={})=>{const W=i.find(j=>j.name===U);if(!W)throw new to(U);return io(W,O,F)},b=(U,O,F)=>{if(J(U)){const de={...O},He=Pr(U,{searchParams:de.query,hash:de.hash});return C(He,de)}if(typeof U=="string"){const{replace:de,...He}={...F},Go={...O},St=P(U,Go,He),Qo=mr({...St.matched.state},{...St.state,...He.state});return C(St.href,{replace:de,state:Qo})}const{replace:W,...j}={...O},H=mr({...U.matched.state},{...U.state,...j.state}),we=Pr(U.href,{searchParams:j.query,hash:j.hash});return C(we,{replace:W,state:H})},v=(U,O,F)=>{if(J(U)){const j={...O,replace:!0};return b(U,j)}if(typeof U=="string"){const j={...F,replace:!0},H={...O};return b(U,H,j)}const W={...O,replace:!0};return b(U,W)},p=U=>{s(U)},{setRejection:s,rejection:l,getRejectionRoute:k}=Qn(a),y=k("NotFound"),{currentRoute:d,routerRoute:R,updateRoute:L}=qn(o,y,b),N=Yn(t?.initialUrl),V=g.location.state,{host:x}=_(N),$=Jn(x);let T=!1;const Pe=f.ref(!1),{promise:At,resolve:Jo}=Promise.withResolvers();async function Lr(){if(T)return At;T=!0,jr(i)&&await Ir(),await C(N,{replace:!0,state:V}),g.startListening(),Jo(),Pe.value=!0}function Mo(){g.stopListening()}function Fo(U){return un(U)?null:{...d}}function Wo(U){u.setVueApp(U),h.setVueApp(U);const O=lt(o),F=sr(o);U.component("RouterView",O),U.component("RouterLink",F),U.provide(Yt(o),l),U.provide(Ft(o),u),U.provide(Kt(o),h),U.provide(zt(o),w),U.provide(nr,A),U.provide(o,Br),Lr()}const Br={route:R,resolve:P,find:E,push:b,replace:v,reject:p,refresh:g.refresh,forward:g.forward,back:g.back,go:g.go,install:Wo,isExternal:$,onBeforeRouteEnter:u.onBeforeRouteEnter,onBeforeRouteUpdate:u.onBeforeRouteUpdate,onBeforeRouteLeave:u.onBeforeRouteLeave,onAfterRouteEnter:u.onAfterRouteEnter,onAfterRouteUpdate:u.onAfterRouteUpdate,onAfterRouteLeave:u.onAfterRouteLeave,onError:u.onError,prefetch:t?.prefetch,start:Lr,started:Pe,stop:Mo,key:o};return Br}const No=z,Vo=z,Co=z,Q=ir(kr),xo=Q.onBeforeRouteLeave,Zo=Q.onBeforeRouteUpdate,Oo=Q.onAfterRouteLeave,jo=Q.onAfterRouteUpdate,Io=Q.isRoute,Do=Q.RouterView,Ho=Q.RouterLink,$o=Q.useRoute,qo=Q.useRouter,To=Q.useQueryValue,_o=Q.useLink;B.DuplicateParamsError=bt,B.MetaPropertyConflict=Ht,B.RouterLink=Ho,B.RouterNotInstalledError=oe,B.RouterView=Do,B.UseRouteInvalidError=$t,B.arrayOf=jn,B.asUrl=st,B.combineRoutes=at,B.createExternalRoute=fn,B.createParam=kt,B.createRejection=cn,B.createRoute=ae,B.createRouter=Bo,B.createRouterAssets=ir,B.createRouterPlugin=Zn,B.host=Vo,B.isRoute=Io,B.isUrl=J,B.isWithComponent=tt,B.isWithComponentProps=rt,B.isWithComponentPropsRecord=ot,B.isWithComponents=nt,B.isWithParent=et,B.onAfterRouteLeave=Oo,B.onAfterRouteUpdate=jo,B.onBeforeRouteLeave=xo,B.onBeforeRouteUpdate=Zo,B.path=No,B.query=Co,B.tupleOf=Dn,B.unionOf=cr,B.useLink=_o,B.useQueryValue=To,B.useRoute=$o,B.useRouter=qo,B.withDefault=xr,B.withParams=z,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kitbag/router",
3
3
  "private": false,
4
- "version": "0.20.11",
4
+ "version": "0.20.12",
5
5
  "bugs": {
6
6
  "url": "https://github.com/kitbagjs/router/issues"
7
7
  },