@vitejs/devtools-vite 0.0.0-alpha.19 → 0.0.0-alpha.20

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 (90) hide show
  1. package/dist/dirs.mjs +1 -1
  2. package/dist/index.d.mts +60 -10
  3. package/dist/index.mjs +1455 -3928
  4. package/dist/nitro.json +2 -2
  5. package/dist/public/200.html +1 -1
  6. package/dist/public/404.html +1 -1
  7. package/dist/public/_nuxt/4_YkMRLM.js +1 -0
  8. package/dist/public/_nuxt/B6cncnam.js +1 -0
  9. package/dist/public/_nuxt/BReKREoN.js +33 -0
  10. package/dist/public/_nuxt/BaYRDImg.js +1 -0
  11. package/dist/public/_nuxt/Bij65W5n.js +1 -0
  12. package/dist/public/_nuxt/Bja_t-aS.js +1 -0
  13. package/dist/public/_nuxt/BrNGuicP.js +1 -0
  14. package/dist/public/_nuxt/BwW8gZ6K.js +1 -0
  15. package/dist/public/_nuxt/C8YTjkYM.js +1 -0
  16. package/dist/public/_nuxt/CDPpT6Cf.js +1 -0
  17. package/dist/public/_nuxt/CE23KUMI.js +1 -0
  18. package/dist/public/_nuxt/{Bt0_xjwR.js → CEj_FX93.js} +1 -1
  19. package/dist/public/_nuxt/CNlvL5ez.js +1 -0
  20. package/dist/public/_nuxt/CPYYHqxX.js +1 -0
  21. package/dist/public/_nuxt/Cu87lOT3.js +1 -0
  22. package/dist/public/_nuxt/D6yJLdbI.js +1 -0
  23. package/dist/public/_nuxt/DDRvb9yv.js +1 -0
  24. package/dist/public/_nuxt/DHdbcQDR.js +1 -0
  25. package/dist/public/_nuxt/DJFg8Mze.js +1 -0
  26. package/dist/public/_nuxt/DkNjWA7f.js +1 -0
  27. package/dist/public/_nuxt/{DilC1n1-.js → Ds1hqjlp.js} +2 -4
  28. package/dist/public/_nuxt/DuSH8vtp.js +1 -0
  29. package/dist/public/_nuxt/EZmie0b_.js +1 -0
  30. package/dist/public/_nuxt/HyHtDydt.js +1 -0
  31. package/dist/public/_nuxt/L7giCKVM.js +1 -0
  32. package/dist/public/_nuxt/NkHXFX5A.js +1 -0
  33. package/dist/public/_nuxt/R6f4Y_SJ.js +1 -0
  34. package/dist/public/_nuxt/XY_il7uL.js +2 -0
  35. package/dist/public/_nuxt/builds/latest.json +1 -1
  36. package/dist/public/_nuxt/builds/meta/57a53e55-aaa8-4c2f-ab28-ef6c47fc2198.json +1 -0
  37. package/dist/public/_nuxt/entry.D_RYm3_j.css +1 -0
  38. package/dist/public/_nuxt/error-404.DSMcJjv-.css +1 -0
  39. package/dist/public/_nuxt/error-500.wvWNQOmL.css +1 -0
  40. package/dist/public/_nuxt/gdDtDkxO.js +1 -0
  41. package/dist/public/_nuxt/kgaOZT0B.js +1 -0
  42. package/dist/public/_nuxt/mJg3pdS2.js +1 -0
  43. package/dist/public/_nuxt/s37iQDTO.js +1 -0
  44. package/dist/public/_nuxt/x1G1EAUP.js +1 -0
  45. package/dist/public/_nuxt/xtsFKyex.js +1 -0
  46. package/dist/public/index.html +1 -1
  47. package/package.json +14 -14
  48. package/dist/public/_nuxt/07wnyZKd.js +0 -1
  49. package/dist/public/_nuxt/B60rA_aW.js +0 -1
  50. package/dist/public/_nuxt/B67x4GCP.js +0 -1
  51. package/dist/public/_nuxt/B8MMDSYB.js +0 -1
  52. package/dist/public/_nuxt/BLS3T3KA.js +0 -1
  53. package/dist/public/_nuxt/BMsX1CNy.js +0 -1
  54. package/dist/public/_nuxt/BOkXdHom.js +0 -1
  55. package/dist/public/_nuxt/BOwnK8_Y.js +0 -1
  56. package/dist/public/_nuxt/BYgsyBgs.js +0 -1
  57. package/dist/public/_nuxt/BZp_Rqiq.js +0 -1
  58. package/dist/public/_nuxt/Bax2Xuss.js +0 -1
  59. package/dist/public/_nuxt/BfzWwsgH.js +0 -2
  60. package/dist/public/_nuxt/Bgr0OgUi.js +0 -1
  61. package/dist/public/_nuxt/BrGG6h5U.js +0 -1
  62. package/dist/public/_nuxt/C-y-Odbu.js +0 -1
  63. package/dist/public/_nuxt/C3ZA0X0n.js +0 -1
  64. package/dist/public/_nuxt/C9D_b0Ie.js +0 -1
  65. package/dist/public/_nuxt/CEQkJ3Wx.js +0 -1
  66. package/dist/public/_nuxt/CbraBRjp.js +0 -33
  67. package/dist/public/_nuxt/CquGjqBi.js +0 -1
  68. package/dist/public/_nuxt/CvbH1QZS.js +0 -1
  69. package/dist/public/_nuxt/CwJmFVn8.js +0 -1
  70. package/dist/public/_nuxt/CyjCHwlN.js +0 -1
  71. package/dist/public/_nuxt/DFnm02Ud.js +0 -1
  72. package/dist/public/_nuxt/DGvZD3jQ.js +0 -1
  73. package/dist/public/_nuxt/DQp_1U8q.js +0 -1
  74. package/dist/public/_nuxt/DabxYzqu.js +0 -1
  75. package/dist/public/_nuxt/DtmncGDc.js +0 -1
  76. package/dist/public/_nuxt/DyBWaXpL.js +0 -1
  77. package/dist/public/_nuxt/PBmE2B7U.js +0 -1
  78. package/dist/public/_nuxt/Q3kWpZ_f.js +0 -1
  79. package/dist/public/_nuxt/SUptJs8y.js +0 -1
  80. package/dist/public/_nuxt/builds/meta/9de1cd1a-93a8-4fbf-8efa-effa9e85ee82.json +0 -1
  81. package/dist/public/_nuxt/entry.Dp3ya9sb.css +0 -1
  82. package/dist/public/_nuxt/error-404.CrzVG6qf.css +0 -1
  83. package/dist/public/_nuxt/error-500.UTTFHdkP.css +0 -1
  84. package/dist/public/_nuxt/jTMXHbZw.js +0 -1
  85. package/dist/public/_nuxt/p1Do6sW6.js +0 -1
  86. /package/dist/{dirs-BJbBdMIp.mjs → dirs-BzX7rGLP.mjs} +0 -0
  87. /package/dist/public/_nuxt/{DQtLZa7C.js → CroQ9lcn.js} +0 -0
  88. /package/dist/public/_nuxt/{DnpfwSMy.js → Cvg1SSG2.js} +0 -0
  89. /package/dist/public/_nuxt/{diff.worker-DCsgdfuV.js → diff.worker-CvsEE-qa.js} +0 -0
  90. /package/dist/public/_nuxt/{DJHNY-5T.js → jB8TYliU.js} +0 -0
