@nuxt/devtools-nightly 3.0.1-29365129.21c4610 → 3.0.1-29370252.f3266f0

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 (44) hide show
  1. package/dist/chunks/module-main.mjs +1 -1
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/{analyze-build-oqcrl1jz.js → analyze-build-oe5r2n9t.js} +1 -1
  5. package/dist/client/_nuxt/{assets-3zh6n6hw.js → assets-ntgzu9in.js} +1 -1
  6. package/dist/client/_nuxt/builds/latest.json +1 -1
  7. package/dist/client/_nuxt/builds/meta/748654cb-cf7c-463c-b0a9-cd67a30a6ae2.json +1 -0
  8. package/dist/client/_nuxt/{components-nemggbrz.js → components-lkamgq9x.js} +1 -1
  9. package/dist/client/_nuxt/{custom-_name_-i0s9w8wo.js → custom-_name_-k891izff.js} +1 -1
  10. package/dist/client/_nuxt/{data-schema-drawer-n4533z7d.js → data-schema-drawer-kae79wen.js} +1 -1
  11. package/dist/client/_nuxt/{debug-mxoobyoa.js → debug-fgaph4wa.js} +1 -1
  12. package/dist/client/_nuxt/{default-kqqa4bba.js → default-bu22g8rc.js} +1 -1
  13. package/dist/client/_nuxt/{error-404-f4759vc7.js → error-404-odqix7df.js} +1 -1
  14. package/dist/client/_nuxt/{error-500-fg359t1c.js → error-500-nxyyvxuo.js} +1 -1
  15. package/dist/client/_nuxt/{error-fa2v9ua8.js → error-ntceple0.js} +1 -1
  16. package/dist/client/_nuxt/{full-cf22ftdk.js → full-jwu2wh2y.js} +1 -1
  17. package/dist/client/_nuxt/{hooks-kmkegm5d.js → hooks-n044szfl.js} +1 -1
  18. package/dist/client/_nuxt/{imports-dxb3qo9e.js → imports-mmcpk4yu.js} +1 -1
  19. package/dist/client/_nuxt/{index-cpdpzub3.js → index-kfj644lq.js} +1 -1
  20. package/dist/client/_nuxt/{modules-mz2kxw10.js → modules-nhr2xnn0.js} +1 -1
  21. package/dist/client/_nuxt/{dhcet3eq.js → mp2i8ssm.js} +5 -5
  22. package/dist/client/_nuxt/{none-8bjcswx1.js → none-mz8h35k9.js} +1 -1
  23. package/dist/client/_nuxt/{open-graph-h27ns5yo.js → open-graph-e6wr9uqe.js} +1 -1
  24. package/dist/client/_nuxt/{overview-nl5top8u.js → overview-etz3y408.js} +1 -1
  25. package/dist/client/_nuxt/{pages-lbparzhr.js → pages-iubcr60c.js} +1 -1
  26. package/dist/client/_nuxt/{payload-guogaqf6.js → payload-m9e323cd.js} +1 -1
  27. package/dist/client/_nuxt/{pinia-pbd50zup.js → pinia-l1qdcrhg.js} +1 -1
  28. package/dist/client/_nuxt/{plugins-ofh5qbbt.js → plugins-kmy0sy6y.js} +1 -1
  29. package/dist/client/_nuxt/{render-tree-k06lscom.js → render-tree-depae72u.js} +1 -1
  30. package/dist/client/_nuxt/{runtime-configs-ovvj3583.js → runtime-configs-mmqwaa6s.js} +1 -1
  31. package/dist/client/_nuxt/{server-discovery-etxl22my.js → server-discovery-mjag1532.js} +1 -1
  32. package/dist/client/_nuxt/{server-routes-mgsattjj.js → server-routes-g3nea2v8.js} +1 -1
  33. package/dist/client/_nuxt/{server-tasks-et3sau9x.js → server-tasks-lrnz581v.js} +1 -1
  34. package/dist/client/_nuxt/{settings-bx9u4e01.js → settings-hapu4is5.js} +1 -1
  35. package/dist/client/_nuxt/{storage-fzijzbnr.js → storage-f2s67rns.js} +1 -1
  36. package/dist/client/_nuxt/{terminals-mxw3bgmn.js → terminals-mvgp8t5a.js} +1 -1
  37. package/dist/client/_nuxt/{timeline-lf1e24gw.js → timeline-oeagkh8k.js} +1 -1
  38. package/dist/client/_nuxt/{unocss-runtime-gcsb1pt7.js → unocss-runtime-l38qoh5h.js} +1 -1
  39. package/dist/client/_nuxt/vendor/{unocss-kbr5sp48.js → unocss-mh8fijzd.js} +2 -2
  40. package/dist/client/_nuxt/{virtual-files-y79trwh5.js → virtual-files-f297srwe.js} +1 -1
  41. package/dist/client/index.html +1 -1
  42. package/dist/module.json +1 -1
  43. package/package.json +4 -4
  44. package/dist/client/_nuxt/builds/meta/d9b1392c-c0e7-4273-8fab-59c8ae57c94b.json +0 -1
