You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
26 KiB

import{C as rt}from"./config-provider-fcaf9ca1.js";import{h as ot,P as st,e as W,c as O,q as He,$ as at,d as ze,j as N,a2 as qe,p as ie,m as it,Q as ct}from"./normalize-3ee1393a.js";const vn=ot(rt);var yn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t={name:"zh-tw",el:{colorpicker:{confirm:"確認",clear:"清空",defaultLabel:"色彩選擇器",description:"目前色彩為 {color}。按一下 Enter 以選擇新色彩。"},datepicker:{now:"現在",today:"今天",cancel:"取消",clear:"清空",confirm:"確認",dateTablePrompt:"使用方向鍵與 Enter 鍵以選擇日期",monthTablePrompt:"使用方向鍵與 Enter 鍵以選擇月份",yearTablePrompt:"使用方向鍵與 Enter 鍵以選擇年份",selectedDate:"已選日期",selectDate:"選擇日期",selectTime:"選擇時間",startDate:"開始日期",startTime:"開始時間",endDate:"結束日期",endTime:"結束時間",prevYear:"前一年",nextYear:"後一年",prevMonth:"上個月",nextMonth:"下個月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"減少數值",increase:"增加數值"},select:{loading:"載入中",noMatch:"無相符資料",noData:"無資料",placeholder:"請選擇"},dropdown:{toggleDropdown:"切換下拉選單"},cascader:{noMatch:"無相符資料",loading:"載入中",placeholder:"請選擇",noData:"無資料"},pagination:{goto:"前往",pagesize:"項/頁",total:"共 {total} 項",pageClassifier:"頁",page:"頁",prev:"上一頁",next:"下一頁",currentPage:"第 {pager} 頁",prevPages:"向前 {pager} 頁",nextPages:"向后 {pager} 頁",deprecationWarning:"偵測到已過時的使用方式,請參閱 el-pagination 說明文件以了解更多資訊"},dialog:{close:"關閉此對話框"},drawer:{close:"關閉此對話框"},messagebox:{title:"提示",confirm:"確定",cancel:"取消",error:"輸入的資料不符規定!",close:"關閉此對話框"},upload:{deleteTip:"按一下 Delete 鍵以刪除",delete:"刪除",preview:"查看圖片",continue:"繼續上傳"},slider:{defaultLabel:"滑桿介於 {min} 至 {max}",defaultRangeStartLabel:"選擇起始值",defaultRangeEndLabel:"選擇結束值"},table:{emptyText:"暫無資料",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},tree:{emptyText:"暫無資料"},transfer:{noMatch:"無相符資料",noData:"無資料",titles:["列表 1","列表 2"],filterPlaceholder:"請輸入搜尋內容",noCheckedFormat:"共 {total} 項",hasCheckedFormat:"已選 {checked}/{total} 項"},image:{error:"載入失敗"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"確認",cancelButtonText:"取消"}}};e.default=t})(Ge);const Cn=lt(Ge),ft="modulepreload",ht=function(e,t){return new URL(e,t).href},Ae={},Rn=function(t,n,u){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=ht(a,u),a in Ae)return;Ae[a]=!0;const h=a.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(!!u)for(let o=r.length-1;o>=0;o--){const c=r[o];if(c.href===a&&(!h||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${m}`))return;const l=document.createElement("link");if(l.rel=h?"stylesheet":ft,h||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),h)return new Promise((o,c)=>{l.addEventListener("load",o),l.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};/*!
* vue-router v4.2.2
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/const H=typeof window<"u";function dt(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const P=Object.assign;function ce(e,t){const n={};for(const u in t){const r=t[u];n[u]=x(r)?r.map(e):e(r)}return n}const Q=()=>{},x=Array.isArray,pt=/\/$/,mt=e=>e.replace(pt,"");function le(e,t,n="/"){let u,r={},a="",h="";const m=t.indexOf("#");let i=t.indexOf("?");return m<i&&m>=0&&(i=-1),i>-1&&(u=t.slice(0,i),a=t.slice(i+1,m>-1?m:t.length),r=e(a)),m>-1&&(u=u||t.slice(0,m),h=t.slice(m,t.length)),u=yt(u??t,n),{fullPath:u+(a&&"?")+a+h,path:u,query:r,hash:h}}function gt(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Be(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Et(e,t,n){const u=t.matched.length-1,r=n.matched.length-1;return u>-1&&u===r&&z(t.matched[u],n.matched[r])&&Ue(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function z(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!vt(e[n],t[n]))return!1;return!0}function vt(e,t){return x(e)?Se(e,t):x(t)?Se(t,e):e===t}function Se(e,t){return x(t)?e.length===t.length&&e.every((n,u)=>n===t[u]):e.length===1&&e[0]===t}function yt(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),u=e.split("/"),r=u[u.length-1];(r===".."||r===".")&&u.push("");let a=n.length-1,h,m;for(h=0;h<u.length;h++)if(m=u[h],m!==".")if(m==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+u.slice(h-(h===u.length?1:0)).join("/")}var X;(function(e){e.pop="pop",e.push="push"})(X||(X={}));var Y;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Y||(Y={}));function Ct(e){if(!e)if(H){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),mt(e)}const Rt=/^[^#]+#/;function wt(e,t){return e.replace(Rt,"#")+t}function Pt(e,t){const n=document.documentElement.getBoundingClientRect(),u=e.getBoundingClientRect();return{behavior:t.behavior,left:u.left-n.left-(t.left||0),top:u.top-n.top-(t.top||0)}}const te=()=>({left:window.pageXOffset,top:window.pageYOffset});function At(e){let t;if("el"in e){const n=e.el,u=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?u?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Pt(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function be(e,t){return(history.state?history.state.position-t:-1)+e}const he=new Map;function Bt(e,t){he.set(e,t)}function St(e){const t=he.get(e);return he.delete(e),t}let bt=()=>location.protocol+"//"+location.host;function Ke(e,t){const{pathname:n,search:u,hash:r}=t,a=e.indexOf("#");if(a>-1){let m=r.includes(e.slice(a))?e.slice(a).length:1,i=r.slice(m);return i[0]!=="/"&&(i="/"+i),Be(i,"")}return Be(n,e)+u+r}function kt(e,t,n,u){let r=[],a=[],h=null;const m=({state:f})=>{const g=Ke(e,location),y=n.value,S=t.value;let B=0;if(f){if(n.value=g,t.value=f,h&&h===y){h=null;return}B=S?f.position-S.position:0}else u(g);r.forEach(C=>{C(n.value,y,{delta:B,type:X.pop,direction:B?B>0?Y.forward:Y.back:Y.unknown})})};function i(){h=n.value}function l(f){r.push(f);const g=()=>{const y=r.indexOf(f);y>-1&&r.splice(y,1)};return a.push(g),g}function o(){const{history:f}=window;f.state&&f.replaceState(P({},f.state,{scroll:te()}),"")}function c(){for(const f of a)f();a=[],window.removeEventListener("popstate",m),window.removeEventListener("beforeunload",o)}return window.addEventListener("popstate",m),window.addEventListener("beforeunload",o,{passive:!0}),{pauseListeners:i,listen:l,destroy:c}}function ke(e,t,n,u=!1,r=!1){return{back:e,current:t,forward:n,replaced:u,position:window.history.length,scroll:r?te():null}}function Ft(e){const{history:t,location:n}=window,u={value:Ke(e,n)},r={value:t.state};r.value||a(u.value,{back:null,current:u.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(i,l,o){const c=e.indexOf("#"),f=c>-1?(n.host&&document.querySelector("base")?e:e.slice(c))+i:bt()+e+i;try{t[o?"replaceState":"pushState"](l,"",f),r.value=l}catch(g){console.error(g),n[o?"replace":"assign"](f)}}function h(i,l){const o=P({},t.state,ke(r.value.back,i,r.value.forward,!0),l,{position:r.value.position});a(i,o,!0),u.value=i}function m(i,l){const o=P({},r.value,t.state,{forward:i,scroll:te()});a(o.current,o,!0);const c=P({},ke(u.value,i,null),{position:o.position+1},l);a(i,c,!1),u.value=i}return{location:u,state:r,push:m,replace:h}}function Dt(e){e=Ct(e);const t=Ft(e),n=kt(e,t.state,t.location,t.replace);function u(a,h=!0){h||n.pauseListeners(),history.go(a)}const r=P({location:"",base:e,go:u,createHref:wt.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function wn(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Dt(e)}function _t(e){return typeof e=="string"||e&&typeof e=="object"}function Ve(e){return typeof e=="string"||typeof e=="symbol"}const L={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},We=Symbol("");var Fe;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Fe||(Fe={}));function q(e,t){return P(new Error,{type:e,[We]:!0},t)}function M(e,t){return e instanceof Error&&We in e&&(t==null||!!(e.type&t))}const De="[^/]+?",Ot={sensitive:!1,strict:!1,start:!0,end:!0},xt=/[.+*?^${}()[\]/\\]/g;function Tt(e,t){const n=P({},Ot,t),u=[];let r=n.start?"^":"";const a=[];for(const l of e){const o=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let c=0;c<l.length;c++){const f=l[c];let g=40+(n.sensitive?.25:0);if(f.type===0)c||(r+="/"),r+=f.value.replace(xt,"\\$&"),g+=40;else if(f.type===1){const{value:y,repeatable:S,optional:B,regexp:C}=f;a.push({name:y,repeatable:S,optional:B});const w=C||De;if(w!==De){g+=10;try{new RegExp(`(${w})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${y}" (${w}): `+_.message)}}let F=S?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;c||(F=B&&l.length<2?`(?:/${F})`:"/"+F),B&&(F+="?"),r+=F,g+=20,B&&(g+=-8),S&&(g+=-20),w===".*"&&(g+=-50)}o.push(g)}u.push(o)}if(n.strict&&n.end){const l=u.length-1;u[l][u[l].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const h=new RegExp(r,n.sensitive?"":"i");function m(l){const o=l.match(h),c={};if(!o)return null;for(let f=1;f<o.length;f++){const g=o[f]||"",y=a[f-1];c[y.name]=g&&y.repeatable?g.split("/"):g}return c}function i(l){let o="",c=!1;for(const f of e){(!c||!o.endsWith("/"))&&(o+="/"),c=!1;for(const g of f)if(g.type===0)o+=g.value;else if(g.type===1){const{value:y,repeatable:S,optional:B}=g,C=y in l?l[y]:"";if(x(C)&&!S)throw new Error(`Provided param "${y}" is an array but it is not repeatable (* or + modifiers)`);const w=x(C)?C.join("/"):C;if(!w)if(B)f.length<2&&(o.endsWith("/")?o=o.slice(0,-1):c=!0);else throw new Error(`Missing required param "${y}"`);o+=w}}return o||"/"}return{re:h,score:u,keys:a,parse:m,stringify:i}}function Mt(e,t){let n=0;for(;n<e.length&&n<t.length;){const u=t[n]-e[n];if(u)return u;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function Lt(e,t){let n=0;const u=e.score,r=t.score;for(;n<u.length&&n<r.length;){const a=Mt(u[n],r[n]);if(a)return a;n++}if(Math.abs(r.length-u.length)===1){if(_e(u))return 1;if(_e(r))return-1}return r.length-u.length}function _e(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const jt={type:0,value:""},$t=/[a-zA-Z0-9_]/;function Nt(e){if(!e)return[[]];if(e==="/")return[[jt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${l}": ${g}`)}let n=0,u=n;const r=[];let a;function h(){a&&r.push(a),a=[]}let m=0,i,l="",o="";function c(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:o,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),l="")}function f(){l+=i}for(;m<e.length;){if(i=e[m++],i==="\\"&&n!==2){u=n,n=4;continue}switch(n){case 0:i==="/"?(l&&c(),h()):i===":"?(c(),n=1):f();break;case 4:f(),n=u;break;case 1:i==="("?n=2:$t.test(i)?f():(c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&m--);break;case 2:i===")"?o[o.length-1]=="\\"?o=o.slice(0,-1)+i:n=3:o+=i;break;case 3:c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&m--,o="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),c(),h(),r}function It(e,t,n){const u=Tt(Nt(e.path),n),r=P(u,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ht(e,t){const n=[],u=new Map;t=Te({strict:!1,end:!0,sensitive:!1},t);function r(o){return u.get(o)}function a(o,c,f){const g=!f,y=zt(o);y.aliasOf=f&&f.record;const S=Te(t,o),B=[y];if("alias"in o){const F=typeof o.alias=="string"?[o.alias]:o.alias;for(const _ of F)B.push(P({},y,{components:f?f.record.components:y.components,path:_,aliasOf:f?f.record:y}))}let C,w;for(const F of B){const{path:_}=F;if(c&&_[0]!=="/"){const $=c.record.path,T=$[$.length-1]==="/"?"":"/";F.path=c.record.path+(_&&T+_)}if(C=It(F,c,S),f?f.alias.push(C):(w=w||C,w!==C&&w.alias.push(C),g&&o.name&&!xe(C)&&h(o.name)),y.children){const $=y.children;for(let T=0;T<$.length;T++)a($[T],C,f&&f.children[T])}f=f||C,(C.record.components&&Object.keys(C.record.components).length||C.record.name||C.record.redirect)&&i(C)}return w?()=>{h(w)}:Q}function h(o){if(Ve(o)){const c=u.get(o);c&&(u.delete(o),n.splice(n.indexOf(c),1),c.children.forEach(h),c.alias.forEach(h))}else{const c=n.indexOf(o);c>-1&&(n.splice(c,1),o.record.name&&u.delete(o.record.name),o.children.forEach(h),o.alias.forEach(h))}}function m(){return n}function i(o){let c=0;for(;c<n.length&&Lt(o,n[c])>=0&&(o.record.path!==n[c].record.path||!Qe(o,n[c]));)c++;n.splice(c,0,o),o.record.name&&!xe(o)&&u.set(o.record.name,o)}function l(o,c){let f,g={},y,S;if("name"in o&&o.name){if(f=u.get(o.name),!f)throw q(1,{location:o});S=f.record.name,g=P(Oe(c.params,f.keys.filter(w=>!w.optional).map(w=>w.name)),o.params&&Oe(o.params,f.keys.map(w=>w.name))),y=f.stringify(g)}else if("path"in o)y=o.path,f=n.find(w=>w.re.test(y)),f&&(g=f.parse(y),S=f.record.name);else{if(f=c.name?u.get(c.name):n.find(w=>w.re.test(c.path)),!f)throw q(1,{location:o,currentLocation:c});S=f.record.name,g=P({},c.params,o.params),y=f.stringify(g)}const B=[];let C=f;for(;C;)B.unshift(C.record),C=C.parent;return{name:S,path:y,params:g,matched:B,meta:Gt(B)}}return e.forEach(o=>a(o)),{addRoute:a,resolve:l,removeRoute:h,getRoutes:m,getRecordMatcher:r}}function Oe(e,t){const n={};for(const u of t)u in e&&(n[u]=e[u]);return n}function zt(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:qt(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function qt(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const u in e.components)t[u]=typeof n=="boolean"?n:n[u];return t}function xe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Gt(e){return e.reduce((t,n)=>P(t,n.meta),{})}function Te(e,t){const n={};for(const u in e)n[u]=u in t?t[u]:e[u];return n}function Qe(e,t){return t.children.some(n=>n===e||Qe(e,n))}const Ye=/#/g,Ut=/&/g,Kt=/\//g,Vt=/=/g,Wt=/\?/g,Xe=/\+/g,Qt=/%5B/g,Yt=/%5D/g,Ze=/%5E/g,Xt=/%60/g,Je=/%7B/g,Zt=/%7C/g,et=/%7D/g,Jt=/%20/g;function me(e){return encodeURI(""+e).replace(Zt,"|").replace(Qt,"[").replace(Yt,"]")}function en(e){return me(e).replace(Je,"{").replace(et,"}").replace(Ze,"^")}function de(e){return me(e).replace(Xe,"%2B").replace(Jt,"+").replace(Ye,"%23").replace(Ut,"%26").replace(Xt,"`").replace(Je,"{").replace(et,"}").replace(Ze,"^")}function tn(e){return de(e).replace(Vt,"%3D")}function nn(e){return me(e).replace(Ye,"%23").replace(Wt,"%3F")}function un(e){return e==null?"":nn(e).replace(Kt,"%2F")}function ee(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function rn(e){const t={};if(e===""||e==="?")return t;const u=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<u.length;++r){const a=u[r].replace(Xe," "),h=a.indexOf("="),m=ee(h<0?a:a.slice(0,h)),i=h<0?null:ee(a.slice(h+1));if(m in t){let l=t[m];x(l)||(l=t[m]=[l]),l.push(i)}else t[m]=i}return t}function Me(e){let t="";for(let n in e){const u=e[n];if(n=tn(n),u==null){u!==void 0&&(t+=(t.length?"&":"")+n);continue}(x(u)?u.map(a=>a&&de(a)):[u&&de(u)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function on(e){const t={};for(const n in e){const u=e[n];u!==void 0&&(t[n]=x(u)?u.map(r=>r==null?null:""+r):u==null?u:""+u)}return t}const sn=Symbol(""),Le=Symbol(""),ne=Symbol(""),ge=Symbol(""),pe=Symbol("");function V(){let e=[];function t(u){return e.push(u),()=>{const r=e.indexOf(u);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function j(e,t,n,u,r){const a=u&&(u.enterCallbacks[r]=u.enterCallbacks[r]||[]);return()=>new Promise((h,m)=>{const i=c=>{c===!1?m(q(4,{from:n,to:t})):c instanceof Error?m(c):_t(c)?m(q(2,{from:t,to:c})):(a&&u.enterCallbacks[r]===a&&typeof c=="function"&&a.push(c),h())},l=e.call(u&&u.instances[r],t,n,i);let o=Promise.resolve(l);e.length<3&&(o=o.then(i)),o.catch(c=>m(c))})}function fe(e,t,n,u){const r=[];for(const a of e)for(const h in a.components){let m=a.components[h];if(!(t!=="beforeRouteEnter"&&!a.instances[h]))if(an(m)){const l=(m.__vccOpts||m)[t];l&&r.push(j(l,n,u,a,h))}else{let i=m();r.push(()=>i.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${h}" at "${a.path}"`));const o=dt(l)?l.default:l;a.components[h]=o;const f=(o.__vccOpts||o)[t];return f&&j(f,n,u,a,h)()}))}}return r}function an(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function je(e){const t=N(ne),n=N(ge),u=O(()=>t.resolve(W(e.to))),r=O(()=>{const{matched:i}=u.value,{length:l}=i,o=i[l-1],c=n.matched;if(!o||!c.length)return-1;const f=c.findIndex(z.bind(null,o));if(f>-1)return f;const g=$e(i[l-2]);return l>1&&$e(o)===g&&c[c.length-1].path!==g?c.findIndex(z.bind(null,i[l-2])):f}),a=O(()=>r.value>-1&&hn(n.params,u.value.params)),h=O(()=>r.value>-1&&r.value===n.matched.length-1&&Ue(n.params,u.value.params));function m(i={}){return fn(i)?t[W(e.replace)?"replace":"push"](W(e.to)).catch(Q):Promise.resolve()}return{route:u,href:O(()=>u.value.href),isActive:a,isExactActive:h,navigate:m}}const cn=ze({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"}},useLink:je,setup(e,{slots:t}){const n=He(je(e)),{options:u}=N(ne),r=O(()=>({[Ne(e.activeClass,u.linkActiveClass,"router-link-active")]:n.isActive,[Ne(e.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:qe("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}}),ln=cn;function fn(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){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function hn(e,t){for(const n in t){const u=t[n],r=e[n];if(typeof u=="string"){if(u!==r)return!1}else if(!x(r)||r.length!==u.length||u.some((a,h)=>a!==r[h]))return!1}return!0}function $e(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ne=(e,t,n)=>e??t??n,dn=ze({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const u=N(pe),r=O(()=>e.route||u.value),a=N(Le,0),h=O(()=>{let l=W(a);const{matched:o}=r.value;let c;for(;(c=o[l])&&!c.components;)l++;return l}),m=O(()=>r.value.matched[h.value]);ie(Le,O(()=>h.value+1)),ie(sn,m),ie(pe,r);const i=it();return ct(()=>[i.value,m.value,e.name],([l,o,c],[f,g,y])=>{o&&(o.instances[c]=l,g&&g!==o&&l&&l===f&&(o.leaveGuards.size||(o.leaveGuards=g.leaveGuards),o.updateGuards.size||(o.updateGuards=g.updateGuards))),l&&o&&(!g||!z(o,g)||!f)&&(o.enterCallbacks[c]||[]).forEach(S=>S(l))},{flush:"post"}),()=>{const l=r.value,o=e.name,c=m.value,f=c&&c.components[o];if(!f)return Ie(n.default,{Component:f,route:l});const g=c.props[o],y=g?g===!0?l.params:typeof g=="function"?g(l):g:null,B=qe(f,P({},y,t,{onVnodeUnmounted:C=>{C.component.isUnmounted&&(c.instances[o]=null)},ref:i}));return Ie(n.default,{Component:B,route:l})||B}}});function Ie(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const pn=dn;function Pn(e){const t=Ht(e.routes,e),n=e.parseQuery||rn,u=e.stringifyQuery||Me,r=e.history,a=V(),h=V(),m=V(),i=st(L);let l=L;H&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const o=ce.bind(null,s=>""+s),c=ce.bind(null,un),f=ce.bind(null,ee);function g(s,p){let d,E;return Ve(s)?(d=t.getRecordMatcher(s),E=p):E=s,t.addRoute(E,d)}function y(s){const p=t.getRecordMatcher(s);p&&t.removeRoute(p)}function S(){return t.getRoutes().map(s=>s.record)}function B(s){return!!t.getRecordMatcher(s)}function C(s,p){if(p=P({},p||i.value),typeof s=="string"){const v=le(n,s,p.path),k=t.resolve({path:v.path},p),K=r.createHref(v.fullPath);return P(v,k,{params:f(k.params),hash:ee(v.hash),redirectedFrom:void 0,href:K})}let d;if("path"in s)d=P({},s,{path:le(n,s.path,p.path).path});else{const v=P({},s.params);for(const k in v)v[k]==null&&delete v[k];d=P({},s,{params:c(v)}),p.params=c(p.params)}const E=t.resolve(d,p),A=s.hash||"";E.params=o(f(E.params));const b=gt(u,P({},s,{hash:en(A),path:E.path})),R=r.createHref(b);return P({fullPath:b,hash:A,query:u===Me?on(s.query):s.query||{}},E,{redirectedFrom:void 0,href:R})}function w(s){return typeof s=="string"?le(n,s,i.value.path):P({},s)}function F(s,p){if(l!==s)return q(8,{from:p,to:s})}function _(s){return G(s)}function $(s){return _(P(w(s),{replace:!0}))}function T(s){const p=s.matched[s.matched.length-1];if(p&&p.redirect){const{redirect:d}=p;let E=typeof d=="function"?d(s):d;return typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=w(E):{path:E},E.params={}),P({query:s.query,hash:s.hash,params:"path"in E?{}:s.params},E)}}function G(s,p){const d=l=C(s),E=i.value,A=s.state,b=s.force,R=s.replace===!0,v=T(d);if(v)return G(P(w(v),{state:typeof v=="object"?P({},A,v.state):A,force:b,replace:R}),p||d);const k=d;k.redirectedFrom=p;let K;return!b&&Et(u,E,d)&&(K=q(16,{to:k,from:E}),we(E,E,!0,!1)),(K?Promise.resolve(K):ve(k,E)).catch(D=>M(D)?M(D,2)?D:oe(D):re(D,k,E)).then(D=>{if(D){if(M(D,2))return G(P({replace:R},w(D.to),{state:typeof D.to=="object"?P({},A,D.to.state):A,force:b}),p||k)}else D=Ce(k,E,!0,R,A);return ye(k,E,D),D})}function tt(s,p){const d=F(s,p);return d?Promise.reject(d):Promise.resolve()}function Ee(s){const p=J.values().next().value;return p&&typeof p.runWithContext=="function"?p.runWithContext(s):s()}function ve(s,p){let d;const[E,A,b]=mn(s,p);d=fe(E.reverse(),"beforeRouteLeave",s,p);for(const v of E)v.leaveGuards.forEach(k=>{d.push(j(k,s,p))});const R=tt.bind(null,s,p);return d.push(R),I(d).then(()=>{d=[];for(const v of a.list())d.push(j(v,s,p));return d.push(R),I(d)}).then(()=>{d=fe(A,"beforeRouteUpdate",s,p);for(const v of A)v.updateGuards.forEach(k=>{d.push(j(k,s,p))});return d.push(R),I(d)}).then(()=>{d=[];for(const v of s.matched)if(v.beforeEnter&&!p.matched.includes(v))if(x(v.beforeEnter))for(const k of v.beforeEnter)d.push(j(k,s,p));else d.push(j(v.beforeEnter,s,p));return d.push(R),I(d)}).then(()=>(s.matched.forEach(v=>v.enterCallbacks={}),d=fe(b,"beforeRouteEnter",s,p),d.push(R),I(d))).then(()=>{d=[];for(const v of h.list())d.push(j(v,s,p));return d.push(R),I(d)}).catch(v=>M(v,8)?v:Promise.reject(v))}function ye(s,p,d){for(const E of m.list())Ee(()=>E(s,p,d))}function Ce(s,p,d,E,A){const b=F(s,p);if(b)return b;const R=p===L,v=H?history.state:{};d&&(E||R?r.replace(s.fullPath,P({scroll:R&&v&&v.scroll},A)):r.push(s.fullPath,A)),i.value=s,we(s,p,d,R),oe()}let U;function nt(){U||(U=r.listen((s,p,d)=>{if(!Pe.listening)return;const E=C(s),A=T(E);if(A){G(P(A,{replace:!0}),E).catch(Q);return}l=E;const b=i.value;H&&Bt(be(b.fullPath,d.delta),te()),ve(E,b).catch(R=>M(R,12)?R:M(R,2)?(G(R.to,E).then(v=>{M(v,20)&&!d.delta&&d.type===X.pop&&r.go(-1,!1)}).catch(Q),Promise.reject()):(d.delta&&r.go(-d.delta,!1),re(R,E,b))).then(R=>{R=R||Ce(E,b,!1),R&&(d.delta&&!M(R,8)?r.go(-d.delta,!1):d.type===X.pop&&M(R,20)&&r.go(-1,!1)),ye(E,b,R)}).catch(Q)}))}let ue=V(),Re=V(),Z;function re(s,p,d){oe(s);const E=Re.list();return E.length?E.forEach(A=>A(s,p,d)):console.error(s),Promise.reject(s)}function ut(){return Z&&i.value!==L?Promise.resolve():new Promise((s,p)=>{ue.add([s,p])})}function oe(s){return Z||(Z=!s,nt(),ue.list().forEach(([p,d])=>s?d(s):p()),ue.reset()),s}function we(s,p,d,E){const{scrollBehavior:A}=e;if(!H||!A)return Promise.resolve();const b=!d&&St(be(s.fullPath,0))||(E||!d)&&history.state&&history.state.scroll||null;return at().then(()=>A(s,p,b)).then(R=>R&&At(R)).catch(R=>re(R,s,p))}const se=s=>r.go(s);let ae;const J=new Set,Pe={currentRoute:i,listening:!0,addRoute:g,removeRoute:y,hasRoute:B,getRoutes:S,resolve:C,options:e,push:_,replace:$,go:se,back:()=>se(-1),forward:()=>se(1),beforeEach:a.add,beforeResolve:h.add,afterEach:m.add,onError:Re.add,isReady:ut,install(s){const p=this;s.component("RouterLink",ln),s.component("RouterView",pn),s.config.globalProperties.$router=p,Object.defineProperty(s.config.globalProperties,"$route",{enumerable:!0,get:()=>W(i)}),H&&!ae&&i.value===L&&(ae=!0,_(r.location).catch(A=>{}));const d={};for(const A in L)d[A]=O(()=>i.value[A]);s.provide(ne,p),s.provide(ge,He(d)),s.provide(pe,i);const E=s.unmount;J.add(s),s.unmount=function(){J.delete(s),J.size<1&&(l=L,U&&U(),U=null,i.value=L,ae=!1,Z=!1),E()}}};function I(s){return s.reduce((p,d)=>p.then(()=>Ee(d)),Promise.resolve())}return Pe}function mn(e,t){const n=[],u=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let h=0;h<a;h++){const m=t.matched[h];m&&(e.matched.find(l=>z(l,m))?u.push(m):n.push(m));const i=e.matched[h];i&&(t.matched.find(l=>z(l,i))||r.push(i))}return[n,u,r]}function An(){return N(ne)}function Bn(){return N(ge)}export{vn as E,Rn as _,Pn as a,Bn as b,wn as c,yn as d,lt as g,An as u,Cn as z};