@kitbag/router 0.21.0 → 0.22.0
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.
- package/README.md +9 -0
- package/dist/components/routerLink.d.ts +3 -3
- package/dist/compositions/useLink.d.ts +2 -2
- package/dist/devtools/createRouterDevtools.d.ts +13 -0
- package/dist/devtools/filters.d.ts +12 -0
- package/dist/devtools/getDevtoolsLabel.d.ts +13 -0
- package/dist/devtools/types.d.ts +10 -0
- package/dist/errors/invalidRouteRedirectError.d.ts +11 -0
- package/dist/errors/multipleRouteRedirectsError.d.ts +13 -0
- package/dist/kitbag-router.js +5256 -2004
- package/dist/kitbag-router.umd.cjs +3 -3
- package/dist/main.d.ts +1 -1
- package/dist/models/hooks.d.ts +9 -7
- package/dist/services/createComponentHooks.d.ts +5 -5
- package/dist/services/createExternalRoute.d.ts +3 -2
- package/dist/services/createRoute.d.ts +2 -1
- package/dist/services/createRouteHooks.d.ts +17 -0
- package/dist/services/createRouteRedirects.d.ts +10 -0
- package/dist/services/createRouterAssets.d.ts +5 -5
- package/dist/services/createRouterHooks.d.ts +8 -9
- package/dist/services/insertBaseRoute.d.ts +2 -2
- package/dist/services/routeMatchRules.d.ts +0 -1
- package/dist/services/routeMatchScore.d.ts +1 -1
- package/dist/services/routeRegex.d.ts +1 -0
- package/dist/services/urlAssembly.d.ts +2 -2
- package/dist/services/urlCombine.d.ts +2 -3
- package/dist/services/urlCreator.d.ts +2 -3
- package/dist/services/urlParser.d.ts +1 -1
- package/dist/types/hooks.d.ts +56 -28
- package/dist/types/params.d.ts +5 -11
- package/dist/types/redirects.d.ts +40 -0
- package/dist/types/resolved.d.ts +12 -2
- package/dist/types/route.d.ts +0 -2
- package/dist/types/router.d.ts +12 -7
- package/dist/types/routerLink.d.ts +3 -3
- package/dist/types/routerPush.d.ts +2 -2
- package/dist/types/routerReplace.d.ts +2 -2
- package/dist/types/urlString.d.ts +23 -0
- package/dist/types/useLink.d.ts +2 -2
- package/dist/utilities/checkDuplicateParams.spec.d.ts +1 -0
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/isNamedRoute.d.ts +4 -0
- package/dist/utilities/makeOptional.d.ts +0 -1
- package/dist/utilities/testHelpers.d.ts +450 -18
- package/package.json +7 -7
- package/dist/errors/missingRouteContextError.d.ts +0 -10
- package/dist/services/createHooksFactory.d.ts +0 -15
- package/dist/services/createUrlParts.d.ts +0 -13
- package/dist/types/url.d.ts +0 -14
- package/dist/types/urlParts.d.ts +0 -53
- package/dist/utilities/checkMissingContext.d.ts +0 -2
- /package/dist/{utilities/checkDuplicateKeys.spec.d.ts → services/createRouteRedirects.spec.d.ts} +0 -0
- /package/dist/{utilities/checkMissingContext.spec copy.d.ts → types/redirects.spec-d.d.ts} +0 -0
- /package/dist/utilities/{checkDuplicateKeys.d.ts → checkDuplicateParams.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(V,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],p):(V=typeof globalThis<"u"?globalThis:V||self,p(V["@kitbag/router"]={},V.Vue))})(this,(function(V,p){"use strict";class be extends Error{constructor(e){super(`Invalid Param "${e}": Router does not support multiple params by the same name. All param names must be unique.`)}}function ve(t,e){return t.filter(r=>e===r).length}function ct(...t){const e=t.flatMap(r=>Array.isArray(r)?r:Object.keys(r));for(const r of e)if(ve(e,r)>1)throw new be(r)}class G extends Error{}const yt="[",kt="]";function Vr(t){return t!==String&&t!==Boolean&&t!==Number&&t!==Date}function Br(t){return typeof t=="function"&&Vr(t)}function Ut(t){return typeof t=="object"&&"get"in t&&typeof t.get=="function"&&"set"in t&&typeof t.set=="function"}function Ae(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"}function ke(t,e){return Ut(t)?{...t,defaultValue:e??t.defaultValue}:{get:r=>X(r,t),set:r=>Q(r,t),defaultValue:e}}function Cr(t){return Ut(t)&&t.defaultValue!==void 0}function Nr(t,e){return ke(t,e)}function xr(t){return t!==void 0}function ut(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function _(t){return typeof t=="string"&&t.length>0}let w=null;async function Zr(){const{ZodType:t,ZodString:e,ZodIPv4:r,ZodIPv6:n,ZodCIDRv4:o,ZodCIDRv6:s,ZodURL:a,ZodEmail:i,ZodUUID:u,ZodBase64:y,ZodCUID:E,ZodCUID2:h,ZodULID:c,ZodJWT:d,ZodBigInt:m,ZodNaN:k,ZodBoolean:U,ZodDate:v,ZodISODateTime:g,ZodISODate:l,ZodISOTime:f,ZodNumber:S,ZodLiteral:L,ZodObject:P,ZodEnum:R,ZodArray:b,ZodTuple:B,ZodUnion:C,ZodDiscriminatedUnion:Z,ZodRecord:I,ZodMap:$,ZodSet:q,ZodIntersection:At,ZodPromise:Se}=await import("zod");return{ZodType:t,ZodString:e,ZodIPv4:r,ZodIPv6:n,ZodCIDRv4:o,ZodCIDRv6:s,ZodURL:a,ZodEmail:i,ZodUUID:u,ZodBase64:y,ZodCUID:E,ZodCUID2:h,ZodULID:c,ZodJWT:d,ZodBigInt:m,ZodNaN:k,ZodBoolean:U,ZodDate:v,ZodISODateTime:g,ZodISODate:l,ZodISOTime:f,ZodNumber:S,ZodLiteral:L,ZodObject:P,ZodEnum:R,ZodArray:b,ZodTuple:B,ZodUnion:C,ZodDiscriminatedUnion:Z,ZodRecord:I,ZodMap:$,ZodSet:q,ZodIntersection:At,ZodPromise:Se}}function Or(t){return Object.values(t).some(e=>Object.values(e.host.params).some(r=>qt(r))||Object.values(e.path.params).some(r=>qt(r))||Object.values(e.query.params).some(r=>qt(r)))}function qt(t){return ut(t)&&"parse"in t&&typeof t.parse=="function"&&"~standard"in t&&ut(t["~standard"])&&"vendor"in t["~standard"]&&t["~standard"].vendor==="zod"}async function jr(){try{w=await Zr()}catch{throw new Error("Failed to initialize Zod")}}function Ue(t){return w?t instanceof w.ZodType:!1}function Le(t){return{get:(e,{invalid:r})=>{try{return Tt(e,t)}catch{throw r()}},set:(e,{invalid:r})=>{try{return Jt(e,t)}catch{throw r()}}}}const Ir=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function ft(t,e){if(typeof e=="string"&&Ir.test(e)){const r=new Date(e);return isNaN(r.getTime())?e:r}return e}function mt(t){for(const e of t)try{return e()}catch{continue}throw new Error("All functions failed")}function Lt(t,e){return w?.ZodString&&t instanceof w.ZodString?1:w?.ZodString&&e instanceof w.ZodString?-1:0}function Tt(t,e){if(!w)throw new Error("Zod is not initialized");if(e instanceof w.ZodString)return e.parse(t);if(e instanceof w.ZodBoolean)return e.parse(!!t);if(e instanceof w.ZodDate)return e.parse(new Date(t));if(e instanceof w.ZodNumber)return e.parse(Number(t));if(e instanceof w.ZodBigInt)return e.parse(BigInt(t));if(e instanceof w.ZodNaN)return e.parse(Number(t));if(e instanceof w.ZodLiteral)return mt([()=>e.parse(Number(t)),()=>e.parse(!!t),()=>e.parse(t)]);if(e instanceof w.ZodObject)return e.parse(JSON.parse(t,ft));if(e instanceof w.ZodEnum)return e.parse(t);if(e instanceof w.ZodArray||e instanceof w.ZodTuple)return e.parse(JSON.parse(t,ft));if(e instanceof w.ZodUnion){const r=Array.from(e.def.options).sort(Lt).map(n=>()=>Tt(t,n));return mt(r)}if(e instanceof w.ZodDiscriminatedUnion){const r=Array.from(e.options).sort(Lt).map(n=>()=>Tt(t,n));return mt(r)}if(e instanceof w.ZodRecord)return e.parse(JSON.parse(t,ft));if(e instanceof w.ZodMap)return e.parse(new Map(JSON.parse(t,ft)));if(e instanceof w.ZodSet)return e.parse(new Set(JSON.parse(t,ft)));if(e instanceof w.ZodIntersection)throw new Error("Intersection schemas are not supported");if(e instanceof w.ZodPromise)throw new Error("Promise schemas are not supported");return e.parse(t)}function Jt(t,e){if(!w)throw new Error("Zod is not initialized");if(e instanceof w.ZodString||e instanceof w.ZodISODateTime||e instanceof w.ZodISODate||e instanceof w.ZodISOTime||e instanceof w.ZodIPv4||e instanceof w.ZodIPv6||e instanceof w.ZodCIDRv4||e instanceof w.ZodCIDRv6||e instanceof w.ZodURL||e instanceof w.ZodEmail||e instanceof w.ZodUUID||e instanceof w.ZodBase64||e instanceof w.ZodCUID||e instanceof w.ZodCUID2||e instanceof w.ZodULID||e instanceof w.ZodJWT)return e.parse(t);if(e instanceof w.ZodBoolean)return e.parse(t).toString();if(e instanceof w.ZodDate)return e.parse(t).toISOString();if(e instanceof w.ZodNumber)return e.parse(Number(t)).toString();if(e instanceof w.ZodBigInt)return e.parse(BigInt(String(t))).toString();if(e instanceof w.ZodNaN)return e.parse(t).toString();if(e instanceof w.ZodLiteral){const r=e.parse(t);return r!=null?r.toString():String(r)}if(e instanceof w.ZodObject)return JSON.stringify(e.parse(t));if(e instanceof w.ZodEnum){const r=e.parse(t);return typeof r=="string"?r:String(r)}if(e instanceof w.ZodArray||e instanceof w.ZodTuple)return JSON.stringify(e.parse(t));if(e instanceof w.ZodUnion){const r=Array.from(e.def.options).sort(Lt).map(n=>()=>Jt(t,n));return mt(r)}if(e instanceof w.ZodDiscriminatedUnion){const r=Array.from(e.options).sort(Lt).map(n=>()=>Jt(t,n));return mt(r)}if(e instanceof w.ZodRecord)return JSON.stringify(e.parse(t));if(e instanceof w.ZodMap){const r=e.parse(t);return JSON.stringify(Array.from(r.entries()))}if(e instanceof w.ZodSet){const r=e.parse(t);return JSON.stringify(Array.from(r.values()))}if(e instanceof w.ZodIntersection)throw new Error("Intersection schemas are not supported");if(e instanceof w.ZodPromise)throw new Error("Promise schemas are not supported");return JSON.stringify(e.parse(t))}function Mt(t){return typeof t=="object"&&t!==null&&"then"in t}function N(t,e){const r=t["~standard"].validate(e);if(Mt(r))throw new Error("Promise schemas are not supported");if(r.issues)throw new Error("Validation failed");return r.value}function Hr(t){return ut(t)&&"type"in t&&typeof t.type=="string"&&"~standard"in t&&ut(t["~standard"])&&"vendor"in t["~standard"]&&t["~standard"].vendor==="valibot"}function Ve(t){return Hr(t)}function Be(t){return{get:(e,{invalid:r})=>{try{return _t(e,t)}catch{throw r()}},set:(e,{invalid:r})=>{try{return Ft(e,t)}catch{throw r()}}}}const $r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function pt(t,e){if(typeof e=="string"&&$r.test(e)){const r=new Date(e);return isNaN(r.getTime())?e:r}return e}function dt(t){for(const e of t)try{return e()}catch{continue}throw new Error("All functions failed")}function Vt(t,e){return t.type==="string"?1:e.type==="string"?-1:0}function _t(t,e){if(e.type==="boolean")return N(e,!!t);if(e.type==="date")return N(e,new Date(t));if(e.type==="number")return N(e,Number(t));if(e.type==="literal")return dt([()=>N(e,Number(t)),()=>N(e,!!t),()=>N(e,t)]);if(e.type==="object")return N(e,JSON.parse(t,pt));if(e.type==="enum")return dt([()=>N(e,Number(t)),()=>N(e,!!t),()=>N(e,t)]);if(e.type==="array"||e.type==="tuple")return N(e,JSON.parse(t,pt));if(e.type==="union"&&"options"in e){const r=e.options.sort(Vt).map(n=>()=>_t(t,n));return dt(r)}if(e.type==="variant"&&"options"in e){const r=e.options.sort(Vt).map(n=>()=>_t(t,n));return dt(r)}if(e.type==="record")return N(e,JSON.parse(t,pt));if(e.type==="map")return N(e,new Map(JSON.parse(t,pt)));if(e.type==="set")return N(e,new Set(JSON.parse(t,pt)));if(e.type==="intersection")throw new Error("Intersection schemas are not supported");if(e.type==="promise")throw new Error("Promise schemas are not supported");if(e.type==="function")throw new Error("Function schemas are not supported");return N(e,t)}function Ft(t,e){if(e.type==="string"||e.type==="boolean")return N(e,t).toString();if(e.type==="date")return N(e,t).toISOString();if(e.type==="number")return N(e,Number(t)).toString();if(e.type==="literal")return N(e,t).toString();if(e.type==="object")return JSON.stringify(N(e,t));if(e.type==="enum"||e.type==="nativeEnum")return N(e,t).toString();if(e.type==="array"||e.type==="tuple")return JSON.stringify(N(e,t));if(e.type==="union"&&"options"in e){const r=e.options.sort(Vt).map(n=>()=>Ft(t,n));return dt(r)}if(e.type==="variant"&&"options"in e){const r=e.options.sort(Vt).map(n=>()=>Ft(t,n));return dt(r)}if(e.type==="record")return JSON.stringify(N(e,t));if(e.type==="map"){const r=N(e,t);return JSON.stringify(Array.from(r.entries()))}if(e.type==="set"){const r=N(e,t);return JSON.stringify(Array.from(r.values()))}if(e.type==="intersection")throw new Error("Intersection schemas are not supported");if(e.type==="promise")throw new Error("Promise schemas are not supported");if(e.type==="function")throw new Error("Function schemas are not supported");return JSON.stringify(N(e,t))}function Dr(t,e){return t[e]??String}const j={invalid:t=>{throw new G(t)}},Ce={get:t=>t,set:(t,{invalid:e})=>{if(typeof t!="string")throw e();return t}},Wt={get:(t,{invalid:e})=>{if(t==="true")return!0;if(t==="false")return!1;throw e()},set:(t,{invalid:e})=>{if(typeof t!="boolean")throw e();return t.toString()}},Gt={get:(t,{invalid:e})=>{const r=Number(t);if(isNaN(r))throw e();return r},set:(t,{invalid:e})=>{if(typeof t!="number")throw e();return t.toString()}},Ne={get:(t,{invalid:e})=>{const r=new Date(t);if(isNaN(r.getTime()))throw e();return r},set:(t,{invalid:e})=>{if(typeof t!="object"||!(t instanceof Date))throw e();return t.toISOString()}},xe={get:(t,{invalid:e})=>{try{return JSON.parse(t)}catch{throw e()}},set:(t,{invalid:e})=>{try{return JSON.stringify(t)}catch{throw e()}}};function qr(t,e){switch(typeof e){case"string":return Ce.get(t,j)===e;case"number":return Gt.get(t,j)===e;case"boolean":return Wt.get(t,j)===e;default:return!1}}function X(t,e,r=!1){if(t===void 0||!_(t)){if(Cr(e))return e.defaultValue;if(r)return;throw new G}if(e===String)return Ce.get(t,j);if(e===Boolean)return Wt.get(t,j);if(e===Number)return Gt.get(t,j);if(e===Date)return Ne.get(t,j);if(e===JSON)return xe.get(t,j);if(Br(e))return e(t,j);if(Ut(e))return e.get(t,j);if(e instanceof RegExp){if(e.test(t))return t;throw new G}if(Ae(e)){if(qr(t,e))return e;throw new G}return Ue(e)?Le(e).get(t,j):Ve(e)?Be(e).get(t,j):t}function Qt(t,e,r=!1){try{return X(t,e,r)}catch(n){if(n instanceof G)return;throw n}}function Tr(t,e,r=!1){try{return Q(t,e,r)}catch(n){if(n instanceof G)return;throw n}}function Q(t,e,r=!1){if(t===void 0){if(r)return"";throw new G}if(e===Boolean)return Wt.set(t,j);if(e===Number)return Gt.set(t,j);if(e===Date)return Ne.set(t,j);if(e===JSON)return xe.set(t,j);if(Ut(e))return e.set(t,j);if(Ae(e)){if(e!==t)throw new G;return t.toString()}if(Ue(e))return Le(e).set(t,j);if(Ve(e))return Be(e).set(t,j);try{return t.toString()}catch{throw new G}}function zt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jr(t,e){const r=Array.from(t.matchAll(e));if(r.length===0)return[t];let n=0;const o=r.reduce((a,i)=>{const u=zt(t.slice(n,i.index));u.length&&a.push(u);const[y]=i;return a.push(y),n=i.index+y.length,a},[]),s=t.slice(n);return s&&o.push(s),o}function Mr(t){const e=Yt(t.host.value);return new RegExp(`^${e}$`,"i")}function _r(t){const e=Yt(t.path.value);return new RegExp(`^${e}$`,"i")}function Fr(t){const e=new URLSearchParams(t.query.value);return Array.from(e.entries()).filter(([,r])=>!Kt(r)).map(([r,n])=>{const o=Yt(n);return new RegExp(`${zt(r)}=${o}(&|$)`,"i")})}function Yt(t){return Jr(t,new RegExp(Bt,"g")).map(e=>e.startsWith(yt)?Ze(e):zt(e)).join("")}function Ze(t){return t.replace(new RegExp(Bt,"g"),Qr)}function Wr(t,e){const r=Oe(e);return t.replace(r,zr)}function Xt(t,e){return Yr(e).test(t.value)}function Kt(t){return new RegExp(Gr,"g").test(t)}const Bt=`\\${yt}\\??([\\w-_]+)\\${kt}`,Gr=`\\${yt}\\?([\\w-_]+)\\${kt}`,Qr=".*",zr="(.*)";function te(t){const[e]=je(t,new RegExp(Bt,"g"));return e}function Oe(t){return new RegExp(`\\${yt}\\??${t}\\${kt}`,"g")}function Yr(t){return new RegExp(`\\${yt}\\?${t}\\${kt}`,"g")}function je(t,e){return Array.from(t.matchAll(e)).flatMap(([,...n])=>n.map(o=>_(o)?o:""))}function Xr(t="",e={}){return _(t)?Array.from(t.matchAll(new RegExp(Bt,"g"))).reduce((n,[o,s])=>{const a=te(o);if(!a)return n;const i=Dr(e,a);return ct([a],n),n[s]=i,n},{}):{}}function Kr(t){return ut(t)&&typeof t.value=="string"}function K(t){return t===void 0?tt():Kr(t)?t:tt(t,{})}function tt(t,e){return{value:t??"",params:Xr(t,e)}}function Ie(t,e){ct(t.params,e.params);const r=`${t.value}${e.value}`;return tt(r,{...t.params,...e.params})}function tn(t,e){return Ie(t,e)}class He extends Error{constructor(e){super(`Child property on meta for ${e} conflicts with the parent meta.`)}}function en(t,e){return rn(t,e),{...t,...e}}function rn(t,e){const r=Object.keys(t).find(n=>n in e&&typeof e[n]!=typeof t[n]);if(r)throw new He(r)}function nn(t,e){ct(t.params,e.params);const r=[t.value,e.value].filter(_).join("&");return tt(r,{...t.params,...e.params})}function on(t,e){return ct(t,e),{...t,...e}}function ee(t){return"parent"in t&&!!t.parent}function re(t){return"component"in t&&!!t.component}function ne(t){return"props"in t&&typeof t.props=="function"}function oe(t){return"components"in t&&!!t.components}function se(t){return"props"in t&&typeof t.props=="object"}function ae(t,e){return{...e,path:Ie(t.path,e.path),query:nn(t.query,e.query),meta:en(t.meta,e.meta),state:on(t.state,e.state),hash:tn(t.hash,e.hash),hooks:[...t.hooks,...e.hooks],matches:[...t.matches,e.matched],context:[...t.context,...e.context],host:t.host,depth:t.depth+1}}function F(t){return typeof t!="string"?!1:/^(https?:\/\/|\/).*/g.test(t)}function ie(t){return F(t)?t:`/${t}`}class et extends Error{constructor(){super("Router not installed")}}class $e extends Error{constructor(e,r){super(`useRoute called with incorrect route. Given ${e}, expected ${r}`)}}function ce(){let t=0;return()=>(++t).toString()}const sn=ce()();function an(t){return t===sn}const ue=ce();function De(t){return t===void 0?"":t}class rt{onBeforeRouteEnter=new Set;onBeforeRouteUpdate=new Set;onBeforeRouteLeave=new Set;onAfterRouteEnter=new Set;onAfterRouteUpdate=new Set;onAfterRouteLeave=new Set;onError=new Set}function Ct(){const t=new rt;return{onBeforeRouteEnter:u=>(t.onBeforeRouteEnter.add(u),()=>t.onBeforeRouteEnter.delete(u)),onBeforeRouteUpdate:u=>(t.onBeforeRouteUpdate.add(u),()=>t.onBeforeRouteUpdate.delete(u)),onBeforeRouteLeave:u=>(t.onBeforeRouteLeave.add(u),()=>t.onBeforeRouteLeave.delete(u)),onAfterRouteEnter:u=>(t.onAfterRouteEnter.add(u),()=>t.onAfterRouteEnter.delete(u)),onAfterRouteUpdate:u=>(t.onAfterRouteUpdate.add(u),()=>t.onAfterRouteUpdate.delete(u)),onAfterRouteLeave:u=>(t.onAfterRouteLeave.add(u),()=>t.onAfterRouteLeave.delete(u)),onError:u=>(t.onError.add(u),()=>t.onError.delete(u)),store:t}}function nt(t,e){const r=ue(),n=De(t.name),o=K(t.path),s=K(t.query),a=K(t.hash),i=t.meta??{},u=t.state??{},y=t.context??[],{store:E,...h}=Ct(),c=p.markRaw({id:r,meta:i,state:u,...t,props:e}),d={id:r,matched:c,matches:[c],hooks:[E],name:n,path:o,query:s,hash:a,meta:i,state:u,context:y,depth:1,host:tt(),prefetch:t.prefetch,...h},m=ee(t)?ae(t.parent,d):d;return ct(m.path.params,m.query.params,m.hash.params),m}function qe(t){return p.defineComponent(()=>()=>p.h("h1",t),{name:t,props:[]})}function cn(t){const e=t.component??qe(t.type);return{type:t.type,component:e}}function un(t){const e=ue(),r=De(t.name),n=K(t.path),o=K(t.query),s=K(t.hash),a=t.meta??{},i=K(t.host),u=t.context??[],{store:y,onBeforeRouteEnter:E}=Ct(),h=p.markRaw({id:e,meta:{},state:{},...t}),c={id:e,matched:h,matches:[h],hooks:[y],name:r,host:i,path:n,query:o,hash:s,meta:a,depth:1,state:{},context:u,onBeforeRouteEnter:E},d=ee(t)?ae(t.parent,c):c;return ct(d.path.params,d.query.params,d.host.params,d.hash.params),d}function gt(){const t=new Map;return e=>{const r=t.get(e);if(!r){const n=Symbol();return t.set(e,n),n}return r}}const fn=gt();function fe(t){const e=fn(t);return({increment:r=!1}={})=>{const n=p.inject(e,0);return r&&p.provide(e,n+1),n}}const wt=(t,e,r)=>{const n=t.matches,o=e?.matches??[];return n.at(r)?.id!==o.at(r)?.id},Et=(t,e,r)=>{const n=t.matches,o=e?.matches??[];return n.at(r)?.id!==o.at(r)?.id},St=(t,e,r)=>t.matches.at(r)?.id===e?.matches.at(r)?.id;function Te(t){switch(t){case"onBeforeRouteEnter":case"onAfterRouteEnter":return wt;case"onBeforeRouteUpdate":case"onAfterRouteUpdate":return St;case"onBeforeRouteLeave":case"onAfterRouteLeave":return Et;default:throw new Error(`Switch is not exhaustive for lifecycle: ${t}`)}}function pn(t,e){const r=new rt;return t.hooks.forEach((n,o)=>{if(wt(t,e,o))return n.onBeforeRouteEnter.forEach(s=>r.onBeforeRouteEnter.add(s));if(St(t,e,o))return n.onBeforeRouteUpdate.forEach(s=>r.onBeforeRouteUpdate.add(s))}),e?.hooks.forEach((n,o)=>{if(Et(t,e,o))return n.onBeforeRouteLeave.forEach(s=>r.onBeforeRouteLeave.add(s))}),r}function dn(t,e){const r=new rt;return t.hooks.forEach((n,o)=>{if(wt(t,e,o))return n.onAfterRouteEnter.forEach(s=>r.onAfterRouteEnter.add(s));if(St(t,e,o))return n.onAfterRouteUpdate.forEach(s=>r.onAfterRouteUpdate.add(s))}),e?.hooks.forEach((n,o)=>{if(Et(t,e,o))return n.onAfterRouteLeave.forEach(s=>r.onAfterRouteLeave.add(s))}),r}class Nt extends Error{}class z extends Nt{response;constructor(e){super("Uncaught ContextPushError"),this.response={status:"PUSH",to:e}}}class ot extends Nt{response;constructor(e){super("Uncaught ContextRejectionError"),this.response={status:"REJECT",type:e}}}class Je extends Nt{response;constructor(){super("Uncaught ContextAbortError"),this.response={status:"ABORT"}}}function ln(t,e,r){const n=new rt;return t.matches.forEach((o,s)=>{wt(t,e,s)&&r.onBeforeRouteEnter.forEach(a=>n.onBeforeRouteEnter.add(a)),St(t,e,s)&&r.onBeforeRouteUpdate.forEach(a=>n.onBeforeRouteUpdate.add(a))}),e?.matches.forEach((o,s)=>{Et(t,e,s)&&r.onBeforeRouteLeave.forEach(a=>n.onBeforeRouteLeave.add(a))}),n}function hn(t,e,r){const n=new rt;return t.matches.forEach((o,s)=>{wt(t,e,s)&&r.onAfterRouteEnter.forEach(a=>n.onAfterRouteEnter.add(a)),St(t,e,s)&&r.onAfterRouteUpdate.forEach(a=>n.onAfterRouteUpdate.add(a))}),e?.matches.forEach((o,s)=>{Et(t,e,s)&&r.onAfterRouteLeave.forEach(a=>n.onAfterRouteLeave.add(a))}),n}function Me(){let t=null;function e(n){t=n}function r(n){return t?t.runWithContext(n):n()}return{setVueApp:e,runWithContext:r}}function Pt({to:t}){const e=a=>{throw new ot(a)},r=(...a)=>{throw new z(a)};return{reject:e,push:r,replace:(a,i,u)=>{if(F(a)){const h=i??{};throw new z([a,{...h,replace:!0}])}const y=i,E=u??{};throw new z([a,y,{...E,replace:!0}])},update:(a,i,u)=>{if(typeof a=="object"){const E={...t.params,...a};return r(t.name,E,i)}const y={...t.params,[a]:i};return r(t.name,y,u)},abort:()=>{throw new Je}}}const _e=gt();function Rn(){const{setVueApp:t,runWithContext:e}=Me(),{store:r,...n}=Ct(),o=new rt,s=async({to:h,from:c})=>{const{reject:d,push:m,replace:k,update:U,abort:v}=Pt({to:h}),g=pn(h,c),l=ln(h,c,r),f=[...l.onBeforeRouteEnter,...g.onBeforeRouteEnter,...l.onBeforeRouteUpdate,...g.onBeforeRouteUpdate,...o.onBeforeRouteUpdate,...l.onBeforeRouteLeave,...g.onBeforeRouteLeave,...o.onBeforeRouteLeave];try{const S=f.map(L=>e(()=>L(h,{from:c,reject:d,push:m,replace:k,update:U,abort:v})));await Promise.all(S)}catch(S){if(S instanceof z||S instanceof ot||S instanceof Je)return S.response;try{i(S,{to:h,from:c,source:"hook"})}catch(L){if(L instanceof z||L instanceof ot)return L.response;throw L}}return{status:"SUCCESS"}},a=async({to:h,from:c})=>{const{reject:d,push:m,replace:k,update:U}=Pt({to:h}),v=dn(h,c),g=hn(h,c,r),l=[...o.onAfterRouteLeave,...v.onAfterRouteLeave,...g.onAfterRouteLeave,...o.onAfterRouteUpdate,...v.onAfterRouteUpdate,...g.onAfterRouteUpdate,...o.onAfterRouteEnter,...v.onAfterRouteEnter,...g.onAfterRouteEnter];try{const f=l.map(S=>e(()=>S(h,{from:c,reject:d,push:m,replace:k,update:U})));await Promise.all(f)}catch(f){if(f instanceof z||f instanceof ot)return f.response;try{i(f,{to:h,from:c,source:"hook"})}catch(S){if(S instanceof z||S instanceof ot)return S.response;throw S}}return{status:"SUCCESS"}},i=(h,{to:c,from:d,source:m})=>{const{reject:k,push:U,replace:v,update:g}=Pt({to:c});for(const l of r.onError)try{l(h,{to:c,from:d,source:m,reject:k,push:U,replace:v,update:g});return}catch(f){if(f instanceof Nt)throw f;if(f===h)continue;throw f}};return{runBeforeRouteHooks:s,runAfterRouteHooks:a,runErrorHooks:i,addComponentBeforeRouteHook:({lifecycle:h,depth:c,hook:d})=>{const m=Te(h),k=o[h],U=(v,g)=>{if(m(v,g.from,c))return d(v,g)};return k.add(U),()=>k.delete(U)},addComponentAfterRouteHook:({lifecycle:h,depth:c,hook:d})=>{const m=Te(h),k=o[h],U=(v,g)=>{if(m(v,g.from,c))return d(v,g)};return k.add(U),()=>k.delete(U)},addGlobalRouteHooks:h=>{h.onBeforeRouteEnter.forEach(c=>n.onBeforeRouteEnter(c)),h.onBeforeRouteUpdate.forEach(c=>n.onBeforeRouteUpdate(c)),h.onBeforeRouteLeave.forEach(c=>n.onBeforeRouteLeave(c)),h.onAfterRouteEnter.forEach(c=>n.onAfterRouteEnter(c)),h.onAfterRouteUpdate.forEach(c=>n.onAfterRouteUpdate(c)),h.onAfterRouteLeave.forEach(c=>n.onAfterRouteLeave(c)),h.onError.forEach(c=>n.onError(c))},setVueApp:t,...n}}function Fe(t){const e=_e(t);return()=>{const r=p.inject(e);if(!r)throw new et;return r}}function We(t,e){const r=fe(t),n=Fe(t);return o=>{const s=r(),i=n().addComponentBeforeRouteHook({lifecycle:e,hook:o,depth:s-1});return p.onUnmounted(i),i}}function Ge(t,e){const r=fe(t),n=Fe(t);return o=>{const s=r(),i=n().addComponentAfterRouteHook({lifecycle:e,hook:o,depth:s-1});return p.onUnmounted(i),i}}function yn(t){const e=We(t,"onBeforeRouteLeave"),r=We(t,"onBeforeRouteUpdate"),n=Ge(t,"onAfterRouteLeave"),o=Ge(t,"onAfterRouteUpdate");return{onBeforeRouteLeave:e,onBeforeRouteUpdate:r,onAfterRouteLeave:n,onAfterRouteUpdate:o}}const Qe=gt();function mn(t){const e=Qe(t);return()=>{const r=p.inject(e);if(!r)throw new et;return r}}const ze=gt();function gn(t){const e=ze(t);return()=>{const r=p.inject(e);if(!r)throw new et;return r}}function bt(t){return()=>{const e=p.inject(t);if(!e)throw new et;return e}}const Ye=Symbol("isRouterRouteSymbol");function wn(t,e){return typeof e=="object"&&e!==null&&Ye in e&&t in e}function En(t,e,r){function n(g,l,f){if(typeof g=="object"){const L={...e.params,...g};return r(e.name,L,l)}const S={...e.params,[g]:l};return r(e.name,S,f)}const o=(...g)=>{const l=new URLSearchParams(e.query);l.set(...g),n({},{query:l})},s=(...g)=>{const l=new URLSearchParams(e.query);l.append(...g),n({},{query:l})},a=(...g)=>{const l=new URLSearchParams(e.query);l.delete(...g),n({},{query:l})},{id:i,matched:u,matches:y,hooks:E,name:h,hash:c,href:d}=p.toRefs(e),m=p.computed({get(){return new Proxy(e.params,{set(g,l,f){return n(l,f),!0}})},set(g){n(g)}}),k=p.computed({get(){return new Proxy(e.query,{get(g,l,f){switch(l){case"append":return s;case"set":return o;case"delete":return a;default:return Reflect.get(g,l,f)}}})},set(g){n({},{query:g})}}),U=p.computed({get(){return new Proxy(e.state,{set(g,l,f){return n({},{state:{...e.state,[l]:f}}),!0}})},set(g){n({},{state:g})}});return p.reactive({id:i,matched:u,matches:y,hooks:E,state:U,query:k,hash:c,params:m,name:h,href:d,update:n,[Ye]:!0,[t]:!0})}function pe(t){return(e,r,{exact:n}={})=>wn(t,e)?r===void 0?!0:n?e.matched.name===r:e.matches.map(o=>o.name).includes(r):!1}function xt(t){const e=bt(t),r=pe(t);return(n,o)=>{const s=e();function a(){if(!n)return;if(!r(s.route,n,o))throw new $e(n,s.route.name)}return p.watch(s.route,a,{immediate:!0,deep:!0}),s.route}}function de(t){const e=xt(t),r=bt(t),n=gn(t),o=fe(t),s=mn(t);return p.defineComponent((a,i)=>{const u=e(),y=r(),E=n(),h=o({increment:!0});p.onServerPrefetch(async()=>{await y.start()});const{getRouteComponents:c}=s(),d=p.computed(()=>{if(!y.started.value)return null;if(E.value)return E.value.component;const m=u.matches.at(h);if(!m)return null;const k=c(m),U=a.name??"default";return k[U]});return()=>i.slots.default?i.slots.default({route:u,component:d,rejection:E.value}):d.value?p.h(d.value):null},{name:"RouterView",props:["name"]})}const Xe=gt();function Ke(t){const e=Xe(t);return()=>{const r=p.inject(e);if(!r)throw new et;return r}}const Sn="lazy",Pn={components:!0,props:!1};function Zt(t){return["eager","lazy","intent"].includes(t)}function tr({routerPrefetch:t,routePrefetch:e,linkPrefetch:r},n){const o=le(r,n),s=le(e,n),a=le(t,n),i=[o,s,a,Pn[n],Sn].reduce((u,y)=>Zt(u)?u:u===!0&&Zt(y)?y:u===!0&&!Zt(y)?u:u===void 0?y:u,void 0);return Zt(i)?i:!1}function le(t,e){return ut(t)?t[e]:t}const bn=p.defineAsyncComponent(()=>new Promise(t=>{t({default:{template:"foo"}})}));function er(t){return t.name===bn.name&&"__asyncLoader"in t}const rr=Symbol("visibilityObserver");function vn(t){const e=p.inject(rr);if(!e)throw new et;return p.watch(t,(n,o)=>{n&&e.observe(n),o&&e.unobserve(o)},{immediate:!0}),p.onUnmounted(()=>{t.value&&e.unobserve(t.value)}),{isElementVisible:p.computed(()=>t.value?e.isElementVisible(t.value):!1)}}function nr(t,e,r){p.watch(t,(n,o)=>{n&&n.addEventListener(e,r),o&&o.removeEventListener(e,r)},{immediate:!0}),p.onUnmounted(()=>{t.value&&t.value.removeEventListener(e,r)})}function An(t){const e=Ke(t);return r=>{const n=new Map,o=p.ref(),{getPrefetchProps:s,setPrefetchProps:a}=e(),{isElementVisible:i}=vn(o),u=()=>{const h=Array.from(n.values()).reduce((c,d)=>(Object.assign(c,d),c),{});a(h)};p.watch(()=>p.toValue(r),({route:h,...c})=>{n.clear(),h&&E("eager",h,c)},{immediate:!0}),p.watch(i,h=>{const{route:c,...d}=p.toValue(r);!c||!h||E("lazy",c,d)},{immediate:!0}),nr(o,"focusin",y),nr(o,"mouseover",y);function y(){const{route:h,...c}=p.toValue(r);h&&E("intent",h,c)}function E(h,c,d){kn(h,c,d),n.has(h)||n.set(h,s(h,c,d))}return{element:o,commit:u}}}function kn(t,e,r){e.matches.forEach(n=>{tr({...r,routePrefetch:n.prefetch},"components")===t&&(re(n)&&er(n.component)&&n.component.__asyncLoader(),oe(n)&&Object.values(n.components).forEach(s=>{er(s)&&s.__asyncLoader()}))})}function he(...t){const e=new URLSearchParams;for(const r of t){const n=new URLSearchParams(r);for(const[o,s]of n.entries())e.append(o,s)}return e}function or(t){const e=bt(t),r=An(t),n=pe(t);return(o,s={},a={})=>{const i=e(),u=p.computed(()=>{const f=p.toValue(o);return typeof f!="string"?f:F(f)?i.find(f,p.toValue(a)):i.resolve(f,p.toValue(s),p.toValue(a))}),y=p.computed(()=>{if(u.value)return u.value.href;const f=p.toValue(o);if(F(f))return f;console.error(new Error("Failed to resolve route in RouterLink."))}),E=p.computed(()=>n(i.route)&&i.route.matches.some(f=>f.id===u.value?.id)),h=p.computed(()=>i.route.id===u.value?.id),c=p.computed(()=>n(i.route)&&xr(u.value)&&i.route.href.startsWith(u.value.href)),d=p.computed(()=>i.route.href===u.value?.href),m=p.computed(()=>!!y.value&&i.isExternal(y.value)),k=p.computed(()=>{const f=p.toValue(o);return typeof f!="string"||F(f)?p.toValue(s):p.toValue(a)}),{element:U,commit:v}=r(()=>({route:u.value,routerPrefetch:i.prefetch,linkPrefetch:k.value.prefetch})),g=f=>{v();const S={replace:f?.replace??k.value.replace,query:he(k.value.query,f?.query),hash:f?.hash??k.value.hash,state:{...k.value.state,...f?.state}},L=p.toValue(o);return F(L)||typeof L=="object"?i.push(L,S):i.push(L,p.toValue(s),S)};return{element:U,route:u,href:y,isMatch:E,isExactMatch:h,isActive:c,isExactActive:d,isExternal:m,push:g,replace:f=>g({...f,replace:!0})}}}function sr(t){const e=bt(t),r=or(t);return p.defineComponent((n,o)=>{const s=e(),a=p.computed(()=>v(n.to)),i=p.computed(()=>g(n.to)),u=p.computed(()=>{const{to:f,...S}=n;return S}),{element:y,isMatch:E,isExactMatch:h,isActive:c,isExactActive:d,isExternal:m,push:k}=r(()=>typeof n.to=="function"?n.to(s.resolve):n.to,u),U=p.computed(()=>({"router-link--match":E.value,"router-link--exact-match":h.value,"router-link--active":c.value,"router-link--exact-active":d.value}));function v(f){if(typeof f=="function"){const S=f(s.resolve);return v(S)}return F(f)?s.find(f):f}function g(f){if(typeof f=="function"){const S=f(s.resolve);return g(S)}return F(f)?f:f?.href}function l(f){f.preventDefault(),k()}return()=>p.h("a",{href:i.value,class:["router-link",U.value],ref:y,onClick:l},o.slots.default?.({route:a.value,isMatch:E.value,isExactMatch:h.value,isActive:c.value,isExactActive:d.value,isExternal:m.value}))},{name:"RouterLink",props:["to","prefetch","query","hash","replace","state"]})}function Un(t){const e=xt(t);return(r,n=String)=>{const o=e(),s=p.computed({get(){const i=o.query.get(p.toValue(r));return i===null?null:Qt(i,n)},set(i){o.query.set(p.toValue(r),Q(i,n))}}),a=p.computed({get(){return o.query.getAll(p.toValue(r)).map(u=>Qt(u,n)).filter(u=>u!==null)},set(i){const u=new URLSearchParams(o.query);u.delete(p.toValue(r)),i.forEach(y=>{u.append(p.toValue(r),Q(y,n))}),o.query=u}});return{value:s,values:a,remove:()=>{o.query.delete(p.toValue(r))}}}}function ar(t){const e=typeof t=="object"?t.key:t,{onBeforeRouteLeave:r,onBeforeRouteUpdate:n,onAfterRouteLeave:o,onAfterRouteUpdate:s}=yn(e),a=pe(e),i=de(e),u=sr(e),y=xt(e),E=bt(e),h=Un(e),c=or(e);return{onBeforeRouteLeave:r,onBeforeRouteUpdate:n,onAfterRouteLeave:o,onAfterRouteUpdate:s,isRoute:a,RouterView:i,RouterLink:u,useRoute:y,useRouter:E,useQueryValue:h,useLink:c}}function Ln(t){const{store:e,...r}=Ct();return{routes:t.routes??[],rejections:t.rejections??[],hooks:e,...r}}function ir(t){return{get:(e,{invalid:r})=>{for(const n of t){const o=Qt(e,n);if(o!==void 0)return o}throw r(`Value ${e} does not satisfy any of the possible values`)},set:(e,{invalid:r})=>{for(const n of t){const o=Tr(e,n);if(o!==void 0)return o}throw r(`Value ${e} does not satisfy any of the possible values`)}}}const Vn={separator:","};function Bn(t,e={}){const{separator:r}={...Vn,...e},n=ir(t);return{get:(o,s)=>o.split(r).map(a=>n.get(a,s)),set:(o,s)=>{if(!Array.isArray(o))throw s.invalid("Expected an array");return o.map(a=>n.set(a,s)).join(r)}}}const Cn={separator:","};function Nn(t,e={}){const{separator:r}={...Cn,...e};return{get:n=>{const o=n.split(r);return t.map((s,a)=>X(o.at(a),s))},set:(n,{invalid:o})=>{if(!Array.isArray(n))throw o("Expected a tuple");if(n.length!==t.length)throw o(`Expected tuple with ${t.length} values but received ${n.length} values`);return t.map((s,a)=>Q(n.at(a),s)).join(r)}}}function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y.apply(null,arguments)}var D;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(D||(D={}));var lt=process.env.NODE_ENV!=="production"?function(t){return Object.freeze(t)}:function(t){return t};function st(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}var Ot="beforeunload",xn="hashchange",cr="popstate";function ur(t){t===void 0&&(t={});var e=t,r=e.window,n=r===void 0?document.defaultView:r,o=n.history;function s(){var P=n.location,R=P.pathname,b=P.search,B=P.hash,C=o.state||{};return[C.idx,lt({pathname:R,search:b,hash:B,state:C.usr||null,key:C.key||"default"})]}var a=null;function i(){if(a)d.call(a),a=null;else{var P=D.Pop,R=s(),b=R[0],B=R[1];if(d.length)if(b!=null){var C=E-b;C&&(a={action:P,location:B,retry:function(){S(C*-1)}},S(C))}else process.env.NODE_ENV!=="production"&&st(!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 g(P)}}n.addEventListener(cr,i);var u=D.Pop,y=s(),E=y[0],h=y[1],c=ht(),d=ht();E==null&&(E=0,o.replaceState(Y({},o.state,{idx:E}),""));function m(P){return typeof P=="string"?P:at(P)}function k(P,R){return R===void 0&&(R=null),lt(Y({pathname:h.pathname,hash:"",search:""},typeof P=="string"?vt(P):P,{state:R,key:It()}))}function U(P,R){return[{usr:P.state,key:P.key,idx:R},m(P)]}function v(P,R,b){return!d.length||(d.call({action:P,location:R,retry:b}),!1)}function g(P){u=P;var R=s();E=R[0],h=R[1],c.call({action:u,location:h})}function l(P,R){var b=D.Push,B=k(P,R);function C(){l(P,R)}if(v(b,B,C)){var Z=U(B,E+1),I=Z[0],$=Z[1];try{o.pushState(I,"",$)}catch{n.location.assign($)}g(b)}}function f(P,R){var b=D.Replace,B=k(P,R);function C(){f(P,R)}if(v(b,B,C)){var Z=U(B,E),I=Z[0],$=Z[1];o.replaceState(I,"",$),g(b)}}function S(P){o.go(P)}var L={get action(){return u},get location(){return h},createHref:m,push:l,replace:f,go:S,back:function(){S(-1)},forward:function(){S(1)},listen:function(R){return c.push(R)},block:function(R){var b=d.push(R);return d.length===1&&n.addEventListener(Ot,jt),function(){b(),d.length||n.removeEventListener(Ot,jt)}}};return L}function Zn(t){t===void 0&&(t={});var e=t,r=e.window,n=r===void 0?document.defaultView:r,o=n.history;function s(){var R=vt(n.location.hash.substr(1)),b=R.pathname,B=b===void 0?"/":b,C=R.search,Z=C===void 0?"":C,I=R.hash,$=I===void 0?"":I,q=o.state||{};return[q.idx,lt({pathname:B,search:Z,hash:$,state:q.usr||null,key:q.key||"default"})]}var a=null;function i(){if(a)d.call(a),a=null;else{var R=D.Pop,b=s(),B=b[0],C=b[1];if(d.length)if(B!=null){var Z=E-B;Z&&(a={action:R,location:C,retry:function(){L(Z*-1)}},L(Z))}else process.env.NODE_ENV!=="production"&&st(!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 l(R)}}n.addEventListener(cr,i),n.addEventListener(xn,function(){var R=s(),b=R[1];at(b)!==at(h)&&i()});var u=D.Pop,y=s(),E=y[0],h=y[1],c=ht(),d=ht();E==null&&(E=0,o.replaceState(Y({},o.state,{idx:E}),""));function m(){var R=document.querySelector("base"),b="";if(R&&R.getAttribute("href")){var B=n.location.href,C=B.indexOf("#");b=C===-1?B:B.slice(0,C)}return b}function k(R){return m()+"#"+(typeof R=="string"?R:at(R))}function U(R,b){return b===void 0&&(b=null),lt(Y({pathname:h.pathname,hash:"",search:""},typeof R=="string"?vt(R):R,{state:b,key:It()}))}function v(R,b){return[{usr:R.state,key:R.key,idx:b},k(R)]}function g(R,b,B){return!d.length||(d.call({action:R,location:b,retry:B}),!1)}function l(R){u=R;var b=s();E=b[0],h=b[1],c.call({action:u,location:h})}function f(R,b){var B=D.Push,C=U(R,b);function Z(){f(R,b)}if(process.env.NODE_ENV!=="production"&&st(C.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(R)+")"),g(B,C,Z)){var I=v(C,E+1),$=I[0],q=I[1];try{o.pushState($,"",q)}catch{n.location.assign(q)}l(B)}}function S(R,b){var B=D.Replace,C=U(R,b);function Z(){S(R,b)}if(process.env.NODE_ENV!=="production"&&st(C.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(R)+")"),g(B,C,Z)){var I=v(C,E),$=I[0],q=I[1];o.replaceState($,"",q),l(B)}}function L(R){o.go(R)}var P={get action(){return u},get location(){return h},createHref:k,push:f,replace:S,go:L,back:function(){L(-1)},forward:function(){L(1)},listen:function(b){return c.push(b)},block:function(b){var B=d.push(b);return d.length===1&&n.addEventListener(Ot,jt),function(){B(),d.length||n.removeEventListener(Ot,jt)}}};return P}function fr(t){t===void 0&&(t={});var e=t,r=e.initialEntries,n=r===void 0?["/"]:r,o=e.initialIndex,s=n.map(function(l){var f=lt(Y({pathname:"/",search:"",hash:"",state:null,key:It()},typeof l=="string"?vt(l):l));return process.env.NODE_ENV!=="production"&&st(f.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(l)+")"),f}),a=pr(o??s.length-1,0,s.length-1),i=D.Pop,u=s[a],y=ht(),E=ht();function h(l){return typeof l=="string"?l:at(l)}function c(l,f){return f===void 0&&(f=null),lt(Y({pathname:u.pathname,search:"",hash:""},typeof l=="string"?vt(l):l,{state:f,key:It()}))}function d(l,f,S){return!E.length||(E.call({action:l,location:f,retry:S}),!1)}function m(l,f){i=l,u=f,y.call({action:i,location:u})}function k(l,f){var S=D.Push,L=c(l,f);function P(){k(l,f)}process.env.NODE_ENV!=="production"&&st(u.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(l)+")"),d(S,L,P)&&(a+=1,s.splice(a,s.length,L),m(S,L))}function U(l,f){var S=D.Replace,L=c(l,f);function P(){U(l,f)}process.env.NODE_ENV!=="production"&&st(u.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(l)+")"),d(S,L,P)&&(s[a]=L,m(S,L))}function v(l){var f=pr(a+l,0,s.length-1),S=D.Pop,L=s[f];function P(){v(l)}d(S,L,P)&&(a=f,m(S,L))}var g={get index(){return a},get action(){return i},get location(){return u},createHref:h,push:k,replace:U,go:v,back:function(){v(-1)},forward:function(){v(1)},listen:function(f){return y.push(f)},block:function(f){return E.push(f)}};return g}function pr(t,e,r){return Math.min(Math.max(t,e),r)}function jt(t){t.preventDefault(),t.returnValue=""}function ht(){var t=[];return{get length(){return t.length},push:function(r){return t.push(r),function(){t=t.filter(function(n){return n!==r})}},call:function(r){t.forEach(function(n){return n&&n(r)})}}}function It(){return Math.random().toString(36).substr(2,8)}function at(t){var e=t.pathname,r=e===void 0?"/":e,n=t.search,o=n===void 0?"":n,s=t.hash,a=s===void 0?"":s;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),a&&a!=="#"&&(r+=a.charAt(0)==="#"?a:"#"+a),r}function vt(t){var e={};if(t){var r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));var n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function On(t,e,r){const n=p.reactive({...e}),o=i=>{Object.assign(n,{...i})},s=n,a=En(t,s,r);return{currentRoute:s,routerRoute:a,updateRoute:o}}function T(t){return!t.startsWith("http")?In(t):jn(t)}function jn(t){const{protocol:e,host:r,pathname:n,search:o,searchParams:s,hash:a}=new URL(t,t);return{protocol:e,host:r,pathname:n,search:o,searchParams:s,hash:a}}function In(t){const{pathname:e,search:r,searchParams:n,hash:o}=new URL(t,"https://localhost");return{pathname:e,search:r,searchParams:n,hash:o}}function Hn(t){return e=>{const{host:r}=T(e);return!(r===void 0||r===t)}}function dr(t){try{const e=t();return Mt(e)?e.catch(r=>r):e}catch(e){return e}}function $n(){const{setVueApp:t,runWithContext:e}=Me(),r=p.reactive(new Map),n=(c,d,m)=>{const{push:k,replace:U,reject:v,update:g}=Pt({to:d});return d.matches.filter(l=>tr({...m,routePrefetch:l.prefetch},"props")===c).flatMap(l=>E(l)).reduce((l,{id:f,name:S,props:L})=>{if(!L)return l;const P=y(f,S,d),R=e(()=>dr(()=>L(d,{push:k,replace:U,reject:v,update:g,parent:i(d,!0)})));return l[P]=R,l},{})},o=c=>{Object.entries(c).forEach(([d,m])=>{r.set(d,m)})},s=async c=>{const{push:d,replace:m,reject:k,update:U}=Pt({to:c}),v=c.matches.flatMap(E),g=[],l=[];for(const{id:f,name:S,props:L}of v){if(!L)continue;const P=y(f,S,c);if(g.push(P),!r.has(P)){const R=e(()=>dr(()=>L(c,{push:d,replace:m,reject:k,update:U,parent:i(c)})));r.set(P,R)}l.push((async()=>{const R=await r.get(P);if(R instanceof Error)throw R})())}h(g);try{return await Promise.all(l),{status:"SUCCESS"}}catch(f){if(f instanceof z||f instanceof ot)return f.response;throw f}},a=(c,d,m)=>{const k=y(c,d,m);return r.get(k)};function i(c,d=!1){const m=c.matches.at(-2);if(m)return ne(m)?{name:m.name??"",get props(){return u(m,"default",c,d)}}:se(m)?{name:m.name??"",props:new Proxy({},{get(k,U){return typeof U!="string"?Reflect.get(k,U):u(m,U,c,d)}})}:{name:m.name??"",props:void 0}}function u(c,d,m,k=!1){const U=a(c.id,d,m);if(k&&!U){const v=c.name??"unknown",g=m.name||"unknown";console.warn(`
|
|
2
|
-
Unable to access parent props "${
|
|
1
|
+
(function(v,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],y):(v=typeof globalThis<"u"?globalThis:v||self,y(v["@kitbag/router"]={},v.Vue))})(this,(function(v,y){"use strict";class kn 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 Po(e,t){return e.filter(n=>t===n).length}function be(...e){const t=e.flatMap(n=>Array.isArray(n)?n:Object.keys(n));for(const n of t)if(Po(t,n)>1)throw new kn(n)}class ce extends Error{}const Ze="[",rt="]";function No(e){return e!==String&&e!==Boolean&&e!==Number&&e!==Date}function bo(e){return typeof e=="function"&&No(e)}function ot(e){return typeof e=="object"&&"get"in e&&typeof e.get=="function"&&"set"in e&&typeof e.set=="function"}function Cn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Un(e,t){return ot(e)?{...e,defaultValue:t??e.defaultValue}:{get:n=>Ee(n,e),set:n=>ue(n,e),defaultValue:t}}function Ao(e){return ot(e)&&e.defaultValue!==void 0}function Io(e,t){return Un(e,t)}function vo(e){return e!==void 0}function Ae(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function K(e){return typeof e=="string"&&e.length>0}let T=null;async function ko(){const{ZodType:e,ZodString:t,ZodIPv4:n,ZodIPv6:r,ZodCIDRv4:o,ZodCIDRv6:s,ZodURL:i,ZodEmail:a,ZodUUID:c,ZodBase64:l,ZodCUID:g,ZodCUID2:f,ZodULID:p,ZodJWT:u,ZodBigInt:d,ZodNaN:R,ZodBoolean:m,ZodDate:_,ZodISODateTime:O,ZodISODate:E,ZodISOTime:h,ZodNumber:A,ZodLiteral:I,ZodObject:P,ZodEnum:S,ZodArray:N,ZodTuple:C,ZodUnion:U,ZodDiscriminatedUnion:M,ZodRecord:B,ZodMap:H,ZodSet:F,ZodIntersection:W,ZodPromise:k}=await import("zod");return{ZodType:e,ZodString:t,ZodIPv4:n,ZodIPv6:r,ZodCIDRv4:o,ZodCIDRv6:s,ZodURL:i,ZodEmail:a,ZodUUID:c,ZodBase64:l,ZodCUID:g,ZodCUID2:f,ZodULID:p,ZodJWT:u,ZodBigInt:d,ZodNaN:R,ZodBoolean:m,ZodDate:_,ZodISODateTime:O,ZodISODate:E,ZodISOTime:h,ZodNumber:A,ZodLiteral:I,ZodObject:P,ZodEnum:S,ZodArray:N,ZodTuple:C,ZodUnion:U,ZodDiscriminatedUnion:M,ZodRecord:B,ZodMap:H,ZodSet:F,ZodIntersection:W,ZodPromise:k}}function Co(e){return Object.values(e).some(t=>Object.values(t.host.params).some(n=>Ut(n))||Object.values(t.path.params).some(n=>Ut(n))||Object.values(t.query.params).some(n=>Ut(n)))}function Ut(e){return Ae(e)&&"parse"in e&&typeof e.parse=="function"&&"~standard"in e&&Ae(e["~standard"])&&"vendor"in e["~standard"]&&e["~standard"].vendor==="zod"}async function Uo(){try{T=await ko()}catch{throw new Error("Failed to initialize Zod")}}function Ln(e){return T?e instanceof T.ZodType:!1}function Vn(e){return{get:(t,{invalid:n})=>{try{return Lt(t,e)}catch{throw n()}},set:(t,{invalid:n})=>{try{return Vt(t,e)}catch{throw n()}}}}const Lo=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function Ie(e,t){if(typeof t=="string"&&Lo.test(t)){const n=new Date(t);return isNaN(n.getTime())?t:n}return t}function Ge(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function st(e,t){return T?.ZodString&&e instanceof T.ZodString?1:T?.ZodString&&t instanceof T.ZodString?-1:0}function Lt(e,t){if(!T)throw new Error("Zod is not initialized");if(t instanceof T.ZodString)return t.parse(e);if(t instanceof T.ZodBoolean)return t.parse(!!e);if(t instanceof T.ZodDate)return t.parse(new Date(e));if(t instanceof T.ZodNumber)return t.parse(Number(e));if(t instanceof T.ZodBigInt)return t.parse(BigInt(e));if(t instanceof T.ZodNaN)return t.parse(Number(e));if(t instanceof T.ZodLiteral)return Ge([()=>t.parse(Number(e)),()=>t.parse(!!e),()=>t.parse(e)]);if(t instanceof T.ZodObject)return t.parse(JSON.parse(e,Ie));if(t instanceof T.ZodEnum)return t.parse(e);if(t instanceof T.ZodArray||t instanceof T.ZodTuple)return t.parse(JSON.parse(e,Ie));if(t instanceof T.ZodUnion){const n=Array.from(t.def.options).sort(st).map(r=>()=>Lt(e,r));return Ge(n)}if(t instanceof T.ZodDiscriminatedUnion){const n=Array.from(t.options).sort(st).map(r=>()=>Lt(e,r));return Ge(n)}if(t instanceof T.ZodRecord)return t.parse(JSON.parse(e,Ie));if(t instanceof T.ZodMap)return t.parse(new Map(JSON.parse(e,Ie)));if(t instanceof T.ZodSet)return t.parse(new Set(JSON.parse(e,Ie)));if(t instanceof T.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof T.ZodPromise)throw new Error("Promise schemas are not supported");return t.parse(e)}function Vt(e,t){if(!T)throw new Error("Zod is not initialized");if(t instanceof T.ZodString||t instanceof T.ZodISODateTime||t instanceof T.ZodISODate||t instanceof T.ZodISOTime||t instanceof T.ZodIPv4||t instanceof T.ZodIPv6||t instanceof T.ZodCIDRv4||t instanceof T.ZodCIDRv6||t instanceof T.ZodURL||t instanceof T.ZodEmail||t instanceof T.ZodUUID||t instanceof T.ZodBase64||t instanceof T.ZodCUID||t instanceof T.ZodCUID2||t instanceof T.ZodULID||t instanceof T.ZodJWT)return t.parse(e);if(t instanceof T.ZodBoolean)return t.parse(e).toString();if(t instanceof T.ZodDate)return t.parse(e).toISOString();if(t instanceof T.ZodNumber)return t.parse(Number(e)).toString();if(t instanceof T.ZodBigInt)return t.parse(BigInt(String(e))).toString();if(t instanceof T.ZodNaN)return t.parse(e).toString();if(t instanceof T.ZodLiteral){const n=t.parse(e);return n!=null?n.toString():String(n)}if(t instanceof T.ZodObject)return JSON.stringify(t.parse(e));if(t instanceof T.ZodEnum){const n=t.parse(e);return typeof n=="string"?n:String(n)}if(t instanceof T.ZodArray||t instanceof T.ZodTuple)return JSON.stringify(t.parse(e));if(t instanceof T.ZodUnion){const n=Array.from(t.def.options).sort(st).map(r=>()=>Vt(e,r));return Ge(n)}if(t instanceof T.ZodDiscriminatedUnion){const n=Array.from(t.options).sort(st).map(r=>()=>Vt(e,r));return Ge(n)}if(t instanceof T.ZodRecord)return JSON.stringify(t.parse(e));if(t instanceof T.ZodMap){const n=t.parse(e);return JSON.stringify(Array.from(n.entries()))}if(t instanceof T.ZodSet){const n=t.parse(e);return JSON.stringify(Array.from(n.values()))}if(t instanceof T.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof T.ZodPromise)throw new Error("Promise schemas are not supported");return JSON.stringify(t.parse(e))}function Dt(e){return typeof e=="object"&&e!==null&&"then"in e}function L(e,t){const n=e["~standard"].validate(t);if(Dt(n))throw new Error("Promise schemas are not supported");if(n.issues)throw new Error("Validation failed");return n.value}function Vo(e){return Ae(e)&&"type"in e&&typeof e.type=="string"&&"~standard"in e&&Ae(e["~standard"])&&"vendor"in e["~standard"]&&e["~standard"].vendor==="valibot"}function Dn(e){return Vo(e)}function xn(e){return{get:(t,{invalid:n})=>{try{return xt(t,e)}catch{throw n()}},set:(t,{invalid:n})=>{try{return Mt(t,e)}catch{throw n()}}}}const Do=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function ve(e,t){if(typeof t=="string"&&Do.test(t)){const n=new Date(t);return isNaN(n.getTime())?t:n}return t}function ke(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function it(e,t){return e.type==="string"?1:t.type==="string"?-1:0}function xt(e,t){if(t.type==="boolean")return L(t,!!e);if(t.type==="date")return L(t,new Date(e));if(t.type==="number")return L(t,Number(e));if(t.type==="literal")return ke([()=>L(t,Number(e)),()=>L(t,!!e),()=>L(t,e)]);if(t.type==="object")return L(t,JSON.parse(e,ve));if(t.type==="enum")return ke([()=>L(t,Number(e)),()=>L(t,!!e),()=>L(t,e)]);if(t.type==="array"||t.type==="tuple")return L(t,JSON.parse(e,ve));if(t.type==="union"&&"options"in t){const n=t.options.sort(it).map(r=>()=>xt(e,r));return ke(n)}if(t.type==="variant"&&"options"in t){const n=t.options.sort(it).map(r=>()=>xt(e,r));return ke(n)}if(t.type==="record")return L(t,JSON.parse(e,ve));if(t.type==="map")return L(t,new Map(JSON.parse(e,ve)));if(t.type==="set")return L(t,new Set(JSON.parse(e,ve)));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 L(t,e)}function Mt(e,t){if(t.type==="string"||t.type==="boolean")return L(t,e).toString();if(t.type==="date")return L(t,e).toISOString();if(t.type==="number")return L(t,Number(e)).toString();if(t.type==="literal")return L(t,e).toString();if(t.type==="object")return JSON.stringify(L(t,e));if(t.type==="enum"||t.type==="nativeEnum")return L(t,e).toString();if(t.type==="array"||t.type==="tuple")return JSON.stringify(L(t,e));if(t.type==="union"&&"options"in t){const n=t.options.sort(it).map(r=>()=>Mt(e,r));return ke(n)}if(t.type==="variant"&&"options"in t){const n=t.options.sort(it).map(r=>()=>Mt(e,r));return ke(n)}if(t.type==="record")return JSON.stringify(L(t,e));if(t.type==="map"){const n=L(t,e);return JSON.stringify(Array.from(n.entries()))}if(t.type==="set"){const n=L(t,e);return JSON.stringify(Array.from(n.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(L(t,e))}function xo(e,t){return e[t]??String}const Z={invalid:e=>{throw new ce(e)}},Mn={get:e=>e,set:(e,{invalid:t})=>{if(typeof e!="string")throw t();return e}},Bt={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()}},Ht={get:(e,{invalid:t})=>{const n=Number(e);if(isNaN(n))throw t();return n},set:(e,{invalid:t})=>{if(typeof e!="number")throw t();return e.toString()}},Bn={get:(e,{invalid:t})=>{const n=new Date(e);if(isNaN(n.getTime()))throw t();return n},set:(e,{invalid:t})=>{if(typeof e!="object"||!(e instanceof Date))throw t();return e.toISOString()}},Hn={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 Mo(e,t){switch(typeof t){case"string":return Mn.get(e,Z)===t;case"number":return Ht.get(e,Z)===t;case"boolean":return Bt.get(e,Z)===t;default:return!1}}function Ee(e,t,n=!1){if(e===void 0||!K(e)){if(Ao(t))return t.defaultValue;if(n)return;throw new ce}if(t===String)return Mn.get(e,Z);if(t===Boolean)return Bt.get(e,Z);if(t===Number)return Ht.get(e,Z);if(t===Date)return Bn.get(e,Z);if(t===JSON)return Hn.get(e,Z);if(bo(t))return t(e,Z);if(ot(t))return t.get(e,Z);if(t instanceof RegExp){if(t.test(e))return e;throw new ce}if(Cn(t)){if(Mo(e,t))return t;throw new ce}return Ln(t)?Vn(t).get(e,Z):Dn(t)?xn(t).get(e,Z):e}function jt(e,t,n=!1){try{return Ee(e,t,n)}catch(r){if(r instanceof ce)return;throw r}}function Bo(e,t,n=!1){try{return ue(e,t,n)}catch(r){if(r instanceof ce)return;throw r}}function ue(e,t,n=!1){if(e===void 0){if(n)return"";throw new ce}if(t===Boolean)return Bt.set(e,Z);if(t===Number)return Ht.set(e,Z);if(t===Date)return Bn.set(e,Z);if(t===JSON)return Hn.set(e,Z);if(ot(t))return t.set(e,Z);if(Cn(t)){if(t!==e)throw new ce;return e.toString()}if(Ln(t))return Vn(t).set(e,Z);if(Dn(t))return xn(t).set(e,Z);try{return e.toString()}catch{throw new ce}}function Zt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ho(e,t){const n=Array.from(e.matchAll(t));if(n.length===0)return[e];let r=0;const o=n.reduce((i,a)=>{const c=Zt(e.slice(r,a.index));c.length&&i.push(c);const[l]=a;return i.push(l),r=a.index+l.length,i},[]),s=e.slice(r);return s&&o.push(s),o}function jo(e){const t=at(e.host.value);return new RegExp(`^${t||".*"}$`,"i")}function Zo(e){const t=at(e.path.value);return new RegExp(`^${t}$`,"i")}function Go(e){const t=e.hash.value.replace(/^#*/,""),n=at(t);return new RegExp(`^#?${n||".*"}$`,"i")}function Fo(e){const t=new URLSearchParams(e.query.value);return Array.from(t.entries()).filter(([,n])=>!Ft(n)).map(([n,r])=>{const o=at(r);return new RegExp(`${Zt(n)}=${o}(&|$)`,"i")})}function at(e){return Ho(e,new RegExp(ct,"g")).map(t=>t.startsWith(Ze)?jn(t):Zt(t)).join("")}function jn(e){return e.replace(new RegExp(ct,"g"),qo)}function zo(e,t){const n=Zn(t);return e.replace(n,Wo)}function Gt(e,t){return Ko(t).test(e.value)}function Ft(e){return new RegExp($o,"g").test(e)}const ct=`\\${Ze}\\??([\\w-_]+)\\${rt}`,$o=`\\${Ze}\\?([\\w-_]+)\\${rt}`,qo=".*",Wo="(.*)";function zt(e){const[t]=Gn(e,new RegExp(ct,"g"));return t}function Zn(e){return new RegExp(`\\${Ze}\\??${e}\\${rt}`,"g")}function Ko(e){return new RegExp(`\\${Ze}\\?${e}\\${rt}`,"g")}function Gn(e,t){return Array.from(e.matchAll(t)).flatMap(([,...r])=>r.map(o=>K(o)?o:""))}function Jo(e="",t={}){return K(e)?Array.from(e.matchAll(new RegExp(ct,"g"))).reduce((r,[o,s])=>{const i=zt(o);if(!i)return r;const a=xo(t,i);return be([i],r),r[s]=a,r},{}):{}}function Yo(e){return Ae(e)&&typeof e.value=="string"}function ge(e){return e===void 0?_e():Yo(e)?e:_e(e,{})}function _e(e,t){return{value:e??"",params:Jo(e,t)}}function Fn(e,t){be(e.params,t.params);const n=`${e.value}${t.value}`;return _e(n,{...e.params,...t.params})}function Qo(e,t){return Fn(e,t)}class zn extends Error{constructor(t){super(`Child property on meta for ${t} conflicts with the parent meta.`)}}function Xo(e,t){return es(e,t),{...e,...t}}function es(e,t){const n=Object.keys(e).find(r=>r in t&&typeof t[r]!=typeof e[r]);if(n)throw new zn(n)}function ts(e,t){be(e.params,t.params);const n=[e.value,t.value].filter(K).join("&");return _e(n,{...e.params,...t.params})}function ns(e,t){return be(e,t),{...e,...t}}function $t(e){return"parent"in e&&!!e.parent}function qt(e){return"component"in e&&!!e.component}function Wt(e){return"props"in e&&typeof e.props=="function"}function Kt(e){return"components"in e&&!!e.components}function Jt(e){return"props"in e&&typeof e.props=="object"}function Yt(e,t){return{...t,path:Fn(e.path,t.path),query:ts(e.query,t.query),meta:Xo(e.meta,t.meta),state:ns(e.state,t.state),hash:Qo(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 oe(e){return typeof e!="string"?!1:/^(https?:\/\/|\/).*/g.test(e)}function Qt(e){return oe(e)?e:`/${e}`}class me extends Error{constructor(){super("Router not installed")}}class $n extends Error{constructor(t,n){super(`useRoute called with incorrect route. Given ${t}, expected ${n}`)}}function ut(){let e=0;return()=>(++e).toString()}const rs=ut()();function os(e){return e===rs}const Xt=ut();function qn(e){return e===void 0?"":e}class ye{redirects=new Set;onBeforeRouteEnter=new Set;onBeforeRouteUpdate=new Set;onBeforeRouteLeave=new Set;onAfterRouteEnter=new Set;onAfterRouteUpdate=new Set;onAfterRouteLeave=new Set;onError=new Set}class ss extends Error{constructor(t){super(`Invalid Route Redirect "${t}": Router does not support multiple redirects to the same route. All redirects must be unique.`)}}function ft(){const e=new ye;return{redirect:(l,g)=>{if(e.redirects.size>0)throw new ss(l.name);const f=(p,{replace:u})=>{u(l.name,g?.(p.params))};return e.redirects.add(f),()=>e.redirects.delete(f)},onBeforeRouteEnter:l=>(e.onBeforeRouteEnter.add(l),()=>e.onBeforeRouteEnter.delete(l)),onBeforeRouteUpdate:l=>(e.onBeforeRouteUpdate.add(l),()=>e.onBeforeRouteUpdate.delete(l)),onBeforeRouteLeave:l=>(e.onBeforeRouteLeave.add(l),()=>e.onBeforeRouteLeave.delete(l)),onAfterRouteEnter:l=>(e.onAfterRouteEnter.add(l),()=>e.onAfterRouteEnter.delete(l)),onAfterRouteUpdate:l=>(e.onAfterRouteUpdate.add(l),()=>e.onAfterRouteUpdate.delete(l)),onAfterRouteLeave:l=>(e.onAfterRouteLeave.add(l),()=>e.onAfterRouteLeave.delete(l)),onError:l=>(e.onError.add(l),()=>e.onError.delete(l)),store:e}}class Wn extends Error{constructor(t){super(`Invalid Route Redirect "${t}": Route does not support redirects. Use createRouteRedirects to create redirects.`)}}function Kn(e){return"redirect"in e}function Jn({getRoute:e}){return{redirectTo:(...[r,o])=>{const s=e();if(!Kn(s))throw new Wn(s.name);r.context.push(s),s.context.push(r),s.redirect(r,o)},redirectFrom:(r,o)=>{const s=e();if(!Kn(r))throw new Wn(r.name);s.context.push(r),r.context.push(s),r.redirect(s,o)}}}function Re(e,t){const n=Xt(),r=qn(e.name),o=ge(e.path),s=ge(e.query),i=ge(e.hash),a=e.meta??{},c=e.state??{},l=e.context??[],{store:g,...f}=ft(),p=y.markRaw({id:n,meta:a,state:c,...e,props:t}),u=Jn({getRoute:()=>d}),d={id:n,matched:p,matches:[p],hooks:[g],name:r,path:o,query:s,hash:i,meta:a,state:c,context:l,depth:1,host:_e(),prefetch:e.prefetch,...u,...f},R=$t(e)?Yt(e.parent,d):d;return be(R.path.params,R.query.params,R.hash.params),R}function Yn(e){return y.defineComponent(()=>()=>y.h("h1",e),{name:e,props:[]})}function is(e){const t=e.component??Yn(e.type);return{type:e.type,component:t}}function as(e){const t=Xt(),n=qn(e.name),r=ge(e.path),o=ge(e.query),s=ge(e.hash),i=e.meta??{},a=ge(e.host),c=e.context??[],{store:l,...g}=ft(),f=Jn({getRoute:()=>u}),p=y.markRaw({id:t,meta:{},state:{},...e}),u={id:t,matched:p,matches:[p],hooks:[l],name:n,host:a,path:r,query:o,hash:s,meta:i,depth:1,state:{},context:c,...g,...f},d=$t(e)?Yt(e.parent,u):u;return be(d.path.params,d.query.params,d.host.params,d.hash.params),d}function Fe(){const e=new Map;return t=>{const n=e.get(t);if(!n){const r=Symbol();return e.set(t,r),r}return n}}const cs=Fe();function Qn(e){const t=cs(e);return({increment:n=!1}={})=>{const r=y.inject(t,0);return n&&y.provide(t,r+1),r}}const ze=(e,t,n)=>{const r=e.matches,o=t?.matches??[];return r.at(n)?.id!==o.at(n)?.id},$e=(e,t,n)=>{const r=e.matches,o=t?.matches??[];return r.at(n)?.id!==o.at(n)?.id},qe=(e,t,n)=>e.matches.at(n)?.id===t?.matches.at(n)?.id;function us(e){switch(e){case"onBeforeRouteEnter":case"onAfterRouteEnter":return ze;case"onBeforeRouteUpdate":case"onAfterRouteUpdate":return qe;case"onBeforeRouteLeave":case"onAfterRouteLeave":return $e;default:throw new Error(`Switch is not exhaustive for lifecycle: ${e}`)}}function fs(e,t){const n=new ye;return e.hooks.forEach((r,o)=>{if(r.redirects.forEach(s=>n.redirects.add(s)),ze(e,t,o))return r.onBeforeRouteEnter.forEach(s=>n.onBeforeRouteEnter.add(s));if(qe(e,t,o))return r.onBeforeRouteUpdate.forEach(s=>n.onBeforeRouteUpdate.add(s))}),t?.hooks.forEach((r,o)=>{if($e(e,t,o))return r.onBeforeRouteLeave.forEach(s=>n.onBeforeRouteLeave.add(s))}),n}function ls(e,t){const n=new ye;return e.hooks.forEach((r,o)=>{if(ze(e,t,o))return r.onAfterRouteEnter.forEach(s=>n.onAfterRouteEnter.add(s));if(qe(e,t,o))return r.onAfterRouteUpdate.forEach(s=>n.onAfterRouteUpdate.add(s))}),t?.hooks.forEach((r,o)=>{if($e(e,t,o))return r.onAfterRouteLeave.forEach(s=>n.onAfterRouteLeave.add(s))}),n}class lt extends Error{}class fe extends lt{response;constructor(t){super("Uncaught ContextPushError"),this.response={status:"PUSH",to:t}}}class Se extends lt{response;constructor(t){super("Uncaught ContextRejectionError"),this.response={status:"REJECT",type:t}}}class Xn extends lt{response;constructor(){super("Uncaught ContextAbortError"),this.response={status:"ABORT"}}}function ds(e,t,n){const r=new ye;return e.matches.forEach((o,s)=>{ze(e,t,s)&&n.onBeforeRouteEnter.forEach(i=>r.onBeforeRouteEnter.add(i)),qe(e,t,s)&&n.onBeforeRouteUpdate.forEach(i=>r.onBeforeRouteUpdate.add(i))}),t?.matches.forEach((o,s)=>{$e(e,t,s)&&n.onBeforeRouteLeave.forEach(i=>r.onBeforeRouteLeave.add(i))}),r}function ps(e,t,n){const r=new ye;return e.matches.forEach((o,s)=>{ze(e,t,s)&&n.onAfterRouteEnter.forEach(i=>r.onAfterRouteEnter.add(i)),qe(e,t,s)&&n.onAfterRouteUpdate.forEach(i=>r.onAfterRouteUpdate.add(i))}),t?.matches.forEach((o,s)=>{$e(e,t,s)&&n.onAfterRouteLeave.forEach(i=>r.onAfterRouteLeave.add(i))}),r}function er(){let e=null;function t(r){e=r}function n(r){return e?e.runWithContext(r):r()}return{setVueApp:t,runWithContext:n}}function We({to:e}){const t=i=>{throw new Se(i)},n=(...i)=>{throw new fe(i)};return{reject:t,push:n,replace:(i,a,c)=>{if(oe(i)){const f=a??{};throw new fe([i,{...f,replace:!0}])}const l=a,g=c??{};throw new fe([i,l,{...g,replace:!0}])},update:(i,a,c)=>{if(typeof i=="object"){const g={...e.params,...i};return n(e.name,g,a)}const l={...e.params,[i]:a};return n(e.name,l,c)},abort:()=>{throw new Xn}}}const tr=Fe();function hs(){const{setVueApp:e,runWithContext:t}=er(),{store:n,...r}=ft(),o=new ye,s=async({to:g,from:f})=>{const{reject:p,push:u,replace:d,update:R,abort:m}=We({to:g}),_=fs(g,f),O=ds(g,f,n),E=[..._.redirects,...O.onBeforeRouteEnter,..._.onBeforeRouteEnter,...O.onBeforeRouteUpdate,..._.onBeforeRouteUpdate,...o.onBeforeRouteUpdate,...O.onBeforeRouteLeave,..._.onBeforeRouteLeave,...o.onBeforeRouteLeave];try{const h=E.map(A=>t(()=>A(g,{from:f,reject:p,push:u,replace:d,update:R,abort:m})));await Promise.all(h)}catch(h){if(h instanceof fe||h instanceof Se||h instanceof Xn)return h.response;try{a(h,{to:g,from:f,source:"hook"})}catch(A){if(A instanceof fe||A instanceof Se)return A.response;throw A}}return{status:"SUCCESS"}},i=async({to:g,from:f})=>{const{reject:p,push:u,replace:d,update:R}=We({to:g}),m=ls(g,f),_=ps(g,f,n),O=[...o.onAfterRouteLeave,...m.onAfterRouteLeave,..._.onAfterRouteLeave,...o.onAfterRouteUpdate,...m.onAfterRouteUpdate,..._.onAfterRouteUpdate,...o.onAfterRouteEnter,...m.onAfterRouteEnter,..._.onAfterRouteEnter];try{const E=O.map(h=>t(()=>h(g,{from:f,reject:p,push:u,replace:d,update:R})));await Promise.all(E)}catch(E){if(E instanceof fe||E instanceof Se)return E.response;try{a(E,{to:g,from:f,source:"hook"})}catch(h){if(h instanceof fe||h instanceof Se)return h.response;throw h}}return{status:"SUCCESS"}},a=(g,{to:f,from:p,source:u})=>{const{reject:d,push:R,replace:m,update:_}=We({to:f});for(const O of n.onError)try{O(g,{to:f,from:p,source:u,reject:d,push:R,replace:m,update:_});return}catch(E){if(E instanceof lt)throw E;if(E===g)continue;throw E}};return{runBeforeRouteHooks:s,runAfterRouteHooks:i,runErrorHooks:a,addComponentHook:({lifecycle:g,depth:f,hook:p})=>{const u=us(g),d=o[g],R=(m,_)=>{if(u(m,_.from,f))return p(m,_)};return d.add(R),()=>d.delete(R)},addGlobalRouteHooks:g=>{g.onBeforeRouteEnter.forEach(f=>r.onBeforeRouteEnter(f)),g.onBeforeRouteUpdate.forEach(f=>r.onBeforeRouteUpdate(f)),g.onBeforeRouteLeave.forEach(f=>r.onBeforeRouteLeave(f)),g.onAfterRouteEnter.forEach(f=>r.onAfterRouteEnter(f)),g.onAfterRouteUpdate.forEach(f=>r.onAfterRouteUpdate(f)),g.onAfterRouteLeave.forEach(f=>r.onAfterRouteLeave(f)),g.onError.forEach(f=>r.onError(f))},setVueApp:e,...r}}function Es(e){const t=tr(e);return()=>{const n=y.inject(t);if(!n)throw new me;return n}}function dt(e,t){const n=Qn(e),r=Es(e);return o=>{const s=n(),a=r().addComponentHook({lifecycle:t,hook:o,depth:s-1});return y.onUnmounted(a),a}}function gs(e){const t=dt(e,"onBeforeRouteLeave"),n=dt(e,"onBeforeRouteUpdate"),r=dt(e,"onAfterRouteLeave"),o=dt(e,"onAfterRouteUpdate");return{onBeforeRouteLeave:t,onBeforeRouteUpdate:n,onAfterRouteLeave:r,onAfterRouteUpdate:o}}const nr=Fe();function _s(e){const t=nr(e);return()=>{const n=y.inject(t);if(!n)throw new me;return n}}const rr=Fe();function ms(e){const t=rr(e);return()=>{const n=y.inject(t);if(!n)throw new me;return n}}function Ke(e){return()=>{const t=y.inject(e);if(!t)throw new me;return t}}const or=Symbol("isRouterRouteSymbol");function ys(e,t){return typeof t=="object"&&t!==null&&or in t&&e in t}function Rs(e,t,n){function r(O,E,h){if(typeof O=="object"){const I={...t.params,...O};return n(t.name,I,E)}const A={...t.params,[O]:E};return n(t.name,A,h)}const o=(...O)=>{const E=new URLSearchParams(t.query);E.set(...O),r({},{query:E})},s=(...O)=>{const E=new URLSearchParams(t.query);E.append(...O),r({},{query:E})},i=(...O)=>{const E=new URLSearchParams(t.query);E.delete(...O),r({},{query:E})},{id:a,matched:c,matches:l,hooks:g,name:f,hash:p,href:u}=y.toRefs(t),d=y.computed({get(){return new Proxy(t.params,{set(O,E,h){return r(E,h),!0}})},set(O){r(O)}}),R=y.computed({get(){return new Proxy(t.query,{get(O,E,h){switch(E){case"append":return s;case"set":return o;case"delete":return i;default:return Reflect.get(O,E,h)}}})},set(O){r({},{query:O})}}),m=y.computed({get(){return new Proxy(t.state,{set(O,E,h){return r({},{state:{...t.state,[E]:h}}),!0}})},set(O){r({},{state:O})}});return y.reactive({id:a,matched:c,matches:l,hooks:g,state:m,query:R,hash:p,params:d,name:f,href:u,update:r,[or]:!0,[e]:!0})}function en(e){return(t,n,{exact:r}={})=>ys(e,t)?n===void 0?!0:r?t.matched.name===n:t.matches.map(o=>o.name).includes(n):!1}function pt(e){const t=Ke(e),n=en(e);return(r,o)=>{const s=t();function i(){if(!r)return;if(!n(s.route,r,o))throw new $n(r,s.route.name)}return y.watch(s.route,i,{immediate:!0,deep:!0}),s.route}}function tn(e){const t=pt(e),n=Ke(e),r=ms(e),o=Qn(e),s=_s(e);return y.defineComponent((i,a)=>{const c=t(),l=n(),g=r(),f=o({increment:!0});y.onServerPrefetch(async()=>{await l.start()});const{getRouteComponents:p}=s(),u=y.computed(()=>{if(!l.started.value)return null;if(g.value)return g.value.component;const d=c.matches.at(f);if(!d)return null;const R=p(d),m=i.name??"default";return R[m]});return()=>a.slots.default?a.slots.default({route:c,component:u,rejection:g.value}):u.value?y.h(u.value):null},{name:"RouterView",props:["name"]})}const sr=Fe();function ir(e){const t=sr(e);return()=>{const n=y.inject(t);if(!n)throw new me;return n}}const Ss="lazy",Os={components:!0,props:!1};function ht(e){return["eager","lazy","intent"].includes(e)}function ar({routerPrefetch:e,routePrefetch:t,linkPrefetch:n},r){const o=nn(n,r),s=nn(t,r),i=nn(e,r),a=[o,s,i,Os[r],Ss].reduce((c,l)=>ht(c)?c:c===!0&&ht(l)?l:c===!0&&!ht(l)?c:c===void 0?l:c,void 0);return ht(a)?a:!1}function nn(e,t){return Ae(e)?e[t]:e}const ws=y.defineAsyncComponent(()=>new Promise(e=>{e({default:{template:"foo"}})}));function cr(e){return e.name===ws.name&&"__asyncLoader"in e}const ur=Symbol("visibilityObserver");function Ts(e){const t=y.inject(ur);if(!t)throw new me;return y.watch(e,(r,o)=>{r&&t.observe(r),o&&t.unobserve(o)},{immediate:!0}),y.onUnmounted(()=>{e.value&&t.unobserve(e.value)}),{isElementVisible:y.computed(()=>e.value?t.isElementVisible(e.value):!1)}}function fr(e,t,n){y.watch(e,(r,o)=>{r&&r.addEventListener(t,n),o&&o.removeEventListener(t,n)},{immediate:!0}),y.onUnmounted(()=>{e.value&&e.value.removeEventListener(t,n)})}function Ps(e){const t=ir(e);return n=>{const r=new Map,o=y.ref(),{getPrefetchProps:s,setPrefetchProps:i}=t(),{isElementVisible:a}=Ts(o),c=()=>{const f=Array.from(r.values()).reduce((p,u)=>(Object.assign(p,u),p),{});i(f)};y.watch(()=>y.toValue(n),({route:f,...p})=>{r.clear(),f&&g("eager",f,p)},{immediate:!0}),y.watch(a,f=>{const{route:p,...u}=y.toValue(n);!p||!f||g("lazy",p,u)},{immediate:!0}),fr(o,"focusin",l),fr(o,"mouseover",l);function l(){const{route:f,...p}=y.toValue(n);f&&g("intent",f,p)}function g(f,p,u){Ns(f,p,u),r.has(f)||r.set(f,s(f,p,u))}return{element:o,commit:c}}}function Ns(e,t,n){t.matches.forEach(r=>{ar({...n,routePrefetch:r.prefetch},"components")===e&&(qt(r)&&cr(r.component)&&r.component.__asyncLoader(),Kt(r)&&Object.values(r.components).forEach(s=>{cr(s)&&s.__asyncLoader()}))})}function rn(...e){const t=new URLSearchParams;for(const n of e){const r=new URLSearchParams(n);for(const[o,s]of r.entries())t.append(o,s)}return t}function lr(e){const t=Ke(e),n=Ps(e),r=en(e);return(o,s={},i={})=>{const a=t(),c=y.computed(()=>{const h=y.toValue(o);return typeof h!="string"?h:oe(h)?a.find(h,y.toValue(i)):a.resolve(h,y.toValue(s),y.toValue(i))}),l=y.computed(()=>{if(c.value)return c.value.href;const h=y.toValue(o);if(oe(h))return h;console.error(new Error("Failed to resolve route in RouterLink."))}),g=y.computed(()=>r(a.route)&&a.route.matches.some(h=>h.id===c.value?.id)),f=y.computed(()=>a.route.id===c.value?.id),p=y.computed(()=>r(a.route)&&vo(c.value)&&a.route.href.startsWith(c.value.href)),u=y.computed(()=>a.route.href===c.value?.href),d=y.computed(()=>!!l.value&&a.isExternal(l.value)),R=y.computed(()=>{const h=y.toValue(o);return typeof h!="string"||oe(h)?y.toValue(s):y.toValue(i)}),{element:m,commit:_}=n(()=>({route:c.value,routerPrefetch:a.prefetch,linkPrefetch:R.value.prefetch})),O=h=>{_();const A={replace:h?.replace??R.value.replace,query:rn(R.value.query,h?.query),hash:h?.hash??R.value.hash,state:{...R.value.state,...h?.state}},I=y.toValue(o);return oe(I)||typeof I=="object"?a.push(I,A):a.push(I,y.toValue(s),A)};return{element:m,route:c,href:l,isMatch:g,isExactMatch:f,isActive:p,isExactActive:u,isExternal:d,push:O,replace:h=>O({...h,replace:!0})}}}function dr(e){const t=Ke(e),n=lr(e);return y.defineComponent((r,o)=>{const s=t(),i=y.computed(()=>_(r.to)),a=y.computed(()=>O(r.to)),c=y.computed(()=>{const{to:h,...A}=r;return A}),{element:l,isMatch:g,isExactMatch:f,isActive:p,isExactActive:u,isExternal:d,push:R}=n(()=>typeof r.to=="function"?r.to(s.resolve):r.to,c),m=y.computed(()=>({"router-link--match":g.value,"router-link--exact-match":f.value,"router-link--active":p.value,"router-link--exact-active":u.value}));function _(h){if(typeof h=="function"){const A=h(s.resolve);return _(A)}return oe(h)?s.find(h):h}function O(h){if(typeof h=="function"){const A=h(s.resolve);return O(A)}return oe(h)?h:h?.href}function E(h){h.preventDefault(),R()}return()=>y.h("a",{href:a.value,class:["router-link",m.value],ref:l,onClick:E},o.slots.default?.({route:i.value,isMatch:g.value,isExactMatch:f.value,isActive:p.value,isExactActive:u.value,isExternal:d.value}))},{name:"RouterLink",props:["to","prefetch","query","hash","replace","state"]})}function bs(e){const t=pt(e);return(n,r=String)=>{const o=t(),s=y.computed({get(){const a=o.query.get(y.toValue(n));return a===null?null:jt(a,r)},set(a){o.query.set(y.toValue(n),ue(a,r))}}),i=y.computed({get(){return o.query.getAll(y.toValue(n)).map(c=>jt(c,r)).filter(c=>c!==null)},set(a){const c=new URLSearchParams(o.query);c.delete(y.toValue(n)),a.forEach(l=>{c.append(y.toValue(n),ue(l,r))}),o.query=c}});return{value:s,values:i,remove:()=>{o.query.delete(y.toValue(n))}}}}function pr(e){const t=typeof e=="object"?e.key:e,{onBeforeRouteLeave:n,onBeforeRouteUpdate:r,onAfterRouteLeave:o,onAfterRouteUpdate:s}=gs(t),i=en(t),a=tn(t),c=dr(t),l=pt(t),g=Ke(t),f=bs(t),p=lr(t);return{onBeforeRouteLeave:n,onBeforeRouteUpdate:r,onAfterRouteLeave:o,onAfterRouteUpdate:s,isRoute:i,RouterView:a,RouterLink:c,useRoute:l,useRouter:g,useQueryValue:f,useLink:p}}function As(e){const{store:t,...n}=ft();return{routes:e.routes??[],rejections:e.rejections??[],hooks:t,...n}}function hr(e){return{get:(t,{invalid:n})=>{for(const r of e){const o=jt(t,r);if(o!==void 0)return o}throw n(`Value ${t} does not satisfy any of the possible values`)},set:(t,{invalid:n})=>{for(const r of e){const o=Bo(t,r);if(o!==void 0)return o}throw n(`Value ${t} does not satisfy any of the possible values`)}}}const Is={separator:","};function vs(e,t={}){const{separator:n}={...Is,...t},r=hr(e);return{get:(o,s)=>o.split(n).map(i=>r.get(i,s)),set:(o,s)=>{if(!Array.isArray(o))throw s.invalid("Expected an array");return o.map(i=>r.set(i,s)).join(n)}}}const ks={separator:","};function Cs(e,t={}){const{separator:n}={...ks,...t};return{get:r=>{const o=r.split(n);return e.map((s,i)=>Ee(o.at(i),s))},set:(r,{invalid:o})=>{if(!Array.isArray(r))throw o("Expected a tuple");if(r.length!==e.length)throw o(`Expected tuple with ${e.length} values but received ${r.length} values`);return e.map((s,i)=>ue(r.at(i),s)).join(n)}}}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(null,arguments)}var J;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(J||(J={}));var Ce=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function Oe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}var Et="beforeunload",Us="hashchange",Er="popstate";function gr(e){e===void 0&&(e={});var t=e,n=t.window,r=n===void 0?document.defaultView:n,o=r.history;function s(){var P=r.location,S=P.pathname,N=P.search,C=P.hash,U=o.state||{};return[U.idx,Ce({pathname:S,search:N,hash:C,state:U.usr||null,key:U.key||"default"})]}var i=null;function a(){if(i)u.call(i),i=null;else{var P=J.Pop,S=s(),N=S[0],C=S[1];if(u.length)if(N!=null){var U=g-N;U&&(i={action:P,location:C,retry:function(){A(U*-1)}},A(U))}else process.env.NODE_ENV!=="production"&&Oe(!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 O(P)}}r.addEventListener(Er,a);var c=J.Pop,l=s(),g=l[0],f=l[1],p=Ue(),u=Ue();g==null&&(g=0,o.replaceState(de({},o.state,{idx:g}),""));function d(P){return typeof P=="string"?P:we(P)}function R(P,S){return S===void 0&&(S=null),Ce(de({pathname:f.pathname,hash:"",search:""},typeof P=="string"?Je(P):P,{state:S,key:_t()}))}function m(P,S){return[{usr:P.state,key:P.key,idx:S},d(P)]}function _(P,S,N){return!u.length||(u.call({action:P,location:S,retry:N}),!1)}function O(P){c=P;var S=s();g=S[0],f=S[1],p.call({action:c,location:f})}function E(P,S){var N=J.Push,C=R(P,S);function U(){E(P,S)}if(_(N,C,U)){var M=m(C,g+1),B=M[0],H=M[1];try{o.pushState(B,"",H)}catch{r.location.assign(H)}O(N)}}function h(P,S){var N=J.Replace,C=R(P,S);function U(){h(P,S)}if(_(N,C,U)){var M=m(C,g),B=M[0],H=M[1];o.replaceState(B,"",H),O(N)}}function A(P){o.go(P)}var I={get action(){return c},get location(){return f},createHref:d,push:E,replace:h,go:A,back:function(){A(-1)},forward:function(){A(1)},listen:function(S){return p.push(S)},block:function(S){var N=u.push(S);return u.length===1&&r.addEventListener(Et,gt),function(){N(),u.length||r.removeEventListener(Et,gt)}}};return I}function Ls(e){e===void 0&&(e={});var t=e,n=t.window,r=n===void 0?document.defaultView:n,o=r.history;function s(){var S=Je(r.location.hash.substr(1)),N=S.pathname,C=N===void 0?"/":N,U=S.search,M=U===void 0?"":U,B=S.hash,H=B===void 0?"":B,F=o.state||{};return[F.idx,Ce({pathname:C,search:M,hash:H,state:F.usr||null,key:F.key||"default"})]}var i=null;function a(){if(i)u.call(i),i=null;else{var S=J.Pop,N=s(),C=N[0],U=N[1];if(u.length)if(C!=null){var M=g-C;M&&(i={action:S,location:U,retry:function(){I(M*-1)}},I(M))}else process.env.NODE_ENV!=="production"&&Oe(!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 E(S)}}r.addEventListener(Er,a),r.addEventListener(Us,function(){var S=s(),N=S[1];we(N)!==we(f)&&a()});var c=J.Pop,l=s(),g=l[0],f=l[1],p=Ue(),u=Ue();g==null&&(g=0,o.replaceState(de({},o.state,{idx:g}),""));function d(){var S=document.querySelector("base"),N="";if(S&&S.getAttribute("href")){var C=r.location.href,U=C.indexOf("#");N=U===-1?C:C.slice(0,U)}return N}function R(S){return d()+"#"+(typeof S=="string"?S:we(S))}function m(S,N){return N===void 0&&(N=null),Ce(de({pathname:f.pathname,hash:"",search:""},typeof S=="string"?Je(S):S,{state:N,key:_t()}))}function _(S,N){return[{usr:S.state,key:S.key,idx:N},R(S)]}function O(S,N,C){return!u.length||(u.call({action:S,location:N,retry:C}),!1)}function E(S){c=S;var N=s();g=N[0],f=N[1],p.call({action:c,location:f})}function h(S,N){var C=J.Push,U=m(S,N);function M(){h(S,N)}if(process.env.NODE_ENV!=="production"&&Oe(U.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(S)+")"),O(C,U,M)){var B=_(U,g+1),H=B[0],F=B[1];try{o.pushState(H,"",F)}catch{r.location.assign(F)}E(C)}}function A(S,N){var C=J.Replace,U=m(S,N);function M(){A(S,N)}if(process.env.NODE_ENV!=="production"&&Oe(U.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(S)+")"),O(C,U,M)){var B=_(U,g),H=B[0],F=B[1];o.replaceState(H,"",F),E(C)}}function I(S){o.go(S)}var P={get action(){return c},get location(){return f},createHref:R,push:h,replace:A,go:I,back:function(){I(-1)},forward:function(){I(1)},listen:function(N){return p.push(N)},block:function(N){var C=u.push(N);return u.length===1&&r.addEventListener(Et,gt),function(){C(),u.length||r.removeEventListener(Et,gt)}}};return P}function _r(e){e===void 0&&(e={});var t=e,n=t.initialEntries,r=n===void 0?["/"]:n,o=t.initialIndex,s=r.map(function(E){var h=Ce(de({pathname:"/",search:"",hash:"",state:null,key:_t()},typeof E=="string"?Je(E):E));return process.env.NODE_ENV!=="production"&&Oe(h.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(E)+")"),h}),i=mr(o??s.length-1,0,s.length-1),a=J.Pop,c=s[i],l=Ue(),g=Ue();function f(E){return typeof E=="string"?E:we(E)}function p(E,h){return h===void 0&&(h=null),Ce(de({pathname:c.pathname,search:"",hash:""},typeof E=="string"?Je(E):E,{state:h,key:_t()}))}function u(E,h,A){return!g.length||(g.call({action:E,location:h,retry:A}),!1)}function d(E,h){a=E,c=h,l.call({action:a,location:c})}function R(E,h){var A=J.Push,I=p(E,h);function P(){R(E,h)}process.env.NODE_ENV!=="production"&&Oe(c.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(E)+")"),u(A,I,P)&&(i+=1,s.splice(i,s.length,I),d(A,I))}function m(E,h){var A=J.Replace,I=p(E,h);function P(){m(E,h)}process.env.NODE_ENV!=="production"&&Oe(c.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(E)+")"),u(A,I,P)&&(s[i]=I,d(A,I))}function _(E){var h=mr(i+E,0,s.length-1),A=J.Pop,I=s[h];function P(){_(E)}u(A,I,P)&&(i=h,d(A,I))}var O={get index(){return i},get action(){return a},get location(){return c},createHref:f,push:R,replace:m,go:_,back:function(){_(-1)},forward:function(){_(1)},listen:function(h){return l.push(h)},block:function(h){return g.push(h)}};return O}function mr(e,t,n){return Math.min(Math.max(e,t),n)}function gt(e){e.preventDefault(),e.returnValue=""}function Ue(){var e=[];return{get length(){return e.length},push:function(n){return e.push(n),function(){e=e.filter(function(r){return r!==n})}},call:function(n){e.forEach(function(r){return r&&r(n)})}}}function _t(){return Math.random().toString(36).substr(2,8)}function we(e){var t=e.pathname,n=t===void 0?"/":t,r=e.search,o=r===void 0?"":r,s=e.hash,i=s===void 0?"":s;return o&&o!=="?"&&(n+=o.charAt(0)==="?"?o:"?"+o),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Je(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Vs(e,t,n){const r=y.reactive({...t}),o=a=>{Object.assign(r,{...a})},s=r,i=Rs(e,s,n);return{currentRoute:s,routerRoute:i,updateRoute:o}}function Y(e){return!e.startsWith("http")?xs(e):Ds(e)}function Ds(e){const{protocol:t,host:n,pathname:r,search:o,searchParams:s,hash:i}=new URL(e,e);return{protocol:t,host:n,pathname:r,search:o,searchParams:s,hash:i}}function xs(e){const{pathname:t,search:n,searchParams:r,hash:o}=new URL(e,"https://localhost");return{pathname:t,search:n,searchParams:r,hash:o}}function Ms(e){return t=>{const{host:n}=Y(t);return!(n===void 0||n===e)}}function yr(e){try{const t=e();return Dt(t)?t.catch(n=>n):t}catch(t){return t}}function Bs(){const{setVueApp:e,runWithContext:t}=er(),n=y.reactive(new Map),r=(p,u,d)=>{const{push:R,replace:m,reject:_,update:O}=We({to:u});return u.matches.filter(E=>ar({...d,routePrefetch:E.prefetch},"props")===p).flatMap(E=>g(E)).reduce((E,{id:h,name:A,props:I})=>{if(!I)return E;const P=l(h,A,u),S=t(()=>yr(()=>I(u,{push:R,replace:m,reject:_,update:O,parent:a(u,!0)})));return E[P]=S,E},{})},o=p=>{Object.entries(p).forEach(([u,d])=>{n.set(u,d)})},s=async p=>{const{push:u,replace:d,reject:R,update:m}=We({to:p}),_=p.matches.flatMap(g),O=[],E=[];for(const{id:h,name:A,props:I}of _){if(!I)continue;const P=l(h,A,p);if(O.push(P),!n.has(P)){const S=t(()=>yr(()=>I(p,{push:u,replace:d,reject:R,update:m,parent:a(p)})));n.set(P,S)}E.push((async()=>{const S=await n.get(P);if(S instanceof Error)throw S})())}f(O);try{return await Promise.all(E),{status:"SUCCESS"}}catch(h){if(h instanceof fe||h instanceof Se)return h.response;throw h}},i=(p,u,d)=>{const R=l(p,u,d);return n.get(R)};function a(p,u=!1){const d=p.matches.at(-2);if(d)return Wt(d)?{name:d.name??"",get props(){return c(d,"default",p,u)}}:Jt(d)?{name:d.name??"",props:new Proxy({},{get(R,m){return typeof m!="string"?Reflect.get(R,m):c(d,m,p,u)}})}:{name:d.name??"",props:void 0}}function c(p,u,d,R=!1){const m=i(p.id,u,d);if(R&&!m){const _=p.name??"unknown",O=d.name||"unknown";console.warn(`
|
|
2
|
+
Unable to access parent props "${u}" from route "${_}" while prefetching props for route "${O}".
|
|
3
3
|
This may occur if the parent route's props were not also prefetched.
|
|
4
|
-
`)}return U}function y(c,d,m){return[c,d,m.id,JSON.stringify(m.params)].join("-")}function E(c){return ne(c)?[{id:c.id,name:"default",props:c.props}]:se(c)?Object.entries(c.props).map(([d,m])=>({id:c.id,name:d,props:m})):[]}function h(c){for(const d of r.keys())c.includes(d)||r.delete(d)}return{getPrefetchProps:n,setPrefetchProps:o,getProps:a,setProps:s,setVueApp:t}}function Re(){return typeof window<"u"&&typeof window.document<"u"}function Dn({mode:t,listener:e}){const r=qn(t),n=(u,y)=>{if(y?.replace){r.replace(u,y.state);return}r.push(u,y?.state)},o=()=>{const u=at(r.location);r.replace(u)};let s;return{...r,update:n,refresh:o,startListening:()=>{s?.(),s=r.listen(e)},stopListening:()=>{s?.()}}}function qn(t="auto"){switch(t){case"auto":return Re()?ur():fr();case"browser":return ur();case"memory":return fr();case"hash":return Zn();default:const e=t;throw new Error(`Switch is not exhaustive for mode: ${e}`)}}function ye(t){const e=new URLSearchParams(t);return{get:(...r)=>e.get(...r),getAll:(...r)=>e.getAll(...r),set:(...r)=>{e.set(...r)},append:(...r)=>{e.append(...r)},delete:(...r)=>{e.delete(...r)},toString:(...r)=>e.toString(...r),forEach:(...r)=>{e.forEach(...r)},entries:(...r)=>e.entries(...r),keys:(...r)=>e.keys(...r),values:(...r)=>e.values(...r),has:(...r)=>e.has(...r),size:e.size,sort:()=>{e.sort()},[Symbol.iterator]:()=>e[Symbol.iterator]()}}function Tn(t){const e=s=>{const a=t.find(i=>i.type===s);return p.markRaw(a?.component??qe(s))},r=s=>{const a=p.markRaw(e(s)),i={id:ue(),component:a,meta:{},state:{}};return{id:i.id,matched:i,matches:[i],hooks:[],name:s,query:ye(""),params:{},state:{},href:"/",hash:""}},n=s=>{if(!s){o.value=null;return}const a=e(s);o.value={type:s,component:a}},o=p.ref(null);return{setRejection:n,rejection:o,getRejectionRoute:r}}class Jn extends Error{constructor(){super("initialUrl must be set if window.location is unavailable")}}function Mn(t){if(t)return t;if(Re())return window.location.toString();throw new Jn}function lr(t){return!!t&&typeof t=="object"}const Ht=!0;function _n(t,e,r){if(lr(t)&&e in t){const n=t[e];return typeof n=="string"?X(n,r,Ht):n}return X(void 0,r,Ht)}function hr(t,e){const r={};for(const[n,o]of Object.entries(t)){const s=_n(e,n,o);r[n]=s}return r}function Fn(t,e,r){if(lr(t)&&e in t){const n=t[e];return Q(n,r,Ht)}return Q(void 0,r,Ht)}const Rr=(t,e)=>{const r={};for(const[n,o]of Object.entries(t)){const s=Fn(e,n,o);r[n]=s}return r};function Wn(){const t=p.reactive(new Map),e=Re()?a():null,r=i=>{t.set(i,!1),e?.observe(i)},n=i=>{t.delete(i),e?.unobserve(i)},o=()=>{e?.disconnect()},s=i=>t.get(i)??!1;function a(){return new IntersectionObserver(i=>{i.forEach(u=>{t.set(u.target,u.isIntersecting)})})}return{observe:r,unobserve:n,disconnect:o,isElementVisible:s}}class Gn extends Error{constructor(e){super(`Route not found: "${e}"`)}}function yr(t,e,r){const n=Wr(e.value,r),o=Ze(n),[s]=je(t,new RegExp(o,"g"));return s}function mr(t,e,r,n){const o=Xt(e,r),s=Q(n,e.params[r],o);return t.replace(Oe(r),s)}function gr({protocol:t,host:e,pathname:r,search:n,searchParams:o,hash:s}){const a=new URL("https://localhost");t&&(a.protocol=t),e&&(a.host=e),r&&(a.pathname=r),o?a.search=new URLSearchParams(o).toString():n&&(a.search=n),s&&(a.hash=s);const i=a.toString().replace(/^https:\/\/localhost\/*/,"/");return ie(i)}function Qn(t,e={}){const{params:r={},query:n}=e,o=Yn(t.query,r),s=he(o,n),a=wr(t.path,r),i=t.hash.value?wr(t.hash,r):e.hash,u=zn(t.host,r),{protocol:y,host:E}=T(u);return gr({protocol:y,host:E,pathname:a,searchParams:s,hash:i})}function zn(t,e){const r=t.value&&!t.value.startsWith("http")?`https://${t.value}`:t.value;return Object.keys(t.params).reduce((n,o)=>mr(n,t,o,e[o]),r)}function wr(t,e){return Object.keys(t.params).reduce((r,n)=>mr(r,t,n,e[n]),t.value)}function Yn(t,e){const r=new URLSearchParams(t.value);if(!t.value)return r;for(const[n,o]of Array.from(r.entries())){const s=te(o);if(!s)continue;const i=Kt(o),u=Q(e[s],t.params[s],i),y=e[s]===void 0&&u==="";i&&y?r.delete(n,o):r.set(n,u)}return r}const Xn=(t,e)=>{try{me(t,e)}catch{return!1}return!0},me=(t,e)=>{const{protocol:r,host:n,pathname:o,search:s,hash:a}=T(e);return{...ge(t.host,`${r}//${n}`),...ge(t.path,o),...Kn(t.query,s),...ge(t.hash,a)}};function ge(t,e){const r={},n=decodeURIComponent(e);for(const[o,s]of Object.entries(t.params)){const a=yr(n,t,o),i=Xt(t,o),u=X(a,s,i);r[o]=u}return r}function Kn(t,e){const r={},n=new URLSearchParams(t.value),o=new URLSearchParams(e);for(const[s,a]of Array.from(n.entries())){const i=te(a);if(!i)continue;const y=Kt(a),E=o.get(s)??void 0,h=X(E,t.params[i],y);r[i]=h}return r}function to(t,e={},r={}){const n=Qn(t,{params:e,query:r.query,hash:r.hash}),{search:o,hash:s}=T(n);return{id:t.id,matched:t.matched,matches:t.matches,name:t.name,hooks:t.hooks,query:ye(o),params:me(t,n),state:hr(t.state,r.state),hash:s,href:n}}const $t={template:"<div>This is component</div>"},we=nt({name:"parentA",path:"/parentA/[paramA]"}),Er=nt({parent:we,name:"parentA.childA",path:"/childA/[?paramB]"}),eo=nt({parent:we,name:"parentA.childB",path:"/childB/[paramD]",component:$t}),ro=nt({parent:Er,name:"parentA.childA.grandChildA",path:"/[paramC]",component:$t});nt({name:"parentB",path:"/parentB",component:$t}),nt({name:"parentC",path:"/",component:$t});const no=t=>"name"in t.matched&&!!t.matched.name,Sr=(t,e)=>{const{protocol:r,host:n}=T(e),o=!n;return t.host.value?Mr(t).test(`${r}//${n}`):o},oo=(t,e)=>{const{pathname:r}=T(e);return _r(t).test(r)},so=(t,e)=>{const{search:r}=T(e);return Fr(t).every(o=>o.test(r))},Ee=(t,e)=>{const{hash:r}=T(e),{value:n}=t.hash;return _(n)?`#${n.replace(/^#*/,"")}`.toLowerCase()===r.toLowerCase():!0};function ao(t){const{searchParams:e,pathname:r}=T(t),n=-1,o=1;return(s,a)=>{const i=br(s,e),u=Pr(s,r),y=br(a,e),E=Pr(a,r);return s.depth>a.depth?n:s.depth<a.depth?o:i+u>y+E?n:i+u<y+E?o:Sr(s,t)?n:Sr(a,t)?o:Ee(s,t)?n:Ee(a,t)?o:0}}function Pr(t,e){const r=Object.keys(t.path.params).filter(o=>Xt(t.path,o)).map(o=>o),n=r.filter(o=>yr(e,t.path,o)===void 0);return r.length-n.length}function br(t,e){const r=new URLSearchParams(e),n=new URLSearchParams(t.query.value),o=Array.from(n.keys()),s=o.filter(a=>!r.has(a));return o.length-s.length}const io=[no,oo,so,Ee,Xn];function co(t,e){const r=ao(e);return t.filter(n=>io.every(o=>o(n,e))).sort(r)}function uo(t,e,r){const n=co(t,e);if(!n.length)return;const[o]=n,{searchParams:s,hash:a}=T(e);return{id:o.id,matched:o.matched,matches:o.matches,name:o.name,hooks:o.hooks,query:ye(s),params:me(o,e),state:hr(o.state,r),hash:a,href:ie(e)}}function vr(t,e){const r=typeof t=="string"?T(t):t,n=typeof e=="string"?T(e):e,o=r.searchParams??new URLSearchParams(r.search),s=n.searchParams??new URLSearchParams(n.search);return gr({protocol:_(n.protocol)?n.protocol:r.protocol,host:_(n.host)?n.host:r.host,pathname:_(n.pathname)?n.pathname:r.pathname,searchParams:he(s,o),hash:_(n.hash)?n.hash:r.hash})}function fo(t,e){return _(e)?t.map(r=>{const n=`${e}${r.path.value}`;return{...r,path:tt(n,r.path.params)}}):t}class po extends Error{constructor(e){super(`Invalid Name "${e}": Router does not support multiple routes with the same name. All name names must be unique.`)}}function lo(t){const e=t.map(({name:r})=>r);for(const r of e)if(ve(e,r)>1)throw new po(r)}class ho extends Error{constructor(e){super(`Missing Route Context: Router is missing the route "${e}", which was declared as context for at least one route.`)}}function Ro(t){const e=new Set(t.map(n=>n.id)),r=t.flatMap(n=>n.context).filter(yo);for(const n of r)if(!e.has(n.id))throw new ho(n.name)}function yo(t){return"id"in t}function mo(t,e=[],r){const n=[...t,...e.map(o=>o.routes)].flat().filter(o=>_(o.name));return lo(n),Ro(n),fo(n,r)}function go(t=[]){const e=new rt;return t.forEach(r=>{r.hooks.onBeforeRouteEnter.forEach(n=>e.onBeforeRouteEnter.add(n)),r.hooks.onBeforeRouteUpdate.forEach(n=>e.onBeforeRouteUpdate.add(n)),r.hooks.onBeforeRouteLeave.forEach(n=>e.onBeforeRouteLeave.add(n)),r.hooks.onAfterRouteEnter.forEach(n=>e.onAfterRouteEnter.add(n)),r.hooks.onAfterRouteUpdate.forEach(n=>e.onAfterRouteUpdate.add(n)),r.hooks.onAfterRouteLeave.forEach(n=>e.onAfterRouteLeave.add(n))}),e}function wo(t,{match:e,name:r,component:n}){const o=Ke(t),s=xt(t);return p.defineComponent({name:"PropsWrapper",expose:[],setup(){const a=p.getCurrentInstance(),i=o(),u=s();return()=>{const y=i.getProps(e.id,r,u);return y instanceof Error?"":Mt(y)?a?.suspense?p.h(So,{component:n,props:y}):p.h(Eo,{component:n,props:y}):p.h(n,y)}}})}const Eo=p.defineComponent(t=>{const e=p.ref();return p.watch(()=>t.props,async r=>{e.value=await r},{immediate:!0,deep:!0}),()=>e.value instanceof Error?"":e.value?p.h(t.component,e.value):""},{props:["component","props"]}),So=p.defineComponent(async t=>{const e=p.ref();return e.value=await t.props,p.watch(()=>e.value,async r=>{e.value=await r},{deep:!0}),()=>e.value instanceof Error?"":e.value?p.h(t.component,e.value):""},{props:["component","props"]});function Po(t){const e=new Map;return{getRouteComponents:n=>{const o=e.get(n.id);if(o)return o;const s=bo(t,n);return e.set(n.id,s),s}}}function bo(t,e){const r=de(t);return oe(e)?Ar(t,e,e.components):re(e)?Ar(t,e,{default:e.component}):{default:r}}function Ar(t,e,r){return Object.fromEntries(Object.entries(r).map(([n,o])=>[n,wo(t,{match:e,name:n,component:o})]))}const kr=Symbol();function vo(t,e,r=[]){const o=e?.isGlobalRouter??!0?kr:Symbol(),s=[...r.flatMap(A=>A.rejections),...e?.rejections??[]],a=mo(t,r,e?.base),i=Rn();i.addGlobalRouteHooks(go(r));const u=ce(),y=$n(),E=Po(o),h=Wn(),c=Dn({mode:e?.historyMode,listener:({location:A})=>{const x=at(A);m(x,{state:A.state,replace:!0})}});function d(A,x={}){return uo(a,A,x.state)}async function m(A,x={}){const J=u();c.stopListening();const M=d(A,x)??L("NotFound"),O=Ho(J),H=await i.runBeforeRouteHooks({to:M,from:O});switch(H.status){case"ABORT":return;case"PUSH":c.update(A,x),await v(...H.to);return;case"REJECT":c.update(A,x),f(H.type);break;case"SUCCESS":c.update(A,x),f(null);break;default:throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(H)}`)}$(A)||k(J,M,O);const Rt=await i.runAfterRouteHooks({to:M,from:O});switch(Rt.status){case"PUSH":await v(...Rt.to);break;case"REJECT":f(Rt.type);break;case"SUCCESS":break;default:const it=Rt;throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(it)}`)}c.startListening()}function k(A,x,J){const M=A;y.setProps(x).then(O=>{if(M===A)switch(O.status){case"SUCCESS":break;case"PUSH":v(...O.to);break;case"REJECT":f(O.type);break;default:const H=O;throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(H)}`)}}).catch(O=>{try{i.runErrorHooks(O,{to:x,from:J,source:"props"})}catch(H){if(H instanceof z){v(...H.response.to);return}if(H instanceof ot){f(H.response.type);return}throw H}}),B(x)}const U=(A,x={},J={})=>{const M=a.find(O=>O.name===A);if(!M)throw new Gn(A);return to(M,x,J)},v=(A,x,J)=>{if(F(A)){const it={...x},Dt=vr(A,{searchParams:it.query,hash:it.hash});return m(Dt,it)}if(typeof A=="string"){const{replace:it,...Dt}={...J},Do={...x},Pe=U(A,Do,Dt),qo=Rr({...Pe.matched.state},{...Pe.state,...Dt.state});return m(Pe.href,{replace:it,state:qo})}const{replace:M,...O}={...x},H=Rr({...A.matched.state},{...A.state,...O.state}),Rt=vr(A.href,{searchParams:O.query,hash:O.hash});return m(Rt,{replace:M,state:H})},g=(A,x,J)=>{if(F(A)){const O={...x,replace:!0};return v(A,O)}if(typeof A=="string"){const O={...J,replace:!0},H={...x};return v(A,H,O)}const M={...x,replace:!0};return v(A,M)},l=A=>{f(A)},{setRejection:f,rejection:S,getRejectionRoute:L}=Tn(s),P=L("NotFound"),{currentRoute:R,routerRoute:b,updateRoute:B}=On(o,P,v),C=Mn(e?.initialUrl),Z=c.location.state,{host:I}=T(C),$=Hn(I);let q=!1;const At=p.ref(!1),{promise:Se,resolve:jo}=Promise.withResolvers();async function Ur(){if(q)return Se;q=!0,Or(a)&&await jr(),await m(C,{replace:!0,state:Z}),c.startListening(),jo(),At.value=!0}function Io(){c.stopListening()}function Ho(A){return an(A)?null:{...R}}function $o(A){i.setVueApp(A),y.setVueApp(A);const x=de(o),J=sr(o);A.component("RouterView",x),A.component("RouterLink",J),A.provide(ze(o),S),A.provide(_e(o),i),A.provide(Xe(o),y),A.provide(Qe(o),E),A.provide(rr,h),A.provide(o,Lr),Ur()}const Lr={route:b,resolve:U,find:d,push:v,replace:g,reject:l,refresh:c.refresh,forward:c.forward,back:c.back,go:c.go,install:$o,isExternal:$,onBeforeRouteEnter:i.onBeforeRouteEnter,onBeforeRouteUpdate:i.onBeforeRouteUpdate,onBeforeRouteLeave:i.onBeforeRouteLeave,onAfterRouteEnter:i.onAfterRouteEnter,onAfterRouteUpdate:i.onAfterRouteUpdate,onAfterRouteLeave:i.onAfterRouteLeave,onError:i.onError,prefetch:e?.prefetch,start:Ur,started:At,stop:Io,key:o};return Lr}const W=ar(kr),Ao=W.onBeforeRouteLeave,ko=W.onBeforeRouteUpdate,Uo=W.onAfterRouteLeave,Lo=W.onAfterRouteUpdate,Vo=W.isRoute,Bo=W.RouterView,Co=W.RouterLink,No=W.useRoute,xo=W.useRouter,Zo=W.useQueryValue,Oo=W.useLink;V.DuplicateParamsError=be,V.MetaPropertyConflict=He,V.RouterLink=Co,V.RouterNotInstalledError=et,V.RouterView=Bo,V.UseRouteInvalidError=$e,V.arrayOf=Bn,V.asUrl=ie,V.combineRoutes=ae,V.createExternalRoute=un,V.createParam=ke,V.createRejection=cn,V.createRoute=nt,V.createRouter=vo,V.createRouterAssets=ar,V.createRouterPlugin=Ln,V.isRoute=Vo,V.isUrl=F,V.isWithComponent=re,V.isWithComponentProps=ne,V.isWithComponentPropsRecord=se,V.isWithComponents=oe,V.isWithParent=ee,V.onAfterRouteLeave=Uo,V.onAfterRouteUpdate=Lo,V.onBeforeRouteLeave=Ao,V.onBeforeRouteUpdate=ko,V.tupleOf=Nn,V.unionOf=ir,V.useLink=Oo,V.useQueryValue=Zo,V.useRoute=No,V.useRouter=xo,V.withDefault=Nr,V.withParams=tt,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
|
|
4
|
+
`)}return m}function l(p,u,d){return[p,u,d.id,JSON.stringify(d.params)].join("-")}function g(p){return Wt(p)?[{id:p.id,name:"default",props:p.props}]:Jt(p)?Object.entries(p.props).map(([u,d])=>({id:p.id,name:u,props:d})):[]}function f(p){for(const u of n.keys())p.includes(u)||n.delete(u)}return{getPrefetchProps:r,setPrefetchProps:o,getProps:i,setProps:s,setVueApp:e}}function mt(){return typeof window<"u"&&typeof window.document<"u"}function Hs({mode:e,listener:t}){const n=js(e),r=(c,l)=>{if(l?.replace){n.replace(c,l.state);return}n.push(c,l?.state)},o=()=>{const c=we(n.location);n.replace(c)};let s;return{...n,update:r,refresh:o,startListening:()=>{s?.(),s=n.listen(t)},stopListening:()=>{s?.()}}}function js(e="auto"){switch(e){case"auto":return mt()?gr():_r();case"browser":return gr();case"memory":return _r();case"hash":return Ls();default:const t=e;throw new Error(`Switch is not exhaustive for mode: ${t}`)}}function on(e){const t=new URLSearchParams(e);return{get:(...n)=>t.get(...n),getAll:(...n)=>t.getAll(...n),set:(...n)=>{t.set(...n)},append:(...n)=>{t.append(...n)},delete:(...n)=>{t.delete(...n)},toString:(...n)=>t.toString(...n),forEach:(...n)=>{t.forEach(...n)},entries:(...n)=>t.entries(...n),keys:(...n)=>t.keys(...n),values:(...n)=>t.values(...n),has:(...n)=>t.has(...n),size:t.size,sort:()=>{t.sort()},[Symbol.iterator]:()=>t[Symbol.iterator]()}}function Zs(e){const t=s=>{const i=e.find(a=>a.type===s);return y.markRaw(i?.component??Yn(s))},n=s=>{const i=y.markRaw(t(s)),a={id:Xt(),component:i,meta:{},state:{}};return{id:a.id,matched:a,matches:[a],hooks:[],name:s,query:on(""),params:{},state:{},href:"/",hash:""}},r=s=>{if(!s){o.value=null;return}const i=t(s);o.value={type:s,component:i}},o=y.ref(null);return{setRejection:r,rejection:o,getRejectionRoute:n}}class Gs extends Error{constructor(){super("initialUrl must be set if window.location is unavailable")}}function Fs(e){if(e)return e;if(mt())return window.location.toString();throw new Gs}function Rr(e){return!!e&&typeof e=="object"}const yt=!0;function zs(e,t,n){if(Rr(e)&&t in e){const r=e[t];return typeof r=="string"?Ee(r,n,yt):r}return Ee(void 0,n,yt)}function Sr(e,t){const n={};for(const[r,o]of Object.entries(e)){const s=zs(t,r,o);n[r]=s}return n}function $s(e,t,n){if(Rr(e)&&t in e){const r=e[t];return ue(r,n,yt)}return ue(void 0,n,yt)}const Or=(e,t)=>{const n={};for(const[r,o]of Object.entries(e)){const s=$s(t,r,o);n[r]=s}return n};function qs(){const e=y.reactive(new Map),t=mt()?i():null,n=a=>{e.set(a,!1),t?.observe(a)},r=a=>{e.delete(a),t?.unobserve(a)},o=()=>{t?.disconnect()},s=a=>e.get(a)??!1;function i(){return new IntersectionObserver(a=>{a.forEach(c=>{e.set(c.target,c.isIntersecting)})})}return{observe:n,unobserve:r,disconnect:o,isElementVisible:s}}class Ws extends Error{constructor(t){super(`Route not found: "${t}"`)}}function wr(e,t,n){const r=zo(t.value,n),o=jn(r),[s]=Gn(e,new RegExp(o,"g"));return s}function Tr(e,t,n,r){const o=Gt(t,n),s=ue(r,t.params[n],o);return e.replace(Zn(n),s)}function Pr({protocol:e,host:t,pathname:n,search:r,searchParams:o,hash:s}){const i=new URL("https://localhost");e&&(i.protocol=e),t&&(i.host=t),n&&(i.pathname=n),o?i.search=new URLSearchParams(o).toString():r&&(i.search=r),s&&(i.hash=s);const a=i.toString().replace(/^https:\/\/localhost\/*/,"/");return Qt(a)}function Ks(e,t={}){const{params:n={},query:r}=t,o=Ys(e.query,n),s=rn(o,r),i=Nr(e.path,n),a=e.hash.value?Nr(e.hash,n):t.hash,c=Js(e.host,n),{protocol:l,host:g}=Y(c);return Pr({protocol:l,host:g,pathname:i,searchParams:s,hash:a})}function Js(e,t){const n=e.value&&!e.value.startsWith("http")?`https://${e.value}`:e.value;return Object.keys(e.params).reduce((r,o)=>Tr(r,e,o,t[o]),n)}function Nr(e,t){return Object.keys(e.params).reduce((n,r)=>Tr(n,e,r,t[r]),e.value)}function Ys(e,t){const n=new URLSearchParams(e.value);if(!e.value)return n;for(const[r,o]of Array.from(n.entries())){const s=zt(o);if(!s)continue;const a=Ft(o),c=ue(t[s],e.params[s],a),l=t[s]===void 0&&c==="";a&&l?n.delete(r,o):n.set(r,c)}return n}const Qs=(e,t)=>{try{sn(e,t)}catch{return!1}return!0},sn=(e,t)=>{const{protocol:n,host:r,pathname:o,search:s,hash:i}=Y(t);return{...an(e.host,`${n}//${r}`),...an(e.path,o),...Xs(e.query,s),...an(e.hash,i)}};function an(e,t){const n={},r=decodeURIComponent(t);for(const[o,s]of Object.entries(e.params)){const i=wr(r,e,o),a=Gt(e,o),c=Ee(i,s,a);n[o]=c}return n}function Xs(e,t){const n={},r=new URLSearchParams(e.value),o=new URLSearchParams(t);for(const[s,i]of Array.from(r.entries())){const a=zt(i);if(!a)continue;const l=Ft(i),g=o.get(s)??void 0,f=Ee(g,e.params[a],l);n[a]=f}return n}function ei(e,t={},n={}){const r=Ks(e,{params:t,query:n.query,hash:n.hash}),{search:o,hash:s}=Y(r);return{id:e.id,matched:e.matched,matches:e.matches,name:e.name,hooks:e.hooks,query:on(o),params:sn(e,r),state:Sr(e.state,n.state),hash:s,href:r}}const ti=(e,t)=>{const{protocol:n,host:r}=Y(t);return jo(e).test(`${n}//${r}`)},ni=(e,t)=>{const{pathname:n}=Y(t);return Zo(e).test(n)},ri=(e,t)=>{const{search:n}=Y(t);return Fo(e).every(o=>o.test(n))},oi=(e,t)=>{const{hash:n}=Y(t);return Go(e).test(n)};function br(e){return"name"in e&&K(e.name)}const Rt=-1,St=1;function si(e){const{searchParams:t,pathname:n}=Y(e);return(r,o)=>{const s=ii(r,o);if(s!==0)return s;const i=ci(r,o);if(i!==0)return i;const a=ui(r,o);if(a!==0)return a;const c=ai(r,o,t,n);return c!==0?c:0}}function ii(e,t){return e.depth>t.depth?Rt:e.depth<t.depth?St:0}function ai(e,t,n,r){const o=Ir(e,n),s=Ar(e,r),i=Ir(t,n),a=Ar(t,r);return o+s>i+a?Rt:o+s<i+a?St:0}function ci(e,t){const n=K(e.host.value),r=K(t.host.value);return n&&!r?Rt:!n&&r?St:0}function ui(e,t){const n=K(e.hash.value),r=K(t.hash.value);return n&&!r?Rt:!n&&r?St:0}function Ar(e,t){const n=Object.keys(e.path.params).filter(o=>Gt(e.path,o)).map(o=>o),r=n.filter(o=>wr(t,e.path,o)===void 0);return n.length-r.length}function Ir(e,t){const n=new URLSearchParams(t),r=new URLSearchParams(e.query.value),o=Array.from(r.keys()),s=o.filter(i=>!n.has(i));return o.length-s.length}const fi=[br,ti,ni,ri,oi,Qs];function li(e,t){const n=si(t);return e.filter(r=>fi.every(o=>o(r,t))).sort(n)}function di(e,t,n){const r=li(e,t);if(!r.length)return;const[o]=r,{searchParams:s,hash:i}=Y(t);return{id:o.id,matched:o.matched,matches:o.matches,name:o.name,hooks:o.hooks,query:on(s),params:sn(o,t),state:Sr(o.state,n),hash:i,href:Qt(t)}}function vr(e,t){const n=typeof e=="string"?Y(e):e,r=typeof t=="string"?Y(t):t,o=n.searchParams??new URLSearchParams(n.search),s=r.searchParams??new URLSearchParams(r.search);return Pr({protocol:K(r.protocol)?r.protocol:n.protocol,host:K(r.host)?r.host:n.host,pathname:K(r.pathname)?r.pathname:n.pathname,searchParams:rn(s,o),hash:K(r.hash)?r.hash:n.hash})}class pi 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 hi(e,t){if(!K(t))return e;const n=`${t}${e.path.value}`;return{...e,path:_e(n,e.path.params)}}function Ei(e,t=[],n){const r=new Map,o=[...e,...t.map(a=>a.routes)];function s(a){if(!br(a))return;const c=r.get(a.name);if(c&&c.id!==a.id)throw new pi(a.name);if(!(c&&c.id===a.id)){hi(a,n),r.set(a.name,a);for(const l of a.context)gi(l)&&s(l)}}function i(a){for(const c of a)s(c)}for(const a of o){if(_i(a)){i(a);continue}s(a)}return Array.from(r.values())}function gi(e){return"id"in e}function _i(e){return Array.isArray(e)}function mi(e=[]){const t=new ye;return e.forEach(n=>{n.hooks.onBeforeRouteEnter.forEach(r=>t.onBeforeRouteEnter.add(r)),n.hooks.onBeforeRouteUpdate.forEach(r=>t.onBeforeRouteUpdate.add(r)),n.hooks.onBeforeRouteLeave.forEach(r=>t.onBeforeRouteLeave.add(r)),n.hooks.onAfterRouteEnter.forEach(r=>t.onAfterRouteEnter.add(r)),n.hooks.onAfterRouteUpdate.forEach(r=>t.onAfterRouteUpdate.add(r)),n.hooks.onAfterRouteLeave.forEach(r=>t.onAfterRouteLeave.add(r))}),t}function yi(e,{match:t,name:n,component:r}){const o=ir(e),s=pt(e);return y.defineComponent({name:"PropsWrapper",expose:[],setup(){const i=y.getCurrentInstance(),a=o(),c=s();return()=>{const l=a.getProps(t.id,n,c);return l instanceof Error?"":Dt(l)?i?.suspense?y.h(Si,{component:r,props:l}):y.h(Ri,{component:r,props:l}):y.h(r,l)}}})}const Ri=y.defineComponent(e=>{const t=y.ref();return y.watch(()=>e.props,async n=>{t.value=await n},{immediate:!0,deep:!0}),()=>t.value instanceof Error?"":t.value?y.h(e.component,t.value):""},{props:["component","props"]}),Si=y.defineComponent(async e=>{const t=y.ref();return t.value=await e.props,y.watch(()=>t.value,async n=>{t.value=await n},{deep:!0}),()=>t.value instanceof Error?"":t.value?y.h(e.component,t.value):""},{props:["component","props"]});function Oi(e){const t=new Map;return{getRouteComponents:r=>{const o=t.get(r.id);if(o)return o;const s=wi(e,r);return t.set(r.id,s),s}}}function wi(e,t){const n=tn(e);return Kt(t)?kr(e,t,t.components):qt(t)?kr(e,t,{default:t.component}):{default:n}}function kr(e,t,n){return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,yi(e,{match:t,name:r,component:o})]))}const Cr=Symbol();var Ti=Object.create,Ur=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,Lr=Object.getOwnPropertyNames,Ni=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty,Ai=(e,t)=>function(){return t||(0,e[Lr(e)[0]])((t={exports:{}}).exports,t),t.exports},Ii=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Lr(t),s=0,i=o.length,a;s<i;s++)a=o[s],!bi.call(e,a)&&a!==n&&Ur(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(r=Pi(t,a))||r.enumerable});return e},vi=(e,t,n)=>(n=e!=null?Ti(Ni(e)):{},Ii(Ur(n,"default",{value:e,enumerable:!0}),e));const Vr=typeof navigator<"u",w=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof w.chrome<"u"&&w.chrome.devtools,Vr&&(w.self,w.top),typeof navigator<"u"&&navigator.userAgent?.toLowerCase().includes("electron");var ki=Ai({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js":((e,t)=>{t.exports=r;function n(s){return s instanceof Buffer?Buffer.from(s):new s.constructor(s.buffer.slice(),s.byteOffset,s.length)}function r(s){if(s=s||{},s.circles)return o(s);const i=new Map;if(i.set(Date,f=>new Date(f)),i.set(Map,(f,p)=>new Map(c(Array.from(f),p))),i.set(Set,(f,p)=>new Set(c(Array.from(f),p))),s.constructorHandlers)for(const f of s.constructorHandlers)i.set(f[0],f[1]);let a=null;return s.proto?g:l;function c(f,p){const u=Object.keys(f),d=new Array(u.length);for(let R=0;R<u.length;R++){const m=u[R],_=f[m];typeof _!="object"||_===null?d[m]=_:_.constructor!==Object&&(a=i.get(_.constructor))?d[m]=a(_,p):ArrayBuffer.isView(_)?d[m]=n(_):d[m]=p(_)}return d}function l(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return c(f,l);if(f.constructor!==Object&&(a=i.get(f.constructor)))return a(f,l);const p={};for(const u in f){if(Object.hasOwnProperty.call(f,u)===!1)continue;const d=f[u];typeof d!="object"||d===null?p[u]=d:d.constructor!==Object&&(a=i.get(d.constructor))?p[u]=a(d,l):ArrayBuffer.isView(d)?p[u]=n(d):p[u]=l(d)}return p}function g(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return c(f,g);if(f.constructor!==Object&&(a=i.get(f.constructor)))return a(f,g);const p={};for(const u in f){const d=f[u];typeof d!="object"||d===null?p[u]=d:d.constructor!==Object&&(a=i.get(d.constructor))?p[u]=a(d,g):ArrayBuffer.isView(d)?p[u]=n(d):p[u]=g(d)}return p}}function o(s){const i=[],a=[],c=new Map;if(c.set(Date,u=>new Date(u)),c.set(Map,(u,d)=>new Map(g(Array.from(u),d))),c.set(Set,(u,d)=>new Set(g(Array.from(u),d))),s.constructorHandlers)for(const u of s.constructorHandlers)c.set(u[0],u[1]);let l=null;return s.proto?p:f;function g(u,d){const R=Object.keys(u),m=new Array(R.length);for(let _=0;_<R.length;_++){const O=R[_],E=u[O];if(typeof E!="object"||E===null)m[O]=E;else if(E.constructor!==Object&&(l=c.get(E.constructor)))m[O]=l(E,d);else if(ArrayBuffer.isView(E))m[O]=n(E);else{const h=i.indexOf(E);h!==-1?m[O]=a[h]:m[O]=d(E)}}return m}function f(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return g(u,f);if(u.constructor!==Object&&(l=c.get(u.constructor)))return l(u,f);const d={};i.push(u),a.push(d);for(const R in u){if(Object.hasOwnProperty.call(u,R)===!1)continue;const m=u[R];if(typeof m!="object"||m===null)d[R]=m;else if(m.constructor!==Object&&(l=c.get(m.constructor)))d[R]=l(m,f);else if(ArrayBuffer.isView(m))d[R]=n(m);else{const _=i.indexOf(m);_!==-1?d[R]=a[_]:d[R]=f(m)}}return i.pop(),a.pop(),d}function p(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return g(u,p);if(u.constructor!==Object&&(l=c.get(u.constructor)))return l(u,p);const d={};i.push(u),a.push(d);for(const R in u){const m=u[R];if(typeof m!="object"||m===null)d[R]=m;else if(m.constructor!==Object&&(l=c.get(m.constructor)))d[R]=l(m,p);else if(ArrayBuffer.isView(m))d[R]=n(m);else{const _=i.indexOf(m);_!==-1?d[R]=a[_]:d[R]=p(m)}}return i.pop(),a.pop(),d}}})}),Ci=vi(ki());const Ui=/(?:^|[-_/])(\w)/g;function Li(e,t){return t?t.toUpperCase():""}function Vi(e){return e&&`${e}`.replace(Ui,Li)}function Di(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),o=n.substring(r+1);{const s=o.lastIndexOf(t);return o.substring(0,s)}}const Dr=(0,Ci.default)({circles:!0}),xi={trailing:!0};function Le(e,t=25,n={}){if(n={...xi,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,s=[],i,a;const c=(f,p)=>(i=Mi(e,f,p),i.finally(()=>{if(i=null,n.trailing&&a&&!o){const u=c(f,a);return a=null,u}}),i),l=function(...f){return n.trailing&&(a=f),i||new Promise(p=>{const u=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const d=n.leading?r:c(this,f);a=null;for(const R of s)R(d);s=[]},t),u?(r=c(this,f),p(r)):s.push(p)})},g=f=>{f&&(clearTimeout(f),o=null)};return l.isPending=()=>!!o,l.cancel=()=>{g(o),s=[],a=null},l.flush=()=>{if(g(o),!a||i)return;const f=a;return a=null,c(this,f)},l}async function Mi(e,t,n){return await e.apply(t,n)}function cn(e,t={},n){for(const r in e){const o=e[r],s=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?cn(o,t,s):typeof o=="function"&&(t[s]=o)}return t}const Bi={run:e=>e()},Hi=()=>Bi,xr=typeof console.createTask<"u"?console.createTask:Hi;function ji(e,t){const n=t.shift(),r=xr(n);return e.reduce((o,s)=>o.then(()=>r.run(()=>s(...t))),Promise.resolve())}function Zi(e,t){const n=t.shift(),r=xr(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function un(e,t){for(const n of[...e])n(t)}class Gi{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let i=s.message;i||(i=`${o} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,o=(...s)=>(typeof r=="function"&&r(),r=void 0,o=void 0,n(...s));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=cn(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of r.splice(0,r.length))o()}}removeHooks(t){const n=cn(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(ji,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Zi,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&un(this._before,o);const s=t(n in this._hooks?[...this._hooks[n]]:[],r);return s instanceof Promise?s.finally(()=>{this._after&&o&&un(this._after,o)}):(this._after&&o&&un(this._after,o),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Mr(){return new Gi}var Fi=Object.create,Br=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Hr=Object.getOwnPropertyNames,$i=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty,jr=(e,t)=>function(){return t||(0,e[Hr(e)[0]])((t={exports:{}}).exports,t),t.exports},Wi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Hr(t),s=0,i=o.length,a;s<i;s++)a=o[s],!qi.call(e,a)&&a!==n&&Br(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(r=zi(t,a))||r.enumerable});return e},Ki=(e,t,n)=>(n=e!=null?Fi($i(e)):{},Wi(Br(n,"default",{value:e,enumerable:!0}),e));function Ji(e){const t=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return t==="index"&&e.__file?.endsWith("index.vue")?"":t}function Yi(e){const t=e.__file;if(t)return Vi(Di(t,".vue"))}function Zr(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function fn(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function Gr(e){const t=e.subTree?.type,n=fn(e);return n?n?.types?.Fragment===t:!1}function Ot(e){const t=Ji(e?.type||{});if(t)return t;if(e?.root===e)return"Root";for(const r in e.parent?.type?.components)if(e.parent.type.components[r]===e?.type)return Zr(e,r);for(const r in e.appContext?.components)if(e.appContext.components[r]===e?.type)return Zr(e,r);const n=Yi(e?.type||{});return n||"Anonymous Component"}function Qi(e){return`${e?.appContext?.app?.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__??0}:${e===e?.root?"root":e.uid}`}function ln(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function Xi(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}let wt;function ea(e){return wt||(wt=document.createRange()),wt.selectNode(e),wt.getBoundingClientRect()}function ta(e){const t=Xi();if(!e.children)return t;for(let n=0,r=e.children.length;n<r;n++){const o=e.children[n];let s;if(o.component)s=Te(o.component);else if(o.el){const i=o.el;i.nodeType===1||i.getBoundingClientRect?s=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(s=ea(i))}s&&na(t,s)}return t}function na(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}const Fr={top:0,left:0,right:0,bottom:0,width:0,height:0};function Te(e){const t=e.subTree.el;return typeof window>"u"?Fr:Gr(e)?ta(e.subTree):t?.nodeType===1?t?.getBoundingClientRect():e.subTree.component?Te(e.subTree.component):Fr}function dn(e){return Gr(e)?ra(e.subTree):e.subTree?[e.subTree.el]:[]}function ra(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...dn(n.component)):n?.el&&t.push(n.el)}),t}const zr="__vue-devtools-component-inspector__",$r="__vue-devtools-component-inspector__card__",qr="__vue-devtools-component-inspector__name__",Wr="__vue-devtools-component-inspector__indicator__",Kr={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},oa={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},sa={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Ve(){return document.getElementById(zr)}function ia(){return document.getElementById($r)}function aa(){return document.getElementById(Wr)}function ca(){return document.getElementById(qr)}function pn(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function hn(e){const t=document.createElement("div");t.id=e.elementId??zr,Object.assign(t.style,{...Kr,...pn(e.bounds),...e.style});const n=document.createElement("span");n.id=$r,Object.assign(n.style,{...oa,top:e.bounds.top<35?0:"-35px"});const r=document.createElement("span");r.id=qr,r.innerHTML=`<${e.name}> `;const o=document.createElement("i");return o.id=Wr,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(o.style,sa),n.appendChild(r),n.appendChild(o),t.appendChild(n),document.body.appendChild(t),t}function En(e){const t=Ve(),n=ia(),r=ca(),o=aa();t&&(Object.assign(t.style,{...Kr,...pn(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),r.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function ua(e){const t=Te(e);if(!t.width&&!t.height)return;const n=Ot(e);Ve()?En({bounds:t,name:n}):hn({bounds:t,name:n})}function Jr(){const e=Ve();e&&(e.style.display="none")}let gn=null;function _n(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(gn=n,n.vnode.el)){const r=Te(n),o=Ot(n);Ve()?En({bounds:r,name:o}):hn({bounds:r,name:o})}}}function fa(e,t){e.preventDefault(),e.stopPropagation(),gn&&t(Qi(gn))}let Tt=null;function la(){Jr(),window.removeEventListener("mouseover",_n),window.removeEventListener("click",Tt,!0),Tt=null}function da(){return window.addEventListener("mouseover",_n),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),fa(n,r=>{window.removeEventListener("click",t,!0),Tt=null,window.removeEventListener("mouseover",_n);const o=Ve();o&&(o.style.display="none"),e(JSON.stringify({id:r}))})}Tt=t,window.addEventListener("click",t,!0)})}function pa(e){const t=ln(q.value,e.id);if(t){const[n]=dn(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const r=Te(t),o=document.createElement("div"),s={...pn(r),position:"absolute"};Object.assign(o.style,s),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const r=Te(t);if(r.width||r.height){const o=Ot(t),s=Ve();s?En({...e,name:o,bounds:r}):hn({...e,name:o,bounds:r}),setTimeout(()=>{s&&(s.style.display="none")},1500)}},1200)}}w.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__??=!0;function ha(e){let t=0;const n=setInterval(()=>{w.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function Ea(){const e=w.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function ga(){return new Promise(e=>{function t(){Ea(),e(w.__VUE_INSPECTOR__)}w.__VUE_INSPECTOR__?t():ha(()=>{t()})})}let Pt=(function(e){return e.SKIP="__v_skip",e.IS_REACTIVE="__v_isReactive",e.IS_READONLY="__v_isReadonly",e.IS_SHALLOW="__v_isShallow",e.RAW="__v_raw",e})({});function _a(e){return!!(e&&e[Pt.IS_READONLY])}function Yr(e){return _a(e)?Yr(e[Pt.RAW]):!!(e&&e[Pt.IS_REACTIVE])}function mn(e){return!!(e&&e.__v_isRef===!0)}function Ye(e){const t=e&&e[Pt.RAW];return t?Ye(t):e}var ma=class{constructor(){this.refEditor=new ya}set(e,t,n,r){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const a=o.shift();e instanceof Map?e=e.get(a):e instanceof Set?e=Array.from(e.values())[a]:e=e[a],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const s=o[0],i=this.refEditor.get(e)[s];r?r(e,s,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[s]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let r=0;r<n.length;r++)if(e instanceof Map?e=e.get(n[r]):e=e[n[r]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const r=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&r.length>o;){const s=r.shift();e=e[s],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,r[0])}createDefaultSetCallback(e){return(t,n,r)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Ye(t)instanceof Map?t.delete(n):Ye(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,r):Ye(t)instanceof Map?t.set(e.newKey||n,r):Ye(t)instanceof Set?t.add(r):t[e.newKey||n]=r}}}},ya=class{set(e,t){if(mn(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(s=>{e.set(s,Reflect.get(t,s)),o.delete(s)}),o.forEach(s=>e.delete(s));return}const r=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),r.delete(o)}),r.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return mn(e)?e.value:e}isRef(e){return mn(e)||Yr(e)}};const Ra="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Sa(){if(typeof window>"u"||!Vr||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(Ra):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}w.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS??=[];const Oa=new Proxy(w.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function wa(e,t){G.timelineLayersState[t.id]=!1,Oa.push({...e,descriptorId:t.id,appRecord:fn(t.app)})}w.__VUE_DEVTOOLS_KIT_INSPECTOR__??=[];const yn=new Proxy(w.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),Qr=Le(()=>{xe.hooks.callHook(Pe.SEND_INSPECTOR_TO_CLIENT,Xr())});function Ta(e,t){yn.push({options:e,descriptor:t,treeFilterPlaceholder:e.treeFilterPlaceholder??"Search tree...",stateFilterPlaceholder:e.stateFilterPlaceholder??"Search state...",treeFilter:"",selectedNodeId:"",appRecord:fn(t.app)}),Qr()}function Xr(){return yn.filter(e=>e.descriptor.app===q.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{const t=e.descriptor,n=e.options;return{id:n.id,label:n.label,logo:t.logo,icon:`custom-ic-baseline-${n?.icon?.replace(/_/g,"-")}`,packageName:t.packageName,homepage:t.homepage,pluginId:t.id}})}function Nt(e,t){return yn.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}let z=(function(e){return e.VISIT_COMPONENT_TREE="visitComponentTree",e.INSPECT_COMPONENT="inspectComponent",e.EDIT_COMPONENT_STATE="editComponentState",e.GET_INSPECTOR_TREE="getInspectorTree",e.GET_INSPECTOR_STATE="getInspectorState",e.EDIT_INSPECTOR_STATE="editInspectorState",e.INSPECT_TIMELINE_EVENT="inspectTimelineEvent",e.TIMELINE_CLEARED="timelineCleared",e.SET_PLUGIN_SETTINGS="setPluginSettings",e})({}),x=(function(e){return e.ADD_INSPECTOR="addInspector",e.SEND_INSPECTOR_TREE="sendInspectorTree",e.SEND_INSPECTOR_STATE="sendInspectorState",e.CUSTOM_INSPECTOR_SELECT_NODE="customInspectorSelectNode",e.TIMELINE_LAYER_ADDED="timelineLayerAdded",e.TIMELINE_EVENT_ADDED="timelineEventAdded",e.GET_COMPONENT_INSTANCES="getComponentInstances",e.GET_COMPONENT_BOUNDS="getComponentBounds",e.GET_COMPONENT_NAME="getComponentName",e.COMPONENT_HIGHLIGHT="componentHighlight",e.COMPONENT_UNHIGHLIGHT="componentUnhighlight",e})({}),Pe=(function(e){return e.SEND_INSPECTOR_TREE_TO_CLIENT="sendInspectorTreeToClient",e.SEND_INSPECTOR_STATE_TO_CLIENT="sendInspectorStateToClient",e.SEND_TIMELINE_EVENT_TO_CLIENT="sendTimelineEventToClient",e.SEND_INSPECTOR_TO_CLIENT="sendInspectorToClient",e.SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT="sendActiveAppUpdatedToClient",e.DEVTOOLS_STATE_UPDATED="devtoolsStateUpdated",e.DEVTOOLS_CONNECTED_UPDATED="devtoolsConnectedUpdated",e.ROUTER_INFO_UPDATED="routerInfoUpdated",e})({});function Pa(){const e=Mr();e.hook(x.ADD_INSPECTOR,({inspector:r,plugin:o})=>{Ta(r,o.descriptor)});const t=Le(async({inspectorId:r,plugin:o})=>{if(!r||!o?.descriptor?.app||G.highPerfModeEnabled)return;const s=Nt(r,o.descriptor.app),i={app:o.descriptor.app,inspectorId:r,filter:s?.treeFilter||"",rootNodes:[]};await new Promise(a=>{e.callHookWith(async c=>{await Promise.all(c.map(l=>l(i))),a()},z.GET_INSPECTOR_TREE)}),e.callHookWith(async a=>{await Promise.all(a.map(c=>c({inspectorId:r,rootNodes:i.rootNodes})))},Pe.SEND_INSPECTOR_TREE_TO_CLIENT)},120);e.hook(x.SEND_INSPECTOR_TREE,t);const n=Le(async({inspectorId:r,plugin:o})=>{if(!r||!o?.descriptor?.app||G.highPerfModeEnabled)return;const s=Nt(r,o.descriptor.app),i={app:o.descriptor.app,inspectorId:r,nodeId:s?.selectedNodeId||"",state:null},a={currentTab:`custom-inspector:${r}`};i.nodeId&&await new Promise(c=>{e.callHookWith(async l=>{await Promise.all(l.map(g=>g(i,a))),c()},z.GET_INSPECTOR_STATE)}),e.callHookWith(async c=>{await Promise.all(c.map(l=>l({inspectorId:r,nodeId:i.nodeId,state:i.state})))},Pe.SEND_INSPECTOR_STATE_TO_CLIENT)},120);return e.hook(x.SEND_INSPECTOR_STATE,n),e.hook(x.CUSTOM_INSPECTOR_SELECT_NODE,({inspectorId:r,nodeId:o,plugin:s})=>{const i=Nt(r,s.descriptor.app);i&&(i.selectedNodeId=o)}),e.hook(x.TIMELINE_LAYER_ADDED,({options:r,plugin:o})=>{wa(r,o.descriptor)}),e.hook(x.TIMELINE_EVENT_ADDED,({options:r,plugin:o})=>{G.highPerfModeEnabled||!G.timelineLayersState?.[o.descriptor.id]&&!["performance","component-event","keyboard","mouse"].includes(r.layerId)||e.callHookWith(async s=>{await Promise.all(s.map(i=>i(r)))},Pe.SEND_TIMELINE_EVENT_TO_CLIENT)}),e.hook(x.GET_COMPONENT_INSTANCES,async({app:r})=>{const o=r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const s=o.id.toString();return[...o.instanceMap].filter(([i])=>i.split(":")[0]===s).map(([,i])=>i)}),e.hook(x.GET_COMPONENT_BOUNDS,async({instance:r})=>Te(r)),e.hook(x.GET_COMPONENT_NAME,({instance:r})=>Ot(r)),e.hook(x.COMPONENT_HIGHLIGHT,({uid:r})=>{const o=q.value.instanceMap.get(r);o&&ua(o)}),e.hook(x.COMPONENT_UNHIGHLIGHT,()=>{Jr()}),e}w.__VUE_DEVTOOLS_KIT_APP_RECORDS__??=[],w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__??={},w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__??="",w.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__??=[],w.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__??=[];const De="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function Na(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Sa()}}w[De]??=Na();const ba=Le(e=>{xe.hooks.callHook(Pe.DEVTOOLS_STATE_UPDATED,{state:e})});Le((e,t)=>{xe.hooks.callHook(Pe.DEVTOOLS_CONNECTED_UPDATED,{state:e,oldState:t})});const bt=new Proxy(w.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?w.__VUE_DEVTOOLS_KIT_APP_RECORDS__:w.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),q=new Proxy(w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function eo(){ba({...w[De],appRecords:bt.value,activeAppRecordId:q.id,tabs:w.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:w.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Aa(e){w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,eo()}function Ia(e){w.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,eo()}const G=new Proxy(w[De],{get(e,t){return t==="appRecords"?bt:t==="activeAppRecordId"?q.id:t==="tabs"?w.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?w.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:w[De][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...w[De]},e[t]=n,w[De][t]=n,!0}});function va(e={}){const{file:t,host:n,baseUrl:r=window.location.origin,line:o=0,column:s=0}=e;if(t){if(n==="chrome-extension"){const i=t.replace(/\\/g,"\\\\"),a=window.VUE_DEVTOOLS_CONFIG?.openInEditorHost??"/";fetch(`${a}__open-in-editor?file=${encodeURI(t)}`).then(c=>{if(!c.ok){const l=`Opening component ${i} failed`;console.log(`%c${l}`,"color:red")}})}else if(G.vitePluginDetected){const i=w.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__??r;w.__VUE_INSPECTOR__.openInEditor(i,t,o,s)}}}w.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__??=[];const Rn=new Proxy(w.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function Sn(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function On(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function ka(e){return(Rn.find(t=>t[0].id===e&&!!t[0]?.settings)?.[0]??null)?.settings??null}function to(e,t){const n=On(e);if(n){const r=localStorage.getItem(n);if(r)return JSON.parse(r)}return Sn(e?(Rn.find(r=>r[0].id===e)?.[0]??null)?.settings??{}:t)}function Ca(e,t){const n=On(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(Sn(t)))}function Ua(e,t,n){const r=On(e),o=localStorage.getItem(r),s=JSON.parse(o||"{}"),i={...s,[t]:n};localStorage.setItem(r,JSON.stringify(i)),xe.hooks.callHookWith(a=>{a.forEach(c=>c({pluginId:e,key:t,oldValue:s[t],newValue:n,settings:i}))},z.SET_PLUGIN_SETTINGS)}let Q=(function(e){return e.APP_INIT="app:init",e.APP_UNMOUNT="app:unmount",e.COMPONENT_UPDATED="component:updated",e.COMPONENT_ADDED="component:added",e.COMPONENT_REMOVED="component:removed",e.COMPONENT_EMIT="component:emit",e.PERFORMANCE_START="perf:start",e.PERFORMANCE_END="perf:end",e.ADD_ROUTE="router:add-route",e.REMOVE_ROUTE="router:remove-route",e.RENDER_TRACKED="render:tracked",e.RENDER_TRIGGERED="render:triggered",e.APP_CONNECTED="app:connected",e.SETUP_DEVTOOLS_PLUGIN="devtools-plugin:setup",e})({});const X=w.__VUE_DEVTOOLS_HOOK??=Mr(),no={on:{vueAppInit(e){X.hook(Q.APP_INIT,e)},vueAppUnmount(e){X.hook(Q.APP_UNMOUNT,e)},vueAppConnected(e){X.hook(Q.APP_CONNECTED,e)},componentAdded(e){return X.hook(Q.COMPONENT_ADDED,e)},componentEmit(e){return X.hook(Q.COMPONENT_EMIT,e)},componentUpdated(e){return X.hook(Q.COMPONENT_UPDATED,e)},componentRemoved(e){return X.hook(Q.COMPONENT_REMOVED,e)},setupDevtoolsPlugin(e){X.hook(Q.SETUP_DEVTOOLS_PLUGIN,e)},perfStart(e){return X.hook(Q.PERFORMANCE_START,e)},perfEnd(e){return X.hook(Q.PERFORMANCE_END,e)}},setupDevToolsPlugin(e,t){return X.callHook(Q.SETUP_DEVTOOLS_PLUGIN,e,t)}};var La=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook(z.VISIT_COMPONENT_TREE,e)},inspectComponent:e=>{this.hooks.hook(z.INSPECT_COMPONENT,e)},editComponentState:e=>{this.hooks.hook(z.EDIT_COMPONENT_STATE,e)},getInspectorTree:e=>{this.hooks.hook(z.GET_INSPECTOR_TREE,e)},getInspectorState:e=>{this.hooks.hook(z.GET_INSPECTOR_STATE,e)},editInspectorState:e=>{this.hooks.hook(z.EDIT_INSPECTOR_STATE,e)},inspectTimelineEvent:e=>{this.hooks.hook(z.INSPECT_TIMELINE_EVENT,e)},timelineCleared:e=>{this.hooks.hook(z.TIMELINE_CLEARED,e)},setPluginSettings:e=>{this.hooks.hook(z.SET_PLUGIN_SETTINGS,e)}}}notifyComponentUpdate(e){if(G.highPerfModeEnabled)return;const t=Xr().find(n=>n.packageName===this.plugin.descriptor.packageName);if(t?.id){if(e){const n=[e.appContext.app,e.uid,e.parent?.uid,e];X.callHook(Q.COMPONENT_UPDATED,...n)}else X.callHook(Q.COMPONENT_UPDATED);this.hooks.callHook(x.SEND_INSPECTOR_STATE,{inspectorId:t.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook(x.ADD_INSPECTOR,{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Ca(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){G.highPerfModeEnabled||this.hooks.callHook(x.SEND_INSPECTOR_TREE,{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){G.highPerfModeEnabled||this.hooks.callHook(x.SEND_INSPECTOR_STATE,{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook(x.CUSTOM_INSPECTOR_SELECT_NODE,{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook(z.VISIT_COMPONENT_TREE,e)}now(){return G.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook(x.TIMELINE_LAYER_ADDED,{options:e,plugin:this.plugin})}addTimelineEvent(e){G.highPerfModeEnabled||this.hooks.callHook(x.TIMELINE_EVENT_ADDED,{options:e,plugin:this.plugin})}getSettings(e){return to(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook(x.GET_COMPONENT_INSTANCES,{app:e})}getComponentBounds(e){return this.hooks.callHook(x.GET_COMPONENT_BOUNDS,{instance:e})}getComponentName(e){return this.hooks.callHook(x.GET_COMPONENT_NAME,{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook(x.COMPONENT_HIGHLIGHT,{uid:t})}unhighlightElement(){return this.hooks.callHook(x.COMPONENT_UNHIGHLIGHT)}};const Va=La,Da="__vue_devtool_undefined__",xa="__vue_devtool_infinity__",Ma="__vue_devtool_negative_infinity__",Ba="__vue_devtool_nan__",Ha={[Da]:"undefined",[Ba]:"NaN",[xa]:"Infinity",[Ma]:"-Infinity"};Object.entries(Ha).reduce((e,[t,n])=>(e[n]=t,e),{}),w.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__??=new Set;function ja(e,t){return no.setupDevToolsPlugin(e,t)}function Za(e,t){const[n,r]=e;if(n.app!==t)return;const o=new Va({plugin:{setupFn:r,descriptor:n},ctx:xe});n.packageName==="vuex"&&o.on.editInspectorState(s=>{o.sendInspectorState(s.inspectorId)}),r(o)}function ro(e,t){w.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||G.highPerfModeEnabled&&!t?.inspectingComponent||(w.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Rn.forEach(n=>{Za(n,e)}))}const At="__VUE_DEVTOOLS_ROUTER__",Qe="__VUE_DEVTOOLS_ROUTER_INFO__";w[Qe]??={currentRoute:null,routes:[]},w[At]??={},new Proxy(w[Qe],{get(e,t){return w[Qe][t]}}),new Proxy(w[At],{get(e,t){if(t==="value")return w[At]}});function Ga(e){const t=new Map;return(e?.getRoutes()||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function wn(e){return e.map(t=>{let{path:n,name:r,children:o,meta:s}=t;return o?.length&&(o=wn(o)),{path:n,name:r,children:o,meta:s}})}function Fa(e){if(e){const{fullPath:t,hash:n,href:r,path:o,name:s,matched:i,params:a,query:c}=e;return{fullPath:t,hash:n,href:r,path:o,name:s,params:a,query:c,matched:wn(i)}}return e}function za(e,t){function n(){const r=e.app?.config.globalProperties.$router,o=Fa(r?.currentRoute.value),s=wn(Ga(r)),i=console.warn;console.warn=()=>{},w[Qe]={currentRoute:o?Dr(o):{},routes:Dr(s)},w[At]=r,console.warn=i}n(),no.on.componentUpdated(Le(()=>{t.value?.app===e.app&&(n(),!G.highPerfModeEnabled&&xe.hooks.callHook(Pe.ROUTER_INFO_UPDATED,{state:w[Qe]}))},200))}function $a(e){return{async getInspectorTree(t){const n={...t,app:q.value.app,rootNodes:[]};return await new Promise(r=>{e.callHookWith(async o=>{await Promise.all(o.map(s=>s(n))),r()},z.GET_INSPECTOR_TREE)}),n.rootNodes},async getInspectorState(t){const n={...t,app:q.value.app,state:null},r={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async s=>{await Promise.all(s.map(i=>i(n,r))),o()},z.GET_INSPECTOR_STATE)}),n.state},editInspectorState(t){const n=new ma,r={...t,app:q.value.app,set:(o,s=t.path,i=t.state.value,a)=>{n.set(o,s,i,a||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(s=>s(r))},z.EDIT_INSPECTOR_STATE)},sendInspectorState(t){const n=Nt(t);e.callHook(x.SEND_INSPECTOR_STATE,{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return da()},cancelInspectComponentInspector(){return la()},getComponentRenderCode(t){const n=ln(q.value,t);if(n)return typeof n?.type!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return pa({id:t})},openInEditor:va,getVueInspector:ga,toggleApp(t,n){const r=bt.value.find(o=>o.id===t);r&&(Ia(t),Aa(r),za(r,q),Qr(),ro(r.app,n))},inspectDOM(t){const n=ln(q.value,t);if(n){const[r]=dn(n);r&&(w.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=r)}},updatePluginSettings(t,n,r){Ua(t,n,r)},getPluginSettings(t){return{options:ka(t),values:to(t)}}}}w.__VUE_DEVTOOLS_ENV__??={vitePluginDetected:!1};const oo=Pa();w.__VUE_DEVTOOLS_KIT_CONTEXT__??={hooks:oo,get state(){return{...G,activeAppRecordId:q.id,activeAppRecord:q.value,appRecords:bt.value}},api:$a(oo)};const xe=w.__VUE_DEVTOOLS_KIT_CONTEXT__;var qa=jr({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js":((e,t)=>{(function(n){var r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],s={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},a={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},c=[";","?",":","@","&","=","+","$",",","/"].join(""),l=[";","?",":","@","&","=","+","$",","].join(""),g=[".","!","~","*","'","(",")"].join(""),f=function(m,_){var O="-",E="",h="",A=!0,I={},P,S,N,C,U,M,B,H,F,W,k,He,ee,he,ae="";if(typeof m!="string")return"";if(typeof _=="string"&&(O=_),B=a.en,H=i.en,typeof _=="object"){P=_.maintainCase||!1,I=_.custom&&typeof _.custom=="object"?_.custom:I,N=+_.truncate>1&&_.truncate||!1,C=_.uric||!1,U=_.uricNoSlash||!1,M=_.mark||!1,A=!(_.symbols===!1||_.lang===!1),O=_.separator||O,C&&(ae+=c),U&&(ae+=l),M&&(ae+=g),B=_.lang&&a[_.lang]&&A?a[_.lang]:A?a.en:{},H=_.lang&&i[_.lang]?i[_.lang]:_.lang===!1||_.lang===!0?{}:i.en,_.titleCase&&typeof _.titleCase.length=="number"&&Array.prototype.toString.call(_.titleCase)?(_.titleCase.forEach(function(te){I[te+""]=te+""}),S=!0):S=!!_.titleCase,_.custom&&typeof _.custom.length=="number"&&Array.prototype.toString.call(_.custom)&&_.custom.forEach(function(te){I[te+""]=te+""}),Object.keys(I).forEach(function(te){var le;te.length>1?le=new RegExp("\\b"+u(te)+"\\b","gi"):le=new RegExp(u(te),"gi"),m=m.replace(le,I[te])});for(k in I)ae+=k}for(ae+=O,ae=u(ae),m=m.replace(/(^\s+|\s+$)/g,""),ee=!1,he=!1,W=0,He=m.length;W<He;W++)k=m[W],d(k,I)?ee=!1:H[k]?(k=ee&&H[k].match(/[A-Za-z0-9]/)?" "+H[k]:H[k],ee=!1):k in r?(W+1<He&&o.indexOf(m[W+1])>=0?(h+=k,k=""):he===!0?(k=s[h]+r[k],h=""):k=ee&&r[k].match(/[A-Za-z0-9]/)?" "+r[k]:r[k],ee=!1,he=!1):k in s?(h+=k,k="",W===He-1&&(k=s[h]),he=!0):B[k]&&!(C&&c.indexOf(k)!==-1)&&!(U&&l.indexOf(k)!==-1)?(k=ee||E.substr(-1).match(/[A-Za-z0-9]/)?O+B[k]:B[k],k+=m[W+1]!==void 0&&m[W+1].match(/[A-Za-z0-9]/)?O:"",ee=!0):(he===!0?(k=s[h]+k,h="",he=!1):ee&&(/[A-Za-z0-9]/.test(k)||E.substr(-1).match(/A-Za-z0-9]/))&&(k=" "+k),ee=!1),E+=k.replace(new RegExp("[^\\w\\s"+ae+"_-]","g"),O);return S&&(E=E.replace(/(\w)(\S*)/g,function(te,le,b){var V=le.toUpperCase()+(b!==null?b:"");return Object.keys(I).indexOf(V.toLowerCase())<0?V:V.toLowerCase()})),E=E.replace(/\s+/g,O).replace(new RegExp("\\"+O+"+","g"),O).replace(new RegExp("(^\\"+O+"+|\\"+O+"+$)","g"),""),N&&E.length>N&&(F=E.charAt(N)===O,E=E.slice(0,N),F||(E=E.slice(0,E.lastIndexOf(O)))),!P&&!S&&(E=E.toLowerCase()),E},p=function(m){return function(O){return f(O,m)}},u=function(m){return m.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},d=function(R,m){for(var _ in m)if(m[_]===R)return!0};if(typeof t<"u"&&t.exports)t.exports=f,t.exports.createSlug=p;else if(typeof define<"u"&&define.amd)define([],function(){return f});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=f,n.createSlug=p}catch{}})(e)})}),Wa=jr({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js":((e,t)=>{t.exports=qa()})});Wa(),w.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__??={id:0,appIds:new Set};function Ka(e){G.highPerfModeEnabled=e??!G.highPerfModeEnabled,!e&&q.value&&ro(q.value.app)}function Ja(e){G.devtoolsClientDetected={...G.devtoolsClientDetected,...e},Ka(!Object.values(G.devtoolsClientDetected).some(Boolean))}w.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__??=Ja;var Ya=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},so=class{constructor(e){this.generateIdentifier=e,this.kv=new Ya}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Qa=class extends so{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function Xa(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function ec(e,t){const n=Xa(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const s=r[o];if(t(s))return s}}function Me(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function It(e,t){return e.indexOf(t)!==-1}function io(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var tc=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return ec(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};const nc=e=>Object.prototype.toString.call(e).slice(8,-1),ao=e=>typeof e>"u",rc=e=>e===null,Xe=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Tn=e=>Xe(e)&&Object.keys(e).length===0,pe=e=>Array.isArray(e),oc=e=>typeof e=="string",sc=e=>typeof e=="number"&&!isNaN(e),ic=e=>typeof e=="boolean",ac=e=>e instanceof RegExp,et=e=>e instanceof Map,tt=e=>e instanceof Set,co=e=>nc(e)==="Symbol",cc=e=>e instanceof Date&&!isNaN(e.valueOf()),uc=e=>e instanceof Error,uo=e=>typeof e=="number"&&isNaN(e),fc=e=>ic(e)||rc(e)||ao(e)||sc(e)||oc(e)||co(e),lc=e=>typeof e=="bigint",dc=e=>e===1/0||e===-1/0,pc=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),hc=e=>e instanceof URL,fo=e=>e.replace(/\./g,"\\."),Pn=e=>e.map(String).map(fo).join("."),nt=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let s=e.charAt(o);if(s==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};function ie(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const lo=[ie(ao,"undefined",()=>null,()=>{}),ie(lc,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),ie(cc,"Date",e=>e.toISOString(),e=>new Date(e)),ie(uc,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),ie(ac,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),ie(tt,"set",e=>[...e.values()],e=>new Set(e)),ie(et,"map",e=>[...e.entries()],e=>new Map(e)),ie(e=>uo(e)||dc(e),"number",e=>uo(e)?"NaN":e>0?"Infinity":"-Infinity",Number),ie(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),ie(hc,"URL",e=>e.toString(),e=>new URL(e))];function vt(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const po=vt((e,t)=>co(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),Ec=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),ho=vt(pc,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Ec[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Eo(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const go=vt(Eo,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),_o=vt((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),gc=[go,po,_o,ho],mo=(e,t)=>{const n=io(gc,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=io(lo,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},yo={};lo.forEach(e=>{yo[e.annotation]=e});const _c=(e,t,n)=>{if(pe(t))switch(t[0]){case"symbol":return po.untransform(e,t,n);case"class":return go.untransform(e,t,n);case"custom":return _o.untransform(e,t,n);case"typed-array":return ho.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=yo[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Be=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Ro(e){if(It(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(It(e,"prototype"))throw new Error("prototype is not allowed as a property");if(It(e,"constructor"))throw new Error("constructor is not allowed as a property")}const mc=(e,t)=>{Ro(t);for(let n=0;n<t.length;n++){const r=t[n];if(tt(e))e=Be(e,+r);else if(et(e)){const o=+r,s=+t[++n]==0?"key":"value",i=Be(e,o);switch(s){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[r]}return e},Nn=(e,t,n)=>{if(Ro(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const i=t[s];if(pe(r)){const a=+i;r=r[a]}else if(Xe(r))r=r[i];else if(tt(r)){const a=+i;r=Be(r,a)}else if(et(r)){if(s===t.length-2)break;const a=+i,c=+t[++s]==0?"key":"value",l=Be(r,a);switch(c){case"key":r=l;break;case"value":r=r.get(l);break}}}const o=t[t.length-1];if(pe(r)?r[+o]=n(r[+o]):Xe(r)&&(r[o]=n(r[o])),tt(r)){const s=Be(r,+o),i=n(s);s!==i&&(r.delete(s),r.add(i))}if(et(r)){const s=+t[t.length-2],i=Be(r,s);switch(+o==0?"key":"value"){case"key":{const a=n(i);r.set(a,r.get(i)),a!==i&&r.delete(i);break}case"value":r.set(i,n(r.get(i)));break}}return e};function bn(e,t,n=[]){if(!e)return;if(!pe(e)){Me(e,(s,i)=>bn(s,t,[...n,...nt(i)]));return}const[r,o]=e;o&&Me(o,(s,i)=>{bn(s,t,[...n,...nt(i)])}),t(r,n)}function yc(e,t,n){return bn(t,(r,o)=>{e=Nn(e,o,s=>_c(s,r,n))}),e}function Rc(e,t){function n(r,o){const s=mc(e,nt(o));r.map(nt).forEach(i=>{e=Nn(e,i,()=>s)})}if(pe(t)){const[r,o]=t;r.forEach(s=>{e=Nn(e,nt(s),()=>e)}),o&&Me(o,n)}else Me(t,n);return e}const Sc=(e,t)=>Xe(e)||pe(e)||et(e)||tt(e)||Eo(e,t);function Oc(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function wc(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(a=>a.map(String)).sort((a,c)=>a.length-c.length));const[s,...i]=o;s.length===0?r=i.map(Pn):n[Pn(s)]=i.map(Pn)}),r?Tn(n)?[r]:[r,n]:Tn(n)?void 0:n}const So=(e,t,n,r,o=[],s=[],i=new Map)=>{const a=fc(e);if(!a){Oc(e,o,t);const u=i.get(e);if(u)return r?{transformedValue:null}:u}if(!Sc(e,n)){const u=mo(e,n),d=u?{transformedValue:u.value,annotations:[u.type]}:{transformedValue:e};return a||i.set(e,d),d}if(It(s,e))return{transformedValue:null};const c=mo(e,n),l=c?.value??e,g=pe(l)?[]:{},f={};Me(l,(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")throw new Error(`Detected property ${d}. This is a prototype pollution risk, please remove it from your object.`);const R=So(u,t,n,r,[...o,d],[...s,e],i);g[d]=R.transformedValue,pe(R.annotations)?f[d]=R.annotations:Xe(R.annotations)&&Me(R.annotations,(m,_)=>{f[fo(d)+"."+_]=m})});const p=Tn(f)?{transformedValue:g,annotations:c?[c.type]:void 0}:{transformedValue:g,annotations:c?[c.type,f]:f};return a||i.set(e,p),p};function Oo(e){return Object.prototype.toString.call(e).slice(8,-1)}function wo(e){return Oo(e)==="Array"}function Tc(e){if(Oo(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Pc(e,t,n,r,o){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),o&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function An(e,t={}){if(wo(e))return e.map(o=>An(o,t));if(!Tc(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,s)=>{if(wo(t.props)&&!t.props.includes(s))return o;const i=e[s];return Pc(o,s,An(i,t),e,t.nonenumerable),o},{})}var D=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Qa,this.symbolRegistry=new so(t=>t.description??""),this.customTransformerRegistry=new tc,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=So(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const o=wc(t,this.dedupe);return o&&(r.meta={...r.meta,referentialEqualities:o}),r}deserialize(e){const{json:t,meta:n}=e;let r=An(t);return n?.values&&(r=yc(r,n.values,this)),n?.referentialEqualities&&(r=Rc(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};D.defaultInstance=new D,D.serialize=D.defaultInstance.serialize.bind(D.defaultInstance),D.deserialize=D.defaultInstance.deserialize.bind(D.defaultInstance),D.stringify=D.defaultInstance.stringify.bind(D.defaultInstance),D.parse=D.defaultInstance.parse.bind(D.defaultInstance),D.registerClass=D.defaultInstance.registerClass.bind(D.defaultInstance),D.registerSymbol=D.defaultInstance.registerSymbol.bind(D.defaultInstance),D.registerCustom=D.defaultInstance.registerCustom.bind(D.defaultInstance),D.allowErrorProps=D.defaultInstance.allowErrorProps.bind(D.defaultInstance),w.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__??=[],w.__VUE_DEVTOOLS_KIT_RPC_CLIENT__??=null,w.__VUE_DEVTOOLS_KIT_RPC_SERVER__??=null,w.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__??=null,w.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__??=null,w.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__??=null;const kt={template:"<div>This is component</div>"},In=Re({name:"parentA",path:"/parentA/[paramA]"}),To=Re({parent:In,name:"parentA.childA",path:"/childA/[?paramB]"}),Nc=Re({parent:In,name:"parentA.childB",path:"/childB/[paramD]",component:kt}),bc=Re({parent:To,name:"parentA.childA.grandChildA",path:"/[paramC]",component:kt});Re({name:"parentB",path:"/parentB",component:kt}),Re({name:"parentC",path:"/",component:kt});function Ac(e,t){return t!=="1"?`${e} ${t}`:e}const Ic=({route:e})=>!!e.name,vc=({route:e,payload:t})=>{if(!t.filter)return!0;const n=t.filter.toLowerCase();return!!(e.name.toLowerCase().includes(n)||e.path.value.toLowerCase().includes(n))},kc=e=>Ic(e)&&vc(e),Cc=ut(),Uc=2282478,Lc=2278750,Vc=1483594;function Dc(e,t={match:!1,exactMatch:!1}){const n=[];return e.name&&n.push({label:e.name,textColor:0,backgroundColor:Uc}),t.match&&n.push({label:"match",textColor:0,backgroundColor:Lc}),t.exactMatch&&n.push({label:"exact-match",textColor:0,backgroundColor:Vc}),{id:e.id,label:e.path.value||e.name,tags:n}}function xc(e,t){if(!t||!("id"in t)||!("matches"in t))return{match:!1,exactMatch:!1};const n=t.id===e.id;return{match:t.matches.some(o=>o.id===e.id),exactMatch:n}}function Mc(e){const t=[];return t.push({editable:!1,key:"name",value:e.name}),t.push({editable:!1,key:"path",value:e.path.value}),t.push({editable:!1,key:"query",value:e.query.value}),t.push({editable:!1,key:"hash",value:e.hash.value}),t.push({editable:!1,key:"meta",value:e.meta}),t}function Bc({router:e,app:t,routes:n}){if(!mt()||e.hasDevtools)return;e.hasDevtools=!0;const r=Cc(),o=new Map(n.map(a=>[a.id,a])),s=`kitbag-router-routes.${r}`,i=`kitbag-router.${r}`;ja({id:i,label:"Kitbag Router",packageName:"@kitbag/router",homepage:"https://router.kitbag.dev/",componentStateTypes:["Routing"],logo:"https://kitbag.dev/kitbag-logo-circle.svg",app:t},a=>{a.addInspector({id:s,label:Ac("Routes",r),treeFilterPlaceholder:"Search routes"}),a.on.getInspectorTree(c=>{c.app!==t||c.inspectorId!==s||(c.rootNodes=n.filter(l=>kc({route:l,payload:c})).map(l=>{const g=xc(l,e.route);return Dc(l,g)}))}),y.watch(()=>e.route,()=>{a.sendInspectorTree(s)},{deep:!0,immediate:!1}),a.on.getInspectorState(c=>{if(c.app!==t||c.inspectorId!==s)return;const l=o.get(c.nodeId);l&&(c.state={options:Mc(l)})}),a.sendInspectorTree(s),a.sendInspectorState(s)})}function Hc(e,t,n=[]){const o=t?.isGlobalRouter??!0?Cr:Symbol(),s=[...n.flatMap(b=>b.rejections),...t?.rejections??[]],i=Ei(e,n,t?.base),a=hs();a.addGlobalRouteHooks(mi(n));const c=ut(),l=Bs(),g=Oi(o),f=qs(),p=Hs({mode:t?.historyMode,listener:({location:b})=>{const V=we(b);d(V,{state:b.state,replace:!0})}});function u(b,V={}){return di(i,b,V.state)}async function d(b,V={}){const ne=c();p.stopListening();const re=u(b,V)??I("NotFound"),j=ae(ne),$=await a.runBeforeRouteHooks({to:re,from:j});switch($.status){case"ABORT":return;case"PUSH":p.update(b,V),await _(...$.to);return;case"REJECT":p.update(b,V),h($.type);break;case"SUCCESS":p.update(b,V),h(null);break;default:throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify($)}`)}H(b)||R(ne,re,j);const je=await a.runAfterRouteHooks({to:re,from:j});switch(je.status){case"PUSH":await _(...je.to);break;case"REJECT":h(je.type);break;case"SUCCESS":break;default:const Ne=je;throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(Ne)}`)}p.startListening()}function R(b,V,ne){const re=b;l.setProps(V).then(j=>{if(re===b)switch(j.status){case"SUCCESS":break;case"PUSH":_(...j.to);break;case"REJECT":h(j.type);break;default:const $=j;throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify($)}`)}}).catch(j=>{try{a.runErrorHooks(j,{to:V,from:ne,source:"props"})}catch($){if($ instanceof fe){_(...$.response.to);return}if($ instanceof Se){h($.response.type);return}throw $}}),C(V)}const m=(b,V={},ne={})=>{const re=i.find(j=>j.name===b);if(!re)throw new Ws(b);return ei(re,V,ne)},_=(b,V,ne)=>{if(oe(b)){const Ne={...V},Ct=vr(b,{searchParams:Ne.query,hash:Ne.hash});return d(Ct,Ne)}if(typeof b=="string"){const{replace:Ne,...Ct}={...ne},Qc={...V},vn=m(b,Qc,Ct),Xc=Or({...vn.matched.state},{...vn.state,...Ct.state});return d(vn.href,{replace:Ne,state:Xc})}const{replace:re,...j}={...V},$=Or({...b.matched.state},{...b.state,...j.state}),je=vr(b.href,{searchParams:j.query,hash:j.hash});return d(je,{replace:re,state:$})},O=(b,V,ne)=>{if(oe(b)){const j={...V,replace:!0};return _(b,j)}if(typeof b=="string"){const j={...ne,replace:!0},$={...V};return _(b,$,j)}const re={...V,replace:!0};return _(b,re)},E=b=>{h(b)},{setRejection:h,rejection:A,getRejectionRoute:I}=Zs(s),P=I("NotFound"),{currentRoute:S,routerRoute:N,updateRoute:C}=Vs(o,P,_),U=Fs(t?.initialUrl),M=p.location.state,{host:B}=Y(U),H=Ms(B);let F=!1;const W=y.ref(!1),{promise:k,resolve:He}=Promise.withResolvers();async function ee(){if(F)return k;F=!0,Co(i)&&await Uo(),await d(U,{replace:!0,state:M}),p.startListening(),He(),W.value=!0}function he(){p.stopListening()}function ae(b){return os(b)?null:{...S}}function te(b){a.setVueApp(b),l.setVueApp(b);const V=tn(o),ne=dr(o);b.component("RouterView",V),b.component("RouterLink",ne),b.provide(rr(o),A),b.provide(tr(o),a),b.provide(sr(o),l),b.provide(nr(o),g),b.provide(ur,f),b.provide(o,le),Bc({router:le,app:b,routes:i}),ee()}const le={route:N,resolve:m,find:u,push:_,replace:O,reject:E,refresh:p.refresh,forward:p.forward,back:p.back,go:p.go,install:te,isExternal:H,onBeforeRouteEnter:a.onBeforeRouteEnter,onBeforeRouteUpdate:a.onBeforeRouteUpdate,onBeforeRouteLeave:a.onBeforeRouteLeave,onAfterRouteEnter:a.onAfterRouteEnter,onAfterRouteUpdate:a.onAfterRouteUpdate,onAfterRouteLeave:a.onAfterRouteLeave,onError:a.onError,prefetch:t?.prefetch,start:ee,started:W,stop:he,key:o,hasDevtools:!1};return le}const se=pr(Cr),jc=se.onBeforeRouteLeave,Zc=se.onBeforeRouteUpdate,Gc=se.onAfterRouteLeave,Fc=se.onAfterRouteUpdate,zc=se.isRoute,$c=se.RouterView,qc=se.RouterLink,Wc=se.useRoute,Kc=se.useRouter,Jc=se.useQueryValue,Yc=se.useLink;v.DuplicateParamsError=kn,v.MetaPropertyConflict=zn,v.RouterLink=qc,v.RouterNotInstalledError=me,v.RouterView=$c,v.UseRouteInvalidError=$n,v.arrayOf=vs,v.asUrlString=Qt,v.combineRoutes=Yt,v.createExternalRoute=as,v.createParam=Un,v.createRejection=is,v.createRoute=Re,v.createRouter=Hc,v.createRouterAssets=pr,v.createRouterPlugin=As,v.isRoute=zc,v.isUrlString=oe,v.isWithComponent=qt,v.isWithComponentProps=Wt,v.isWithComponentPropsRecord=Jt,v.isWithComponents=Kt,v.isWithParent=$t,v.onAfterRouteLeave=Gc,v.onAfterRouteUpdate=Fc,v.onBeforeRouteLeave=jc,v.onBeforeRouteUpdate=Zc,v.tupleOf=Cs,v.unionOf=hr,v.useLink=Yc,v.useQueryValue=Jc,v.useRoute=Wc,v.useRouter=Kc,v.withDefault=Io,v.withParams=_e,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/main.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export * from './types/routerReplace';
|
|
|
20
20
|
export * from './types/routerResolve';
|
|
21
21
|
export * from './types/routerResolve';
|
|
22
22
|
export * from './types/routerRoute';
|
|
23
|
-
export * from './types/
|
|
23
|
+
export * from './types/urlString';
|
|
24
24
|
export * from './types/useLink';
|
|
25
25
|
export { DuplicateParamsError } from './errors/duplicateParamsError';
|
|
26
26
|
export { MetaPropertyConflict } from './errors/metaPropertyConflict';
|
package/dist/models/hooks.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AfterEnterHook, AfterLeaveHook, AfterUpdateHook, BeforeEnterHook, BeforeLeaveHook, BeforeUpdateHook, ErrorHook } from '../types/hooks';
|
|
2
|
+
import { RedirectHook } from '../types/redirects';
|
|
2
3
|
export declare class Hooks {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
redirects: Set<RedirectHook>;
|
|
5
|
+
onBeforeRouteEnter: Set<BeforeEnterHook>;
|
|
6
|
+
onBeforeRouteUpdate: Set<BeforeUpdateHook>;
|
|
7
|
+
onBeforeRouteLeave: Set<BeforeLeaveHook>;
|
|
8
|
+
onAfterRouteEnter: Set<AfterEnterHook>;
|
|
9
|
+
onAfterRouteUpdate: Set<AfterUpdateHook>;
|
|
10
|
+
onAfterRouteLeave: Set<AfterLeaveHook>;
|
|
9
11
|
onError: Set<ErrorHook>;
|
|
10
12
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { AddBeforeUpdateHook, AddBeforeLeaveHook, AddAfterUpdateHook, AddAfterLeaveHook } from '../types/hooks';
|
|
3
3
|
import { Routes } from '../types/route';
|
|
4
4
|
import { Router, RouterRejections, RouterRoutes } from '../types/router';
|
|
5
5
|
import { Rejections } from '../types/rejection';
|
|
6
6
|
type ComponentHooks<TRoutes extends Routes, TRejections extends Rejections> = {
|
|
7
|
-
onBeforeRouteLeave:
|
|
8
|
-
onBeforeRouteUpdate:
|
|
9
|
-
onAfterRouteLeave:
|
|
10
|
-
onAfterRouteUpdate:
|
|
7
|
+
onBeforeRouteLeave: AddBeforeLeaveHook<TRoutes, TRejections>;
|
|
8
|
+
onBeforeRouteUpdate: AddBeforeUpdateHook<TRoutes, TRejections>;
|
|
9
|
+
onAfterRouteLeave: AddAfterLeaveHook<TRoutes, TRejections>;
|
|
10
|
+
onAfterRouteUpdate: AddAfterUpdateHook<TRoutes, TRejections>;
|
|
11
11
|
};
|
|
12
12
|
export declare function createComponentHooks<TRouter extends Router>(routerKey: InjectionKey<TRouter>): ComponentHooks<RouterRoutes<TRouter>, RouterRejections<TRouter>>;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CreateRouteOptions, ToRoute, WithHost, WithoutHost, WithoutParent, WithParent } from '../types/createRouteOptions';
|
|
2
2
|
import { ExternalRouteHooks } from '../types/hooks';
|
|
3
3
|
import { ExtractRouteContext } from '../types/routeContext';
|
|
4
|
-
|
|
5
|
-
export declare function createExternalRoute<const TOptions extends CreateRouteOptions &
|
|
4
|
+
import { RouteRedirects } from '../types/redirects';
|
|
5
|
+
export declare function createExternalRoute<const TOptions extends CreateRouteOptions & WithHost & WithoutParent>(options: TOptions): ToRoute<TOptions> & ExternalRouteHooks<ToRoute<TOptions>, TOptions['context']> & RouteRedirects<ToRoute<TOptions>>;
|
|
6
|
+
export declare function createExternalRoute<const TOptions extends CreateRouteOptions & WithoutHost & WithParent>(options: TOptions): ToRoute<TOptions> & ExternalRouteHooks<ToRoute<TOptions>, ExtractRouteContext<TOptions>> & RouteRedirects<ToRoute<TOptions>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CreateRouteOptions, PropsGetter, CreateRouteProps, ToRoute, RouterViewPropsGetter } from '../types/createRouteOptions';
|
|
2
2
|
import { InternalRouteHooks } from '../types/hooks';
|
|
3
3
|
import { ExtractRouteContext } from '../types/routeContext';
|
|
4
|
+
import { RouteRedirects } from '../types/redirects';
|
|
4
5
|
type CreateRouteWithProps<TOptions extends CreateRouteOptions, TProps extends CreateRouteProps<TOptions>> = CreateRouteProps<TOptions> extends RouterViewPropsGetter<TOptions> ? [props?: RouterViewPropsGetter<TOptions>] : CreateRouteProps<TOptions> extends PropsGetter<TOptions> ? Partial<ReturnType<CreateRouteProps<TOptions>>> extends ReturnType<CreateRouteProps<TOptions>> ? [props?: TProps] : [props: TProps] : Partial<CreateRouteProps<TOptions>> extends CreateRouteProps<TOptions> ? [props?: TProps] : [props: TProps];
|
|
5
|
-
export declare function createRoute<const TOptions extends CreateRouteOptions, const TProps extends CreateRouteProps<TOptions>>(options: TOptions, ...args: CreateRouteWithProps<TOptions, TProps>): ToRoute<TOptions, TProps> & InternalRouteHooks<ToRoute<TOptions>, ExtractRouteContext<TOptions>>;
|
|
6
|
+
export declare function createRoute<const TOptions extends CreateRouteOptions, const TProps extends CreateRouteProps<TOptions>>(options: TOptions, ...args: CreateRouteWithProps<TOptions, TProps>): ToRoute<TOptions, TProps> & InternalRouteHooks<ToRoute<TOptions>, ExtractRouteContext<TOptions>> & RouteRedirects<ToRoute<TOptions>>;
|
|
6
7
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AddBeforeEnterHook, AddBeforeUpdateHook, AddBeforeLeaveHook, AddAfterEnterHook, AddAfterUpdateHook, AddAfterLeaveHook, AddErrorHook } from '../types/hooks';
|
|
2
|
+
import { Routes } from '../types/route';
|
|
3
|
+
import { Hooks } from '../models/hooks';
|
|
4
|
+
import { Rejection } from '../types/rejection';
|
|
5
|
+
import { RouteRedirect } from '../types/redirects';
|
|
6
|
+
export type RouteHooks<TRoutes extends Routes = Routes, TRejections extends Rejection[] = Rejection[]> = {
|
|
7
|
+
redirect: RouteRedirect;
|
|
8
|
+
onBeforeRouteEnter: AddBeforeEnterHook<TRoutes, TRejections>;
|
|
9
|
+
onBeforeRouteUpdate: AddBeforeUpdateHook<TRoutes, TRejections>;
|
|
10
|
+
onBeforeRouteLeave: AddBeforeLeaveHook<TRoutes, TRejections>;
|
|
11
|
+
onAfterRouteEnter: AddAfterEnterHook<TRoutes, TRejections>;
|
|
12
|
+
onAfterRouteUpdate: AddAfterUpdateHook<TRoutes, TRejections>;
|
|
13
|
+
onAfterRouteLeave: AddAfterLeaveHook<TRoutes, TRejections>;
|
|
14
|
+
onError: AddErrorHook<TRoutes[number], TRoutes, TRejections>;
|
|
15
|
+
store: Hooks;
|
|
16
|
+
};
|
|
17
|
+
export declare function createRouteHooks(): RouteHooks;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RouteRedirects } from '../types/redirects';
|
|
2
|
+
import { Route } from '../types/route';
|
|
3
|
+
type CreateRouteRedirectsContext = {
|
|
4
|
+
/**
|
|
5
|
+
* The to route for the redirectFrom callback and the from route for the redirectTo callback.
|
|
6
|
+
*/
|
|
7
|
+
getRoute: () => Route;
|
|
8
|
+
};
|
|
9
|
+
export declare function createRouteRedirects({ getRoute }: CreateRouteRedirectsContext): RouteRedirects;
|
|
10
|
+
export {};
|