@nuxt/hints 1.0.0-alpha.4 → 1.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +14 -9
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/BSOx1wTR.js +1 -0
  5. package/dist/client/_nuxt/{sTshF0tC.js → BZNZ3uhE.js} +1 -1
  6. package/dist/client/_nuxt/{CHRGnUwv.js → BbfnXyuh.js} +1 -1
  7. package/dist/client/_nuxt/{C4-GUK1K.js → Begz4AOL.js} +2 -2
  8. package/dist/client/_nuxt/{P-pLD3_d.js → BhEtv9w2.js} +1 -1
  9. package/dist/client/_nuxt/{Y-og_wyR.js → CFPKd07t.js} +1 -1
  10. package/dist/client/_nuxt/{GrcSzlUJ.js → Cnhn90sM.js} +1 -1
  11. package/dist/client/_nuxt/{YA1k0SOY.js → CpX0l1y3.js} +1 -1
  12. package/dist/client/_nuxt/{BgVA9H9k.js → CzKOi7Jv.js} +1 -1
  13. package/dist/client/_nuxt/{BXSELIT7.js → D6ZzJpIK.js} +1 -1
  14. package/dist/client/_nuxt/{CeAnYTQ5.js → DAb3G4RE.js} +1 -1
  15. package/dist/client/_nuxt/{CIn0yCh1.js → DI96rpYV.js} +1 -1
  16. package/dist/client/_nuxt/DdCWK8Sp.js +1 -0
  17. package/dist/client/_nuxt/{By0zDdDR.js → DtIwcMt9.js} +3 -3
  18. package/dist/client/_nuxt/KEVM2KzW.js +36 -0
  19. package/dist/client/_nuxt/builds/latest.json +1 -1
  20. package/dist/client/_nuxt/builds/meta/a5258e2b-a12d-475a-8f36-441ee2727d81.json +1 -0
  21. package/dist/client/_nuxt/{entry.CqH3PPiL.css → entry.BHEgHyMn.css} +1 -1
  22. package/dist/client/_nuxt/error-404.CAnB1sNT.css +1 -0
  23. package/dist/client/_nuxt/error-500.CHqHY76U.css +1 -0
  24. package/dist/client/_nuxt/hydration.BDJR-Z6Z.css +1 -0
  25. package/dist/client/_nuxt/{Chg59sI4.js → otccQYWM.js} +1 -1
  26. package/dist/client/hydration/index.html +1 -1
  27. package/dist/client/index.html +1 -1
  28. package/dist/client/third-party-scripts/index.html +1 -1
  29. package/dist/client/web-vitals/index.html +1 -1
  30. package/dist/module.json +1 -1
  31. package/dist/runtime/hydration/handler.nitro.d.ts +2 -2
  32. package/package.json +6 -5
  33. package/dist/client/_nuxt/6YZAjlve.js +0 -1
  34. package/dist/client/_nuxt/BuasPzSQ.js +0 -21
  35. package/dist/client/_nuxt/CjPw6jm5.js +0 -1
  36. package/dist/client/_nuxt/builds/meta/17377e6a-4112-4616-a57e-0db49b9956bf.json +0 -1
  37. package/dist/client/_nuxt/error-404.Db9gmKof.css +0 -1
  38. package/dist/client/_nuxt/error-500.BSnPHzYt.css +0 -1
  39. package/dist/client/_nuxt/hydration.Dg0tHOnZ.css +0 -1
package/README.md CHANGED
@@ -64,15 +64,19 @@ Analyze all third-party scripts on your page. The dashboard shows loading times,
64
64
  ## How It Works
65
65
 
66
66
  ### Performance Monitoring
67
- Nuxt Hints uses `web-vitals` to gather Core Web Vitals metrics and automatically logs any metrics that need improvement. It listens for INP, LCP, and CLS and provides detailed attribution for each.
67
+
68
+ Nuxt Hints uses `web-vitals` to gather Core Web Vitals metrics and automatically logs any msetrics that need improvement. It listens for INP, LCP, and CLS and provides detailed attribution for each.
68
69
 
69
70
  ### Hydration Mismatch Detection
71
+
70
72
  The module hooks into Vue's hydration process to compare the server-rendered DOM with the client-side DOM. When a mismatch is detected, it captures the pre- and post-hydration HTML for inspection.
71
73
 
72
74
  ### Third-Party Script Analysis
75
+
73
76
  Using a combination of a Nitro plugin and client-side observers, Nuxt Hints tracks every script loaded on the page, measuring its performance and analyzing its attributes.
74
77
 
75
78
  ### Example Console Output
79
+
76
80
  When Nuxt Hints detects issues, you'll see clear warnings in your browser console:
77
81
 
78
82
  ```
@@ -89,29 +93,30 @@ Consider adding crossorigin="anonymous" for better security and error reporting.
89
93
 
90
94
  ```bash
91
95
  # Install dependencies
92
- npm install
96
+ pnpm install
93
97
 
94
98
  # Generate type stubs
95
- npm run dev:prepare
99
+ pnpm run dev:prepare
96
100
 
97
101
  # Develop with the playground
98
- npm run dev
102
+ pnpm run dev
99
103
 
100
104
  # Build the playground
101
- npm run dev:build
105
+ pnpm run dev:build
102
106
 
103
107
  # Run ESLint
104
- npm run lint
108
+ pnpm run lint
105
109
 
106
110
  # Run Vitest
107
- npm run test
108
- npm run test:watch
111
+ pnpm run test
112
+ pnpm run test:watch
109
113
 
110
114
  # Release new version
