@vitejs/devtools-vite 0.7.6 → 0.8.1

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.
Files changed (40) hide show
  1. package/dist/dirs.d.mts +1 -3
  2. package/dist/dirs.mjs +1 -2
  3. package/dist/index.d.mts +1 -8
  4. package/dist/index.mjs +600 -385
  5. package/dist/nitro.json +2 -2
  6. package/dist/public/200.html +1 -1
  7. package/dist/public/404.html +1 -1
  8. package/dist/public/_nuxt/BG--lX9h.js +2 -0
  9. package/dist/public/_nuxt/BG3xwZh0.js +3 -0
  10. package/dist/public/_nuxt/BHvJDY_a.js +1 -0
  11. package/dist/public/_nuxt/BRJBCNrs.js +1 -0
  12. package/dist/public/_nuxt/{BU3RLqzC.js → B_-pr0hI.js} +1 -1
  13. package/dist/public/_nuxt/{DgNunWKg.js → B_NKCZsG.js} +5 -5
  14. package/dist/public/_nuxt/CEBMiqg6.js +1 -0
  15. package/dist/public/_nuxt/Ct3C12NP.js +4 -0
  16. package/dist/public/_nuxt/DEyNBz-F.js +2 -0
  17. package/dist/public/_nuxt/DSAFJh4r.js +1 -0
  18. package/dist/public/_nuxt/DbCy1lFc.js +1 -0
  19. package/dist/public/_nuxt/{DGlgHJBp.js → Dp2A4F6Z.js} +1 -1
  20. package/dist/public/_nuxt/builds/latest.json +1 -1
  21. package/dist/public/_nuxt/builds/meta/13f74333-301c-46d6-87fb-e1b6264a3189.json +1 -0
  22. package/dist/public/_nuxt/{entry.p_0EwC2c.css → entry.bKphV1Y3.css} +1 -1
  23. package/dist/public/_nuxt/error-404.BtjbGiHS.css +1 -0
  24. package/dist/public/_nuxt/error-500.DqJ9a5ig.css +1 -0
  25. package/dist/public/_nuxt/n6SbU7pj.js +1 -0
  26. package/dist/public/index.html +1 -1
  27. package/package.json +9 -9
  28. package/dist/public/_nuxt/51O8tKLC.js +0 -1
  29. package/dist/public/_nuxt/B3eE09d-.js +0 -4
  30. package/dist/public/_nuxt/BMyPfja7.js +0 -1
  31. package/dist/public/_nuxt/BXzW-15h.js +0 -3
  32. package/dist/public/_nuxt/BiywBLuM.js +0 -2
  33. package/dist/public/_nuxt/BomN9dnN.js +0 -1
  34. package/dist/public/_nuxt/C0tXHD8J.js +0 -1
  35. package/dist/public/_nuxt/D_shstzp.js +0 -1
  36. package/dist/public/_nuxt/DxqvJVyq.js +0 -2
  37. package/dist/public/_nuxt/Qwmw5xxh.js +0 -1
  38. package/dist/public/_nuxt/builds/meta/06da823c-d5d5-4d15-b76b-9285b009cd67.json +0 -1
  39. package/dist/public/_nuxt/error-404.CLjXqCCe.css +0 -1
  40. package/dist/public/_nuxt/error-500.DCqDWmxV.css +0 -1
@@ -0,0 +1 @@
1
+ .grid[data-v-d123f92c]{display:grid}.mb-2[data-v-d123f92c]{margin-bottom:.5rem}.mb-4[data-v-d123f92c]{margin-bottom:1rem}.max-w-520px[data-v-d123f92c]{max-width:520px}.min-h-screen[data-v-d123f92c]{min-height:100vh}.place-content-center[data-v-d123f92c]{place-content:center}.overflow-hidden[data-v-d123f92c]{overflow:hidden}.bg-white[data-v-d123f92c]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-d123f92c]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-d123f92c]{text-align:center}.text-\[80px\][data-v-d123f92c]{font-size:80px}.text-2xl[data-v-d123f92c]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-d123f92c]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-d123f92c]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-d123f92c]{font-weight:600}.leading-none[data-v-d123f92c]{line-height:1}.tracking-wide[data-v-d123f92c]{letter-spacing:.025em}.font-sans[data-v-d123f92c]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-d123f92c]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-d123f92c]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-d123f92c]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-d123f92c]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (width>=640px){.sm\:text-\[110px\][data-v-d123f92c]{font-size:110px}.sm\:text-3xl[data-v-d123f92c]{font-size:1.875rem;line-height:2.25rem}}
@@ -0,0 +1 @@
1
+ import{N as e,T as t,Y as n}from"./BG3xwZh0.js";import{u as r}from"./CEBMiqg6.js";var i={class:`p10 flex flex-col items-center justify-center`},a=e({__name:`index`,setup(e){return r(`/home`),(e,r)=>(n(),t(`div`,i))}});export{a as default};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><script type="importmap">{"imports":{"#entry":"/__devtools-vite/_nuxt/BiywBLuM.js"}}</script><link rel="stylesheet" href="/__devtools-vite/_nuxt/entry.p_0EwC2c.css" crossorigin><link rel="stylesheet" href="/__devtools-vite/_nuxt/rpc.CVTFzytL.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/BiywBLuM.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/BXzW-15h.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/DxqvJVyq.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/C0tXHD8J.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/B3eE09d-.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/Cya-tyvy.js"><script type="module" src="/__devtools-vite/_nuxt/BiywBLuM.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__devtools-vite/_nuxt/error-404.CLjXqCCe.css"><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/51O8tKLC.js"><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/BDNMzG2s.js"><link rel="prefetch" as="style" crossorigin href="/__devtools-vite/_nuxt/error-500.DCqDWmxV.css"><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/BU3RLqzC.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__devtools-vite/",buildId:"06da823c-d5d5-4d15-b76b-9285b009cd67",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1790317212997,false]</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><script type="importmap">{"imports":{"#entry":"/__devtools-vite/_nuxt/BG--lX9h.js"}}</script><link rel="stylesheet" href="/__devtools-vite/_nuxt/entry.bKphV1Y3.css" crossorigin><link rel="stylesheet" href="/__devtools-vite/_nuxt/rpc.CVTFzytL.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/BG--lX9h.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/BG3xwZh0.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/CEBMiqg6.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/DEyNBz-F.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/Ct3C12NP.js"><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/Cya-tyvy.js"><script type="module" src="/__devtools-vite/_nuxt/BG--lX9h.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__devtools-vite/_nuxt/error-404.BtjbGiHS.css"><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/BHvJDY_a.js"><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/BDNMzG2s.js"><link rel="prefetch" as="style" crossorigin href="/__devtools-vite/_nuxt/error-500.DqJ9a5ig.css"><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/B_-pr0hI.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__devtools-vite/",buildId:"13f74333-301c-46d6-87fb-e1b6264a3189",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1793771716227,false]</script></body></html>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitejs/devtools-vite",
3
3
  "type": "module",
4
- "version": "0.7.6",
4
+ "version": "0.8.1",
5
5
  "description": "DevTools for Vite (work in progress)",
6
6
  "author": "VoidZero Inc.",
7
7
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "vite": "*"
31
31
  },
32
32
  "dependencies": {
33
- "@vitejs/devtools-kit": "0.7.6",
33
+ "@vitejs/devtools-kit": "0.8.1",
34
34
  "envinfo": "^7.21.0",
35
35
  "nostics": "^1.3.0",
36
36
  "pathe": "^2.0.3",
@@ -41,24 +41,24 @@
41
41
  "@types/d3-hierarchy": "^3.1.7",
42
42
  "@types/envinfo": "^7.8.4",
43
43
  "@types/splitpanes": "^2.2.6",
44
- "@unocss/nuxt": "^66.10.5",
45
- "@vitejs/devtools-ui": "0.7.6",
44
+ "@unocss/nuxt": "^66.12.0",
45
+ "@vitejs/devtools-ui": "0.8.1",
46
46
  "@vueuse/components": "^15.0.0",
47
47
  "@vueuse/core": "^15.0.0",
48
48
  "@vueuse/nuxt": "^15.0.0",
49
49
  "comlink": "^4.4.2",
50
50
  "d3-hierarchy": "^3.1.2",
51
- "d3-shape": "^3.2.0",
52
- "devframe": "^1.0.0",
51
+ "d3-shape": "^3.2.1",
52
+ "devframe": "^1.3.2",
53
53
  "diff-match-patch-es": "^2.0.1",
54
54
  "floating-vue": "^5.4.0",
55
55
  "fuse.js": "^7.5.0",
56
56
  "modern-monaco": "^0.4.2",
57
57
  "nanovis": "^1.1.0",
58
- "nuxt": "^4.5.2",
58
+ "nuxt": "4.5.2",
59
59
  "splitpanes": "^4.1.2",
60
- "tsdown": "^0.23.0",
61
- "unocss": "^66.10.5",
60
+ "tsdown": "^0.23.4",
61
+ "unocss": "^66.12.0",
62
62
  "vue-virtual-scroller": "^3.0.5"
63
63
  },
