import{A as e,D as t,G as n,I as r,M as i,_ as a,dt as o,et as s,f as c,gt as l,mt as u,pt as d,xt as f}from"./vue.runtime.esm-bundler-gHHLlCcd.js";import{an as p,in as m,it as h,m as ee,rn as g,rt as te,tn as ne,w as re}from"./_plugin-vue_export-helper-BgFcNt9i.js";function _(e){let{textColor1:t,dividerColor:n,fontWeightStrong:r}=e;return{textColor:t,color:n,fontWeight:r}}var v={name:`Divider`,common:ee,self:_},ie=ne(`divider`,`
 position: relative;
 display: flex;
 width: 100%;
 box-sizing: border-box;
 font-size: 16px;
 color: var(--n-text-color);
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
`,[p(`vertical`,`
 margin-top: 24px;
 margin-bottom: 24px;
 `,[p(`no-title`,`
 display: flex;
 align-items: center;
 `)]),g(`title`,`
 display: flex;
 align-items: center;
 margin-left: 12px;
 margin-right: 12px;
 white-space: nowrap;
 font-weight: var(--n-font-weight);
 `),m(`title-position-left`,[g(`line`,[m(`left`,{width:`28px`})])]),m(`title-position-right`,[g(`line`,[m(`right`,{width:`28px`})])]),m(`dashed`,[g(`line`,`
 background-color: #0000;
 height: 0px;
 width: 100%;
 border-style: dashed;
 border-width: 1px 0 0;
 `)]),m(`vertical`,`
 display: inline-block;
 height: 1em;
 margin: 0 8px;
 vertical-align: middle;
 width: 1px;
 `),g(`line`,`
 border: none;
 transition: background-color .3s var(--n-bezier), border-color .3s var(--n-bezier);
 height: 1px;
 width: 100%;
 margin: 0;
 `),p(`dashed`,[g(`line`,{backgroundColor:`var(--n-color)`})]),m(`dashed`,[g(`line`,{borderColor:`var(--n-color)`})]),m(`vertical`,{backgroundColor:`var(--n-color)`})]),y=t({name:`Divider`,props:Object.assign(Object.assign({},re.props),{titlePlacement:{type:String,default:`center`},dashed:Boolean,vertical:Boolean}),setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n}=h(e),r=re(`Divider`,`-divider`,ie,v,e,t),i=a(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,textColor:n,fontWeight:i}}=r.value;return{"--n-bezier":e,"--n-color":t,"--n-text-color":n,"--n-font-weight":i}}),o=n?te(`divider`,void 0,i,e):void 0;return{mergedClsPrefix:t,cssVars:n?void 0:i,themeClass:o?.themeClass,onRender:o?.onRender}},render(){var t;let{$slots:n,titlePlacement:r,vertical:i,dashed:a,cssVars:o,mergedClsPrefix:s}=this;return(t=this.onRender)==null||t.call(this),e(`div`,{role:`separator`,class:[`${s}-divider`,this.themeClass,{[`${s}-divider--vertical`]:i,[`${s}-divider--no-title`]:!n.default,[`${s}-divider--dashed`]:a,[`${s}-divider--title-position-${r}`]:n.default&&r}],style:o},i?null:e(`div`,{class:`${s}-divider__line ${s}-divider__line--left`}),!i&&n.default?e(c,null,e(`div`,{class:`${s}-divider__title`},this.$slots),e(`div`,{class:`${s}-divider__line ${s}-divider__line--right`})):null)}}),b=typeof document<`u`;function ae(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function oe(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&ae(e.default)}var x=Object.assign;function se(e,t){let n={};for(let r in t){let i=t[r];n[r]=C(i)?i.map(e):e(i)}return n}var S=()=>{},C=Array.isArray;function w(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var T=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),ce=Symbol(``);T.MATCHER_NOT_FOUND,T.NAVIGATION_GUARD_REDIRECT,T.NAVIGATION_ABORTED,T.NAVIGATION_CANCELLED,T.NAVIGATION_DUPLICATED;function E(e,t){return x(Error(),{type:e,[ce]:!0},t)}function D(e,t){return e instanceof Error&&ce in e&&(t==null||!!(e.type&t))}var O=Symbol(``),k=Symbol(``),A=Symbol(``),le=Symbol(``),ue=Symbol(``);function de(){return i(A)}function fe(e){return i(le)}var j=/#/g,pe=/&/g,M=/\//g,me=/=/g,N=/\?/g,P=/\+/g,he=/%5B/g,F=/%5D/g,I=/%5E/g,L=/%60/g,R=/%7B/g,z=/%7C/g,B=/%7D/g,V=/%20/g;function ge(e){return e==null?``:encodeURI(``+e).replace(z,`|`).replace(he,`[`).replace(F,`]`)}function _e(e){return ge(e).replace(R,`{`).replace(B,`}`).replace(I,`^`)}function ve(e){return ge(e).replace(P,`%2B`).replace(V,`+`).replace(j,`%23`).replace(pe,`%26`).replace(L,"`").replace(R,`{`).replace(B,`}`).replace(I,`^`)}function ye(e){return ve(e).replace(me,`%3D`)}function be(e){return ge(e).replace(j,`%23`).replace(N,`%3F`)}function xe(e){return be(e).replace(M,`%2F`)}function H(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Se=/\/$/,Ce=e=>e.replace(Se,``);function we(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=je(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:H(o)}}function Te(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Ee(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function De(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&U(t.matched[r],n.matched[i])&&Oe(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Oe(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ke(e[n],t[n]))return!1;return!0}function ke(e,t){return C(e)?Ae(e,t):C(t)?Ae(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Ae(e,t){return C(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function je(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var W={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},G=function(e){return e.pop=`pop`,e.push=`push`,e}({}),K=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function Me(e){if(!e)if(b){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Ce(e)}var Ne=/^[^#]+#/;function Pe(e,t){return e.replace(Ne,`#`)+t}function Fe(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var q=()=>({left:window.scrollX,top:window.scrollY});function Ie(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Fe(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Le(e,t){return(history.state?history.state.position-t:-1)+e}var J=new Map;function Re(e,t){J.set(e,t)}function ze(e){let t=J.get(e);return J.delete(e),t}function Be(e){return typeof e==`string`||e&&typeof e==`object`}function Ve(e){return typeof e==`string`||typeof e==`symbol`}function He(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(P,` `),i=r.indexOf(`=`),a=H(i<0?r:r.slice(0,i)),o=i<0?null:H(r.slice(i+1));if(a in t){let e=t[a];C(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Ue(e){let t=``;for(let n in e){let r=e[n];if(n=ye(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(C(r)?r.map(e=>e&&ve(e)):[r&&ve(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function We(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=C(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Y(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function X(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(E(T.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):Be(e)?c(E(T.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Ge(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(ae(s)){let c=(s.__vccOpts||s)[t];c&&a.push(X(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=oe(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&X(c,n,r,o,e,i)()}))}}return a}function Ke(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>U(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>U(e,s))||i.push(s))}return[n,r,i]}var qe=()=>location.protocol+`//`+location.host;function Je(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Ee(n,``)}return Ee(n,e)+r+i}function Ye(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Je(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:G.pop,direction:u?u>0?K.forward:K.back:K.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(x({},e.state,{scroll:q()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Xe(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?q():null}}function Ze(e){let{history:t,location:n}=window,r={value:Je(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:qe()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,x({},t.state,Xe(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=x({},i.value,t.state,{forward:e,scroll:q()});a(o.current,o,!0),a(e,x({},Xe(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Qe(e){e=Me(e);let t=Ze(e),n=Ye(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=x({location:``,base:e,go:r,createHref:Pe.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function $e(e=``){let t=[],n=[[``,{}]],r=0;e=Me(e);function i(e,t={}){r++,r!==n.length&&n.splice(r),n.push([e,t])}function a(e,n,{direction:r,delta:i}){let a={direction:r,delta:i,type:G.pop};for(let r of t)r(e,n,a)}let o={location:``,state:{},base:e,createHref:Pe.bind(null,e),replace(e,t){n.splice(r--,1),i(e,t)},push(e,t){i(e,t)},listen(e){return t.push(e),()=>{let n=t.indexOf(e);n>-1&&t.splice(n,1)}},destroy(){t=[],n=[[``,{}]],r=0},go(e,t=!0){let i=this.location,o=e<0?K.back:K.forward;r=Math.max(0,Math.min(r+e,n.length-1)),t&&a(this.location,i,{direction:o,delta:e})}};return Object.defineProperty(o,`location`,{enumerable:!0,get:()=>n[r][0]}),Object.defineProperty(o,`state`,{enumerable:!0,get:()=>n[r][1]}),o}function et(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Qe(e)}var Z=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Q=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Q||{}),tt={type:Z.Static,value:``},nt=/[a-zA-Z0-9_]/;function rt(e){if(!e)return[[]];if(e===`/`)return[[tt]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Q.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Q.Static?a.push({type:Z.Static,value:l}):n===Q.Param||n===Q.ParamRegExp||n===Q.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Z.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case Q.Static:c===`\\`?(r=n,n=Q.EscapeNext):c===`/`?(l&&d(),o()):c===`:`?(d(),n=Q.Param):f();break;case Q.EscapeNext:f(),n=r;break;case Q.Param:c===`(`?n=Q.ParamRegExp:nt.test(c)?f():(d(),n=Q.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case Q.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=Q.ParamRegExpEnd:u+=c;break;case Q.ParamRegExpEnd:d(),n=Q.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}return n===Q.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var it=`[^/]+?`,at={sensitive:!1,strict:!1,start:!0,end:!0},$=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}($||{}),ot=/[.+*?^${}()[\]/\\]/g;function st(e,t){let n=x({},at,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[$.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=$.Segment+(n.sensitive?$.BonusCaseSensitive:0);if(o.type===Z.Static)r||(i+=`/`),i+=o.value.replace(ot,`\\$&`),s+=$.Static;else if(o.type===Z.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||it;if(u!==it){s+=$.BonusCustomRegExp;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=$.Dynamic,c&&(s+=$.BonusOptional),n&&(s+=$.BonusRepeatable),u===`.*`&&(s+=$.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=$.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===Z.Static)n+=e.value;else if(e.type===Z.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(C(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=C(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function ct(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===$.Static+$.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===$.Static+$.Segment?1:-1:0}function lt(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=ct(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(ut(r))return 1;if(ut(i))return-1}return i.length-r.length}function ut(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var dt={strict:!1,end:!0,sensitive:!1};function ft(e,t,n){let r=x(st(rt(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function pt(e,t){let n=[],r=new Map;t=w(dt,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=ht(e);s.aliasOf=r&&r.record;let l=w(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(ht(x({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=ft(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!_t(d)&&o(e.name)),xt(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:S}function o(e){if(Ve(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=yt(e,n);n.splice(t,0,e),e.record.name&&!_t(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw E(T.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=x(mt(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&mt(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw E(T.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=x({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:vt(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function mt(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function ht(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:gt(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function gt(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function _t(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function vt(e){return e.reduce((e,t)=>x(e,t.meta),{})}function yt(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;lt(e,t[i])<0?r=i:n=i+1}let i=bt(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function bt(e){let t=e;for(;t=t.parent;)if(xt(t)&&lt(e,t)===0)return t}function xt({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function St(e){let t=i(A),n=i(le),r=a(()=>{let n=f(e.to);return t.resolve(n)}),o=a(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(U.bind(null,i));if(o>-1)return o;let s=Dt(e[t-2]);return t>1&&Dt(i)===s&&a[a.length-1].path!==s?a.findIndex(U.bind(null,e[t-2])):o}),s=a(()=>o.value>-1&&Et(n.params,r.value.params)),c=a(()=>o.value>-1&&o.value===n.matched.length-1&&Oe(n.params,r.value.params));function l(n={}){if(Tt(n)){let n=t[f(e.replace)?`replace`:`push`](f(e.to)).catch(S);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:a(()=>r.value.href),isActive:s,isExactActive:c,navigate:l}}function Ct(e){return e.length===1?e[0]:e}var wt=t({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:St,setup(t,{slots:n}){let r=o(St(t)),{options:s}=i(A),c=a(()=>({[Ot(t.activeClass,s.linkActiveClass,`router-link-active`)]:r.isActive,[Ot(t.exactActiveClass,s.linkExactActiveClass,`router-link-exact-active`)]:r.isExactActive}));return()=>{let i=n.default&&Ct(n.default(r));return t.custom?i:e(`a`,{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:c.value},i)}}});function Tt(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Et(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!C(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function Dt(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Ot=(e,t,n)=>e??t??n,kt=t({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:r,slots:o}){let c=i(ue),l=a(()=>t.route||c.value),u=i(k,0),p=a(()=>{let e=f(u),{matched:t}=l.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),m=a(()=>l.value.matched[p.value]);n(k,a(()=>p.value+1)),n(O,m),n(ue,l);let h=d();return s(()=>[h.value,m.value,t.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!U(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let n=l.value,i=t.name,a=m.value,s=a&&a.components[i];if(!s)return At(o.default,{Component:s,route:n});let c=a.props[i],u=e(s,x({},c?c===!0?n.params:typeof c==`function`?c(n):c:null,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[i]=null)},ref:h}));return At(o.default,{Component:u,route:n})||u}}});function At(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var jt=kt;function Mt(e){let t=pt(e.routes,e),n=e.parseQuery||He,i=e.stringifyQuery||Ue,a=e.history,o=Y(),s=Y(),c=Y(),d=l(W),p=W;b&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let m=se.bind(null,e=>``+e),h=se.bind(null,xe),ee=se.bind(null,H);function g(e,n){let r,i;return Ve(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function te(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function ne(){return t.getRoutes().map(e=>e.record)}function re(e){return!!t.getRecordMatcher(e)}function _(e,r){if(r=x({},r||d.value),typeof e==`string`){let i=we(n,e,r.path),o=t.resolve({path:i.path},r),s=a.createHref(i.fullPath);return x(i,o,{params:ee(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=x({},e,{path:we(n,e.path,r.path).path});else{let t=x({},e.params);for(let e in t)t[e]??delete t[e];o=x({},e,{params:h(t)}),r.params=h(r.params)}let s=t.resolve(o,r),c=e.hash||``;s.params=m(ee(s.params));let l=Te(i,x({},e,{hash:_e(c),path:s.path})),u=a.createHref(l);return x({fullPath:l,hash:c,query:i===Ue?We(e.query):e.query||{}},s,{redirectedFrom:void 0,href:u})}function v(e){return typeof e==`string`?we(n,e,d.value.path):x({},e)}function ie(e,t){if(p!==e)return E(T.NAVIGATION_CANCELLED,{from:t,to:e})}function y(e){return w(e)}function ae(e){return y(x(v(e),{replace:!0}))}function oe(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),x({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function w(e,t){let n=p=_(e),r=d.value,a=e.state,o=e.force,s=e.replace===!0,c=oe(n,r);if(c)return w(x(v(c),{state:typeof c==`object`?x({},a,c.state):a,force:o,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!o&&De(i,r,n)&&(u=E(T.NAVIGATION_DUPLICATED,{to:l,from:r}),I(r,r,!0,!1)),(u?Promise.resolve(u):k(l,r)).catch(e=>D(e)?D(e,T.NAVIGATION_GUARD_REDIRECT)?e:F(e):P(e,l,r)).then(e=>{if(e){if(D(e,T.NAVIGATION_GUARD_REDIRECT))return w(x({replace:s},v(e.to),{state:typeof e.to==`object`?x({},a,e.to.state):a,force:o}),t||l)}else e=fe(l,r,!0,s,a);return de(l,r,e),e})}function ce(e,t){let n=ie(e,t);return n?Promise.reject(n):Promise.resolve()}function O(e){let t=z.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function k(e,t){let n,[r,i,a]=Ke(e,t);n=Ge(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(X(r,e,t))});let c=ce.bind(null,e,t);return n.push(c),V(n).then(()=>{n=[];for(let r of o.list())n.push(X(r,e,t));return n.push(c),V(n)}).then(()=>{n=Ge(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(X(r,e,t))});return n.push(c),V(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(C(r.beforeEnter))for(let i of r.beforeEnter)n.push(X(i,e,t));else n.push(X(r.beforeEnter,e,t));return n.push(c),V(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Ge(a,`beforeRouteEnter`,e,t,O),n.push(c),V(n))).then(()=>{n=[];for(let r of s.list())n.push(X(r,e,t));return n.push(c),V(n)}).catch(e=>D(e,T.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function de(e,t,n){c.list().forEach(r=>O(()=>r(e,t,n)))}function fe(e,t,n,r,i){let o=ie(e,t);if(o)return o;let s=t===W,c=b?history.state:{};n&&(r||s?a.replace(e.fullPath,x({scroll:s&&c&&c.scroll},i)):a.push(e.fullPath,i)),d.value=e,I(e,t,n,s),F()}let j;function pe(){j||=a.listen((e,t,n)=>{if(!B.listening)return;let r=_(e),i=oe(r,B.currentRoute.value);if(i){w(x(i,{replace:!0,force:!0}),r).catch(S);return}p=r;let o=d.value;b&&Re(Le(o.fullPath,n.delta),q()),k(r,o).catch(e=>D(e,T.NAVIGATION_ABORTED|T.NAVIGATION_CANCELLED)?e:D(e,T.NAVIGATION_GUARD_REDIRECT)?(w(x(v(e.to),{force:!0}),r).then(e=>{D(e,T.NAVIGATION_ABORTED|T.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===G.pop&&a.go(-1,!1)}).catch(S),Promise.reject()):(n.delta&&a.go(-n.delta,!1),P(e,r,o))).then(e=>{e||=fe(r,o,!1),e&&(n.delta&&!D(e,T.NAVIGATION_CANCELLED)?a.go(-n.delta,!1):n.type===G.pop&&D(e,T.NAVIGATION_ABORTED|T.NAVIGATION_DUPLICATED)&&a.go(-1,!1)),de(r,o,e)}).catch(S)})}let M=Y(),me=Y(),N;function P(e,t,n){F(e);let r=me.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function he(){return N&&d.value!==W?Promise.resolve():new Promise((e,t)=>{M.add([e,t])})}function F(e){return N||(N=!e,pe(),M.list().forEach(([t,n])=>e?n(e):t()),M.reset()),e}function I(t,n,i,a){let{scrollBehavior:o}=e;if(!b||!o)return Promise.resolve();let s=!i&&ze(Le(t.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return r().then(()=>o(t,n,s)).then(e=>e&&Ie(e)).catch(e=>P(e,t,n))}let L=e=>a.go(e),R,z=new Set,B={currentRoute:d,listening:!0,addRoute:g,removeRoute:te,clearRoutes:t.clearRoutes,hasRoute:re,getRoutes:ne,resolve:_,options:e,push:y,replace:ae,go:L,back:()=>L(-1),forward:()=>L(1),beforeEach:o.add,beforeResolve:s.add,afterEach:c.add,onError:me.add,isReady:he,install(e){e.component(`RouterLink`,wt),e.component(`RouterView`,jt),e.config.globalProperties.$router=B,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>f(d)}),b&&!R&&d.value===W&&(R=!0,y(a.location).catch(e=>{}));let t={};for(let e in W)Object.defineProperty(t,e,{get:()=>d.value[e],enumerable:!0});e.provide(A,B),e.provide(le,u(t)),e.provide(ue,d);let n=e.unmount;z.add(e),e.unmount=function(){z.delete(e),z.size<1&&(p=W,j&&j(),j=null,d.value=W,R=!1,N=!1),n()}}};function V(e){return e.reduce((e,t)=>e.then(()=>O(t)),Promise.resolve())}return B}export{fe as a,_ as c,Qe as i,Mt as n,de as o,et as r,y as s,$e as t};