@vitejs/devtools-rolldown 0.0.0-alpha.31 → 0.0.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +45 -48
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/6TUvuKw-.js +1 -0
- package/dist/public/_nuxt/B9ATRPQ7.js +1 -0
- package/dist/public/_nuxt/B9O9mwcz.js +1 -0
- package/dist/public/_nuxt/BYYOuuQ8.js +1 -0
- package/dist/public/_nuxt/Bb89bWCj.js +1 -0
- package/dist/public/_nuxt/BlOp-aa0.js +1 -0
- package/dist/public/_nuxt/By3-Oigm.js +1 -0
- package/dist/public/_nuxt/C3g8Qo0F.js +1 -0
- package/dist/public/_nuxt/C4ZBTBfN.js +1 -0
- package/dist/public/_nuxt/C56jC-Rb.js +1 -0
- package/dist/public/_nuxt/{DWqpanCf.js → CBrsTh9c.js} +1 -1
- package/dist/public/_nuxt/CMcxTY2l.js +1 -0
- package/dist/public/_nuxt/CavFgEiy.js +1 -0
- package/dist/public/_nuxt/Ckamtj1Q.js +1 -0
- package/dist/public/_nuxt/Cs9u2aM3.js +1 -0
- package/dist/public/_nuxt/D1SGgpeJ.js +1 -0
- package/dist/public/_nuxt/D4Jp6GBh.js +1 -0
- package/dist/public/_nuxt/D68gMgDN.js +33 -0
- package/dist/public/_nuxt/D8SB5Fj6.js +1 -0
- package/dist/public/_nuxt/DG5LouYQ.js +1 -0
- package/dist/public/_nuxt/DGPFtmYw.js +1 -0
- package/dist/public/_nuxt/DKKnluDw.js +1 -0
- package/dist/public/_nuxt/DTB_fvd1.js +1 -0
- package/dist/public/_nuxt/Daqw8s3u.js +1 -0
- package/dist/public/_nuxt/{DataVirtualList.lGV_3v2U.css → DataVirtualList.BMBI8CMU.css} +1 -1
- package/dist/public/_nuxt/DdkVNznP.js +1 -0
- package/dist/public/_nuxt/DicSvcoI.js +2 -0
- package/dist/public/_nuxt/DmCbLhAV.js +1 -0
- package/dist/public/_nuxt/Dy45_BSj.js +1 -0
- package/dist/public/_nuxt/EoT68z9_.js +1 -0
- package/dist/public/_nuxt/OLyU6pOh.js +1 -0
- package/dist/public/_nuxt/Vyw3NrOX.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/64b3b8a7-2713-4a0b-a273-f1b096d1de48.json +1 -0
- package/dist/public/_nuxt/{entry.DdvO8KcZ.css → entry.DQK1Fncc.css} +1 -1
- package/dist/public/_nuxt/error-404.2Q-XfgR7.css +1 -0
- package/dist/public/_nuxt/error-500.3QnkDFAn.css +1 -0
- package/dist/public/_nuxt/hK0Xv1bA.js +1 -0
- package/dist/public/_nuxt/vcHT-ufV.js +1 -0
- package/dist/public/_nuxt/zkWX764r.js +4 -0
- package/dist/public/index.html +1 -1
- package/package.json +10 -10
- package/dist/public/_nuxt/3sT_Mqwt.js +0 -1
- package/dist/public/_nuxt/BEUq-UW3.js +0 -4
- package/dist/public/_nuxt/BEpRBuI9.js +0 -1
- package/dist/public/_nuxt/BG553MBL.js +0 -1
- package/dist/public/_nuxt/BItNXqww.js +0 -1
- package/dist/public/_nuxt/BMh47W-N.js +0 -1
- package/dist/public/_nuxt/BMmSp6LE.js +0 -1
- package/dist/public/_nuxt/BdaRSTg9.js +0 -1
- package/dist/public/_nuxt/Bxdwnne9.js +0 -1
- package/dist/public/_nuxt/C0MXIEj-.js +0 -1
- package/dist/public/_nuxt/C2A6ZQPm.js +0 -1
- package/dist/public/_nuxt/C2Zt-inO.js +0 -1
- package/dist/public/_nuxt/CANF8ydB.js +0 -1
- package/dist/public/_nuxt/CBwDxyfP.js +0 -1
- package/dist/public/_nuxt/CKFsAdVO.js +0 -1
- package/dist/public/_nuxt/CPkXrqff.js +0 -1
- package/dist/public/_nuxt/CW-j5nS4.js +0 -1
- package/dist/public/_nuxt/CYKzVNOW.js +0 -1
- package/dist/public/_nuxt/CpJiZ7L0.js +0 -1
- package/dist/public/_nuxt/Cpi4HmhC.js +0 -1
- package/dist/public/_nuxt/CwTV8WCc.js +0 -1
- package/dist/public/_nuxt/DJuT7S78.js +0 -33
- package/dist/public/_nuxt/DKwP4h99.js +0 -1
- package/dist/public/_nuxt/DYSe0ST1.js +0 -1
- package/dist/public/_nuxt/DYuLlkFe.js +0 -2
- package/dist/public/_nuxt/DhDTn9QE.js +0 -1
- package/dist/public/_nuxt/Dt2e24SL.js +0 -1
- package/dist/public/_nuxt/KIwTgGRl.js +0 -1
- package/dist/public/_nuxt/PqwTuo4u.js +0 -1
- package/dist/public/_nuxt/aluAR0E9.js +0 -1
- package/dist/public/_nuxt/builds/meta/c3b49d3b-f6ca-40c5-9720-595d68833c92.json +0 -1
- package/dist/public/_nuxt/error-404.CsiTjEPF.css +0 -1
- package/dist/public/_nuxt/error-500.956VVnGk.css +0 -1
- package/dist/public/_nuxt/wHgnrW62.js +0 -1
- package/dist/public/_nuxt/wMowadUl.js +0 -1
- /package/dist/public/_nuxt/{DVE8edJM.js → BmEqTRfc.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Mt as n,Ot as r,at as i,ct as a,dt as o,en as s,ft as c,i as l,lt as u,ot as d,pt as f,qt as p,rn as m,rt as h,st as g,t as _,wt as v,zt as y}from"#entry";import{t as b}from"./CwTV8WCc.js";import{t as x}from"./CBwDxyfP.js";import{r as S,t as C}from"./CpJiZ7L0.js";import{t as w}from"./CW-j5nS4.js";import{t as T}from"./DWqpanCf.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=f({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(l,{emit:f}){let p=l,_=f;function y(e){return T(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let x=i(()=>{let e=p.selectedSessions?.[0];return e?y(e):``});function j(e){return x.value&&x.value!==y(e)}function M(e){p.sessionMode===`compare`&&!j(e)&&_(`select`,e)}return(i,f)=>{let p=C;return v(),u(`div`,E,[(v(!0),u(h,null,r(l.sessions,r=>(v(),u(`div`,{key:r.id,flex:`~ row gap-2`,relative:``},[(v(),g(n(l.sessionMode===`list`?e(b):`div`),{to:`/session/${r.id}`,border:`~ rounded-md`,class:s(l.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[l.selectedSessionIds.includes(r.id)?`border-active`:`border-base`,j(r)||l.selectedSessions.length===2&&!l.selectedSessionIds.includes(r.id)?`op50`:`hover:bg-active`]),flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(r)},{default:t(()=>[d(`div`,D,[f[0]||=d(`div`,{"i-ph-hash-duotone":``},null,-1),o(` `+m(r.id),1)]),d(`div`,O,m(r.meta.cwd),1),r.meta.inputs[0]?(v(),u(`div`,k,[c(p,{id:r.meta.inputs[0].filename,cwd:r.meta.cwd},null,8,[`id`,`cwd`]),c(S,{text:r.meta.inputs[0].name||`entry`},null,8,[`text`]),r.meta.inputs.length>1?(v(),u(`span`,A,` +`+m(r.meta.inputs.length-1),1)):a(``,!0)])):a(``,!0),c(w,{timestamp:r.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={key:0,op50:``},F={key:1,op50:``},I={relative:``,flex:`~ col gap3 items-center`},L={key:2,fixed:``,"top-5":``,"right-5":``,flex:`~ col gap2`},R={flex:`~ row justify-around`,w20:``,h8:``,border:`~ base rounded-8`,"of-hidden":``},z=[`title`,`onClick`],B={key:3,fixed:``,"bottom-5":``,"right-5":``,border:`~ base rounded-2`,w100:``,"max-lg:w85":``,"bg-glass":``,"z-panel-content":``},V={flex:`~ justify-center`,p2:``},H={key:1,op80:``,"text-sm":``},U=f({__name:`index`,async setup(n){let f,S,C=p(`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=p([]),E=i(()=>T.value.map(e=>e.id).sort()),D=i(()=>[...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=_(),k=([f,S]=y(()=>O.value.call(`vite:rolldown:list-sessions`)),f=await f,S(),f);function A(e){E.value.includes(e.id)?T.value=T.value.filter(t=>t.id!==e.id):T.value=[...T.value,e]}return(n,i)=>{let f=l,p=M,_=x,y=b;return v(),u(`div`,N,[c(f),e(k).length?(v(),u(`p`,P,m(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1)):(v(),u(`p`,F,` No sessions yet, run a build to get started. `)),d(`div`,I,[c(p,{"session-mode":C.value,sessions:e(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),e(k).length?(v(),u(`div`,L,[d(`div`,R,[(v(),u(h,null,r(w,e=>d(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:s({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[d(`span`,{class:s([e.icon,`text-sm`])},null,2)],10,z)),64))])])):a(``,!0),T.value.length>0&&C.value===`compare`?(v(),u(`div`,B,[c(_,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),d(`div`,V,[T.value.length===2?(v(),g(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:t(()=>[...i[0]||=[o(` Compare `,-1)]]),_:1},8,[`to`])):(v(),u(`div`,H,` Select one more session to compare. `))])])):a(``,!0)])}}});export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,at as n,ct as r,ft as i,lt as a,ot as o,pt as s,rt as c,wt as l}from"#entry";import{r as u}from"./CKFsAdVO.js";import{n as d,t as f}from"./Dt2e24SL.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=s({__name:`BuildMetrics`,props:{metrics:{}},setup(s){let h=s,g=n(()=>{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}}),_=n(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=n(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(n,s)=>{let h=u;return l(),a(`div`,p,[i(f,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${e(d)(g.value.resolveIds,!0)}`},{default:t(()=>[...s[0]||=[o(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),i(f,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${e(d)(g.value.loads,!0)}`},{default:t(()=>[...s[1]||=[o(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),i(f,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${e(d)(g.value.transforms,!0)}`},{default:t(()=>[...s[2]||=[o(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s[6]||=o(`span`,{op40:``},`|`,-1),i(f,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${e(d)(g.value.total,!0)}`},{default:t(()=>[...s[3]||=[o(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(l(),a(c,{key:0},[s[5]||=o(`span`,{op40:``},`|`,-1),o(`div`,m,[i(h,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),s[4]||=o(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),i(h,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):r(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ct as t,dt as n,en as r,kt as i,lt as a,pt as o,rn as s,wt as c}from"#entry";var l=o({__name:`DisplayNumberBadge`,props:{number:{},color:{default:`badge-color-gray op75`},icon:{},prefix:{},suffix:{},format:{default:`locale`}},setup(o){let l=o,u=e(()=>l.format===`percent`?Number(l.number).toLocaleString(void 0,{style:`percent`,minimumFractionDigits:2,maximumFractionDigits:2}):Number(l.number).toLocaleString());return(e,l)=>(c(),a(`div`,{class:r([o.color,`px-0.4em py-0.2em font-mono line-height-none flex items-center`])},[o.icon?(c(),a(`div`,{key:0,class:r([o.icon,`mr-1`])},null,2)):t(``,!0),n(` `+s(o.prefix||``)+s(u.value)+s(o.suffix||``)+` `,1),i(e.$slots,`after`)],2))}});export{l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Bt as e,Ot as t,St as n,U as r,at as i,ct as a,dt as o,en as s,ft as c,lt as l,ot as u,pt as d,qt as f,r as p,rn as m,rt as h,st as g,t as _,wt as v,yt as y}from"#entry";import{t as b}from"./CwTV8WCc.js";import{t as x}from"./CBwDxyfP.js";import{t as S}from"./D04G8HHr.js";var C=d({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,n=i(()=>t.previous===t.current),r=i(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(n.value?0:2)),a=i(()=>n.value?``:t.current>t.previous?`+`:`-`),o=i(()=>n.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(v(),l(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:s(o.value)},m(a.value)+m(r.value)+`% `,3))}}),w=Object.assign(C,{__name:`DisplayComparisonMetric`}),T=[`title`],E={flex:`~ gap-2`,"items-center":``},D={key:0},O={"font-semibold":``,"text-5":``,"font-mono":``},k={"font-semibold":``,"text-4":``,"font-mono":``},A={key:1},j={"font-semibold":``,"text-5":``,"font-mono":``},M=d({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,n=i(()=>t.format===`bytes`?S(t.current):t.current);return(t,r)=>{let i=w;return v(),l(h,null,[u(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[u(`div`,{class:s([e.icon,`text-xl`])},null,2),o(` `+m(e.name),1)],8,T),u(`div`,E,[e.format===`bytes`?(v(),l(`div`,D,[u(`span`,O,m(n.value[0]),1),u(`span`,k,m(n.value[1]),1)])):(v(),l(`div`,A,[u(`span`,j,m(n.value),1)])),e.previous>0&&e.current>0?(v(),g(i,{key:2,current:e.current,previous:e.previous},null,8,[`current`,`previous`])):a(``,!0)])],64)}}}),N=Object.assign(M,{__name:`CompareMetricCard`}),P={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},F={flex:`~ gap-2`},I={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},L={grid:`~ cols-6 gap5`,"w-full":``,pt3:``},R=d({__name:`index`,setup(a){let d=f(!1),m=r().params,S=_(),C=f([]),w=f([]);async function T(e){let t=await S.value.call(`vite:rolldown:get-packages`,{session:e}),n=t.filter(e=>e.duplicated);return{total:t.length,duplicated:n.length}}n(async()=>{d.value=!0;let e=m.sessions.split(`,`),[t,...n]=await Promise.all([S.value.call(`vite:rolldown:get-session-compare-summary`,{sessions:e}),...e.map(e=>T(e))]);C.value=t,w.value=n,d.value=!1});let E=i(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),D=i(()=>{let[e,t]=E.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:`Packages`,description:`Total number of packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.total??0,previous:w.value?.[0]?.total??0},{name:`Duplicated Packages`,description:`Total number of duplicated packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.duplicated??0,previous:w.value?.[0]?.duplicated??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(n,r)=>{let i=p,a=b,f=x,m=N;return d.value?(v(),g(i,{key:0})):(v(),l(`div`,P,[u(`div`,F,[c(a,{"btn-action":``,to:{path:`/`}},{default:e(()=>[...r[0]||=[u(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),o(` Re-select Session `,-1)]]),_:1})]),u(`div`,I,[r[1]||=u(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),c(f,{sessions:E.value},null,8,[`sessions`]),u(`div`,L,[(v(!0),l(h,null,t(D.value,(e,t)=>(v(),l(`div`,{key:e.name,class:s(t<2?`col-span-3`:`col-span-2`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[c(m,y({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,E as n,Ot as r,U as i,ct as a,f as o,ft as s,lt as c,ot as l,pt as u,r as d,rn as f,rt as p,st as m,t as h,wt as g}from"#entry";import"./CwTV8WCc.js";import{r as _,t as v}from"./CpJiZ7L0.js";import{t as y}from"./CW-j5nS4.js";import{t as b}from"./DYSe0ST1.js";var x={key:0},S={key:2},C={op50:``},w={key:3},T=[`textContent`],E=[`textContent`],D=u({__name:`RawEventsTable`,props:{events:{},fields:{default:()=>[`event_id`,`action`,`module_id`,`plugin_name`,`timestamp`,`content`,`*`]},session:{}},setup(i){let o=i;function u(e,t){let n=new Set(t);return n.has(`content`)&&n.add(`content`),n.has(`plugin_name`)&&n.add(`plugin_index`),Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))}function d(e){return e.action===`HookLoadCallEnd`||e.action===`HookTransformCallStart`||e.action===`HookTransformCallEnd`?e.content:null}return(h,D)=>{let O=v,k=b;return g(),c(p,null,[i.events.length?a(``,!0):(g(),c(`div`,x,[...D[0]||=[l(`div`,{p5:``,italic:``},` No events found `,-1)]])),l(`table`,null,[l(`tbody`,null,[(g(!0),c(p,null,r(o.events,h=>(g(),c(`tr`,{key:h.event_id},[(g(!0),c(p,null,r(o.fields,r=>(g(),c(`td`,{key:r,px2:``},[r===`module_id`?(g(),m(O,{key:0,id:`module_id`in h?h.module_id:``,session:i.session},null,8,[`id`,`session`])):r===`action`?(g(),m(_,{key:1,text:h.action},null,8,[`text`])):r===`plugin_name`&&`plugin_name`in h?(g(),c(`div`,S,[s(k,{"font-mono":``,name:h.plugin_name},null,8,[`name`]),l(`code`,C,`#`+f(h.plugin_id),1)])):r===`event_id`?(g(),c(`div`,w,f(h.event_id),1)):r===`content`&&d(h)?(g(),m(e(n),{key:4},{popper:t(()=>[l(`pre`,{p1:``,"text-sm":``,textContent:f(d(h))},null,8,T)]),default:t(()=>[D[1]||=l(`div`,{"i-ph-code":``},null,-1)]),_:2},1024)):r===`timestamp`&&`timestamp`in h?(g(),m(y,{key:5,"text-sm":``,timestamp:h.timestamp},null,8,[`timestamp`])):r===`*`?(g(),c(`pre`,{key:6,"text-sm":``,textContent:f(u(h,i.fields))},null,8,E)):a(``,!0)]))),128))]))),128))])])],64)}}}),O=Object.assign(D,{__name:`DataRawEventsTable`}),k={key:1},A=u({__name:`raw`,props:{session:{}},setup(t){let n=t,r=h(),u=i().query,f=o(async()=>await r.value.call(`vite:rolldown:get-module-raw-events`,{session:n.session.id,module:u.module}),{events:[]});return(n,r)=>{let i=d,o=O;return g(),c(p,null,[e(f).isLoading?(g(),m(i,{key:0})):a(``,!0),l(`div`,null,[e(f).isReady?(g(),m(o,{key:0,events:e(f).state.value.events,session:t.session},null,8,[`events`,`session`])):(g(),c(`div`,k,[s(i)]))])],64)}}});export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,A as t,Ct as n,D as r,F as i,It as a,Lt as o,M as s,N as c,O as l,Ot as u,P as d,Yt as f,Zt as p,a as m,at as h,bt as g,ct as _,it as v,j as y,k as b,kt as ee,lt as x,nn as S,ot as te,pt as ne,qt as C,rn as re,rt as ie,st as ae,wt as w}from"#entry";import{t as T}from"./D04G8HHr.js";import{t as oe}from"./CKFsAdVO.js";function E(){return typeof window<`u`}function D(e){return se(e)?(e.nodeName||``).toLowerCase():`#document`}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function k(e){return((se(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function se(e){return E()?e instanceof Node||e instanceof O(e).Node:!1}function A(e){return E()?e instanceof Element||e instanceof O(e).Element:!1}function j(e){return E()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function ce(e){return!E()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}var le=new Set([`inline`,`contents`]);function M(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=I(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!le.has(i)}var ue=new Set([`table`,`td`,`th`]);function de(e){return ue.has(D(e))}var fe=[`:popover-open`,`:modal`];function N(e){return fe.some(t=>{try{return e.matches(t)}catch{return!1}})}var pe=[`transform`,`translate`,`scale`,`rotate`,`perspective`],me=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],he=[`paint`,`layout`,`strict`,`content`];function ge(e){let t=P(),n=A(e)?I(e):e;return pe.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||me.some(e=>(n.willChange||``).includes(e))||he.some(e=>(n.contain||``).includes(e))}function _e(e){let t=R(e);for(;j(t)&&!F(t);){if(ge(t))return t;if(N(t))return null;t=R(t)}return null}function P(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var ve=new Set([`html`,`body`,`#document`]);function F(e){return ve.has(D(e))}function I(e){return O(e).getComputedStyle(e)}function L(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R(e){if(D(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ce(e)&&e.host||k(e);return ce(t)?t.host:t}function ye(e){let t=R(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&M(t)?t:ye(t)}function z(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ye(e),i=r===e.ownerDocument?.body,a=O(r);if(i){let e=be(a);return t.concat(a,a.visualViewport||[],M(r)?r:[],e&&n?z(e):[])}return t.concat(r,z(r,[],n))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=I(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=j(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=i(n)!==o||i(r)!==s;return c&&(n=o,r=s),{width:n,height:r,$:c}}function Se(e){return A(e)?e:e.contextElement}function B(e){let t=Se(e);if(!j(t))return y(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=xe(t),s=(o?i(n.width):n.width)/r,c=(o?i(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ce=y(0);function we(e){let t=O(e);return!P()||!t.visualViewport?Ce:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Te(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==O(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Se(e),o=y(1);t&&(r?A(r)&&(o=B(r)):o=B(e));let s=Te(a,n,r)?we(a):y(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){let e=O(a),t=r&&A(r)?O(r):r,n=e,i=be(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=I(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,f*=e.y,c+=a,l+=o,n=O(i),i=be(n)}}return d({width:u,height:f,x:c,y:l})}function H(e,t){let n=L(e).scrollLeft;return t?t.left+n:V(k(e)).left+n}function Ee(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function De(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=k(r),s=t?N(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=y(1),u=y(0),d=j(r);if((d||!d&&!a)&&((D(r)!==`body`||M(o))&&(c=L(r)),j(r))){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ee(o,c):y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Oe(e){return Array.from(e.getClientRects())}function ke(e){let t=k(e),n=L(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+H(e),c=-n.scrollTop;return I(r).direction===`rtl`&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}var Ae=25;function je(e,t){let n=O(e),r=k(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=P();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(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<=Ae&&(a-=o)}else l<=Ae&&(a+=l);return{width:a,height:o,x:s,y:c}}var Me=new Set([`absolute`,`fixed`]);function Ne(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=j(e)?B(e):y(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pe(e,t,n){let r;if(t===`viewport`)r=je(e,n);else if(t===`document`)r=ke(k(e));else if(A(t))r=Ne(t,n);else{let n=we(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return d(r)}function Fe(e,t){let n=R(e);return n===t||!A(n)||F(n)?!1:I(n).position===`fixed`||Fe(n,t)}function Ie(e,t){let n=t.get(e);if(n)return n;let r=z(e,[],!1).filter(e=>A(e)&&D(e)!==`body`),i=null,a=I(e).position===`fixed`,o=a?R(e):e;for(;A(o)&&!F(o);){let t=I(o),n=ge(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Me.has(i.position)||M(o)&&!n&&Fe(e,o))?r=r.filter(e=>e!==o):i=t,o=R(o)}return t.set(e,r),r}function Le(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?N(t)?[]:Ie(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((e,n)=>{let r=Pe(t,n,i);return e.top=s(r.top,e.top),e.right=c(r.right,e.right),e.bottom=c(r.bottom,e.bottom),e.left=s(r.left,e.left),e},Pe(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Re(e){let{width:t,height:n}=xe(e);return{width:t,height:n}}function ze(e,t,n){let r=j(t),i=k(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=y(0);function l(){c.x=H(i)}if(r||!r&&!a)if((D(t)!==`body`||M(i))&&(s=L(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ee(i,s):y(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Be(e){return I(e).position===`static`}function Ve(e,t){if(!j(e)||I(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return k(e)===n&&(n=n.ownerDocument.body),n}function He(e,t){let n=O(e);if(N(e))return n;if(!j(e)){let t=R(e);for(;t&&!F(t);){if(A(t)&&!Be(t))return t;t=R(t)}return n}let r=Ve(e,t);for(;r&&de(r)&&Be(r);)r=Ve(r,t);return r&&F(r)&&Be(r)&&!ge(r)?n:r||_e(e)||n}var Ue=async function(e){let t=this.getOffsetParent||He,n=this.getDimensions,r=await n(e.floating);return{reference:ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function We(e){return I(e).direction===`rtl`}var Ge={convertOffsetParentRelativeRectToViewportRelativeRect:De,getDocumentElement:k,getClippingRect:Le,getOffsetParent:He,getElementRects:Ue,getClientRects:Oe,getDimensions:Re,getScale:B,isElement:A,isRTL:We},Ke=b,qe=t,Je=l,Ye=(e,t,n)=>{let i=new Map,a={platform:Ge,...n},o={...a.platform,_c:i};return r(e,t,{...a,platform:o})},Xe=ne({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=p(e),r=a(`hoverElement`),i=C(0),s=C(0);return o([t,n],([e,t])=>{Ye({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},r.value,{placement:`right-start`,middleware:[Je(),qe(),Ke({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{i.value=e,s.value=t})}),(e,t)=>(w(),ae(v,{to:`body`},[te(`div`,{ref_key:`hoverElement`,ref:r,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:S({left:`${i.value}px`,top:`${s.value}px`})},[ee(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=ne({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=h(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(w(),x(`div`,Lt,[(w(!0),x(ie,null,u(i.value,(e,t)=>(w(),x(ie,{key:e.id},[t>0?(w(),x(`div`,Rt)):_(``,!0),te(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>r(`select`,e)},[te(`span`,null,re(e.text||e.id),1)],8,zt)],64))),128))]))}}),Vt=Object.assign(Bt,{__name:`ChartNavBreadcrumb`});function Ht(t){let{data:r,nameKey:i,sizeKey:a,rootText:s,nodeType:c,graphOptions:l,onUpdate:u}=t,d=f(void 0),p=f(void 0),_=C(void 0),v=f(void 0),y,b=h(()=>{if(t.tree)return t.tree.value;let n=e(r),o=new Map,l=0,u={id:`~root`,text:s,size:0,sizeSelf:0,children:[]};if(!n?.length)return{map:o,root:u,maxDepth:l};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=T(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,n,r,i){if(o.has(t))return o.get(t);i>l&&(l=i);let a={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return o.set(t,a),r.children.push(a),d.unshift(()=>{let t=a.sizeSelf;a.size+=a.children.reduce((e,t)=>e+t.size,0),a.subtext=T(a.size).join(` `),a.children.length&&t/a.size>.1&&a.children.push({id:`${a.id}-self`,text:``,size:t,sizeSelf:t,subtext:T(t).join(` `),children:[],meta:{...e,path:``,type:c},parent:a}),a.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),a}function p(e){let t=e[i].split(`/`).filter(Boolean),n=u,r=``,s=0;t.forEach((l,u)=>{if(r+=(r?`/`:``)+l,s++,u===t.length-1){let t={id:e[i],text:l,size:e[a],sizeSelf:e[a],subtext:T(e[a]).join(` `),children:[],meta:{...e,path:l,type:c}};n.children.push(t),o.set(e[i],t)}else n=f(e,r,l,n,s)})}return n.forEach(p),d.forEach(e=>e()),{map:o,root:u,maxDepth:l}}),ee=h(()=>({animate:oe.value.chartAnimation,palette:{stroke:m.value?`#222`:`#555`,fg:m.value?`#fff`:`#000`,bg:m.value?`#111`:`#fff`},getColor:ot(b.value.root,m.value?.8:.9,m.value?1:1.1),getSubtext:e=>e.subtext,...l}));function x(e,t){_.value=e?.meta,e?.children.length||(e=e?.parent),v.value?.select(e,t)}function S(){y?.(),p.value=b.value.root,u?.(),g(()=>{let e=_.value&&b.value.map.get(_.value[i])||null;e&&x(e,!1)}),y=()=>{v.value?.dispose(),v.value=void 0,_.value=void 0}}return g(()=>{o(()=>[b.value,ee.value],()=>{S()},{deep:!0,immediate:!1}),S()}),n(()=>{y?.()}),{tree:b,graph:v,chartOptions:ee,nodeHover:d,nodeSelected:p,selectedNode:_,selectNode:x,buildGraph:S}}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 +0,0 @@
|
|
|
1
|
-
import{gt as e,pt as t}from"#entry";import{t as n}from"./Bjj8tBzd.js";import{n as r}from"./2NHbZxRd.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{B as e,lt as t,ot as n,rn as r,wt as i}from"#entry";import{t as a}from"./C3MbbcWQ.js";var o={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`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return e({title:`${d.status} - ${d.statusText} | ${d.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}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: }`}]}),(e,d)=>(i(),t(`div`,o,[n(`div`,s,[n(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:r(a.status)},null,8,c),n(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:r(a.statusText)},null,8,l),n(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:r(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-0e6065bd`]]);export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Mt as n,Ot as r,Pt as i,U as a,ct as o,en as s,ft as c,kt as l,lt as u,nn as d,ot as f,pt as p,rt as m,st as h,vt as g,wt as _}from"#entry";import{t as v}from"./CwTV8WCc.js";import{n as y,t as b}from"./DKwP4h99.js";var x=[`open`],S={"font-mono":``},C={"font-mono":``},w=p({__name:`TreeNode`,props:g({node:{},icon:{default:`i-catppuccin:folder icon-catppuccin`},iconOpen:{default:`i-catppuccin:folder-open icon-catppuccin`},link:{type:[String,Boolean]},linkQueryKey:{default:`module`},padding:{default:0},open:{type:Boolean}},{open:{type:Boolean,required:!1,default:!0},openModifiers:{}}),emits:g([`select`],[`update:open`]),setup(p,{emit:g}){let w=p,E=g,D=i(p,`open`),O=a(),k=window.location;function A(e){w.link||E(`select`,e)}return(i,a)=>{let g=b,w=T,E=y;return _(),u(`details`,{open:D.value,onToggle:a[0]||=e=>D.value=e.target?.open},[f(`summary`,{"cursor-default":``,"select-none":``,"text-sm":``,truncate:``,style:d({paddingLeft:`${p.padding+.5}rem`}),flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active `},[f(`div`,{class:s([`i-ph-caret-right-duotone transition op50`,D.value?`rotate-90`:``])},null,2),f(`div`,{class:s(D.value&&p.iconOpen||p.icon),"inline-block":``,"vertical-text-bottom":``},null,2),f(`div`,S,[c(g,{path:p.node.name||``},null,8,[`path`])])],4),D.value?(_(),u(m,{key:0},[(_(!0),u(m,null,r(Object.entries(p.node.children),e=>(_(),h(w,{key:e[0],node:e[1],link:p.link,padding:p.padding+1,"link-query-key":p.linkQueryKey,onSelect:A},{extra:t(({node:e})=>[l(i.$slots,`extra`,{node:e})]),_:3},8,[`node`,`link`,`padding`,`link-query-key`]))),128)),(_(!0),u(m,null,r(p.node.items,r=>(_(),h(n(p.link?e(v):`div`),{key:r.full,to:p.link?typeof p.link==`string`?p.link:{path:e(O).path,query:{...e(O).query,[p.linkQueryKey]:r.full},hash:e(k).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:d({paddingLeft:`${p.padding+2.7}rem`}),onClick:e=>A(r)},{default:t(()=>[c(E,{filename:r.full},null,8,[`filename`]),f(`div`,C,[c(g,{path:r.path.split(`/`).pop()||``},null,8,[`path`]),l(i.$slots,`extra`,{node:r})])]),_:2},1032,[`to`,`style`,`onClick`]))),128))],64)):o(``,!0)],40,x)}}}),T=Object.assign(w,{__name:`DisplayTreeNode`});export{T as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,At as t,Bt as n,C as r,Kt as i,Lt as a,Ot as o,T as s,U as c,W as l,_ as u,at as d,b as f,ct as p,dt as m,en as h,f as g,ft as _,lt as v,ot as y,p as b,pt as x,qt as ee,r as te,rn as S,rt as C,st as w,t as T,wt as E}from"#entry";import{t as D}from"./CwTV8WCc.js";import{r as O,t as k}from"./CpJiZ7L0.js";import{r as A,t as j}from"./CKFsAdVO.js";import{n as ne,r as M,t as N}from"./DYuLlkFe.js";import{a as P,c as re,n as F,t as I}from"./BdaRSTg9.js";import{t as L}from"./Bxdwnne9.js";import{t as ie}from"./wHgnrW62.js";var R={flex:`~ row gap-1`,"of-hidden":``},z={flex:`~ row gap-1`,"ws-nowrap":``},B={p2:``,flex:`~ col gap-1`},V=x({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let r=e,i=d(()=>{let e=new Map;return r.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(r.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(r,a)=>{let s=k,c=t(`VMenu`);return E(),v(`div`,R,[y(`div`,z,[_(s,{id:i.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),i.value[0].version&&e.showVersion?(E(),w(O,{key:0,text:i.value[0].version,as:`span`},null,8,[`text`])):p(``,!0)]),i.value.length>1?(E(),w(c,{key:0,delay:{show:200,hide:0},"flex-none":``},{popper:n(()=>[y(`div`,B,[(E(!0),v(C,null,o(i.value,t=>(E(),v(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[_(s,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(E(),w(O,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):p(``,!0)]))),128))])]),default:n(()=>[_(O,{text:`+${i.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):p(``,!0)])}}}),H=Object.assign(V,{__name:`PackagesImporters`}),U={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},W={role:`row`,class:`border-b border-base`,flex:`~ row`},G=[`title`],K={key:0,"font-mono":``},q={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},J={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},Y={key:0,role:`cell`,"font-mono":``,"flex-none":``,w80:``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``,"overflow-hidden":``,truncate:``},X={"font-mono":``,"text-sm":``},Z={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},ae={p2:``,flex:`~ col gap-1`},Q={w24:``,"inline-flex":``},oe={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},se={key:1},ce=x({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(t){let i=c(),{state:a,next:l}=b([``,`desc`,`asc`],{initialValue:j.value.packageSizeSortType});function u(){l(),j.value.packageSizeSortType=a.value}return(c,l)=>{let d=L,f=A,g=k,b=H,x=D;return E(),v(`div`,U,[y(`div`,W,[y(`div`,{title:t.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:h([t.groupView?`min-w40`:`min-w80`])},[t.groupView?(E(),v(`div`,K,[_(d,{name:t.packages?.[0]?.name},null,8,[`name`])])):(E(),v(C,{key:1},[m(` Package `)],64))],10,G),t.groupView?p(``,!0):(E(),v(`div`,q,` Version `)),y(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:h([t.groupView?`px2`:`pl2`])},[y(`button`,J,[l[0]||=m(` Size `,-1),t.disableSizeSort?p(``,!0):(E(),v(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:u},[y(`i`,{"text-xs":``,class:h([e(a)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,e(a)?`op100 text-primary`:`op50`])},null,2)]))])],2),l[1]||=y(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),t.packages.length?(E(),w(N,{key:0,role:`rowgroup`,items:t.packages,"key-prop":`dir`},{default:n(({item:a,index:c})=>[_(x,{role:`row`,flex:`~ row`,class:h([`border-base border-b-1 border-dashed`,[c===t.packages.length-1?`border-b-0`:``]]),to:{path:e(i).path,query:{package:`${a.name}@${a.version}`}}},{default:n(()=>[_(e(s),{triggers:[`hover`],delay:1200,disabled:a.name.length<30},{popper:n(()=>[y(`span`,X,S(a.name),1)]),default:n(()=>[t.groupView?p(``,!0):(E(),v(`div`,Y,[_(d,{name:a.name},null,8,[`name`])]))]),_:2},1032,[`disabled`]),y(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:h({"text-primary":a.duplicated})},S(a.version),3),y(`div`,Z,[_(e(r),{delay:{show:200,hide:0}},{popper:n(()=>[y(`div`,ae,[(E(!0),v(C,null,o(a.files.filter(e=>!!e.transformedCodeSize),e=>(E(),v(`div`,{key:e.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[y(`span`,Q,[_(f,{bytes:e.transformedCodeSize},null,8,[`bytes`])]),_(g,{id:e.path,session:t.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:a.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:n(()=>[_(f,{bytes:a.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),y(`div`,oe,[_(b,{package:a,session:t.session,"show-version":t.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(E(),v(`div`,se,[...l[2]||=[y(`div`,{p4:``},[y(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[y(`p`,null,` No data `)])],-1)]]))])}}}),$=Object.assign(ce,{__name:`PackagesTable`}),le={key:1,p4:``},ue=x({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,n=d(()=>t.packages.filter(e=>e.duplicated)),r=d(()=>n.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,i)=>{let a=$;return n.value.length?(E(!0),v(C,{key:0},o(r.value,(t,n)=>(E(),v(`div`,{key:n},[_(a,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(E(),v(`div`,le,[...i[0]||=[y(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),de=Object.assign(ue,{__name:`PackagesDuplicated`}),fe={key:1,relative:``,"max-h-screen":``,"of-hidden":``},pe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},me={flex:`~ gap-2 items-center`,p2:``,border:`t base`},he=[`onClick`],ge={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt44:``,px4:``,pb4:``},_e={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ve={op50:``},ye={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},be={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},xe={flex:`~ gap-1 items-center`},Se={flex:`~ gap-1 items-center`},Ce=x({__name:`packages`,props:{session:{}},setup(t){let r=t,s=i(u()),b=c(),x=l(),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=T(),k=ee({search:``,selected:[`direct`,`transitive`]}),{state:N,isLoading:L}=g(async()=>await O.value.call(`vite:rolldown:get-packages`,{session:r.session.id}),null),R=f(()=>N.value,()=>new M(N.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=d(()=>N.value?Object.values(N.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=d(()=>[{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=d(()=>k.value.search?R.value.search(k.value.search).map(e=>e.item):[...N.value||[]]),H=d(()=>{let e=j.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=>!k.value.selected||k.value.selected.some(t=>t.match(e.type)))});function U(e){j.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=I({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!b.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&x.replace({query:{...b.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(){j.value.packageViewType===`treemap`&&(K.value=new P(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return a(()=>j.value.packageViewType,()=>{Z()}),(r,i)=>{let a=te,c=ne,l=$,u=F,d=de,f=A,g=re;return e(L)?(E(),w(a,{key:0})):(E(),v(`div`,fe,[y(`div`,pe,[_(c,{modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,rules:D},{default:n(()=>[y(`div`,me,[i[2]||=y(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(E(!0),v(C,null,o(B.value,t=>(E(),v(`button`,{key:t.value,"btn-action":``,class:h(e(j).packageViewType===t.value?`bg-active`:`grayscale op50`),onClick:e=>U(t.value)},[y(`div`,{class:h(t.icon)},null,2),m(` `+S(t.label),1)],10,he))),128))])]),_:1},8,[`modelValue`])]),y(`div`,ge,[e(j).packageViewType===`table`?(E(),v(C,{key:0},[_(l,{packages:H.value,session:t.session},null,8,[`packages`,`session`]),y(`div`,_e,[y(`span`,ve,S(V.value.length)+` of `+S(e(N)?.length||0),1)])],64)):e(j).packageViewType===`treemap`?(E(),v(C,{key:1},[e(K)&&H.value.length?(E(),w(ie,{key:0,graph:e(K),selected:e(J),onSelect:i[1]||=t=>e(X)(t)},{default:n(({selected:e,options:t,onSelect:n})=>[_(u,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(E(),v(`span`,ye,` No Data `))],64)):e(j).packageViewType===`duplicate-packages`?(E(),w(d,{key:2,packages:H.value,session:t.session},null,8,[`packages`,`session`])):p(``,!0)]),_(g,{"hover-x":s.x,"hover-y":s.y},{default:n(()=>[e(q)?.meta?(E(),v(`div`,be,[y(`div`,xe,S(e(q).text),1),y(`div`,Se,[_(f,{bytes:e(q).size,percent:!1},null,8,[`bytes`])])])):p(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Et as t,Jt as n,Qt as r,Yt as i,_t as a,at as o,bt as s,d as c,g as l,lt as u,m as d,ot as f,qt as p,wt as m}from"#entry";import{t as h}from"./C3MbbcWQ.js";function g(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 _(){return this.eachAfter(g)}function v(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function y(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 b(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 x(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function S(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 C(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function w(e){for(var t=this,n=T(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 T(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 ee(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function te(){return Array.from(this)}function ne(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function E(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*re(){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 D(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=A)):t===void 0&&(t=k);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(M)}function O(){return D(this).eachBefore(j)}function k(e){return e.children}function A(e){return Array.isArray(e)?e[1]:null}function j(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function M(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=D.prototype={constructor:N,count:_,each:v,eachAfter:b,eachBefore:y,find:x,sum:S,sort:C,path:w,ancestors:ee,descendants:te,leaves:ne,links:E,copy:O,[Symbol.iterator]:re};function P(e,t){return e.parent===t.parent?1:2}function F(e){var t=e.children;return t?t[0]:e.t}function I(e){var t=e.children;return t?t[t.length-1]:e.t}function ie(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 ae(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 oe(e,t,n){return e.a.parent===t.parent?e.a:n}function L(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}L.prototype=Object.create(N.prototype);function R(e){for(var t=new L(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 L(a[o],o)),i.parent=n;return(t.parent=new L(null,0)).children=[t],t}function z(){var e=P,t=1,n=1,r=null;function i(i){var s=R(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){ae(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=I(o),i=F(i),o&&i;)s=F(s),a=I(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(ie(oe(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!I(a)&&(a.t=o,a.m+=u-l),i&&!F(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 B(e){return function(){return e}}var V=Math.PI,H=2*V,U=1e-6,W=H-U;function G(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function K(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return G;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?G:K(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>U)if(!(Math.abs(u*s-c*l)>U)||!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((V-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>U&&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)>U||Math.abs(this._y1-l)>U)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%H+H),d>W?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>U&&this._append`A${n},${n},0,${+(d>=V)},${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 se(){return new q}se.prototype=q.prototype;function ce(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 le=Array.prototype.slice;function ue(e){return e[0]}function de(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 fe(e){return new J(e,!0)}function pe(e){return new J(e,!1)}function me(e){return e.source}function he(e){return e.target}function Y(e){let t=me,n=he,r=ue,i=de,a=null,o=null,s=ce(c);function c(){let c,l=le.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:B(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:B(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function ge(){return Y(fe)}function _e(){return Y(pe)}function ve(e,{wheel:t=!0,minScale:n=.5,maxScale:i=2}={}){let a=p(1);function o(t,o,s){let c=r(e);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=o??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=a.value;a.value=Math.max(n,Math.min(i,_+t));let v=a.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function s(e){if(r(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 l(e=.2){o(e*-1)}return d(e,`wheel`,s),{scale:a,zoom:o,zoomIn:c,zoomOut:l}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=ge().x(e=>e[0]).y(e=>e[1]),Q=_e().x(e=>e[0]).y(e=>e[1]);function ye(t,n){return!t.target||!t.source?null:n?t.target.x<=t.source.x?Q({source:[t.source.x+e(n.width)/2-e(n.linkOffset),t.source.y],target:[t.target.x-e(n.width)/2+e(n.linkOffset),t.target.y]}):Z({source:[t.source.x+e(n.width)/2-e(n.linkOffset),t.source.y],target:[t.target.x-e(n.width)/2+e(n.linkOffset),t.target.y]}):t.target.x<=t.source.x?Q({source:[t.source.x,t.source.y],target:[t.target.x,t.target.y]}):Z({source:[t.source.x,t.source.y],target:[t.target.x,t.target.y]})}function be(e){return`stroke-#8885`}function xe(e){let r=.4,a=p(),s=p(window.innerWidth),c=p(window.innerHeight),u=n(new Map),d=n(new Set),f=p(!0),m=n(new Map),h=i([]),g=i([]),_=n(new Map),v=n(new Map),y=o(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=l(),{scale:x,zoomIn:S,zoomOut:C}=ve(a,{wheel:b,minScale:r,maxScale:2});function w(e,t=!0){u.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:f,hierarchy:D,tree:z,nodesRefMap:u,container:a,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:s,height:c,childToParentMap:m,focusOn:w,collapsedNodes:d,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:f,container:a,width:s,height:c,scale:x,nodes:h,links:g,nodesRefMap:u,collapsedNodes:d,childToParentMap:m,ZOOM_MIN:r,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function $(){return a(X)}function Se(t){let{nodesRefMap:n,container:r,calculateGraph:i,collapsedNodes:o}=a(X),c=p(!1);function l(e,t){s(()=>{s(()=>{let i=n.get(e);if(i&&t&&r.value){let e=r.value.getBoundingClientRect(),n=i.getBoundingClientRect(),a=n.left-e.left-t.x,o=n.top-e.top-t.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function u(e){if(c.value)return;c.value=!0;let t=n.get(e),a=null;if(t&&r.value){let e=r.value.getBoundingClientRect(),n=t.getBoundingClientRect();a={x:n.left-e.left,y:n.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&l(e,a),c.value=!1}function d(){c.value||(c.value=!0,o.clear(),i(),setTimeout(()=>{c.value=!1},300))}function f(){c.value||(c.value=!0,e(t.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{c.value=!1},300))}return{isGraphNodeToggling:c,toggleNode:u,expandAll:d,collapseAll:f}}function Ce(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=a(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 we(){let{container:e}=a(X),t=p(!1),n=0,r=0;function i(){d(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)}),d(e,`contextmenu`,e=>e.preventDefault()),d(`mouseleave`,()=>t.value=!1),d(`mouseup`,()=>t.value=!1),d(`mousemove`,i=>{t.value&&(i.preventDefault(),e.value.scrollLeft=n-i.pageX,e.value.scrollTop=r-i.pageY)})}return{init:i,isGrabbing:t}}var Te={},Ee={"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Close`};function De(e,t){return m(),u(`button`,Ee,[...t[0]||=[f(`div`,{"i-ph-x":``},null,-1)]])}var Oe=h(Te,[[`render`,De]]);export{we as a,Se as c,be as i,xe as n,Ce as o,ye as r,$ as s,Oe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ot as e,lt as t,ot as n,pt as r,rn as i,rt as a,wt as o}from"#entry";var s={flex:`~ gap5`,"w-full":``,border:`b base`,pb3:``},c={"font-mono":``},l={"font-mono":``},u=[`datetime`],d=r({__name:`SessionMeta`,props:{sessions:{}},setup(r){return(d,f)=>(o(),t(`div`,s,[(o(!0),t(a,null,e(r.sessions,e=>(o(),t(`div`,{key:e.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]||=n(`div`,{class:`i-ph-hash-duotone`},null,-1),n(`div`,null,i(e.title),1),n(`div`,c,[n(`span`,null,i(e.id),1)]),f[1]||=n(`div`,{class:`i-ph-clock-duotone`},null,-1),f[2]||=n(`div`,null,` Created At `,-1),n(`div`,l,[n(`time`,{datetime:e.createdAt.toISOString()},i(e.createdAt.toLocaleString()),9,u)])]))),128))]))}}),f=Object.assign(d,{__name:`CompareSessionMeta`});export{f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ct as t,dt as n,en as r,h as i,kt as a,lt as o,ot as s,pt as c,rn as l,wt as u}from"#entry";import{t as d}from"./D04G8HHr.js";var f={"text-xs":``,op75:``,"ml-0.4":``},p={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},m=1024,h=c({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(i){let c=i,h=m**2,g=[[80*m,`color-scale-neutral`],[500*m,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=e(()=>{if(!c.colorize)return g[0];let e=c.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=e(()=>c.total?(c.bytes||0)*100/c.total:0),y=e(()=>d(c.bytes||0,c.digits));return(e,c)=>i.bytes?(u(),o(`div`,{key:0,class:r([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[i.icon?(u(),o(`div`,{key:0,class:r([i.icon,`mr-1`])},null,2)):t(``,!0),n(` `+l(y.value[0]),1),s(`span`,f,l(y.value[1]),1),a(e.$slots,`after`,{},()=>[i.percent&&v.value>i.percentRatio?(u(),o(`span`,p,l(+v.value.toFixed(1))+`%`,1)):t(``,!0)])],2)):t(``,!0)}}),g=Object.assign(h,{__name:`DisplayFileSizeBadge`});const _=i(`rolldown-devtools-settings`,{codeviewerLineWrap:!1,codeviewerDiffPanelSize:50,flowExpandResolveId:!0,flowExpandTransforms:!0,flowExpandLoads:!0,flowExpandChunks:!0,flowExpandAssets:!0,flowShowAllTransforms:!1,flowShowAllLoads:!1,moduleGraphViewType:`list`,assetViewType:`list`,chartAnimation:!0,moduleDetailsViewType:`flow`,pluginDetailsViewType:`flow`,pluginDetailsTableFields:null,pluginDetailsModuleTypes:null,pluginDetailsDurationSortType:``,pluginDetailSelectedHook:``,chunkViewType:`list`,pluginDetailsShowType:`all`,packageViewType:`table`,packageSizeSortType:``},{mergeDefaults:!0});function v(t){let n=new Map;return new Proxy(t.value,{get(t,r){return n.has(r)||n.set(r,e({get(){return t[r]},set(e){t[r]=e}})),n.get(r)}})}const y=v(_);export{y as n,g as r,_ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Ot as n,S as r,U as i,W as a,at as o,b as s,bt as c,ct as l,dt as u,en as d,ft as f,lt as p,ot as m,pt as h,qt as g,rn as _,rt as v,st as y,ut as b,wt as x}from"#entry";import"./CwTV8WCc.js";import{r as S}from"./D04G8HHr.js";import{a as C,s as w}from"./Bjj8tBzd.js";import{t as T}from"./CpJiZ7L0.js";import{t as E}from"./DWqpanCf.js";import{t as D}from"./CKFsAdVO.js";import{t as O}from"./BG553MBL.js";import{n as k}from"./CANF8ydB.js";import{n as A,r as j,t as M}from"./DYuLlkFe.js";import{t as N}from"./DYSe0ST1.js";import{t as P}from"./C2A6ZQPm.js";import{n as ee,r as F,t as I}from"./DhDTn9QE.js";import{n as L,t as R}from"./DVE8edJM.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=h({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(e,{emit:n}){let r=n;return(n,i)=>{let a=T;return x(),p(`div`,z,[f(M,{items:e.modules,"key-prop":`id`},{default:t(({item:t})=>[m(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,t)},[f(a,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:e.link,"disable-tooltip":e.disableTooltip},null,8,[`id`,`session`,`link`,`disable-tooltip`])],8,B)]),_:1},8,[`items`])])}}}),H=Object.assign(V,{__name:`ModulesFlatList`}),U={flex:`~ col gap-2`,p4:``},W={flex:``,pb2:``},G={flex:`~ gap-1 wrap`,"text-xs":``},K={flex:`~ auto text-xs wrap`},q={key:0,flex:`~ items-center`},J={key:0,op20:``},Y={flex:`~ none gap-1 wrap justify-end`},X=h({__name:`DetailedList`,props:{session:{},modules:{}},setup(e){let r=e,i=o(()=>{let e=new Map;for(let t of r.modules){let n=t.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(t.id,n)}return e});return(r,a)=>{let o=N,s=O,c=T;return x(),p(`div`,U,[f(M,{items:e.modules,"key-prop":`id`},{default:t(({item:r})=>[m(`div`,W,[f(c,{id:r.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:t(()=>[m(`div`,G,[m(`ul`,K,[(x(!0),p(v,null,n(i.value.get(r.id),(e,t)=>(x(),p(v,{key:t},[e.source_code_size!==e.transformed_code_size&&e.transformed_code_size?(x(),p(`li`,q,[f(o,{name:e.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),t===i.value.get(r.id).length-1?l(``,!0):(x(),p(`span`,J,`|`))])):l(``,!0)],64))),128))]),a[0]||=m(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),m(`div`,Y,[m(`span`,null,[r.buildMetrics?(x(),y(s,{key:0,metrics:r.buildMetrics},null,8,[`metrics`])):l(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),Z=Object.assign(X,{__name:`ModulesDetailedList`}),Q=[`d`,`stroke-dasharray`],te=h({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,i=o(()=>r.modules);return k({modules:i,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:t=>{let{isFirstCalculateGraph:n,scale:r,spacing:a,tree:s,hierarchy:l,collapsedNodes:u,container:d,modulesMap:f,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=t,x=o(()=>i.value.filter(e=>e.importers.length===0));return(t=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let i=new Set,o=l({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{i.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!u.has(e.id),hasChildren:!1}))):u.has(e.module.id)?[]:e.module.imports.map(t=>{let r=f.value.get(t.module_id);if(r&&!i.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return i.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!u.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,s().nodeSize([e(a.height),e(a.width)+e(a.gap)])(o);let S=o.descendants();for(let t of S)[t.x,t.y]=[t.y-e(a.width),t.x],t.data.module.imports&&(t.data.hasChildren=t.data.module.imports?.filter(e=>y.get(e.module_id)===t.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<e(a.margin))for(let t of S)t.x+=Math.abs(C)+e(a.margin);if(w<e(a.margin))for(let t of S)t.y+=Math.abs(w)+e(a.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=o.links().filter(e=>e.source.data.module.id!==`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));g.clear();for(let e of T)g.set(e.id,e);m.value=T,c(()=>{_.value=d.value.scrollWidth/r.value+e(a.margin),v.value=d.value.scrollHeight/r.value+e(a.margin);let n=x.value?.[0]?.id;t&&n&&c(()=>{b(n,!1)})})}}}),(e,r)=>{let a=T,o=I;return x(),y(o,{session:n.session,modules:i.value},{default:t(({node:e,nodesRefMap:t})=>[f(a,{id:e.data.module.id,ref:n=>t.set(e.data.module.id,n?.$el),link:!0,session:n.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:t(({link:e,d:t,linkClass:n})=>[m(`path`,{d:t,class:d(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Q)]),_:1},8,[`session`,`modules`])}}}),ne=Object.assign(te,{__name:`ModulesGraph`}),re={"of-auto":``,"max-h-screen":``,"pt-45":``,relative:``},ie={flex:`~ col gap-2`,p4:``},ae=h({__name:`Folder`,props:{session:{},modules:{}},setup(e){let t=e,n=o(()=>{if(!t.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],n=[],r=[];return t.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(t.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(t.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?n.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&r.push(i)}),{workspace:S(e,`Project Root`),nodeModules:S(n,`Node Modules`),virtual:S(r,`Virtual Modules`)}});return(e,t)=>{let r=P;return x(),p(`div`,re,[m(`div`,ie,[Object.keys(n.value.workspace.children).length?(x(),y(r,{key:0,node:n.value.workspace,p:`l3`,icon:`i-catppuccin:folder-dist icon-catppuccin`,"icon-open":`i-catppuccin:folder-dist-open icon-catppuccin`,link:!0},null,8,[`node`])):l(``,!0),Object.keys(n.value.nodeModules.children).length?(x(),p(v,{key:1},[t[0]||=m(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),f(r,{node:n.value.nodeModules,p:`l3`,icon:`i-catppuccin:folder-node icon-catppuccin`,"icon-open":`i-catppuccin:folder-node-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):l(``,!0),Object.keys(n.value.virtual.children).length?(x(),p(v,{key:2},[t[1]||=m(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),f(r,{node:n.value.virtual,p:`l3`,icon:`i-catppuccin:folder-components icon-catppuccin`,"icon-open":`i-catppuccin:folder-components-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):l(``,!0)])])}}}),oe=Object.assign(ae,{__name:`ModulesFolder`}),se={relative:``,"max-h-screen":``,"of-hidden":``},ce={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},le={key:0,h10:``,mr2:``,flex:`~ items-center`},ue={flex:`~ gap-2 items-center`,p2:``,border:`t base`},de=[`onClick`],fe={key:0,"of-auto":``,"h-screen":``,"pt-45":``},pe={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},$={op50:``},me={key:1,"of-auto":``,"h-screen":``,"pt-45":``},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=h({__name:`index`,props:{session:{}},setup(c){let h=c,S=i(),O=a(),k=g({search:S.query.search||``,selected:S.query.file_types?L(S.query.file_types):null,node_modules:S.query.node_modules?L(S.query.node_modules):null}),M=[{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`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`}];r(k.value,e=>{let t={...S.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};O.replace({query:R(t)})},{debounce:500});let N=o(()=>h.session.modulesList.map(e=>({mod:e,path:E(e.id,h.session.meta.cwd),type:w(e.id)}))),P=o(()=>C.filter(e=>N.value.some(t=>e.match.test(t.mod.id)))),I=o(()=>{let e=N.value;return k.value.selected&&(e=e.filter(e=>{let t=w(e.mod.id);return k.value.selected.includes(t.name)})),k.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&k.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),{pathSelectorVisible:z,selectPathNodes:B,togglePathSelector:V,normalizedGraph:U}=F({onToggle:e=>{k.value.search=e?!1:``},dataMap:o(()=>new Map(h.session.modulesList.map(e=>[e.id,e]))),list:I,importIdKey:`module_id`}),W=s(()=>I.value,()=>new j(I.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),G=o(()=>k.value.search?W.value.search(k.value.search).map(e=>e.item):I.value);function K(e){S.query.module&&O.replace({query:{...S.query,module:void 0}}),D.value.moduleGraphViewType=e}return(r,i)=>{let a=H,o=T,s=ee,h=A,g=Z,S=ne,C=oe;return x(),p(`div`,se,[m(`div`,ce,[f(h,{modelValue:k.value,"onUpdate:modelValue":i[2]||=e=>k.value=e,rules:P.value},b({"search-end":t(()=>[e(D).moduleGraphViewType===`graph`?(x(),p(`div`,le,[m(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:i[1]||=t=>e(V)(!0)},[...i[3]||=[m(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):l(``,!0)]),default:t(()=>[m(`div`,ue,[i[4]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(x(),p(v,null,n(M,t=>m(`button`,{key:t.value,"btn-action":``,class:d(e(D).moduleGraphViewType===t.value?`bg-active`:`grayscale op50`),onClick:e=>K(t.value)},[m(`div`,{class:d(t.icon)},null,2),u(` `+_(t.label),1)],10,de)),64))])]),_:2},[e(z)?{name:`search`,fn:t(()=>[f(s,{session:c.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:e(B),onClose:i[0]||=t=>e(V)(!1)},{list:t(({select:e,data:t})=>[t?.length?(x(),y(a,{key:0,session:c.session,modules:t,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):l(``,!0)]),item:t(({id:e})=>[f(o,{id:e,session:c.session,block:``,"text-nowrap":``,link:!1,"disable-tooltip":!0},null,8,[`id`,`session`])]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`,`rules`])]),e(D).moduleGraphViewType===`list`?(x(),p(`div`,fe,[f(a,{session:c.session,modules:G.value},null,8,[`session`,`modules`]),m(`div`,pe,[m(`span`,$,_(G.value.length)+` of `+_(c.session.modulesList.length),1)])])):e(D).moduleGraphViewType===`detailed-list`?(x(),p(`div`,me,[f(g,{session:c.session,modules:G.value},null,8,[`session`,`modules`]),m(`div`,he,[m(`span`,ge,_(G.value.length)+` of `+_(c.session.modulesList.length),1)])])):e(D).moduleGraphViewType===`graph`?(x(),y(S,{key:2,session:c.session,modules:e(U)},null,8,[`session`,`modules`])):(x(),y(C,{key:3,session:c.session,modules:G.value},null,8,[`session`,`modules`]))])}}});export{_e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,c as t,ct as n,lt as r,pt as i,rn as a,wt as o}from"#entry";var s={key:0,"font-mono":``},c=i({__name:`DisplayTimestamp`,props:{timestamp:{}},setup(i){let c=i;return(l,u)=>i.timestamp?(o(),r(`span`,s,a(e(t)(new Date(c.timestamp))),1)):n(``,!0)}});export{c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Ot as n,at as r,ct as i,dt as a,en as o,ft as s,lt as c,ot as l,pt as u,rn as d,rt as f,st as p,wt as m}from"#entry";import{t as h}from"./CwTV8WCc.js";import{r as g,t as _}from"./CpJiZ7L0.js";import{t as v}from"./aluAR0E9.js";import{t as y}from"./Dt2e24SL.js";import{t as b}from"./BItNXqww.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=u({__name:`index`,props:{session:{}},setup(u){let k=u,A=r(()=>[{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(r,j)=>{let M=h,N=_;return m(),c(`div`,x,[l(`div`,S,[s(M,{"btn-action":``,to:{path:`/`}},{default:t(()=>[...j[0]||=[l(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),a(` Re-select Session `,-1)]]),_:1})]),j[1]||=l(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),l(`div`,C,[(m(!0),c(f,null,n(A.value,e=>(m(),c(f,{key:e.title},[l(`div`,{class:o(e.icon)},null,2),l(`div`,null,d(e.title),1),l(`div`,w,[e.value instanceof Date?(m(),c(`time`,{key:0,datetime:e.value.toISOString()},d(e.value.toLocaleString()),9,T)):e.type===`badge`?(m(),p(g,{key:1,text:String(e.value),py1:``},null,8,[`text`])):e.type===`duration`?(m(),p(y,{key:2,duration:+e.value},null,8,[`duration`])):typeof e.value==`number`?(m(),p(b,{key:3,number:e.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(m(),c(`span`,E,d(e.value),1))])],64))),128))]),j[2]||=l(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),l(`div`,D,[(m(!0),c(f,null,n(k.session.meta.inputs,e=>(m(),c(f,{key:e},[s(g,{text:e.name||``},null,8,[`text`]),s(N,{id:e.filename||``,session:u.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=l(`div`,{op50:``,"mt-4":``},` Views `,-1),l(`div`,O,[(m(!0),c(f,null,n(e(v),e=>(m(),c(f,{key:e.to},[e.category===`session`?(m(),p(M,{key:0,"btn-action":``,to:{path:e.to},flex:`~ col`,"min-w-40":``,p4:``},{default:t(()=>[l(`div`,{class:o(e.icon),"text-2xl":``},null,2),a(` `+d(e.title),1)]),_:2},1032,[`to`])):i(``,!0)],64))),128))])])}}});export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Mt as n,T as r,U as i,at as a,ct as o,en as s,ft as c,kt as l,lt as u,nn as d,ot as f,pt as p,rn as m,st as h,wt as g}from"#entry";import{t as _}from"./CwTV8WCc.js";import{n as v,r as y}from"./Bjj8tBzd.js";import{n as b,t as x}from"./DKwP4h99.js";var S=[`textContent`],C=p({__name:`DisplayBadge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(e){let r=e,i=a(()=>!r.text||r.color===!1?{}:{color:typeof r.color==`number`?y(r.color):v(r.text),background:typeof r.color==`number`?y(r.color,.1):v(r.text,.1)}),o=a(()=>{switch(r.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(a,c)=>(g(),h(n(e.as||`span`),{"ws-nowrap":``,rounded:``,class:s(o.value),style:d(i.value)},{default:t(()=>[l(a.$slots,`default`,{},()=>[f(`span`,{textContent:m(r.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=/^[A-Za-z]:\//;function T(e=``){return e&&e.replace(/\\/g,`/`).replace(w,e=>e.toUpperCase())}var E=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,D=/^\/([A-Za-z]:)?$/;function O(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var k=function(...e){e=e.map(e=>T(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:O();!i||i.length===0||(t=`${i}/${t}`,n=j(i))}return t=A(t,!n),n&&!j(t)?`/${t}`:t.length>0?t:`.`};function A(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var j=function(e){return E.test(e)},M=function(e,t){let n=k(e).replace(D,`$1`).split(`/`),r=k(t).replace(D,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},N={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},P={"font-mono":``,"text-sm":``},F=p({__name:`ModuleId`,props:{id:{},badges:{type:Boolean},icon:{type:Boolean,default:!0},link:{type:[Boolean,String]},minimal:{type:Boolean},kind:{},session:{},cwd:{},disableTooltip:{type:Boolean,default:!1}},setup(d){let p=d,v=i(),y=window.location,S=a(()=>{if(!p.id)return``;let e=p.id.replace(/%2F/g,`/`),t=p.cwd||p.session.meta.cwd,n=t?M(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||n.match(/^(?:\.\.\/){1,3}[^.]/)?n:e}),w=a(()=>`flex items-center`);return(i,a)=>{let T=b,E=x;return g(),h(n(d.link?e(_):`div`),{to:d.link?typeof d.link==`string`?d.link:{path:e(v).path,query:{...e(v).query,module:d.id,chunk:void 0},hash:e(y).hash}:void 0},{default:t(()=>[c(e(r),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:d.disableTooltip||(p.id?.length||0)<30,placement:`bottom-start`},{popper:t(()=>[f(`span`,P,m(p.id),1)]),default:t(()=>[d.id?(g(),u(`div`,{key:0,class:s(w.value)},[d.icon?(g(),h(T,{key:0,filename:d.id,"mr1.5":``},null,8,[`filename`])):o(``,!0),f(`span`,N,[c(E,{path:S.value,minimal:d.minimal},null,8,[`path`,`minimal`])]),l(i.$slots,`default`),d.kind?(g(),h(C,{key:1,class:`ml1`,text:d.kind},null,8,[`text`])):o(``,!0)],2)):o(``,!0),f(`div`,null,[l(i.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),I=Object.assign(F,{__name:`DisplayModuleId`});export{M as n,C as r,I as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bt as t,S as n,U as r,W as i,at as a,b as o,ft as s,lt as c,ot as l,pt as u,qt as d,rn as f,wt as p}from"#entry";import{t as m}from"./CwTV8WCc.js";import{i as h,l as g,o as _}from"./Bjj8tBzd.js";import{n as v,r as y,t as b}from"./DYuLlkFe.js";import{t as x}from"./DYSe0ST1.js";import{n as S,t as C}from"./DVE8edJM.js";var w={flex:`~ col gap-2`,p4:``},T={flex:``,pb2:``},E={"w-8":``,"text-right":``,"text-xs":``,op50:``},D={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},O=u({__name:`FlatList`,props:{plugins:{}},setup(n){let i=r();return(r,a)=>{let o=x,u=m;return p(),c(`div`,w,[s(b,{items:n.plugins,"key-prop":`plugin_id`},{default:t(({item:n})=>[l(`div`,T,[s(u,{to:{path:e(i).path,query:{plugin:n.plugin_id}},"font-mono":``,border:`~ rounded base`,"w-full":``,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{default:t(()=>[l(`div`,E,` #`+f(n.plugin_id),1),l(`span`,D,[s(o,{name:n.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`])])}}}),k=Object.assign(O,{__name:`PluginsFlatList`}),A={relative:``,"max-h-screen":``,"of-hidden":``},j={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},M={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},N={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},P={op50:``},F=u({__name:`plugins`,props:{session:{}},setup(e){let t=e,u=r(),m=i(),b=d({search:u.query.search||``,selected:u.query.plugin_types?S(u.query.plugin_types):null}),x=a(()=>[..._.filter(e=>t.session?.meta?.plugins?.some(t=>e.match.test(t.name))),h]),w=a(()=>{let e=t.session?.meta?.plugins;return b.value.selected&&(e=e.filter(e=>{let t=g(e.name);return b.value.selected.includes(t.name)})),e}),T=o(()=>w.value,()=>new y(w.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),E=a(()=>b.value.search?T.value.search(b.value.search).map(e=>e.item):w.value);return n(b.value,e=>{let t={...u.query,search:e.search||void 0,plugin_types:e.selected||void 0};m.replace({query:C(t)})},{debounce:500}),(t,n)=>{let r=v,i=k;return p(),c(`div`,A,[l(`div`,j,[s(r,{modelValue:b.value,"onUpdate:modelValue":n[0]||=e=>b.value=e,rules:x.value},null,8,[`modelValue`,`rules`])]),l(`div`,M,[s(i,{plugins:E.value??[]},null,8,[`plugins`]),l(`div`,N,[l(`span`,P,f(E.value.length)+` of `+f(e.session?.meta?.plugins?.length||0),1)])])])}}});export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{At as e,G as t,H as n,I as r,J as i,K as a,L as o,Q as s,R as c,St as l,V as u,W as d,X as f,Y as p,Yt as m,Z as h,at as g,gt as _,pt as v,q as y,qt as b,xt as x,z as S}from"#entry";var C=(...e)=>e.find(e=>e!==void 0);function w(s){let h=s.componentName||`NuxtLink`;function y(e){return typeof e==`string`&&e.startsWith(`#`)}function w(e,t,n){let r=n??s.trailingSlash;if(!e||r!==`append`&&r!==`remove`)return e;if(typeof e==`string`)return E(e,r);let i=`path`in e&&e.path!==void 0?e.path:t(e).path;return{...e,name:void 0,path:E(i,r)}}function T(t){let r=d(),o=a(),c=g(()=>!!t.target&&t.target!==`_self`),l=g(()=>{let e=t.to||t.href||``;return typeof e==`string`&&i(e,{acceptRelative:!0})}),f=e(`RouterLink`),m=f&&typeof f!=`string`?f.useLink:void 0,h=g(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||l.value}),_=g(()=>{let e=t.to||t.href||``;return h.value?e:w(e,r.resolve,t.trailingSlash)}),v=h.value?void 0:m?.({...t,to:_}),b=g(()=>{let e=t.trailingSlash??s.trailingSlash;if(!_.value||l.value||y(_.value))return _.value;if(h.value){let t=typeof _.value==`object`&&`path`in _.value?n(_.value):_.value;return E(typeof t==`object`?r.resolve(t).href:t,e)}return typeof _.value==`object`?r.resolve(_.value)?.href??null:E(p(o.app.baseURL,_.value),e)});return{to:_,hasTarget:c,isAbsoluteUrl:l,isExternal:h,href:b,isActive:v?.isActive??g(()=>_.value===r.currentRoute.value.path),isExactActive:v?.isExactActive??g(()=>_.value===r.currentRoute.value.path),route:v?.route??g(()=>r.resolve(_.value)),async navigate(e){await u(b.value,{replace:t.replace,external:h.value||c.value})}}}return v({name:h,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(i,{slots:a}){let u=d(),{to:p,href:h,navigate:g,isExternal:v,hasTarget:w,isAbsoluteUrl:E}=T(i),O=m(!1),A=b(null),j=e=>{A.value=i.custom?e?.$el?.nextElementSibling:e?.$el};function M(e){return!O.value&&(typeof i.prefetchOn==`string`?i.prefetchOn===e:i.prefetchOn?.[e]??s.prefetchOn?.[e])&&(i.prefetch??s.prefetch)!==!1&&i.noPrefetch!==!0&&i.target!==`_blank`&&!k()}async function N(e=t()){if(O.value)return;O.value=!0;let i=typeof p.value==`string`?p.value:v.value?n(p.value):u.resolve(p.value).fullPath,a=v.value?new URL(i,window.location.href).href:i;await Promise.all([e.hooks.callHook(`link:prefetch`,a).catch(()=>{}),!v.value&&!w.value&&r(p.value,u).catch(()=>{})])}if(M(`visibility`)){let e=t(),n,r=null;l(()=>{let t=D();o(()=>{n=S(()=>{A?.value?.tagName&&(r=t.observe(A.value,async()=>{r?.(),r=null,await N(e)}))})})}),x(()=>{n&&c(n),r?.(),r=null})}return()=>{if(!v.value&&!w.value&&!y(p.value)){let t={ref:j,to:p.value,activeClass:i.activeClass||s.activeClass,exactActiveClass:i.exactActiveClass||s.exactActiveClass,replace:i.replace,ariaCurrentValue:i.ariaCurrentValue,custom:i.custom};return i.custom||(M(`interaction`)&&(t.onPointerenter=N.bind(null,void 0),t.onFocus=N.bind(null,void 0)),O.value&&(t.class=i.prefetchedClass||s.prefetchedClass),t.rel=i.rel||void 0),_(e(`RouterLink`),t,a.default)}let t=i.target||null,n=C(i.noRel?``:i.rel,s.externalRelAttribute,E.value||w.value?`noopener noreferrer`:``)||null;return i.custom?a.default?a.default({href:h.value,navigate:g,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 f(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:h.value}},rel:n,target:t,isExternal:v.value||w.value,isActive:!1,isExactActive:!1}):null:_(`a`,{ref:A,href:h.value||null,rel:n,target:t,onClick:e=>{if(!(v.value||w.value))return e.preventDefault(),i.replace?u.replace(h.value):u.push(h.value)}},a.default?.())}}})}var T=w(y);function E(e,t){let n=t===`append`?h:s;return i(e)&&!e.startsWith(`http`)?e:n(e,!0)}function D(){let e=t();if(e._observer)return e._observer;let n=null,r=new Map;return e._observer={observe:(e,t)=>(n||=new IntersectionObserver(e=>{for(let t of e){let e=r.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),r.set(e,t),n.observe(e),()=>{r.delete(e),n?.unobserve(e),r.size===0&&(n?.disconnect(),n=null)})}}var O=/2g/;function k(){let e=navigator.connection;return!!(e&&(e.saveData||O.test(e.effectiveType)))}export{T as t};
|