64
64
  "scripts": {
@@ -1 +0,0 @@
1
- import{A as e,S as t,T as n,Y as r,j as i,lt as a,qt as o}from"./BXzW-15h.js";import{t as s}from"./DxqvJVyq.js";import{t as c}from"#entry";import{t as l}from"./BDNMzG2s.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(l){let g=l;return c({title:`${g.status} - ${g.statusText} | ${g.appName}`,script:[{innerHTML:`!function(){let e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(let e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(let t of e)if("childList"===t.type)for(let e of t.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;let r=function(e){let r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),r.credentials="use-credentials"===e.crossOrigin?"include":"anonymous"===e.crossOrigin?"omit":"same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(c,g)=>{let _=s;return r(),n(`div`,u,[t(`div`,d,[t(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:o(l.status)},null,8,f),t(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:o(l.statusText)},null,8,p),t(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:o(l.description)},null,8,m),t(`div`,h,[i(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:a(()=>[e(o(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-22e7d4bf`]]);export{g as default};
@@ -1,4 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Qwmw5xxh.js","./Cya-tyvy.js"])))=>i.map(i=>d[i]);
2
- import{C as e,Ct as t,Et as n,H as r,J as i,L as a,N as o,Ot as s,P as c,Q as l,R as u,S as d,St as f,T as p,Tt as m,Y as h,_t as g,a as _,bt as v,ct as y,dt as b,ft as x,ht as S,j as C,k as w,lt as T,pt as E,q as ee,qt as te,st as D,vt as O,wt as ne,x as k,yt as re}from"./BXzW-15h.js";import{t as ie}from"./Cya-tyvy.js";var ae=`modulepreload`,oe=function(e,t){return new URL(e,t).href},se={},ce=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=oe(t,n),t=s(t),t in se)return;se[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ae,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},le={viewBox:`0 0 1053 86`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`banner-devtools`},ue=o({__name:`BannerViteDevTools`,setup(e){return(e,t)=>(h(),p(`svg`,le,[...t[0]||=[w(`<g clip-path="url(#clip0_3_25)"><path d="M32.087 10.9L49.292 57.772L66.218 10.9H89.375L63.707 76H33.947L8.279 10.9H32.087ZM97.094 76V10.9H119.414V76H97.094ZM152.569 76V26.896H127.552V10.9H199.906V26.896H174.889V76H152.569ZM208.076 76V10.9H272.339V26.71H230.396V35.452H271.688V50.797H230.396V60.19H273.548V76H208.076Z" fill="currentColor"></path><path d="M294.792 9.89331C281.775 28.5257 281.698 57.4071 294.792 76.1065H303.586C290.496 57.4071 290.572 28.5257 303.586 9.89331H294.792Z" fill="currentColor"></path><path d="M383.128 9.89314H374.333C387.35 28.5255 387.426 57.4069 374.333 76.1064H383.128C396.218 57.4069 396.142 28.5255 383.128 9.89314Z" fill="currentColor"></path><path d="M406.719 77V11.9H447.639C470.238 11.9 483.165 22.223 483.165 44.45C483.165 66.77 470.145 77 447.546 77H406.719ZM460.287 44.45C460.287 32.267 455.079 27.71 444.477 27.71H429.039V61.19H444.477C455.079 61.19 460.287 56.633 460.287 44.45ZM494.542 77V11.9H558.805V27.71H516.862V36.452H558.154V51.797H516.862V61.19H560.014V77H494.542ZM588.198 11.9L605.403 58.772L622.329 11.9H645.486L619.818 77H590.058L564.39 11.9H588.198ZM673.624 77V27.896H648.607V11.9H720.961V27.896H695.944V77H673.624ZM764.891 78.116C737.456 78.116 723.134 66.584 723.134 44.45C723.134 22.316 737.456 10.784 764.891 10.784C792.326 10.784 806.741 22.316 806.741 44.45C806.741 66.584 792.326 78.116 764.891 78.116ZM764.891 62.027C777.818 62.027 783.863 56.54 783.863 44.45C783.863 32.267 777.818 26.78 764.891 26.78C751.964 26.78 745.919 32.267 745.919 44.45C745.919 56.54 751.964 62.027 764.891 62.027ZM855.802 78.116C828.367 78.116 814.045 66.584 814.045 44.45C814.045 22.316 828.367 10.784 855.802 10.784C883.237 10.784 897.652 22.316 897.652 44.45C897.652 66.584 883.237 78.116 855.802 78.116ZM855.802 62.027C868.729 62.027 874.774 56.54 874.774 44.45C874.774 32.267 868.729 26.78 855.802 26.78C842.875 26.78 836.83 32.267 836.83 44.45C836.83 56.54 842.875 62.027 855.802 62.027ZM908.955 77V11.9H931.275V60.725H970.242V77H908.955ZM1011.9 78.116C985.302 78.116 974.049 71.234 974.049 55.238V55.145H996.648V55.238C996.648 60.632 1000.27 63.515 1011.9 63.515C1023.9 63.515 1026.69 61.283 1026.69 57.842C1026.69 54.773 1024.64 53.378 1020.18 53.006L1001.2 51.518C981.117 49.937 974.979 43.799 974.979 32.081C974.979 17.945 987.255 10.784 1012.27 10.784C1037.85 10.784 1048.17 17.387 1048.17 32.639V32.825H1025.94V32.639C1025.94 27.245 1022.59 25.199 1011.9 25.199C1000.65 25.199 997.206 27.245 997.206 30.872C997.206 34.034 999.717 35.243 1005.58 35.708L1024.36 37.103C1042.03 38.405 1049.29 44.078 1049.29 56.261C1049.29 70.304 1038.78 78.116 1011.9 78.116Z" fill="currentColor"></path><path d="M341.534 73.5459C340.625 74.7024 338.767 74.0592 338.767 72.59V58.4788C338.767 56.7677 337.38 55.3811 335.669 55.3811H320.089C318.829 55.3811 318.094 53.9561 318.829 52.9323L329.072 38.5911C330.538 36.5405 329.072 33.6906 326.55 33.6906H307.695C306.435 33.6906 305.7 32.2657 306.435 31.242L319.714 12.6493C320.006 12.2422 320.475 12.0002 320.974 12.0002H360.546C361.806 12.0002 362.54 13.4252 361.806 14.449L351.562 28.7902C350.096 30.8407 351.562 33.6906 354.085 33.6906H369.665C370.957 33.6906 371.683 35.1806 370.884 36.1984L341.537 73.5488L341.534 73.5459Z" fill="#9135FF"></path><mask id="mask0_3_25" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="306" y="12" width="66" height="63"><path d="M341.392 73.5457C340.483 74.7021 338.624 74.059 338.624 72.5897V58.4787C338.624 56.7674 337.238 55.3808 335.527 55.3808H319.946C318.686 55.3808 317.952 53.9558 318.686 52.9321L328.93 38.5908C330.396 36.5404 328.93 33.6904 326.407 33.6904H307.552C306.292 33.6904 305.558 32.2655 306.292 31.2417L319.572 12.6491C319.864 12.2419 320.333 12 320.831 12H360.403C361.663 12 362.398 13.425 361.663 14.4487L351.42 28.79C349.953 30.8404 351.42 33.6904 353.942 33.6904H369.523C370.815 33.6904 371.541 35.1803 370.741 36.1982L341.395 73.5485L341.392 73.5457Z" fill="black"></path></mask><g mask="url(#mask0_3_25)"><g filter="url(#filter0_f_3_25)"><path d="M340.18 62.5759C340.194 66.7421 331.189 70.1487 320.066 70.1847C308.944 70.2208 299.917 66.8726 299.904 62.7064C299.89 58.5402 308.895 55.1336 320.017 55.0976C331.14 55.0615 340.167 58.4097 340.18 62.5759Z" fill="#EEE6FF"></path></g><g filter="url(#filter1_f_3_25)"><path d="M333.95 36.7736C333.976 44.6397 315.692 51.0757 293.113 51.1489C270.534 51.222 252.209 44.9047 252.184 37.0387C252.158 29.1726 270.442 22.7366 293.021 22.6634C315.6 22.5902 333.925 28.9076 333.95 36.7736Z" fill="#EEE6FF"></path></g><g filter="url(#filter2_f_3_25)"><path d="M334.109 34.778C334.122 38.9442 315.44 42.3822 292.38 42.4569C269.32 42.5317 250.615 39.2149 250.602 35.0487C250.588 30.8825 269.271 27.4446 292.331 27.3698C315.391 27.2951 334.095 30.6118 334.109 34.778Z" fill="#8900FF"></path></g><g filter="url(#filter3_f_3_25)"><path d="M340.708 59.4281C340.722 63.5943 321.971 67.0325 298.826 67.1075C275.682 67.1825 256.909 63.866 256.895 59.6998C256.882 55.5336 275.633 52.0954 298.777 52.0204C321.922 51.9454 340.695 55.2619 340.708 59.4281Z" fill="#8900FF"></path></g><g filter="url(#filter4_f_3_25)"><path d="M342.807 61.0016C342.82 65.1678 324.069 68.606 300.925 68.681C277.781 68.756 259.007 65.4395 258.994 61.2733C258.98 57.1071 277.732 53.6689 300.876 53.5939C324.02 53.5189 342.793 56.8354 342.807 61.0016Z" fill="#8900FF"></path></g><g filter="url(#filter5_f_3_25)"><path d="M348.58 26.0173C349.202 15.392 363.221 7.56971 379.892 8.54583C396.563 9.52195 409.574 18.9268 408.952 29.5521C408.33 40.1775 394.311 47.9997 377.639 47.0236C360.968 46.0475 347.958 36.6426 348.58 26.0173Z" fill="#EEE6FF"></path></g><g filter="url(#filter6_f_3_25)"><path d="M350.839 33.0047C350.793 30.3802 363.938 28.0245 380.199 27.7432C396.459 27.4619 409.678 29.3614 409.723 31.986C409.769 34.6105 396.624 36.9662 380.363 37.2475C364.102 37.5288 350.884 35.6293 350.839 33.0047Z" fill="#8900FF"></path></g><g filter="url(#filter7_f_3_25)"><path d="M350.839 33.0047C350.793 30.3802 363.938 28.0245 380.199 27.7432C396.459 27.4619 409.678 29.3614 409.723 31.986C409.769 34.6105 396.624 36.9662 380.363 37.2475C364.102 37.5288 350.884 35.6293 350.839 33.0047Z" fill="#8900FF"></path></g><g filter="url(#filter8_f_3_25)"><path d="M281.167 55.0432C283.739 57.1638 297.179 45.113 311.186 28.1269C325.193 11.1408 334.464 -4.34828 331.892 -6.46889C329.321 -8.5895 315.881 3.46136 301.874 20.4475C287.866 37.4336 278.596 52.9226 281.167 55.0432Z" fill="#8900FF"></path></g><g filter="url(#filter9_f_3_25)"><path d="M346.601 35.117C349.232 37.1642 362.326 24.7387 375.848 7.36381C389.37 -10.011 398.2 -25.7557 395.569 -27.8028C392.939 -29.85 379.845 -17.4244 366.323 -0.0495851C352.8 17.3253 343.971 33.0699 346.601 35.117Z" fill="#8900FF"></path></g><g filter="url(#filter10_f_3_25)"><path d="M354.587 31.1204C358.151 33.8946 364.681 31.4665 369.171 25.6972C373.661 19.9279 374.411 13.0021 370.846 10.228C367.282 7.45385 360.753 9.88193 356.262 15.6512C351.772 21.4205 351.022 28.3463 354.587 31.1204Z" fill="#00C2FF"></path></g><g filter="url(#filter11_f_3_25)"><path d="M278.942 95.9583C281.573 98.0054 294.667 85.5799 308.189 68.2051C321.711 50.8302 330.541 35.0856 327.91 33.0384C325.28 30.9913 312.186 43.4168 298.664 60.7917C285.141 78.1665 276.312 93.9111 278.942 95.9583Z" fill="#8900FF"></path></g><g filter="url(#filter12_f_3_25)"><path d="M278.942 95.9583C281.573 98.0054 294.667 85.5799 308.189 68.2051C321.711 50.8302 330.541 35.0856 327.91 33.0384C325.28 30.9913 312.186 43.4168 298.664 60.7917C285.141 78.1665 276.312 93.9111 278.942 95.9583Z" fill="#8900FF"></path></g><g filter="url(#filter13_f_3_25)"><path d="M330.342 84.4194C332.973 86.4665 346.067 74.041 359.589 56.6661C373.111 39.2913 381.941 23.5466 379.311 21.4995C376.68 19.4523 363.586 31.8779 350.064 49.2527C336.542 66.6276 327.712 82.3722 330.342 84.4194Z" fill="#8900FF"></path></g><g filter="url(#filter14_f_3_25)"><path d="M345.748 72.9077C349.313 75.6818 357.963 70.5283 365.07 61.397C372.176 52.2657 375.048 42.6144 371.483 39.8403C367.919 37.0662 359.268 42.2197 352.162 51.351C345.055 60.4823 342.184 70.1335 345.748 72.9077Z" fill="#00C2FF"></path></g></g></g><defs><filter id="filter0_f_3_25" x="278.924" y="34.1176" width="82.2362" height="57.0471" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="10.4899" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter1_f_3_25" x="231.204" y="1.68307" width="123.726" height="70.4461" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="10.4899" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter2_f_3_25" x="238.014" y="14.7807" width="108.683" height="40.2653" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter3_f_3_25" x="244.307" y="39.4313" width="108.989" height="40.2653" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter4_f_3_25" x="246.406" y="41.0048" width="108.989" height="40.2653" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter5_f_3_25" x="327.579" y="-12.5161" width="102.374" height="80.6017" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="10.4899" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter6_f_3_25" x="338.251" y="15.1277" width="84.0606" height="34.7352" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter7_f_3_25" x="338.251" y="15.1277" width="84.0606" height="34.7352" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter8_f_3_25" x="268.151" y="-19.2987" width="76.7577" height="87.1718" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter9_f_3_25" x="333.55" y="-40.6113" width="75.0711" height="88.5369" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter10_f_3_25" x="339.748" y="-3.50744" width="45.9371" height="48.3633" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter11_f_3_25" x="265.891" y="20.2299" width="75.0711" height="88.5369" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter12_f_3_25" x="265.891" y="20.2299" width="75.0711" height="88.5369" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter13_f_3_25" x="317.291" y="8.69097" width="75.0711" height="88.5369" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><filter id="filter14_f_3_25" x="331.629" y="26.5018" width="53.9728" height="59.7445" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="6.29392" result="effect1_foregroundBlur_3_25"></feGaussianBlur></filter><clipPath id="clip0_3_25"><rect width="1053" height="86" fill="white"></rect></clipPath></defs>`,2)]]))}}),de={class:`p10 h-full flex flex-col items-center justify-center`},fe={class:`flex gap-2 animate-pulse items-center justify-center`},pe=o({__name:`VisualLoading`,props:{text:{}},setup(e){return(t,n)=>(h(),p(`div`,de,[l(t.$slots,`banner`),d(`div`,fe,[n[0]||=d(`div`,{class:`i-svg-spinners-8-dots-rotate`},null,-1),d(`span`,null,te(e.text??`Loading...`),1)])]))}}),me=Object.assign(o({__name:`Loading`,props:{text:{}},setup(t){return(n,r)=>(h(),e(pe,{text:t.text},{banner:T(()=>[C(ue)]),_:1},8,[`text`]))}}),{__name:`VisualLoading`});function he(e,t,n={}){let r,i,a,o=!0,s=()=>{o=!0,a()};D(e,s,{flush:`sync`,...n});let c=typeof t==`function`?t:t.get,l=typeof t==`function`?void 0:t.set,u=b((e,t)=>(i=e,a=t,{get(){return o&&=(r=c(r),!1),i(),r},set(e){l?.(e)}}));return u.trigger=s,u}function ge(e={}){function t(e){return typeof e==`function`}let n=t(e)?{mounted:e,updated:e}:e,{mounted:r,unmounted:i}=n;if(!t(r))return e;let a=new WeakMap;return{...n,mounted(e,t,n,i){let o=a.get(e)??x();a.set(e,o),o.run(()=>{r?.(e,t,n,i)})},unmounted(e,n,r,o){var s;(s=a.get(e))==null||s.stop(),a.delete(e),t(i)&&i(e,n,r,o)}}}function _e(e,t){return E()?(g(e,t),!0):!1}var ve=new WeakMap,ye=(...e)=>{let t=e[0],n=c()?.proxy??E();if(n==null&&!a())throw Error(`injectLocal must be called in setup`);return n&&ve.has(n)&&t in ve.get(n)?ve.get(n)[t]:u(...e)},A=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var be=e=>e!==void 0,xe=e=>e!=null,Se=Object.prototype.toString,Ce=e=>Se.call(e)===`[object Object]`,j=()=>{},we=Te();function Te(){var e,t;return A&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ee(...e){if(e.length!==1)return ne(...e);let t=e[0];return typeof t==`function`?re(b(()=>({get:t,set:j}))):v(t)}function De(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var Oe=e=>e();function ke(e,r={}){let i,a,o=j,s=j,c=t(!1),l=e=>{clearTimeout(e),o(),o=j},u;return Object.assign(t=>{let d=n(e),f=n(r.maxWait);return i&&l(i),d<=0||f!==void 0&&f<=0?(a&&=(l(a),void 0),c.value=!1,Promise.resolve(t())):(c.value=!0,new Promise((e,n)=>{o=r.rejectOnCancel?n:e,s=e,u=t,f&&!a&&(a=setTimeout(()=>{i&&l(i),a=void 0,c.value=!1,e(u())},f)),i=setTimeout(()=>{a&&l(a),a=void 0,c.value=!1,e(t())},d)}))},{cancel:()=>{i&&=(l(i),void 0),a&&=(l(a),void 0),c.value=!1,s=j},flush:()=>{if(c.value){i&&=(clearTimeout(i),void 0),a&&=(clearTimeout(a),void 0),c.value=!1;let e=s;o=j,s=j,e(u())}},isPending:f(c)})}function Ae(...e){let t=0,r,i=!0,a=j,o,s,c,l,u;!S(e[0])&&typeof e[0]==`object`?{delay:s,trailing:c=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[s,c=!0,l=!0,u=!1]=e;let d=()=>{r&&(clearTimeout(r),r=void 0,a(),a=j)};return e=>{let f=n(s),p=Date.now()-t,m=()=>o=e();return d(),f<=0?(t=Date.now(),m()):(p>f?(t=Date.now(),(l||!i)&&m()):c&&(o=new Promise((e,n)=>{a=u?n:e,r=setTimeout(()=>{t=Date.now(),i=!0,e(m()),d()},Math.max(0,f-p))})),!l&&!r&&(r=setTimeout(()=>i=!0,f)),i=!1,o)}}function je(e=Oe,t={}){let{initialState:n=`active`}=t,r=Ee(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:f(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function Me(e,t=!1,n=`Timeout`){return new Promise((r,i)=>{t?setTimeout(i,e,n):setTimeout(r,e)})}function Ne(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function M(e){return Array.isArray(e)?e:[e]}function Pe(e){return e||c()}function Fe(e){if(!S(e))return O(e);let t=new Proxy({},{get(t,n,r){return s(Reflect.get(e.value,n,r))},set(t,n,r){return S(e.value[n])&&!S(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return O(t)}function Ie(e){return Fe(k(e))}function Le(e,...t){let r=t.flat(),i=r[0];return Ie(()=>Object.fromEntries(typeof i==`function`?Object.entries(m(e)).filter(([e,t])=>!i(n(t),e)):Object.entries(m(e)).filter(e=>!r.includes(e[0]))))}function Re(e,t=200,n={}){return De(ke(t,n),e)}function ze(e,t=200,n=!0,r=!0,i=!1){return De(Ae(t,n,r,i),e)}function Be(e,t,n={}){let{eventFilter:r=Oe,...i}=n;return D(e,De(r,t),i)}function Ve(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=je(r,{initialState:i});return{stop:Be(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function He(e,t=!0,n){Pe(n)?ee(e,n):t?e():r(e)}function Ue(e,t){Pe(t)&&i(e,t)}function We(e,t=!1){function i(i,{flush:a=`sync`,deep:o=!1,timeout:s,throwOnTimeout:c}={}){let l=null,u=[new Promise(n=>{l=D(e,e=>{i(e)!==t&&(l?l():r(()=>l?.()),n(e))},{flush:a,deep:o,immediate:!0})})];return s!=null&&u.push(Me(s,c).then(()=>n(e)).finally(()=>l?.())),Promise.race(u)}function a(a,o){if(!S(a))return i(e=>e===a,o);let{flush:s=`sync`,deep:c=!1,timeout:l,throwOnTimeout:u}=o??{},d=null,f=[new Promise(n=>{d=D([e,a],([e,i])=>{t!==(e===i)&&(d?d():r(()=>d?.()),n(e))},{flush:s,deep:c,immediate:!0})})];return l!=null&&f.push(Me(l,u).then(()=>n(e)).finally(()=>(d?.(),n(e)))),Promise.race(f)}function o(e){return i(e=>!!e,e)}function s(e){return a(null,e)}function c(e){return a(void 0,e)}function l(e){return i(Number.isNaN,e)}function u(e,t){return i(t=>{let r=Array.from(t);return r.includes(e)||r.includes(n(e))},t)}function d(e){return f(1,e)}function f(e=1,t){let n=-1;return i(()=>(n+=1,n>=e),t)}return Array.isArray(n(e))?{toMatch:i,toContains:u,changed:d,changedTimes:f,get not(){return We(e,!t)}}:{toMatch:i,toBe:a,toBeTruthy:o,toBeNull:s,toBeNaN:l,toBeUndefined:c,changed:d,changedTimes:f,get not(){return We(e,!t)}}}function Ge(e){return We(e)}function Ke(e=!1,r={}){let{truthyValue:i=!0,falsyValue:a=!1}=r,o=S(e),s=t(e);function c(e){if(arguments.length)return s.value=e,s.value;{let e=n(i);return s.value=s.value===e?n(a):e,s.value}}return o?c:[s,c]}function qe(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return Be(e,t,{...a,eventFilter:ke(r,{maxWait:i})})}function Je(e,t,n){return D(e,t,{...n,immediate:!0})}function Ye(e,t,n){return D(e,t,{...n,once:!0})}var N=A?window:void 0;A&&window.document,A&&window.navigator,A&&window.location;function P(e){let t=n(e);return t?.$el??t}function F(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=k(()=>{let t=M(n(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Je(()=>[r.value?.map(e=>P(e))??[N].filter(e=>e!=null),M(n(r.value?e[1]:e[0])),M(s(r.value?e[2]:e[1])),n(r.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Ce(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var Xe=!1;function Ze(e,t,r={}){let{window:i=N,ignore:a=[],capture:o=!0,detectIframe:s=!1,controls:c=!1}=r;if(!i)return c?{stop:j,cancel:j,trigger:j}:j;if(we&&!Xe){Xe=!0;let e={passive:!0};Array.from(i.document.body.children).forEach(t=>t.addEventListener(`click`,j,e)),i.document.documentElement.addEventListener(`click`,j,e)}let l=!0,u=e=>n(a).some(t=>{if(typeof t==`string`)return Array.from(i.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=P(t);return n&&(e.target===n||e.composedPath().includes(n))}});function d(e){let t=n(e);return t&&t.$.subTree.shapeFlag===16}function f(e,t){let r=n(e),i=r.$.subTree&&r.$.subTree.children;return i==null||!Array.isArray(i)?!1:i.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let p=n=>{let r=P(e);if(n.target!=null&&!(!(r instanceof Element)&&d(e)&&f(e,n))&&r&&r!==n.target&&!n.composedPath().includes(r)){if(`detail`in n&&n.detail===0&&(l=!u(n)),!l){l=!0;return}t(n)}},m=!1,h=[F(i,`click`,e=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(e))},{passive:!0,capture:o}),F(i,`pointerdown`,t=>{let n=P(e);l=!u(t)&&!(!n||t.composedPath().includes(n))},{passive:!0}),s&&F(i,`blur`,n=>{setTimeout(()=>{let r=P(e),a=i.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!r?.contains(i.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),g=()=>h.forEach(e=>e());return c?{stop:g,cancel:()=>{l=!1},trigger:e=>{l=!0,p(e),l=!1}}:g}function Qe(){let e=t(!1),n=c();return n&&ee(()=>{e.value=!0},n),e}function $e(e){let t=Qe();return k(()=>(t.value,!!e()))}function et(e,t,r={}){let{window:i=N,...a}=r,o,s=$e(()=>i&&`MutationObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=k(()=>{let t=M(n(e)).map(P).filter(xe);return new Set(t)}),u=D(l,e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),d=()=>o?.takeRecords(),f=()=>{u(),c()};return _e(f),{isSupported:s,stop:f,takeRecords:d}}function tt(e,t,n={}){let{window:r=N,document:i=r?.document,flush:a=`sync`}=n;if(!r||!i)return j;let o,s=e=>{o?.(),o=e},c=y(()=>{let n=P(e);if(n){let{stop:e}=et(i,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===n||e.contains(n))&&t(e)},{window:r,childList:!0,subtree:!0});s(e)}},{flush:a}),l=()=>{c(),s()};return _e(l),l}function nt(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function rt(...e){let t,r,i={};e.length===3?(t=e[0],r=e[1],i=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,r=e[0],i=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);let{target:a=N,eventName:o=`keydown`,passive:s=!1,dedupe:c=!1}=i,l=nt(t);return F(a,o,e=>{e.repeat&&n(c)||l(e)&&r(e)},s)}function it(e,t,n={}){return rt(e,t,{...n,eventName:`keydown`})}function at(e,t,n={}){return rt(e,t,{...n,eventName:`keypress`})}var ot=500,st=10;function ct(e,t,n){var r,i;let a=k(()=>P(e)),o,s,c,l=!1;function u(){o&&=(clearTimeout(o),void 0),s=void 0,c=void 0,l=!1}function d(e){let t=n?.delay;return typeof t==`function`?t(e):t??ot}function f(e){var t,r,i;let[o,d,f]=[c,s,l];if(u(),!n?.onMouseUp||!d||!o||n!=null&&(t=n.modifiers)!=null&&t.self&&e.target!==a.value)return;n!=null&&(r=n.modifiers)!=null&&r.prevent&&e.preventDefault(),n!=null&&(i=n.modifiers)!=null&&i.stop&&e.stopPropagation();let p=e.x-d.x,m=e.y-d.y,h=Math.sqrt(p*p+m*m);n.onMouseUp(e.timeStamp-o,h,f,e)}function p(e){var r,i,f;n!=null&&(r=n.modifiers)!=null&&r.self&&e.target!==a.value||(u(),n!=null&&(i=n.modifiers)!=null&&i.prevent&&e.preventDefault(),n!=null&&(f=n.modifiers)!=null&&f.stop&&e.stopPropagation(),s={x:e.x,y:e.y},c=e.timeStamp,o=setTimeout(()=>{l=!0,t(e)},d(e)))}function m(e){var t,r,i;if(n!=null&&(t=n.modifiers)!=null&&t.self&&e.target!==a.value||!s||n?.distanceThreshold===!1)return;n!=null&&(r=n.modifiers)!=null&&r.prevent&&e.preventDefault(),n!=null&&(i=n.modifiers)!=null&&i.stop&&e.stopPropagation();let o=e.x-s.x,c=e.y-s.y;Math.sqrt(o*o+c*c)>=(n?.distanceThreshold??st)&&u()}let h={capture:n==null||(r=n.modifiers)==null?void 0:r.capture,once:n==null||(i=n.modifiers)==null?void 0:i.once},g=[F(a,`pointerdown`,p,h),F(a,`pointermove`,m,h),F(a,[`pointerup`,`pointerleave`,`pointercancel`],f,h)];return()=>g.forEach(e=>e())}function lt(e,r,i){let{immediate:a=!0,delay:o=0,onError:s=globalThis.reportError??j,onSuccess:c=j,resetOnExecute:l=!0,shallow:u=!0,throwError:d}=i??{},f=u?t(r):v(r),p=t(!1),m=t(!1),h=t(void 0),g=0;async function _(t=0,...i){let a=g+=1;l&&(f.value=n(r)),h.value=void 0,p.value=!1,m.value=!0,t>0&&await Me(t);let o=typeof e==`function`?e(...i):e;try{let e=await o;return a===g&&(f.value=e,p.value=!0),c(e),e}catch(e){if(a===g&&(h.value=e),s(e),d)throw e}finally{a===g&&(m.value=!1)}}a&&_(o);let y={state:f,isReady:p,isLoading:m,error:h,execute:_,executeImmediate:(...e)=>_(0,...e)};function b(){return new Promise((e,t)=>{Ge(m).toBe(!1).then(()=>e(y)).catch(t)})}return{...y,then(e,t){return b().then(e,t)}}}var ut=Symbol(`vueuse-ssr-width`);function dt(){let e=a()?ye(ut,null):null;return typeof e==`number`?e:void 0}function ft(e,r={}){let{window:i=N,ssrWidth:a=dt()}=r,o=$e(()=>i&&`matchMedia`in i&&typeof i.matchMedia==`function`),s=t(typeof a==`number`),c=t(),l=t(!1);return y(()=>{if(s.value){s.value=!o.value;let t=n(e).split(`,`);l.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=!!(n||r);return n&&i&&(i=a>=Ne(n[1])),r&&i&&(i=a<=Ne(r[1])),t?!i:i});return}o.value&&(c.value=i.matchMedia(n(e)),l.value=c.value.matches)}),F(c,`change`,e=>{l.value=e.matches},{passive:!0}),k(()=>l.value)}function pt(e){return JSON.parse(JSON.stringify(e))}var mt=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},ht=`__vueuse_ssr_handlers__`,gt=_t();function _t(){return ht in mt||(mt[ht]=mt[ht]||{}),mt[ht]}function vt(e,t){return gt[e]||t}function yt(e){return ft(`(prefers-color-scheme: dark)`,e)}function bt(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var xt={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},St=`vueuse-storage`;function Ct(e,i,a,o={}){let{flush:s=`pre`,deep:c=!0,listenToStorageChanges:l=!0,writeDefaults:u=!0,mergeDefaults:d=!1,shallow:f,window:p=N,eventFilter:m,onError:h=e=>{console.error(e)},initOnMounted:g}=o,_=(f?t:v)(typeof i==`function`?i():i),y=k(()=>n(e));if(!a)try{a=vt(`getDefaultStorage`,()=>N?.localStorage)()}catch(e){h(e)}if(!a)return _;let b=n(i),x=bt(b),S=o.serializer??xt[x],{pause:C,resume:w}=Ve(_,e=>ee(e),{flush:s,deep:c,eventFilter:m});D(y,()=>O(),{flush:s});let T=!1;p&&l&&(a instanceof Storage?F(p,`storage`,e=>{(!g||T)&&O(e)},{passive:!0}):F(p,St,e=>{(!g||T)&&ne(e)})),g?He(()=>{T=!0,O()}):O();function E(e,t){if(p){let n={key:y.value,oldValue:e,newValue:t,storageArea:a};p.dispatchEvent(a instanceof Storage?new StorageEvent(`storage`,n):new CustomEvent(St,{detail:n}))}}function ee(e){try{let t=a.getItem(y.value);if(e==null)E(t,null),a.removeItem(y.value);else{let n=S.write(e);t!==n&&(a.setItem(y.value,n),E(t,n))}}catch(e){h(e)}}function te(e){let t=e?e.newValue:a.getItem(y.value);if(t==null)return u&&b!=null&&a.setItem(y.value,S.write(b)),b;if(!e&&d){let e=S.read(t);return typeof d==`function`?d(e,b):x===`object`&&!Array.isArray(e)?{...b,...e}:e}return typeof t==`string`?S.read(t):t}function O(e){if(!(e&&e.storageArea!==a)){if(e&&e.key==null){_.value=b;return}if(!(e&&e.key!==y.value)){C();try{let t=S.write(_.value);(e===void 0||e?.newValue!==t)&&(_.value=te(e))}catch(e){h(e)}finally{e?r(w):w()}}}}function ne(e){O(e.detail)}return _}function wt(e,r){let i=t(d()),a=Ee(e),o=k({get(){let e=a.value,t=r?.getIndexOf?r.getIndexOf(i.value,e):e.indexOf(i.value);return t<0&&(t=r?.fallbackIndex??0),t},set(e){s(e)}});function s(e){let t=a.value,n=t.length,r=t[(e%n+n)%n];return i.value=r,r}function c(e=1){return s(o.value+e)}function l(e=1){return c(e)}function u(e=1){return c(-e)}function d(){return n(r?.initialValue??n(e)[0])??void 0}return D(a,()=>s(o.value)),{state:i,index:o,next:l,prev:u,go:s}}function Tt(e,t,r={}){let{window:i=N,...a}=r,o,s=$e(()=>i&&`ResizeObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=k(()=>{let t=n(e);return Array.isArray(t)?t.map(e=>P(e)):[P(t)]}),u=D(l,e=>{if(c(),s.value&&i){o=new ResizeObserver(t);for(let t of e)t instanceof Element&&o.observe(t,a)}},{immediate:!0,flush:`post`}),d=()=>{c(),u()};return _e(d),{isSupported:s,stop:d}}function Et(e,n={}){let{reset:r=!0,windowResize:i=!0,windowScroll:a=!0,immediate:o=!0,updateTiming:s=`sync`}=n,c=t(0),l=t(0),u=t(0),d=t(0),f=t(0),p=t(0),m=t(0),h=t(0);function g(){let t=P(e);if(!t){r&&(c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0,h.value=0);return}let n=t.getBoundingClientRect();c.value=n.height,l.value=n.bottom,u.value=n.left,d.value=n.right,f.value=n.top,p.value=n.width,m.value=n.x,h.value=n.y}function _(){s===`sync`?g():s===`next-frame`&&requestAnimationFrame(()=>g())}return Tt(e,_),D(()=>P(e),e=>!e&&_()),et(e,_,{attributeFilter:[`style`,`class`]}),a&&F(`scroll`,_,{capture:!0,passive:!0}),i&&F(`resize`,_,{passive:!0}),He(()=>{o&&_()}),{height:c,bottom:l,left:u,right:d,top:f,width:p,x:m,y:h,update:_}}function Dt(e,n={}){let{delayEnter:r=0,delayLeave:i=0,triggerOnRemoval:a=!1,window:o=N}=n,s=t(!1),c,l=e=>{let t=e?r:i;c&&=(clearTimeout(c),void 0),t?c=setTimeout(()=>s.value=e,t):s.value=e};return o?(F(e,`mouseenter`,()=>l(!0),{passive:!0}),F(e,`mouseleave`,()=>l(!1),{passive:!0}),a&&tt(k(()=>P(e)),()=>l(!1)),s):s}function Ot(e,n={width:0,height:0},r={}){let{window:i=N,box:a=`content-box`}=r,o=k(()=>{var t;return(t=P(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),s=t(n.width),c=t(n.height),{stop:l}=Tt(e,([t])=>{let n=a===`border-box`?t.borderBoxSize:a===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(i&&o.value){let t=P(e);if(t){let e=t.getBoundingClientRect();s.value=e.width,c.value=e.height}}else if(n){let e=M(n);s.value=e.reduce((e,{inlineSize:t})=>e+t,0),c.value=e.reduce((e,{blockSize:t})=>e+t,0)}else s.value=t.contentRect.width,c.value=t.contentRect.height},r);He(()=>{let t=P(e);if(t&&`offsetWidth`in t){if(a===`content-box`&&i){let e=i.getComputedStyle(t),n=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),r=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),o=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);s.value=t.offsetWidth-n-a,c.value=t.offsetHeight-r-o}else s.value=t.offsetWidth,c.value=t.offsetHeight}else t&&(s.value=n.width,c.value=n.height)});let u=D(()=>P(e),e=>{s.value=e?n.width:0,c.value=e?n.height:0});function d(){l(),u()}return{width:s,height:c,stop:d}}function kt(e,r,i={}){let{root:a,rootMargin:o,threshold:s=0,window:c=N,immediate:l=!0}=i,u=$e(()=>c&&`IntersectionObserver`in c),d=k(()=>M(n(e)).map(P).filter(xe)),f=j,p=t(l),m=u.value?D(()=>[d.value,P(a),n(o),p.value],([e,t,n])=>{if(f(),!p.value||!e.length)return;let i=new IntersectionObserver(r,{root:P(t),rootMargin:n,threshold:s});e.forEach(e=>e&&i.observe(e)),f=()=>{i.disconnect(),f=j}},{immediate:l,flush:`post`}):j,h=()=>{f(),m(),p.value=!1};return _e(h),{isSupported:u,isActive:p,pause(){f(),p.value=!1},resume(){p.value=!0},stop:h}}function At(e,n={}){let{window:r=N,scrollTarget:i,threshold:a=0,rootMargin:o,once:s=!1,initialValue:c=!1}=n,l=t(c),u=kt(e,e=>{let t=l.value,n=0;for(let r of e)r.time>=n&&(n=r.time,t=r.isIntersecting);l.value=t,s&&Ye(l,()=>{u.stop()})},{root:i,window:r,threshold:a,rootMargin:o});return n.controls?{...u,isVisible:l}:l}function jt(e){return typeof Window<`u`&&e instanceof Window?e.document.documentElement:typeof Document<`u`&&e instanceof Document?e.documentElement:e}var Mt=1;function Nt(e,r={}){let{throttle:i=0,idle:a=200,onStop:o=j,onScroll:s=j,offset:c={left:0,right:0,top:0,bottom:0},observe:l={mutation:!1},eventListenerOptions:u={capture:!1,passive:!0},behavior:d=`auto`,window:f=N,onError:p=e=>{console.error(e)}}=r,m=typeof l==`boolean`?{mutation:l}:l,h=t(0),g=t(0),_=k({get(){return h.value},set(e){y(e,void 0)}}),v=k({get(){return g.value},set(e){y(void 0,e)}});function y(t,r){var i,a;if(!f)return;let o=n(e);if(!o)return;(i=o instanceof Document?f.document.body:o)==null||i.scrollTo({top:n(r)??v.value,left:n(t)??_.value,behavior:n(d)});let s=(o==null||(a=o.document)==null?void 0:a.documentElement)||o?.documentElement||o;_!=null&&(h.value=s.scrollLeft),v!=null&&(g.value=s.scrollTop)}let b=t(!1),x=O({left:!0,right:!1,top:!0,bottom:!1}),S=O({left:!1,right:!1,top:!1,bottom:!1}),C=e=>{b.value&&(b.value=!1,S.left=!1,S.right=!1,S.top=!1,S.bottom=!1,o(e))},w=Re(C,i+a),T=e=>{var t;if(!f)return;let n=(e==null||(t=e.document)==null?void 0:t.documentElement)||e?.documentElement||P(e),{display:r,flexDirection:i,direction:a}=f.getComputedStyle(n),o=a===`rtl`?-1:1,s=n.scrollLeft;S.left=s<h.value,S.right=s>h.value;let l=Math.abs(s*o)<=(c.left||0),u=Math.abs(s*o)+n.clientWidth>=n.scrollWidth-(c.right||0)-Mt;r===`flex`&&i===`row-reverse`?(x.left=u,x.right=l):(x.left=l,x.right=u),h.value=s;let d=n.scrollTop;e===f.document&&!d&&(d=f.document.body.scrollTop),S.top=d<g.value,S.bottom=d>g.value;let p=Math.abs(d)<=(c.top||0),m=Math.abs(d)+n.clientHeight>=n.scrollHeight-(c.bottom||0)-Mt;r===`flex`&&i===`column-reverse`?(x.top=m,x.bottom=p):(x.top=p,x.bottom=m),g.value=d},E=e=>{if(!f)return;let t=e.target.documentElement??e.target;T(t),b.value=!0,w(e),s(e)};return F(e,`scroll`,i?ze(E,i,!0,!1):E,u),He(()=>{try{let t=n(e);if(!t)return;T(t)}catch(e){p(e)}}),m?.mutation&&e!=null&&e!==f&&e!==document&&et(e,()=>{let t=n(e);t&&T(t)},{attributes:!0,childList:!0,subtree:!0}),F(e,`scrollend`,C,u),{x:_,y:v,isScrolling:b,arrivedState:x,directions:S,measure(){let t=n(e);f&&t&&T(t)}}}function Pt(e,i,a={}){let{direction:o=`bottom`,interval:s=100,canLoadMore:c=()=>!0}=a,l=O(Nt(e,{...a,offset:{[o]:a.distance??0,...a.offset}})),u=t(),d=k(()=>!!u.value),f=k(()=>jt(n(e))),p=At(f),m=k(()=>f.value?c(f.value):!1);function h(){if(l.measure(),!f.value||!p.value||!m.value||u.value)return;let{scrollHeight:e,clientHeight:t,scrollWidth:n,clientWidth:a}=f.value,c=o===`bottom`||o===`top`?e<=t:n<=a;(l.arrivedState[o]||c)&&(u.value=Promise.all([i(l),new Promise(e=>setTimeout(e,s))]).finally(()=>{u.value=null,r(()=>h())}))}return Ue(D(()=>[l.arrivedState[o],p.value,m.value],h,{immediate:!0,flush:`post`})),{isLoading:d,reset(){r(()=>h())}}}function Ft(e,t,n={}){let{window:r=N}=n;return Ct(e,t,r?.localStorage,n)}var It={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function Lt(e={}){let{reactive:r=!1,target:i=N,aliasMap:a=It,passive:o=!0,onEventFired:s=j}=e,c=O(new Set),l={toJSON(){return{}},current:c},u=r?O(l):l,d=new Set,f=new Map([[`Meta`,d],[`Shift`,new Set],[`Alt`,new Set]]),p=new Set;function m(e,t){e in u&&(r?u[e]=t:u[e].value=t)}function h(){c.clear();for(let e of p)m(e,!1)}function g(e,t,n){if(e&&typeof t.getModifierState==`function`){for(let[e,r]of f)if(t.getModifierState(e)){n.forEach(e=>r.add(e));break}}}function _(e,t){if(e)return;let n=`${t[0].toUpperCase()}${t.slice(1)}`,r=f.get(n);if(![`shift`,`alt`].includes(t)||!r)return;let i=Array.from(r),a=i.indexOf(t);i.forEach((e,t)=>{t>=a&&(c.delete(e),m(e,!1))}),r.clear()}function v(e,t){let n=e.key?.toLowerCase(),r=[e.code?.toLowerCase(),n].filter(Boolean);if(n){n&&(t?c.add(n):c.delete(n));for(let e of r)p.add(e),m(e,t);g(t,e,[...c,...r]),_(t,n),n===`meta`&&!t&&(d.forEach(e=>{c.delete(e),m(e,!1)}),d.clear())}}F(i,`keydown`,e=>(v(e,!0),s(e)),{passive:o}),F(i,`keyup`,e=>(v(e,!1),s(e)),{passive:o}),F(`blur`,h,{passive:o}),F(`focus`,h,{passive:o});let y=new Proxy(u,{get(e,i,o){if(typeof i!=`string`)return Reflect.get(e,i,o);if(i=i.toLowerCase(),i in a&&(i=a[i]),!(i in u)){if(/[+_-]/.test(i)){let e=i.split(/[+_-]/g).map(e=>e.trim());u[i]=k(()=>e.map(e=>n(y[e])).every(Boolean))}else u[i]=t(!1)}let s=Reflect.get(e,i,o);return r?n(s):s}});return y}var Rt={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function zt(e={}){let{type:n=`page`,touch:r=!0,resetOnTouchEnds:i=!1,initialValue:a={x:0,y:0},window:o=N,target:s=o,scroll:c=!0,eventFilter:l}=e,u=null,d=0,f=0,p=t(a.x),m=t(a.y),h=t(null),g=typeof n==`function`?n:Rt[n],_=e=>{let t=g(e);u=e,t&&([p.value,m.value]=t,h.value=`mouse`),o&&(d=o.scrollX,f=o.scrollY)},v=e=>{if(e.touches.length>0){let t=g(e.touches[0]);t&&([p.value,m.value]=t,h.value=`touch`)}},y=()=>{if(!u||!o)return;let e=g(u);u instanceof MouseEvent&&e&&(p.value=e[0]+o.scrollX-d,m.value=e[1]+o.scrollY-f)},b=()=>{p.value=a.x,m.value=a.y},x=l?e=>l(()=>_(e),{}):e=>_(e),S=l?e=>l(()=>v(e),{}):e=>v(e),C=l?()=>l(()=>y(),{}):()=>y();if(s){let e={passive:!0};F(s,[`mousemove`,`dragover`],x,e),r&&n!==`movement`&&(F(s,[`touchstart`,`touchmove`],S,e),i&&F(s,`touchend`,b,e)),c&&n===`page`&&F(o,`scroll`,C,e)}return{x:p,y:m,sourceType:h}}function Bt(e,n={}){let{windowResize:r=!0,windowScroll:i=!0,handleOutside:a=!0,window:o=N}=n,s=n.type||`page`,{x:c,y:l,sourceType:u}=zt(n),d=t(e??o?.document.body),f=t(0),p=t(0),m=t(0),h=t(0),g=t(0),_=t(0),v=t(!0);function y(){if(!o)return;let e=P(d);if(e&&e instanceof Element)for(let t of e.getClientRects()){let{left:e,top:n,width:r,height:i}=t;m.value=e+(s===`page`?o.pageXOffset:0),h.value=n+(s===`page`?o.pageYOffset:0),g.value=i,_.value=r;let u=c.value-m.value,d=l.value-h.value;if(v.value=r===0||i===0||u<0||d<0||u>r||d>i,(a||!v.value)&&(f.value=u,p.value=d),!v.value)break}}let b=[];function x(){b.forEach(e=>e()),b.length=0}if(He(()=>{y()}),o){let{stop:e}=Tt(d,y),{stop:t}=et(d,y,{attributeFilter:[`style`,`class`]}),n=D([d,c,l],y);b.push(e,t,n),F(document,`mouseleave`,()=>v.value=!0,{passive:!0}),i&&b.push(F(`scroll`,y,{capture:!0,passive:!0})),r&&b.push(F(`resize`,y,{passive:!0}))}return{x:c,y:l,sourceType:u,elementX:f,elementY:p,elementPositionX:m,elementPositionY:h,elementHeight:g,elementWidth:_,isOutside:v,stop:x}}function Vt(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!t||t.tagName===`BODY`?!1:Vt(t)}}function Ht(e){let t=e||window.event,n=t.target;return Vt(n)?!1:t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1)}var Ut=new WeakMap;function Wt(e,r=!1){let i=t(r),a=null,o=``;D(Ee(e),e=>{let t=jt(n(e));if(t){let e=t;if(Ut.get(e)||Ut.set(e,e.style.overflow),e.style.overflow!==`hidden`&&(o=e.style.overflow),e.style.overflow===`hidden`)return i.value=!0;if(i.value)return e.style.overflow=`hidden`}},{immediate:!0});let s=()=>{let t=jt(n(e));t&&!i.value&&(we&&(a=F(t,`touchmove`,e=>{Ht(e)},{passive:!1})),t.style.overflow=`hidden`,i.value=!0)},c=()=>{let t=jt(n(e));t&&i.value&&(we&&a?.(),t.style.overflow=o,Ut.delete(t),i.value=!1)};return _e(c),k({get(){return i.value},set(e){e?s():c()}})}function Gt(e,t,n,i={}){var a,o;let{clone:s=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:p}=i,m=c(),h=n||m?.emit||(m==null||(a=m.$emit)==null?void 0:a.bind(m))||(m==null||(o=m.proxy)==null||(o=o.$emit)==null?void 0:o.bind(m?.proxy)),g=u;t||=`modelValue`,g||=`update:${t.toString()}`;let _=e=>s?typeof s==`function`?s(e):pt(e):e,y=()=>be(e[t])?_(e[t]):f,b=e=>{p?p(e)&&h(g,e):h(g,e)};if(l){let n=y(),i=v(n),a=!1;return D(()=>e[t],e=>{a||(a=!0,i.value=_(e),r(()=>a=!1))}),D(i,n=>{!a&&(n!==e[t]||d)&&b(n)},{deep:d}),i}return k({get(){return y()},set(e){b(e)}})}var Kt=/^[\w+.-]{2,}:\/\//;function qt(e){return e.endsWith(`/`)?e:`${e}/`}function Jt(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Yt(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?qt(n)+e.replace(/^\.?\//,``):e);return n}function Xt(e,t){if(!t||t===`/`||Kt.test(e))return e;let n=Jt(t);return e.startsWith(n)?e:Yt(n,e)}function Zt(e,t){let n=e.match(Kt);return t+(n?e.slice(n[0].length):e)}function I(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var Qt={blue:I(34,39),cyan:I(36,39),gray:I(90,39),green:I(32,39),red:I(31,39),yellow:I(33,39),bold:I(1,22),dim:I(2,22),reset:I(0,0),underline:I(4,24)};function $t(e,...t){return typeof e==`function`?e(...t):e}var en=Error.captureStackTrace,tn=class e extends Error{name;code;docs;fix;sources;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,en?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function nn(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function rn(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||nn(r,i),s=(e={},n={})=>{let r=new tn({code:i,why:$t(a.why,e),fix:$t(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function an(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
3
- `)}}var L={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},on=an(Qt);function sn(e,{method:t=`warn`}={}){console[t](on(e))}function cn(e){return rn({...e,reporters:[sn,...e.reporters??[]]})}function ln(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var un=Math.random.bind(Math),dn=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function fn(e=21){let t=``,n=e;for(;n--;)t+=dn[un()*64|0];return t}var pn=6e4,mn=e=>e,hn=mn,{clearTimeout:gn,setTimeout:_n}=globalThis;function vn(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=mn,deserialize:s=hn,resolver:c,bind:l=`rpc`,timeout:u=pn,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=ln(),_=fn();s.i=_;let v;async function y(n=s){return u>=0&&(v=_n(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{gn(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(gn(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function yn(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var bn=Object.freeze({type:`object`,additionalProperties:!0});function xn(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return bn}return bn}function Sn(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=xn(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Cn(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function wn(e,t){return Cn(e,t)??[e]}function Tn(e){return typeof e==`string`?`'${e}'`:new kn().serialize(e)}var En=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Dn=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[En.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function On(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Dn[n]?Dn[n]:n+128,s=a<128&&Dn[a]?Dn[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var kn=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?On(e,t):n===`number`&&r===`number`?e-t:On(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(On),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),An=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],jn=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Mn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,R=[],Nn=class{_data=new Pn;_hash=new Pn([...An]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)R[n]=e[t+n]|0;else{let e=R[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=R[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;R[n]=t+R[n-7]+i+R[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+jn[n]+R[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Pn.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new Pn(t,i)}},Pn=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(Mn.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Fn(e){return new Nn().finalize(e).toBase64()}function In(e){return Fn(Tn(e))}function Ln(e){return In(e)}function Rn(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var zn=Symbol.for(`immer-nothing`),Bn=Symbol.for(`immer-draftable`),z=Symbol.for(`immer-state`),Vn=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function B(e,...t){{let n=Vn[e],r=q(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var V=Object,H=V.getPrototypeOf,Hn=`constructor`,Un=`prototype`,Wn=`configurable`,Gn=`enumerable`,Kn=`writable`,qn=`value`,U=e=>!!e&&!!e[z];function W(e){return e?Xn(e)||tr(e)||!!e[Bn]||!!e[Hn]?.[Bn]||nr(e)||rr(e):!1}var Jn=V[Un][Hn].toString(),Yn=new WeakMap;function Xn(e){if(!e||!ir(e))return!1;let t=H(e);if(t===null||t===V[Un])return!0;let n=V.hasOwnProperty.call(t,Hn)&&t[Hn];if(n===Object)return!0;if(!q(n))return!1;let r=Yn.get(n);return r===void 0&&(r=Function.toString.call(n),Yn.set(n,r)),r===Jn}function Zn(e,t,n=!0){G(e)===0?(n?Reflect.ownKeys(e):V.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function G(e){let t=e[z];return t?t.type_:tr(e)?1:nr(e)?2:rr(e)?3:0}var Qn=(e,t,n=G(e))=>n===2?e.has(t):V[Un].hasOwnProperty.call(e,t),K=(e,t,n=G(e))=>n===2?e.get(t):e[t],$n=(e,t,n,r=G(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function er(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var tr=Array.isArray,nr=e=>e instanceof Map,rr=e=>e instanceof Set,ir=e=>typeof e==`object`,q=e=>typeof e==`function`,ar=e=>typeof e==`boolean`;function or(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var sr=e=>ir(e)?e?.[z]:null,J=e=>e.copy_||e.base_,cr=e=>e.modified_?e.copy_:e.base_;function lr(e,t){if(nr(e))return new Map(e);if(rr(e))return new Set(e);if(tr(e))return Array[Un].slice.call(e);let n=Xn(e);if(t===!0||t===`class_only`&&!n){let t=V.getOwnPropertyDescriptors(e);delete t[z];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Kn]===!1&&(a[Kn]=!0,a[Wn]=!0),(a.get||a.set)&&(t[i]={[Wn]:!0,[Kn]:!0,[Gn]:a[Gn],[qn]:e[i]})}return V.create(H(e),t)}{let t=H(e);if(t!==null&&n)return{...e};let r=V.create(t);return V.assign(r,e)}}function ur(e,t=!1){return pr(e)||U(e)||!W(e)?e:(G(e)>1&&V.defineProperties(e,{set:fr,add:fr,clear:fr,delete:fr}),V.freeze(e),t&&Zn(e,(e,t)=>{ur(t,!0)},!1),e)}function dr(){B(2)}var fr={[qn]:dr};function pr(e){return e===null||!ir(e)||V.isFrozen(e)}var mr=`MapSet`,hr=`Patches`,gr=`ArrayMethods`,_r={};function Y(e){let t=_r[e];return t||B(0,e),t}var vr=e=>!!_r[e];function yr(e,t){_r[e]||(_r[e]=t)}var br,xr=()=>br,Sr=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:vr(mr)?Y(mr):void 0,arrayMethodsPlugin_:vr(gr)?Y(gr):void 0});function Cr(e,t){t&&(e.patchPlugin_=Y(hr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wr(e){Tr(e),e.drafts_.forEach(Dr),e.drafts_=null}function Tr(e){e===br&&(br=e.parent_)}var Er=e=>br=Sr(br,e);function Dr(e){let t=e[z];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Or(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[z].modified_&&(wr(t),B(4)),W(e)&&(e=kr(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[z].base_,e,t)}else e=kr(t,n);return Ar(t,e,!0),wr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===zn?void 0:e}function kr(e,t){if(pr(t))return t;let n=t[z];if(!n)return Rr(t,e.handledSet_,e);if(!Mr(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Ir(n,e)}return n.copy_}function Ar(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ur(t,n)}function jr(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mr=(e,t)=>e.scope_===t,Nr=[];function Pr(e,t,n,r){let i=J(e),a=e.type_;if(r!==void 0&&K(i,r,a)===t){$n(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Zn(i,(e,n)=>{if(U(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Nr;for(let e of o)$n(i,e,n,a)}function Fr(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Mr(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=cr(i);Pr(e,i.draft_??i,a,n),Ir(i,r)})}function Ir(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}jr(e)}}function Lr(e,t,n){let{scope_:r}=e;if(U(n)){let i=n[z];Mr(i,r)&&i.callbacks_.push(function(){qr(e),Pr(e,n,cr(i),t)})}else W(n)&&e.callbacks_.push(function(){let i=J(e);e.type_===3?i.has(n)&&Rr(n,r.handledSet_,r):K(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Rr(K(e.copy_,t,e.type_),r.handledSet_,r)})}function Rr(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||U(e)||t.has(e)||!W(e)||pr(e)?e:(t.add(e),Zn(e,(r,i)=>{if(U(i)){let t=i[z];Mr(t,n)&&($n(e,r,cr(t),e.type_),jr(t))}else W(i)&&Rr(i,t,n)}),e)}function zr(e,t){let n=tr(e),r={type_:+!!n,scope_:t?t.scope_:xr(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Br;n&&(i=[r],a=Vr);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Br={get(e,t){if(t===z)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=J(e);if(!Qn(i,t,e.type_))return Wr(e,i,t);let a=i[t];if(e.finalized_||!W(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&or(t))return a;if(a===Hr(e.base_,t)||Ur(e,t,a)){qr(e);let n=e.type_===1?+t:t,r=Yr(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in J(e)},ownKeys(e){return Reflect.ownKeys(J(e))},set(e,t,n){let r=Gr(J(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Hr(J(e),t),i=r?.[z];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(er(n,r)&&(n!==void 0||Qn(e.base_,t,e.type_)))return!0;qr(e),Kr(e)}return e.copy_[t]===n&&(n!==void 0||Qn(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Lr(e,t,n),!0)},deleteProperty(e,t){return qr(e),Hr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Kr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=J(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Kn]:!0,[Wn]:e.type_!==1||t!==`length`,[Gn]:r[Gn],[qn]:n[t]}},defineProperty(){B(11)},getPrototypeOf(e){return H(e.base_)},setPrototypeOf(){B(12)}},Vr={};for(let e in Br){let t=Br[e];Vr[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Vr.deleteProperty=function(e,t){return isNaN(parseInt(t))&&B(13),Vr.set.call(this,e,t,void 0)},Vr.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&B(14),Br.set.call(this,e[0],t,n,e[0])};function Hr(e,t){let n=e[z];return(n?J(n):e)[t]}function Ur(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!W(n)||n[z]?!1:e.baseRefs_.has(n)}function Wr(e,t,n){let r=Gr(t,n);return r?qn in r?r[qn]:r.get?.call(e.draft_):void 0}function Gr(e,t){if(!(t in e))return;let n=H(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=H(n)}}function Kr(e){e.modified_||(e.modified_=!0,e.parent_&&Kr(e.parent_))}function qr(e){e.copy_||=(e.assigned_=new Map,lr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Jr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(q(e)&&!q(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}q(t)||B(6),n!==void 0&&!q(n)&&B(7);let r;if(W(e)){let i=Er(this),a=Yr(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?wr(i):Tr(i)}return Cr(i,n),Or(r,i)}if(!e||!ir(e)){if(r=t(e),r===void 0&&(r=e),r===zn&&(r=void 0),this.autoFreeze_&&ur(r,!0),n){let t=[],i=[];Y(hr).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}B(1,e)},this.produceWithPatches=(e,t)=>{if(q(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},ar(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ar(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ar(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){W(e)||B(8),U(e)&&(e=Xr(e));let t=Er(this),n=Yr(t,e,void 0);return n[z].isManual_=!0,Tr(t),n}finishDraft(e,t){let n=e&&e[z];(!n||!n.isManual_)&&B(9);let{scope_:r}=n;return Cr(r,t),Or(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Y(hr).applyPatches_;return U(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Yr(e,t,n,r){let[i,a]=nr(t)?Y(mr).proxyMap_(t,n):rr(t)?Y(mr).proxySet_(t,n):zr(t,n);return(n?.scope_??xr()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Fr(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Xr(e){return U(e)||B(10,e),Zr(e)}function Zr(e){if(!W(e)||pr(e))return e;let t=e[z],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lr(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=lr(e,!0);return Zn(n,(e,t)=>{$n(n,e,Zr(t))},r),t&&(t.finalized_=!1),n}function Qr(){Vn.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=sr(K(e,n.key_)),i=K(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||Qn(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=K(n,r),!ir(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[z];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;Zn(e.assigned_,(e,l)=>{let u=K(o,e,c),f=K(s,e,c),p=l?Qn(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===zn?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=G(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===Hn)&&B(19),q(o)&&n===Un&&B(19),o=K(o,n),(o===null||!ir(o))&&B(18,i.join(`/`))}let s=G(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:B(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:B(17,a)}}),e}function u(e){if(!W(e))return e;if(tr(e))return e.map(u);if(nr(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(rr(e))return new Set(Array.from(e).map(u));let t=Object.create(H(e));for(let n in e)t[n]=u(e[n]);return Qn(e,Bn)&&(t[Bn]=e[Bn]),t}function d(e){return U(e)?u(e):e}yr(hr,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var $r=new Jr,ei=$r.produce,ti=$r.produceWithPatches.bind($r),ni=$r.applyPatches.bind($r),ri=1e3;function ii(e,t){if(e.add(t),e.size>ri){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function ai(e){let{enablePatches:t=!1}=e;t&&Qr();let n=Rn(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=ie())=>{i.has(t)||(Qr(),r=ni(r,e),ii(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=ie())=>{if(!i.has(a)){if(ii(i,a),t){let[t,i]=ti(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=ei(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var oi=typeof self==`object`?self:globalThis,si=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),ci=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function li(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=si.has(e)?oi[e]:void 0;return n(new(r??oi.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&ci.has(a))return n(new oi[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function ui(e){return li(new Map,e)(0)}var X=``,{toString:di}={},{keys:fi}=Object;function pi(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=di.call(e).slice(8,-1);switch(n){case`Array`:return[1,X];case`Object`:return[2,X];case`Date`:return[3,X];case`RegExp`:return[4,X];case`Map`:return[5,X];case`Set`:return[6,X];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function mi([e,t]){return e===0&&(t===`function`||t===`symbol`)}function hi(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=pi(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of fi(r))(e||!mi(pi(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(mi(pi(n))||mi(pi(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!mi(pi(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function gi(e,t={}){let n=[];return hi(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:_i,stringify:vi}=JSON,yi={json:!0,lossy:!0};function bi(e){return ui(_i(e))}function xi(e){return vi(gi(e,yi))}function Si(e){return ui(e)}function Ci(e){return xi(e)}function wi(e){return bi(e)}var Ti=256,Ei=class extends Error{name=`StreamClosedError`};function Di(e={}){let t=e.id??ie(),n=Math.max(0,e.replayWindow??0),r=Rn(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Ei(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=ki(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function Oi(e={}){let t=e.id??ie(),n=Math.max(1,e.highWaterMark??Ti),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function ki(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var Ai=128;function ji(e){return e.replace(/[^\w-]+/g,`_`).slice(0,Ai)}var Mi=`__connection.json`,Ni=`__DEVFRAME_CONNECTION__`,Pi=`x-birpc-session`,Fi=`__rpc-dump/index.json`,Ii=`devframe:services`,Li=`devframe_otp`,Ri=`devframe_auth_token`;L.postMessage.remoteAssetsError;var zi=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Ln(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},Z=cn({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function Bi(e){if(e.agent&&e.jsonSerializable===!1)throw Z.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Vi(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Hi(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function Ui(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await Vi(i,n[r]);if(a.issues)throw Z.DF0043({name:e,index:r,issues:Hi(a.issues)})}return r}async function Wi(e,t,n){if(!t)return n;let r=await Vi(t,n);if(r.issues)throw Z.DF0044({name:e,issues:Hi(r.issues)});return n}async function Gi(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function Ki(e,t){let n=e.handler;if(!n){let r=await Gi(e,t);if(!r.handler)throw Z.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await Ui(e.name,r,t),o=await a(...n);return await Wi(e.name,i,o)}}var qi=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return Ki(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw Z.DF0021({name:e.name});Bi(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw Z.DF0022({name:e.name});Bi(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await Ki(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw Z.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function Ji(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw Xi(t,`undefined`,r,e);return n}return i!==null&&Yi(i,r,e,t),n})}function Yi(e,t,n,r){if(typeof e==`bigint`)throw Xi(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Xi(r,`Map`,t,n);if(e instanceof Set)throw Xi(r,`Set`,t,n);if(e instanceof Date)throw Xi(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Xi(r,e.constructor?.name??`class instance`,t,n)}function Xi(e,t,n,r){let i=Zi(n,r);return Z.DF0020({name:e||`<anonymous>`,type:t,path:i})}function Zi(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var Qi=`__DEVFRAME_CONNECTION_META__`,$i=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function ea(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function ta(){return ea(Ni)}function na(){return ea(Qi)}function ra(e){if(e)return e;try{let e=localStorage.getItem($i);if(e)return e}catch{}return ea($i)}function ia(e){globalThis[Ni]=e,globalThis[Qi]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&aa(e.authToken)}function aa(e){try{localStorage.setItem($i,e)}catch{}globalThis[$i]=e;let t=ta();t&&(globalThis[Ni]={...t,authToken:e})}function oa(e){let t=Xt(Mi,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function sa(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function ca(){let e=ta();if(e)return sa(e,ra()??e.authToken??e.connectionMeta.authToken);let t=na();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??oa(`./`),authToken:ra(t.authToken)}}async function la(e={}){if(e.connection){let t=sa(e.connection,ra(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return ia(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:oa(t[0]??`./`),authToken:ra(e.authToken??e.connectionMeta.authToken)};return ia(n),n}let n=ca();if(n){let t=sa(n,ra(e.authToken??n.authToken??n.connectionMeta.authToken));return ia(t),t}let r=[];for(let n of t){let t=Xt(Mi,n),i=oa(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:ra(e.authToken??r.authToken)};return ia(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Q=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function ua(e=Li){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function da(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function fa(e=Li){let t=ua(e);return t&&da(e),t}async function pa(e,t={}){let n=fa(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function ma(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Ii,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function ha(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:L.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:L.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=ai({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(L.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var ga=new Map;function _a(e=ga){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?Ji(n,r??``):`s:${Ci(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?wi(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function va(){}function ya(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function ba(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function xa(e){let{onConnected:t=va,onError:n=va,onDisconnected:r=va,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Ri}=${encodeURIComponent(e.authToken)}`);let s=_a(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=ya(r);if(!e)break;r=e.rest;let{event:t,data:n}=ba(e.frame);n.length>0&&_(t,n.join(`
4
- `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[Pi]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function Sa(e,t){let{channel:n,rpcOptions:r={}}=t;return vn(e,{...n,timeout:-1,...r,proxify:!1})}function Ca(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(L.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Q(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Q(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(L.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new Q(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(L.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(L.client.connectionError,e),m(new Q(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Q(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Sa(a.functions,{channel:v,rpcOptions:o});a.register({name:L.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Q(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(L.client.connectionError,e),m(e),i.emit(L.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Q(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(L.client.connectionError,e)}return i.emit(L.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(L.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function T(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:T,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(L.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(L.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(L.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function wa(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function Ta(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=wa(n.sse,r??`./`,location);return Ca({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>xa({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Ea(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:Da(r)?Ea(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function Da(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Oa(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function ka(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Aa(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function ja(e){if(e.error)throw Ea(e.error);return e.output}function Ma(e){return e.some(e=>e!=null)}function Na(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Pa(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Si(e):e}function a(e,t){return i(Na(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Aa(r)?ja(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(Oa(r)){if(Ma(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(ka(r)){let e=Ln(n),i=r.records[e];if(i)return ja(await s(i,r.serialization));if(r.fallback)return ja(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Ma(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Fa(e){let t=Pa(await e.fetchJsonFromBases(Fi),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Ia=``;function La(e,t){return`${e}${Ia}${t}`}function Ra(e){let t=new Map,n=new Map;e.client.register({name:L.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(La(e,n))?._push(r,i)}}),e.client.register({name:L.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=La(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:L.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=La(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(L.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Ia);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=La(n,r),o=t.get(a);if(o)return o;let s=Oi({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(L.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=La(t,r),a=n.get(i);if(a)return a;let o=Di({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function za(){}var Ba=new Map;function Va(e){let t=e.url;e.authToken&&(t=`${t}?${Ri}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=za,onError:i=za,onDisconnected:a=za,definitions:o=Ba}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=_a(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ha(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Zt(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Ua(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ha(n.websocket,r??`./`,location);return Ca({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Va({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Wa(e){return e.includes(`:`)}function Ga(e,t){return Wa(t)?t:`${e}:${t}`}function Ka(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function qa(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return Ka(a)}function Ja(e,t){return{global:qa(e,t,`global`),project:qa(e,t,`project`)}}function Ya(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Wa(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(Ga(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Ga(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Ga(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Ga(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Ga(t,n),r,i),upload:(n,r)=>e.streaming.upload(Ga(t,n),r)}},settings:Ja(e,t),scope:e.scope}}function Xa(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Za(e,t={}){let n=t.modelContext??Xa();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=ji(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=yn(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Sn(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Qa(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Qa(e,t,n){try{let r=wn(n,e.args?.length);return{content:[{type:`text`,text:$a(await(await Ki(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:eo(e)}]}}}function $a(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function eo(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function to(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function no(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Rn(),a=Array.isArray(t)?t:[t],o=await la(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new zi({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new qi(f),m=e.webmcp===!1?void 0:Za(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Xt(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=to(e.transport??`auto`,s),b=y===`static`?await Fa({fetchJsonFromBases:_}):y===`sse`?Ta({...v,sseOptions:e.sseOptions}):Ua({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,C=!1;function w(e){return((...t)=>C||!S?e(...t):S.then(()=>e(...t)))}function T(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let E={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(aa(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;aa(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:w(b.call),callEvent:w(b.callEvent),callOptional:w(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:T};E.sharedState=ha(E),E.streaming=Ra(E),E.services=ma(E);let ee=new Map;E.scope=(e=>{if(!e)return E;let t=ee.get(e);return t||(t=Ya(E,e),ee.set(e,t)),t}),f.rpc=E;function te(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function D(){if(e.simpleAuth!==!1&&te()&&typeof globalThis.prompt==`function`)for(await E.requestAuthCode().catch(()=>{});!E.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await E.requestTrustWithCode(t))return}}async function O(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await pa(E,{param:n}):!1;t||r||E.isTrusted||await D()}return S=O().then(()=>{C=!0},()=>{C=!0}),s.mcp&&ce(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./Qwmw5xxh.js`);return{setupBrowserAgentRpcBridge:e}},__vite__mapDeps([0,1]),import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(E))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&E.requestTrustWithToken(e.data.authToken)}),E}function ro(e={}){return no({...e,simpleAuth:!1})}var io=`/__devtools/`;`${io}`;var $=O({connected:!1,error:null,inspectStatus:`checking`}),ao=t(void 0),oo=Rn(),so;function co(e={}){oo.emit(`updated`,e)}async function lo(e){so?.(),so=(await e.sharedState.get(`vite:inspect:module-updated`,{initialValue:{ids:null,updatedAt:0}})).on(`updated`,t=>{e.cacheManager.clear(),co({ids:t.ids??void 0})})}async function uo(){let e=_();$.connected=!1,$.error=null,$.inspectStatus=`checking`;try{ao.value=await ro({baseURL:[io,e.app.baseURL],cacheOptions:!0,connectionMeta:e.app.connection,wsOptions:{onConnected:()=>{$.connected=!0,$.error=null},onError:e=>{$.error=e},onDisconnected:()=>{$.connected=!1}},rpcOptions:{onGeneralError:(e,t)=>{$.error=e,console.error(`[vite-devtools] RPC error on executing "${t}":`,e)},onFunctionError:(e,t)=>{$.error=e,console.error(`[vite-devtools] RPC error on executing "${t}":`,e)}}});let t=await ao.value.call(`devtoolskit:internal:rpc:server:list`);$.inspectStatus=`vite:inspect:get-metadata`in t?`available`:`unavailable`,ao.value.cacheManager.updateOptions({functions:Object.keys(t).filter(e=>t[e]?.cacheable)}),$.inspectStatus===`available`&&await lo(ao.value),$.connected=!0}catch(e){$.connected=!1,$.error=e}}function fo(){return ao}function po(e){let t=oo.on(`updated`,e);return E()&&g(t),t}export{ge as A,ue as B,yt as C,Ct as D,Wt as E,_e as F,Re as I,Ke as L,xe as M,Le as N,Gt as O,M as P,qe as R,Bt as S,Nt as T,ce as V,Pt as _,Ze as a,Lt as b,rt as c,wt as d,Et as f,F as g,At as h,fo as i,A as j,he as k,ct as l,Ot as m,po as n,it as o,Dt as p,$ as r,at as s,uo as t,lt as u,kt as v,Tt as w,zt as x,Ft as y,me as z};
@@ -1 +0,0 @@
1
- import{A as e,C as t,Ct as n,H as r,J as i,Kt as a,N as o,Ot as s,Q as c,S as l,T as u,Wt as d,Y as f,Z as p,bt as m,ct as h,et as g,g as _,j as v,lt as y,ot as b,q as x,qt as S,st as C,ut as w,vt as T,w as E,x as D}from"./BXzW-15h.js";import{et as O,t as k}from"./DxqvJVyq.js";import{f as A,p as ee}from"./C0tXHD8J.js";import{I as j,L as M,R as N,d as P,i as F,k as I,n as L,o as R,u as z,x as B,z as V}from"./B3eE09d-.js";import{n as H,r as U}from"#entry";import{t as W}from"./BDNMzG2s.js";import{D as te,E as G,O as K,S as ne,T as re,_ as q,a as ie,b as ae,c as oe,d as se,f as J,g as Y,h as X,k as ce,l as le,m as Z,n as ue,o as de,r as fe,s as pe,t as me,u as he,v as Q,x as ge}from"./D_shstzp.js";var $=o({__name:`DisplayNumberBadge`,props:{number:{},color:{default:`badge-color-gray op75`},icon:{},prefix:{},suffix:{},format:{default:`locale`}},setup(t){let n=t,r=D(()=>n.format===`percent`?Number(n.number).toLocaleString(void 0,{style:`percent`,minimumFractionDigits:2,maximumFractionDigits:2}):Number(n.number).toLocaleString());return(n,i)=>(f(),u(`div`,{class:d([t.color,`px-0.4em py-0.2em font-mono line-height-none flex items-center`])},[t.icon?(f(),u(`div`,{key:0,class:d([t.icon,`mr-1`])},null,2)):E(``,!0),e(` `+S(t.prefix||``)+S(r.value)+S(t.suffix||``)+` `,1),c(n.$slots,`after`)],2))}}),_e={class:`op50 text-xs flex justify-center items-center`},ve=o({__name:`FlowmapNodePluginInfo`,props:{modules:{},calls:{},duration:{}},setup(e){return(t,n)=>(f(),u(`span`,_e,[v($,{number:e.modules,icon:`i-catppuccin-java-class-abstract`,color:`transparent color-scale-neutral`,title:`Module processed: ${e.modules}`},null,8,[`number`,`title`]),n[1]||=l(`span`,{class:`op40`},`|`,-1),v($,{number:e.calls,icon:`i-ph-arrow-counter-clockwise`,color:`transparent color-scale-neutral`,title:`Total calls: ${e.calls}`},null,8,[`number`,`title`]),n[2]||=l(`span`,{class:`op40`},`|`,-1),v(X,{duration:e.duration,class:`flex gap-1 items-center px1`,title:`Total build cost: ${s(q)(e.duration,!0)}`},{default:y(()=>[...n[0]||=[l(`span`,{class:`i-ph-clock-duotone inline-block`},null,-1)]]),_:1},8,[`duration`,`title`])]))}}),ye={class:`flex flex-col h-full min-h-0`},be={class:`select-none flex-1 min-h-0 of-x-hidden of-y-auto ws-nowrap w-auto p4 flex flex-col`,style:{"scrollbar-gutter":`stable`}},xe={class:`flex`},Se={class:`flex items-center justify-center relative w-60 h14`},Ce={class:`op50 text-xs flex items-center justify-center gap-1 h6`},we=[`datetime`],Te={class:`flex items-center justify-center relative w-60 h14`},Ee={class:`op50 text-xs flex items-center justify-center gap-1 h6`},De=[`datetime`],Oe=Object.assign(o({__name:`PluginFlowTimeline`,props:{buildMetrics:{}},setup(t){let n=t;function r(e){let t={duration:0,calls:e.length,modules:0},n=new Set;return e.forEach(e=>{n.has(e.module)||(n.add(e.module),t.modules++),t.duration+=e.duration}),t}let i=D(()=>r(n.buildMetrics.resolveIdMetrics)),a=D(()=>r(n.buildMetrics.loadMetrics)),o=D(()=>r(n.buildMetrics.transformMetrics)),d=D(()=>{let e=n.buildMetrics.calls;if(e?.length)return e[0].timestamp_start}),p=D(()=>{let e=n.buildMetrics.calls;if(e?.length)return e.at(-1).timestamp_end});return(n,r)=>{let m=he,h=ve;return f(),u(`div`,ye,[c(n.$slots,`header`),l(`div`,be,[l(`div`,xe,[v(m,{active:!1,"class-node-inner":`w60`},{content:y(()=>[l(`div`,{class:`p2 w-full text-center`,onClick:r[0]||=e=>s(J).pluginDetailSelectedHook=``},[v(Z,{name:t.buildMetrics.plugin_name,class:`font-mono text-sm ws-nowrap text-ellipsis line-clamp-1`},null,8,[`name`])])]),_:1})]),l(`div`,Se,[r[5]||=l(`div`,{class:`border-flow-line left-50% translate-x--1/2 absolute top-0 border-r z-flowmap-line h4`},null,-1),r[6]||=l(`div`,{class:`border-flow-line left-50% translate-x--1/2 absolute top-10 border-r z-flowmap-line h4`},null,-1),l(`span`,Ce,[r[4]||=l(`i`,{class:`i-ph-airplane-takeoff-thin text-4 inline-flex`},null,-1),d.value?(f(),u(`time`,{key:0,datetime:new Date(d.value).toISOString()},S(new Date(d.value).toLocaleString()),9,we)):E(``,!0)])]),v(m,{"class-node-inner":`w60`,"class-node-outer":`${!i.value.modules&&!i.value.calls?`b-dashed!`:``}`,"class-line-bottom":`left-50%! translate-x--1/2`,class:`pb4 w60`,lines:{bottom:!0},active:s(J).pluginDetailSelectedHook===`resolve`},{content:y(()=>[l(`div`,{class:`flex flex-col gap1 w-full`,onClick:r[1]||=e=>s(J).pluginDetailSelectedHook=`resolve`},[r[7]||=l(`span`,{class:`flex items-center justify-center gap-1`},[l(`i`,{class:`i-ph-magnifying-glass-duotone`}),e(` Resolve Id `)],-1),l(`div`,null,[v(h,{modules:i.value.modules,calls:i.value.calls,duration:i.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`class-node-outer`,`active`]),v(m,{active:s(J).pluginDetailSelectedHook===`load`,"class-node-inner":`w60`,"class-node-outer":`${!a.value.modules&&!a.value.calls?`b-dashed!`:``}`,"class-line-bottom":`left-50%! translate-x--1/2`,class:`pb4 w60`,lines:{bottom:!0}},{content:y(()=>[l(`div`,{class:`flex flex-col gap1 w-full`,onClick:r[2]||=e=>s(J).pluginDetailSelectedHook=`load`},[r[8]||=l(`span`,{class:`flex items-center justify-center gap-1`},[l(`i`,{class:`i-ph-upload-simple-duotone`}),e(` Load `)],-1),l(`div`,null,[v(h,{modules:a.value.modules,calls:a.value.calls,duration:a.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`active`,`class-node-outer`]),v(m,{active:s(J).pluginDetailSelectedHook===`transform`,"class-node-inner":`w60`,"class-node-outer":`${!o.value.modules&&!o.value.calls?`b-dashed!`:``}`},{content:y(()=>[l(`div`,{class:`flex flex-col gap1 w-full`,onClick:r[3]||=e=>s(J).pluginDetailSelectedHook=`transform`},[r[9]||=l(`span`,{class:`flex items-center justify-center gap-1`},[l(`i`,{class:`i-ph-magic-wand-duotone`}),e(` Transform `)],-1),l(`div`,null,[v(h,{modules:o.value.modules,calls:o.value.calls,duration:o.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`active`,`class-node-outer`]),l(`div`,Te,[r[11]||=l(`div`,{class:`border-flow-line left-50% translate-x--1/2 absolute top-0 border-r z-flowmap-line h4`},null,-1),r[12]||=l(`div`,{class:`border-flow-line left-50% translate-x--1/2 absolute top-10 border-r z-flowmap-line h4`},null,-1),r[13]||=l(`div`,{class:`border-flow-line left-50% translate-x--1/2 absolute top-14 w-2 h-2 border-4 rounded-full`},null,-1),l(`span`,Ee,[r[10]||=l(`i`,{class:`i-ph-airplane-landing-thin text-4 inline-flex`},null,-1),p.value?(f(),u(`time`,{key:0,datetime:new Date(p.value).toISOString()},S(new Date(p.value).toLocaleString()),9,De)):E(``,!0)])])])])}}}),{__name:`FlowmapPluginFlowTimeline`}),ke={role:`row`,class:`border-b border-base bg-base flex flex-row`},Ae={key:0,role:`columnheader`,class:`bg-base flex-none w32 ws-nowrap p1 text-center font-600`},je={key:1,role:`columnheader`,class:`bg-base flex-1 min-w100 ws-nowrap p1 text-left font-600`},Me={class:`flex flex-row gap1 items-center w-full`},Ne={class:`w-6 h-6 rounded-full cursor-pointer hover:bg-active flex items-center justify-center`},Pe={class:`p2 flex flex-col gap2`},Fe=[`title`],Ie=[`checked`,`onChange`],Le={class:`text-sm`},Re={key:2,role:`columnheader`,class:`rounded-tr-2 bg-base flex-none ws-nowrap p1 text-center font-600 w-27`},ze={class:`w-6 h-6 rounded-full cursor-pointer hover:bg-active flex items-center justify-center`},Be={key:3,role:`columnheader`,class:`rounded-tr-2 bg-base flex-none min-w52 ws-nowrap p1 text-center font-600`},Ve={key:4,role:`columnheader`,class:`rounded-tr-2 bg-base flex-none min-w52 ws-nowrap p1 text-center font-600`},He={key:0,role:`cell`,class:`flex items-center justify-center flex-none w32 ws-nowrap op80`},Ue={key:1,role:`cell`,class:`flex-1 min-w100 text-left text-ellipsis line-clamp-2`},We={key:2,role:`cell`,class:`flex items-center justify-center flex-none text-center text-sm w-27`},Ge={key:3,role:`cell`,class:`flex items-center justify-center flex-none text-center font-mono text-sm min-w52 op80`},Ke={key:4,role:`cell`,class:`flex items-center justify-center flex-none text-center font-mono text-sm min-w52 op80`},qe={key:1,role:`table`,class:`min-w-max h-full`},Je={class:`p4`},Ye={class:`w-full h-48 flex items-center justify-center op50 italic`},Xe={key:0},Ze={key:1},Qe=Object.assign(W(o({__name:`PluginDetailsTable`,props:{modules:{},buildMetrics:{},selectedFields:{},root:{}},setup(n){let r=n,i={resolve:`Resolve Id`,load:`Load`,transform:`Transform`},a=D(()=>r.modules.map(e=>({mod:e,type:K(e.id)}))),o=D(()=>G.filter(e=>a.value.some(t=>e.match.test(t.mod.id)))),c=D(()=>{let e=new Map;for(let{mod:t,type:n}of a.value)e.set(t.id,n.name);return e}),h=m(J.value.pluginDetailsModuleTypes??o.value.map(e=>e.name)),g=D(()=>new Set(h.value)),{state:b,next:x}=P([``,`desc`,`asc`],{initialValue:J.value.pluginDetailsDurationSortType}),C=D(()=>{let e=J.value.pluginDetailSelectedHook,t=J.value.pluginDetailsShowType,n=t!==`all`&&[`load`,`transform`].includes(e),i=new Map(c.value),a=[];for(let o of r.buildMetrics.calls){if(!o.module||e&&o.type!==e||n&&(t===`changed`?o.unchanged:!o.unchanged))continue;let r=i.get(o.module);r||(r=K(o.module).name,i.set(o.module,r)),g.value.has(r)&&a.push(o)}return b.value&&a.sort((e,t)=>b.value===`asc`?e.duration-t.duration:t.duration-e.duration),a});function w(e){h.value?.includes(e.name)?h.value=h.value?.filter(t=>t!==e.name):h.value?.push(e.name),J.value.pluginDetailsModuleTypes=h.value}function T(){x(),J.value.pluginDetailsDurationSortType=b.value}function O(e){return e?`/graph?module=${encodeURIComponent(e)}`:!1}return(r,a)=>{let c=ge;return C.value.length&&n.selectedFields.length?(f(),t(ae,{key:0,class:`plugin-details-table min-w-max h-full min-h-0`,role:`table`,items:C.value,"key-prop":`id`,"page-mode":!1,scroller:`fixed`,"item-size":36},{before:y(()=>[l(`div`,ke,[n.selectedFields.includes(`hookName`)?(f(),u(`div`,Ae,` Hook name `)):E(``,!0),n.selectedFields.includes(`module`)?(f(),u(`div`,je,[l(`button`,Me,[a[0]||=e(` Module `,-1),v(s(U),null,{popper:y(()=>[l(`div`,Pe,[(f(!0),u(_,null,p(o.value,e=>(f(),u(`label`,{key:e.name,title:e.description,class:`cursor-pointer module-type-filter border border-base rounded-md px2 py1 flex items-center gap-1 select-none`},[l(`input`,{type:`checkbox`,class:`mr1`,checked:h.value?.includes(e.name),onChange:t=>w(e)},null,40,Ie),l(`div`,{class:d([e.icon,`icon-catppuccin`])},null,2),l(`div`,Le,S(e.description||e.name),1)],8,Fe))),128))])]),default:y(()=>[l(`span`,Ne,[l(`i`,{class:d([`i-ph-funnel-duotone text-xs`,h.value.length===o.value.length?`op50`:`text-primary op100`])},null,2)])]),_:1})])])):E(``,!0),n.selectedFields.includes(`duration`)?(f(),u(`div`,Re,[l(`button`,{class:`flex flex-row gap1 items-center justify-center w-full`,onClick:T},[a[1]||=e(` Duration `,-1),l(`span`,ze,[l(`i`,{class:d([`text-xs`,[s(b)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,s(b)?`op100 text-primary`:`op50`]])},null,2)])])])):E(``,!0),n.selectedFields.includes(`startTime`)?(f(),u(`div`,Be,` Start Time `)):E(``,!0),n.selectedFields.includes(`endTime`)?(f(),u(`div`,Ve,` End Time `)):E(``,!0)])]),default:y(({item:e,index:t})=>[l(`div`,{role:`row`,class:d([`border-base border-b border-dashed flex flex-row h-9`,[t===C.value.length-1?`border-b-0`:``]])},[n.selectedFields.includes(`hookName`)?(f(),u(`div`,He,[v(ne,{text:i[e.type]},null,8,[`text`])])):E(``,!0),n.selectedFields.includes(`module`)?(f(),u(`div`,Ue,[v(c,{id:e.module,class:`w-full border-none ws-nowrap hover:bg-active border border-base rounded block px2 py1`,cwd:n.root,link:O(e.graphModuleId)},null,8,[`id`,`cwd`,`link`])])):E(``,!0),n.selectedFields.includes(`duration`)?(f(),u(`div`,We,[v(X,{duration:e.duration},null,8,[`duration`])])):E(``,!0),n.selectedFields.includes(`startTime`)?(f(),u(`div`,Ge,S(s(Q)(e.timestamp_start)),1)):E(``,!0),n.selectedFields.includes(`endTime`)?(f(),u(`div`,Ke,S(s(Q)(e.timestamp_end)),1)):E(``,!0)],2)]),_:1},8,[`items`])):(f(),u(`div`,qe,[l(`div`,Je,[l(`div`,Ye,[n.selectedFields.length?(f(),u(`p`,Ze,` No data `)):(f(),u(`p`,Xe,` No columns selected `))])])]))}}}),[[`__scopeId`,`data-v-ba6a4bd9`]]),{__name:`DataPluginDetailsTable`}),$e={class:`p2 h-full w-full`},et={class:`flex border border-base rounded-2 h-full relative of-hidden`},tt={key:0,class:`of-hidden border-r border-base shrink-0 h-full min-h-0 flex flex-col`},nt={class:`px2 h10 border-b border-base bg-base rounded-t-2 flex items-center justify-end`},rt={class:`flex-1 h-full min-w-0 min-h-0 flex flex-col`},it={class:`flex items-center justify-between border-b border-base px2 h10 bg-base rounded-t-2 of-x-auto ws-nowrap`},at={class:`flex items-center h-full`},ot={key:0,class:`flex items-center justify-center gap1 h-full text-xs py1`},st={class:`op50 flex items-center gap-1`},ct=[`title`],lt={class:`text-xs op50`},ut={class:`flex-1 min-h-0 of-x-auto overscroll-contain`},dt=Object.assign(o({__name:`PluginFlow`,props:{modules:{},buildMetrics:{},root:{}},setup(t){let n=t,[r,i]=M(!0),a=[{match:/hookName/,name:`hookName`,description:`Hook name`,icon:`i-ph-function-duotone`},{match:/module/,name:`module`,description:`Module`,icon:`i-ph-package-duotone`},{match:/duration/,name:`duration`,description:`Duration`,icon:`i-ph-clock-countdown-duotone`},{match:/startTime/,name:`startTime`,description:`Start Time`,icon:`i-ph-clock-duotone`},{match:/endTime/,name:`endTime`,description:`End Time`,icon:`i-ph-clock-duotone`}],o=m({selected:J.value.pluginDetailsTableFields,search:!1}),c=D(()=>J.value.pluginDetailsTableFields?J.value.pluginDetailsTableFields:a.map(e=>e.name)),{state:d,next:p}=P([`changed`,`unchanged`,`all`],{initialValue:J.value.pluginDetailsShowType}),h=D(()=>d.value===`all`?`Show Changed`:d.value===`changed`?`Show Unchanged`:`Show All`),g=D(()=>!(![`load`,`transform`].includes(J.value.pluginDetailSelectedHook)||!n.buildMetrics.calls?.filter(e=>e.type===J.value.pluginDetailSelectedHook).filter(e=>e.unchanged).length)),_=D(()=>{let e=n.buildMetrics.calls?.filter(e=>e.type===J.value.pluginDetailSelectedHook).filter(e=>e.unchanged),t=e.reduce((e,t)=>e+t.duration,0);return{count:e.length,duration:t}});C(()=>o.value.selected,e=>{J.value.pluginDetailsTableFields=e});function b(){p(),J.value.pluginDetailsShowType=d.value}return(n,d)=>{let p=Oe,m=Qe;return f(),u(`div`,$e,[l(`div`,et,[s(r)?(f(),u(`div`,tt,[v(p,{"build-metrics":t.buildMetrics},{header:y(()=>[l(`div`,nt,[l(`button`,{class:`w8 h8 rounded-full cursor-pointer hover:bg-active flex items-center justify-center`,onClick:d[0]||=e=>s(i)(!1)},[...d[3]||=[l(`i`,{class:`i-ph-sidebar-simple-duotone inline-flex op50`},null,-1)]])])]),_:1},8,[`build-metrics`])])):E(``,!0),l(`div`,rt,[l(`div`,it,[l(`div`,at,[s(r)?E(``,!0):(f(),u(`button`,{key:0,class:`w8 h8 rounded-full cursor-pointer mr1 hover:bg-active flex items-center justify-center`,onClick:d[1]||=e=>s(i)(!0)},[...d[4]||=[l(`i`,{class:`i-ph-sidebar-duotone inline-flex op50`},null,-1)]])),v(ue,{modelValue:o.value,"onUpdate:modelValue":d[2]||=e=>o.value=e,"selected-container-class":`px0! py1 border-none bg-none flex-nowrap! h-full`,rules:a,class:`[&_[icon-catppuccin]]:(filter-none!) h-full border-none`},null,8,[`modelValue`])]),g.value?(f(),u(`div`,ot,[l(`p`,st,[v($,{number:_.value.count},null,8,[`number`]),d[5]||=e(` module unchanged, but cost `,-1),v(X,{duration:_.value.duration},null,8,[`duration`])]),l(`button`,{class:`rounded-md px2 py1 select-none h-full border border-base rounded-lg hover:bg-active`,title:h.value,onClick:b},[l(`div`,lt,S(h.value),1)],8,ct)])):E(``,!0)]),l(`div`,ut,[v(m,{modules:t.modules,"build-metrics":t.buildMetrics,"selected-fields":c.value,root:t.root},null,8,[`modules`,`build-metrics`,`selected-fields`,`root`])])])])])}}}),{__name:`FlowmapPluginFlow`}),ft={class:`flex gap-1 items-center flex-wrap`},pt={key:0,class:`i-ph-arrow-right-bold text-sm op-fade`},mt=[`onClick`],ht=o({__name:`ChartNavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=D(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(f(),u(`div`,ft,[(f(!0),u(_,null,p(i.value,(e,t)=>(f(),u(_,{key:e.id},[t>0?(f(),u(`div`,pt)):E(``,!0),l(`button`,{class:`hover:bg-active rounded px1`,onClick:t=>r(`select`,e)},[l(`span`,null,S(e.text||e.id),1)],8,mt)],64))),128))]))}}),gt={class:`grid grid-cols-[max-content_1fr] gap-2 p4`},_t={class:`flex flex-col gap-4`},vt={key:0,class:`grid grid-cols-[300px_1fr] gap-1`},yt=[`onClick`],bt={key:0,class:`flex gap2 items-center pl2 hover:bg-active`},xt={class:`font-mono text-sm`},St=[`onClick`],Ct=[`title`],wt=o({__name:`PluginsSunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n,o=b(`el`);h(()=>o.value?.append(r.graph.el));function s(e){return de(r.graph.options.getColor?.(e)||`#000`)}return(n,r)=>{let d=g(`tooltip`);return f(),u(`div`,gt,[l(`div`,{ref_key:`el`,ref:o,class:`w-500px`},null,512),l(`div`,_t,[v(ht,{class:`border-b border-base py2`,selected:t.selected,options:t.graph.options,onSelect:r[0]||=e=>i(`select`,e)},null,8,[`selected`,`options`]),t.selected?(f(),u(`div`,vt,[(f(!0),u(_,null,p(t.selected.children,o=>(f(),u(_,{key:o.id},[l(`button`,{class:`ws-nowrap text-nowrap text-left overflow-hidden text-ellipsis text-sm hover:bg-active rounded px2`,onClick:e=>i(`select`,o)},[o.meta?.type===`hook`?(f(),u(`div`,bt,[r[1]||=l(`i`,{class:`i-ph-function-duotone inline-flex`},null,-1),l(`span`,xt,S(o.text),1)])):c(n.$slots,`module`,{child:o},()=>[l(`span`,null,S(o.text||o.id),1)],void 0,1)],8,yt),l(`button`,{class:`relative flex gap-1 items-center hover:bg-active rounded`,onClick:e=>i(`select`,o)},[l(`div`,{class:`h-5 rounded shadow border border-base`,style:a({background:s(o),width:`${o.size/t.selected.size*100}%`})},null,4),v(X,{duration:o.size,class:`text-xs`},null,8,[`duration`]),o.children.length>0&&o.meta?.type!==`hook`?w((f(),u(`div`,{key:0,title:`${o.children.length} dependencies`,class:`text-xs op-fade`},[e(` (`+S(o.children.length)+`) `,1)],8,Ct)),[[d,`${o.children.length} dependencies`]]):E(``,!0)],8,St)],64))),128))])):E(``,!0)])])}}});function Tt(e){let{data:t,nameKey:a,sizeKey:o,rootText:c,nodeType:l,graphOptions:u,onUpdate:d}=e,f=n(void 0),p=n(void 0),h=m(void 0),g=n(void 0),_,v=D(()=>{if(e.tree)return e.tree.value;let n=s(t),r=new Map,i=0,u={id:`~root`,text:c,size:0,sizeSelf:0,children:[]};if(!n?.length)return{map:r,root:u,maxDepth:i};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=Y(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,n,a,o){if(r.has(t))return r.get(t);o>i&&(i=o);let s={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:a};return r.set(t,s),a.children.push(s),d.unshift(()=>{let t=s.sizeSelf;s.size+=s.children.reduce((e,t)=>e+t.size,0),s.subtext=Y(s.size).join(` `),s.children.length&&t/s.size>.1&&s.children.push({id:`${s.id}-self`,text:``,size:t,sizeSelf:t,subtext:Y(t).join(` `),children:[],meta:{...e,path:``,type:l},parent:s}),s.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),s}function p(e){let t=e[a].split(`/`).filter(Boolean),n=u,i=``,s=0;t.forEach((c,u)=>{if(i+=(i?`/`:``)+c,s++,u===t.length-1){let t={id:e[a],text:c,size:e[o],sizeSelf:e[o],subtext:Y(e[o]).join(` `),children:[],meta:{...e,path:c,type:l}};n.children.push(t),r.set(e[a],t)}else n=f(e,i,c,n,s)})}return n.forEach(p),d.forEach(e=>e()),{map:r,root:u,maxDepth:i}}),y=D(()=>({animate:J.value.chartAnimation,palette:{stroke:H.value?`#222`:`#555`,fg:H.value?`#fff`:`#000`,bg:H.value?`#111`:`#fff`},getColor:pe(v.value.root,H.value?.8:.9,H.value?1:1.1),getSubtext:e=>e.subtext,...u}));function b(e,t){h.value=e?.meta,e?.children.length||(e=e?.parent),g.value?.select(e,t)}function x(){_?.(),p.value=v.value.root,d?.(),r(()=>{let e=h.value&&v.value.map.get(h.value[a])||null;e&&b(e,!1)}),_=()=>{g.value?.dispose(),g.value=void 0,h.value=void 0}}return r(()=>{C(()=>[v.value,y.value],()=>{x()},{deep:!0,immediate:!1}),x()}),i(()=>{_?.()}),{tree:v,chartOptions:y,graph:g,nodeHover:f,nodeSelected:p,selectedNode:h,selectNode:b,buildGraph:x}}var Et={key:1,class:`relative h-full w-full`},Dt={class:`bg-glass absolute left-2 top-2 z-panel-content p2 border border-base rounded-lg flex flex-col gap-2`},Ot={class:`font-mono px1`},kt={class:`text-xs font-mono flex items-center gap-3 ml2`},At={class:`flex gap-2`},jt={class:`of-auto h-full pt-30`},Mt={key:2,class:`flex items-center justify-center w-full h-full`},Nt={key:0,class:`border border-base rounded-lg shadow-lg px3 py2 bg-glass pointer-events-none text-sm max-w-80`},Pt={key:0,class:`flex items-center gap2`},Ft={key:0,class:`flex font-semibold font-mono text-base mb2`},It={key:1,class:`border-t border-base pt2 flex flex-col gap-1.5 min-w-48`},Lt={class:`flex justify-between items-center py1`},Rt=[`datetime`],zt={class:`flex justify-between items-center py1`},Bt=[`datetime`],Vt={class:`flex justify-between items-center py1 border-t border-base border-dashed pt2`},Ht={key:2},Ut=Object.assign(o({__name:`PluginDetailsLoader`,props:{plugin:{},query:{},modules:{},root:{}},emits:[`close`],setup(n,{emit:r}){let i=n,a=r,o=F(),{state:c,isLoading:p,execute:m}=z(async()=>await o.value.call(`vite:inspect:get-plugin-details`,i.query,i.plugin),null),h=j(()=>{m()},100);C(()=>[i.query.vite,i.query.env,i.plugin],()=>{m()}),L(()=>{h()});let g=D(()=>{let e=new Set;return c.value?.calls?.filter(t=>!e.has(t.module)&&(e.add(t.module),!0))??[]}),b=D(()=>c.value?.loadMetrics.reduce((e,t)=>e+t.duration,0)),x=D(()=>c.value?.transformMetrics.reduce((e,t)=>e+t.duration,0)),w=D(()=>c.value?.resolveIdMetrics.reduce((e,t)=>e+t.duration,0)),O=D(()=>c.value?.calls?.reduce((e,t)=>e+t.duration,0)),k=D(()=>i.modules.map(e=>({mod:e,path:me(e.id,i.root),type:K(e.id)}))),A=D(()=>G.filter(e=>k.value.some(t=>e.match.test(t.mod.id))));function ee(e){return e?`/graph?module=${encodeURIComponent(e)}`:!1}let M=D(()=>{let e=new Map;if(!c.value)return{root:t({id:`~root`,text:`Project`,children:[]}),map:new Map,maxDepth:3};function t(t,n){e.set(t.id,t);let r=oe(t,n,(e,t)=>(t?.meta?.duration??0)-(e?.meta?.duration??0));return r.children&&r.children.forEach(e=>{e.parent=r}),r}function n(e,n){let r=n.filter(e=>!A.value.some(t=>K(e.module).name===t.name));return[...A.value.map((r,i)=>{let a=n.filter(e=>K(e.module).name===r.name);return t({id:`${e}-${r.name}-${i}`,text:r.description,children:a.map((n,r)=>t({id:`${e}-${r}`,text:n.module,size:n.duration,meta:n})),meta:{type:`module`,title:r.description,id:`${e}-${r.name}-${i}`,duration:a.reduce((e,t)=>e+t.duration,0)}})}),t({id:`${e}-other`,text:`Other`,children:r.map((n,r)=>t({id:`${e}-other-${r}`,text:n.module,size:n.duration,meta:n})),meta:{type:`module`,title:`Other`,id:`${e}-other`,duration:r.reduce((e,t)=>e+t.duration,0)}})]}let r=n(`resolveId`,c.value.resolveIdMetrics),i=n(`loads`,c.value.loadMetrics),a=n(`transforms`,c.value.transformMetrics);function o(e,n,r){return t({id:e,text:n,children:r.sort((e,t)=>t.size-e.size),meta:{id:e,type:`hook`,title:n,duration:{"~loads":b.value,"~resolves":w.value,"~transforms":x.value}[e]}})}return{root:t({id:`~root`,text:`Project`,children:[o(`~resolves`,`Resolve Id`,r),o(`~loads`,`Load`,i),o(`~transforms`,`Transform`,a)]}),map:e,maxDepth:3}}),N=T(B()),{tree:P,chartOptions:I,graph:R,nodeHover:H,nodeSelected:U,selectedNode:W,selectNode:te,buildGraph:ne}=Tt({data:[],tree:M,nameKey:`id`,sizeKey:`duration`,rootText:`Project`,graphOptions:{onClick(e){e&&(H.value=e),W.value=e?.meta},onHover(e){e&&(H.value=e),e===null&&(H.value=void 0)},onLeave(){H.value=void 0},onSelect(e){U.value=e||P.value.root,W.value=e?.meta},getSubtext(e){return q(e.size,!0)}},onUpdate(){R.value=new ie(P.value.root,I.value)}});return C(()=>J.value.pluginDetailsViewType,()=>{ne()}),(r,i)=>{let o=V,m=dt,h=ge,C=le;return f(),u(_,null,[s(p)?(f(),t(o,{key:0})):s(c)?.calls?.length?(f(),u(`div`,Et,[v(se,{class:`absolute right-2 top-1.5`,onClick:i[0]||=e=>a(`close`)}),l(`div`,Dt,[l(`div`,Ot,[v(Z,{name:s(c)?.plugin_name},null,8,[`name`])]),l(`div`,kt,[v(X,{duration:w.value,class:`flex gap-1 items-center`,title:`Resolve Id hooks cost: ${s(q)(w.value,!0)}`},{default:y(()=>[...i[3]||=[l(`span`,{class:`i-ph-magnifying-glass-duotone inline-block`},null,-1)]]),_:1},8,[`duration`,`title`]),v(X,{duration:b.value,class:`flex gap-1 items-center`,title:`Load hooks cost: ${s(q)(b.value,!0)}`},{default:y(()=>[...i[4]||=[l(`span`,{class:`i-ph-upload-simple-duotone inline-block`},null,-1)]]),_:1},8,[`duration`,`title`]),v(X,{duration:x.value,class:`flex gap-1 items-center`,title:`Transform hooks cost: ${s(q)(x.value,!0)}`},{default:y(()=>[...i[5]||=[l(`span`,{class:`i-ph-magic-wand-duotone inline-block`},null,-1)]]),_:1},8,[`duration`,`title`]),i[7]||=l(`span`,{class:`op40`},`|`,-1),v(X,{duration:O.value,class:`flex gap-1 items-center`,title:`Total build cost: ${s(q)(O.value,!0)}`},{default:y(()=>[...i[6]||=[l(`span`,{class:`i-ph-clock-duotone inline-block`},null,-1)]]),_:1},8,[`duration`,`title`]),i[8]||=l(`span`,{class:`op40`},`|`,-1),v($,{number:g.value.length,icon:`i-catppuccin-java-class-abstract`,color:`transparent color-scale-neutral`,title:`Module processed: ${g.value.length}`},null,8,[`number`,`title`]),i[9]||=l(`span`,{class:`op40`},`|`,-1),v($,{number:s(c)?.calls?.length??0,icon:`i-ph-arrow-counter-clockwise`,color:`transparent color-scale-neutral`,title:`Total calls: ${s(c)?.calls?.length??0}`},null,8,[`number`,`title`])]),l(`div`,At,[l(`button`,{class:d([s(J).pluginDetailsViewType===`flow`?`text-primary`:``,`flex gap-2 items-center justify-center px2 py1 w-40 border border-base rounded-lg hover:bg-active`]),onClick:i[1]||=e=>s(J).pluginDetailsViewType=`flow`},[...i[10]||=[l(`div`,{class:`i-ph-git-branch-duotone rotate-180`},null,-1),e(` Build Flow `,-1)]],2),l(`button`,{class:d([s(J).pluginDetailsViewType===`sunburst`?`text-primary`:``,`flex gap-2 items-center justify-center px2 py1 w-40 border border-base rounded-lg hover:bg-active`]),onClick:i[2]||=e=>s(J).pluginDetailsViewType=`sunburst`},[...i[11]||=[l(`div`,{"i-ph-chart-sunburst-duotone":``},null,-1),e(` Sunburst `,-1)]],2)])]),l(`div`,jt,[s(J).pluginDetailsViewType===`flow`?(f(),t(m,{key:0,modules:n.modules,"build-metrics":s(c),root:n.root},null,8,[`modules`,`build-metrics`,`root`])):E(``,!0),s(J).pluginDetailsViewType===`sunburst`&&s(R)?(f(),t(wt,{key:1,graph:s(R),selected:s(U),onSelect:s(te)},{module:y(({child:e})=>[v(h,{id:e.text,class:`w-full border-none ws-nowrap hover:bg-active border border-base rounded block px2 py1`,cwd:n.root,link:ee(e.meta?.graphModuleId)},null,8,[`id`,`cwd`,`link`])]),_:1},8,[`graph`,`selected`,`onSelect`])):E(``,!0)])])):(f(),u(`div`,Mt,[...i[12]||=[l(`span`,{class:`italic op50`},` No data `,-1)]])),v(C,{"hover-x":N.x,"hover-y":N.y},{default:y(()=>[s(H)?(f(),u(`div`,Nt,[s(H).meta?.title?(f(),u(`div`,Pt,[e(S(s(H).meta.title)+` `,1),v(X,{duration:s(H).meta.duration},null,8,[`duration`])])):(f(),u(_,{key:1},[s(H).meta?.module?(f(),u(`div`,Ft,[v(h,{id:s(H).meta.module,cwd:n.root,link:!1},null,8,[`id`,`cwd`])])):E(``,!0),s(H).meta?.module?(f(),u(`div`,It,[l(`div`,Lt,[i[13]||=l(`label`,{class:`text-xs opacity-70`},`Start Time`,-1),l(`time`,{datetime:new Date(s(H).meta.timestamp_start).toISOString(),class:`font-mono text-xs px1.5 py0.5 rounded`,bg:`base/10`},S(s(Q)(s(H).meta.timestamp_start)),9,Rt)]),l(`div`,zt,[i[14]||=l(`label`,{class:`text-xs opacity-70`},`End Time`,-1),l(`time`,{datetime:new Date(s(H).meta.timestamp_end).toISOString(),class:`font-mono text-xs px1.5 py0.5 rounded`,bg:`base/10`},S(s(Q)(s(H).meta.timestamp_end)),9,Bt)]),l(`div`,Vt,[i[15]||=l(`label`,{class:`text-xs op70`},`Duration`,-1),v(X,{duration:s(H).meta.duration},null,8,[`duration`])])])):(f(),u(`div`,Ht,[v(X,{duration:s(H).meta?.duration},null,8,[`duration`])]))],64))])):E(``,!0)]),_:1},8,[`hover-x`,`hover-y`])],64)}}}),{__name:`DataPluginDetailsLoader`}),Wt={class:`flex flex-col gap-2 p4`},Gt={class:`flex pb2`},Kt={class:`w-8 text-right text-xs op50`},qt={class:`overflow-hidden text-ellipsis break-all line-clamp-2`},Jt=o({__name:`PluginsFlatList`,props:{plugins:{},itemSize:{},pageMode:{type:Boolean,default:!0},scroller:{default:`dynamic`}},setup(e){let t=A();return(n,r)=>(f(),u(`div`,Wt,[v(ae,{items:e.plugins,"key-prop":`plugin_id`,"item-size":e.itemSize,"page-mode":e.pageMode,scroller:e.scroller},{default:y(({item:e})=>[l(`div`,Gt,[v(s(k),{to:{path:s(t).path,query:{plugin:e.plugin_id}},class:`font-mono border rounded border-base w-full px2 py1 text-sm hover:bg-active flex gap-4 items-center`},{default:y(()=>[l(`div`,Kt,` #`+S(e.plugin_id),1),l(`span`,qt,[v(Z,{name:e.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`,`item-size`,`page-mode`,`scroller`])]))}}),Yt={key:1,class:`h-full flex flex-col gap-3 items-center justify-center p8 text-center`},Xt={class:`font-mono text-sm max-w-180 ws-pre-wrap`},Zt={key:2,class:`relative min-h-screen`},Qt={class:`sticky left-4 right-4 top-4 z-panel-nav p-4`},$t={class:`fixed bottom-4 py-1 px-2 bg-glass left-1/2 translate-x--1/2 border border-base rounded-full text-center text-xs`},en={class:`op50`},tn=o({__name:`plugins`,setup(r){let i=F(),a=A(),o=ee(),s=n(null),c=n([]),d=m(!0),p=m(null),h=D(()=>typeof a.query.plugin==`string`?a.query.plugin:void 0),g=m({search:a.query.search||``,selected:a.query.plugin_types?G(a.query.plugin_types):null}),_=D(()=>s.value?.instances[0]),y=D(()=>_.value?.environments[0]||``),b=D(()=>_.value?.root||``),C=D(()=>!_.value?.vite||!y.value?null:{vite:_.value.vite,env:y.value}),w=D(()=>_.value?.plugins.map((e,t)=>z(e,t))??[]),T=D(()=>[...te.filter(e=>w.value.some(t=>e.match.test(t.name))),re]),k=D(()=>{let e=w.value;return g.value.selected&&(e=e.filter(e=>{let t=ce(e.name);return g.value.selected.includes(t.name)})),e}),M=I(()=>k.value,()=>new fe(k.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),P=D(()=>g.value.search?M.value.search(g.value.search).map(e=>e.item):k.value);N(g.value,e=>{o.replace({query:K({...a.query,search:e.search||void 0,plugin_types:e.selected||void 0})})},{debounce:500});function z(e,t){let n=e&&typeof e==`object`?e:{};return{plugin_id:t,name:typeof n.name==`string`?n.name:`plugin-${t}`,enforce:n.enforce===`pre`||n.enforce===`post`?n.enforce:void 0}}function B(){h.value&&o.replace({query:{...a.query,plugin:void 0}})}async function H(e={}){e.silent||(d.value=!0),p.value=null;try{s.value=await i.value.call(`vite:inspect:get-metadata`),C.value?c.value=(await i.value.call(`vite:inspect:get-modules-list`,C.value)).map(W):c.value=[]}catch(e){p.value=e}finally{e.silent||(d.value=!1)}}let U=j(()=>{H({silent:!0})},100);function W(e){return{...e,imports:e.deps.map(e=>({module_id:e}))}}function G(e){return Array.isArray(e)?e.map(String):[String(e)]}function K(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}return x(()=>{H()}),L(()=>{U()}),R(`Escape`,e=>{e.preventDefault(),e.isTrusted&&!e.repeat&&B()}),(n,r)=>{let i=V,a=Ut;return d.value?(f(),t(i,{key:0,text:`Loading plugins...`})):p.value?(f(),u(`div`,Yt,[r[3]||=l(`div`,{class:`i-ph-warning-duotone text-4xl text-amber`},null,-1),l(`div`,Xt,S(p.value.message),1),l(`button`,{class:`btn-action`,onClick:r[0]||=e=>H()},[...r[2]||=[l(`span`,{class:`i-ph-arrow-clockwise-duotone`},null,-1),e(` Retry `,-1)]])])):(f(),u(`div`,Zt,[l(`div`,Qt,[v(ue,{modelValue:g.value,"onUpdate:modelValue":r[1]||=e=>g.value=e,rules:T.value},null,8,[`modelValue`,`rules`])]),v(Jt,{plugins:P.value??[],scroller:`window`},null,8,[`plugins`]),l(`div`,$t,[l(`span`,en,S(P.value.length)+` of `+S(w.value.length||0),1)]),h.value&&C.value?(f(),u(`div`,{key:0,class:`fixed inset-0 backdrop-blur-8 backdrop-brightness-95 z-panel-content`,onClick:O(B,[`self`])},[(f(),u(`div`,{key:h.value,class:`fixed right-0 bottom-0 top-20 left-20 z-panel-content bg-glass border-l border-t border-base rounded-tl-xl`},[v(a,{plugin:h.value,query:C.value,modules:c.value,root:b.value,onClose:B},null,8,[`plugin`,`query`,`modules`,`root`])]))])):E(``,!0)]))}}});export{tn as default};