@nuxt/devtools 4.0.0-alpha.7 → 4.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/chunks/analyze-build.mjs +32 -0
- package/dist/chunks/code-server.mjs +75 -0
- package/dist/chunks/module-main.mjs +633 -304
- package/dist/chunks/timeline.mjs +2 -2
- package/dist/chunks/vite-inspect.mjs +75 -39
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-e7n6afwb.js +1 -0
- package/dist/client/_nuxt/analyze-build-hl5kov9g.js +1 -0
- package/dist/client/_nuxt/assets-mhs93a2v.js +6 -0
- package/dist/client/_nuxt/{auth-required-panel-gwrodxrm.js → auth-required-panel-fp6njgq4.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f408df35-fbed-4f67-b31a-84e2dcf7d5f4.json +1 -0
- package/dist/client/_nuxt/{client-jwk7bkap.js → client-e4xweo15.js} +1 -1
- package/dist/client/_nuxt/client-ox3ztino.js +2 -0
- package/dist/client/_nuxt/code-diff-g3koa3wx.js +8 -0
- package/dist/client/_nuxt/code-snippets-jiqnd4op.js +1 -0
- package/dist/client/_nuxt/components-jjqi3963.js +1 -0
- package/dist/client/_nuxt/composable-item-nslyhu40.js +1 -0
- package/dist/client/_nuxt/composables-jsh6xr6n.js +1 -0
- package/dist/client/_nuxt/custom-_name_-nby2wkqs.js +1 -0
- package/dist/client/_nuxt/data-schema-button-n858k5no.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-nd5v2dc8.js +2 -0
- package/dist/client/_nuxt/debug-iqz97avh.js +1 -0
- package/dist/client/_nuxt/{default-ibmlv6hu.js → default-kms351ji.js} +1 -1
- package/dist/client/_nuxt/dist-cwkxp5t4.js +1 -0
- package/dist/client/_nuxt/dist-das2ggjj.js +1 -0
- package/dist/client/_nuxt/dist-hhnji3pn.js +1 -0
- package/dist/client/_nuxt/{duration-display-cfe3xsok.js → duration-display-kvy6t3q5.js} +1 -1
- package/dist/client/_nuxt/entry.css-hsdbnv92.css +1 -0
- package/dist/client/_nuxt/error-404-m7lxn6po.js +1 -0
- package/dist/client/_nuxt/error-404.css-kodsrozu.css +1 -0
- package/dist/client/_nuxt/error-500-fa1284ej.js +1 -0
- package/dist/client/_nuxt/error-500.css-mq6ubyvk.css +1 -0
- package/dist/client/_nuxt/error-dnpxky1s.js +9 -0
- package/dist/client/_nuxt/{filepath-item-calgslzq.js → filepath-item-elq07qqm.js} +1 -1
- package/dist/client/_nuxt/full-muovlha1.js +1 -0
- package/dist/client/_nuxt/{help-fab-ietvwhig.js → help-fab-mk77l527.js} +1 -1
- package/dist/client/_nuxt/hooks-fuegc0zi.js +1 -0
- package/dist/client/_nuxt/imports-dxp64giy.js +1 -0
- package/dist/client/_nuxt/launch-page-ldhzltru.js +1 -0
- package/dist/client/_nuxt/mbruyqke.js +4 -0
- package/dist/client/_nuxt/modules-ip395o4i.js +1 -0
- package/dist/client/_nuxt/nbadge-odjar6lb.js +1 -0
- package/dist/client/_nuxt/ncheckbox-ecu968cz.js +1 -0
- package/dist/client/_nuxt/ncode-block-ivymjiov.js +2 -0
- package/dist/client/_nuxt/ndrawer-fbwc78mp.js +1 -0
- package/dist/client/_nuxt/ndropdown-j9whus4q.js +1 -0
- package/dist/client/_nuxt/{nicon-title-f3ho3hah.js → nicon-title-lthyup78.js} +1 -1
- package/dist/client/_nuxt/{nlink-endeyoly.js → nlink-iv6gnrhx.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown-iw4stzqp.js → nmarkdown-mbwbivxu.js} +1 -1
- package/dist/client/_nuxt/{nnavbar-n8fcnalx.js → nnavbar-ivws4py6.js} +1 -1
- package/dist/client/_nuxt/none-f6zkixpn.js +1 -0
- package/dist/client/_nuxt/npanel-grids-jzjbt8z8.js +1 -0
- package/dist/client/_nuxt/nsection-block-xwt9b4fq.js +1 -0
- package/dist/client/_nuxt/nselect-efk0r1bm.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-o18hum8e.js +1 -0
- package/dist/client/_nuxt/nsplit-pane-nl6gqw3a.js +1 -0
- package/dist/client/_nuxt/nsplit-pane.css-o64elxn9.css +1 -0
- package/dist/client/_nuxt/{ntip-m8x8y44j.js → ntip-e476flgx.js} +1 -1
- package/dist/client/_nuxt/nuxt-ck1m833g.js +2 -0
- package/dist/client/_nuxt/open-graph-fevqc4qw.js +3 -0
- package/dist/client/_nuxt/overview-mov3ns5a.js +1 -0
- package/dist/client/_nuxt/pages-hl3ggxo7.js +1 -0
- package/dist/client/_nuxt/payload-i1xm1c2a.js +1 -0
- package/dist/client/_nuxt/pinia-j5ib0mm9.js +1 -0
- package/dist/client/_nuxt/plugins-dmozf1ud.js +1 -0
- package/dist/client/_nuxt/ready-mci0xx49.js +1 -0
- package/dist/client/_nuxt/render-tree-ht6m4wvr.js +1 -0
- package/dist/client/_nuxt/runtime-configs-lwkz00jf.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-oyv7niet.js +1 -0
- package/dist/client/_nuxt/server-routes-e2av60g4.js +7 -0
- package/dist/client/_nuxt/server-tasks-jdi82ndh.js +1 -0
- package/dist/client/_nuxt/settings-nqvn74vj.js +1 -0
- package/dist/client/_nuxt/splitpanes.esm-e6jbjw2k.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-bw2f6i1o.js +1 -0
- package/dist/client/_nuxt/state-components-frowf3zr.js +1 -0
- package/dist/client/_nuxt/state-editor-dnnm0b1r.js +1 -0
- package/dist/client/_nuxt/state-modules-b9ourhpx.js +1 -0
- package/dist/client/_nuxt/storage-dtuxyb3g.js +1 -0
- package/dist/client/_nuxt/storage-options-o7q1mchx.js +1 -0
- package/dist/client/_nuxt/timeline-dtcyzchh.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-kfral2d7.js → unocss-runtime-l66gafm5.js} +1 -1
- package/dist/client/_nuxt/utils-d9q1xry0.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-l1ffxhko.js +3861 -0
- package/dist/client/_nuxt/vendor/{markdown-it-gg8o3tmh.js → markdown-it-cx0uvu2o.js} +1 -1
- package/dist/client/_nuxt/vendor/{quicktype-core-ozubcbyl.js → quicktype-core-otmjigaj.js} +65 -65
- package/dist/client/_nuxt/vendor/shiki-mgsi4s2l.js +153 -0
- package/dist/client/_nuxt/vendor/unocss-b56v4bpd.js +3 -0
- package/dist/client/_nuxt/virtual-files-odf1l0xb.js +1 -0
- package/dist/client/_nuxt/vue-devtools-bho31pmk.js +4 -0
- package/dist/client/_nuxt/vue-router-d5qsebus.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.js +20 -3
- package/dist/shared/devtools.CCWq4fFE.mjs +113 -0
- package/dist/types.d.mts +1 -5
- package/dist/webcomponents/index.mjs +1 -1
- package/package.json +45 -52
- package/.discoveryrc.cjs +0 -13
- package/dist/chunks/vscode.mjs +0 -170
- package/dist/client/_nuxt/__blank-ekrx7eve.js +0 -1
- package/dist/client/_nuxt/analyze-build-gtjxxh9s.js +0 -1
- package/dist/client/_nuxt/assets-fxuoynew.js +0 -6
- package/dist/client/_nuxt/builds/meta/23fee0aa-9df9-4da8-b519-ce0799e7da4e.json +0 -1
- package/dist/client/_nuxt/code-diff-d1bf4mlz.js +0 -8
- package/dist/client/_nuxt/code-snippets-nodldh90.js +0 -1
- package/dist/client/_nuxt/components-ibu6c1zd.js +0 -1
- package/dist/client/_nuxt/composable-item-lb3qexrh.js +0 -1
- package/dist/client/_nuxt/custom-_name_-dt22ybu3.js +0 -1
- package/dist/client/_nuxt/data-schema-button-m4wb470q.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-5ccj6aug.js +0 -2
- package/dist/client/_nuxt/debug-nxl66qh3.js +0 -1
- package/dist/client/_nuxt/dist-nsuzcp77.js +0 -1
- package/dist/client/_nuxt/entry.css-m21ytcnz.css +0 -1
- package/dist/client/_nuxt/error-404-izmgsqlm.js +0 -1
- package/dist/client/_nuxt/error-404.css-l9jcssuy.css +0 -1
- package/dist/client/_nuxt/error-500-fejd4grh.js +0 -1
- package/dist/client/_nuxt/error-500.css-he4ew8b1.css +0 -1
- package/dist/client/_nuxt/error-mm873c55.js +0 -9
- package/dist/client/_nuxt/full-pesi6bu3.js +0 -1
- package/dist/client/_nuxt/hooks-mqgelnks.js +0 -1
- package/dist/client/_nuxt/imports-bofdhcsr.js +0 -1
- package/dist/client/_nuxt/launch-page-i8mgxym7.js +0 -1
- package/dist/client/_nuxt/modules-b6uha2ss.js +0 -1
- package/dist/client/_nuxt/nbadge-ft1i3ddy.js +0 -1
- package/dist/client/_nuxt/ncheckbox-gl62y715.js +0 -1
- package/dist/client/_nuxt/ncode-block-ksrq5ppu.js +0 -2
- package/dist/client/_nuxt/ndrawer-evv584t1.js +0 -1
- package/dist/client/_nuxt/ndropdown-dqqc8bnq.js +0 -1
- package/dist/client/_nuxt/none-gr24yqiq.js +0 -1
- package/dist/client/_nuxt/nsection-block-n5u7wj9x.js +0 -1
- package/dist/client/_nuxt/nselect-kdzalcm2.js +0 -1
- package/dist/client/_nuxt/nselect-tabs-e440xayq.js +0 -1
- package/dist/client/_nuxt/nswitch-pdw73751.js +0 -1
- package/dist/client/_nuxt/nuxt-kphganvs.js +0 -1
- package/dist/client/_nuxt/o7y7c26x.js +0 -4
- package/dist/client/_nuxt/open-graph-mtq8qyx5.js +0 -3
- package/dist/client/_nuxt/overview-idjgy9u4.js +0 -1
- package/dist/client/_nuxt/pages-g3tcvbsn.js +0 -1
- package/dist/client/_nuxt/pages-lk0hxlsc.js +0 -1
- package/dist/client/_nuxt/payload-ovd8emqe.js +0 -1
- package/dist/client/_nuxt/pinia-e6em75yg.js +0 -1
- package/dist/client/_nuxt/plugins-ojph2z4c.js +0 -1
- package/dist/client/_nuxt/ready-b5u27bv4.js +0 -1
- package/dist/client/_nuxt/render-tree-iwtso0n9.js +0 -1
- package/dist/client/_nuxt/rpc-ewzip6fb.js +0 -4
- package/dist/client/_nuxt/runtime-configs-gyhmrfcz.js +0 -1
- package/dist/client/_nuxt/server-discovery-cfu428ir.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-hhxdu10p.js +0 -1
- package/dist/client/_nuxt/server-routes-efc7olve.js +0 -7
- package/dist/client/_nuxt/server-tasks-o59rfww6.js +0 -1
- package/dist/client/_nuxt/settings-c6tbo50r.js +0 -1
- package/dist/client/_nuxt/stacktrace-list-c5b46nul.js +0 -1
- package/dist/client/_nuxt/state-components-eaw2evd3.js +0 -1
- package/dist/client/_nuxt/state-editor-jm35t8p1.js +0 -1
- package/dist/client/_nuxt/state-modules-oox7nhib.js +0 -1
- package/dist/client/_nuxt/storage-fdd2zc94.js +0 -1
- package/dist/client/_nuxt/storage-options-ho965h55.js +0 -1
- package/dist/client/_nuxt/terminals-b8awmi75.js +0 -1
- package/dist/client/_nuxt/terminals.css-mejv43xm.css +0 -1
- package/dist/client/_nuxt/timeline-nsh72kov.js +0 -31
- package/dist/client/_nuxt/utils-hgmynvjd.js +0 -2
- package/dist/client/_nuxt/vendor/json-editor-vue-mkw4apmc.js +0 -3869
- package/dist/client/_nuxt/vendor/shiki-c7z35hpo.js +0 -293
- package/dist/client/_nuxt/vendor/unocss-lkro8gbr.js +0 -3
- package/dist/client/_nuxt/vendor/xterm-eb5atty5.js +0 -36
- package/dist/client/_nuxt/vendor/xterm.css-j9zpjwmg.css +0 -1
- package/dist/client/_nuxt/virtual-files-met9zkti.js +0 -1
- package/dist/client/_nuxt/vue-devtools-bl144b70.js +0 -4
- package/dist/client/_nuxt/vue-router-cnnrtyb0.js +0 -1
- package/dist/client/discovery/index.html +0 -611
- package/dist/shared/devtools.nEotcg1R.mjs +0 -113
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ct as e,G as t,P as n,St as r,T as i,Tt as a,bt as o,j as s,jt as c,k as l,p as u,st as d}from"./vendor/json-editor-vue-mkw4apmc.js";var f=typeof document<`u`;function p(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function m(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&p(e.default)}var h=Object.assign;function g(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 _=()=>{},v=Array.isArray;function ee(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var y=Symbol(``);function b(e,t){return h(Error(),{type:e,[y]:!0},t)}function x(e,t){return e instanceof Error&&y in e&&(t==null||!!(e.type&t))}var S=Symbol(``),te=Symbol(``),C=Symbol(``),w=Symbol(``),T=Symbol(``);function ne(e){return s(w)}var E=/#/g,re=/&/g,D=/\//g,O=/=/g,ie=/\?/g,k=/\+/g,ae=/%5B/g,oe=/%5D/g,A=/%5E/g,se=/%60/g,j=/%7B/g,M=/%7C/g,N=/%7D/g,P=/%20/g;function F(e){return e==null?``:encodeURI(``+e).replace(M,`|`).replace(ae,`[`).replace(oe,`]`)}function ce(e){return F(e).replace(j,`{`).replace(N,`}`).replace(A,`^`)}function I(e){return F(e).replace(k,`%2B`).replace(P,`+`).replace(E,`%23`).replace(re,`%26`).replace(se,"`").replace(j,`{`).replace(N,`}`).replace(A,`^`)}function L(e){return I(e).replace(O,`%3D`)}function le(e){return F(e).replace(E,`%23`).replace(ie,`%3F`)}function ue(e){return le(e).replace(D,`%2F`)}function R(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var z=/\/$/,B=e=>e.replace(z,``);function V(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=q(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:R(o)}}function de(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function H(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function fe(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])&&W(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 W(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!G(e[n],t[n]))return!1;return!0}function G(e,t){return v(e)?K(e,t):v(t)?K(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function K(e,t){return v(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function q(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 J={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function Y(e){if(!e)if(f){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),B(e)}var X=/^[^#]+#/;function pe(e,t){return e.replace(X,`#`)+t}function me(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 Z=()=>({left:window.scrollX,top:window.scrollY});function he(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=me(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 ge(e,t){return(history.state?history.state.position-t:-1)+e}var _e=new Map;function ve(e,t){_e.set(e,t)}function ye(e){let t=_e.get(e);return _e.delete(e),t}function be(e){return typeof e==`string`||e&&typeof e==`object`}function xe(e){return typeof e==`string`||typeof e==`symbol`}function Se(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(k,` `),i=r.indexOf(`=`),a=R(i<0?r:r.slice(0,i)),o=i<0?null:R(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 Ce(e){let t=``;for(let n in e){let r=e[n];if(n=L(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(v(r)?r.map(e=>e&&I(e)):[r&&I(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]=v(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Q(){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 $(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(b(4,{from:n,to:t})):e instanceof Error?c(e):be(e)?c(b(2,{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 Te(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(p(s)){let c=(s.__vccOpts||s)[t];c&&a.push($(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=m(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&$(c,n,r,o,e,i)()}))}}return a}function Ee(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 De=()=>location.protocol+`//`+location.host;function Oe(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),H(n,``)}return H(n,e)+r+i}function ke(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Oe(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:`pop`,direction:u?u>0?`forward`:`back`:``})})};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(h({},e.state,{scroll:Z()}),``)}}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 Ae(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Z():null}}function je(e){let{history:t,location:n}=window,r={value:Oe(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:De()+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,h({},t.state,Ae(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=h({},i.value,t.state,{forward:e,scroll:Z()});a(o.current,o,!0),a(e,h({},Ae(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Me(e){e=Y(e);let t=je(e),n=ke(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=h({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 Ne(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Me(e)}var Pe={type:0,value:``},Fe=/[a-zA-Z0-9_]/;function Ie(e){if(!e)return[[]];if(e===`/`)return[[Pe]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,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 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Fe.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Le=`[^/]+?`,Re={sensitive:!1,strict:!1,start:!0,end:!0},ze=/[.+*?^${}()[\]/\\]/g;function Be(e,t){let n=h({},Re,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(ze,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Le;if(u!==Le){s+=10;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+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}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===0)n+=e.value;else if(e.type===1){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 Ve(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]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function He(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Ve(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Ue(r))return 1;if(Ue(i))return-1}return i.length-r.length}function Ue(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var We={strict:!1,end:!0,sensitive:!1};function Ge(e,t,n){let r=h(Be(Ie(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ke(e,t){let n=[],r=new Map;t=ee(We,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Je(e);s.aliasOf=r&&r.record;let l=ee(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(Je(h({},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=Ge(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Xe(d)&&o(e.name)),et(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)}:_}function o(e){if(xe(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=Qe(e,n);n.splice(t,0,e),e.record.name&&!Xe(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 b(1,{location:e});s=i.record.name,a=h(qe(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&qe(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 b(1,{location:e,currentLocation:t});s=i.record.name,a=h({},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:Ze(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 qe(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Je(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ye(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 Ye(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 Xe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ze(e){return e.reduce((e,t)=>h(e,t.meta),{})}function Qe(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;He(e,t[i])<0?r=i:n=i+1}let i=$e(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function $e(e){let t=e;for(;t=t.parent;)if(et(t)&&He(e,t)===0)return t}function et({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tt(e){let t=s(C),n=s(w),r=u(()=>{let n=c(e.to);return t.resolve(n)}),i=u(()=>{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=ot(e[t-2]);return t>1&&ot(i)===s&&a[a.length-1].path!==s?a.findIndex(U.bind(null,e[t-2])):o}),a=u(()=>i.value>-1&&at(n.params,r.value.params)),o=u(()=>i.value>-1&&i.value===n.matched.length-1&&W(n.params,r.value.params));function l(n={}){if(it(n)){let n=t[c(e.replace)?`replace`:`push`](c(e.to)).catch(_);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:u(()=>r.value.href),isActive:a,isExactActive:o,navigate:l}}function nt(e){return e.length===1?e[0]:e}var rt=i({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:tt,setup(e,{slots:t}){let n=o(tt(e)),{options:r}=s(C),i=u(()=>({[st(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[st(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&nt(t.default(n));return e.custom?r:l(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function it(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 at(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.valueOf()!==i[t].valueOf()))return!1}return!0}function ot(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var st=(e,t,n)=>e??t??n,ct=i({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:n,slots:i}){let a=s(T),o=u(()=>e.route||a.value),f=s(te,0),p=u(()=>{let e=c(f),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),m=u(()=>o.value.matched[p.value]);t(te,u(()=>p.value+1)),t(S,m),t(T,o);let g=r();return d(()=>[g.value,m.value,e.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 t=o.value,r=e.name,a=m.value,s=a&&a.components[r];if(!s)return lt(i.default,{Component:s,route:t});let c=a.props[r],u=l(s,h({},c?c===!0?t.params:typeof c==`function`?c(t):c:null,n,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[r]=null)},ref:g}));return lt(i.default,{Component:u,route:t})||u}}});function lt(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var ut=ct;function dt(t){let r=Ke(t.routes,t),i=t.parseQuery||Se,o=t.stringifyQuery||Ce,s=t.history,l=Q(),u=Q(),d=Q(),p=a(J),m=J;f&&t.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let ee=g.bind(null,e=>``+e),y=g.bind(null,ue),S=g.bind(null,R);function te(e,t){let n,i;return xe(e)?(n=r.getRecordMatcher(e),i=t):i=e,r.addRoute(i,n)}function ne(e){let t=r.getRecordMatcher(e);t&&r.removeRoute(t)}function E(){return r.getRoutes().map(e=>e.record)}function re(e){return!!r.getRecordMatcher(e)}function D(e,t){if(t=h({},t||p.value),typeof e==`string`){let n=V(i,e,t.path),a=r.resolve({path:n.path},t),o=s.createHref(n.fullPath);return h(n,a,{params:S(a.params),redirectedFrom:void 0,href:o})}let n;if(e.path!=null)n=h({},e,{path:V(i,e.path,t.path).path});else{let r=h({},e.params);for(let e in r)r[e]??delete r[e];n=h({},e,{params:y(r)}),t.params=y(t.params)}let a=r.resolve(n,t),c=e.hash||``;a.params=ee(S(a.params));let l=de(o,h({},e,{hash:ce(c),path:a.path})),u=s.createHref(l);return h({fullPath:l,hash:c,query:o===Ce?we(e.query):e.query||{}},a,{redirectedFrom:void 0,href:u})}function O(e){return typeof e==`string`?V(i,e,p.value.path):h({},e)}function ie(e,t){if(m!==e)return b(8,{from:t,to:e})}function k(e){return A(e)}function ae(e){return k(h(O(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=O(i):{path:i},i.params={}),h({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function A(e,t){let n=m=D(e),r=p.value,i=e.state,a=e.force,s=e.replace===!0,c=oe(n,r);if(c)return A(h(O(c),{state:typeof c==`object`?h({},i,c.state):i,force:a,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!a&&fe(o,r,n)&&(u=b(16,{to:l,from:r}),W(r,r,!0,!1)),(u?Promise.resolve(u):M(l,r)).catch(e=>x(e)?x(e,2)?e:U(e):B(e,l,r)).then(e=>{if(e){if(x(e,2))return A(h({replace:s},O(e.to),{state:typeof e.to==`object`?h({},i,e.to.state):i,force:a}),t||l)}else e=P(l,r,!0,s,i);return N(l,r,e),e})}function se(e,t){let n=ie(e,t);return n?Promise.reject(n):Promise.resolve()}function j(e){let t=q.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function M(e,t){let n,[r,i,a]=Ee(e,t);n=Te(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push($(r,e,t))});let o=se.bind(null,e,t);return n.push(o),X(n).then(()=>{n=[];for(let r of l.list())n.push($(r,e,t));return n.push(o),X(n)}).then(()=>{n=Te(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push($(r,e,t))});return n.push(o),X(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(v(r.beforeEnter))for(let i of r.beforeEnter)n.push($(i,e,t));else n.push($(r.beforeEnter,e,t));return n.push(o),X(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Te(a,`beforeRouteEnter`,e,t,j),n.push(o),X(n))).then(()=>{n=[];for(let r of u.list())n.push($(r,e,t));return n.push(o),X(n)}).catch(e=>x(e,8)?e:Promise.reject(e))}function N(e,t,n){d.list().forEach(r=>j(()=>r(e,t,n)))}function P(e,t,n,r,i){let a=ie(e,t);if(a)return a;let o=t===J,c=f?history.state:{};n&&(r||o?s.replace(e.fullPath,h({scroll:o&&c&&c.scroll},i)):s.push(e.fullPath,i)),p.value=e,W(e,t,n,o),U()}let F;function I(){F||=s.listen((e,t,n)=>{if(!Y.listening)return;let r=D(e),i=oe(r,Y.currentRoute.value);if(i){A(h(i,{replace:!0,force:!0}),r).catch(_);return}m=r;let a=p.value;f&&ve(ge(a.fullPath,n.delta),Z()),M(r,a).catch(e=>x(e,12)?e:x(e,2)?(A(h(O(e.to),{force:!0}),r).then(e=>{x(e,20)&&!n.delta&&n.type===`pop`&&s.go(-1,!1)}).catch(_),Promise.reject()):(n.delta&&s.go(-n.delta,!1),B(e,r,a))).then(e=>{e||=P(r,a,!1),e&&(n.delta&&!x(e,8)?s.go(-n.delta,!1):n.type===`pop`&&x(e,20)&&s.go(-1,!1)),N(r,a,e)}).catch(_)})}let L=Q(),le=Q(),z;function B(e,t,n){U(e);let r=le.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function H(){return z&&p.value!==J?Promise.resolve():new Promise((e,t)=>{L.add([e,t])})}function U(e){return z||(z=!e,I(),L.list().forEach(([t,n])=>e?n(e):t()),L.reset()),e}function W(e,r,i,a){let{scrollBehavior:o}=t;if(!f||!o)return Promise.resolve();let s=!i&&ye(ge(e.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return n().then(()=>o(e,r,s)).then(e=>e&&he(e)).catch(t=>B(t,e,r))}let G=e=>s.go(e),K,q=new Set,Y={currentRoute:p,listening:!0,addRoute:te,removeRoute:ne,clearRoutes:r.clearRoutes,hasRoute:re,getRoutes:E,resolve:D,options:t,push:k,replace:ae,go:G,back:()=>G(-1),forward:()=>G(1),beforeEach:l.add,beforeResolve:u.add,afterEach:d.add,onError:le.add,isReady:H,install(t){t.component(`RouterLink`,rt),t.component(`RouterView`,ut),t.config.globalProperties.$router=Y,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>c(p)}),f&&!K&&p.value===J&&(K=!0,k(s.location).catch(e=>{}));let n={};for(let e in J)Object.defineProperty(n,e,{get:()=>p.value[e],enumerable:!0});t.provide(C,Y),t.provide(w,e(n)),t.provide(T,p);let r=t.unmount;q.add(t),t.unmount=function(){q.delete(t),q.size<1&&(m=J,F&&F(),F=null,p.value=J,K=!1,z=!1),r()}}};function X(e){return e.reduce((e,t)=>e.then(()=>j(t)),Promise.resolve())}return Y}export{J as a,Me as i,dt as n,ne as o,Ne as r,ut as t};
|