@vitejs/devtools-rolldown 0.0.0-alpha.32 → 0.0.0-alpha.33
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/dirs.mjs +1 -3
- package/dist/index.mjs +140 -430
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/5tvbNeKa.js +1 -0
- package/dist/public/_nuxt/BCkes08a.js +1 -0
- package/dist/public/_nuxt/BCt7AJYr2.js +1 -0
- package/dist/public/_nuxt/BLuztO_U.js +1 -0
- package/dist/public/_nuxt/BNP_0CNt2.js +1 -0
- package/dist/public/_nuxt/BcpFGloo.js +1 -0
- package/dist/public/_nuxt/Bf1Vsod8.js +1 -0
- package/dist/public/_nuxt/BpPHJgjs2.js +1 -0
- package/dist/public/_nuxt/Bpe250WO.js +1 -0
- package/dist/public/_nuxt/BvZxqrTM.js +1 -0
- package/dist/public/_nuxt/C0X3s2js.js +1 -0
- package/dist/public/_nuxt/CA89J8qi.js +1 -0
- package/dist/public/_nuxt/CF32XUOn.js +1 -0
- package/dist/public/_nuxt/CHhX9QsC.js +2 -0
- package/dist/public/_nuxt/CPGUpoLC.js +1 -0
- package/dist/public/_nuxt/CPkjYaSh.js +1 -0
- package/dist/public/_nuxt/CbqJqu0C.js +1 -0
- package/dist/public/_nuxt/CeiaCdJS.js +1 -0
- package/dist/public/_nuxt/CrBvhj22.js +1 -0
- package/dist/public/_nuxt/CsiiwekO.js +1 -0
- package/dist/public/_nuxt/CwqxH2u32.js +1 -0
- package/dist/public/_nuxt/CxeKBgeG2.js +1 -0
- package/dist/public/_nuxt/D2T_16Oh.js +1 -0
- package/dist/public/_nuxt/D6dVxvIe.js +1 -0
- package/dist/public/_nuxt/DPYc9JW_.js +1 -0
- package/dist/public/_nuxt/DSkKpnKG.js +1 -0
- package/dist/public/_nuxt/D_QsDu4w2.js +1 -0
- package/dist/public/_nuxt/{DataVirtualList.BMBI8CMU.css → DataVirtualList.lGV_3v2U.css} +1 -1
- package/dist/public/_nuxt/De6hoB0p.js +1 -0
- package/dist/public/_nuxt/Dg1pxj30.js +1 -0
- package/dist/public/_nuxt/F3PiHIWc.js +1 -0
- package/dist/public/_nuxt/FKW482sT.js +1 -0
- package/dist/public/_nuxt/FdBHH-Ya.js +33 -0
- package/dist/public/_nuxt/SPaSZIbm.js +1 -0
- package/dist/public/_nuxt/T6zWo6PM.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/9cc7d1a5-e72f-46b3-8d66-edb9a68d1a1a.json +1 -0
- package/dist/public/_nuxt/{entry.DQK1Fncc.css → entry.DSzfs26p.css} +1 -1
- package/dist/public/_nuxt/error-404.UDn5o4zm.css +1 -0
- package/dist/public/_nuxt/error-500.B2y7voNR.css +1 -0
- package/dist/public/_nuxt/gtHejcxM.js +3 -0
- package/dist/public/_nuxt/o3Asd-6w.js +1 -0
- package/dist/public/_nuxt/olITPEcD.js +2 -0
- package/dist/public/_nuxt/v2o5fpbj.js +1 -0
- package/dist/public/_nuxt/yUVoggG_.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +15 -15
- package/dist/public/_nuxt/6TUvuKw-.js +0 -1
- package/dist/public/_nuxt/B9ATRPQ7.js +0 -1
- package/dist/public/_nuxt/B9O9mwcz.js +0 -1
- package/dist/public/_nuxt/BYYOuuQ8.js +0 -1
- package/dist/public/_nuxt/Bb89bWCj.js +0 -1
- package/dist/public/_nuxt/Bjj8tBzd.js +0 -1
- package/dist/public/_nuxt/BlOp-aa0.js +0 -1
- package/dist/public/_nuxt/By3-Oigm.js +0 -1
- package/dist/public/_nuxt/C3g8Qo0F.js +0 -1
- package/dist/public/_nuxt/C4ZBTBfN.js +0 -1
- package/dist/public/_nuxt/C56jC-Rb.js +0 -1
- package/dist/public/_nuxt/CBrsTh9c.js +0 -1
- package/dist/public/_nuxt/CMcxTY2l.js +0 -1
- package/dist/public/_nuxt/CavFgEiy.js +0 -1
- package/dist/public/_nuxt/Ckamtj1Q.js +0 -1
- package/dist/public/_nuxt/Cs9u2aM3.js +0 -1
- package/dist/public/_nuxt/D1SGgpeJ.js +0 -1
- package/dist/public/_nuxt/D4Jp6GBh.js +0 -1
- package/dist/public/_nuxt/D68gMgDN.js +0 -33
- package/dist/public/_nuxt/D8SB5Fj6.js +0 -1
- package/dist/public/_nuxt/DG5LouYQ.js +0 -1
- package/dist/public/_nuxt/DGPFtmYw.js +0 -1
- package/dist/public/_nuxt/DKKnluDw.js +0 -1
- package/dist/public/_nuxt/DTB_fvd1.js +0 -1
- package/dist/public/_nuxt/Daqw8s3u.js +0 -1
- package/dist/public/_nuxt/DdkVNznP.js +0 -1
- package/dist/public/_nuxt/DicSvcoI.js +0 -2
- package/dist/public/_nuxt/DmCbLhAV.js +0 -1
- package/dist/public/_nuxt/Dy45_BSj.js +0 -1
- package/dist/public/_nuxt/EoT68z9_.js +0 -1
- package/dist/public/_nuxt/OLyU6pOh.js +0 -1
- package/dist/public/_nuxt/Vyw3NrOX.js +0 -1
- package/dist/public/_nuxt/builds/meta/64b3b8a7-2713-4a0b-a273-f1b096d1de48.json +0 -1
- package/dist/public/_nuxt/error-404.2Q-XfgR7.css +0 -1
- package/dist/public/_nuxt/error-500.3QnkDFAn.css +0 -1
- package/dist/public/_nuxt/hK0Xv1bA.js +0 -1
- package/dist/public/_nuxt/vcHT-ufV.js +0 -1
- package/dist/public/_nuxt/zkWX764r.js +0 -4
- /package/dist/public/_nuxt/{C3MbbcWQ.js → BUwCbG2W.js} +0 -0
- /package/dist/public/_nuxt/{2NHbZxRd.js → DoJ6DaKu.js} +0 -0
- /package/dist/public/_nuxt/{BmEqTRfc.js → qIAw3Eg02.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Ct as t,Dt as n,Et as r,G as i,Gt as a,Ht as o,It as s,J as c,K as l,Kt as u,Pt as d,Q as f,St as p,U as m,Ut as h,X as g,Y as _,Z as v,_t as y,k as b,mt as x,ot as S,q as C,r as w,t as T,ut as E,wt as D}from"#entry";import{t as O}from"./6TUvuKw-.js";import{r as k}from"./By3-Oigm.js";import{r as A,t as j}from"./D1SGgpeJ.js";import{a as M,p as N,u as P}from"./vcHT-ufV.js";import{i as F,t as ee}from"./Dy45_BSj.js";import{n as I}from"./hK0Xv1bA.js";import{n as te,r as ne,t as L}from"./DicSvcoI.js";import{a as re,c as ie,i as ae,n as R,o as z,r as oe,t as se}from"./DKKnluDw.js";import{t as ce}from"./Ckamtj1Q.js";import{n as le,r as ue,t as B}from"./CMcxTY2l.js";var V=[`onClick`],H=e({__name:`FlatList`,props:{chunks:{},session:{},link:{type:Boolean,default:!0},basic:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:t}){let n=t;return(t,i)=>{let a=F;return E(),C(L,{items:e.chunks,"key-prop":`chunk_id`},{default:r(({item:t})=>[l(`div`,{flex:``,pb2:``,onClick:e=>n(`select`,t)},[f(a,{chunk:t,basic:e.basic,link:e.link,"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{"left-after":r(()=>[t.is_initial?(E(),C(k,{key:0,text:`initial`})):c(``,!0)]),_:2},1032,[`chunk`,`basic`,`link`])],8,V)]),_:1},8,[`items`])}}}),de=Object.assign(H,{__name:`ChunksFlatList`}),U={op50:``,"font-mono":``,w12:``},W=[`title`],G={flex:`~ gap-1 items-center`},K=e({__name:`Graph`,props:{session:{},chunks:{},entryId:{default:``}},setup(e){let t=e,n=i(()=>t.chunks),a=b();return I({modules:n,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:r,scale:i,spacing:a,tree:s,hierarchy:c,collapsedNodes:l,container:u,modulesMap:d,nodes:f,links:p,nodesMap:m,linksMap:h,width:g,height:_,childToParentMap:v}=e;return()=>{g.value=window.innerWidth,_.value=window.innerHeight;let e=n.value.filter(e=>t.entryId?e.id===t.entryId:e.reason===`entry`),y=new Set,b=c({module:{id:`~root`}},t=>`${t.module?.id}`==`~root`?(e.forEach(e=>{y.add(e),r.value&&v.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!l.has(e.id),hasChildren:!1}))):l.has(`${t.module?.id}`)?[]:t.module.imports?.map(e=>{let n=d.value.get(`${e.chunk_id}`);if(!(!n||y.has(n)))return r.value&&v.set(n.id,t.module.id),y.add(n),{module:n,expanded:!l.has(n.id),hasChildren:!1}}).filter(e=>e!==void 0));r.value&&=!1,s().nodeSize([o(a.height),o(a.width)+o(a.gap)])(b);let x=b.descendants();for(let e of x)[e.x,e.y]=[e.y-o(a.width),e.x];let C=Math.min(...x.map(e=>e.x)),w=Math.min(...x.map(e=>e.y));if(C<o(a.margin))for(let e of x)e.x+=Math.abs(C)+o(a.margin);if(w<o(a.margin))for(let e of x)e.y+=Math.abs(w)+o(a.margin);f.value=x,m.clear();for(let e of x)m.set(`${e.data.module.id}`,e);let T=b.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),E=n.value.flatMap(e=>e.imports.filter(t=>!T.find(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:m.get(`${e.chunk_id}`),target:m.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),D=[...T,...E];h.clear();for(let e of D)h.set(e.id,e);p.value=D,S(()=>{g.value=u.value.scrollWidth/i.value+o(a.margin),_.value=u.value.scrollHeight/i.value+o(a.margin)})}}}),(t,i)=>{let s=O,d=B;return E(),C(d,{session:e.session,modules:n.value,"expand-controls":!1},{default:r(({node:e})=>[f(s,{class:`flex items-center`,to:{path:o(a).path,query:{chunk:e.data.module.chunk_id}}},{default:r(()=>[l(`span`,U,`#`+u(e.data.module.id),1),l(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[l(`div`,null,u(e.data.module.name||`[unnamed]`),1),f(k,{text:e.data.module.reason},null,8,[`text`]),e.data.module.is_initial?(E(),C(k,{key:0,text:`initial`})):c(``,!0)],8,W),i[1]||=l(`div`,{"flex-auto":``},null,-1),l(`div`,G,[i[0]||=l(`div`,{"i-ph-package-duotone":``},null,-1),v(` `+u(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),fe=Object.assign(K,{__name:`ChunksGraph`}),q={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},J={flex:`~ col gap-4`},Y={key:0,grid:`~ cols-[250px_1fr] gap-1`},X=[`onClick`],Z={key:0,"text-primary":``},pe={key:1},Q=[`onClick`],$=[`title`],me=e({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:t}){let r=e,i=t,s=p(`el`);return D(()=>s.value?.append(r.graph.el)),(t,r)=>{let d=R,p=A,h=y(`tooltip`);return E(),_(`div`,q,[l(`div`,{ref_key:`el`,ref:s,"w-500px":``},null,512),l(`div`,J,[f(d,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:r[0]||=e=>i(`select`,e)},null,8,[`selected`,`options`]),e.selected?(E(),_(`div`,Y,[(E(!0),_(m,null,x(e.selected.children,t=>(E(),_(m,{key:t.id},[l(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>i(`select`,t)},[t.meta&&t.meta===e.selected?.meta?(E(),_(`span`,Z,`(self)`)):(E(),_(`span`,pe,u(t.meta?.name||t.id),1))],8,X),l(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>i(`select`,t)},[l(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:a({background:o(z)(e.graph.options.getColor?.(t)||`#000`),width:`${t.size/e.selected.size*100}%`})},null,4),f(p,{"text-xs":``,bytes:t.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),t.children.length>0?n((E(),_(`div`,{key:0,title:`${t.children.length} modules`,"text-xs":``,"op-fade":``},[v(` (`+u(t.children.length)+`) `,1)],8,$)),[[h,`${t.children.length} modules`]]):c(``,!0)],8,Q)],64))),128))])):c(``,!0)])])}}}),he=Object.assign(me,{__name:`ChunksSunburst`}),ge=e({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=p(`el`);return D(()=>n.value?.append(t.graph.el)),(e,t)=>(E(),_(`div`,{ref_key:`el`,ref:n},null,512))}}),_e=Object.assign(ge,{__name:`ChunksFlamegraph`}),ve={key:1,relative:``,"max-h-screen":``,"of-hidden":``},ye={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},be={key:0,h10:``,mr2:``,flex:`~ items-center`},xe={flex:`~ gap-2 items-center`,p2:``,border:`t base`},Se=[`onClick`],Ce={key:0,class:`px5 pt32 of-auto h-screen`,flex:`~ col gap-4`},we={key:1,class:`px5 pt32 of-auto h-screen`,flex:`~ col gap-4`},Te={key:3,"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},Ee={key:4,"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},De={key:5,"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},Oe={key:0,border:`~ base rounded-lg`,"bg-base":``,p2:``,flex:`~ col gap-2`,"min-w-50":``,"shadow-lg":``},ke={flex:`~ gap-2 items-center`},Ae={truncate:``},je={flex:`~ gap-2 items-center`},Me={key:0,flex:`~ gap-2 items-center`},Ne={"text-xs":``},Pe={key:1,flex:`~ gap-2 items-center`},Fe=e({__name:`chunks`,props:{session:{}},setup(e){let n=e,a=d(P()),p=[{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:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],y=s({search:``}),b=T(),{state:S,isLoading:D}=M(async()=>await b.value.call(`vite:rolldown:get-chunks-graph`,{session:n.session.id}),null),O=i(()=>{let e=new Map;return S.value?.forEach(t=>{e.set(`${t.chunk_id}`,t)}),e}),F=i(()=>S.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]),I=N(()=>F.value,()=>new ne(F.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),L=i(()=>y.value.search?I.value.search(y.value.search).map(e=>e.item):F.value),{pathSelectorVisible:z,pathNodes:B,selectPathNodes:V,togglePathSelector:H,normalizedGraph:U}=ue({onToggle:e=>{y.value.search=e?!1:``},dataMap:i(()=>O.value),list:i(()=>L.value),importIdKey:`chunk_id`});function W(e){j.value.chunkViewType=e}let G=i(()=>{let e=new Map;for(let t of n.session.modulesList)e.set(t.id,t);return e});function K(e){return e.asset?.size?e.asset.size:e.modules.reduce((e,t)=>{let n=G.value.get(t);if(!n||!n.buildMetrics?.transforms?.length)return e;let r=n.buildMetrics.transforms;return e+r[r.length-1].transformed_code_size},0)}let{tree:q,chartOptions:J,graph:Y,nodeHover:X,nodeSelected:Z,selectedNode:pe,selectNode:Q,buildGraph:$}=se({data:i(()=>L.value.map(e=>({...e,filename:e.name||`chunk-${e.chunk_id}`,size:K(e)}))),nameKey:`filename`,sizeKey:`size`,rootText:`Chunks`,nodeType:`chunk`,graphOptions:{onClick(e){e&&(X.value=e)},onHover(e){e&&(X.value=e),e===null&&(X.value=void 0)},onLeave(){X.value=void 0},onSelect(e){Z.value=e||q.value.root,pe.value=e?.meta}},onUpdate(){switch(j.value.chunkViewType){case`sunburst`:Y.value=new ae(q.value.root,J.value);break;case`treemap`:Y.value=new re(q.value.root,{...J.value,selectedPaddingRatio:0});break;case`flamegraph`:Y.value=new oe(q.value.root,J.value);break}}});return t(()=>j.value.chunkViewType,()=>{[`treemap`,`sunburst`,`flamegraph`].includes(j.value.chunkViewType)&&$()}),(t,n)=>{let i=w,s=de,d=le,b=te,S=ee,T=fe,M=R,N=he,P=_e,F=A,I=ie;return o(D)?(E(),C(i,{key:0})):(E(),_(`div`,ve,[l(`div`,ye,[f(b,{modelValue:y.value,"onUpdate:modelValue":n[2]||=e=>y.value=e,rules:[]},g({"search-end":r(()=>[o(j).chunkViewType===`graph`?(E(),_(`div`,be,[l(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:n[1]||=e=>o(H)(!0)},[...n[5]||=[l(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):c(``,!0)]),default:r(()=>[l(`div`,xe,[n[6]||=l(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(E(),_(m,null,x(p,e=>l(`button`,{key:e.value,"btn-action":``,class:h(o(j).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>W(e.value)},[l(`div`,{class:h(e.icon)},null,2),v(` `+u(e.label),1)],10,Se)),64))])]),_:2},[o(z)?{name:`search`,fn:r(()=>[f(d,{session:e.session,data:L.value,"import-id-key":`chunk_id`,"search-keys":[`name`],onSelect:o(V),onClose:n[0]||=e=>o(H)(!1)},{list:r(({select:t,data:n})=>[f(s,{session:e.session,chunks:n,link:!1,basic:!0,onSelect:t},null,8,[`session`,`chunks`,`onSelect`])]),item:r(({id:e})=>[v(u(O.value.get(e)?.name||`[unnamed]`),1)]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`])]),o(j).chunkViewType===`list`?(E(),_(`div`,Ce,[f(s,{session:e.session,chunks:L.value},null,8,[`session`,`chunks`])])):c(``,!0),o(j).chunkViewType===`detailed-list`?(E(),_(`div`,we,[(E(!0),_(m,null,x(L.value,t=>(E(),C(S,{key:t.id,border:`~ base rounded-lg`,p3:``,chunk:t,chunks:L.value,session:e.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):o(j).chunkViewType===`graph`?(E(),C(T,{key:2,class:`pt32`,session:e.session,chunks:o(U),"entry-id":o(B).start},null,8,[`session`,`chunks`,`entry-id`])):o(j).chunkViewType===`treemap`?(E(),_(`div`,Te,[o(Y)?(E(),C(ce,{key:0,graph:o(Y),selected:o(Z),onSelect:n[3]||=e=>o(Q)(e)},{default:r(({selected:e,options:t,onSelect:n})=>[f(M,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):c(``,!0)])):o(j).chunkViewType===`sunburst`?(E(),_(`div`,Ee,[o(Y)?(E(),C(N,{key:0,graph:o(Y),selected:o(Z),onSelect:n[4]||=e=>o(Q)(e)},null,8,[`graph`,`selected`])):c(``,!0)])):o(j).chunkViewType===`flamegraph`?(E(),_(`div`,De,[o(Y)?(E(),C(P,{key:0,graph:o(Y)},null,8,[`graph`])):c(``,!0)])):c(``,!0),f(I,{"hover-x":a.x,"hover-y":a.y},{default:r(()=>[o(X)?.meta?(E(),_(`div`,Oe,[l(`div`,ke,[n[7]||=l(`i`,{"i-ph-shapes-duotone":``,"flex-none":``},null,-1),l(`span`,Ae,u(o(X).meta.name||`[unnamed]`),1)]),l(`div`,je,[n[8]||=l(`span`,{op50:``,"text-xs":``},`Size:`,-1),f(F,{bytes:o(X).meta.size,"text-xs":``},null,8,[`bytes`])]),o(X).meta.modules?.length?(E(),_(`div`,Me,[n[9]||=l(`span`,{op50:``,"text-xs":``},`Modules:`,-1),l(`span`,Ne,u(o(X).meta.modules?.length),1)])):c(``,!0),o(X).meta.is_initial?(E(),_(`div`,Pe,[f(k,{text:`initial`})])):c(``,!0)])):c(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Et as t,Ht as n,J as r,K as i,Kt as a,Q as o,U as s,Y as c,d as l,k as u,mt as d,q as f,r as p,t as m,ut as h}from"#entry";import"./6TUvuKw-.js";import{r as g,t as _}from"./By3-Oigm.js";import{t as v}from"./Cs9u2aM3.js";import{a as y}from"./vcHT-ufV.js";import{t as b}from"./EoT68z9_.js";var x={key:0},S={key:2},C={op50:``},w={key:3},T=[`textContent`],E=[`textContent`],D=e({__name:`RawEventsTable`,props:{events:{},fields:{default:()=>[`event_id`,`action`,`module_id`,`plugin_name`,`timestamp`,`content`,`*`]},session:{}},setup(e){let u=e;function p(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 m(e){return e.action===`HookLoadCallEnd`||e.action===`HookTransformCallStart`||e.action===`HookTransformCallEnd`?e.content:null}return(y,D)=>{let O=_,k=b;return h(),c(s,null,[e.events.length?r(``,!0):(h(),c(`div`,x,[...D[0]||=[i(`div`,{p5:``,italic:``},` No events found `,-1)]])),i(`table`,null,[i(`tbody`,null,[(h(!0),c(s,null,d(u.events,_=>(h(),c(`tr`,{key:_.event_id},[(h(!0),c(s,null,d(u.fields,s=>(h(),c(`td`,{key:s,px2:``},[s===`module_id`?(h(),f(O,{key:0,id:`module_id`in _?_.module_id:``,session:e.session},null,8,[`id`,`session`])):s===`action`?(h(),f(g,{key:1,text:_.action},null,8,[`text`])):s===`plugin_name`&&`plugin_name`in _?(h(),c(`div`,S,[o(k,{"font-mono":``,name:_.plugin_name},null,8,[`name`]),i(`code`,C,`#`+a(_.plugin_id),1)])):s===`event_id`?(h(),c(`div`,w,a(_.event_id),1)):s===`content`&&m(_)?(h(),f(n(l),{key:4},{popper:t(()=>[i(`pre`,{p1:``,"text-sm":``,textContent:a(m(_))},null,8,T)]),default:t(()=>[D[1]||=i(`div`,{"i-ph-code":``},null,-1)]),_:2},1024)):s===`timestamp`&&`timestamp`in _?(h(),f(v,{key:5,"text-sm":``,timestamp:_.timestamp},null,8,[`timestamp`])):s===`*`?(h(),c(`pre`,{key:6,"text-sm":``,textContent:a(p(_,e.fields))},null,8,E)):r(``,!0)]))),128))]))),128))])])],64)}}}),O=Object.assign(D,{__name:`DataRawEventsTable`}),k={key:1},A=e({__name:`raw`,props:{session:{}},setup(e){let t=e,a=m(),l=u().query,d=y(async()=>await a.value.call(`vite:rolldown:get-module-raw-events`,{session:t.session.id,module:l.module}),{events:[]});return(t,a)=>{let l=p,u=O;return h(),c(s,null,[n(d).isLoading?(h(),f(l,{key:0})):r(``,!0),i(`div`,null,[n(d).isReady?(h(),f(u,{key:0,events:n(d).state.value.events,session:e.session},null,8,[`events`,`session`])):(h(),c(`div`,k,[o(l)]))])],64)}}});export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,Et as n,G as r,Ht as i,It as a,J as o,K as s,Kt as c,Q as l,U as u,Ut as d,X as f,Y as p,Z as m,k as h,mt as g,ot as _,q as v,ut as y}from"#entry";import"./6TUvuKw-.js";import{r as b}from"./D04G8HHr.js";import{a as x,s as S}from"./Bjj8tBzd.js";import{t as C}from"./By3-Oigm.js";import{t as w}from"./CBrsTh9c.js";import{t as T}from"./D1SGgpeJ.js";import{t as E}from"./B9ATRPQ7.js";import{h as ee,p as D}from"./vcHT-ufV.js";import{n as O}from"./hK0Xv1bA.js";import{n as k,r as A,t as j}from"./DicSvcoI.js";import{t as M}from"./EoT68z9_.js";import{t as N}from"./Bb89bWCj.js";import{n as P,r as F,t as I}from"./CMcxTY2l.js";import{n as L,t as R}from"./BmEqTRfc.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=e({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(e,{emit:t}){let r=t;return(t,i)=>{let a=C;return y(),p(`div`,z,[l(j,{items:e.modules,"key-prop":`id`},{default:n(({item:t})=>[s(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,t)},[l(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=e({__name:`DetailedList`,props:{session:{},modules:{}},setup(e){let t=e,i=r(()=>{let e=new Map;for(let n of t.modules){let t=n.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(n.id,t)}return e});return(t,r)=>{let a=M,c=E,d=C;return y(),p(`div`,U,[l(j,{items:e.modules,"key-prop":`id`},{default:n(({item:t})=>[s(`div`,W,[l(d,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:n(()=>[s(`div`,G,[s(`ul`,K,[(y(!0),p(u,null,g(i.value.get(t.id),(e,n)=>(y(),p(u,{key:n},[e.source_code_size!==e.transformed_code_size&&e.transformed_code_size?(y(),p(`li`,q,[l(a,{name:e.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),n===i.value.get(t.id).length-1?o(``,!0):(y(),p(`span`,J,`|`))])):o(``,!0)],64))),128))]),r[0]||=s(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),s(`div`,Y,[s(`span`,null,[t.buildMetrics?(y(),v(c,{key:0,metrics:t.buildMetrics},null,8,[`metrics`])):o(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),Z=Object.assign(X,{__name:`ModulesDetailedList`}),Q=[`d`,`stroke-dasharray`],te=e({__name:`Graph`,props:{modules:{},session:{}},setup(e){let t=e,a=r(()=>t.modules);return O({modules:a,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:o,tree:s,hierarchy:c,collapsedNodes:l,container:u,modulesMap:d,nodes:f,links:p,nodesMap:m,linksMap:h,width:g,height:v,childToParentMap:y,focusOn:b}=e,x=r(()=>a.value.filter(e=>e.importers.length===0));return(e=!0)=>{g.value=window.innerWidth,v.value=window.innerHeight;let r=new Set,a=c({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{r.add(e),t.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!l.has(e.id),hasChildren:!1}))):l.has(e.module.id)?[]:e.module.imports.map(n=>{let i=d.value.get(n.module_id);if(i&&!r.has(i)&&!(y.has(i.id)&&y.get(i.id)!==e.module.id))return r.add(i),t.value&&y.set(i.id,e.module.id),{module:i,import:n,expanded:!l.has(i.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,s().nodeSize([i(o.height),i(o.width)+i(o.gap)])(a);let S=a.descendants();for(let e of S)[e.x,e.y]=[e.y-i(o.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports?.filter(t=>y.get(t.module_id)===e.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<i(o.margin))for(let e of S)e.x+=Math.abs(C)+i(o.margin);if(w<i(o.margin))for(let e of S)e.y+=Math.abs(w)+i(o.margin);f.value=S,m.clear();for(let e of S)m.set(e.data.module.id,e);let T=a.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}`}));h.clear();for(let e of T)h.set(e.id,e);p.value=T,_(()=>{g.value=u.value.scrollWidth/n.value+i(o.margin),v.value=u.value.scrollHeight/n.value+i(o.margin);let t=x.value?.[0]?.id;e&&t&&_(()=>{b(t,!1)})})}}}),(t,r)=>{let i=C,o=I;return y(),v(o,{session:e.session,modules:a.value},{default:n(({node:t,nodesRefMap:n})=>[l(i,{id:t.data.module.id,ref:e=>n.set(t.data.module.id,e?.$el),link:!0,session:e.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:n(({link:e,d:t,linkClass:n})=>[s(`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=e({__name:`Folder`,props:{session:{},modules:{}},setup(e){let t=e,n=r(()=>{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:b(e,`Project Root`),nodeModules:b(n,`Node Modules`),virtual:b(r,`Virtual Modules`)}});return(e,t)=>{let r=N;return y(),p(`div`,re,[s(`div`,ie,[Object.keys(n.value.workspace.children).length?(y(),v(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`])):o(``,!0),Object.keys(n.value.nodeModules.children).length?(y(),p(u,{key:1},[t[0]||=s(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),l(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)):o(``,!0),Object.keys(n.value.virtual.children).length?(y(),p(u,{key:2},[t[1]||=s(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),l(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)):o(``,!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=e({__name:`index`,props:{session:{}},setup(e){let _=e,b=h(),E=t(),O=a({search:b.query.search||``,selected:b.query.file_types?L(b.query.file_types):null,node_modules:b.query.node_modules?L(b.query.node_modules):null}),j=[{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`}];ee(O.value,e=>{let t={...b.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};E.replace({query:R(t)})},{debounce:500});let M=r(()=>_.session.modulesList.map(e=>({mod:e,path:w(e.id,_.session.meta.cwd),type:S(e.id)}))),N=r(()=>x.filter(e=>M.value.some(t=>e.match.test(t.mod.id)))),I=r(()=>{let e=M.value;return O.value.selected&&(e=e.filter(e=>{let t=S(e.mod.id);return O.value.selected.includes(t.name)})),O.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&O.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=>{O.value.search=e?!1:``},dataMap:r(()=>new Map(_.session.modulesList.map(e=>[e.id,e]))),list:I,importIdKey:`module_id`}),W=D(()=>I.value,()=>new A(I.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),G=r(()=>O.value.search?W.value.search(O.value.search).map(e=>e.item):I.value);function K(e){b.query.module&&E.replace({query:{...b.query,module:void 0}}),T.value.moduleGraphViewType=e}return(t,r)=>{let a=H,h=C,_=P,b=k,x=Z,S=ne,w=oe;return y(),p(`div`,se,[s(`div`,ce,[l(b,{modelValue:O.value,"onUpdate:modelValue":r[2]||=e=>O.value=e,rules:N.value},f({"search-end":n(()=>[i(T).moduleGraphViewType===`graph`?(y(),p(`div`,le,[s(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:r[1]||=e=>i(V)(!0)},[...r[3]||=[s(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):o(``,!0)]),default:n(()=>[s(`div`,ue,[r[4]||=s(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(y(),p(u,null,g(j,e=>s(`button`,{key:e.value,"btn-action":``,class:d(i(T).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>K(e.value)},[s(`div`,{class:d(e.icon)},null,2),m(` `+c(e.label),1)],10,de)),64))])]),_:2},[i(z)?{name:`search`,fn:n(()=>[l(_,{session:e.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:i(B),onClose:r[0]||=e=>i(V)(!1)},{list:n(({select:t,data:n})=>[n?.length?(y(),v(a,{key:0,session:e.session,modules:n,"disable-tooltip":``,link:!1,onSelect:t},null,8,[`session`,`modules`,`onSelect`])):o(``,!0)]),item:n(({id:t})=>[l(h,{id:t,session:e.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`])]),i(T).moduleGraphViewType===`list`?(y(),p(`div`,fe,[l(a,{session:e.session,modules:G.value},null,8,[`session`,`modules`]),s(`div`,pe,[s(`span`,$,c(G.value.length)+` of `+c(e.session.modulesList.length),1)])])):i(T).moduleGraphViewType===`detailed-list`?(y(),p(`div`,me,[l(x,{session:e.session,modules:G.value},null,8,[`session`,`modules`]),s(`div`,he,[s(`span`,ge,c(G.value.length)+` of `+c(e.session.modulesList.length),1)])])):i(T).moduleGraphViewType===`graph`?(y(),v(S,{key:2,session:e.session,modules:i(U)},null,8,[`session`,`modules`])):(y(),v(w,{key:3,session:e.session,modules:G.value},null,8,[`session`,`modules`]))])}}});export{_e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Bt as t,Ct as n,G as r,Gt as i,Ht as a,It as o,J as s,K as c,Kt as l,Rt as u,St as d,U as f,W as p,Y as m,_ as h,a as g,b as _,f as v,g as y,h as b,ht as ee,lt as te,m as x,mt as ne,ot as re,p as ie,q as ae,ut as S,v as oe,y as se}from"#entry";import{t as C}from"./D04G8HHr.js";import{t as ce}from"./D1SGgpeJ.js";function w(){return typeof window<`u`}function T(e){return le(e)?(e.nodeName||``).toLowerCase():`#document`}function E(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function D(e){return((le(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function le(e){return w()?e instanceof Node||e instanceof E(e).Node:!1}function O(e){return w()?e instanceof Element||e instanceof E(e).Element:!1}function k(e){return w()?e instanceof HTMLElement||e instanceof E(e).HTMLElement:!1}function ue(e){return!w()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof E(e).ShadowRoot}var de=new Set([`inline`,`contents`]);function A(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=P(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!de.has(i)}var fe=new Set([`table`,`td`,`th`]);function pe(e){return fe.has(T(e))}var me=[`:popover-open`,`:modal`];function j(e){return me.some(t=>{try{return e.matches(t)}catch{return!1}})}var he=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ge=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],_e=[`paint`,`layout`,`strict`,`content`];function ve(e){let t=M(),n=O(e)?P(e):e;return he.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ge.some(e=>(n.willChange||``).includes(e))||_e.some(e=>(n.contain||``).includes(e))}function ye(e){let t=I(e);for(;k(t)&&!N(t);){if(ve(t))return t;if(j(t))return null;t=I(t)}return null}function M(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var be=new Set([`html`,`body`,`#document`]);function N(e){return be.has(T(e))}function P(e){return E(e).getComputedStyle(e)}function F(e){return O(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function I(e){if(T(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ue(e)&&e.host||D(e);return ue(t)?t.host:t}function xe(e){let t=I(e);return N(t)?e.ownerDocument?e.ownerDocument.body:e.body:k(t)&&A(t)?t:xe(t)}function L(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xe(e),i=r===e.ownerDocument?.body,a=E(r);if(i){let e=R(a);return t.concat(a,a.visualViewport||[],A(r)?r:[],e&&n?L(e):[])}return t.concat(r,L(r,[],n))}function R(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Se(e){let t=P(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=k(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_(n)!==a||_(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ce(e){return O(e)?e:e.contextElement}function z(e){let t=Ce(e);if(!k(t))return y(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Se(t),o=(a?_(n.width):n.width)/r,s=(a?_(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var we=y(0);function Te(e){let t=E(e);return!M()||!t.visualViewport?we:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ee(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==E(e)?!1:t}function B(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ce(e),o=y(1);t&&(r?O(r)&&(o=z(r)):o=z(e));let s=Ee(a,n,r)?Te(a):y(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=E(a),t=r&&O(r)?E(r):r,n=e,i=R(n);for(;i&&r&&t!==n;){let e=z(i),t=i.getBoundingClientRect(),r=P(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=E(i),i=R(n)}}return se({width:u,height:d,x:c,y:l})}function V(e,t){let n=F(e).scrollLeft;return t?t.left+n:B(D(e)).left+n}function De(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-V(e,n),y:n.top+t.scrollTop}}function Oe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=D(r),s=t?j(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=y(1),u=y(0),d=k(r);if((d||!d&&!a)&&((T(r)!==`body`||A(o))&&(c=F(r)),k(r))){let e=B(r);l=z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?De(o,c):y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ke(e){return Array.from(e.getClientRects())}function Ae(e){let t=D(e),n=F(e),r=e.ownerDocument.body,i=h(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=h(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+V(e),s=-n.scrollTop;return P(r).direction===`rtl`&&(o+=h(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var je=25;function Me(e,t){let n=E(e),r=D(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=M();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=V(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=je&&(a-=o)}else l<=je&&(a+=l);return{width:a,height:o,x:s,y:c}}var Ne=new Set([`absolute`,`fixed`]);function Pe(e,t){let n=B(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=k(e)?z(e):y(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Fe(e,t,n){let r;if(t===`viewport`)r=Me(e,n);else if(t===`document`)r=Ae(D(e));else if(O(t))r=Pe(t,n);else{let n=Te(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return se(r)}function Ie(e,t){let n=I(e);return n===t||!O(n)||N(n)?!1:P(n).position===`fixed`||Ie(n,t)}function Le(e,t){let n=t.get(e);if(n)return n;let r=L(e,[],!1).filter(e=>O(e)&&T(e)!==`body`),i=null,a=P(e).position===`fixed`,o=a?I(e):e;for(;O(o)&&!N(o);){let t=P(o),n=ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ne.has(i.position)||A(o)&&!n&&Ie(e,o))?r=r.filter(e=>e!==o):i=t,o=I(o)}return t.set(e,r),r}function Re(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?j(t)?[]:Le(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Fe(t,n,i);return e.top=h(r.top,e.top),e.right=oe(r.right,e.right),e.bottom=oe(r.bottom,e.bottom),e.left=h(r.left,e.left),e},Fe(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function ze(e){let{width:t,height:n}=Se(e);return{width:t,height:n}}function Be(e,t,n){let r=k(t),i=D(t),a=n===`fixed`,o=B(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=y(0);function l(){c.x=V(i)}if(r||!r&&!a)if((T(t)!==`body`||A(i))&&(s=F(t)),r){let e=B(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?De(i,s):y(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function H(e){return P(e).position===`static`}function Ve(e,t){if(!k(e)||P(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return D(e)===n&&(n=n.ownerDocument.body),n}function He(e,t){let n=E(e);if(j(e))return n;if(!k(e)){let t=I(e);for(;t&&!N(t);){if(O(t)&&!H(t))return t;t=I(t)}return n}let r=Ve(e,t);for(;r&&pe(r)&&H(r);)r=Ve(r,t);return r&&N(r)&&H(r)&&!ve(r)?n:r||ye(e)||n}var Ue=async function(e){let t=this.getOffsetParent||He,n=this.getDimensions,r=await n(e.floating);return{reference:Be(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function We(e){return P(e).direction===`rtl`}var Ge={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:D,getClippingRect:Re,getOffsetParent:He,getElementRects:Ue,getClientRects:ke,getDimensions:ze,getScale:z,isElement:O,isRTL:We},Ke=x,qe=b,Je=ie,Ye=(e,t,n)=>{let r=new Map,i={platform:Ge,...n},a={...i.platform,_c:r};return v(e,t,{...i,platform:a})},Xe=e({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:r,hoverY:a}=t(e),s=d(`hoverElement`),l=o(0),u=o(0);return n([r,a],([e,t])=>{Ye({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},s.value,{placement:`right-start`,middleware:[Je(),qe(),Ke({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{l.value=e,u.value=t})}),(e,t)=>(S(),ae(p,{to:`body`},[c(`div`,{ref_key:`hoverElement`,ref:s,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:i({left:`${l.value}px`,top:`${u.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=e({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,i=t,a=r(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(S(),m(`div`,Lt,[(S(!0),m(f,null,ne(a.value,(e,t)=>(S(),m(f,{key:e.id},[t>0?(S(),m(`div`,Rt)):s(``,!0),c(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>i(`select`,e)},[c(`span`,null,l(e.text||e.id),1)],8,zt)],64))),128))]))}}),Vt=Object.assign(Bt,{__name:`ChartNavBreadcrumb`});function Ht(e){let{data:t,nameKey:i,sizeKey:s,rootText:c,nodeType:l,graphOptions:d,onUpdate:f}=e,p=u(void 0),m=u(void 0),h=o(void 0),_=u(void 0),v,y=r(()=>{if(e.tree)return e.tree.value;let n=a(t),r=new Map,o=0,u={id:`~root`,text:c,size:0,sizeSelf:0,children:[]};if(!n?.length)return{map:r,root:u,maxDepth:o};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=C(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,n,i,a){if(r.has(t))return r.get(t);a>o&&(o=a);let s={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:i};return r.set(t,s),i.children.push(s),d.unshift(()=>{let t=s.sizeSelf;s.size+=s.children.reduce((e,t)=>e+t.size,0),s.subtext=C(s.size).join(` `),s.children.length&&t/s.size>.1&&s.children.push({id:`${s.id}-self`,text:``,size:t,sizeSelf:t,subtext:C(t).join(` `),children:[],meta:{...e,path:``,type:l},parent:s}),s.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),s}function p(e){let t=e[i].split(`/`).filter(Boolean),n=u,a=``,o=0;t.forEach((c,u)=>{if(a+=(a?`/`:``)+c,o++,u===t.length-1){let t={id:e[i],text:c,size:e[s],sizeSelf:e[s],subtext:C(e[s]).join(` `),children:[],meta:{...e,path:c,type:l}};n.children.push(t),r.set(e[i],t)}else n=f(e,a,c,n,o)})}return n.forEach(p),d.forEach(e=>e()),{map:r,root:u,maxDepth:o}}),b=r(()=>({animate:ce.value.chartAnimation,palette:{stroke:g.value?`#222`:`#555`,fg:g.value?`#fff`:`#000`,bg:g.value?`#111`:`#fff`},getColor:ot(y.value.root,g.value?.8:.9,g.value?1:1.1),getSubtext:e=>e.subtext,...d}));function ee(e,t){h.value=e?.meta,e?.children.length||(e=e?.parent),_.value?.select(e,t)}function x(){v?.(),m.value=y.value.root,f?.(),re(()=>{let e=h.value&&y.value.map.get(h.value[i])||null;e&&ee(e,!1)}),v=()=>{_.value?.dispose(),_.value=void 0,h.value=void 0}}return re(()=>{n(()=>[y.value,b.value],()=>{x()},{deep:!0,immediate:!1}),x()}),te(()=>{v?.()}),{tree:y,graph:_,chartOptions:b,nodeHover:p,nodeSelected:m,selectedNode:h,selectNode:ee,buildGraph:x}}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{Et as e,K as t,Kt as n,Q as r,T as i,Y as a,Z as o,ut as s}from"#entry";import{t as c}from"./6TUvuKw-.js";import{t as l}from"./C3MbbcWQ.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(l){let g=l;return i({title:`${g.status} - ${g.statusText} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,g)=>{let _=c;return s(),a(`div`,u,[t(`div`,d,[t(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:n(l.status)},null,8,f),t(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:n(l.statusText)},null,8,p),t(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:n(l.description)},null,8,m),t(`div`,h,[r(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:e(()=>[o(n(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-58347f79`]]);export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,Ct as n,Et as r,G as i,Ht as a,It as o,J as s,K as c,Kt as l,Pt as u,Q as d,U as f,Ut as p,Y as m,Z as h,c as g,gt as _,k as v,mt as y,q as b,r as x,t as S,u as C,ut as w}from"#entry";import{t as T}from"./6TUvuKw-.js";import{r as E,t as D}from"./By3-Oigm.js";import{r as O,t as k}from"./D1SGgpeJ.js";import{a as A,o as j,p as ee,u as te}from"./vcHT-ufV.js";import{n as M,r as N,t as P}from"./DicSvcoI.js";import{a as ne,c as F,n as I,t as re}from"./DKKnluDw.js";import{t as L}from"./B9O9mwcz.js";import{t as ie}from"./Ckamtj1Q.js";var R={flex:`~ row gap-1`,"of-hidden":``},z={flex:`~ row gap-1`,"ws-nowrap":``},B={p2:``,flex:`~ col gap-1`},V=e({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let t=e,n=i(()=>{let e=new Map;return t.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(t.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(t,i)=>{let a=D,o=_(`VMenu`);return w(),m(`div`,R,[c(`div`,z,[d(a,{id:n.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),n.value[0].version&&e.showVersion?(w(),b(E,{key:0,text:n.value[0].version,as:`span`},null,8,[`text`])):s(``,!0)]),n.value.length>1?(w(),b(o,{key:0,delay:{show:200,hide:0},"flex-none":``},{popper:r(()=>[c(`div`,B,[(w(!0),m(f,null,y(n.value,t=>(w(),m(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[d(a,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(w(),b(E,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):s(``,!0)]))),128))])]),default:r(()=>[d(E,{text:`+${n.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):s(``,!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:``},Q={p2:``,flex:`~ col gap-1`},ae={w24:``,"inline-flex":``},oe={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},se={key:1},ce=e({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(e){let t=v(),{state:n,next:i}=j([``,`desc`,`asc`],{initialValue:k.value.packageSizeSortType});function o(){i(),k.value.packageSizeSortType=n.value}return(i,u)=>{let _=L,v=O,x=D,S=H,E=T;return w(),m(`div`,U,[c(`div`,W,[c(`div`,{title:e.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:p([e.groupView?`min-w40`:`min-w80`])},[e.groupView?(w(),m(`div`,K,[d(_,{name:e.packages?.[0]?.name},null,8,[`name`])])):(w(),m(f,{key:1},[h(` Package `)],64))],10,G),e.groupView?s(``,!0):(w(),m(`div`,q,` Version `)),c(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:p([e.groupView?`px2`:`pl2`])},[c(`button`,J,[u[0]||=h(` Size `,-1),e.disableSizeSort?s(``,!0):(w(),m(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:o},[c(`i`,{"text-xs":``,class:p([a(n)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,a(n)?`op100 text-primary`:`op50`])},null,2)]))])],2),u[1]||=c(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),e.packages.length?(w(),b(P,{key:0,role:`rowgroup`,items:e.packages,"key-prop":`dir`},{default:r(({item:n,index:i})=>[d(E,{role:`row`,flex:`~ row`,class:p([`border-base border-b-1 border-dashed`,[i===e.packages.length-1?`border-b-0`:``]]),to:{path:a(t).path,query:{package:`${n.name}@${n.version}`}}},{default:r(()=>[d(a(C),{triggers:[`hover`],delay:1200,disabled:n.name.length<30},{popper:r(()=>[c(`span`,X,l(n.name),1)]),default:r(()=>[e.groupView?s(``,!0):(w(),m(`div`,Y,[d(_,{name:n.name},null,8,[`name`])]))]),_:2},1032,[`disabled`]),c(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:p({"text-primary":n.duplicated})},l(n.version),3),c(`div`,Z,[d(a(g),{delay:{show:200,hide:0}},{popper:r(()=>[c(`div`,Q,[(w(!0),m(f,null,y(n.files.filter(e=>!!e.transformedCodeSize),t=>(w(),m(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[c(`span`,ae,[d(v,{bytes:t.transformedCodeSize},null,8,[`bytes`])]),d(x,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:n.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:r(()=>[d(v,{bytes:n.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),c(`div`,oe,[d(S,{package:n,session:e.session,"show-version":e.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(w(),m(`div`,se,[...u[2]||=[c(`div`,{p4:``},[c(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[c(`p`,null,` No data `)])],-1)]]))])}}}),$=Object.assign(ce,{__name:`PackagesTable`}),le={key:1,p4:``},ue=e({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,n=i(()=>t.packages.filter(e=>e.duplicated)),r=i(()=>n.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,i)=>{let a=$;return n.value.length?(w(!0),m(f,{key:0},y(r.value,(t,n)=>(w(),m(`div`,{key:n},[d(a,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(w(),m(`div`,le,[...i[0]||=[c(`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=e({__name:`packages`,props:{session:{}},setup(e){let g=e,_=u(te()),C=v(),T=t(),E=[{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!`}],D=S(),j=o({search:``,selected:[`direct`,`transitive`]}),{state:P,isLoading:L}=A(async()=>await D.value.call(`vite:rolldown:get-packages`,{session:g.session.id}),null),R=ee(()=>P.value,()=>new N(P.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=i(()=>P.value?Object.values(P.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=i(()=>[{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=i(()=>j.value.search?R.value.search(j.value.search).map(e=>e.item):[...P.value||[]]),H=i(()=>{let e=k.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=>!j.value.selected||j.value.selected.some(t=>t.match(e.type)))});function U(e){k.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=re({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!C.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&T.replace({query:{...C.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(){k.value.packageViewType===`treemap`&&(K.value=new ne(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return n(()=>k.value.packageViewType,()=>{Z()}),(t,n)=>{let i=x,o=M,u=$,g=I,v=de,S=O,C=F;return a(L)?(w(),b(i,{key:0})):(w(),m(`div`,fe,[c(`div`,pe,[d(o,{modelValue:j.value,"onUpdate:modelValue":n[0]||=e=>j.value=e,rules:E},{default:r(()=>[c(`div`,me,[n[2]||=c(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(w(!0),m(f,null,y(B.value,e=>(w(),m(`button`,{key:e.value,"btn-action":``,class:p(a(k).packageViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[c(`div`,{class:p(e.icon)},null,2),h(` `+l(e.label),1)],10,he))),128))])]),_:1},8,[`modelValue`])]),c(`div`,ge,[a(k).packageViewType===`table`?(w(),m(f,{key:0},[d(u,{packages:H.value,session:e.session},null,8,[`packages`,`session`]),c(`div`,_e,[c(`span`,ve,l(V.value.length)+` of `+l(a(P)?.length||0),1)])],64)):a(k).packageViewType===`treemap`?(w(),m(f,{key:1},[a(K)&&H.value.length?(w(),b(ie,{key:0,graph:a(K),selected:a(J),onSelect:n[1]||=e=>a(X)(e)},{default:r(({selected:e,options:t,onSelect:n})=>[d(g,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(w(),m(`span`,ye,` No Data `))],64)):a(k).packageViewType===`duplicate-packages`?(w(),b(v,{key:2,packages:H.value,session:e.session},null,8,[`packages`,`session`])):s(``,!0)]),d(C,{"hover-x":_.x,"hover-y":_.y},{default:r(()=>[a(q)?.meta?(w(),m(`div`,be,[c(`div`,xe,l(a(q).text),1),c(`div`,Se,[d(S,{bytes:a(q).size,percent:!1},null,8,[`bytes`])])])):s(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,Ct as n,Dt as r,Et as i,G as a,Gt as o,Ht as s,It as c,J as l,K as u,Kt as d,Pt as f,Q as p,St as m,U as h,Ut as g,Y as _,Z as v,_t as y,k as b,mt as x,q as S,r as C,t as w,ut as T,wt as E}from"#entry";import{t as D}from"./6TUvuKw-.js";import{r as O}from"./D04G8HHr.js";import{n as k}from"./BlOp-aa0.js";import{r as A,t as j}from"./D1SGgpeJ.js";import{a as M,p as N,u as ee}from"./vcHT-ufV.js";import{n as P,r as F,t as I}from"./DicSvcoI.js";import{a as L,c as R,i as z,n as B,o as V,r as te,t as ne}from"./DKKnluDw.js";import{t as H}from"./Bb89bWCj.js";import{t as U}from"./Ckamtj1Q.js";var W={flex:`~ gap-1`},G={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},K={op50:``},q=e({__name:`ListItem`,props:{asset:{}},setup(e){return(t,n)=>{let r=k,a=D;return T(),S(a,{to:{query:{asset:e.asset.filename}},"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`},{default:i(()=>[u(`div`,W,[p(r,{filename:e.asset.filename},null,8,[`filename`]),u(`span`,G,[v(d(e.asset.filename)+` `,1),u(`span`,K,` (`+d(e.asset.chunk?.name?.replace(/[\[\]]/g,``))+`) `,1)])])]),_:1},8,[`to`])}}}),J=Object.assign(q,{__name:`AssetsListItem`}),Y={p4:``},X={flex:``,pb2:``},Z=e({__name:`List`,props:{assets:{}},setup(e){return(t,n)=>{let r=J;return T(),_(`div`,Y,[p(I,{items:e.assets,"key-prop":`filename`},{default:i(({item:e})=>[u(`div`,X,[p(r,{asset:e},null,8,[`asset`])])]),_:1},8,[`items`])])}}}),re=Object.assign(Z,{__name:`AssetsList`}),Q={flex:`~ gap-2`,p4:``},ie={op50:``},ae=e({__name:`Folder`,props:{assets:{},session:{}},setup(e){let t=e,n=a(()=>{let e=[];return t.assets.forEach(t=>{e.push({full:t.filename,path:t.filename})}),O(e,`Project`)}),r=a(()=>new Map(t.assets.map(e=>[e.filename,e])));return(t,a)=>{let o=H;return T(),_(`div`,Q,[e.assets?.length?(T(),S(o,{key:0,"flex-1":``,node:n.value,icon:`i-catppuccin:folder-dist catppuccin`,"icon-open":`i-catppuccin:folder-dist-open catppuccin`,link:!0,"link-query-key":`asset`},{extra:i(({node:e})=>[u(`span`,ie,` (`+d(r.value.get(e.full)?.chunk?.name?.replace(/[\[\]]/g,``))+`) `,1)]),_:1},8,[`node`])):l(``,!0)])}}}),oe=Object.assign(ae,{__name:`AssetsFolder`}),se={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},ce={flex:`~ col gap-4`},le={key:0,grid:`~ cols-[250px_1fr] gap-1`},ue=[`onClick`],de={key:0,"text-primary":``},fe={key:1},pe=[`onClick`],me=[`title`],he=e({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:t}){let n=e,i=t,a=m(`el`);return E(()=>a.value?.append(n.graph.el)),(t,n)=>{let c=B,f=A,m=y(`tooltip`);return T(),_(`div`,se,[u(`div`,{ref_key:`el`,ref:a,"w-500px":``},null,512),u(`div`,ce,[p(c,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>i(`select`,e)},null,8,[`selected`,`options`]),e.selected?(T(),_(`div`,le,[(T(!0),_(h,null,x(e.selected.children,t=>(T(),_(h,{key:t.id},[u(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>i(`select`,t)},[t.meta&&t.meta===e.selected?.meta?(T(),_(`span`,de,`(self)`)):(T(),_(`span`,fe,d(t.id),1))],8,ue),u(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>i(`select`,t)},[u(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:o({background:s(V)(e.graph.options.getColor?.(t)||`#000`),width:`${t.size/e.selected.size*100}%`})},null,4),p(f,{"text-xs":``,bytes:t.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),t.children.length>0?r((T(),_(`div`,{key:0,title:`${t.children.length} dependencies`,"text-xs":``,"op-fade":``},[v(` (`+d(t.children.length)+`) `,1)],8,me)),[[m,`${t.children.length} dependencies`]]):l(``,!0)],8,pe)],64))),128))])):l(``,!0)])])}}}),ge=Object.assign(he,{__name:`AssetsSunburst`}),_e=e({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=m(`el`);return E(()=>n.value?.append(t.graph.el)),(e,t)=>(T(),_(`div`,{ref_key:`el`,ref:n},null,512))}}),ve=Object.assign(_e,{__name:`AssetsFlamegraph`}),ye={key:1,relative:``,"max-h-screen":``,"of-hidden":``},be={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},$={flex:`~ gap-2 items-center`,p2:``,border:`t base`},xe=[`onClick`],Se={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},Ce={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},we={op50:``},Te={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},Ee={flex:`~ gap-1 items-center`},De={flex:`~ gap-1 items-center`},Oe=e({__name:`assets`,props:{session:{}},setup(e){let r=e,o=f(ee()),m=c({search:``}),y=t(),E=b(),D=[{label:`List`,value:`list`,icon:`i-ph-list-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],O=w(),{state:k,isLoading:I}=M(async()=>await O.value.call(`vite:rolldown:get-assets-list`,{session:r.session.id}),null),V=N(()=>k.value,()=>new F(k.value,{includeScore:!0,keys:[`filename`],ignoreLocation:!0,threshold:.4})),H=a(()=>m.value.search?V.value.search(m.value.search).map(e=>e.item):k.value);function W(e){j.value.assetViewType=e}let{tree:G,chartOptions:K,graph:q,nodeHover:J,nodeSelected:Y,selectedNode:X,selectNode:Z,buildGraph:Q}=ne({data:H,nameKey:`filename`,sizeKey:`size`,rootText:`Project`,nodeType:`file`,graphOptions:{onClick(e){e&&(J.value=e),e.meta?.type===`file`&&(X.value=e.meta,y.replace({query:{asset:e.meta.filename}}))},onHover(e){e&&!E.query.asset&&(J.value=e),e===null&&(J.value=void 0)},onLeave(){J.value=void 0},onSelect(e){Y.value=e||G.value.root,X.value=e?.meta}},onUpdate(){switch(j.value.assetViewType){case`sunburst`:q.value=new z(G.value.root,K.value);break;case`treemap`:q.value=new L(G.value.root,{...K.value,selectedPaddingRatio:0});break;default:q.value=new te(G.value.root,K.value)}}});return n(()=>j.value.assetViewType,()=>{Q()}),(t,n)=>{let r=C,a=P,c=re,f=oe,y=B,b=ge,w=ve,E=A,O=R;return s(I)?(T(),S(r,{key:0})):(T(),_(`div`,ye,[u(`div`,be,[p(a,{modelValue:m.value,"onUpdate:modelValue":n[0]||=e=>m.value=e,rules:[]},{default:i(()=>[u(`div`,$,[n[3]||=u(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(T(),_(h,null,x(D,e=>u(`button`,{key:e.value,"btn-action":``,class:g(s(j).assetViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>W(e.value)},[u(`div`,{class:g(e.icon)},null,2),v(` `+d(e.label),1)],10,xe)),64))])]),_:1},8,[`modelValue`])]),u(`div`,Se,[s(j).assetViewType===`list`?(T(),_(h,{key:0},[H.value?.length?(T(),S(c,{key:0,assets:H.value,session:e.session},null,8,[`assets`,`session`])):l(``,!0),u(`div`,Ce,[u(`span`,we,d(H.value.length)+` of `+d(s(k)?.length||0),1)])],64)):s(j).assetViewType===`folder`?(T(),_(h,{key:1},[H.value?.length?(T(),S(f,{key:0,assets:H.value,session:e.session},null,8,[`assets`,`session`])):l(``,!0)],64)):s(j).assetViewType===`treemap`?(T(),_(h,{key:2},[s(q)?(T(),S(U,{key:0,graph:s(q),selected:s(Y),onSelect:n[1]||=e=>s(Z)(e)},{default:i(({selected:e,options:t,onSelect:n})=>[p(y,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):l(``,!0)],64)):s(j).assetViewType===`sunburst`?(T(),_(h,{key:3},[s(q)?(T(),S(b,{key:0,graph:s(q),selected:s(Y),onSelect:n[2]||=e=>s(Z)(e)},null,8,[`graph`,`selected`])):l(``,!0)],64)):s(j).assetViewType===`flamegraph`?(T(),_(h,{key:4},[s(q)?(T(),S(w,{key:0,graph:s(q)},null,8,[`graph`])):l(``,!0)],64)):l(``,!0)]),p(O,{"hover-x":o.x,"hover-y":o.y},{default:i(()=>[s(J)?.meta?(T(),_(`div`,Te,[u(`div`,Ee,d(s(J).text),1),u(`div`,De,[p(E,{bytes:s(J).size,percent:!1},null,8,[`bytes`])])])):l(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Oe as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as e,B as t,Dt as n,Et as r,Gt as i,Ht as a,J as o,K as s,Kt as c,Lt as l,Mt as u,Ot as d,Q as f,U as p,Ut as m,Wt as h,Y as g,_t as _,at as v,dt as y,gt as b,ht as x,mt as S,nt as C,ot as w,pt as T,q as E,tt as ee,ut as D,vt as te,yt as ne}from"#entry";import{f as re}from"./vcHT-ufV.js";function O(e){return Array.isArray?Array.isArray(e):de(e)===`[object Array]`}var ie=1/0;function ae(e){if(typeof e==`string`)return e;let t=e+``;return t==`0`&&1/e==-ie?`-0`:t}function oe(e){return e==null?``:ae(e)}function k(e){return typeof e==`string`}function se(e){return typeof e==`number`}function ce(e){return e===!0||e===!1||ue(e)&&de(e)==`[object Boolean]`}function le(e){return typeof e==`object`}function ue(e){return le(e)&&e!==null}function A(e){return e!=null}function j(e){return!e.trim().length}function de(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var fe=`Incorrect 'index' type`,pe=e=>`Invalid value for key ${e}`,me=e=>`Pattern length exceeds max of ${e}.`,he=e=>`Missing ${e} property in key`,ge=e=>`Property 'weight' in key '${e}' must be a positive integer`,_e=Object.prototype.hasOwnProperty,ve=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=ye(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function ye(e){let t=null,n=null,r=null,i=1,a=null;if(k(e)||O(e))r=e,t=be(e),n=M(e);else{if(!_e.call(e,`name`))throw Error(he(`name`));let o=e.name;if(r=o,_e.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(ge(o));t=be(o),n=M(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function be(e){return O(e)?e:e.split(`.`)}function M(e){return O(e)?e.join(`.`):e}function xe(e,t){let n=[],r=!1,i=(e,t,a)=>{if(A(e))if(!t[a])n.push(e);else{let o=e[t[a]];if(!A(o))return;if(a===t.length-1&&(k(o)||se(o)||ce(o)))n.push(oe(o));else if(O(o)){r=!0;for(let e=0,n=o.length;e<n;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}};return i(e,k(t)?t.split(`.`):t,0),r?n:n[0]}var Se={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ce={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},we={location:0,threshold:.6,distance:100},Te={useExtendedSearch:!1,getFn:xe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},N={...Ce,...Se,...we,...Te},Ee=/[^ ]+/g;function De(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(Ee).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var P=class{constructor({getFn:e=N.getFn,fieldNormWeight:t=N.fieldNormWeight}={}){this.norm=De(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,k(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();k(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!A(e)||j(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(A(i)){if(O(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:n,value:r}=t.pop();if(A(r))if(k(r)&&!j(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else O(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}n.$[r]=e}else if(k(i)&&!j(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Oe(e,t,{getFn:n=N.getFn,fieldNormWeight:r=N.fieldNormWeight}={}){let i=new P({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(ye)),i.setSources(t),i.create(),i}function ke(e,{getFn:t=N.getFn,fieldNormWeight:n=N.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new P({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function F(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=N.distance,ignoreLocation:a=N.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function Ae(e=[],t=N.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var I=32;function je(e,t,n,{location:r=N.location,distance:i=N.distance,threshold:a=N.threshold,findAllMatches:o=N.findAllMatches,minMatchCharLength:s=N.minMatchCharLength,includeMatches:c=N.includeMatches,ignoreLocation:l=N.ignoreLocation}={}){if(t.length>I)throw Error(me(I));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=s>1||c,g=h?Array(d):[],_;for(;(_=e.indexOf(t,m))>-1;){let e=F(t,{currentLocation:_,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),m=_+u,h){let e=0;for(;e<u;)g[_+e]=1,e+=1}}m=-1;let v=[],y=1,b=u+d,x=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=b;for(;a<s;)F(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:b=s,s=Math.floor((b-a)/2+a);b=s;let c=Math.max(1,f-s+1),_=o?d:Math.min(f+s,d)+u,S=Array(_+2);S[_+1]=(1<<r)-1;for(let a=_;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(h&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,r&&(S[a]|=(v[a+1]|v[a])<<1|1|v[a+1]),S[a]&x&&(y=F(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),y<=p)){if(p=y,m=o,m<=f)break;c=Math.max(1,2*f-m)}}if(F(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;v=S}let S={isMatch:m>=0,score:Math.max(.001,y)};if(h){let e=Ae(g,s);e.length?c&&(S.indices=e):S.isMatch=!1}return S}function Me(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var L=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),Ne=class{constructor(e,{location:t=N.location,threshold:n=N.threshold,distance:r=N.distance,includeMatches:i=N.includeMatches,findAllMatches:a=N.findAllMatches,minMatchCharLength:o=N.minMatchCharLength,isCaseSensitive:s=N.isCaseSensitive,ignoreDiacritics:c=N.ignoreDiacritics,ignoreLocation:l=N.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?L(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Me(e),startIndex:t})},d=this.pattern.length;if(d>I){let e=0,t=d%I,n=d-t;for(;e<n;)u(this.pattern.substr(e,I),e),e+=I;if(t){let e=d-I;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?L(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=je(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},R=class{constructor(e){this.pattern=e}static isMultiMatch(e){return Pe(e,this.multiRegex)}static isSingleMatch(e){return Pe(e,this.singleRegex)}search(){}};function Pe(e,t){let n=e.match(t);return n?n[1]:null}var Fe=class extends R{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Ie=class extends R{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Le=class extends R{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Re=class extends R{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},ze=class extends R{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},Be=class extends R{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Ve=class extends R{constructor(e,{location:t=N.location,threshold:n=N.threshold,distance:r=N.distance,includeMatches:i=N.includeMatches,findAllMatches:a=N.findAllMatches,minMatchCharLength:o=N.minMatchCharLength,isCaseSensitive:s=N.isCaseSensitive,ignoreDiacritics:c=N.ignoreDiacritics,ignoreLocation:l=N.ignoreLocation}={}){super(e),this._bitapSearch=new Ne(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},He=class extends R{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}},z=[Fe,He,Le,Re,Be,ze,Ie,Ve],Ue=z.length,We=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ge=`|`;function Ke(e,t={}){return e.split(Ge).map(e=>{let n=e.trim().split(We).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<Ue;){let e=z[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<Ue;){let e=z[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var qe=new Set([Ve.type,He.type]),Je=class{constructor(e,{isCaseSensitive:t=N.isCaseSensitive,ignoreDiacritics:n=N.ignoreDiacritics,includeMatches:r=N.includeMatches,minMatchCharLength:i=N.minMatchCharLength,ignoreLocation:a=N.ignoreLocation,findAllMatches:o=N.findAllMatches,location:s=N.location,threshold:c=N.threshold,distance:l=N.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?L(e):e,this.pattern=e,this.query=Ke(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?L(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;qe.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},B=[];function Ye(...e){B.push(...e)}function V(e,t){for(let n=0,r=B.length;n<r;n+=1){let r=B[n];if(r.condition(e,t))return new r(e,t)}return new Ne(e,t)}var H={AND:`$and`,OR:`$or`},U={PATH:`$path`,PATTERN:`$val`},W=e=>!!(e[H.AND]||e[H.OR]),Xe=e=>!!e[U.PATH],Ze=e=>!O(e)&&le(e)&&!W(e),Qe=e=>({[H.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function $e(e,t,{auto:n=!0}={}){let r=e=>{let i=Object.keys(e),a=Xe(e);if(!a&&i.length>1&&!W(e))return r(Qe(e));if(Ze(e)){let r=a?e[U.PATH]:i[0],o=a?e[U.PATTERN]:e[r];if(!k(o))throw Error(pe(r));let s={keyId:M(r),pattern:o};return n&&(s.searcher=V(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];O(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return W(e)||(e=Qe(e)),r(e)}function et(e,{ignoreFieldNorm:t=N.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function tt(e,t){let n=e.matches;t.matches=[],A(n)&&n.forEach(e=>{if(!A(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function nt(e,t){t.score=e.score}function rt(e,t,{includeMatches:n=N.includeMatches,includeScore:r=N.includeScore}={}){let i=[];return n&&i.push(tt),r&&i.push(nt),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var G=class{constructor(e,t={},n){this.options={...N,...t},this.options.useExtendedSearch,this._keyStore=new ve(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof P))throw Error(fe);this._myIndex=t||Oe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){A(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=k(e)?k(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return et(s,{ignoreFieldNorm:o}),i&&s.sort(a),se(t)&&t>-1&&(s=s.slice(0,t)),rt(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=V(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!A(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=$e(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===H.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(A(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=V(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!A(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!A(t))return[];let r=[];if(O(t))t.forEach(({v:t,i,n:a})=>{if(!A(t))return;let{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}};G.version=`7.1.0`,G.createIndex=Oe,G.parseIndex=ke,G.config=N,G.parseQuery=$e,Ye(Je);var it={flex:`col gap-2`,"max-w-90vw":``,"min-w-30vw":``,border:`~ base rounded-xl`,"bg-glass":``},at={key:0,class:`flex items-center`},ot=[`title`],st=[`checked`,`onChange`],ct={"text-sm":``},lt=[`title`],ut={key:0,op75:``,"i-ph-selection-slash-duotone":``},dt={key:1,op75:``,"i-ph-selection-plus-duotone":``},ft=e({__name:`SearchPanel`,props:{rules:{},modelValue:{default:()=>({search:``,selected:null})},selectedContainerClass:{default:``}},emits:[`update:modelValue`],setup(e,{emit:r}){let i=e,l=re(i,`modelValue`,r);function u(e){let{modelValue:t}=i;return t?.selected?t.selected.includes(e.name):!0}function d(e){let{rules:t}=i;l?.value?.selected||(l.value.selected=t.map(e=>e.name)),l.value.selected.includes(e.name)?l.value.selected=l.value.selected.filter(t=>t!==e.name):l.value.selected.push(e.name),l?.value?.selected.length===i.rules.length&&(l.value.selected=null)}function f(){l?.value?.selected?.length===i.rules.length?l.value.selected=null:l?.value?.selected==null?l.value.selected=[]:l.value.selected=i.rules.map(e=>e.name).filter(e=>!l.value.selected?.includes(e))}function h(){l?.value?.selected?.length===0?l.value.selected=null:l.value.selected=[]}return(r,i)=>(D(),g(`div`,it,[x(r.$slots,`search`,{},()=>[e.modelValue.search===!1?o(``,!0):(D(),g(`div`,at,[n(s(`input`,{"onUpdate:modelValue":i[0]||=e=>a(l).search=e,p2:``,px4:``,"w-full":``,style:{outline:`none`},placeholder:`Search`},null,512),[[t,a(l).search]]),x(r.$slots,`search-end`)]))]),e.rules.length?(D(),g(`div`,{key:0,class:m(e.selectedContainerClass),flex:`~ gap-2 wrap`,p2:``,border:`t base`},[(D(!0),g(p,null,S(e.rules,e=>(D(),g(`label`,{key:e.name,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e.description,class:m(u(e)?`bg-active`:`grayscale op50`)},[s(`input`,{type:`checkbox`,mr1:``,checked:u(e),onChange:t=>d(e)},null,40,st),s(`div`,{class:m(e.icon),"icon-catppuccin":``},null,2),s(`div`,ct,c(e.description||e.name),1)],10,ot))),128)),s(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:`Reverse Selection`,onClick:f},[...i[1]||=[s(`div`,{op75:``,"i-ph-selection-background-duotone":``},null,-1)]]),s(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:a(l).selected?.length===0?`Select All`:`Unselect All`,onClick:h},[a(l).selected?.length===0?(D(),g(`div`,ut)):(D(),g(`div`,dt))],8,lt)],2)):o(``,!0),x(r.$slots,`default`)]))}}),pt=Object.assign(ft,{__name:`DataSearchPanel`});function mt(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var K;function q(){q.init||(q.init=!0,K=mt()!==-1)}var J={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){q(),w(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,K&&this.$el.appendChild(e),e.data=`about:blank`,K||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!K&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},ht=d(`data-v-b329ee4c`);T(`data-v-b329ee4c`);var gt={class:`resize-observer`,tabindex:`-1`};y(),J.render=ht((e,t,n,r,i,a)=>(D(),E(`div`,gt))),J.__scopeId=`data-v-b329ee4c`,J.__file=`src/components/ResizeObserver.vue`;function Y(e){"@babel/helpers - typeof";return Y=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Y(e)}function _t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yt(e,t,n){return t&&vt(e.prototype,t),n&&vt(e,n),e}function bt(e){return xt(e)||St(e)||Ct(e)||wt()}function xt(e){if(Array.isArray(e))return X(e)}function St(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function Ct(e,t){if(e){if(typeof e==`string`)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tt(e){return typeof e==`function`?{callback:e}:e}function Et(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(o){if(a=[...arguments].slice(1),!(r&&o===i)){var s=n.leading;typeof s==`function`&&(s=s(o,i)),(!r||o!==i)&&s&&e.apply(void 0,[o].concat(bt(a))),i=o,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[o].concat(bt(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function Dt(e,t){if(e===t)return!0;if(Y(e)===`object`){for(var n in e)if(!Dt(e[n],t[n]))return!1;return!0}return!1}var Ot=function(){function e(t,n,r){_t(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return yt(e,[{key:`createObserver`,value:function(e,t){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Tt(e),this.callback=function(e,t){n.options.callback(e,t),e&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=(this.options.throttleOptions||{}).leading;this.callback=Et(this.callback,this.options.throttle,{leading:function(e){return r===`both`||r===`visible`&&e||r===`hidden`&&!e}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(e){var t=e[0];if(e.length>1){var r=e.find(function(e){return e.isIntersecting});r&&(t=r)}if(n.callback){var i=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(i===n.oldResult)return;n.oldResult=i,n.callback(i,t)}},this.options.intersection),w(function(){n.observer&&n.observer.observe(n.el)})}}},{key:`destroyObserver`,value:function(){this.observer&&=(this.observer.disconnect(),null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:`threshold`,get:function(){return this.options.intersection&&typeof this.options.intersection.threshold==`number`?this.options.intersection.threshold:0}}]),e}();function kt(e,t,n){var r=t.value;r&&(typeof IntersectionObserver>`u`?console.warn(`[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill`):e._vue_visibilityState=new Ot(e,r,n))}function At(e,t,n){var r=t.value,i=t.oldValue;if(!Dt(r,i)){var a=e._vue_visibilityState;if(!r){jt(e);return}a?a.createObserver(r,n):kt(e,{value:r},n)}}function jt(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Mt={beforeMount:kt,updated:At,unmounted:jt};function Nt(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get(`*`)||[]).slice().map(function(e){e(t,n)})}}}var Pt={itemsLimit:1e3},Ft=/(auto|scroll)/;function It(e,t){return e.parentNode===null?t:It(e.parentNode,t.concat([e]))}var Z=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},Lt=function(e){return Z(e,`overflow`)+Z(e,`overflow-y`)+Z(e,`overflow-x`)},Rt=function(e){return Ft.test(Lt(e))};function zt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=It(e.parentNode,[]),n=0;n<t.length;n+=1)if(Rt(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function Q(e){"@babel/helpers - typeof";return Q=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Q(e)}var Bt={items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:function(e){return[`vertical`,`horizontal`].includes(e)}},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`}};function Vt(){return this.items.length&&Q(this.items[0])!==`object`}var $=!1;if(typeof window<`u`){$=!1;try{var Ht=Object.defineProperty({},`passive`,{get:function(){$=!0}});window.addEventListener(`test`,null,Ht)}catch{}}var Ut=0,Wt={name:`RecycleScroller`,components:{ResizeObserver:J},directives:{ObserveVisibility:Mt},props:{...Bt,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},typeField:{type:String,default:`type`},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`resize`,`visible`,`hidden`,`update`,`scroll-start`,`scroll-end`],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){let e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize,i=1e4,a=0,o;for(let s=0,c=t.length;s<c;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:Vt,itemIndexByKey(){let{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error(`[vue-recycle-scroller] You must provide an itemSize when using gridItems`)},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){let e=this.$_lastUpdateScrollPosition;typeof e==`number`&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,i){let a=l({item:n,position:0,nr:u({id:Ut++,index:t,used:!0,key:r,type:i})});return e.push(a),a},unuseView(e,t=!1){let n=this.$_unusedViews,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit(`resize`),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;let e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;let{continuous:e}=this.updateVisibleItems(!1,!0);e||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit(`visible`),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit(`hidden`))},updateVisibleItems(e,t=!1){let n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,c=this.items,l=c.length,u=this.sizes,d=this.$_views,f=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey,h,g,_,v,y;if(!l)h=g=v=y=_=0;else if(this.$_prerender)h=v=0,g=y=Math.min(this.prerender,c.length),_=null;else{let e=this.getScroll();if(t){let t=e.start-this.$_lastUpdateScrollPosition;if(t<0&&(t=-t),n===null&&t<a||t<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=e.start;let i=this.buffer;e.start-=i,e.end+=i;let o=0;if(this.$refs.before&&(o=this.$refs.before.scrollHeight,e.start-=o),this.$refs.after){let t=this.$refs.after.scrollHeight;e.end+=t}if(n===null){let t,n=0,r=l-1,i=~~(l/2),a;do a=i,t=u[i].accumulator,t<e.start?n=i:i<l-1&&u[i+1].accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),h=i,_=u[l-1].accumulator,g=i;g<l&&u[g].accumulator<e.end;g++);for(g===-1?g=c.length-1:(g++,g>l&&(g=l)),v=h;v<l&&o+u[v].accumulator<e.start;v++);for(y=v;y<l&&o+u[y].accumulator<e.end;y++);}else{h=~~(e.start/n*r);let t=h%r;h-=t,g=Math.ceil(e.end/n*r),v=Math.max(0,Math.floor((e.start-o)/n*r)),y=Math.floor((e.end-o)/n*r),h<0&&(h=0),g>l&&(g=l),v<0&&(v=0),y>l&&(y=l),_=Math.ceil(l/r)*n}}g-h>Pt.itemsLimit&&this.itemsLimitError(),this.totalSize=_;let b,x=h<=this.$_endIndex&&g>=this.$_startIndex;if(x)for(let t=0,n=p.length;t<n;t++)b=p[t],b.nr.used&&(e&&(b.nr.index=m[b.item[s]]),(b.nr.index==null||b.nr.index<h||b.nr.index>=g)&&this.unuseView(b));let S=x?null:new Map,C,w,T;for(let e=h;e<g;e++){C=c[e];let t=s?C[s]:C;if(t==null)throw Error(`Key is ${t} on item (keyField is '${s}')`);if(b=d.get(t),!n&&!u[e].size){b&&this.unuseView(b);continue}w=C[o];let a=f.get(w),l=!1;if(!b)x?b=a&&a.length?a.pop():this.addView(p,e,C,t,w):(T=S.get(w)||0,(!a||T>=a.length)&&(b=this.addView(p,e,C,t,w),this.unuseView(b,!0),a=f.get(w)),b=a[T],S.set(w,T+1)),d.delete(b.nr.key),b.nr.used=!0,b.nr.index=e,b.nr.key=t,b.nr.type=w,d.set(t,b),l=!0;else if(!b.nr.used&&(b.nr.used=!0,l=!0,a)){let e=a.indexOf(b);e!==-1&&a.splice(e,1)}b.item=C,l&&(e===c.length-1&&this.$emit(`scroll-end`),e===0&&this.$emit(`scroll-start`)),n===null?(b.position=u[e-1].accumulator,b.offset=0):(b.position=Math.floor(e/r)*n,b.offset=e%r*i)}return this.$_startIndex=h,this.$_endIndex=g,this.emitUpdate&&this.$emit(`update`,h,g,v,y),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=zt(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){let{$el:e,direction:t}=this,n=t===`vertical`,r;if(this.pageMode){let t=e.getBoundingClientRect(),i=n?t.height:t.width,a=-(n?t.top:t.left),o=n?window.innerHeight:window.innerWidth;a<0&&(o+=a,a=0),a+o>i&&(o=i-a),r={start:a,end:a+o}}else r=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener(`scroll`,this.handleScroll,$?{passive:!0}:!1),this.listenerTarget.addEventListener(`resize`,this.handleResize)},removeListeners(){this.listenerTarget&&=(this.listenerTarget.removeEventListener(`scroll`,this.handleScroll),this.listenerTarget.removeEventListener(`resize`,this.handleResize),null)},scrollToItem(e){let t,n=this.gridItems||1;t=this.itemSize===null?e>0?this.sizes[e-1].accumulator:0:Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){let t=this.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n,r,i;if(this.pageMode){let a=zt(this.$el),o=a.tagName===`HTML`?0:a[t.scroll],s=a.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+c}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,this.$el),console.log(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}},Gt={key:0,ref:`before`,class:`vue-recycle-scroller__slot`},Kt={key:1,ref:`after`,class:`vue-recycle-scroller__slot`};function qt(e,t,a,s,c,l){let u=b(`ResizeObserver`),d=_(`observe-visibility`);return n((D(),g(`div`,{class:m([`vue-recycle-scroller`,{ready:c.ready,"page-mode":a.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||=(...e)=>l.handleScroll&&l.handleScroll(...e)},[e.$slots.before?(D(),g(`div`,Gt,[x(e.$slots,`before`)],512)):o(`v-if`,!0),(D(),E(te(a.listTag),{ref:`wrapper`,style:i({[e.direction===`vertical`?`minHeight`:`minWidth`]:c.totalSize+`px`}),class:m([`vue-recycle-scroller__item-wrapper`,a.listClass])},{default:r(()=>[(D(!0),g(p,null,S(c.pool,t=>(D(),E(te(a.itemTag),v({key:t.nr.id,style:c.ready?{transform:`translate${e.direction===`vertical`?`Y`:`X`}(${t.position}px) translate${e.direction===`vertical`?`X`:`Y`}(${t.offset}px)`,width:a.gridItems?`${e.direction===`vertical`&&a.itemSecondarySize||a.itemSize}px`:void 0,height:a.gridItems?`${e.direction===`horizontal`&&a.itemSecondarySize||a.itemSize}px`:void 0}:null,class:[`vue-recycle-scroller__item-view`,[a.itemClass,{hover:!a.skipHover&&c.hoverKey===t.nr.key}]]},ne(a.skipHover?{}:{mouseenter:()=>{c.hoverKey=t.nr.key},mouseleave:()=>{c.hoverKey=null}})),{default:r(()=>[x(e.$slots,`default`,{item:t.item,index:t.nr.index,active:t.nr.used})]),_:2},1040,[`style`,`class`]))),128)),x(e.$slots,`empty`)]),_:3},8,[`style`,`class`])),e.$slots.after?(D(),g(`div`,Kt,[x(e.$slots,`after`)],512)):o(`v-if`,!0),f(u,{onNotify:l.handleResize},null,8,[`onNotify`])],34)),[[d,l.handleVisibilityChange]])}Wt.render=qt,Wt.__file=`src/components/RecycleScroller.vue`;var Jt={name:`DynamicScroller`,components:{RecycleScroller:Wt},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Bt,minItemSize:{type:[Number,String],required:!0}},emits:[`resize`,`visible`],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Vt,itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,id:s,size:c})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){let n=this.$el.scrollTop,r=0,i=0,a=Math.min(e.length,t.length);for(let o=0;o<a&&!(r>=n);o++)r+=t[o].size||this.minItemSize,i+=e[o].size||this.minItemSize;let o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Nt()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit(`resize`)},onScrollerVisible(){this.$_events.emit(`vscroll:update`,{force:!1}),this.$emit(`visible`)},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit(`vscroll:update`,{force:!0})},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){let n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;let t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function Yt(e,t,n,i,a,o){let s=b(`RecycleScroller`);return D(),E(s,v({ref:`scroller`,items:o.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":`id`,"list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:o.onScrollerResize,onVisible:o.onScrollerVisible}),{default:r(({item:t,index:n,active:r})=>[x(e.$slots,`default`,h(ee({item:t.item,index:n,active:r,itemWithSize:t})))]),before:r(()=>[x(e.$slots,`before`)]),after:r(()=>[x(e.$slots,`after`)]),empty:r(()=>[x(e.$slots,`empty`)]),_:3},16,[`items`,`min-item-size`,`direction`,`list-tag`,`item-tag`,`onResize`,`onVisible`])}Jt.render=Yt,Jt.__file=`src/components/DynamicScroller.vue`;var Xt={name:`DynamicScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:`div`}},emits:[`resize`],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on(`vscroll:update`,this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off(`vscroll:update`,this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&=(this.$_watchData(),null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){let e=this.$el.offsetWidth,t=this.$el.offsetHeight;this.applyWidthHeight(e,t)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit(`resize`,this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||=(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,!0))},unobserveSize(){this.vscrollResizeObserver&&(this.$_sizeObserved&&=(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,!1))},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return C(this.tag,this.$slots.default())}};Xt.__file=`src/components/DynamicScrollerItem.vue`;var Zt=e({__name:`DataVirtualList`,props:{items:{},keyProp:{}},setup(e){return(t,n)=>(D(),E(a(Jt),{items:e.items,"min-item-size":30,"key-field":e.keyProp,"page-mode":``},{default:r(({item:n,active:i,index:o})=>[f(a(Xt),{item:n,active:i,"data-index":o},{default:r(()=>[x(t.$slots,`default`,v({key:n[e.keyProp]},{item:n,index:o,active:i}))]),_:2},1032,[`item`,`active`,`data-index`])]),_:3},8,[`items`,`key-field`]))}});export{pt as n,G as r,Zt as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,K as t,Kt as n,U as r,Y as i,mt as a,ut as o}from"#entry";var s={flex:`~ gap5`,"w-full":``,border:`b base`,pb3:``},c={"font-mono":``},l={"font-mono":``},u=[`datetime`],d=e({__name:`SessionMeta`,props:{sessions:{}},setup(e){return(d,f)=>(o(),i(`div`,s,[(o(!0),i(r,null,a(e.sessions,e=>(o(),i(`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]||=t(`div`,{class:`i-ph-hash-duotone`},null,-1),t(`div`,null,n(e.title),1),t(`div`,c,[t(`span`,null,n(e.id),1)]),f[1]||=t(`div`,{class:`i-ph-clock-duotone`},null,-1),f[2]||=t(`div`,null,` Created At `,-1),t(`div`,l,[t(`time`,{datetime:e.createdAt.toISOString()},n(e.createdAt.toLocaleString()),9,u)])]))),128))]))}}),f=Object.assign(d,{__name:`CompareSessionMeta`});export{f as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Et as t,G as n,Ht as r,J as i,K as a,Kt as o,Q as s,U as c,Y as l,Z as u,bt as d,ht as f,it as p,k as m,mt as h,q as g,r as _,t as v,ut as y,vt as b}from"#entry";import{t as x}from"./6TUvuKw-.js";import{r as S,t as C}from"./By3-Oigm.js";import{r as w}from"./D1SGgpeJ.js";import{a as T}from"./vcHT-ufV.js";import{t as E}from"./C4ZBTBfN.js";var D=[`title`],O={key:0,flex:`~ items-center gap-2`},k={op50:``,"font-mono":``},A=[`title`],j=[`title`],M=e({__name:`BaseInfo`,props:{chunk:{},link:{type:Boolean,default:!1},basic:{type:Boolean,default:!1}},setup(e){let c=e,d=m(),p=n(()=>Array.isArray(c.chunk.imports)?c.chunk.imports.length:c.chunk.imports),h=n(()=>Array.isArray(c.chunk.modules)?c.chunk.modules.length:c.chunk.modules);return(n,c)=>(y(),g(b(e.link?r(x):`div`),{to:e.link?typeof e.link==`string`?e.link:{path:r(d).path,query:{chunk:e.chunk.chunk_id}}:void 0,flex:`~ gap-3 items-center`},{default:t(()=>[a(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.chunk.chunk_id}`},[f(n.$slots,`icon`,{},()=>[c[0]||=a(`div`,{"i-ph-shapes-duotone":``},null,-1)]),a(`div`,null,o(e.chunk.name||`[unnamed]`),1),s(S,{text:e.chunk.reason},null,8,[`text`]),f(n.$slots,`left-after`)],8,D),c[3]||=a(`div`,{"flex-auto":``},null,-1),e.basic?i(``,!0):(y(),l(`div`,O,[a(`span`,k,`#`+o(e.chunk.chunk_id),1),a(`div`,{flex:`~ gap-1 items-center`,title:`${p.value} imports`},[c[1]||=a(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),u(` `+o(p.value),1)],8,A),a(`div`,{flex:`~ gap-1 items-center`,title:`${h.value} modules`},[c[2]||=a(`div`,{"i-ph-package-duotone":``},null,-1),u(` `+o(h.value),1)],8,j)])),f(n.$slots,`default`)]),_:3},8,[`to`]))}}),N=Object.assign(M,{__name:`ChunksBaseInfo`}),P={flex:`~ gap-2 items-center`},F=e({__name:`BaseInfo`,props:{asset:{}},setup(e){return(t,n)=>{let r=w;return y(),l(`div`,P,[n[0]||=a(`div`,{"i-catppuccin-java-class-abstract":``},null,-1),a(`div`,null,o(e.asset.filename),1),s(r,{bytes:e.asset.size,"text-sm":``},null,8,[`bytes`]),s(S,{text:e.asset.type},null,8,[`text`])])}}}),I=Object.assign(F,{__name:`AssetsBaseInfo`}),L={relative:``},R={key:0,"pointer-events-none":``,absolute:``,"left-0":``,"right-0":``,"bottom-0":``,"bg-gradient-more":``,"h-30":``,flex:`~ justify-center`},z=e({__name:`ExpandableContainer`,props:p({list:{}},{count:{default:20},countModifiers:{}}),emits:[`update:count`],setup(e){let t=e,o=d(e,`count`),c=o.value,u=n(()=>t.list.slice(0,o.value));return(n,d)=>(y(),l(`div`,L,[f(n.$slots,`default`,{items:u.value}),e.list.length>o.value?(y(),l(`div`,R,[a(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:d[0]||=e=>o.value=Math.round(o.value+r(c))},[d[2]||=a(`div`,{"i-ri:arrow-down-double-line":``},null,-1),d[3]||=a(`span`,null,`More`,-1),s(E,{prefix:`+`,number:Math.min(Math.round(r(c)),t.list.length-o.value),"rounded-full":``,"text-sm":``},null,8,[`number`])]),a(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:d[1]||=e=>o.value=t.list.length},[d[4]||=a(`div`,{"i-ph-arrows-out-line-vertical-duotone":``},null,-1),d[5]||=a(`span`,null,`All`,-1),s(E,{number:t.list.length,"rounded-full":``,"text-sm":``},null,8,[`number`])])])):i(``,!0)]))}}),B=Object.assign(z,{__name:`DisplayExpandableContainer`}),V={key:0,"i-ph-file-duotone":``},H={key:1,"i-ph-lightning-duotone":``},U=e({__name:`Imports`,props:{imports:{}},setup(e){return(n,r)=>{let a=N,o=B;return y(),g(o,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.imports},{default:t(({items:e})=>[(y(!0),l(c,null,h(e,(e,n)=>(y(),l(c,{key:n},[e?(y(),g(a,{key:0,chunk:e,link:``,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},{icon:t(()=>[e.kind===`import-statement`?(y(),l(`div`,V)):i(``,!0),e.kind===`dynamic-import`?(y(),l(`div`,H)):i(``,!0)]),"left-after":t(()=>[s(S,{text:e.kind},null,8,[`text`])]),_:2},1032,[`chunk`])):i(``,!0)],64))),128))]),_:1},8,[`list`])}}}),W=Object.assign(U,{__name:`ChunksImports`}),G={flex:`~ col gap-3`},K={key:1,"text-sm":``,op50:``,flex:`~ items-center`,title:`Total size of imports`},q={open:`true`},J={open:`true`},Y={op50:``},X={key:0,open:`true`},Z={op50:``},Q={key:1,open:`true`},$={op50:``},ee=e({__name:`ChunkDetails`,props:{chunk:{},session:{},showDetails:{type:Boolean,default:!0},chunks:{}},setup(e){let d=e,p=n(()=>{let e=new Map;for(let t of d.session.modulesList)e.set(t.id,t);return e});function b(e){return e.reduce((e,t)=>{let n=p.value.get(t);if(!n||!n.buildMetrics?.transforms?.length)return e;let r=n.buildMetrics.transforms;return e+r[r.length-1].transformed_code_size},0)}let E=n(()=>b(d.chunk.modules)),D=m(),O=v(),{state:k,isLoading:A}=T(async()=>{if(!d.chunks)return await O.value.call(`vite:rolldown:get-chunks-graph`,{session:d.session.id})},null),j=n(()=>d.chunks||k.value),M=n(()=>d.chunk.imports.map(e=>{let t=j.value?.find(t=>t.chunk_id===e.chunk_id);return{...e,name:t?.name||`[unnamed]`,reason:t?.reason||`common`,imports:t?.imports.length||0,modules:t?.modules.length||0,size:b(t?.modules||[])}})),P=n(()=>j.value?.filter(e=>e.imports.some(e=>e.chunk_id===d.chunk.chunk_id)).map(e=>({...e.imports.find(e=>e.chunk_id===d.chunk.chunk_id),chunk_id:e.chunk_id,name:e.name||`[unnamed]`,reason:e.reason||`common`,imports:e.imports.length||0,modules:e.modules.length||0}))||[]);return(n,d)=>{let p=w,m=N,v=I,b=x,T=C,O=B,k=_,j=W;return y(),l(`div`,G,[s(m,{chunk:e.chunk},{"left-after":t(()=>[e.chunk.is_initial?(y(),g(S,{key:0,text:`initial`})):i(``,!0),s(p,{bytes:E.value,"text-sm":``,title:`Chunk size`},null,8,[`bytes`]),M.value.length?(y(),l(`div`,K,[d[0]||=u(` (`,-1),s(p,{bytes:M.value.reduce((e,t)=>e+t.size,0)},null,8,[`bytes`]),d[1]||=u(`) `,-1)])):i(``,!0)]),default:t(()=>[f(n.$slots,`default`)]),_:3},8,[`chunk`]),e.showDetails?(y(),l(c,{key:0},[a(`details`,q,[d[2]||=a(`summary`,{op50:``},` Assets `,-1),s(b,{border:`~ base rounded-lg`,px2:``,mt2:``,py1:``,"min-w-fit":``,flex:`~`,to:{path:r(D).path,query:{asset:e.chunk.asset?.filename}}},{default:t(()=>[s(v,{asset:{...e.chunk.asset,type:`asset`}},null,8,[`asset`])]),_:1},8,[`to`])]),a(`details`,J,[a(`summary`,Y,[a(`span`,null,`Modules (`+o(e.chunk.modules.length)+`)`,1)]),s(O,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.chunk.modules},{default:t(({items:t})=>[(y(!0),l(c,null,h(t,t=>(y(),g(T,{id:t,key:t,session:e.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))]),_:1},8,[`list`])]),r(A)?(y(),g(k,{key:0})):(y(),l(c,{key:1},[e.chunk.imports.length?(y(),l(`details`,X,[a(`summary`,Z,[a(`span`,null,`Imports (`+o(e.chunk.imports.length)+`)`,1)]),s(j,{imports:M.value},null,8,[`imports`])])):i(``,!0),P.value.length?(y(),l(`details`,Q,[a(`summary`,$,[a(`span`,null,`Importers (`+o(P.value.length)+`)`,1)]),s(j,{imports:P.value},null,8,[`imports`])])):i(``,!0)],64))],64)):i(``,!0)])}}}),te=Object.assign(ee,{__name:`DataChunkDetails`});export{N as i,B as n,I as r,te as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,nt as t,q as n,ut as r,vt as i}from"#entry";import{t as a}from"./Bjj8tBzd.js";var o=e({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(e){let o=e,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let e=o.compact?c:s;for(let n of e)if(o.name.startsWith(n))return o.compact?t(`span`,o.name.slice(n.length)):t(`span`,[t(`span`,{class:`op50`},n),t(`span`,o.name.slice(n.length))]);let n=o.name.split(`:`);return n.length>1?t(`span`,[t(`span`,{style:{color:a(n[0])}},`${n[0]}:`),t(`span`,n.slice(1).join(`:`))]):t(`span`,o.name)}return(e,t)=>(r(),n(i(l)))}}),s=Object.assign(o,{__name:`DisplayPluginName`});export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as e,Kt as t,T as n,Y as r,ut 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 n({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: }`}]}),(n,d)=>(i(),r(`div`,o,[e(`div`,s,[e(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:t(a.status)},null,8,c),e(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:t(a.statusText)},null,8,l),e(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:t(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-28bcd31f`]]);export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Et as t,G as n,Ht as r,It as i,J as a,K as o,Kt as s,Q as c,Tt as l,U as u,Ut as d,Y as f,Z as p,i as m,mt as h,q as g,t as _,ut as v,vt as y}from"#entry";import{t as b}from"./6TUvuKw-.js";import{t as x}from"./DmCbLhAV.js";import{r as S,t as C}from"./By3-Oigm.js";import{t as w}from"./Cs9u2aM3.js";import{t as T}from"./CBrsTh9c.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=e({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(e,{emit:i}){let l=e,m=i;function _(e){return T(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let x=n(()=>{let e=l.selectedSessions?.[0];return e?_(e):``});function j(e){return x.value&&x.value!==_(e)}function M(e){l.sessionMode===`compare`&&!j(e)&&m(`select`,e)}return(n,i)=>{let l=C;return v(),f(`div`,E,[(v(!0),f(u,null,h(e.sessions,n=>(v(),f(`div`,{key:n.id,flex:`~ row gap-2`,relative:``},[(v(),g(y(e.sessionMode===`list`?r(b):`div`),{to:`/session/${n.id}`,border:`~ rounded-md`,class:d(e.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[e.selectedSessionIds.includes(n.id)?`border-active`:`border-base`,j(n)||e.selectedSessions.length===2&&!e.selectedSessionIds.includes(n.id)?`op50`:`hover:bg-active`]),flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(n)},{default:t(()=>[o(`div`,D,[i[0]||=o(`div`,{"i-ph-hash-duotone":``},null,-1),p(` `+s(n.id),1)]),o(`div`,O,s(n.meta.cwd),1),n.meta.inputs[0]?(v(),f(`div`,k,[c(l,{id:n.meta.inputs[0].filename,cwd:n.meta.cwd},null,8,[`id`,`cwd`]),c(S,{text:n.meta.inputs[0].name||`entry`},null,8,[`text`]),n.meta.inputs.length>1?(v(),f(`span`,A,` +`+s(n.meta.inputs.length-1),1)):a(``,!0)])):a(``,!0),c(w,{timestamp:n.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=e({__name:`index`,async setup(e){let y,S,C=i(`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=i([]),E=n(()=>T.value.map(e=>e.id).sort()),D=n(()=>[...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=([y,S]=l(()=>O.value.call(`vite:rolldown:list-sessions`)),y=await y,S(),y);function A(e){E.value.includes(e.id)?T.value=T.value.filter(t=>t.id!==e.id):T.value=[...T.value,e]}return(e,n)=>{let i=m,l=M,_=x,y=b;return v(),f(`div`,N,[c(i),r(k).length?(v(),f(`p`,P,s(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1)):(v(),f(`p`,F,` No sessions yet, run a build to get started. `)),o(`div`,I,[c(l,{"session-mode":C.value,sessions:r(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),r(k).length?(v(),f(`div`,L,[o(`div`,R,[(v(),f(u,null,h(w,e=>o(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:d({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[o(`span`,{class:d([e.icon,`text-sm`])},null,2)],10,z)),64))])])):a(``,!0),T.value.length>0&&C.value===`compare`?(v(),f(`div`,B,[c(_,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),o(`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(()=>[...n[0]||=[p(` Compare `,-1)]]),_:1},8,[`to`])):(v(),f(`div`,H,` Select one more session to compare. `))])])):a(``,!0)])}}});export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"64b3b8a7-2713-4a0b-a273-f1b096d1de48","timestamp":1771385384239,"prerendered":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid[data-v-58347f79]{display:grid}.mb-2[data-v-58347f79]{margin-bottom:.5rem}.mb-4[data-v-58347f79]{margin-bottom:1rem}.max-w-520px[data-v-58347f79]{max-width:520px}.min-h-screen[data-v-58347f79]{min-height:100vh}.w-full[data-v-58347f79]{width:100%}.flex[data-v-58347f79]{display:flex}.place-content-center[data-v-58347f79]{place-content:center}.items-center[data-v-58347f79]{align-items:center}.justify-center[data-v-58347f79]{justify-content:center}.overflow-hidden[data-v-58347f79]{overflow:hidden}.bg-white[data-v-58347f79]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-58347f79]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-58347f79]{text-align:center}.text-\[80px\][data-v-58347f79]{font-size:80px}.text-2xl[data-v-58347f79]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-58347f79]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-58347f79]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-58347f79]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-58347f79]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-58347f79]{font-weight:500}.font-semibold[data-v-58347f79]{font-weight:600}.leading-none[data-v-58347f79]{line-height:1}.tracking-wide[data-v-58347f79]{letter-spacing:.025em}.font-sans[data-v-58347f79]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-58347f79]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-58347f79]{text-decoration-line:underline}.underline-offset-3[data-v-58347f79]{text-underline-offset:3px}.antialiased[data-v-58347f79]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-58347f79]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-58347f79]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-58347f79]{font-size:110px}.sm\:text-3xl[data-v-58347f79]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.grid[data-v-28bcd31f]{display:grid}.mb-2[data-v-28bcd31f]{margin-bottom:.5rem}.mb-4[data-v-28bcd31f]{margin-bottom:1rem}.max-w-520px[data-v-28bcd31f]{max-width:520px}.min-h-screen[data-v-28bcd31f]{min-height:100vh}.place-content-center[data-v-28bcd31f]{place-content:center}.overflow-hidden[data-v-28bcd31f]{overflow:hidden}.bg-white[data-v-28bcd31f]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-28bcd31f]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-28bcd31f]{text-align:center}.text-\[80px\][data-v-28bcd31f]{font-size:80px}.text-2xl[data-v-28bcd31f]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-28bcd31f]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-28bcd31f]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-28bcd31f]{font-weight:600}.leading-none[data-v-28bcd31f]{line-height:1}.tracking-wide[data-v-28bcd31f]{letter-spacing:.025em}.font-sans[data-v-28bcd31f]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-28bcd31f]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-28bcd31f]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-28bcd31f]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-28bcd31f]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-28bcd31f]{font-size:110px}.sm\:text-3xl[data-v-28bcd31f]{font-size:1.875rem;line-height:2.25rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as e,Ht as t,It as n,K as r,Lt as i,Rt as a,Vt as o,Y as s,ft as c,ot as l,rt as u,ut as d}from"#entry";import{t as f}from"./C3MbbcWQ.js";import{i as p,l as m,s as h}from"./vcHT-ufV.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:r=.5,maxScale:i=2}={}){let a=n(1);function s(t,n,s){let c=o(e);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=n??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=a.value;a.value=Math.max(r,Math.min(i,_+t));let v=a.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function c(e){if(o(t)){e.preventDefault();let t=.2;s(e.deltaY<0?t:t*-1,e.clientX,e.clientY)}else e.ctrlKey&&(e.preventDefault(),s(e.deltaY*.004*-1,e.clientX,e.clientY))}function l(e=.2){s(e)}function u(e=.2){s(e*-1)}return h(e,`wheel`,c),{scale:a,zoom:s,zoomIn:l,zoomOut:u}}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(e,n){return!e.target||!e.source?null:n?e.target.x<=e.source.x?Q({source:[e.source.x+t(n.width)/2-t(n.linkOffset),e.source.y],target:[e.target.x-t(n.width)/2+t(n.linkOffset),e.target.y]}):Z({source:[e.source.x+t(n.width)/2-t(n.linkOffset),e.source.y],target:[e.target.x-t(n.width)/2+t(n.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function be(e){return`stroke-#8885`}function xe(t){let r=.4,o=n(),s=n(window.innerWidth),l=n(window.innerHeight),u=i(new Map),d=i(new Set),f=n(!0),p=i(new Map),h=a([]),g=a([]),_=i(new Map),v=i(new Map),y=e(()=>{let e=new Map;for(let n of t.modules.value)e.set(n.id,n);return e}),{control:b}=m(),{scale:x,zoomIn:S,zoomOut:C}=ve(o,{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=t.generateGraph({isFirstCalculateGraph:f,hierarchy:D,tree:z,nodesRefMap:u,container:o,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:s,height:l,childToParentMap:p,focusOn:w,collapsedNodes:d,spacing:t.spacing});c(X,{spacing:t.spacing,calculateGraph:T,isFirstCalculateGraph:f,container:o,width:s,height:l,scale:x,nodes:h,links:g,nodesRefMap:u,collapsedNodes:d,childToParentMap:p,ZOOM_MIN:r,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function $(){return u(X)}function Se(e){let{nodesRefMap:r,container:i,calculateGraph:a,collapsedNodes:o}=u(X),s=n(!1);function c(e,t){l(()=>{l(()=>{let n=r.get(e);if(n&&t&&i.value){let e=i.value.getBoundingClientRect(),r=n.getBoundingClientRect(),a=r.left-e.left-t.x,o=r.top-e.top-t.y;i.value.scrollLeft+=a,i.value.scrollTop+=o}})})}function d(e){if(s.value)return;s.value=!0;let t=r.get(e),n=null;if(t&&i.value){let e=i.value.getBoundingClientRect(),r=t.getBoundingClientRect();n={x:r.left-e.left,y:r.top-e.top}}o.has(e)?o.delete(e):o.add(e),a(),n&&c(e,n),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),a(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,t(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),a(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:d,expandAll:f,collapseAll:p}}function Ce(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=u(X);return p([`-`,`_`],e=>{e.ctrlKey&&n()}),p([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function we(){let{container:e}=u(X),t=n(!1),r=0,i=0;function a(){h(e,`mousedown`,n=>{let a=e.value.getBoundingClientRect(),o=a.right-n.clientX,s=a.bottom-n.clientY;o<=20||s<=20||(t.value=!0,r=e.value.scrollLeft+n.pageX,i=e.value.scrollTop+n.pageY)}),h(e,`contextmenu`,e=>e.preventDefault()),h(`mouseleave`,()=>t.value=!1),h(`mouseup`,()=>t.value=!1),h(`mousemove`,n=>{t.value&&(n.preventDefault(),e.value.scrollLeft=r-n.pageX,e.value.scrollTop=i-n.pageY)})}return{init:a,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 d(),s(`button`,Ee,[...t[0]||=[r(`div`,{"i-ph-x":``},null,-1)]])}var Oe=f(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{At as e,Ct as t,Ft as n,G as r,Ht as i,It as a,Nt as o,Pt as s,Rt as c,Vt as l,ct as u,et as d,jt as f,kt as p,ot as m,wt as h,zt as g}from"#entry";function _(e,n,r={}){let i,a,o,s=!0,c=()=>{s=!0,o()};t(e,c,{flush:`sync`,...r});let l=typeof n==`function`?n:n.get,u=typeof n==`function`?void 0:n.set,d=p((e,t)=>(a=e,o=t,{get(){return s&&=(i=l(i),!1),a(),i},set(e){u?.(e)}}));return d.trigger=c,d}function v(t,n){return e()?(o(t,n),!0):!1}var y=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var b=e=>e!==void 0,x=Object.prototype.toString,S=e=>x.call(e)===`[object Object]`,C=()=>{},w=T();function T(){var e,t;return y&&!!(!((e=window)==null||(e=e.navigator)==null)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function E(...e){if(e.length!==1)return g(...e);let t=e[0];return typeof t==`function`?n(p(()=>({get:t,set:C}))):a(t)}function D(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}var O=e=>e();function k(e,t={}){let n,r,i=C,a=e=>{clearTimeout(e),i(),i=C},o;return s=>{let c=l(e),u=l(t.maxWait);return n&&a(n),c<=0||u!==void 0&&u<=0?(r&&=(a(r),void 0),Promise.resolve(s())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,o=s,u&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},u)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})}}function A(e=O,t={}){let{initialState:r=`active`}=t,i=E(r===`active`);function a(){i.value=!1}function o(){i.value=!0}return{isActive:n(i),pause:a,resume:o,eventFilter:(...t)=>{i.value&&e(...t)}}}function j(e,t=!1,n=`Timeout`){return new Promise((r,i)=>{t?setTimeout(()=>i(n),e):setTimeout(r,e)})}function M(e){return Array.isArray(e)?e:[e]}function ee(e){return e||d()}function N(e,n,r={}){let{eventFilter:i=O,...a}=r;return t(e,D(i,n),a)}function te(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=A(r,{initialState:i});return{stop:N(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function ne(e,t=!0,n){ee(n)?u(e,n):t?e():m(e)}function P(e,n=!1){function r(r,{flush:i=`sync`,deep:a=!1,timeout:o,throwOnTimeout:s}={}){let c=null,u=[new Promise(o=>{c=t(e,e=>{r(e)!==n&&(c?c():m(()=>c?.()),o(e))},{flush:i,deep:a,immediate:!0})})];return o!=null&&u.push(j(o,s).then(()=>l(e)).finally(()=>c?.())),Promise.race(u)}function i(i,a){if(!f(i))return r(e=>e===i,a);let{flush:o=`sync`,deep:s=!1,timeout:c,throwOnTimeout:u}=a??{},d=null,p=[new Promise(r=>{d=t([e,i],([e,t])=>{n!==(e===t)&&(d?d():m(()=>d?.()),r(e))},{flush:o,deep:s,immediate:!0})})];return c!=null&&p.push(j(c,u).then(()=>l(e)).finally(()=>(d?.(),l(e)))),Promise.race(p)}function a(e){return r(e=>!!e,e)}function o(e){return i(null,e)}function s(e){return i(void 0,e)}function c(e){return r(Number.isNaN,e)}function u(e,t){return r(t=>{let n=Array.from(t);return n.includes(e)||n.includes(l(e))},t)}function d(e){return p(1,e)}function p(e=1,t){let n=-1;return r(()=>(n+=1,n>=e),t)}return Array.isArray(l(e))?{toMatch:r,toContains:u,changed:d,changedTimes:p,get not(){return P(e,!n)}}:{toMatch:r,toBe:i,toBeTruthy:a,toBeNull:o,toBeNaN:c,toBeUndefined:s,changed:d,changedTimes:p,get not(){return P(e,!n)}}}function re(e){return P(e)}function F(e=!1,t={}){let{truthyValue:n=!0,falsyValue:r=!1}=t,i=f(e),a=c(e);function o(e){if(arguments.length)return a.value=e,a.value;{let e=l(n);return a.value=a.value===e?l(r):e,a.value}}return i?o:[a,o]}function ie(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return N(e,t,{...a,eventFilter:k(r,{maxWait:i})})}function ae(e,n,r){return t(e,n,{...r,immediate:!0})}function oe(e,t,n){let i;i=f(n)?{evaluating:n}:n||{};let{lazy:o=!1,flush:s=`sync`,evaluating:l=void 0,shallow:u=!0,onError:d=globalThis.reportError??C}=i,p=c(!o),m=u?c(t):a(t),g=0;return h(async t=>{if(!p.value)return;g++;let n=g,r=!1;l&&Promise.resolve().then(()=>{l.value=!0});try{let i=await e(e=>{t(()=>{l&&(l.value=!1),r||e()})});n===g&&(m.value=i)}catch(e){d(e)}finally{l&&n===g&&(l.value=!1),r=!0}},{flush:s}),o?r(()=>(p.value=!0,m.value)):m}var I=y?window:void 0;y&&window.document,y&&window.navigator,y&&window.location;function L(e){let t=l(e);return t?.$el??t}function R(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=r(()=>{let t=M(l(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return ae(()=>[n.value?.map(e=>L(e))??[I].filter(e=>e!=null),M(l(n.value?e[1]:e[0])),M(i(n.value?e[2]:e[1])),l(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=S(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var z=!1;function B(e,t,n={}){let{window:r=I,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:C,cancel:C,trigger:C}:C;if(w&&!z){z=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener(`click`,C,e)),r.document.documentElement.addEventListener(`click`,C,e)}let c=!0,u=e=>l(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=L(t);return n&&(e.target===n||e.composedPath().includes(n))}});function d(e){let t=l(e);return t&&t.$.subTree.shapeFlag===16}function f(e,t){let n=l(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let p=n=>{let r=L(e);if(n.target!=null&&!(!(r instanceof Element)&&d(e)&&f(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!u(n)),!c){c=!0;return}t(n)}},m=!1,h=[R(r,`click`,e=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(e))},{passive:!0,capture:a}),R(r,`pointerdown`,t=>{let n=L(e);c=!u(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&R(r,`blur`,n=>{setTimeout(()=>{let i=L(e);r.document.activeElement?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),g=()=>h.forEach(e=>e());return s?{stop:g,cancel:()=>{c=!1},trigger:e=>{c=!0,p(e),c=!1}}:g}function V(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function H(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=I,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=V(t);return R(i,a,e=>{e.repeat&&l(s)||c(e)&&n(e)},o)}function U(e,t,n={}){return H(e,t,{...n,eventName:`keydown`})}function W(e,t,n={}){return H(e,t,{...n,eventName:`keypress`})}function G(e,t,n){let{immediate:r=!0,delay:i=0,onError:o=globalThis.reportError??C,onSuccess:s=C,resetOnExecute:u=!0,shallow:d=!0,throwError:f}=n??{},p=d?c(t):a(t),m=c(!1),h=c(!1),g=c(void 0),_=0;async function v(n=0,...r){let i=_+=1;u&&(p.value=l(t)),g.value=void 0,m.value=!1,h.value=!0,n>0&&await j(n);let a=typeof e==`function`?e(...r):e;try{let e=await a;return i===_&&(p.value=e,m.value=!0),s(e),e}catch(e){if(i===_&&(g.value=e),o(e),f)throw e}finally{i===_&&(h.value=!1)}}r&&v(i);let y={state:p,isReady:m,isLoading:h,error:g,execute:v,executeImmediate:(...e)=>v(0,...e)};function b(){return new Promise((e,t)=>{re(h).toBe(!1).then(()=>e(y)).catch(t)})}return{...y,then(e,t){return b().then(e,t)}}}function K(e){return JSON.parse(JSON.stringify(e))}var q=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},J=`__vueuse_ssr_handlers__`,se=ce();function ce(){return J in q||(q[J]=q[J]||{}),q[J]}function le(e,t){return se[e]||t}function ue(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var de={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Y=`vueuse-storage`;function fe(e,n,i,o={}){let{flush:s=`pre`,deep:u=!0,listenToStorageChanges:d=!0,writeDefaults:f=!0,mergeDefaults:p=!1,shallow:h,window:g=I,eventFilter:_,onError:v=e=>{console.error(e)},initOnMounted:y}=o,b=(h?c:a)(typeof n==`function`?n():n),x=r(()=>l(e));if(!i)try{i=le(`getDefaultStorage`,()=>I?.localStorage)()}catch(e){v(e)}if(!i)return b;let S=l(n),C=ue(S),w=o.serializer??de[C],{pause:T,resume:E}=te(b,e=>k(e),{flush:s,deep:u,eventFilter:_});t(x,()=>j(),{flush:s});let D=!1;g&&d&&(i instanceof Storage?R(g,`storage`,e=>{y&&!D||j(e)},{passive:!0}):R(g,Y,e=>{y&&!D||M(e)})),y?ne(()=>{D=!0,j()}):j();function O(e,t){if(g){let n={key:x.value,oldValue:e,newValue:t,storageArea:i};g.dispatchEvent(i instanceof Storage?new StorageEvent(`storage`,n):new CustomEvent(Y,{detail:n}))}}function k(e){try{let t=i.getItem(x.value);if(e==null)O(t,null),i.removeItem(x.value);else{let n=w.write(e);t!==n&&(i.setItem(x.value,n),O(t,n))}}catch(e){v(e)}}function A(e){let t=e?e.newValue:i.getItem(x.value);if(t==null)return f&&S!=null&&i.setItem(x.value,w.write(S)),S;if(!e&&p){let e=w.read(t);return typeof p==`function`?p(e,S):C===`object`&&!Array.isArray(e)?{...S,...e}:e}else if(typeof t!=`string`)return t;else return w.read(t)}function j(e){if(!(e&&e.storageArea!==i)){if(e&&e.key==null){b.value=S;return}if(!(e&&e.key!==x.value)){T();try{let t=w.write(b.value);(e===void 0||e?.newValue!==t)&&(b.value=A(e))}catch(e){v(e)}finally{e?m(E):E()}}}}function M(e){j(e.detail)}return b}function pe(e,n){let i=c(p()),a=E(e),o=r({get(){let e=a.value,t=n?.getIndexOf?n.getIndexOf(i.value,e):e.indexOf(i.value);return t<0&&(t=n?.fallbackIndex??0),t},set(e){s(e)}});function s(e){let t=a.value,n=t.length,r=t[(e%n+n)%n];return i.value=r,r}function u(e=1){return s(o.value+e)}function d(e=1){return u(e)}function f(e=1){return u(-e)}function p(){return l(n?.initialValue??l(e)[0])??void 0}return t(a,()=>s(o.value)),{state:i,index:o,next:d,prev:f,go:s}}function X(e){return typeof Window<`u`&&e instanceof Window?e.document.documentElement:typeof Document<`u`&&e instanceof Document?e.documentElement:e}function me(e,t,n={}){let{window:r=I}=n;return fe(e,t,r?.localStorage,n)}var he={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function Z(e={}){let{reactive:t=!1,target:n=I,aliasMap:i=he,passive:a=!0,onEventFired:o=C}=e,u=s(new Set),d={toJSON(){return{}},current:u},f=t?s(d):d,p=new Set,m=new Map([[`Meta`,p],[`Shift`,new Set],[`Alt`,new Set]]),h=new Set;function g(e,n){e in f&&(t?f[e]=n:f[e].value=n)}function _(){u.clear();for(let e of h)g(e,!1)}function v(e,t,n){if(!(!e||typeof t.getModifierState!=`function`)){for(let[e,r]of m)if(t.getModifierState(e)){n.forEach(e=>r.add(e));break}}}function y(e,t){if(e)return;let n=`${t[0].toUpperCase()}${t.slice(1)}`,r=m.get(n);if(![`shift`,`alt`].includes(t)||!r)return;let i=Array.from(r),a=i.indexOf(t);i.forEach((e,t)=>{t>=a&&(u.delete(e),g(e,!1))}),r.clear()}function b(e,t){let n=e.key?.toLowerCase(),r=[e.code?.toLowerCase(),n].filter(Boolean);if(n){n&&(t?u.add(n):u.delete(n));for(let e of r)h.add(e),g(e,t);v(t,e,[...u,...r]),y(t,n),n===`meta`&&!t&&(p.forEach(e=>{u.delete(e),g(e,!1)}),p.clear())}}R(n,`keydown`,e=>(b(e,!0),o(e)),{passive:a}),R(n,`keyup`,e=>(b(e,!1),o(e)),{passive:a}),R(`blur`,_,{passive:a}),R(`focus`,_,{passive:a});let x=new Proxy(f,{get(e,n,a){if(typeof n!=`string`)return Reflect.get(e,n,a);if(n=n.toLowerCase(),n in i&&(n=i[n]),!(n in f))if(/[+_-]/.test(n)){let e=n.split(/[+_-]/g).map(e=>e.trim());f[n]=r(()=>e.map(e=>l(x[e])).every(Boolean))}else f[n]=c(!1);let o=Reflect.get(e,n,a);return t?l(o):o}});return x}var ge={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function _e(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=I,target:o=a,scroll:s=!0,eventFilter:l}=e,u=null,d=0,f=0,p=c(i.x),m=c(i.y),h=c(null),g=typeof t==`function`?t:ge[t],_=e=>{let t=g(e);u=e,t&&([p.value,m.value]=t,h.value=`mouse`),a&&(d=a.scrollX,f=a.scrollY)},v=e=>{if(e.touches.length>0){let t=g(e.touches[0]);t&&([p.value,m.value]=t,h.value=`touch`)}},y=()=>{if(!u||!a)return;let e=g(u);u instanceof MouseEvent&&e&&(p.value=e[0]+a.scrollX-d,m.value=e[1]+a.scrollY-f)},b=()=>{p.value=i.x,m.value=i.y},x=l?e=>l(()=>_(e),{}):e=>_(e),S=l?e=>l(()=>v(e),{}):e=>v(e),C=l?()=>l(()=>y(),{}):()=>y();if(o){let e={passive:!0};R(o,[`mousemove`,`dragover`],x,e),n&&t!==`movement`&&(R(o,[`touchstart`,`touchmove`],S,e),r&&R(o,`touchend`,b,e)),s&&t===`page`&&R(a,`scroll`,C,e)}return{x:p,y:m,sourceType:h}}function Q(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!t||t.tagName===`BODY`?!1:Q(t)}}function ve(e){let t=e||window.event,n=t.target;return Q(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}var $=new WeakMap;function ye(e,n=!1){let i=c(n),a=null,o=``;t(E(e),e=>{let t=X(l(e));if(t){let e=t;if($.get(e)||$.set(e,e.style.overflow),e.style.overflow!==`hidden`&&(o=e.style.overflow),e.style.overflow===`hidden`)return i.value=!0;if(i.value)return e.style.overflow=`hidden`}},{immediate:!0});let s=()=>{let t=X(l(e));!t||i.value||(w&&(a=R(t,`touchmove`,e=>{ve(e)},{passive:!1})),t.style.overflow=`hidden`,i.value=!0)},u=()=>{let t=X(l(e));!t||!i.value||(w&&a?.(),t.style.overflow=o,$.delete(t),i.value=!1)};return v(u),r({get(){return i.value},set(e){e?s():u()}})}function be(e,n,i,o={}){var s,c;let{clone:l=!1,passive:u=!1,eventName:f,deep:p=!1,defaultValue:h,shouldEmit:g}=o,_=d(),v=i||_?.emit||(_==null||(s=_.$emit)==null?void 0:s.bind(_))||(_==null||(c=_.proxy)==null||(c=c.$emit)==null?void 0:c.bind(_?.proxy)),y=f;n||=`modelValue`,y||=`update:${n.toString()}`;let x=e=>l?typeof l==`function`?l(e):K(e):e,S=()=>b(e[n])?x(e[n]):h,C=e=>{g?g(e)&&v(y,e):v(y,e)};if(u){let r=a(S()),i=!1;return t(()=>e[n],e=>{i||(i=!0,r.value=x(e),m(()=>i=!1))}),t(r,t=>{!i&&(t!==e[n]||p)&&C(t)},{deep:p}),r}else return r({get(){return S()},set(e){C(e)}})}export{G as a,me as c,ye as d,be as f,ie as h,W as i,Z as l,F as m,B as n,pe as o,_ as p,U as r,R as s,oe as t,_e as u};
|