import{C as e,Qt as t,S as n,T as r,W as i,X as a,Y as o,Z as s,_ as c,dt as l,g as u,h as d,m as f,p,s as m,tn as h}from"./vendor/json-editor-vue-9tyg6b65.js";import{C as g,u as _,w as v}from"./utils-ivfwadyv.js";import{r as y}from"./client-kfvz1zfh.js";import{t as b}from"./_plugin-vue_export-helper-d9irwgla.js";import{t as x}from"./nicon-hgcqr03x.js";import{t as S}from"./pages-dm1j9w83.js";import{t as C}from"./filepath-item-evfn93g6.js";import{t as w}from"./help-fab-myoje00l.js";import{t as T}from"./nsection-block-lfx32fn0.js";import{t as E}from"./nbadge-nhg3871m.js";import{t as D}from"./duration-display-c5md5mx9.js";var O={flex:`~ gap2`,"items-center":``},k={w8:``,"text-right":``,"text-sm":``,op25:``},A={key:0,"flex-auto":``,"text-right":``},j=Object.assign(r({__name:`PluginItem`,props:{plugin:{},index:{}},setup(t){let n=t,r=v(),a=p(()=>_(n.plugin.src,r.value?.rootDir||``).path);return(r,o)=>{let s=E,p=C,m=D;return i(),c(`div`,O,[f(`div`,k,h(t.index),1),e(p,{filepath:n.plugin.src,subpath:!0},{default:l(()=>[f(`div`,null,[a.value.startsWith(`#`)?(i(),d(s,{key:0,n:`rose`,textContent:`virtual`})):a.value.startsWith(`.`)?u(``,!0):(i(),d(s,{key:1,n:`gray`,textContent:`module`})),t.plugin.mode===`server`?(i(),d(s,{key:2,n:`teal`,textContent:`server`})):u(``,!0),t.plugin.mode===`client`?(i(),d(s,{key:3,n:`orange`,textContent:`client`})):u(``,!0)])]),_:1},8,[`filepath`]),t.plugin.metric?.duration==null?u(``,!0):(i(),c(`div`,A,[e(m,{duration:t.plugin.metric?.duration,factor:10},null,8,[`duration`])]))])}}}),{__name:`PluginItem`}),M={class:`n-tip n-tip-base`,flex:`~ col items-start`,"mx--4":``,px4:``,py4:``},N={flex:`~ items-center gap-1`,"font-bold":``},P=Object.assign(r({__name:`HelpTip`,props:{title:{},icon:{}},setup(t){return(n,r)=>{let o=x,l=s(`ContentSlot`);return i(),c(`div`,M,[f(`div`,N,[t.icon?(i(),d(o,{key:0,icon:t.icon,class:`n-tip-icon`},null,8,[`icon`])):u(``,!0),f(`div`,null,h(t.title),1)]),f(`div`,null,[a(n.$slots,`default`,{},()=>[e(l,{use:n.$slots.default,unwrap:`p`},null,8,[`use`])])])])}}}),{__name:`HelpTip`}),F={};function I(e,t){let n=P;return i(),d(n,{title:`Performance Tip`,icon:`carbon-meter`,n:`lime6 dark:lime5`},{default:l(()=>[a(e.$slots,`default`)]),_:3})}var L=Object.assign(b(F,[[`render`,I]]),{__name:`HelpTipPerformance`}),R={},z={class:`markdown-body`},B={class:`markdown-body`};function V(t,r){let a=L;return i(),c(`div`,z,[f(`template`,null,[f(`div`,B,[r[1]||=f(`h1`,null,`Plugins`,-1),r[2]||=f(`p`,null,[n(`Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the `),f(`code`,{"v-pre":``},`plugins/`),n(` directory and they will be automatically imported and registered.`)],-1),e(a,null,{default:l(()=>[...r[0]||=[n(` Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. `,-1)]]),_:1}),r[3]||=f(`p`,null,[f(`a`,{href:`https://nuxt.com/docs/guide/directory-structure/plugins`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)],-1)])])])}var H=b(R,[[`render`,V]]),U={pt4:``},W={class:`text-sm`,flex:`~ gap-1 items-center justify-start`,"mt-3":``},G=r({__name:`plugins`,setup(n){S({icon:`carbon-plug`,title:`Plugins`,category:`analyze`});let r=g(),a=y(),s=p(()=>{let e=r.value?.plugins||[],t=a.value?.metrics.clientPlugins()||[];return e.map(e=>{let n=typeof e==`string`?{src:e}:e;return{...n,metric:t.find(e=>e.src===n.src||e.src.startsWith(n.src))}})}),u=p(()=>{let e=a.value?.metrics.clientPlugins()||[],t=Math.min(...e.map(e=>e.start));return Math.max(...e.map(e=>e.end))-t});return(n,r)=>{let a=j,p=D,h=T,g=H,_=w;return i(),c(m,null,[e(h,{icon:`carbon-plug`,text:`Plugins`,description:`Total plugins: ${s.value.length}`},{default:l(()=>[f(`div`,U,[(i(!0),c(m,null,o(s.value,(e,n)=>(i(),d(a,{key:e.src,plugin:e,index:n+1,"ml--4":``,"border-base":``,py2:``,class:t(n?`border-t`:``)},null,8,[`plugin`,`index`,`class`]))),128)),f(`div`,W,[r[0]||=f(`div`,{"i-carbon-timer":``,"text-lg":``,op75:``},null,-1),r[1]||=f(`span`,{op50:``},`Total execution time:`,-1),e(p,{duration:u.value,factor:10},null,8,[`duration`])])])]),_:1},8,[`description`]),e(_,null,{default:l(()=>[e(g)]),_:1})],64)}}});export{G as default};