@@ -1 +1 @@
1
- import{b as o}from"#entry";import{J as t,Y as r,a0 as n}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";const s={},a={relative:"","w-full":""};function c(e,l){return r(),t("div",a,[n(e.$slots,"default")])}const d=o(s,[["render",c]]);export{d as default};
1
+ import{b as o}from"#entry";import{J as t,Y as r,a0 as n}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";const s={},a={relative:"","w-full":""};function c(e,l){return r(),t("div",a,[n(e.$slots,"default")])}const d=o(s,[["render",c]]);export{d as default};
@@ -1,3 +1,3 @@
1
- import{at as ne,a as ae,w as H,n as J,_ as P,au as U,av as se,aw as re,ax as ie,b as V,ay as le,az as ce,c as de,y as pe,z as ue,C as me,aA as E,v as ge}from"#entry";import{_ as _e}from"./nnavbar-b4ap0r8w.js";import{_ as q}from"./nlink-fgjzhevk.js";import{_ as K}from"./nsection-block-je23gs2w.js";import{_ as he}from"./ncode-block-pcw3yh3u.js";import{p as O,q as C,k as j,X as A,a4 as k,Y as t,$ as h,a3 as e,J as n,F as S,ah as I,a7 as M,ab as p,a1 as c,ac as x,u as g,a5 as B,z as ve,aj as fe,ad as D,a6 as be}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./nicon-title-he6hzgyb.js";import"./client-miiq4qin.js";const Y=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"optional",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"optional",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"optional",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"optional",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],we={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ye=["onClick"],ke={key:0,"x-divider":""},$e={key:1,"x-divider":""},Te={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Se={"w-full":"",p2:"",op75:""},Ce={key:1,m4:"",flex:"~ col gap-2"},Oe={flex:"~ gap-1 wrap items-center"},Ne={key:1},Me={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Ae=O({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(a){const _=a,i=C(()=>Y.filter(d=>!_.tags?.some(o=>o.name===d.name))),l=C(()=>{let d={};const o={};i.value.forEach(m=>{m.seoMeta?Object.assign(o,m.seoMeta):d=ne(d,m.head)});const w=[];if(Object.keys(o).length){const m=JSON.stringify(o,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useSeoMeta(${m})`)}if(Object.keys(d).length){const m=JSON.stringify(d,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useHead(${m})`)}return w.join(`
1
+ import{at as ne,a as ae,w as H,n as J,_ as P,au as U,av as se,aw as re,ax as ie,b as V,ay as le,az as ce,c as de,y as pe,z as ue,C as me,aA as E,v as ge}from"#entry";import{_ as _e}from"./nnavbar-b4ap0r8w.js";import{_ as q}from"./nlink-fgjzhevk.js";import{_ as K}from"./nsection-block-je23gs2w.js";import{_ as he}from"./ncode-block-pcw3yh3u.js";import{p as O,q as C,k as j,X as A,a4 as k,Y as t,$ as h,a3 as e,J as n,F as S,ah as I,a7 as M,ab as p,a1 as c,ac as x,u as g,a5 as B,z as ve,aj as fe,ad as D,a6 as be}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./nicon-title-he6hzgyb.js";import"./client-miiq4qin.js";const Y=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"optional",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"optional",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"optional",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"optional",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],we={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ye=["onClick"],ke={key:0,"x-divider":""},$e={key:1,"x-divider":""},Te={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Se={"w-full":"",p2:"",op75:""},Ce={key:1,m4:"",flex:"~ col gap-2"},Oe={flex:"~ gap-1 wrap items-center"},Ne={key:1},Me={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Ae=O({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(a){const _=a,i=C(()=>Y.filter(d=>!_.tags?.some(o=>o.name===d.name))),l=C(()=>{let d={};const o={};i.value.forEach(m=>{m.seoMeta?Object.assign(o,m.seoMeta):d=ne(d,m.head)});const w=[];if(Object.keys(o).length){const m=JSON.stringify(o,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useSeoMeta(${m})`)}if(Object.keys(d).length){const m=JSON.stringify(d,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");w.push(`useHead(${m})`)}return w.join(`
2
2
 
3
3
  `)}),u=ae(),$=H(),b=["Missing Tags","Code Snippet"],v=j(b[0]);return(d,o)=>{const w=q,m=J,T=P,N=he,L=K;return i.value.length?(t(),A(L,{key:0,text:"Missing Tags",description:`${i.value.length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:h(()=>[e("div",we,[(t(),n(S,null,I(b,(s,r)=>e("button",{key:r,px4:"",py2:"",border:"r t base",hover:"bg-active",class:M(s===v.value?"":"border-b"),onClick:f=>v.value=s},[e("div",{class:M(s===v.value?"":"op30"),capitalize:""},p(s),3)],10,ye)),64)),o[3]||(o[3]=e("div",{border:"b base","flex-auto":""},null,-1))]),v.value===b[0]?(t(),A(m,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,I(i.value,(s,r)=>(t(),n(S,{key:r},[r?(t(),n("div",ke)):k("",!0),r?(t(),n("div",$e)):k("",!0),e("div",Te,[o[4]||(o[4]=e("div",{"i-carbon-warning":"","text-orange":""},null,-1)),c(w,{"op-50":"",href:s.docs,target:"_blank",n:"orange"},{default:h(()=>[x(p(s.name),1)]),_:2},1032,["href"])]),e("div",Se,p(s.description),1)],64))),128))]),_:1})):(t(),n("div",Ce,[e("p",Oe,[c(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:o[0]||(o[0]=s=>g(u)(l.value,"open-graph-suggestion"))},{default:h(()=>[...o[5]||(o[5]=[x(" Copy ",-1)])]),_:1}),o[7]||(o[7]=x(" the following code snippet and paste it into your ",-1)),a.matchedRouteFilepath?(t(),A(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:o[1]||(o[1]=s=>g($)(a.matchedRouteFilepath))},{default:h(()=>[...o[6]||(o[6]=[x(" page component ",-1)])]),_:1})):(t(),n("span",Ne,"page component")),o[8]||(o[8]=x(" to full fill the missing tags. ",-1))]),c(m,{relative:"","n-code-block":""},{default:h(()=>[c(N,{code:l.value,lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",Me,[c(T,{icon:"carbon-copy",onClick:o[2]||(o[2]=s=>g(u)(l.value,"open-graph-suggestion"))},{default:h(()=>[...o[9]||(o[9]=[x(" Copy ",-1)])]),_:1})])]),_:1})]))]),_:1},8,["description"])):k("",!0)}}}),je=Object.assign(Ae,{__name:"OpenGraphMissingTabs"}),Ie={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Be={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Le={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Re={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Fe={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},ze={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},De=O({__name:"SocialFacebook",props:{card:{}},setup(a){return(_,i)=>(t(),n("div",Ie,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(a.card.image)})`})},null,4),e("div",Be,[e("div",Le,p(a.card.url),1),e("div",Re,[e("div",Fe,p(a.card.title),1),e("div",ze,p(a.card.description),1)])])]))}}),Ge=Object.assign(De,{__name:"SocialFacebook"}),Ee={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},He={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},Je={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Pe={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},Ue={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ve=O({__name:"SocialTwitter",props:{tags:{}},setup(a){const _=a,i=C(()=>U(_.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),l=C(()=>i.value.image?_.tags.find(u=>u.tag==="meta"&&u.name==="twitter:card")?.value||"summary_large_image":"summary");return(u,$)=>(t(),n("div",Ee,[e("div",{class:M(["cursor-pointer overflow-hidden leading-[1.3em]",l.value==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[l.value==="summary_large_image"?(t(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(i.value.image)})`})},null,4)):(t(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(i.value.image)})`})},null,4)),e("div",He,[e("div",Je,p(i.value.url),1),e("div",Pe,p(i.value.title),1),e("div",Ue,p(i.value.description),1)])],2)]))}}),qe=Object.assign(Ve,{__name:"SocialTwitter"}),Ke={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] bg-base shadow-md"},Ye={class:"break-words p-[10px] antialiased"},We={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Xe={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Qe={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Ze=O({__name:"SocialLinkedin",props:{card:{}},setup(a){return(_,i)=>(t(),n("div",Ke,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(a.card.image)})`})},null,4),e("div",Ye,[e("div",We,[e("div",Xe,p(a.card.title),1),e("div",Qe,p(a.card.url),1)])])]))}}),et=Object.assign(Ze,{__name:"SocialLinkedin"}),tt={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 bg-base py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26]"},ot={class:"pl-[10px] pr-[8px]"},nt={class:"text-[#3390ec] leading-normal underline"},at={class:"quote w-full flex"},st={class:"flex flex-col gap-1"},rt={key:0,class:"my-[3px] overflow-hidden rounded"},it=["src"],lt={class:"cursor-pointer text-sm text-[#3390ec]"},ct={class:"cursor-pointer text-sm"},dt={class:"cursor-pointer text-sm"},pt={class:"flex justify-end text-xs text-[#707579]"},ut=O({__name:"SocialTelegram",props:{card:{}},setup(a){const _=se(),i=re(ie(),"HH:mm");return(l,u)=>(t(),n("div",tt,[e("div",ot,[e("div",nt,p(a.card.url),1),e("div",at,[e("div",st,[a.card.image?(t(),n("div",rt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,it)])):k("",!0),e("div",lt,[e("strong",null,p(g(_).hostname),1)]),e("div",ct,[e("strong",null,p(a.card.title),1)]),e("div",dt,p(a.card.description),1)])]),e("div",pt,[e("span",null,p(g(i)),1)])]),u[0]||(u[0]=e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1))]))}}),mt=Object.assign(V(ut,[["__scopeId","data-v-4566448e"]]),{__name:"SocialTelegram"}),gt={flex:"~ col","w-full":""},_t={flex:"~ wrap","w-full":"","flex-none":""},ht=["onClick"],vt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},ft={key:0},bt={key:1},xt={key:2},wt={key:3},yt=O({__name:"SocialPreviewGroup",props:{tags:{}},setup(a){const _=a,i=["twitter","facebook","linkedin","telegram"],l=le("nuxt-devtools-social-preview-tab",i[0]),u=C(()=>U(_.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return($,b)=>{const v=Ge,d=qe,o=et,w=mt;return t(),n("div",gt,[e("div",_t,[(t(),n(S,null,I(i,(m,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:M(m===g(l)?"":"border-b"),onClick:N=>l.value=m},[e("div",{class:M(m===g(l)?"":"op30"),capitalize:""},p(m),3)],10,ht)),64)),b[0]||(b[0]=e("div",{border:"b base","flex-auto":""},null,-1))]),e("div",vt,[g(l)==="facebook"?(t(),n("div",ft,[c(v,{card:u.value},null,8,["card"])])):g(l)==="twitter"?(t(),n("div",bt,[c(d,{tags:a.tags},null,8,["tags"])])):g(l)==="linkedin"?(t(),n("div",xt,[c(o,{card:u.value},null,8,["card"])])):g(l)==="telegram"?(t(),n("div",wt,[c(w,{card:u.value},null,8,["card"])])):k("",!0)])])}}}),kt=Object.assign(yt,{__name:"SocialPreviewGroup"}),$t={},Tt={class:"markdown-body"};function St(a,_){return t(),n("div",Tt,[..._[0]||(_[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Open Graph"),e("p",null,[x("Nuxt provides several different ways to manage your meta tags using "),e("a",{href:"https://unhead.harlanzw.com/",target:"_blank",rel:"noopener"},[e("code",{"v-pre":""},"unhead")]),x(". Improve your Nuxt app’s SEO with powerful head config, composables and components.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/seo-meta",target:"_blank",rel:"noopener"},"Learn more on the documentation")]),e("hr"),e("p",null,"You can also find how open graph specs are defined in:"),e("ul",null,[e("li",null,[e("a",{href:"https://ogp.me/",target:"_blank",rel:"noopener"},"The Open Graph protocol")]),e("li",null,[e("a",{href:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started",target:"_blank",rel:"noopener"},"Twitter Cards")])])])],-1)])])}const Ct=V($t,[["render",St]]),Ot={grid:"~ lg:cols-2","h-full":"","w-full":"","of-hidden":""},Nt={"flex-auto":"","of-auto":""},Mt={"flex-none":"",flex:"~ gap2 items-center"},At={flex:"~ col"},jt={key:0,"x-divider":""},It={key:1,"x-divider":""},Bt={mr2:"",px4:"",py2:""},Vt=O({__name:"open-graph",setup(a){const _=j(0),i=ce(),l=de(async()=>(_.value,(await i.value?.resolveTags()).map(r=>{const f=r.props||{};return r.tag==="htmlAttrs"&&f.lang?{tag:"html",name:"lang",value:f.lang}:f.charset?{tag:"meta",name:"charset",value:f.charset}:{tag:r.tag,name:f.property??f.name??f.rel??r.tag,value:f.content??f.href??r.textContent??JSON.stringify(f)}})),[]),u=j(!0);function $(){_.value+=1}const b=pe(),v=ue(),d=j(""),o=me(),w=H();async function m(){d.value!==v.value.path&&b.value.push(d.value||"/")}const T=C(()=>d.value===v.value.path?[]:b.value.resolve(d.value||"/").matched),N=C(()=>{const s=o.value.find(r=>r.path===v.value?.matched?.[0]?.path);return s?.file||s?.meta?.file});function L(s){return Y.find(r=>r.name===s.name)?.docs}return E(v).toBeTruthy().then(s=>{d.value=s.path}),E(b).toBeTruthy().then(s=>{s.afterEach(()=>{ve(()=>{d.value=v.value.path,setTimeout($,200),setTimeout($,800)})})}),(s,r)=>{const f=ge,R=P,W=_e,G=q,X=J,Q=K,Z=je,ee=kt,te=Ct,oe=xe,F=fe("tooltip");return t(),n(S,null,[e("div",Ot,[e("div",Nt,[c(W,null,{search:h(()=>[c(f,{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=y=>d.value=y),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:M(["px-5 py-2",g(v)?.path===d.value?"":T.value.length?"text-green":"text-orange"]),onKeydown:be(m,["enter"])},null,8,["modelValue","class"])]),actions:h(()=>[e("div",Mt,[N.value?D((t(),A(R,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:r[1]||(r[1]=y=>g(w)(N.value))},null,512)),[[F,"Open file in editor"]]):k("",!0),D(c(R,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:$},null,512),[[F,"Refresh Data"]]),D(c(R,{"text-lg":"",border:!1,icon:u.value?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:r[2]||(r[2]=y=>u.value=!u.value)},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",At,[c(Q,{text:"Tags",icon:"carbon:tag-group"},{default:h(()=>[c(X,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:h(()=>[(t(!0),n(S,null,I(g(l),(y,z)=>(t(),n(S,{key:z},[z?(t(),n("div",jt)):k("",!0),z?(t(),n("div",It)):k("",!0),e("div",Bt,[c(G,{op50:"",href:L(y),target:"_blank",n:"primary"},{default:h(()=>[x(p(y.name),1)]),_:2},1032,["href"])]),c(G,{href:String(y.value).match(/^https?:\/\//)?y.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:h(()=>[x(p(y.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),c(Z,{tags:g(l),"matched-route-filepath":N.value},null,8,["tags","matched-route-filepath"])])]),u.value&&g(l)?.length?(t(),A(ee,{key:0,tags:g(l),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):k("",!0)]),c(oe,null,{default:h(()=>[c(te)]),_:1})],64)}}});export{Vt as default};
@@ -1 +1 @@
1
- import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as q,h as G,ad as g,ae as k,af as H,q as K,ag as $,_ as J,i as U,j as W,E as X}from"#entry";import{u as Y,_ as Q}from"./state-modules-lzveckmy.js";import{u as Z}from"./state-components-8k7sf46m.js";import{p as h,q as A,X as v,Y as s,$ as n,J as p,u as o,a3 as e,a1 as i,ab as a,a4 as u,F as f,ac as l}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./nbadge-d24jlq2b.js";import"./ncode-block-pcw3yh3u.js";import"./client-miiq4qin.js";import"./ncheckbox-eijyrwcq.js";const c="3.0.1-29365129.21c4610",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"","theme-card-lime":"",p4:"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},jt=h({__name:"overview",setup(gt){const b=M(),m=z(),D=Z(),y=E(),j=Y(),V=O(),w=P(),B=F();function I(){W.value=!0,B.push("/")}const _=A(()=>b.value?.nuxt.vueApp.version),r=A(()=>b.value?.metrics.loading());function L(){X()}return(S,t)=>{const R=G,x=q,C=Q,N=K,d=J,T=U;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:I},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(c)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank","theme-card-green":"",p4:"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),_.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank","theme-card-green":"",p4:"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(_.value),1)]),_:1})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(b)?(s(),v(x,{key:0,"min-w-40":"","theme-card-lime":"",p4:"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(V).length,"page")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"","theme-card-lime":"",p4:"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1})):u("",!0),o(m)&&o(y)?(s(),v(x,{key:2,"min-w-40":"","theme-card-yellow":"",p4:"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(y).imports.length,"import")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"","theme-card-purple":"",p4:"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"module")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"","theme-card-teal":"",p4:"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(k)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(k)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(k)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(k)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(H)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[...t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ",-1)])]),_:1})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o($))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[...t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ",-1)])]),_:1}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[...t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ",-1)])]),_:1})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[20]||(t[20]=[l(" ⌘ Cmd ",-1)])]),_:1}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[21]||(t[21]=[l(" K ",-1)])]),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[23]||(t[23]=[l(" Ctrl ",-1)])]),_:1}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[24]||(t[24]=[l(" K ",-1)])]),_:1})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette ",-1))]),e("div",ft,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[28]||(t[28]=[l(" ⇧ Shift ",-1)])]),_:1}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[29]||(t[29]=[l(" ⌥ Option ",-1)])]),_:1}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[30]||(t[30]=[l(" D ",-1)])]),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[33]||(t[33]=[l(" Shift ",-1)])]),_:1}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[34]||(t[34]=[l(" Alt ",-1)])]),_:1}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[35]||(t[35]=[l(" D ",-1)])]),_:1})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{jt as default};
1
+ import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as q,h as G,ad as g,ae as k,af as H,q as K,ag as $,_ as J,i as U,j as W,E as X}from"#entry";import{u as Y,_ as Q}from"./state-modules-lzveckmy.js";import{u as Z}from"./state-components-8k7sf46m.js";import{p as h,q as A,X as v,Y as s,$ as n,J as p,u as o,a3 as e,a1 as i,ab as a,a4 as u,F as f,ac as l}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./nbadge-d24jlq2b.js";import"./ncode-block-pcw3yh3u.js";import"./client-miiq4qin.js";import"./ncheckbox-eijyrwcq.js";const c="3.0.1-29370252.f3266f0",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"","theme-card-lime":"",p4:"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},jt=h({__name:"overview",setup(gt){const b=M(),m=z(),D=Z(),y=E(),j=Y(),V=O(),w=P(),B=F();function I(){W.value=!0,B.push("/")}const _=A(()=>b.value?.nuxt.vueApp.version),r=A(()=>b.value?.metrics.loading());function L(){X()}return(S,t)=>{const R=G,x=q,C=Q,N=K,d=J,T=U;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:I},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(c)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank","theme-card-green":"",p4:"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),_.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank","theme-card-green":"",p4:"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(_.value),1)]),_:1})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(b)?(s(),v(x,{key:0,"min-w-40":"","theme-card-lime":"",p4:"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(V).length,"page")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"","theme-card-lime":"",p4:"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1})):u("",!0),o(m)&&o(y)?(s(),v(x,{key:2,"min-w-40":"","theme-card-yellow":"",p4:"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(y).imports.length,"import")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"","theme-card-purple":"",p4:"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"module")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"","theme-card-teal":"",p4:"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(k)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(k)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(k)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(k)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(H)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[...t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ",-1)])]),_:1})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o($))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[...t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ",-1)])]),_:1}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[...t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ",-1)])]),_:1})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[20]||(t[20]=[l(" ⌘ Cmd ",-1)])]),_:1}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[21]||(t[21]=[l(" K ",-1)])]),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[23]||(t[23]=[l(" Ctrl ",-1)])]),_:1}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[24]||(t[24]=[l(" K ",-1)])]),_:1})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette ",-1))]),e("div",ft,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[28]||(t[28]=[l(" ⇧ Shift ",-1)])]),_:1}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[29]||(t[29]=[l(" ⌥ Option ",-1)])]),_:1}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[30]||(t[30]=[l(" D ",-1)])]),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[33]||(t[33]=[l(" Shift ",-1)])]),_:1}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[34]||(t[34]=[l(" Alt ",-1)])]),_:1}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>[...t[35]||(t[35]=[l(" D ",-1)])]),_:1})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{jt as default};
@@ -1 +1 @@
1
- import{v as j,_ as H,w as J,x as F,a as X,b as Y,y as Z,z as G,A as Q,B as ee,C as te,D as ne,r as oe,E as ae}from"#entry";import{_ as S}from"./nbadge-d24jlq2b.js";import{p as D,k as A,q as k,Z as se,J as o,X as w,Y as t,a3 as e,ab as N,$ as C,F as g,ah as T,a7 as L,am as re,a4 as R,a1 as v,ac as I,u as c,D as le,a6 as ue}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as z}from"./filepath-item-owlv864w.js";import{_ as ie}from"./nsection-block-je23gs2w.js";import{_ as de}from"./launch-page-l87i7ewv.js";import{_ as pe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./nicon-title-he6hzgyb.js";import"./nmarkdown-n6zsr15e.js";import"./client-miiq4qin.js";const ce={block:"","cursor-pointer":""},me={p2:""},_e=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},fe=D({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(m,{emit:l}){const h=m,V=l,y=A([]),f=k(()=>{const r=$(h.route.path);return y.value=Array.from({length:r.length},()=>""),r});function $(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(p=>p[0]===":"?p.replace(/\(\)$/,"?"):p)}const x=k(()=>f.value.map((r,p)=>r[0]===":"?y.value[p]:r).join("").replace(/\/+/g,"/")),a=k(()=>h.route.path.includes(":"));function s(){V("navigate",x.value)}return(r,p)=>{const _=j,n=H,u=se("VDropdown");return a.value?(t(),w(u,{key:1},{popper:C(({hide:b})=>[e("div",me,[e("form",{flex:"~ col",onSubmit:re(()=>{s(),b()},["prevent"])},[a.value?(t(),o(g,{key:0},[p[0]||(p[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),o(g,null,T(f.value,(i,d)=>(t(),o(g,{key:d},[i[0]===":"?(t(),w(_,{key:0,modelValue:y.value[d],"onUpdate:modelValue":B=>y.value[d]=B,"w-20":"","n-sm":"",placeholder:i.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),o("span",he,N(i),1))],64))),128))])],64)):R("",!0),v(n,{type:"submit",block:"",n:"primary"},{default:C(()=>[...p[1]||(p[1]=[I(" Navigate ",-1)])]),_:1})],40,_e)])]),default:C(()=>[e("code",ce,[(t(!0),o(g,null,T(f.value,(b,i)=>(t(),o("span",{key:i,class:L(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},N(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),o("button",{key:0,onClick:s},[e("code",null,N(m.route.path),1)]))}}}),ge=Object.assign(fe,{__name:"RoutePathItem"}),ye={"max-w-full":"","of-auto":""},xe={"w-full":""},be={"w-20":"","pr-1":""},ke={flex:"","items-center":"","justify-end":""},we={"text-sm":""},$e={flex:"inline gap3","items-center":""},Ce={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},Ne=["onClick"],Re=["onClick"],Pe={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ie={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Te={key:0},Be=["onClick"],Ee=D({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(m){const l=m,h=J(),V=F(),y=X(),f=k(()=>[...l.pages].sort((a,s)=>a.path.localeCompare(s.path)));function $(a){const s=l.layouts.find(r=>r.name===a);s&&h(s.file)}function x(a){if(typeof a=="string")return V.value?.middleware.find(s=>s.name===a)?.path}return(a,s)=>{const r=S,p=ge,_=z;return t(),o("div",ye,[e("table",xe,[s[4]||(s[4]=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1)),e("tbody",null,[(t(!0),o(g,null,T(f.value,n=>(t(),o("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",be,[e("div",ke,[m.matched.find(u=>u.name===n.name)?(t(),w(r,{key:0,n:"green",title:"active",textContent:"active"})):m.matchedPending.find(u=>u.name===n.name)?(t(),w(r,{key:1,n:"teal",title:"next",textContent:"next"})):R("",!0)])]),e("td",we,[e("div",$e,[v(p,{route:n,class:L(m.matched.find(u=>u.name===n.name)?"text-primary":m.matchedPending.find(u=>u.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=u=>a.$emit("navigate",u))},null,8,["route","class"]),e("div",Ce,[n.file||n.meta?.file?(t(),o("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:u=>c(h)(n.file||n.meta?.file)},[...s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)])],8,Ne)):R("",!0),n.file||n.meta?.file?(t(),o("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:u=>c(y)(n.file||n.meta?.file)},[...s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)])],8,Re)):R("",!0)])])]),e("td",Pe,N(n.name),1),e("td",Ve,[v(_,{filepath:x(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ie,[n.meta.layout===!1?(t(),o("span",Te,"-")):n.meta.layout?(t(),o("button",{key:1,onClick:u=>$(n.meta.layout)},N(n.meta.layout),9,Be)):(t(),o("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=u=>$("default"))}," (default) "))])]))),128))])])])}}}),Ae=Object.assign(Ee,{__name:"RoutesTable"}),De={},Le={class:"markdown-body"};function Me(m,l){return t(),o("div",Le,[...l[0]||(l[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Pages"),e("p",null,[I("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",{"v-pre":""},"~/pages/"),I(" directory.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")]),e("hr"),e("h1",null,"Middlewares"),e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route."),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const je=Y(De,[["render",Me]]),Fe={key:0,"h-full":"","of-auto":""},Se={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},ze={"font-mono":""},Oe={key:1,op50:""},Ue={key:0,"text-orange":"",op75:""},Ke={key:1,op50:""},We={"min-h-14":""},qe={key:1,class:"py-4 text-center"},He={"w-full":""},Je={mr1:""},lt=D({__name:"pages",setup(m){const l=Z(),h=G(),V=Q(),y=F(),f=ee(),$=te(),x=k(()=>y.value?.middleware||[]),a=A(""),s=A(0),r=k(()=>(x.value,a.value,f.value,s.value,l.value?.currentRoute?.value?.path));le(()=>{h.value&&(a.value=l.value?.currentRoute?.value?.path),l.value?.beforeEach(i=>{a.value=i.fullPath}),l.value?.afterEach(i=>{a.value=i.fullPath})});async function p(){a.value!==l.value?.currentRoute?.value?.path&&l.value.push(a.value||"/")}const _=k(()=>l.value.resolve(a.value||"/").matched);function n(i){l.value.push(i),a.value=i}const u=ne(),b=k(()=>`./${u===4?"app/":""}pages/index.vue`);return(i,d)=>{const B=j,M=Ae,E=ie,O=S,U=z,K=de,W=je,q=pe;return t(),o(g,null,[c(V)?.pages&&c(l)?(t(),o("div",Fe,[e("div",Se,[e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[1]||(d[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",ze,N(r.value),1),d[2]||(d[2]=e("span",{op50:""}," to ",-1))],64)):(t(),o("span",Oe,"Current route"))]),v(B,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=P=>a.value=P),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(r.value===a.value?"":_.value.length?"text-green":"text-orange"),onKeydown:ue(p,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[3]||(d[3]=e("span",null,[I("Press "),e("b",{"font-bold":""},"Enter"),I(" to navigate")],-1)),_.value.length?R("",!0):(t(),o("span",Ue," (no match)"))],64)):(t(),o("span",Ke,"Edit path above to navigate"))])]),v(E,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:C(()=>[e("div",We,[_.value.length?(t(),w(M,{key:0,pages:_.value,layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),o("div",qe,[...d[4]||(d[4]=[e("span",{op50:""},"No routes matched",-1)])]))])]),_:1}),v(E,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c($).length} routes registered in your application`,padding:"pr5"},{default:C(()=>[v(M,{pages:c($),layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),x.value.length?(t(),w(E,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${x.value.length} middleware registered in your application`,padding:"px13"},{default:C(()=>[e("table",He,[d[5]||(d[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),o(g,null,T(x.value,P=>(t(),o("tr",{key:P.path,"h-7":""},[e("td",null,[e("span",Je,N(P.name),1),P.global?(t(),w(O,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):R("",!0)]),e("td",null,[v(U,{filepath:P.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):R("",!0)])):(t(),w(K,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:`Create ${b.value} to enable routing`,actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in i?i.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in i?i.ensureDevAuthToken:c(ae))(),"enablePages")}}]},null,8,["description","actions"])),v(q,null,{default:C(()=>[v(W)]),_:1})],64)}}});export{lt as default};
1
+ import{v as j,_ as H,w as J,x as F,a as X,b as Y,y as Z,z as G,A as Q,B as ee,C as te,D as ne,r as oe,E as ae}from"#entry";import{_ as S}from"./nbadge-d24jlq2b.js";import{p as D,k as A,q as k,Z as se,J as o,X as w,Y as t,a3 as e,ab as N,$ as C,F as g,ah as T,a7 as L,am as re,a4 as R,a1 as v,ac as I,u as c,D as le,a6 as ue}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as z}from"./filepath-item-owlv864w.js";import{_ as ie}from"./nsection-block-je23gs2w.js";import{_ as de}from"./launch-page-l87i7ewv.js";import{_ as pe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./nicon-title-he6hzgyb.js";import"./nmarkdown-n6zsr15e.js";import"./client-miiq4qin.js";const ce={block:"","cursor-pointer":""},me={p2:""},_e=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},fe=D({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(m,{emit:l}){const h=m,V=l,y=A([]),f=k(()=>{const r=$(h.route.path);return y.value=Array.from({length:r.length},()=>""),r});function $(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(p=>p[0]===":"?p.replace(/\(\)$/,"?"):p)}const x=k(()=>f.value.map((r,p)=>r[0]===":"?y.value[p]:r).join("").replace(/\/+/g,"/")),a=k(()=>h.route.path.includes(":"));function s(){V("navigate",x.value)}return(r,p)=>{const _=j,n=H,u=se("VDropdown");return a.value?(t(),w(u,{key:1},{popper:C(({hide:b})=>[e("div",me,[e("form",{flex:"~ col",onSubmit:re(()=>{s(),b()},["prevent"])},[a.value?(t(),o(g,{key:0},[p[0]||(p[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),o(g,null,T(f.value,(i,d)=>(t(),o(g,{key:d},[i[0]===":"?(t(),w(_,{key:0,modelValue:y.value[d],"onUpdate:modelValue":B=>y.value[d]=B,"w-20":"","n-sm":"",placeholder:i.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),o("span",he,N(i),1))],64))),128))])],64)):R("",!0),v(n,{type:"submit",block:"",n:"primary"},{default:C(()=>[...p[1]||(p[1]=[I(" Navigate ",-1)])]),_:1})],40,_e)])]),default:C(()=>[e("code",ce,[(t(!0),o(g,null,T(f.value,(b,i)=>(t(),o("span",{key:i,class:L(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},N(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),o("button",{key:0,onClick:s},[e("code",null,N(m.route.path),1)]))}}}),ge=Object.assign(fe,{__name:"RoutePathItem"}),ye={"max-w-full":"","of-auto":""},xe={"w-full":""},be={"w-20":"","pr-1":""},ke={flex:"","items-center":"","justify-end":""},we={"text-sm":""},$e={flex:"inline gap3","items-center":""},Ce={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},Ne=["onClick"],Re=["onClick"],Pe={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ie={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Te={key:0},Be=["onClick"],Ee=D({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(m){const l=m,h=J(),V=F(),y=X(),f=k(()=>[...l.pages].sort((a,s)=>a.path.localeCompare(s.path)));function $(a){const s=l.layouts.find(r=>r.name===a);s&&h(s.file)}function x(a){if(typeof a=="string")return V.value?.middleware.find(s=>s.name===a)?.path}return(a,s)=>{const r=S,p=ge,_=z;return t(),o("div",ye,[e("table",xe,[s[4]||(s[4]=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1)),e("tbody",null,[(t(!0),o(g,null,T(f.value,n=>(t(),o("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",be,[e("div",ke,[m.matched.find(u=>u.name===n.name)?(t(),w(r,{key:0,n:"green",title:"active",textContent:"active"})):m.matchedPending.find(u=>u.name===n.name)?(t(),w(r,{key:1,n:"teal",title:"next",textContent:"next"})):R("",!0)])]),e("td",we,[e("div",$e,[v(p,{route:n,class:L(m.matched.find(u=>u.name===n.name)?"text-primary":m.matchedPending.find(u=>u.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=u=>a.$emit("navigate",u))},null,8,["route","class"]),e("div",Ce,[n.file||n.meta?.file?(t(),o("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:u=>c(h)(n.file||n.meta?.file)},[...s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)])],8,Ne)):R("",!0),n.file||n.meta?.file?(t(),o("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:u=>c(y)(n.file||n.meta?.file)},[...s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)])],8,Re)):R("",!0)])])]),e("td",Pe,N(n.name),1),e("td",Ve,[v(_,{filepath:x(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ie,[n.meta.layout===!1?(t(),o("span",Te,"-")):n.meta.layout?(t(),o("button",{key:1,onClick:u=>$(n.meta.layout)},N(n.meta.layout),9,Be)):(t(),o("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=u=>$("default"))}," (default) "))])]))),128))])])])}}}),Ae=Object.assign(Ee,{__name:"RoutesTable"}),De={},Le={class:"markdown-body"};function Me(m,l){return t(),o("div",Le,[...l[0]||(l[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Pages"),e("p",null,[I("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",{"v-pre":""},"~/pages/"),I(" directory.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")]),e("hr"),e("h1",null,"Middlewares"),e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route."),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const je=Y(De,[["render",Me]]),Fe={key:0,"h-full":"","of-auto":""},Se={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},ze={"font-mono":""},Oe={key:1,op50:""},Ue={key:0,"text-orange":"",op75:""},Ke={key:1,op50:""},We={"min-h-14":""},qe={key:1,class:"py-4 text-center"},He={"w-full":""},Je={mr1:""},lt=D({__name:"pages",setup(m){const l=Z(),h=G(),V=Q(),y=F(),f=ee(),$=te(),x=k(()=>y.value?.middleware||[]),a=A(""),s=A(0),r=k(()=>(x.value,a.value,f.value,s.value,l.value?.currentRoute?.value?.path));le(()=>{h.value&&(a.value=l.value?.currentRoute?.value?.path),l.value?.beforeEach(i=>{a.value=i.fullPath}),l.value?.afterEach(i=>{a.value=i.fullPath})});async function p(){a.value!==l.value?.currentRoute?.value?.path&&l.value.push(a.value||"/")}const _=k(()=>l.value.resolve(a.value||"/").matched);function n(i){l.value.push(i),a.value=i}const u=ne(),b=k(()=>`./${u===4?"app/":""}pages/index.vue`);return(i,d)=>{const B=j,M=Ae,E=ie,O=S,U=z,K=de,W=je,q=pe;return t(),o(g,null,[c(V)?.pages&&c(l)?(t(),o("div",Fe,[e("div",Se,[e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[1]||(d[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",ze,N(r.value),1),d[2]||(d[2]=e("span",{op50:""}," to ",-1))],64)):(t(),o("span",Oe,"Current route"))]),v(B,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=P=>a.value=P),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(r.value===a.value?"":_.value.length?"text-green":"text-orange"),onKeydown:ue(p,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[3]||(d[3]=e("span",null,[I("Press "),e("b",{"font-bold":""},"Enter"),I(" to navigate")],-1)),_.value.length?R("",!0):(t(),o("span",Ue," (no match)"))],64)):(t(),o("span",Ke,"Edit path above to navigate"))])]),v(E,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:C(()=>[e("div",We,[_.value.length?(t(),w(M,{key:0,pages:_.value,layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),o("div",qe,[...d[4]||(d[4]=[e("span",{op50:""},"No routes matched",-1)])]))])]),_:1}),v(E,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c($).length} routes registered in your application`,padding:"pr5"},{default:C(()=>[v(M,{pages:c($),layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),x.value.length?(t(),w(E,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${x.value.length} middleware registered in your application`,padding:"px13"},{default:C(()=>[e("table",He,[d[5]||(d[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),o(g,null,T(x.value,P=>(t(),o("tr",{key:P.path,"h-7":""},[e("td",null,[e("span",Je,N(P.name),1),P.global?(t(),w(O,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):R("",!0)]),e("td",null,[v(U,{filepath:P.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):R("",!0)])):(t(),w(K,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:`Create ${b.value} to enable routing`,actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in i?i.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in i?i.ensureDevAuthToken:c(ae))(),"enablePages")}}]},null,8,["description","actions"])),v(q,null,{default:C(()=>[v(W)]),_:1})],64)}}});export{lt as default};
@@ -1 +1 @@
1
- import{_ as h}from"./state-editor-kisl1jyp.js";import{p as k,J as i,Y as t,F as $,ah as N,X as f,$ as a,a0 as B,a2 as w,a3 as d,q as b,aj as O,a4 as m,a1 as n,u as j,ad as F,ac as V}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as E}from"./nsection-block-je23gs2w.js";import{b as G,f as P,_ as R}from"#entry";import{_ as A}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";const H={key:0,flex:"~ col gap-1"},K={key:1,mt2:"",px4:"",italic:"",op35:""},T=k({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(o){return(e,r)=>{const l=h;return t(),i("div",null,[o.state&&Object.keys(o.state).length>0?(t(),i("div",H,[(t(!0),i($,null,N(o.state,(u,s)=>(t(),f(l,{key:s,revision:o.revision,state:u,name:s.startsWith(o.prefix)?s.slice(o.prefix.length):s},{actions:a(c=>[B(e.$slots,"actions",w({ref_for:!0},c))]),_:3},8,["revision","state","name"]))),128))])):(t(),i("div",K," No data "))])}}}),q=Object.assign(T,{__name:"StateGroup"}),J={},L={class:"markdown-body"};function W(o,e){return t(),i("div",L,[...e[0]||(e[0]=[d("template",null,[d("div",{class:"markdown-body"},[d("h1",null,"State & Async Data"),d("p",null,"// TODO")])],-1)])])}const X=G(J,[["render",W]]),Y={key:0},at=k({__name:"payload",setup(o){const e=P(),r=b(()=>e.value?.nuxt.payload),l=b(()=>e.value?.revision.value);async function u(s){await e.value?.nuxt.hooks.callHookParallel("app:data:refresh",s)}return(s,c)=>{const v=q,p=E,x=R,S=h,g=X,D=A,C=O("tooltip");return t(),i($,null,[j(e)?(t(),i("div",Y,[n(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[n(v,{state:r.value.state,revision:l.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),n(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[n(x,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=y=>u())},{default:a(()=>[...c[1]||(c[1]=[V(" Re-fetch all data ",-1)])]),_:1})]),default:a(()=>[n(v,{state:r.value.data,revision:l.value},{actions:a(({isOpen:y,name:_})=>[y&&_?F((t(),f(x,{key:0,title:`Re-fetch '${_}'`,icon:"carbon-recycle",border:!1,onClick:z=>u([_])},null,8,["title","onClick"])),[[C,`Re-fetch '${_}'`,void 0,{bottom:!0}]]):m("",!0)]),_:1},8,["state","revision"])]),_:1}),r.value.functions&&Object.keys(r.value.functions).length?(t(),f(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[n(S,{"ml--6":"",state:r.value.functions,revision:l.value},null,8,["state","revision"])]),_:1})):m("",!0)])):m("",!0),n(D,null,{default:a(()=>[n(g)]),_:1})],64)}}});export{at as default};
1
+ import{_ as h}from"./state-editor-kisl1jyp.js";import{p as k,J as i,Y as t,F as $,ah as N,X as f,$ as a,a0 as B,a2 as w,a3 as d,q as b,aj as O,a4 as m,a1 as n,u as j,ad as F,ac as V}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as E}from"./nsection-block-je23gs2w.js";import{b as G,f as P,_ as R}from"#entry";import{_ as A}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";const H={key:0,flex:"~ col gap-1"},K={key:1,mt2:"",px4:"",italic:"",op35:""},T=k({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(o){return(e,r)=>{const l=h;return t(),i("div",null,[o.state&&Object.keys(o.state).length>0?(t(),i("div",H,[(t(!0),i($,null,N(o.state,(u,s)=>(t(),f(l,{key:s,revision:o.revision,state:u,name:s.startsWith(o.prefix)?s.slice(o.prefix.length):s},{actions:a(c=>[B(e.$slots,"actions",w({ref_for:!0},c))]),_:3},8,["revision","state","name"]))),128))])):(t(),i("div",K," No data "))])}}}),q=Object.assign(T,{__name:"StateGroup"}),J={},L={class:"markdown-body"};function W(o,e){return t(),i("div",L,[...e[0]||(e[0]=[d("template",null,[d("div",{class:"markdown-body"},[d("h1",null,"State & Async Data"),d("p",null,"// TODO")])],-1)])])}const X=G(J,[["render",W]]),Y={key:0},at=k({__name:"payload",setup(o){const e=P(),r=b(()=>e.value?.nuxt.payload),l=b(()=>e.value?.revision.value);async function u(s){await e.value?.nuxt.hooks.callHookParallel("app:data:refresh",s)}return(s,c)=>{const v=q,p=E,x=R,S=h,g=X,D=A,C=O("tooltip");return t(),i($,null,[j(e)?(t(),i("div",Y,[n(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[n(v,{state:r.value.state,revision:l.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),n(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[n(x,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=y=>u())},{default:a(()=>[...c[1]||(c[1]=[V(" Re-fetch all data ",-1)])]),_:1})]),default:a(()=>[n(v,{state:r.value.data,revision:l.value},{actions:a(({isOpen:y,name:_})=>[y&&_?F((t(),f(x,{key:0,title:`Re-fetch '${_}'`,icon:"carbon-recycle",border:!1,onClick:z=>u([_])},null,8,["title","onClick"])),[[C,`Re-fetch '${_}'`,void 0,{bottom:!0}]]):m("",!0)]),_:1},8,["state","revision"])]),_:1}),r.value.functions&&Object.keys(r.value.functions).length?(t(),f(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[n(S,{"ml--6":"",state:r.value.functions,revision:l.value},null,8,["state","revision"])]),_:1})):m("",!0)])):m("",!0),n(D,null,{default:a(()=>[n(g)]),_:1})],64)}}});export{at as default};
@@ -1 +1 @@
1
- import{F as r}from"#entry";import{u as c,m}from"./vue-devtools-hb1vi95m.js";import{p,J as i,Y as e,X as o,u as n,$ as _,ac as u}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const l={class:"h-full w-full"},v=p({__name:"pinia",setup(f){const{connected:s}=c();return(d,t)=>{const a=r;return e(),i("div",l,[n(s)?(e(),o(n(m),{key:0})):(e(),o(a,{key:1},{default:_(()=>[...t[0]||(t[0]=[u(" Connecting.... ",-1)])]),_:1}))])}}});export{v as default};
1
+ import{F as r}from"#entry";import{u as c,m}from"./vue-devtools-hb1vi95m.js";import{p,J as i,Y as e,X as o,u as n,$ as _,ac as u}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const l={class:"h-full w-full"},v=p({__name:"pinia",setup(f){const{connected:s}=c();return(d,t)=>{const a=r;return e(),i("div",l,[n(s)?(e(),o(n(m),{key:0})):(e(),o(a,{key:1},{default:_(()=>[...t[0]||(t[0]=[u(" Connecting.... ",-1)])]),_:1}))])}}});export{v as default};
@@ -1 +1 @@
1
- import{_ as S}from"./nbadge-d24jlq2b.js";import{_ as D}from"./filepath-item-owlv864w.js";import{_ as k}from"./duration-display-cjpkh71u.js";import{A as B,a3 as H,I,b as P,x as V,f as j}from"#entry";import{p as v,q as h,J as m,Y as s,a3 as n,a1 as l,a4 as _,ab as C,$ as d,X as u,Z as F,a0 as T,ac as x,F as b,ah as E,a7 as O}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as W}from"./nsection-block-je23gs2w.js";import{_ as A}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./nicon-title-he6hzgyb.js";const L={flex:"~ gap2","items-center":""},M={w8:"","text-right":"","text-sm":"",op25:""},Y={key:0,"flex-auto":"","text-right":""},q=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(e){const t=e,a=B(),c=h(()=>H(t.plugin.src,a.value?.rootDir||"").path);return(f,p)=>{const o=S,r=D,i=k;return s(),m("div",L,[n("div",M,C(e.index),1),l(r,{filepath:t.plugin.src,subpath:!0},{default:d(()=>[n("div",null,[c.value.startsWith("#")?(s(),u(o,{key:0,n:"rose",textContent:"virtual"})):c.value.startsWith(".")?_("",!0):(s(),u(o,{key:1,n:"gray",textContent:"module"})),e.plugin.mode==="server"?(s(),u(o,{key:2,n:"teal",textContent:"server"})):_("",!0),e.plugin.mode==="client"?(s(),u(o,{key:3,n:"orange",textContent:"client"})):_("",!0)])]),_:1},8,["filepath"]),e.plugin.metric?.duration!=null?(s(),m("div",Y,[l(i,{duration:e.plugin.metric?.duration,factor:10},null,8,["duration"])])):_("",!0)])}}}),z=Object.assign(q,{__name:"PluginItem"}),J={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},R={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(e){return(t,a)=>{const c=I,f=F("ContentSlot");return s(),m("div",J,[n("div",R,[e.icon?(s(),u(c,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):_("",!0),n("div",null,C(e.title),1)]),n("div",null,[T(t.$slots,"default",{},()=>[l(f,{use:t.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z=Object.assign(X,{__name:"HelpTip"}),G={};function K(e,t){const a=Z;return s(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:d(()=>[T(e.$slots,"default")]),_:3})}const Q=Object.assign(P(G,[["render",K]]),{__name:"HelpTipPerformance"}),U={},tt={class:"markdown-body"},nt={class:"markdown-body"};function et(e,t){const a=Q;return s(),m("div",tt,[n("template",null,[n("div",nt,[t[1]||(t[1]=n("h1",null,"Plugins",-1)),t[2]||(t[2]=n("p",null,[x("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),n("code",{"v-pre":""},"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),l(a,null,{default:d(()=>[...t[0]||(t[0]=[x(" 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}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])])])}const ot=P(U,[["render",et]]),st={pt4:""},it={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},gt=v({__name:"plugins",setup(e){const t=V(),a=j(),c=h(()=>{const p=t.value?.plugins||[],o=a.value?.metrics.clientPlugins()||[];return p.map(r=>{const i=typeof r=="string"?{src:r}:r;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),f=h(()=>{const p=a.value?.metrics.clientPlugins()||[],o=Math.min(...p.map(i=>i.start));return Math.max(...p.map(i=>i.end))-o});return(p,o)=>{const r=z,i=k,g=W,w=ot,N=A;return s(),m(b,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${c.value.length}`},{default:d(()=>[n("div",st,[(s(!0),m(b,null,E(c.value,(y,$)=>(s(),u(r,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:O($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",it,[o[0]||(o[0]=n("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1)),o[1]||(o[1]=n("span",{op50:""},"Total execution time:",-1)),l(i,{duration:f.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:d(()=>[l(w)]),_:1})],64)}}});export{gt as default};
1
+ import{_ as S}from"./nbadge-d24jlq2b.js";import{_ as D}from"./filepath-item-owlv864w.js";import{_ as k}from"./duration-display-cjpkh71u.js";import{A as B,a3 as H,I,b as P,x as V,f as j}from"#entry";import{p as v,q as h,J as m,Y as s,a3 as n,a1 as l,a4 as _,ab as C,$ as d,X as u,Z as F,a0 as T,ac as x,F as b,ah as E,a7 as O}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as W}from"./nsection-block-je23gs2w.js";import{_ as A}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./nicon-title-he6hzgyb.js";const L={flex:"~ gap2","items-center":""},M={w8:"","text-right":"","text-sm":"",op25:""},Y={key:0,"flex-auto":"","text-right":""},q=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(e){const t=e,a=B(),c=h(()=>H(t.plugin.src,a.value?.rootDir||"").path);return(f,p)=>{const o=S,r=D,i=k;return s(),m("div",L,[n("div",M,C(e.index),1),l(r,{filepath:t.plugin.src,subpath:!0},{default:d(()=>[n("div",null,[c.value.startsWith("#")?(s(),u(o,{key:0,n:"rose",textContent:"virtual"})):c.value.startsWith(".")?_("",!0):(s(),u(o,{key:1,n:"gray",textContent:"module"})),e.plugin.mode==="server"?(s(),u(o,{key:2,n:"teal",textContent:"server"})):_("",!0),e.plugin.mode==="client"?(s(),u(o,{key:3,n:"orange",textContent:"client"})):_("",!0)])]),_:1},8,["filepath"]),e.plugin.metric?.duration!=null?(s(),m("div",Y,[l(i,{duration:e.plugin.metric?.duration,factor:10},null,8,["duration"])])):_("",!0)])}}}),z=Object.assign(q,{__name:"PluginItem"}),J={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},R={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(e){return(t,a)=>{const c=I,f=F("ContentSlot");return s(),m("div",J,[n("div",R,[e.icon?(s(),u(c,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):_("",!0),n("div",null,C(e.title),1)]),n("div",null,[T(t.$slots,"default",{},()=>[l(f,{use:t.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z=Object.assign(X,{__name:"HelpTip"}),G={};function K(e,t){const a=Z;return s(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:d(()=>[T(e.$slots,"default")]),_:3})}const Q=Object.assign(P(G,[["render",K]]),{__name:"HelpTipPerformance"}),U={},tt={class:"markdown-body"},nt={class:"markdown-body"};function et(e,t){const a=Q;return s(),m("div",tt,[n("template",null,[n("div",nt,[t[1]||(t[1]=n("h1",null,"Plugins",-1)),t[2]||(t[2]=n("p",null,[x("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),n("code",{"v-pre":""},"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),l(a,null,{default:d(()=>[...t[0]||(t[0]=[x(" 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}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])])])}const ot=P(U,[["render",et]]),st={pt4:""},it={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},gt=v({__name:"plugins",setup(e){const t=V(),a=j(),c=h(()=>{const p=t.value?.plugins||[],o=a.value?.metrics.clientPlugins()||[];return p.map(r=>{const i=typeof r=="string"?{src:r}:r;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),f=h(()=>{const p=a.value?.metrics.clientPlugins()||[],o=Math.min(...p.map(i=>i.start));return Math.max(...p.map(i=>i.end))-o});return(p,o)=>{const r=z,i=k,g=W,w=ot,N=A;return s(),m(b,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${c.value.length}`},{default:d(()=>[n("div",st,[(s(!0),m(b,null,E(c.value,(y,$)=>(s(),u(r,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:O($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",it,[o[0]||(o[0]=n("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1)),o[1]||(o[1]=n("span",{op50:""},"Total execution time:",-1)),l(i,{duration:f.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:d(()=>[l(w)]),_:1})],64)}}});export{gt as default};
@@ -1 +1 @@
1
- import{f as m,w as c,F as d}from"#entry";import{u as f,f as _}from"./vue-devtools-hb1vi95m.js";import{p as v,J as C,Y as n,X as l,u as o,$ as E,ac as I}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:a}=f(),t=m(),p=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=d;return n(),C("div",k,[o(a)?(n(),l(o(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:o(p)},null,8,["onOpenInEditor"])):(n(),l(i,{key:1},{default:E(()=>[...e[2]||(e[2]=[I(" Connecting.... ",-1)])]),_:1}))])}}});export{N as default};
1
+ import{f as m,w as c,F as d}from"#entry";import{u as f,f as _}from"./vue-devtools-hb1vi95m.js";import{p as v,J as C,Y as n,X as l,u as o,$ as E,ac as I}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:a}=f(),t=m(),p=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=d;return n(),C("div",k,[o(a)?(n(),l(o(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:o(p)},null,8,["onOpenInEditor"])):(n(),l(i,{key:1},{default:E(()=>[...e[2]||(e[2]=[I(" Connecting.... ",-1)])]),_:1}))])}}});export{N as default};
@@ -1 +1 @@
1
- import{_ as x}from"./state-editor-kisl1jyp.js";import{_ as b}from"./nsection-block-je23gs2w.js";import{b as y,f as C,bn as k}from"#entry";import{J as u,Y as l,a3 as e,ac as p,p as w,q as c,a4 as N,a1 as t,u as m,$ as i,F as R}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as T}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";const B={},V={class:"markdown-body"};function D(d,n){return l(),u("div",V,[...n[0]||(n[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Runtime Configs"),e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables."),e("p",null,[p("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",{"v-pre":""},"nuxt.config.js"),p(" file, or check more details in the documentation.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const F=y(B,[["render",D]]),P={key:0},Y=w({__name:"runtime-configs",setup(d){const n=C(),_=k(),f=c(()=>n.value?.nuxt.payload),a=c(()=>n.value?.revision.value),v=c(()=>{const o={..._.value};return delete o.public,delete o.app,o});return(o,S)=>{const s=x,r=b,g=F,h=T;return l(),u(R,null,[m(n)?(l(),u("div",P,[t(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:i(()=>[t(s,{state:m(n).app.appConfig,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:i(()=>[t(s,{state:f.value.config?.public,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:i(()=>[t(s,{state:v.value,revision:a.value,readonly:""},null,8,["state","revision"])]),_:1})])):N("",!0),t(h,null,{default:i(()=>[t(g)]),_:1})],64)}}});export{Y as default};
1
+ import{_ as x}from"./state-editor-kisl1jyp.js";import{_ as b}from"./nsection-block-je23gs2w.js";import{b as y,f as C,bn as k}from"#entry";import{J as u,Y as l,a3 as e,ac as p,p as w,q as c,a4 as N,a1 as t,u as m,$ as i,F as R}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as T}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";const B={},V={class:"markdown-body"};function D(d,n){return l(),u("div",V,[...n[0]||(n[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Runtime Configs"),e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables."),e("p",null,[p("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",{"v-pre":""},"nuxt.config.js"),p(" file, or check more details in the documentation.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const F=y(B,[["render",D]]),P={key:0},Y=w({__name:"runtime-configs",setup(d){const n=C(),_=k(),f=c(()=>n.value?.nuxt.payload),a=c(()=>n.value?.revision.value),v=c(()=>{const o={..._.value};return delete o.public,delete o.app,o});return(o,S)=>{const s=x,r=b,g=F,h=T;return l(),u(R,null,[m(n)?(l(),u("div",P,[t(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:i(()=>[t(s,{state:m(n).app.appConfig,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:i(()=>[t(s,{state:f.value.config?.public,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:i(()=>[t(s,{state:v.value,revision:a.value,readonly:""},null,8,["state","revision"])]),_:1})])):N("",!0),t(h,null,{default:i(()=>[t(g)]),_:1})],64)}}});export{Y as default};
@@ -1 +1 @@
1
- import{b8 as S,r as k,E as M,bo as P}from"#entry";import{p as A,aE as R,D as L,M as C,J as U,Y as T,u as x}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function E(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function I(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||E,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},J=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},V=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},q=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"&&typeof s!="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new q(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new V(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=I){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(J)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Y=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Y))}});export{ee as default};
1
+ import{b8 as S,r as k,E as M,bo as P}from"#entry";import{p as A,aE as R,D as L,M as C,J as U,Y as T,u as x}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function E(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function I(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||E,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},J=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},V=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},q=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"&&typeof s!="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new q(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new V(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=I){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(J)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Y=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Y))}});export{ee as default};
@@ -1,4 +1,4 @@
1
- import{bg as $e,I as Ee,b6 as se,bh as Ke,bi as Qe,b4 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as je,ay as ot,b5 as nt,a as at,_ as De,v as lt,i as Re,F as st,M as rt,bj as it,S as ut,n as ct,a8 as dt}from"#entry";import{_ as pt}from"./nnavbar-b4ap0r8w.js";import{_ as Ve}from"./nbadge-d24jlq2b.js";import{p as ye,k as P,J as x,Y as r,a3 as u,a0 as ft,a4 as N,a7 as M,X as E,ab as U,u as _,ac as K,a5 as vt,F as L,ah as H,E as me,x as Ie,d as Oe,C as mt,z as yt,r as ve,q as R,w as ht,aj as Ue,a1 as v,$ as T,ad as Z,a2 as gt,aw as _t,K as bt}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xt}from"./nselect-nvb1idpm.js";import{_ as Ne}from"./server-route-inputs-e42a8bs5.js";import{_ as kt}from"./code-snippets-io8vjgte.js";import{_ as wt}from"./data-schema-button-hqryewml.js";import{_ as Ct}from"./ncode-block-pcw3yh3u.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-je23gs2w.js";import{_ as Tt}from"./ndrawer-ele5003c.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-kbr5sp48.js";import"./ncheckbox-eijyrwcq.js";import"./client-miiq4qin.js";import"./nicon-title-he6hzgyb.js";const $t=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),o=$e();return(n,m)=>{const f=Ee,c=Ve,b=Pe;return r(),x("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":_(o)===e.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,o.value=e.item.filepath})},[u("div",{class:M({"w-12":!e.item.routes}),"flex-none":"","text-left":""},[e.item.type==="collection"?(r(),E(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),E(c,{key:1,class:M(_(se)(e.item.method||"*")),textContent:U((e.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":e.item.routes}),"text-sm":"","font-mono":""},[e.item.type==="collection"?(r(),E(f,{key:0,title:`${e.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+U(e.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(n.$slots,"default",{key:0},()=>[(r(!0),x(L,null,H(e.item.routes,h=>(r(),E(b,{key:h.filepath,item:h,index:e.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),Pe=Object.assign($t,{__name:"ServerRouteListItem"});function Et(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const o={},n=s||{},m=n.decode||jt;let f=0;for(;f<e.length;){const c=e.indexOf("=",f);if(c===-1)break;let b=e.indexOf(";",f);if(b===-1)b=e.length;else if(b<c){f=e.lastIndexOf(";",c-1)+1;continue}const h=e.slice(f,c).trim();if(n?.filter&&!n?.filter(h)){f=b+1;continue}if(o[h]===void 0){let i=e.slice(c+1,b).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),o[h]=Dt(i,m)}f=b+1}return o}function jt(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,o){const n=o||{},m=n.encode||encodeURIComponent;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=m(s);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let c=e+"="+f;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ae.test(n.domain))throw new TypeError("option domain is invalid");c+="; Domain="+n.domain}if(n.path){if(!ae.test(n.path))throw new TypeError("option path is invalid");c+="; Path="+n.path}if(n.expires){if(!Rt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(c+="; HttpOnly"),n.secure&&(c+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{c+="; Priority=Low";break}case"medium":{c+="; Priority=Medium";break}case"high":{c+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{c+="; SameSite=Strict";break}case"lax":{c+="; SameSite=Lax";break}case"strict":{c+="; SameSite=Strict";break}case"none":{c+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(c+="; Partitioned"),c}function Rt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function A(e){if(typeof e!="object")return e;var s,o,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){o=new e.constructor;for(s in e)e.hasOwnProperty(s)&&o[s]!==e[s]&&(o[s]=A(e[s]))}else{o={};for(s in e)s==="__proto__"?Object.defineProperty(o,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):o[s]=A(e[s])}return o}if(n==="[object Array]"){for(s=e.length,o=Array(s);s--;)o[s]=A(e[s]);return o}return n==="[object Set]"?(o=new Set,e.forEach(function(m){o.add(A(m))}),o):n==="[object Map]"?(o=new Map,e.forEach(function(m,f){o.set(A(f),A(m))}),o):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(o=new RegExp(e.source,e.flags),o.lastIndex=e.lastIndex,o):n==="[object DataView]"?new e.constructor(A(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=globalThis.cookieStore;function It(e,s){const o={...Vt,...s};o.filter??=i=>i===e;const n=Se(o)||{};let m;o.maxAge!==void 0?m=o.maxAge*1e3:o.expires&&(m=o.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,c=f||n[e]===void 0||n[e]===null,b=A(f?void 0:n[e]??o.default?.()),h=m&&!f?Nt(b,m,o.watch&&o.watch!=="shallow"):P(b);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const j=(k=!1)=>{!k&&(o.readonly||Qe(h.value,n[e]))||(Ut(e,h.value,o),n[e]=A(h.value),i?.postMessage({value:o.encode(h.value)}))},I=k=>{const y=k.refresh?Se(o)?.[e]:o.decode(k.value);B=!0,h.value=y,n[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Oe();if(J&&me(()=>{B=!0,j(),i?.close()}),le){const k=y=>{const O=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);O&&I({value:O.value}),g&&I({value:null})};le.addEventListener("change",k),J&&me(()=>le.removeEventListener("change",k))}else i&&(i.onmessage=({data:k})=>I(k));o.watch&&Ie(h,()=>{B||j()},{deep:o.watch!=="shallow"}),c&&j(c)}return h}function Se(e={}){return Et(document.cookie,e)}function Ot(e,s,o={}){return s==null?Ce(e,s,{...o,maxAge:-1}):Ce(e,s,o)}function Ut(e,s,o={}){document.cookie=Ot(e,s,o)}const Te=2147483647;function Nt(e,s,o){let n,m,f=0;const c=o?P(e):{value:e};return Oe()&&me(()=>{m?.(),clearTimeout(n)}),mt((b,h)=>{o&&(m=Ie(c,h));function i(){f=0,clearTimeout(n);const j=s-f,I=j<Te?j:Te;n=setTimeout(()=>{if(f+=I,f<s)return i();c.value=void 0,h()},I)}return{get(){return b(),c.value},set(j){i(),c.value=j,h()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},At={flex:"~ gap2 items-center"},Bt={relative:"","w-full":""},qt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Qt={key:3,border:"b base",relative:"","n-code-block":""},Xt={flex:"~ wrap","w-full":""},Yt=["onClick"],Zt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},eo={key:1,"text-xs":"",op50:""},to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],ao={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},so=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const o=e,n=s,[m,f]=Xe(),c=Ye(),b=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=R(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),I=R(()=>{if(j.value==="json")return JSON.stringify(i.data,null,2);if(j.value==="media"||j.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),k=tt(),y=R(()=>o.route.route?.split(/((?:\*\*)?:\w+)/g)),O=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(o.route.method||"GET"),C=P({}),w=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:S,sendFrom:F}=je("serverRoutes"),Q=R(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=R(()=>ie.includes(g.value.toUpperCase())),d=P(),te=["input","json"],G=P(te[0]),ue=R({get:()=>w[d.value],set:a=>{w[d.value]=a}}),he=R(()=>({...W(S.value.query),...W(w.query)})),ge=R(()=>({...W(S.value.headers),...W(w.headers)})),ce=R(()=>ee.value?G.value==="json"?{...W(S.value.body),...V.value}:{...W(S.value.body),...W(w.body)}:void 0),Ae=R(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=R(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&C.value[D]||D).join("")||"")+a;let p=b.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),_e=R(()=>Ae.value+oe.value);function W(a=[]){const t=Object.fromEntries(a.filter(({active:p,key:D,value:$})=>p&&D&&$!==void 0).map(({key:p,value:D})=>[p,D]));return Object.entries(t).length?t:void 0}async function be(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;rt("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(_e.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:ce.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}B.value=!1,i.fetchTime=Date.now()-a}const xe=R(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
1
+ import{bg as $e,I as Ee,b6 as se,bh as Ke,bi as Qe,b4 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as je,ay as ot,b5 as nt,a as at,_ as De,v as lt,i as Re,F as st,M as rt,bj as it,S as ut,n as ct,a8 as dt}from"#entry";import{_ as pt}from"./nnavbar-b4ap0r8w.js";import{_ as Ve}from"./nbadge-d24jlq2b.js";import{p as ye,k as P,J as x,Y as r,a3 as u,a0 as ft,a4 as N,a7 as M,X as E,ab as U,u as _,ac as K,a5 as vt,F as L,ah as H,E as me,x as Ie,d as Oe,C as mt,z as yt,r as ve,q as R,w as ht,aj as Ue,a1 as v,$ as T,ad as Z,a2 as gt,aw as _t,K as bt}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xt}from"./nselect-nvb1idpm.js";import{_ as Ne}from"./server-route-inputs-e42a8bs5.js";import{_ as kt}from"./code-snippets-io8vjgte.js";import{_ as wt}from"./data-schema-button-hqryewml.js";import{_ as Ct}from"./ncode-block-pcw3yh3u.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-je23gs2w.js";import{_ as Tt}from"./ndrawer-ele5003c.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./ncheckbox-eijyrwcq.js";import"./client-miiq4qin.js";import"./nicon-title-he6hzgyb.js";const $t=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),o=$e();return(n,m)=>{const f=Ee,c=Ve,b=Pe;return r(),x("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":_(o)===e.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,o.value=e.item.filepath})},[u("div",{class:M({"w-12":!e.item.routes}),"flex-none":"","text-left":""},[e.item.type==="collection"?(r(),E(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),E(c,{key:1,class:M(_(se)(e.item.method||"*")),textContent:U((e.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":e.item.routes}),"text-sm":"","font-mono":""},[e.item.type==="collection"?(r(),E(f,{key:0,title:`${e.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+U(e.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(n.$slots,"default",{key:0},()=>[(r(!0),x(L,null,H(e.item.routes,h=>(r(),E(b,{key:h.filepath,item:h,index:e.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),Pe=Object.assign($t,{__name:"ServerRouteListItem"});function Et(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const o={},n=s||{},m=n.decode||jt;let f=0;for(;f<e.length;){const c=e.indexOf("=",f);if(c===-1)break;let b=e.indexOf(";",f);if(b===-1)b=e.length;else if(b<c){f=e.lastIndexOf(";",c-1)+1;continue}const h=e.slice(f,c).trim();if(n?.filter&&!n?.filter(h)){f=b+1;continue}if(o[h]===void 0){let i=e.slice(c+1,b).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),o[h]=Dt(i,m)}f=b+1}return o}function jt(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,o){const n=o||{},m=n.encode||encodeURIComponent;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=m(s);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let c=e+"="+f;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ae.test(n.domain))throw new TypeError("option domain is invalid");c+="; Domain="+n.domain}if(n.path){if(!ae.test(n.path))throw new TypeError("option path is invalid");c+="; Path="+n.path}if(n.expires){if(!Rt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(c+="; HttpOnly"),n.secure&&(c+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{c+="; Priority=Low";break}case"medium":{c+="; Priority=Medium";break}case"high":{c+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{c+="; SameSite=Strict";break}case"lax":{c+="; SameSite=Lax";break}case"strict":{c+="; SameSite=Strict";break}case"none":{c+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(c+="; Partitioned"),c}function Rt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function A(e){if(typeof e!="object")return e;var s,o,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){o=new e.constructor;for(s in e)e.hasOwnProperty(s)&&o[s]!==e[s]&&(o[s]=A(e[s]))}else{o={};for(s in e)s==="__proto__"?Object.defineProperty(o,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):o[s]=A(e[s])}return o}if(n==="[object Array]"){for(s=e.length,o=Array(s);s--;)o[s]=A(e[s]);return o}return n==="[object Set]"?(o=new Set,e.forEach(function(m){o.add(A(m))}),o):n==="[object Map]"?(o=new Map,e.forEach(function(m,f){o.set(A(f),A(m))}),o):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(o=new RegExp(e.source,e.flags),o.lastIndex=e.lastIndex,o):n==="[object DataView]"?new e.constructor(A(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=globalThis.cookieStore;function It(e,s){const o={...Vt,...s};o.filter??=i=>i===e;const n=Se(o)||{};let m;o.maxAge!==void 0?m=o.maxAge*1e3:o.expires&&(m=o.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,c=f||n[e]===void 0||n[e]===null,b=A(f?void 0:n[e]??o.default?.()),h=m&&!f?Nt(b,m,o.watch&&o.watch!=="shallow"):P(b);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const j=(k=!1)=>{!k&&(o.readonly||Qe(h.value,n[e]))||(Ut(e,h.value,o),n[e]=A(h.value),i?.postMessage({value:o.encode(h.value)}))},I=k=>{const y=k.refresh?Se(o)?.[e]:o.decode(k.value);B=!0,h.value=y,n[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Oe();if(J&&me(()=>{B=!0,j(),i?.close()}),le){const k=y=>{const O=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);O&&I({value:O.value}),g&&I({value:null})};le.addEventListener("change",k),J&&me(()=>le.removeEventListener("change",k))}else i&&(i.onmessage=({data:k})=>I(k));o.watch&&Ie(h,()=>{B||j()},{deep:o.watch!=="shallow"}),c&&j(c)}return h}function Se(e={}){return Et(document.cookie,e)}function Ot(e,s,o={}){return s==null?Ce(e,s,{...o,maxAge:-1}):Ce(e,s,o)}function Ut(e,s,o={}){document.cookie=Ot(e,s,o)}const Te=2147483647;function Nt(e,s,o){let n,m,f=0;const c=o?P(e):{value:e};return Oe()&&me(()=>{m?.(),clearTimeout(n)}),mt((b,h)=>{o&&(m=Ie(c,h));function i(){f=0,clearTimeout(n);const j=s-f,I=j<Te?j:Te;n=setTimeout(()=>{if(f+=I,f<s)return i();c.value=void 0,h()},I)}return{get(){return b(),c.value},set(j){i(),c.value=j,h()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},At={flex:"~ gap2 items-center"},Bt={relative:"","w-full":""},qt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Qt={key:3,border:"b base",relative:"","n-code-block":""},Xt={flex:"~ wrap","w-full":""},Yt=["onClick"],Zt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},eo={key:1,"text-xs":"",op50:""},to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],ao={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},so=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const o=e,n=s,[m,f]=Xe(),c=Ye(),b=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=R(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),I=R(()=>{if(j.value==="json")return JSON.stringify(i.data,null,2);if(j.value==="media"||j.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),k=tt(),y=R(()=>o.route.route?.split(/((?:\*\*)?:\w+)/g)),O=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(o.route.method||"GET"),C=P({}),w=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:S,sendFrom:F}=je("serverRoutes"),Q=R(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=R(()=>ie.includes(g.value.toUpperCase())),d=P(),te=["input","json"],G=P(te[0]),ue=R({get:()=>w[d.value],set:a=>{w[d.value]=a}}),he=R(()=>({...W(S.value.query),...W(w.query)})),ge=R(()=>({...W(S.value.headers),...W(w.headers)})),ce=R(()=>ee.value?G.value==="json"?{...W(S.value.body),...V.value}:{...W(S.value.body),...W(w.body)}:void 0),Ae=R(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=R(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&C.value[D]||D).join("")||"")+a;let p=b.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),_e=R(()=>Ae.value+oe.value);function W(a=[]){const t=Object.fromEntries(a.filter(({active:p,key:D,value:$})=>p&&D&&$!==void 0).map(({key:p,value:D})=>[p,D]));return Object.entries(t).length?t:void 0}async function be(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;rt("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(_e.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:ce.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}B.value=!1,i.fetchTime=Date.now()-a}const xe=R(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
2
2
  `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),p&&t.push(`headers: {
3
3
  ${p}
4
4
  }`),ce.value&&t.push(`body: ${JSON.stringify(ce.value,null,2)}`);const D=t.length?`, {