@@ -0,0 +1 @@
1
+ .grid[data-v-b0d2a718]{display:grid}.mb-2[data-v-b0d2a718]{margin-bottom:.5rem}.mb-4[data-v-b0d2a718]{margin-bottom:1rem}.max-w-520px[data-v-b0d2a718]{max-width:520px}.min-h-screen[data-v-b0d2a718]{min-height:100vh}.w-full[data-v-b0d2a718]{width:100%}.flex[data-v-b0d2a718]{display:flex}.place-content-center[data-v-b0d2a718]{place-content:center}.items-center[data-v-b0d2a718]{align-items:center}.justify-center[data-v-b0d2a718]{justify-content:center}.overflow-hidden[data-v-b0d2a718]{overflow:hidden}.bg-white[data-v-b0d2a718]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-b0d2a718]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-b0d2a718]{text-align:center}.text-\[80px\][data-v-b0d2a718]{font-size:80px}.text-2xl[data-v-b0d2a718]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-b0d2a718]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-b0d2a718]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-b0d2a718]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-b0d2a718]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-b0d2a718]{font-weight:500}.font-semibold[data-v-b0d2a718]{font-weight:600}.leading-none[data-v-b0d2a718]{line-height:1}.tracking-wide[data-v-b0d2a718]{letter-spacing:.025em}.font-sans[data-v-b0d2a718]{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-b0d2a718]{--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)}.underline[data-v-b0d2a718]{text-decoration-line:underline}.underline-offset-3[data-v-b0d2a718]{text-underline-offset:3px}.antialiased[data-v-b0d2a718]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-b0d2a718]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-b0d2a718]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-b0d2a718]{font-size:110px}.sm\:text-3xl[data-v-b0d2a718]{font-size:1.875rem;line-height:2.25rem}}
@@ -0,0 +1 @@
1
+ .grid[data-v-7e48032f]{display:grid}.mb-2[data-v-7e48032f]{margin-bottom:.5rem}.mb-4[data-v-7e48032f]{margin-bottom:1rem}.max-w-520px[data-v-7e48032f]{max-width:520px}.min-h-screen[data-v-7e48032f]{min-height:100vh}.place-content-center[data-v-7e48032f]{place-content:center}.overflow-hidden[data-v-7e48032f]{overflow:hidden}.bg-white[data-v-7e48032f]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-7e48032f]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-7e48032f]{text-align:center}.text-\[80px\][data-v-7e48032f]{font-size:80px}.text-2xl[data-v-7e48032f]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-7e48032f]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-7e48032f]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-7e48032f]{font-weight:600}.leading-none[data-v-7e48032f]{line-height:1}.tracking-wide[data-v-7e48032f]{letter-spacing:.025em}.font-sans[data-v-7e48032f]{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-7e48032f]{--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-7e48032f]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-7e48032f]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-7e48032f]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-7e48032f]{font-size:110px}.sm\:text-3xl[data-v-7e48032f]{font-size:1.875rem;line-height:2.25rem}}
@@ -0,0 +1 @@
1
+ import{C as e,Et as t,H as n,Ht as r,an as i,ct as a,dt as o,mt as s,pt as c}from"#entry";import{t as l}from"./s37iQDTO.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=e({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:404},statusMessage:{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(e){let g=e;return n({title:`${g.statusCode} - ${g.statusMessage} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.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;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color: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 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--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: }`}]}),(n,g)=>{let _=l;return t(),o(`div`,u,[a(`div`,d,[a(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:i(e.statusCode)},null,8,f),a(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:i(e.statusMessage)},null,8,p),a(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:i(e.description)},null,8,m),a(`div`,h,[s(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:r(()=>[c(i(e.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-b0d2a718`]]);export{g as default};
@@ -0,0 +1 @@
1
+ import{Et as e,an as t,dt as n,ht as r,i,tn as a,ut as o}from"#entry";var s={key:0,"font-mono":``},c=r({__name:`Timestamp`,props:{timestamp:{}},setup(r){let c=r;return(l,u)=>r.timestamp?(e(),n(`span`,s,t(a(i)(new Date(c.timestamp))),1)):o(``,!0)}}),l=Object.assign(c,{__name:`DisplayTimestamp`});export{l as t};
@@ -0,0 +1 @@
1
+ import{C as e,Et as t,Ot as n,St as r,Xt as i,Yt as a,Zt as o,ct as s,dt as c,en as l,f as u,s as d,st as f,tn as p,u as m,yt as h}from"#entry";var g={},_={"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Close`};function v(e,n){return t(),c(`button`,_,[...n[0]||=[s(`div`,{"i-ph-x":``},null,-1)]])}var y=Object.assign(e(g,[[`render`,v]]),{__name:`DisplayCloseButton`});function b(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function x(){return this.eachAfter(b)}function S(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function C(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function w(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function T(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function ee(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function te(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ne(e){for(var t=this,n=E(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function E(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function D(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function O(){return Array.from(this)}function k(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function A(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*j(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function M(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ae)):t===void 0&&(t=ie);for(var n=new N(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new N(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(se)}function re(){return M(this).eachBefore(oe)}function ie(e){return e.children}function ae(e){return Array.isArray(e)?e[1]:null}function oe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function se(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function N(e){this.data=e,this.depth=this.height=0,this.parent=null}N.prototype=M.prototype={constructor:N,count:x,each:S,eachAfter:w,eachBefore:C,find:T,sum:ee,sort:te,path:ne,ancestors:D,descendants:O,leaves:k,links:A,copy:re,[Symbol.iterator]:j};function ce(e,t){return e.parent===t.parent?1:2}function P(e){var t=e.children;return t?t[0]:e.t}function F(e){var t=e.children;return t?t[t.length-1]:e.t}function I(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function L(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function R(e,t,n){return e.a.parent===t.parent?e.a:n}function z(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}z.prototype=Object.create(N.prototype);function B(e){for(var t=new z(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new z(a[o],o)),i.parent=n;return(t.parent=new z(null,0)).children=[t],t}function V(){var e=ce,t=1,n=1,r=null;function i(i){var s=B(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){L(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=F(o),i=P(i),o&&i;)s=P(s),a=F(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(I(R(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!F(a)&&(a.t=o,a.m+=u-l),i&&!P(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function H(e){return function(){return e}}var U=Math.PI,W=2*U,G=1e-6,le=W-G;function K(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ue(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return K;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var q=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?K:ue(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>G)if(!(Math.abs(u*s-c*l)>G)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((U-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>G&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>G||Math.abs(this._y1-l)>G)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%W+W),d>le?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>G&&this._append`A${n},${n},0,${+(d>=U)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function de(){return new q}de.prototype=q.prototype;function fe(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new q(t)}var pe=Array.prototype.slice;function me(e){return e[0]}function he(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ge(e){return new J(e,!0)}function _e(e){return new J(e,!1)}function ve(e){return e.source}function ye(e){return e.target}function Y(e){let t=ve,n=ye,r=me,i=he,a=null,o=null,s=fe(c);function c(){let c,l=pe.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:H(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:H(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function be(){return Y(ge)}function xe(){return Y(_e)}function Se(e,{wheel:t=!0,minScale:n=.5,maxScale:r=2}={}){let i=a(1);function o(t,a,o){let s=l(e);if(!s)return;let{left:c,top:u,width:d,height:f}=s.getBoundingClientRect(),p=a??c+d/2,m=o??u+f/2,h=p-c,g=m-u,_=i.value;i.value=Math.max(n,Math.min(r,_+t));let v=i.value/_;s.scrollLeft=(s.scrollLeft+h)*v-h,s.scrollTop=(s.scrollTop+g)*v-g}function s(e){if(l(t)){e.preventDefault();let t=.2;o(e.deltaY<0?t:t*-1,e.clientX,e.clientY)}else e.ctrlKey&&(e.preventDefault(),o(e.deltaY*.004*-1,e.clientX,e.clientY))}function c(e=.2){o(e)}function u(e=.2){o(e*-1)}return m(e,`wheel`,s),{scale:i,zoom:o,zoomIn:c,zoomOut:u}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=be().x(e=>e[0]).y(e=>e[1]),Q=xe().x(e=>e[0]).y(e=>e[1]);function Ce(e,t){return!e.target||!e.source?null:t?e.target.x<=e.source.x?Q({source:[e.source.x+p(t.width)/2-p(t.linkOffset),e.source.y],target:[e.target.x-p(t.width)/2+p(t.linkOffset),e.target.y]}):Z({source:[e.source.x+p(t.width)/2-p(t.linkOffset),e.source.y],target:[e.target.x-p(t.width)/2+p(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function $(e){return`stroke-#8885`}function we(e){let t=.4,r=a(),s=a(window.innerWidth),c=a(window.innerHeight),l=i(new Map),d=i(new Set),p=a(!0),m=i(new Map),h=o([]),g=o([]),_=i(new Map),v=i(new Map),y=f(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=u(),{scale:x,zoomIn:S,zoomOut:C}=Se(r,{wheel:b,minScale:t,maxScale:2});function w(e,t=!0){l.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:M,tree:V,nodesRefMap:l,container:r,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:s,height:c,childToParentMap:m,focusOn:w,collapsedNodes:d,spacing:e.spacing});n(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:r,width:s,height:c,scale:x,nodes:h,links:g,nodesRefMap:l,collapsedNodes:d,childToParentMap:m,ZOOM_MIN:t,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function Te(){return h(X)}function Ee(e){let{nodesRefMap:t,container:n,calculateGraph:i,collapsedNodes:o}=h(X),s=a(!1);function c(e,i){r(()=>{r(()=>{let r=t.get(e);if(r&&i&&n.value){let e=n.value.getBoundingClientRect(),t=r.getBoundingClientRect(),a=t.left-e.left-i.x,o=t.top-e.top-i.y;n.value.scrollLeft+=a,n.value.scrollTop+=o}})})}function l(e){if(s.value)return;s.value=!0;let r=t.get(e),a=null;if(r&&n.value){let e=n.value.getBoundingClientRect(),t=r.getBoundingClientRect();a={x:t.left-e.left,y:t.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&c(e,a),s.value=!1}function u(){s.value||(s.value=!0,o.clear(),i(),setTimeout(()=>{s.value=!1},300))}function d(){s.value||(s.value=!0,p(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:l,expandAll:u,collapseAll:d}}function De(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=h(X);return d([`-`,`_`],e=>{e.ctrlKey&&n()}),d([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function Oe(){let{container:e}=h(X),t=a(!1),n=0,r=0;function i(){m(e,`mousedown`,i=>{let a=e.value.getBoundingClientRect(),o=a.right-i.clientX,s=a.bottom-i.clientY;o<=20||s<=20||(t.value=!0,n=e.value.scrollLeft+i.pageX,r=e.value.scrollTop+i.pageY)}),m(e,`contextmenu`,e=>e.preventDefault()),m(`mouseleave`,()=>t.value=!1),m(`mouseup`,()=>t.value=!1),m(`mousemove`,i=>{t.value&&(i.preventDefault(),e.value.scrollLeft=n-i.pageX,e.value.scrollTop=r-i.pageY)})}return{init:i,isGrabbing:t}}export{De as a,y as c,Oe as i,Ce as n,Te as o,$ as r,Ee as s,we as t};
@@ -0,0 +1 @@
1
+ import{$ as e,B as t,Ct as n,J as r,K as i,L as a,Mt as o,Q as s,R as c,U as l,V as u,W as d,X as f,Y as p,Yt as m,Z as h,Zt as g,et as _,ht as v,q as y,st as b,vt as x,wt as S,z as C}from"#entry";var w=(...e)=>e.find(e=>e!==void 0);function T(e){let u=e.componentName||`NuxtLink`;function p(e){return typeof e==`string`&&e.startsWith(`#`)}function _(t,n,r){let i=r??e.trailingSlash;if(!t||i!==`append`&&i!==`remove`)return t;if(typeof t==`string`)return D(t,i);let a=`path`in t&&t.path!==void 0?t.path:n(t).path;return{...t,name:void 0,path:D(a,i)}}function T(t){let n=i(),a=r(),s=b(()=>!!t.target&&t.target!==`_self`),c=b(()=>{let e=t.to||t.href||``;return typeof e==`string`&&f(e,{acceptRelative:!0})}),u=o(`RouterLink`),m=u&&typeof u!=`string`?u.useLink:void 0,g=b(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||c.value}),v=b(()=>{let e=t.to||t.href||``;return g.value?e:_(e,n.resolve,t.trailingSlash)}),y=g.value?void 0:m?.({...t,to:v}),x=b(()=>{let r=t.trailingSlash??e.trailingSlash;if(!v.value||c.value||p(v.value))return v.value;if(g.value){let e=typeof v.value==`object`&&`path`in v.value?d(v.value):v.value;return D(typeof e==`object`?n.resolve(e).href:e,r)}return typeof v.value==`object`?n.resolve(v.value)?.href??null:D(h(a.app.baseURL,v.value),r)});return{to:v,hasTarget:s,isAbsoluteUrl:c,isExternal:g,href:x,isActive:y?.isActive??b(()=>v.value===n.currentRoute.value.path),isExactActive:y?.isExactActive??b(()=>v.value===n.currentRoute.value.path),route:y?.route??b(()=>n.resolve(v.value)),async navigate(e){await l(x.value,{replace:t.replace,external:g.value||s.value})}}}return v({name:u,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:T,setup(r,{slots:l}){let u=i(),{to:f,href:h,navigate:_,isExternal:v,hasTarget:b,isAbsoluteUrl:E}=T(r),D=g(!1),k=m(null),j=e=>{k.value=r.custom?e?.$el?.nextElementSibling:e?.$el};function M(t){return!D.value&&(typeof r.prefetchOn==`string`?r.prefetchOn===t:r.prefetchOn?.[t]??e.prefetchOn?.[t])&&(r.prefetch??e.prefetch)!==!1&&r.noPrefetch!==!0&&r.target!==`_blank`&&!A()}async function N(e=y()){if(D.value)return;D.value=!0;let t=typeof f.value==`string`?f.value:v.value?d(f.value):u.resolve(f.value).fullPath,n=v.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n).catch(()=>{}),!v.value&&!b.value&&a(f.value,u).catch(()=>{})])}if(M(`visibility`)){let e=y(),r,i=null;S(()=>{let n=O();c(()=>{r=t(()=>{k?.value?.tagName&&(i=n.observe(k.value,async()=>{i?.(),i=null,await N(e)}))})})}),n(()=>{r&&C(r),i?.(),i=null})}return()=>{if(!v.value&&!b.value&&!p(f.value)){let t={ref:j,to:f.value,activeClass:r.activeClass||e.activeClass,exactActiveClass:r.exactActiveClass||e.exactActiveClass,replace:r.replace,ariaCurrentValue:r.ariaCurrentValue,custom:r.custom};return r.custom||(M(`interaction`)&&(t.onPointerenter=N.bind(null,void 0),t.onFocus=N.bind(null,void 0)),D.value&&(t.class=r.prefetchedClass||e.prefetchedClass),t.rel=r.rel||void 0),x(o(`RouterLink`),t,l.default)}let t=r.target||null,n=w(r.noRel?``:r.rel,e.externalRelAttribute,E.value||b.value?`noopener noreferrer`:``)||null;return r.custom?l.default?l.default({href:h.value,navigate:_,prefetch:N,get route(){if(!h.value)return;let e=new URL(h.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return s(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:h.value}},rel:n,target:t,isExternal:v.value||b.value,isActive:!1,isExactActive:!1}):null:x(`a`,{ref:k,href:h.value||null,rel:n,target:t,onClick:e=>{if(!(v.value||b.value))return e.preventDefault(),r.replace?u.replace(h.value):u.push(h.value)}},l.default?.())}}})}var E=T(p);function D(t,n){let r=n===`append`?e:_;return f(t)&&!t.startsWith(`http`)?t:r(t,!0)}function O(){let e=y();if(e._observer)return e._observer;let t=null,n=new Map;return e._observer={observe:(e,r)=>(t||=new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),n.set(e,r),t.observe(e),()=>{n.delete(e),t?.unobserve(e),n.size===0&&(t?.disconnect(),t=null)})}}var k=/2g/;function A(){let e=navigator.connection;return!!(e&&(e.saveData||k.test(e.effectiveType)))}export{E as t};
@@ -0,0 +1 @@
1
+ import{At as e,Et as t,Ht as n,an as r,at as i,ct as a,dt as o,ht as s,lt as c,mt as l,nn as u,pt as d,st as f,tn as p,ut as m}from"#entry";import{t as h}from"./s37iQDTO.js";import{r as g,t as _}from"./EZmie0b_.js";import{t as v}from"./BaYRDImg.js";import{t as y}from"./L7giCKVM.js";import{t as b}from"./CPYYHqxX.js";var x={flex:`~ col gap-2`,p6:``},S={flex:`~ gap-2`},C={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_160px_2fr] gap-2 items-center`},w={"font-mono":``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ gap-2`},k=s({__name:`index`,props:{session:{}},setup(s){let k=s,A=f(()=>[{title:`Build ID`,value:k.session.id,icon:`i-ph-hash-duotone`},{title:`Created At`,value:new Date(k.session.meta.timestamp),icon:`i-ph-clock-duotone`},{title:`Build Duration`,value:k.session.buildDuration,icon:`i-ph-timer-duotone`,type:`duration`},{title:`Directory`,value:k.session.meta.cwd,icon:`i-ph-folder-duotone`},{title:`Total Modules`,value:k.session.modulesList.length,icon:`i-ph-files-duotone`},{title:`Plugins`,value:k.session.meta.plugins.length,icon:`i-ph-plugs-duotone`},{title:`Platform`,value:k.session.meta.platform,icon:`i-ph-cpu-duotone`,type:`badge`},{title:`Format`,value:k.session.meta.format,icon:`i-ph-file-duotone`,type:`badge`}]);return(f,j)=>{let M=h,N=g,P=y,F=b,I=_;return t(),o(`div`,x,[a(`div`,S,[l(M,{"btn-action":``,to:{path:`/`}},{default:n(()=>[...j[0]||=[a(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),d(` Re-select Session `,-1)]]),_:1})]),j[1]||=a(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),a(`div`,C,[(t(!0),o(i,null,e(A.value,e=>(t(),o(i,{key:e.title},[a(`div`,{class:u(e.icon)},null,2),a(`div`,null,r(e.title),1),a(`div`,w,[e.value instanceof Date?(t(),o(`time`,{key:0,datetime:e.value.toISOString()},r(e.value.toLocaleString()),9,T)):e.type===`badge`?(t(),c(N,{key:1,text:String(e.value),py1:``},null,8,[`text`])):e.type===`duration`?(t(),c(P,{key:2,duration:+e.value},null,8,[`duration`])):typeof e.value==`number`?(t(),c(F,{key:3,number:e.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(t(),o(`span`,E,r(e.value),1))])],64))),128))]),j[2]||=a(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),a(`div`,D,[(t(!0),o(i,null,e(k.session.meta.inputs,e=>(t(),o(i,{key:e},[l(N,{text:e.name||``},null,8,[`text`]),l(I,{id:e.filename||``,session:s.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=a(`div`,{op50:``,"mt-4":``},` Views `,-1),a(`div`,O,[(t(!0),o(i,null,e(p(v),e=>(t(),o(i,{key:e.to},[e.category===`session`?(t(),c(M,{key:0,"btn-action":``,to:{path:e.to},flex:`~ col`,"min-w-40":``,p4:``},{default:n(()=>[a(`div`,{class:u(e.icon),"text-2xl":``},null,2),d(` `+r(e.title),1)]),_:2},1032,[`to`])):m(``,!0)],64))),128))])])}}});export{k as default};
@@ -0,0 +1 @@
1
+ import{$t as e,A as t,At as n,Et as r,F as i,I as a,M as o,N as s,O as c,P as l,Rt as u,St as d,Tt as f,Yt as p,Zt as m,an as h,at as g,ct as _,dt as v,ht as y,in as b,j as ee,jt as te,k as ne,lt as re,ot as ie,st as x,t as S,tn as ae,ut as oe,zt as se}from"#entry";import{t as C}from"./CroQ9lcn.js";import{t as ce}from"./CE23KUMI.js";function w(){return typeof window<`u`}function T(e){return le(e)?(e.nodeName||``).toLowerCase():`#document`}function E(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function D(e){return((le(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function le(e){return w()?e instanceof Node||e instanceof E(e).Node:!1}function O(e){return w()?e instanceof Element||e instanceof E(e).Element:!1}function k(e){return w()?e instanceof HTMLElement||e instanceof E(e).HTMLElement:!1}function ue(e){return!w()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof E(e).ShadowRoot}var de=new Set([`inline`,`contents`]);function A(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=P(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!de.has(i)}var fe=new Set([`table`,`td`,`th`]);function pe(e){return fe.has(T(e))}var me=[`:popover-open`,`:modal`];function j(e){return me.some(t=>{try{return e.matches(t)}catch{return!1}})}var he=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ge=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],_e=[`paint`,`layout`,`strict`,`content`];function ve(e){let t=M(),n=O(e)?P(e):e;return he.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)||ge.some(e=>(n.willChange||``).includes(e))||_e.some(e=>(n.contain||``).includes(e))}function ye(e){let t=I(e);for(;k(t)&&!N(t);){if(ve(t))return t;if(j(t))return null;t=I(t)}return null}function M(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var be=new Set([`html`,`body`,`#document`]);function N(e){return be.has(T(e))}function P(e){return E(e).getComputedStyle(e)}function F(e){return O(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function I(e){if(T(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ue(e)&&e.host||D(e);return ue(t)?t.host:t}function xe(e){let t=I(e);return N(t)?e.ownerDocument?e.ownerDocument.body:e.body:k(t)&&A(t)?t:xe(t)}function L(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xe(e),i=r===e.ownerDocument?.body,a=E(r);if(i){let e=R(a);return t.concat(a,a.visualViewport||[],A(r)?r:[],e&&n?L(e):[])}return t.concat(r,L(r,[],n))}function R(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Se(e){let t=P(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=k(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,c=a(n)!==o||a(r)!==s;return c&&(n=o,r=s),{width:n,height:r,$:c}}function Ce(e){return O(e)?e:e.contextElement}function z(e){let t=Ce(e);if(!k(t))return o(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Se(t),c=(s?a(n.width):n.width)/r,l=(s?a(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}var we=o(0);function Te(e){let t=E(e);return!M()||!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!==E(e)?!1:t}function B(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),s=Ce(e),c=o(1);t&&(r?O(r)&&(c=z(r)):c=z(e));let l=Ee(s,n,r)?Te(s):o(0),u=(a.left+l.x)/c.x,d=(a.top+l.y)/c.y,f=a.width/c.x,p=a.height/c.y;if(s){let e=E(s),t=r&&O(r)?E(r):r,n=e,i=R(n);for(;i&&r&&t!==n;){let e=z(i),t=i.getBoundingClientRect(),r=P(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,d*=e.y,f*=e.x,p*=e.y,u+=a,d+=o,n=E(i),i=R(n)}}return i({width:f,height:p,x:u,y:d})}function V(e,t){let n=F(e).scrollLeft;return t?t.left+n:B(D(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`,s=D(r),c=t?j(t.floating):!1;if(r===s||c&&a)return n;let l={scrollLeft:0,scrollTop:0},u=o(1),d=o(0),f=k(r);if((f||!f&&!a)&&((T(r)!==`body`||A(s))&&(l=F(r)),k(r))){let e=B(r);u=z(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=s&&!f&&!a?De(s,l):o(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function ke(e){return Array.from(e.getClientRects())}function Ae(e){let t=D(e),n=F(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+V(e),c=-n.scrollTop;return P(r).direction===`rtl`&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}var je=25;function Me(e,t){let n=E(e),r=D(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=M();(!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=k(e)?z(e):o(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(D(e));else if(O(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 i(r)}function Ie(e,t){let n=I(e);return n===t||!O(n)||N(n)?!1:P(n).position===`fixed`||Ie(n,t)}function Le(e,t){let n=t.get(e);if(n)return n;let r=L(e,[],!1).filter(e=>O(e)&&T(e)!==`body`),i=null,a=P(e).position===`fixed`,o=a?I(e):e;for(;O(o)&&!N(o);){let t=P(o),n=ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ne.has(i.position)||A(o)&&!n&&Ie(e,o))?r=r.filter(e=>e!==o):i=t,o=I(o)}return t.set(e,r),r}function Re(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?j(t)?[]:Le(t,this._c):[].concat(n),r],o=a[0],c=a.reduce((e,n)=>{let r=Fe(t,n,i);return e.top=s(r.top,e.top),e.right=l(r.right,e.right),e.bottom=l(r.bottom,e.bottom),e.left=s(r.left,e.left),e},Fe(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ze(e){let{width:t,height:n}=Se(e);return{width:t,height:n}}function Be(e,t,n){let r=k(t),i=D(t),a=n===`fixed`,s=B(e,!0,a,t),c={scrollLeft:0,scrollTop:0},l=o(0);function u(){l.x=V(i)}if(r||!r&&!a)if((T(t)!==`body`||A(i))&&(c=F(t)),r){let e=B(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&u();a&&!r&&i&&u();let d=i&&!r&&!a?De(i,c):o(0);return{x:s.left+c.scrollLeft-l.x-d.x,y:s.top+c.scrollTop-l.y-d.y,width:s.width,height:s.height}}function H(e){return P(e).position===`static`}function Ve(e,t){if(!k(e)||P(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return D(e)===n&&(n=n.ownerDocument.body),n}function He(e,t){let n=E(e);if(j(e))return n;if(!k(e)){let t=I(e);for(;t&&!N(t);){if(O(t)&&!H(t))return t;t=I(t)}return n}let r=Ve(e,t);for(;r&&pe(r)&&H(r);)r=Ve(r,t);return r&&N(r)&&H(r)&&!ve(r)?n:r||ye(e)||n}var Ue=async function(e){let t=this.getOffsetParent||He,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 We(e){return P(e).direction===`rtl`}var Ge={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:D,getClippingRect:Re,getOffsetParent:He,getElementRects:Ue,getClientRects:ke,getDimensions:ze,getScale:z,isElement:O,isRTL:We},Ke=t,qe=ee,Je=ne,Ye=(e,t,n)=>{let r=new Map,i={platform:Ge,...n},a={...i.platform,_c:r};return c(e,t,{...i,platform:a})},Xe=y({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(t){let{hoverX:n,hoverY:i}=e(t),a=u(`hoverElement`),o=p(0),s=p(0);return se([n,i],([e,t])=>{Ye({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},a.value,{placement:`right-start`,middleware:[Je(),qe(),Ke({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{o.value=e,s.value=t})}),(e,t)=>(r(),re(ie,{to:`body`},[_(`div`,{ref_key:`hoverElement`,ref:a,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:b({left:`${o.value}px`,top:`${s.value}px`})},[te(e.$slots,`default`)],4)]))}}),Ze=Object.assign(Xe,{__name:`DisplayGraphHoverView`});function Qe(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 $e,et,tt,U,W,G=1,nt;function rt(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if($e!==t||et!==a||tt!==i){let n=Math.round(64*a)/64;G=i,G=Math.log2(G),G-=Math.floor(G);let r=G,o=Math.min(1,8*r);G=2**G;let s=8*Math.SQRT2/G;$e=t,et=a,tt=i,U||=document.createElement(`canvas`),W||=U.getContext(`2d`),U.width=U.height=Math.round(64*n),W.scale(n,n),W.fillStyle=e[0],W.fillRect(0,0,64,64),W.globalAlpha=.25,W.fillStyle=e[1],W.fillRect(0,0,64,64),W.globalAlpha=.67,W.strokeStyle=e[1],W.beginPath();for(let e=0;e<=64;e+=16)W.moveTo(e-32,e+32),W.lineTo(e+32,e-32);if(W.lineWidth=s*(1-(o-r)/2),W.stroke(),o+r>0){W.beginPath();for(let e=8;e<64;e+=16)W.moveTo(e-32,e+32),W.lineTo(e+32,e-32);W.lineWidth=s*(o+r)/2,W.stroke()}nt=t.createPattern(U,`repeat`),G/=n}return n/=64*G*a,n-=Math.floor(n),n*=64*G*a,nt.setTransform(new DOMMatrix([G,0,0,G,n,r])),nt}function it(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 at(e){return t=>t.id&&e[t.id]||t.color}function ot(e,t=1,n=1){let r={};return st(r,e,0,Math.PI*2,t,n),at(r)}function st(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Qe(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;st(e,s,n,t,i,a),n+=t}}var ct=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function lt(e=16,t=ct){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function ut(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=lt(),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=>ut(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 dt(e){return e.children.length===0?1:Math.max(...e.children.map(e=>dt(e)))+1}var ft=/\bFirefox\//.test(navigator.userAgent),pt;function mt(e){return pt?pt.format(e):`${e}`}function K(){return(window.performance||Date).now()}function ht(e){let t=e.toFixed(1).split(`.`,2);return`${mt(+t[0])}.${t[1]}`}function gt(e){return e===1?`1 byte`:e<1024?`${mt(e)} bytes`:e<1024*1024?`${ht(e/1024)} kb`:e<1024*1024*1024?`${ht(e/(1024*1024))} mb`:`${ht(e/(1024*1024*1024))} gb`}function _t(e,t,n,r,i,a){if(ft){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 vt(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function yt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{pt=new Intl.NumberFormat}catch{}var bt=()=>({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)}}}),q={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},xt={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},St=46,Ct=`14px sans-serif`,wt=`bold ${Ct}`,Tt=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={...q,...t};let{getColor:n=ot(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...xt,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=dt(e),this.disposables=[],this.events=bt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(Ct),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(St)}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]}},J=24,Et=5,Dt=.01,Ot=1e3,kt=class extends Tt{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(vt(e=>{let t=e.deltaX,n=e.deltaY,r=K(),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(yt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(K()-this.animationStart)/(this.options.animateDuration??q.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??q.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*Dt),r=Math.min(this.totalBytes,r+e.size*Dt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??q.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*J+1,this.zoomedOutMin=this.width-Ot>>1,this.zoomedOutWidth=this.zoomedOutMin+Ot,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)+Et,d=t+J/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=rt(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,J,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(wt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,J),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,J),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(Ct),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+J,n,y,i&-2),n+=r.size;return i&1||_t(this.c,this.palette.stroke,o+.5,t+.5,l,J),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+J&&e.id)return e;if(r>=t+J)for(let r of e.children){let e=a(r,t+J,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=K():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function At(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Y(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Y(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 jt={};function Mt(e){return jt[e]||(jt[e]=400*Math.log(1+Math.log(1+e/8))),jt[e]}var X=-Math.PI/2,Nt=class extends Tt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;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(yt(()=>this.resize())),this.disposables.push(vt(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(Mt(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(wt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??gt(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=rt(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=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,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 Mt(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=K()),At(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Y(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(At(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Y(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)}}},Z=4,Q=20,Pt=2*Z,$=Q+Z;function Ft(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>Pt&&y>$?Ft(t.children,g+Z,_+Q,v-Pt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var It=class extends Tt{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(vt(e=>this.updateHover(e))),this.disposables.push(yt(()=>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=30*e*o,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=(K()-this.animationStart)/(this.options.animateDuration??q.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=Ft([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=rt(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,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):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(_t(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-Pt,r=i+Math.round($/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>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/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=Ft([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=K(),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=y({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let i=e,a=t,o=x(()=>{let e=[],t=i.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(r(),v(`div`,Lt,[(r(!0),v(g,null,n(o.value,(e,t)=>(r(),v(g,{key:e.id},[t>0?(r(),v(`div`,Rt)):oe(``,!0),_(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>a(`select`,e)},[_(`span`,null,h(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:i,nodeType:a,graphOptions:o,onUpdate:s}=e,c=m(void 0),l=m(void 0),u=p(void 0),h=m(void 0),g,_=x(()=>{if(e.tree)return e.tree.value;let o=ae(t),s=new Map,c=0,l={id:`~root`,text:i,size:0,sizeSelf:0,children:[]};if(!o?.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=C(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 o={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return s.set(t,o),r.children.push(o),u.unshift(()=>{let t=o.sizeSelf;o.size+=o.children.reduce((e,t)=>e+t.size,0),o.subtext=C(o.size).join(` `),o.children.length&&t/o.size>.1&&o.children.push({id:`${o.id}-self`,text:``,size:t,sizeSelf:t,subtext:C(t).join(` `),children:[],meta:{...e,path:``,type:a},parent:o}),o.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),o}function f(e){let t=e[n].split(`/`).filter(Boolean),i=l,o=``,c=0;t.forEach((l,u)=>{if(o+=(o?`/`:``)+l,c++,u===t.length-1){let t={id:e[n],text:l,size:e[r],sizeSelf:e[r],subtext:C(e[r]).join(` `),children:[],meta:{...e,path:l,type:a}};i.children.push(t),s.set(e[n],t)}else i=d(e,o,l,i,c)})}return o.forEach(f),u.forEach(e=>e()),{map:s,root:l,maxDepth:c}}),v=x(()=>({animate:ce.value.chartAnimation,palette:{stroke:S.value?`#222`:`#555`,fg:S.value?`#fff`:`#000`,bg:S.value?`#111`:`#fff`},getColor:ot(_.value.root,S.value?.8:.9,S.value?1:1.1),getSubtext:e=>e.subtext,...o}));function y(e,t){u.value=e?.meta,e?.children.length||(e=e?.parent),h.value?.select(e,t)}function b(){g?.(),l.value=_.value.root,s?.(),d(()=>{let e=u.value&&_.value.map.get(u.value[n])||null;e&&y(e,!1)}),g=()=>{h.value?.dispose(),h.value=void 0,u.value=void 0}}return d(()=>{se(()=>[_.value,v.value],()=>{b()},{deep:!0,immediate:!1}),b()}),f(()=>{g?.()}),{tree:_,graph:h,chartOptions:v,nodeHover:c,nodeSelected:l,selectedNode:u,selectNode:y,buildGraph:b}}export{It as a,Ze as c,Nt as i,Vt as n,it as o,kt as r,ut as s,Ht as t};
@@ -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><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.Dp3ya9sb.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/DilC1n1-.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"><script type="module" src="/.devtools-vite/_nuxt/DilC1n1-.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1764309993682,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"9de1cd1a-93a8-4fbf-8efa-effa9e85ee82",buildAssetsDir:"/_nuxt/",cdnURL:""}}</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"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/Ds1hqjlp.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.D_RYm3_j.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/Ds1hqjlp.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"><script type="module" src="/.devtools-vite/_nuxt/Ds1hqjlp.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1765776658991,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"57a53e55-aaa8-4c2f-ab28-ef6c47fc2198",buildAssetsDir:"/_nuxt/",cdnURL:""}}</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.0.0-alpha.19",
4
+ "version": "0.0.0-alpha.20",
5
5
  "description": "DevTools for Vite (work in progress)",
6
6
  "author": "VoidZero Inc.",
7
7
  "license": "MIT",
@@ -30,10 +30,10 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "@floating-ui/dom": "^1.7.4",
33
- "@pnpm/read-project-manifest": "^1001.2.1",
34
- "@rolldown/debug": "^1.0.0-beta.51",
33
+ "@pnpm/read-project-manifest": "^1001.2.2",
34
+ "@rolldown/debug": "^1.0.0-beta.54",
35
35
  "ansis": "^4.2.0",
36
- "birpc": "^2.8.0",
36
+ "birpc": "^4.0.0",
37
37
  "cac": "^6.7.14",
38
38
  "d3-shape": "^3.2.0",
39
39
  "diff": "^8.0.2",
@@ -44,28 +44,28 @@
44
44
  "ohash": "^2.0.11",
45
45
  "p-limit": "^7.2.0",
46
46
  "pathe": "^2.0.3",
47
- "publint": "^0.3.15",
47
+ "publint": "^0.3.16",
48
48
  "sirv": "^3.0.2",
49
49
  "split2": "^4.2.0",
50
50
  "structured-clone-es": "^1.0.0",
51
51
  "tinyglobby": "^0.2.15",
52
- "unconfig": "^7.4.1",
52
+ "unconfig": "^7.4.2",
53
53
  "unstorage": "^1.17.3",
54
54
  "vue-virtual-scroller": "^2.0.0-beta.8",
55
55
  "ws": "^8.18.3",
56
- "@vitejs/devtools-kit": "0.0.0-alpha.19",
57
- "@vitejs/devtools-rpc": "0.0.0-alpha.19"
56
+ "@vitejs/devtools-kit": "0.0.0-alpha.20",
57
+ "@vitejs/devtools-rpc": "0.0.0-alpha.20"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/codemirror": "^5.60.17",
61
61
  "@types/diff": "^8.0.0",
62
62
  "@types/split2": "^4.2.3",
63
63
  "@types/stream-json": "^1.7.8",
64
- "@unocss/nuxt": "^66.5.9",
65
- "@vueuse/components": "^14.0.0",
66
- "@vueuse/core": "^14.0.0",
67
- "@vueuse/nuxt": "^14.0.0",
68
- "@vueuse/router": "^14.0.0",
64
+ "@unocss/nuxt": "^66.5.10",
65
+ "@vueuse/components": "^14.1.0",
66
+ "@vueuse/core": "^14.1.0",
67
+ "@vueuse/nuxt": "^14.1.0",
68
+ "@vueuse/router": "^14.1.0",
69
69
  "codemirror": "^5.65.20",
70
70
  "codemirror-theme-vars": "^0.1.2",
71
71
  "comlink": "^4.4.2",
@@ -79,7 +79,7 @@
79
79
  "splitpanes": "^4.0.4",
80
80
  "stream-json": "^1.9.1",
81
81
  "theme-vitesse": "^1.0.0",
82
- "tsdown": "^0.16.1",
82
+ "tsdown": "^0.17.4",
83
83
  "vite-hot-client": "^2.1.0"
84
84
  },
85
85
  "scripts": {
@@ -1 +0,0 @@
1
- import{G as e,Jt as t,Rt as n,Tt as r,Vt as i,W as a,c as o,ct as s,en as c,ft as l,g as u,in as d,it as f,jt as p,kt as m,l as h,lt as g,mt as _,ot as v,p as y,pt as b,qt as x,st as S,tn as C,ut as w,w as T,x as ee,y as te}from"./DilC1n1-.js";import{t as E}from"./C-y-Odbu.js";import"./DQtLZa7C.js";import"./C9D_b0Ie.js";import"./Q3kWpZ_f.js";import{r as D,t as O}from"./jTMXHbZw.js";import"./DnpfwSMy.js";import{r as k,t as A}from"./DtmncGDc.js";import{a as j,c as M,n as N,t as ne}from"./DQp_1U8q.js";import{t as re}from"./B60rA_aW.js";import{t as P}from"./BfzWwsgH.js";import{t as F}from"./BZp_Rqiq.js";import{t as ie}from"./CEQkJ3Wx.js";import{t as I}from"./BMsX1CNy.js";var L={flex:`~ row gap-1`,"of-hidden":``},R={flex:`~ row gap-1`,"ws-nowrap":``},z={p2:``,flex:`~ col gap-1`},B=_({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let t=e,n=v(()=>{let e=new Map;return t.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(t.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(t,a)=>{let o=O,c=D,l=p(`VMenu`);return r(),w(`div`,L,[S(`div`,R,[b(o,{id:n.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),n.value[0].version&&e.showVersion?(r(),s(c,{key:0,text:n.value[0].version,as:`span`},null,8,[`text`])):g(``,!0)]),n.value.length>1?(r(),s(l,{key:0,delay:{show:200,hide:0},"flex-none":``},{popper:i(()=>[S(`div`,z,[(r(!0),w(f,null,m(n.value,t=>(r(),w(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[b(o,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(r(),s(c,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):g(``,!0)]))),128))])]),default:i(()=>[b(c,{text:`+${n.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):g(``,!0)])}}}),V=Object.assign(B,{__name:`PackagesImporters`}),H={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},U={role:`row`,class:`border-b border-base`,flex:`~ row`},W=[`title`],G={key:0,"font-mono":``},K={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},q={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},J={key:0,role:`cell`,"font-mono":``,"flex-none":``,"min-w80":``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``},Y={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},X={p2:``,flex:`~ col gap-1`},Z={w24:``,"inline-flex":``},ae={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},oe={key:1},se=_({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(e){let t=a(),{state:n,next:o}=h([``,`desc`,`asc`],{initialValue:A.value.packageSizeSortType});function u(){o(),A.value.packageSizeSortType=n.value}return(a,o)=>{let p=F,h=k,_=O,v=V,y=E,x=P;return r(),w(`div`,H,[S(`div`,U,[S(`div`,{title:e.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:C([e.groupView?`min-w40`:`min-w80`])},[e.groupView?(r(),w(`div`,G,[b(p,{name:e.packages?.[0]?.name},null,8,[`name`])])):(r(),w(f,{key:1},[l(` Package `)],64))],10,W),e.groupView?g(``,!0):(r(),w(`div`,K,` Version `)),S(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:C([e.groupView?`px2`:`pl2`])},[S(`button`,q,[o[0]||=l(` Size `,-1),e.disableSizeSort?g(``,!0):(r(),w(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:u},[S(`i`,{"text-xs":``,class:C([c(n)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,c(n)?`op100 text-primary`:`op50`])},null,2)]))])],2),o[1]||=S(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),e.packages.length?(r(),s(x,{key:0,role:`rowgroup`,items:e.packages,"key-prop":`dir`},{default:i(({item:n,index:a})=>[b(y,{role:`row`,flex:`~ row`,class:C([`border-base border-b-1 border-dashed`,[a===e.packages.length-1?`border-b-0`:``]]),to:{path:c(t).path,query:{package:`${n.name}@${n.version}`}}},{default:i(()=>[e.groupView?g(``,!0):(r(),w(`div`,J,[b(p,{name:n.name},null,8,[`name`])])),S(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:C({"text-primary":n.duplicated})},d(n.version),3),S(`div`,Y,[b(c(T),{delay:{show:200,hide:0}},{popper:i(()=>[S(`div`,X,[(r(!0),w(f,null,m(n.files.filter(e=>!!e.transformedCodeSize),t=>(r(),w(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[S(`span`,Z,[b(h,{bytes:t.transformedCodeSize},null,8,[`bytes`])]),b(_,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:n.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:i(()=>[b(h,{bytes:n.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),S(`div`,ae,[b(v,{package:n,session:e.session,"show-version":e.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(r(),w(`div`,oe,[...o[2]||=[S(`div`,{p4:``},[S(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[S(`p`,null,` No data `)])],-1)]]))])}}}),Q=Object.assign(se,{__name:`PackagesTable`}),ce={key:1,p4:``},le=_({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,n=v(()=>t.packages.filter(e=>e.duplicated)),i=v(()=>n.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,a)=>{let o=Q;return n.value.length?(r(!0),w(f,{key:0},m(i.value,(t,n)=>(r(),w(`div`,{key:n},[b(o,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(r(),w(`div`,ce,[...a[0]||=[S(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),ue=Object.assign(le,{__name:`PackagesDuplicated`}),de={key:1,relative:``,"max-h-screen":``,"of-hidden":``},fe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},pe={flex:`~ gap-2 items-center`,p2:``,border:`t base`},$=[`onClick`],me={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt44:``,px4:``,pb4:``},he={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ge={op50:``},_e={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},ve={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},ye={flex:`~ gap-1 items-center`},be={flex:`~ gap-1 items-center`},xe=_({__name:`packages`,props:{session:{}},setup(p){let h=p,_=x(y()),T=a(),E=e(),D=[{match:/.*/,name:`direct`,description:`Direct Dependencies`,icon:`i-octicon:package-dependencies-24 light:filter-invert-30!`},{match:/.*/,name:`transitive`,description:`Transitive Dependencies`,icon:`i-octicon:package-24 light:filter-invert-30!`}],O=te(),P=t({search:``,selected:[`direct`,`transitive`]}),{state:F,isLoading:L}=o(async()=>await O.value.$call(`vite:rolldown:get-packages`,{session:h.session.id}),null),R=u(()=>F.value,()=>new ie(F.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=v(()=>F.value?Object.values(F.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=v(()=>[{label:`Table`,value:`table`,icon:`i-ph-table-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Duplicate Packages${z.value>0?` (${z.value})`:``}`,value:`duplicate-packages`,icon:`i-ph-package-duotone`}]),V=v(()=>P.value.search?R.value.search(P.value.search).map(e=>e.item):[...F.value||[]]),H=v(()=>{let e=A.value.packageSizeSortType,t=[...V.value].sort((e,t)=>(e.name||``).localeCompare(t.name||``));return(e?t.sort((t,n)=>e===`asc`?t.transformedCodeSize-n.transformedCodeSize:n.transformedCodeSize-t.transformedCodeSize):t).filter(e=>!P.value.selected||P.value.selected.some(t=>t.match(e.type)))});function U(e){A.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=ne({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!T.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&E.replace({query:{...T.query,package:`${e.meta?.name}@${e.meta?.version}`}})},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){A.value.packageViewType===`treemap`&&(K.value=new j(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return n(()=>A.value.packageViewType,()=>{Z()}),(e,t)=>{let n=ee,a=re,o=Q,u=N,h=ue,v=k,y=M;return c(L)?(r(),s(n,{key:0})):(r(),w(`div`,de,[S(`div`,fe,[b(a,{modelValue:P.value,"onUpdate:modelValue":t[0]||=e=>P.value=e,rules:D},{default:i(()=>[S(`div`,pe,[t[2]||=S(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(r(!0),w(f,null,m(B.value,e=>(r(),w(`button`,{key:e.value,"btn-action":``,class:C(c(A).packageViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[S(`div`,{class:C(e.icon)},null,2),l(` `+d(e.label),1)],10,$))),128))])]),_:1},8,[`modelValue`])]),S(`div`,me,[c(A).packageViewType===`table`?(r(),w(f,{key:0},[b(o,{packages:H.value,session:p.session},null,8,[`packages`,`session`]),S(`div`,he,[S(`span`,ge,d(V.value.length)+` of `+d(c(F)?.length||0),1)])],64)):c(A).packageViewType===`treemap`?(r(),w(f,{key:1},[c(K)&&H.value.length?(r(),s(I,{key:0,graph:c(K),selected:c(J),onSelect:t[1]||=e=>c(X)(e)},{default:i(({selected:e,options:t,onSelect:n})=>[b(u,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(r(),w(`span`,_e,` No Data `))],64)):c(A).packageViewType===`duplicate-packages`?(r(),s(h,{key:2,packages:H.value,session:p.session},null,8,[`packages`,`session`])):g(``,!0)]),b(y,{"hover-x":_.x,"hover-y":_.y},{default:i(()=>[c(q)?.meta?(r(),w(`div`,ve,[S(`div`,ye,d(c(q).text),1),S(`div`,be,[b(v,{bytes:c(q).size,percent:!1},null,8,[`bytes`])])])):g(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{xe as default};
@@ -1 +0,0 @@
1
- import{At as e,Ht as t,Tt as n,en as r,h as i,in as a,it as o,kt as s,lt as c,mt as l,st as u,tn as d,tt as f,ut as p}from"./DilC1n1-.js";var m={flex:`col gap-2`,"max-w-90vw":``,"min-w-30vw":``,border:`~ base rounded-xl`,"bg-glass":``},h={key:0},g=[`title`],_=[`checked`,`onChange`],v={"text-sm":``},y=[`title`],b={key:0,op75:``,"i-ph-selection-slash-duotone":``},x={key:1,op75:``,"i-ph-selection-plus-duotone":``},S=l({__name:`SearchPanel`,props:{rules:{},modelValue:{default:()=>({search:``,selected:null})},selectedContainerClass:{default:``}},emits:[`update:modelValue`],setup(l,{emit:S}){let C=l,w=i(C,`modelValue`,S);function T(e){let{modelValue:t}=C;return t?.selected?t.selected.includes(e.name):!0}function E(e){let{rules:t}=C;w?.value?.selected||(w.value.selected=t.map(e=>e.name)),w.value.selected.includes(e.name)?w.value.selected=w.value.selected.filter(t=>t!==e.name):w.value.selected.push(e.name),w?.value?.selected.length===C.rules.length&&(w.value.selected=null)}function D(){w?.value?.selected?.length===C.rules.length?w.value.selected=null:w?.value?.selected==null?w.value.selected=[]:w.value.selected=C.rules.map(e=>e.name).filter(e=>!w.value.selected?.includes(e))}function O(){w?.value?.selected?.length===0?w.value.selected=null:w.value.selected=[]}return(i,S)=>(n(),p(`div`,m,[l.modelValue.search===!1?c(``,!0):(n(),p(`div`,h,[t(u(`input`,{"onUpdate:modelValue":S[0]||=e=>r(w).search=e,p2:``,px4:``,"w-full":``,style:{outline:`none`},placeholder:`Search`},null,512),[[f,r(w).search]])])),l.rules.length?(n(),p(`div`,{key:1,class:d(l.selectedContainerClass),flex:`~ gap-2 wrap`,p2:``,border:`t base`},[(n(!0),p(o,null,s(l.rules,e=>(n(),p(`label`,{key:e.name,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e.description,class:d(T(e)?`bg-active`:`grayscale op50`)},[u(`input`,{type:`checkbox`,mr1:``,checked:T(e),onChange:t=>E(e)},null,40,_),u(`div`,{class:d(e.icon),"icon-catppuccin":``},null,2),u(`div`,v,a(e.description||e.name),1)],10,g))),128)),u(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:`Reverse Selection`,onClick:D},[...S[1]||=[u(`div`,{op75:``,"i-ph-selection-background-duotone":``},null,-1)]]),u(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:r(w).selected?.length===0?`Select All`:`Unselect All`,onClick:O},[r(w).selected?.length===0?(n(),p(`div`,b)):(n(),p(`div`,x))],8,y)],2)):c(``,!0),e(i.$slots,`default`)]))}}),C=Object.assign(S,{__name:`DataSearchPanel`});export{C as t};
@@ -1 +0,0 @@
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"./DilC1n1-.js";import{t as b}from"./C-y-Odbu.js";import"./DQtLZa7C.js";import"./C9D_b0Ie.js";import"./Q3kWpZ_f.js";import{r as x}from"./jTMXHbZw.js";import{t as S}from"./DtmncGDc.js";import{i as C,t as w}from"./Bgr0OgUi.js";import"./PBmE2B7U.js";import{t as T}from"./BOwnK8_Y.js";import{t as E}from"./BfzWwsgH.js";import{t as D}from"./C3ZA0X0n.js";var O={flex:``,pb2:``},k=d({__name:`FlatList`,props:{chunks:{},session:{}},setup(n){return(r,a)=>{let o=x,s=C,c=E;return e(),i(c,{items:n.chunks,"key-prop":`chunk_id`},{default:t(({item:n})=>[m(`div`,O,[p(s,{chunk:n,link:``,"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{"left-after":t(()=>[n.is_initial?(e(),i(o,{key:0,text:`initial`})):u(``,!0)]),_:2},1032,[`chunk`])])]),_:1},8,[`items`])}}}),A=Object.assign(k,{__name:`ChunksFlatList`}),j={op50:``,"font-mono":``,w12:``},M=[`title`],N={flex:`~ gap-1 items-center`},P=d({__name:`Graph`,props:{session:{},chunks:{}},setup(r){let c=r,l=f(()=>c.chunks),d=n();return T({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=D;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`,j,`#`+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,M),c[1]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,N,[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`])}}}),F=Object.assign(P,{__name:`ChunksGraph`}),I={key:1,relative:``,"max-h-screen":``,"of-hidden":``},L={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},R={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},z=[`onClick`],B={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},V={key:1,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},H=d({__name:`chunks`,props:{session:{}},setup(t){let n=t,d=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],v=y(),{state:b,isLoading:x}=r(async()=>await v.value.$call(`vite:rolldown:get-chunks-graph`,{session:n.session.id}),null),C=f(()=>b.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function T(e){S.value.chunkViewType=e}return(n,r)=>{let f=_,v=A,y=w,E=F;return a(x)?(e(),i(f,{key:0})):(e(),g(`div`,I,[m(`div`,L,[m(`div`,R,[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=>T(e.value)},[m(`div`,{class:h(e.icon)},null,2),o(` `+s(e.label),1)],10,z)),64))])]),a(S).chunkViewType===`list`?(e(),g(`div`,B,[p(v,{session:t.session,chunks:C.value},null,8,[`session`,`chunks`])])):u(``,!0),a(S).chunkViewType===`detailed-list`?(e(),g(`div`,V,[(e(!0),g(c,null,l(a(b),n=>(e(),i(y,{key:n.id,border:`~ base rounded-lg`,p3:``,chunk:n,chunks:a(b),session:t.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):a(S).chunkViewType===`graph`?(e(),i(E,{key:2,session:t.session,chunks:C.value},null,8,[`session`,`chunks`])):u(``,!0)]))}}});export{H as default};
@@ -1 +0,0 @@
1
- import{Tt as e,Vt as t,en as n,it as r,lt as i,mt as a,ot as o,pt as s,st as c,ut as l}from"./DilC1n1-.js";import{n as u}from"./DQtLZa7C.js";import{t as d}from"./SUptJs8y.js";import{r as f}from"./DtmncGDc.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=a({__name:`BuildMetrics`,props:{metrics:{}},setup(a){let h=a,g=o(()=>{let e=h.metrics,t=e?.resolve_ids.reduce((e,t)=>(e+=t.duration,e),0),n=e?.loads?.reduce((e,t)=>(e+=t.duration,e),0),r=e?.transforms.reduce((e,t)=>(e+=t.duration,e),0);return{resolveIds:t,loads:n,transforms:r,total:t+n+r}}),_=o(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=o(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(a,o)=>{let h=d,y=f;return e(),l(`div`,p,[s(h,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${n(u)(g.value.resolveIds,!0)}`},{default:t(()=>[...o[0]||=[c(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s(h,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${n(u)(g.value.loads,!0)}`},{default:t(()=>[...o[1]||=[c(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s(h,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${n(u)(g.value.transforms,!0)}`},{default:t(()=>[...o[2]||=[c(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),o[6]||=c(`span`,{op40:``},`|`,-1),s(h,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${n(u)(g.value.total,!0)}`},{default:t(()=>[...o[3]||=[c(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(e(),l(r,{key:0},[o[5]||=c(`span`,{op40:``},`|`,-1),c(`div`,m,[s(y,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),o[4]||=c(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),s(y,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):i(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
@@ -1 +0,0 @@
1
- import{Tt as e,in as t,it as n,kt as r,mt as i,st as a,ut as o}from"./DilC1n1-.js";var s={flex:`~ gap5`,"w-full":``,border:`b base`,pb3:``},c={"font-mono":``},l={"font-mono":``},u=[`datetime`],d=i({__name:`SessionMeta`,props:{sessions:{}},setup(i){return(d,f)=>(e(),o(`div`,s,[(e(!0),o(n,null,r(i.sessions,n=>(e(),o(`div`,{key:n.id,"flex-1":``,border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_140px_2fr] max-lg:cols-[max-content_80px_2fr] gap-2 items-center`},[f[0]||=a(`div`,{class:`i-ph-hash-duotone`},null,-1),a(`div`,null,t(n.title),1),a(`div`,c,[a(`span`,null,t(n.id),1)]),f[1]||=a(`div`,{class:`i-ph-clock-duotone`},null,-1),f[2]||=a(`div`,null,` Created At `,-1),a(`div`,l,[a(`time`,{datetime:n.createdAt.toISOString()},t(n.createdAt.toLocaleString()),9,u)])]))),128))]))}}),f=Object.assign(d,{__name:`CompareSessionMeta`});export{f as t};
@@ -1 +0,0 @@
1
- import{At as e,Lt as t,Tt as n,mt as r,st as i,ut as a,zt as o}from"./DilC1n1-.js";var s={class:`px4`,flex:`~ col gap2`},c=r({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(r,{emit:c}){let l=r,u=c,d=t(`el`);return o(()=>d.value?.append(l.graph.el)),(t,o)=>(n(),a(`div`,s,[e(t.$slots,`default`,{selected:r.selected,options:r.graph.options,onSelect:o[0]||=e=>u(`select`,e)},()=>[o[1]||=i(`div`,{border:`b base`,py2:``,"min-h-10":``},null,-1)]),i(`div`,{ref_key:`el`,ref:d},null,512)]))}}),l=Object.assign(c,{__name:`ChartTreemap`});export{l as t};
@@ -1 +0,0 @@
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"./DilC1n1-.js";import{t as y}from"./C-y-Odbu.js";import{t as b}from"./BLS3T3KA.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.$call(`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};
@@ -1 +0,0 @@
1
- import{$t as e,Dt as t,Jt as n,Xt as r,Yt as i,en as a,f as o,ot as s,s as c,u as l,vt as u,xt as d}from"./DilC1n1-.js";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(t,{wheel:r=!0,minScale:i=.5,maxScale:a=2}={}){let o=n(1);function s(n,r,s){let c=e(t);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=r??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=o.value;o.value=Math.max(i,Math.min(a,_+n));let v=o.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function c(t){if(e(r)){t.preventDefault();let e=.2;s(t.deltaY<0?e:e*-1,t.clientX,t.clientY)}else t.ctrlKey&&(t.preventDefault(),s(t.deltaY*.004*-1,t.clientX,t.clientY))}function u(e=.2){s(e)}function d(e=.2){s(e*-1)}return l(t,`wheel`,c),{scale:o,zoom:s,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):Z({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let a=.4,c=n(),l=n(window.innerWidth),u=n(window.innerHeight),d=i(new Map),f=i(new Set),p=n(!0),m=i(new Map),h=r([]),g=r([]),_=i(new Map),v=i(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=o(),{scale:x,zoomIn:S,zoomOut:C}=me(c,{wheel:b,minScale:a,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:c,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:l,height:u,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:c,width:l,height:u,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:a,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return u(X)}function ve(e){let{nodesRefMap:t,container:r,calculateGraph:i,collapsedNodes:o}=u(X),s=n(!1);function c(e,n){d(()=>{d(()=>{let i=t.get(e);if(i&&n&&r.value){let e=r.value.getBoundingClientRect(),t=i.getBoundingClientRect(),a=t.left-e.left-n.x,o=t.top-e.top-n.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function l(e){if(s.value)return;s.value=!0;let n=t.get(e),a=null;if(n&&r.value){let e=r.value.getBoundingClientRect(),t=n.getBoundingClientRect();a={x:t.left-e.left,y:t.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&c(e,a),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),i(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,a(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:l,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=u(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=u(X),t=n(!1),r=0,i=0;function a(){l(e,`mousedown`,n=>{let a=e.value.getBoundingClientRect(),o=a.right-n.clientX,s=a.bottom-n.clientY;o<=20||s<=20||(t.value=!0,r=e.value.scrollLeft+n.pageX,i=e.value.scrollTop+n.pageY)}),l(e,`contextmenu`,e=>e.preventDefault()),l(`mouseleave`,()=>t.value=!1),l(`mouseup`,()=>t.value=!1),l(`mousemove`,n=>{t.value&&(n.preventDefault(),e.value.scrollLeft=r-n.pageX,e.value.scrollTop=i-n.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
@@ -1 +0,0 @@
1
- import{Bt as e,Jt as t,Nt as n,S as r,Tt as i,Vt as a,ct as o,en as s,ft as c,in as l,it as u,kt as d,lt as f,mt as p,ot as m,pt as h,st as g,tn as _,ut as v,y}from"./DilC1n1-.js";import{t as b}from"./C-y-Odbu.js";import{t as x}from"./BLS3T3KA.js";import"./C9D_b0Ie.js";import"./Q3kWpZ_f.js";import{r as S,t as C}from"./jTMXHbZw.js";import{t as w}from"./DabxYzqu.js";import"./DnpfwSMy.js";import{t as T}from"./Bt0_xjwR.js";var E={flex:`~ col gap-2`},D={flex:`~ gap-1 items-center`,"font-mono":``,op50:``,"text-sm":``},O={"font-mono":``,"font-sm":``},k={key:0,flex:`~ gap-1 items-center`},A={key:0,op50:``,"text-xs":``,border:`~ base rounded-md`,px1:``,"font-mono":``},j=p({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(e,{emit:t}){let r=e,p=t;function y(e){return T(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let x=m(()=>{let e=r.selectedSessions?.[0];return e?y(e):``});function j(e){return x.value&&x.value!==y(e)}function M(e){r.sessionMode===`compare`&&!j(e)&&p(`select`,e)}return(t,r)=>{let p=C,m=S,y=w;return i(),v(`div`,E,[(i(!0),v(u,null,d(e.sessions,t=>(i(),v(`div`,{key:t.id,flex:`~ row gap-2`,relative:``},[(i(),o(n(e.sessionMode===`list`?s(b):`div`),{to:`/session/${t.id}`,border:`~ rounded-md`,class:_(e.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[e.selectedSessionIds.includes(t.id)?`border-active`:`border-base`,j(t)||e.selectedSessions.length===2&&!e.selectedSessionIds.includes(t.id)?`op50`:`hover:bg-active`]),flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(t)},{default:a(()=>[g(`div`,D,[r[0]||=g(`div`,{"i-ph-hash-duotone":``},null,-1),c(` `+l(t.id),1)]),g(`div`,O,l(t.meta.cwd),1),t.meta.inputs[0]?(i(),v(`div`,k,[h(p,{id:t.meta.inputs[0].filename,cwd:t.meta.cwd},null,8,[`id`,`cwd`]),h(m,{text:t.meta.inputs[0].name||`entry`},null,8,[`text`]),t.meta.inputs.length>1?(i(),v(`span`,A,` +`+l(t.meta.inputs.length-1),1)):f(``,!0)])):f(``,!0),h(y,{timestamp:t.timestamp,pt2:``,"text-sm":``,op50:``},null,8,[`timestamp`])]),_:2},1032,[`to`,`class`,`onClick`]))]))),128))])}}}),M=Object.assign(j,{__name:`PanelSessionSelector`}),N={p4:``,flex:`~ col gap-4`,"items-center":``,"justify-center":``,relative:``},P={op50:``},F={relative:``,flex:`~ col gap3 items-center`},I={fixed:``,"top-5":``,"right-5":``,flex:`~ col gap2`},L={flex:`~ row justify-around`,w20:``,h8:``,border:`~ base rounded-8`,"of-hidden":``},R=[`title`,`onClick`],z={key:0,fixed:``,"bottom-5":``,"right-5":``,border:`~ base rounded-2`,w100:``,"max-lg:w85":``,"bg-glass":``,"z-panel-content":``},B={flex:`~ justify-center`,p2:``},V={key:1,op80:``,"text-sm":``},H=p({__name:`index`,async setup(n){let p,S,C=t(`list`),w=[{label:`Session List`,icon:`i-ph-list-bullets-duotone`,value:`list`},{label:`Session Compare`,icon:`i-ph-git-diff-duotone`,value:`compare`}],T=t([]),E=m(()=>T.value.map(e=>e.id).sort()),D=m(()=>[...T.value].sort((e,t)=>e.timestamp-t.timestamp).map((e,t)=>({...e,createdAt:new Date(e.timestamp),title:t===0?`Session A`:`Session B`}))),O=y(),k=([p,S]=e(()=>O.value.$call(`vite:rolldown:list-sessions`)),p=await p,S(),p);function A(e){E.value.includes(e.id)?T.value=T.value.filter(t=>t.id!==e.id):T.value=[...T.value,e]}return(e,t)=>{let n=r,p=M,m=x,y=b;return i(),v(`div`,N,[h(n),g(`p`,P,l(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1),g(`div`,F,[h(p,{"session-mode":C.value,sessions:s(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),g(`div`,I,[g(`div`,L,[(i(),v(u,null,d(w,e=>g(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:_({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[g(`span`,{class:_([e.icon,`text-sm`])},null,2)],10,R)),64))])]),T.value.length>0&&C.value===`compare`?(i(),v(`div`,z,[h(m,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),g(`div`,B,[T.value.length===2?(i(),o(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:a(()=>[...t[0]||=[c(` Compare `,-1)]]),_:1},8,[`to`])):(i(),v(`div`,V,` Select one more session to compare. `))])])):f(``,!0)])}}});export{H as default};
@@ -1 +0,0 @@
1
- import{_t as e,mt as t}from"./DilC1n1-.js";import{r as n}from"./C9D_b0Ie.js";import{n as r}from"./DnpfwSMy.js";var i=t({name:`HighlightedPackageName`,props:{name:{type:String,required:!0}},setup(t){return()=>{let i=t.name;if(!r(i))return e(`span`,{class:`text-gray-500`},i);let a=n(i);if(i.startsWith(`@`)){let[t,n]=i.split(`/`);return[e(`span`,{style:`color: ${a}`},t),e(`span`,{style:`color: ${a}`,class:`op50`},`/`),e(`span`,{style:`color: ${a}`},n)]}return e(`span`,{style:`color: ${a}`},i)}}});export{i as t};
@@ -1 +0,0 @@
1
- import{Tt as e,Vt as t,ct as n,en as r,ft as i,in as a,it as o,kt as s,lt as c,mt as l,ot as u,pt as d,st as f,tn as p,ut as m}from"./DilC1n1-.js";import{t as h}from"./C-y-Odbu.js";import"./DQtLZa7C.js";import"./C9D_b0Ie.js";import"./Q3kWpZ_f.js";import{r as g,t as _}from"./jTMXHbZw.js";import{t as v}from"./DyBWaXpL.js";import{t as y}from"./SUptJs8y.js";import{t as b}from"./PBmE2B7U.js";var x={flex:`~ col gap-2`,p6:``},S={flex:`~ gap-2`},C={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_160px_2fr] gap-2 items-center`},w={"font-mono":``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ gap-2`},k=l({__name:`index`,props:{session:{}},setup(l){let k=l,A=u(()=>[{title:`Build ID`,value:k.session.id,icon:`i-ph-hash-duotone`},{title:`Created At`,value:new Date(k.session.meta.timestamp),icon:`i-ph-clock-duotone`},{title:`Build Duration`,value:k.session.buildDuration,icon:`i-ph-timer-duotone`,type:`duration`},{title:`Directory`,value:k.session.meta.cwd,icon:`i-ph-folder-duotone`},{title:`Total Modules`,value:k.session.modulesList.length,icon:`i-ph-files-duotone`},{title:`Plugins`,value:k.session.meta.plugins.length,icon:`i-ph-plugs-duotone`},{title:`Platform`,value:k.session.meta.platform,icon:`i-ph-cpu-duotone`,type:`badge`},{title:`Format`,value:k.session.meta.format,icon:`i-ph-file-duotone`,type:`badge`}]);return(u,j)=>{let M=h,N=g,P=y,F=b,I=_;return e(),m(`div`,x,[f(`div`,S,[d(M,{"btn-action":``,to:{path:`/`}},{default:t(()=>[...j[0]||=[f(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),i(` Re-select Session `,-1)]]),_:1})]),j[1]||=f(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),f(`div`,C,[(e(!0),m(o,null,s(A.value,t=>(e(),m(o,{key:t.title},[f(`div`,{class:p(t.icon)},null,2),f(`div`,null,a(t.title),1),f(`div`,w,[t.value instanceof Date?(e(),m(`time`,{key:0,datetime:t.value.toISOString()},a(t.value.toLocaleString()),9,T)):t.type===`badge`?(e(),n(N,{key:1,text:String(t.value),py1:``},null,8,[`text`])):t.type===`duration`?(e(),n(P,{key:2,duration:+t.value},null,8,[`duration`])):typeof t.value==`number`?(e(),n(F,{key:3,number:t.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(e(),m(`span`,E,a(t.value),1))])],64))),128))]),j[2]||=f(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),f(`div`,D,[(e(!0),m(o,null,s(k.session.meta.inputs,t=>(e(),m(o,{key:t},[d(N,{text:t.name||``},null,8,[`text`]),d(I,{id:t.filename||``,session:l.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=f(`div`,{op50:``,"mt-4":``},` Views `,-1),f(`div`,O,[(e(!0),m(o,null,s(r(v),r=>(e(),m(o,{key:r.to},[r.category===`session`?(e(),n(M,{key:0,"btn-action":``,to:{path:r.to},flex:`~ col`,"min-w-40":``,p4:``},{default:t(()=>[f(`div`,{class:p(r.icon),"text-2xl":``},null,2),i(` `+a(r.title),1)]),_:2},1032,[`to`])):c(``,!0)],64))),128))])])}}});export{k as default};
@@ -1,2 +0,0 @@
1
- import{At as e,Et as t,Gt as n,Ht as r,Mt as i,Nt as a,Ot as o,Pt as s,Tt as c,Ut as l,Vt as u,Yt as d,_t as f,bt as p,ct as m,en as h,gt as g,it as _,jt as v,kt as y,lt as b,mt as x,nn as S,pt as C,rn as w,tn as T,ut as E,xt as D}from"./DilC1n1-.js";function ee(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var O;function k(){k.init||(k.init=!0,O=ee()!==-1)}var A={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){k(),D(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,O&&this.$el.appendChild(e),e.data=`about:blank`,O||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!O&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},j=l(`data-v-b329ee4c`);o(`data-v-b329ee4c`);var te={class:`resize-observer`,tabindex:`-1`};t(),A.render=j((e,t,n,r,i,a)=>(c(),m(`div`,te))),A.__scopeId=`data-v-b329ee4c`,A.__file=`src/components/ResizeObserver.vue`;function M(e){"@babel/helpers - typeof";return M=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},M(e)}function ne(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),e}function P(e){return ie(e)||ae(e)||oe(e)||se()}function ie(e){if(Array.isArray(e))return F(e)}function ae(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function oe(e,t){if(e){if(typeof e==`string`)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}}function F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function se(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e){return typeof e==`function`?{callback:e}:e}function le(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(o){if(a=[...arguments].slice(1),!(r&&o===i)){var s=n.leading;typeof s==`function`&&(s=s(o,i)),(!r||o!==i)&&s&&e.apply(void 0,[o].concat(P(a))),i=o,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[o].concat(P(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function I(e,t){if(e===t)return!0;if(M(e)===`object`){for(var n in e)if(!I(e[n],t[n]))return!1;return!0}return!1}var ue=function(){function e(t,n,r){ne(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return re(e,[{key:`createObserver`,value:function(e,t){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=ce(e),this.callback=function(e,t){n.options.callback(e,t),e&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=(this.options.throttleOptions||{}).leading;this.callback=le(this.callback,this.options.throttle,{leading:function(e){return r===`both`||r===`visible`&&e||r===`hidden`&&!e}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(e){var t=e[0];if(e.length>1){var r=e.find(function(e){return e.isIntersecting});r&&(t=r)}if(n.callback){var i=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(i===n.oldResult)return;n.oldResult=i,n.callback(i,t)}},this.options.intersection),D(function(){n.observer&&n.observer.observe(n.el)})}}},{key:`destroyObserver`,value:function(){this.observer&&=(this.observer.disconnect(),null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:`threshold`,get:function(){return this.options.intersection&&typeof this.options.intersection.threshold==`number`?this.options.intersection.threshold:0}}]),e}();function L(e,t,n){var r=t.value;r&&(typeof IntersectionObserver>`u`?console.warn(`[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill`):e._vue_visibilityState=new ue(e,r,n))}function R(e,t,n){var r=t.value,i=t.oldValue;if(!I(r,i)){var a=e._vue_visibilityState;if(!r){z(e);return}a?a.createObserver(r,n):L(e,{value:r},n)}}function z(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var B={beforeMount:L,updated:R,unmounted:z};function V(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get(`*`)||[]).slice().map(function(e){e(t,n)})}}}var H={itemsLimit:1e3},de=/(auto|scroll)/;function U(e,t){return e.parentNode===null?t:U(e.parentNode,t.concat([e]))}var W=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},fe=function(e){return W(e,`overflow`)+W(e,`overflow-y`)+W(e,`overflow-x`)},pe=function(e){return de.test(fe(e))};function G(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=U(e.parentNode,[]),n=0;n<t.length;n+=1)if(pe(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function K(e){"@babel/helpers - typeof";return K=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},K(e)}var q={items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:function(e){return[`vertical`,`horizontal`].includes(e)}},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`}};function J(){return this.items.length&&K(this.items[0])!==`object`}var Y=!1;if(typeof window<`u`){Y=!1;try{var X=Object.defineProperty({},`passive`,{get:function(){Y=!0}});window.addEventListener(`test`,null,X)}catch{}}var me=0,Z={name:`RecycleScroller`,components:{ResizeObserver:A},directives:{ObserveVisibility:B},props:{...q,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},typeField:{type:String,default:`type`},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`resize`,`visible`,`hidden`,`update`,`scroll-start`,`scroll-end`],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){let e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize,i=1e4,a=0,o;for(let s=0,c=t.length;s<c;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:J,itemIndexByKey(){let{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error(`[vue-recycle-scroller] You must provide an itemSize when using gridItems`)},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){let e=this.$_lastUpdateScrollPosition;typeof e==`number`&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,r,i,a){let o=d({item:r,position:0,nr:n({id:me++,index:t,used:!0,key:i,type:a})});return e.push(o),o},unuseView(e,t=!1){let n=this.$_unusedViews,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit(`resize`),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;let e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;let{continuous:e}=this.updateVisibleItems(!1,!0);e||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit(`visible`),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit(`hidden`))},updateVisibleItems(e,t=!1){let n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,c=this.items,l=c.length,u=this.sizes,d=this.$_views,f=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey,h,g,_,v,y;if(!l)h=g=v=y=_=0;else if(this.$_prerender)h=v=0,g=y=Math.min(this.prerender,c.length),_=null;else{let e=this.getScroll();if(t){let t=e.start-this.$_lastUpdateScrollPosition;if(t<0&&(t=-t),n===null&&t<a||t<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=e.start;let i=this.buffer;e.start-=i,e.end+=i;let o=0;if(this.$refs.before&&(o=this.$refs.before.scrollHeight,e.start-=o),this.$refs.after){let t=this.$refs.after.scrollHeight;e.end+=t}if(n===null){let t,n=0,r=l-1,i=~~(l/2),a;do a=i,t=u[i].accumulator,t<e.start?n=i:i<l-1&&u[i+1].accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),h=i,_=u[l-1].accumulator,g=i;g<l&&u[g].accumulator<e.end;g++);for(g===-1?g=c.length-1:(g++,g>l&&(g=l)),v=h;v<l&&o+u[v].accumulator<e.start;v++);for(y=v;y<l&&o+u[y].accumulator<e.end;y++);}else{h=~~(e.start/n*r);let t=h%r;h-=t,g=Math.ceil(e.end/n*r),v=Math.max(0,Math.floor((e.start-o)/n*r)),y=Math.floor((e.end-o)/n*r),h<0&&(h=0),g>l&&(g=l),v<0&&(v=0),y>l&&(y=l),_=Math.ceil(l/r)*n}}g-h>H.itemsLimit&&this.itemsLimitError(),this.totalSize=_;let b,x=h<=this.$_endIndex&&g>=this.$_startIndex;if(x)for(let t=0,n=p.length;t<n;t++)b=p[t],b.nr.used&&(e&&(b.nr.index=m[b.item[s]]),(b.nr.index==null||b.nr.index<h||b.nr.index>=g)&&this.unuseView(b));let S=x?null:new Map,C,w,T;for(let e=h;e<g;e++){C=c[e];let t=s?C[s]:C;if(t==null)throw Error(`Key is ${t} on item (keyField is '${s}')`);if(b=d.get(t),!n&&!u[e].size){b&&this.unuseView(b);continue}w=C[o];let a=f.get(w),l=!1;if(!b)x?b=a&&a.length?a.pop():this.addView(p,e,C,t,w):(T=S.get(w)||0,(!a||T>=a.length)&&(b=this.addView(p,e,C,t,w),this.unuseView(b,!0),a=f.get(w)),b=a[T],S.set(w,T+1)),d.delete(b.nr.key),b.nr.used=!0,b.nr.index=e,b.nr.key=t,b.nr.type=w,d.set(t,b),l=!0;else if(!b.nr.used&&(b.nr.used=!0,l=!0,a)){let e=a.indexOf(b);e!==-1&&a.splice(e,1)}b.item=C,l&&(e===c.length-1&&this.$emit(`scroll-end`),e===0&&this.$emit(`scroll-start`)),n===null?(b.position=u[e-1].accumulator,b.offset=0):(b.position=Math.floor(e/r)*n,b.offset=e%r*i)}return this.$_startIndex=h,this.$_endIndex=g,this.emitUpdate&&this.$emit(`update`,h,g,v,y),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=G(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){let{$el:e,direction:t}=this,n=t===`vertical`,r;if(this.pageMode){let t=e.getBoundingClientRect(),i=n?t.height:t.width,a=-(n?t.top:t.left),o=n?window.innerHeight:window.innerWidth;a<0&&(o+=a,a=0),a+o>i&&(o=i-a),r={start:a,end:a+o}}else r=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener(`scroll`,this.handleScroll,Y?{passive:!0}:!1),this.listenerTarget.addEventListener(`resize`,this.handleResize)},removeListeners(){this.listenerTarget&&=(this.listenerTarget.removeEventListener(`scroll`,this.handleScroll),this.listenerTarget.removeEventListener(`resize`,this.handleResize),null)},scrollToItem(e){let t,n=this.gridItems||1;t=this.itemSize===null?e>0?this.sizes[e-1].accumulator:0:Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){let t=this.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n,r,i;if(this.pageMode){let a=G(this.$el),o=a.tagName===`HTML`?0:a[t.scroll],s=a.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+c}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,this.$el),console.log(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}},he={key:0,ref:`before`,class:`vue-recycle-scroller__slot`},ge={key:1,ref:`after`,class:`vue-recycle-scroller__slot`};function _e(t,n,o,l,d,f){let h=v(`ResizeObserver`),g=i(`observe-visibility`);return r((c(),E(`div`,{class:T([`vue-recycle-scroller`,{ready:d.ready,"page-mode":o.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:n[0]||=(...e)=>f.handleScroll&&f.handleScroll(...e)},[t.$slots.before?(c(),E(`div`,he,[e(t.$slots,`before`)],512)):b(`v-if`,!0),(c(),m(a(o.listTag),{ref:`wrapper`,style:w({[t.direction===`vertical`?`minHeight`:`minWidth`]:d.totalSize+`px`}),class:T([`vue-recycle-scroller__item-wrapper`,o.listClass])},{default:u(()=>[(c(!0),E(_,null,y(d.pool,n=>(c(),m(a(o.itemTag),p({key:n.nr.id,style:d.ready?{transform:`translate${t.direction===`vertical`?`Y`:`X`}(${n.position}px) translate${t.direction===`vertical`?`X`:`Y`}(${n.offset}px)`,width:o.gridItems?`${t.direction===`vertical`&&o.itemSecondarySize||o.itemSize}px`:void 0,height:o.gridItems?`${t.direction===`horizontal`&&o.itemSecondarySize||o.itemSize}px`:void 0}:null,class:[`vue-recycle-scroller__item-view`,[o.itemClass,{hover:!o.skipHover&&d.hoverKey===n.nr.key}]]},s(o.skipHover?{}:{mouseenter:()=>{d.hoverKey=n.nr.key},mouseleave:()=>{d.hoverKey=null}})),{default:u(()=>[e(t.$slots,`default`,{item:n.item,index:n.nr.index,active:n.nr.used})]),_:2},1040,[`style`,`class`]))),128)),e(t.$slots,`empty`)]),_:3},8,[`style`,`class`])),t.$slots.after?(c(),E(`div`,ge,[e(t.$slots,`after`)],512)):b(`v-if`,!0),C(h,{onNotify:f.handleResize},null,8,[`onNotify`])],34)),[[g,f.handleVisibilityChange]])}Z.render=_e,Z.__file=`src/components/RecycleScroller.vue`;var Q={name:`DynamicScroller`,components:{RecycleScroller:Z},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...q,minItemSize:{type:[Number,String],required:!0}},emits:[`resize`,`visible`],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:J,itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,id:s,size:c})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){let n=this.$el.scrollTop,r=0,i=0,a=Math.min(e.length,t.length);for(let o=0;o<a&&!(r>=n);o++)r+=t[o].size||this.minItemSize,i+=e[o].size||this.minItemSize;let o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=V()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit(`resize`)},onScrollerVisible(){this.$_events.emit(`vscroll:update`,{force:!1}),this.$emit(`visible`)},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit(`vscroll:update`,{force:!0})},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){let n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;let t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function ve(t,n,r,i,a,o){let s=v(`RecycleScroller`);return c(),m(s,p({ref:`scroller`,items:o.itemsWithSize,"min-item-size":r.minItemSize,direction:t.direction,"key-field":`id`,"list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:o.onScrollerResize,onVisible:o.onScrollerVisible}),{default:u(({item:n,index:r,active:i})=>[e(t.$slots,`default`,S(g({item:n.item,index:r,active:i,itemWithSize:n})))]),before:u(()=>[e(t.$slots,`before`)]),after:u(()=>[e(t.$slots,`after`)]),empty:u(()=>[e(t.$slots,`empty`)]),_:3},16,[`items`,`min-item-size`,`direction`,`list-tag`,`item-tag`,`onResize`,`onVisible`])}Q.render=ve,Q.__file=`src/components/DynamicScroller.vue`;var $={name:`DynamicScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:`div`}},emits:[`resize`],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on(`vscroll:update`,this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off(`vscroll:update`,this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&=(this.$_watchData(),null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){let e=this.$el.offsetWidth,t=this.$el.offsetHeight;this.applyWidthHeight(e,t)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit(`resize`,this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||=(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,!0))},unobserveSize(){this.vscrollResizeObserver&&(this.$_sizeObserved&&=(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,!1))},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return f(this.tag,this.$slots.default())}};$.__file=`src/components/DynamicScrollerItem.vue`;var ye=x({__name:`VirtualList`,props:{items:{},keyProp:{}},setup(t){return(n,r)=>(c(),m(h(Q),{items:t.items,"min-item-size":30,"key-field":t.keyProp,"page-mode":``},{default:u(({item:r,active:i,index:a})=>[C(h($),{item:r,active:i,"data-index":a},{default:u(()=>[e(n.$slots,`default`,p({key:r[t.keyProp]},{item:r,index:a,active:i}))]),_:2},1032,[`item`,`active`,`data-index`])]),_:3},8,[`items`,`key-field`]))}}),be=Object.assign(ye,{__name:`DataVirtualList`});export{be as t};
@@ -1 +0,0 @@
1
- import{At as e,Ft as t,Nt as n,Tt as r,Vt as i,W as a,c as o,ct as s,en as c,ft as l,in as u,it as d,kt as f,lt as p,mt as m,ot as h,pt as g,st as _,ut as v,x as y,y as b,yt as x}from"./DilC1n1-.js";import{t as S}from"./C-y-Odbu.js";import{r as C,t as w}from"./jTMXHbZw.js";import{r as T}from"./DtmncGDc.js";import{t as E}from"./PBmE2B7U.js";var D=[`title`],O={flex:`~ items-center gap-2`},k={op50:``,"font-mono":``},A=[`title`],j=[`title`],M=m({__name:`BaseInfo`,props:{chunk:{},link:{type:Boolean,default:!1}},setup(t){let o=t,d=a(),f=h(()=>Array.isArray(o.chunk.imports)?o.chunk.imports.length:o.chunk.imports),p=h(()=>Array.isArray(o.chunk.modules)?o.chunk.modules.length:o.chunk.modules);return(a,o)=>{let m=C;return r(),s(n(t.link?c(S):`div`),{to:t.link?typeof t.link==`string`?t.link:{path:c(d).path,query:{chunk:t.chunk.chunk_id}}:void 0,flex:`~ gap-3 items-center`},{default:i(()=>[_(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${t.chunk.chunk_id}`},[e(a.$slots,`icon`,{},()=>[o[0]||=_(`div`,{"i-ph-shapes-duotone":``},null,-1)]),_(`div`,null,u(t.chunk.name||`[unnamed]`),1),g(m,{text:t.chunk.reason},null,8,[`text`]),e(a.$slots,`left-after`)],8,D),o[3]||=_(`div`,{"flex-auto":``},null,-1),_(`div`,O,[_(`span`,k,`#`+u(t.chunk.chunk_id),1),_(`div`,{flex:`~ gap-1 items-center`,title:`${f.value} imports`},[o[1]||=_(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),l(` `+u(f.value),1)],8,A),_(`div`,{flex:`~ gap-1 items-center`,title:`${p.value} modules`},[o[2]||=_(`div`,{"i-ph-package-duotone":``},null,-1),l(` `+u(p.value),1)],8,j)]),e(a.$slots,`default`)]),_:3},8,[`to`])}}}),N=Object.assign(M,{__name:`ChunksBaseInfo`}),P={flex:`~ gap-2 items-center`},F=m({__name:`BaseInfo`,props:{asset:{}},setup(e){return(t,n)=>{let i=T,a=C;return r(),v(`div`,P,[n[0]||=_(`div`,{"i-catppuccin-java-class-abstract":``},null,-1),_(`div`,null,u(e.asset.filename),1),g(i,{bytes:e.asset.size,"text-sm":``},null,8,[`bytes`]),g(a,{text:e.asset.type},null,8,[`text`])])}}}),I=Object.assign(F,{__name:`AssetsBaseInfo`}),L={relative:``},R={key:0,"pointer-events-none":``,absolute:``,"left-0":``,"right-0":``,"bottom-0":``,"bg-gradient-more":``,"h-30":``,flex:`~ justify-center`},z=m({__name:`ExpandableContainer`,props:x({list:{}},{count:{default:20},countModifiers:{}}),emits:[`update:count`],setup(n){let i=n,a=t(n,`count`),o=a.value,s=h(()=>i.list.slice(0,a.value));return(t,l)=>{let u=E;return r(),v(`div`,L,[e(t.$slots,`default`,{items:s.value}),n.list.length>a.value?(r(),v(`div`,R,[_(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[0]||=e=>a.value=Math.round(a.value+c(o))},[l[2]||=_(`div`,{"i-ri:arrow-down-double-line":``},null,-1),l[3]||=_(`span`,null,`More`,-1),g(u,{prefix:`+`,number:Math.min(Math.round(c(o)),i.list.length-a.value),"rounded-full":``,"text-sm":``},null,8,[`number`])]),_(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[1]||=e=>a.value=i.list.length},[l[4]||=_(`div`,{"i-ph-arrows-out-line-vertical-duotone":``},null,-1),l[5]||=_(`span`,null,`All`,-1),g(u,{number:i.list.length,"rounded-full":``,"text-sm":``},null,8,[`number`])])])):p(``,!0)])}}}),B=Object.assign(z,{__name:`DisplayExpandableContainer`}),V={key:0,"i-ph-file-duotone":``},H={key:1,"i-ph-lightning-duotone":``},U=m({__name:`Imports`,props:{imports:{}},setup(e){return(t,n)=>{let a=C,o=N,c=B;return r(),s(c,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.imports},{default:i(({items:e})=>[(r(!0),v(d,null,f(e,(e,t)=>(r(),v(d,{key:t},[e?(r(),s(o,{key:0,chunk:e,link:``,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},{icon:i(()=>[e.kind===`import-statement`?(r(),v(`div`,V)):p(``,!0),e.kind===`dynamic-import`?(r(),v(`div`,H)):p(``,!0)]),"left-after":i(()=>[g(a,{text:e.kind},null,8,[`text`])]),_:2},1032,[`chunk`])):p(``,!0)],64))),128))]),_:1},8,[`list`])}}}),W=Object.assign(U,{__name:`ChunksImports`}),G={flex:`~ col gap-3`},K={key:1,"text-sm":``,op50:``,flex:`~ items-center`,title:`Total size of imports`},q={open:`true`},J={open:`true`},Y={op50:``},X={key:0,open:`true`},Z={op50:``},Q={key:1,open:`true`},$={op50:``},ee=m({__name:`ChunkDetails`,props:{chunk:{},session:{},showDetails:{type:Boolean,default:!0},chunks:{}},setup(t){let n=t,m=h(()=>{let e=new Map;for(let t of n.session.modulesList)e.set(t.id,t);return e});function x(e){return e.reduce((e,t)=>{let n=m.value.get(t);if(!n||!n.buildMetrics?.transforms?.length)return e;let r=n.buildMetrics.transforms;return e+r[r.length-1].transformed_code_size},0)}let E=h(()=>x(n.chunk.modules)),D=a(),O=b(),{state:k,isLoading:A}=o(async()=>{if(!n.chunks)return await O.value.$call(`vite:rolldown:get-chunks-graph`,{session:n.session.id})},null),j=h(()=>n.chunks||k.value),M=h(()=>n.chunk.imports.map(e=>{let t=j.value?.find(t=>t.chunk_id===e.chunk_id);return{...e,name:t?.name||`[unnamed]`,reason:t?.reason||`common`,imports:t?.imports.length||0,modules:t?.modules.length||0,size:x(t?.modules||[])}})),P=h(()=>j.value?.filter(e=>e.imports.some(e=>e.chunk_id===n.chunk.chunk_id)).map(e=>({...e.imports.find(e=>e.chunk_id===n.chunk.chunk_id),chunk_id:e.chunk_id,name:e.name||`[unnamed]`,reason:e.reason||`common`,imports:e.imports.length||0,modules:e.modules.length||0}))||[]);return(n,a)=>{let o=C,m=T,h=N,b=I,x=S,O=w,k=B,j=y,F=W;return r(),v(`div`,G,[g(h,{chunk:t.chunk},{"left-after":i(()=>[t.chunk.is_initial?(r(),s(o,{key:0,text:`initial`})):p(``,!0),g(m,{bytes:E.value,"text-sm":``,title:`Chunk size`},null,8,[`bytes`]),M.value.length?(r(),v(`div`,K,[a[0]||=l(` (`,-1),g(m,{bytes:M.value.reduce((e,t)=>e+t.size,0)},null,8,[`bytes`]),a[1]||=l(`) `,-1)])):p(``,!0)]),default:i(()=>[e(n.$slots,`default`)]),_:3},8,[`chunk`]),t.showDetails?(r(),v(d,{key:0},[_(`details`,q,[a[2]||=_(`summary`,{op50:``},` Assets `,-1),g(x,{border:`~ base rounded-lg`,px2:``,mt2:``,py1:``,"min-w-fit":``,flex:`~`,to:{path:c(D).path,query:{asset:t.chunk.asset?.filename}}},{default:i(()=>[g(b,{asset:{...t.chunk.asset,type:`asset`}},null,8,[`asset`])]),_:1},8,[`to`])]),_(`details`,J,[_(`summary`,Y,[_(`span`,null,`Modules (`+u(t.chunk.modules.length)+`)`,1)]),g(k,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:t.chunk.modules},{default:i(({items:e})=>[(r(!0),v(d,null,f(e,e=>(r(),s(O,{id:e,key:e,session:t.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))]),_:1},8,[`list`])]),c(A)?(r(),s(j,{key:0})):(r(),v(d,{key:1},[t.chunk.imports.length?(r(),v(`details`,X,[_(`summary`,Z,[_(`span`,null,`Imports (`+u(t.chunk.imports.length)+`)`,1)]),g(F,{imports:M.value},null,8,[`imports`])])):p(``,!0),P.value.length?(r(),v(`details`,Q,[_(`summary`,$,[_(`span`,null,`Importers (`+u(P.value.length)+`)`,1)]),g(F,{imports:P.value},null,8,[`imports`])])):p(``,!0)],64))],64)):p(``,!0)])}}}),te=Object.assign(ee,{__name:`DataChunkDetails`});export{N as i,B as n,I as r,te as t};
@@ -1 +0,0 @@
1
- import{Nt as e,Tt as t,_t as n,ct as r,mt as i}from"./DilC1n1-.js";import{r as a}from"./C9D_b0Ie.js";var o=i({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(i){let o=i,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let e=o.compact?c:s;for(let t of e)if(o.name.startsWith(t))return o.compact?n(`span`,o.name.slice(t.length)):n(`span`,[n(`span`,{class:`op50`},t),n(`span`,o.name.slice(t.length))]);let t=o.name.split(`:`);return t.length>1?n(`span`,[n(`span`,{style:{color:a(t[0])}},`${t[0]}:`),n(`span`,t.slice(1).join(`:`))]):n(`span`,o.name)}return(n,i)=>(t(),r(e(l)))}}),s=Object.assign(o,{__name:`DisplayPluginName`});export{s as t};
@@ -1 +0,0 @@
1
- import{$ as e,B as t,Ct as n,G as r,H as i,I as a,J as o,Jt as s,K as c,L as l,Q as u,R as d,St as f,U as p,X as m,Xt as h,Y as g,Z as _,_t as v,jt as y,mt as b,ot as x,q as S,z as C}from"./DilC1n1-.js";var w=(...e)=>e.find(e=>e!==void 0);function T(e){let t=e.componentName||`NuxtLink`;function o(e){return typeof e==`string`&&e.startsWith(`#`)}function u(t,n,r){let i=r??e.trailingSlash;if(!t||i!==`append`&&i!==`remove`)return t;if(typeof t==`string`)return D(t,i);let a=`path`in t&&t.path!==void 0?t.path:n(t).path;return{...t,name:void 0,path:D(a,i)}}function T(t){let n=r(),a=S(),s=x(()=>!!t.target&&t.target!==`_self`),c=x(()=>{let e=t.to||t.href||``;return typeof e==`string`&&g(e,{acceptRelative:!0})}),l=y(`RouterLink`),d=l&&typeof l!=`string`?l.useLink:void 0,f=x(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||c.value}),h=x(()=>{let e=t.to||t.href||``;return f.value?e:u(e,n.resolve,t.trailingSlash)}),_=f.value?void 0:d?.({...t,to:h}),v=x(()=>{let r=t.trailingSlash??e.trailingSlash;if(!h.value||c.value||o(h.value))return h.value;if(f.value){let e=typeof h.value==`object`&&`path`in h.value?p(h.value):h.value;return D(typeof e==`object`?n.resolve(e).href:e,r)}return typeof h.value==`object`?n.resolve(h.value)?.href??null:D(m(a.app.baseURL,h.value),r)});return{to:h,hasTarget:s,isAbsoluteUrl:c,isExternal:f,href:v,isActive:_?.isActive??x(()=>h.value===n.currentRoute.value.path),isExactActive:_?.isExactActive??x(()=>h.value===n.currentRoute.value.path),route:_?.route??x(()=>n.resolve(h.value)),async navigate(e){await i(v.value,{replace:t.replace,external:f.value||s.value})}}}return b({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:T,setup(t,{slots:i}){let u=r(),{to:m,href:g,navigate:b,isExternal:x,hasTarget:S,isAbsoluteUrl:E}=T(t),D=h(!1),k=s(null),j=e=>{k.value=t.custom?e?.$el?.nextElementSibling:e?.$el};function M(n){return!D.value&&(typeof t.prefetchOn==`string`?t.prefetchOn===n:t.prefetchOn?.[n]??e.prefetchOn?.[n])&&(t.prefetch??e.prefetch)!==!1&&t.noPrefetch!==!0&&t.target!==`_blank`&&!A()}async function N(e=c()){if(D.value)return;D.value=!0;let t=typeof m.value==`string`?m.value:x.value?p(m.value):u.resolve(m.value).fullPath,n=x.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n).catch(()=>{}),!x.value&&!S.value&&a(m.value,u).catch(()=>{})])}if(M(`visibility`)){let e=c(),t,r=null;n(()=>{let n=O();l(()=>{t=C(()=>{k?.value?.tagName&&(r=n.observe(k.value,async()=>{r?.(),r=null,await N(e)}))})})}),f(()=>{t&&d(t),r?.(),r=null})}return()=>{if(!x.value&&!S.value&&!o(m.value)){let n={ref:j,to:m.value,activeClass:t.activeClass||e.activeClass,exactActiveClass:t.exactActiveClass||e.exactActiveClass,replace:t.replace,ariaCurrentValue:t.ariaCurrentValue,custom:t.custom};return t.custom||(M(`interaction`)&&(n.onPointerenter=N.bind(null,void 0),n.onFocus=N.bind(null,void 0)),D.value&&(n.class=t.prefetchedClass||e.prefetchedClass),n.rel=t.rel||void 0),v(y(`RouterLink`),n,i.default)}let n=t.target||null,r=w(t.noRel?``:t.rel,e.externalRelAttribute,E.value||S.value?`noopener noreferrer`:``)||null;return t.custom?i.default?i.default({href:g.value,navigate:b,prefetch:N,get route(){if(!g.value)return;let e=new URL(g.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return _(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:g.value}},rel:r,target:n,isExternal:x.value||S.value,isActive:!1,isExactActive:!1}):null:v(`a`,{ref:k,href:g.value||null,rel:r,target:n,onClick:e=>{if(!(x.value||S.value))return e.preventDefault(),t.replace?u.replace(g.value):u.push(g.value)}},i.default?.())}}})}var E=T(o);function D(t,n){let r=n===`append`?u:e;return g(t)&&!t.startsWith(`http`)?t:r(t,!0)}function O(){let e=c();if(e._observer)return e._observer;let t=null,n=new Map;return e._observer={observe:(e,r)=>(t||=new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),n.set(e,r),t.observe(e),()=>{n.delete(e),t?.unobserve(e),n.size===0&&(t?.disconnect(),t=null)})}}var k=/2g/;function A(){let e=navigator.connection;return!!(e&&(e.saveData||k.test(e.effectiveType)))}export{E as t};
@@ -1 +0,0 @@
1
- import{At as e,Ct as t,Ht as n,Jt as r,Mt as i,Rt as a,Tt as o,Vt as s,bt as c,ct as l,en as u,et as d,in as f,it as p,kt as m,lt as h,mt as g,nn as _,pt as v,rn as y,rt as b,st as x,tn as S,ut as C}from"./DilC1n1-.js";import{a as w,i as ee,n as T,o as E,r as D,s as O}from"./BOwnK8_Y.js";var k=g({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(e){let t=r(!1),n=null;return a(()=>e.content,()=>{n&&clearTimeout(n),t.value=!0,n=setTimeout(()=>{t.value=!1},e.hideInterval)}),(n,r)=>(o(),l(d,{"enter-active-class":`transition-opacity duration-200 ease-in`,"leave-active-class":`transition-opacity duration-500 ease-out`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:s(()=>[t.value?(o(),C(`div`,_(c({key:0},n.$attrs)),f(e.content),17)):h(``,!0)]),_:1}))}}),A=Object.assign(k,{__name:`DisplayTimeoutView`}),j=[`width`,`height`],M=[`d`],N={class:`w-4`},P=[`disabled`,`title`,`onClick`],F={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},I={"w-10":``,flex:`~ items-center justify-center`},L={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},R=[`disabled`],z=[`disabled`],B=[`disabled`],V=[`disabled`],H=g({__name:`ModuleGraph`,props:{modules:{},session:{},expandControls:{type:Boolean,default:!0}},setup(r){let s=r,{isFirstCalculateGraph:c,childToParentMap:l,collapsedNodes:d,calculateGraph:f,container:g,width:_,height:k,scale:H,nodes:U,links:W,spacing:G,nodesRefMap:K}=E(),{isGrabbing:q,init:J}=ee(),{zoomIn:Y,zoomOut:X,ZOOM_MIN:Z,ZOOM_MAX:Q}=w(),{isGraphNodeToggling:$,toggleNode:te,expandAll:ne,collapseAll:re}=O({modules:s.modules});return t(()=>{J(),a(()=>s.modules,()=>{c.value=!0,d.clear(),l.clear(),f()},{immediate:!0})}),(t,a)=>{let s=A,c=i(`tooltip`);return o(),C(`div`,{ref_key:`container`,ref:g,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:S(u(q)?`cursor-grabbing`:``)},[x(`div`,{style:y({width:`${u(_)*u(H)}px`,height:`${u(k)*u(H)}px`})},[x(`div`,{flex:`~ items-center justify-center`,style:y({transform:`scale(${u(H)})`,transformOrigin:`0 0`})},[x(`div`,{absolute:``,"left-0":``,"top-0":``,style:y({width:`${u(_)}px`,height:`${u(k)}px`}),class:`bg-dots`},null,4),(o(),C(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:u(_),height:u(k)},[x(`g`,null,[(o(!0),C(p,null,m(u(W),n=>e(t.$slots,`link`,{key:n.id,link:n,d:u(T)(n,u(G)),linkClass:u(D)(n)},()=>[(o(),C(`path`,{key:n.id,d:u(T)(n,u(G)),class:S(u(D)(n)),fill:`none`},null,10,M))])),128))])],8,j)),(o(!0),C(p,null,m(u(U),n=>(o(),C(p,{key:n.data.module.id},[n.data.module.id===`~root`?h(``,!0):(o(),C(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:y({left:`${n.x}px`,top:`${n.y}px`,transform:`translate(-50%, -50%)`})},[x(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:y({minWidth:`${u(u(G).width)}px`,maxWidth:`${u(u(G).width)}px`,maxHeight:`${u(u(G).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[e(t.$slots,`default`,{node:n,nodesRefMap:u(K)})],4),x(`div`,N,[n.data.hasChildren?(o(),C(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:S([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":u($),"hover:bg-active":!u($)}]),disabled:u($),title:n.data.expanded?`Collapse`:`Expand`,onClick:b(e=>u(te)(n.data.module.id),[`stop`])},[x(`div`,{class:S([`text-primary h-4`,[n.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,P)):h(``,!0)])],4))],64))),128))],4)],4),x(`div`,F,[x(`div`,I,[v(s,{content:`${Math.round(u(H)*100)}%`,class:`text-sm`},null,8,[`content`])]),x(`div`,L,[r.expandControls?(o(),C(p,{key:0},[n((o(),C(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:u($),class:S({"op50 cursor-not-allowed":u($),"hover:bg-active":!u($)}),title:`Expand All`,onClick:a[0]||=e=>u(ne)()},[...a[4]||=[x(`div`,{class:`i-ph-arrows-out-simple-duotone`},null,-1)]],10,R)),[[c,`Expand All`,void 0,{left:!0}]]),n((o(),C(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:u($),class:S({"op50 cursor-not-allowed":u($),"hover:bg-active":!u($)}),title:`Collapse All`,onClick:a[1]||=e=>u(re)()},[...a[5]||=[x(`div`,{class:`i-ph-arrows-in-simple-duotone`},null,-1)]],10,z)),[[c,`Collapse All`,void 0,{left:!0}]]),a[6]||=x(`div`,{border:`t base`,my1:``},null,-1)],64)):h(``,!0),n((o(),C(`button`,{disabled:u(H)>=u(Q),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom In (Ctrl + =)`,onClick:a[2]||=e=>u(Y)()},[...a[7]||=[x(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,B)),[[c,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),n((o(),C(`button`,{disabled:u(H)<=u(Z),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom Out (Ctrl + -)`,onClick:a[3]||=e=>u(X)()},[...a[8]||=[x(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,V)),[[c,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),U=Object.assign(H,{__name:`DisplayModuleGraph`});export{U as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./DilC1n1-.js";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};
@@ -1 +0,0 @@
1
- function e(e){return Array.isArray?Array.isArray(e):d(e)===`[object Array]`}var t=1/0;function n(e){if(typeof e==`string`)return e;let n=e+``;return n==`0`&&1/e==-t?`-0`:n}function r(e){return e==null?``:n(e)}function i(e){return typeof e==`string`}function a(e){return typeof e==`number`}function o(e){return e===!0||e===!1||c(e)&&d(e)==`[object Boolean]`}function s(e){return typeof e==`object`}function c(e){return s(e)&&e!==null}function l(e){return e!=null}function u(e){return!e.trim().length}function d(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var f=`Incorrect 'index' type`,p=e=>`Invalid value for key ${e}`,m=e=>`Pattern length exceeds max of ${e}.`,h=e=>`Missing ${e} property in key`,g=e=>`Property 'weight' in key '${e}' must be a positive integer`,_=Object.prototype.hasOwnProperty,v=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=y(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function y(t){let n=null,r=null,a=null,o=1,s=null;if(i(t)||e(t))a=t,n=b(t),r=x(t);else{if(!_.call(t,`name`))throw Error(h(`name`));let e=t.name;if(a=e,_.call(t,`weight`)&&(o=t.weight,o<=0))throw Error(g(e));n=b(e),r=x(e),s=t.getFn}return{path:n,id:r,weight:o,src:a,getFn:s}}function b(t){return e(t)?t:t.split(`.`)}function x(t){return e(t)?t.join(`.`):t}function S(t,n){let s=[],c=!1,u=(t,n,d)=>{if(l(t))if(!n[d])s.push(t);else{let f=t[n[d]];if(!l(f))return;if(d===n.length-1&&(i(f)||a(f)||o(f)))s.push(r(f));else if(e(f)){c=!0;for(let e=0,t=f.length;e<t;e+=1)u(f[e],n,d+1)}else n.length&&u(f,n,d+1)}};return u(t,i(n)?n.split(`.`):n,0),c?s:s[0]}var C={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},w={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ee={location:0,threshold:.6,distance:100},te={useExtendedSearch:!1,getFn:S,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},T={...w,...C,...ee,...te},E=/[^ ]+/g;function ne(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(E).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var D=class{constructor({getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){this.norm=ne(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();i(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!l(e)||u(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((n,a)=>{let o=n.getFn?n.getFn(t):this.getFn(t,n.path);if(l(o)){if(e(o)){let t=[],n=[{nestedArrIndex:-1,value:o}];for(;n.length;){let{nestedArrIndex:r,value:a}=n.pop();if(l(a))if(i(a)&&!u(a)){let e={v:a,i:r,n:this.norm.get(a)};t.push(e)}else e(a)&&a.forEach((e,t)=>{n.push({nestedArrIndex:t,value:e})})}r.$[a]=t}else if(i(o)&&!u(o)){let e={v:o,n:this.norm.get(o)};r.$[a]=e}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};function O(e,t,{getFn:n=T.getFn,fieldNormWeight:r=T.fieldNormWeight}={}){let i=new D({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(y)),i.setSources(t),i.create(),i}function re(e,{getFn:t=T.getFn,fieldNormWeight:n=T.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new D({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function k(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=T.distance,ignoreLocation:a=T.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function A(e=[],t=T.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var j=32;function M(e,t,n,{location:r=T.location,distance:i=T.distance,threshold:a=T.threshold,findAllMatches:o=T.findAllMatches,minMatchCharLength:s=T.minMatchCharLength,includeMatches:c=T.includeMatches,ignoreLocation:l=T.ignoreLocation}={}){if(t.length>j)throw Error(m(j));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,h=f,g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,h))>-1;){let e=k(t,{currentLocation:v,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),h=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}h=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=x;for(;a<s;)k(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:x=s,s=Math.floor((x-a)/2+a);x=s;let c=Math.max(1,f-s+1),m=o?d:Math.min(f+s,d)+u,v=Array(m+2);v[m+1]=(1<<r)-1;for(let a=m;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(g&&(_[o]=+!!s),v[a]=(v[a+1]<<1|1)&s,r&&(v[a]|=(y[a+1]|y[a])<<1|1|y[a+1]),v[a]&S&&(b=k(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),b<=p)){if(p=b,h=o,h<=f)break;c=Math.max(1,2*f-h)}}if(k(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;y=v}let C={isMatch:h>=0,score:Math.max(.001,b)};if(g){let e=A(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function ie(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var N=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),P=class{constructor(e,{location:t=T.location,threshold:n=T.threshold,distance:r=T.distance,includeMatches:i=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:o=T.minMatchCharLength,isCaseSensitive:s=T.isCaseSensitive,ignoreDiacritics:c=T.ignoreDiacritics,ignoreLocation:l=T.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?N(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:ie(e),startIndex:t})},d=this.pattern.length;if(d>j){let e=0,t=d%j,n=d-t;for(;e<n;)u(this.pattern.substr(e,j),e),e+=j;if(t){let e=d-j;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?N(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=M(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},F=class{constructor(e){this.pattern=e}static isMultiMatch(e){return I(e,this.multiRegex)}static isSingleMatch(e){return I(e,this.singleRegex)}search(){}};function I(e,t){let n=e.match(t);return n?n[1]:null}var ae=class extends F{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},oe=class extends F{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},se=class extends F{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ce=class extends F{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},L=class extends F{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},R=class extends F{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},z=class extends F{constructor(e,{location:t=T.location,threshold:n=T.threshold,distance:r=T.distance,includeMatches:i=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:o=T.minMatchCharLength,isCaseSensitive:s=T.isCaseSensitive,ignoreDiacritics:c=T.ignoreDiacritics,ignoreLocation:l=T.ignoreLocation}={}){super(e),this._bitapSearch=new P(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},B=class extends F{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}},V=[ae,B,se,ce,R,L,oe,z],H=V.length,U=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,W=`|`;function le(e,t={}){return e.split(W).map(e=>{let n=e.trim().split(U).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<H;){let e=V[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<H;){let e=V[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var ue=new Set([z.type,B.type]),de=class{constructor(e,{isCaseSensitive:t=T.isCaseSensitive,ignoreDiacritics:n=T.ignoreDiacritics,includeMatches:r=T.includeMatches,minMatchCharLength:i=T.minMatchCharLength,ignoreLocation:a=T.ignoreLocation,findAllMatches:o=T.findAllMatches,location:s=T.location,threshold:c=T.threshold,distance:l=T.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?N(e):e,this.pattern=e,this.query=le(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?N(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;ue.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},G=[];function fe(...e){G.push(...e)}function K(e,t){for(let n=0,r=G.length;n<r;n+=1){let r=G[n];if(r.condition(e,t))return new r(e,t)}return new P(e,t)}var q={AND:`$and`,OR:`$or`},J={PATH:`$path`,PATTERN:`$val`},Y=e=>!!(e[q.AND]||e[q.OR]),pe=e=>!!e[J.PATH],me=t=>!e(t)&&s(t)&&!Y(t),X=e=>({[q.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Z(t,n,{auto:r=!0}={}){let a=t=>{let o=Object.keys(t),s=pe(t);if(!s&&o.length>1&&!Y(t))return a(X(t));if(me(t)){let e=s?t[J.PATH]:o[0],a=s?t[J.PATTERN]:t[e];if(!i(a))throw Error(p(e));let c={keyId:x(e),pattern:a};return r&&(c.searcher=K(a,n)),c}let c={children:[],operator:o[0]};return o.forEach(n=>{let r=t[n];e(r)&&r.forEach(e=>{c.children.push(a(e))})}),c};return Y(t)||(t=X(t)),a(t)}function Q(e,{ignoreFieldNorm:t=T.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function he(e,t){let n=e.matches;t.matches=[],l(n)&&n.forEach(e=>{if(!l(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ge(e,t){t.score=e.score}function _e(e,t,{includeMatches:n=T.includeMatches,includeScore:r=T.includeScore}={}){let i=[];return n&&i.push(he),r&&i.push(ge),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var $=class{constructor(e,t={},n){this.options={...T,...t},this.options.useExtendedSearch,this._keyStore=new v(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof D))throw Error(f);this._myIndex=t||O(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:o,sortFn:s,ignoreFieldNorm:c}=this.options,l=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Q(l,{ignoreFieldNorm:c}),o&&l.sort(s),a(t)&&t>-1&&(l=l.slice(0,t)),_e(l,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=K(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!l(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=Z(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===q.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(l(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=K(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!l(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:t,value:n,searcher:r}){if(!l(n))return[];let i=[];if(e(n))n.forEach(({v:e,i:n,n:a})=>{if(!l(e))return;let{isMatch:o,score:s,indices:c}=r.searchIn(e);o&&i.push({score:s,key:t,value:e,idx:n,norm:a,indices:c})});else{let{v:e,n:a}=n,{isMatch:o,score:s,indices:c}=r.searchIn(e);o&&i.push({score:s,key:t,value:e,norm:a,indices:c})}return i}};$.version=`7.1.0`,$.createIndex=O,$.parseIndex=re,$.config=T,$.parseQuery=Z,fe(de);export{$ as t};