@vitejs/devtools-vite 0.0.0-alpha.1 → 0.0.0-alpha.11

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 (89) hide show
  1. package/dist/{dirs-Z7VQHyIZ.js → dirs-K_XnRVOr.js} +1 -1
  2. package/dist/dirs.js +1 -1
  3. package/dist/index.d.ts +67 -28
  4. package/dist/index.js +137 -81
  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/17ealR8P.js +1 -0
  9. package/dist/public/_nuxt/2OALqkc2.js +1 -0
  10. package/dist/public/_nuxt/AuXMpmu_.js +1 -0
  11. package/dist/public/_nuxt/B-LCQpq9.js +2 -0
  12. package/dist/public/_nuxt/B-MkobAt.js +1 -0
  13. package/dist/public/_nuxt/BEtueeHN.js +1 -0
  14. package/dist/public/_nuxt/BFwdTbGt.js +1 -0
  15. package/dist/public/_nuxt/BQPGP7j8.js +1 -0
  16. package/dist/public/_nuxt/B_mZ82Ef.js +1 -0
  17. package/dist/public/_nuxt/Bs1eUuZt.js +1 -0
  18. package/dist/public/_nuxt/C2Zn9dj_.js +1 -0
  19. package/dist/public/_nuxt/CBa98m2O.js +33 -0
  20. package/dist/public/_nuxt/CIZ7KSXz.js +1 -0
  21. package/dist/public/_nuxt/CRsFizRX.js +1 -0
  22. package/dist/public/_nuxt/CbzAqNxs.js +1 -0
  23. package/dist/public/_nuxt/ChaI2u-J.js +1 -0
  24. package/dist/public/_nuxt/CmZYssbg.js +1 -0
  25. package/dist/public/_nuxt/Cnct9GAr.js +1 -0
  26. package/dist/public/_nuxt/Cq2KqeQT.js +1 -0
  27. package/dist/public/_nuxt/Cql2HFZJ.js +1 -0
  28. package/dist/public/_nuxt/D-ZnEyqr.js +1 -0
  29. package/dist/public/_nuxt/D2Zr4_9a.js +1 -0
  30. package/dist/public/_nuxt/{BQ-NBLhA.js → DL1ysgP5.js} +1 -1
  31. package/dist/public/_nuxt/DQtLZa7C.js +1 -0
  32. package/dist/public/_nuxt/DcamI1aQ.js +1 -0
  33. package/dist/public/_nuxt/DqBpHZ7Y.js +11 -0
  34. package/dist/public/_nuxt/HzvsUJ0F.js +1 -0
  35. package/dist/public/_nuxt/Jdu9jmuG.js +1 -0
  36. package/dist/public/_nuxt/{IrMnfQaU.js → LMGHh3hZ.js} +1 -1
  37. package/dist/public/_nuxt/{BdGMcGSQ.js → SO3ppn9m.js} +1 -1
  38. package/dist/public/_nuxt/X7aOo9pb.js +1 -0
  39. package/dist/public/_nuxt/_hSlj5r4.js +1 -0
  40. package/dist/public/_nuxt/builds/latest.json +1 -1
  41. package/dist/public/_nuxt/builds/meta/1a94e2d7-5f0c-42d1-b6c2-f70865b42be5.json +1 -0
  42. package/dist/public/_nuxt/diff.worker-DCsgdfuV.js +10 -0
  43. package/dist/public/_nuxt/entry.BkLl46Cr.css +1 -0
  44. package/dist/public/_nuxt/error-404.CCdr3eE4.css +1 -0
  45. package/dist/public/_nuxt/error-500.D-vBsHK_.css +1 -0
  46. package/dist/public/_nuxt/lxg2Cb0s.js +1 -0
  47. package/dist/public/_nuxt/mIZU4Om9.js +1 -0
  48. package/dist/public/_nuxt/qkzn-X0p.js +1 -0
  49. package/dist/public/_nuxt/vzoJapJG.js +1 -0
  50. package/dist/public/index.html +1 -1
  51. package/package.json +16 -16
  52. package/dist/public/_nuxt/B1Vd6rqS.js +0 -1
  53. package/dist/public/_nuxt/B2YLpys2.js +0 -1
  54. package/dist/public/_nuxt/B2fBtupD.js +0 -1
  55. package/dist/public/_nuxt/BBRXmiYk.js +0 -1
  56. package/dist/public/_nuxt/BL9XEsp7.js +0 -1
  57. package/dist/public/_nuxt/BO9hKuA-.js +0 -1
  58. package/dist/public/_nuxt/BcAccMwu.js +0 -1
  59. package/dist/public/_nuxt/BdSZoQls.js +0 -1
  60. package/dist/public/_nuxt/BjbaCuBE.js +0 -1
  61. package/dist/public/_nuxt/Bjr51Ks8.js +0 -1
  62. package/dist/public/_nuxt/BvuqupwD.js +0 -1
  63. package/dist/public/_nuxt/C2X_oPur.js +0 -1
  64. package/dist/public/_nuxt/C5J04JCq.js +0 -1
  65. package/dist/public/_nuxt/CQNn9qP2.js +0 -1
  66. package/dist/public/_nuxt/CS0-317H.js +0 -1
  67. package/dist/public/_nuxt/CciM0jEL.js +0 -1
  68. package/dist/public/_nuxt/CcwEApAr.js +0 -1
  69. package/dist/public/_nuxt/Ci9NHG69.js +0 -1
  70. package/dist/public/_nuxt/D1yk44lc.js +0 -1
  71. package/dist/public/_nuxt/DKn-LAPX.js +0 -11
  72. package/dist/public/_nuxt/DS2MKblJ.js +0 -1
  73. package/dist/public/_nuxt/DSjlpmm-.js +0 -1
  74. package/dist/public/_nuxt/DZeYNBxL.js +0 -1
  75. package/dist/public/_nuxt/D_Sk_I-u.js +0 -1
  76. package/dist/public/_nuxt/Dl8iHwQo.js +0 -2
  77. package/dist/public/_nuxt/Z5tyTJaP.js +0 -1
  78. package/dist/public/_nuxt/builds/meta/6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f.json +0 -1
  79. package/dist/public/_nuxt/cRQbgMUp.js +0 -1
  80. package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +0 -10
  81. package/dist/public/_nuxt/entry.Dufqy7qJ.css +0 -1
  82. package/dist/public/_nuxt/error-404.yUUAZDjV.css +0 -1
  83. package/dist/public/_nuxt/error-500.BHZzZRS-.css +0 -1
  84. package/dist/public/_nuxt/pXptjyzi.js +0 -1
  85. package/dist/public/_nuxt/rwBDQBzn.js +0 -1
  86. package/dist/public/_nuxt/tS5wJZMm.js +0 -1
  87. package/dist/public/_nuxt/yfNgynAH.js +0 -33
  88. package/dist/public/_nuxt/z9pSC1xM.js +0 -1
  89. /package/dist/public/_nuxt/{l47FwQA-.js → D03ETnho.js} +0 -0
