Files
ogame-vue-ts/docs/assets/vendor-vue-Bqq1sBNf.js
谦君 9754140cbf feat: 优化 README 及文档结构,新增英文说明
删除 README.zh-CN.md,新增英文版 README.EN.md,简体中文说明合并至 README.md 并补充内容。同步 docs/assets 下页面 JS/CSS 文件,优化文档资源命名与引用,提升多语言文档一致性。
2025-12-11 15:21:51 +08:00

1 line
36 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{$ as e,Ct as t,Dt as n,Et as r,St as i,Tt as a,W as o,Z as s,_t as c,bt as l,ct as u,et as d,ft as f,gt as p,ht as m,it as ee,nt as h,tt as g,vt as _,wt as te,xt as ne,yt as v}from"./vendor-ui-DBxeWLyT.js";var y=typeof window<`u`,b,x=e=>b=e,re=Symbol();function S(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var C;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(C||={});var w=(()=>typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null})();function T(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function E(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){k(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function ie(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function D(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var O=typeof navigator==`object`?navigator:{userAgent:``},ae=(()=>/Macintosh/.test(O.userAgent)&&/AppleWebKit/.test(O.userAgent)&&!/Safari/.test(O.userAgent))(),k=y?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ae?oe:`msSaveOrOpenBlob`in O?A:j:()=>{};function oe(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?D(r):ie(r.href)?E(e,t,n):(r.target=`_blank`,D(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){D(r)},0))}function A(e,t=`download`,n){if(typeof e==`string`)if(ie(e))E(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){D(t)})}else navigator.msSaveOrOpenBlob(T(e,n),t)}function j(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return E(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(w.HTMLElement))||`safari`in w,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ae)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:se}=Object;function ce(){let e=m(!0),t=e.run(()=>i({})),n=[],r=[],a=v({install(e){x(a),a._a=e,e.provide(re,a),e.config.globalProperties.$pinia=a,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}var le=()=>{};function M(e,t,n,r=le){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&p()&&l(i),i}function N(e,...t){e.forEach(e=>{e(...t)})}var P=e=>e(),F=Symbol(),I=Symbol();function ue(e,t){for(let n in e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e),t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];S(i)&&S(r)&&e.hasOwnProperty(n)&&!_(r)&&!c(r)?e[n]=ue(i,r):e[n]=r}return e}var de=Symbol();function fe(e){return!S(e)||!Object.prototype.hasOwnProperty.call(e,de)}var{assign:L}=Object;function pe(e){return!!(_(e)&&e.effect)}function me(e,t,n,i){let{state:a,actions:s,getters:c}=t,l=n.state.value[e],u;function d(){return l||(n.state.value[e]=a?a():{}),L(r(n.state.value[e]),s,Object.keys(c||{}).reduce((t,r)=>(t[r]=v(o(()=>{x(n);let t=n._s.get(e);return c[r].call(t,t)})),t),{}))}return u=he(e,d,t,n,i,!0),u}function he(e,t,n={},r,o,s){let l,u=L({actions:{}},n),d={deep:!0},p,h,g=new Set,te=new Set,v=r.state.value[e];!s&&!v&&(r.state.value[e]={}),i({});let y;function b(t){let n;p=h=!1,typeof t==`function`?(t(r.state.value[e]),n={type:C.patchFunction,storeId:e,events:void 0}):(ue(r.state.value[e],t),n={type:C.patchObject,payload:t,storeId:e,events:void 0});let i=y=Symbol();ee().then(()=>{y===i&&(p=!0)}),h=!0,N(g,n,r.state.value[e])}let re=s?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{L(e,t)})}:le;function S(){l.stop(),g.clear(),te.clear(),r._s.delete(e)}let w=(t,n=``)=>{if(F in t)return t[I]=n,t;let i=function(){x(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}N(te,{args:n,name:i[I],store:T,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:T,n)}catch(e){throw N(o,e),e}return l instanceof Promise?l.then(e=>(N(a,e),e)).catch(e=>(N(o,e),Promise.reject(e))):(N(a,l),l)};return i[F]=!0,i[I]=n,i},T=ne({_p:r,$id:e,$onAction:M.bind(null,te),$patch:b,$reset:re,$subscribe(t,n={}){let i=M(g,t,n.detached,()=>a()),a=l.run(()=>f(()=>r.state.value[e],r=>{(n.flush===`sync`?h:p)&&t({storeId:e,type:C.direct,events:void 0},r)},L({},d,n)));return i},$dispose:S});r._s.set(e,T);let E=(r._a&&r._a.runWithContext||P)(()=>r._e.run(()=>(l=m()).run(()=>t({action:w}))));for(let t in E){let n=E[t];_(n)&&!pe(n)||c(n)?s||(v&&fe(n)&&(_(n)?n.value=v[t]:ue(n,v[t])),r.state.value[e][t]=n):typeof n==`function`&&(E[t]=w(n,t),u.actions[t]=n)}return L(T,E),L(a(T),E),Object.defineProperty(T,`$state`,{get:()=>r.state.value[e],set:e=>{b(t=>{L(t,e)})}}),r._p.forEach(e=>{L(T,l.run(()=>e({store:T,app:r._a,pinia:r,options:u})))}),v&&s&&n.hydrate&&n.hydrate(T.$state,v),p=!0,h=!0,T}function ge(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=d();return n||=o?g(re,null):null,n&&x(n),n=b,n._s.has(e)||(i?he(e,t,r,n):me(e,r,n)),n._s.get(e)}return a.$id=e,a}function _e(e,t){if(e==null)return;let n=e;for(let e=0;e<t.length;e++){if(n===void 0||n[t[e]]===void 0)return;if(n===null||n[t[e]]===null)return null;n=n[t[e]]}return n}function ve(e,t,n){if(n.length===0)return t;let r=n[0];return n.length>1&&(t=ve(typeof e!=`object`||!e||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function ye(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);let n={};for(let t in e)n[t]=e[t];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);let n={};for(let t in e)n[t]=e[t];return n}return ve(e,ye(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function be(e,t){return t.map(e=>e.split(`.`)).map(t=>[t,_e(e,t)]).filter(e=>e[1]!==void 0).reduce((e,t)=>ve(e,t[1],t[0]),{})}function xe(e,t){return t.map(e=>e.split(`.`)).reduce((e,t)=>ye(e,t),e)}function Se(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o,beforeHydrate:s,afterHydrate:c},l,u=!0){try{u&&s?.(l);let i=t.getItem(r);if(i){let t=n.deserialize(i),r=a?be(t,a):t,s=o?xe(r,o):r;e.$patch(s)}u&&c?.(l)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function Ce(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o}){try{let i=a?be(e,a):e,s=o?xe(i,o):i,c=n.serialize(s);t.setItem(r,c)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function we(e,t){return typeof e==`function`?e(t):typeof e==`string`?e:t}function Te(e,t,n){let{pinia:r,store:i,options:{persist:a=n}}=e;if(!a)return;if(!(i.$id in r.state.value)){let e=r._s.get(i.$id.replace(`__hot:`,``));e&&Promise.resolve().then(()=>e.$persist());return}let o=(Array.isArray(a)?a:a===!0?[{}]:[a]).map(t);i.$hydrate=({runHooks:t=!0}={})=>{o.forEach(n=>{Se(i,n,e,t)})},i.$persist=()=>{o.forEach(e=>{Ce(i.$state,e)})},o.forEach(t=>{Se(i,t,e),i.$subscribe((e,n)=>Ce(n,t),{detached:!0})})}function Ee(e={}){return function(t){Te(t,n=>{let r=we(n.key,t.store.$id);return{key:(e.key?e.key:e=>e)(r),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:e=>JSON.stringify(e),deserialize:e=>JSON.parse(e)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate??e.beforeHydrate,afterHydrate:n.afterHydrate??e.afterHydrate,pick:n.pick,omit:n.omit}},e.auto??!1)}}var De=Ee(),R=typeof document<`u`;function Oe(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function ke(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Oe(e.default)}var z=Object.assign;function Ae(e,t){let n={};for(let r in t){let i=t[r];n[r]=V(i)?i.map(e):e(i)}return n}var B=()=>{},V=Array.isArray;function je(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Me=/#/g,Ne=/&/g,Pe=/\//g,Fe=/=/g,Ie=/\?/g,Le=/\+/g,Re=/%5B/g,ze=/%5D/g,Be=/%5E/g,Ve=/%60/g,He=/%7B/g,Ue=/%7C/g,We=/%7D/g,Ge=/%20/g;function Ke(e){return e==null?``:encodeURI(``+e).replace(Ue,`|`).replace(Re,`[`).replace(ze,`]`)}function qe(e){return Ke(e).replace(He,`{`).replace(We,`}`).replace(Be,`^`)}function Je(e){return Ke(e).replace(Le,`%2B`).replace(Ge,`+`).replace(Me,`%23`).replace(Ne,`%26`).replace(Ve,"`").replace(He,`{`).replace(We,`}`).replace(Be,`^`)}function Ye(e){return Je(e).replace(Fe,`%3D`)}function Xe(e){return Ke(e).replace(Me,`%23`).replace(Ie,`%3F`)}function Ze(e){return Xe(e).replace(Pe,`%2F`)}function H(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Qe=/\/$/,$e=e=>e.replace(Qe,``);function et(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=st(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:H(o)}}function tt(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function nt(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function rt(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])&&it(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 it(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!at(e[n],t[n]))return!1;return!0}function at(e,t){return V(e)?ot(e,t):V(t)?ot(t,e):e===t}function ot(e,t){return V(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function st(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},ct=function(e){return e.pop=`pop`,e.push=`push`,e}({}),lt=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function ut(e){if(!e)if(R){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),$e(e)}var dt=/^[^#]+#/;function ft(e,t){return e.replace(dt,`#`)+t}function pt(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 mt=()=>({left:window.scrollX,top:window.scrollY});function ht(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=pt(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 gt(e,t){return(history.state?history.state.position-t:-1)+e}var _t=new Map;function vt(e,t){_t.set(e,t)}function yt(e){let t=_t.get(e);return _t.delete(e),t}function bt(e){return typeof e==`string`||e&&typeof e==`object`}function xt(e){return typeof e==`string`||typeof e==`symbol`}var G=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}({}),St=Symbol(``);G.MATCHER_NOT_FOUND,G.NAVIGATION_GUARD_REDIRECT,G.NAVIGATION_ABORTED,G.NAVIGATION_CANCELLED,G.NAVIGATION_DUPLICATED;function K(e,t){return z(Error(),{type:e,[St]:!0},t)}function q(e,t){return e instanceof Error&&St in e&&(t==null||!!(e.type&t))}function Ct(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(Le,` `),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];V(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function wt(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}(V(r)?r.map(e=>e&&Je(e)):[r&&Je(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Tt(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=V(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var Et=Symbol(``),Dt=Symbol(``),Ot=Symbol(``),kt=Symbol(``),At=Symbol(``);function J(){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 Y(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(K(G.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):bt(e)?c(K(G.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 jt(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(Oe(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Y(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=ke(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Y(c,n,r,o,e,i)()}))}}return a}function Mt(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 Nt=()=>location.protocol+`//`+location.host;function Pt(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),nt(n,``)}return nt(n,e)+r+i}function Ft(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Pt(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:ct.pop,direction:u?u>0?lt.forward:lt.back:lt.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(z({},e.state,{scroll:mt()}),``)}}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 It(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?mt():null}}function Lt(e){let{history:t,location:n}=window,r={value:Pt(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:Nt()+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,z({},t.state,It(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=z({},i.value,t.state,{forward:e,scroll:mt()});a(o.current,o,!0),a(e,z({},It(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Rt(e){e=ut(e);let t=Lt(e),n=Ft(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=z({location:``,base:e,go:r,createHref:ft.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}var X=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Z=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}(Z||{}),zt={type:X.Static,value:``},Bt=/[a-zA-Z0-9_]/;function Vt(e){if(!e)return[[]];if(e===`/`)return[[zt]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Z.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Z.Static?a.push({type:X.Static,value:l}):n===Z.Param||n===Z.ParamRegExp||n===Z.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:X.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==Z.ParamRegExp){r=n,n=Z.EscapeNext;continue}switch(n){case Z.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=Z.Param):f();break;case Z.EscapeNext:f(),n=r;break;case Z.Param:c===`(`?n=Z.ParamRegExp:Bt.test(c)?f():(d(),n=Z.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case Z.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=Z.ParamRegExpEnd:u+=c;break;case Z.ParamRegExpEnd:d(),n=Z.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===Z.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Ht=`[^/]+?`,Ut={sensitive:!1,strict:!1,start:!0,end:!0},Q=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}(Q||{}),Wt=/[.+*?^${}()[\]/\\]/g;function Gt(e,t){let n=z({},Ut,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[Q.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=Q.Segment+(n.sensitive?Q.BonusCaseSensitive:0);if(o.type===X.Static)r||(i+=`/`),i+=o.value.replace(Wt,`\\$&`),s+=Q.Static;else if(o.type===X.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Ht;if(u!==Ht){s+=Q.BonusCustomRegExp;try{`${u}`}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=Q.Dynamic,c&&(s+=Q.BonusOptional),n&&(s+=Q.BonusRepeatable),u===`.*`&&(s+=Q.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=Q.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===X.Static)n+=e.value;else if(e.type===X.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(V(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=V(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 Kt(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]===Q.Static+Q.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Q.Static+Q.Segment?1:-1:0}function qt(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Kt(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Jt(r))return 1;if(Jt(i))return-1}return i.length-r.length}function Jt(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Yt={strict:!1,end:!0,sensitive:!1};function Xt(e,t,n){let r=z(Gt(Vt(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Zt(e,t){let n=[],r=new Map;t=je(Yt,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=$t(e);s.aliasOf=r&&r.record;let l=je(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($t(z({},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=Xt(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!tn(d)&&o(e.name)),on(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)}:B}function o(e){if(xt(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=rn(e,n);n.splice(t,0,e),e.record.name&&!tn(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 K(G.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=z(Qt(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Qt(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);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw K(G.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=z({},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:nn(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 Qt(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function $t(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:en(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 en(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 tn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function nn(e){return e.reduce((e,t)=>z(e,t.meta),{})}function rn(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;qt(e,t[i])<0?r=i:n=i+1}let i=an(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function an(e){let t=e;for(;t=t.parent;)if(on(t)&&qt(e,t)===0)return t}function on({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function sn(e){let t=g(Ot),r=g(kt),i=o(()=>{let r=n(e.to);return t.resolve(r)}),a=o(()=>{let{matched:e}=i.value,{length:t}=e,n=e[t-1],a=r.matched;if(!n||!a.length)return-1;let o=a.findIndex(U.bind(null,n));if(o>-1)return o;let s=fn(e[t-2]);return t>1&&fn(n)===s&&a[a.length-1].path!==s?a.findIndex(U.bind(null,e[t-2])):o}),s=o(()=>a.value>-1&&dn(r.params,i.value.params)),c=o(()=>a.value>-1&&a.value===r.matched.length-1&&it(r.params,i.value.params));function l(r={}){if(un(r)){let r=t[n(e.replace)?`replace`:`push`](n(e.to)).catch(B);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>r),r}return Promise.resolve()}return{route:i,href:o(()=>i.value.href),isActive:s,isExactActive:c,navigate:l}}function cn(e){return e.length===1?e[0]:e}var ln=s({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:sn,setup(t,{slots:n}){let r=ne(sn(t)),{options:i}=g(Ot),a=o(()=>({[pn(t.activeClass,i.linkActiveClass,`router-link-active`)]:r.isActive,[pn(t.exactActiveClass,i.linkExactActiveClass,`router-link-exact-active`)]:r.isExactActive}));return()=>{let i=n.default&&cn(n.default(r));return t.custom?i:e(`a`,{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},i)}}});function un(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 dn(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(!V(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}function fn(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var pn=(e,t,n)=>e??t??n,mn=s({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:r,slots:a}){let s=g(At),c=o(()=>t.route||s.value),l=g(Dt,0),d=o(()=>{let e=n(l),{matched:t}=c.value,r;for(;(r=t[e])&&!r.components;)e++;return e}),p=o(()=>c.value.matched[d.value]);u(Dt,o(()=>d.value+1)),u(Et,p),u(At,c);let m=i();return f(()=>[m.value,p.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=c.value,i=t.name,o=p.value,s=o&&o.components[i];if(!s)return hn(a.default,{Component:s,route:n});let l=o.props[i],u=e(s,z({},l?l===!0?n.params:typeof l==`function`?l(n):l:null,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[i]=null)},ref:m}));return hn(a.default,{Component:u,route:n})||u}}});function hn(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var gn=mn;function _n(e){let r=Zt(e.routes,e),i=e.parseQuery||Ct,a=e.stringifyQuery||wt,o=e.history,s=J(),c=J(),l=J(),u=te(W),d=W;R&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let f=Ae.bind(null,e=>``+e),p=Ae.bind(null,Ze),m=Ae.bind(null,H);function h(e,t){let n,i;return xt(e)?(n=r.getRecordMatcher(e),i=t):i=e,r.addRoute(i,n)}function g(e){let t=r.getRecordMatcher(e);t&&r.removeRoute(t)}function _(){return r.getRoutes().map(e=>e.record)}function ne(e){return!!r.getRecordMatcher(e)}function v(e,t){if(t=z({},t||u.value),typeof e==`string`){let n=et(i,e,t.path),a=r.resolve({path:n.path},t),s=o.createHref(n.fullPath);return z(n,a,{params:m(a.params),hash:H(n.hash),redirectedFrom:void 0,href:s})}let n;if(e.path!=null)n=z({},e,{path:et(i,e.path,t.path).path});else{let r=z({},e.params);for(let e in r)r[e]??delete r[e];n=z({},e,{params:p(r)}),t.params=p(t.params)}let s=r.resolve(n,t),c=e.hash||``;s.params=f(m(s.params));let l=tt(a,z({},e,{hash:qe(c),path:s.path})),d=o.createHref(l);return z({fullPath:l,hash:c,query:a===wt?Tt(e.query):e.query||{}},s,{redirectedFrom:void 0,href:d})}function y(e){return typeof e==`string`?et(i,e,u.value.path):z({},e)}function b(e,t){if(d!==e)return K(G.NAVIGATION_CANCELLED,{from:t,to:e})}function x(e){return C(e)}function re(e){return x(z(y(e),{replace:!0}))}function S(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=y(i):{path:i},i.params={}),z({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=d=v(e),r=u.value,i=e.state,o=e.force,s=e.replace===!0,c=S(n,r);if(c)return C(z(y(c),{state:typeof c==`object`?z({},i,c.state):i,force:o,replace:s}),t||n);let l=n;l.redirectedFrom=t;let f;return!o&&rt(a,r,n)&&(f=K(G.NAVIGATION_DUPLICATED,{to:l,from:r}),le(r,r,!0,!1)),(f?Promise.resolve(f):E(l,r)).catch(e=>q(e)?q(e,G.NAVIGATION_GUARD_REDIRECT)?e:ce(e):j(e,l,r)).then(e=>{if(e){if(q(e,G.NAVIGATION_GUARD_REDIRECT))return C(z({replace:s},y(e.to),{state:typeof e.to==`object`?z({},i,e.to.state):i,force:o}),t||l)}else e=D(l,r,!0,s,i);return ie(l,r,e),e})}function w(e,t){let n=b(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=P.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,a]=Mt(e,t);n=jt(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Y(r,e,t))});let o=w.bind(null,e,t);return n.push(o),I(n).then(()=>{n=[];for(let r of s.list())n.push(Y(r,e,t));return n.push(o),I(n)}).then(()=>{n=jt(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Y(r,e,t))});return n.push(o),I(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(V(r.beforeEnter))for(let i of r.beforeEnter)n.push(Y(i,e,t));else n.push(Y(r.beforeEnter,e,t));return n.push(o),I(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=jt(a,`beforeRouteEnter`,e,t,T),n.push(o),I(n))).then(()=>{n=[];for(let r of c.list())n.push(Y(r,e,t));return n.push(o),I(n)}).catch(e=>q(e,G.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function ie(e,t,n){l.list().forEach(r=>T(()=>r(e,t,n)))}function D(e,t,n,r,i){let a=b(e,t);if(a)return a;let s=t===W,c=R?history.state:{};n&&(r||s?o.replace(e.fullPath,z({scroll:s&&c&&c.scroll},i)):o.push(e.fullPath,i)),u.value=e,le(e,t,n,s),ce()}let O;function ae(){O||=o.listen((e,t,n)=>{if(!F.listening)return;let r=v(e),i=S(r,F.currentRoute.value);if(i){C(z(i,{replace:!0,force:!0}),r).catch(B);return}d=r;let a=u.value;R&&vt(gt(a.fullPath,n.delta),mt()),E(r,a).catch(e=>q(e,G.NAVIGATION_ABORTED|G.NAVIGATION_CANCELLED)?e:q(e,G.NAVIGATION_GUARD_REDIRECT)?(C(z(y(e.to),{force:!0}),r).then(e=>{q(e,G.NAVIGATION_ABORTED|G.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===ct.pop&&o.go(-1,!1)}).catch(B),Promise.reject()):(n.delta&&o.go(-n.delta,!1),j(e,r,a))).then(e=>{e||=D(r,a,!1),e&&(n.delta&&!q(e,G.NAVIGATION_CANCELLED)?o.go(-n.delta,!1):n.type===ct.pop&&q(e,G.NAVIGATION_ABORTED|G.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),ie(r,a,e)}).catch(B)})}let k=J(),oe=J(),A;function j(e,t,n){ce(e);let r=oe.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function se(){return A&&u.value!==W?Promise.resolve():new Promise((e,t)=>{k.add([e,t])})}function ce(e){return A||(A=!e,ae(),k.list().forEach(([t,n])=>e?n(e):t()),k.reset()),e}function le(t,n,r,i){let{scrollBehavior:a}=e;if(!R||!a)return Promise.resolve();let o=!r&&yt(gt(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return ee().then(()=>a(t,n,o)).then(e=>e&&ht(e)).catch(e=>j(e,t,n))}let M=e=>o.go(e),N,P=new Set,F={currentRoute:u,listening:!0,addRoute:h,removeRoute:g,clearRoutes:r.clearRoutes,hasRoute:ne,getRoutes:_,resolve:v,options:e,push:x,replace:re,go:M,back:()=>M(-1),forward:()=>M(1),beforeEach:s.add,beforeResolve:c.add,afterEach:l.add,onError:oe.add,isReady:se,install(e){e.component(`RouterLink`,ln),e.component(`RouterView`,gn),e.config.globalProperties.$router=F,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>n(u)}),R&&!N&&u.value===W&&(N=!0,x(o.location).catch(e=>{}));let r={};for(let e in W)Object.defineProperty(r,e,{get:()=>u.value[e],enumerable:!0});e.provide(Ot,F),e.provide(kt,t(r)),e.provide(At,u);let i=e.unmount;P.add(e),e.unmount=function(){P.delete(e),P.size<1&&(d=W,O&&O(),O=null,u.value=W,N=!1,A=!1),i()}}};function I(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return F}function vn(){return g(Ot)}function yn(e){return g(kt)}var bn=1,$=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:bn++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],h(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Sn(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!h(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})};custom=(e,t)=>{let n=t?.id||bn++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function xn(e,t){let n=t?.id||bn++;return $.create({message:e,id:n,type:`default`,...t}),n}var Sn=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Cn=xn,wn=Object.assign(Cn,{success:$.success,info:$.info,warning:$.warning,error:$.error,custom:$.custom,message:$.message,promise:$.promise,dismiss:$.dismiss,loading:$.loading},{getHistory:()=>$.toasts,getToasts:()=>$.getActiveToasts()});export{Rt as a,De as c,_n as i,ce as l,ln as n,yn as o,gn as r,vn as s,wn as t,ge as u};