111
- npm run release
115
+ pnpm run release
112
116
  ```
113
117
 
114
118
  <!-- Badges -->
119
+
115
120
  [npm-version-src]: https://img.shields.io/npm/v/@nuxt/hints/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
116
121
  [npm-version-href]: https://npmjs.com/package/@nuxt/hints
117
122
  [npm-downloads-src]: https://img.shields.io/npm/dm/@nuxt/hints.svg?style=flat&colorA=18181B&colorB=28CF8D
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.CqH3PPiL.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/By0zDdDR.js"><script type="module" src="/__nuxt-hints/_nuxt/By0zDdDR.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1765969434452,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"17377e6a-4112-4616-a57e-0db49b9956bf",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.BHEgHyMn.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/DtIwcMt9.js"><script type="module" src="/__nuxt-hints/_nuxt/DtIwcMt9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"a5258e2b-a12d-475a-8f36-441ee2727d81",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1766698975596,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.CqH3PPiL.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/By0zDdDR.js"><script type="module" src="/__nuxt-hints/_nuxt/By0zDdDR.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1765969434452,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"17377e6a-4112-4616-a57e-0db49b9956bf",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-hints/_nuxt/entry.BHEgHyMn.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-hints/_nuxt/DtIwcMt9.js"><script type="module" src="/__nuxt-hints/_nuxt/DtIwcMt9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-hints",buildId:"a5258e2b-a12d-475a-8f36-441ee2727d81",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-hints-iframe" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1766698975596,false]</script></body></html>
@@ -0,0 +1 @@
1
+ import{_ as d}from"./DdCWK8Sp.js";import l from"./Begz4AOL.js";import{g as u,C as i,k as p,c as n,o,b as a,m as x,y as f,n as t,w as b,d as h,F as k,a as g,t as C,_ as N,r as w}from"./DtIwcMt9.js";const H={flex:"","px-4":"",border:"b base","h-49px":"","items-center":"","font-semibold":"","text-neutral-800":"","dark:text-white":"","gap-1":"","n-border-base":""},V=u({__name:"Header",setup(r){const s=i(),e=p(()=>s.meta.title);return($,_)=>{const c=d,m=l;return o(),n("header",H,[a(c,{to:"/",class:f(t(e)?"text-neutral-500 dark:text-neutral-400":"text-neutral-800 dark:text-white")},{default:b(()=>[..._[0]||(_[0]=[h("Hints",-1)])]),_:1},8,["class"]),t(e)?(o(),n(k,{key:0},[a(m,{name:"carbon:chevron-right"}),g("div",null,C(t(e)),1)],64)):x("",!0)])}}}),v=Object.assign(V,{__name:"Header"}),y={};function B(r,s){const e=v;return o(),n("div",null,[a(e),w(r.$slots,"default")])}const j=N(y,[["render",B]]);export{j as default};
@@ -1 +1 @@
1
- import{c as n,o as c,x as o}from"./By0zDdDR.js";const t={__name:"NIcon",props:{icon:{type:String,required:!1}},setup(e){return(r,s)=>(c(),n("div",{class:o(["n-icon",e.icon])},null,2))}};export{t as _};
1
+ import{c as n,o as c,y as o}from"./DtIwcMt9.js";const t={__name:"NIcon",props:{icon:{type:String,required:!1}},setup(e){return(r,s)=>(c(),n("div",{class:o(["n-icon",e.icon])},null,2))}};export{t as _};
@@ -1 +1 @@
1
- import{_ as o,c as s,o as a,a as t,t as r}from"./By0zDdDR.js";import{u as i}from"./Chg59sI4.js";const 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"},c={class:"max-w-520px text-center"},l=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return i({title:`${n.statusCode} - ${n.statusMessage} | ${n.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: }'}]}),(g,h)=>(a(),s("div",u,[t("div",c,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,l),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-279fdc89"]]);export{x as default};
1
+ import{_ as o,c as s,o as a,a as t,t as r}from"./DtIwcMt9.js";import{u as i}from"./otccQYWM.js";const 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"},c={class:"max-w-520px text-center"},l=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return i({title:`${n.statusCode} - ${n.statusMessage} | ${n.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: }'}]}),(g,h)=>(a(),s("div",u,[t("div",c,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,l),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-c1bd7891"]]);export{x as default};
@@ -1,6 +1,6 @@
1
- import{W as w,k as S,X as b,Y as B,g as x,e as C,s as T,A as N,Z as R,$ as P}from"./By0zDdDR.js";const W=Object.freeze({left:0,top:0,width:16,height:16}),j=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),I=Object.freeze({...W,...j});Object.freeze({...I,body:"",hidden:!1});function E(e){const[n,s,r,t]=e;if(r!==t){const o=Math.max(r,t);return[n-(o-r)/2,s-(o-t)/2,o,o]}return e}const L=/(-?[0-9.]*[0-9]+[0-9.]*)/g,M=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const r=e.split(L);if(r===null||!r.length)return e;const t=[];let o=r.shift(),i=M.test(o);for(;;){if(i){const c=parseFloat(o);isNaN(c)?t.push(o):t.push(Math.ceil(c*n*s)/s)}else t.push(o);if(o=r.shift(),o===void 0)return t.join("");i=!i}}const V=Object.freeze({width:null,height:null}),_=Object.freeze({...V,...j});function D(e,n="defs"){let s="";const r=e.indexOf("<"+n);for(;r>=0;){const t=e.indexOf(">",r),o=e.indexOf("</"+n);if(t===-1||o===-1)break;const i=e.indexOf(">",o);if(i===-1)break;s+=e.slice(t+1,o).trim(),e=e.slice(0,r).trim()+e.slice(i+1)}return{defs:s,content:e}}function G(e,n){return e?"<defs>"+e+"</defs>"+n:n}function H(e,n,s){const r=D(e);return G(r.defs,n+r.content+s)}const U=e=>e==="unset"||e==="undefined"||e==="none";function K(e,n){const s={...I,...e},r={..._,...n},t={left:s.left,top:s.top,width:s.width,height:s.height};let o=s.body;[s,r].forEach(g=>{const f=[],A=g.hFlip,O=g.vFlip;let m=g.rotate;A?O?m+=2:(f.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),f.push("scale(-1 1)"),t.top=t.left=0):O&&(f.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),f.push("scale(1 -1)"),t.top=t.left=0);let d;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:d=t.height/2+t.top,f.unshift("rotate(90 "+d.toString()+" "+d.toString()+")");break;case 2:f.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:d=t.width/2+t.left,f.unshift("rotate(-90 "+d.toString()+" "+d.toString()+")");break}m%2===1&&(t.left!==t.top&&(d=t.left,t.left=t.top,t.top=d),t.width!==t.height&&(d=t.width,t.width=t.height,t.height=d)),f.length&&(o=H(o,'<g transform="'+f.join(" ")+'">',"</g>"))});const i=r.width,c=r.height,a=t.width,l=t.height;let u,h;i===null?(h=c===null?"1em":c==="auto"?l:c,u=v(h,a/l)):(u=i==="auto"?a:i,h=c===null?v(u,l/a):c==="auto"?l:c);const y={},z=(g,f)=>{U(f)||(y[g]=f.toString())};z("width",u),z("height",h);const $=[t.left,t.top,a,l];return y.viewBox=$.join(" "),{attributes:y,viewBox:$,body:o}}function X(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Y(e){return"data:image/svg+xml,"+X(e)}function Z(e){return'url("'+Y(e)+'")'}function J(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)s+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+e+"</svg>"}function Q(e){const n={display:"inline-block",width:"1em",height:"1em"},s=e.varName;switch(e.pseudoSelector&&(n.content="''"),e.mode){case"background":s&&(n["background-image"]="var(--"+s+")"),n["background-repeat"]="no-repeat",n["background-size"]="100% 100%";break;case"mask":n["background-color"]="currentColor",s&&(n["mask-image"]=n["-webkit-mask-image"]="var(--"+s+")"),n["mask-repeat"]=n["-webkit-mask-repeat"]="no-repeat",n["mask-size"]=n["-webkit-mask-size"]="100% 100%";break}return n}function ee(e,n){const s={},r=n.varName,t=K(e);let o=t.viewBox;o[2]!==o[3]&&(n.forceSquare?o=E(o):s.width=v("1em",o[2]/o[3]));const i=Z(J(t.body.replace(/currentColor/g,n.color||"black"),{viewBox:`${o[0]} ${o[1]} ${o[2]} ${o[3]}`,width:`${o[2]}`,height:`${o[3]}`}));if(r)s["--"+r]=i;else switch(n.mode){case"background":s["background-image"]=i;break;case"mask":s["mask-image"]=s["-webkit-mask-image"]=i;break}return s}const k={selectorStart:{compressed:"{",compact:" {",expanded:" {"},selectorEnd:{compressed:"}",compact:`; }
1
+ import{W as w,k as S,X as b,Y as A,g as x,e as C,s as T,B as N,Z as R,$ as P}from"./DtIwcMt9.js";const W=Object.freeze({left:0,top:0,width:16,height:16}),j=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),I=Object.freeze({...W,...j});Object.freeze({...I,body:"",hidden:!1});function E(e){const[n,s,r,t]=e;if(r!==t){const o=Math.max(r,t);return[n-(o-r)/2,s-(o-t)/2,o,o]}return e}const L=/(-?[0-9.]*[0-9]+[0-9.]*)/g,M=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const r=e.split(L);if(r===null||!r.length)return e;const t=[];let o=r.shift(),i=M.test(o);for(;;){if(i){const c=parseFloat(o);isNaN(c)?t.push(o):t.push(Math.ceil(c*n*s)/s)}else t.push(o);if(o=r.shift(),o===void 0)return t.join("");i=!i}}const V=Object.freeze({width:null,height:null}),_=Object.freeze({...V,...j});function D(e,n="defs"){let s="";const r=e.indexOf("<"+n);for(;r>=0;){const t=e.indexOf(">",r),o=e.indexOf("</"+n);if(t===-1||o===-1)break;const i=e.indexOf(">",o);if(i===-1)break;s+=e.slice(t+1,o).trim(),e=e.slice(0,r).trim()+e.slice(i+1)}return{defs:s,content:e}}function G(e,n){return e?"<defs>"+e+"</defs>"+n:n}function H(e,n,s){const r=D(e);return G(r.defs,n+r.content+s)}const U=e=>e==="unset"||e==="undefined"||e==="none";function K(e,n){const s={...I,...e},r={..._,...n},t={left:s.left,top:s.top,width:s.width,height:s.height};let o=s.body;[s,r].forEach(g=>{const f=[],B=g.hFlip,O=g.vFlip;let m=g.rotate;B?O?m+=2:(f.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),f.push("scale(-1 1)"),t.top=t.left=0):O&&(f.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),f.push("scale(1 -1)"),t.top=t.left=0);let d;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:d=t.height/2+t.top,f.unshift("rotate(90 "+d.toString()+" "+d.toString()+")");break;case 2:f.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:d=t.width/2+t.left,f.unshift("rotate(-90 "+d.toString()+" "+d.toString()+")");break}m%2===1&&(t.left!==t.top&&(d=t.left,t.left=t.top,t.top=d),t.width!==t.height&&(d=t.width,t.width=t.height,t.height=d)),f.length&&(o=H(o,'<g transform="'+f.join(" ")+'">',"</g>"))});const i=r.width,c=r.height,a=t.width,l=t.height;let u,h;i===null?(h=c===null?"1em":c==="auto"?l:c,u=v(h,a/l)):(u=i==="auto"?a:i,h=c===null?v(u,l/a):c==="auto"?l:c);const y={},z=(g,f)=>{U(f)||(y[g]=f.toString())};z("width",u),z("height",h);const $=[t.left,t.top,a,l];return y.viewBox=$.join(" "),{attributes:y,viewBox:$,body:o}}function X(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Y(e){return"data:image/svg+xml,"+X(e)}function Z(e){return'url("'+Y(e)+'")'}function J(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)s+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+e+"</svg>"}function Q(e){const n={display:"inline-block",width:"1em",height:"1em"},s=e.varName;switch(e.pseudoSelector&&(n.content="''"),e.mode){case"background":s&&(n["background-image"]="var(--"+s+")"),n["background-repeat"]="no-repeat",n["background-size"]="100% 100%";break;case"mask":n["background-color"]="currentColor",s&&(n["mask-image"]=n["-webkit-mask-image"]="var(--"+s+")"),n["mask-repeat"]=n["-webkit-mask-repeat"]="no-repeat",n["mask-size"]=n["-webkit-mask-size"]="100% 100%";break}return n}function ee(e,n){const s={},r=n.varName,t=K(e);let o=t.viewBox;o[2]!==o[3]&&(n.forceSquare?o=E(o):s.width=v("1em",o[2]/o[3]));const i=Z(J(t.body.replace(/currentColor/g,n.color||"black"),{viewBox:`${o[0]} ${o[1]} ${o[2]} ${o[3]}`,width:`${o[2]}`,height:`${o[3]}`}));if(r)s["--"+r]=i;else switch(n.mode){case"background":s["background-image"]=i;break;case"mask":s["mask-image"]=s["-webkit-mask-image"]=i;break}return s}const k={selectorStart:{compressed:"{",compact:" {",expanded:" {"},selectorEnd:{compressed:"}",compact:`; }
2
2
  `,expanded:`;
3
3
  }
4
4
  `},rule:{compressed:"{key}:",compact:" {key}: ",expanded:`
5
5
  {key}: `}};function te(e,n="expanded"){const s=[];for(let r=0;r<e.length;r++){const{selector:t,rules:o}=e[r];let i=(t instanceof Array?t.join(n==="compressed"?",":", "):t)+k.selectorStart[n],c=!0;for(const a in o)c||(i+=";"),i+=k.rule[n].replace("{key}",a)+o[a],c=!1;i+=k.selectorEnd[n],s.push(i)}return s.join(n==="compressed"?"":`