@@ -0,0 +1 @@
1
+ import{Tt as e,Vt as t,W as n,c as r,ct as i,en as a,ft as o,in as s,it as c,kt as l,lt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,xt as v,y}from"#entry";import{t as b}from"./Jdu9jmuG.js";import"./DQtLZa7C.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as x}from"./DL1ysgP5.js";import{t as S}from"./Cql2HFZJ.js";import"./Bs1eUuZt.js";import{t as C}from"./CRsFizRX.js";import{t as w}from"./LMGHh3hZ.js";import{t as T}from"./DcamI1aQ.js";var E={op50:``,"font-mono":``,w12:``},D=[`title`],O={flex:`~ gap-1 items-center`},k=d({__name:`Graph`,props:{session:{},chunks:{}},setup(r){let c=r,l=f(()=>c.chunks),d=n();return w({modules:l,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:r,tree:i,hierarchy:o,collapsedNodes:s,container:c,modulesMap:u,nodes:d,links:f,nodesMap:p,linksMap:m,width:h,height:g,childToParentMap:_}=e;return()=>{h.value=window.innerWidth,g.value=window.innerHeight;let e=l.value.filter(e=>e.reason===`entry`),y=new Set,b=o({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{y.add(e),t.value&&_.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!s.has(e.id),hasChildren:!1}))):s.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=u.value.get(`${e.chunk_id}`);if(!(!r||y.has(r)))return t.value&&_.set(r.id,n.module.id),y.add(r),{module:r,expanded:!s.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,i().nodeSize([a(r.height),a(r.width)+a(r.gap)])(b);let x=b.descendants();for(let e of x)[e.x,e.y]=[e.y-a(r.width),e.x];let S=Math.min(...x.map(e=>e.x)),C=Math.min(...x.map(e=>e.y));if(S<a(r.margin))for(let e of x)e.x+=Math.abs(S)+a(r.margin);if(C<a(r.margin))for(let e of x)e.y+=Math.abs(C)+a(r.margin);d.value=x,p.clear();for(let e of x)p.set(`${e.data.module.id}`,e);let w=b.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),T=l.value.flatMap(e=>e.imports.filter(t=>!w.find(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:p.get(`${e.chunk_id}`),target:p.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),E=[...w,...T];m.clear();for(let e of E)m.set(e.id,e);f.value=E,v(()=>{h.value=c.value.scrollWidth/n.value+a(r.margin),g.value=c.value.scrollHeight/n.value+a(r.margin)})}}}),(n,c)=>{let f=x,h=b,g=T;return e(),i(g,{session:r.session,modules:l.value,"expand-controls":!1},{default:t(({node:n})=>[p(h,{class:`flex items-center`,to:{path:a(d).path,query:{chunk:n.data.module.chunk_id}}},{default:t(()=>[m(`span`,E,`#`+s(n.data.module.id),1),m(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${n.data.module.id}`},[m(`div`,null,s(n.data.module.name||`[unnamed]`),1),p(f,{text:n.data.module.reason},null,8,[`text`]),n.data.module.is_initial?(e(),i(f,{key:0,text:`initial`})):u(``,!0)],8,D),c[1]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,O,[c[0]||=m(`div`,{"i-ph-package-duotone":``},null,-1),o(` `+s(n.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),A=Object.assign(k,{__name:`ChunksGraph`}),j={key:1,relative:``,"max-h-screen":``,"of-hidden":``},M={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},N={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},P=[`onClick`],F={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},I=d({__name:`chunks`,props:{session:{}},setup(t){let n=t,d=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],p=y(),{state:v,isLoading:b}=r(async()=>await p.value[`vite:rolldown:get-chunks-graph`]?.({session:n.session.id}),null),x=f(()=>v.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function w(e){S.value.chunkViewType=e}return(n,r)=>{let f=_,p=C,y=A;return a(b)?(e(),i(f,{key:0})):(e(),g(`div`,j,[m(`div`,M,[m(`div`,N,[r[0]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(e(),g(c,null,l(d,e=>m(`button`,{key:e.value,"btn-action":``,class:h(a(S).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>w(e.value)},[m(`div`,{class:h(e.icon)},null,2),o(` `+s(e.label),1)],10,P)),64))])]),a(S).chunkViewType===`list`?(e(),g(`div`,F,[(e(!0),g(c,null,l(a(v),n=>(e(),i(p,{key:n.id,border:`~ base rounded-lg`,p3:``,chunk:n,chunks:a(v),session:t.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):a(S).chunkViewType===`graph`?(e(),i(y,{key:1,session:t.session,chunks:x.value},null,8,[`session`,`chunks`])):u(``,!0)]))}}});export{I as default};
@@ -0,0 +1 @@
1
+ import{A as e,At as t,D as n,F as r,Jt as i,Lt as a,M as o,N as s,O as c,P as l,Qt as u,Rt as d,Tt as f,Xt as p,at as m,ct as h,en as g,in as _,it as v,j as y,k as b,kt as ee,lt as te,mt as ne,ot as x,rn as re,st as S,t as C,ut as w,wt as ie,xt as ae}from"#entry";import{t as T}from"./DQtLZa7C.js";import{t as oe}from"./Cql2HFZJ.js";function E(){return typeof window<`u`}function D(e){return se(e)?(e.nodeName||``).toLowerCase():`#document`}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function k(e){return((se(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function se(e){return E()?e instanceof Node||e instanceof O(e).Node:!1}function A(e){return E()?e instanceof Element||e instanceof O(e).Element:!1}function j(e){return E()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function ce(e){return!E()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}var le=new Set([`inline`,`contents`]);function M(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=I(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!le.has(i)}var ue=new Set([`table`,`td`,`th`]);function de(e){return ue.has(D(e))}var fe=[`:popover-open`,`:modal`];function N(e){return fe.some(t=>{try{return e.matches(t)}catch{return!1}})}var pe=[`transform`,`translate`,`scale`,`rotate`,`perspective`],me=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],he=[`paint`,`layout`,`strict`,`content`];function ge(e){let t=P(),n=A(e)?I(e):e;return pe.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||me.some(e=>(n.willChange||``).includes(e))||he.some(e=>(n.contain||``).includes(e))}function _e(e){let t=R(e);for(;j(t)&&!F(t);){if(ge(t))return t;if(N(t))return null;t=R(t)}return null}function P(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var ve=new Set([`html`,`body`,`#document`]);function F(e){return ve.has(D(e))}function I(e){return O(e).getComputedStyle(e)}function L(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R(e){if(D(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ce(e)&&e.host||k(e);return ce(t)?t.host:t}function ye(e){let t=R(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&M(t)?t:ye(t)}function be(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ye(e),i=r===e.ownerDocument?.body,a=O(r);if(i){let e=xe(a);return t.concat(a,a.visualViewport||[],M(r)?r:[],e&&n?be(e):[])}return t.concat(r,be(r,[],n))}function xe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Se(e){let t=I(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,a=j(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:i,c=r(n)!==o||r(i)!==s;return c&&(n=o,i=s),{width:n,height:i,$:c}}function Ce(e){return A(e)?e:e.contextElement}function z(e){let t=Ce(e);if(!j(t))return y(1);let n=t.getBoundingClientRect(),{width:i,height:a,$:o}=Se(t),s=(o?r(n.width):n.width)/i,c=(o?r(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var we=y(0);function Te(e){let t=O(e);return!P()||!t.visualViewport?we:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ee(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==O(e)?!1:t}function B(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ce(e),o=y(1);t&&(r?A(r)&&(o=z(r)):o=z(e));let s=Ee(a,n,r)?Te(a):y(0),c=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a){let e=O(a),t=r&&A(r)?O(r):r,n=e,i=xe(n);for(;i&&r&&t!==n;){let e=z(i),t=i.getBoundingClientRect(),r=I(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=a,u+=o,n=O(i),i=xe(n)}}return l({width:d,height:f,x:c,y:u})}function V(e,t){let n=L(e).scrollLeft;return t?t.left+n:B(k(e)).left+n}function De(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-V(e,n),y:n.top+t.scrollTop}}function Oe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=k(r),s=t?N(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=y(1),u=y(0),d=j(r);if((d||!d&&!a)&&((D(r)!==`body`||M(o))&&(c=L(r)),j(r))){let e=B(r);l=z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?De(o,c):y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ke(e){return Array.from(e.getClientRects())}function Ae(e){let t=k(e),n=L(e),r=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+V(e),c=-n.scrollTop;return I(r).direction===`rtl`&&(s+=o(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:c}}var je=25;function Me(e,t){let n=O(e),r=k(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=P();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=V(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=je&&(a-=o)}else l<=je&&(a+=l);return{width:a,height:o,x:s,y:c}}var Ne=new Set([`absolute`,`fixed`]);function Pe(e,t){let n=B(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=j(e)?z(e):y(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Fe(e,t,n){let r;if(t===`viewport`)r=Me(e,n);else if(t===`document`)r=Ae(k(e));else if(A(t))r=Pe(t,n);else{let n=Te(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return l(r)}function Ie(e,t){let n=R(e);return n===t||!A(n)||F(n)?!1:I(n).position===`fixed`||Ie(n,t)}function Le(e,t){let n=t.get(e);if(n)return n;let r=be(e,[],!1).filter(e=>A(e)&&D(e)!==`body`),i=null,a=I(e).position===`fixed`,o=a?R(e):e;for(;A(o)&&!F(o);){let t=I(o),n=ge(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ne.has(i.position)||M(o)&&!n&&Ie(e,o))?r=r.filter(e=>e!==o):i=t,o=R(o)}return t.set(e,r),r}function Re(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?N(t)?[]:Le(t,this._c):[].concat(n),r],c=a[0],l=a.reduce((e,n)=>{let r=Fe(t,n,i);return e.top=o(r.top,e.top),e.right=s(r.right,e.right),e.bottom=s(r.bottom,e.bottom),e.left=o(r.left,e.left),e},Fe(t,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ze(e){let{width:t,height:n}=Se(e);return{width:t,height:n}}function Be(e,t,n){let r=j(t),i=k(t),a=n===`fixed`,o=B(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=y(0);function l(){c.x=V(i)}if(r||!r&&!a)if((D(t)!==`body`||M(i))&&(s=L(t)),r){let e=B(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?De(i,s):y(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Ve(e){return I(e).position===`static`}function He(e,t){if(!j(e)||I(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return k(e)===n&&(n=n.ownerDocument.body),n}function Ue(e,t){let n=O(e);if(N(e))return n;if(!j(e)){let t=R(e);for(;t&&!F(t);){if(A(t)&&!Ve(t))return t;t=R(t)}return n}let r=He(e,t);for(;r&&de(r)&&Ve(r);)r=He(r,t);return r&&F(r)&&Ve(r)&&!ge(r)?n:r||_e(e)||n}var We=async function(e){let t=this.getOffsetParent||Ue,n=this.getDimensions,r=await n(e.floating);return{reference:Be(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ge(e){return I(e).direction===`rtl`}var Ke={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:k,getClippingRect:Re,getOffsetParent:Ue,getElementRects:We,getClientRects:ke,getDimensions:ze,getScale:z,isElement:A,isRTL:Ge},qe=b,Je=e,Ye=c,Xe=(e,t,r)=>{let i=new Map,a={platform:Ke,...r},o={...a.platform,_c:i};return n(e,t,{...a,platform:o})},Ze=ne({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:n,hoverY:r}=u(e),o=a(`hoverElement`),s=i(0),c=i(0);return d([n,r],([e,t])=>{Xe({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},o.value,{placement:`right-start`,middleware:[Ye(),Je(),qe({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{s.value=e,c.value=t})}),(e,n)=>(f(),h(m,{to:`body`},[S(`div`,{ref_key:`hoverElement`,ref:o,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:re({left:`${s.value}px`,top:`${c.value}px`})},[t(e.$slots,`default`)],4)]))}}),Qe=Object.assign(Ze,{__name:`DisplayGraphHoverView`});function $e(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var et,tt,nt,H,U,W=1,rt;function it(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(et!==t||tt!==a||nt!==i){let n=Math.round(64*a)/64;W=i,W=Math.log2(W),W-=Math.floor(W);let r=W,o=Math.min(1,8*r);W=2**W;let s=8*Math.SQRT2/W;et=t,tt=a,nt=i,H||=document.createElement(`canvas`),U||=H.getContext(`2d`),H.width=H.height=Math.round(64*n),U.scale(n,n),U.fillStyle=e[0],U.fillRect(0,0,64,64),U.globalAlpha=.25,U.fillStyle=e[1],U.fillRect(0,0,64,64),U.globalAlpha=.67,U.strokeStyle=e[1],U.beginPath();for(let e=0;e<=64;e+=16)U.moveTo(e-32,e+32),U.lineTo(e+32,e-32);if(U.lineWidth=s*(1-(o-r)/2),U.stroke(),o+r>0){U.beginPath();for(let e=8;e<64;e+=16)U.moveTo(e-32,e+32),U.lineTo(e+32,e-32);U.lineWidth=s*(o+r)/2,U.stroke()}rt=t.createPattern(H,`repeat`),W/=n}return n/=64*W*a,n-=Math.floor(n),n*=64*W*a,rt.setTransform(new DOMMatrix([W,0,0,W,n,r])),rt}function at(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function ot(e){return t=>t.id&&e[t.id]||t.color}function st(e,t=1,n=1){let r={};return ct(r,e,0,Math.PI*2,t,n),ot(r)}function ct(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=$e(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;ct(e,s,n,t,i,a),n+=t}}var lt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function ut(e=16,t=lt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function dt(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=ut(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>dt(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function ft(e){return e.children.length===0?1:Math.max(...e.children.map(e=>ft(e)))+1}var pt=/\bFirefox\//.test(navigator.userAgent),mt;function ht(e){return mt?mt.format(e):`${e}`}function G(){return(window.performance||Date).now()}function gt(e){let t=e.toFixed(1).split(`.`,2);return`${ht(+t[0])}.${t[1]}`}function _t(e){return e===1?`1 byte`:e<1024?`${ht(e)} bytes`:e<1024*1024?`${gt(e/1024)} kb`:e<1024*1024*1024?`${gt(e/(1024*1024))} mb`:`${gt(e/(1024*1024*1024))} gb`}function vt(e,t,n,r,i,a){if(pt){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function yt(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function bt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{mt=new Intl.NumberFormat}catch{}var xt=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),K={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},St={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},Ct=46,wt=`14px sans-serif`,Tt=`bold ${wt}`,Et=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...K,...t};let{getColor:n=st(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...St,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=ft(e),this.disposables=[],this.events=xt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(wt),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(Ct)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},q=24,Dt=5,Ot=.01,kt=1e3,At=class extends Et{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(yt(e=>{let t=e.deltaX,n=e.deltaY,r=G(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(bt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(G()-this.animationStart)/(this.options.animateDuration??K.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??K.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*Ot),r=Math.min(this.totalBytes,r+e.size*Ot),this.setViewport(n,r,t)}}select(e,t=this.options.animate??K.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*q+1,this.zoomedOutMin=this.width-kt>>1,this.zoomedOutWidth=this.zoomedOutMin+kt,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+Dt,d=t+q/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=it(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,q,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(Tt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,q),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,q),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(wt),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+q,n,y,i&-2),n+=r.size;return i&1||vt(this.c,this.palette.stroke,o+.5,t+.5,l,q),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+q&&e.id)return e;if(r>=t+q)for(let r of e.children){let e=a(r,t+q,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=G():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function jt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function J(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;J(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var Mt={};function Nt(e){return Mt[e]||(Mt[e]=400*Math.log(1+Math.log(1+e/8))),Mt[e]}var Y=-Math.PI/2,Pt=class extends Et{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=Y;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(bt(()=>this.resize())),this.disposables.push(yt(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(Nt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(Tt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??_t(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=it(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(G()-this.animationStart)/(this.options.animateDuration??K.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=Y,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return Nt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=G()),jt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};J(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=Y,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(jt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:Y,sweepAngle_:Math.PI*2};J(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},X=4,Z=20,Ft=2*X,Q=Z+X;function $(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>Ft&&y>Q?$(t.children,g+X,_+Z,v-Ft,y-Q):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var It=class extends Et{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(yt(e=>this.updateHover(e))),this.disposables.push(bt(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=o*(30*e),this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(G()-this.animationStart)/(this.options.animateDuration??K.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=$([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=(r===this.hoveredNode?1:0)|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=it(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Z),this.c.fillRect(t,n+a-X,i,X),this.c.fillRect(t,n+Z,X,a-Q),this.c.fillRect(t+i-X,n+Z,X,a-Q)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(vt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Z){this.c.fillStyle=this.palette.text;let e=a-Ft,r=i+Math.round(Q/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>Q+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Z:Z/2+X;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-Q)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=$([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=G(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Lt={flex:`~ gap-1 items-center wrap`},Rt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},zt=[`onClick`],Bt=ne({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=x(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(f(),w(`div`,Lt,[(f(!0),w(v,null,ee(i.value,(e,t)=>(f(),w(v,{key:e.id},[t>0?(f(),w(`div`,Rt)):te(``,!0),S(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>r(`select`,e)},[S(`span`,null,_(e.text||e.id),1)],8,zt)],64))),128))]))}}),Vt=Object.assign(Bt,{__name:`ChartNavBreadcrumb`});function Ht(e){let{data:t,nameKey:n,sizeKey:r,rootText:a,nodeType:o,graphOptions:s,onUpdate:c}=e,l=p(void 0),u=p(void 0),f=i(void 0),m=p(void 0),h,_=x(()=>{if(e.tree)return e.tree.value;let i=g(t),s=new Map,c=0,l={id:`~root`,text:a,size:0,sizeSelf:0,children:[]};if(!i?.length)return{map:s,root:l,maxDepth:c};let u=[];u.unshift(()=>{l.size+=l.children.reduce((e,t)=>e+t.size,0),l.subtext=T(l.size).join(` `),l.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function d(e,t,n,r,i){if(s.has(t))return s.get(t);i>c&&(c=i);let a={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return s.set(t,a),r.children.push(a),u.unshift(()=>{let t=a.sizeSelf;a.size+=a.children.reduce((e,t)=>e+t.size,0),a.subtext=T(a.size).join(` `),a.children.length&&t/a.size>.1&&a.children.push({id:`${a.id}-self`,text:``,size:t,sizeSelf:t,subtext:T(t).join(` `),children:[],meta:{...e,path:``,type:o},parent:a}),a.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),a}function f(e){let t=e[n].split(`/`).filter(Boolean),i=l,a=``,c=0;t.forEach((l,u)=>{if(a+=(a?`/`:``)+l,c++,u===t.length-1){let t={id:e[n],text:l,size:e[r],sizeSelf:e[r],subtext:T(e[r]).join(` `),children:[],meta:{...e,path:l,type:o}};i.children.push(t),s.set(e[n],t)}else i=d(e,a,l,i,c)})}return i.forEach(f),u.forEach(e=>e()),{map:s,root:l,maxDepth:c}}),v=x(()=>({animate:oe.value.chartAnimation,palette:{stroke:C.value?`#222`:`#555`,fg:C.value?`#fff`:`#000`,bg:C.value?`#111`:`#fff`},getColor:st(_.value.root,C.value?.8:.9,C.value?1:1.1),getSubtext:e=>e.subtext,...s}));function y(e,t){f.value=e?.meta,e?.children.length||(e=e?.parent),m.value?.select(e,t)}function b(){h?.(),u.value=_.value.root,c?.(),ae(()=>{let e=f.value&&_.value.map.get(f.value[n])||null;e&&y(e,!1)}),h=()=>{m.value?.dispose(),m.value=void 0,f.value=void 0}}return ae(()=>{d(()=>[_.value,v.value],()=>{b()},{deep:!0,immediate:!1}),b()}),ie(()=>{h?.()}),{tree:_,graph:m,chartOptions:v,nodeHover:l,nodeSelected:u,selectedNode:f,selectNode:y,buildGraph:b}}export{It as a,Qe as c,Pt as i,Vt as n,at as o,At as r,dt as s,Ht as t};
@@ -0,0 +1 @@
1
+ import{Ct as e,Jt as t,Tt as n,Vt as r,W as i,bt as a,ct as o,ft as s,in as c,it as l,kt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,y as v}from"#entry";import{t as y}from"./Jdu9jmuG.js";import{t as b}from"./17ealR8P.js";import{t as x}from"./DQtLZa7C.js";var S=d({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,r=f(()=>t.previous===t.current),i=f(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(r.value?0:2)),a=f(()=>r.value?``:t.current>t.previous?`+`:`-`),o=f(()=>r.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(n(),g(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:h(o.value)},c(a.value)+c(i.value)+`% `,3))}}),C=Object.assign(S,{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=d({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=f(()=>t.format===`bytes`?x(t.current):t.current);return(t,i)=>{let a=C;return n(),g(l,null,[m(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[m(`div`,{class:h([e.icon,`text-xl`])},null,2),s(` `+c(e.name),1)],8,w),m(`div`,T,[e.format===`bytes`?(n(),g(`div`,E,[m(`span`,D,c(r.value[0]),1),m(`span`,O,c(r.value[1]),1)])):(n(),g(`div`,k,[m(`span`,A,c(r.value),1)])),p(a,{current:e.current,previous:e.previous},null,8,[`current`,`previous`])])],64)}}}),M=Object.assign(j,{__name:`CompareMetricCard`}),N={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},P={flex:`~ gap-2`},F={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},I={grid:`~ cols-4 gap5`,"w-full":``,pt3:``},L=d({__name:`index`,setup(c){let d=t(!1),x=i().params,S=v(),C=t([]);e(async()=>{d.value=!0,C.value=await S.value[`vite:rolldown:get-session-compare-summary`]({sessions:x.sessions.split(`,`)}),d.value=!1});let w=f(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),T=f(()=>{let[e,t]=w.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph-file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(e,t)=>{let i=_,c=y,f=b,v=M;return d.value?(n(),o(i,{key:0})):(n(),g(`div`,N,[m(`div`,P,[p(c,{"btn-action":``,to:{path:`/`}},{default:r(()=>[...t[0]||=[m(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),s(` Re-select Session `,-1)]]),_:1})]),m(`div`,F,[t[1]||=m(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),p(f,{sessions:w.value},null,8,[`sessions`]),m(`div`,I,[(n(!0),g(l,null,u(T.value,(e,t)=>(n(),g(`div`,{key:e.name,class:h(t<2?`col-span-2`:`col-span-1`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[p(v,a({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{L as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"#entry";var t;(class{static#e=t=Symbol.toStringTag;constructor(){this[t]=`MaybeWeakMap`,this._map=new Map,this._weakMap=new WeakMap}delete(e){return this._weakMap.has(e)?this._weakMap.delete(e):this._map.delete(e)}has(e){return this._weakMap.has(e)?!0:this._map.has(e)}set(e,t){return this._weakMap.has(e)?this._weakMap.set(e,t):this._map.set(e,t),this}get(e){return this._weakMap.has(e)?this._weakMap.get(e):this._map.get(e)}clear(){this._map.clear()}});var n=class{constructor(e){this.length=e,this._mapTree=new Map}_getLastMap(e){let t=this._mapTree;for(let n of e.slice(0,-1))t.has(n)||t.set(n,new Map),t=t.get(n);return t}set(e,t){if(e.length!==this.length)throw Error(`Expect tuple of length ${this.length}, got ${e.length}`);return this._getLastMap(e).set(e[e.length-1],t),this}get(e){return this._getLastMap(e).get(e[e.length-1])}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e[e.length-1])}get size(){return this._mapTree.size}*_traverseMap(){function*e(t,n,r){if(r===0)yield{keys:n,map:t};else for(let[i,a]of t.entries())yield*e(a,[...n,i],r-1)}yield*e(this._mapTree,[],this.length)}},r=class{constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,t){let r=e.length,i=this._lengthMap.get(r);return i||(i=new n(r),this._lengthMap.set(r,i)),i.set(e,t),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function i(e){let t=new r,n=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return n.cache=t,n}const a=[{match:/[\\/]node_modules[\\/]/i,name:`node_modules`,description:`Node Modules`,icon:`i-catppuccin-npm`},{match:/virtual:|^\0/,name:`virtual`,description:`Virtual`,icon:`i-catppuccin-symlink`},{match:/^@?[\w-]+\/?/,name:`package`,description:`Package`,icon:`i-catppuccin-java-class-abstract`},{match:/\.vue$/i,name:`vue`,description:`Vue`,icon:`i-catppuccin-vue`},{match:/\.[cm]?[tj]sx$/i,name:`jsx`,description:`JavaScript React`,icon:`i-catppuccin-javascript-react`},{match:/\.[cm]?ts$/i,name:`ts`,description:`TypeScript`,icon:`i-catppuccin-typescript`},{match:/\.[cm]?js$/i,name:`js`,description:`JavaScript`,icon:`i-catppuccin-javascript`},{match:/\.svelte$/i,name:`svelte`,description:`Svelte`,icon:`i-catppuccin-svelte`},{match:/\.mdx$/i,name:`mdx`,description:`MDX`,icon:`i-catppuccin-mdx`},{match:/\.md$/i,name:`md`,description:`Markdown`,icon:`i-catppuccin-markdown`},{match:/\.astro$/i,name:`astro`,description:`Astro`,icon:`i-catppuccin-astro`},{match:/\.angular$/i,name:`angular`,description:`Angular`,icon:`i-catppuccin-angular`},{match:/\.html?$/i,name:`html`,description:`HTML`,icon:`i-catppuccin-html`},{match:/\.(css|scss|less|postcss)$/i,name:`css`,description:`CSS`,icon:`i-catppuccin-css`},{match:/\.json[c5]?$/i,name:`json`,description:`JSON`,icon:`i-catppuccin-json`},{match:/\.(yaml|yml)$/i,name:`yaml`,description:`YAML`,icon:`i-catppuccin-yaml`},{match:/\.toml$/i,name:`toml`,description:`TOML`,icon:`i-catppuccin-toml`},{match:/\.svg$/i,name:`svg`,description:`SVG`,icon:`i-catppuccin-svg`}],o=[{match:/^(replace|define|alias)$/,name:`rollup`,description:`Rollup`,icon:`i-catppuccin-rollup`},{match:/^vite:/i,name:`vite`,description:`Vite`,icon:`i-catppuccin-vite`},{match:/^unocss:/i,name:`unocss`,description:`Unocss`,icon:`i-catppuccin-unocss`},{match:/^nuxt:/i,name:`nuxt`,description:`Nuxt`,icon:`i-catppuccin-nuxt`},{match:/^builtin:/i,name:`builtin`,description:`Builtin`,icon:`i-catppuccin-folder-prisma`}],s={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},c={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function l(e){return a.find(t=>t.name===e)??s}const u=i(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of a)if(t.match.test(e))return t;return s}),d=i(e=>{for(let t of o)if(t.match.test(e))return t;return c});function f(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return p(n%360,t)}function p(t,n=1){return`hsla(${t}, ${e.value?50:65}%, ${e.value?60:40}%, ${n})`}const m={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,virtual:160,nuxt:140};function h(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in m){let n=m[e];return typeof n==`number`?p(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return f(e,t)}export{a,l as c,c as i,d as l,p as n,o,h as r,u as s,f as t,i as u};
@@ -0,0 +1 @@
1
+ import{At as e,Tt as t,ft as n,in as r,lt as i,mt as a,ot as o,tn as s,ut as c}from"#entry";var l=a({__name:`NumberBadge`,props:{number:{},color:{default:`badge-color-gray op75`},icon:{},prefix:{},suffix:{},format:{default:`locale`}},setup(a){let l=a,u=o(()=>l.format===`percent`?Number(l.number).toLocaleString(void 0,{style:`percent`,minimumFractionDigits:2,maximumFractionDigits:2}):Number(l.number).toLocaleString());return(o,l)=>(t(),c(`div`,{class:s([a.color,`px-0.4em py-0.2em font-mono line-height-none flex items-center`])},[a.icon?(t(),c(`div`,{key:0,class:s([a.icon,`mr-1`])},null,2)):i(``,!0),n(` `+r(a.prefix||``)+r(u.value)+r(a.suffix||``)+` `,1),e(o.$slots,`after`)],2))}}),u=Object.assign(l,{__name:`DisplayNumberBadge`});export{u as t};
@@ -0,0 +1 @@
1
+ import{E as e,Tt as t,Vt as n,W as r,c as i,ct as a,en as o,in as s,it as c,kt as l,lt as u,mt as d,pt as f,st as p,ut as m,x as h,y as g}from"#entry";import"./Jdu9jmuG.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as _,t as v}from"./DL1ysgP5.js";import{t as y}from"./CbzAqNxs.js";import{t as b}from"./CIZ7KSXz.js";var x={key:0},S={key:2},C={op50:``},w={key:3},T=[`textContent`],E=[`textContent`],D=d({__name:`RawEventsTable`,props:{events:{},fields:{default:()=>[`event_id`,`action`,`module_id`,`plugin_name`,`timestamp`,`content`,`*`]},session:{}},setup(r){let i=r;function d(e,t){let n=new Set(t);return n.has(`content`)&&n.add(`content`),n.has(`plugin_name`)&&n.add(`plugin_index`),Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))}function h(e){return e.action===`HookLoadCallEnd`||e.action===`HookTransformCallStart`||e.action===`HookTransformCallEnd`?e.content:null}return(g,D)=>{let O=v,k=_,A=b,j=y;return t(),m(c,null,[r.events.length?u(``,!0):(t(),m(`div`,x,[...D[0]||=[p(`div`,{p5:``,italic:``},` No events found `,-1)]])),p(`table`,null,[p(`tbody`,null,[(t(!0),m(c,null,l(i.events,g=>(t(),m(`tr`,{key:g.event_id},[(t(!0),m(c,null,l(i.fields,i=>(t(),m(`td`,{key:i,px2:``},[i===`module_id`?(t(),a(O,{key:0,id:`module_id`in g?g.module_id:``,session:r.session},null,8,[`id`,`session`])):i===`action`?(t(),a(k,{key:1,text:g.action},null,8,[`text`])):i===`plugin_name`&&`plugin_name`in g?(t(),m(`div`,S,[f(A,{"font-mono":``,name:g.plugin_name},null,8,[`name`]),p(`code`,C,`#`+s(g.plugin_id),1)])):i===`event_id`?(t(),m(`div`,w,s(g.event_id),1)):i===`content`&&h(g)?(t(),a(o(e),{key:4},{popper:n(()=>[p(`pre`,{p1:``,"text-sm":``,textContent:s(h(g))},null,8,T)]),default:n(()=>[D[1]||=p(`div`,{"i-ph-code":``},null,-1)]),_:2},1024)):i===`timestamp`&&`timestamp`in g?(t(),a(j,{key:5,"text-sm":``,timestamp:g.timestamp},null,8,[`timestamp`])):i===`*`?(t(),m(`pre`,{key:6,"text-sm":``,textContent:s(d(g,r.fields))},null,8,E)):u(``,!0)]))),128))]))),128))])])],64)}}}),O=Object.assign(D,{__name:`DataRawEventsTable`}),k={key:1},A=d({__name:`raw`,props:{session:{}},setup(e){let n=e,s=g(),l=r().query,d=i(async()=>await s.value[`vite:rolldown:get-module-raw-events`]?.({session:n.session.id,module:l.module}),{events:[]});return(n,r)=>{let i=h,s=O;return t(),m(c,null,[o(d).isLoading?(t(),a(i,{key:0})):u(``,!0),p(`div`,null,[o(d).isReady?(t(),a(s,{key:0,events:o(d).state.value.events,session:e.session},null,8,[`events`,`session`])):(t(),m(`div`,k,[f(i)]))])],64)}}});export{A as default};