6
- `)}function ne(e,n={}){const s=n.customise?n.customise(e.body):e.body,r=n.mode||(n.color||!s.includes("currentColor")?"background":"mask");let t=n.varName;t===void 0&&r==="mask"&&(t="svg");const o={...n,mode:r,varName:t};r==="background"&&delete o.varName;const i={...n.rules,...Q(o),...ee({...I,...e,body:s},o)};return te([{selector:n.iconSelector||".icon",rules:i}],o.format)}async function se(e,n){if(!e)return null;const s=b(e);return s||(await B(e).catch(()=>(console.warn(`[Icon] failed to load icon \`${e}\``),null)),b(e))}function q(e){const n=w().icon,s=(n.collections||[]).sort((r,t)=>t.length-r.length);return S(()=>{const r=e(),t=r.startsWith(n.cssSelectorPrefix)?r.slice(n.cssSelectorPrefix.length):r,o=n.aliases?.[t]||t;if(!o.includes(":")){const i=s.find(c=>o.startsWith(c+"-"));return i?i+":"+o.slice(i.length+1):o}return o})}function F(e,n){if(e!==!1)return e===!0||e===null?n:e}let p;function oe(e){return e.replace(/([^\w-])/g,"\\$1")}function re(){if(p)return p;p=new Set;const e=s=>{if(s=s.replace(/^:where\((.*)\)$/,"$1").trim(),s.startsWith("."))return s},n=s=>{if(s?.length)for(const r of s){r?.cssRules&&n(r.cssRules);const t=r?.selectorText;if(typeof t=="string"){const o=e(t);o&&p.add(o)}}};if(typeof document<"u")for(const s of document.styleSheets)try{const r=s.cssRules||s.rules;n(r)}catch{}return p}const ie=x({name:"NuxtIconCss",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e){const n=C(),s=w().icon,r=S(()=>e.name?s.cssSelectorPrefix+e.name:"");function t(c){if(!c)return;const a=b(c);if(a)return a;const l=n.payload?.data?.[c];if(l)return R(c,l),l}const o=S(()=>"."+oe(r.value));function i(c,a=!0){let l=o.value;s.cssWherePseudo&&(l=`:where(${l})`);const u=ne(c,{iconSelector:l,format:"compressed",customise:F(e.customize,s.customize)});return s.cssLayer&&a?`@layer ${s.cssLayer} { ${u} }`:u}{const c=re();async function a(l){if(c.has(o.value)||typeof document>"u")return;const u=document.createElement("style");u.textContent=i(l);const h=document.head.querySelector('style, link[rel="stylesheet"]');h?document.head.insertBefore(u,h):document.head.appendChild(u),c.add(o.value)}T(()=>e.name,()=>{if(c.has(o.value))return;const l=t(e.name);l?a(l):se(e.name).then(u=>{u&&a(u)}).catch(()=>null)},{immediate:!0})}return()=>N("span",{class:["iconify",r.value]})}}),ce=x({name:"NuxtIconSvg",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o="i-"+t.value;if(t.value){const i=s.payload.data[o];i&&R(t.value,i)}return()=>N(P,{icon:t.value,ssr:!0,customise:F(e.customize,r.customize)},n)}}),ae=x({name:"NuxtIcon",props:{name:{type:String,required:!0},mode:{type:String,required:!1,default:null},size:{type:[Number,String],required:!1,default:null},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o=S(()=>s.vueApp?.component(t.value)||((e.mode||r.mode)==="svg"?ce:ie)),i=S(()=>{const c=e.size||r.size;return c?{fontSize:Number.isNaN(+c)?c:c+"px"}:null});return()=>N(o.value,{...r.attrs,name:t.value,class:r.class,style:i.value,customize:e.customize},n)}});export{ae as default};
6
+ `)}function ne(e,n={}){const s=n.customise?n.customise(e.body):e.body,r=n.mode||(n.color||!s.includes("currentColor")?"background":"mask");let t=n.varName;t===void 0&&r==="mask"&&(t="svg");const o={...n,mode:r,varName:t};r==="background"&&delete o.varName;const i={...n.rules,...Q(o),...ee({...I,...e,body:s},o)};return te([{selector:n.iconSelector||".icon",rules:i}],o.format)}async function se(e,n){if(!e)return null;const s=b(e);return s||(await A(e).catch(()=>(console.warn(`[Icon] failed to load icon \`${e}\``),null)),b(e))}function q(e){const n=w().icon,s=(n.collections||[]).sort((r,t)=>t.length-r.length);return S(()=>{const r=e(),t=r.startsWith(n.cssSelectorPrefix)?r.slice(n.cssSelectorPrefix.length):r,o=n.aliases?.[t]||t;if(!o.includes(":")){const i=s.find(c=>o.startsWith(c+"-"));return i?i+":"+o.slice(i.length+1):o}return o})}function F(e,n){if(e!==!1)return e===!0||e===null?n:e}let p;function oe(e){return e.replace(/([^\w-])/g,"\\$1")}function re(){if(p)return p;p=new Set;const e=s=>{if(s=s.replace(/^:where\((.*)\)$/,"$1").trim(),s.startsWith("."))return s},n=s=>{if(s?.length)for(const r of s){r?.cssRules&&n(r.cssRules);const t=r?.selectorText;if(typeof t=="string"){const o=e(t);o&&p.add(o)}}};if(typeof document<"u")for(const s of document.styleSheets)try{const r=s.cssRules||s.rules;n(r)}catch{}return p}const ie=x({name:"NuxtIconCss",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e){const n=C(),s=w().icon,r=S(()=>e.name?s.cssSelectorPrefix+e.name:"");function t(c){if(!c)return;const a=b(c);if(a)return a;const l=n.payload?.data?.[c];if(l)return R(c,l),l}const o=S(()=>"."+oe(r.value));function i(c,a=!0){let l=o.value;s.cssWherePseudo&&(l=`:where(${l})`);const u=ne(c,{iconSelector:l,format:"compressed",customise:F(e.customize,s.customize)});return s.cssLayer&&a?`@layer ${s.cssLayer} { ${u} }`:u}{const c=re();async function a(l){if(c.has(o.value)||typeof document>"u")return;const u=document.createElement("style");u.textContent=i(l);const h=document.head.querySelector('style, link[rel="stylesheet"]');h?document.head.insertBefore(u,h):document.head.appendChild(u),c.add(o.value)}T(()=>e.name,()=>{if(c.has(o.value))return;const l=t(e.name);l?a(l):se(e.name).then(u=>{u&&a(u)}).catch(()=>null)},{immediate:!0})}return()=>N("span",{class:["iconify",r.value]})}}),ce=x({name:"NuxtIconSvg",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o="i-"+t.value;if(t.value){const i=s.payload.data[o];i&&R(t.value,i)}return()=>N(P,{icon:t.value,ssr:!0,customise:F(e.customize,r.customize)},n)}}),ae=x({name:"NuxtIcon",props:{name:{type:String,required:!0},mode:{type:String,required:!1,default:null},size:{type:[Number,String],required:!1,default:null},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o=S(()=>s.vueApp?.component(t.value)||((e.mode||r.mode)==="svg"?ce:ie)),i=S(()=>{const c=e.size||r.size;return c?{fontSize:Number.isNaN(+c)?c:c+"px"}:null});return()=>N(o.value,{...r.attrs,name:t.value,class:r.class,style:i.value,customize:e.customize},n)}});export{ae as default};
@@ -1 +1 @@
1
- import{_ as p}from"./BgVA9H9k.js";import P from"./C4-GUK1K.js";import{u as E}from"./CIn0yCh1.js";import{g as k,c as a,o as r,a as t,m as c,r as D,d as w,t as i,x as h,k as _,l as f,w as v,n as b,b as y,j as T,q as j,F as S,v as C}from"./By0zDdDR.js";const V={flex:"","items-center":"","justify-between":"","mb-1":""},F={"text-xs":"","text-neutral-500":"","dark:text-neutral-400":""},M={key:0,"text-blue-600":"","dark:text-blue-400":"","ml-1":""},N={key:0,"text-sm":"","text-purple-600":""},W=k({__name:"ElementInfo",props:{label:{},target:{},element:{}},setup(e){const u=e,{highlightElement:x,clearHighlight:o,inspectElementInEditor:m}=E(),n=()=>{u.element&&x(u.element)},l=()=>{o()},s=()=>{u.element&&m(u.element)};return(g,$)=>(r(),a("div",{border:"","border-neutral-200":"","dark:border-neutral-700":"",rounded:"","p-2":"","bg-neutral-50":"","dark:bg-neutral-800":"",class:h(e.element?"cursor-pointer hover:bg-neutral-100 dark:hover:bg-neutral-700 transition-colors":""),onMouseenter:n,onMouseleave:l,onClick:s},[t("div",V,[t("div",F,[w(i(e.label)+" ",1),e.element?(r(),a("span",M,"(hover to highlight, click to inspect)")):c("",!0)]),D(g.$slots,"header-right")]),e.target?(r(),a("code",N,i(e.target),1)):c("",!0),D(g.$slots,"sub")],34))}}),L=Object.assign(W,{__name:"ElementInfo"}),A={flex:"","flex-col":"","gap-3":""},B={flex:"","items-center":"","justify-between":""},H={flex:"","items-center":"","gap-2":""},O={"font-mono":"","text-xl":""},R={key:0,"text-xs":"","text-neutral-600":"","mt-1":"","break-all":""},U={grid:"","grid-cols-2":"","gap-2":""},q={border:"","border-neutral-200":"",rounded:"","p-2":""},z={"font-mono":"","text-sm":"","font-semibold":""},G={border:"","border-neutral-200":"",rounded:"","p-2":""},J={"font-mono":"","text-sm":"","font-semibold":""},K={border:"","border-neutral-200":"",rounded:"","p-2":""},Q={"font-mono":"","text-sm":"","font-semibold":""},X={border:"","border-neutral-200":"",rounded:"","p-2":""},Y={"font-mono":"","text-sm":"","font-semibold":""},Z={"text-xs":"","text-neutral-400":""},tt=k({__name:"LCPMetric",props:{metric:{}},setup(e){const u=e,x=_(()=>u.metric.entries[0]?.element),o=m=>`${m.toFixed(0)}ms`;return(m,n)=>{const l=L,s=p;return r(),f(s,{"p-2":""},{default:v(()=>[t("div",A,[t("div",B,[t("div",H,[n[0]||(n[0]=t("span",{"font-bold":"","text-lg":""},"LCP",-1)),t("span",O,i(o(e.metric.value)),1)]),t("span",{class:h({"text-green-500":e.metric.rating==="good","text-yellow-500":e.metric.rating==="needs-improvement","text-red-500":e.metric.rating==="poor"}),"font-semibold":"","text-sm":"",uppercase:""},i(e.metric.rating),3)]),e.metric.attribution.target?(r(),f(l,{key:0,label:"LCP Element",target:e.metric.attribution.target,element:b(x)},{sub:v(()=>[e.metric.attribution.url?(r(),a("div",R,i(e.metric.attribution.url),1)):c("",!0)]),_:1},8,["target","element"])):c("",!0),t("div",U,[t("div",q,[n[1]||(n[1]=t("div",{"text-xs":"","text-neutral-500":""}," Time to First Byte ",-1)),t("div",z,i(o(e.metric.attribution.timeToFirstByte)),1)]),t("div",G,[n[2]||(n[2]=t("div",{"text-xs":"","text-neutral-500":""}," Resource Load Delay ",-1)),t("div",J,i(o(e.metric.attribution.resourceLoadDelay)),1)]),t("div",K,[n[3]||(n[3]=t("div",{"text-xs":"","text-neutral-500":""}," Resource Load Duration ",-1)),t("div",Q,i(o(e.metric.attribution.resourceLoadDuration)),1)]),t("div",X,[n[4]||(n[4]=t("div",{"text-xs":"","text-neutral-500":""}," Element Render Delay ",-1)),t("div",Y,i(o(e.metric.attribution.elementRenderDelay)),1)])]),t("div",Z," ID: "+i(e.metric.id),1)])]),_:1})}}}),et=Object.assign(tt,{__name:"WebVitalsLCPMetric"}),nt={flex:"","flex-col":"","gap-3":""},it={flex:"","items-center":"","justify-between":""},rt={flex:"","items-center":"","gap-2":""},ot={"font-mono":"","text-xl":""},st={"text-xs":"","font-semibold":"","text-blue-600":"",uppercase:""},at={grid:"","grid-cols-3":"","gap-2":""},lt={border:"","border-neutral-200":"",rounded:"","p-2":""},dt={"font-mono":"","text-sm":"","font-semibold":""},ct={border:"","border-neutral-200":"",rounded:"","p-2":""},ut={"font-mono":"","text-sm":"","font-semibold":""},mt={border:"","border-neutral-200":"",rounded:"","p-2":""},xt={"font-mono":"","text-sm":"","font-semibold":""},bt={key:0,border:"","border-orange-200":"",rounded:"","p-2":"","bg-orange-50":""},gt={"text-xs":"","text-neutral-600":""},ft={key:0,"mt-2":"","text-xs":""},vt={"text-neutral-500":"","mb-1":""},ht={"font-mono":"","text-xs":""},kt={key:1,grid:"","grid-cols-2":"","gap-2":"","text-xs":""},yt={"font-mono":"","ml-1":""},pt={"font-mono":"","ml-1":""},_t={key:0},$t={"font-mono":"","ml-1":""},St={key:1},Lt={"font-mono":"","ml-1":""},Dt={flex:"","items-center":"","justify-between":"","text-xs":"","text-neutral-400":""},Ct=k({__name:"INPMetric",props:{metric:{}},setup(e){const u=e,x=_(()=>u.metric.entries[0]?.target),o=m=>`${m.toFixed(0)}ms`;return(m,n)=>{const l=L,s=p;return r(),f(s,{"p-2":""},{default:v(()=>[t("div",nt,[t("div",it,[t("div",rt,[n[0]||(n[0]=t("span",{"font-bold":"","text-lg":""},"INP",-1)),t("span",ot,i(o(e.metric.value)),1)]),t("span",{class:h({"text-green-500":e.metric.rating==="good","text-yellow-500":e.metric.rating==="needs-improvement","text-red-500":e.metric.rating==="poor"}),"font-semibold":"","text-sm":"",uppercase:""},i(e.metric.rating),3)]),y(l,{label:"Interaction Target",target:e.metric.attribution.interactionTarget,element:b(x)},{"header-right":v(()=>[t("span",st,i(e.metric.attribution.interactionType),1)]),_:1},8,["target","element"]),t("div",at,[t("div",lt,[n[1]||(n[1]=t("div",{"text-xs":"","text-neutral-500":""}," Input Delay ",-1)),t("div",dt,i(o(e.metric.attribution.inputDelay)),1)]),t("div",ct,[n[2]||(n[2]=t("div",{"text-xs":"","text-neutral-500":""}," Processing ",-1)),t("div",ut,i(o(e.metric.attribution.processingDuration)),1)]),t("div",mt,[n[3]||(n[3]=t("div",{"text-xs":"","text-neutral-500":""}," Presentation ",-1)),t("div",xt,i(o(e.metric.attribution.presentationDelay)),1)])]),e.metric.attribution.longAnimationFrameEntries?.length?(r(),a("div",bt,[n[4]||(n[4]=t("div",{"text-xs":"","text-orange-700":"","font-semibold":"","mb-1":""}," Long Animation Frames Detected ",-1)),t("div",gt,i(e.metric.attribution.longAnimationFrameEntries.length)+" frame(s) ",1),e.metric.attribution.longestScript?(r(),a("div",ft,[t("div",vt," Longest Script ("+i(e.metric.attribution.longestScript.subpart)+") ",1),t("div",ht,i(o(e.metric.attribution.longestScript.intersectingDuration)),1)])):c("",!0)])):c("",!0),e.metric.attribution.totalScriptDuration!==void 0?(r(),a("div",kt,[t("div",null,[n[5]||(n[5]=t("span",{"text-neutral-500":""},"Total Script:",-1)),t("span",yt,i(o(e.metric.attribution.totalScriptDuration)),1)]),t("div",null,[n[6]||(n[6]=t("span",{"text-neutral-500":""},"Style & Layout:",-1)),t("span",pt,i(o(e.metric.attribution.totalStyleAndLayoutDuration||0)),1)]),e.metric.attribution.totalPaintDuration!==void 0?(r(),a("div",_t,[n[7]||(n[7]=t("span",{"text-neutral-500":""},"Paint:",-1)),t("span",$t,i(o(e.metric.attribution.totalPaintDuration)),1)])):c("",!0),e.metric.attribution.totalUnattributedDuration!==void 0?(r(),a("div",St,[n[8]||(n[8]=t("span",{"text-neutral-500":""},"Unattributed:",-1)),t("span",Lt,i(o(e.metric.attribution.totalUnattributedDuration)),1)])):c("",!0)])):c("",!0),t("div",Dt,[t("span",null,"Load State: "+i(e.metric.attribution.loadState),1),t("span",null,"ID: "+i(e.metric.id),1)])])]),_:1})}}}),wt=Object.assign(Ct,{__name:"WebVitalsINPMetric"}),It={flex:"","flex-col":"","gap-3":""},Pt={flex:"","items-center":"","justify-between":""},Et={flex:"","items-center":"","gap-2":""},Tt={"font-mono":"","text-xl":""},jt={key:1,grid:"","grid-cols-2":"","gap-2":""},Vt={border:"","border-neutral-200":"","dark:border-neutral-800":"",rounded:"","p-2":""},Ft={"font-mono":"","text-sm":"","font-semibold":""},Mt={key:0,border:"","border-neutral-200":"","dark:border-neutral-800":"",rounded:"","p-2":""},Nt={"font-mono":"","text-sm":"","font-semibold":""},Wt={key:2,border:"",rounded:"","p-2":"",class:"bg-blue-50 dark:bg-blue-800/10 border-blue-200 dark:border-blue-800"},At={"text-xs":"","text-blue-700":"","dark:text-blue-400":"","font-semibold":""},Bt={flex:"","items-center":"","justify-between":"","text-xs":"","text-neutral-500":"","dark:text-neutral-400":""},Ht={key:0},Ot=k({__name:"CLSMetric",props:{metric:{}},setup(e){const u=e,x=_(()=>u.metric.entries[0]?.sources?.[0]?.node),o=n=>n.toFixed(4),m=n=>`${n.toFixed(0)}ms`;return(n,l)=>{const s=L,g=p;return r(),f(g,{"p-2":""},{default:v(()=>[t("div",It,[t("div",Pt,[t("div",Et,[l[0]||(l[0]=t("span",{"font-bold":"","text-lg":""},"CLS",-1)),t("span",Tt,i(o(e.metric.value)),1)]),t("span",{class:h({"text-green-500":e.metric.rating==="good","text-yellow-500":e.metric.rating==="needs-improvement","text-red-500":e.metric.rating==="poor"}),"font-semibold":"","text-sm":"",uppercase:""},i(e.metric.rating),3)]),e.metric.attribution.largestShiftTarget?(r(),f(s,{key:0,label:"Largest Shift Element",target:e.metric.attribution.largestShiftTarget,element:b(x)},null,8,["target","element"])):c("",!0),e.metric.attribution.largestShiftValue!==void 0?(r(),a("div",jt,[t("div",Vt,[l[1]||(l[1]=t("div",{"text-xs":"","text-neutral-500":"","dark:text-neutral-400":""}," Largest Shift Score ",-1)),t("div",Ft,i(o(e.metric.attribution.largestShiftValue)),1)]),e.metric.attribution.largestShiftTime!==void 0?(r(),a("div",Mt,[l[2]||(l[2]=t("div",{"text-xs":"","text-neutral-500":"","dark:text-neutral-400":""}," Shift Time ",-1)),t("div",Nt,i(m(e.metric.attribution.largestShiftTime)),1)])):c("",!0)])):c("",!0),e.metric.entries.length?(r(),a("div",Wt,[t("div",At," Total Layout Shifts: "+i(e.metric.entries.length),1)])):c("",!0),t("div",Bt,[e.metric.attribution.loadState?(r(),a("span",Ht,"Load State: "+i(e.metric.attribution.loadState),1)):c("",!0),t("span",null,"ID: "+i(e.metric.id),1)])])]),_:1})}}}),Rt=Object.assign(Ot,{__name:"WebVitalsCLSMetric"}),Ut={"p-4":"",grid:"","gap-4":""},qt={class:"overflow-x-auto grid gap-4 grid-cols-4"},zt={class:"text-lg font-bold"},Gt={class:"text-xs text-neutral-700 dark:text-neutral-300"},Jt=["href"],Kt={grid:"","gap-3":""},Qt={key:1,"text-center":"","py-8":"","text-neutral-500":""},ne=k({__name:"web-vitals",setup(e){const u=[{title:"LCP",key:"lcp",articleLink:"https://web.dev/articles/lcp",description:"Largest Contentful Paint"},{title:"INP",key:"inp",articleLink:"https://web.dev/articles/inp",description:"Interaction to Next Paint"},{title:"CLS",key:"cls",articleLink:"https://web.dev/articles/cls",description:"Cumulative Layout Shift"}],{lcp:x,inp:o,cls:m}=T(),n=j(),l=_(()=>n.value==="lcp"?x.value.map(s=>({type:"lcp",metric:s})):n.value==="inp"?o.value.map(s=>({type:"inp",metric:s})):n.value==="cls"?m.value.map(s=>({type:"cls",metric:s})):[...x.value.map(s=>({type:"lcp",metric:s})),...o.value.map(s=>({type:"inp",metric:s})),...m.value.map(s=>({type:"cls",metric:s}))]);return(s,g)=>{const $=p,I=P;return r(),a("div",Ut,[t("header",qt,[y($,{class:h(["p-2 flex flex-col justify-center gap-1 cursor-pointer",[b(n)?"hover:border-neutral-400 dark:hover:border-neutral-500":"border-neutral-500 dark:border-neutral-400 bg-neutral-50 dark:bg-neutral-800"]]),onClick:g[0]||(g[0]=d=>n.value=void 0)},{default:v(()=>[...g[1]||(g[1]=[t("span",{class:"text-lg font-bold"},"All",-1),t("span",{class:"text-xs text-neutral-700 dark:text-neutral-300"},"Show all issues",-1)])]),_:1},8,["class"]),(r(),a(S,null,C(u,d=>y($,{class:h(["p-2 gap-1 flex flex-col justify-center cursor-pointer",[b(n)===d.key?"border-neutral-500 dark:border-neutral-400 bg-neutral-50 dark:bg-neutral-800":"hover:border-neutral-400 dark:hover:border-neutral-500"]]),onClick:Xt=>n.value=b(n)===d.key?void 0:d.key},{default:v(()=>[t("span",zt,i(d.title),1),t("span",Gt,i(d.description),1),t("a",{href:d.articleLink,target:"_blank",class:"flex items-center gap-0.5 truncate max-w-full text-xs text-neutral-500 dark:text-neutral-400 hover:text-neutral-800 dark:hover:text-neutral-200",rel:"noopener noreferrer","text-sm":""},[w(i(d.articleLink)+" ",1),y(I,{name:"lucide:arrow-up-right"})],8,Jt)]),_:2},1032,["class","onClick"])),64))]),t("main",Kt,[b(l).length?(r(!0),a(S,{key:0},C(b(l),d=>(r(),a(S,null,[d.type==="cls"?(r(),f(Rt,{key:0,metric:d.metric},null,8,["metric"])):d.type==="lcp"?(r(),f(et,{key:1,metric:d.metric},null,8,["metric"])):d.type==="inp"?(r(),f(wt,{key:2,metric:d.metric},null,8,["metric"])):c("",!0)],64))),256)):(r(),a("div",Qt," No performance issues detected. "+i(b(n)?b(n)?.toUpperCase():"All")+" metrics are good! 🎉 ",1))])])}}});export{ne as default};
1
+ import{_ as p}from"./CzKOi7Jv.js";import P from"./Begz4AOL.js";import{u as E}from"./DI96rpYV.js";import{g as y,c as a,o as r,a as t,m as c,r as D,d as w,t as i,y as h,k as _,l as f,w as v,n as b,b as k,j as T,q as j,F as S,x as C}from"./DtIwcMt9.js";const V={flex:"","items-center":"","justify-between":"","mb-1":""},F={"text-xs":"","text-neutral-500":"","dark:text-neutral-400":""},M={key:0,"text-blue-600":"","dark:text-blue-400":"","ml-1":""},N={key:0,"text-sm":"","text-purple-600":""},W=y({__name:"ElementInfo",props:{label:{},target:{},element:{}},setup(e){const u=e,{highlightElement:x,clearHighlight:o,inspectElementInEditor:m}=E(),n=()=>{u.element&&x(u.element)},l=()=>{o()},s=()=>{u.element&&m(u.element)};return(g,$)=>(r(),a("div",{border:"","border-neutral-200":"","dark:border-neutral-700":"",rounded:"","p-2":"","bg-neutral-50":"","dark:bg-neutral-800":"",class:h(e.element?"cursor-pointer hover:bg-neutral-100 dark:hover:bg-neutral-700 transition-colors":""),onMouseenter:n,onMouseleave:l,onClick:s},[t("div",V,[t("div",F,[w(i(e.label)+" ",1),e.element?(r(),a("span",M,"(hover to highlight, click to inspect)")):c("",!0)]),D(g.$slots,"header-right")]),e.target?(r(),a("code",N,i(e.target),1)):c("",!0),D(g.$slots,"sub")],34))}}),L=Object.assign(W,{__name:"ElementInfo"}),A={flex:"","flex-col":"","gap-3":""},B={flex:"","items-center":"","justify-between":""},H={flex:"","items-center":"","gap-2":""},O={"font-mono":"","text-xl":""},R={key:0,"text-xs":"","text-neutral-600":"","mt-1":"","break-all":""},U={grid:"","grid-cols-2":"","gap-2":""},q={border:"","border-neutral-200":"",rounded:"","p-2":""},z={"font-mono":"","text-sm":"","font-semibold":""},G={border:"","border-neutral-200":"",rounded:"","p-2":""},J={"font-mono":"","text-sm":"","font-semibold":""},K={border:"","border-neutral-200":"",rounded:"","p-2":""},Q={"font-mono":"","text-sm":"","font-semibold":""},X={border:"","border-neutral-200":"",rounded:"","p-2":""},Y={"font-mono":"","text-sm":"","font-semibold":""},Z={"text-xs":"","text-neutral-400":""},tt=y({__name:"LCPMetric",props:{metric:{}},setup(e){const u=e,x=_(()=>u.metric.entries[0]?.element),o=m=>`${m.toFixed(0)}ms`;return(m,n)=>{const l=L,s=p;return r(),f(s,{"p-2":""},{default:v(()=>[t("div",A,[t("div",B,[t("div",H,[n[0]||(n[0]=t("span",{"font-bold":"","text-lg":""},"LCP",-1)),t("span",O,i(o(e.metric.value)),1)]),t("span",{class:h({"text-green-500":e.metric.rating==="good","text-yellow-500":e.metric.rating==="needs-improvement","text-red-500":e.metric.rating==="poor"}),"font-semibold":"","text-sm":"",uppercase:""},i(e.metric.rating),3)]),e.metric.attribution.target?(r(),f(l,{key:0,label:"LCP Element",target:e.metric.attribution.target,element:b(x)},{sub:v(()=>[e.metric.attribution.url?(r(),a("div",R,i(e.metric.attribution.url),1)):c("",!0)]),_:1},8,["target","element"])):c("",!0),t("div",U,[t("div",q,[n[1]||(n[1]=t("div",{"text-xs":"","text-neutral-500":""}," Time to First Byte ",-1)),t("div",z,i(o(e.metric.attribution.timeToFirstByte)),1)]),t("div",G,[n[2]||(n[2]=t("div",{"text-xs":"","text-neutral-500":""}," Resource Load Delay ",-1)),t("div",J,i(o(e.metric.attribution.resourceLoadDelay)),1)]),t("div",K,[n[3]||(n[3]=t("div",{"text-xs":"","text-neutral-500":""}," Resource Load Duration ",-1)),t("div",Q,i(o(e.metric.attribution.resourceLoadDuration)),1)]),t("div",X,[n[4]||(n[4]=t("div",{"text-xs":"","text-neutral-500":""}," Element Render Delay ",-1)),t("div",Y,i(o(e.metric.attribution.elementRenderDelay)),1)])]),t("div",Z," ID: "+i(e.metric.id),1)])]),_:1})}}}),et=Object.assign(tt,{__name:"WebVitalsLCPMetric"}),nt={flex:"","flex-col":"","gap-3":""},it={flex:"","items-center":"","justify-between":""},rt={flex:"","items-center":"","gap-2":""},ot={"font-mono":"","text-xl":""},st={"text-xs":"","font-semibold":"","text-blue-600":"",uppercase:""},at={grid:"","grid-cols-3":"","gap-2":""},lt={border:"","border-neutral-200":"",rounded:"","p-2":""},dt={"font-mono":"","text-sm":"","font-semibold":""},ct={border:"","border-neutral-200":"",rounded:"","p-2":""},ut={"font-mono":"","text-sm":"","font-semibold":""},mt={border:"","border-neutral-200":"",rounded:"","p-2":""},xt={"font-mono":"","text-sm":"","font-semibold":""},bt={key:0,border:"","border-orange-200":"",rounded:"","p-2":"","bg-orange-50":""},gt={"text-xs":"","text-neutral-600":""},ft={key:0,"mt-2":"","text-xs":""},vt={"text-neutral-500":"","mb-1":""},ht={"font-mono":"","text-xs":""},yt={key:1,grid:"","grid-cols-2":"","gap-2":"","text-xs":""},kt={"font-mono":"","ml-1":""},pt={"font-mono":"","ml-1":""},_t={key:0},$t={"font-mono":"","ml-1":""},St={key:1},Lt={"font-mono":"","ml-1":""},Dt={flex:"","items-center":"","justify-between":"","text-xs":"","text-neutral-400":""},Ct=y({__name:"INPMetric",props:{metric:{}},setup(e){const u=e,x=_(()=>u.metric.entries[0]?.target),o=m=>`${m.toFixed(0)}ms`;return(m,n)=>{const l=L,s=p;return r(),f(s,{"p-2":""},{default:v(()=>[t("div",nt,[t("div",it,[t("div",rt,[n[0]||(n[0]=t("span",{"font-bold":"","text-lg":""},"INP",-1)),t("span",ot,i(o(e.metric.value)),1)]),t("span",{class:h({"text-green-500":e.metric.rating==="good","text-yellow-500":e.metric.rating==="needs-improvement","text-red-500":e.metric.rating==="poor"}),"font-semibold":"","text-sm":"",uppercase:""},i(e.metric.rating),3)]),k(l,{label:"Interaction Target",target:e.metric.attribution.interactionTarget,element:b(x)},{"header-right":v(()=>[t("span",st,i(e.metric.attribution.interactionType),1)]),_:1},8,["target","element"]),t("div",at,[t("div",lt,[n[1]||(n[1]=t("div",{"text-xs":"","text-neutral-500":""}," Input Delay ",-1)),t("div",dt,i(o(e.metric.attribution.inputDelay)),1)]),t("div",ct,[n[2]||(n[2]=t("div",{"text-xs":"","text-neutral-500":""}," Processing ",-1)),t("div",ut,i(o(e.metric.attribution.processingDuration)),1)]),t("div",mt,[n[3]||(n[3]=t("div",{"text-xs":"","text-neutral-500":""}," Presentation ",-1)),t("div",xt,i(o(e.metric.attribution.presentationDelay)),1)])]),e.metric.attribution.longAnimationFrameEntries?.length?(r(),a("div",bt,[n[4]||(n[4]=t("div",{"text-xs":"","text-orange-700":"","font-semibold":"","mb-1":""}," Long Animation Frames Detected ",-1)),t("div",gt,i(e.metric.attribution.longAnimationFrameEntries.length)+" frame(s) ",1),e.metric.attribution.longestScript?(r(),a("div",ft,[t("div",vt," Longest Script ("+i(e.metric.attribution.longestScript.subpart)+") ",1),t("div",ht,i(o(e.metric.attribution.longestScript.intersectingDuration)),1)])):c("",!0)])):c("",!0),e.metric.attribution.totalScriptDuration!==void 0?(r(),a("div",yt,[t("div",null,[n[5]||(n[5]=t("span",{"text-neutral-500":""},"Total Script:",-1)),t("span",kt,i(o(e.metric.attribution.totalScriptDuration)),1)]),t("div",null,[n[6]||(n[6]=t("span",{"text-neutral-500":""},"Style & Layout:",-1)),t("span",pt,i(o(e.metric.attribution.totalStyleAndLayoutDuration||0)),1)]),e.metric.attribution.totalPaintDuration!==void 0?(r(),a("div",_t,[n[7]||(n[7]=t("span",{"text-neutral-500":""},"Paint:",-1)),t("span",$t,i(o(e.metric.attribution.totalPaintDuration)),1)])):c("",!0),e.metric.attribution.totalUnattributedDuration!==void 0?(r(),a("div",St,[n[8]||(n[8]=t("span",{"text-neutral-500":""},"Unattributed:",-1)),t("span",Lt,i(o(e.metric.attribution.totalUnattributedDuration)),1)])):c("",!0)])):c("",!0),t("div",Dt,[t("span",null,"Load State: "+i(e.metric.attribution.loadState),1),t("span",null,"ID: "+i(e.metric.id),1)])])]),_:1})}}}),wt=Object.assign(Ct,{__name:"WebVitalsINPMetric"}),It={flex:"","flex-col":"","gap-3":""},Pt={flex:"","items-center":"","justify-between":""},Et={flex:"","items-center":"","gap-2":""},Tt={"font-mono":"","text-xl":""},jt={key:1,grid:"","grid-cols-2":"","gap-2":""},Vt={border:"","border-neutral-200":"","dark:border-neutral-800":"",rounded:"","p-2":""},Ft={"font-mono":"","text-sm":"","font-semibold":""},Mt={key:0,border:"","border-neutral-200":"","dark:border-neutral-800":"",rounded:"","p-2":""},Nt={"font-mono":"","text-sm":"","font-semibold":""},Wt={key:2,border:"",rounded:"","p-2":"",class:"bg-blue-50 dark:bg-blue-800/10 border-blue-200 dark:border-blue-800"},At={"text-xs":"","text-blue-700":"","dark:text-blue-400":"","font-semibold":""},Bt={flex:"","items-center":"","justify-between":"","text-xs":"","text-neutral-500":"","dark:text-neutral-400":""},Ht={key:0},Ot=y({__name:"CLSMetric",props:{metric:{}},setup(e){const u=e,x=_(()=>u.metric.entries[0]?.sources?.[0]?.node),o=n=>n.toFixed(4),m=n=>`${n.toFixed(0)}ms`;return(n,l)=>{const s=L,g=p;return r(),f(g,{"p-2":""},{default:v(()=>[t("div",It,[t("div",Pt,[t("div",Et,[l[0]||(l[0]=t("span",{"font-bold":"","text-lg":""},"CLS",-1)),t("span",Tt,i(o(e.metric.value)),1)]),t("span",{class:h({"text-green-500":e.metric.rating==="good","text-yellow-500":e.metric.rating==="needs-improvement","text-red-500":e.metric.rating==="poor"}),"font-semibold":"","text-sm":"",uppercase:""},i(e.metric.rating),3)]),e.metric.attribution.largestShiftTarget?(r(),f(s,{key:0,label:"Largest Shift Element",target:e.metric.attribution.largestShiftTarget,element:b(x)},null,8,["target","element"])):c("",!0),e.metric.attribution.largestShiftValue!==void 0?(r(),a("div",jt,[t("div",Vt,[l[1]||(l[1]=t("div",{"text-xs":"","text-neutral-500":"","dark:text-neutral-400":""}," Largest Shift Score ",-1)),t("div",Ft,i(o(e.metric.attribution.largestShiftValue)),1)]),e.metric.attribution.largestShiftTime!==void 0?(r(),a("div",Mt,[l[2]||(l[2]=t("div",{"text-xs":"","text-neutral-500":"","dark:text-neutral-400":""}," Shift Time ",-1)),t("div",Nt,i(m(e.metric.attribution.largestShiftTime)),1)])):c("",!0)])):c("",!0),e.metric.entries.length?(r(),a("div",Wt,[t("div",At," Total Layout Shifts: "+i(e.metric.entries.length),1)])):c("",!0),t("div",Bt,[e.metric.attribution.loadState?(r(),a("span",Ht,"Load State: "+i(e.metric.attribution.loadState),1)):c("",!0),t("span",null,"ID: "+i(e.metric.id),1)])])]),_:1})}}}),Rt=Object.assign(Ot,{__name:"WebVitalsCLSMetric"}),Ut={"p-4":"",grid:"","gap-4":""},qt={class:"overflow-x-auto grid gap-4 grid-cols-4"},zt={class:"text-lg font-bold"},Gt={class:"text-xs text-neutral-700 dark:text-neutral-300"},Jt=["href"],Kt={grid:"","gap-3":""},Qt={key:1,"text-center":"","py-8":"","text-neutral-500":""},ne=y({__name:"web-vitals",setup(e){const u=[{title:"LCP",key:"lcp",articleLink:"https://web.dev/articles/lcp",description:"Largest Contentful Paint"},{title:"INP",key:"inp",articleLink:"https://web.dev/articles/inp",description:"Interaction to Next Paint"},{title:"CLS",key:"cls",articleLink:"https://web.dev/articles/cls",description:"Cumulative Layout Shift"}],{lcp:x,inp:o,cls:m}=T(),n=j(),l=_(()=>n.value==="lcp"?x.value.map(s=>({type:"lcp",metric:s})):n.value==="inp"?o.value.map(s=>({type:"inp",metric:s})):n.value==="cls"?m.value.map(s=>({type:"cls",metric:s})):[...x.value.map(s=>({type:"lcp",metric:s})),...o.value.map(s=>({type:"inp",metric:s})),...m.value.map(s=>({type:"cls",metric:s}))]);return(s,g)=>{const $=p,I=P;return r(),a("div",Ut,[t("header",qt,[k($,{class:h(["p-2 flex flex-col justify-center gap-1 cursor-pointer",[b(n)?"hover:border-neutral-400 dark:hover:border-neutral-500":"border-neutral-500 dark:border-neutral-400 bg-neutral-50 dark:bg-neutral-800"]]),onClick:g[0]||(g[0]=d=>n.value=void 0)},{default:v(()=>[...g[1]||(g[1]=[t("span",{class:"text-lg font-bold"},"All",-1),t("span",{class:"text-xs text-neutral-700 dark:text-neutral-300"},"Show all issues",-1)])]),_:1},8,["class"]),(r(),a(S,null,C(u,d=>k($,{class:h(["p-2 gap-1 flex flex-col justify-center cursor-pointer",[b(n)===d.key?"border-neutral-500 dark:border-neutral-400 bg-neutral-50 dark:bg-neutral-800":"hover:border-neutral-400 dark:hover:border-neutral-500"]]),onClick:Xt=>n.value=b(n)===d.key?void 0:d.key},{default:v(()=>[t("span",zt,i(d.title),1),t("span",Gt,i(d.description),1),t("a",{href:d.articleLink,target:"_blank",class:"flex items-center gap-0.5 truncate max-w-full text-xs text-neutral-500 dark:text-neutral-400 hover:text-neutral-800 dark:hover:text-neutral-200",rel:"noopener noreferrer","text-sm":""},[w(i(d.articleLink)+" ",1),k(I,{name:"lucide:arrow-up-right"})],8,Jt)]),_:2},1032,["class","onClick"])),64))]),t("main",Kt,[b(l).length?(r(!0),a(S,{key:0},C(b(l),d=>(r(),a(S,null,[d.type==="cls"?(r(),f(Rt,{key:0,metric:d.metric},null,8,["metric"])):d.type==="lcp"?(r(),f(et,{key:1,metric:d.metric},null,8,["metric"])):d.type==="inp"?(r(),f(wt,{key:2,metric:d.metric},null,8,["metric"])):c("",!0)],64))),256)):(r(),a("div",Qt," No performance issues detected. "+i(b(n)?b(n)?.toUpperCase():"All")+" metrics are good! 🎉 ",1))])])}}});export{ne as default};
@@ -1 +1 @@
1
- import{_ as s}from"./6YZAjlve.js";import{_ as a,c as i,o as u,a as t,t as n,b as c,w as l,d}from"./By0zDdDR.js";import{u as f}from"./Chg59sI4.js";const p={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"},m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.statusCode} - ${r.statusMessage} | ${r.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: }'}]}),(k,_)=>{const o=s;return u(),i("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.statusCode)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusMessage)},null,8,g),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,b),t("div",x,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},N=a(y,[["__scopeId","data-v-94546318"]]);export{N as default};
1
+ import{_ as s}from"./DdCWK8Sp.js";import{_ as a,c as i,o as u,a as t,t as n,b as c,w as l,d}from"./DtIwcMt9.js";import{u as f}from"./otccQYWM.js";const p={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"},m={class:"max-w-520px text-center"},h=["textContent"],g=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return f({title:`${r.statusCode} - ${r.statusMessage} | ${r.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: }'}]}),(k,_)=>{const o=s;return u(),i("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.statusCode)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusMessage)},null,8,g),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,b),t("div",x,[c(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:l(()=>[d(n(e.backHome),1)]),_:1})])])])}}},N=a(y,[["__scopeId","data-v-2f78f668"]]);export{N as default};
@@ -1 +1 @@
1
- import h from"./C4-GUK1K.js";import{_ as g,c as f,o,r as k,g as w,j as N,e as $,k as C,b as e,w as s,a as t,l as _,m as u,n,d as p,t as x}from"./By0zDdDR.js";import{_ as V}from"./BgVA9H9k.js";import{_ as B}from"./6YZAjlve.js";import{_ as S}from"./BXSELIT7.js";import"./sTshF0tC.js";const j={},L={class:"n-badge"};function z(d,r){return o(),f("span",L,[k(d.$slots,"default")])}const A=Object.assign(g(j,[["render",z]]),{__name:"NBadge"}),H={class:"grid grid-cols-1 md:grid-cols-3 gap-3 p-4"},I={class:"flex items-center gap-3 min-w-0"},M={class:"flex items-center gap-3 min-w-0"},q=w({__name:"index",setup(d){const{allMetrics:r}=N(),b=$().$hydrationMismatches,m=C(()=>b.value.length);return(P,a)=>{const l=h,v=A,i=V,c=B,y=S;return o(),f("div",H,[e(c,{to:"/web-vitals",class:"block"},{default:s(()=>[e(i,{class:"flex items-center justify-between p-4 hover:border-neutral-400 dark:hover:border-neutral-500"},{default:s(()=>[t("div",I,[e(l,{name:"material-symbols:monitoring",class:"text-xl text-blue-500"}),a[0]||(a[0]=t("div",{class:"min-w-0"},[t("div",{class:"text-sm font-medium truncate"}," Web Vitals "),t("div",{class:"text-xs text-neutral-500"}," LCP / INP / CLS ")],-1))]),n(r).length?(o(),_(v,{key:0},{default:s(()=>[p(x(n(r).length)+" issues ",1)]),_:1})):u("",!0)]),_:1})]),_:1}),e(c,{to:"/hydration",class:"block"},{default:s(()=>[e(i,{class:"flex items-center justify-between p-4 hover:border-neutral-400 dark:hover:border-neutral-500"},{default:s(()=>[t("div",M,[e(l,{name:"material-symbols:water-full",class:"text-xl text-cyan-500"}),a[1]||(a[1]=t("div",{class:"min-w-0"},[t("div",{class:"text-sm font-medium truncate"}," Hydration "),t("div",{class:"text-xs text-neutral-500"}," SSR vs client diffs ")],-1))]),n(m)?(o(),_(y,{key:0,size:"small",type:"error",bordered:!1},{default:s(()=>[p(x(n(m))+" issues ",1)]),_:1})):u("",!0)]),_:1})]),_:1}),e(c,{to:"/third-party-scripts",class:"block"},{default:s(()=>[e(i,{class:"p-4 flex items-center gap-3 hover:border-neutral-400 dark:hover:border-neutral-500"},{default:s(()=>[e(l,{name:"material-symbols:extension",class:"text-xl text-violet-500"}),a[2]||(a[2]=t("div",{class:"min-w-0"},[t("div",{class:"text-sm font-medium truncate"}," Third party scripts "),t("div",{class:"text-xs text-neutral-500"}," Analyze third-party scripts speed. ")],-1))]),_:1})]),_:1})])}}});export{q as default};
1
+ import h from"./Begz4AOL.js";import{_ as g,c as f,o,r as k,g as w,j as N,e as $,k as C,b as e,w as s,a as t,l as _,m as u,n,d as p,t as x}from"./DtIwcMt9.js";import{_ as V}from"./CzKOi7Jv.js";import{_ as B}from"./DdCWK8Sp.js";import{_ as S}from"./D6ZzJpIK.js";import"./BZNZ3uhE.js";const j={},L={class:"n-badge"};function z(d,r){return o(),f("span",L,[k(d.$slots,"default")])}const A=Object.assign(g(j,[["render",z]]),{__name:"NBadge"}),H={class:"grid grid-cols-1 md:grid-cols-3 gap-3 p-4"},I={class:"flex items-center gap-3 min-w-0"},M={class:"flex items-center gap-3 min-w-0"},q=w({__name:"index",setup(d){const{allMetrics:r}=N(),b=$().$hydrationMismatches,m=C(()=>b.value.length);return(P,a)=>{const l=h,v=A,i=V,c=B,y=S;return o(),f("div",H,[e(c,{to:"/web-vitals",class:"block"},{default:s(()=>[e(i,{class:"flex items-center justify-between p-4 hover:border-neutral-400 dark:hover:border-neutral-500"},{default:s(()=>[t("div",I,[e(l,{name:"material-symbols:monitoring",class:"text-xl text-blue-500"}),a[0]||(a[0]=t("div",{class:"min-w-0"},[t("div",{class:"text-sm font-medium truncate"}," Web Vitals "),t("div",{class:"text-xs text-neutral-500"}," LCP / INP / CLS ")],-1))]),n(r).length?(o(),_(v,{key:0},{default:s(()=>[p(x(n(r).length)+" issues ",1)]),_:1})):u("",!0)]),_:1})]),_:1}),e(c,{to:"/hydration",class:"block"},{default:s(()=>[e(i,{class:"flex items-center justify-between p-4 hover:border-neutral-400 dark:hover:border-neutral-500"},{default:s(()=>[t("div",M,[e(l,{name:"material-symbols:water-full",class:"text-xl text-cyan-500"}),a[1]||(a[1]=t("div",{class:"min-w-0"},[t("div",{class:"text-sm font-medium truncate"}," Hydration "),t("div",{class:"text-xs text-neutral-500"}," SSR vs client diffs ")],-1))]),n(m)?(o(),_(y,{key:0,size:"small",type:"error",bordered:!1},{default:s(()=>[p(x(n(m))+" issues ",1)]),_:1})):u("",!0)]),_:1})]),_:1}),e(c,{to:"/third-party-scripts",class:"block"},{default:s(()=>[e(i,{class:"p-4 flex items-center gap-3 hover:border-neutral-400 dark:hover:border-neutral-500"},{default:s(()=>[e(l,{name:"material-symbols:extension",class:"text-xl text-violet-500"}),a[2]||(a[2]=t("div",{class:"min-w-0"},[t("div",{class:"text-sm font-medium truncate"}," Third party scripts "),t("div",{class:"text-xs text-neutral-500"}," Analyze third-party scripts speed. ")],-1))]),_:1})]),_:1})])}}});export{q as default};
@@ -1 +1 @@
1
- import{_ as i}from"./sTshF0tC.js";import{_ as u}from"./6YZAjlve.js";import{g as d,A as e,r as o}from"./By0zDdDR.js";const l=d({name:"NButton",props:{to:String,icon:String,border:{type:Boolean,default:!0},disabled:Boolean,type:{type:String,default:"button"}},setup(t,{attrs:a,slots:n}){return()=>e(t.to?u:"button",{to:t.to,...a,...!t.to&&{type:t.type},...t.disabled?{disabled:!0}:{tabindex:0},class:[t.border?"n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover":"",n.default?"":"n-icon-button","n-button n-transition n-disabled:n-disabled"].join(" ")},{default:()=>[o(n,"icon",{},()=>t.icon?[e(i,{icon:t.icon,class:n.default?"n-button-icon":""})]:[]),o(n,"default")]})}});export{l as _};
1
+ import{_ as i}from"./BZNZ3uhE.js";import{_ as u}from"./DdCWK8Sp.js";import{g as d,B as e,r as o}from"./DtIwcMt9.js";const l=d({name:"NButton",props:{to:String,icon:String,border:{type:Boolean,default:!0},disabled:Boolean,type:{type:String,default:"button"}},setup(t,{attrs:a,slots:n}){return()=>e(t.to?u:"button",{to:t.to,...a,...!t.to&&{type:t.type},...t.disabled?{disabled:!0}:{tabindex:0},class:[t.border?"n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover":"",n.default?"":"n-icon-button","n-button n-transition n-disabled:n-disabled"].join(" ")},{default:()=>[o(n,"icon",{},()=>t.icon?[e(i,{icon:t.icon,class:n.default?"n-button-icon":""})]:[]),o(n,"default")]})}});export{l as _};
@@ -1 +1 @@
1
- import{_ as n,c as s,o as c,r as o}from"./By0zDdDR.js";const r={},t={class:"n-card n-card-base"};function _(e,a){return c(),s("div",t,[o(e.$slots,"default")])}const l=Object.assign(n(r,[["render",_]]),{__name:"NCard"});export{l as _};
1
+ import{_ as n,c as s,o as c,r as o}from"./DtIwcMt9.js";const r={},t={class:"n-card n-card-base"};function _(e,a){return c(),s("div",t,[o(e.$slots,"default")])}const l=Object.assign(n(r,[["render",_]]),{__name:"NCard"});export{l as _};
@@ -1 +1 @@
1
- import{_ as c}from"./sTshF0tC.js";import{c as a,o as n,r as s,a as i,l as r,m as l}from"./By0zDdDR.js";const m={class:"n-tip n-tip-base"},u={__name:"NTip",props:{icon:{type:String,required:!1}},setup(e){return(o,p)=>{const t=c;return n(),a("div",m,[s(o.$slots,"icon",{},()=>[e.icon?(n(),r(t,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):l("",!0)]),i("div",null,[s(o.$slots,"default")])])}}};export{u as _};
1
+ import{_ as c}from"./BZNZ3uhE.js";import{c as a,o as n,r as s,a as i,l as r,m as l}from"./DtIwcMt9.js";const m={class:"n-tip n-tip-base"},u={__name:"NTip",props:{icon:{type:String,required:!1}},setup(e){return(o,p)=>{const t=c;return n(),a("div",m,[s(o.$slots,"icon",{},()=>[e.icon?(n(),r(t,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):l("",!0)]),i("div",null,[s(o.$slots,"default")])])}}};export{u as _};
@@ -1 +1 @@
1
- import{_ as S}from"./BgVA9H9k.js";import{_ as D}from"./BXSELIT7.js";import E from"./C4-GUK1K.js";import{_ as H}from"./YA1k0SOY.js";import{g as q,z as A,k as f,c as b,o as d,a as t,l as a,m,b as u,w as n,n as p,F as I,v as M,t as i,d as c}from"./By0zDdDR.js";import"./sTshF0tC.js";import"./6YZAjlve.js";const U={class:"p-4 space-y-4"},V={class:"grid gap-3 md:grid-cols-5 grid-cols-2"},$={class:"text-2xl font-bold"},F={class:"text-2xl font-bold"},O={class:"text-xs text-neutral-500"},j={class:"text-2xl font-bold text-yellow-600"},G={class:"text-xs text-neutral-500"},J={class:"text-2xl font-bold text-orange-600"},K={class:"text-2xl font-bold text-red-600"},Q={class:"grid gap-3 md:grid-cols-2"},W={class:"flex items-start justify-between gap-3"},X={class:"min-w-0"},Y={class:"text-xs text-neutral-500"},Z=["href"],ee={class:"flex items-center gap-2 shrink-0"},te={class:"mt-2 flex flex-wrap gap-2 text-[11px]"},se={class:"mt-3 grid grid-cols-2 gap-2"},oe={class:"n-border-base border rounded p-2"},re={class:"font-mono"},ne={class:"n-border-base border rounded p-2"},ie={class:"font-mono"},le={class:"n-border-base border rounded p-2"},de={class:"font-mono"},ae={class:"n-border-base border rounded p-2"},ce={class:"font-mono"},ue={class:"mt-3 flex items-center gap-2"},ke=q({__name:"third-party-scripts",setup(me){const{scripts:w,isUsingNuxtScripts:T}=A(),g={network:300,parse:200},x=f(()=>(w.value||[]).map(e=>{const s=e.element,l=s.src,_=new URL(l,location.href),o=!!(s.ownerDocument&&s.ownerDocument.head&&s.ownerDocument.head.contains(s))&&!s.async&&!s.defer&&s.type!=="module";return{element:s,url:l,domain:_.host,https:_.protocol==="https:",loaded:e.loaded,renderBlocking:o,requestTime:s.requestTime,downloadTime:s.downloadTime,totalNetworkTime:s.totalNetworkTime,parseExecuteTime:s.parseExecuteTime,crossorigin:s.getAttribute("crossorigin"),integrity:s.getAttribute("integrity"),referrerPolicy:s.getAttribute("referrerpolicy"),async:s.async,defer:s.defer,isModule:s.type==="module"}})),h=f(()=>x.value.slice().sort((r,e)=>{const s=(r.totalNetworkTime||0)+(r.parseExecuteTime||0);return(e.totalNetworkTime||0)+(e.parseExecuteTime||0)-s})),k=f(()=>x.value.length),C=f(()=>x.value.filter(r=>r.loaded).length),N=f(()=>x.value.filter(r=>(r.totalNetworkTime||0)>g.network).length),z=f(()=>x.value.filter(r=>(r.parseExecuteTime||0)>g.parse).length),P=f(()=>x.value.filter(r=>r.renderBlocking).length);function y(r){return typeof r=="number"?`${r.toFixed(0)}ms`:"N/A"}function B(r){console.log("[@nuxt/hints]: Third-party script element",r)}async function L(r){try{await navigator.clipboard.writeText(r)}catch{}}return(r,e)=>{const s=S,l=D,_=E,v=H;return d(),b("div",U,[t("div",V,[u(s,{"p-3":""},{default:n(()=>[e[0]||(e[0]=t("div",{class:"text-xs text-neutral-500"}," 3rd-party scripts ",-1)),t("div",$,i(p(k)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[e[1]||(e[1]=t("div",{class:"text-xs text-neutral-500"}," Loaded ",-1)),t("div",F,i(p(C)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[t("div",O," Slow network (>"+i(g.network)+"ms) ",1),t("div",j,i(p(N)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[t("div",G," Long parse (>"+i(g.parse)+"ms) ",1),t("div",J,i(p(z)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[e[2]||(e[2]=t("div",{class:"text-xs text-neutral-500"}," Render-blocking ",-1)),t("div",K,i(p(P)),1)]),_:1})]),p(k)>0&&!p(T)?(d(),a(l,{key:0,n:"yellow6"},{default:n(()=>[...e[3]||(e[3]=[c(" Third-party scripts detected. Consider using @nuxt/scripts for best-practice loading and management. ",-1)])]),_:1})):m("",!0),t("div",Q,[(d(!0),b(I,null,M(p(h),o=>(d(),a(s,{key:o.url,"p-3":""},{default:n(()=>[t("div",W,[t("div",X,[t("div",Y,i(o.domain),1),t("a",{href:o.url,target:"_blank",rel:"noopener",class:"block truncate text-sm text-blue-600"},i(o.url),9,Z)]),t("div",ee,[u(l,{type:o.loaded?"success":"warning",size:"small"},{default:n(()=>[c(i(o.loaded?"Loaded":"Pending"),1)]),_:2},1032,["type"])])]),t("div",te,[o.renderBlocking?(d(),a(l,{key:0,type:"error",size:"small",title:"In document head and not async/defer/module; blocks HTML parsing and delays first paint. Prefer defer or type=module."},{default:n(()=>[...e[4]||(e[4]=[c(" render-blocking ",-1)])]),_:1})):m("",!0),o.isModule?(d(),a(l,{key:1,size:"small",title:"Module scripts are deferred by default and don't block parsing; execution order differs from classic scripts."},{default:n(()=>[...e[5]||(e[5]=[c(" module ",-1)])]),_:1})):m("",!0),o.async?(d(),a(l,{key:2,size:"small",title:"Doesn't block parsing; executes as soon as it's downloaded. Order is not guaranteed."},{default:n(()=>[...e[6]||(e[6]=[c(" async ",-1)])]),_:1})):m("",!0),o.defer?(d(),a(l,{key:3,size:"small",title:"Doesn't block parsing; executes after document parsing, preserving script order."},{default:n(()=>[...e[7]||(e[7]=[c(" defer ",-1)])]),_:1})):m("",!0),o.crossorigin?(d(),a(l,{key:4,size:"small",title:"CORS mode for this script. Use 'anonymous' for cross-origin with SRI and better error reporting."},{default:n(()=>[c(" crossorigin="+i(o.crossorigin),1)]),_:2},1024)):(d(),a(l,{key:5,type:"warning",size:"small",title:"Cross-origin script without crossorigin. Add crossorigin='anonymous' for SRI and better error reporting."},{default:n(()=>[...e[8]||(e[8]=[c(" missing crossorigin ",-1)])]),_:1})),o.integrity?(d(),a(l,{key:6,size:"small",title:"Subresource Integrity: protects against CDN/script tampering."},{default:n(()=>[...e[9]||(e[9]=[c(" sri ",-1)])]),_:1})):m("",!0),o.referrerPolicy?(d(),a(l,{key:7,size:"small",title:"Referrer policy controls the Referer header for this request."},{default:n(()=>[c(" referrer="+i(o.referrerPolicy),1)]),_:2},1024)):m("",!0),o.https===!1?(d(),a(l,{key:8,type:"error",size:"small",title:"Loaded over HTTP; use HTTPS to avoid mixed content and security risks."},{default:n(()=>[...e[10]||(e[10]=[c(" insecure http ",-1)])]),_:1})):m("",!0)]),t("div",se,[t("div",oe,[e[11]||(e[11]=t("div",{class:"text-xs text-neutral-500"}," Total network ",-1)),t("div",re,i(y(o.totalNetworkTime)),1)]),t("div",ne,[e[12]||(e[12]=t("div",{class:"text-xs text-neutral-500"}," Parse + execute ",-1)),t("div",ie,i(y(o.parseExecuteTime)),1)]),t("div",le,[e[13]||(e[13]=t("div",{class:"text-xs text-neutral-500"}," Request ",-1)),t("div",de,i(y(o.requestTime)),1)]),t("div",ae,[e[14]||(e[14]=t("div",{class:"text-xs text-neutral-500"}," Download ",-1)),t("div",ce,i(y(o.downloadTime)),1)])]),t("div",ue,[u(v,{onClick:R=>B(o.element)},{default:n(()=>[u(_,{name:"material-symbols:terminal",class:"text-lg"}),e[15]||(e[15]=t("span",{class:"ml-1"},"Log element",-1))]),_:1},8,["onClick"]),u(v,{onClick:R=>L(o.url)},{default:n(()=>[u(_,{name:"material-symbols:content-copy-outline",class:"text-lg"}),e[16]||(e[16]=t("span",{class:"ml-1"},"Copy URL",-1))]),_:1},8,["onClick"])])]),_:2},1024))),128))])])}}});export{ke as default};
1
+ import{_ as S}from"./CzKOi7Jv.js";import{_ as D}from"./D6ZzJpIK.js";import E from"./Begz4AOL.js";import{_ as A}from"./CpX0l1y3.js";import{g as H,A as q,k as f,c as b,o as d,a as t,l as a,m,b as u,w as n,n as p,F as I,x as M,t as i,d as c}from"./DtIwcMt9.js";import"./BZNZ3uhE.js";import"./DdCWK8Sp.js";const U={class:"p-4 space-y-4"},V={class:"grid gap-3 md:grid-cols-5 grid-cols-2"},$={class:"text-2xl font-bold"},F={class:"text-2xl font-bold"},O={class:"text-xs text-neutral-500"},j={class:"text-2xl font-bold text-yellow-600"},G={class:"text-xs text-neutral-500"},J={class:"text-2xl font-bold text-orange-600"},K={class:"text-2xl font-bold text-red-600"},Q={class:"grid gap-3 md:grid-cols-2"},W={class:"flex items-start justify-between gap-3"},X={class:"min-w-0"},Y={class:"text-xs text-neutral-500"},Z=["href"],ee={class:"flex items-center gap-2 shrink-0"},te={class:"mt-2 flex flex-wrap gap-2 text-[11px]"},se={class:"mt-3 grid grid-cols-2 gap-2"},oe={class:"n-border-base border rounded p-2"},re={class:"font-mono"},ne={class:"n-border-base border rounded p-2"},ie={class:"font-mono"},le={class:"n-border-base border rounded p-2"},de={class:"font-mono"},ae={class:"n-border-base border rounded p-2"},ce={class:"font-mono"},ue={class:"mt-3 flex items-center gap-2"},ve=H({__name:"third-party-scripts",setup(me){const{scripts:w,isUsingNuxtScripts:T}=q(),g={network:300,parse:200},x=f(()=>(w.value||[]).map(e=>{const s=e.element,l=s.src,_=new URL(l,location.href),o=!!(s.ownerDocument&&s.ownerDocument.head&&s.ownerDocument.head.contains(s))&&!s.async&&!s.defer&&s.type!=="module";return{element:s,url:l,domain:_.host,https:_.protocol==="https:",loaded:e.loaded,renderBlocking:o,requestTime:s.requestTime,downloadTime:s.downloadTime,totalNetworkTime:s.totalNetworkTime,parseExecuteTime:s.parseExecuteTime,crossorigin:s.getAttribute("crossorigin"),integrity:s.getAttribute("integrity"),referrerPolicy:s.getAttribute("referrerpolicy"),async:s.async,defer:s.defer,isModule:s.type==="module"}})),h=f(()=>x.value.slice().sort((r,e)=>{const s=(r.totalNetworkTime||0)+(r.parseExecuteTime||0);return(e.totalNetworkTime||0)+(e.parseExecuteTime||0)-s})),v=f(()=>x.value.length),C=f(()=>x.value.filter(r=>r.loaded).length),N=f(()=>x.value.filter(r=>(r.totalNetworkTime||0)>g.network).length),z=f(()=>x.value.filter(r=>(r.parseExecuteTime||0)>g.parse).length),P=f(()=>x.value.filter(r=>r.renderBlocking).length);function y(r){return typeof r=="number"?`${r.toFixed(0)}ms`:"N/A"}function B(r){console.log("[@nuxt/hints]: Third-party script element",r)}async function L(r){try{await navigator.clipboard.writeText(r)}catch{}}return(r,e)=>{const s=S,l=D,_=E,k=A;return d(),b("div",U,[t("div",V,[u(s,{"p-3":""},{default:n(()=>[e[0]||(e[0]=t("div",{class:"text-xs text-neutral-500"}," 3rd-party scripts ",-1)),t("div",$,i(p(v)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[e[1]||(e[1]=t("div",{class:"text-xs text-neutral-500"}," Loaded ",-1)),t("div",F,i(p(C)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[t("div",O," Slow network (>"+i(g.network)+"ms) ",1),t("div",j,i(p(N)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[t("div",G," Long parse (>"+i(g.parse)+"ms) ",1),t("div",J,i(p(z)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[e[2]||(e[2]=t("div",{class:"text-xs text-neutral-500"}," Render-blocking ",-1)),t("div",K,i(p(P)),1)]),_:1})]),p(v)>0&&!p(T)?(d(),a(l,{key:0,n:"yellow6"},{default:n(()=>[...e[3]||(e[3]=[c(" Third-party scripts detected. Consider using @nuxt/scripts for best-practice loading and management. ",-1)])]),_:1})):m("",!0),t("div",Q,[(d(!0),b(I,null,M(p(h),o=>(d(),a(s,{key:o.url,"p-3":""},{default:n(()=>[t("div",W,[t("div",X,[t("div",Y,i(o.domain),1),t("a",{href:o.url,target:"_blank",rel:"noopener",class:"block truncate text-sm text-blue-600"},i(o.url),9,Z)]),t("div",ee,[u(l,{type:o.loaded?"success":"warning",size:"small"},{default:n(()=>[c(i(o.loaded?"Loaded":"Pending"),1)]),_:2},1032,["type"])])]),t("div",te,[o.renderBlocking?(d(),a(l,{key:0,type:"error",size:"small",title:"In document head and not async/defer/module; blocks HTML parsing and delays first paint. Prefer defer or type=module."},{default:n(()=>[...e[4]||(e[4]=[c(" render-blocking ",-1)])]),_:1})):m("",!0),o.isModule?(d(),a(l,{key:1,size:"small",title:"Module scripts are deferred by default and don't block parsing; execution order differs from classic scripts."},{default:n(()=>[...e[5]||(e[5]=[c(" module ",-1)])]),_:1})):m("",!0),o.async?(d(),a(l,{key:2,size:"small",title:"Doesn't block parsing; executes as soon as it's downloaded. Order is not guaranteed."},{default:n(()=>[...e[6]||(e[6]=[c(" async ",-1)])]),_:1})):m("",!0),o.defer?(d(),a(l,{key:3,size:"small",title:"Doesn't block parsing; executes after document parsing, preserving script order."},{default:n(()=>[...e[7]||(e[7]=[c(" defer ",-1)])]),_:1})):m("",!0),o.crossorigin?(d(),a(l,{key:4,size:"small",title:"CORS mode for this script. Use 'anonymous' for cross-origin with SRI and better error reporting."},{default:n(()=>[c(" crossorigin="+i(o.crossorigin),1)]),_:2},1024)):(d(),a(l,{key:5,type:"warning",size:"small",title:"Cross-origin script without crossorigin. Add crossorigin='anonymous' for SRI and better error reporting."},{default:n(()=>[...e[8]||(e[8]=[c(" missing crossorigin ",-1)])]),_:1})),o.integrity?(d(),a(l,{key:6,size:"small",title:"Subresource Integrity: protects against CDN/script tampering."},{default:n(()=>[...e[9]||(e[9]=[c(" sri ",-1)])]),_:1})):m("",!0),o.referrerPolicy?(d(),a(l,{key:7,size:"small",title:"Referrer policy controls the Referer header for this request."},{default:n(()=>[c(" referrer="+i(o.referrerPolicy),1)]),_:2},1024)):m("",!0),o.https===!1?(d(),a(l,{key:8,type:"error",size:"small",title:"Loaded over HTTP; use HTTPS to avoid mixed content and security risks."},{default:n(()=>[...e[10]||(e[10]=[c(" insecure http ",-1)])]),_:1})):m("",!0)]),t("div",se,[t("div",oe,[e[11]||(e[11]=t("div",{class:"text-xs text-neutral-500"}," Total network ",-1)),t("div",re,i(y(o.totalNetworkTime)),1)]),t("div",ne,[e[12]||(e[12]=t("div",{class:"text-xs text-neutral-500"}," Parse + execute ",-1)),t("div",ie,i(y(o.parseExecuteTime)),1)]),t("div",le,[e[13]||(e[13]=t("div",{class:"text-xs text-neutral-500"}," Request ",-1)),t("div",de,i(y(o.requestTime)),1)]),t("div",ae,[e[14]||(e[14]=t("div",{class:"text-xs text-neutral-500"}," Download ",-1)),t("div",ce,i(y(o.downloadTime)),1)])]),t("div",ue,[u(k,{onClick:R=>B(o.element)},{default:n(()=>[u(_,{name:"material-symbols:terminal",class:"text-lg"}),e[15]||(e[15]=t("span",{class:"ml-1"},"Log element",-1))]),_:1},8,["onClick"]),u(k,{onClick:R=>L(o.url)},{default:n(()=>[u(_,{name:"material-symbols:content-copy-outline",class:"text-lg"}),e[16]||(e[16]=t("span",{class:"ml-1"},"Copy URL",-1))]),_:1},8,["onClick"])])]),_:2},1024))),128))])])}}});export{ve as default};
@@ -1,4 +1,4 @@
1
- import{y as a}from"./By0zDdDR.js";function u(n){const t=a().value;if(!t||!t.host.inspector)throw new Error("`openElementSourceComponent` must be used when the devtools client is connected");const{findTraceFromElement:s}=t.host.nuxt.__tracerRecord,l=s(n);if(!l&&n.parentElement)return u(n.parentElement);l&&t.devtools.rpc.openInEditor(l.filepath),console.info("[@nuxt/hints] Source component not found for element",n)}let e=null;function d(){try{return window.parent?.parent||window.parent||window}catch{return window}}function p(){if(e)return e;const t=d().document;return e=t.createElement("div"),e.style.cssText=`
1
+ import{z as a}from"./DtIwcMt9.js";function u(n){const t=a().value;if(!t||!t.host.inspector)throw new Error("`openElementSourceComponent` must be used when the devtools client is connected");const{findTraceFromElement:s}=t.host.nuxt.__tracerRecord,l=s(n);if(!l&&n.parentElement)return u(n.parentElement);l&&t.devtools.rpc.openInEditor(l.filepath),console.info("[@nuxt/hints] Source component not found for element",n)}let e=null;function d(){try{return window.parent?.parent||window.parent||window}catch{return window}}function p(){if(e)return e;const t=d().document;return e=t.createElement("div"),e.style.cssText=`
2
2
  position: absolute;
3
3
  pointer-events: none;
4
4
  z-index: 999999;
@@ -0,0 +1 @@
1
+ import{g as O,D as q,E as B,q as T,e as C,v as N,G as j,I as E,J as U,K as I,B as L,L as A,M as D,N as w,O as V,k as b,P,Q as F,R as H,S as M,T as z,U as W,V as G}from"./DtIwcMt9.js";const Q=(...t)=>t.find(o=>o!==void 0);function $(t){const o=t.componentName||"NuxtLink";function v(e){return typeof e=="string"&&e.startsWith("#")}function S(e,u,f){const r=f??t.trailingSlash;if(!e||r!=="append"&&r!=="remove")return e;if(typeof e=="string")return R(e,r);const l="path"in e&&e.path!==void 0?e.path:u(e).path;return{...e,name:void 0,path:R(l,r)}}function k(e){const u=q(),f=H(),r=b(()=>!!e.target&&e.target!=="_self"),l=b(()=>{const i=e.to||e.href||"";return typeof i=="string"&&P(i,{acceptRelative:!0})}),y=A("RouterLink"),h=y&&typeof y!="string"?y.useLink:void 0,c=b(()=>{if(e.external)return!0;const i=e.to||e.href||"";return typeof i=="object"?!1:i===""||l.value}),n=b(()=>{const i=e.to||e.href||"";return c.value?i:S(i,u.resolve,e.trailingSlash)}),g=c.value?void 0:h?.({...e,to:n}),m=b(()=>{const i=e.trailingSlash??t.trailingSlash;if(!n.value||l.value||v(n.value))return n.value;if(c.value){const p=typeof n.value=="object"&&"path"in n.value?w(n.value):n.value,x=typeof p=="object"?u.resolve(p).href:p;return R(x,i)}return typeof n.value=="object"?u.resolve(n.value)?.href??null:R(F(f.app.baseURL,n.value),i)});return{to:n,hasTarget:r,isAbsoluteUrl:l,isExternal:c,href:m,isActive:g?.isActive??b(()=>n.value===u.currentRoute.value.path),isExactActive:g?.isExactActive??b(()=>n.value===u.currentRoute.value.path),route:g?.route??b(()=>u.resolve(n.value)),async navigate(i){await M(m.value,{replace:e.replace,external:c.value||r.value})}}}return O({name:o,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:k,setup(e,{slots:u}){const f=q(),{to:r,href:l,navigate:y,isExternal:h,hasTarget:c,isAbsoluteUrl:n}=k(e),g=B(!1),m=T(null),i=s=>{m.value=e.custom?s?.$el?.nextElementSibling:s?.$el};function p(s){return!g.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===s:e.prefetchOn?.[s]??t.prefetchOn?.[s])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!X()}async function x(s=C()){if(g.value)return;g.value=!0;const d=typeof r.value=="string"?r.value:h.value?w(r.value):f.resolve(r.value).fullPath,a=h.value?new URL(d,window.location.href).href:d;await Promise.all([s.hooks.callHook("link:prefetch",a).catch(()=>{}),!h.value&&!c.value&&V(r.value,f).catch(()=>{})])}if(p("visibility")){const s=C();let d,a=null;N(()=>{const _=J();j(()=>{d=E(()=>{m?.value?.tagName&&(a=_.observe(m.value,async()=>{a?.(),a=null,await x(s)}))})})}),U(()=>{d&&I(d),a?.(),a=null})}return()=>{if(!h.value&&!c.value&&!v(r.value)){const a={ref:i,to:r.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(p("interaction")&&(a.onPointerenter=x.bind(null,void 0),a.onFocus=x.bind(null,void 0)),g.value&&(a.class=e.prefetchedClass||t.prefetchedClass),a.rel=e.rel||void 0),L(A("RouterLink"),a,u.default)}const s=e.target||null,d=Q(e.noRel?"":e.rel,t.externalRelAttribute,n.value||c.value?"noopener noreferrer":"")||null;return e.custom?u.default?u.default({href:l.value,navigate:y,prefetch:x,get route(){if(!l.value)return;const a=new URL(l.value,window.location.href);return{path:a.pathname,fullPath:a.pathname,get query(){return D(a.search)},hash:a.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:l.value}},rel:d,target:s,isExternal:h.value||c.value,isActive:!1,isExactActive:!1}):null:L("a",{ref:m,href:l.value||null,rel:d,target:s,onClick:a=>{if(!(h.value||c.value))return a.preventDefault(),e.replace?f.replace(l.value):f.push(l.value)}},u.default?.())}}})}const Z=$(G);function R(t,o){const v=o==="append"?z:W;return P(t)&&!t.startsWith("http")?t:v(t,!0)}function J(){const t=C();if(t._observer)return t._observer;let o=null;const v=new Map,S=(e,u)=>(o||=new IntersectionObserver(f=>{for(const r of f){const l=v.get(r.target);(r.isIntersecting||r.intersectionRatio>0)&&l&&l()}}),v.set(e,u),o.observe(e),()=>{v.delete(e),o?.unobserve(e),v.size===0&&(o?.disconnect(),o=null)});return t._observer={observe:S}}const K=/2g/;function X(){const t=navigator.connection;return!!(t&&(t.saveData||K.test(t.effectiveType)))}export{Z as _};